From efb6960d9a35857d8efa7e40a6e71504b87f5035 Mon Sep 17 00:00:00 2001 From: xwt <2740516069@qq.com> Date: 星期六, 02 八月 2025 14:51:55 +0800 Subject: [PATCH] 来料检布局修改,查看图片修改 --- pages/QC/XJ/Add.vue | 53 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 47 insertions(+), 6 deletions(-) diff --git a/pages/QC/XJ/Add.vue b/pages/QC/XJ/Add.vue index da84f2f..f152e1e 100644 --- a/pages/QC/XJ/Add.vue +++ b/pages/QC/XJ/Add.vue @@ -40,7 +40,7 @@ <view v-else class="info-value">{{ formData.itemNo }}</view> </view> <view class="info-item"> - <view class="info-label">璁″垝缂栧彿</view> + <view class="info-label">宸ュ崟鍗曞彿</view> <picker v-if="isUpdate" class="picker-input" name="selector" :range="DAA001List" @change="onDaa001Change"> <view class="picker-value">{{ DAA001List[DAA001Index] || '璇烽�夋嫨' }}</view> @@ -114,6 +114,8 @@ <button class="action-btn warning" v-if="!isUpdate && !isShowTable" @click="saveRemarks">娣诲姞涓嶅悎鏍兼弿杩�</button> <button class="action-btn primary" v-if="isShowTable" @click="getTable">鑾峰彇妫�楠岄」鐩�</button> <button class="action-btn primary" v-if="isShowTable && isUpdate" @click="saveTable">鐢熸垚妫�楠岄」鐩�</button> + <button class="action-btn success" v-if="!isUpdate && !isShowTable" @click="getGenUpdate">鑾峰彇妫�楠岄」鐩�</button> + <button class="action-btn success" v-if="!isUpdate && !isShowTable" @click="submitInspection">鎻愪氦妫�楠�</button> </view> <!-- 淇敼涓嶅悎鏍兼弿杩板脊鍑烘 --> <view v-if="remarksPopup" class="overlay"> @@ -260,13 +262,10 @@ }, getItem() { - if (this.isSubmit) { - this.$showMessage("姝ょ墿鏂欐棤鍚敤鐨勬楠岄」鐩紝璇风淮鎶�!"); - return; - } + if (!this.formData.billNo) { - this.$showMessage("璇烽�夋嫨璁″垝缂栧彿"); + this.$showMessage("璇烽�夋嫨宸ュ崟鍗曞彿"); return; } @@ -480,6 +479,43 @@ this.isUpdate = false; this.init(); }) + }, + submitInspection() { + if (this.formData.id) { + this.$post({ + url: "/XJ/SjSubmit", + data: { + id: this.formData.id, + userNo: this.$loginInfo.account + } + }).then(res => { + if (res.data.tbBillList) { + this.$showMessage("鎻愪氦鎴愬姛"); + this.init(); + } + }); + } + }, + getGenUpdate() { + if (!this.formData.id || !this.formData.releaseNo) { + this.$showMessage("璇峰厛淇濆瓨妫�楠屽崟锛�"); + return; + } + this.$post({ + url: "/XJ/GenUpdate", + data: { + id: this.formData.id, + no: this.formData.releaseNo, + user: this.$loginInfo.account + } + }).then(res => { + if (res.data.result === 0) { + this.$showMessage("鑾峰彇妫�楠岄」鐩垚鍔�"); + this.init(); + } else { + this.$showMessage(res.data.message || "鑾峰彇澶辫触"); + } + }); } }, onShow() { @@ -725,6 +761,11 @@ color: white; } + .action-btn.success { + background-color: #2ecc71; + color: white; + } + /* 寮瑰嚭妗嗘牱寮� */ .overlay { position: fixed; -- Gitblit v1.9.3