From 8cadb25984520f4cf7b877ee045aef3064c2122d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 05 三月 2025 14:57:46 +0800
Subject: [PATCH] 原材料下单中,检验状态显示为数字
---
src/views/business/materialOrder/index.vue | 161 ++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 128 insertions(+), 33 deletions(-)
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 3c09dec..4b4bbc4 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -59,7 +59,8 @@
<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)">
+ <li v-for="(m, i) in tabList" :key="m.value" :class="{ active: m.value === tabIndex }"
+ @click="handleTab(m)">
{{ m.label }}</li>
</ul>
</div>
@@ -72,40 +73,33 @@
</div>
<!--寰呬笅鍗�-->
<div class="table">
- <lims-table :tableData="tableData" :column="column"
- v-if="tabIndex === 0" @pagination="pagination"
- :rowClassName="changeRowClass"
- :height="'calc(100vh - 290px)'" key="tableData"
- :page="page" :tableLoading="tableLoading"></lims-table>
+ <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
+ :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"
- :rowClassName="changeRowClass"
- :handleSelectionChange="selectMethod" @pagination="pagination1" :height="'calc(100vh - 290px)'"
- key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table>
+ <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true"
+ :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"
- :rowClassName="changeRowClass"
- :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"
- :rowClassName="changeRowClass"
- :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"
- :rowClassName="changeRowClass"
- :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>
@@ -125,8 +119,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>
@@ -365,8 +359,42 @@
tableData2: [],
tableLoading2: false,
column2: [
- { 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' },
@@ -478,8 +506,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' },
@@ -544,8 +606,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' },
@@ -1081,11 +1177,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}).then(res => {
+ rawAllExport({ entity: entity }).then(res => {
this.outLoading = false
- this.$message.success('瀵煎嚭鎴愬姛')
- let url = this.javaApi + '/word/' + res.data
- this.$download.saveAs(url, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx');
+ const blob = new Blob([res], { type: 'application/octet-stream' });
+ this.$download.saveAs(blob, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx');
})
},
// 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅
@@ -1116,7 +1211,7 @@
selectMethod(val) {
this.multipleSelection = val
},
- changeRowClass({row, rowIndex}) {
+ changeRowClass({ row, rowIndex }) {
if (row.isFirst == 1) {
return 'highlight-danger-row-border'
}
--
Gitblit v1.9.3