|
@@ -28,15 +28,27 @@
|
|
|
<div class="form">
|
|
|
<Form class="form_content" :label-width="100">
|
|
|
<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>
|
|
|
</FormItem>
|
|
|
<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>
|
|
|
</FormItem>
|
|
|
<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>
|
|
|
</FormItem>
|
|
|
<FormItem label="客户名称:">
|
|
@@ -57,11 +69,7 @@
|
|
|
<span v-else>{{ formData.custom_title }}</span>
|
|
|
</FormItem>
|
|
|
<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
|
|
|
v-for="(item, index) in warning_state_list"
|
|
|
:key="index"
|
|
@@ -72,7 +80,11 @@
|
|
|
<span v-else>{{ formData.warning_state }}</span>
|
|
|
</FormItem>
|
|
|
<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>
|
|
|
</FormItem>
|
|
|
<FormItem label="详细地址:">
|
|
@@ -155,7 +167,12 @@
|
|
|
<span v-else>{{ formData.nickname }}</span>
|
|
|
</FormItem>
|
|
|
<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>
|
|
|
</FormItem>
|
|
|
</Form>
|
|
@@ -448,20 +465,20 @@
|
|
|
<template slot="setSlot" slot-scope="{ row }">
|
|
|
<a @click="handleGoPage(row)">详情</a>
|
|
|
</template>
|
|
|
- <template slot="urlSet" slot-scope="{ index }">
|
|
|
- <div
|
|
|
- class="items"
|
|
|
- v-show="totalData[index].url.length !== 0 ? true : false"
|
|
|
- >
|
|
|
- <img
|
|
|
- @click="looks(totalData[index].url)"
|
|
|
- v-for="(el, idx) in totalData[index].url"
|
|
|
- :key="idx"
|
|
|
- :src="$store.state.ip + el"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <template slot="urlSet" slot-scope="{ index }">
|
|
|
+ <div
|
|
|
+ class="items"
|
|
|
+ v-show="totalData[index].url.length !== 0 ? true : false"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ @click="looks(totalData[index].url)"
|
|
|
+ v-for="(el, idx) in totalData[index].url"
|
|
|
+ :key="idx"
|
|
|
+ :src="$store.state.ip + el"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</Table>
|
|
|
<Page
|
|
|
:page-size-opts="[10, 20, 30, 40, 100, 1000]"
|
|
@@ -480,20 +497,20 @@
|
|
|
<template slot="setSlot" slot-scope="{ row }">
|
|
|
<a @click="handleGoPage(row)">详情</a>
|
|
|
</template>
|
|
|
- <template slot="urlSet" slot-scope="{ index }">
|
|
|
- <div
|
|
|
- class="items"
|
|
|
- v-show="detailData[index].url.length !== 0 ? true : false"
|
|
|
- >
|
|
|
- <img
|
|
|
- @click="looks(detailData[index].url)"
|
|
|
- v-for="(el, idx) in detailData[index].url"
|
|
|
- :key="idx"
|
|
|
- :src="$store.state.ip + el"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <template slot="urlSet" slot-scope="{ index }">
|
|
|
+ <div
|
|
|
+ class="items"
|
|
|
+ v-show="detailData[index].url.length !== 0 ? true : false"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ @click="looks(detailData[index].url)"
|
|
|
+ v-for="(el, idx) in detailData[index].url"
|
|
|
+ :key="idx"
|
|
|
+ :src="$store.state.ip + el"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</Table>
|
|
|
<Page
|
|
|
:page-size-opts="[10, 20, 30, 40, 100, 1000]"
|
|
@@ -541,10 +558,15 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
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: [
|
|
|
{ type: "selection", align: "center", width: 60 },
|
|
|
{ title: "序号", align: "center", type: "index", minWidth: 200 },
|
|
@@ -569,7 +591,13 @@ export default {
|
|
|
{ title: "材质", align: "center", key: "material", minWidth: 200 },
|
|
|
{ title: "颜色", align: "center", key: "color", minWidth: 200 },
|
|
|
{ title: "工艺", align: "center", key: "work", minWidth: 200 },
|
|
|
- { title: "图纸", align: "center", key: "url", minWidth: 200 ,slot:"urlSet"},
|
|
|
+ {
|
|
|
+ title: "图纸",
|
|
|
+ align: "center",
|
|
|
+ key: "url",
|
|
|
+ minWidth: 200,
|
|
|
+ slot: "urlSet",
|
|
|
+ },
|
|
|
{
|
|
|
title: "左右式",
|
|
|
align: "center",
|
|
@@ -646,7 +674,13 @@ export default {
|
|
|
{ title: "材质", align: "center", key: "material", minWidth: 200 },
|
|
|
{ title: "颜色", align: "center", key: "color", minWidth: 200 },
|
|
|
{ title: "工艺", align: "center", key: "work", minWidth: 200 },
|
|
|
- { title: "图纸", align: "center", key: "url", minWidth: 200 ,slot:"urlSet"},
|
|
|
+ {
|
|
|
+ title: "图纸",
|
|
|
+ align: "center",
|
|
|
+ key: "url",
|
|
|
+ minWidth: 200,
|
|
|
+ slot: "urlSet",
|
|
|
+ },
|
|
|
{
|
|
|
title: "左右式",
|
|
|
align: "center",
|
|
@@ -695,10 +729,10 @@ export default {
|
|
|
custom_detail_mobile: "",
|
|
|
custom_detail_id: "",
|
|
|
},
|
|
|
- formData:{},
|
|
|
- custom_title_list:[],
|
|
|
- warning_state_list:[],
|
|
|
- nickname_list:[],
|
|
|
+ formData: {},
|
|
|
+ custom_title_list: [],
|
|
|
+ warning_state_list: [],
|
|
|
+ nickname_list: [],
|
|
|
searchData: {
|
|
|
area_code: [],
|
|
|
area_title: [],
|
|
@@ -713,7 +747,7 @@ export default {
|
|
|
url_number: [],
|
|
|
product_title: [],
|
|
|
material: "",
|
|
|
- color: '',
|
|
|
+ color: "",
|
|
|
work: "",
|
|
|
state: "",
|
|
|
},
|
|
@@ -749,16 +783,19 @@ export default {
|
|
|
clientDetailList_address: [],
|
|
|
};
|
|
|
},
|
|
|
- computed:{
|
|
|
- uploadData(){
|
|
|
- return {order_no:this.saveData.order_no||this.$route.query.order_no}
|
|
|
- }
|
|
|
+ computed: {
|
|
|
+ uploadData() {
|
|
|
+ return { order_no: this.saveData.order_no || this.$route.query.order_no };
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
if (this.$route.query.type == 3) {
|
|
|
this.axios
|
|
|
.get("/api/order_area_orders", {
|
|
|
- params: { order_no: this.$route.query.order_no },
|
|
|
+ params: {
|
|
|
+ order_no: this.$route.query.order_no,
|
|
|
+ oa_id: this.$route.query.oa_id,
|
|
|
+ },
|
|
|
})
|
|
|
.then((res) => {
|
|
|
this.formData = res.data;
|
|
@@ -779,7 +816,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- looks(arr) {
|
|
|
+ looks(arr) {
|
|
|
// const array = [{ img_url: img }];
|
|
|
const array = arr.map((v) => {
|
|
|
return { img_url: v };
|
|
@@ -791,9 +828,7 @@ export default {
|
|
|
baseTitleField: "",
|
|
|
});
|
|
|
},
|
|
|
- handleBeforeUpload(){
|
|
|
-
|
|
|
- },
|
|
|
+ handleBeforeUpload() {},
|
|
|
handleClientDetailChange(val) {
|
|
|
val && (this.info.custom_detail_id = val);
|
|
|
},
|
|
@@ -876,12 +911,12 @@ export default {
|
|
|
this.getData(1);
|
|
|
},
|
|
|
getData(type) {
|
|
|
- console.log('type :>> ', type);
|
|
|
if (type === 1) {
|
|
|
if (this.search_state) {
|
|
|
this.axios
|
|
|
.post("/api/order_area_details", {
|
|
|
order_no: this.$route.query.order_no,
|
|
|
+ oa_id: this.$route.query.oa_id,
|
|
|
page_index: this.page_index,
|
|
|
page_size: this.page_size,
|
|
|
...this.searchData,
|
|
@@ -896,6 +931,7 @@ export default {
|
|
|
this.axios
|
|
|
.post("/api/order_area_details", {
|
|
|
order_no: this.$route.query.order_no || this.saveData.order_no,
|
|
|
+ oa_id: this.$route.query.oa_id,
|
|
|
page_index: this.page_index,
|
|
|
page_size: this.page_size,
|
|
|
})
|
|
@@ -923,12 +959,13 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else if (type === 0) {
|
|
|
- console.log('111 :>> ', 111);
|
|
|
+ console.log("111 :>> ", 111);
|
|
|
this.axios
|
|
|
.post("/api/order_area_details", {
|
|
|
- type:1,
|
|
|
+ type: 1,
|
|
|
order_no: this.$route.query.order_no || this.saveData.order_no,
|
|
|
page_index: this.page_index,
|
|
|
+ oa_id: this.$route.query.oa_id,
|
|
|
page_size: this.page_size,
|
|
|
...this.searchData,
|
|
|
})
|
|
@@ -959,21 +996,22 @@ export default {
|
|
|
this.axios
|
|
|
.post("/api/order_area_details", {
|
|
|
type: this.$route.query.type,
|
|
|
+ oa_id: this.$route.query.oa_id,
|
|
|
order_no: this.$route.query.order_no || this.saveData.order_no,
|
|
|
...{ page_index: this.page_index, page_size: this.page_size },
|
|
|
...this.searchData,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- console.log(res.msg.house_type,this.house_type)
|
|
|
-
|
|
|
+ console.log(res.msg.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.color = res.data.color;
|
|
|
this.fashion = res.data.fashion;
|
|
|
this.house = res.data.house;
|
|
|
- this.house_type = res.data.house_type ;
|
|
|
+ this.house_type = res.data.house_type;
|
|
|
this.layer = res.data.layer;
|
|
|
this.material = res.data.material;
|
|
|
this.number = res.data.number;
|
|
@@ -983,7 +1021,7 @@ export default {
|
|
|
this.state = res.data.state;
|
|
|
this.unit = res.data.unit;
|
|
|
this.url_number = res.data.url_number;
|
|
|
- this.work = res.data.work ;
|
|
|
+ this.work = res.data.work;
|
|
|
this.copy_form = this.searchData;
|
|
|
});
|
|
|
}
|
|
@@ -992,7 +1030,6 @@ export default {
|
|
|
this.$Message.error(err.msg || "导入失败");
|
|
|
},
|
|
|
uploadSuccess(res) {
|
|
|
-
|
|
|
if (res.code == 200) {
|
|
|
this.$Message.success("导入成功");
|
|
|
this.search_state = true;
|
|
@@ -1032,16 +1069,22 @@ export default {
|
|
|
// });
|
|
|
},
|
|
|
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;
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ 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() {
|
|
|
this.$router.go(-1);
|
|
@@ -1056,7 +1099,7 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-<style scoped lang='scss'>
|
|
|
+<style scoped lang="scss">
|
|
|
.changeDetail {
|
|
|
.content {
|
|
|
overflow: auto;
|
|
@@ -1075,23 +1118,23 @@ 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;
|
|
|
}
|
|
|
- .items {
|
|
|
- width: auto;
|
|
|
- height: 40px;
|
|
|
- margin-bottom: 10px;
|
|
|
+.items {
|
|
|
+ width: auto;
|
|
|
+ height: 40px;
|
|
|
+ margin-bottom: 10px;
|
|
|
overflow: hidden;
|
|
|
- border-radius: 5px;
|
|
|
- position: relative;
|
|
|
- img {
|
|
|
- max-width: 40px;
|
|
|
- max-height: 40px;
|
|
|
- }
|
|
|
+ border-radius: 5px;
|
|
|
+ position: relative;
|
|
|
+ img {
|
|
|
+ max-width: 40px;
|
|
|
+ max-height: 40px;
|
|
|
}
|
|
|
-</style>
|
|
|
+}
|
|
|
+</style>
|