|
@@ -2,17 +2,21 @@
|
|
|
<div class="borderless">
|
|
|
<div class="customer-head">
|
|
|
<div class="customer-back">
|
|
|
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
- @click="backToList">返回列表
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ style="border: none;background: none;color: red"
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ @click="backToList"
|
|
|
+ >返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<el-button
|
|
|
- class="el-button--small-yh add-customer-btn"
|
|
|
- type="primary"
|
|
|
- :disabled="disabled"
|
|
|
- @click="editProductInfo"
|
|
|
- size="small"
|
|
|
- >{{ form.id ? '确认修改' : '确认新增' }}
|
|
|
+ class="el-button--small-yh add-customer-btn"
|
|
|
+ type="primary"
|
|
|
+ :disabled="disabled"
|
|
|
+ @click="editProductInfo"
|
|
|
+ size="small"
|
|
|
+ >{{ form.id ? "确认修改" : "确认新增" }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div style="margin-top: 60px">
|
|
@@ -21,16 +25,20 @@
|
|
|
<avue-form ref="form" v-model="form" :option="option">
|
|
|
<template slot="goodsTypeId" slot-scope="scope">
|
|
|
<avue-input-tree
|
|
|
- v-model="form.goodsTypeId"
|
|
|
- :props="{ label: 'title', value: 'id' }"
|
|
|
- multiple
|
|
|
- placeholder=" "
|
|
|
- type="tree"
|
|
|
- :dic="dicData"/>
|
|
|
+ v-model="form.goodsTypeId"
|
|
|
+ :props="{ label: 'title', value: 'id' }"
|
|
|
+ multiple
|
|
|
+ placeholder=" "
|
|
|
+ type="tree"
|
|
|
+ :dic="dicData"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template slot="corpId" slot-scope="scope">
|
|
|
- <selectComponent v-model="form.corpId"
|
|
|
- :configuration="configuration" style="width: 100%"/>
|
|
|
+ <selectComponent
|
|
|
+ v-model="form.corpId"
|
|
|
+ :configuration="configuration"
|
|
|
+ style="width: 100%"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template slot="a" slot-scope="scope">
|
|
|
<el-input
|
|
@@ -46,7 +54,12 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {getDetail, updateDetail, getDeptTree, priceDelete} from "@/api/basicData/commodityType";
|
|
|
+import {
|
|
|
+ getDetail,
|
|
|
+ updateDetail,
|
|
|
+ getDeptTree,
|
|
|
+ priceDelete
|
|
|
+} from "@/api/basicData/commodityType";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -56,12 +69,12 @@ export default {
|
|
|
multipleChoices: false,
|
|
|
multiple: false,
|
|
|
collapseTags: false,
|
|
|
- placeholder: '请点击右边按钮选择',
|
|
|
+ placeholder: "请点击右边按钮选择",
|
|
|
dicData: []
|
|
|
},
|
|
|
form: {},
|
|
|
disabled: false,
|
|
|
- userDialog: false,//供应商导入窗口
|
|
|
+ userDialog: false, //供应商导入窗口
|
|
|
dicData: [],
|
|
|
detailsSelect: {},
|
|
|
option: {
|
|
@@ -78,7 +91,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "产品名称",
|
|
@@ -103,7 +116,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "花纹",
|
|
@@ -115,7 +128,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "品牌",
|
|
@@ -127,20 +140,23 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "状态",
|
|
|
prop: "status",
|
|
|
span: 8,
|
|
|
- type: 'select',
|
|
|
- dicData: [{
|
|
|
- label: '正常',
|
|
|
- value: 0
|
|
|
- }, {
|
|
|
- label: '停用',
|
|
|
- value: 1
|
|
|
- }],
|
|
|
+ type: "select",
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "正常",
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "停用",
|
|
|
+ value: 1
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "规格",
|
|
@@ -152,7 +168,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "规格1",
|
|
@@ -164,7 +180,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "规格2",
|
|
@@ -176,7 +192,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "级别",
|
|
@@ -188,7 +204,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "产地",
|
|
@@ -200,12 +216,12 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "三包",
|
|
|
prop: "threeGuarantees",
|
|
|
- span: 8,
|
|
|
+ span: 8
|
|
|
},
|
|
|
{
|
|
|
label: "供应商",
|
|
@@ -217,11 +233,11 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "箱立方",
|
|
|
- prop: "a",
|
|
|
+ prop: "cntrVolumn",
|
|
|
span: 8,
|
|
|
rules: [
|
|
|
{
|
|
@@ -229,7 +245,7 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
@@ -239,8 +255,8 @@ export default {
|
|
|
span: 24
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
- }
|
|
|
+ }
|
|
|
+ };
|
|
|
},
|
|
|
//初始化查询
|
|
|
created() {
|
|
@@ -249,10 +265,10 @@ export default {
|
|
|
});
|
|
|
if (this.$route.query.id) {
|
|
|
getDetail(JSON.parse(this.$route.query.id)).then(res => {
|
|
|
- this.form = res.data.data
|
|
|
- })
|
|
|
+ this.form = res.data.data;
|
|
|
+ });
|
|
|
} else {
|
|
|
- this.$set(this.form, "goodsTypeId", this.$route.query.treeDeptId)
|
|
|
+ this.$set(this.form, "goodsTypeId", this.$route.query.treeDeptId);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -267,25 +283,30 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
rowContactCell(row, index) {
|
|
|
- this.$refs.crudContact.rowCell(row, index)
|
|
|
+ this.$refs.crudContact.rowCell(row, index);
|
|
|
},
|
|
|
rowPurchaseCell(row, index) {
|
|
|
- this.$refs.crudPurchase.rowCell(row, index)
|
|
|
+ this.$refs.crudPurchase.rowCell(row, index);
|
|
|
},
|
|
|
//修改提交触发
|
|
|
editProductInfo() {
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
//校验明细列表
|
|
|
if (valid) {
|
|
|
+ this.configuration.dicData.forEach(e => {
|
|
|
+ if (e.id == this.form.corpId) {
|
|
|
+ this.form.corpName = e.cname;
|
|
|
+ }
|
|
|
+ });
|
|
|
const params = {
|
|
|
...this.form,
|
|
|
- type: 0,
|
|
|
- }
|
|
|
+ type: 0
|
|
|
+ };
|
|
|
updateDetail(params).then(res => {
|
|
|
if (res.data.success) {
|
|
|
- this.$message.success("操作成功!")
|
|
|
+ this.$message.success("操作成功!");
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
@@ -295,16 +316,15 @@ export default {
|
|
|
backToList() {
|
|
|
this.$router.$avueRouter.closeTag();
|
|
|
this.$router.push({
|
|
|
- path: '/basicData/productInformation/index',
|
|
|
+ path: "/basicData/productInformation/index",
|
|
|
query: {}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
.back-icon {
|
|
|
line-height: 64px;
|
|
|
font-size: 20px;
|
|
@@ -320,7 +340,8 @@ export default {
|
|
|
margin: 1vh auto 0 !important;
|
|
|
padding-bottom: 10px !important;
|
|
|
|
|
|
- .el-dialog__body, .el-dialog__footer {
|
|
|
+ .el-dialog__body,
|
|
|
+ .el-dialog__footer {
|
|
|
padding-bottom: 0 !important;
|
|
|
padding-top: 0 !important;
|
|
|
}
|