| | |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {}, |
| | | autoEdit:false |
| | | autoEdit: false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | components: {}, |
| | | computed: { |
| | | productCategoryListWithDefault(){ |
| | | return [{id:0,name:'请选择'},...(this.productCategoryOptions ?? [])] |
| | | productCategoryListWithDefault() { |
| | | return [{ id: 0, name: "请选择" }, ...(this.productCategoryOptions ?? [])] |
| | | }, |
| | | modalTitle(){ |
| | | if (this.editConfig.title === '编辑' && this.editConfig.autoEdit){ |
| | | return '编辑' |
| | | }else if (this.editConfig.title === '编辑') { |
| | | return !this.showEdit ? '编辑' : '查看' |
| | | }else { |
| | | return '新建' |
| | | modalTitle() { |
| | | if (this.editConfig.title === "编辑" && this.editConfig.autoEdit) { |
| | | return "编辑" |
| | | } else if (this.editConfig.title === "编辑") { |
| | | return !this.showEdit ? "编辑" : "查看" |
| | | } else { |
| | | return "新建" |
| | | } |
| | | } |
| | | }, |
| | |
| | | rules: { |
| | | name: [{ required: true, message: "请输入产品名称", trigger: "blur" }], |
| | | model: [{ required: true, message: "请选择物料类型", trigger: "change" }], |
| | | salePrice: [{ required: true, message: "请输入销售价格", trigger: "blur" }], |
| | | // salePrice: [{ required: true, message: "请输入销售价格", trigger: "blur" }], |
| | | unit: [{ required: true, message: "请输入单位", trigger: "blur" }] |
| | | }, |
| | | memberOptions: [{ name: "管理员", id: 1 }], |
| | |
| | | this.setTableForm() |
| | | this.setBottonView() |
| | | this.statisticsMap.inLibrary = this.editConfig?.infomation?.amount ?? 0 |
| | | if (this.editConfig.autoEdit){ |
| | | if (this.editConfig.autoEdit) { |
| | | this.editClick() |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | // 在库点击 |
| | | inLibraryClick(){ |
| | | inLibraryClick() { |
| | | if (this.editConfig.title !== "新建") { |
| | | console.log(this.editConfig.infomation) |
| | | this.$router.push({ |