|
@@ -6,11 +6,11 @@
|
|
|
<span>{{ item.value }}</span>
|
|
|
<el-button type="primary" style="margin-left: 10px" @click="clickModal(item.key, item.table)" text v-preReClick>新增</el-button>
|
|
|
</div>
|
|
|
- <template v-if="['yoga_mat_depletion_config', 'skip_mat_depletion_config'].includes(item.key)">
|
|
|
+ <template v-if="['yoga_mat_depletion_config', 'skip_mat_depletion_config', 'base_material_price'].includes(item.key)">
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="12">
|
|
|
<el-table :data="getData(sourceList.data[item.key], 0)">
|
|
|
- <template v-for="column in item.table1">
|
|
|
+ <template v-for="column in item.table1" :key="column.prop">
|
|
|
<el-table-column :label="column.label" v-if="column.prop === 'depletion'" :width="column.width">
|
|
|
<template #default="{ row }">
|
|
|
<span>{{ row.depletion }}%</span>
|
|
@@ -27,7 +27,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-table :data="getData(sourceList.data[item.key], 1)">
|
|
|
- <template v-for="column in item.table2">
|
|
|
+ <template v-for="column in item.table2" :key="column.prop">
|
|
|
<el-table-column :label="column.label" v-if="column.prop === 'depletion'" :width="column.width">
|
|
|
<template #default="{ row }">
|
|
|
<span>{{ row.depletion }}%</span>
|
|
@@ -46,7 +46,7 @@
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<el-table :data="sourceList.data[item.key]">
|
|
|
- <template v-for="column in item.table">
|
|
|
+ <template v-for="column in item.table" :key="column.prop">
|
|
|
<el-table-column :label="column.label" :prop="column.prop" :width="column.width" />
|
|
|
</template>
|
|
|
<el-table-column label="操作" align="center" width="80">
|
|
@@ -93,7 +93,11 @@ const codeList = ref([
|
|
|
{
|
|
|
key: "base_material_price",
|
|
|
value: "基材价格",
|
|
|
- table: [
|
|
|
+ table1: [
|
|
|
+ { type: "input", prop: "name", label: "级别", width: 120, itemType: "text" },
|
|
|
+ { type: "number", prop: "price", label: "价格(每m2)", width: 120, min: 0, precision: 2, controls: false },
|
|
|
+ ],
|
|
|
+ table2: [
|
|
|
{ type: "input", prop: "name", label: "级别", width: 120, itemType: "text" },
|
|
|
{ type: "number", prop: "price", label: "价格(每m2)", width: 120, min: 0, precision: 2, controls: false },
|
|
|
],
|
|
@@ -211,6 +215,23 @@ const acquiesce = ref([
|
|
|
// },
|
|
|
},
|
|
|
]);
|
|
|
+const acquiesce2 = ref([
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ label: "类型",
|
|
|
+ prop: "type",
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ dictKey: "0",
|
|
|
+ dictValue: "体系一",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: "1",
|
|
|
+ dictValue: "体系二",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+]);
|
|
|
const clickModal = (code, list) => {
|
|
|
modalType.value = "add";
|
|
|
formData.data = {
|
|
@@ -219,6 +240,9 @@ const clickModal = (code, list) => {
|
|
|
if (["yoga_mat_depletion_config", "skip_mat_depletion_config"].includes(code)) {
|
|
|
formData.data.type = "0";
|
|
|
formConfig.value = acquiesce.value.concat(codeList.value.filter((item) => item.key === code)[0].table1);
|
|
|
+ } else if (["base_material_price"].includes(code)) {
|
|
|
+ formData.data.type = "0";
|
|
|
+ formConfig.value = acquiesce2.value.concat(codeList.value.filter((item) => item.key === code)[0].table1);
|
|
|
} else {
|
|
|
formConfig.value = list;
|
|
|
}
|