|
@@ -28,15 +28,27 @@
|
|
<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="客户名称:">
|
|
@@ -56,11 +68,7 @@
|
|
<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"
|
|
@@ -71,15 +79,27 @@
|
|
<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="详细地址:">
|
|
- <Input v-if="type == 6" v-model="saveData.address" placeholder="请输入详细地址"/>
|
|
|
|
|
|
+ <Input
|
|
|
|
+ v-if="type == 6"
|
|
|
|
+ v-model="saveData.address"
|
|
|
|
+ placeholder="请输入详细地址"
|
|
|
|
+ />
|
|
<span v-else>{{ formData.address }}</span>
|
|
<span v-else>{{ formData.address }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="手机号:">
|
|
<FormItem label="手机号:">
|
|
- <Input v-if="type == 6" v-model="saveData.mobile" placeholder="请输入手机号"/>
|
|
|
|
|
|
+ <Input
|
|
|
|
+ v-if="type == 6"
|
|
|
|
+ v-model="saveData.mobile"
|
|
|
|
+ placeholder="请输入手机号"
|
|
|
|
+ />
|
|
<span v-else>{{ formData.mobile }}</span>
|
|
<span v-else>{{ formData.mobile }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="开始日期:">
|
|
<FormItem label="开始日期:">
|
|
@@ -119,7 +139,12 @@
|
|
<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>
|
|
@@ -437,33 +462,31 @@
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</TabPane>
|
|
</TabPane>
|
|
- <div slot="extra" class="upload">
|
|
|
|
- <Button
|
|
|
|
- @click="handleTabsAdd"
|
|
|
|
- size="small"
|
|
|
|
- style="margin-right: 10px"
|
|
|
|
- type="primary"
|
|
|
|
- ghost
|
|
|
|
- v-if="type == 6"
|
|
|
|
- >新增</Button
|
|
|
|
- >
|
|
|
|
- <Upload
|
|
|
|
- :headers="headers"
|
|
|
|
- :show-upload-list="false"
|
|
|
|
- :on-error="uploadError"
|
|
|
|
- :on-success="uploadSuccess"
|
|
|
|
- :action="$store.state.ip + '/api/explode_save_import_new'"
|
|
|
|
- v-if="type == 6"
|
|
|
|
- style="margin-right: 10px"
|
|
|
|
- >
|
|
|
|
- <Button
|
|
|
|
- size="small"
|
|
|
|
- type="primary"
|
|
|
|
- ghost
|
|
|
|
- >导入</Button
|
|
|
|
- >
|
|
|
|
- </Upload>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div slot="extra" class="upload">
|
|
|
|
+ <Button
|
|
|
|
+ @click="handleTabsAdd"
|
|
|
|
+ size="small"
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
+ type="primary"
|
|
|
|
+ ghost
|
|
|
|
+ v-if="type == 6"
|
|
|
|
+ >新增</Button
|
|
|
|
+ >
|
|
|
|
+ <Upload
|
|
|
|
+ :headers="headers"
|
|
|
|
+ name="your_file"
|
|
|
|
+ :data="uploadData"
|
|
|
|
+ :show-upload-list="false"
|
|
|
|
+ :on-error="uploadError"
|
|
|
|
+ :on-success="uploadSuccess"
|
|
|
|
+ :before-upload="handleBeforeUpload"
|
|
|
|
+ :action="$store.state.ip + '/api/explode_save_import_new'"
|
|
|
|
+ v-if="type == 6"
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
+ >
|
|
|
|
+ <Button size="small" type="primary" ghost>导入</Button>
|
|
|
|
+ </Upload>
|
|
|
|
+ </div>
|
|
</Tabs>
|
|
</Tabs>
|
|
</Card>
|
|
</Card>
|
|
</div>
|
|
</div>
|
|
@@ -473,10 +496,15 @@
|
|
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 },
|
|
@@ -567,10 +595,10 @@ export default {
|
|
start_time: "",
|
|
start_time: "",
|
|
warning_state: "",
|
|
warning_state: "",
|
|
},
|
|
},
|
|
- 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: [],
|
|
@@ -608,12 +636,12 @@ 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,
|
|
page_size: 10,
|
|
page_size: 10,
|
|
- save_state:false,
|
|
|
|
|
|
+ save_state: false,
|
|
|
|
+ uploadData: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -623,13 +651,19 @@ 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.msg;
|
|
|
|
|
|
+ this.formData = res.data;
|
|
});
|
|
});
|
|
this.getData();
|
|
this.getData();
|
|
- }else{
|
|
|
|
- this.axios.get('/api/custom_list').then(res=>{ this.custom_title_list = res.data.data});
|
|
|
|
- this.axios.get('/api/warning_list').then(res=>{ this.warning_state_list = res.data.data });
|
|
|
|
- this.axios.get('/api/employee_list').then(res=>{ this.nickname_list = res.data });
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.axios.get("/api/custom_list").then((res) => {
|
|
|
|
+ this.custom_title_list = res.data.data;
|
|
|
|
+ });
|
|
|
|
+ this.axios.get("/api/warning_list").then((res) => {
|
|
|
|
+ this.warning_state_list = res.data.data;
|
|
|
|
+ });
|
|
|
|
+ this.axios.get("/api/employee_list").then((res) => {
|
|
|
|
+ this.nickname_list = res.data;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -656,30 +690,31 @@ export default {
|
|
this.page_size = 10;
|
|
this.page_size = 10;
|
|
this.axios
|
|
this.axios
|
|
.post("/api/order_area_details", {
|
|
.post("/api/order_area_details", {
|
|
- order_no: this.$route.query.order_no,
|
|
|
|
|
|
+ order_no: this.$route.query.order_no || this.saveData.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.msg.data;
|
|
|
|
- this.total = res.msg.total;
|
|
|
|
|
|
+ this.detailData = res.data.data;
|
|
|
|
+ this.total = res.data.total;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.page_index = 1;
|
|
this.page_index = 1;
|
|
this.page_size = 10;
|
|
this.page_size = 10;
|
|
- this.axios
|
|
|
|
- .post("/api/order_area_details", {
|
|
|
|
- order_no: this.$route.query.order_no,
|
|
|
|
- page_index: this.page_index,
|
|
|
|
- page_size: this.page_size,
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- console.log(res);
|
|
|
|
- this.detailData = res.msg.data;
|
|
|
|
- this.total = res.msg.total;
|
|
|
|
- });
|
|
|
|
|
|
+ this.$route.query.order_no &&
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/order_area_details", {
|
|
|
|
+ order_no: this.$route.query.order_no,
|
|
|
|
+ page_index: this.page_index,
|
|
|
|
+ page_size: this.page_size,
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.detailData = res.data.data;
|
|
|
|
+ this.total = res.data.total;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
} else if (type === 0) {
|
|
} else if (type === 0) {
|
|
// this.page_index= 1;
|
|
// this.page_index= 1;
|
|
@@ -693,8 +728,8 @@ export default {
|
|
// },
|
|
// },
|
|
// )
|
|
// )
|
|
// .then((res) => {
|
|
// .then((res) => {
|
|
- // this.totalData = res.msg.data;
|
|
|
|
- // this.total = res.msg.total;
|
|
|
|
|
|
+ // this.totalData = res.data.data;
|
|
|
|
+ // this.total = res.data.total;
|
|
// })
|
|
// })
|
|
} else {
|
|
} else {
|
|
this.page_index = 1;
|
|
this.page_index = 1;
|
|
@@ -706,84 +741,62 @@ export default {
|
|
...this.searchData,
|
|
...this.searchData,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- 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;
|
|
|
|
|
|
+ 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;
|
|
this.copy_form = this.searchData;
|
|
this.copy_form = this.searchData;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- uploadError(err) {
|
|
|
|
|
|
+ uploadError(err) {
|
|
this.$Message.error(err.msg || "上传失败");
|
|
this.$Message.error(err.msg || "上传失败");
|
|
},
|
|
},
|
|
uploadSuccess(res) {
|
|
uploadSuccess(res) {
|
|
- if(this.save_state == true){
|
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- this.$Message.success(res.msg || "上传成功");
|
|
|
|
|
|
+ console.log("111 :>> ", 111);
|
|
|
|
+ this.$Message.success(res.data || "上传成功");
|
|
|
|
+ this.getData(0);
|
|
} else {
|
|
} else {
|
|
- this.$Message.warning(res.msg || "上传失败");
|
|
|
|
|
|
+ this.$Message.warning(res.data || "上传失败");
|
|
}
|
|
}
|
|
- this.page_index = 1;
|
|
|
|
- this.page_size = 10;
|
|
|
|
|
|
+ },
|
|
|
|
+ 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.axios
|
|
this.axios
|
|
- .post("/api/order_area_details", {
|
|
|
|
- ...this.$route.query,
|
|
|
|
- ...{ page_index: this.page_index, page_size: this.page_size },
|
|
|
|
- order_no:this.saveData.order_no
|
|
|
|
- })
|
|
|
|
|
|
+ .post("/api/order_area_save", { ...this.saveData })
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- 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;
|
|
|
|
|
|
+ this.$Message.success(res.data);
|
|
|
|
+ this.save_state = true;
|
|
});
|
|
});
|
|
- }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;
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.$Message.error("请填写必要信息!");
|
|
|
|
+ }
|
|
},
|
|
},
|
|
goback() {
|
|
goback() {
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
@@ -798,7 +811,7 @@ export default {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
-<style scoped lang='scss'>
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
.changeDetail {
|
|
.changeDetail {
|
|
.content {
|
|
.content {
|
|
overflow: auto;
|
|
overflow: auto;
|
|
@@ -817,11 +830,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>
|