问题修改

master
zhangdi 3 weeks ago
parent 9b28c5569d
commit a7607a644e
  1. 50
      src/views/firstOrder/components/batchSelectionDialog.vue
  2. 24
      src/views/materials/expend.vue
  3. 3
      src/views/secondOrder/components/outDialog.vue
  4. 5
      src/views/secondOrder/components/recordDialog.vue
  5. 1
      src/views/secondOrder/list.vue

@ -93,31 +93,31 @@ export default {
handleSelectionChange(selection, parentRow) {
console.log('666666', selection, parentRow)
const maxAllowed = parentRow.applicationQuantity - parentRow.outboundQuantity;
if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){
const validSelection = selection.slice(0, maxAllowed);
const removedItems = selection.slice(maxAllowed);
const selectionWithParent = validSelection.map(item => ({
...item,
parentMaterialId: parentRow.materialId,
parentDepartmentName: parentRow.departmentName,
applicationQuantity: parentRow.applicationQuantity,
department:parentRow.department,
departmentName:parentRow.departmentName,
ldDemandEndId: parentRow.ldDemandEndId,
outboundQuantity: parentRow.outboundQuantity,
}));
this.selectedRows = this.selectedRows.filter(
item => item.parentMaterialId !== parentRow.materialId
);
this.selectedRows.push(...selectionWithParent);
// selection
const lastSelected = selection[selection.length - 1];
// UI
this.$refs.innerTable.toggleRowSelection(lastSelected, false);
return
}
// if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){
// const validSelection = selection.slice(0, maxAllowed);
// const removedItems = selection.slice(maxAllowed);
// const selectionWithParent = validSelection.map(item => ({
// ...item,
// parentMaterialId: parentRow.materialId,
// parentDepartmentName: parentRow.departmentName,
// applicationQuantity: parentRow.applicationQuantity,
// department:parentRow.department,
// departmentName:parentRow.departmentName,
// ldDemandEndId: parentRow.ldDemandEndId,
// outboundQuantity: parentRow.outboundQuantity,
// }));
// this.selectedRows = this.selectedRows.filter(
// item => item.parentMaterialId !== parentRow.materialId
// );
// this.selectedRows.push(...selectionWithParent);
// // selection
// const lastSelected = selection[selection.length - 1];
// // UI
// this.$refs.innerTable.toggleRowSelection(lastSelected, false);
// return
// }
//
const selectionWithParent = selection.map(item => ({
...item,

@ -25,6 +25,12 @@
<span v-else>待借出</span>
</template>
<template slot-scope="scope" slot="menu">
<el-button
type="text"
size="small"
@click.stop="handleLog(scope.row)"
>记录
</el-button>
<el-button
v-if="scope.row.isBorrow == '0'"
type="text"
@ -61,6 +67,15 @@
:durableFormId="scrapInfo.id"
@submitSuccess="handleRefresh"
></scrapDialog>
<!-- 记录 -->
<recordDialog
v-if="recordShow"
:showDialog="recordShow"
@closeDialog="closeDialog"
:rowData="rowData"
:type="'NY'"
></recordDialog>
</div>
</template>
@ -70,13 +85,16 @@ import { getList } from "@/api/materials/expend";
import returnDialog from "./components/returnDialog.vue";
import scrapDialog from "./components/scrapDialog.vue";
import recordDialog from "../secondOrder/components/recordDialog.vue";
export default {
components: {
returnDialog,
scrapDialog,
recordDialog
},
data() {
return {
recordShow:false,
returnShow: false, //
scrapShow: false, //
@ -232,10 +250,16 @@ export default {
this.tableData = this.ckTable;
},
methods: {
handleLog(row) {
this.recordShow = true;
this.rowData = row;
},
//
closeDialog() {
this.returnShow = false;
this.scrapShow = false;
this.recordShow = false;
this.onLoad(this.page)
},
searchReset() {
this.query = {};

@ -829,6 +829,9 @@ export default {
if (this.sizeForm.groupName != "自由出库") {
this.groupTableData = res.data.result.ldTwoOutStorageDetailList;
this.groupTableData.forEach(item=>{
item.applyNum=item.num
})
}
// this.sizeForm.ldTwoOutStorage.proposerInfo={}
});

@ -42,6 +42,10 @@ export default {
type: Object,
default: () => ({}),
},
type: {
type: String,
default: "",
},
},
data() {
return {
@ -147,6 +151,7 @@ export default {
transactionType: this.transactionType,
currentPage: page.currentPage,
pageSize: page.pageSize,
type:this.type
};
recordList(query_).then((res) => {
this.data = res.data.result.list;

@ -28,6 +28,7 @@
:showDialog="recordShow"
@closeDialog="closeDialog"
:rowData="rowData"
:type="'YH'"
></recordDialog>
</div>
</template>

Loading…
Cancel
Save