|
|
|
@ -70,7 +70,7 @@
|
|
|
|
|
<el-table-column label="产品编码" align="center" prop="code" />
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="name" />
|
|
|
|
|
<el-table-column label="产品别名" align="center" prop="alias" />
|
|
|
|
|
<el-table-column label="产品类型" align="center" prop="productsTypeId" />
|
|
|
|
|
<el-table-column label="产品类型" align="center" prop="productsType" />
|
|
|
|
|
<el-table-column label="规格" align="center" prop="specs" />
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
|
<el-table-column label="标签" align="center" prop="label" />
|
|
|
|
@ -280,7 +280,7 @@ const data = reactive({
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
},
|
|
|
|
|
categoryType: null,
|
|
|
|
|
categoryType: null, // 0: 一级类别; 1:二级类别; 2:三级类别
|
|
|
|
|
levelPIds: ['', ''],
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -344,6 +344,14 @@ function handleLevelChange (id, index) {
|
|
|
|
|
levelPIds.value[index] = id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 回填分类数据
|
|
|
|
|
function setCategory (info) {
|
|
|
|
|
levelPIds.value = [info.levelOneId || '', info.levelTwoId || '']
|
|
|
|
|
info.levelOneId && categoryList.value.push({ id: info.levelOneId, name: info.levelOne })
|
|
|
|
|
info.levelTwoId && categoryList.value.push({ id: info.levelTwoId, name: info.levelTwo })
|
|
|
|
|
info.levelThreeId && categoryList.value.push({ id: info.levelThreeId, name: info.levelThree })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
function cancel() {
|
|
|
|
|
open.value = false;
|
|
|
|
@ -369,8 +377,8 @@ function resetQuery() {
|
|
|
|
|
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
function handleSelectionChange(selection) {
|
|
|
|
|
ids = selection.map(item => item.id)
|
|
|
|
|
single = selection.length!==1
|
|
|
|
|
ids.value = selection.map(item => item.id)
|
|
|
|
|
single.value = selection.length!==1
|
|
|
|
|
multiple.value = !selection.length
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -387,6 +395,7 @@ function handleUpdate(row) {
|
|
|
|
|
const id = row.id || ids.value
|
|
|
|
|
getProductsRecord(id).then(response => {
|
|
|
|
|
form.value = response.data;
|
|
|
|
|
setCategory(response.data)
|
|
|
|
|
open.value = true;
|
|
|
|
|
title.value = "修改档案";
|
|
|
|
|
});
|
|
|
|
|