From 9c052eeef84714e6b80aa30698ed7ae83f4de5c0 Mon Sep 17 00:00:00 2001 From: yyb <995253665@qq.com> Date: 星期四, 26 六月 2025 17:18:21 +0800 Subject: [PATCH] 铜杆报工后查询接受列表id问题 --- pages/product/report/index.vue | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 112 insertions(+), 2 deletions(-) diff --git a/pages/product/report/index.vue b/pages/product/report/index.vue index 448dd3a..a1ae200 100644 --- a/pages/product/report/index.vue +++ b/pages/product/report/index.vue @@ -101,6 +101,7 @@ v-for="(item, index) in InventoryReceiptList" :key="index" :index="index" + @click="cancelReport(item)" > <view class="content-header"> <view class="content-header-title">{{ index + 1 }}</view> @@ -150,6 +151,54 @@ :operationTaskList="this.form" @update="handleUpdate" /> + <u-modal + width="720rpx" + v-model="showModal" + title="" + :show-cancel-button="true" + :show-confirm-button="true" + @confirm="confirmModle" + @cancel="cancelModle" + > + <view class="popup-content"> + <view class="packing-registration-param"> + <view class="packing-registration-param-view"> + <view class="packing-registration-param-item param-extra"> + <view class="packing-registration-param-item-left"> + <text class="item-one">鎵瑰彿</text> + </view> + <view class="packing-registration-param-item-right"> + <text class="item-one">{{ detailedList.outBatchNo }}</text> + </view> + </view> + <view class="packing-registration-param-item param-extra"> + <view class="packing-registration-param-item-left"> + <text class="item-one">闆朵欢鍙�</text> + </view> + <view class="packing-registration-param-item-right"> + <text class="item-one">{{ detailedList.partNo }}</text> + </view> + </view> + <view class="packing-registration-param-item param-extra"> + <view class="packing-registration-param-item-left"> + <text class="item-one">闆朵欢鎻忚堪</text> + </view> + <view class="packing-registration-param-item-right"> + <span class="item-one">{{ detailedList.partName }}</span> + </view> + </view> + <view class="packing-registration-param-item param-extra"> + <view class="packing-registration-param-item-left"> + <text class="item-one">鍙栨秷鎺ユ敹鏁伴噺</text> + </view> + <view class="packing-registration-param-item-right"> + <span class="item-one">{{ detailedList.netWeight }}</span> + </view> + </view> + </view> + </view> + </view> + </u-modal> <scan></scan> </div> </template> @@ -244,6 +293,8 @@ operationTaskId: "", subdisabled: false, codeInfoId: "", + detailedList: {}, + showModal: false, }; }, // 鐐瑰嚮鎻愪氦鎸夐挳鐨勪簨浠跺鐞嗗嚱鏁� @@ -260,7 +311,7 @@ id: this.form.id, }) .then((res) => { - res.data.name = this.form.name + res.data.name = this.form.name; this.$refs.saveForm.open(res); uni.hideLoading(); }); @@ -280,11 +331,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); } } }); @@ -297,6 +352,61 @@ }, }, 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("鐐瑰嚮纭鍚庤幏鍙栧彇娑堟姤宸ヨ褰�"); + // 澶勭悊纭閫昏緫 + this.$u.api.cancelReporting + .cancelDTAOfWorkApplication({ + outBatchNo: this.detailedList.outBatchNo, + }) + .then((res) => { + console.log("res", res); + this.showModal = false; + this.getHandelList(); + this.$u.toast("鍙栨秷鎶ュ伐鎴愬姛"); + }); + }, + cancelModle() { + this.showModal = false; // 鍏抽棴寮圭獥 + }, + // 鍙栨秷鎶ュ伐 + cancelReport(item) { + let that = this; + uni.showModal({ + title: "鎻愮ず", + content: "鏄惁纭鍙栨秷鎵规" + item.outBatchNo + "鐨勬姤宸�", + success: function (res) { + if (res.confirm) { + that.detailedList = item; + that.showModal = true; + } else if (res.cancel) { + return; + } + }, + }); + }, getHandelList() { this.$u.api.workReporting .getProductMainV1({ -- Gitblit v1.9.3