From cabafcce20d0ae702449957dba99fd7d4d32e5f6 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 22 三月 2024 18:07:24 +0800 Subject: [PATCH] 概述模块的出库保存报错的问题修改+出库产品信息增加调入位置的选择 --- src/views/productManage/product/AddProductDialog.vue | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue index 3184808..935a066 100644 --- a/src/views/productManage/product/AddProductDialog.vue +++ b/src/views/productManage/product/AddProductDialog.vue @@ -238,12 +238,13 @@ placeholder="璇疯緭鍏�" ></el-input> </el-form-item> - <el-form-item label="閲囪喘绫诲瀷" prop="purchaseType"> - <el-radio-group :disabled="!showFooter" v-model="editConfig.infomation.purchaseType"> - <el-radio v-for="item in purchaseTypeList" :key="item.id" :label="item.id">{{ - item.name - }}</el-radio> - </el-radio-group> + <el-form-item label="閲囪喘绫诲瀷" prop="purchaseTypeList"> + <el-checkbox-group + v-model="editConfig.infomation.purchaseTypeList" + :disabled="!showFooter" + > + <el-checkbox v-for="item in bomPurchaseTypeList" :key="item.id" :label="item.id">{{ item.name }}</el-checkbox> + </el-checkbox-group> </el-form-item> <el-form-item label="鍐呴儴缂栫爜" prop="internalReference"> <el-input @@ -305,9 +306,14 @@ placeholder="璇烽�夋嫨" size="mini" style="width: 85%" - :disabled="!showFooter" + disabled > - <el-option v-for="item in memberOptions" :key="item.id" :label="item.name" :value="item.name"> + <el-option + v-for="(item, index) in memberOptions" + :key="index" + :label="item.userName" + :value="item.userName" + > </el-option> </el-select> </el-form-item> @@ -542,7 +548,7 @@ import IconCropper from "./IconCropper" import { getProductCategoryList } from "@/api/product/productCategory" import { getProductList, addProduct, updateProduct } from "@/api/product/product" -import { uploadFiles } from "@/api/common/other" +import { uploadFiles, getUserInfo } from "@/api/common/other" import codeMixin from "@/components/mixin/codeMixin" import { getDataByType } from "@/api/data" import BomDialog from "./components/bomDialog"; @@ -591,9 +597,9 @@ // salePrice: [{ required: true, message: "璇疯緭鍏ラ攢鍞环鏍�", trigger: "blur" }], unit: [{ required: true, message: "璇疯緭鍏ュ崟浣�", trigger: ["change", "blur"] }], // 閲囪喘绫诲瀷 - purchaseType: [{ required: true, message: "璇烽�夋嫨", trigger: "blur" }] + purchaseTypeList: [{ required: true, message: "璇烽�夋嫨", trigger: "blur" }] }, - memberOptions: [{ name: "绠$悊鍛�", id: 1 }], + memberOptions: [], productCategoryOptions: [], // 浜у搧绫诲埆 productTypeOptions: [ { name: "鑳芥秷鑰�", id: 1 }, @@ -648,7 +654,7 @@ }, isView: false, fileFormdata: null, // 涓婁紶鍥剧墖鍏ュ弬 - purchaseTypeList: getDataByType("purchaseType"), + bomPurchaseTypeList: getDataByType("purchaseType"), unitList: [], } }, @@ -669,6 +675,7 @@ } this.setOptionalFieldsToEmpty() this.formInfo() + this.getUserInfo() }, methods: { // 鍗曚綅 @@ -708,6 +715,17 @@ // }); this.$refs.editDialog.editDialogVisible = false; + }, + // 鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅 + getUserInfo() { + getUserInfo().then((res) => { + console.log(res) + if (res.code == 200) { + this.editConfig.infomation.principal = res.data.userName + this.memberOptions.push(res.data) + } + console.log(this.memberOptions) + }) }, formInfo() { this.objCode.type = "鐗╂枡缂栫爜" @@ -908,11 +926,17 @@ // console.log(formdata, "鍥剧墖鏁版嵁") }, // 杩涘嚭鐐瑰嚮 - inOutBoundClick() { + inOutBoundClick(val) { if (this.editConfig.title !== "鏂板缓") { console.log(this.editConfig.infomation) + let url='' + if(val=='杩�'){ + url='inboundOutboundDetail' + }else{ + url='outboundDetail' + } this.$router.push({ - name: "inboundOutboundDetail", + name:url, params: { name: this.editConfig.infomation.name, id: this.editConfig.infomation.id -- Gitblit v1.8.0