From a177ad6532fcdc1e9d2b3910276bd88d04791469 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期二, 02 十二月 2025 20:19:13 +0800
Subject: [PATCH] 1.XJ新增照片查看,不良描述
---
pages/QC/SJ/Add.vue | 482 +++++++++++------------------------------------------
1 files changed, 103 insertions(+), 379 deletions(-)
diff --git a/pages/QC/SJ/Add.vue b/pages/QC/SJ/Add.vue
index 060cb3c..c237ce7 100644
--- a/pages/QC/SJ/Add.vue
+++ b/pages/QC/SJ/Add.vue
@@ -11,7 +11,7 @@
<view class="info-row">
<span class="info-label">鍒涘缓鏃堕棿锛�</span>
<span class="info-value">{{ formData.createTime }}</span>
- <span class="info-label">璐熻矗浜猴細</span>
+ <span class="info-label">妫�楠屼汉锛�</span>
<span class="info-value">{{ formData.statusUser }}</span>
</view>
</view>
@@ -33,14 +33,6 @@
@select="onItemChange"></superwei-combox>
</view>
<view class="info-block">
- <view class="info-label">璁″垝缂栧彿锛�</view>
- <view v-if="!isUpdate" class="info-value">{{ formData.daa001 }}</view>
- <picker v-else :range="DAA001List" class="picker info-value-input" name="selector"
- @change="onDaa001Change">
- <view>{{ DAA001List[DAA001Index] }}</view>
- </picker>
- </view>
- <view class="info-block">
<view class="info-label">浜у搧鍚嶇О锛�</view>
<view class="info-value">{{ formData.daa003 }}</view>
</view>
@@ -49,43 +41,32 @@
<view class="info-value">{{ formData.daa004 }}</view>
</view>
<view class="info-block">
+ <view class="info-label">宸ュ崟缂栧彿锛�</view>
+ <view v-if="!isUpdate" class="info-value">{{ formData.daa001 }}</view>
+ <picker v-else :range="DAA001List" class="picker info-value-input" name="selector"
+ @change="onDaa001Change">
+ <view>{{ DAA001List[DAA001Index] }}</view>
+ </picker>
+ <view class="info-label">椤圭洰锛�</view>
+ <view class="info-value">{{ formData.projecT_CODE }}</view>
<view class="info-label">宸ュ崟鏁伴噺锛�</view>
<view class="info-value highlight">{{ formData.daa008 }}</view>
</view>
- <view v-if="formData.remarks" class="info-block">
+ <view v-if="formData.remarks && current" class="info-block">
<view class="info-label">澶囨敞锛�</view>
<view class="info-value">{{ formData.remarks }}</view>
</view>
</view>
<!-- 鎿嶄綔鎸夐挳鍖� -->
- <view v-if="isUpdate" class="action-buttons">
- <button class="secondary-btn" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
+ <view class="action-buttons">
+ <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toSNScanCode(formData.releaseNo)">SN纭</button>
+ <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toYzxSubmitFrom(formData.releaseNo)">涓�鑷存�ф牳瀵�</button>
+ <button class="secondary-btn" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
</view>
<!-- 妫�楠岄」鐩〃鏍� -->
<view v-if="tableData.length > 0" class="inspection-table">
- <!-- 琛ㄦ牸澶撮儴缁熻淇℃伅 -->
- <view class="table-header-stats">
- <view class="stats-left">
- <view class="stats-title">妫�楠岄」鐩竻鍗�</view>
- <view class="stats-subtitle">鍏� {{ tableData.length }} 涓楠岄」鐩�</view>
- </view>
- <view class="stats-right">
- <view class="stat-item passed">
- <span class="stat-count">{{ getPassedCount() }}</span>
- <span class="stat-label">宸插悎鏍�</span>
- </view>
- <view class="stat-item failed">
- <span class="stat-count">{{ getFailedCount() }}</span>
- <span class="stat-label">涓嶅悎鏍�</span>
- </view>
- <view class="stat-item pending">
- <span class="stat-count">{{ getPendingCount() }}</span>
- <span class="stat-label">寰呮楠�</span>
- </view>
- </view>
- </view>
<table>
<thead>
<tr>
@@ -96,16 +77,7 @@
</thead>
<tbody>
<tr v-for="(item, index) in tableData" :key="index">
- <td>
- <view class="project-name-wrapper">
- <span :class="{
- 'status-approved': item.result=='鍚堟牸',
- 'status-rejected': item.result=='涓嶅悎鏍�',
- 'status-pending': item.result=='鏈畬鎴�'
- }" class="status-indicator"></span>
- {{ item.projName }}
- </view>
- </td>
+ <td>{{ item.projName }}</td>
<td>
<view v-if="item.result=='鍚堟牸'" class="watermark approved">鍚堟牸</view>
<view v-if="item.result=='涓嶅悎鏍�'" class="watermark rejected">涓嶅悎鏍�</view>
@@ -115,10 +87,10 @@
<td>
<button v-if="item.isCheck < item.levelNum" class="record-btn record-btn-fill"
@click="toDetail(item, index)">
- 濉啓 ({{ item.isCheck }}/{{ item.levelNum }})
+ 濉啓 <!--({{ item.isCheck }}/{{ item.levelNum }})-->
</button>
<button v-else class="record-btn record-btn-view" @click="toDetail(item, index)">
- 鏌ョ湅 ({{ item.isCheck }}/{{ item.levelNum }})
+ 鏌ョ湅<!--({{ item.isCheck }}/{{ item.levelNum }})-->
</button>
</td>
</tr>
@@ -129,15 +101,15 @@
<!-- 鎿嶄綔鎸夐挳鍖� -->
<view class="action-buttons">
<button v-if="isUpdate && !isShowTable" class="secondary-btn" @click="save">鍒涘缓妫�楠屽崟骞剁敓鎴愰儴鍒嗛粯璁ゅ��</button>
- <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toImage">涓婁紶/鏌ョ湅鍥剧墖</button>
- <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="toYzxSubmitFrom(formData.releaseNo)">涓�鑷存�ф牳瀵�</button>
- <button v-if="!isUpdate && !formData.statusUser && !isShowTable" class="secondary-btn" @click="removeXJ">
+ <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="uploadImages">鏌ョ湅鎵�鏈夊浘鐗�</button>
+ <button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="addDefectDescription">鏌ョ湅涓嶈壇鎻忚堪</button>
+ <!-- <button v-if="!isUpdate && !formData.statusUser && !isShowTable" class="secondary-btn" @click="removeXJ">
鍒犻櫎鍗曟嵁
- </button>
+ </button> -->
<button v-if="!isUpdate && !isShowTable" class="secondary-btn" @click="saveRemarks">娣诲姞澶囨敞</button>
- <button v-if="!isUpdate && !isShowTable && formData.fSubmit != 1" class="primary-btn" @click="submit">瀹℃牳鍗曟嵁</button>
- <button v-if="isShowTable" class="secondary-btn" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
- <button v-if="isShowTable && isUpdate" class="primary-btn" @click="saveTable">鐢熸垚妫�楠岄」鐩�</button>
+ <button v-if="!isUpdate && !isShowTable && formData.fSubmit != 1" class="primary-btn" @click="submit">妫�楠屾彁浜�</button>
+ <!-- <button class="secondary-btn" @click="getTable">鑾峰彇妫�楠岄」鐩�</button> -->
+<!-- <button v-if="isShowTable && isUpdate" class="primary-btn" @click="saveTable">鐢熸垚妫�楠岄」鐩�</button> -->
</view>
<!-- 寮圭獥 -->
@@ -201,6 +173,7 @@
comments: "",
commentsPopup: false,
+ current: true,
};
},
@@ -460,9 +433,28 @@
}
}).then(res => {
if (res.data.tbBillList.length > 0) {
+
this.tableData = res.data.tbBillList; // 鍦ㄧ澶村嚱鏁颁腑锛宼his 鎸囧悜澶栧眰浣滅敤鍩熺殑 this
this.isShowTable = true;
this.isUpdate = true;
+ //鐢熸垚妫�楠岄」鐩�
+ if (this.tableData.length === 0) {
+ return;
+ }
+
+ this.$post({
+ url: "/SJ/SaveItem",
+ data: {
+ gid: this.formData.id,
+ items: this.tableData,
+ statusUser: this.$loginInfo.account,
+ ItemNo:this.formData.itemNo
+ }
+ }).then(res => {
+ this.tableData = res.data.tbBillList.items;
+ this.isShowTable = false;
+ this.isUpdate = false;
+ })
} else {
this.$showMessage("姝ょ墿鏂欐病鏈夊惎鐢ㄧ殑妫�楠岄」鐩紝璇风淮鎶�!");
this.isShowTable = true;
@@ -491,7 +483,12 @@
},
toYzxSubmitFrom(releaseNo){
uni.navigateTo({
- url: 'yzxFrom?id=' +this.formData.id+'¤t='+this.current
+ url: 'yzxFrom?id=' +this.formData.id+'¤t='+(this.current ? 'true' : 'false')
+ });
+ },
+ toSNScanCode(releaseNo){
+ uni.navigateTo({
+ url: 'ScanCode?id=' +this.formData.id+'¤t='+(this.current ? 'true' : 'false')
});
},
save() {
@@ -564,9 +561,18 @@
})
}
},
- toImage() {
+ uploadImages() {
+ // 鏌ョ湅鎵�鏈夊浘鐗囩殑閫昏緫
+ console.log('鐐瑰嚮浜嗘煡鐪嬫墍鏈夊浘鐗囨寜閽紝billNo:', this.formData.billNo);
uni.navigateTo({
- url: 'ImageItem?id=' + this.formData.id
+ url: 'ImageItemALL?id=' + this.formData.id
+ });
+ },
+ addDefectDescription() {
+ // 鏌ョ湅鎵�鏈変笉鑹弿杩扮殑閫昏緫
+ console.log('鐐瑰嚮浜嗘煡鐪嬩笉鑹弿杩版寜閽紝billNo:', this.formData.billNo);
+ uni.navigateTo({
+ url: 'Blms?id=' + this.formData.id
});
}
},
@@ -674,87 +680,6 @@
/* 琛ㄦ牸鏍峰紡 */
.inspection-table {
margin: 25px 0;
- border-radius: 8px;
- overflow: hidden;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- background: #fff;
-}
-
-/* 琛ㄦ牸澶撮儴缁熻淇℃伅 */
-.table-header-stats {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16px 20px;
- background: linear-gradient(135deg, #f8f9fa, #e9ecef);
- border-bottom: 1px solid #e0e0e0;
-}
-
-.stats-left .stats-title {
- font-size: 18px;
- font-weight: bold;
- color: #2c3e50;
- margin-bottom: 4px;
-}
-
-.stats-left .stats-subtitle {
- font-size: 14px;
- color: #7f8c8d;
-}
-
-.stats-right {
- display: flex;
- gap: 16px;
-}
-
-.stat-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 8px 12px;
- border-radius: 6px;
- min-width: 60px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
-}
-
-.stat-item.passed {
- background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(39, 174, 96, 0.2));
- border: 1px solid rgba(39, 174, 96, 0.3);
-}
-
-.stat-item.failed {
- background: linear-gradient(135deg, rgba(230, 126, 34, 0.1), rgba(230, 126, 34, 0.2));
- border: 1px solid rgba(230, 126, 34, 0.3);
-}
-
-.stat-item.pending {
- background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(243, 156, 18, 0.2));
- border: 1px solid rgba(243, 156, 18, 0.3);
-}
-
-.stat-count {
- font-size: 20px;
- font-weight: bold;
- line-height: 1;
- margin-bottom: 2px;
-}
-
-.stat-item.passed .stat-count {
- color: #27ae60;
-}
-
-.stat-item.failed .stat-count {
- color: #e67e22;
-}
-
-.stat-item.pending .stat-count {
- color: #f39c12;
-}
-
-.stat-label {
- font-size: 12px;
- color: #7f8c8d;
- font-weight: 500;
}
.inspection-table table {
@@ -763,82 +688,30 @@
}
.inspection-table th, .inspection-table td {
- padding: 16px 20px;
- border: none;
+ padding: 12px 15px;
+ border: 1px solid #ddd;
text-align: left;
- border-bottom: 1px solid #eee;
}
.inspection-table th {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- font-weight: 600;
- color: #fff;
- font-size: 14px;
- letter-spacing: 0.5px;
- position: relative;
+ background-color: #f8f9fa;
+ font-weight: bold;
+ color: #34495e;
}
-.inspection-table tbody tr {
- transition: all 0.3s ease;
- border-left: 4px solid transparent;
+.inspection-table tr:nth-child(even) {
+ background-color: #f9f9f9;
}
-.inspection-table tbody tr:nth-child(even) {
- background-color: #f8fafc;
-}
-
-.inspection-table tbody tr:hover {
- background-color: #e8f4fd;
- border-left-color: #3498db;
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
-}
-
-/* 妫�楠岄」鐩垪鏍峰紡 */
-.inspection-table td:first-child {
- font-weight: 600;
- color: #2c3e50;
- font-size: 15px;
-}
-
-/* 椤圭洰鍚嶇О鍖呰鍣� */
-.project-name-wrapper {
- display: flex;
- align-items: center;
- gap: 8px;
-}
-
-/* 鐘舵�佹寚绀哄櫒 */
-.status-indicator {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- display: inline-block;
- flex-shrink: 0;
- box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
-}
-
-.status-indicator.status-approved {
- background-color: #27ae60;
- box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.3);
-}
-
-.status-indicator.status-rejected {
- background-color: #e67e22;
- box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.3);
-}
-
-.status-indicator.status-pending {
- background-color: #f39c12;
- box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.3);
+.inspection-table tr:hover {
+ background-color: #f1f5f9;
}
/* 妫�楠屾弿杩板垪鐗规畩鏍峰紡 */
.inspection-table td:nth-child(2) {
position: relative;
- min-height: 80px;
- vertical-align: top;
- padding: 16px 20px;
+ overflow: hidden;
+ padding: 0;
}
/* 鎸夐挳鏍峰紡 */
@@ -878,96 +751,71 @@
}
.record-btn {
- padding: 8px 16px;
- background: linear-gradient(135deg, #3498db, #2980b9);
- color: #fff;
- border: none;
- border-radius: 6px;
+ padding: 6px 12px;
+ background-color: #f8f9fa;
+ border: 1px solid #ddd;
cursor: pointer;
- transition: all 0.3s ease;
- font-weight: 500;
- font-size: 13px;
- box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
+ transition: all 0.2s;
}
.record-btn:hover {
- background: linear-gradient(135deg, #2980b9, #1f618d);
- transform: translateY(-1px);
- box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
-}
-
-.record-btn:active {
- transform: translateY(0);
+ background-color: #e9ecef;
}
/* 濉啓鐘舵�佹寜閽� */
.record-btn-fill {
- background: linear-gradient(135deg, #2ecc71, #27ae60);
- box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
+ background-color: #f8f9fa;
+ border: 1px solid #ddd;
}
.record-btn-fill:hover {
- background: linear-gradient(135deg, #27ae60, #229954);
- box-shadow: 0 4px 8px rgba(46, 204, 113, 0.4);
+ background-color: #e9ecef;
}
/* 鏌ョ湅鐘舵�佹寜閽� */
.record-btn-view {
- background: linear-gradient(135deg, #95a5a6, #7f8c8d);
- box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
+ background-color: #f8f9fa;
+ border: 1px solid #ddd;
}
.record-btn-view:hover {
- background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
- box-shadow: 0 4px 8px rgba(149, 165, 166, 0.4);
+ background-color: #e9ecef;
}
/* 姘村嵃鏍峰紡 */
.watermark {
position: absolute;
- font-size: 32px;
+ font-size: 40px;
font-weight: bold;
- opacity: 0.4;
- z-index: 3;
+ opacity: 1;
+ z-index: 1;
pointer-events: none;
- bottom: 8px;
- right: 8px;
transform: rotate(-15deg);
- transform-origin: bottom right;
- text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
- min-width: 60px;
+ width: 100%;
text-align: center;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%) rotate(-15deg);
}
.watermark.approved {
- color: #27ae60; /* 鏇存贰鐨勭豢鑹� */
+ color: #2ecc71; /* 缁胯壊 */
}
.watermark.rejected {
- color: #e67e22; /* 鏇存贰鐨勭孩鑹� */
+ color: #e74c3c; /* 绾㈣壊 */
}
.watermark.pending {
color: #f39c12; /* 姗欒壊 */
}
-/* 鎻忚堪鏂囨湰鏍峰紡 */
+/* 鎻忚堪鏂囨湰瀹瑰櫒 */
.description-text {
position: relative;
z-index: 2;
- padding: 12px 16px;
- background: transparent;
- line-height: 1.6;
- font-size: 14px;
- color: #555;
- margin: 0;
- word-wrap: break-word;
- word-break: break-word;
- max-width: 100%;
- /* 纭繚鏂囧瓧涓嶄細澶暱閬尅姘村嵃 */
- padding-right: 80px;
- min-height: 20px;
- display: block;
+ padding: 25px;
+ background-color: rgba(255, 255, 255, 0.7);
}
.sysLike {
@@ -1077,142 +925,18 @@
align-items: flex-start;
}
+ .doc-links {
+ margin-left: 0;
+ margin-top: 10px;
+ }
+
.action-buttons {
flex-direction: column;
}
- /* 绉诲姩绔〃鏍煎ご閮ㄧ粺璁� */
- .table-header-stats {
- flex-direction: column;
- gap: 12px;
- align-items: flex-start;
- padding: 12px 16px;
- }
-
- .stats-right {
- width: 100%;
- justify-content: space-around;
- gap: 8px;
- }
-
- .stat-item {
- flex: 1;
- min-width: auto;
- padding: 6px 8px;
- }
-
- .stat-count {
- font-size: 16px;
- }
-
- .stat-label {
- font-size: 11px;
- }
-
- .stats-left .stats-title {
- font-size: 16px;
- }
-
- .stats-left .stats-subtitle {
- font-size: 13px;
- }
-
- .inspection-table {
- margin: 15px -10px;
- border-radius: 0;
- }
-
- .inspection-table th,
- .inspection-table td {
- padding: 12px 8px;
- font-size: 13px;
- }
-
- .inspection-table th {
- font-size: 12px;
- }
-
- .description-text {
- padding: 8px 12px;
- padding-right: 50px;
- font-size: 13px;
- }
-
- .record-btn {
- padding: 6px 12px;
- font-size: 12px;
- }
-
- /* 绉诲姩绔按鍗版牱寮忚皟鏁� */
- .watermark {
- font-size: 24px;
- bottom: 4px;
- right: 4px;
- }
-
- /* 绉诲姩绔〃鏍糷over鏁堟灉鍑忓急 */
- .inspection-table tbody tr:hover {
- transform: none;
- box-shadow: none;
- }
-
- /* 绉诲姩绔姸鎬佹寚绀哄櫒璋冩暣 */
- .project-name-wrapper {
- gap: 6px;
- }
-
- .status-indicator {
- width: 6px;
- height: 6px;
- }
-
- /* 绉诲姩绔脊鍑烘浼樺寲 */
- .popup {
- width: 95vw;
- min-height: 40vh;
- max-height: 70vh;
- padding: 15px;
- }
-
- .popup .form-textarea {
- min-height: 100px;
- }
-}
-
-/* 骞虫澘璁惧鏍峰紡 */
-@media (min-width: 501px) and (max-width: 768px) {
- .watermark {
- font-size: 28px;
- bottom: 6px;
- right: 6px;
- }
-
- .inspection-table th,
- .inspection-table td {
- padding: 14px 16px;
- }
-
- .description-text {
- font-size: 14px;
- padding-right: 70px;
- }
-
- .record-btn {
- padding: 7px 14px;
- font-size: 13px;
- }
-}
-
-/* 澶у睆璁惧浼樺寲 */
-@media (min-width: 1200px) {
- .inspection-table {
- margin: 30px 0;
- }
-
- .watermark {
- font-size: 36px;
- bottom: 10px;
- right: 10px;
+ .inspection-table table {
+ display: block;
+ overflow-x: auto;
}
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3