From 20eabab60d944179d4b3c250ecacadedaed314db Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期三, 12 三月 2025 13:15:53 +0800 Subject: [PATCH] 原材料下单查询条件修改 --- src/views/business/materialOrder/index.vue | 239 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 197 insertions(+), 42 deletions(-) diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue index 45fa7dc..325eaf0 100644 --- a/src/views/business/materialOrder/index.vue +++ b/src/views/business/materialOrder/index.vue @@ -2,19 +2,23 @@ <div class="app-container"> <div> <div class="search"> - <el-form :model="entity" ref="entity" size="small" :inline="true"><el-form-item label="鎵瑰彿" prop="updateBatchNo"> + <el-form :model="entity" ref="entity" size="small" :inline="true"> + <el-form-item label="鎵瑰彿" prop="updateBatchNo"> <el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="refreshTable"> </el-input> - </el-form-item><el-form-item label="濮旀墭缂栧彿" prop="entrustCode"> + </el-form-item> + <el-form-item label="濮旀墭缂栧彿" prop="entrustCode"> <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="refreshTable"> </el-input> - </el-form-item><el-form-item label="闆朵欢鍙�" prop="partNo"> + </el-form-item> + <el-form-item label="闆朵欢鍙�" prop="partNo"> <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="refreshTable"> </el-input> - </el-form-item><el-form-item label="闆朵欢鎻忚堪" prop="partDesc"> + </el-form-item> + <el-form-item label="闆朵欢鎻忚堪" prop="partDesc"> <el-input v-model="entity.partDesc" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="refreshTable"> </el-input> @@ -55,8 +59,11 @@ <div class="table-tab"> <div> <ul class="tab"> - <li v-for="(m, i) in tabList" :key="m.value" :class="{ active: m.value === tabIndex }" @click="handleTab(m)"> - {{ m.label }}</li> + <li :class="{ active: tabIndex === 0 }" @click="handleTab(0)">寰呬笅鍗�</li> + <li :class="{ active: tabIndex === 1 }" @click="handleTab(1)">妫�楠屼腑</li> + <li :class="{ active: tabIndex === 2 }" @click="handleTab(2)">宸叉楠�</li> + <li :class="{ active: tabIndex === 4 }" @click="handleTab(4)">瀛e害妫�楠�</li> + <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:Ifs:ByAll'])" @click="handleTab(3)">鍏ㄩ儴</li> </ul> </div> <div> @@ -69,31 +76,32 @@ <!--寰呬笅鍗�--> <div class="table"> <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination" - :height="'calc(100vh - 290px)'" key="tableData" :page="page" :tableLoading="tableLoading"></lims-table> + :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'" key="tableData" :page="page" + :tableLoading="tableLoading"></lims-table> </div> <!--妫�楠屼腑--> <div class="table"> <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true" - :handleSelectionChange="selectMethod" @pagination="pagination1" :height="'calc(100vh - 290px)'" - key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination1" + :height="'calc(100vh - 290px)'" key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> </div> <!--宸叉楠�--> <div class="table"> <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true" - :handleSelectionChange="selectMethod" @pagination="pagination2" :height="'calc(100vh - 290px)'" - key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table> + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination2" + :height="'calc(100vh - 290px)'" key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table> </div> <!--鍏ㄩ儴--> <div class="table"> <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true" - :handleSelectionChange="selectMethod" @pagination="pagination3" :height="'calc(100vh - 290px)'" - key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table> + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination3" + :height="'calc(100vh - 290px)'" key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table> </div> <!--瀛e害妫�楠�--> <div class="table"> <lims-table :tableData="tableData4" :column="column4" v-if="tabIndex === 4" :isSelection="true" - :handleSelectionChange="selectMethod" @pagination="pagination4" :height="'calc(100vh - 290px)'" - key="tableData4" :page="page4" :tableLoading="tableLoading4"></lims-table> + :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination4" + :height="'calc(100vh - 290px)'" key="tableData4" :page="page4" :tableLoading="tableLoading4"></lims-table> </div> </div> </div> @@ -113,8 +121,8 @@ </el-dialog> <!-- 鎾ら攢鎶ユ --> <el-dialog :visible.sync="declareDialogVisible" title="鎶ユ鎾ら攢" width="30%"> - <p style="font-size:16px;color:#333333">鎵瑰彿<span - style="color:#34BD66">{{ this.insOrderRow.updateBatchNo }}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span> + <p style="font-size:16px;color:#333333">鎵瑰彿<span style="color:#34BD66">{{ this.insOrderRow.updateBatchNo + }}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span> </p> <span slot="footer" class="dialog-footer"> <el-row> @@ -187,6 +195,7 @@ concessionRelease, getIfsByAll, getIfsByOver, + getIfsByQuarter, getIfsByStateOne, rawAllExport, rawOrderRelease, @@ -353,8 +362,48 @@ tableData2: [], tableLoading2: false, column2: [ - { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, - { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { + label: '濮旀墭缂栧彿', + prop: 'entrustCode', + width: "160px", + dataType: "link", + linkMethod: "changeEntrustCode", + }, + { + dataType: 'tag', + label: '妫�楠岀姸鎬�', + prop: 'inspectStatus', + formatData: (params) => { + if (params == 0) { + return '妫�楠屼腑' + } else if (params == 1) { + return '鍚堟牸' + } else if (params == 2) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '鏈笅鍗�' + } else if (params == 4) { + return '璁╂鏀捐' + } else { + return null + } + }, + formatType: (params) => { + if (params == 0) { + return 'warning' + } else if (params == 1) { + return 'success' + } else if (params == 2) { + return 'danger' + } else if (params == 3) { + return 'info' + } else if (params == 4) { + return '' + } else { + return null + } + } + }, { label: '璁㈠崟鍙�', prop: 'orderNo' }, { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, @@ -364,7 +413,13 @@ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, { label: '鍏嶆', prop: 'isExemption' }, - { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { + label: '鏍峰搧鍚嶇О', + prop: 'sampleName', + width: "160px", + dataType: "link", + linkMethod: "selectAllByOne", + }, { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, { label: '妫�楠屼汉', prop: 'userName' }, { @@ -466,8 +521,42 @@ tableData3: [], tableLoading3: false, column3: [ - { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, - { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '濮旀墭缂栧彿', prop: 'entrustCode',width: "160px", }, + { + dataType: 'tag', + label: '妫�楠岀姸鎬�', + prop: 'inspectStatus', + formatData: (params) => { + if (params == 0) { + return '妫�楠屼腑' + } else if (params == 1) { + return '鍚堟牸' + } else if (params == 2) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '鏈笅鍗�' + } else if (params == 4) { + return '璁╂鏀捐' + } else { + return null + } + }, + formatType: (params) => { + if (params == 0) { + return 'warning' + } else if (params == 1) { + return 'success' + } else if (params == 2) { + return 'danger' + } else if (params == 3) { + return 'info' + } else if (params == 4) { + return '' + } else { + return null + } + } + }, { label: '璁㈠崟鍙�', prop: 'orderNo' }, { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, @@ -477,7 +566,13 @@ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, { label: '鍏嶆', prop: 'isExemption' }, - { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { + label: '鏍峰搧鍚嶇О', + prop: 'sampleName', + width: "160px", + dataType: "link", + linkMethod: "selectAllByOne", + }, { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, { label: '妫�楠屼汉', prop: 'userName' }, { @@ -532,8 +627,42 @@ tableData4: [], tableLoading4: false, column4: [ - { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, - { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '濮旀墭缂栧彿', prop: 'entrustCode',width: "160px", }, + { + dataType: 'tag', + label: '妫�楠岀姸鎬�', + prop: 'inspectStatus', + formatData: (params) => { + if (params == 0) { + return '妫�楠屼腑' + } else if (params == 1) { + return '鍚堟牸' + } else if (params == 2) { + return '涓嶅悎鏍�' + } else if (params == 3) { + return '鏈笅鍗�' + } else if (params == 4) { + return '璁╂鏀捐' + } else { + return null + } + }, + formatType: (params) => { + if (params == 0) { + return 'warning' + } else if (params == 1) { + return 'success' + } else if (params == 2) { + return 'danger' + } else if (params == 3) { + return 'info' + } else if (params == 4) { + return '' + } else { + return null + } + } + }, { label: '璁㈠崟鍙�', prop: 'orderNo' }, { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, @@ -543,7 +672,13 @@ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, { label: '鍏嶆', prop: 'isExemption' }, - { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { + label: '鏍峰搧鍚嶇О', + prop: 'sampleName', + width: "160px", + dataType: "link", + linkMethod: "selectAllByOne", + }, { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, { label: '妫�楠屼汉', prop: 'userName' }, { @@ -715,7 +850,7 @@ // 寰呬笅鍗曟煡璇� getPurchaseOrderList() { this.tableLoading = true - const params = { ...this.entity, isInspect: 1, state: 0 } + const params = { ...this.entity, isInspect: 1, state: 0, ...this.page } getWarehouseSubmit(params).then(res => { this.tableLoading = false if (res.code === 200) { @@ -729,7 +864,7 @@ // 妫�楠屼腑鏌ヨ getIfsByStateOneList() { this.tableLoading1 = true - const params = { ...this.entity, orderState: 1, state: 1 } + const params = { ...this.entity, orderState: 1, state: 1, ...this.page1 } getIfsByStateOne(params).then(res => { this.tableLoading1 = false if (res.code === 200) { @@ -743,7 +878,14 @@ // 宸叉楠屾煡璇� getIfsByOverList() { this.tableLoading2 = true - const params = { ...this.entity, orderState: 4, state: 2 } + if(null != this.entity.date){ + this.entity.beginDeclareDate = this.entity.date[0] + this.entity.endDeclareDate = this.entity.date[1] + } else { + this.entity.beginDeclareDate = '' + this.entity.endDeclareDate = '' + } + const params = { ...this.entity, orderState: 4, state: 2, ...this.page2 } getIfsByOver(params).then(res => { this.tableLoading2 = false if (res.code === 200) { @@ -757,8 +899,15 @@ // 鏌ヨ瀛e害妫�楠� getIfsByQuarterList() { this.tableLoading4 = true - const params = { ...this.entity } - getIfsByOver(params).then(res => { + if(null != this.entity.date){ + this.entity.beginDeclareDate = this.entity.date[0] + this.entity.endDeclareDate = this.entity.date[1] + } else { + this.entity.beginDeclareDate = '' + this.entity.endDeclareDate = '' + } + const params = { ...this.entity, ...this.page4 } + getIfsByQuarter(params).then(res => { this.tableLoading4 = false if (res.code === 200) { this.tableData4 = res.data.records @@ -771,7 +920,14 @@ // 鍏ㄩ儴 getIfsByAllList() { this.tableLoading3 = true - const params = { ...this.entity, isInspect: 1 } + if(null != this.entity.date){ + this.entity.beginDeclareDate = this.entity.date[0] + this.entity.endDeclareDate = this.entity.date[1] + } else { + this.entity.beginDeclareDate = '' + this.entity.endDeclareDate = '' + } + const params = { ...this.entity, isInspect: 1, ...this.page3 } getIfsByAll(params).then(res => { this.tableLoading3 = false if (res.code === 200) { @@ -1069,17 +1225,10 @@ let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, } delete entity.orderBy this.outLoading = true - rawAllExport({ - entity: entity - }, { responseType: "blob" }).then(res => { + rawAllExport({ entity: entity }).then(res => { this.outLoading = false - this.$message.success('瀵煎嚭鎴愬姛') const blob = new Blob([res], { type: 'application/octet-stream' }); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx'; - link.click(); + this.$download.saveAs(blob, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx'); }) }, // 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅 @@ -1103,13 +1252,19 @@ }, // 鍒囨崲涓嬪崟tab琛ㄦ牸 handleTab(m) { - this.tabIndex = m.value; + this.tabIndex = m; this.refreshTable() }, // 琛ㄦ牸閫夋嫨鏂规硶 selectMethod(val) { this.multipleSelection = val }, + changeRowClass({ row, rowIndex }) { + if (row.isFirst == 1) { + return 'highlight-danger-row-border' + } + return '' + }, }, } </script> -- Gitblit v1.9.3