|
|
@ -3,21 +3,28 @@ |
|
|
|
<view class=""> |
|
|
|
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-wraper" v-if="detailSource.length>0"> |
|
|
|
<view class="cen_card" style="background-color: #fff; margin:10px 0px 0px 10px;"> |
|
|
|
<view class="cell_box uni-flex uni-row"> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">库位</view> |
|
|
|
<view>{{fromLocationCode}}</view> |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">包装规格</view> |
|
|
|
<view>{{getPackUnitName(fromPack.packUnit)}}</view> |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">包装数量</view> |
|
|
|
<view>{{fromPack.packQty}}{{getUomInfo(fromPack.uom)}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="split_line"></view> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class=""> |
|
|
|
<view class="" style="padding: 20rpx; font-size: 32rpx;"> |
|
|
|
<view> 来源库位 : {{item.subList[0].locationCode}} |
|
|
|
</view> |
|
|
|
<view> 来源包装规格 : |
|
|
|
{{fromPackUnit}}/{{item.subList[0].packQty}}{{getUomInfo(item.subList[0].uom)}} |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<record-com-detail-card :dataContent="item" :index="index" |
|
|
|
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack" |
|
|
|
:isShowFromLocation="false" :isShowToLocation="false"> |
|
|
@ -32,7 +39,7 @@ |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
<view class="uni-flex uni-row title u-col-center" style="font-size: 28rpx;"> |
|
|
|
<view class="uni-flex uni-row"> |
|
|
|
<text>目标包装规格:</text> |
|
|
|
<view class="uni-flex u-col-center uni-row" @click="showPackage"> |
|
|
|
<view class="" style="margin-left: 5rpx;width: 100%;"> |
|
|
@ -40,7 +47,6 @@ |
|
|
|
</view> |
|
|
|
<u-select v-model="show" mode="single-column" :list="packageList" |
|
|
|
@confirm="confirmSelect"> |
|
|
|
|
|
|
|
</u-select> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -122,9 +128,10 @@ |
|
|
|
businessType: {}, |
|
|
|
dataContent: {}, |
|
|
|
fromPackUnit: "", |
|
|
|
fromPack: {}, |
|
|
|
packageList: [], |
|
|
|
show: false, |
|
|
|
toPackUnitShow: "包装规格", |
|
|
|
toPackUnitShow: "请选择", |
|
|
|
toPackQty: "", |
|
|
|
itemCode: "" |
|
|
|
}; |
|
|
@ -170,9 +177,11 @@ |
|
|
|
getPackUnitByItemCode(this.itemCode).then(res => { |
|
|
|
if (res.data != null && res.data.list.length > 0) { |
|
|
|
res.data.list.forEach(item => { |
|
|
|
item.value = item.packQty; |
|
|
|
item.label = item.packUnit + "/" + item.packQty + this |
|
|
|
.getUomInfo(item.uom); |
|
|
|
// item.value = item.packQty; |
|
|
|
item.value = item.packUnit; |
|
|
|
item.label = this.getPackUnitName(item.packUnit) + "(" + item.packQty + this |
|
|
|
.getUomInfo(item.uom) + ")"; |
|
|
|
item.data = 'a'; |
|
|
|
}) |
|
|
|
this.packageList = res.data.list |
|
|
|
this.show = true; |
|
|
@ -183,17 +192,19 @@ |
|
|
|
}).catch(error => { |
|
|
|
this.showErrorMessage("未查找到包装规格" + error); |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
confirmSelect(e) { |
|
|
|
if (this.fromPackUnit == e[0].label) { |
|
|
|
this.showErrorMessage("来源包装规格【" + this.fromPackUnit + "】与目标包装规格【" + e[0].label + "】不能相等") |
|
|
|
return |
|
|
|
} |
|
|
|
// var toPackUnit = e[0].label.split("(")[0] |
|
|
|
// this.toPackUnit = toPackUnit |
|
|
|
// this.toPackQty = e[0].value |
|
|
|
this.toPackUnit = e[0].value |
|
|
|
let pack = this.packageList.filter(r => r.packUnit == this.toPackUnit)[0]; |
|
|
|
this.toPackQty = pack.packQty; |
|
|
|
this.toPackUnitShow = e[0].label |
|
|
|
var toPackUnit = e[0].label.split("/")[0] |
|
|
|
this.toPackUnit =toPackUnit |
|
|
|
this.toPackQty = e[0].value |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
@ -201,6 +212,7 @@ |
|
|
|
let label = result.label; |
|
|
|
let pack = result.package; |
|
|
|
this.fromPackUnit = pack.packUnit; |
|
|
|
this.fromPack = pack; |
|
|
|
var item = this.detailSource.find(res => { |
|
|
|
if (res.itemCode == balance.itemCode) { |
|
|
|
return res |
|
|
|