Commit aad6efad authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents b8702202 94d365aa
...@@ -328,7 +328,7 @@ export default { ...@@ -328,7 +328,7 @@ export default {
}, },
getSelectedIndex(router){ getSelectedIndex(router){
return this.selectedRoutes.findIndex(item => { return this.selectedRoutes.findIndex(item => {
return item.lineId == router.id && item.channelId == router.channel.channelId return item.lineId == router.id && item.shippingChannelId == router.channel.channelId
}) })
}, },
SpanMethod({ row, column, rowIndex, columnIndex }){ SpanMethod({ row, column, rowIndex, columnIndex }){
......
...@@ -81,7 +81,13 @@ export default { ...@@ -81,7 +81,13 @@ export default {
let arr = [] let arr = []
this.orderItemDetails.forEach(item => { this.orderItemDetails.forEach(item => {
item.orderWarehouseInCommonAttrVOList?.forEach((vo, index) => { item.orderWarehouseInCommonAttrVOList?.forEach((vo, index) => {
arr.push({...item, ...vo, index, span: index === 0 ? item.orderWarehouseInCommonAttrVOList?.length : 0}) arr.push({
...item,
...vo,
index,
span: index === 0 ? item.orderWarehouseInCommonAttrVOList?.length : 0,
warehouseInId: item.id
})
}) })
}) })
return arr return arr
...@@ -112,6 +118,26 @@ export default { ...@@ -112,6 +118,26 @@ export default {
} }
}) })
// 如果某条入仓记录下的箱明细被全部选中了,则需要将他的快递单号和影像带过去
const expressNos = []
const pictureUrls = []
this.orderItemDetails.forEach(warehouseIn => {
// 本条入仓记录被选中的明细数
const selectedCount = arr.filter(item => item.warehouseInId == warehouseIn.id).length
if(selectedCount == warehouseIn.orderWarehouseInCommonAttrVOList?.length){
if(warehouseIn.expressNo){
expressNos.push(warehouseIn.expressNo)
}
if(warehouseIn.pictureUrls?.length){
pictureUrls.push(...warehouseIn.pictureUrls)
}
}
})
// 根据warehouseInId 给对应的入仓记录追加快递单号和影像
// 存到全局变量,在调用对应finishPack接口的时候判断追加
window.ChooseOrderProductsExpressNos = expressNos
window.ChooseOrderProductsPictureUrls = pictureUrls
this.$emit("success", arr) this.$emit("success", arr)
}, },
handleClose() { handleClose() {
......
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
show-choose-order-item show-choose-order-item
:order-id="order.orderId" :order-id="order.orderId"
:warehouse-in-id="row.id" :warehouse-in-id="row.id"
@close="checkAppendExpressAndPictures(row)"
/> />
<el-popconfirm <el-popconfirm
v-if="$index >= protectRowCount" v-if="$index >= protectRowCount"
...@@ -720,6 +721,26 @@ export default { ...@@ -720,6 +721,26 @@ export default {
titleZh: undefined, titleZh: undefined,
titleEn: undefined titleEn: undefined
} }
},
// 检查并追加快递单号和入仓影像
checkAppendExpressAndPictures(row){
if(window.ChooseOrderProductsExpressNos?.length){
// 去重追加
window.ChooseOrderProductsExpressNos?.forEach(no => {
if(row.expressNo.indexOf(no) === -1){
row.expressNo += "," + no
}
})
}
if(window.ChooseOrderProductsPictureUrls?.length){
this.pictureUrls = this.pictureUrls.concat(window.ChooseOrderProductsPictureUrls)
// 去重
this.pictureUrls = Array.from(new Set(this.pictureUrls))
}
// 清掉
window.ChooseOrderProductsExpressNos = null
window.ChooseOrderProductsPictureUrls = null
} }
} }
} }
......
...@@ -69,10 +69,11 @@ ...@@ -69,10 +69,11 @@
<template v-slot="{row}"> <template v-slot="{row}">
<WarehouseRecordDetail <WarehouseRecordDetail
v-model="row.orderWarehouseInDetailsVOList" v-model="row.orderWarehouseInDetailsVOList"
@input="saveDetail(props.row)" @input="saveDetail(props.row, row.id)"
show-choose-order-item show-choose-order-item
:order-id="orderId" :order-id="orderId"
:warehouse-in-id="row.id" :warehouse-in-id="row.id"
@close="clearAppendExpressNoAndPictures"
/> />
<el-button class="pl-5 pr-5" size="mini" type="primary" @click="package(props.row, $t('修改打包'))">{{$t('修改')}}</el-button> <el-button class="pl-5 pr-5" size="mini" type="primary" @click="package(props.row, $t('修改打包'))">{{$t('修改')}}</el-button>
<el-button class="pl-5 pr-5" size="mini" type="danger" @click="package(props.row, $t('修改打包'))">{{$t('删除')}}</el-button> <el-button class="pl-5 pr-5" size="mini" type="danger" @click="package(props.row, $t('修改打包'))">{{$t('删除')}}</el-button>
...@@ -482,18 +483,35 @@ export default { ...@@ -482,18 +483,35 @@ export default {
this.curPictrues = wareItem.pictureUrls || [] this.curPictrues = wareItem.pictureUrls || []
}, },
// 保存箱明细 // 保存箱明细
saveDetail(row){ saveDetail(row, warehouseInId){
const wareItem = this.wareItem(row.orderItemId) const wareItem = this.wareItem(row.orderItemId)
const orderWarehouseInItemDtoList = wareItem.orderWarehouseInBackItemDoList const orderWarehouseInItemDtoList = wareItem.orderWarehouseInBackItemDoList
orderWarehouseInItemDtoList.map(item =>{ orderWarehouseInItemDtoList.map(item =>{
item.orderLocationCreateReqVOList = item.orderLocationBackVOList || [] item.orderLocationCreateReqVOList = item.orderLocationBackVOList || []
return item return item
}) })
let pictures = wareItem.pictureUrls || []
if(window.ChooseOrderProductsPictureUrls?.length){
pictures.push(...window.ChooseOrderProductsPictureUrls)
// 去重
pictures = Array.from(new Set(pictures))
}
if(window.ChooseOrderProductsExpressNos?.length){
const warehouseInItem = orderWarehouseInItemDtoList.find(item => item.id === warehouseInId)
if(!warehouseInItem.expressNo)warehouseInItem.expressNo = ""
window.ChooseOrderProductsExpressNos?.forEach(item => {
if(warehouseInItem.expressNo.indexOf(item) === -1){
if(warehouseInItem.expressNo?.length) warehouseInItem.expressNo += ","
warehouseInItem.expressNo += item
}
})
}
const data = { const data = {
orderId: row.orderId, orderId: row.orderId,
orderItemId: row.orderItemId, orderItemId: row.orderItemId,
orderWarehouseInItemDtoList: orderWarehouseInItemDtoList, orderWarehouseInItemDtoList: orderWarehouseInItemDtoList,
pictureUrls: wareItem.pictureUrls || [] pictureUrls: pictures
} }
finishPacked(data).then(res => { finishPacked(data).then(res => {
this.$message.success(this.$t('操作成功')) this.$message.success(this.$t('操作成功'))
...@@ -514,6 +532,13 @@ export default { ...@@ -514,6 +532,13 @@ export default {
}, },
printTag(){ printTag(){
this.showPrintTagDialog = true this.showPrintTagDialog = true
},
// 箱明细关闭后清理快递单号和影像临时数据
clearAppendExpressNoAndPictures(){
setTimeout(() => {
window.ChooseOrderProductsExpressNos = null
window.ChooseOrderProductsPictureUrls = null
}, 100)
} }
}, },
watch: { watch: {
......
...@@ -92,7 +92,13 @@ export default { ...@@ -92,7 +92,13 @@ export default {
showChooseDialog: false showChooseDialog: false
}; };
}, },
watch:{
dialogVisible(v){
if(!v){
this.$emit("close")
}
}
},
mounted() { mounted() {
this.getAttrList() this.getAttrList()
}, },
......
...@@ -133,6 +133,11 @@ ...@@ -133,6 +133,11 @@
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<el-form-item :label="$t('价格有效期')">
<el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
-
<el-date-picker v-model="form.validateEndDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-card> </el-card>
...@@ -552,6 +557,7 @@ export default { ...@@ -552,6 +557,7 @@ export default {
} }
// 阶梯价校验 // 阶梯价校验
/* 根据甲方要求不做校验,所有字段均可留空,https://zentao.test.jdshangmen.com/bug-view-5915.html
if(this.$refs.stepPrice){ if(this.$refs.stepPrice){
let isValid = true let isValid = true
for (let stepPrice of this.$refs.stepPrice){ for (let stepPrice of this.$refs.stepPrice){
...@@ -561,7 +567,7 @@ export default { ...@@ -561,7 +567,7 @@ export default {
} }
} }
if(!isValid)return if(!isValid)return
} } */
// 全包价 // 全包价
if(this.form.priceType == 1) { if(this.form.priceType == 1) {
......
...@@ -670,8 +670,8 @@ export default { ...@@ -670,8 +670,8 @@ export default {
getPackingPrice(packging){ getPackingPrice(packging){
if(!packging?.length) return if(!packging?.length) return
packging = JSON.parse(JSON.stringify(packging)) packging = JSON.parse(JSON.stringify(packging))
return packging.map(item => { return packging.filter(item => !!item.packagingTypes).map(item => {
item.packagingTypes = item.packagingTypes.join(",") item.packagingTypes = item.packagingTypes?.join(",") || ""
return item return item
}) })
}, },
......
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