|
@@ -28,27 +28,15 @@
|
|
<div class="form">
|
|
<div class="form">
|
|
<Form class="form_content" :label-width="100">
|
|
<Form class="form_content" :label-width="100">
|
|
<FormItem label="项目编号:">
|
|
<FormItem label="项目编号:">
|
|
- <Input
|
|
|
|
- v-if="type == 6"
|
|
|
|
- v-model="saveData.order_no"
|
|
|
|
- placeholder="请输入项目编码"
|
|
|
|
- />
|
|
|
|
|
|
+ <Input v-if="type == 6" v-model="saveData.order_no" placeholder="请输入项目编码"/>
|
|
<span style="width: 120px" v-else>{{ formData.order_no }}</span>
|
|
<span style="width: 120px" v-else>{{ formData.order_no }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="项目名称:">
|
|
<FormItem label="项目名称:">
|
|
- <Input
|
|
|
|
- v-if="type == 6"
|
|
|
|
- v-model="saveData.residential_name"
|
|
|
|
- placeholder="请输入项目名称"
|
|
|
|
- />
|
|
|
|
|
|
+ <Input v-if="type == 6" v-model="saveData.residential_name" placeholder="请输入项目名称"/>
|
|
<span v-else>{{ formData.residential_name }}</span>
|
|
<span v-else>{{ formData.residential_name }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="项目简称:">
|
|
<FormItem label="项目简称:">
|
|
- <Input
|
|
|
|
- v-if="type == 6"
|
|
|
|
- v-model="saveData.abbreviation"
|
|
|
|
- placeholder="请输入项目简称"
|
|
|
|
- />
|
|
|
|
|
|
+ <Input v-if="type == 6" v-model="saveData.abbreviation" placeholder="请输入项目简称"/>
|
|
<span v-else>{{ formData.abbreviation }}</span>
|
|
<span v-else>{{ formData.abbreviation }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="客户名称:">
|
|
<FormItem label="客户名称:">
|
|
@@ -69,7 +57,11 @@
|
|
<span v-else>{{ formData.custom_title }}</span>
|
|
<span v-else>{{ formData.custom_title }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="紧急程度:">
|
|
<FormItem label="紧急程度:">
|
|
- <Select clearable v-model="saveData.warning_state" v-if="type == 6">
|
|
|
|
|
|
+ <Select
|
|
|
|
+ clearable
|
|
|
|
+ v-model="saveData.warning_state"
|
|
|
|
+ v-if="type == 6"
|
|
|
|
+ >
|
|
<Option
|
|
<Option
|
|
v-for="(item, index) in warning_state_list"
|
|
v-for="(item, index) in warning_state_list"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -80,11 +72,7 @@
|
|
<span v-else>{{ formData.warning_state }}</span>
|
|
<span v-else>{{ formData.warning_state }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="项目定金:">
|
|
<FormItem label="项目定金:">
|
|
- <Input
|
|
|
|
- v-if="type == 6"
|
|
|
|
- v-model="saveData.front_money"
|
|
|
|
- placeholder="请输入项目定金"
|
|
|
|
- />
|
|
|
|
|
|
+ <Input v-if="type == 6" v-model="saveData.front_money" placeholder="请输入项目定金"/>
|
|
<span v-else>{{ formData.front_money }}</span>
|
|
<span v-else>{{ formData.front_money }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="详细地址:">
|
|
<FormItem label="详细地址:">
|
|
@@ -167,12 +155,7 @@
|
|
<span v-else>{{ formData.nickname }}</span>
|
|
<span v-else>{{ formData.nickname }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="备注:">
|
|
<FormItem label="备注:">
|
|
- <Input
|
|
|
|
- v-if="type == 6"
|
|
|
|
- v-model="saveData.remark"
|
|
|
|
- type="textarea"
|
|
|
|
- placeholder="请输入备注"
|
|
|
|
- />
|
|
|
|
|
|
+ <Input v-if="type == 6" v-model="saveData.remark" type="textarea" placeholder="请输入备注"/>
|
|
<span v-else>{{ formData.remark }}</span>
|
|
<span v-else>{{ formData.remark }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
</Form>
|
|
</Form>
|
|
@@ -453,7 +436,7 @@
|
|
</FormItem>
|
|
</FormItem>
|
|
</Form>
|
|
</Form>
|
|
</div>
|
|
</div>
|
|
- <Tabs type="card" @on-click="handleTabsChange">
|
|
|
|
|
|
+ <Tabs type="card" @on-click="getData">
|
|
<TabPane
|
|
<TabPane
|
|
v-for="tab in tabs"
|
|
v-for="tab in tabs"
|
|
:key="tab"
|
|
:key="tab"
|
|
@@ -530,15 +513,10 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- ruleValidate: {
|
|
|
|
- name: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: "The name cannot be empty",
|
|
|
|
- trigger: "blur",
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
|
|
+ ruleValidate: {
|
|
|
|
+ name: [
|
|
|
|
+ { required: true, message: 'The name cannot be empty', trigger: 'blur' }
|
|
|
|
+ ]},
|
|
totalColumns: [
|
|
totalColumns: [
|
|
{ type: "selection", align: "center", width: 60 },
|
|
{ type: "selection", align: "center", width: 60 },
|
|
{ title: "序号", align: "center", type: "index", minWidth: 200 },
|
|
{ title: "序号", align: "center", type: "index", minWidth: 200 },
|
|
@@ -689,10 +667,10 @@ export default {
|
|
custom_detail_mobile: "",
|
|
custom_detail_mobile: "",
|
|
custom_detail_id: "",
|
|
custom_detail_id: "",
|
|
},
|
|
},
|
|
- formData: {},
|
|
|
|
- custom_title_list: [],
|
|
|
|
- warning_state_list: [],
|
|
|
|
- nickname_list: [],
|
|
|
|
|
|
+ formData:{},
|
|
|
|
+ custom_title_list:[],
|
|
|
|
+ warning_state_list:[],
|
|
|
|
+ nickname_list:[],
|
|
searchData: {
|
|
searchData: {
|
|
area_code: [],
|
|
area_code: [],
|
|
area_title: [],
|
|
area_title: [],
|
|
@@ -707,7 +685,7 @@ export default {
|
|
url_number: [],
|
|
url_number: [],
|
|
product_title: [],
|
|
product_title: [],
|
|
material: "",
|
|
material: "",
|
|
- color: "",
|
|
|
|
|
|
+ color: '',
|
|
work: "",
|
|
work: "",
|
|
state: "",
|
|
state: "",
|
|
},
|
|
},
|
|
@@ -730,6 +708,7 @@ export default {
|
|
search_state: false,
|
|
search_state: false,
|
|
copy_form: [],
|
|
copy_form: [],
|
|
type: this.$route.query.type,
|
|
type: this.$route.query.type,
|
|
|
|
+ formData: {},
|
|
tabs: 2,
|
|
tabs: 2,
|
|
total: 0,
|
|
total: 0,
|
|
page_index: 1,
|
|
page_index: 1,
|
|
@@ -750,7 +729,7 @@ export default {
|
|
params: { order_no: this.$route.query.order_no },
|
|
params: { order_no: this.$route.query.order_no },
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- this.formData = res.data;
|
|
|
|
|
|
+ this.formData = res.msg;
|
|
});
|
|
});
|
|
this.getData();
|
|
this.getData();
|
|
} else {
|
|
} else {
|
|
@@ -768,6 +747,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleBeforeUpload(){
|
|
|
|
+
|
|
|
|
+ },
|
|
handleClientDetailChange(val) {
|
|
handleClientDetailChange(val) {
|
|
val && (this.info.custom_detail_id = val);
|
|
val && (this.info.custom_detail_id = val);
|
|
},
|
|
},
|
|
@@ -855,32 +837,15 @@ export default {
|
|
if (this.search_state) {
|
|
if (this.search_state) {
|
|
this.axios
|
|
this.axios
|
|
.post("/api/order_area_details", {
|
|
.post("/api/order_area_details", {
|
|
- order_no: this.$route.query.order_no || this.saveData.order_no,
|
|
|
|
|
|
+ order_no: this.$route.query.order_no,
|
|
page_index: this.page_index,
|
|
page_index: this.page_index,
|
|
page_size: this.page_size,
|
|
page_size: this.page_size,
|
|
...this.searchData,
|
|
...this.searchData,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
console.log(res);
|
|
console.log(res);
|
|
- this.detailData = res.data.data;
|
|
|
|
- this.total = res.data.total;
|
|
|
|
- this.area_code = res.data.area_code;
|
|
|
|
- this.area_title = res.data.area_title;
|
|
|
|
- this.color = res.data.color;
|
|
|
|
- this.fashion = res.data.fashion;
|
|
|
|
- this.house = res.data.house;
|
|
|
|
- this.house_type = res.data.house_type;
|
|
|
|
- this.layer = res.data.layer;
|
|
|
|
- this.material = res.data.material;
|
|
|
|
- this.number = res.data.number;
|
|
|
|
- this.position = res.data.position;
|
|
|
|
- this.product_title = res.data.product_title;
|
|
|
|
- this.product_type = res.data.product_type;
|
|
|
|
- this.state = res.data.state;
|
|
|
|
- this.unit = res.data.unit;
|
|
|
|
- this.url_number = res.data.url_number;
|
|
|
|
- this.work = res.data.work;
|
|
|
|
- this.copy_form = this.searchData;
|
|
|
|
|
|
+ this.detailData = res.msg.data;
|
|
|
|
+ this.total = res.msg.total;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.$route.query.order_no &&
|
|
this.$route.query.order_no &&
|
|
@@ -955,25 +920,25 @@ export default {
|
|
...this.searchData,
|
|
...this.searchData,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- console.log(res.data.house_type, this.house_type);
|
|
|
|
- this.totalData = res.data.data;
|
|
|
|
- this.total = res.data.total;
|
|
|
|
- this.area_code = res.data.area_code;
|
|
|
|
- this.area_title = res.data.area_title;
|
|
|
|
- this.color = res.data.color;
|
|
|
|
- this.fashion = res.data.fashion;
|
|
|
|
- this.house = res.data.house;
|
|
|
|
- this.house_type = res.data.house_type;
|
|
|
|
- this.layer = res.data.layer;
|
|
|
|
- this.material = res.data.material;
|
|
|
|
- this.number = res.data.number;
|
|
|
|
- this.position = res.data.position;
|
|
|
|
- this.product_title = res.data.product_title;
|
|
|
|
- this.product_type = res.data.product_type;
|
|
|
|
- this.state = res.data.state;
|
|
|
|
- this.unit = res.data.unit;
|
|
|
|
- this.url_number = res.data.url_number;
|
|
|
|
- this.work = res.data.work;
|
|
|
|
|
|
+ console.log(res.msg.house_type,this.house_type)
|
|
|
|
+ this.totalData = res.msg.data;
|
|
|
|
+ this.total = res.msg.total;
|
|
|
|
+ this.area_code = res.msg.area_code;
|
|
|
|
+ this.area_title = res.msg.area_title;
|
|
|
|
+ this.color = res.msg.color;
|
|
|
|
+ this.fashion = res.msg.fashion;
|
|
|
|
+ this.house = res.msg.house;
|
|
|
|
+ this.house_type = res.msg.house_type;
|
|
|
|
+ this.layer = res.msg.layer;
|
|
|
|
+ this.material = res.msg.material;
|
|
|
|
+ this.number = res.msg.number;
|
|
|
|
+ this.position = res.msg.position;
|
|
|
|
+ this.product_title = res.msg.product_title;
|
|
|
|
+ this.product_type = res.msg.product_type;
|
|
|
|
+ this.state = res.msg.state;
|
|
|
|
+ this.unit = res.msg.unit;
|
|
|
|
+ this.url_number = res.msg.url_number;
|
|
|
|
+ this.work = res.msg.work;
|
|
this.copy_form = this.searchData;
|
|
this.copy_form = this.searchData;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -982,6 +947,7 @@ export default {
|
|
this.$Message.error(err.msg || "导入失败");
|
|
this.$Message.error(err.msg || "导入失败");
|
|
},
|
|
},
|
|
uploadSuccess(res) {
|
|
uploadSuccess(res) {
|
|
|
|
+
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$Message.success("导入成功");
|
|
this.$Message.success("导入成功");
|
|
this.search_state = true;
|
|
this.search_state = true;
|
|
@@ -989,30 +955,48 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$Message.warning(res.msg || "导入失败");
|
|
this.$Message.warning(res.msg || "导入失败");
|
|
}
|
|
}
|
|
- },
|
|
|
|
- async handleBeforeUpload() {
|
|
|
|
- this.uploadData.order_no = this.saveData.order_no;
|
|
|
|
- return true;
|
|
|
|
- },
|
|
|
|
- save() {
|
|
|
|
- if (
|
|
|
|
- this.saveData.order_no &&
|
|
|
|
- this.saveData.residential_name &&
|
|
|
|
- this.saveData.abbreviation &&
|
|
|
|
- this.saveData.custom_title &&
|
|
|
|
- this.saveData.warning_state
|
|
|
|
- ) {
|
|
|
|
|
|
+ this.page_index = 1;
|
|
|
|
+ this.page_size = 10;
|
|
this.axios
|
|
this.axios
|
|
- .post("/api/order_area_save", { ...this.saveData })
|
|
|
|
|
|
+ .post("/api/order_area_details", {
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ ...{ page_index: this.page_index, page_size: this.page_size },
|
|
|
|
+ order_no:this.saveData.order_no
|
|
|
|
+ })
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- if (res.code == 200) {
|
|
|
|
- this.$Message.success(res.msg);
|
|
|
|
- this.save_state = true;
|
|
|
|
- }
|
|
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.totalData = res.msg.data;
|
|
|
|
+ this.total = res.msg.total;
|
|
|
|
+ this.area_code = res.msg.area_code;
|
|
|
|
+ this.area_title = res.msg.area_title;
|
|
|
|
+ this.color = res.msg.color;
|
|
|
|
+ this.fashion = res.msg.fashion;
|
|
|
|
+ this.house = res.msg.house;
|
|
|
|
+ this.house_type = res.msg.house_type;
|
|
|
|
+ this.layer = res.msg.layer;
|
|
|
|
+ this.material = res.msg.material;
|
|
|
|
+ this.number = res.msg.number;
|
|
|
|
+ this.position = res.msg.position;
|
|
|
|
+ this.product_title = res.msg.product_title;
|
|
|
|
+ this.product_type = res.msg.product_type;
|
|
|
|
+ this.state = res.msg.state;
|
|
|
|
+ this.unit = res.msg.unit;
|
|
|
|
+ this.url_number = res.msg.url_number;
|
|
|
|
+ this.work = res.msg.work;
|
|
|
|
+ this.copy_form = this.searchData;
|
|
});
|
|
});
|
|
- } else {
|
|
|
|
- this.$Message.error("请填写必要信息!");
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ save() {
|
|
|
|
+ if(!this.saveData.order_no&&!this.saveData.residential_name&&!this.saveData.abbreviation&&!this.saveData.custom_title&&!this.saveData.warning_state){
|
|
|
|
+ this.$message.error('请填写必要信息!');
|
|
|
|
+ }else{
|
|
|
|
+ this.axios.post('/api/order_area_save',{...this.saveData}).then(res=>{
|
|
|
|
+ this.$message.success(res.msg)
|
|
|
|
+ this.save_state = true;
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
goback() {
|
|
goback() {
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
@@ -1027,7 +1011,7 @@ export default {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
-<style scoped lang="scss">
|
|
|
|
|
|
+<style scoped lang='scss'>
|
|
.changeDetail {
|
|
.changeDetail {
|
|
.content {
|
|
.content {
|
|
overflow: auto;
|
|
overflow: auto;
|
|
@@ -1046,11 +1030,11 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-.ivu-form-item {
|
|
|
|
- width: 250px;
|
|
|
|
|
|
+.ivu-form-item{
|
|
|
|
+ width: 250px;
|
|
}
|
|
}
|
|
-.upload {
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-around;
|
|
|
|
|
|
+.upload{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-around;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|