Commit 7970bea4 authored by dragondean@qq.com's avatar dragondean@qq.com

打包添加箱明细从订单商品中选择追加影像和快递单号

parent 008c2737
......@@ -173,7 +173,8 @@ export default {
"brand": item.brand,
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"expressNo": item.expressNo,
"pictureUrls": item.pictureUrls,
"prodAttrIds": item.prodAttrIds,
"prodId": item.prodId,
"quantityAll": item.quantityAll,
......
......@@ -126,11 +126,17 @@ export default {
return i.prodId == item.prodId && i.brand == item.brand && i.material == item.material && i.prodAttrIds == item.prodAttrIds && i.usageIds == item.usageIds
})
if (index == -1) {
arr.push({...item})
arr.push({
...item,
expressNo: warehouseIn.expressNo,
pictureUrls: warehouseIn.pictureUrls,
})
} else {
arr[index].quantityAll += item.quantityAll
}
})
// TODO 要把商品的入仓影响,快递单号合并到主商品中
})
arr.forEach(item => {
uni.addProductFromOrder(item)
......
......@@ -109,7 +109,12 @@
<view class="card-row">
<text>{{$t('快递单号')}}</text>
<uni-easyinput v-model="item.expressNo" :placeholder="$t('输入快递单号')" :clearable="false" />
<WarehouseRecordDetail v-model="item.orderWarehouseInDetailsVOList" :order-id="order.orderId" :warehouse-in-id="item.id" />
<WarehouseRecordDetail
v-model="item.orderWarehouseInDetailsVOList"
:order-id="order.orderId"
:warehouse-in-id="item.id"
@input="handleMergeExpressAndPictures(index)"
/>
</view>
<view v-if="index" class="delete-btn" @tap="delRow(index)">{{$t('删除')}}</view>
......@@ -354,6 +359,20 @@ export default {
this.$refs.warehouseDetail.showDetail(this.order)
})
},
// 想明细更新后将影响和快递单号合并到主商品中
handleMergeExpressAndPictures(index){
this.orderWarehouseInItemDtoList?.forEach((item, i) => {
item.orderWarehouseInDetailsVOList?.forEach(detail => {
// 合并影像到入仓记录中
this.pictureUrls = this.pictureUrls.concat(detail.pictureUrls)
// 合并快递单号到打包记录中
if(i === index && detail.expressNo?.length){
item.expressNo += `,${detail.expressNo}`
}
})
})
}
/*delimage(index){
this.pictureUrls.splice(index,1)
},
......
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