From 9b0a82931d2d4ef6fa877ebba59737a65ba37103 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 07 八月 2024 11:18:53 +0800
Subject: [PATCH] 检验下单-检验项要求值校验修改
---
src/components/view/b1-expenses.vue | 55 +++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/src/components/view/b1-expenses.vue b/src/components/view/b1-expenses.vue
index 31ac8d5..9cab03f 100644
--- a/src/components/view/b1-expenses.vue
+++ b/src/components/view/b1-expenses.vue
@@ -73,7 +73,7 @@
<el-select @focus="getCompanyOptions" @change="refreshTable()" clearable
size="small" v-model="componentData.entity.company" style="width: 100%">
<el-option v-for="item in companyOptions" :key="item.value"
- :label="item.label" :value="item.value">
+ :label="item.label" :value="item.label">
</el-option>
</el-select>
</div>
@@ -83,10 +83,14 @@
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
<div class="search_thing" style="padding-left: 70px;">鎬讳环锛歿{total}}</div>
+ <div class="search_thing" style="padding-left: 70px;">
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
+ </div>
</div>
<div class="table">
- <ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" :key="upIndex"
- @handleWeave="handleWeave" />
+ <ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics"
+ :componentData="componentData" :key="upIndex"
+ @handleWeave="handleWeave" :column-min-width="'140'"/>
</div>
</div>
<el-dialog title="鍦ㄧ嚎缂栧埗" :visible.sync="claimVisible" width="70%" :modal-append-to-body="false">
@@ -101,11 +105,9 @@
<script>
import ValueTable from '../tool/value-table.vue'
- import Word from '../tool/word.vue'
export default {
components: {
ValueTable,
- Word,
},
data() {
return {
@@ -114,7 +116,7 @@
company: null,
dates: null,
orderBy: {
- field: 'id,ins_sample_id',
+ field: 'id',
order: 'asc'
}
},
@@ -135,6 +137,14 @@
name: 'entrustCode',
index: 2
},
+ /* {
+ name: 'sample',
+ index: 3
+ },
+ {
+ name: 'model',
+ index: 4
+ }, */
{
name: 'company',
index: 8
@@ -145,8 +155,8 @@
},
],
// 鐗规畩鐨勫悎骞惰锛屾牴鎹甿ain鍜宺ows鐨刵ame鏉ュ悎骞�
- special: {
- main: 'insSampleId',
+ /* special: {
+ main: 'entrustCode',
rows: [{
name: 'sample',
index: 3
@@ -164,7 +174,7 @@
index: 6
},
]
- }
+ } */
},
tagField: {
type: {
@@ -188,7 +198,8 @@
},
selectField: {},
requiredAdd: [],
- requiredUp: []
+ requiredUp: [],
+ needSort: ['createTime', 'sample'],
},
entityCopy: {},
upIndex: 0,
@@ -207,6 +218,7 @@
current: -1,
size: -1,
},
+ outLoading:false
}
},
mounted() {
@@ -216,6 +228,29 @@
this.getPower()
},
methods: {
+ handleDown(){
+ let entity = {...this.componentData.entity}
+ // entity.dates = JSON.stringify(entity.dates)
+ delete entity.orderBy
+ this.outLoading = true
+ this.$axios.post(this.$api.insOrder.export,{
+ entity:entity
+ },{
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ ,responseType: "blob"}).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;
+ let date = JSON.parse(entity.dates)
+ link.download = (entity.company?entity.company+' ':'')+date[0]+' - '+date[1]+'璐圭敤缁熻.xlsx';
+ link.click();
+ })
+ },
getTotal(){
this.$axios.post(this.$api.insOrder.costStatistics2, {
entity:this.componentData.entity
--
Gitblit v1.9.3