From 2e6adcb6254dcc8ddf0924fea241c988e0c7a4b1 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 11 六月 2025 17:11:35 +0800
Subject: [PATCH] 取消报工功能点逻辑编写
---
pages/product/cancelReport/index.vue | 142 +++++++++++++++++++++++++++++++---------------
1 files changed, 95 insertions(+), 47 deletions(-)
diff --git a/pages/product/cancelReport/index.vue b/pages/product/cancelReport/index.vue
index a55c853..c6d17d5 100644
--- a/pages/product/cancelReport/index.vue
+++ b/pages/product/cancelReport/index.vue
@@ -50,8 +50,7 @@
<view class="content-body">
<view class="row-list">
<view class="_label">
- <view class="_label-icon-1"> </view>
- <view class="_label-name">璁㈠崟鍙凤細</view>
+ <view class="_label-name">鎵瑰彿锛�</view>
</view>
<view class="_content">
{{ item.moNo }}
@@ -59,7 +58,6 @@
</view>
<view class="row-list">
<view class="_label">
- <view class="_label-icon-2"> </view>
<view class="_label-name">闆朵欢鍙凤細</view>
</view>
<view class="_content">
@@ -68,7 +66,6 @@
</view>
<view class="row-list">
<view class="_label">
- <view class="_label-icon-3"> </view>
<view class="_label-name">闆朵欢鎻忚堪锛�</view>
</view>
<view class="_content">
@@ -77,29 +74,10 @@
</view>
<view class="row-list">
<view class="_label">
- <view class="_label-icon-1"> </view>
- <view class="_label-name">鎵归噺澶у皬锛�</view>
+ <view class="_label-name">鍙栨秷鎺ユ敹鏁伴噺锛�</view>
</view>
<view class="_content">
{{ item.qtyRequired }}
- </view>
- </view>
- <view class="row-list">
- <view class="_label">
- <view class="_label-icon-2"> </view>
- <view class="_label-name">寮�濮嬫棩鏈燂細</view>
- </view>
- <view class="_content">
- {{ item.startDate }}
- </view>
- </view>
- <view class="row-list">
- <view class="_label">
- <view class="_label-icon-3"> </view>
- <view class="_label-name">缁撴潫鏃ユ湡锛�</view>
- </view>
- <view class="_content">
- {{ item.endDate }}
</view>
</view>
</view>
@@ -107,6 +85,56 @@
</u-cell-group>
</scroll-view>
</view>
+ <u-modal
+ v-model="showModal"
+ title=""
+ :show-cancel-button="true"
+ :show-confirm-button="true"
+ @confirm="confirm"
+ @cancel="cancel"
+ >
+ <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 item-two">{{ detailedList.value1 }}</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 item-two">{{ detailedList.value2 }}</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 item-two">{{ detailedList.value3 }}</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">
+ <u-input
+ class="item-one item-two"
+ v-model="detailedList.value4"
+ />
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </u-modal>
<scan></scan>
</view>
</template>
@@ -130,6 +158,12 @@
form: {
moNo: "",
},
+ detailedList: {
+ value1: "",
+ value2: "",
+ value3: "",
+ value4: "",
+ },
list: [
{
moNo: 1,
@@ -141,43 +175,56 @@
},
],
rules: {},
+ showModal: false,
};
},
- onReady() {
- },
+ onReady() {},
onShow() {
let that = this;
uni.$off("scan"); // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
+ if ((form.moNO = null)) {
+ uni.showToast({
+ icon: "none",
+ title: "璇峰厛閫夋嫨璁㈠崟鍙凤紒",
+ duration: 2 * 1000,
+ });
+ return;
+ }
+ if ((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 ((list.moNO = null)) {
- uni.showToast({
- icon: 'none',
- title: '璇峰厛閫夋嫨璁㈠崟鍙凤紒',
- duration: 2 * 1000
- })
- return
- }
- if ((list.moNO = null)) {
- uni.showToast({
- icon: 'none',
- title: '鎵弿鐨勪簩缁寸爜涓庤璁㈠崟涓嶄竴鑷�',
- duration: 2 * 1000
- })
- return
- }
if (data.code) {
let codeInfo = JSON.parse(data.code);
if (codeInfo.WorkNo) {
- // 鎵弿鎶ュ伐鍗曚簩缁寸爜
- that.saveForm(codeInfo);
+ (this.detailedList = {}),
+ // 鎵弿鎶ュ伐鍗曚簩缁寸爜
+ that.saveForm(codeInfo);
}
}
});
},
methods: {
+ // 鐐瑰嚮纭鍚庤幏鍙栧彇娑堟姤宸ヨ褰�
+ confirm() {
+ // 澶勭悊纭閫昏緫
+ this.showModal = false;
+ this.$u.api.workReporting._({}).then((res) => {
+ console.log("res", res);
+ this.list = res.data.records;
+ });
+ },
+ cancel() {
+ this.showModal = false; // 鍏抽棴寮圭獥
+ },
openList() {
uni.navigateTo({
url: "/pages/product/report/orderList",
@@ -189,9 +236,10 @@
// 鍥炴樉鎵爜鐨勪俊鎭�-鎶ュ伐鍗�
saveForm(val) {
let { WorkNo, ProcessName, ORDER_NO } = val;
- this.form.value1 = WorkNo;
- this.form.value2 = ProcessName;
- this.form.value3 = ORDER_NO;
+ this.detailedList.value1 = WorkNo;
+ this.detailedList.value2 = ProcessName;
+ this.detailedList.value3 = ORDER_NO;
+ this.showModal = true;
},
},
};
--
Gitblit v1.9.3