From 2565d78042b7cc5ac500c4bac5edefdb7a046af5 Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期三, 17 九月 2025 14:04:52 +0800
Subject: [PATCH] Merge branch 'master' of http://43.142.96.171:8080/r/~cnf/HM_StandardPda-Browse
---
pages/QC/LLJ/Add.vue | 527 +++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 372 insertions(+), 155 deletions(-)
diff --git a/pages/QC/LLJ/Add.vue b/pages/QC/LLJ/Add.vue
index 89c2ef6..030990e 100644
--- a/pages/QC/LLJ/Add.vue
+++ b/pages/QC/LLJ/Add.vue
@@ -1,14 +1,14 @@
<template>
<view class="inspection-sheet">
- <!-- 澶撮儴淇℃伅 -->
- <view class="sheet-header">
- <h1>鏉ユ枡妫�楠屽崟</h1>
- <view class="inspection-number">妫�楠屽崟鍙凤細{{formData.releaseNo}}</view>
- <!--瀹為獙瀹ら�佹 -->
- <view style="text-align: right;" class="action-buttons">
- <a class="sysLike" v-if="this.current" @click="toSysSubmitFrom(formData.releaseNo)">瀹為獙瀹ら�佹</a>
+ <!-- 澶撮儴淇℃伅 -->
+ <view class="sheet-header">
+ <h1>鏉ユ枡妫�楠屽崟</h1>
+ <view class="inspection-number">妫�楠屽崟鍙凤細{{formData.releaseNo}}</view>
+ <!--瀹為獙瀹ら�佹 -->
+ <view style="text-align: right;" class="action-buttons">
+ <a class="sysLike" v-if="this.current" @click="toSysSubmitFrom(formData.releaseNo)">瀹為獙瀹ら�佹</a>
+ </view>
</view>
- </view>
<!-- 鍩烘湰淇℃伅鍖� -->
<view class="basic-info">
@@ -56,43 +56,27 @@
<view class="info-label">涓嶈壇鎻忚堪锛�</view>
<view class="info-value">{{formData.fngDesc}}</view>
</view>
- <view class="info-block" v-if="formData.newFngDesc!=null">
- <view class="info-label">涓婃涓嶈壇锛�</view>
- <view class="info-value">{{formData.newFngDesc}}</view>
- </view>
</view>
<view class="dropdown-row">
<view class="info-label">涓嶈壇鍘熷洜锛�</view>
- <select id="defect-reason" v-model="badreason" v-if="current" @change="saveRemarksGid">
- <option value=""></option>
- <option value="澶栬涓嶈壇">澶栬涓嶈壇</option>
- <option value="灏哄涓嶈壇">灏哄涓嶈壇</option>
- <option value="鍖呰涓嶈壇">鍖呰涓嶈壇</option>
- <option value="鎬ц兘涓嶈壇">鎬ц兘涓嶈壇</option>
- <option value="瑁呴厤涓嶈壇">瑁呴厤涓嶈壇</option>
- <option value="瀹夎涓嶈壇">瀹夎涓嶈壇</option>
- </select>
+ <picker v-if="current" :value="badreasonIndex" :range="badreasonOptions" @change="onBadreasonChange">
+ <view class="picker-text" :class="{ 'selected': badreason }">{{ badreason || '' }}</view>
+ </picker>
+ <view v-else class="info-value">{{ badreason }}</view>
</view>
<view class="dropdown-row">
<view class="info-label">鎵�灞炶溅闂达細</view>
- <select id="defect-reason" v-model="WORKSHOP" v-if="current" @change="saveRemarksGid">
- <option value=""></option>
- <option value="鐢熶骇涓�閮�">鐢熶骇涓�閮�</option>
- <option value="鐢熶骇浜岄儴">鐢熶骇浜岄儴</option>
- <option value="娉ㄥ杞﹂棿">娉ㄥ杞﹂棿</option>
- <option value="鍏朵粬">鍏朵粬</option>
- </select>
+ <picker v-if="current" :value="workshopIndex" :range="workshopOptions" @change="onWorkshopChange">
+ <view class="picker-text" :class="{ 'selected': WORKSHOP }">{{ WORKSHOP || '' }}</view>
+ </picker>
+ <view v-else class="info-value">{{ WORKSHOP }}</view>
</view>
<view class="dropdown-row">
<view class="info-label">璇勫鐘舵�侊細</view>
- <select id="defect-reason" v-model="PSTYPE" v-if="current" @change="saveRemarksGid">
- <option value=""></option>
- <option value="鐗归噰/璁╂浣跨敤">鐗归噰/璁╂浣跨敤</option>
- <option value="鎸戦��/杩斿伐浣跨敤">鎸戦��/杩斿伐浣跨敤</option>
- <option value="閫�璐�">閫�璐�</option>
- <option value="寰呭垽">寰呭垽</option>
-
- </select>
+ <picker v-if="current" :value="pstypeIndex" :range="pstypeOptions" @change="onPstypeChange">
+ <view class="picker-text" :class="{ 'selected': PSTYPE }">{{ PSTYPE || '' }}</view>
+ </picker>
+ <view v-else class="info-value">{{ PSTYPE }}</view>
</view>
<view class="info-block" style="margin-top: 10px;">
<view class="info-label">澶囨敞锛�</view>
@@ -102,7 +86,7 @@
</view>
<view class="info-block" style="margin-top: 10px;">
<view class="info-label">鐮村潖瀹為獙鏁伴噺锛�</view>
- <view class="info-value highlight">{{formData.phsy}}</view>
+ <view class="info-value highlight">{{formData.PHSY || formData.phsy || ''}}</view>
</view>
<!-- 琛ㄥ崟涓婃柟鎿嶄綔鎸夐挳鍖� -->
@@ -152,6 +136,7 @@
<button class="action-btn small" @click="addDestruction" v-if="this.current">鐮村潖瀹為獙</button>
<button class="action-btn small" @click="uploadImages">涓婁紶/鏌ョ湅鍥剧墖</button>
<button class="action-btn small" @click="fetchDrawingNumber">璋冨彇PLM鍥剧焊</button>
+ <button class="action-btn small" @click="getBom">Bom鐢ㄦ枡娓呭崟</button>
<button class="action-btn small" @click="viewAttachmentInfo">鏌ョ湅闄勪欢淇℃伅</button>
<button class="action-btn small" @click="addDefectDescription" v-if="this.current">娣诲姞涓嶈壇鎻忚堪</button>
<button class="action-btn small primary" @click="submitInspection" v-if="this.current">妫�楠屾彁浜�</button>
@@ -188,6 +173,32 @@
</view>
<view class="barcode">
+ <u-modal :show="itemShow" title="鐗╂枡鏄庣粏" @confirm="drawingConfirm" @cancel="drawingCancel"
+ showCancelButton :z-index="1000">
+ <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁" style="margin-left: 5px;margin-right: 5px;height: 400px;max-height: 60vh;overflow-y: auto;">
+ <uni-tr>
+ <uni-th align="center">鏂欏彿</uni-th>
+ <uni-th align="center" width="90">鍚嶇О</uni-th>
+ <uni-th align="center" width="90">瑙勬牸鍨嬪彿</uni-th>
+ <uni-th align="center" width="150">璋冨彇PLM鍥剧焊</uni-th>
+ </uni-tr>
+ <uni-tr v-for="(item,index) in (drawing || [])" style="height: 100px;">
+ <uni-td align="center">{{item.itemNo}}</uni-td>
+ <uni-td align="center" style="font-size:25px;">
+ <div >{{item.itemName}}</div>
+ </uni-td>
+ <uni-td align="center" style="font-size:25px;">
+ <div>{{item.itemModel}}</div>
+ </uni-td>
+ <uni-td align="center" class="click-wd">
+ <div @click="fetchDrawingNumber">璋冨彇鍥剧焊</div>
+ </uni-td>
+ </uni-tr>
+ </uni-table>
+ </u-modal>
+ </view>
+
+ <view class="barcode">
<u-modal :show="drawingShow" title="鍥剧焊鏄庣粏" @confirm="drawingConfirm" @cancel="drawingCancel"
showCancelButton :z-index="1000">
<uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁" style="margin-left: 5px;margin-right: 5px;height: 400px;max-height: 60vh;overflow-y: auto;">
@@ -197,7 +208,7 @@
<uni-th align="center" width="90">鑳藉惁鎵撳紑鏂囦欢</uni-th>
<uni-th align="center" width="150">鎿嶄綔锛堢偣鍑伙級</uni-th>
</uni-tr>
- <uni-tr v-for="(item,index) in drawing" style="height: 100px;">
+ <uni-tr v-for="(item,index) in (drawing || [])" style="height: 100px;">
<uni-td align="center">{{item.fName}}</uni-td>
<uni-td align="center" style="font-size:25px;">
<div v-if="item.fRelevantObject==' '" style="color: #E47470;">脳</div>
@@ -282,7 +293,14 @@
<!-- 鍥剧墖鍐呭棰勮 -->
<view v-else-if="previewType === 'image'" class="image-preview-container">
- <image :src="previewContent" mode="widthFix" style="width: 100%; max-height: 400px;"></image>
+ <image
+ :src="previewContent"
+ mode="aspectFit"
+ class="preview-image-clickable"
+ @click="previewImageInPopup"
+ style="width: 100%; max-height: 400px; cursor: pointer;"
+ />
+ <div class="image-zoom-hint">鐐瑰嚮鍥剧墖鍙斁澶ф煡鐪�</div>
</view>
<!-- Excel 绛� Office 鏂囦欢鎻愮ず -->
@@ -347,10 +365,18 @@
current: true,
drawing: [],
drawingShow: false,
+ itemShow: false,
badreason: '',
PSTYPE: '',
WORKSHOP: '',
REMARK: '',
+ // picker 閫夐」鍜岀储寮�
+ badreasonOptions: ['', '澶栬涓嶈壇', '灏哄涓嶈壇', '鍖呰涓嶈壇', '鎬ц兘涓嶈壇', '瑁呴厤涓嶈壇', '瀹夎涓嶈壇'],
+ badreasonIndex: 0,
+ workshopOptions: ['', '鐢熶骇涓�閮�', '鐢熶骇浜岄儴', '娉ㄥ杞﹂棿', '鍏朵粬'],
+ workshopIndex: 0,
+ pstypeOptions: ['', '鐗归噰/璁╂浣跨敤', '鎸戦��/杩斿伐浣跨敤', '閫�璐�', '寰呭垽'],
+ pstypeIndex: 0,
checkState: false,
writeStatu: true,
fileName:'',
@@ -370,6 +396,19 @@
previewItemNo: '',
previewType: '', // 'text', 'image', 'excel', 'unsupported'
+ }
+ },
+ computed: {
+ isUnmaintainedAndNotEmergency() {
+ // 鍒ゆ柇琛ㄥ崟鏄惁鏈淮鎶や笖涓嶆槸绱ф�ユ斁琛�
+ // 鏈淮鎶ょ殑鏉′欢锛歵ableData涓虹┖鎴栨墍鏈夋楠岄」鐩兘鏈畬鎴�
+ const isUnmaintained = this.tableData.length === 0 ||
+ this.tableData.every(item => item.fcheckResu === null || item.fcheckResu === '');
+
+ // 涓嶆槸绱ф�ユ斁琛岀殑鏉′欢锛歟mergencyStatus涓篺alse
+ const isNotEmergency = !this.formData.emergencyStatus;
+
+ return isUnmaintained && isNotEmergency;
}
},
onLoad(options) {
@@ -482,18 +521,71 @@
addDefectDescription() {
// 娣诲姞涓嶈壇鎻忚堪鐨勯�昏緫
this.remarksPopup = !this.remarksPopup;
- this.remarks = this.formData.remarks;
+ this.remarks = this.formData.remarks || this.remarks || '';
+ console.log('鎵撳紑寮圭獥鏃剁殑remarks鍊�:', this.remarks);
+ },
+ // picker 浜嬩欢澶勭悊鏂规硶
+ onBadreasonChange(e) {
+ const index = e.detail.value;
+ this.badreasonIndex = index;
+ this.badreason = this.badreasonOptions[index];
+ this.saveRemarksGid('badreason');
+ },
+ onWorkshopChange(e) {
+ const index = e.detail.value;
+ this.workshopIndex = index;
+ this.WORKSHOP = this.workshopOptions[index];
+ this.saveRemarksGid('WORKSHOP');
+ },
+ onPstypeChange(e) {
+ const index = e.detail.value;
+ this.pstypeIndex = index;
+ this.PSTYPE = this.pstypeOptions[index];
+ this.saveRemarksGid('PSTYPE');
+ },
+ saveRemarksGid(fieldName) {
+ // 鐩存帴淇濆瓨鍒版暟鎹簱
+ const requestData = {
+ gid: this.formData.id,
+ releaseNo: this.formData.releaseNo,
+ BLYY: this.badreason || '',
+ SSCJ: this.WORKSHOP || '',
+ PSZT: this.PSTYPE || ''
+ };
+ console.log('鍙戦�佺殑鏁版嵁:', requestData);
+ console.log('badreason:', this.badreason);
+ console.log('WORKSHOP:', this.WORKSHOP);
+ console.log('PSTYPE:', this.PSTYPE);
+ console.log('閫夋嫨鐨勫瓧娈�:', fieldName);
+ this.$post({
+ url: "/LLJ/saveDropdownFields",
+ data: requestData
+ }).then(res => {
+ if (res && res.data && res.data.data && res.data.data.tbBillList && res.data.data.tbBillList.length > 0) {
+ // 寤惰繜閲嶆柊鍔犺浇鏁版嵁锛岀‘淇濇暟鎹簱鏇存柊瀹屾垚
+ setTimeout(() => {
+ this.init();
+ }, 500);
+ }
+ }).catch(err => {
+ console.error('淇濆瓨澶辫触锛�', err);
+ });
},
submitInspection() {
- if (this.PSTYPE == '') {
- this.writeStatu = false
- }
- if (this.badreason == '') {
- this.writeStatu = false
- }
- if (this.DEPARTMENT == '') {
- this.writeStatu = false
- }
+
+ // 閲嶇疆楠岃瘉鐘舵��
+ this.writeStatu = true;
+
+ // if (this.PSTYPE == '') {
+ // this.writeStatu = false
+ // }
+ // if (this.badreason == '') {
+ // this.writeStatu = false
+ // }
+ // 绉婚櫎瀵规湭瀹氫箟鍙橀噺DEPARTMENT鐨勬鏌�
+ // if (this.DEPARTMENT == '') {
+ // this.writeStatu = false
+ // }
console.log(this.tableData)
this.checkState = false;
@@ -504,9 +596,9 @@
})
if (this.checkState) {
- if (this.formData.fngDesc == '' || this.writeStatu == false) {
+ if (this.formData.fngDesc == '') {
uni.showToast({
- title: '鏈~鍐欎笉鑹弿杩版垨涓嶈壇鍘熷洜鎴栨墍灞炶溅闂存垨璇勫鐘舵��',
+ title: '鏈~鍐欎笉鑹弿杩�',
icon: 'none'
});
} else {
@@ -520,48 +612,28 @@
}).then(res => {
if (res.status == 0) {
- if(this.$loginInfo.account == 'PL017'){
- this.QcIssueResultDetailes = {
- fbatchQty: this.formData.fbatchQty,
- itemName: this.formData.itemName,
- itemNo: this.formData.itemNo,
- suppName: this.formData.suppName,
- appicationReason: this.formData.fngDesc,
- badReason: this.badreason,
- remark: this.REMARK,
- workShop: this.WORKSHOP,
- releaseNo: this.formData.releaseNo,
- staffNo: 'HMCS',
- // staffNo: this.$loginInfo.account,
- iqcStatus: this.PSTYPE,
- department: this.DEPARTMENT,
- EMERGENCY: this.formData.emergencyStatus ? "1" : "0" // 纭繚绱ф�ユ斁琛岀姸鎬佹纭紶閫�
- };
- }
- else{
- this.QcIssueResultDetailes = {
- fbatchQty: this.formData.fbatchQty,
- itemName: this.formData.itemName,
- itemNo: this.formData.itemNo,
- suppName: this.formData.suppName,
- appicationReason: this.formData.fngDesc,
- badReason: this.badreason,
- remark: this.REMARK,
- workShop: this.WORKSHOP,
- releaseNo: this.formData.releaseNo,
- // staffNo: 'HMCS',
- staffNo: this.$loginInfo.account,
- iqcStatus: this.PSTYPE,
- department: this.DEPARTMENT,
- EMERGENCY: this.formData.emergencyStatus ? "1" : "0" // 纭繚绱ф�ユ斁琛岀姸鎬佹纭紶閫�
- };
- }
+ // 缁熶竴鎺ㄩ�佺粰HMCS锛屼笉绠″摢涓处鍙�
+ this.QcIssueResultDetailes = {
+ fbatchQty: this.formData.fcovertQty,
+ itemName: this.formData.itemName,
+ itemNo: this.formData.itemNo,
+ suppName: this.formData.suppName,
+ appicationReason: this.formData.fngDesc,
+ badReason: this.badreason,
+ remark: this.remarks || '',
+ workShop: this.WORKSHOP,
+ releaseNo: this.formData.releaseNo,
+ staffNo: 'HMCS', // 缁熶竴鎺ㄩ�佺粰HMCS
+ iqcStatus: this.PSTYPE,
+ department: this.WORKSHOP, // 浣跨敤WORKSHOP鏇夸唬鏈畾涔夌殑DEPARTMENT
+ EMERGENCY: this.formData.emergencyStatus ? "1" : "0" // 纭繚绱ф�ユ斁琛岀姸鎬佹纭紶閫�
+ };
console.log("鎻愪氦鐨勭揣鎬ユ斁琛岀姸鎬侊細", this.formData.emergencyStatus ? "1" : "0");
console.log("瀹屾暣鐨勬彁浜ゆ暟鎹細", this.QcIssueResultDetailes);
const url = this.$store.state.serverInfo.serverAPI+`/QcIssueResult/GetProcessNo`;
- if (this.PSTYPE === '鐗归噰/璁╂浣跨敤') {// 鍙戦�� POST 璇锋眰
+ if (this.PSTYPE === '寰呭垽') {// 鍙戦�� POST 璇锋眰
uni.request({
url: url, // 璇锋眰鍦板潃
method: 'POST', // 璇锋眰鏂规硶
@@ -678,14 +750,23 @@
...data,
emergencyStatus: data.emergency === 1 || data.emergency === "1" || data.emergency === true
};
+ // 鍏抽敭锛氳祴鍊煎埌椤甸潰缁戝畾鍙橀噺
+ this.badreason = data.blyy || '';
+ this.PSTYPE = data.pszt || '';
+ this.WORKSHOP = data.sscj || '';
+ this.remarks = data.remarks || ''; // 璁剧疆remarks鍙橀噺
- // 纭繚PHSY瀛楁琚纭缃�
- this.formData.PHSY = data.PHSY;
+ // 璁剧疆 picker 绱㈠紩
+ this.badreasonIndex = this.badreasonOptions.indexOf(this.badreason);
+ this.workshopIndex = this.workshopOptions.indexOf(this.WORKSHOP);
+ this.pstypeIndex = this.pstypeOptions.indexOf(this.PSTYPE);
+
+
+ // 纭繚PHSY瀛楁琚纭缃紙鍏煎澶у皬鍐欙級
+ this.formData.PHSY = data.PHSY || data.phsy;
+ this.PHSY = (data.PHSY || data.phsy || '').toString(); // 鍚屾椂璁剧疆椤甸潰缁戝畾鐨凱HSY鍙橀噺
console.log("鍔犺浇鐨勭揣鎬ユ斁琛岀姸鎬�:", this.formData.emergencyStatus);
- this.badreason = data.blyy;
- this.PSTYPE = data.pszt;
- this.WORKSHOP = data.sscj;
this.$post({
url: "/LLJ/getJYItem",
data: {
@@ -696,6 +777,16 @@
let tableData = res1.data.tbBillList
//褰撳凡妫�楠屼釜鏁伴兘涓嶄负绌烘椂鎸夌収妫�娴嬬粨鏋勬帓搴�
tableData.sort((a, b) => {
+ // 棣栧厛鎸塅stand鎺掑簭锛欶stand涓嶄负绌虹殑鎺掑湪鍓嶉潰
+ const aHasFstand = a.fstand !== null && a.fstand !== undefined;
+ const bHasFstand = b.fstand !== null && b.fstand !== undefined;
+ if (aHasFstand && !bHasFstand) {
+ return -1;
+ } else if (!aHasFstand && bHasFstand) {
+ return 1;
+ }
+
+ // 鐒跺悗鎸夋楠岀粨鏋滄帓搴�
if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') {
return -1;
} else if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') {
@@ -737,37 +828,19 @@
url: 'SysSubmitFrom?releaseNo=' + releaseNo + '&userID=' + this.$loginInfo.account
});
},
- editRemarks() {
- // 淇濆瓨涓嶈壇鎻忚堪
- this.$post({
- url: "/LLJ/saveRemarksGid",
- data: {
- gid: this.formData.id,
- remarks: this.remarks || '',
- releaseNo: this.formData.releaseNo
- // 涓嶅啀鍖呭惈PHSY瀛楁
- }
- }).then(res => {
- if (res.data.tbBillList > 0) {
- this.formData.remarks = this.remarks;
- this.remarksPopup = !this.remarksPopup;
- this.$showMessage("淇濆瓨鎴愬姛");
- setTimeout(() => {
- this.init();
- }, 2000);
- }
- })
- },
+
drawingConfirm() {
this.drawingShow = false
this.imageShow = false
this.productionShow = false
+ this.itemShow=false
},
drawingCancel() {
this.drawingShow = false
this.imageShow = false
this.productionShow = false
+ this.itemShow=false
},
fetchDrawingNumber() {
@@ -788,7 +861,7 @@
success: (response) => {
console.log(response)
if (response.data.data == '杩斿洖缁撴灉涓虹┖') {
- _this.drawing = null
+ _this.drawing = []
} else {
_this.drawing = response.data.data
// 閬嶅巻鏁版嵁锛屽垽鏂枃浠跺悗缂�骞舵坊鍔犲瓧娈�
@@ -817,7 +890,7 @@
});
this.drawingShow = true
},
-
+
//鍥剧焊鐩稿叧鏂囨。
openDrawings(item) {
@@ -1240,85 +1313,136 @@
});
},
editRemarks() {
- // 淇濆瓨涓嶈壇鎻忚堪
this.$post({
url: "/LLJ/saveRemarksGid",
data: {
gid: this.formData.id,
remarks: this.remarks || '',
releaseNo: this.formData.releaseNo
- // 涓嶅啀鍖呭惈PHSY瀛楁
}
}).then(res => {
if (res.data.tbBillList > 0) {
this.formData.remarks = this.remarks;
this.remarksPopup = !this.remarksPopup;
- this.$showMessage("淇濆瓨鎴愬姛");
+ // 绔嬪嵆閲嶆柊鍔犺浇鏁版嵁纭繚鍚屾
setTimeout(() => {
this.init();
- }, 2000);
+ }, 500);
}
+ }).catch(err => {
+ console.error('淇濆瓨澶辫触锛�', err);
})
},
addDestruction() {
// 娣诲姞鐮村潖瀹為獙鐨勯�昏緫
this.destructionPopup = !this.destructionPopup;
+ // 淇锛氱‘淇漃HSY鍙橀噺姝g‘鍒濆鍖�
this.PHSY = this.formData.PHSY || '';
this.isInteger = true;
},
editDestruction() {
- // 楠岃瘉杈撳叆鏄惁涓烘暣鏁�
+ // 楠岃瘉杈撳叆鏄惁涓烘暣鏁版垨绌哄瓧绗︿覆
if(this.PHSY === '') {
this.isInteger = true;
- // 濡傛灉涓虹┖锛屼紶閫掔┖瀛楃涓诧紝鍚庣浼氬鐞嗕负null
} else {
const isInteger = /^-?\d+$/.test(this.PHSY);
this.isInteger = isInteger;
if (!isInteger) {
+ uni.showToast({
+ title: '璇疯緭鍏ユ暣鏁板�兼垨鐣欑┖',
+ icon: 'none',
+ duration: 2000
+ });
return;
}
}
-
- // 淇濆瓨鐮村潖瀹為獙鏁伴噺
+
+ // 鏄剧ず鍔犺浇鎻愮ず
+ uni.showLoading({
+ title: '淇濆瓨涓�...'
+ });
+
this.$post({
- url: "/LLJ/saveRemarksGid",
+ url: "/LLJ/savePhsyGid",
data: {
gid: this.formData.id,
releaseNo: this.formData.releaseNo,
- PHSY: this.PHSY // 鍙互鏄┖瀛楃涓叉垨鏈夋晥鏁存暟
- // 涓嶅啀鍖呭惈remarks瀛楁
+ PHSY: this.PHSY
}
}).then(res => {
- if (res.data.tbBillList > 0) {
- // 濡傛灉杈撳叆涓虹┖锛岃缃负null浠ヤ究涓嶆樉绀�
+ uni.hideLoading();
+ if (res.data && res.data.tbBillList > 0) {
this.formData.PHSY = this.PHSY === '' ? null : this.PHSY;
this.destructionPopup = false;
- this.$showMessage("淇濆瓨鎴愬姛");
+ uni.showToast({
+ title: '淇濆瓨鎴愬姛',
+ icon: 'success',
+ duration: 2000
+ });
+ // 绔嬪嵆閲嶆柊鍔犺浇鏁版嵁纭繚鍚屾
setTimeout(() => {
this.init();
- }, 2000);
+ }, 500);
+ } else {
+ uni.showToast({
+ title: '淇濆瓨澶辫触',
+ icon: 'none',
+ duration: 2000
+ });
}
+ }).catch(err => {
+ uni.hideLoading();
+ console.error('淇濆瓨澶辫触锛�', err);
+ uni.showToast({
+ title: '淇濆瓨澶辫触锛岃閲嶈瘯',
+ icon: 'none',
+ duration: 2000
+ });
})
},
clearDestruction() {
- // 娓呴櫎鐮村潖瀹為獙鏁伴噺
- this.PHSY = '';
+ // 鏄剧ず鍔犺浇鎻愮ず
+ uni.showLoading({
+ title: '娓呴櫎涓�...'
+ });
+
this.$post({
- url: "/LLJ/saveRemarksGid",
+ url: "/LLJ/savePhsyGid",
data: {
gid: this.formData.id,
releaseNo: this.formData.releaseNo,
- PHSY: '' // 绌哄瓧绗︿覆锛屽悗绔細澶勭悊涓簄ull
+ PHSY: ''
}
}).then(res => {
- if (res.data.tbBillList > 0) {
- this.formData.PHSY = null; // 纭繚鍓嶇涔熶负null锛屼笉鏄剧ず
+ uni.hideLoading();
+ if (res.data && res.data.tbBillList > 0) {
+ this.formData.PHSY = null;
+ this.PHSY = '';
this.destructionPopup = false;
- this.$showMessage("娓呴櫎鎴愬姛");
+ uni.showToast({
+ title: '娓呴櫎鎴愬姛',
+ icon: 'success',
+ duration: 2000
+ });
+ // 绔嬪嵆閲嶆柊鍔犺浇鏁版嵁纭繚鍚屾
setTimeout(() => {
this.init();
- }, 2000);
+ }, 500);
+ } else {
+ uni.showToast({
+ title: '娓呴櫎澶辫触',
+ icon: 'none',
+ duration: 2000
+ });
}
+ }).catch(err => {
+ uni.hideLoading();
+ console.error('娓呴櫎澶辫触锛�', err);
+ uni.showToast({
+ title: '娓呴櫎澶辫触锛岃閲嶈瘯',
+ icon: 'none',
+ duration: 2000
+ });
})
},
viewAttachmentInfo() {
@@ -1548,6 +1672,36 @@
const item = { fattach: this.previewTitle, itemNo: this.previewItemNo };
this.downloadAttachment(item);
this.closeFilePreview();
+ },
+
+ // 鍦ㄥ脊绐椾腑棰勮鍥剧墖锛堟斁澶у姛鑳斤級
+ previewImageInPopup() {
+ // 浣跨敤uni.previewImage API瀹炵幇鍥剧墖鏀惧ぇ棰勮
+ uni.previewImage({
+ current: this.previewContent, // 褰撳墠鏄剧ず鍥剧墖鐨勯摼鎺�
+ urls: [this.previewContent], // 闇�瑕侀瑙堢殑鍥剧墖閾炬帴鍒楄〃
+ loop: false, // 鏄惁寮�鍚浘鐗囪疆鎾�
+ indicator: 'default', // 鍥剧墖鎸囩ず鍣ㄧ被鍨�
+ longPressActions: {
+ itemList: ['鍙戦�佺粰鏈嬪弸', '淇濆瓨鍥剧墖', '鏀惰棌'],
+ success: function (data) {
+ console.log('閫変腑浜嗙' + (data.tapIndex + 1) + '涓寜閽�');
+ },
+ fail: function (err) {
+ console.log(err.errMsg);
+ }
+ },
+ success: () => {
+ console.log('鍥剧墖棰勮鎴愬姛');
+ },
+ fail: (err) => {
+ console.error('鍥剧墖棰勮澶辫触:', err);
+ uni.showToast({
+ title: '鍥剧墖棰勮澶辫触',
+ icon: 'none'
+ });
+ }
+ });
},
// 棰勮Office鏂囦欢
@@ -1856,22 +2010,7 @@
}
// #endif
},
- saveRemarksGid() {
- this.$post({
- url: "/LLJ/saveRemarksGid",
- data: {
- gid: this.formData.id,
- releaseNo: this.formData.releaseNo,
- BLYY: this.badreason,
- SSCJ: this.WORKSHOP,
- PSZT: this.PSTYPE
- }
- }).then(res => {
- if (res.data.tbBillList > 0) {
- this.$showMessage("鑷姩淇濆瓨鎴愬姛");
- }
- });
- },
+
}
}
</script>
@@ -1887,6 +2026,39 @@
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
min-height: 100vh;
position: relative;
+ transition: all 0.3s ease;
+ }
+
+ /* 鏈淮鎶や笖闈炵揣鎬ユ斁琛岃〃鍗曠殑绱壊鏍峰紡 */
+ .inspection-sheet.unmaintained-form {
+ background: linear-gradient(135deg, #f8f4ff 0%, #f0e6ff 100%);
+ border: 2px solid #9c27b0;
+ box-shadow: 0 0 20px rgba(156, 39, 176, 0.2);
+ }
+
+ .inspection-sheet.unmaintained-form .sheet-header {
+ border-bottom: 2px solid #9c27b0;
+ }
+
+ .inspection-sheet.unmaintained-form .sheet-header h1 {
+ color: #6a1b9a;
+ }
+
+ .inspection-sheet.unmaintained-form .inspection-number {
+ color: #9c27b0;
+ }
+
+ .inspection-sheet.unmaintained-form .material-info {
+ border: 1px solid #e1bee7;
+ background-color: rgba(156, 39, 176, 0.05);
+ }
+
+ .inspection-sheet.unmaintained-form .info-label {
+ color: #6a1b9a;
+ }
+
+ .inspection-sheet.unmaintained-form .info-value {
+ color: #4a148c;
}
/* 澶撮儴鏍峰紡 */
@@ -1931,6 +2103,24 @@
.info-value {
color: #2c3e50;
margin-right: 20px;
+ }
+
+ .picker-text {
+ padding: 6px 10px;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ background-color: white;
+ color: #999;
+ font-size: 14px;
+ min-height: 32px;
+ display: flex;
+ align-items: center;
+ max-width: 150px;
+ }
+
+ .picker-text.selected {
+ color: #e74c3c;
+ font-weight: 500;
}
.highlight {
@@ -2568,4 +2758,31 @@
overflow-x: auto;
}
}
+
+ /* 鍥剧墖鏀惧ぇ棰勮鐩稿叧鏍峰紡 */
+ .preview-image-clickable {
+ transition: transform 0.2s ease;
+ border-radius: 8px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+ }
+
+ .preview-image-clickable:hover {
+ transform: scale(1.02);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+ }
+
+ .image-zoom-hint {
+ text-align: center;
+ margin-top: 8px;
+ font-size: 12px;
+ color: #666;
+ font-style: italic;
+ }
+
+ .image-preview-container {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3