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 | 91 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 77 insertions(+), 14 deletions(-)
diff --git a/src/views/warehouseManage/position/AddDialog.vue b/src/views/warehouseManage/position/AddDialog.vue
index cc28fb6..7599e2a 100644
--- a/src/views/warehouseManage/position/AddDialog.vue
+++ b/src/views/warehouseManage/position/AddDialog.vue
@@ -19,7 +19,14 @@
<span>鍔ㄤ綔</span>
<!-- <el-button plain size="mini" style="margin-left: 15px" @click="deleteClick">鍒犻櫎</el-button> -->
</span>
- <el-button v-if="showEdit&&editConfig.infomation.type==3" plain size="mini" style="margin-left: 15px" @click="editClick">缂栬緫</el-button>
+ <el-button
+ v-if="showEdit && editConfig.infomation.type == 3"
+ plain
+ size="mini"
+ style="margin-left: 15px"
+ @click="editClick"
+ >缂栬緫</el-button
+ >
</div>
</div>
<!-- 鍐呭 -->
@@ -32,11 +39,27 @@
size="mini"
>
<div class="content-number-bg">
- <FormBtnsView :showPosition="true" :showWarehouse="false" @productClick="productClick" />
+ <FormBtnsView :showPosition="true" :showPositionCursor="this.editConfig.title != '鏂板缓'?true:false" @positionReport="positionReport" :showWarehouse="false" @productClick="productClick" />
</div>
<div class="basic-info">
<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
@@ -53,10 +76,10 @@
v-model="editConfig.infomation.parentId"
placeholder="璇烽�夋嫨"
size="mini"
- :disabled="editCommonConfig.title!='鏂板缓'"
+ :disabled="editCommonConfig.title != '鏂板缓'"
style="width: 90%"
>
- <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id">
+ <el-option v-for="item in positionList" :key="item.id" :label="item.jointName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
@@ -68,7 +91,7 @@
<el-select
v-model="editConfig.infomation.type"
filterable
- :disabled="editCommonConfig.title!='鏂板缓'"
+ :disabled="editCommonConfig.title != '鏂板缓'"
placeholder="璇烽�夋嫨"
style="width: 90%"
no-data-text="鏆傛棤鏁版嵁"
@@ -177,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: {
@@ -190,19 +215,22 @@
}
}
},
- 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" }],
+ // parentId: [{ required: true, message: "璇烽�夋嫨浣嶇疆绫诲瀷", trigger: "change" }],
type: [{ required: true, message: "璇烽�夋嫨涓婄骇浣嶇疆", trigger: "change" }],
countFrequency: [
{
@@ -223,8 +251,32 @@
},
created() {
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) {
@@ -241,11 +293,22 @@
callback()
}
},
+ // 褰撳墠搴撳瓨
+ positionReport(){
+ if(this.editConfig.title != '鏂板缓'){
+ this.$router.push({
+ name: "locationReport",
+ params: {
+ locationId: this.editConfig.infomation.id
+ }
+ })
+ }
+ },
// 璺嚎
productClick() {},
// 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
setBottonView() {
- if (this.editConfig.title === "鏂板缓"||this.editConfig.title === "缂栬緫") {
+ if (this.editConfig.title === "鏂板缓" || this.editConfig.title === "缂栬緫") {
this.showEdit = false
this.showFooter = true
} else if (this.editConfig.infomation.status === "瀹屾垚") {
@@ -280,7 +343,6 @@
},
saveParams() {
let data = JSON.parse(JSON.stringify(this.editConfig.infomation))
-
let params = {
name: data.name,
parentId: data.parentId,
@@ -291,11 +353,12 @@
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;
+ params.id = data.id
+ params.jointName = data.jointName
}
return params
},
--
Gitblit v1.8.0