From f0ee0dda301ef09ddbf36c1699309e4dc0963e63 Mon Sep 17 00:00:00 2001 From: kyy <3283105747@qq.com> Date: 星期五, 29 八月 2025 17:55:32 +0800 Subject: [PATCH] 1、新增重新获取按钮 --- pages/QC/OQC/Add.vue | 56 pages/QC/XJ/Add.vue | 6 pages/QC/RKJ/Add.vue | 1677 +++++++++++++++++----------------- pages/QC/LLJ/Add.vue | 4 pages/QC/OQC/List.vue | 1014 +++++++++++---------- pages/QC/SJ/Add.vue | 6 6 files changed, 1,391 insertions(+), 1,372 deletions(-) diff --git a/pages/QC/LLJ/Add.vue b/pages/QC/LLJ/Add.vue index c1c52b0..92ad89b 100644 --- a/pages/QC/LLJ/Add.vue +++ b/pages/QC/LLJ/Add.vue @@ -111,12 +111,12 @@ </view> <view class="button-group"> <button :class="['action-btn', { 'btn-accent': isShowTable, 'btn-disabled': !canGetTable }]" v-if="isShowTable" @click="getTable" :disabled="!canGetTable"> - 鑾峰彇妫�楠岄」鐩� + 鑾峰彇妫�楠岄」鐩� </button> </view> <view class="button-group"> <button :class="['action-btn', { 'btn-success': isShowTable && isUpdate, 'btn-disabled': !canSaveTable }]" v-if="isShowTable && isUpdate" @click="saveTable" :disabled="!canSaveTable"> - 鐢熸垚妫�楠岄」鐩� + 鐢熸垚妫�楠岄」鐩� </button> </view> </view> diff --git a/pages/QC/OQC/Add.vue b/pages/QC/OQC/Add.vue index c9263fb..9ce65df 100644 --- a/pages/QC/OQC/Add.vue +++ b/pages/QC/OQC/Add.vue @@ -51,23 +51,20 @@ </view> <view v-if="tableData.length > 0" class="inspection-list"> - <view v-for="(item, index) in tableData" :key="index" - :class="{ 'item-completed': item.fcheckResu === '鍚堟牸', 'item-failed': item.fcheckResu === '涓嶅悎鏍�' }" + <view v-for="(item, index) in tableData" :key="index" :class="{ 'item-completed': item.fcheckResu === '鍚堟牸', 'item-failed': item.fcheckResu === '涓嶅悎鏍�' }" class="inspection-item"> <!-- 宸︿晶鐘舵�佹寚绀哄櫒 --> - <view - :class="{ 'status-pass': item.fcheckResu === '鍚堟牸', 'status-fail': item.fcheckResu === '涓嶅悎鏍�', 'status-pending': item.fcheckResu === '鏈楠�' }" - class="status-indicator"> + <view :class="{ 'status-pass': item.fcheckResu === '鍚堟牸', 'status-fail': item.fcheckResu === '涓嶅悎鏍�', 'status-pending': item.fcheckResu === '鏈楠�' }" + class="status-indicator"> </view> <!-- 涓昏鍐呭鍖哄煙 --> <view class="item-content"> <view class="item-header"> <view class="item-title">{{ item.fcheckItem }}</view> - <view - :class="{ 'badge-pass': item.fcheckResu === '鍚堟牸', 'badge-fail': item.fcheckResu === '涓嶅悎鏍�', 'badge-pending': item.fcheckResu === '鏈楠�' }" - class="status-badge"> + <view :class="{ 'badge-pass': item.fcheckResu === '鍚堟牸', 'badge-fail': item.fcheckResu === '涓嶅悎鏍�', 'badge-pending': item.fcheckResu === '鏈楠�' }" + class="status-badge"> <text class="status-icon">{{ item.fcheckResu === '鍚堟牸' ? '鉁�' : item.fcheckResu === '涓嶅悎鏍�' ? '鉁�' : '鈼�' }} @@ -84,19 +81,16 @@ <view class="progress-info"> <text class="progress-label">妫�楠岃繘搴�:</text> <view class="progress-bar"> - <view - :class="{ 'progress-complete': item.fenterQty >= item.checkQyt, 'progress-incomplete': item.fenterQty < item.checkQyt }" - :style="{ width: (item.fenterQty / item.checkQyt * 100) + '%' }" - class="progress-fill"> + <view :class="{ 'progress-complete': item.fenterQty >= item.checkQyt, 'progress-incomplete': item.fenterQty < item.checkQyt }" + :style="{ width: (item.fenterQty / item.checkQyt * 100) + '%' }" + class="progress-fill"> </view> </view> <text class="progress-text">{{ item.fenterQty }}/{{ item.checkQyt }}</text> </view> - <view - :class="{ 'btn-complete': item.fenterQty >= item.checkQyt, 'btn-incomplete': item.fenterQty < item.checkQyt }" - class="action-button" - @click="toDetail(item)"> + <view :class="{ 'btn-complete': item.fenterQty >= item.checkQyt, 'btn-incomplete': item.fenterQty < item.checkQyt }" class="action-button" + @click="toDetail(item)"> <text class="btn-text">{{ item.fenterQty >= item.checkQyt ? '鏌ョ湅璇︽儏' : '寮�濮嬫楠�' }}</text> <text class="btn-icon">鈫�</text> </view> @@ -116,7 +110,6 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <view class="action-buttons"> <button class="btn btn-primary" @click="submitInspection">鎻愪氦</button> - <button v-if="formData.fsubmit != 1" class="btn btn-primary" @click="regenerate">鐢熸垚妫�楠岄」鐩�</button> <button class="secondary-btn" @click="uploadImages">涓婁紶/鏌ョ湅鍥剧墖</button> <button class="btn btn-secondary" @click="addDefectDescription">娣诲姞涓嶅悎鏍兼弿杩�</button> </view> @@ -247,35 +240,6 @@ }); }, 2000); // 淇濇寔涓� duration 鐩稿悓鐨勬椂闀� - } else { - uni.showModal({ - title: "鎻愮ず", - content: res.message.toString(), - confirmText: "纭畾", - showCancel: false, - success: (res) => { - - } - }) - } - }) - }, - - regenerate() { - // 妫�楠屾彁浜ょ殑閫昏緫 - this.$post({ - url: "/MesOqcItemsDetect02/Regenerate", - data: { - releaseNo: this.formData.releaseNo, - itemId: this.formData.itemId - } - }).then(res => { - if (res.status == 0) { - uni.showToast({ - title: res.message.toString(), - icon: 'success', - duration: 2000 - }) } else { uni.showModal({ title: "鎻愮ず", diff --git a/pages/QC/OQC/List.vue b/pages/QC/OQC/List.vue index d1f79d9..14ab0dc 100644 --- a/pages/QC/OQC/List.vue +++ b/pages/QC/OQC/List.vue @@ -1,461 +1,487 @@ <template> - <view class="page-container"> - <!-- 鍒锋柊鎻愮ず妗� --> - <view :class="{ 'show': tipShow }" class="success-toast"> - <view class="toast-icon">鉁�</view> - <text class="toast-text">鍒锋柊鎴愬姛</text> - </view> + <view class="page-container"> + <!-- 鍒锋柊鎻愮ず妗� --> + <view class="success-toast" :class="{ 'show': tipShow }"> + <view class="toast-icon">鉁�</view> + <text class="toast-text">鍒锋柊鎴愬姛</text> + </view> - <!-- 澶撮儴鍖哄煙 --> - <view class="header-section"> - <!-- 椤甸潰鏍囬 --> - <view class="page-header"> - <view class="header-content"> - <view class="title-section"> - <text class="page-title">OQC妫�楠屽崟</text> - <text class="page-subtitle">璐ㄩ噺妫�楠岀鐞�</text> - </view> - <view class="stats-badge"> - <text class="stats-number">{{ totalCount }}</text> - <text class="stats-label">鎬昏</text> - </view> - </view> - </view> + <!-- 澶撮儴鍖哄煙 --> + <view class="header-section"> + <!-- 椤甸潰鏍囬 --> + <view class="page-header"> + <view class="header-content"> + <view class="title-section"> + <text class="page-title">OQC妫�楠屽崟</text> + <text class="page-subtitle">璐ㄩ噺妫�楠岀鐞�</text> + </view> + <view class="stats-badge"> + <text class="stats-number">{{ totalCount }}</text> + <text class="stats-label">鎬昏</text> + </view> + </view> + </view> - <!-- 鎼滅储鏍忔牱寮� --> - <view class="search-bar"> - <view class="search-card"> - <picker v-model="selectedOption" :range="searchOptions" mode="selector" @change="onPickerChange"> - <view class="picker"> - {{ searchOptions[selectedOption] }} - </view> - </picker> - <input v-model="searchValue" class="search-input" placeholder="璇疯緭鍏ユ悳绱㈠��" type="text" - @keypress.enter="getInputValue"/> - <button class="search-btn" @click="getInputValue">鎼滅储</button> - </view> - </view> + <!-- 鎼滅储鏍� --> + <!-- <view class="search-section"> --> + <!-- <view class="search-container"> + <view class="search-input-wrapper"> + <uni-icons type="search" size="18" color="#94a3b8"></uni-icons> + <input class="search-input" type="text" v-model="searchValue" + @confirm="getInputValue" placeholder="鎼滅储妫�楠屽崟鍙枫�佺墿鏂欑紪鐮�..." /> + <view v-if="searchValue" class="clear-btn" @tap="clearSearch"> + <uni-icons type="clear" size="16" color="#94a3b8"></uni-icons> + </view> + </view> + <view class="filter-btn" @tap="toggleFilter"> + <uni-icons type="tune" size="18" color="#4f46e5"></uni-icons> + </view> + </view> --> + + <!-- 绛涢�夊櫒 --> + <!-- <view v-if="showFilter" class="filter-panel"> + <picker mode="selector" :range="searchOptions" v-model="selectedOption" @change="onPickerChange"> + <view class="filter-option"> + <text class="filter-label">绛涢�夋潯浠�</text> + <text class="filter-value">{{ searchOptions[selectedOption] }}</text> + <uni-icons type="arrowdown" size="14" color="#64748b"></uni-icons> + </view> + </picker> + </view> --> + <!-- </view> --> - <!-- 閫夐」鍗� --> - <view class="tab-section"> - <view class="custom-tabs"> - <view v-for="(item, index) in items" :key="index" - :class="{ 'active': current === index }" class="tab-item" - @tap="onClickItem({ currentIndex: index })"> - <text class="tab-text">{{ item }}</text> - <view v-if="current === index" class="tab-indicator"></view> - </view> - </view> - </view> - </view> + <!-- 閫夐」鍗� --> + <view class="tab-section"> + <view class="custom-tabs"> + <view v-for="(item, index) in items" :key="index" + class="tab-item" :class="{ 'active': current === index }" + @tap="onClickItem({ currentIndex: index })"> + <text class="tab-text">{{ item }}</text> + <view class="tab-indicator" v-if="current === index"></view> + </view> + </view> + </view> + </view> - <!-- 鍐呭鍖哄煙 --> - <view class="content-container"> - <view v-show="current === 0"> - <!-- 鍔犺浇鐘舵�� --> - <view v-if="isLoading" class="loading-state"> - <view class="loading-spinner"></view> - <text class="loading-text">鍔犺浇涓�...</text> - </view> - - <!-- 绌虹姸鎬� --> - <view v-else-if="data.length === 0" class="empty-state"> - <view class="empty-icon">馃搵</view> - <text class="empty-title">鏆傛棤妫�楠屽崟</text> - <text class="empty-desc">鐐瑰嚮鍙充笅瑙掓寜閽垱寤烘柊鐨勬楠屽崟</text> - </view> - - <!-- 妫�楠屽崟鍒楄〃 --> - <view v-else class="inspection-list"> - <view v-for="item in data" :key="item.id || item.releaseNo" - class="inspection-card" @tap="navigateToDetail(item)"> - - <!-- 鍗$墖澶撮儴 --> - <view class="card-header"> - <view class="header-left"> - <view class="inspection-number"> - <text class="number-label">妫�楠屽崟鍙�</text> - <text class="number-value">{{ item.releaseNo }}</text> - </view> - <view class="material-info"> - <text class="material-code">{{ item.itemNo }}</text> - <text class="material-name">{{ item.itemName || '鏈煡鐗╂枡' }}</text> - </view> - </view> - <view class="header-right"> - <view :class="{ - 'status-submitted': item.fsubmit == 1, - 'status-pending': item.fsubmit != 1 - }" - class="status-badge"> - <view class="status-dot"></view> - <text class="status-text">{{ item.fsubmit == 1 ? '宸叉彁浜�' : '寰呮彁浜�' }}</text> - </view> - </view> - </view> - - <!-- 妫�楠岀粨鏋滃尯鍩� --> - <view class="inspection-result"> - <view class="result-item"> - <view :class="{ + <!-- 鍐呭鍖哄煙 --> + <view class="content-container"> + <view v-show="current === 0"> + <!-- 鍔犺浇鐘舵�� --> + <view v-if="isLoading" class="loading-state"> + <view class="loading-spinner"></view> + <text class="loading-text">鍔犺浇涓�...</text> + </view> + + <!-- 绌虹姸鎬� --> + <view v-else-if="data.length === 0" class="empty-state"> + <view class="empty-icon">馃搵</view> + <text class="empty-title">鏆傛棤妫�楠屽崟</text> + <text class="empty-desc">鐐瑰嚮鍙充笅瑙掓寜閽垱寤烘柊鐨勬楠屽崟</text> + </view> + + <!-- 妫�楠屽崟鍒楄〃 --> + <view v-else class="inspection-list"> + <view v-for="item in data" :key="item.id || item.releaseNo" + class="inspection-card" @tap="navigateToDetail(item)"> + + <!-- 鍗$墖澶撮儴 --> + <view class="card-header"> + <view class="header-left"> + <view class="inspection-number"> + <text class="number-label">妫�楠屽崟鍙�</text> + <text class="number-value">{{ item.releaseNo }}</text> + </view> + <view class="material-info"> + <text class="material-code">{{ item.itemNo }}</text> + <text class="material-name">{{ item.itemName || '鏈煡鐗╂枡' }}</text> + </view> + </view> + <view class="header-right"> + <view class="status-badge" + :class="{ + 'status-submitted': item.fsubmit == 1, + 'status-pending': item.fsubmit != 1 + }"> + <view class="status-dot"></view> + <text class="status-text">{{ item.fsubmit == 1 ? '宸叉彁浜�' : '寰呮彁浜�' }}</text> + </view> + </view> + </view> + + <!-- 妫�楠岀粨鏋滃尯鍩� --> + <view class="inspection-result"> + <view class="result-item"> + <view class="result-icon" + :class="{ 'icon-pass': item.fcheckResu === '鍚堟牸', 'icon-fail': item.fcheckResu === '涓嶅悎鏍�', 'icon-pending': !item.fcheckResu || item.fcheckResu === '鏈楠�' - }" - class="result-icon"> - <text class="result-symbol">{{ - item.fcheckResu === '鍚堟牸' ? '鉁�' : - item.fcheckResu === '涓嶅悎鏍�' ? '鉁�' : '鈼�' - }} - </text> - </view> - <view class="result-content"> - <text class="result-label">妫�楠岀粨鏋�</text> - <text :class="{ + }"> + <text class="result-symbol">{{ + item.fcheckResu === '鍚堟牸' ? '鉁�' : + item.fcheckResu === '涓嶅悎鏍�' ? '鉁�' : '鈼�' + }}</text> + </view> + <view class="result-content"> + <text class="result-label">妫�楠岀粨鏋�</text> + <text class="result-value" + :class="{ 'value-pass': item.fcheckResu === '鍚堟牸', 'value-fail': item.fcheckResu === '涓嶅悎鏍�', 'value-pending': !item.fcheckResu || item.fcheckResu === '鏈楠�' - }" - class="result-value"> - {{ item.fcheckResu || '鏈楠�' }} - </text> - </view> - </view> - - <view class="inspector-info"> - <text class="inspector-label">妫�楠屼汉</text> - <text class="inspector-name">{{ item.modify1By || '寰呭垎閰�' }}</text> - </view> - </view> - - <!-- 璇︾粏淇℃伅 --> - <view class="card-details"> - <view class="detail-grid"> - <view class="detail-item"> - <text class="detail-label">鍒涘缓鏃堕棿</text> - <text class="detail-value">{{ item.createDate }}</text> - </view> - <view class="detail-item"> - <text class="detail-label">鏁伴噺</text> - <text class="detail-value">{{ item.planQty }}</text> - </view> - <view class="detail-item"> - <text class="detail-label">鍒涘缓浜�</text> - <text class="detail-value">{{ item.createUser }}</text> - </view> - <view class="detail-item"> - <text class="detail-label">閫佹浜�</text> - <text class="detail-value">{{ item.fcheckUser || '-' }}</text> - </view> - </view> - </view> - - <!-- 鎿嶄綔鎸囩ず鍣� --> - <view class="action-indicator"> - <uni-icons color="#94a3b8" size="16" type="arrowright"></uni-icons> - </view> - </view> - </view> - </view> - <!-- 绗簩涓�夐」鍗″唴瀹� - 宸叉楠� --> - <view v-show="current === 1"> - <!-- 鍔犺浇鐘舵�� --> - <view v-if="isLoading" class="loading-state"> - <view class="loading-spinner"></view> - <text class="loading-text">鍔犺浇涓�...</text> - </view> - - <!-- 绌虹姸鎬� --> - <view v-else-if="data.length === 0" class="empty-state"> - <view class="empty-icon">鉁�</view> - <text class="empty-title">鏆傛棤宸叉楠屽崟鎹�</text> - <text class="empty-desc">瀹屾垚妫�楠岀殑鍗曟嵁灏嗘樉绀哄湪杩欓噷</text> - </view> - - <!-- 妫�楠屽崟鍒楄〃 --> - <view v-else class="inspection-list"> - <view v-for="item in data" :key="item.id || item.releaseNo" - class="inspection-card completed" @tap="navigateToDetail(item)"> - - <!-- 鍗$墖澶撮儴 --> - <view class="card-header"> - <view class="header-left"> - <view class="inspection-number"> - <text class="number-label">妫�楠屽崟鍙�</text> - <text class="number-value">{{ item.releaseNo }}</text> - </view> - <view class="material-info"> - <text class="material-code">{{ item.itemNo }}</text> - <text class="material-name">{{ item.itemName || '鏈煡鐗╂枡' }}</text> - </view> - </view> - <view class="header-right"> - <view class="status-badge status-completed"> - <view class="status-dot"></view> - <text class="status-text">宸插畬鎴�</text> - </view> - </view> - </view> - - <!-- 妫�楠岀粨鏋滃尯鍩� --> - <view class="inspection-result"> - <view class="result-item"> - <view :class="{ + }"> + {{ item.fcheckResu || '鏈楠�' }} + </text> + </view> + </view> + + <view class="inspector-info"> + <text class="inspector-label">妫�楠屼汉</text> + <text class="inspector-name">{{ item.modify1By || '寰呭垎閰�' }}</text> + </view> + </view> + + <!-- 璇︾粏淇℃伅 --> + <view class="card-details"> + <view class="detail-grid"> + <view class="detail-item"> + <text class="detail-label">鍒涘缓鏃堕棿</text> + <text class="detail-value">{{ item.createDate }}</text> + </view> + <view class="detail-item"> + <text class="detail-label">鏁伴噺</text> + <text class="detail-value">{{ item.planQty }}</text> + </view> + <view class="detail-item"> + <text class="detail-label">鍒涘缓浜�</text> + <text class="detail-value">{{ item.createUser }}</text> + </view> + <view class="detail-item"> + <text class="detail-label">閫佹浜�</text> + <text class="detail-value">{{ item.fcheckUser || '-' }}</text> + </view> + </view> + </view> + + <!-- 鎿嶄綔鎸囩ず鍣� --> + <view class="action-indicator"> + <uni-icons type="arrowright" size="16" color="#94a3b8"></uni-icons> + </view> + </view> + </view> + </view> + <!-- 绗簩涓�夐」鍗″唴瀹� - 宸叉楠� --> + <view v-show="current === 1"> + <!-- 鍔犺浇鐘舵�� --> + <view v-if="isLoading" class="loading-state"> + <view class="loading-spinner"></view> + <text class="loading-text">鍔犺浇涓�...</text> + </view> + + <!-- 绌虹姸鎬� --> + <view v-else-if="data.length === 0" class="empty-state"> + <view class="empty-icon">鉁�</view> + <text class="empty-title">鏆傛棤宸叉楠屽崟鎹�</text> + <text class="empty-desc">瀹屾垚妫�楠岀殑鍗曟嵁灏嗘樉绀哄湪杩欓噷</text> + </view> + + <!-- 妫�楠屽崟鍒楄〃 --> + <view v-else class="inspection-list"> + <view v-for="item in data" :key="item.id || item.releaseNo" + class="inspection-card completed" @tap="navigateToDetail(item)"> + + <!-- 鍗$墖澶撮儴 --> + <view class="card-header"> + <view class="header-left"> + <view class="inspection-number"> + <text class="number-label">妫�楠屽崟鍙�</text> + <text class="number-value">{{ item.releaseNo }}</text> + </view> + <view class="material-info"> + <text class="material-code">{{ item.itemNo }}</text> + <text class="material-name">{{ item.itemName || '鏈煡鐗╂枡' }}</text> + </view> + </view> + <view class="header-right"> + <view class="status-badge status-completed"> + <view class="status-dot"></view> + <text class="status-text">宸插畬鎴�</text> + </view> + </view> + </view> + + <!-- 妫�楠岀粨鏋滃尯鍩� --> + <view class="inspection-result"> + <view class="result-item"> + <view class="result-icon" + :class="{ 'icon-pass': item.fcheckResu === '鍚堟牸', 'icon-fail': item.fcheckResu === '涓嶅悎鏍�' - }" - class="result-icon"> - <text class="result-symbol">{{ - item.fcheckResu === '鍚堟牸' ? '鉁�' : '鉁�' - }} - </text> - </view> - <view class="result-content"> - <text class="result-label">鏈�缁堢粨鏋�</text> - <text :class="{ + }"> + <text class="result-symbol">{{ + item.fcheckResu === '鍚堟牸' ? '鉁�' : '鉁�' + }}</text> + </view> + <view class="result-content"> + <text class="result-label">鏈�缁堢粨鏋�</text> + <text class="result-value" + :class="{ 'value-pass': item.fcheckResu === '鍚堟牸', 'value-fail': item.fcheckResu === '涓嶅悎鏍�' - }" - class="result-value"> - {{ item.fcheckResu }} - </text> - </view> - </view> - - <view class="inspector-info"> - <text class="inspector-label">妫�楠屼汉</text> - <text class="inspector-name">{{ item.modify1By }}</text> - </view> - </view> - - <!-- 璇︾粏淇℃伅 --> - <view class="card-details"> - <view class="detail-grid"> - <view class="detail-item"> - <text class="detail-label">妫�楠屾椂闂�</text> - <text class="detail-value">{{ item.modify1Date }}</text> - </view> - <view class="detail-item"> - <text class="detail-label">鏁伴噺</text> - <text class="detail-value">{{ item.planQty }}</text> - </view> - <view class="detail-item"> - <text class="detail-label">鍒涘缓浜�</text> - <text class="detail-value">{{ item.createUser }}</text> - </view> - <view class="detail-item"> - <text class="detail-label">閫佹浜�</text> - <text class="detail-value">{{ item.fcheckUser || '-' }}</text> - </view> - </view> - </view> - - <!-- 鎿嶄綔鎸囩ず鍣� --> - <view class="action-indicator"> - <uni-icons color="#94a3b8" size="16" type="arrowright"></uni-icons> - </view> - </view> - </view> - </view> - </view> - - <!-- 娴姩鎿嶄綔鎸夐挳 --> - <view class="fab-container"> - <view class="fab-button" @tap="handleFabClick"> - <uni-icons color="#ffffff" size="24" type="plus"></uni-icons> - </view> - </view> - </view> + }"> + {{ item.fcheckResu }} + </text> + </view> + </view> + + <view class="inspector-info"> + <text class="inspector-label">妫�楠屼汉</text> + <text class="inspector-name">{{ item.modify1By }}</text> + </view> + </view> + + <!-- 璇︾粏淇℃伅 --> + <view class="card-details"> + <view class="detail-grid"> + <view class="detail-item"> + <text class="detail-label">妫�楠屾椂闂�</text> + <text class="detail-value">{{ item.modify1Date }}</text> + </view> + <view class="detail-item"> + <text class="detail-label">鏁伴噺</text> + <text class="detail-value">{{ item.planQty }}</text> + </view> + <view class="detail-item"> + <text class="detail-label">鍒涘缓浜�</text> + <text class="detail-value">{{ item.createUser }}</text> + </view> + <view class="detail-item"> + <text class="detail-label">閫佹浜�</text> + <text class="detail-value">{{ item.fcheckUser || '-' }}</text> + </view> + </view> + </view> + + <!-- 鎿嶄綔鎸囩ず鍣� --> + <view class="action-indicator"> + <uni-icons type="arrowright" size="16" color="#94a3b8"></uni-icons> + </view> + </view> + </view> + </view> + </view> + + <!-- 娴姩鎿嶄綔鎸夐挳 --> + <view class="fab-container"> + <view class="fab-button" @tap="handleFabClick"> + <uni-icons type="plus" size="24" color="#ffffff"></uni-icons> + </view> + </view> + </view> </template> <script> -export default { - components: {}, - data() { - return { - items: ['鏈楠�', '宸叉楠�'], - current: 0, - data: [], - pageIndex: 1, - limit: 20, - totalPage: 0, - totalCount: 0, - noData: false, - isLoading: false, - tipShow: false, - searchOptions: ['鐗╂枡缂栫爜', '鐗╂枡鍚嶇О', '鍒涘缓浜哄憳', '妫�楠屽崟鍙�'], - selectedOption: 0, - searchValue: '', - copiedText: '', - headerHeight: 0 - }; - }, - onLoad() { - this.init(); - }, - onShow() { - // 椤甸潰鏄剧ず鏃跺埛鏂版暟鎹� - this.pageIndex = 1; - this.loadData(); - }, - methods: { - onPickerChange(e) { - this.selectedOption = e.detail.value; - }, - getInputValue() { - this.pageIndex = 1; // 鎼滅储鏃堕噸缃〉鐮� - this.loadData(); // 璋冪敤缁熶竴鐨勬暟鎹姞杞芥柟娉� - }, - loadData() { - let result = "鏈畬鎴�"; - if (this.current === 1) { - result = "宸插畬鎴�"; - } + export default { + components: {}, + data() { + return { + items: ['鏈楠�', '宸叉楠�'], + current: 0, + data: [], + pageIndex: 1, + limit: 20, + totalPage: 0, + totalCount: 0, + noData: false, + isLoading: false, + tipShow: false, + searchOptions: ['鐗╂枡缂栧彿', '瑙勬牸', '鐗╂枡鍚嶇О', '渚涘簲鍟�', '閫佹浜�', '妫�楠屽崟鍙�'], + selectedOption: 0, + searchValue: '', + copiedText: '', + headerHeight: 0, + showFilter: false, // 鎺у埗绛涢�夐潰鏉挎樉绀� + }; + }, + onLoad() { + this.init(); + }, + onShow() { + // 椤甸潰鏄剧ず鏃跺埛鏂版暟鎹� + this.pageIndex = 1; + this.loadData(); + }, + methods: { + onPickerChange(e) { + this.selectedOption = e.detail.value; + }, + getInputValue() { + this.pageIndex = 1; // 鎼滅储鏃堕噸缃〉鐮� + this.loadData(); // 璋冪敤缁熶竴鐨勬暟鎹姞杞芥柟娉� + }, + loadData() { + let result = "鏈畬鎴�"; + if (this.current === 1) { + result = "宸插畬鎴�"; + } - if (this.isLoading) return; + if (this.isLoading) return; - this.isLoading = true; + this.isLoading = true; - let userName = this.$loginInfo.account; - let url = "/MesOqcItemsDetect02/getPage"; // 榛樿璋冪敤getPage - let requestData = { - pageIndex: this.pageIndex, - limit: this.limit, - createUser: userName, - result: result - }; + let userName = this.$loginInfo.account; + let url = "/MesOqcItemsDetect02/getPage"; // 榛樿璋冪敤getPage + let requestData = { + pageIndex: this.pageIndex, + limit: this.limit, + createUser: userName, + result: result + }; - console.log("璇锋眰鍙傛暟:", requestData); - console.log("褰撳墠閫夐」鍗�:", this.current); - console.log("result鐘舵��:", result); + console.log("璇锋眰鍙傛暟:", requestData); + console.log("褰撳墠閫夐」鍗�:", this.current); + console.log("result鐘舵��:", result); - // 鍒ゆ柇鎼滅储妗嗘槸鍚︽湁鍊� - if (this.searchValue != null && this.searchValue.trim() !== '') { - // 鏍规嵁閫夋嫨鐨勬悳绱㈤�夐」璁剧疆鎼滅储鏉′欢 - switch (this.selectedOption) { - case 0: // 鐗╂枡缂栫爜 - requestData.itemNo = this.searchValue; - break; - case 1: // 鐗╂枡鍚嶇О - requestData.itemName = this.searchValue; - break; - case 2: // 鍒涘缓浜哄憳 - requestData.createUser = this.searchValue; - break; - case 3: // 妫�楠屽崟鍙� - requestData.releaseNo = this.searchValue; - break; - } - requestData.searchIndex = this.selectedOption; - } + // 鍒ゆ柇鎼滅储妗嗘槸鍚︽湁鍊� + if (this.searchValue != null && this.searchValue.trim() !== '') { + // 鏍规嵁閫夋嫨鐨勬悳绱㈤�夐」璁剧疆鎼滅储鏉′欢 + switch (this.selectedOption) { + case 0: + requestData.ItemNo = this.searchValue; + break; + case 1: + requestData.SalesOrder = this.searchValue; + break; + case 2: + requestData.ItemName = this.searchValue; + break; + case 3: + requestData.SuppNameContains = this.searchValue; + break; + case 4: + requestData.SongJ = this.searchValue; + break; + case 5: + requestData.SongNo = this.searchValue; + break; + } + } - this.$post({ - url: url, - data: requestData - }).then(res => { - console.log("API杩斿洖瀹屾暣鏁版嵁:", JSON.stringify(res, null, 2)); - console.log("res缁撴瀯:", res); - console.log("res.data:", res.data); - console.log("res.totalCount:", res.totalCount); + this.$post({ + url: url, + data: requestData + }).then(res => { + console.log("API杩斿洖瀹屾暣鏁版嵁:", JSON.stringify(res, null, 2)); + console.log("res缁撴瀯:", res); + console.log("res.data:", res.data); + console.log("res.totalCount:", res.totalCount); + + // 鏍规嵁鍝嶅簲鏍煎紡.json锛屾纭殑鏁版嵁缁撴瀯鏄細 + // res.data 鏄暟缁勶紝res.totalCount 鏄�绘暟 + let dataList = null; + let totalCount = 0; + + if (res.data && Array.isArray(res.data)) { + // 姝g‘鐨勬暟鎹粨鏋勶細data鏄暟缁� + dataList = res.data; + totalCount = res.totalCount || 0; + } else if (res.tbBillList) { + // 澶囩敤缁撴瀯锛堝吋瀹瑰叾浠栨帴鍙o級 + dataList = res.tbBillList; + totalCount = res.totalCount || 0; + } else { + console.error("鏃犳硶瑙f瀽鐨勬暟鎹粨鏋�:", res); + console.error("鏈熸湜鐨勫瓧娈� data (鏁扮粍) 涓嶅瓨鍦�"); + this.$showMessage("鏁版嵁鏍煎紡閿欒锛岃鑱旂郴鎶�鏈敮鎸�"); + this.isLoading = false; + return; + } + + console.log("瑙f瀽鍚庣殑dataList:", dataList); + console.log("dataList闀垮害:", dataList ? dataList.length : 0); + + if (this.pageIndex === 1) { + this.data = dataList || []; + } else { + if (dataList && dataList.length > 0) { + this.data = [...this.data, ...dataList]; + } + } + + console.log("澶勭悊鍚庣殑data:", this.data); + console.log("data闀垮害:", this.data.length); + + this.totalCount = totalCount; + this.totalPage = Math.ceil(this.totalCount / this.limit); - // 鏍规嵁鍝嶅簲鏍煎紡.json锛屾纭殑鏁版嵁缁撴瀯鏄細 - // res.data 鏄暟缁勶紝res.totalCount 鏄�绘暟 - let dataList = null; - let totalCount = 0; + this.noData = this.pageIndex >= this.totalPage; + this.isLoading = false; + }).catch((error) => { + console.error("API璇锋眰澶辫触:", error); + this.isLoading = false; + this.searchValue = ''; + this.$showMessage("璇锋眰澶辫触锛岃閲嶈瘯"); + }); + }, + init() { + this.loadData(); // 缁熶竴璋冪敤loadData鏂规硶 + }, + handleFabClick() { + uni.navigateTo({ + url: 'ScanCode' + }); + }, + onClickItem(index) { + if (this.current !== index.currentIndex) { + this.current = index.currentIndex; + this.data = []; + this.pageIndex = 1; + this.loadData(); // 閫夐」鍗″垏鎹㈡椂璋冪敤loadData + } + }, + copyText(text) { + uni.setClipboardData({ + data: text, + success: () => { + this.copiedText = text; + this.tipShow = true; + setTimeout(() => { + this.tipShow = false; + }, 1000); + } + }); + }, + // 鏂板鏂规硶 + navigateToDetail(item) { + uni.navigateTo({ + url: 'Add?id=' + item.id + }); + }, + toggleFilter() { + this.showFilter = !this.showFilter; + }, + clearSearch() { + this.searchValue = ''; + this.pageIndex = 1; + this.loadData(); + } + }, + onPullDownRefresh() { + this.pageIndex = 1; + this.loadData(); + this.tipShow = true; + uni.stopPullDownRefresh(); - if (res.data && Array.isArray(res.data)) { - // 姝g‘鐨勬暟鎹粨鏋勶細data鏄暟缁� - dataList = res.data; - totalCount = res.totalCount || 0; - } else if (res.tbBillList) { - // 澶囩敤缁撴瀯锛堝吋瀹瑰叾浠栨帴鍙o級 - dataList = res.tbBillList; - totalCount = res.totalCount || 0; - } else { - console.error("鏃犳硶瑙f瀽鐨勬暟鎹粨鏋�:", res); - console.error("鏈熸湜鐨勫瓧娈� data (鏁扮粍) 涓嶅瓨鍦�"); - this.$showMessage("鏁版嵁鏍煎紡閿欒锛岃鑱旂郴鎶�鏈敮鎸�"); - this.isLoading = false; - return; - } - - console.log("瑙f瀽鍚庣殑dataList:", dataList); - console.log("dataList闀垮害:", dataList ? dataList.length : 0); - - if (this.pageIndex === 1) { - this.data = dataList || []; - } else { - if (dataList && dataList.length > 0) { - this.data = [...this.data, ...dataList]; - } - } - - console.log("澶勭悊鍚庣殑data:", this.data); - console.log("data闀垮害:", this.data.length); - - this.totalCount = totalCount; - this.totalPage = Math.ceil(this.totalCount / this.limit); - - this.noData = this.pageIndex >= this.totalPage; - this.isLoading = false; - }).catch((error) => { - console.error("API璇锋眰澶辫触:", error); - this.isLoading = false; - this.searchValue = ''; - this.$showMessage("璇锋眰澶辫触锛岃閲嶈瘯"); - }); - }, - init() { - this.loadData(); // 缁熶竴璋冪敤loadData鏂规硶 - }, - handleFabClick() { - uni.navigateTo({ - url: 'ScanCode' - }); - }, - onClickItem(index) { - if (this.current !== index.currentIndex) { - this.current = index.currentIndex; - this.data = []; - this.pageIndex = 1; - this.loadData(); // 閫夐」鍗″垏鎹㈡椂璋冪敤loadData - } - }, - copyText(text) { - uni.setClipboardData({ - data: text, - success: () => { - this.copiedText = text; - this.tipShow = true; - setTimeout(() => { - this.tipShow = false; - }, 1000); - } - }); - }, - // 鏂板鏂规硶 - navigateToDetail(item) { - uni.navigateTo({ - url: 'Add?id=' + item.id - }); - }, - }, - onPullDownRefresh() { - this.pageIndex = 1; - this.loadData(); - this.tipShow = true; - uni.stopPullDownRefresh(); - - setTimeout(() => { - this.tipShow = false; - }, 1000); - }, - onReachBottom() { - if (this.noData || this.isLoading) return; - this.pageIndex++; - this.loadData(); // 涓婃媺鍔犺浇鏃惰皟鐢╨oadData - } -}; + setTimeout(() => { + this.tipShow = false; + }, 1000); + }, + onReachBottom() { + if (this.noData || this.isLoading) return; + this.pageIndex++; + this.loadData(); // 涓婃媺鍔犺浇鏃惰皟鐢╨oadData + } + }; </script> <style> @@ -559,71 +585,95 @@ margin-top: 2px; } -/* 鎼滅储鏍忔牱寮� */ -.search-bar { +/* 鎼滅储鍖哄煙 */ +.search-section { margin-bottom: 16px; } -.search-card { +.search-container { display: flex; + gap: 8px; align-items: center; - background-color: white; - border-radius: 12px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); - height: 44px; } -.picker { - width: 120px; - height: 44px; - line-height: 44px; - text-align: center; - font-size: 14px; - color: #666; - border-right: 1px solid #e0e0e0; - white-space: nowrap; +.search-input-wrapper { + flex: 1; + position: relative; + display: flex; + align-items: center; + background: #f8f8f8; + border: 1px solid #ddd; + border-radius: 8px; + padding: 0 12px; +} + +.search-input-wrapper:focus-within { + border-color: #007AFF; + background: white; } .search-input { flex: 1; - height: 44px; - line-height: 44px; + height: 40px; + border: none; + background: transparent; font-size: 14px; color: #333; - padding: 0 12px; - border: none; + margin-left: 8px; outline: none; - background: transparent; } .search-input::placeholder { color: #999; } -.search-btn { - background: linear-gradient(135deg, #007AFF, #0056D6); - color: white; - text-align: center; - font-size: 14px; - width: 80px; - height: 44px; - line-height: 44px; - border-radius: 0 12px 12px 0; - border: none; +.clear-btn { + padding: 4px; cursor: pointer; - transition: all 0.3s; - box-shadow: 0 2px 6px rgba(0, 122, 255, 0.2); } -.search-btn:hover { - background: linear-gradient(135deg, #0056D6, #004BB8); - transform: translateY(-1px); - box-shadow: 0 3px 8px rgba(0, 122, 255, 0.25); +.filter-btn { + width: 40px; + height: 40px; + background: #f0f0f0; + border: 1px solid #ddd; + border-radius: 8px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; } -.search-btn:active { - transform: translateY(1px); - box-shadow: 0 1px 4px rgba(0, 122, 255, 0.15); +.filter-btn:active { + background: #e0e0e0; +} + +/* 绛涢�夐潰鏉� */ +.filter-panel { + margin-top: 8px; + background: white; + border: 1px solid #ddd; + border-radius: 8px; + padding: 12px; +} + +.filter-option { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 0; + cursor: pointer; +} + +.filter-label { + font-size: 14px; + color: #666; +} + +.filter-value { + font-size: 14px; + color: #333; + font-weight: 500; } /* 閫夐」鍗� */ @@ -689,12 +739,8 @@ } @keyframes spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } } .loading-text { @@ -1012,30 +1058,30 @@ align-items: flex-start; gap: 12px; } - + .stats-badge { align-self: flex-end; } - + .search-container { flex-direction: column; gap: 8px; } - + .filter-btn { align-self: flex-end; } - + .detail-grid { grid-template-columns: 1fr; } - + .inspection-result { flex-direction: column; align-items: flex-start; gap: 12px; } - + .inspector-info { text-align: left; width: 100%; diff --git a/pages/QC/RKJ/Add.vue b/pages/QC/RKJ/Add.vue index 5f99fe0..783027a 100644 --- a/pages/QC/RKJ/Add.vue +++ b/pages/QC/RKJ/Add.vue @@ -1,928 +1,933 @@ <template> - <view class="container"> - <!-- 椤甸潰鏍囬 --> - <view class="page-header"> - <text class="page-title">妫�楠屽崟绠$悊</text> - <!-- <text v-if="isUpdate" class="page-status status-editable">缂栬緫涓�</text> + <view class="container"> + <!-- 椤甸潰鏍囬 --> + <view class="page-header"> + <text class="page-title">妫�楠屽崟绠$悊</text> + <!-- <text v-if="isUpdate" class="page-status status-editable">缂栬緫涓�</text> <text v-else class="page-status status-viewonly">宸叉彁浜�</text> - --> </view> + --> + </view> - <!-- 琛ㄥ崟鍖哄煙 --> - <view class="form-container card"> - <form :modelValue="formData"> - <view class="form-grid"> - <view class="form-group col-2"> - <label class="form-label">妫�楠屽崟鍙�:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.releaseNo" /> - </view> - <view class="form-group col-2"> - <label class="form-label">鍒涘缓浜�:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.createBy" /> - </view> - <view class="form-group col-2"> - <label class="form-label">鍒涘缓鏃堕棿:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.createDate" /> - </view> - <view class="form-group col-2"> - <label class="form-label">鐢熶骇绾垮埆:</label> - <superwei-combox v-if="isUpdate" :candidates="DAA020List" placeholder="璇烽�夋嫨鎴栬緭鍏�" - v-model="formData.lineNo" @select="onDaa020Change" class="picker form-input" - style="border: none;"></superwei-combox> - <input v-else class="form-input" disabled="true" type="text" v-model="formData.lineNo" /> - </view> - <view class="form-group col-2"> - <label class="form-label">閫佹鎵规鍙�:</label> - <superwei-combox v-if="isUpdate" :candidates="DAA001List" placeholder="璇烽�夋嫨鎴栬緭鍏�" - v-model="formData.billNo" @select="onDaa001Change" class="picker form-input" - style="border: none;"></superwei-combox> - <input v-else class="form-input" disabled="true" type="text" v-model="formData.billNo" /> - </view> - <view class="form-group col-2"> - <label class="form-label">鐗╂枡缂栫爜:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.itemNo" /> - </view> - <view class="form-group col-2"> - <label class="form-label">浠诲姟鍗曞彿:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.taskNo" /> - </view> - <view class="form-group col-2"> - <label class="form-label">浜у搧鍨嬪彿:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.itemModel" /> - </view> - <view class="form-group col-2"> - <label class="form-label">浜у搧鍚嶇О:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.itemName" /> - </view> - <view class="form-group col-2"> - <label class="form-label">閫佹鏁伴噺:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.quantity" /> - </view> - <view class="form-group col-4"> - <label class="form-label">涓嶅悎鏍兼弿杩�:</label> - <input class="form-input" disabled="true" type="text" v-model="formData.remarks" /> - </view> - </view> - </form> - </view> + <!-- 琛ㄥ崟鍖哄煙 --> + <view class="form-container card"> + <form :modelValue="formData"> + <view class="form-grid"> + <view class="form-group col-2"> + <label class="form-label">妫�楠屽崟鍙�:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.releaseNo" /> + </view> + <view class="form-group col-2"> + <label class="form-label">鍒涘缓浜�:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.createBy" /> + </view> + <view class="form-group col-2"> + <label class="form-label">鍒涘缓鏃堕棿:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.createDate" /> + </view> + <view class="form-group col-2"> + <label class="form-label">鐢熶骇绾垮埆:</label> + <superwei-combox v-if="isUpdate" :candidates="DAA020List" placeholder="璇烽�夋嫨鎴栬緭鍏�" + v-model="formData.lineNo" @select="onDaa020Change" class="picker form-input" + style="border: none;"></superwei-combox> + <input v-else class="form-input" disabled="true" type="text" v-model="formData.lineNo" /> + </view> + <view class="form-group col-2"> + <label class="form-label">閫佹鎵规鍙�:</label> + <superwei-combox v-if="isUpdate" :candidates="DAA001List" placeholder="璇烽�夋嫨鎴栬緭鍏�" + v-model="formData.billNo" @select="onDaa001Change" class="picker form-input" + style="border: none;"></superwei-combox> + <input v-else class="form-input" disabled="true" type="text" v-model="formData.billNo" /> + </view> + <view class="form-group col-2"> + <label class="form-label">鐗╂枡缂栫爜:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.itemNo" /> + </view> + <view class="form-group col-2"> + <label class="form-label">浠诲姟鍗曞彿:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.taskNo" /> + </view> + <view class="form-group col-2"> + <label class="form-label">浜у搧鍨嬪彿:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.itemModel" /> + </view> + <view class="form-group col-2"> + <label class="form-label">浜у搧鍚嶇О:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.itemName" /> + </view> + <view class="form-group col-2"> + <label class="form-label">閫佹鏁伴噺:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.quantity" /> + </view> + <view class="form-group col-4"> + <label class="form-label">涓嶅悎鏍兼弿杩�:</label> + <input class="form-input" disabled="true" type="text" v-model="formData.remarks" /> + </view> + </view> + </form> + </view> - <!-- 妫�楠岄」鐩〃鏍煎尯鍩� --> - <view class="table-container card"> - <view class="table-header"> - <text class="section-title">妫�楠岄」鐩垪琛�</text> - </view> - <uni-table ref="table" border emptyText="鏆傛棤鏇村鏁版嵁" class="custom-table"> - <uni-tr class="table-header-row"> - <uni-th align="center" class="th">妫�楠岄」鐩�</uni-th> - <uni-th align="center" class="th">鏄惁鍚堟牸</uni-th> - <uni-th align="center" class="th">璁板綍璇︽儏</uni-th> - </uni-tr> - <uni-tr v-for="(item, index) in tableData" :key="index" class="table-row" - :class="{ 'row-success': item.result === '鍚堟牸', 'row-warning': item.result === '涓嶅悎鏍�', 'row-pending': item.result === '鏈畬鎴�' }"> - <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 align="center"> - <view class="record-button-container"> - <button - :class="['record-button', item.isCheck >= item.levelNum ? 'complete' : 'incomplete', {'button-loading': item.isLoading}]" - @click="toDetail(item)" - :disabled="isUpdate"> - <view class="record-status"> - <text class="check-count">{{ item.isCheck }}/{{ item.levelNum }}</text> - <text class="status-text" v-if="item.isCheck >= item.levelNum">宸插畬鎴�</text> - <text class="status-text" v-else>寰呭畬鎴�</text> - </view> - <view class="record-icon"> - <i class="fa fa-arrow-right"></i> - </view> - </button> - </view> - </uni-td> - </uni-tr> - </uni-table> - </view> + <!-- 妫�楠岄」鐩〃鏍煎尯鍩� --> + <view class="table-container card"> + <view class="table-header"> + <text class="section-title">妫�楠岄」鐩垪琛�</text> + </view> + <uni-table ref="table" border emptyText="鏆傛棤鏇村鏁版嵁" class="custom-table"> + <uni-tr class="table-header-row"> + <uni-th align="center" class="th">妫�楠岄」鐩�</uni-th> + <uni-th align="center" class="th">鏄惁鍚堟牸</uni-th> + <uni-th align="center" class="th">璁板綍璇︽儏</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in tableData" :key="index" class="table-row" + :class="{ 'row-success': item.result === '鍚堟牸', 'row-warning': item.result === '涓嶅悎鏍�', 'row-pending': item.result === '鏈畬鎴�' }"> + <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 align="center"> + <view class="record-button-container"> + <button + :class="['record-button', item.isCheck >= item.levelNum ? 'complete' : 'incomplete', {'button-loading': item.isLoading}]" + @click="toDetail(item)" :disabled="isUpdate"> + <view class="record-status"> + <text class="check-count">{{ item.isCheck }}/{{ item.levelNum }}</text> + <text class="status-text" v-if="item.isCheck >= item.levelNum">宸插畬鎴�</text> + <text class="status-text" v-else>寰呭畬鎴�</text> + </view> + <view class="record-icon"> + <i class="fa fa-arrow-right"></i> + </view> + </button> + </view> + </uni-td> + </uni-tr> + </uni-table> + </view> - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <view class="action-buttons-container button-group"> - <view class="plus-button"> - <view :class="['button button-warning', { 'button-loading': isLoading }]" - v-if="!isUpdate && !isShowTable" @click="submit"> - <text>瀹℃牳鍗曟嵁</text> - </view> - </view> - <view class="plus-button"> - <view :class="['button button-warning', { 'button-loading': isLoading }]" - v-if="isUpdate && !isShowTable" @click="getItem"> - <text>鐢熸垚妫�楠屽崟</text> - </view> - </view> - <view class="plus-button"> - <view :class="['button button-warning', { 'button-loading': isLoading }]" - v-if="!isUpdate && !isShowTable" @click="toImage"> - <text>涓婁紶/鏌ョ湅鍥剧墖</text> - </view> - </view> - <view class="plus-button"> - <view :class="['button button-warning', { 'button-loading': isLoading }]" - v-if="!isUpdate && !isShowTable" @click="saveRemarks"> - <text>娣诲姞涓嶅悎鏍兼弿杩�</text> - </view> - </view> - <view class="plus-button"> - <view :class="['button button-warning', { 'button-loading': isLoading }]" - v-if="isShowTable" @click="getTable"> - <text>鑾峰彇妫�楠岄」鐩�</text> - </view> - </view> - <view class="plus-button"> - <view :class="['button button-warning', { 'button-loading': isLoading }]" - v-if="isShowTable && isUpdate" @click="saveTable"> - <text>鐢熸垚妫�楠岄」鐩�</text> - </view> - </view> - </view> + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <view class="action-buttons-container button-group"> + <view class="plus-button"> + <view :class="['button button-warning', { 'button-loading': isLoading }]" + v-if="!isUpdate && !isShowTable" @click="submit"> + <text>瀹℃牳鍗曟嵁</text> + </view> + </view> + <view class="plus-button"> + <view :class="['button button-warning', { 'button-loading': isLoading }]" + v-if="isUpdate && !isShowTable" @click="getItem"> + <text>鐢熸垚妫�楠屽崟</text> + </view> + </view> + <view class="plus-button"> + <view :class="['button button-warning', { 'button-loading': isLoading }]" + v-if="!isUpdate && !isShowTable" @click="toImage"> + <text>涓婁紶/鏌ョ湅鍥剧墖</text> + </view> + </view> + <view class="plus-button"> + <view :class="['button button-warning', { 'button-loading': isLoading }]" + v-if="!isUpdate && !isShowTable" @click="saveRemarks"> + <text>娣诲姞涓嶅悎鏍兼弿杩�</text> + </view> + </view> + <view class="plus-button"> + <!-- <view :class="['button button-warning', { 'button-loading': isLoading }]" + v-if="isShowTable" @click="getTable"> --> + <view :class="['button button-warning', { 'button-loading': isLoading }]" v-if="!formData.fsubmit" + @click="getTable"> + <text>鑾峰彇妫�楠岄」鐩�</text> + </view> + </view> + <view class="plus-button"> + <!-- <view :class="['button button-warning', { 'button-loading': isLoading }]" v-if="isShowTable && isUpdate" + @click="saveTable"> --> + <view :class="['button button-warning', { 'button-loading': isLoading }]" v-if="!formData.fsubmit" + @click="saveTable"> + <text>鐢熸垚妫�楠岄」鐩�</text> + </view> + </view> + </view> - <!-- 寮瑰嚭灞� --> - <view v-if="showPopup" class="overlay"> - <view class="popup card"> - <h3>淇敼涓嶅悎鏍兼弿杩�</h3> - <form> - <view class="form-group"> - <label class="form-label">涓嶅悎鏍兼弿杩�:</label> - <input class="form-input" type="text" v-model="remarks" /> - </view> - <view class="button-group"> - <view class="button button-success" @click="edit"> - <text>淇敼</text> - </view> - <view class="button button-default" @click="showPopup = !showPopup"> - <text>鍙栨秷</text> - </view> - </view> - </form> - </view> - </view> - </view> + <!-- 寮瑰嚭灞� --> + <view v-if="showPopup" class="overlay"> + <view class="popup card"> + <h3>淇敼涓嶅悎鏍兼弿杩�</h3> + <form> + <view class="form-group"> + <label class="form-label">涓嶅悎鏍兼弿杩�:</label> + <input class="form-input" type="text" v-model="remarks" /> + </view> + <view class="button-group"> + <view class="button button-success" @click="edit"> + <text>淇敼</text> + </view> + <view class="button button-default" @click="showPopup = !showPopup"> + <text>鍙栨秷</text> + </view> + </view> + </form> + </view> + </view> + </view> </template> <script> - export default { - data() { - return { - formData: { - id: "", - releaseNo: "", - createBy: "", - createDate: "", - daa020: "", - itemNo: "", - billNo: "", - catQty: "", - detailMem: "", - taskNo: "", - fcheckResu: "", - remarks: "", - itemId:"", - itemName:"", - itemModel:"", - }, + export default { + data() { + return { + formData: { + id: "", + releaseNo: "", + createBy: "", + createDate: "", + daa020: "", + itemNo: "", + billNo: "", + catQty: "", + detailMem: "", + taskNo: "", + fcheckResu: "", + remarks: "", + itemId: "", + itemName: "", + itemModel: "", + }, - DAA020List: [], + DAA020List: [], - DAA001List: [], + DAA001List: [], - BillNoList: [], + BillNoList: [], - lineList: [], + lineList: [], - lineNo: "", + lineNo: "", - tableData: [], + tableData: [], - isSubmit: true, + isSubmit: true, - isUpdate: true, + isUpdate: true, - isShowTable: false, + isShowTable: false, - remarks: "", + remarks: "", - showPopup: false, - - // 鏂板锛氬姞杞界姸鎬佹帶鍒� - isLoading: false, - }; - }, - onLoad(options) { - let params = options; + showPopup: false, - if (params["id"]) { - this.isUpdate = false; - this.formData.id = params["id"]; - this.formData.releaseNo = params["releaseNo"]; - this.init(); - } else { - this.$post({ - url: "/RKJ/getMaxReleaseNo" - }).then(res => { - this.formData.releaseNo = res.data.tbBillList; - this.formData.createBy = this.$loginInfo.account; - this.formData.createDate = this.$getDate("yyyy-mm-dd"); - }); + // 鏂板锛氬姞杞界姸鎬佹帶鍒� + isLoading: false, + }; + }, + onLoad(options) { + let params = options; - this.$post({ - url: "/XJ/getLineAll" - }).then(res => { - this.lineList = res.data.tbBillList; - this.DAA020List = res.data.tbBillList.map(item => item.lineName); - }) - } - }, - methods: { - removeXJ() { - if (this.formData.id) { - this.$post({ - url: "/RKJ/removeXJ", - data: { - id: this.formData.id - } - }).then(res => { - if (res.data.tbBillList > 0) { - this.$showMessage("鍒犻櫎鎴愬姛"); - uni.navigateBack(); - } else { - this.$showMessage("鍒犻櫎澶辫触"); - } - }); - } else { - this.$showMessage("璇峰厛閫夋嫨妫�楠屽崟鍙�"); - } - }, - getItem() { - if (!this.formData.billNo) { - this.$showMessage("璇烽�夋嫨閫佹鎵规鍙�"); - return; - } + if (params["id"]) { + this.isUpdate = false; + this.formData.id = params["id"]; + this.formData.releaseNo = params["releaseNo"]; + this.init(); + } else { + this.$post({ + url: "/RKJ/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.isSubmit) { - this.$showMessage("姝ょ墿鏂欐棤鍚敤鐨勬楠岄」鐩紝璇风淮鎶�!"); - return; - } + this.$post({ + url: "/XJ/getLineAll" + }).then(res => { + this.lineList = res.data.tbBillList; + this.DAA020List = res.data.tbBillList.map(item => item.lineName); + }) + } + }, + methods: { + removeXJ() { + if (this.formData.id) { + this.$post({ + url: "/RKJ/removeXJ", + data: { + id: this.formData.id + } + }).then(res => { + if (res.data.tbBillList > 0) { + this.$showMessage("鍒犻櫎鎴愬姛"); + uni.navigateBack(); + } else { + this.$showMessage("鍒犻櫎澶辫触"); + } + }); + } else { + this.$showMessage("璇峰厛閫夋嫨妫�楠屽崟鍙�"); + } + }, + getItem() { + if (!this.formData.billNo) { + this.$showMessage("璇烽�夋嫨閫佹鎵规鍙�"); + return; + } - // 鏄剧ず鍔犺浇鐘舵�� - this.isLoading = true; - - this.$post({ - url: "/RKJ/save", - data: { - from: this.formData, - userNo: this.$loginInfo.account, - items: this.tableData - } - }).then(res => { - // 闅愯棌鍔犺浇鐘舵�� - this.isLoading = false; - - this.formData.id = res.data.tbBillList; - this.$showMessage("鐢熸垚妫�楠岄」鐩垚鍔�"); - this.init(); - this.isUpdate = false; - }); - }, - onDaa020Change(event) { - this.formData.lineName = event; - this.lineNo = this.lineList[this.DAA020List.indexOf(event)].lineNo; - this.formData.line = this.lineNo; + if (this.isSubmit) { + this.$showMessage("姝ょ墿鏂欐棤鍚敤鐨勬楠岄」鐩紝璇风淮鎶�!"); + return; + } - this.$post({ - url: "/RKJ/getDaa001", - data: { - lineNo: this.lineNo - } - }).then(res => { - this.BillNoList = res.data.tbBillList; - this.DAA001List = res.data.tbBillList.map(s => s.billNo); + // 鏄剧ず鍔犺浇鐘舵�� + this.isLoading = true; - this.formData.billNo = ""; - this.formData.mocode = ""; - this.formData.boardModel = ""; - this.formData.taskNo = ""; - this.formData.itemNo = ""; - this.formData.boardName = ""; - this.formData.quantity = ""; - this.tableData = []; - }) - }, - onDaa001Change(e) { - this.formData.billNo = e; - let data = this.BillNoList[this.DAA001List.indexOf(e)]; + this.$post({ + url: "/RKJ/save", + data: { + from: this.formData, + userNo: this.$loginInfo.account, + items: this.tableData + } + }).then(res => { + // 闅愯棌鍔犺浇鐘舵�� + this.isLoading = false; - if (!data) { - this.formData.billNo = ""; - this.formData.mocode = ""; - this.formData.boardModel = ""; - this.formData.taskNo = ""; - this.formData.itemNo = ""; - this.formData.boardName = ""; - this.formData.quantity = ""; - this.tableData = []; - return; - } - this.formData.billNo = data.billNo; - this.formData.mocode = data.mocode; - this.formData.boardModel = data.boardModel; - this.formData.taskNo = data.taskNo; - this.formData.itemNo = data.itemNo; - this.formData.boardName = data.boardName; - this.formData.quantity = data.quantity; + this.formData.id = res.data.tbBillList; + this.$showMessage("鐢熸垚妫�楠岄」鐩垚鍔�"); + this.init(); + this.isUpdate = false; + }); + }, + onDaa020Change(event) { + this.formData.lineName = event; + this.lineNo = this.lineList[this.DAA020List.indexOf(event)].lineNo; + this.formData.line = this.lineNo; - this.$post({ - url: "/RKJ/setJYItem", - data: { - itemId: this.formData.itemId, - quantity: this.formData.quantity - } - }).then(res => { - this.tableData = res.data.tbBillList; - if (this.tableData.length === 0) { - this.$showMessage("璇ョ墿鏂欐病鏈夋楠岄」鐩�"); - this.isSubmit = true; - this.tableData = []; - } else { - this.isSubmit = false; - } - }); - }, - submit() { - // 鏄剧ず鍔犺浇鐘舵�� - this.isLoading = true; - - this.$post({ - url: "/RKJ/RKJQaSubmit", - data: { - userNo: this.$loginInfo.account, - gid: this.formData.id - } - }).then(res => { - // 闅愯棌鍔犺浇鐘舵�� - this.isLoading = false; - - if (res.statusCode === 200) { - this.$showMessage("鎴愬姛鎻愪氦妫�楠�"); - setTimeout(() => { - this.hideCustomMessage(); - }, 7000); - } else { - this.$showMessage(res.data.message); - } - }) - }, - init() { - this.$post({ - url: "/RKJ/getPage", - data: { - id: this.formData.id, - pageIndex: 1, - limit: 1, - } - }).then(res => { - let data = res.data.tbBillList[0]; - if (data) { - this.formData = data; + this.$post({ + url: "/RKJ/getDaa001", + data: { + lineNo: this.lineNo + } + }).then(res => { + this.BillNoList = res.data.tbBillList; + this.DAA001List = res.data.tbBillList.map(s => s.billNo); - this.$post({ - url: "/RKJ/getItems", - data: { - pid: this.formData.id - } - }).then(res1 => { - let tableData = res1.data.tbBillList; - tableData.sort((a, b) => { - if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') return -1; - if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') return 1; - 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, - }); - return; - } - - // 璁剧疆褰撳墠椤圭洰鐨勫姞杞界姸鎬� - item.isLoading = true; - - uni.navigateTo({ - url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData.id + '&releaseNo=' + this.formData.releaseNo, - complete: () => { - // 椤甸潰璺宠浆瀹屾垚鍚庯紝鍙栨秷鍔犺浇鐘舵�� - item.isLoading = false; - } - }); - }, - toImage() { - // 鏄剧ず鍔犺浇鐘舵�� - this.isLoading = true; - - uni.navigateTo({ - url: 'ImageItem?id=' + this.formData.id, - complete: () => { - // 椤甸潰璺宠浆瀹屾垚鍚庯紝鍙栨秷鍔犺浇鐘舵�� - this.isLoading = false; - } - }); - }, - saveRemarks() { - this.showPopup = !this.showPopup; - this.remarks = this.formData.remarks; - }, - edit() { - if (this.remarks) { - // 鏄剧ず鍔犺浇鐘舵�� - this.isLoading = true; - - this.$post({ - url: "/RKJ/saveRemarksGid", - data: { - gid: this.formData.id, - remarks: this.remarks - } - }).then(res => { - // 闅愯棌鍔犺浇鐘舵�� - this.isLoading = false; - - if (res.data.tbBillList > 0) { - this.formData.remarks = this.remarks; - this.showPopup = !this.showPopup; - this.$showMessage("淇濆瓨鎴愬姛"); - } - }) - } - }, - getTable() { - // 鏄剧ず鍔犺浇鐘舵�� - this.isLoading = true; - - this.$post({ - url: "/RKJ/setJYItem", - data: { - itemId: this.formData.itemId, - quantity: this.formData.quantity - } - }).then(res => { - // 闅愯棌鍔犺浇鐘舵�� - this.isLoading = false; - - this.tableData = res.data.tbBillList; - if (this.tableData.length === 0) { - this.$showMessage("璇ョ墿鏂欐潯鐮佹病鏈夋楠岄」鐩�"); - this.isSubmit = true; - this.tableData = []; - this.isShowTable = true; - this.isUpdate = false; - } else { - this.isSubmit = false; - this.isShowTable = true; - this.isUpdate = true; - } - }); - }, - saveTable() { - if (this.tableData.length === 0) { - return; - } - - // 鏄剧ず鍔犺浇鐘舵�� - this.isLoading = true; - - this.$post({ - url: "/RKJ/saveItem", - data: { - gid: this.formData.id, - items: this.tableData, - userNo: this.$loginInfo.account - } - }).then(res => { - // 闅愯棌鍔犺浇鐘舵�� - this.isLoading = false; - - this.formData.id = res.data.tbBillList; - this.isShowTable = false; - this.isUpdate = false; - this.init(); - }) - } - }, - onShow() { - if (this.formData.id) { - this.init(); - } - }, - }; + this.formData.billNo = ""; + this.formData.mocode = ""; + this.formData.boardModel = ""; + this.formData.taskNo = ""; + this.formData.itemNo = ""; + this.formData.boardName = ""; + this.formData.quantity = ""; + this.tableData = []; + }) + }, + onDaa001Change(e) { + this.formData.billNo = e; + let data = this.BillNoList[this.DAA001List.indexOf(e)]; + + if (!data) { + this.formData.billNo = ""; + this.formData.mocode = ""; + this.formData.boardModel = ""; + this.formData.taskNo = ""; + this.formData.itemNo = ""; + this.formData.boardName = ""; + this.formData.quantity = ""; + this.tableData = []; + return; + } + this.formData.billNo = data.billNo; + this.formData.mocode = data.mocode; + this.formData.boardModel = data.boardModel; + this.formData.taskNo = data.taskNo; + this.formData.itemNo = data.itemNo; + this.formData.boardName = data.boardName; + this.formData.quantity = data.quantity; + + this.$post({ + url: "/RKJ/setJYItem", + data: { + itemId: this.formData.itemId, + quantity: this.formData.quantity + } + }).then(res => { + this.tableData = res.data.tbBillList; + if (this.tableData.length === 0) { + this.$showMessage("璇ョ墿鏂欐病鏈夋楠岄」鐩�"); + this.isSubmit = true; + this.tableData = []; + } else { + this.isSubmit = false; + } + }); + }, + submit() { + // 鏄剧ず鍔犺浇鐘舵�� + this.isLoading = true; + + this.$post({ + url: "/RKJ/RKJQaSubmit", + data: { + userNo: this.$loginInfo.account, + gid: this.formData.id + } + }).then(res => { + // 闅愯棌鍔犺浇鐘舵�� + this.isLoading = false; + + if (res.statusCode === 200) { + this.$showMessage("鎴愬姛鎻愪氦妫�楠�"); + setTimeout(() => { + this.hideCustomMessage(); + }, 7000); + } else { + this.$showMessage(res.data.message); + } + }) + }, + init() { + this.$post({ + url: "/RKJ/getPage", + data: { + id: this.formData.id, + pageIndex: 1, + limit: 1, + } + }).then(res => { + let data = res.data.tbBillList[0]; + if (data) { + this.formData = data; + + this.$post({ + url: "/RKJ/getItems", + data: { + pid: this.formData.id + } + }).then(res1 => { + let tableData = res1.data.tbBillList; + tableData.sort((a, b) => { + if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') return -1; + if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') return 1; + 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, + }); + return; + } + + // 璁剧疆褰撳墠椤圭洰鐨勫姞杞界姸鎬� + item.isLoading = true; + + uni.navigateTo({ + url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData.id + + '&releaseNo=' + this.formData.releaseNo, + complete: () => { + // 椤甸潰璺宠浆瀹屾垚鍚庯紝鍙栨秷鍔犺浇鐘舵�� + item.isLoading = false; + } + }); + }, + toImage() { + // 鏄剧ず鍔犺浇鐘舵�� + this.isLoading = true; + + uni.navigateTo({ + url: 'ImageItem?id=' + this.formData.id, + complete: () => { + // 椤甸潰璺宠浆瀹屾垚鍚庯紝鍙栨秷鍔犺浇鐘舵�� + this.isLoading = false; + } + }); + }, + saveRemarks() { + this.showPopup = !this.showPopup; + this.remarks = this.formData.remarks; + }, + edit() { + if (this.remarks) { + // 鏄剧ず鍔犺浇鐘舵�� + this.isLoading = true; + + this.$post({ + url: "/RKJ/saveRemarksGid", + data: { + gid: this.formData.id, + remarks: this.remarks + } + }).then(res => { + // 闅愯棌鍔犺浇鐘舵�� + this.isLoading = false; + + if (res.data.tbBillList > 0) { + this.formData.remarks = this.remarks; + this.showPopup = !this.showPopup; + this.$showMessage("淇濆瓨鎴愬姛"); + } + }) + } + }, + getTable() { + // 鏄剧ず鍔犺浇鐘舵�� + this.isLoading = true; + + this.$post({ + url: "/RKJ/setJYItem", + data: { + itemId: this.formData.itemId, + quantity: this.formData.quantity + } + }).then(res => { + // 闅愯棌鍔犺浇鐘舵�� + this.isLoading = false; + + this.tableData = res.data.tbBillList; + if (this.tableData.length === 0) { + this.$showMessage("璇ョ墿鏂欐潯鐮佹病鏈夋楠岄」鐩�"); + this.isSubmit = true; + this.tableData = []; + this.isShowTable = true; + this.isUpdate = false; + } else { + this.isSubmit = false; + this.isShowTable = true; + this.isUpdate = true; + } + }); + }, + saveTable() { + if (this.tableData.length === 0) { + return; + } + + // 鏄剧ず鍔犺浇鐘舵�� + this.isLoading = true; + + this.$post({ + url: "/RKJ/saveItem", + data: { + gid: this.formData.id, + items: this.tableData, + userNo: this.$loginInfo.account + } + }).then(res => { + // 闅愯棌鍔犺浇鐘舵�� + this.isLoading = false; + + this.formData.id = res.data.tbBillList; + this.isShowTable = false; + this.isUpdate = false; + this.init(); + }) + } + }, + onShow() { + if (this.formData.id) { + this.init(); + } + }, + }; </script> <style> - .container { - padding: 15px; - background-color: #f9fafb; - } + .container { + padding: 15px; + background-color: #f9fafb; + } - .page-header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 20px; - padding-bottom: 10px; - border-bottom: 2px solid #e5edff; - } + .page-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + padding-bottom: 10px; + border-bottom: 2px solid #e5edff; + } - .page-title { - font-size: 22px; - font-weight: 700; - color: #3498db; - } + .page-title { + font-size: 22px; + font-weight: 700; + color: #3498db; + } - .page-status { - font-size: 13px; - padding: 4px 10px; - border-radius: 18px; - font-weight: 500; - } + .page-status { + font-size: 13px; + padding: 4px 10px; + border-radius: 18px; + font-weight: 500; + } - .status-editable { - background-color: #e6f2ff; - color: #3498db; - } + .status-editable { + background-color: #e6f2ff; + color: #3498db; + } - .status-viewonly { - background-color: #e6ffed; - color: #27ae60; - } + .status-viewonly { + background-color: #e6ffed; + color: #27ae60; + } - .card { - background-color: #fff; - border-radius: 12px; - box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1); - padding: 20px; - margin-bottom: 15px; - transition: transform 0.3s; - } + .card { + background-color: #fff; + border-radius: 12px; + box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1); + padding: 20px; + margin-bottom: 15px; + transition: transform 0.3s; + } - .card:hover { - transform: translateY(-3px); - } + .card:hover { + transform: translateY(-3px); + } - .form-grid { - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: 12px; - } + .form-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 12px; + } - .form-group { - display: flex; - flex-direction: column; - border-bottom: 1px solid #ebf2ff; - padding-bottom: 12px; - } + .form-group { + display: flex; + flex-direction: column; + border-bottom: 1px solid #ebf2ff; + padding-bottom: 12px; + } - .col-2 { - grid-column: span 2; - } + .col-2 { + grid-column: span 2; + } - .col-4 { - grid-column: span 4; - } + .col-4 { + grid-column: span 4; + } - .form-label { - font-size: 13px; - color: #7f8c8d; - margin-bottom: 6px; - font-weight: 500; - } + .form-label { + font-size: 13px; + color: #7f8c8d; + margin-bottom: 6px; + font-weight: 500; + } - .form-input { - padding: 8px 12px; - border: 1px solid #dfe6e9; - border-radius: 8px; - font-size: 13px; - color: #2c3e50; - background-color: #f9f9f9; - } + .form-input { + padding: 8px 12px; + border: 1px solid #dfe6e9; + border-radius: 8px; + font-size: 13px; + color: #2c3e50; + background-color: #f9f9f9; + } - .form-input:disabled { - background-color: #f1f2f6; - color: #95a5a6; - cursor: not-allowed; - } + .form-input:disabled { + background-color: #f1f2f6; + color: #95a5a6; + cursor: not-allowed; + } - .picker { - flex: 1; - margin-bottom: 0; - padding: 8px 12px; - border: 1px solid #dfe6e9; - border-radius: 8px; - font-size: 13px; - color: #2c3e50; - background-color: #f9f9f9; - } + .picker { + flex: 1; + margin-bottom: 0; + padding: 8px 12px; + border: 1px solid #dfe6e9; + border-radius: 8px; + font-size: 13px; + color: #2c3e50; + background-color: #f9f9f9; + } - .table-container { - margin-bottom: 15px; - } + .table-container { + margin-bottom: 15px; + } - .table-header { - margin-bottom: 12px; - } + .table-header { + margin-bottom: 12px; + } - .section-title { - font-size: 16px; - font-weight: 600; - color: #2c3e50; - } + .section-title { + font-size: 16px; + font-weight: 600; + color: #2c3e50; + } - .custom-table { - width: 100%; - } + .custom-table { + width: 100%; + } - .table-header-row { - background-color: #3498db; - color: #fff; - } + .table-header-row { + background-color: #3498db; + color: #fff; + } - .th { - padding: 10px 12px; - text-align: center; - font-weight: 500; - font-size: 13px; - } + .th { + padding: 10px 12px; + text-align: center; + font-weight: 500; + font-size: 13px; + } - .table-row { - transition: background-color 0.3s; - } + .table-row { + transition: background-color 0.3s; + } - .table-row:hover { - background-color: #f8f9fa; - } + .table-row:hover { + background-color: #f8f9fa; + } - .table-row td { - padding: 10px 12px; - border-bottom: 1px solid #ebf2ff; - font-size: 13px; - color: #34495e; - } + .table-row td { + padding: 10px 12px; + border-bottom: 1px solid #ebf2ff; + font-size: 13px; + color: #34495e; + } - .row-success td { - background-color: #e8f5e9; - } + .row-success td { + background-color: #e8f5e9; + } - .row-warning td { - background-color: #fff3e0; - } + .row-warning td { + background-color: #fff3e0; + } - .row-pending td { - background-color: #f5f5f5; - } + .row-pending td { + background-color: #f5f5f5; + } - .plus-button { - display: flex; - justify-content: center; - margin-bottom: 10px; - } + .plus-button { + display: flex; + justify-content: center; + margin-bottom: 10px; + } - /* 鍩虹鎸夐挳鏍峰紡 - 缁熶竴瑙勮寖 */ - .button { - position: relative; - display: inline-flex; - align-items: center; - justify-content: center; - padding: 0 24px; - height: 40px; - font-size: 14px; - font-weight: 500; - border: none; - border-radius: 8px; - cursor: pointer; - transition: all 0.3s ease; - overflow: hidden; - box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25); - } + /* 鍩虹鎸夐挳鏍峰紡 - 缁熶竴瑙勮寖 */ + .button { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + padding: 0 24px; + height: 40px; + font-size: 14px; + font-weight: 500; + border: none; + border-radius: 8px; + cursor: pointer; + transition: all 0.3s ease; + overflow: hidden; + box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25); + } - /* 涓绘搷浣滄寜閽� - 璀﹀憡绫诲瀷锛堝師绾㈣壊鎸夐挳锛� */ - .button-warning { - background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); - color: #ffffff; - } + /* 涓绘搷浣滄寜閽� - 璀﹀憡绫诲瀷锛堝師绾㈣壊鎸夐挳锛� */ + .button-warning { + background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); + color: #ffffff; + } - /* 娆¤鎿嶄綔鎸夐挳 - 榛樿绫诲瀷 */ - .button-default { - background-color: #f5f7fa; - color: #6c757d; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); - } + /* 娆¤鎿嶄綔鎸夐挳 - 榛樿绫诲瀷 */ + .button-default { + background-color: #f5f7fa; + color: #6c757d; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); + } - /* 鎴愬姛鎿嶄綔鎸夐挳 - 缁胯壊绫诲瀷 */ - .button-success { - background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); - color: #ffffff; - box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3); - } + /* 鎴愬姛鎿嶄綔鎸夐挳 - 缁胯壊绫诲瀷 */ + .button-success { + background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); + color: #ffffff; + box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3); + } - /* 鎸夐挳鎮仠鏁堟灉 */ - .button-warning:hover, - .button-default:hover, - .button-success:hover { - transform: translateY(-3px); - } + /* 鎸夐挳鎮仠鏁堟灉 */ + .button-warning:hover, + .button-default:hover, + .button-success:hover { + transform: translateY(-3px); + } - /* 鎸夐挳鐐瑰嚮鏁堟灉 */ - .button-warning:active, - .button-default:active, - .button-success:active { - transform: translateY(1px); - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); - } + /* 鎸夐挳鐐瑰嚮鏁堟灉 */ + .button-warning:active, + .button-default:active, + .button-success:active { + transform: translateY(1px); + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); + } - /* 鎸夐挳鍔犺浇鐘舵�� */ - .button-loading { - cursor: progress; - } + /* 鎸夐挳鍔犺浇鐘舵�� */ + .button-loading { + cursor: progress; + } - .button-loading::after { - content: ""; - position: absolute; - width: 16px; - height: 16px; - border: 2px solid rgba(255, 255, 255, 0.3); - border-top-color: #ffffff; - border-radius: 50%; - animation: spin 1s linear infinite; - } + .button-loading::after { + content: ""; + position: absolute; + width: 16px; + height: 16px; + border: 2px solid rgba(255, 255, 255, 0.3); + border-top-color: #ffffff; + border-radius: 50%; + animation: spin 1s linear infinite; + } - .button-default.button-loading::after { - border-top-color: #6c757d; - } + .button-default.button-loading::after { + border-top-color: #6c757d; + } - .button-success.button-loading::after { - border-top-color: #ffffff; - } + .button-success.button-loading::after { + border-top-color: #ffffff; + } - /* 绂佺敤鐘舵�佹寜閽� */ - .button:disabled { - opacity: 0.6; - cursor: not-allowed; - transform: none !important; - box-shadow: none !important; - } + /* 绂佺敤鐘舵�佹寜閽� */ + .button:disabled { + opacity: 0.6; + cursor: not-allowed; + transform: none !important; + box-shadow: none !important; + } - /* 鍔犺浇鍔ㄧ敾 */ - @keyframes spin { - to { - transform: rotate(360deg); - } - } + /* 鍔犺浇鍔ㄧ敾 */ + @keyframes spin { + to { + transform: rotate(360deg); + } + } - /* 鎸夐挳鍥炬爣鏍峰紡 - 鏀寔宸︿晶鍥炬爣 */ - .button-icon { - margin-right: 8px; - font-size: 16px; - } + /* 鎸夐挳鍥炬爣鏍峰紡 - 鏀寔宸︿晶鍥炬爣 */ + .button-icon { + margin-right: 8px; + font-size: 16px; + } - /* 鎸夐挳缁勬牱寮� - 浼樺寲鎸夐挳闂磋窛 */ - .button-group { - display: flex; - flex-wrap: wrap; - gap: 12px; - justify-content: center; - margin: 15px 0; - } + /* 鎸夐挳缁勬牱寮� - 浼樺寲鎸夐挳闂磋窛 */ + .button-group { + display: flex; + flex-wrap: wrap; + gap: 12px; + justify-content: center; + margin: 15px 0; + } - /* 璁板綍鎸夐挳鏍峰紡 */ - .record-button-container { - display: flex; - justify-content: center; - } + /* 璁板綍鎸夐挳鏍峰紡 */ + .record-button-container { + display: flex; + justify-content: center; + } - .record-button { - display: flex; - align-items: center; - justify-content: space-between; - width: 120px; - height: 36px; - border-radius: 18px; - padding: 0 16px; - transition: all 0.3s ease; - cursor: pointer; - position: relative; - overflow: hidden; - } + .record-button { + display: flex; + align-items: center; + justify-content: space-between; + width: 120px; + height: 36px; + border-radius: 18px; + padding: 0 16px; + transition: all 0.3s ease; + cursor: pointer; + position: relative; + overflow: hidden; + } - .record-button.complete { - background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); - color: white; - box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3); - } + .record-button.complete { + background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); + color: white; + box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3); + } - .record-button.incomplete { - background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); - color: white; - box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3); - } + .record-button.incomplete { + background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); + color: white; + box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3); + } - .record-button:hover { - transform: translateY(-2px); - box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); - } + .record-button:hover { + transform: translateY(-2px); + box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); + } - .record-button:active { - transform: translateY(1px); - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); - } + .record-button:active { + transform: translateY(1px); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); + } - .record-button:disabled { - opacity: 0.6; - cursor: not-allowed; - transform: none !important; - box-shadow: none !important; - } + .record-button:disabled { + opacity: 0.6; + cursor: not-allowed; + transform: none !important; + box-shadow: none !important; + } - .check-count { - font-size: 12px; - font-weight: 600; - } + .check-count { + font-size: 12px; + font-weight: 600; + } - .status-text { - font-size: 10px; - opacity: 0.8; - } + .status-text { + font-size: 10px; + opacity: 0.8; + } - .record-icon { - width: 20px; - height: 20px; - border-radius: 50%; - background-color: rgba(255, 255, 255, 0.2); - display: flex; - align-items: center; - justify-content: center; - font-size: 10px; - } + .record-icon { + width: 20px; + height: 20px; + border-radius: 50%; + background-color: rgba(255, 255, 255, 0.2); + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + } - /* 璁板綍鎸夐挳鍔犺浇鐘舵�� */ - .record-button.button-loading::after { - content: ""; - position: absolute; - width: 16px; - height: 16px; - border: 2px solid rgba(255, 255, 255, 0.3); - border-top-color: #ffffff; - border-radius: 50%; - animation: spin 1s linear infinite; - right: 16px; - } + /* 璁板綍鎸夐挳鍔犺浇鐘舵�� */ + .record-button.button-loading::after { + content: ""; + position: absolute; + width: 16px; + height: 16px; + border: 2px solid rgba(255, 255, 255, 0.3); + border-top-color: #ffffff; + border-radius: 50%; + animation: spin 1s linear infinite; + right: 16px; + } - .record-button.button-loading .record-icon { - opacity: 0; - } + .record-button.button-loading .record-icon { + opacity: 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; - } + .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; + } - .popup { - background-color: #fff; - padding: 20px; - border: 1px solid #ccc; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); - width: 80vw; - border-radius: 10px; - } + .popup { + background-color: #fff; + padding: 20px; + border: 1px solid #ccc; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + width: 80vw; + border-radius: 10px; + } - h3 { - font-size: 16px; - margin-bottom: 15px; - color: #2c3e50; - } + h3 { + font-size: 16px; + margin-bottom: 15px; + color: #2c3e50; + } </style> \ No newline at end of file diff --git a/pages/QC/SJ/Add.vue b/pages/QC/SJ/Add.vue index 8b3bc8a..60a4b1c 100644 --- a/pages/QC/SJ/Add.vue +++ b/pages/QC/SJ/Add.vue @@ -116,12 +116,14 @@ </button> </view> <view class="button-row"> - <button type="warn" v-if="isShowTable" @click="getTable" class="btn btn-primary"> + <!-- <button type="warn" v-if="isShowTable" @click="getTable" class="btn btn-primary"> --> + <button type="warn" v-if="!formData.fsubmit" @click="getTable" class="btn btn-primary"> 鑾峰彇妫�楠岄」鐩� </button> </view> <view class="button-row"> - <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable" class="btn btn-primary"> + <!-- <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable" class="btn btn-primary"> --> + <button type="warn" v-if="!formData.fsubmit" @click="saveTable" class="btn btn-primary"> 鐢熸垚妫�楠岄」鐩� </button> </view> diff --git a/pages/QC/XJ/Add.vue b/pages/QC/XJ/Add.vue index 5a89300..51a752d 100644 --- a/pages/QC/XJ/Add.vue +++ b/pages/QC/XJ/Add.vue @@ -109,12 +109,14 @@ </button> </view> <view class="button-group"> - <button type="warn" v-if="isShowTable" @click="getTable" class="action-btn secondary"> + <!-- <button type="warn" v-if="isShowTable" @click="getTable" class="action-btn secondary"> --> + <button type="warn" v-if="!formData.fsubmit" @click="getTable" class="action-btn secondary"> 鑾峰彇妫�楠岄」鐩� </button> </view> <view class="button-group"> - <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable" class="action-btn secondary"> + <!-- <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable" class="action-btn secondary"> --> + <button type="warn" v-if="!formData.fsubmit" @click="saveTable" class="action-btn secondary"> 鐢熸垚妫�楠岄」鐩� </button> </view> -- Gitblit v1.9.3