From 967de5f211a1e7c5b320e3d54b3df0229e3e13f7 Mon Sep 17 00:00:00 2001 From: yyb <995253665@qq.com> Date: 星期五, 27 六月 2025 16:23:54 +0800 Subject: [PATCH] 报工页面取工序的自动报告选项 --- pages/product/report/index.vue | 92 +++++++++++++++++++++++++++++++--------------- 1 files changed, 62 insertions(+), 30 deletions(-) diff --git a/pages/product/report/index.vue b/pages/product/report/index.vue index 84e1bea..ad3137a 100644 --- a/pages/product/report/index.vue +++ b/pages/product/report/index.vue @@ -74,7 +74,13 @@ <u-radio name="鎶曟枡">鎶曟枡</u-radio> </u-radio-group> </u-form-item> - <u-form-item label="宸ュ簭"> + <u-form-item label="绠�鍖栫墿鏂欐鏌�" prop="simplifyMaterials"> + <u-radio-group v-model="form.simplifyMaterials" :disabled="subdisabled || simplifyDisabled" @change="radioChange"> + <u-radio name="true">鏄�</u-radio> + <u-radio name="false">鍚�</u-radio> + </u-radio-group> + </u-form-item> +<!-- <u-form-item label="宸ュ簭"> <u-checkbox-group> <u-checkbox :name="item.name" @@ -87,7 +93,7 @@ {{ item.name }} </u-checkbox> </u-checkbox-group> - </u-form-item> + </u-form-item> --> <u-form-item label="浜у嚭鍒楄〃" :border-bottom="false"></u-form-item> </u-form> <view class="wrap"> @@ -215,18 +221,19 @@ }, data() { return { - checkboxList: [ - { - name: "宸ュ簭鐨勮嚜鍔ㄦ姤鍛�", - value: false, - disabled: false, - }, - { - name: "绠�鍖栫墿鏂欐鏌�", - value: false, - disabled: false, - }, - ], + simplifyDisabled:false, + // checkboxList: [ + // { + // name: "宸ュ簭鐨勮嚜鍔ㄦ姤鍛�", + // value: false, + // disabled: false, + // }, + // { + // name: "绠�鍖栫墿鏂欐鏌�", + // value: false, + // disabled: false, + // }, + // ], InventoryReceiptList: [], form: { workstationId: "", @@ -242,8 +249,8 @@ productType: "dep", receive: "mo", materialCost: "", - autoReport: false, - simplifyMaterials: false, + // autoReport: false, + simplifyMaterials: 'false', }, rules: { work: [ @@ -331,11 +338,15 @@ //鎵爜鎴愬姛鍚庣殑鍥炶皟锛屼綘鍙互鍐欒嚜宸辩殑閫昏緫浠g爜鍦ㄨ繖閲� if (data.code) { let codeInfo = JSON.parse(data.code); - that.codeInfoId = codeInfo.id; if (codeInfo.moOn) { + that.codeInfoId = codeInfo.id; // 鎵弿鎶ュ伐鍗曚簩缁寸爜 that.saveForm(codeInfo); that.getHandelList(); + } + if (codeInfo.BN) { + // 鎵弿鎶ュ伐鍗曚簩缁寸爜 + that.CopperReportingWork(codeInfo); } } }); @@ -348,6 +359,27 @@ }, }, methods: { + // 閾滄潌鎶ュ伐 + CopperReportingWork(val) { + const copperList = {}; + copperList.outBatchNo = val.BN + copperList.partNo = val.PN + copperList.weighingClerk = val.WC + copperList.executiveStandard = val.ES + copperList.netWeight = val.NW + copperList.specificationType = val.ST + copperList.grossWeight = val.TR + copperList.operationTaskId = this.form.id + this.form.productOutputList = []; + this.form.operationTaskId = this.form.id; + this.form.productOutputList.push(copperList); + console.log('this.form',this.form) + this.$u.api.workReporting.submitPDA(this.form).then((res) => { + this.subdisabled = true; + this.getHandelList(); + this.$u.toast("鎶ュ伐鎴愬姛"); + }); + }, // 鐐瑰嚮纭鍚庤幏鍙栧彇娑堟姤宸ヨ褰� confirmModle() { console.log("鐐瑰嚮纭鍚庤幏鍙栧彇娑堟姤宸ヨ褰�"); @@ -359,7 +391,7 @@ .then((res) => { console.log("res", res); this.showModal = false; - that.getHandelList(); + this.getHandelList(); this.$u.toast("鍙栨秷鎶ュ伐鎴愬姛"); }); }, @@ -394,14 +426,14 @@ }); }, // 澶氶�夊鐞� - changeCheckbox(val) { - if (val.name === "宸ュ簭鐨勮嚜鍔ㄦ姤鍛�") { - this.form.autoReport = val.value; - } - if (val.name === "绠�鍖栫墿鏂欐鏌�") { - this.form.simplifyMaterials = val.value; - } - }, + // changeCheckbox(val) { + // if (val.name === "宸ュ簭鐨勮嚜鍔ㄦ姤鍛�") { + // this.form.autoReport = val.value; + // } + // if (val.name === "绠�鍖栫墿鏂欐鏌�") { + // this.form.simplifyMaterials = val.value; + // } + // }, handleUpdate() { this.subdisabled = true; this.getHandelList(); @@ -444,15 +476,15 @@ Jianqtyfinished: val.qtyRequired - val.qtyFinished, proposedLocation: val.proposedLocation, productType: "dep", - receive: "mo", // 澶嶉�夋缁勭殑鍊� + receive: "mo", materialCost: val.materialCost, - autoReport: false, - simplifyMaterials: false, + // autoReport: false, + simplifyMaterials: 'false', }; this.checkboxList[1].value = false; this.checkboxList[0].value = false; if (this.form.materialCost == "鍊掑啿") { - this.checkboxList[1].disabled = true; + this.simplifyDisabled = true; } }, }, -- Gitblit v1.9.3