From 41490d6a55c4d9d33cbbedaad5d3c0ee07eb0c0a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 26 二月 2025 11:03:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/business/rawMaterialInspection/index.vue | 161 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 129 insertions(+), 32 deletions(-)
diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index 57674fb..a993bac 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -26,9 +26,11 @@
@keyup.enter.native="refreshTable">
</el-input>
</el-form-item>
- <el-button v-if="tabIndex === 3 || tabIndex === 4" :icon="!more?'el-icon-arrow-down':'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" @click="more=!more">{{!more?'鏇村':'鏀惰捣'}}</el-button>
- <el-button size="small" icon="el-icon-search" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- <el-button size="small" @click="refresh()" icon="el-icon-refresh">閲� 缃�</el-button>
+ <el-form-item>
+ <el-button v-if="tabIndex === 3 || tabIndex === 4" :icon="!more?'el-icon-arrow-down':'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" @click="more=!more">{{!more?'鏇村':'鏀惰捣'}}</el-button>
+ <el-button size="mini" icon="el-icon-search" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+ <el-button size="mini" @click="refresh()" icon="el-icon-refresh">閲� 缃�</el-button>
+ </el-form-item>
</el-row>
<el-row>
<el-form-item label="妫�楠岀姸鎬�" prop="inspectStatus" v-if="(tabIndex === 3 || tabIndex === 4) && more">
@@ -76,7 +78,8 @@
</div>
<!--寰呮姤妫�銆佸緟涓嬪崟-->
<div class="table">
- <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0 || tabIndex === 1">
+ <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>
@@ -177,7 +180,7 @@
</template>
<script>
-import DataLookVisible from "@/components/rawMaterialInspection/dataLookVisible.vue";
+import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue";
import {
addIfsInventoryQuantity,
advancedGodown,
@@ -199,22 +202,72 @@
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'},
{label: '闆朵欢鍙�', prop: 'partNo'},
{label: '闆朵欢鎻忚堪', prop: 'partDesc'},
{label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'},
- {label: '鐗╂枡绫诲瀷', prop: 'isExpire'},
+ {
+ dataType: 'tag',
+ label: '鐗╂枡绫诲瀷',
+ prop: 'isExpire',
+ formatData: (params) => {
+ if (params == 1) {
+ return '杩囨湡鐗╂枡'
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (params == 1) {
+ return 'info'
+ } else {
+ return null
+ }
+ }
+ },
{label: '鍗曚綅', prop: 'buyUnitMeas'},
{label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'},
{label: '鎶ユ鏃堕棿', prop: 'declareDate'},
{
dataType: 'action',
- fixed: 'right',
label: '鎿嶄綔',
- width: '140px',
operation: [
{
name: '鎶ユ',
@@ -258,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'},
@@ -271,7 +358,25 @@
{label: '鏍峰搧鍚嶇О', prop: 'sampleName'},
{label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'},
{label: '妫�楠屼汉', prop: 'userName'},
- {label: '鐗╂枡绫诲瀷', prop: 'isExpire'},
+ {
+ dataType: 'tag',
+ label: '鐗╂枡绫诲瀷',
+ prop: 'isExpire',
+ formatData: (params) => {
+ if (params == 1) {
+ return '杩囨湡鐗╂枡'
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (params == 1) {
+ return 'info'
+ } else {
+ return null
+ }
+ }
+ },
{label: '鍗曚綅', prop: 'buyUnitMeas'},
{label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'},
{label: '鎶ユ鏃堕棿', prop: 'declareDate'},
@@ -279,7 +384,6 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '140px',
operation: [
{
name: '鏁版嵁鏌ョ湅',
@@ -514,8 +618,8 @@
},
// 鏁版嵁鏌ョ湅
handleDataLook(row) {
- this.dataDialogVisible = true;
this.dataLookInfo = row
+ this.dataDialogVisible = true;
},
// 鐩存帴鏀捐
goPass (row) {
@@ -530,7 +634,7 @@
type: 'success',
message: '鏀捐鎴愬姛!'
});
- this.refresh()
+ this.refreshTable()
}
})
}).catch(() => {
@@ -553,7 +657,7 @@
type: 'success',
message: '鎿嶄綔鎴愬姛!'
});
- this.refresh()
+ this.refreshTable()
}
})
}).catch(() => {
@@ -592,7 +696,7 @@
if (res.code === 200) {
this.declareDialogSVisible = false
this.$message.success('鎶ユ鎴愬姛')
- this.refresh()
+ this.refreshTable()
}
this.submitDeclareLoading = false
}).catch(err => {
@@ -615,7 +719,7 @@
if (res.code === 200) {
this.declareDialogVisible = false
this.$message.success('鎶ユ鎴愬姛')
- this.refresh()
+ this.refreshTable()
}
}).catch(err => {
console.log(err)
@@ -635,7 +739,7 @@
if (res.code === 200) {
this.declareDialogVisible = false
this.$message.success('鎶ユ鎴愬姛')
- this.refresh()
+ this.refreshTable()
}
}).catch(err => {
console.log(err)
@@ -660,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)
@@ -679,7 +781,7 @@
openIFS() {
this.btnLoading = true
getIfsOrder().then(res => {
- this.refresh()
+ this.refreshTable()
this.btnLoading = false
}).catch(err => {
this.btnLoading = false
@@ -693,16 +795,11 @@
this.outLoading = true
rawAllExport({
entity:entity
- },{
- responseType: "blob"}).then(res => {
+ }).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();
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, "鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx");
})
},
clear() {
--
Gitblit v1.9.3