From 5ecb7958c96d3f0b6d47b79aff7eb306c2cf690f Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期二, 06 八月 2024 11:16:58 +0800 Subject: [PATCH] gitlab上面的wms转移到公司git --- src/views/warehouseManage/position/AddDialog.vue | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/views/warehouseManage/position/AddDialog.vue b/src/views/warehouseManage/position/AddDialog.vue index b7f7ca6..7599e2a 100644 --- a/src/views/warehouseManage/position/AddDialog.vue +++ b/src/views/warehouseManage/position/AddDialog.vue @@ -45,6 +45,22 @@ <div class="basic-info-view"> <el-row> <el-col :span="12" class="line_height_30px"> + <el-form-item + label="浠撳簱" + prop="warehouseId"> + <el-select + @change="selWarehouse" + v-model="editConfig.infomation.warehouseId" + placeholder="璇烽�夋嫨" + size="mini" + style="width:90%" + :disabled="!showFooter" + > + <el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="warehouse.name" :value="warehouse.id"></el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :span="12" class="line_height_30px"> <el-form-item label="浣嶇疆鍚嶇О" prop="name"> <el-input :disabled="!showFooter" @@ -184,6 +200,8 @@ <script> import { addLocation, updateLocation, deleteLocation } from "@/api/warehouseManage/warehouse" import { getDataByType } from "@/api/data" +import {getWarehouseList} from '@/api/warehouseManage/warehouse.js' +import {getLocationList} from "@/api/overview/overview"; export default { name: "AddScrapDialog", props: { @@ -197,17 +215,20 @@ } } }, - positionList: { + /* positionList: { type: [Array] - } + }*/ }, components: {}, computed: {}, data() { return { + positionList:[], + warehouseList:[], dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { + warehouseId:[{ required: true, message: "璇疯緭閫夋嫨浠撳簱", trigger: "change" }], name: [{ required: true, message: "璇疯緭鍏�", trigger: "change" }], // parentId: [{ required: true, message: "璇烽�夋嫨浣嶇疆绫诲瀷", trigger: "change" }], type: [{ required: true, message: "璇烽�夋嫨涓婄骇浣嶇疆", trigger: "change" }], @@ -229,10 +250,33 @@ } }, created() { - console.log(this.editConfig.infomation) this.setBottonView() + this.queryWareHouse(); + this.queryLocationList(); }, methods: { + async queryWareHouse(){ + const {code,data}=await getWarehouseList({page:0,pageSize:0,keyword: ""}); + if(code===200){ + this.warehouseList=data; + } + }, + queryLocationList(val){ + getLocationList({ + warehouseId:val, + type:3, + keyWord: "", + page: 0, + pageSize: 0, + }).then((res) => { + if (res.code == 200) { + this.positionList=res.data; + } + }); + }, + selWarehouse(val){ + this.queryLocationList(val); + }, validatorNum(rule, value, callback) { if (value) { if (value == undefined || value == null) { @@ -299,7 +343,6 @@ }, saveParams() { let data = JSON.parse(JSON.stringify(this.editConfig.infomation)) - let params = { name: data.name, parentId: data.parentId, @@ -310,8 +353,9 @@ countFrequency: data.countFrequency ? Number(data.countFrequency) : 0, recentlyCount: data.recentlyCount, nextCount: data.nextCount, - notes: data.notes - } + notes: data.notes, + warehouseId:data.warehouseId + }; if (data.id) { params.id = data.id params.jointName = data.jointName -- Gitblit v1.8.0