| | |
| | | <div class="app-container product-view"> |
| | | <div class="left"> |
| | | <div> |
| | | <el-input |
| | | v-model="search" |
| | | <el-input v-model="search" |
| | | style="width: 210px" |
| | | placeholder="输入关键字进行搜索" |
| | | @change="searchFilter" |
| | | @clear="searchFilter" |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | <el-button |
| | | type="primary" |
| | | @click="openProDia('addOne')" |
| | | style="margin-left: 10px" |
| | | >新增产品大类</el-button |
| | | > |
| | | prefix-icon="Search" /> |
| | | <el-button type="primary" |
| | | @click="openProDia1('addOne')" |
| | | style="margin-left: 10px">新增产品大类</el-button> |
| | | </div> |
| | | <div ref="containerRef"> |
| | | <el-tree |
| | | ref="tree" |
| | | <el-tree ref="tree" |
| | | v-loading="treeLoad" |
| | | :data="list" |
| | | @node-click="handleNodeClick" |
| | |
| | | highlight-current |
| | | node-key="id" |
| | | class="product-tree-scroll" |
| | | style="height: calc(100vh - 190px); overflow-y: auto" |
| | | > |
| | | style="height: calc(100vh - 190px); overflow-y: auto"> |
| | | <template #default="{ node, data }"> |
| | | <div class="custom-tree-node"> |
| | | <span class="tree-node-content"> |
| | |
| | | </el-icon> |
| | | <span class="tree-node-label">{{ data.label }}</span> |
| | | </span> |
| | | <div> |
| | | <el-button |
| | | type="primary" |
| | | <div v-if="!node.childNodes.length"> |
| | | <el-button type="primary" |
| | | link |
| | | @click="openProDia('edit', data)" |
| | | > |
| | | @click="openProDia('edit', data)"> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button type="primary" link @click="openProDia('add', data)" :disabled="node.level >= 3"> |
| | | <el-button v-if="data.children && data.children.length > 0" |
| | | type="primary" |
| | | link |
| | | @click="openProDia('add', data)"> |
| | | 添加产品 |
| | | </el-button> |
| | | <el-button |
| | | v-if="!node.childNodes.length" |
| | | <el-button v-if="!node.childNodes.length" |
| | | style="margin-left: 4px" |
| | | type="danger" |
| | | link |
| | | @click="remove(node, data)" |
| | | > |
| | | @click="remove(node, data)"> |
| | | 删除 |
| | | </el-button> |
| | | </div> |
| | | <div v-else> |
| | | <!-- 大类 --> |
| | | <el-button type="primary" |
| | | link |
| | | @click="openProDia1('edit', data)"> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button v-if="data.children && data.children.length > 0" |
| | | type="primary" |
| | | link |
| | | @click="openProDia('add', data)"> |
| | | 添加产品 |
| | | </el-button> |
| | | <el-button style="margin-left: 4px" |
| | | type="danger" |
| | | link |
| | | @click="remove1(node, data)"> |
| | | 删除 |
| | | </el-button> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <div style="margin-bottom: 10px" v-if="isShowButton"> |
| | | <el-button type="primary" @click="openModelDia('add')"> |
| | | <div style="margin-bottom: 10px" |
| | | v-if="isShowButton"> |
| | | <el-button type="primary" |
| | | @click="openModelDia('add')"> |
| | | 新增规格型号 |
| | | </el-button> |
| | | <ImportExcel :product-id="currentId" @uploadSuccess="getModelList" /> |
| | | <el-button |
| | | type="danger" |
| | | <ImportExcel :product-id="currentId" |
| | | @uploadSuccess="getModelList" /> |
| | | <el-button type="danger" |
| | | @click="handleDelete" |
| | | style="margin-left: 10px" |
| | | plain |
| | | > |
| | | plain> |
| | | 删除 |
| | | </el-button> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | | <PIMTable rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | ></PIMTable> |
| | | @pagination="pagination"></PIMTable> |
| | | </div> |
| | | <el-dialog v-model="productDia" title="产品" width="400px" @keydown.enter.prevent> |
| | | <el-form |
| | | :model="form" |
| | | <el-dialog v-model="productDia" |
| | | title="产品" |
| | | width="400px" |
| | | @keydown.enter.prevent> |
| | | <el-form :model="form" |
| | | label-width="140px" |
| | | label-position="top" |
| | | :rules="rules" |
| | | ref="formRef" |
| | | > |
| | | ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="产品名称:" prop="productName"> |
| | | <el-input |
| | | v-model="form.productName" |
| | | <el-form-item label="产品名称:" |
| | | prop="materialName"> |
| | | <el-input v-model="form.materialName" |
| | | placeholder="请输入产品名称" |
| | | maxlength="20" |
| | | show-word-limit |
| | | clearable |
| | | @keydown.enter.prevent |
| | | /> |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="存货类别:" |
| | | prop="inventoryCategoryId"> |
| | | <el-select v-model="form.inventoryCategoryId" |
| | | placeholder="请选择存货类别" |
| | | clearable |
| | | style="width: 100%"> |
| | | <el-option v-for="item in inventoryCategoryList" |
| | | :key="item.id" |
| | | :label="item.configName" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="物料类型:" |
| | | prop="materialTypeId"> |
| | | <el-select v-model="form.materialTypeId" |
| | | placeholder="请选择物料类型" |
| | | clearable |
| | | style="width: 100%"> |
| | | <el-option v-for="item in materialTypeList" |
| | | :key="item.id" |
| | | :label="item.configName" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="基本单位:" |
| | | prop="baseUnit"> |
| | | <el-input v-model="form.baseUnit" |
| | | placeholder="请输入基本单位" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="备注:"> |
| | | <el-input v-model="form.remark" |
| | | placeholder="请输入备注" |
| | | type="textarea" |
| | | :rows="3" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button type="primary" |
| | | @click="submitForm">确认</el-button> |
| | | <el-button @click="closeProDia">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog |
| | | v-model="modelDia" |
| | | <el-dialog v-model="modelDia" |
| | | title="规格型号" |
| | | width="400px" |
| | | @close="closeModelDia" |
| | | @keydown.enter.prevent |
| | | > |
| | | <el-form |
| | | :model="modelForm" |
| | | @keydown.enter.prevent> |
| | | <el-form :model="modelForm" |
| | | label-width="140px" |
| | | label-position="top" |
| | | :rules="modelRules" |
| | | ref="modelFormRef" |
| | | > |
| | | ref="modelFormRef"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="规格型号:" prop="model"> |
| | | <el-input |
| | | v-model="modelForm.model" |
| | | <el-form-item label="规格型号:" |
| | | prop="model"> |
| | | <el-input v-model="modelForm.model" |
| | | placeholder="请输入规格型号" |
| | | clearable |
| | | @keydown.enter.prevent |
| | | /> |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="单位:" prop="unit"> |
| | | <el-input |
| | | v-model="modelForm.unit" |
| | | <el-form-item label="单位:" |
| | | prop="unit"> |
| | | <el-input v-model="modelForm.unit" |
| | | placeholder="请输入单位" |
| | | clearable |
| | | @keydown.enter.prevent |
| | | /> |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="标识符代码:" |
| | | prop="identifierCode"> |
| | | <el-input v-model="modelForm.identifierCode" |
| | | placeholder="请输入标识符代码" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="物料代码:" |
| | | prop="materialCode"> |
| | | <el-input v-model="modelForm.materialCode" |
| | | placeholder="请输入物料代码" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="规格:" |
| | | prop="specification"> |
| | | <el-input v-model="modelForm.specification" |
| | | placeholder="请输入规格" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="供应类型:" |
| | | prop="supplyType"> |
| | | <el-input v-model="modelForm.supplyType" |
| | | placeholder="请输入供应类型" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="创始人姓名:" |
| | | prop="originatorName"> |
| | | <el-input v-model="modelForm.originatorName" |
| | | placeholder="请输入创始人姓名" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="创始人组织:" |
| | | prop="originatorOrg"> |
| | | <el-input v-model="modelForm.originatorOrg" |
| | | placeholder="请输入创始人组织" |
| | | clearable |
| | | @keydown.enter.prevent /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitModelForm">确认</el-button> |
| | | <el-button type="primary" |
| | | @click="submitModelForm">确认</el-button> |
| | | <el-button @click="closeModelDia">取消</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { |
| | | addOrEditProduct, |
| | | updateOrEditProduct, |
| | | getinventoryCategoryList, |
| | | getmaterialTypeList, |
| | | addOrEditProductModel, |
| | | updateOrEditProductModel, |
| | | delProduct, |
| | | delProductModel, |
| | | modelListPage, |
| | | productTreeList, |
| | | } from "@/api/basicData/product.js"; |
| | | addOrEditProductConfig, |
| | | updateOrEditProductConfig, |
| | | delProductConfig, |
| | | } from "@/api/basicData/newProduct.js"; |
| | | import ImportExcel from "./ImportExcel/index.vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | const treeLoad = ref(false); |
| | | const list = ref([]); |
| | | const expandedKeys = ref([]); |
| | | const inventoryCategoryList = ref([]); |
| | | const materialTypeList = ref([]); |
| | | |
| | | // 获取存货类别列表 |
| | | const getInventoryCategoryList = () => { |
| | | getinventoryCategoryList() |
| | | .then(res => { |
| | | inventoryCategoryList.value = res.data.map(item => ({ |
| | | id: item.id, |
| | | configName: item.configName, |
| | | })); |
| | | }) |
| | | .catch(err => { |
| | | console.error("获取存货类别失败:", err); |
| | | }); |
| | | }; |
| | | |
| | | // 获取物料类型列表 |
| | | const getMaterialTypeList = () => { |
| | | getmaterialTypeList() |
| | | .then(res => { |
| | | materialTypeList.value = res.data.map(item => ({ |
| | | id: item.id, |
| | | configName: item.configName, |
| | | })); |
| | | }) |
| | | .catch(err => { |
| | | console.error("获取物料类型失败:", err); |
| | | }); |
| | | }; |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "规格型号", |
| | | prop: "model", |
| | | prop: "materialName", |
| | | }, |
| | | { |
| | | label: "规格", |
| | | prop: "specification", |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | prop: "baseUnit", |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | { |
| | | name: "编辑", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | clickFun: row => { |
| | | openModelDia("edit", row); |
| | | }, |
| | | }, |
| | |
| | | }); |
| | | const data = reactive({ |
| | | form: { |
| | | productName: "", |
| | | materialTypeId: null, |
| | | inventoryCategoryId: null, |
| | | materialName: "", |
| | | baseUnit: "", |
| | | remark: "", |
| | | }, |
| | | rules: { |
| | | productName: [ |
| | | materialName: [ |
| | | { required: true, message: "请输入", trigger: "blur" }, |
| | | { max: 20, message: "产品名称不能超过20个字符", trigger: "blur" }, |
| | | ], |
| | | inventoryCategoryId: [ |
| | | { required: true, message: "请选择", trigger: "change" }, |
| | | ], |
| | | baseUnit: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | }, |
| | | modelForm: { |
| | | model: "", |
| | | unit: "", |
| | | identifierCode: "", |
| | | materialCode: "", |
| | | specification: "", |
| | | supplyType: "", |
| | | originatorName: "", |
| | | originatorOrg: "", |
| | | }, |
| | | modelRules: { |
| | | model: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | unit: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | identifierCode: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | materialCode: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | specification: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | supplyType: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | originatorName: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | originatorOrg: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | }, |
| | | }); |
| | | const { form, rules, modelForm, modelRules } = toRefs(data); |
| | |
| | | const getProductTreeList = () => { |
| | | treeLoad.value = true; |
| | | productTreeList() |
| | | .then((res) => { |
| | | list.value = res; |
| | | list.value.forEach((a) => { |
| | | expandedKeys.value.push(a.label); |
| | | }); |
| | | .then(res => { |
| | | // 转换新的数据格式 |
| | | const newList = []; |
| | | expandedKeys.value = []; |
| | | for (const category of res.data) { |
| | | // 添加分类节点 |
| | | const categoryNode = { |
| | | label: category.configName, |
| | | id: category.configId, |
| | | children: category.materialList.map(item => ({ |
| | | id: item.id, |
| | | label: item.materialName, |
| | | inventoryCategoryId: item.inventoryCategoryId, |
| | | materialTypeId: item.materialTypeId, |
| | | remark: item.remark, |
| | | baseUnit: item.baseUnit, |
| | | })), |
| | | }; |
| | | newList.push(categoryNode); |
| | | expandedKeys.value.push(category.configName); |
| | | } |
| | | list.value = newList; |
| | | treeLoad.value = false; |
| | | }) |
| | | .catch((err) => { |
| | | .catch(err => { |
| | | treeLoad.value = false; |
| | | }); |
| | | }; |
| | |
| | | const openProDia = (type, data) => { |
| | | operationType.value = type; |
| | | productDia.value = true; |
| | | form.value.productName = ""; |
| | | if (type === "edit") { |
| | | form.value.productName = data.productName; |
| | | // 重置表单 |
| | | form.value = { |
| | | materialName: "", |
| | | inventoryCategoryId: null, |
| | | baseUnit: "", |
| | | remark: "", |
| | | materialTypeId: null, |
| | | }; |
| | | console.log(data); |
| | | if (type === "edit" && data) { |
| | | // 编辑模式,回填数据 |
| | | form.value.materialName = data.label || ""; |
| | | form.value.inventoryCategoryId = data.inventoryCategoryId || null; |
| | | form.value.baseUnit = data.baseUnit || ""; |
| | | form.value.remark = data.remark || ""; |
| | | form.value.materialTypeId = data.materialTypeId || null; |
| | | form.value.id = data.id || null; |
| | | } else { |
| | | form.value.materialTypeId = data.id || null; |
| | | } |
| | | }; |
| | | // 打开规格型号弹框 |
| | | const openModelDia = (type, data) => { |
| | | modelOperationType.value = type; |
| | | modelDia.value = true; |
| | | // 重置所有字段 |
| | | modelForm.value.model = ""; |
| | | modelForm.value.model = ""; |
| | | modelForm.value.unit = ""; |
| | | modelForm.value.identifierCode = ""; |
| | | modelForm.value.materialCode = ""; |
| | | modelForm.value.specification = ""; |
| | | modelForm.value.supplyType = ""; |
| | | modelForm.value.originatorName = ""; |
| | | modelForm.value.originatorOrg = ""; |
| | | modelForm.value.id = ""; |
| | | if (type === "edit") { |
| | | |
| | | if (type === "edit" && data) { |
| | | // 编辑模式,回填数据 |
| | | modelForm.value = { ...data }; |
| | | } |
| | | }; |
| | | // 提交产品名称修改 |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate((valid) => { |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | if (operationType.value === "add") { |
| | | form.value.parentId = currentId.value; |
| | | form.value.id = ""; |
| | | } else if (operationType.value === "addOne") { |
| | | form.value.id = ""; |
| | | form.value.parentId = ""; |
| | | } else { |
| | | form.value.id = currentId.value; |
| | | form.value.parentId = ""; |
| | | } |
| | | addOrEditProduct(form.value).then((res) => { |
| | | // 构建提交参数 |
| | | // const params = { |
| | | // materialTypeId: null, |
| | | // inventoryCategoryId: form.value.inventoryCategoryId, |
| | | // materialName: form.value.materialName, |
| | | // baseUnit: form.value.baseUnit, |
| | | // remark: form.value.remark, |
| | | // }; |
| | | |
| | | // if (operationType.value === "add") { |
| | | // // 添加子级,传父级的id作为 materialTypeId |
| | | // params.materialTypeId = currentId.value; |
| | | // } else if (operationType.value === "addOne") { |
| | | // // 添加一级,materialTypeId 为 null |
| | | // params.materialTypeId = null; |
| | | // } else { |
| | | // // 编辑,传当前id作为 materialTypeId |
| | | // params.materialTypeId = currentId.value; |
| | | // } |
| | | console.log(form.value); |
| | | console.log(operationType.value); |
| | | if (operationType.value != "edit") { |
| | | addOrEditProduct(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeProDia(); |
| | | getProductTreeList(); |
| | | }); |
| | | } else { |
| | | updateOrEditProduct(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeProDia(); |
| | | getProductTreeList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | // 关闭产品弹框 |
| | | const closeProDia = () => { |
| | | proxy.$refs.formRef.resetFields(); |
| | | // 手动重置非表单字段 |
| | | form.value.materialTypeId = null; |
| | | form.value.remark = ""; |
| | | productDia.value = false; |
| | | }; |
| | | |
| | |
| | | .then(() => { |
| | | tableLoading.value = true; |
| | | delProduct(ids) |
| | | .then((res) => { |
| | | .then(res => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getProductTreeList(); |
| | | }) |
| | |
| | | |
| | | // 提交规格型号修改 |
| | | const submitModelForm = () => { |
| | | proxy.$refs.modelFormRef.validate((valid) => { |
| | | proxy.$refs.modelFormRef.validate(valid => { |
| | | if (valid) { |
| | | modelForm.value.productId = currentId.value; |
| | | addOrEditProductModel(modelForm.value).then((res) => { |
| | | // 构建提交参数 |
| | | const params = { |
| | | materialId: currentId.value, |
| | | identifierCode: modelForm.value.identifierCode, |
| | | materialCode: modelForm.value.materialCode, |
| | | specification: modelForm.value.specification, |
| | | supplyType: modelForm.value.supplyType, |
| | | originatorName: modelForm.value.originatorName, |
| | | originatorOrg: modelForm.value.originatorOrg, |
| | | }; |
| | | if (modelOperationType.value === "add") { |
| | | // 添加规格型号 |
| | | addOrEditProductModel(params).then(res => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeModelDia(); |
| | | getModelList(); |
| | | }); |
| | | } else if (modelOperationType.value === "edit") { |
| | | // 修改规格型号 |
| | | updateOrEditProductModel(params).then(res => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeModelDia(); |
| | | getModelList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | |
| | | modelDia.value = false; |
| | | }; |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | const handleSelectionChange = selection => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | |
| | | // 查询规格型号 |
| | | const pagination = (obj) => { |
| | | const pagination = obj => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getModelList(); |
| | | }; |
| | | const getModelList = () => { |
| | | if (!currentId.value) { |
| | | return; |
| | | } |
| | | tableLoading.value = true; |
| | | modelListPage({ |
| | | id: currentId.value, |
| | | materialId: currentId.value, |
| | | current: page.current, |
| | | size: page.size, |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | console.log("res", res); |
| | | tableData.value = res.records; |
| | | tableData.value = res.data; |
| | | page.total = res.total; |
| | | tableLoading.value = false; |
| | | }); |
| | |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | ids = selectedRows.value.map(item => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("请选择数据"); |
| | | return; |
| | |
| | | .then(() => { |
| | | tableLoading.value = true; |
| | | delProductModel(ids) |
| | | .then((res) => { |
| | | .then(res => { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getModelList(); |
| | | }) |
| | |
| | | // 没匹配到返回false |
| | | return false; |
| | | }; |
| | | // 页面加载时获取数据 |
| | | getInventoryCategoryList(); |
| | | getMaterialTypeList(); |
| | | getProductTreeList(); |
| | | </script> |
| | | |