问题修改

master
zhangdi 3 weeks ago
parent 9b28c5569d
commit a7607a644e
  1. 46
      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) { handleSelectionChange(selection, parentRow) {
console.log('666666', selection, parentRow) console.log('666666', selection, parentRow)
const maxAllowed = parentRow.applicationQuantity - parentRow.outboundQuantity; const maxAllowed = parentRow.applicationQuantity - parentRow.outboundQuantity;
if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){ // if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){
const validSelection = selection.slice(0, maxAllowed); // const validSelection = selection.slice(0, maxAllowed);
const removedItems = selection.slice(maxAllowed); // const removedItems = selection.slice(maxAllowed);
const selectionWithParent = validSelection.map(item => ({ // const selectionWithParent = validSelection.map(item => ({
...item, // ...item,
parentMaterialId: parentRow.materialId, // parentMaterialId: parentRow.materialId,
parentDepartmentName: parentRow.departmentName, // parentDepartmentName: parentRow.departmentName,
applicationQuantity: parentRow.applicationQuantity, // applicationQuantity: parentRow.applicationQuantity,
department:parentRow.department, // department:parentRow.department,
departmentName:parentRow.departmentName, // departmentName:parentRow.departmentName,
ldDemandEndId: parentRow.ldDemandEndId, // ldDemandEndId: parentRow.ldDemandEndId,
outboundQuantity: parentRow.outboundQuantity, // outboundQuantity: parentRow.outboundQuantity,
})); // }));
this.selectedRows = this.selectedRows.filter( // this.selectedRows = this.selectedRows.filter(
item => item.parentMaterialId !== parentRow.materialId // item => item.parentMaterialId !== parentRow.materialId
); // );
this.selectedRows.push(...selectionWithParent); // this.selectedRows.push(...selectionWithParent);
// selection // // selection
const lastSelected = selection[selection.length - 1]; // const lastSelected = selection[selection.length - 1];
// UI // // UI
this.$refs.innerTable.toggleRowSelection(lastSelected, false); // this.$refs.innerTable.toggleRowSelection(lastSelected, false);
return // return
} // }
// //
const selectionWithParent = selection.map(item => ({ const selectionWithParent = selection.map(item => ({
...item, ...item,

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

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

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

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

Loading…
Cancel
Save