|
@@ -11,6 +11,12 @@
|
|
|
>
|
|
>
|
|
|
<slot name="titleButton">
|
|
<slot name="titleButton">
|
|
|
<Button
|
|
<Button
|
|
|
|
|
+ @click="showForms = true"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
|
+ >表单设置</Button
|
|
|
|
|
+ >
|
|
|
|
|
+ <Button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
style="margin-right: 10px"
|
|
style="margin-right: 10px"
|
|
|
:disabled="isChecked"
|
|
:disabled="isChecked"
|
|
@@ -43,7 +49,10 @@
|
|
|
</Toptitle>
|
|
</Toptitle>
|
|
|
<div class="top_search">
|
|
<div class="top_search">
|
|
|
<Form :model="formData" :label-width="100" class="top_search_form">
|
|
<Form :model="formData" :label-width="100" class="top_search_form">
|
|
|
- <FormItem label="订单号:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="formSetTableData.filter((v) => v.key == 'order_no')[0].is_show"
|
|
|
|
|
+ :label="formSetTableData.filter((v) => v.key == 'order_no')[0].title"
|
|
|
|
|
+ >
|
|
|
<Input
|
|
<Input
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
@@ -53,7 +62,15 @@
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
/>
|
|
/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="项目名称:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'residential_name')[0]
|
|
|
|
|
+ .is_show
|
|
|
|
|
+ "
|
|
|
|
|
+ :label="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'residential_name')[0].title
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<Input
|
|
<Input
|
|
|
type="text"
|
|
type="text"
|
|
|
:disabled="isChecked"
|
|
:disabled="isChecked"
|
|
@@ -63,7 +80,10 @@
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
/>
|
|
/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="客户姓名:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="formSetTableData.filter((v) => v.key == 'custom_id')[0].is_show"
|
|
|
|
|
+ :label="formSetTableData.filter((v) => v.key == 'custom_id')[0].title"
|
|
|
|
|
+ >
|
|
|
<Select
|
|
<Select
|
|
|
clearable
|
|
clearable
|
|
|
filterable
|
|
filterable
|
|
@@ -81,7 +101,14 @@
|
|
|
></Option>
|
|
></Option>
|
|
|
</Select>
|
|
</Select>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="紧急程度:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'warning_state')[0].is_show
|
|
|
|
|
+ "
|
|
|
|
|
+ :label="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'warning_state')[0].title
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<Select
|
|
<Select
|
|
|
v-model="formData.warning_state"
|
|
v-model="formData.warning_state"
|
|
|
:disabled="isChecked"
|
|
:disabled="isChecked"
|
|
@@ -96,7 +123,14 @@
|
|
|
></Option>
|
|
></Option>
|
|
|
</Select>
|
|
</Select>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="项目定金:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'front_money')[0].is_show
|
|
|
|
|
+ "
|
|
|
|
|
+ :label="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'front_money')[0].title
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<Input
|
|
<Input
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
@@ -113,7 +147,15 @@
|
|
|
:disabled="isChecked">已收款</Radio>
|
|
:disabled="isChecked">已收款</Radio>
|
|
|
</RadioGroup> -->
|
|
</RadioGroup> -->
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="详细地址:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'custom_detail_id')[0]
|
|
|
|
|
+ .is_show
|
|
|
|
|
+ "
|
|
|
|
|
+ :label="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'custom_detail_id')[0].title
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<Select
|
|
<Select
|
|
|
clearable
|
|
clearable
|
|
|
filterable
|
|
filterable
|
|
@@ -131,7 +173,15 @@
|
|
|
></Option>
|
|
></Option>
|
|
|
</Select>
|
|
</Select>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="手机号:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'custom_detail_id')[0]
|
|
|
|
|
+ .is_show
|
|
|
|
|
+ "
|
|
|
|
|
+ :label="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'custom_detail_id')[0].title
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<Select
|
|
<Select
|
|
|
clearable
|
|
clearable
|
|
|
filterable
|
|
filterable
|
|
@@ -149,7 +199,14 @@
|
|
|
></Option>
|
|
></Option>
|
|
|
</Select>
|
|
</Select>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="开始日期:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'start_time')[0].is_show
|
|
|
|
|
+ "
|
|
|
|
|
+ :label="
|
|
|
|
|
+ formSetTableData.filter((v) => v.key == 'start_time')[0].title
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<DatePicker
|
|
<DatePicker
|
|
|
type="date"
|
|
type="date"
|
|
|
size="small"
|
|
size="small"
|
|
@@ -161,7 +218,10 @@
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
></DatePicker>
|
|
></DatePicker>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="结束日期:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="formSetTableData.filter((v) => v.key == 'end_time')[0].is_show"
|
|
|
|
|
+ :label="formSetTableData.filter((v) => v.key == 'end_time')[0].title"
|
|
|
|
|
+ >
|
|
|
<DatePicker
|
|
<DatePicker
|
|
|
type="date"
|
|
type="date"
|
|
|
size="small"
|
|
size="small"
|
|
@@ -173,7 +233,10 @@
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
></DatePicker>
|
|
></DatePicker>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="业务员:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="formSetTableData.filter((v) => v.key == 'salesman')[0].is_show"
|
|
|
|
|
+ :label="formSetTableData.filter((v) => v.key == 'salesman')[0].title"
|
|
|
|
|
+ >
|
|
|
<Select
|
|
<Select
|
|
|
v-model="formData.salesman"
|
|
v-model="formData.salesman"
|
|
|
filterable
|
|
filterable
|
|
@@ -215,7 +278,10 @@
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
/>
|
|
/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
- <FormItem label="备注:">
|
|
|
|
|
|
|
+ <FormItem
|
|
|
|
|
+ v-if="formSetTableData.filter((v) => v.key == 'remark')[0].is_show"
|
|
|
|
|
+ :label="formSetTableData.filter((v) => v.key == 'remark')[0].title"
|
|
|
|
|
+ >
|
|
|
<Input
|
|
<Input
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
:disabled="isChecked"
|
|
:disabled="isChecked"
|
|
@@ -1008,6 +1074,22 @@
|
|
|
<Button type="primary" @click="handleAddInputConfirm">确认</Button>
|
|
<Button type="primary" @click="handleAddInputConfirm">确认</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</Modal>
|
|
</Modal>
|
|
|
|
|
+ <!-- 表单设置 -->
|
|
|
|
|
+ <Modal
|
|
|
|
|
+ v-model="showForms"
|
|
|
|
|
+ @on-ok="postForms(1)"
|
|
|
|
|
+ class-name="vertical-center-modal"
|
|
|
|
|
+ style="max-height: 700px; overflow: hidden; overflow-y: auto"
|
|
|
|
|
+ title="表单设置"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Table
|
|
|
|
|
+ :max-height="600"
|
|
|
|
|
+ border
|
|
|
|
|
+ :columns="formSetTableColumns"
|
|
|
|
|
+ :data="post_formSetTableData"
|
|
|
|
|
+ >
|
|
|
|
|
+ </Table>
|
|
|
|
|
+ </Modal>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -1219,6 +1301,134 @@ export default {
|
|
|
clientList: [],
|
|
clientList: [],
|
|
|
clientDetailList: [],
|
|
clientDetailList: [],
|
|
|
type: this.$route.query.type,
|
|
type: this.$route.query.type,
|
|
|
|
|
+ showForms: false,
|
|
|
|
|
+ formSetTableData: [
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "order_no",
|
|
|
|
|
+ value: "订单编号",
|
|
|
|
|
+ title: "订单编号",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "residential_name",
|
|
|
|
|
+ value: "项目名称",
|
|
|
|
|
+ title: "项目名称",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "custom_id",
|
|
|
|
|
+ value: "客户姓名",
|
|
|
|
|
+ title: "客户姓名",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "warning_state",
|
|
|
|
|
+ value: "紧急程度",
|
|
|
|
|
+ title: "紧急程度",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "front_money",
|
|
|
|
|
+ value: "项目定金",
|
|
|
|
|
+ title: "项目定金",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "custom_detail_id",
|
|
|
|
|
+ value: "详细地址",
|
|
|
|
|
+ title: "详细地址",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "custom_detail_id",
|
|
|
|
|
+ value: "手机号",
|
|
|
|
|
+ title: "手机号",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "start_time",
|
|
|
|
|
+ value: "开始日期",
|
|
|
|
|
+ title: "开始日期",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "end_time",
|
|
|
|
|
+ value: "结束日期",
|
|
|
|
|
+ title: "结束日期",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "salesman",
|
|
|
|
|
+ value: "业务员",
|
|
|
|
|
+ title: "业务员",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ is_show: true,
|
|
|
|
|
+ key: "remark",
|
|
|
|
|
+ value: "备注",
|
|
|
|
|
+ title: "备注",
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ formSetTableColumns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "是否展示",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ key: "is_show",
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ render: (h, params) => {
|
|
|
|
|
+ const { index } = params;
|
|
|
|
|
+ const currentRow = JSON.parse(
|
|
|
|
|
+ JSON.stringify(this.post_formSetTableData[index])
|
|
|
|
|
+ );
|
|
|
|
|
+ return h("Checkbox", {
|
|
|
|
|
+ props: {
|
|
|
|
|
+ value: currentRow.is_show,
|
|
|
|
|
+ // disabled:
|
|
|
|
|
+ // currentRow.key == "fax_price" ||
|
|
|
|
|
+ // currentRow.key == "remark",
|
|
|
|
|
+ },
|
|
|
|
|
+ on: {
|
|
|
|
|
+ "on-change": (e) => {
|
|
|
|
|
+ currentRow.is_show = e;
|
|
|
|
|
+ this.post_formSetTableData.splice(index, 1, currentRow);
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "字段名",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ key: "value",
|
|
|
|
|
+ minWidth: 180,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "展示名称",
|
|
|
|
|
+ align: "center",
|
|
|
|
|
+ key: "title",
|
|
|
|
|
+ minWidth: 180,
|
|
|
|
|
+ render: (h, params) => {
|
|
|
|
|
+ const { index } = params;
|
|
|
|
|
+ const currentRow = JSON.parse(
|
|
|
|
|
+ JSON.stringify(this.post_formSetTableData[index])
|
|
|
|
|
+ );
|
|
|
|
|
+ return h("Input", {
|
|
|
|
|
+ props: {
|
|
|
|
|
+ value: currentRow.title,
|
|
|
|
|
+ type: "text",
|
|
|
|
|
+ },
|
|
|
|
|
+ on: {
|
|
|
|
|
+ "on-change": (e) => {
|
|
|
|
|
+ currentRow.title = e.target.value;
|
|
|
|
|
+ this.post_formSetTableData.splice(index, 1, currentRow);
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ post_formSetTableData: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -1240,6 +1450,7 @@ export default {
|
|
|
this.axios.get("/api/custom_list").then((res) => {
|
|
this.axios.get("/api/custom_list").then((res) => {
|
|
|
this.clientList = res.data.data;
|
|
this.clientList = res.data.data;
|
|
|
});
|
|
});
|
|
|
|
|
+ this.get_forms();
|
|
|
},
|
|
},
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -1286,9 +1497,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
this.formData = res.data;
|
|
this.formData = res.data;
|
|
|
- // console.log('supTableData :>> ', this.supTableData);
|
|
|
|
|
this.supTableData = res.data.ext;
|
|
this.supTableData = res.data.ext;
|
|
|
- // console.log('supTableData :>> ', this.supTableData);
|
|
|
|
|
if (this.formData.list.length == 0) {
|
|
if (this.formData.list.length == 0) {
|
|
|
this.formData.list.push({
|
|
this.formData.list.push({
|
|
|
areaIndex: 1,
|
|
areaIndex: 1,
|
|
@@ -1511,12 +1720,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
postData() {
|
|
postData() {
|
|
|
this.formData.list.map((list) => {
|
|
this.formData.list.map((list) => {
|
|
|
- list.product.map((product) => {
|
|
|
|
|
- product.special &&
|
|
|
|
|
- product.special.map((value) => {
|
|
|
|
|
- value.value = product[value.key];
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ list.product &&
|
|
|
|
|
+ list.product.length > 0 &&
|
|
|
|
|
+ list.product.map((product) => {
|
|
|
|
|
+ product.special &&
|
|
|
|
|
+ product.special.map((value) => {
|
|
|
|
|
+ value.value = product[value.key];
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
//1新增 2编辑
|
|
//1新增 2编辑
|
|
|
let ip;
|
|
let ip;
|
|
@@ -1652,7 +1863,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
//新增产品添加
|
|
//新增产品添加
|
|
|
handleAddPDTAdd(index, row) {
|
|
handleAddPDTAdd(index, row) {
|
|
|
- console.log("row :>> ", row);
|
|
|
|
|
this.tempPDTList.splice(index + 1, 0, {
|
|
this.tempPDTList.splice(index + 1, 0, {
|
|
|
addPDTProcessAttrList: [],
|
|
addPDTProcessAttrList: [],
|
|
|
measure: "",
|
|
measure: "",
|
|
@@ -1731,6 +1941,50 @@ export default {
|
|
|
this.showPDTModal = false;
|
|
this.showPDTModal = false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ get_forms() {
|
|
|
|
|
+ this.axios
|
|
|
|
|
+ .post("/api/update/get_table", { id: "ContractList_edit" })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (Array.isArray(res.data)) {
|
|
|
|
|
+ this.post_formSetTableData = JSON.parse(
|
|
|
|
|
+ JSON.stringify(this.formSetTableData)
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (res.data.table.formSet && res.data.table.formSet.length > 0) {
|
|
|
|
|
+ this.formSetTableData = JSON.parse(
|
|
|
|
|
+ JSON.stringify(res.data.table.formSet)
|
|
|
|
|
+ );
|
|
|
|
|
+ this.post_formSetTableData = JSON.parse(
|
|
|
|
|
+ JSON.stringify(res.data.table.formSet)
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.post_formSetTableData = JSON.parse(
|
|
|
|
|
+ JSON.stringify(this.formSetTableData)
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ postForms(n) {
|
|
|
|
|
+ this.post_formSetTableData.forEach((element, index) => {
|
|
|
|
|
+ element.sort = index;
|
|
|
|
|
+ });
|
|
|
|
|
+ this.axios({
|
|
|
|
|
+ method: "post",
|
|
|
|
|
+ url: "/api/update/table",
|
|
|
|
|
+ data: {
|
|
|
|
|
+ id: "ContractList_edit",
|
|
|
|
|
+ result: {
|
|
|
|
|
+ formSet: this.post_formSetTableData,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.$Message.success(res.msg);
|
|
|
|
|
+ this.get_forms();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
// 编辑产品→确认
|
|
// 编辑产品→确认
|
|
|
handlePDTEditConfirm() {
|
|
handlePDTEditConfirm() {
|
|
|
this.PDTEdit.process_property = "";
|
|
this.PDTEdit.process_property = "";
|
|
@@ -2247,9 +2501,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
/deep/ .ivu-modal-body {
|
|
/deep/ .ivu-modal-body {
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
|
|
+ // display: flex;
|
|
|
|
|
+ // justify-content: center;
|
|
|
|
|
+ // flex-wrap: wrap;
|
|
|
max-height: 700px;
|
|
max-height: 700px;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|