From 4901d92ce68d1e1f7880c87a7c345c089645c3a0 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 14 九月 2023 17:39:32 +0800
Subject: [PATCH] modified: src/components/view/rawInsDetail.vue
---
src/components/view/sale.vue | 56 +++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/src/components/view/sale.vue b/src/components/view/sale.vue
index 6549080..d3e59a2 100644
--- a/src/components/view/sale.vue
+++ b/src/components/view/sale.vue
@@ -132,9 +132,8 @@
<span>鐘舵�侊細</span>
<el-select v-model="search.type" size="small" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;">
<el-option label="鍏ㄩ儴" :value="null"></el-option>
- <el-option label="閫氳繃" :value="0"></el-option>
- <el-option label="涓嶉�氳繃" :value="1"></el-option>
- <el-option label="鏈鏍�" :value="2"></el-option>
+ <el-option label="閫氳繃" :value="1"></el-option>
+ <el-option label="涓嶉�氳繃" :value="0"></el-option>
</el-select>
<span>浜よ揣鏃ユ湡锛�</span>
<el-date-picker v-model="search.delTime" size="small" placeholder="璇疯緭鍏�" style="width: 224px;margin-right: 30px;"
@@ -174,7 +173,8 @@
<span class="table_do" @click="changeShowDetail(scope.row)"> 鏌ョ湅璇︽儏 </span>
<span class="table_do" v-if="scope.row.type==null" @click="saleCheck(scope)"> 瀹℃牳 </span>
<span class="table_do" v-else> </span>
- <span class="table_do" @click="openUpDia(scope.row.id)"> 缂栬緫 </span>
+ <span class="table_do" v-if="scope.row.type==null" @click="openUpDia(scope.row.id)"> 缂栬緫 </span>
+ <span class="table_do" v-else> </span>
<span class="table_do" @click="delSale(scope.$index)"> 鍒犻櫎 </span>
</template>
</el-table-column>
@@ -282,7 +282,8 @@
</el-dialog>
</div>
<div class="select-model">
- <el-dialog :title="`閿�鍞�${upDia==true?'淇敼':'鏂板'}`" :visible.sync="addDia" width="850px">
+ <el-dialog :title="`閿�鍞�${upDia==true?'淇敼':'鏂板'}`" :visible.sync="addDia" width="850px"
+ @close="closeDialog">
<div class="body">
<div class="head">鍩烘湰淇℃伅</div>
<div class="content">
@@ -364,7 +365,7 @@
<el-table-column prop="number" label="鏁伴噺">
<template slot-scope="scope">
<el-input v-model.number="scope.row.number" size="small"
- @change="scope.row.number = isNaN(scope.row.number)?0:scope.row.number" clearable
+ @change="(val)=>scope.row.number = isNaN(val)?null:val" clearable
placeholder="璇疯緭鍏�"></el-input>
</template>
</el-table-column>
@@ -402,7 +403,7 @@
delTime: null
},
tableData: [],
- selects: [],
+ selects: '',
currentPage: 1,
countSize: 0,
pageSize: 10,
@@ -429,8 +430,28 @@
this.selectRawInspectsList()
},
methods: {
+ closeDialog(){
+ this.addData = {
+ orderNumber: null,
+ code: null,
+ name: null,
+ proname: null,
+ adress: null,
+ username: null,
+ delTime: null,
+ orderName: null,
+ phone: null,
+ saleMaterialList: []
+ }
+ },
handleSelectionChange(val) {
- this.selects = val.id;
+ this.selects = ''
+ val.forEach((a, ai)=>{
+ this.selects += a.id
+ if(ai!=val.length-1){
+ this.selects += ','
+ }
+ })
},
handleSizeChange(val) {
this.pageSize = val
@@ -456,7 +477,7 @@
})
},
clean() {
- this.selects = []
+ this.selects = ''
this.currentPage = 1
this.countSize = 0
this.pageSize = 10
@@ -464,7 +485,8 @@
formTime: null,
createTime: null,
insState: 2,
- judgeState: 2
+ judgeState: 2,
+ type: null
}
this.selectRawInspectsList()
},
@@ -540,6 +562,7 @@
type: 1
}).then(res => {
this.selectRawInspectsList()
+ this.$parent.removeAllTab()
})
}).catch(e => {
if (e == 'cancel') {
@@ -565,7 +588,6 @@
})
},
upSale() {
- console.log(this.addData);
for (var b = 0; b < this.addData.saleMaterialList.length; b++) {
if (Object.keys(this.addData.saleMaterialList[b]).length == 0) {
this.addData.saleMaterialList.splice(b, 1)
@@ -581,7 +603,8 @@
}
}
for (var a in this.addData) {
- if ((this.addData[a] == null || this.addData[a] == '') && a != 'type') {
+ console.log(a);
+ if ((this.addData[a] == null || this.addData[a] == '') && a!='checkname' && a!='checkTime' && a != 'type') {
if (a == 'saleMaterialList') {
this.$message.error('浜у搧淇℃伅涓嶈兘涓虹┖')
} else {
@@ -612,13 +635,12 @@
})
},
delSales(){
- console.log(this.selects);
+ if(this.selects=='') {
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹垹闄�')
+ return
+ }
this.axios.post(this.$api.url.delAllSale,{
ids: this.selects
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
}).then(res=>{
this.$message.success('鍒犻櫎鎴愬姛')
this.selectRawInspectsList()
--
Gitblit v1.9.3