From 8b34fa36bfc735e53460159ac13814ff073c908a Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期三, 23 四月 2025 19:41:11 +0800 Subject: [PATCH] 来料检页面大更新,适配手机,平板等多种设备 --- pages/QC/LLJ/Add.vue | 1188 ++++++++++++++++++++++++++++++----------------------------- 1 files changed, 606 insertions(+), 582 deletions(-) diff --git a/pages/QC/LLJ/Add.vue b/pages/QC/LLJ/Add.vue index f7f0046..d1d1453 100644 --- a/pages/QC/LLJ/Add.vue +++ b/pages/QC/LLJ/Add.vue @@ -1,620 +1,614 @@ <template> - <view> - <view class="form-container"> - <form :modelValue="formData"> + <view class="inspection-sheet"> + <!-- 澶撮儴淇℃伅 --> + <view class="sheet-header"> + <h1>鏉ユ枡妫�楠屽崟</h1> + <view class="inspection-number">妫�楠屽崟鍙凤細{{formData.releaseNo}}</view> + + <view style="text-align: right;" v-if="this.current"><a class="sysLike" @click="toSysSubmitFrom(formData.releaseNo)">瀹為獙瀹ら�佹</a></view> + </view> + + <!-- 鍩烘湰淇℃伅鍖� --> + <view class="basic-info"> + <view class="info-row"> + <span class="info-label">鍒拌揣鍗曞彿锛�</span> + <span class="info-value">{{formData.lotNo}}</span> + <span class="info-label">鍒涘缓浜猴細</span> + <span class="info-value">{{formData.createBy}}</span> + </view> + <view class="info-row"> + <span class="info-label">鍒涘缓鏃堕棿锛�</span> + <span class="info-value">{{formData.createDate}}</span> + <span class="info-label"> 璐熻矗浜猴細</span> + <span class="info-value">{{formData.userName}}</span> + </view> + </view> + + <!-- 鐗╂枡淇℃伅鍖� --> + <view class="material-info"> + <view class="info-block"> + <view class="info-label">鐗╂枡缂栫爜锛�</view> + <view class="info-value">{{formData.itemNo}}</view> + <view class="doc-links"> + <a class="doc-link" @click="toFileUrlByU9List(1,formData.itemNo)">鍥剧焊瑙勬牸涔�</a> + <a class="doc-link" @click="toFileUrlByU9List(2,formData.itemNo)">杩涙枡妫�楠屾枃浠�</a> + </view> + </view> + <view class="info-block"> + <view class="info-label">鐗╂枡鍚嶇О锛�</view> + <view class="info-value">{{formData.itemName}}</view> + <view class="info-label">椤圭洰锛�</view> + <view class="info-value">{{formData.projectCodes}}</view> + <view class="info-label" v-if="formData.extendNo1!=null">鎶�鏀圭姸鎬侊細</view> + <view class="info-value" v-if="formData.extendNo1!=null">{{formData.extendNo1}}</view> + <view class="info-label">鏁伴噺锛�</view> + <view class="info-value highlight">{{formData.fcovertQty}}</view> + </view> + <view class="info-block"> + <view class="info-label">瑙勬牸鍨嬪彿锛�</view> + <view class="info-value">{{formData.itemModel}}</view> + </view> + <view class="info-block" v-if="formData.fngDesc!=null"> + <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="action-buttons" v-if="this.current" > + <button class="secondary-btn" @click="getInspectionItems">鑾峰彇妫�楠岄」鐩�</button> + </view> + + <!-- 妫�楠岄」鐩〃鏍� --> + <view class="inspection-table"> + <table> + <thead> + <tr> + <th width="15%" style="text-align: center;">妫�楠岄」鐩�</th> + <th width="50%" style="text-align: center;">妫�楠屾弿杩�</th> + <th width="20%" style="text-align: center;">璁板綍(鐐瑰嚮)</th> + </tr> + </thead> + <tbody> + <tr v-for="(item, index) in tableData" :key="index"> + <td>{{ item.fcheckItem }}</td> + <td> + <view v-if="item.fcheckResu=='鍚堟牸'" class="watermark approved">{{ getStatusText(item.fcheckResu) }}</view> + <view v-if="item.fcheckResu=='涓嶅悎鏍�'" class="watermark rejected">{{ getStatusText(item.fcheckResu) }}</view> + <view v-if="item.fcheckResu==null" class="watermark pending">{{ getStatusText(item.fcheckResu) }}</view> + <view class="description-text">{{ item.fcheckItemDesc }}</view> + </td> + <td> + <button v-if="item.current" class="record-btn" @click="fillRecord(item,index)">濉啓璁板綍</button> + <button v-if="!item.current" class="record-btn" @click="fillRecord(item,index)">鏌ョ湅</button> + </td> + </tr> + </tbody> + </table> + </view> + + <!-- 鎿嶄綔鎸夐挳鍖� --> + <view class="action-buttons"> + <button class="secondary-btn" @click="uploadImages">涓婁紶/鏌ョ湅鍥剧墖</button> + <button class="secondary-btn" @click="addDefectDescription" v-if="this.current">娣诲姞涓嶈壇鎻忚堪</button> + <button class="primary-btn" @click="submitInspection" v-if="this.current">妫�楠屾彁浜�</button> + </view> + <view v-if="remarksPopup" class="overlay"> + <view class="popup"> + <h3>淇敼涓嶅悎鏍兼弿杩�</h3> + <form> <view class="form-group"> - <label class="form-label">妫�楠屽崟鍙�:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.releaseNo" /> - <button v-if="!isUpdate && current==0" type="default" style="background-color: #04d007; color: white;" @click="toSysSubmitFrom(formData.releaseNo)"> - 瀹為獙瀹ら�佹 - </button> + <label class="form-label">涓嶅悎鏍兼弿杩�:</label> + <input class="form-input" type="text" v-model="remarks" /> </view> - <view class="form-group"> - <label class="form-label">鍒拌揣鍗曞彿:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.lotNo" /> - </view> - <view class="form-group"> - <label class="form-label">鍒涘缓浜�:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.createBy" /> - </view> - <view class="form-group"> - <label class="form-label">璐熻矗浜�:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.userName" /> - <button v-if="!isUpdate&& current==0 &&this.IQCJL" type="default" style="background-color: #04d007; color: white;" @click="toUpdateCheckBy(formData.releaseNo,formData.userName)"> - 鍙樻洿璐熻矗浜� - </button> - </view> - <view class="form-group"> - <label class="form-label">鍒涘缓鏃堕棿:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.createDate" /> - </view> - <view class="form-group"> - <label class="form-label">鐗╂枡缂栫爜:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.itemNo" /> - <button type="primary" @click="toFileUrlByU9List(1,formData.itemNo)"> - 鍥剧焊瑙勬牸涔� - </button> - <button type="primary" @click="toFileUrlByU9List(2,formData.itemNo)"> - 杩涙枡妫�楠屾枃浠� - </button> - </view> - <view class="form-group"> - <label class="form-label">鐗╂枡鍚嶇О:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.itemName" /> - </view> - <view class="form-group"> - <label class="form-label">瑙勬牸鍨嬪彿:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.itemModel" /> - </view> - <view class="form-group"> - <label class="form-label">鏁伴噺:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.fcovertQty" /> - </view> - <view class="form-group"> - <label class="form-label">涓嶈壇鎻忚堪:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.fngDesc" /> - </view> - <view class="form-group"> - <label class="form-label">涓婃涓嶈壇:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.newFngDesc" /> - </view> - <view class="form-group"> - <label class="form-label">椤圭洰:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.projectCodes" /> - </view> </form> + <button class="updateBut" @click="editRemarks">淇敼</button> + <button @click="remarksPopup = !remarksPopup">鍙栨秷</button> </view> - - <view class="list-container"> - - <uni-table ref="table" border emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr> - <uni-th align="center" class="th" width="100" style="color: #FFFFFF;">妫�楠岄」鐩�</uni-th> - <uni-th align="center" class="th" style="color: #FFFFFF;">妫�楠屾弿杩�</uni-th> - <uni-th align="center" class="th" width="100" style="color: #FFFFFF">鏄惁鍚堟牸</uni-th> - <uni-th align="center" class="th" width="50" style="color: #FFFFFF">璁板綍(鐐瑰嚮)</uni-th> - </uni-tr> - <uni-tr v-for="(item, index) in tableData" :key="index"> - <uni-td align="center"> - <input class="form-input" disabled="true" type="text" v-model="item.fcheckItem" /> - </uni-td> - <uni-td align="center"> - <input class="form-input" disabled="true" type="text" v-model="item.fcheckItemDesc" /> - </uni-td> - <uni-td align="center"> - <input class="form-input" disabled="true" type="text" v-model="item.fcheckResu" /> - </uni-td> - <uni-td> - <view class="uni-group"> - <button v-if="item.fenterQty >=item.checkQyt" type="default" @click="toDetail(item)"> - {{ item.checkQyt + '/' + item.fenterQty }} - </button> - <button v-else type="warn" @click="toDetail(item)"> - {{ item.checkQyt + '/' + item.fenterQty }} - </button> - </view> - </uni-td> - </uni-tr> - </uni-table> - </view> - - - <!-- <view class="dif"> - <view class="plus-button"> - <button type="warn" v-if="!isUpdate && !isShowTable" @click="submit">妫�楠屾彁浜�</button> - </view> - <view class="plus-button"> - <button type="warn" v-if="isUpdate && !isShowTable" @click="getItem">鍒涘缓妫�楠屽崟骞剁敓鎴愰儴鍒嗛粯璁ゅ��</button> - </view> - <view class="plus-button"> - <button type="warn" v-if="!isUpdate && !isShowTable" @click="toImage">涓婁紶/鏌ョ湅鍥剧墖</button> - </view> - <!-- 绉诲姩绔厛娉ㄩ攢锛屾湁闇�姹傚啀鏀惧嚭鏉� --> - <!-- <view class="plus-button"> - <button type="warn" v-if="!isUpdate && !formData.fcheckResu && !isShowTable" @click="removeXJ">鍒犻櫎鍗曟嵁</button> - </view> --> - <!-- <view class="plus-button"> - <button type="warn" v-if="!isUpdate && !isShowTable" @click="saveRemarks">娣诲姞涓嶈壇鎻忚堪</button> - </view> - <view class="plus-button"> - <button type="warn" v-if="isShowTable" @click="getTable">鑾峰彇妫�楠岄」鐩�</button> - </view> - <view class="plus-button"> - <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable">鐢熸垚妫�楠岄」鐩�</button> - </view> - </view> --> - - <view class="fixed-buttons"> - <button type="warn" v-if="!isUpdate && !isShowTable && current==0" @click="submit">妫�楠屾彁浜�</button> - <button type="warn" v-if="isUpdate && !isShowTable" @click="getItem">鍒涘缓妫�楠屽崟骞剁敓鎴愰儴鍒嗛粯璁ゅ��</button> - <button type="warn" v-if="!isUpdate && !isShowTable" @click="toImage">涓婁紶/鏌ョ湅鍥剧墖</button> - <button type="warn" v-if="!isUpdate && !isShowTable" @click="saveRemarks">娣诲姞涓嶈壇鎻忚堪</button> - <button type="warn" v-if="!isUpdate && !isShowTable && current==0" @click="getTable">鑾峰彇妫�楠岄」鐩�</button> - <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable">鐢熸垚妫�楠岄」鐩�</button> - </view> - - <view v-if="remarksPopup" class="overlay"> - <view class="popup"> - <h3>淇敼涓嶅悎鏍兼弿杩�</h3> - <form> - <view class="form-group"> - <label class="form-label">涓嶅悎鏍兼弿杩�:</label> - <input class="form-input" type="text" v-model="remarks" /> - </view> - <button type="warn" @click="editRemarks">淇敼</button> - <button @click="remarksPopup = !remarksPopup">鍙栨秷</button> - </form> - </view> - </view> - </view> + </view> </template> <script> - import { compile } from "vue"; -import { - msgRead - } from "../../../utils/message"; - - export default { - data() { - return { - formData: { - id: "", - releaseNo: "", - createBy: "", - createDate: "", - lotNo: "", - itemNo: "", - billNo: "", - fcovertQty: "", - detailMem: "", - taskNo: "", - fcheckResu: "", - boardModel: "", - planQty: "", - mocode: "", - boardStyle: "" - }, - - DAA020List: [], - DAA020Index: -1, - DAA001List: [], - DAA001Index: -1, - schemeResult: [], - isShowTable: false, - ItemList: [], - ItemIndex: -1, - boardItems: [], - lineList: [], - lineNo: "", - tableData: [], - isSubmit: true, - isUpdate: true, - remarks: "", - remarksPopup: false, - - msgId: 0 - }; +export default { + data() { + return { + formData: { + id: "", + releaseNo: "", + createBy: "", + createDate: "", + lotNo: "", + itemNo: "", + billNo: "", + fcovertQty: "", + detailMem: "", + taskNo: "", + fcheckResu: "", + boardModel: "", + planQty: "", + mocode: "", + boardStyle: "" }, - onLoad(options) { - //options涓寘鍚簡url闄勫甫鐨勫弬鏁� - - let params = options; - - if (params["id"]) { - this.isUpdate = false; - this.formData.id = params["id"]; - this.formData.releaseNo = params["releaseNo"]; - this.formData.lotNo = params["lotNo"]; - this.msgId = params["msgId"]; - this.current=params["current"]; - if(this.$loginInfo.roleid.indexOf("87638") != -1 || this.$loginInfo.account=="PL017") - { - this.IQCJL=true; - }else - { - this.IQCJL=false; - } - + tableData: [], + remarksPopup: false, + current:true + } + }, + onLoad(options) { + //options涓寘鍚簡url闄勫甫鐨勫弬鏁� + let params = options; + + if (params["id"]) { + this.formData.id = params["id"]; + this.formData.releaseNo = params["releaseNo"]; + this.formData.lotNo = params["lotNo"]; + this.msgId = params["msgId"]; + + if(params["current"]==='A') + { + this.current=true; + }else if(params["current"]==='B'){ + this.current=false; + } - //getQaItemXj02 - //this.init(); - - if (this.msgId > 0) { - this.msgRead(); - } - - } else { - //鍒濆鍖栨楠屽崟鍙� - this.$post({ - url: "/LLJ/getMaxReleaseNo" - }).then(res => { - this.formData.releaseNo = res.data.tbBillList; - this.formData.createBy = this.$loginInfo.account; - this.formData.createDate = this.$getDate("yyyy-mm-dd"); - }); - + if (this.msgId > 0) { + this.msgRead(); + } + + } else { + //鍒濆鍖栨楠屽崟鍙� + this.$post({ + url: "/LLJ/getMaxReleaseNo" + }).then(res => { + this.formData.releaseNo = res.data.tbBillList; + this.formData.createBy = this.$loginInfo.account; + this.formData.createDate = this.$getDate("yyyy-mm-dd"); + }); + + } + + }, + methods: { + getStatusText(status) { + const statusMap = { + approved: '鍚堟牸', + rejected: '涓嶅悎鏍�', + pending: '寰呯‘璁�' + } + if(status==null){ + return statusMap['pending'] || '' + }else if(status=='鍚堟牸'){ + return statusMap['approved'] || '' + }else{ + return statusMap['rejected'] || '' + } + + }, + getInspectionItems() { + // 鑾峰彇妫�楠岄」鐩殑閫昏緫 + this.$post({ + url: "/LLJ/setJYItem", + data: { + itemNo: this.formData.itemNo, + quantity: this.formData.fcovertQty, + releaseNo: this.formData.releaseNo + } + }).then(res => { + if (res.status==0) { + uni.showToast({ + title: res.message.toString(), + //灏嗗�艰缃负 success 鎴栬�呯洿鎺ヤ笉鐢ㄥ啓icon杩欎釜鍙傛暟 + icon: 'success', + //鏄剧ず鎸佺画鏃堕棿涓� 2绉� + duration: 2000 + }) + // 濡傛灉鏈夐〉闈㈣烦杞紝闇�瑕佺敤瀹氭椂鍣ㄥ欢杩� + setTimeout(() => { + this.init(); + }, 2000); + + } else { + uni.showToast({ + title: res.message.toString(), + //灏嗗�艰缃负 success 鎴栬�呯洿鎺ヤ笉鐢ㄥ啓icon杩欎釜鍙傛暟 + icon: 'error', + //鏄剧ず鎸佺画鏃堕棿涓� 2绉� + duration: 2000 + }) + } + }); + }, + fillRecord(item,index) { + // 濉啓璁板綍鐨勯�昏緫 + uni.navigateTo({ + url: 'detail?mainId=' + item.id+'&formID='+this.formData.id+'&releaseNo='+this.formData.releaseNo+'&index='+index+'¤t='+this.current + }); + }, + uploadImages() { + // 涓婁紶/鏌ョ湅鍥剧墖鐨勯�昏緫 + uni.navigateTo({ + url: 'ImageItem?id=' + this.formData.id + }); + }, + addDefectDescription() { + // 娣诲姞涓嶈壇鎻忚堪鐨勯�昏緫 + this.remarksPopup = !this.remarksPopup; + this.remarks = this.formData.remarks; + }, + submitInspection() { + // 妫�楠屾彁浜ょ殑閫昏緫 + this.$post({ + url: "/LLJ/IqcQaSubmit", + data: { + userNo: this.$loginInfo.account, + releaseNo: this.formData.releaseNo + } + }).then(res => { + if (res.status==0) { + + uni.showToast({ + title: res.message.toString(), + icon: 'success', + duration: 2000 + }) + // 濡傛灉鏈夐〉闈㈣烦杞紝闇�瑕佺敤瀹氭椂鍣ㄥ欢杩� + setTimeout(() => { + uni.navigateTo({ + url: 'List' + }); + }, 2000); // 淇濇寔涓� duration 鐩稿悓鐨勬椂闀� + + } else { + uni.showModal({ + title: "鎻愮ず", + content: res.message.toString(), + confirmText: "纭畾", + showCancel: false, + success: (res) => { + + } + }) + } + }) + }, + onShow() { + //姣忔杩涘叆椤甸潰閮戒細鎵ц鐨勬柟娉� + if (this.formData.id) { + this.init(); + } + }, + init() { + let userName = this.$loginInfo.account; + + this.$post({ + url: "/LLJ/getPage", + data: { + id: this.formData.id, + createUser: userName, + pageIndex: 1, + limit: 1, } - }, - methods: { - removeXJ() { - if (this.formData.id) { - this.$post({ - url: "/LLJ/removeXJ", - data: { - releaseNo: this.formData.releaseNo - } - }).then(res => { - if (res.data.tbBillList > 0) { - this.$showMessage("鍒犻櫎鎴愬姛"); - //鍏抽棴褰撳墠椤甸潰锛岃繑鍥炰笂涓�椤甸潰鎴栧绾ч〉闈� - uni.navigateBack(); - } else { - this.$showMessage("鍒犻櫎澶辫触"); - } - }); - } else { - this.$showMessage("璇峰厛閫夋嫨妫�楠屽崟鍙�"); - } - }, - getItem() { - - if (this.isSubmit) { - this.$showMessage("姝ょ墿鏂欐棤鍚敤鐨勬楠岄」鐩紝璇风淮鎶�!"); - return; - } - - if (!this.formData.billNo) { - this.$showMessage("璇烽�夋嫨璁″垝缂栧彿"); - return; - } - + }).then(res => { + let data = res.data.tbBillList[0]; + if (data) { + this.formData = data; + this.$post({ - url: "/XJ/save", - data: { - from: this.formData, - userNo: this.$loginInfo.account, - items: this.tableData - } - }).then(res => { - this.formData.id = res.data.tbBillList; - this.$showMessage("鐢熸垚妫�楠岄」鐩垚鍔�"); - this.init(); - this.isUpdate = false; - }); - }, - submit() { - this.$post({ - url: "/LLJ/IqcQaSubmit", - data: { - userNo: this.$loginInfo.account, - releaseNo: this.formData.releaseNo - } - }).then(res => { - if (res.status==0) { - uni.showToast({ - title: res.message.toString(), - icon: 'success', - duration: 2000 - }) - // 濡傛灉鏈夐〉闈㈣烦杞紝闇�瑕佺敤瀹氭椂鍣ㄥ欢杩� - setTimeout(() => { - uni.navigateTo({ - url: 'List' - }); - }, 2000); // 淇濇寔涓� duration 鐩稿悓鐨勬椂闀� - - } else { - uni.showToast({ - title: res.message.toString(), - icon: 'error', - duration: 2000 - }) - - } - - }) - }, - msgRead() { - msgRead(this.msgId, this.$loginInfo.account); - }, - init() { - let userName = this.$loginInfo.account; - - this.$post({ - url: "/LLJ/getPage", + url: "/LLJ/getJYItem", data: { id: this.formData.id, - createUser: userName, - pageIndex: 1, - limit: 1, - } - }).then(res => { - let data = res.data.tbBillList[0]; - if (data) { - this.formData = data; - - this.$post({ - url: "/LLJ/getJYItem", - data: { - id: this.formData.id, - releaseNo: this.formData.releaseNo - } - }).then(res1 => { - let tableData = res1.data.tbBillList - //褰撳凡妫�楠屼釜鏁伴兘涓嶄负绌烘椂鎸夌収妫�娴嬬粨鏋勬帓搴� - tableData.sort((a, b) => { - if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') { - return -1; - } else if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') { - return 1; - } else { - return 0; - } - }); - this.tableData = tableData; - if (this.tableData.length === 0) { - this.isShowTable = true; - } - - - }) - } - }); - }, - toDetail(item) { - if (this.isUpdate) { - uni.showToast({ - icon: "none", - title: "璇峰厛鐢熸垚妫�楠岄」鐩�", - duration: 2000, - }); - } else { - uni.navigateTo({ - url: 'detail?mainId=' + item.id - }); - } - }, - saveRemarks() { - this.remarksPopup = !this.remarksPopup; - this.remarks = this.formData.remarks; - }, - editRemarks() { - if (this.remarks) { - //saveRemarksGid - this.$post({ - url: "/LLJ/saveRemarksGid", - data: { - gid: this.formData.id, - remarks: this.remarks, - releaseNo: this.formData.releaseNo, - } - }).then(res => { - if (res.data.tbBillList > 0) { - this.formData.remarks = this.remarks; - this.remarksPopup = !this.remarksPopup; - this.$showMessage("淇濆瓨鎴愬姛"); - } - }) - } - }, - toImage() { - uni.navigateTo({ - url: 'ImageItem?id=' + this.formData.id - }); - }, - getTable() { - this.$post({ - url: "/LLJ/setJYItem", - data: { - itemNo: this.formData.itemNo, - quantity: this.formData.fcovertQty, releaseNo: this.formData.releaseNo } - }).then(res => { - if (res.status==0) { - uni.showToast({ - title: res.message.toString(), - //灏嗗�艰缃负 success 鎴栬�呯洿鎺ヤ笉鐢ㄥ啓icon杩欎釜鍙傛暟 - icon: 'success', - //鏄剧ず鎸佺画鏃堕棿涓� 2绉� - duration: 2000 - }) - // 濡傛灉鏈夐〉闈㈣烦杞紝闇�瑕佺敤瀹氭椂鍣ㄥ欢杩� - setTimeout(() => { - this.init(); - }, 2000); // 淇濇寔涓� duration 鐩稿悓鐨勬椂闀� - - } else { - // this.$showMessage("姝ょ墿鏂欐病鏈夊惎鐢ㄧ殑妫�楠岄」鐩紝璇风淮鎶�!"); - // this.isShowTable = true; - // this.isUpdate = false; - // this.tableData = []; - uni.showToast({ - title: res.message.toString(), - //灏嗗�艰缃负 success 鎴栬�呯洿鎺ヤ笉鐢ㄥ啓icon杩欎釜鍙傛暟 - icon: 'error', - //鏄剧ず鎸佺画鏃堕棿涓� 2绉� - duration: 2000 - }) - + }).then(res1 => { + let tableData = res1.data.tbBillList + //褰撳凡妫�楠屼釜鏁伴兘涓嶄负绌烘椂鎸夌収妫�娴嬬粨鏋勬帓搴� + tableData.sort((a, b) => { + if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') { + return -1; + } else if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') { + return 1; + } else { + return 0; + } + }); + this.tableData = tableData; + if (this.tableData.length === 0) { + this.isShowTable = true; } - - }); - - }, - saveTable() { - if (this.tableData.length === 0) { - return; - } - this.$post({ - url: "/LLJ/saveItem", - data: { - releaseNo: this.formData.releaseNo, - items: this.tableData, - userNo: this.$loginInfo.account, - gid: this.formData.id - } - }).then(res => { - this.formData.id = res.data.tbBillList; - this.isShowTable = false; - this.isUpdate = false; - this.init(); - + this.tableData.forEach((item, index) => { + this.$set(item, 'current', this.current); + + }); + }) - }, - //鍘绘枃浠跺垪琛ㄩ〉闈紙鏂囦欢绫诲瀷锛岀墿鏂欑紪鍙凤級 - toFileUrlByU9List(type,u9No){ - if(type===1){ - uni.navigateTo({ - url: 'FileUrlByU9List?type=' + type+'&itemID='+u9No - }); - }else{ - uni.navigateTo({ - url: 'FileUrlByU9List2?type=' + type+'&itemID='+u9No - }); + } + }); + }, + msgRead() { + msgRead(this.msgId, this.$loginInfo.account); + }, + //鍘绘枃浠跺垪琛ㄩ〉闈紙鏂囦欢绫诲瀷锛岀墿鏂欑紪鍙凤級 + toFileUrlByU9List(type,u9No){ + if(type===1){ + uni.navigateTo({ + url: 'FileUrlByU9List?type=' + type+'&itemID='+u9No + }); + }else{ + uni.navigateTo({ + url: 'FileUrlByU9List2?type=' + type+'&itemID='+u9No + }); + } + }, + toSysSubmitFrom(releaseNo){ + uni.navigateTo({ + url: 'SysSubmitFrom?releaseNo=' + releaseNo+'&userID='+this.$loginInfo.account + }); + }, + editRemarks() { + if (this.remarks) { + //saveRemarksGid + this.$post({ + url: "/LLJ/saveRemarksGid", + data: { + gid: this.formData.id, + remarks: this.remarks, + releaseNo: this.formData.releaseNo, } - - }, - toSysSubmitFrom(releaseNo){ - uni.navigateTo({ - url: 'SysSubmitFrom?releaseNo=' + releaseNo+'&userID='+this.$loginInfo.account - }); - }, - toUpdateCheckBy(releaseNo,userName){ - - //console.log(this.$loginInfo) - uni.navigateTo({ - url: 'UpdateCheckBy?releaseNo=' + releaseNo+'&userID='+this.$loginInfo.account+'&staffName='+userName - }); - } - }, - onShow() { - //姣忔杩涘叆椤甸潰閮戒細鎵ц鐨勬柟娉� - if (this.formData.id) { - this.init(); - } + }).then(res => { + if (res.data.tbBillList > 0) { + this.formData.remarks = this.remarks; + this.remarksPopup = !this.remarksPopup; + this.$showMessage("淇濆瓨鎴愬姛"); + } + }) + }else{ + this.$post({ + url: "/LLJ/saveRemarksGid", + data: { + gid: this.formData.id, + remarks: '', + releaseNo: this.formData.releaseNo, + } + }).then(res => { + if (res.data.tbBillList > 0) { + this.formData.remarks = this.remarks; + this.remarksPopup = !this.remarksPopup; + this.$showMessage("淇濆瓨鎴愬姛"); + } + }) } - }; + }, + } +} </script> + <style> - .form-group { - display: flex; - align-items: center; - border-bottom: 1px solid #c9c9c9; - } +/* 鍩虹鏍峰紡 */ +.inspection-sheet { + font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif; + max-width: 1000px; + margin: 0 auto; + padding: 20px; + background-color: #fff; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} - .form-label { - margin-bottom: 0; - padding: 5px; - } +/* 澶撮儴鏍峰紡 */ +.sheet-header { + text-align: center; + margin-bottom: 20px; + padding-bottom: 15px; + border-bottom: 2px solid #e0e0e0; +} - .form-input { - flex: 1; - margin-bottom: 0; - padding: 5px; - } +.sheet-header h1 { + color: #2c3e50; + font-size: 24px; + margin-bottom: 5px; +} - .picker { - flex: 1; - margin-bottom: 0; - padding: 5px; - font-size: 12px; - } +.inspection-number { + font-size: 16px; + font-weight: bold; + color: #3498db; +} - .uni-form-item { - display: flex; - border-bottom: 1px solid #c9c9c9; - } +/* 鍩烘湰淇℃伅鍖烘牱寮� */ +.basic-info, .material-info { + margin-bottom: 20px; +} - .edit { - background-color: white; - } +.info-row { + display: flex; + margin-bottom: 10px; + flex-wrap: wrap; +} - /* 榛樿鏍峰紡 */ - /* .list-container { - height: 60vh; - /* 璁剧疆鍒楄〃瀹瑰櫒鐨勯珮搴︿负鍓╀綑绌洪棿锛屽苟鍑忓幓琛ㄥ崟瀹瑰櫒鐨勯珮搴� */ - /* overflow-y: auto; */ - /* 鍏佽鍒楄〃瀹瑰櫒鍨傜洿婊氬姩 */ - /* padding: 10px; */ - /* 鍙�夛細娣诲姞涓�浜涘唴杈硅窛锛屼娇鍒楄〃鍐呭鏇寸編瑙� */ - /* } */ - - .fixed-buttons { - position: fixed; - bottom: 0; - left: 0; - right: 0; - display: flex; - flex-wrap: wrap; - padding: 10px; - background-color: #ffffff; - box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); - z-index: 1000; - max-height: 30vh; /* 闄愬埗鎸夐挳瀹瑰櫒鏈�澶ч珮搴� */ - overflow-y: auto; /* 鎸夐挳杩囧鏃惰嚜韬彲婊氬姩 */ - } - - .fixed-buttons button { - margin: 5px; - flex: 1 1 calc(50% - 20px); /* 涓ゅ垪甯冨眬 */ - } - - /* 涓哄唴瀹瑰尯鍩熸坊鍔犲簳閮� padding 闃叉琚浐瀹氭寜閽伄鎸� */ - .list-container { - height: calc(100vh - 400px); /* 鍔ㄦ�侀珮搴﹁绠� */ - overflow-y: auto; - padding: 10px; - padding-bottom: 300px; /* 鏍规嵁鎸夐挳楂樺害璋冩暣 */ - } - - @media (max-width: 768px) { - .list-container { - height: calc(100vh - 376px); - padding-bottom: 300px; - } - - .fixed-buttons { - flex-direction: column; - padding: 10px; - } - - .fixed-buttons button { - flex: none; - width: 100%; - margin: 5px 0; - } - } - - .form-container { - padding: 10px; - /* 鍙�夛細娣诲姞涓�浜涘唴杈硅窛锛屼娇琛ㄥ崟鍐呭鏇寸編瑙� */ - } +.info-label { + font-weight: bold; + color: #34495e; + min-width: 80px; + margin-right: 5px; +} - .th { - background-color: lightskyblue; - color: #FFFFFF; - } +.info-value { + color: #2c3e50; + margin-right: 20px; +} - .plus-button { - line-height: 59px; - font-size: 24px; - cursor: pointer; - z-index: 1000; - margin-bottom: 10px; - } +.highlight { + font-weight: bold; + color: #e74c3c; +} +/* 鐗╂枡淇℃伅鍖烘牱寮� */ +.material-info { + border: 1px solid #eee; + padding: 15px; + border-radius: 5px; +} +.info-block { + display: flex; + align-items: center; + margin-bottom: 10px; + flex-wrap: wrap; +} - .plus-button button { - margin: 5px 0; - /* 鎸夐挳涔嬮棿鐨勫瀭鐩撮棿璺� */ - } +.doc-links { + margin-left: auto; +} - .overlay { +.doc-link { + color: #3498db; + text-decoration: none; + margin-left: 15px; + padding: 3px 8px; + border: 1px solid #3498db; + border-radius: 3px; + font-size: 12px; +} + +.sysLike{ + color: #3498db; + text-decoration: none; + margin-left: 15px; + padding: 3px 8px; + border-radius: 3px; + font-size: 12px; +} + +.doc-link:hover { + background-color: #f0f8ff; +} + +/* 琛ㄦ牸鏍峰紡 */ +.inspection-table { + margin: 25px 0; +} + +.inspection-table table { + width: 100%; + border-collapse: collapse; +} + +.inspection-table th, .inspection-table td { + padding: 12px 15px; + border: 1px solid #ddd; + text-align: left; +} + +.inspection-table th { + background-color: #f8f9fa; + font-weight: bold; + color: #34495e; +} + +.inspection-table tr:nth-child(even) { + background-color: #f9f9f9; +} + +.inspection-table tr:hover { + background-color: #f1f5f9; +} + +/* 鎸夐挳鏍峰紡 */ +.action-buttons { + display: flex; + justify-content: flex-end; + gap: 10px; + margin-top: 20px; +} + +.primary-btn, .secondary-btn { + padding: 10px 20px; + border: none; + border-radius: 4px; + font-size: 14px; + cursor: pointer; + transition: all 0.3s; +} + +.primary-btn { + background-color: #3498db; + color: white; +} + +.primary-btn:hover { + background-color: #2980b9; +} + +.secondary-btn { + background-color: #ecf0f1; + color: #7f8c8d; +} + +.secondary-btn:hover { + background-color: #d5dbdb; +} + +.record-btn { + padding: 6px 12px; + background-color: #f8f9fa; + border: 1px solid #ddd; + /* border-radius: 3px; */ + cursor: pointer; + transition: all 0.2s; +} + +.record-btn:hover { + background-color: #e9ecef; +} + +/* 姘村嵃鏍峰紡 */ +.watermark { + position: absolute; + font-size: 40px; + font-weight: bold; + opacity: 1; + z-index: 1; + pointer-events: none; + transform: rotate(-15deg); + width: 100%; + text-align: center; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) rotate(-15deg); +} + +.watermark.approved { + color: #2ecc71; /* 缁胯壊 */ +} + +.watermark.rejected { + color: #e74c3c; /* 绾㈣壊 */ +} + +.watermark.pending { + color: #f39c12; /* 姗欒壊 */ +} + +/* 鎻忚堪鏂囨湰瀹瑰櫒 */ +.description-text { + position: relative; + z-index: 2; + padding: 25px; + background-color: rgba(255, 255, 255, 0.7); +} + +/* 璋冩暣琛ㄦ牸鍗曞厓鏍� */ +.inspection-table td:nth-child(2) { + position: relative; + overflow: hidden; + padding: 0; +} +.overlay { position: fixed; top: 0; left: 0; @@ -624,8 +618,8 @@ display: flex; justify-content: center; align-items: center; + z-index: 10; } - .popup { background-color: #fff; padding: 20px; @@ -636,4 +630,34 @@ height: 25vh; /* 璁剧疆楂樺害涓鸿鍙i珮搴︾殑80% */ } + .form-group { + display: flex; + align-items: center; + border-bottom: 1px solid #c9c9c9; + } + .updateBut{ + background-color: #3498db; + color: white; + } +/* 鍝嶅簲寮忚璁� */ +@media (max-width: 700px) { + .info-row, .info-block { + flex-direction: column; + align-items: flex-start; + } + + .doc-links { + margin-left: 0; + margin-top: 10px; + } + + .action-buttons { + flex-direction: column; + } + + .inspection-table table { + display: block; + overflow-x: auto; + } +} </style> \ No newline at end of file -- Gitblit v1.9.3