|
@@ -1,5 +1,11 @@
|
|
<template>
|
|
<template>
|
|
<div class="changeDetail">
|
|
<div class="changeDetail">
|
|
|
|
+ <Modal class-name="vertical-center-modal" title='保存' v-model='show' :width="400" @on-ok="then"
|
|
|
|
+ @on-cancel="show = false">
|
|
|
|
+ <div>
|
|
|
|
+ <span>确认保存吗?</span>
|
|
|
|
+ </div>
|
|
|
|
+ </Modal>
|
|
<Toptitle title="变更">
|
|
<Toptitle title="变更">
|
|
<slot name="titleButton">
|
|
<slot name="titleButton">
|
|
<Button
|
|
<Button
|
|
@@ -386,7 +392,7 @@
|
|
<span v-else>{{ tableData[index].model }}</span>
|
|
<span v-else>{{ tableData[index].model }}</span>
|
|
</template>
|
|
</template>
|
|
<template slot="status" slot-scope="{ row }">
|
|
<template slot="status" slot-scope="{ row }">
|
|
- <span>{{ row.status === 5 ||row.status === 0||row.status === 2?'':row.status === 4?'变更':'新增' }}</span>
|
|
|
|
|
|
+ <span>{{ row.status === 5 ||row.status === 2?'':row.status === 4||row.check_state?'变更':'新增' }}</span>
|
|
</template>
|
|
</template>
|
|
<template slot="long" slot-scope="{ row, index }">
|
|
<template slot="long" slot-scope="{ row, index }">
|
|
<Input
|
|
<Input
|
|
@@ -487,9 +493,11 @@ export default {
|
|
},
|
|
},
|
|
cascader_list: [],
|
|
cascader_list: [],
|
|
building_list: [],
|
|
building_list: [],
|
|
|
|
+ show:false,
|
|
type: 1,
|
|
type: 1,
|
|
unit_list: [],
|
|
unit_list: [],
|
|
floor_list: [],
|
|
floor_list: [],
|
|
|
|
+ affirm:false,
|
|
room_number_list: [],
|
|
room_number_list: [],
|
|
product_title_list: [],
|
|
product_title_list: [],
|
|
pic_number_list: [],
|
|
pic_number_list: [],
|
|
@@ -697,15 +705,8 @@ export default {
|
|
);
|
|
);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handleFinish(){
|
|
|
|
- if(this.formData.depart_end ==null||
|
|
|
|
- this.formData.depart_start == null||
|
|
|
|
- this.formData.change_type == null||
|
|
|
|
- this.formData.msg == null||
|
|
|
|
- this.formData.contact_order_no == null){
|
|
|
|
- this.$Message.error('请填写完整信息');
|
|
|
|
- }else{
|
|
|
|
- let arr = [];
|
|
|
|
|
|
+ then(){
|
|
|
|
+ let arr = [];
|
|
let arr1 = [];
|
|
let arr1 = [];
|
|
this.tableData.forEach(item=>{
|
|
this.tableData.forEach(item=>{
|
|
item.product_title = item.title
|
|
item.product_title = item.title
|
|
@@ -737,6 +738,20 @@ export default {
|
|
this.goback()
|
|
this.goback()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ handleFinish(){
|
|
|
|
+ if(this.formData.depart_end ==null||
|
|
|
|
+ this.formData.depart_start == null||
|
|
|
|
+ this.formData.change_type == null||
|
|
|
|
+ this.formData.msg == null||
|
|
|
|
+ this.formData.contact_order_no == null){
|
|
|
|
+ this.$Message.error('请填写完整信息');
|
|
|
|
+ }else{
|
|
|
|
+ if(this.affirm){
|
|
|
|
+ this.$Message.warning('变更请确认!');
|
|
|
|
+ }else{
|
|
|
|
+ this.show = true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
add_line() {
|
|
add_line() {
|
|
@@ -810,7 +825,12 @@ export default {
|
|
handleSet(row, index, type) {
|
|
handleSet(row, index, type) {
|
|
switch (type) {
|
|
switch (type) {
|
|
case 1:
|
|
case 1:
|
|
-
|
|
|
|
|
|
+ this.affirm = false;
|
|
|
|
+ this.tableData.forEach(item=>{
|
|
|
|
+ if(item.status === 1){
|
|
|
|
+ item.input_state = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
if (!row.check_state) {
|
|
if (!row.check_state) {
|
|
this.copy_data[row.table_id-1].state = '变更';
|
|
this.copy_data[row.table_id-1].state = '变更';
|
|
this.ListData.push(this.copy_data[row.table_id-1]);
|
|
this.ListData.push(this.copy_data[row.table_id-1]);
|
|
@@ -830,6 +850,9 @@ export default {
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
|
|
+ if(this.affirm){
|
|
|
|
+ this.$Message.warning('更改请确认!')
|
|
|
|
+ }else{
|
|
this.tableData.splice(index, 0, row);
|
|
this.tableData.splice(index, 0, row);
|
|
this.tableData[index + 1].check_state = false;
|
|
this.tableData[index + 1].check_state = false;
|
|
this.tableData[index+1].status = 1;
|
|
this.tableData[index+1].status = 1;
|
|
@@ -838,9 +861,12 @@ export default {
|
|
this.tableData[index+1].table_id = null;
|
|
this.tableData[index+1].table_id = null;
|
|
//标记是复制的数据
|
|
//标记是复制的数据
|
|
this.tableData[index + 1].copy_state = true;
|
|
this.tableData[index + 1].copy_state = true;
|
|
- console.log(row);
|
|
|
|
|
|
+ console.log(row);}
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
|
|
+ if(this.affirm){
|
|
|
|
+ this.$Message.warning('更改请确认!')
|
|
|
|
+ }else{
|
|
this.confirmDelete({
|
|
this.confirmDelete({
|
|
content: "确认删除么?",
|
|
content: "确认删除么?",
|
|
then: () => {
|
|
then: () => {
|
|
@@ -899,12 +925,23 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
case 4:
|
|
case 4:
|
|
|
|
+ if(this.affirm){
|
|
|
|
+ this.$Message.warning('更改请确认!')
|
|
|
|
+ }else{
|
|
this.tableData[index].input_state = true;
|
|
this.tableData[index].input_state = true;
|
|
row.input_state = true;
|
|
row.input_state = true;
|
|
this.tableData[index].status = 4;
|
|
this.tableData[index].status = 4;
|
|
row.status = 4;
|
|
row.status = 4;
|
|
|
|
+ this.affirm = true;
|
|
|
|
+ this.tableData.forEach(item=>{
|
|
|
|
+ if(item.status===1){
|
|
|
|
+ item.input_state = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
},
|