From 41e0df8413624e6034c967f3afae30da59370879 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期一, 11 十二月 2023 16:20:15 +0800 Subject: [PATCH] modified: src/components/verifition/Verify/VerifyPoints.vue modified: src/const/crud/admin/sys-public-param.js modified: src/page/full-screen/fullScreenPlus.vue modified: src/page/index/logo.vue modified: src/page/index/sidebar/sidebarItem.vue modified: src/page/login/index.vue modified: src/page/login/thirdpartylogin.vue modified: src/util/elAttr.js modified: src/views/accounting/unitworkfactor/unitworkfactor-form.vue modified: src/views/accounting/unitworkfactor/updateQuota-form.vue modified: src/views/basic/discmaintenance/discmaintenance-form.vue modified: src/views/basic/log/index.vue modified: src/views/basic/part/part-form.vue modified: src/views/basic/part/print-label-form.vue modified: src/views/basic/poc/index.vue modified: src/views/basic/tabletest/index.vue modified: src/views/basic/template/index.vue modified: src/views/basic/template/template-form.vue modified: src/views/basic/workstation/workstation-form.vue modified: src/views/common/custom-table.vue modified: src/views/common/documentDetail.vue modified: src/views/common/operationParamTemplate.vue modified: src/views/common/rawMaterial-part.vue modified: src/views/common/search-select.vue modified: src/views/common/ztt-table.vue modified: src/views/huawei/code19bind/list.vue modified: src/views/huawei/code19gen/form.vue modified: src/views/huawei/grossweightcode/list.vue modified: src/views/huawei/grossweightcode/task-secret-form.vue modified: src/views/oa/JiegouModal.vue modified: src/views/oa/PeizhiModal.vue modified: src/views/oa/technology-document-new.vue modified: src/views/oa/technology-document.vue modified: src/views/plan/customer/index.vue modified: src/views/plan/customerorder/confirm-pull-customerorder.vue modified: src/views/plan/customerorder/customerorder-config-history.vue modified: src/views/plan/customerorder/customerorder-form.vue modified: src/views/plan/customerorder/customerorder-return.vue modified: src/views/plan/customerorder/customerorder-ztt-table.vue modified: src/views/plan/customerorder/index.vue modified: src/views/plan/customerorder/other-customer-order-line.vue modified: src/views/plan/customerorder/sample-customerorder-form.vue modified: src/views/plan/customerorder/schedule-table.vue modified: src/views/plan/manufacturingorder/auto-operationtask.vue modified: src/views/plan/manufacturingorder/customerorder.vue modified: src/views/plan/manufacturingorder/customize-param-template.vue modified: src/views/plan/manufacturingorder/order-operation-form.vue modified: src/views/plan/manufacturingorder/productorder-form.vue modified: src/views/plan/manufacturingorderapply/index.vue modified: src/views/plan/masterproductionschedule/auto-manufacturingorder.vue modified: src/views/plan/operationtask/gantt.vue modified: src/views/plan/operationtask/operationtask-form.vue modified: src/views/plan/operationtask/task-material.vue modified: src/views/plan/productionschedul/index.vue modified: src/views/plan/productionschedul/template-form.vue modified: src/views/plan/schedule/gantt.vue modified: src/views/plan/schedulelookover/ganttview.vue modified: src/views/plan/segmentmerge/index.vue modified: src/views/plan/segmentmerge/operate-dialog.vue modified: src/views/plan/segmentmerge/operation-technology-form.vue modified: src/views/product/dutyrecord/index.vue modified: src/views/product/producttraceability/index.vue modified: src/views/product/producttraceability/traceability-diagram.vue modified: src/views/product/workbench/batchproductout-form-new.vue modified: src/views/product/workbench/batchproductout-form.vue modified: src/views/product/workbench/feed-form.vue modified: src/views/product/workbench/feed-pane.vue modified: src/views/product/workbench/feed-tab.vue modified: src/views/product/workbench/handymantype.vue modified: src/views/product/workbench/index.vue modified: src/views/product/workbench/mould-pane.vue modified: src/views/product/workbench/operation-task-pane.vue modified: src/views/product/workbench/product-record-form.vue modified: src/views/product/workbench/productout-form-by-batch.vue modified: src/views/product/workbench/productout-form.vue modified: src/views/product/workbench/productrecord-tab.vue modified: src/views/product/workbench/producttracking-tab.vue modified: src/views/product/workbench/shift-productout-form.vue modified: src/views/product/workbench/splitTaskForm.vue modified: src/views/product/workbench/taskinfo-pane.vue modified: src/views/quality/Packaging_ledger/pack-from.vue modified: src/views/quality/apply/index.vue modified: src/views/quality/exception/exception.vue modified: src/views/quality/exception/index.vue modified: src/views/quality/finishedProductInspection/finishedProduct-form.vue modified: src/views/quality/finishedProductInspection/finishedProduct-print.vue modified: src/views/quality/finishedProductInspection/finishedProducter-print.vue modified: src/views/quality/finishedProductInspection/index.vue modified: src/views/quality/newReport/ReportForm.vue modified: src/views/quality/processInspect/index.vue modified: src/views/quality/processInspect/processInspect-form.vue modified: src/views/quality/processconfiguration/index.vue modified: src/views/quality/processconfiguration/table-form.vue modified: src/views/quality/rawMaterial/QrcodeReader.vue modified: src/views/quality/rawMaterial/index.vue modified: src/views/quality/rawMaterial/rawMaterial-form.vue modified: src/views/quality/report/index.vue modified: src/views/quality/standardbind/standardbind-form.vue modified: src/views/quality/statistics/rateChart.vue modified: src/views/quality/testitemlayout/index.vue modified: src/views/quality/testplan/testplan-form.vue modified: src/views/quality/unqualifiedprocess/examineApproveform.vue modified: src/views/quality/unqualifiedprocess/index.vue modified: src/views/quality/unqualifiedprocess/loaction-form.vue modified: src/views/quality/unqualifiedprocess/unqualifiedprocessform.vue modified: src/views/technology/completeproductstructure/completeproductstructure-form.vue modified: src/views/technology/document/checkStandardTable.vue modified: src/views/technology/document/document-form.vue modified: src/views/technology/document/extendsOperation.vue modified: src/views/technology/document/extendsTestStandard.vue modified: src/views/technology/document/extendsTestStandardParam.vue modified: src/views/technology/document/teststandard.vue modified: src/views/technology/structure/single-structure-form.vue modified: src/views/warehouse/changestock/index.vue modified: src/views/warehouse/check/check-detail.vue modified: src/views/warehouse/pallettransports/ifslocation-form.vue modified: src/views/warehouse/pallettransports/ifsstock-form.vue modified: src/views/warehouse/pallettransports/index.vue modified: src/views/warehouse/returnstock/ifslocation-form.vue modified: src/views/warehouse/returnstock/index.vue modified: src/views/warehouse/returnstock/returnstock-form.vue modified: src/views/warehouse/returnstock/stock-part.vue modified: src/views/warehouse/stock/print-label-form.vue modified: src/views/warehouse/stock/small-print-label-form.vue modified: src/views/warehouse/stock/small-warehousing-label-form.vue modified: src/views/warehouse/stock/stock-table.vue modified: src/views/warehouse/stock/warehousing-label-form.vue modified: src/views/zte/pkgidbind/index.vue --- src/views/warehouse/pallettransports/index.vue | 191 +++++++++++++++++++++++++---------------------- 1 files changed, 102 insertions(+), 89 deletions(-) diff --git a/src/views/warehouse/pallettransports/index.vue b/src/views/warehouse/pallettransports/index.vue index ca2d4ea..5303f6a 100644 --- a/src/views/warehouse/pallettransports/index.vue +++ b/src/views/warehouse/pallettransports/index.vue @@ -52,10 +52,15 @@ </div> </div> <div> - <el-table class="pallet-transports-material-table" :data="palletTransportsMaterialData" style="width: 100%;" - height="350px" border @selection-change="palletTransportsMaterialSelectionChange" stripe + <el-table class="pallet-transports-material-table" @current-change="handleCurrentChange" :data="palletTransportsMaterialData" style="width: 100%;" + height="350px" border stripe ref="palletTransportsMaterialTable"> - <el-table-column type="selection" width="55"> </el-table-column> + <!--鍗曢�夋 @selection-change="palletTransportsMaterialSelectionChange"--> + <el-table-column align="center" width="55" label="鍗曢��"> + <template slot-scope="scope"> + <el-checkbox v-model="scope.row.commonChecked" @change="handleCurrentChange(scope.row)" ></el-checkbox> + </template> + </el-table-column> <el-table-column prop="partNo" label="闆朵欢鍙�" align="center" show-overflow-tooltip> </el-table-column> <el-table-column prop="partDesc" label="闆朵欢鎻忚堪" align="center" show-overflow-tooltip> @@ -78,10 +83,10 @@ </el-table-column> <el-table-column label="鎿嶄綔" align="center" width="100"> <template slot-scope="scope"> - <el-button v-show="!scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" - @click="scope.row.canEdit = true">缂栬緫</el-button> - <el-button v-show="scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" - @click="updateMaterial(scope.row)">淇濆瓨</el-button> + <!-- <el-button v-show="!scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" + @click="scope.row.canEdit = true">缂栬緫</el-button> --> + <!-- <el-button v-show="scope.row.canEdit" type="text" :disabled="scope.row.detailExistState" + @click="updateMaterial(scope.row)">淇濆瓨</el-button> --> <el-button type="text" :disabled="scope.row.detailExistState" @click="delMaterial(scope.row)">鍒犻櫎</el-button> </template> @@ -90,7 +95,8 @@ </div> <div style="margin-top:10px;display:flex;height:36px;justify-content: space-between;align-items:center;"> <div> - <span style="font-weight:bold;">绉诲簱鏄庣粏</span><span style="color:red;">({{ + <span style="font-weight:bold;">绉诲簱鏄庣粏</span> + <span style="color:red;">({{ palletTransportsMaterialMultipleSelection.length > 0 ? palletTransportsMaterialMultipleSelection[ palletTransportsMaterialMultipleSelection.length - 1 @@ -112,27 +118,27 @@ v-adaptive="{ bottomOffset: 20, fixedHeight: 0 }" height="100px" border @selection-change="palletTransportsDetailSelectionChange" stripe ref="palletTransportsDetailTable"> <el-table-column type="selection" width="55"> </el-table-column> - <el-table-column prop="partNo" label="闆朵欢鍙�" align="center" show-overflow-tooltip> + <el-table-column prop="part_no" label="闆朵欢鍙�" align="center" show-overflow-tooltip> </el-table-column> - <el-table-column prop="partDesc" label="闆朵欢鎻忚堪" align="center" show-overflow-tooltip> + <el-table-column prop="part_desc" label="闆朵欢鎻忚堪" align="center" show-overflow-tooltip> </el-table-column> <!-- <el-table-column prop="batchNo" label="鎵规鍙�" align="center" show-overflow-tooltip> </el-table-column> <el-table-column prop="wdr" label="WDR" align="center"> </el-table-column> --> - <el-table-column prop="operationTaskNo" label="宸ュ崟" align="center" show-overflow-tooltip> + <el-table-column prop="operation_task_no" label="宸ュ崟" align="center" show-overflow-tooltip> </el-table-column> - <el-table-column prop="transferQuantity" label="绉诲簱鏁伴噺" align="center"> + <el-table-column prop="transfer_quantity" label="绉诲簱鏁伴噺" align="center"> </el-table-column> <el-table-column prop="unit" label="鍗曚綅" align="center"> </el-table-column> <!-- <el-table-column prop="fromIfsLocationNo" label="IFS浠庡簱浣�" align="center"> </el-table-column> --> - <el-table-column prop="toIfsLocationNo" label="绉昏嚦搴撲綅" align="center"> - <template slot-scope="scope"> + <el-table-column prop="to_ifs_location_no" label="绉昏嚦搴撲綅" align="center"> + <!-- <template slot-scope="scope"> <el-link type="primary" @click="openSingleLocationDialog(scope.row)">{{ scope.row.toIfsLocationNo }}</el-link> - </template> + </template> --> </el-table-column> <el-table-column prop="state" label="鐘舵��" align="center"> <template slot-scope="scope"> @@ -147,8 +153,8 @@ </el-table-column> <el-table-column label="鎿嶄綔" align="center" width="85"> <template slot-scope="scope"> - <el-button type="text" @click="openEditStockDialog(scope.row)" - :disabled="scope.row.state === '01initial' ? false : true">缂栬緫</el-button> + <!-- <el-button type="text" @click="openEditStockDialog(scope.row)" + :disabled="scope.row.state === '01initial' ? false : true">缂栬緫</el-button> --> <el-button type="text" @click="delDetail(scope.row)" :disabled="scope.row.state === '01initial' ? false : true">鍒犻櫎</el-button> </template> @@ -187,7 +193,8 @@ delPalletTransportsMaterialObj, palletTransportsDetailFetchList, delPalletTransportsDetailObj, - executeMoveLocation + executeMoveLocation, + selectAll, } from '@/api/warehouse/pallettransports' import { getByPalletTransId } from '@/api/plan/operationtask' import ttable from '@/views/common/ztt-table.vue' @@ -203,6 +210,7 @@ export default { data() { return { + partDesc: null, ajaxFun: palletTransportsFetchList, currPalletTransportsRow: null, palletTransportsMaterialMultipleSelection: [], @@ -213,6 +221,7 @@ url: '' }, WorkOrder:{}, + datalistAPI:'', prelang: 'pallettransports', options: { height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾 @@ -345,8 +354,29 @@ computed: { ...mapGetters(['permissions']) }, + watch:{ + palletTransportsMaterialMultipleSelection(newVal){ + if(newVal.length>0){ + this.palletTransportsMaterialSelectionChange(newVal) + }else{ + this.palletTransportsDetailData = [] + } + } + }, created() { }, methods: { + // 鍗曡閫変腑 + handleCurrentChange(row) { + this.palletTransportsMaterialData.forEach((item) => { + // 鎺掍粬,姣忔閫夋嫨鏃舵妸鍏朵粬閫夐」閮芥竻闄� + if (item.id !== row.id) { + item.commonChecked = false + }else{ + item.commonChecked = true + } + }) + this.palletTransportsMaterialSelectionChange([row]) + }, // 宸ヨ壓绫诲瀷涓枃鏍煎紡鍖� formatStateType(row, column, cellValue) { this.stateOptions.forEach((obj) => { @@ -395,7 +425,8 @@ unit: item.unit, transportsId: item.transportsId, detailExistState: item.detailExistState, - canEdit: false + canEdit: false, + commonChecked: false } this.palletTransportsMaterialData.push(palletTransportsMaterial) }) @@ -486,12 +517,10 @@ openLocationDialog() { if (this.palletTransportsMaterialMultipleSelection.length > 0) { let flag = true - console.log(this.palletTransportsMaterialMultipleSelection) this.palletTransportsMaterialMultipleSelection.forEach((item) => { if (item.detailExistState) { flag = false } - console.log(item.detailExistState) }) if (flag) { this.showLocation = true @@ -546,70 +575,48 @@ }, // 鑾峰彇绉诲簱鏄庣粏鏁版嵁鍒楄〃 getPalletTransportsDetailData() { - console.log("瀵瑰簲宸ュ崟",this.WorkOrder); - console.log("鐗╂枡闇�姹�",this.palletTransportsMaterialMultipleSelection); - const data = { - partNo:this.palletTransportsMaterialMultipleSelection[0].partNo, - partDesc: this.palletTransportsMaterialMultipleSelection[0].partDesc, - transferQuantity: this.palletTransportsMaterialMultipleSelection[0].transferQuantity, - operationTaskNo:this.WorkOrder.optaskNo, - unit: this.palletTransportsMaterialMultipleSelection[0].unit, - } - const PalletTransportsDetail = [] - PalletTransportsDetail.push(data) - console.log(data,"0000000000000"); - if (PalletTransportsDetail) { - saveBatchPalletTransportsDetail(PalletTransportsDetail) + let transportsDetails =[] + transportsDetails = this.palletTransportsMaterialMultipleSelection.map(el =>{ + return{ + partNo:el.partNo, + partDesc: el.partDesc, + transferQuantity: el.surplusQuantity, + toIfsLocationNo:el.toIfsLocationNo, + toIfsLocationName: el.toIfsLocationName, + transportsId: el.transportsId, + transportsMaterialId:el.id, + operationTaskNo:this.WorkOrder.optaskNo, + operationTaskId:this.WorkOrder.id, + unit: el.unit, + }}) + // this.palletTransportsDetailData = transportsDetails + if (transportsDetails.length > 0) { + let selectionList = this.palletTransportsMaterialMultipleSelection + saveBatchPalletTransportsDetail(transportsDetails) .then((response) => { const resData = response.data if (resData.code === 0) { this.innerVisible = false this.$message.success('娣诲姞绉诲簱鏄庣粏鎴愬姛') - this.$emit('refreshDataList') + let materialRow = selectionList[selectionList.length - 1] + this.palletTransportsMaterialData.forEach(ele=>{ + if(ele.id==materialRow.id){ + ele.transferQuantity = materialRow.surplusQuantity + ele.surplusQuantity = 0 + } + }) } else { this.$message.error('娣诲姞绉诲簱鏄庣粏澶辫触') } - this.isSubmit = true + // this.getPalletTransportsMaterialData() + this.palletTransportsMaterialSelectionChange(selectionList) }) - .catch(() => { - this.isSubmit = true - }) + // .catch(() => { + // }) } - // else { - // this.$message.error('璇烽�夋嫨IFS搴撳瓨鐗╂枡') - // } - - // this.palletTransportsDetailData = [] - // console.log(this.palletTransportsMaterialMultipleSelection); - - // if (this.palletTransportsMaterialMultipleSelection.length > 0) { - // const currPalletTransportsMaterial = this - // .palletTransportsMaterialMultipleSelection[ - // this.palletTransportsMaterialMultipleSelection.length - 1 - // ] - // let obj = { - // partNo: currPalletTransportsMaterial.partNo, - // partDesc: currPalletTransportsMaterial.partDesc, - // operationTaskNo: this.currOptask.optaskNo, - // transferQuantity: currPalletTransportsMaterial.surplusQuantity, - // unit: currPalletTransportsMaterial.unit, - // toIfsLocationNo: currPalletTransportsMaterial.currPalletTransportsMaterial, - // state: null - // } - // this.palletTransportsDetailData.push(obj) - // } else { - // this.$message.error('璇峰厛閫夋嫨鐗╂枡闇�姹�') - // } - }, // 娣诲姞ifs鐗╂枡搴撳瓨鍥炶皟 addIfsStockCallback() { - // 鍒锋柊鐗╂枡闇�姹傘�佸埛鏂扮Щ搴撴槑缁� - // this.getPalletTransportsMaterialData() - // 鍒锋柊璐х洏杩愯緭浠诲姟鍒楄〃 - // if (this.showStock) { - // this.getPallettransportsData() - // } const currRow = this.currPalletTransportsRow this.getPallettransportsData().then(() => { if (currRow) { @@ -641,24 +648,22 @@ if (row.state === '01initial') { this.detailList = [] this.detailList.push(row) - this.showDetailLocation = true + // this.showDetailLocation = true } else { this.$message.error('绉诲簱鏄庣粏宸叉墽琛�') } }, // 鍒犻櫎绉诲簱鏄庣粏 delDetail(row) { - /* const delRow = this.palletTransportsDetailData.find((item) => { + const delRow = this.palletTransportsDetailData.find((item) => { return item.id === row.id - }) */ - + }) delPalletTransportsDetailObj(row.id).then((response) => { const resData = response.data if (resData.code === 0) { - // const findRowIndex = this.palletTransportsDetailData.indexOf(delRow) - // this.palletTransportsDetailData.splice(findRowIndex, 1) + const findRowIndex = this.palletTransportsDetailData.indexOf(delRow) + this.palletTransportsDetailData.splice(findRowIndex, 1) this.$message.success('绉诲簱鏄庣粏鍒犻櫎鎴愬姛') - // this.getPalletTransportsMaterialData() const currRow = this.currPalletTransportsRow this.getPallettransportsData().then(() => { if (currRow) { @@ -690,6 +695,7 @@ if (resData.code === 0) { this.$message.success('鎵ц鎴愬姛') // this.getPalletTransportsMaterialData() + this.palletTransportsDetailData=[] const currRow = this.currPalletTransportsRow this.getPallettransportsData().then(() => { if (currRow) { @@ -724,16 +730,24 @@ }, palletTransportsMaterialSelectionChange(val) { this.palletTransportsMaterialMultipleSelection = val - if (this.palletTransportsMaterialMultipleSelection.length > 0) { - const currPalletTransportsMaterial = this - .palletTransportsMaterialMultipleSelection[ - this.palletTransportsMaterialMultipleSelection.length - 1 - ] - this.materialRow = currPalletTransportsMaterial - } else { - this.materialRow = null + if(val && val.length>0){ + let ids =[] + this.palletTransportsMaterialMultipleSelection.forEach(el =>{ids.push(el.id)}) + let pId = ids[ids.length - 1]; + if(pId!=null){ + selectAll({ + transportsId:this.currPalletTransportsRow.id, + transportsMaterialId: pId + }).then((res) =>{ + this.palletTransportsDetailData = [] + if(res.data.data){ + this.palletTransportsDetailData.push(res.data.data) + } + }) + }else{ + this.palletTransportsDetailData = [] + } } - // this.getPalletTransportsDetailData() }, palletTransportsDetailSelectionChange(val) { this.palletTransportsDetailMultipleSelection = val @@ -750,7 +764,6 @@ }) }, optaskRowClick(row, column) { - console.log(row,222222222222222); this.WorkOrder = row this.palletTransportsOptaskData.forEach((item) => { if (row.id !== item.id) { -- Gitblit v1.9.3