|
|
@@ -340,53 +340,91 @@
|
|
|
</div>
|
|
|
<div class="addAreaForm">
|
|
|
<Form :label-width="100" :model="areaItem" style="width: 60%">
|
|
|
- <FormItem label="区域编码:">
|
|
|
+ <FormItem
|
|
|
+ v-if="areaSetTableData.filter((v) => v.key == 'num')[0].is_show"
|
|
|
+ :label="areaSetTableData.filter((v) => v.key == 'num')[0].title"
|
|
|
+ >
|
|
|
<Input
|
|
|
type="text"
|
|
|
size="small"
|
|
|
:disabled="isChecked"
|
|
|
v-model="areaItem.num"
|
|
|
- placeholder="请输入区域编码"
|
|
|
+ :placeholder="
|
|
|
+ '请输入' +
|
|
|
+ areaSetTableData.filter((v) => v.key == 'num')[0].title
|
|
|
+ "
|
|
|
style="width: 120px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="区域名称:">
|
|
|
+ <FormItem
|
|
|
+ v-if="areaSetTableData.filter((v) => v.key == 'title')[0].is_show"
|
|
|
+ :label="areaSetTableData.filter((v) => v.key == 'title')[0].title"
|
|
|
+ >
|
|
|
<Input
|
|
|
type="text"
|
|
|
size="small"
|
|
|
:disabled="isChecked"
|
|
|
v-model="areaItem.title"
|
|
|
- placeholder="请输入区域名称"
|
|
|
+ :placeholder="
|
|
|
+ '请输入' +
|
|
|
+ areaSetTableData.filter((v) => v.key == 'title')[0].title
|
|
|
+ "
|
|
|
style="width: 120px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="单位:">
|
|
|
+ <FormItem
|
|
|
+ v-if="areaSetTableData.filter((v) => v.key == 'unit')[0].is_show"
|
|
|
+ :label="areaSetTableData.filter((v) => v.key == 'unit')[0].title"
|
|
|
+ >
|
|
|
<Input
|
|
|
type="text"
|
|
|
size="small"
|
|
|
:disabled="isChecked"
|
|
|
v-model="areaItem.unit"
|
|
|
- placeholder="请输入单位"
|
|
|
+ :placeholder="
|
|
|
+ '请输入' +
|
|
|
+ areaSetTableData.filter((v) => v.key == 'unit')[0].title
|
|
|
+ "
|
|
|
style="width: 120px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="工程量:">
|
|
|
+ <FormItem
|
|
|
+ v-if="
|
|
|
+ areaSetTableData.filter((v) => v.key == 'quantity')[0].is_show
|
|
|
+ "
|
|
|
+ :label="
|
|
|
+ areaSetTableData.filter((v) => v.key == 'quantity')[0].title
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
type="text"
|
|
|
size="small"
|
|
|
v-model="areaItem.quantity"
|
|
|
:disabled="isChecked"
|
|
|
- placeholder="请输入工程量"
|
|
|
+ :placeholder="
|
|
|
+ '请输入' +
|
|
|
+ areaSetTableData.filter((v) => v.key == 'quantity')[0].title
|
|
|
+ "
|
|
|
style="width: 120px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="户型:">
|
|
|
+ <FormItem
|
|
|
+ v-if="
|
|
|
+ areaSetTableData.filter((v) => v.key == 'house_type')[0].is_show
|
|
|
+ "
|
|
|
+ :label="
|
|
|
+ areaSetTableData.filter((v) => v.key == 'house_type')[0].title
|
|
|
+ "
|
|
|
+ >
|
|
|
<Input
|
|
|
type="text"
|
|
|
size="small"
|
|
|
:disabled="isChecked"
|
|
|
v-model="areaItem.house_type"
|
|
|
- placeholder="请输入户型"
|
|
|
+ :placeholder="
|
|
|
+ '请输入' +
|
|
|
+ areaSetTableData.filter((v) => v.key == 'house_type')[0].title
|
|
|
+ "
|
|
|
style="width: 120px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
@@ -404,13 +442,19 @@
|
|
|
style="width: 120px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="备注:">
|
|
|
+ <FormItem
|
|
|
+ v-if="areaSetTableData.filter((v) => v.key == 'remark')[0].is_show"
|
|
|
+ :label="areaSetTableData.filter((v) => v.key == 'remark')[0].title"
|
|
|
+ >
|
|
|
<Input
|
|
|
type="text"
|
|
|
:disabled="isChecked"
|
|
|
size="small"
|
|
|
v-model="areaItem.remark"
|
|
|
- placeholder="请输入备注"
|
|
|
+ :placeholder="
|
|
|
+ '请输入' +
|
|
|
+ areaSetTableData.filter((v) => v.key == 'remark')[0].title
|
|
|
+ "
|
|
|
style="width: 120px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
@@ -1082,13 +1126,35 @@
|
|
|
style="max-height: 700px; overflow: hidden; overflow-y: auto"
|
|
|
title="表单设置"
|
|
|
>
|
|
|
- <Table
|
|
|
- :max-height="600"
|
|
|
- border
|
|
|
- :columns="formSetTableColumns"
|
|
|
- :data="post_formSetTableData"
|
|
|
- >
|
|
|
- </Table>
|
|
|
+ <Tabs value="form1">
|
|
|
+ <TabPane label="订单表单设置" name="form1">
|
|
|
+ <Table
|
|
|
+ :max-height="600"
|
|
|
+ border
|
|
|
+ :columns="formSetTableColumns"
|
|
|
+ :data="post_formSetTableData"
|
|
|
+ >
|
|
|
+ </Table>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane label="区域表单设置" name="form2">
|
|
|
+ <Table
|
|
|
+ :max-height="600"
|
|
|
+ border
|
|
|
+ :columns="areaSetTableColumns"
|
|
|
+ :data="post_areaSetTableData"
|
|
|
+ >
|
|
|
+ </Table>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane label="产品表头设置" name="form3">
|
|
|
+ <Table
|
|
|
+ :max-height="600"
|
|
|
+ border
|
|
|
+ :columns="productSetTableColumns"
|
|
|
+ :data="post_productSetTableData"
|
|
|
+ >
|
|
|
+ </Table>
|
|
|
+ </TabPane>
|
|
|
+ </Tabs>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -1230,7 +1296,7 @@ export default {
|
|
|
{ title: "备注", key: "remark", align: "center", minWidth: 80 },
|
|
|
{
|
|
|
title: "操作",
|
|
|
- key: "remark",
|
|
|
+ key: "set",
|
|
|
align: "center",
|
|
|
slot: "Set",
|
|
|
minWidth: 120,
|
|
|
@@ -1370,6 +1436,112 @@ export default {
|
|
|
title: "备注",
|
|
|
},
|
|
|
],
|
|
|
+ areaSetTableData: [
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "num",
|
|
|
+ value: "区域编码",
|
|
|
+ title: "区域编码",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "title",
|
|
|
+ value: "区域名称",
|
|
|
+ title: "区域名称",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "unit",
|
|
|
+ value: "单位",
|
|
|
+ title: "单位",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "quantity",
|
|
|
+ value: "工程量",
|
|
|
+ title: "工程量",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "house_type",
|
|
|
+ value: "户型",
|
|
|
+ title: "户型",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "remark",
|
|
|
+ value: "备注",
|
|
|
+ title: "备注",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ productSetTableData: [
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "index",
|
|
|
+ value: "序号",
|
|
|
+ title: "序号",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "title",
|
|
|
+ value: "产品名称",
|
|
|
+ title: "产品名称",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "num",
|
|
|
+ value: "数量",
|
|
|
+ title: "数量",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "price",
|
|
|
+ value: "价格",
|
|
|
+ title: "价格",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "measure",
|
|
|
+ value: "规格",
|
|
|
+ title: "规格",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "process_property",
|
|
|
+ value: "工艺属性",
|
|
|
+ title: "工艺属性",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "url",
|
|
|
+ value: "图纸",
|
|
|
+ title: "图纸",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "left_right_mode",
|
|
|
+ value: "左右式",
|
|
|
+ title: "左右式",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "url_number",
|
|
|
+ value: "图号",
|
|
|
+ title: "图号",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "remark",
|
|
|
+ value: "备注",
|
|
|
+ title: "备注",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "set",
|
|
|
+ value: "操作",
|
|
|
+ title: "操作",
|
|
|
+ },
|
|
|
+ ],
|
|
|
formSetTableColumns: [
|
|
|
{
|
|
|
title: "是否展示",
|
|
|
@@ -1428,7 +1600,125 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
],
|
|
|
+ areaSetTableColumns: [
|
|
|
+ {
|
|
|
+ title: "是否展示",
|
|
|
+ align: "center",
|
|
|
+ key: "is_show",
|
|
|
+ minWidth: 120,
|
|
|
+ render: (h, params) => {
|
|
|
+ const { index } = params;
|
|
|
+ const currentRow = JSON.parse(
|
|
|
+ JSON.stringify(this.post_areaSetTableData[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_areaSetTableData.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_areaSetTableData[index])
|
|
|
+ );
|
|
|
+ return h("Input", {
|
|
|
+ props: {
|
|
|
+ value: currentRow.title,
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ "on-change": (e) => {
|
|
|
+ currentRow.title = e.target.value;
|
|
|
+ this.post_areaSetTableData.splice(index, 1, currentRow);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ productSetTableColumns: [
|
|
|
+ {
|
|
|
+ title: "是否展示",
|
|
|
+ align: "center",
|
|
|
+ key: "is_show",
|
|
|
+ minWidth: 120,
|
|
|
+ render: (h, params) => {
|
|
|
+ const { index } = params;
|
|
|
+ const currentRow = JSON.parse(
|
|
|
+ JSON.stringify(this.post_productSetTableData[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_productSetTableData.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_productSetTableData[index])
|
|
|
+ );
|
|
|
+ return h("Input", {
|
|
|
+ props: {
|
|
|
+ value: currentRow.title,
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ "on-change": (e) => {
|
|
|
+ currentRow.title = e.target.value;
|
|
|
+ this.post_productSetTableData.splice(index, 1, currentRow);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
post_formSetTableData: [],
|
|
|
+ post_areaSetTableData: [],
|
|
|
+ post_productSetTableData: [],
|
|
|
};
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
@@ -1949,6 +2239,12 @@ export default {
|
|
|
this.post_formSetTableData = JSON.parse(
|
|
|
JSON.stringify(this.formSetTableData)
|
|
|
);
|
|
|
+ this.post_areaSetTableData = JSON.parse(
|
|
|
+ JSON.stringify(this.areaSetTableData)
|
|
|
+ );
|
|
|
+ this.post_productSetTableData = JSON.parse(
|
|
|
+ JSON.stringify(this.productSetTableData)
|
|
|
+ );
|
|
|
} else {
|
|
|
if (res.data.table.formSet && res.data.table.formSet.length > 0) {
|
|
|
this.formSetTableData = JSON.parse(
|
|
|
@@ -1962,6 +2258,18 @@ export default {
|
|
|
JSON.stringify(this.formSetTableData)
|
|
|
);
|
|
|
}
|
|
|
+ if (res.data.table.areaSet && res.data.table.areaSet.length > 0) {
|
|
|
+ this.areaSetTableData = JSON.parse(
|
|
|
+ JSON.stringify(res.data.table.areaSet)
|
|
|
+ );
|
|
|
+ this.post_areaSetTableData = JSON.parse(
|
|
|
+ JSON.stringify(res.data.table.areaSet)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.post_areaSetTableData = JSON.parse(
|
|
|
+ JSON.stringify(this.areaSetTableData)
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -1976,6 +2284,7 @@ export default {
|
|
|
id: "ContractList_edit",
|
|
|
result: {
|
|
|
formSet: this.post_formSetTableData,
|
|
|
+ areaSet: this.post_areaSetTableData,
|
|
|
},
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
@@ -2501,9 +2810,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
/deep/ .ivu-modal-body {
|
|
|
- // display: flex;
|
|
|
- // justify-content: center;
|
|
|
- // flex-wrap: wrap;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
max-height: 700px;
|
|
|
overflow: hidden;
|
|
|
overflow-y: auto;
|