|
@@ -56,6 +56,7 @@
|
|
filterable
|
|
filterable
|
|
clearable
|
|
clearable
|
|
v-model="saveData.custom_title"
|
|
v-model="saveData.custom_title"
|
|
|
|
+ @on-change="handleCustomSelect"
|
|
v-if="type == 6"
|
|
v-if="type == 6"
|
|
>
|
|
>
|
|
<Option
|
|
<Option
|
|
@@ -87,20 +88,47 @@
|
|
<span v-else>{{ formData.front_money }}</span>
|
|
<span v-else>{{ formData.front_money }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="详细地址:">
|
|
<FormItem label="详细地址:">
|
|
- <Input
|
|
|
|
|
|
+ <Select
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
v-if="type == 6"
|
|
v-if="type == 6"
|
|
- v-model="saveData.address"
|
|
|
|
- placeholder="请输入详细地址"
|
|
|
|
- />
|
|
|
|
|
|
+ class="auto-width"
|
|
|
|
+ @on-change="handleClientDetailChange"
|
|
|
|
+ v-model="saveData.custom_detail_id"
|
|
|
|
+ >
|
|
|
|
+ <Option
|
|
|
|
+ v-for="item in clientDetailList_address"
|
|
|
|
+ :label="item.address"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></Option>
|
|
|
|
+ </Select>
|
|
<span v-else>{{ formData.address }}</span>
|
|
<span v-else>{{ formData.address }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="手机号:">
|
|
<FormItem label="手机号:">
|
|
- <Input
|
|
|
|
|
|
+ <Select
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
v-if="type == 6"
|
|
v-if="type == 6"
|
|
- v-model="saveData.mobile"
|
|
|
|
- placeholder="请输入手机号"
|
|
|
|
- />
|
|
|
|
- <span v-else>{{ formData.mobile }}</span>
|
|
|
|
|
|
+ v-model="saveData.custom_detail_mobile"
|
|
|
|
+ >
|
|
|
|
+ <Option
|
|
|
|
+ v-for="item in clientDetailList_mobile"
|
|
|
|
+ :label="item.mobile"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :value="item.mobile"
|
|
|
|
+ ></Option>
|
|
|
|
+ </Select>
|
|
|
|
+ <!-- <span v-else>{{ formData.mobile }}</span> -->
|
|
|
|
+ <span v-else>{{
|
|
|
|
+ clientDetailList_mobile.filter(
|
|
|
|
+ (v) => v.mobile == saveData.custom_detail_mobile
|
|
|
|
+ ).length > 0
|
|
|
|
+ ? clientDetailList_mobile.filter(
|
|
|
|
+ (v) => v.mobile == saveData.custom_detail_mobile
|
|
|
|
+ )[0].mobile
|
|
|
|
+ : formData.mobile
|
|
|
|
+ }}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="开始日期:">
|
|
<FormItem label="开始日期:">
|
|
<DatePicker
|
|
<DatePicker
|
|
@@ -433,7 +461,11 @@
|
|
style="margin: 0 auto"
|
|
style="margin: 0 auto"
|
|
>
|
|
>
|
|
<div v-show="tab === 1">
|
|
<div v-show="tab === 1">
|
|
- <Table :columns="totalColumns" :data="totalData" border> </Table>
|
|
|
|
|
|
+ <Table :columns="totalColumns" :data="totalData" border>
|
|
|
|
+ <template slot="setSlot" slot-scope="{ row }">
|
|
|
|
+ <a @click="handleGoPage(row)">详情</a>
|
|
|
|
+ </template>
|
|
|
|
+ </Table>
|
|
<Page
|
|
<Page
|
|
:page-size-opts="[10, 20, 30, 40, 100, 1000]"
|
|
:page-size-opts="[10, 20, 30, 40, 100, 1000]"
|
|
@on-page-size-change="changeTotalSize"
|
|
@on-page-size-change="changeTotalSize"
|
|
@@ -448,6 +480,9 @@
|
|
</div>
|
|
</div>
|
|
<div v-show="tab === 2">
|
|
<div v-show="tab === 2">
|
|
<Table :columns="detailColumns" :data="detailData" border>
|
|
<Table :columns="detailColumns" :data="detailData" border>
|
|
|
|
+ <template slot="setSlot" slot-scope="{ row }">
|
|
|
|
+ <a @click="handleGoPage(row)">详情</a>
|
|
|
|
+ </template>
|
|
</Table>
|
|
</Table>
|
|
<Page
|
|
<Page
|
|
:page-size-opts="[10, 20, 30, 40, 100, 1000]"
|
|
:page-size-opts="[10, 20, 30, 40, 100, 1000]"
|
|
@@ -481,7 +516,6 @@
|
|
:on-success="uploadSuccess"
|
|
:on-success="uploadSuccess"
|
|
:before-upload="handleBeforeUpload"
|
|
:before-upload="handleBeforeUpload"
|
|
:action="$store.state.ip + '/api/explode_save_import_new'"
|
|
:action="$store.state.ip + '/api/explode_save_import_new'"
|
|
- v-if="type == 6"
|
|
|
|
style="margin-right: 10px"
|
|
style="margin-right: 10px"
|
|
>
|
|
>
|
|
<Button size="small" type="primary" ghost>导入</Button>
|
|
<Button size="small" type="primary" ghost>导入</Button>
|
|
@@ -530,10 +564,36 @@ export default {
|
|
{ title: "颜色", align: "center", key: "color", minWidth: 200 },
|
|
{ title: "颜色", align: "center", key: "color", minWidth: 200 },
|
|
{ title: "工艺", align: "center", key: "work", minWidth: 200 },
|
|
{ title: "工艺", align: "center", key: "work", minWidth: 200 },
|
|
{ title: "图纸", align: "center", key: "url", minWidth: 200 },
|
|
{ title: "图纸", align: "center", key: "url", minWidth: 200 },
|
|
- { title: "左右式", align: "center", key: "fashion", minWidth: 200 },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: "左右式",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "fashion",
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ render: (h, params) => {
|
|
|
|
+ const { row } = params;
|
|
|
|
+ return h(
|
|
|
|
+ "span",
|
|
|
|
+ {},
|
|
|
|
+ row.left_right_mode == 1
|
|
|
|
+ ? "左式"
|
|
|
|
+ : row.left_right_mode == 2
|
|
|
|
+ ? "右式"
|
|
|
|
+ : "无"
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ },
|
|
{ title: "备注", align: "center", key: "remark", minWidth: 200 },
|
|
{ title: "备注", align: "center", key: "remark", minWidth: 200 },
|
|
- { title: "拆单状态", align: "center", key: "state", minWidth: 200 },
|
|
|
|
- { title: "操作", align: "center", minWidth: 200 },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: "拆单状态",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "state",
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ render: (h, params) => {
|
|
|
|
+ const { row } = params;
|
|
|
|
+ return h("span", {}, row.state == 0 ? "未拆单" : "已拆单");
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ { title: "操作", align: "center", minWidth: 200, slot: "setSlot" },
|
|
],
|
|
],
|
|
totalData: [],
|
|
totalData: [],
|
|
headers: { Authorization: localStorage.getItem("token") },
|
|
headers: { Authorization: localStorage.getItem("token") },
|
|
@@ -565,9 +625,15 @@ export default {
|
|
key: "product_title",
|
|
key: "product_title",
|
|
minWidth: 200,
|
|
minWidth: 200,
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ title: "计量单位",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "product_unit",
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ },
|
|
{ title: "图号", align: "center", key: "url_number", minWidth: 200 },
|
|
{ title: "图号", align: "center", key: "url_number", minWidth: 200 },
|
|
{ title: "型号", align: "center", key: "model", minWidth: 200 },
|
|
{ title: "型号", align: "center", key: "model", minWidth: 200 },
|
|
- { title: "数量", align: "center", key: "num", minWidth: 200 },
|
|
|
|
|
|
+ // { title: "数量", align: "center", key: "num", minWidth: 200 },
|
|
{ title: "长", align: "center", key: "long", minWidth: 200 },
|
|
{ title: "长", align: "center", key: "long", minWidth: 200 },
|
|
{ title: "宽", align: "center", key: "wide", minWidth: 200 },
|
|
{ title: "宽", align: "center", key: "wide", minWidth: 200 },
|
|
{ title: "高", align: "center", key: "high", minWidth: 200 },
|
|
{ title: "高", align: "center", key: "high", minWidth: 200 },
|
|
@@ -575,10 +641,36 @@ export default {
|
|
{ title: "颜色", align: "center", key: "color", minWidth: 200 },
|
|
{ title: "颜色", align: "center", key: "color", minWidth: 200 },
|
|
{ title: "工艺", align: "center", key: "work", minWidth: 200 },
|
|
{ title: "工艺", align: "center", key: "work", minWidth: 200 },
|
|
{ title: "图纸", align: "center", key: "url", minWidth: 200 },
|
|
{ title: "图纸", align: "center", key: "url", minWidth: 200 },
|
|
- { title: "左右式", align: "center", key: "fashion", minWidth: 200 },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: "左右式",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "fashion",
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ render: (h, params) => {
|
|
|
|
+ const { row } = params;
|
|
|
|
+ return h(
|
|
|
|
+ "span",
|
|
|
|
+ {},
|
|
|
|
+ row.left_right_mode == 1
|
|
|
|
+ ? "左式"
|
|
|
|
+ : row.left_right_mode == 2
|
|
|
|
+ ? "右式"
|
|
|
|
+ : "无"
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ },
|
|
{ title: "备注", align: "center", key: "remark", minWidth: 200 },
|
|
{ title: "备注", align: "center", key: "remark", minWidth: 200 },
|
|
- { title: "拆单状态", align: "center", key: "state", minWidth: 200 },
|
|
|
|
- { title: "操作", align: "center", minWidth: 200 },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: "拆单状态",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "state",
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ render: (h, params) => {
|
|
|
|
+ const { row } = params;
|
|
|
|
+ return h("span", {}, row.state == 0 ? "未拆单" : "已拆单");
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ { title: "操作", align: "center", minWidth: 200, slot: "setSlot" },
|
|
],
|
|
],
|
|
detailData: [],
|
|
detailData: [],
|
|
saveData: {
|
|
saveData: {
|
|
@@ -594,6 +686,8 @@ export default {
|
|
residential_name: "",
|
|
residential_name: "",
|
|
start_time: "",
|
|
start_time: "",
|
|
warning_state: "",
|
|
warning_state: "",
|
|
|
|
+ custom_detail_mobile: "",
|
|
|
|
+ custom_detail_id: "",
|
|
},
|
|
},
|
|
formData: {},
|
|
formData: {},
|
|
custom_title_list: [],
|
|
custom_title_list: [],
|
|
@@ -642,7 +736,11 @@ export default {
|
|
page_size: 10,
|
|
page_size: 10,
|
|
save_state: false,
|
|
save_state: false,
|
|
uploadData: {},
|
|
uploadData: {},
|
|
- currency_tag: 1,
|
|
|
|
|
|
+ currency_tag: 0,
|
|
|
|
+ clientDetailList: [],
|
|
|
|
+ clientDetailList_respon: [],
|
|
|
|
+ clientDetailList_mobile: [],
|
|
|
|
+ clientDetailList_address: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -662,23 +760,86 @@ export default {
|
|
this.axios.get("/api/warning_list").then((res) => {
|
|
this.axios.get("/api/warning_list").then((res) => {
|
|
this.warning_state_list = res.data.data;
|
|
this.warning_state_list = res.data.data;
|
|
});
|
|
});
|
|
- this.axios.get("/api/employee_list").then((res) => {
|
|
|
|
- this.nickname_list = res.data;
|
|
|
|
- });
|
|
|
|
|
|
+ this.axios
|
|
|
|
+ .get("/api/employee_list", { params: { type: 2 } })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.nickname_list = res.data;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleClientDetailChange(val) {
|
|
|
|
+ val && (this.info.custom_detail_id = val);
|
|
|
|
+ },
|
|
|
|
+ handleCustomSelect(id) {
|
|
|
|
+ id &&
|
|
|
|
+ this.axios({
|
|
|
|
+ method: "get",
|
|
|
|
+ url: "/api/custom_detail",
|
|
|
|
+ params: { id },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.clientDetailList = res.data.list;
|
|
|
|
+ // 去重负责人
|
|
|
|
+ this.clientDetailList_respon = this.unique(res.data.list);
|
|
|
|
+ // 赋值默认负责人
|
|
|
|
+ this.saveData.custom_detail_name = this.clientDetailList_respon[0].service_name;
|
|
|
|
+ // 取出手机号码是该负责人的
|
|
|
|
+ this.clientDetailList_mobile = this.clientDetailList.filter(
|
|
|
|
+ (item) => item.service_name == this.saveData.custom_detail_name
|
|
|
|
+ );
|
|
|
|
+ // 赋值默认手机号码
|
|
|
|
+ this.saveData.custom_detail_mobile = this.clientDetailList_mobile[0].mobile;
|
|
|
|
+ // 去重手机号码
|
|
|
|
+ this.clientDetailList_mobile = this.unique(
|
|
|
|
+ this.clientDetailList_mobile
|
|
|
|
+ );
|
|
|
|
+ // 取出地址是该负责人的
|
|
|
|
+ this.clientDetailList_address = this.clientDetailList.filter(
|
|
|
|
+ (item) => item.service_name == this.saveData.custom_detail_name
|
|
|
|
+ );
|
|
|
|
+ // 赋值默认地址
|
|
|
|
+ this.saveData.custom_detail_id =
|
|
|
|
+ this.clientDetailList_respon[0].id || 0;
|
|
|
|
+ this.saveData.service_id = res.data.detail.service_id;
|
|
|
|
+ // this.$forceUpdate();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ unique(array) {
|
|
|
|
+ let arr = JSON.parse(JSON.stringify(array));
|
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
|
+ for (var j = i + 1; j < arr.length; j++) {
|
|
|
|
+ if (arr[i].service_name == arr[j].service_name) {
|
|
|
|
+ //第一个等同于第二个,splice方法删除第二个
|
|
|
|
+ arr.splice(j, 1);
|
|
|
|
+ j--;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return arr;
|
|
|
|
+ },
|
|
|
|
+ handleGoPage(row) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/cms/BidSystem/ProductDeOrder/deorderdetail",
|
|
|
|
+ query: {
|
|
|
|
+ type: 3,
|
|
|
|
+ order_no: this.$route.query.order_no || this.saveData.order_no,
|
|
|
|
+ oa_id: row.oa_id,
|
|
|
|
+ orders_area_product_detail_id: row.id,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
handleTabsChange(name) {
|
|
handleTabsChange(name) {
|
|
this.currency_tag = name;
|
|
this.currency_tag = name;
|
|
this.getData(name);
|
|
this.getData(name);
|
|
},
|
|
},
|
|
changeTotalSize(e) {
|
|
changeTotalSize(e) {
|
|
this.page_size = e;
|
|
this.page_size = e;
|
|
- this.getData();
|
|
|
|
|
|
+ this.getData(0);
|
|
},
|
|
},
|
|
changeTotalPage(e) {
|
|
changeTotalPage(e) {
|
|
this.page_index = e;
|
|
this.page_index = e;
|
|
- this.getTotalData();
|
|
|
|
|
|
+ this.getData(0);
|
|
},
|
|
},
|
|
changeDetailSize(e) {
|
|
changeDetailSize(e) {
|
|
this.page_size = e;
|
|
this.page_size = e;
|
|
@@ -689,11 +850,9 @@ export default {
|
|
this.getData(1);
|
|
this.getData(1);
|
|
},
|
|
},
|
|
getData(type) {
|
|
getData(type) {
|
|
|
|
+ console.log('type :>> ', type);
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
if (this.search_state) {
|
|
if (this.search_state) {
|
|
- console.log("1 :>> ", 1);
|
|
|
|
- this.page_index = 1;
|
|
|
|
- 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 || this.saveData.order_no,
|
|
order_no: this.$route.query.order_no || this.saveData.order_no,
|
|
@@ -724,8 +883,6 @@ export default {
|
|
this.copy_form = this.searchData;
|
|
this.copy_form = this.searchData;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- this.page_index = 1;
|
|
|
|
- this.page_size = 10;
|
|
|
|
this.$route.query.order_no &&
|
|
this.$route.query.order_no &&
|
|
this.axios
|
|
this.axios
|
|
.post("/api/order_area_details", {
|
|
.post("/api/order_area_details", {
|
|
@@ -757,26 +914,43 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
} else if (type === 0) {
|
|
} else if (type === 0) {
|
|
- // this.page_index= 1;
|
|
|
|
- // this.page_size = 10;
|
|
|
|
- // this.axios
|
|
|
|
- // .post("/api/order_area_details",
|
|
|
|
- // {
|
|
|
|
- // ...this.$route.query,
|
|
|
|
- // ...{ page_index: this.page_index, page_size: this.page_size },
|
|
|
|
- // ...this.searchData
|
|
|
|
- // },
|
|
|
|
- // )
|
|
|
|
- // .then((res) => {
|
|
|
|
- // this.totalData = res.data.data;
|
|
|
|
- // this.total = res.data.total;
|
|
|
|
- // })
|
|
|
|
|
|
+ console.log('111 :>> ', 111);
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/order_area_details", {
|
|
|
|
+ type:1,
|
|
|
|
+ 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);
|
|
|
|
+ this.detailData = res.data.data;
|
|
|
|
+ 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;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
- this.page_index = 1;
|
|
|
|
- this.page_size = 10;
|
|
|
|
this.axios
|
|
this.axios
|
|
.post("/api/order_area_details", {
|
|
.post("/api/order_area_details", {
|
|
- ...this.$route.query,
|
|
|
|
|
|
+ type: this.$route.query.type,
|
|
|
|
+ order_no: this.$route.query.order_no || this.saveData.order_no,
|
|
...{ page_index: this.page_index, page_size: this.page_size },
|
|
...{ page_index: this.page_index, page_size: this.page_size },
|
|
...this.searchData,
|
|
...this.searchData,
|
|
})
|
|
})
|
|
@@ -805,15 +979,15 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
uploadError(err) {
|
|
uploadError(err) {
|
|
- 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(res.data || "上传成功");
|
|
|
|
|
|
+ this.$Message.success("导入成功");
|
|
this.search_state = true;
|
|
this.search_state = true;
|
|
this.getData(this.currency_tag);
|
|
this.getData(this.currency_tag);
|
|
} else {
|
|
} else {
|
|
- this.$Message.warning(res.data || "上传失败");
|
|
|
|
|
|
+ this.$Message.warning(res.msg || "导入失败");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async handleBeforeUpload() {
|
|
async handleBeforeUpload() {
|
|
@@ -848,7 +1022,7 @@ export default {
|
|
},
|
|
},
|
|
search() {
|
|
search() {
|
|
this.search_state = true;
|
|
this.search_state = true;
|
|
- this.getData();
|
|
|
|
|
|
+ this.getData(this.currency_tag);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|