From 90c8680cbc67d4b2680b1e5af4ad1129a96efa0c Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 06 五月 2025 14:39:09 +0800 Subject: [PATCH] 1.设备工具明细和树-过期标红 --- src/views/business/productOrder/index.vue | 130 ++++++++++++++++++++++++++++--------------- 1 files changed, 85 insertions(+), 45 deletions(-) diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index eb1e2c2..b674f14 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -39,30 +39,32 @@ </el-form-item> </el-form> </div> - <div class="table-tab"> - <div> - <ul class="tab"> - <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">寰呭鏍�</li> - <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:insOrder:checkout'])" @click="handleTab(1)">妫�楠屼腑</li> - <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">濮旀墭宸叉</li> - <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:insOrder:spotCheck'])" @click="handleTab(3)">鎶芥牱宸叉</li> - <li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:insOrder:sendBack'])" @click="handleTab(4)">閫�鍥�</li> - <li :class="{ active: tabIndex === 5 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(5)">鎾ら攢</li> - <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(6)">鍏ㄩ儴</li> - </ul> + <div class="container" v-loading="isLoading"> + <div class="table-tab"> + <div> + <ul class="tab"> + <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:insOrder:reviewed'])" @click="handleTab(0)">寰呭鏍�</li> + <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:insOrder:checkout'])" @click="handleTab(1)">妫�楠屼腑</li> + <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:insOrder:customerOrdered'])" @click="handleTab(2)">濮旀墭宸叉</li> + <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:insOrder:spotCheck'])" @click="handleTab(3)">鎶芥牱宸叉</li> + <li :class="{ active: tabIndex === 4 }" v-if="checkPermi(['get:insOrder:sendBack'])" @click="handleTab(4)">閫�鍥�</li> + <li :class="{ active: tabIndex === 5 }" v-if="checkPermi(['get:insOrder:revocation'])" @click="handleTab(5)">鎾ら攢</li> + <li :class="{ active: tabIndex === 6 }" v-if="checkPermi(['get:insOrder:all'])" @click="handleTab(6)">鍏ㄩ儴</li> + </ul> + </div> + <div> + <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small" + @click="downLoad">瀵煎嚭</el-button> + <el-button v-if="tabIndex === 1" size="small" type="primary" @click="openAddIns">娣诲姞妫�楠岄」</el-button> + <el-button size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button> + <el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button> + </div> </div> - <div> - <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small" - @click="downLoad">瀵煎嚭</el-button> - <el-button v-if="tabIndex === 1" size="small" type="primary" @click="openAddIns">娣诲姞妫�楠岄」</el-button> - <el-button size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button> - <el-button v-if="checkPermi(['add:insOrder'])" size="small" type="primary" @click="playOrder(1)">涓嬪崟</el-button> + <div class="table"> + <lims-table :tableData="tableData" :column="column" :isSelection="true" :handleSelectionChange="selectMethod" + @pagination="pagination" :height="'calc(100vh - 280px)'" :key="upIndex" :page="page" + :tableLoading="tableLoading"></lims-table> </div> - </div> - <div class="table"> - <lims-table :tableData="tableData" :column="column" :isSelection="true" :handleSelectionChange="selectMethod" - @pagination="pagination" :height="'calc(100vh - 280px)'" :key="upIndex" :page="page" - :tableLoading="tableLoading"></lims-table> </div> <div> <!-- 瀹℃牳 --> @@ -345,6 +347,7 @@ }, data() { return { + isLoading: false, // 鎺у埗鍔犺浇鐘舵�� entity: { orderType: '', state: '', @@ -781,6 +784,11 @@ ...mapGetters(["nickName"]), }, mounted() { + if (this.checkPermi(['get:raw:await'])) { + this.tabIndex = 0 + } else { + this.tabIndex = 2 + } this.refreshTable() this.getAuthorizedPerson() }, @@ -800,8 +808,9 @@ } } const params = { ...this.entity, state: this.tabList[this.tabIndex].value } - this.tableLoading = true + this.isLoading = true; // 寮�濮嬪姞杞� selectInsOrderParameter({...this.page,...params}).then(res => { + this.isLoading = false; // 缁撴潫鍔犺浇 this.upIndex++ this.tableLoading = false if (res.code === 200) { @@ -809,7 +818,7 @@ this.page.total = res.data.total } }).catch(err => { - this.tableLoading = false + this.isLoading = false; // 缁撴潫鍔犺浇 }) }, refresh() { @@ -918,7 +927,12 @@ }, // 瀵煎嚭璁板綍 downLoad() { - const params = { ...this.entity, state: this.tabList[this.tabIndex].value } + let params = {} + if (this.multipleSelection.length > 0) { + params.ids = this.multipleSelection.map(item => item.id).join(','); + } else { + params = { ...this.entity, state: this.tabList[this.tabIndex].value } + } rawAllInsOrderExport({ ...params }).then(res => { const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx'); @@ -971,14 +985,26 @@ }, // 鐐瑰嚮鏍峰搧鍚嶇О selectAllByOne(row) { - this.$router.push({ - path: "/productOrder/add", query: { - examine: 1, - active: 2, - currentId: row.id, - tabIndex: this.tabIndex, - } - }); + if (this.tabIndex === 4) { + this.$router.push({ + path: "/productOrder/addOrder", query: { + examine: 1, + active: 2, + currentId: row.id, + tabIndex: this.tabIndex, + } + }); + } else { + this.$router.push({ + path: "/productOrder/addView", query: { + examine: 1, + active: 2, + currentId: row.id, + tabIndex: this.tabIndex, + } + }); + } + }, // 淇敼鏍峰搧鍨嬪彿 editSampleModel (row) { @@ -1243,14 +1269,15 @@ }, // 涓嬪崟 playOrder(num) { - this.$router.push({ path: "/productOrder/add", query: { examine: 0, active: num, tabIndex: this.tabIndex } }); + this.$router.push({ path: "/productOrder/addOrder", query: { examine: 0, active: num, tabIndex: this.tabIndex } }); }, // 瀹℃牳 handleVerify(row) { - this.$router.push({ path: "/productOrder/add", query: { examine: 1, active: 3, currentId: row.id } }); + this.$router.push({ path: "/productOrder/addView", query: { examine: 1, active: 3, currentId: row.id } }); }, handleTab(i) { this.tabIndex = i; + this.multipleSelection = [] this.refreshTable() }, // 鏌ョ湅妫�楠屾暟鎹� @@ -1261,16 +1288,29 @@ inspectorList = row.userName.split(',') } inspectorList.push(this.nickName) - this.$router.push({ - path: "/inspectionTask/inspection", - query: { - sonLaboratory: row.sonLaboratory, - state: 3, - typeSource: row.typeSource, - orderId: row.id, - inspectorList: inspectorList, - }, - }) + if (this.checkPermi(['business:inspectionView'])) { + this.$router.push({ + name: "InspectionView", + query: { + sonLaboratory: row.sonLaboratory, + state: 3, + typeSource: row.typeSource, + orderId: row.id, + inspectorList: inspectorList, + }, + }) + } else { + this.$router.push({ + path: "/inspectionTask/inspection", + query: { + sonLaboratory: row.sonLaboratory, + state: 3, + typeSource: row.typeSource, + orderId: row.id, + inspectorList: inspectorList, + }, + }) + } }, goback() { this.state = 0 -- Gitblit v1.9.3