From 17d3d61e12f537eb2ee7ec6f4de1590102377afa Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期二, 29 四月 2025 08:18:15 +0800
Subject: [PATCH] 代码提交
---
pages/QC/SJ/Add.vue | 1146 +++++++++++++++++++++++++++++++-------------------------
1 files changed, 637 insertions(+), 509 deletions(-)
diff --git a/pages/QC/SJ/Add.vue b/pages/QC/SJ/Add.vue
index ff7d5ef..d1f0357 100644
--- a/pages/QC/SJ/Add.vue
+++ b/pages/QC/SJ/Add.vue
@@ -1,547 +1,675 @@
<template>
- <view>
- <view class="form-container">
- <form :modelValue="formData">
- <view class="form-group">
- <label class="form-label">棣栨鍗曞彿:</label>
- <input class="form-input" disabled="true" type="text" v-model="formData.billNo"/>
- </view>
- <view class="form-group">
- <label class="form-label">鍒涘缓鏃堕棿:</label>
- <input class="form-input" disabled="true" type="text" v-model="formData.createTime"/>
- </view>
- <view class="uni-form-item uni-column form-item edit">
- <text class="form-label">鐢熶骇绾垮埆:</text>
- <superwei-combox v-if="isUpdate" :candidates="DAA020List" placeholder="璇烽�夋嫨鎴栬緭鍏�"
- v-model="formData.line"
- @select="onDaa020Change"
- class="picker form-input"
- style="border: none;"></superwei-combox>
- <input v-else class="form-input" disabled="true" type="text" v-model="formData.line"/>
- </view>
- <view class="uni-form-item uni-column form-item edit">
- <text class="form-label">鐗╂枡缂栫爜:</text>
- <superwei-combox v-if="isUpdate" :candidates="boardItems" placeholder="璇烽�夋嫨鎴栬緭鍏�"
- v-model="formData.itemNo"
- :isJSON="true" keyName="itemName"
- @select="onItemChange"
- class="picker form-input"
- style="border: none;"></superwei-combox>
- <input v-else class="form-input" disabled="true" type="text" v-model="formData.itemNo"/>
- </view>
- <view class="uni-form-item uni-column form-item edit">
- <text class="form-label">璁″垝缂栧彿:</text>
- <picker v-if="isUpdate" class="picker form-input" name="selector" :range="DAA001List"
- @change="onDaa001Change">
- <text>{{ DAA001List[DAA001Index] }}</text>
- </picker>
- <input v-else class="form-input" disabled="true" type="text" v-model="formData.daa001"/>
- </view>
- <view class="form-group">
- <label class="form-label">浜у搧鍚嶇О:</label>
- <input class="form-input" disabled="true" type="text" v-model="formData.daa003"/>
- </view>
- <view class="form-group">
- <label class="form-label">瑙勬牸鍨嬪彿:</label>
- <input class="form-input" disabled="true" type="text" v-model="formData.daa004"/>
- </view>
- <view class="form-group">
- <label class="form-label">宸ュ崟鏁伴噺:</label>
- <input class="form-input" disabled="true" type="text" v-model="formData.daa008"/>
- </view>
- <view class="form-group">
- <label class="form-label">涓嶅悎鏍兼弿杩�:</label>
- <input class="form-input" disabled="true" type="text" v-model="formData.remarks"/>
- </view>
- </form>
- </view>
- <view class="list-container">
- <uni-table ref="table" border emptyText="鏆傛棤鏇村鏁版嵁">
- <uni-tr>
- <uni-th align="center" class="th" style="color: #FFFFFF;">妫�楠岄」鐩�</uni-th>
- <uni-th align="center" class="th" style="color: #FFFFFF">鏄惁鍚堟牸</uni-th>
- <uni-th align="center" class="th" 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.projName"/>
- </uni-td>
- <uni-td align="center">
- <input class="form-input" disabled="true" type="text" v-model="item.result"/>
- </uni-td>
- <uni-td>
- <view class="uni-group">
- <button v-if="item.isCheck >=item.levelNum" type="default" @click="toDetail(item)">
- {{ item.levelNum + '/' + item.isCheck }}
- </button>
- <button v-else type="warn" @click="toDetail(item)"> {{ item.levelNum + '/' + item.isCheck }}</button>
- </view>
- </uni-td>
- </uni-tr>
- </uni-table>
- </view>
- <view class="plus-button">
- <button type="warn" v-if="isUpdate && !isShowTable" @click="save">鍒涘缓妫�楠屽崟骞剁敓鎴愰儴鍒嗛粯璁ゅ��</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.result == '鏈畬鎴�' && !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 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 class="inspection-sheet">
+ <!-- 澶撮儴淇℃伅 -->
+ <view class="sheet-header">
+ <h1>棣栨妫�楠屽崟</h1>
+ <view class="inspection-number">妫�楠屽崟鍙凤細{{formData.billNo}}</view>
+
+
+ </view>
+
+ <!-- 鍩烘湰淇℃伅鍖� -->
+ <view class="basic-info">
+ <view class="info-row">
+ <span class="info-label">鍒涘缓浜猴細</span>
+ <span class="info-value">{{formData.fName}}</span>
+ </view>
+ <view class="info-row">
+ <span class="info-label">鍒涘缓鏃堕棿锛�</span>
+ <span class="info-value">{{formData.createTime}}</span>
+ <!-- <span class="info-label"> 璐熻矗浜猴細</span>
+ <span class="info-value">{{formData.statusUser}}</span> -->
+ </view>
+ </view>
+
+ <!-- 鐗╂枡淇℃伅鍖� -->
+ <view class="material-info">
+ <view class="info-block">
+ <view class="info-label">鐗╂枡缂栫爜锛�</view>
+ <view class="info-value">{{formData.itemNo}}</view>
+ </view>
+ <view class="info-block">
+ <view class="info-label">浜у搧鍚嶇О锛�</view>
+ <view class="info-value">{{formData.daa003}}</view>
+ </view>
+ <view class="info-block">
+ <view class="info-label">瑙勬牸鍨嬪彿锛�</view>
+ <view class="info-value">{{formData.daa004}}</view>
+ </view>
+ <view class="info-block">
+ <view class="info-label">鐢熶骇绾垮埆锛�</view>
+ <view class="info-value">{{formData.line}}</view>
+ </view>
+
+ <view class="info-block">
+
+ <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">{{formData.projectCodes}}</view> -->
+
+ <view class="info-label">鏁伴噺锛�</view>
+ <view class="info-value highlight">{{formData.daa008}}</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.projName }}</td>
+ <td>
+ <view v-if="item.result=='鍚堟牸'" class="watermark approved">{{ getStatusText(item.result) }}
+ </view>
+ <view v-if="item.result=='涓嶅悎鏍�'" class="watermark rejected">{{ getStatusText(item.result) }}
+ </view>
+ <view v-if="item.result=='鏈畬鎴�'" class="watermark pending">{{ getStatusText(item.result) }}
+ </view>
+ <view class="description-text">{{ item.itemMod }}</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" type="text" v-model="remarks" />
+ </view>
+
+ </form>
+ <button class="updateBut" @click="editRemarks">淇敼</button>
+ <button @click="remarksPopup = !remarksPopup">鍙栨秷</button>
+ </view>
+ </view>
+ </view>
</template>
+
<script>
-export default {
- data() {
- return {
- formData: {
- createTime: "",
- id: "",
- billNo: "",
- itemNo: "",
- itemName: "",
- workshopCode: "",
- workshopName: "",
- line: "",
- lineName: "",
- comments: "",
- statusUser: ""
- },
+ export default {
+ data() {
+ return {
+ formData: {
+ id: "",
+ releaseNo: "",
+ createBy: "",
+ createDate: "",
+ lotNo: "",
+ itemNo: "",
+ billNo: "",
+ fcovertQty: "",
+ detailMem: "",
+ taskNo: "",
+ fcheckResu: "",
+ boardModel: "",
+ planQty: "",
+ mocode: "",
+ boardStyle: ""
+ },
+ tableData: [],
+ remarksPopup: false,
+ current: true
+ }
+ },
+ onLoad(options) {
+ //options涓寘鍚簡url闄勫甫鐨勫弬鏁�
+ let params = options;
- DAA020List: [],
+ if (params["id"]) {
+ this.formData.id = params["id"];
+ this.formData.releaseNo = params["releaseNo"];
+ this.formData.lotNo = params["lotNo"];
+ this.msgId = params["msgId"];
- DAA001List: [],
- schemeResult: [],
- DAA001Index: -1,
+ if (params["current"] === 'A') {
+ this.current = true;
+ } else if (params["current"] === 'B') {
+ this.current = false;
+ }
- ItemList: [],
+ if (this.msgId > 0) {
+ this.msgRead();
+ }
- boardItems: [],
+ } 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");
+ });
- womdaaList: [],
+ }
- tableData: [],
+ },
+ methods: {
+ getStatusText(status) {
+ const statusMap = {
+ approved: '鍚堟牸',
+ rejected: '涓嶅悎鏍�',
+ pending: '寰呯‘璁�'
+ }
+ if (status == '鏈畬鎴�') {
+ return statusMap['pending'] || ''
+ } else if (status == '鍚堟牸') {
+ return statusMap['approved'] || ''
+ } else {
+ return statusMap['rejected'] || ''
+ }
- isSubmit: true,
+ },
+ 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);
- isUpdate: true,
+ } 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
+ .billNo + '&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) {
- isShowTable: false,
+ uni.showToast({
+ title: res.message.toString(),
+ icon: 'success',
+ duration: 2000
+ })
+ // 濡傛灉鏈夐〉闈㈣烦杞紝闇�瑕佺敤瀹氭椂鍣ㄥ欢杩�
+ setTimeout(() => {
+ uni.navigateTo({
+ url: 'List'
+ });
+ }, 2000); // 淇濇寔涓� duration 鐩稿悓鐨勬椂闀�
- remarks: "",
- remarksPopup: false,
- };
- },
- onLoad(options) {
- //options涓寘鍚簡url闄勫甫鐨勫弬鏁�
+ } else {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: res.message.toString(),
+ confirmText: "纭畾",
+ showCancel: false,
+ success: (res) => {
- let params = options;
+ }
+ })
+ }
+ })
+ },
+ onShow() {
+ //姣忔杩涘叆椤甸潰閮戒細鎵ц鐨勬柟娉�
+ if (this.formData.id) {
+ this.init();
+ }
+ },
+ init() {
+ let userName = this.$loginInfo.account;
- if (params["id"]) {
- this.isUpdate = false;
- this.formData.id = params["id"];
- this.formData.billNo = params["billNo"];
- this.init();
- } else {
- //鍒濆鍖栨楠屽崟鍙�
- this.$post({
- url: "/SJ/GetMaxBillNo"
- }).then(res => {
- this.formData.billNo = res.data.tbBillList;
- this.formData.createTime = this.$getDate("yyyy-mm-dd");
- });
+ this.$post({
+ url: "/SJ/GetPage",
+ data: {
+ pageIndex: 1,
+ limit: 1,
+ id: this.formData.id
+ }
+ }).then(res => {
+ let data = res.data.tbBillList[0];
+ if (data) {
+ this.formData = data;
- //浜у搧缂栫爜涓嬫媺妗嗙殑鍒濆鍖�
- this.$post({
- url: "/XJ/getLineAll"
- }).then(res => {
- this.lineList = res.data.tbBillList;
- this.DAA020List = res.data.tbBillList.map(item => item.lineName);
- this.formData.itemNo = "";
- this.formData.itemName = "";
- this.formData.workshopCode = "";
- this.formData.workshopName = "";
- this.formData.line = "";
- this.formData.lineName = "";
- this.formData.pbaid = null;
- })
- }
- },
- methods: {
- removeXJ() {
- if (this.formData.id) {
- this.$post({
- url: "/SJ/removeSJ",
- data: {
- id: this.formData.id
- }
- }).then(res => {
- if (res.data.tbBillList > 0) {
- this.$showMessage("鍒犻櫎鎴愬姛");
- //鍏抽棴褰撳墠椤甸潰锛岃繑鍥炰笂涓�椤甸潰鎴栧绾ч〉闈�
- uni.navigateBack();
- } else {
- this.$showMessage("鍒犻櫎澶辫触");
- }
- });
- } else {
- this.$showMessage("璇峰厛閫夋嫨妫�楠屽崟鍙�");
- }
- },
- init() {
- if (this.formData.id) {
- this.$post({
- url: "/SJ/GetPage",
- data: {
- pageIndex: 1,
- limit: 1,
- id: this.formData.id
- }
- }).then(res => {
- let tbBillListElement = res.data.tbBillList[0];
- if (tbBillListElement) {
- this.formData = tbBillListElement;
- this.$post({
- url: "/SJ/getQSItems",
- data: {
- pid: this.formData.id
- }
- }).then(res => {
- this.tableData = res.data.tbBillList;
+ this.$post({
+ url: "/SJ/getQSItems",
+ data: {
+ pid: this.formData.id
+ }
+ }).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;
+ }
+ this.tableData.forEach((item, index) => {
+ this.$set(item, 'current', this.current);
- this.tableData.sort((a, b) => {
- if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') {
- return -1;
- } else if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') {
- return 1;
- } else {
- return 0;
- }
- });
+ });
- if (this.tableData.length <= 0) {
- this.isShowTable = true;
- }
- })
- }
- })
- }
- },
- onDaa020Change(event) {
- //鑾峰彇鐢熶骇绾垮埆鐨勪笅鏍囧湴鍧�
- //this.formData.line = event;
+ })
+ }
+ });
+ },
+ 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
+ });
+ }
+ },
- this.lineNo = this.lineList[this.DAA020List.indexOf(event)].lineNo;
-
- this.formData.line = this.lineNo;
-
- this.$post({
- url: "/XJ/getBoardItem",
- data: {
- lineNo: this.lineNo
- }
- }).then(res => {
- //濉厖宸ュ崟鍙风殑鏁版嵁婧�
- this.boardItems = res.data.tbBillList;
-
- this.ItemList = this.boardItems.map(item => item.itemName);
- })
-
- },
- onItemChange(event) {
-
- this.formData.itemNo = event.itemNo;
-
- this.$post({
- url: "/XJ/getDaa001",
- data: {
- daa020: this.lineNo,
- item: this.formData.itemNo
- }
- }).then(res => {
- //濉厖宸ュ崟鍙风殑鏁版嵁婧�
- this.schemeResult = res.data.tbBillList;
- this.DAA001List = this.schemeResult.map(s => s.daa001);
- //鍙樹负榛樿绌哄�肩殑鐘舵��
- this.DAA001Index = -1;
- this.formData.daa001 = "";
- })
- },
- //閫夊彇宸ュ崟濉厖鐗╂枡鍙峰拰鍏朵粬淇℃伅
- onDaa001Change(event) {
- this.DAA001Index = event.mp.detail.value;
-
- this.formData.daa001 = this.schemeResult[this.DAA001Index].daa001;
-
- //琛ㄥ崟涓殑閮ㄥ垎瀛楁璧嬪��
- this.$post({
- url: "/XJ/getItem",
- data: {
- daa001: this.formData.daa001
- }
- }).then(res => {
- let data = res.data.tbBillList[0];
- //褰撹繑鍥炵殑缁撴灉闆嗕负绌烘椂缃┖鍘熸湁鐨勫��
- if (!data) {
- this.formData.billNo = "";
- this.formData.taskNo = "";
- this.formData.itemNo = "";
- this.tableData = [];
- return;
- }
- //涓嶄负绌烘椂璧嬪��
- this.formData.daa001 = data.daa001;
- this.formData.daa003 = data.daa003;
- this.formData.daa004 = data.daa004;
- this.formData.daa008 = data.daa008;
- this.formData.pbaid = data.id;
-
-
- this.$post({
- url: "/SJ/SetQSItems",
- data: {
- itemNo: this.formData.itemNo
- }
- }).then(res => {
- if (res.data.tbBillList.length > 0) {
- this.tableData = res.data.tbBillList; // 鍦ㄧ澶村嚱鏁颁腑锛宼his 鎸囧悜澶栧眰浣滅敤鍩熺殑 this
- this.isSubmit = false;
- } else {
- this.$showMessage("姝ょ墿鏂欐病鏈夊惎鐢ㄧ殑妫�楠岄」鐩紝璇风淮鎶�!");
- this.isSubmit = true;
- this.tableData = [];
- }
- });
-
- });
- },
- toDetail(item) {
- if (this.isUpdate) {
- uni.showToast({
- icon: "none",
- title: "璇峰厛鐢熸垚妫�楠岄」鐩�",
- duration: 2000,
- });
- } else {
- uni.navigateTo({
- url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData.id
- });
- }
- },
- getTable() {
- this.$post({
- url: "/SJ/SetQSItems",
- data: {
- itemNo: this.formData.itemNo
- }
- }).then(res => {
- if (res.data.tbBillList.length > 0) {
- this.tableData = res.data.tbBillList; // 鍦ㄧ澶村嚱鏁颁腑锛宼his 鎸囧悜澶栧眰浣滅敤鍩熺殑 this
- this.isShowTable = true;
- this.isUpdate = true;
- } else {
- this.$showMessage("姝ょ墿鏂欐病鏈夊惎鐢ㄧ殑妫�楠岄」鐩紝璇风淮鎶�!");
- this.isShowTable = true;
- this.isUpdate = false;
- this.tableData = [];
- }
- });
- },
- saveTable() {
- if (this.tableData.length === 0) {
- return;
- }
-
- this.$post({
- url: "/SJ/SaveItem",
- data: {
- gid: this.formData.id,
- items: this.tableData,
- statusUser: this.$loginInfo.account
- }
- }).then(res => {
- this.tableData = res.data.tbBillList.items;
- this.isShowTable = false;
- this.isUpdate = false;
- })
- },
- save() {
-
- if (this.tableData.length === 0) {
- this.$showMessage(this.formData.itemNo + "鐗╂枡娌℃湁妫�楠岄」鐩�");
- return;
- }
-
- if (!this.formData.daa001) {
- this.$showMessage("璇烽�夋嫨璁″垝缂栧彿");
- return;
- }
-
- this.formData.statusUser = this.$loginInfo.account;
-
- this.$post({
- url: "/SJ/Save",
- data: {
- from: this.formData,
- items: this.tableData
- }
- }).then(res => {
- this.formData = res.data.tbBillList.result;
- this.tableData = res.data.tbBillList.items;
- this.isUpdate = false;
- })
- }, saveRemarks() {
- this.remarksPopup = !this.remarksPopup;
- this.remarks = this.formData.remarks;
- },
- editRemarks() {
- if (this.remarks) {
- //saveRemarksGid
- this.$post({
- url: "/SJ/saveRemarksGid",
- data: {
- gid: this.formData.id,
- remarks: this.remarks
- }
- }).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
- });
- }
- },
- onShow() {
- //姣忔杩涘叆椤甸潰閮戒細鎵ц鐨勬柟娉�
- this.init();
- }
-};
+ editRemarks() {
+ if (this.remarks) {
+ //saveRemarksGid
+ this.$post({
+ url: "/SJ/saveRemarksGid",
+ data: {
+ gid: this.formData.id,
+ remarks: this.remarks
+ }
+ }).then(res => {
+ if (res.data.tbBillList > 0) {
+ this.formData.remarks = this.remarks;
+ this.remarksPopup = !this.remarksPopup;
+ this.$showMessage("淇濆瓨鎴愬姛");
+ }
+ })
+ } else {
+ this.$post({
+ url: "/SJ/saveRemarksGid",
+ data: {
+ gid: this.formData.id,
+ remarks: ''
+ }
+ }).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;
+ }
+ .inspection-number {
+ font-size: 16px;
+ font-weight: bold;
+ color: #3498db;
+ }
-.picker {
- flex: 1;
- margin-bottom: 0;
- padding: 5px;
- font-size: 12px;
-}
+ /* 鍩烘湰淇℃伅鍖烘牱寮� */
+ .basic-info,
+ .material-info {
+ margin-bottom: 20px;
+ }
-.uni-form-item {
- display: flex;
- border-bottom: 1px solid #c9c9c9;
-}
+ .info-row {
+ display: flex;
+ margin-bottom: 10px;
+ flex-wrap: wrap;
+ }
-.edit {
- background-color: white;
-}
+ .info-label {
+ font-weight: bold;
+ color: #34495e;
+ min-width: 80px;
+ margin-right: 5px;
+ }
-/* 榛樿鏍峰紡 */
-.list-container {
- height: 60vh;
- /* 璁剧疆鍒楄〃瀹瑰櫒鐨勯珮搴︿负鍓╀綑绌洪棿锛屽苟鍑忓幓琛ㄥ崟瀹瑰櫒鐨勯珮搴� */
- overflow-y: auto;
- /* 鍏佽鍒楄〃瀹瑰櫒鍨傜洿婊氬姩 */
- padding: 10px;
- /* 鍙�夛細娣诲姞涓�浜涘唴杈硅窛锛屼娇鍒楄〃鍐呭鏇寸編瑙� */
-}
+ .info-value {
+ color: #2c3e50;
+ margin-right: 20px;
+ }
-/* 鍦ㄥ皬灞忓箷璁惧涓婏紝閲嶇疆楂樺害涓洪�傚簲灞忓箷 */
-@media (max-width: 768px) {
- .list-container {
- height: calc(100vh - 376px);
- /* 閫傚綋璋冩暣楂樺害 */
- }
-}
+ .highlight {
+ font-weight: bold;
+ color: #e74c3c;
+ }
+ /* 鐗╂枡淇℃伅鍖烘牱寮� */
+ .material-info {
+ border: 1px solid #eee;
+ padding: 15px;
+ border-radius: 5px;
+ }
-.form-container {
- padding: 10px;
- /* 鍙�夛細娣诲姞涓�浜涘唴杈硅窛锛屼娇琛ㄥ崟鍐呭鏇寸編瑙� */
-}
+ .info-block {
+ display: flex;
+ align-items: center;
+ margin-bottom: 10px;
+ flex-wrap: wrap;
+ }
-.th {
- background-color: lightskyblue;
- color: #FFFFFF;
-}
+ .doc-links {
+ margin-left: auto;
+ }
+ .doc-link {
+ color: #3498db;
+ text-decoration: none;
+ margin-left: 15px;
+ padding: 3px 8px;
+ border: 1px solid #3498db;
+ border-radius: 3px;
+ font-size: 12px;
+ }
-.plus-button {
- line-height: 59px;
- font-size: 24px;
- cursor: pointer;
- z-index: 1000;
- margin-bottom: 10px;
-}
+ .sysLike {
+ color: #3498db;
+ text-decoration: none;
+ margin-left: 15px;
+ padding: 3px 8px;
+ border-radius: 3px;
+ font-size: 12px;
+ }
-.overlay {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- justify-content: center;
- align-items: center;
-}
+ .doc-link:hover {
+ background-color: #f0f8ff;
+ }
-.popup {
- background-color: #fff;
- padding: 20px;
- border: 1px solid #ccc;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
- width: 68vw;
- /* 璁剧疆瀹藉害涓鸿鍙e搴︾殑80% */
- height: 25vh;
- /* 璁剧疆楂樺害涓鸿鍙i珮搴︾殑80% */
-}
+ /* 琛ㄦ牸鏍峰紡 */
+ .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;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ z-index: 10;
+ }
+
+ .popup {
+ background-color: #fff;
+ padding: 20px;
+ border: 1px solid #ccc;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+ width: 68vw;
+ /* 璁剧疆瀹藉害涓鸿鍙e搴︾殑80% */
+ 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: 500px) {
+
+ .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