Browse Source

20240924

java8
qiezi 1 year ago
parent
commit
ea008120aa
  1. 23
      src/views/modules/quote/index.vue
  2. 7
      src/views/modules/quote/primary/quoteTable.vue

23
src/views/modules/quote/index.vue

@ -405,7 +405,7 @@ export default {
}
},
methods:{
handleSearch(){
handleSearch(index){
let params = {
...this.quoteForm,
no: this.no,
@ -416,10 +416,8 @@ export default {
if (data && data.code === 0){
this.dataList = data.rows
this.total = data.total
if (this.total > 0){
this.currentQuote = {...this.dataList[0]}
}else {
this.currentQuote = {}
if (index !== undefined){
this.handleSelect(this.dataList[index])
}
}else {
this.$message.error(data.msg)
@ -430,6 +428,13 @@ export default {
this.searchLoading = false
})
},
handleSelect(row){
if (row){
this.currentQuote = {...row}
}else {
this.currentQuote = {}
}
},
handleSave(row){
this.$nextTick(()=>{
if (this.$refs.saveForm){
@ -590,7 +595,11 @@ export default {
removeQuote(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
this.handleSearch();
if (row.id === this.currentQuote.id){
this.handleSearch(0);
}else {
this.handleSearch();
}
}else {
this.$message.warning(data.msg)
}
@ -752,7 +761,7 @@ export default {
createBy: this.$store.state.user.name,
}
this.handleQueryBu();// BU
this.handleSearch();//
this.handleSearch(0);//
},
watch:{
'quoteForm.customerNo'(newVal, oldVal){

7
src/views/modules/quote/primary/quoteTable.vue

@ -21,12 +21,15 @@ export default {
},
methods:{
handleRowClick(row, column, event){
if (column.label === '操作'){
return
}
this.$emit('rowClick',row)
},
handleSaveClick(row){
this.$emit('save',row)
},
handleRemoveClick(row){
handleRemoveClick(row,$index){
this.$emit('remove',row)
},
handleUpdateStatus(row){
@ -71,7 +74,7 @@ export default {
label="操作">
<template slot-scope="{row,$index}">
<a type="text" v-if="row.status === '草稿'" @click="handleSaveClick(row)">编辑</a>
<a type="text" v-if="row.status === '草稿'" @click="handleRemoveClick(row)">删除</a>
<a type="text" v-if="row.status === '草稿'" @click="handleRemoveClick(row,$index)">删除</a>
<a type="text" v-if="row.status === '草稿'" @click="handleUpdateStatus(row)">下达</a>
<a type="text" v-if="row.status === '下达'" @click="handleQueryById(row)">详情</a>
</template>

Loading…
Cancel
Save