Commit 9bc7a3f6 authored by 黄卓's avatar 黄卓

调仓储位相关修改

parent d267a48f
......@@ -68,7 +68,7 @@
<el-descriptions style="margin-top: 20px" :column="4" border>
<el-descriptions-item :label="$t('集运仓库')">{{ warehouseDetails && warehouseDetails.warehouseOutName ? warehouseDetails.warehouseOutName : '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('储位')">
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}{{$t('')}}</div><div>{{item.warehouseName ? item.regionName :''}} {{$t('区')}}</div> <div>{{item.code}}</div></div>
{{ ($refs.area ? $refs.area.selected : []).join(',') }}
</el-descriptions-item>
<el-descriptions-item v-if="type == 2" :label="$t('选择储位')">
<div @click="areaVisible = true" style="color: #0a84ff;cursor: pointer;">{{$t('选择储位')}}</div>
......@@ -122,7 +122,7 @@
<el-button v-if="type == 1" size="medium" @click="cancellationOfOrder">{{$t('取消调仓')}}</el-button>
<el-button size="medium" @click="$tab.closeOpenPage({path:'/order/order'})">{{$t('返回')}}</el-button>
</div>
<warehouse-location ref="area" :city-id="warehouseInShi" :visible.sync="areaVisible" v-model="params.orderLocationCreateReqVOList" :warehouse-id="warehouseDetails.warehouseInId" :order-id="Number(orderId)"></warehouse-location>
<warehouse-location ref="area" :visible.sync="areaVisible" v-model="params.orderLocationCreateReqVOList" :warehouse-id="warehouseDetails.warehouseInId" :order-id="Number(orderId)"></warehouse-location>
<el-dialog :title="$t('订单转异')" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200">
<el-form-item :label="$t('原因类型')">
......@@ -160,7 +160,7 @@ import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index";
import {getSupplierPage} from "@/api/ecw/supplier";
import {getByWarehouseId} from "@/api/ecw/warehouseArea";
import {adjustLastWithStatus, warehouseApprovalCancel} from "@/api/ecw/batchSingleApplication";
import warehouseLocation from "@/views/ecw/order/components/warehouseLocation";
import warehouseLocation from "@/components/WarehouseAreaDialog";
import imageUpload from "@/components/ImageUpload";
import {getProductBrankPage} from "@/api/ecw/productBrank";
import {parseTime} from "@/utils/ruoyi";
......@@ -280,35 +280,11 @@ export default {
this.warehouseDetails = r.data[r.data.length - 1]
listByOrderId({orderId:this.orderId}).then(res => {
if(res.code === 0){
getByWarehouseId().then(r =>{
let obj = [];
res.data.forEach(item => {
r.data.forEach(itemm => {
if(item.wareId === itemm.id){
itemm.children.forEach(itemmm => {
if(itemmm.id === item.areaId){
if(itemmm.positionList.length > 0){
itemmm.positionList.forEach(ic =>{
if(ic.children && ic.children.length > 0){
ic.children.forEach(icc => {
if(icc.id === item.locationId){
obj.push({
warehouseName:itemm.name,
regionName:itemmm.name,
code:icc.code
})
}
})
}
})
}
}
})
}
})
})
console.log(obj)
this.storageSpaceList = obj;
this.params.orderLocationCreateReqVOList = res.data
// 等待仓库id和已选的储位后初始化储位信息
this.$nextTick(() => {
this.$refs.area.updateArea()
})
}
})
......@@ -392,37 +368,8 @@ export default {
},
},
watch:{
'params.orderLocationCreateReqVOList'(val){
console.log(val,'val');
getByWarehouseId().then(r =>{
let obj = [];
val.forEach(item => {
r.data.forEach(itemm => {
if(item.wareId === itemm.id){
itemm.children.forEach(itemmm => {
if(itemmm.id === item.areaId){
if(itemmm.positionList && itemmm.positionList.length > 0){
itemmm.positionList.forEach(ic =>{
if(ic.children && ic.children.length > 0){
ic.children.forEach(icc => {
if(icc.id === item.locationId){
obj.push({
warehouseName:itemm.name,
regionName:itemmm.name,
code:icc.code
})
}
})
}
})
}
}
})
}
})
})
this.storageSpaceList = obj;
})
'params.orderLocationCreateReqVOList'(vo, vn){
console.log(vo, vn)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment