| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="单位" prop="unit"> |
| | | <el-form-item label="单位old" prop="unit"> |
| | | <el-input |
| | | v-model="editConfig.infomation.unit" |
| | | placeholder="请输入" |
| | |
| | | :disabled="!showFooter" |
| | | ></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="单位" prop="unit"> |
| | | <el-select |
| | | v-model="editConfig.infomation.unit" |
| | | placeholder="单位" |
| | | filterable |
| | | @change="$forceUpdate()" |
| | | style="width: calc(100% - 30px)" |
| | | > |
| | | <el-option |
| | | v-for="ele in unitList" |
| | | :key="ele.id" |
| | | :label="ele.name" |
| | | :value="ele.name" |
| | | ></el-option> |
| | | </el-select> |
| | | <i |
| | | class="el-icon-setting margin_left_10px cursor_pointer" |
| | | style="font-size: 20px; color: gray" |
| | | @click="handleUnitShow" |
| | | ></i> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="产品标签" prop="productTagName"> |
| | | <el-input |
| | | v-model="editConfig.infomation.productTagName" |
| | |
| | | <el-button size="small" @click="editConfig.visible = false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <BomDialog |
| | | ref="editDialog" |
| | | @sucessSet="handleGetBomKindDictList" |
| | | @handleConfirmSave="handleConfirmSave" |
| | | :workList="unitList" |
| | | title="计量单位" |
| | | ></BomDialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { uploadFiles } from "@/api/common/other" |
| | | import codeMixin from "@/components/mixin/codeMixin" |
| | | import { getDataByType } from "@/api/data" |
| | | import BomDialog from "./components/bomDialog"; |
| | | // import { postGetSaveSUnitDict } from "@/api/basic/standard"; |
| | | |
| | | |
| | | export default { |
| | | mixins: [codeMixin], |
| | | name: "AddProductDialog", |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { IconCropper }, |
| | | components: { |
| | | IconCropper, |
| | | BomDialog, |
| | | }, |
| | | computed: { |
| | | modalTitle() { |
| | | if (this.editConfig.title === "编辑" && this.editConfig.autoEdit) { |
| | |
| | | }, |
| | | isView: false, |
| | | fileFormdata: null, // 上传图片入参 |
| | | purchaseTypeList: getDataByType("purchaseType") |
| | | purchaseTypeList: getDataByType("purchaseType"), |
| | | unitList: [], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.formInfo() |
| | | }, |
| | | methods: { |
| | | // 单位 |
| | | handleUnitShow() { |
| | | this.handleGetBomKindDictList(); |
| | | this.$refs.editDialog.editDialogVisible = true; |
| | | }, |
| | | // 单位 |
| | | handleGetBomKindDictList(val) { |
| | | console.log(val) |
| | | // postGetUnitDictList().then((res) => { |
| | | // this.unitList = res.data; |
| | | // if (val) { |
| | | // for (let i in this.unitList) { |
| | | // if (this.unitList[i].isDefault) { |
| | | // this.form.unit = this.form.unit |
| | | // ? this.form.unit |
| | | // : this.unitList[i].name; |
| | | // // this.$set(this.form, "unit", this.form.unit); |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | // }); |
| | | }, |
| | | handleConfirmSave(data) { |
| | | console.log(data) |
| | | // postGetSaveSUnitDict({ data: data }).then((res) => { |
| | | // if (res.code == 200) { |
| | | // this.$message({ |
| | | // message: "操作成功!", |
| | | // type: "success", |
| | | // }); |
| | | // this.$refs.editDialog.editDialogVisible = false; |
| | | // this.handleGetBomKindDictList(); |
| | | // } |
| | | // }); |
| | | this.$refs.editDialog.editDialogVisible = false; |
| | | |
| | | }, |
| | | formInfo() { |
| | | this.objCode.type = "物料编码" |
| | | this.objCode.codeStandID = "" |