From e9ebe0b65f45b5ecb5729f22bc7e54ce479314d7 Mon Sep 17 00:00:00 2001 From: yyb <995253665@qq.com> Date: 星期五, 20 六月 2025 17:12:38 +0800 Subject: [PATCH] 报工以及取消报工联调 --- pages/product/cancelReport/index.vue | 165 ++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 116 insertions(+), 49 deletions(-) diff --git a/pages/product/cancelReport/index.vue b/pages/product/cancelReport/index.vue index 5fcb8b5..fd026e7 100644 --- a/pages/product/cancelReport/index.vue +++ b/pages/product/cancelReport/index.vue @@ -86,6 +86,7 @@ </scroll-view> </view> <u-modal + width="720rpx" v-model="showModal" title="" :show-cancel-button="true" @@ -101,7 +102,7 @@ <text class="item-one">鎵瑰彿</text> </view> <view class="packing-registration-param-item-right"> - <text class="item-one item-two">{{ detailedList.moNo }}</text> + <text class="item-one">{{ detailedList.moNo }}</text> </view> </view> <view class="packing-registration-param-item param-extra"> @@ -109,7 +110,7 @@ <text class="item-one">闆朵欢鍙�</text> </view> <view class="packing-registration-param-item-right"> - <text class="item-one item-two">{{ detailedList.partNo }}</text> + <text class="item-one">{{ detailedList.partNo }}</text> </view> </view> <view class="packing-registration-param-item param-extra"> @@ -117,9 +118,9 @@ <text class="item-one">闆朵欢鎻忚堪</text> </view> <view class="packing-registration-param-item-right"> - <text class="item-one item-two">{{ + <span class="item-one">{{ detailedList.partName - }}</text> + }}</span> </view> </view> <view class="packing-registration-param-item param-extra"> @@ -127,10 +128,9 @@ <text class="item-one">鍙栨秷鎺ユ敹鏁伴噺</text> </view> <view class="packing-registration-param-item-right"> - <u-input - class="item-one item-two" - v-model="detailedList.qtyRequired" - /> + <span class="item-one">{{ + detailedList.netWeight + }}</span> </view> </view> </view> @@ -160,22 +160,8 @@ form: { moNo: "", }, - detailedList: { - moNo: "", - partNo: "", - partName: "", - qtyRequired: "", - }, - list: [ - { - moNo: 1, - partNo: 1, - partName: 1, - qtyRequired: 1, - startDate: 1, - endDate: 1, - }, - ], + detailedList: {}, + list: [], rules: {}, showModal: false, }; @@ -184,31 +170,18 @@ onShow() { let that = this; uni.$off("scan"); // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒 - if ((that.form.moNO == null)) { - uni.showToast({ - icon: "none", - title: "璇峰厛閫夋嫨璁㈠崟鍙凤紒", - duration: 2 * 1000, - }); - return; - } uni.$on("scan", function (data) { console.log("onscan"); //鎵爜鎴愬姛鍚庣殑鍥炶皟锛屼綘鍙互鍐欒嚜宸辩殑閫昏緫浠g爜鍦ㄨ繖閲� console.log("椤甸潰鎵爜缁撴灉锛�", data.code); if (data.code) { let codeInfo = JSON.parse(data.code); - if (codeInfo.moNO) { - if ((that.form.moNO != codeInfo.moNO)) { - uni.showToast({ - icon: "none", - title: "鎵弿鐨勪簩缁寸爜涓庤璁㈠崟涓嶄竴鑷�", - duration: 2 * 1000, - }); - return; - } - // 鎵弿鎶ュ伐鍗曚簩缁寸爜 - that.saveForm(codeInfo); + console.log('222') + if (codeInfo.moNo) { + console.log('1111') + // 鎵弿鎶ュ伐鍗曚簩缁寸爜 + that.saveForm(codeInfo); + // that.$forceUpdate(); } } }); @@ -217,10 +190,10 @@ // 鐐瑰嚮纭鍚庤幏鍙栧彇娑堟姤宸ヨ褰� confirm() { // 澶勭悊纭閫昏緫 - this.showModal = false; - this.$u.api.workReporting._({}).then((res) => { + this.$u.api.cancelReporting.cancelDTAOfWorkApplication({outBatchNo:this.detailedList.outBatchNo}).then((res) => { console.log("res", res); this.list = res.data.records; + this.showModal = false; }); }, cancel() { @@ -236,10 +209,24 @@ }, // 鍥炴樉鎵爜鐨勪俊鎭�-鎶ュ伐鍗� saveForm(val) { - let { moNo, partNo, partName } = val; - this.detailedList.moNo = moNo; - this.detailedList.partNo = partNo; - this.detailedList.partName = partName; + console.log('1111@@@@@@1',this.form) + if (this.form.moNo == '') { + uni.showToast({ + icon: "none", + title: "璇峰厛閫夋嫨璁㈠崟鍙凤紒", + duration: 2 * 1000, + }); + return; + } + if (this.form.moNo != val.moNo) { + uni.showToast({ + icon: "none", + title: "鎵弿鐨勪簩缁寸爜涓庤璁㈠崟涓嶄竴鑷�", + duration: 2 * 1000, + }); + return; + } + this.detailedList = val; this.showModal = true; }, }, @@ -247,6 +234,86 @@ </script> <style lang="scss" scoped> +.packing-registration-param { + padding: 40rpx 30rpx 10rpx 30rpx; + height: 350px; + overflow: hidden; + + .packing-registration-param-title { + display: flex; + flex-direction: row; + align-items: center; + margin-bottom: 30rpx; + + .title-label { + margin-left: 14rpx; + font-size: 34rpx; + font-weight: bold; + color: #283e65; + } + } + + .packing-registration-param-view { + height: 177rpx; + background-color: #fff; + border-radius: 10rpx; + padding: 0rpx 23rpx; + margin-bottom: 30rpx; + + .packing-registration-param-item { + height: 90rpx; + border: 1px solid #adc8e4; + line-height: 90rpx; + display: flex; + justify-content: space-between; + border: none; + + .packing-registration-param-item-left { + .item-one { + word-break: break-all; + font-size: 30rpx; + color: #666666; + } + } + + .packing-registration-param-item-right { + display: flex; + justify-content: space-between; + + .item-one { + font-size: 30rpx; + color: #060505; + margin-right: 6rpx; + word-break: break-all; + } + + .item-two { + font-size: 15rpx; + color: #a6b4cc; + margin-right: 6rpx; + } + + .item-three { + font-size: 30rpx; + color: #214ded; + margin-right: 6rpx; + } + } + } + + .param-extra { + border-bottom: 1px solid #ededed; + } + } +} + .popup-content { + width: 720rpx; + height: 400rpx; + background-color: #fff; + border-radius: 8px; + z-index: 10; + /* 纭繚鍐呭鍦ㄨ挋鐗堜箣涓� */ + } .page { box-sizing: border-box; } -- Gitblit v1.9.3