From 20cf1938a8aa04a3f911d6d3729e8aec08a7d658 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期二, 25 二月 2025 09:08:51 +0800
Subject: [PATCH] feat: 完成检测单页面
---
src/views/business/rawMaterialInspection/index.vue | 108 +++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 86 insertions(+), 22 deletions(-)
diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index 3430970..2ea2eb7 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -79,6 +79,7 @@
<!--寰呮姤妫�銆佸緟涓嬪崟-->
<div class="table">
<lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0 || tabIndex === 1"
+ :isSelection="true" :handleSelectionChange="selectMethod"
@pagination="pagination" :height="'calc(100vh - 290px)'"
:page="page" :tableLoading="tableLoading"></lims-table>
</div>
@@ -179,7 +180,7 @@
</template>
<script>
-import DataLookVisible from "@/components/rawMaterialInspection/dataLookVisible.vue";
+import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue";
import {
addIfsInventoryQuantity,
advancedGodown,
@@ -201,7 +202,41 @@
tableData: [],
tableLoading: false,
column: [
- {label: '妫�楠岀姸鎬�', prop: 'inspectStatus'},
+ {
+ 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',width: '140px',},
{label: '鎵瑰彿', prop: 'updateBatchNo'},
@@ -216,14 +251,14 @@
if (params == 1) {
return '杩囨湡鐗╂枡'
} else {
- return ''
+ return null
}
},
formatType: (params) => {
if (params == 1) {
return 'info'
} else {
- return ''
+ return null
}
}
},
@@ -232,9 +267,7 @@
{label: '鎶ユ鏃堕棿', prop: 'declareDate'},
{
dataType: 'action',
- fixed: 'right',
label: '鎿嶄綔',
- width: '150px',
operation: [
{
name: '鎶ユ',
@@ -278,7 +311,41 @@
tableLoading1: false,
column1: [
{label: '濮旀墭缂栧彿', prop: 'entrustCode'},
- {label: '妫�楠岀姸鎬�', prop: 'inspectStatus'},
+ {
+ 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'},
@@ -299,14 +366,14 @@
if (params == 1) {
return '杩囨湡鐗╂枡'
} else {
- return ''
+ return null
}
},
formatType: (params) => {
if (params == 1) {
return 'info'
} else {
- return ''
+ return null
}
}
},
@@ -317,7 +384,6 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '140px',
operation: [
{
name: '鏁版嵁鏌ョ湅',
@@ -552,8 +618,8 @@
},
// 鏁版嵁鏌ョ湅
handleDataLook(row) {
- this.dataDialogVisible = true;
this.dataLookInfo = row
+ this.dataDialogVisible = true;
},
// 鐩存帴鏀捐
goPass (row) {
@@ -568,7 +634,7 @@
type: 'success',
message: '鏀捐鎴愬姛!'
});
- this.refresh()
+ this.refreshTable()
}
})
}).catch(() => {
@@ -591,7 +657,7 @@
type: 'success',
message: '鎿嶄綔鎴愬姛!'
});
- this.refresh()
+ this.refreshTable()
}
})
}).catch(() => {
@@ -630,7 +696,7 @@
if (res.code === 200) {
this.declareDialogSVisible = false
this.$message.success('鎶ユ鎴愬姛')
- this.refresh()
+ this.refreshTable()
}
this.submitDeclareLoading = false
}).catch(err => {
@@ -653,7 +719,7 @@
if (res.code === 200) {
this.declareDialogVisible = false
this.$message.success('鎶ユ鎴愬姛')
- this.refresh()
+ this.refreshTable()
}
}).catch(err => {
console.log(err)
@@ -673,7 +739,7 @@
if (res.code === 200) {
this.declareDialogVisible = false
this.$message.success('鎶ユ鎴愬姛')
- this.refresh()
+ this.refreshTable()
}
}).catch(err => {
console.log(err)
@@ -698,11 +764,9 @@
submitDelete () {
this.deleteLoading = true
delIfsInventory({id: this.deleteInfo.id}).then(res => {
- if (res.code === 200) {
- this.deleteVisible = false
- this.$message.success('鍒犻櫎鎴愬姛')
- this.refresh()
- }
+ this.deleteVisible = false
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.refreshTable()
this.deleteLoading = false
}).catch(err => {
console.log(err)
@@ -717,7 +781,7 @@
openIFS() {
this.btnLoading = true
getIfsOrder().then(res => {
- this.refresh()
+ this.refreshTable()
this.btnLoading = false
}).catch(err => {
this.btnLoading = false
--
Gitblit v1.9.3