diff --git a/src/api/shopOrder/productionReport.js b/src/api/shopOrder/productionReport.js index 67b5bc4..4d092e0 100644 --- a/src/api/shopOrder/productionReport.js +++ b/src/api/shopOrder/productionReport.js @@ -21,9 +21,12 @@ export const searchItemToBeProduct = data => createAPI(`/productionReport/search // 查询-产线产量报告 export const searchProductionLineOutputReport = data => createAPI(`/productionReport/searchProductionLineOutputReport`,'post',data) -//订单产出标签报表--查询 +// 订单产出标签报表--查询 export const searchSfdcRollsReport = data => createAPI(`/productionReport/searchSfdcRollsReport`,'post',data) +// 订单产出标签报表--保存属性变更 +export const updateSfdcRollsAttribute = data => createAPI(`/productionReport/updateSfdcRollsAttribute`,'post',data) + // 查询-CQC检验记录 export const searchCQCInspectionRecord = data => createAPI(`/productionReport/searchCQCInspectionRecord`,'post',data) diff --git a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue index 37a7e0e..ae4b81b 100644 --- a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue +++ b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue @@ -14,30 +14,6 @@ {{labels.site}} - - - - - - - - - - - - - - - - - - - - - - - - @@ -65,20 +41,7 @@ :placeholder="labels.placeholder"> - - - - - - - - - - - - - {{buttons.search}} {{ buttons.download }} + 属性变动 @@ -101,8 +65,14 @@ :height="height" :data="dataList" border + @selection-change="handleSelectionChange" v-loading="dataListLoading" style="width: 100%;"> + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + @@ -141,7 +137,8 @@ import { searchFunctionButtonList, } from "@/api/sysLanguage.js" -import {searchSfdcRollsReport} from "../../../../api/shopOrder/productionReport"; +import {searchSfdcRollsReport, updateSfdcRollsAttribute} from "../../../../api/shopOrder/productionReport"; +import {updateInventoryStockAttribute} from "../../../../api/wms/wms"; var functionId='104003003'; export default { //查询-产线产量报告 @@ -216,6 +213,14 @@ import {searchSfdcRollsReport} from "../../../../api/shopOrder/productionReport" modelFlag:false, modelInputFlag:true, selectList:[], + selectionDataList:[], + // 属性变动相关 + attributeChangeDialogVisible: false, + attributeChangeForm: { + parentRollNo: '', + batchNo: '', + remark: '' + }, searchData: { site:'', partNo:'', @@ -226,7 +231,8 @@ import {searchSfdcRollsReport} from "../../../../api/shopOrder/productionReport" workCenterNo:'', date1:'', date2:'', - user:this.$store.state.user.name + user:this.$store.state.user.name, + createdDate2: new Date(), }, dataList:[], dataListLoading: false, @@ -579,6 +585,46 @@ import {searchSfdcRollsReport} from "../../../../api/shopOrder/productionReport" return this.dataList; }, + handleSelectionChange(val){ + this.selectionDataList = val + console.log(this.selectionDataList) + }, + // 打开属性变动对话框 + openAttributeChangeDialog() { + if(this.selectionDataList.length === 0){ + this.$message.warning('请先勾选要变动属性的标签!'); + return false; + } + // 重置表单 + this.attributeChangeForm = { + parentRollNo: '', + batchNo: '', + remark: '' + }; + this.attributeChangeDialogVisible = true; + }, + saveAttributeChange(){ + // 构建更新数据列表 + const updateList = this.selectionDataList.map(item => { + return { + site: item.site, + rollNo: item.rollNo, + orderNo: item.orderNo, + parentRollNo: this.attributeChangeForm.parentRollNo, + batchNo: this.attributeChangeForm.batchNo, + remark: this.attributeChangeForm.remark + } + }) + updateSfdcRollsAttribute(updateList).then(({data}) => { + if (data && data.code === 0) { + this.$message.success('属性变动成功!'); + this.attributeChangeDialogVisible = false; + this.getData(); // 刷新数据 + } else { + this.$message.error(data.message || '属性变动失败!'); + } + }); + }, startDownload() { // this.exportData = this.dataList