Commit 6fa0a3fc authored by Administrator's avatar Administrator

Merge branch 'release' into 'jd_dev'

Release分支代码合并到jd_dev分支20241206

See merge request !5
parents 6cb74cf4 623e6a1d
...@@ -224,6 +224,13 @@ ...@@ -224,6 +224,13 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/tally/relatedOrder",
"style": {
"navigationBarTitleText": "关联单",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/tallyAir/detail", "path": "pages/tallyAir/detail",
"style": { "style": {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<!-- 品牌 --> <!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.brandType && [$t('无牌'), $t('有牌'), $t('中性')][ele.brandType] !== $t('无牌'))" style="color:blue;fontWeight:bold;">{{ $t('有牌') }}</view> <view v-if="order.goodsList.some(ele => ele.brandType && [$t('无牌'), $t('有牌'), $t('中性')][ele.brandType] !== $t('无牌'))" style="color:blue;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 --> <!-- 特性 -->
<view v-for="prod in order.goodsList" :key="prod.orderItemId" style="color:blue;fontWeight:bold;">{{prod.warehouseInAttrNameList?prod.warehouseInAttrNameList.toString():""}}</view> <view v-for="prod in order.goodsList" :key="prod.orderItemId" style="color:blue;fontWeight:bold;">{{ getProductAttrsByIds(prod.warehouseInProdAttrIds) }}</view>
<!-- 报关方式 --> <!-- 报关方式 -->
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:blue;fontWeight:bold;" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:blue;fontWeight:bold;" />
</view> </view>
...@@ -443,6 +443,7 @@ import { ...@@ -443,6 +443,7 @@ import {
import { getAdjustWaitOutList, warehouseAdjustSendOutBatch, getSupplierPage,getAirShipmentByShipmentId,boxAirCheckoutGet,warehouseCreate,getAirCheckoutByShipmentId,searchLoadOrderByBoxNo,batchAirCreate,singleAirCreate } from './api' import { getAdjustWaitOutList, warehouseAdjustSendOutBatch, getSupplierPage,getAirShipmentByShipmentId,boxAirCheckoutGet,warehouseCreate,getAirCheckoutByShipmentId,searchLoadOrderByBoxNo,batchAirCreate,singleAirCreate } from './api'
import { updateImg } from "@/api/system"; import { updateImg } from "@/api/system";
import OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import {getProductAttrList} from "@/api/system";
export default { export default {
name: "loading-detail", name: "loading-detail",
...@@ -454,6 +455,7 @@ export default { ...@@ -454,6 +455,7 @@ export default {
return { return {
movingOrderId: undefined, movingOrderId: undefined,
popupMessage: '', popupMessage: '',
productAttrList:[],
/* 出货ID */ /* 出货ID */
shipmentId: null, shipmentId: null,
/* 自编号 */ /* 自编号 */
...@@ -755,6 +757,19 @@ export default { ...@@ -755,6 +757,19 @@ export default {
}); });
}); });
}, },
// 获取商品特性文本
getProductAttrsByIds(ids){
if(!ids) return ''
const result = []
ids.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id && this.$l(f, 'attrName') !== '普货') {
result.push(this.$l(f, 'attrName'))
}
})
})
return result.join('')
},
scanCode(type) { scanCode(type) {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
...@@ -1083,6 +1098,10 @@ export default { ...@@ -1083,6 +1098,10 @@ export default {
let today = util.formatDate(new Date().getTime(), true); let today = util.formatDate(new Date().getTime(), true);
this.confirmCloseCloseBoxTime = today; //确认封柜弹窗表单-封仓时间 this.confirmCloseCloseBoxTime = today; //确认封柜弹窗表单-封仓时间
this.confirmLeaveStoreTime = today; //确认封柜弹窗表单-出仓时间 this.confirmLeaveStoreTime = today; //确认封柜弹窗表单-出仓时间
getProductAttrList().then(data => {
this.productAttrList = data
})
}, },
onShow() { onShow() {
if (this.onHideFlag) { if (this.onHideFlag) {
......
...@@ -37,15 +37,17 @@ ...@@ -37,15 +37,17 @@
</view> </view>
<view :style="{ display: partClass(k) }" class="productsList"> <view :style="{ display: partClass(k) }" class="productsList">
<view class="flex text-center text-black bg-white text-bold padding-sm"> <view class="flex text-center text-black bg-white text-bold padding-sm">
<view class="flex-sub">{{$t('订单号')}}</view> <view style="width:20%;">{{$t('订单号')}}</view>
<view class="flex-sub">{{$t('体积')}}</view> <view style="width:12%;">{{$t('体积') + "(m³)"}}</view>
<view class="flex-sub">{{$t('重量')}}</view> <view style="width:12%;">{{$t('重量') + "(kg)"}}</view>
<view class="flex-sub">{{$t('计划')}}/{{$t('实装')}}</view> <view style="width:12%;">{{$t('箱数')}}</view>
<view class="flex-sub">{{$t('操作')}}</view> <view style="width:12%;">{{$t('储位')}}</view>
<view style="width:12%;">{{$t('计划')}}/{{$t('实装')}}</view>
<view style="width:20%;">{{$t('操作')}}</view>
</view> </view>
<view> <view>
<view class="flex text-center padding-sm" :id="'order-' + order.orderNo" :class="'order-' + order.orderNo == heightLightId ? 'bg-yellow' : 'bg-white'" v-for="(order, key) in v.sectionOrderList" :key="key"> <view class="flex text-center padding-sm" :id="'order-' + order.orderNo" :class="'order-' + order.orderNo == heightLightId ? 'bg-yellow' : 'bg-white'" v-for="(order, key) in v.sectionOrderList" :key="key">
<view class="flex-sub text-blue"> <view class="flex-sub text-blue" style="width:20%;">
<view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view> <view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view>
<view style="color:blue;fontWeight:bold;"> <view style="color:blue;fontWeight:bold;">
{{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}} {{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
...@@ -61,16 +63,23 @@ ...@@ -61,16 +63,23 @@
</text> </text>
</view> </view>
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;">{{$t('关联单')}}</view> <view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 --> <!-- 混箱 -->
<view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseLogs(order)">{{$t('混箱')}}</view> <view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseLogs(order)">{{$t('混箱')}}</view>
</view> </view>
<view class="flex-sub">{{ order.volume | toFixed }}</view> <view style="width:12%;">{{ order.volume | toFixed }}</view>
<view class="flex-sub">{{ order.weight | toFixed }} kg</view> <view style="width:12%;">{{ order.weight | toFixed }}</view>
<view class="flex-sub" @click="showUnload(true, order.orderId)"> <view class="text-break" style="width:15%;">
<text>{{ order.num }}</text>/<text :class="actualClass(order.num, order.installNum)">{{ order.installNum }}</text> <view class="text-break text-blue" @tap="showGoodsDetail(true, order)">{{ order.num }}</view>
<view style="color:blue;fontWeight:bold;">
{{ order.multiSpecification === true ? ('('+$t('多规格')+')') : ''}}
</view> </view>
<view class="flex-sub flex justify-center"> </view>
<view style="width:12%;">{{ order.positionNo ? order.positionNo.split(',').join(', ') : '' }}</view>
<view style="width:12%;" @click="showUnload(true, order.orderId)">
<text style="width:12%;">{{ order.num }}</text>/<text :class="actualClass(order.num, order.installNum)">{{ order.installNum }}</text>
</view>
<view class="flex justify-center" style="width:20%;">
<view class="text-green text-bold" v-if="order.installNum == 0" @click.stop="moveOut(order)"> <view class="text-green text-bold" v-if="order.installNum == 0" @click.stop="moveOut(order)">
{{$t('移出')}} {{$t('移出')}}
</view> </view>
...@@ -244,6 +253,59 @@ ...@@ -244,6 +253,59 @@
</view> </view>
</view> --> </view> -->
<!-- 货物详情弹窗 -->
<view class="cu-modal" :class="goodsModal ? 'show' : ''" style="z-index: 900;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder" style="width:100%;">{{`${$t('货物详情')}-${$t('订单号')}${currRow.orderNo}`}}</view>
</view>
<scroll-view scroll-y="true" style="height: 400px;">
<uni-card v-for="(v, key) in currRow.goodsList" :key="key">
<view class="item-content noPadding">
<view>
<view>{{$t('中文名')}}{{ v.prodTitleZh }}</view>
<view>{{$t('英文名')}}{{ v.prodTitleEn }}</view>
</view>
<view>
<view>{{$t('品牌')}}
{{ v.brandName }}
</view>
<view>
<view class="flex">
{{$t('入仓件数')}}
<view class="text-break text-blue" @tap="showWarehouseLogs(v)">
<view>{{ v.num }}{{ $t('') }}</view>
<view style="color:blue;fontWeight:bold;">
{{ v.multiSpecification === true ? ('('+$t('多规格')+')') : '' }}
</view>
</view>
</view>
</view>
</view>
<view>
<view>{{$t('材质')}}:
<dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="v.material" />
</view>
<view>{{$t('体积') + '(m³)'}}{{ v.volume }}</view>
</view>
<view>
<view>{{$t('重量') + '(kg)'}}{{ v.weight }}</view>
<view>{{$t('入仓快递单号')}}{{ JSON.parse(v.warehouseInInfo).expressNo }}</view>
</view>
<view>
<view>{{$t('数量') + '(个)'}}{{ v.quantity }}</view>
<view>{{$t('储位')}}{{v.positionNo || showLocationName(v.orderItemLocationList)}}</view>
</view>
</view>
</uni-card>
</scroll-view>
<view class="cu-bar bg-white justify-end top-line">
<view class="action"><button class="cu-btn bg-grey" @tap="showGoodsDetail(false)">{{$t('关闭')}}</button></view>
</view>
</view>
</view>
<warehouse-list ref="warehouseList" /> <warehouse-list ref="warehouseList" />
<!-- 未装弹窗 --> <!-- 未装弹窗 -->
...@@ -517,6 +579,10 @@ export default { ...@@ -517,6 +579,10 @@ export default {
isFocus: false, isFocus: false,
focusStart: false, focusStart: false,
focusError: false, focusError: false,
// 货物详情
goodsModal: false,
// 当前行
currRow: {},
}; };
}, },
computed: { computed: {
...@@ -548,6 +614,15 @@ export default { ...@@ -548,6 +614,15 @@ export default {
}, },
}, },
methods: { methods: {
// 从warehouseInInfo中提取储位信息
showLocationName(locationList){
if(!locationList || !locationList.length) return ''
let locations = new Set()
locationList.forEach(item => {
locations.add((item.areaName || '') + (item.locationName || ''))
})
return Array.from(new Set(locations)).join(',')
},
delimage(index) { delimage(index) {
this.imageList.splice(index, 1); this.imageList.splice(index, 1);
}, },
...@@ -740,6 +815,13 @@ export default { ...@@ -740,6 +815,13 @@ export default {
}) })
// this.$refs.splitCom.showSplit(show, row); // this.$refs.splitCom.showSplit(show, row);
}, },
/* 跳转到关联单 */
relatedClick(orderNo) {
const { boxInfo } = this.loadData;
uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${boxInfo.selfNo}`,
});
},
/* 跳转到补单 */ /* 跳转到补单 */
toPatch() { toPatch() {
const { boxInfo } = this.loadData; const { boxInfo } = this.loadData;
...@@ -804,6 +886,11 @@ export default { ...@@ -804,6 +886,11 @@ export default {
this.orderId = row.orderId; this.orderId = row.orderId;
this.$refs.warehouseList.showDetail(row); this.$refs.warehouseList.showDetail(row);
}, },
// 货物详情
showGoodsDetail(show, row) {
if (show) this.currRow = row;
this.goodsModal = show;
},
/* 显示订单详情 */ /* 显示订单详情 */
showOrderDetail(show, id) { showOrderDetail(show, id) {
this.orderDetailModal = show; this.orderDetailModal = show;
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<view class="info-wrap"> <view class="info-wrap">
<empty v-if="!list.length"></empty> <empty v-if="!list.length"></empty>
<view v-for="(item, index) in filteredList" :key="index" class="item"> <view v-if="filteredList.length" v-for="(item, index) in filteredList" :key="index" class="item">
<view :class="'order-' + item.orderNo == heightLightId ? 'bg-yellow info-content' : 'bg-white info-content'"> <view :class="'order-' + item.orderNo == heightLightId ? 'bg-yellow info-content' : 'bg-white info-content'">
<view> <view>
<view> <view>
...@@ -78,14 +78,14 @@ ...@@ -78,14 +78,14 @@
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" style="color:red;fontWeight:bold;margin: 0 3px;" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" style="color:red;fontWeight:bold;margin: 0 3px;" />
<!-- 包装类型 --> <!-- 包装类型 -->
<text v-for="(prod, index) in item.orderItemDOS" :key="prod.orderItemId" style="color:red;fontWeight:bold;margin: 0 3px;"> <text v-for="(prod, index) in item.orderItemDOS" :key="prod.orderItemId" style="color:red;fontWeight:bold;margin: 0 3px;">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== order.orderItemDOS.length-1 ? ',':'' }} <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== item.orderItemDOS.length-1 ? ',':'' }}
</text> </text>
<!-- 混箱 --> <!-- 混箱 -->
<text v-if="item.orderItemDOS&&item.orderItemDOS.orderWarehouseInCreateReqVO&&item.orderItemDOS.orderWarehouseInCreateReqVO.orderWarehouseInItemDoList&&item.orderItemDOS.orderWarehouseInCreateReqVO.orderWarehouseInItemDoList.orderWarehouseInDetailsVOList&&item.orderItemDOS.orderWarehouseInCreateReqVO.orderWarehouseInItemDoList.orderWarehouseInDetailsVOList.length>0" style="color:red;fontWeight:bold;margin: 0 3px;">{{$t('混箱')}}</text> <text v-if="item.orderItemDOS&&item.orderItemDOS&&item.orderItemDOS.orderWarehouseInCreateReqVO&&item.orderItemDOS.orderWarehouseInCreateReqVO.orderWarehouseInItemDoList&&item.orderItemDOS.orderWarehouseInCreateReqVO.orderWarehouseInItemDoList.orderWarehouseInDetailsVOList&&item.orderItemDOS.orderWarehouseInCreateReqVO.orderWarehouseInItemDoList.orderWarehouseInDetailsVOList.length>0" style="color:red;fontWeight:bold;margin: 0 3px;">{{$t('混箱')}}</text>
<!-- 有牌 --> <!-- 有牌 -->
<text v-if="item.orderItemDOS.some(ele => [$t('无牌'), $t('有牌'), $t('中性')][ele.brandType] !== $t('无牌'))" style="color:red;fontWeight:bold;margin: 0 3px;">{{ $t('有牌') }}</text> <text v-if="item.orderItemDOS&&item.orderItemDOS.some(ele => [$t('无牌'), $t('有牌'), $t('中性')][ele.brandType] !== $t('无牌'))" style="color:red;fontWeight:bold;margin: 0 3px;">{{ $t('有牌') }}</text>
<!-- 带电 --> <!-- 带电 -->
<text v-if="item.orderItemDOS.some(ele => ele.electrifiedFreightPrice > 0)" style="color:red;fontWeight:bold;margin: 0 3px;">{{ $t('带电') }}</text> <text v-if="item.orderItemDOS&&item.orderItemDOS.some(ele => ele.electrifiedFreightPrice > 0)" style="color:red;fontWeight:bold;margin: 0 3px;">{{ $t('带电') }}</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -104,3 +104,18 @@ export function quantityRequired(lineId) { ...@@ -104,3 +104,18 @@ export function quantityRequired(lineId) {
method: 'get' method: 'get'
}) })
} }
/**
* 关联单
*
* @export
* @param {*} data
* @return {*}
*/
export function tallyListGuanlianOrder(data) {
return http('/shipment/box/tallyListGuanlianOrder', data, {
method: 'POST',
loading: true,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
});
}
\ No newline at end of file
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
</view> </view>
<view class="padding-sm" v-for="(order, key) in v.sectionOrderList" :key="key"> <view class="padding-sm" v-for="(order, key) in v.sectionOrderList" :key="key">
<view class="flex text-center"> <view class="flex text-center">
<view class="text-break text-blue" style="width:20%;" @tap="showOrderDetail(true, order.orderId)"> <view class="text-break text-blue" style="width:20%;">
<view>{{ order.orderNo }}</view> <view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view>
<view style="color:blue;fontWeight:bold;"> <view style="color:blue;fontWeight:bold;">
{{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}} {{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
</view> </view>
...@@ -45,12 +45,12 @@ ...@@ -45,12 +45,12 @@
</view> </view>
<!-- 包装类型 --> <!-- 包装类型 -->
<view style="color:red;fontWeight:bold;"> <view style="color:red;fontWeight:bold;">
<text v-for="(prod, index) in order.goodsList" :key="prod.orderItemId"> <text v-for="(prod, index) in uniqueArr(order.goodsList)" :key="prod.orderItemId">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== order.goodsList.length-1 ? ',':'' }} <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== uniqueArr(order.goodsList).length-1 ? ',':'' }}
</text> </text>
</view> </view>
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;">{{$t('关联单')}}</view> <view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 --> <!-- 混箱 -->
<view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view> <view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view>
</view> </view>
...@@ -410,6 +410,11 @@ export default { ...@@ -410,6 +410,11 @@ export default {
}); });
this.totalSecStatistics = totalSecStatistics; this.totalSecStatistics = totalSecStatistics;
}, },
/* 过滤包装类型 */
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.unit === obj.unit));
},
/* 读取理货详情 */ /* 读取理货详情 */
getLoadDetail() { getLoadDetail() {
if (this.shipmentId) { if (this.shipmentId) {
...@@ -523,6 +528,13 @@ export default { ...@@ -523,6 +528,13 @@ export default {
this.getLoadDetail(); this.getLoadDetail();
}); });
}, },
/* 跳转到关联单 */
relatedClick(orderId) {
const { boxInfo } = this.loadData;
uni.navigateTo({
url: `./relatedOrder?orderId=${orderId}&selfNo=${boxInfo.selfNo}`,
});
},
/* 跳转到补单 */ /* 跳转到补单 */
toPatch() { toPatch() {
const { boxInfo } = this.loadData; const { boxInfo } = this.loadData;
......
<template>
<view style="background: #fff; min-height: calc(100vh - 44px)">
<scroll-view scroll-y="true" scroll-with-animation>
<view>
<view class="productsList">
<view class="flex text-center text-black bg-white text-bold padding-sm">
<view style="width:20%;">{{$t('关联单号')}}</view>
<view class="flex-sub">{{$t('体积') + "(m³)"}}</view>
<view class="flex-sub">{{$t("重量") + "(kg)"}}</view>
<view class="flex-sub">{{$t('箱数')}}</view>
<view class="flex-sub">{{$t("储位")}}</view>
<view class="flex-sub">{{$t('自编号')}}</view>
<view class="flex-sub">{{$t('同一个自编号')}}</view>
</view>
<view v-for="(v, index) in orderList" :key="'order-' + index">
<view class="flex text-center padding-sm" v-for="(order, index) in v.orderItemList" :key="'goods-' + index">
<view class="text-break text-blue" style="width:20%;">
<view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view>
<view style="color:blue;fontWeight:bold;">
{{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
</view>
<view style="color:sandybrown;fontWeight:bold;">
{{ order.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</view>
<!-- 报关方式 -->
<view v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
</view>
<!-- 包装类型 -->
<view style="color:red;fontWeight:bold;">
{{ order.units ? order.units.split(',').join(', ') : '' }}
<!-- <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="order.unit" /> -->
</view>
<!-- 关联单 -->
<view v-if="v.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 -->
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view>
</view>
<view class="flex-sub">{{ order.volume | toFixed }}</view>
<view class="flex-sub">{{ order.weight | toFixed }}</view>
<view class="flex-sub">
<view class="text-break text-blue" @tap="showGoodsDetail(true, order)">{{ order.num }}</view>
<view style="color:blue;fontWeight:bold;">
{{ order.multiSpecification === true ? ('('+$t('多规格')+')') : ''}}
</view>
</view>
<view class="flex-sub">{{ order.positionNo ? order.positionNo.split(',').join(', ') : '' }}</view>
<view class="flex-sub">{{ order.containerNumber }}</view>
<view class="flex-sub">{{ order.containerNumber === selfNo ? $t('') : $t('') }}</view>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 订单详情弹窗 -->
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- 货物详情弹窗 -->
<view class="cu-modal" :class="goodsModal ? 'show' : ''" style="z-index: 900;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder" style="width:100%;">{{`${$t('货物详情')}-${$t('订单号')}${currRow.orderNo}`}}</view>
</view>
<scroll-view scroll-y="true" style="height: 400px;">
<uni-card v-for="(v, key) in goodsList" :key="key">
<view class="item-content noPadding">
<view>
<view>{{$t('中文名')}}{{ v.prodTitleZh }}</view>
<view>{{$t('英文名')}}{{ v.prodTitleEn }}</view>
</view>
<view>
<view>{{$t('品牌')}}
{{ v.brandName }}
</view>
<view>
<view class="flex">
{{$t('入仓件数')}}
<view class="text-break text-blue" @tap="showWarehouseLogs(v)">
<view>{{ v.num }}{{ $t('') }}</view>
<view style="color:blue;fontWeight:bold;">
{{ v.multiSpecification === true ? ('('+$t('多规格')+')') : '' }}
</view>
</view>
</view>
</view>
</view>
<view>
<view>{{$t('材质')}}:
<dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="v.material" />
</view>
<view>{{$t('体积')}}{{ v.volume }}m³</view>
</view>
<view>
<view>{{$t('重量')}}{{ v.weight }}kg</view>
<view>{{$t('入仓快递单号')}}{{ v.expressNo ? v.expressNo: '' }}</view>
</view>
<view>
<view>{{$t('数量') + '(个)'}}{{ v.num }}</view>
<view>{{$t('储位')}}{{v.positionNo || showLocationName(v.orderItemLocationList)}}</view>
</view>
</view>
</uni-card>
</scroll-view>
<view class="cu-bar bg-white justify-end top-line">
<view class="action"><button class="cu-btn bg-grey" @tap="showGoodsDetail(false)">{{$t('关闭')}}</button></view>
</view>
</view>
</view>
<warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" />
<warehouse-list ref="warehouseList" />
</view>
</template>
<script>
import { getOrder, listByOrderId, tallyListGuanlianOrder } from "./api";
import { getOrderDetail } from "../loading/api";
import WarehouseDetail from "./warehouseDetail.vue";
import WarehouseList from "@/pages/tally/warehouseList.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue"
export default {
name: "related-order",
components: { WarehouseDetail,OrderDetailModal, WarehouseList },
data() {
return {
/* 订单详情 */
orderDetailModal: false,
orderDetail: {},
orderList: null,
locale: this.$lang.locale,
// 货物详情
goodsModal: false,
// 当前行
currRow: {},
goodsList: [],
// 入仓记录
showWarehouseInItemId: null,
orderId: null,
selfNo: null,
warehouseList: null,
};
},
methods: {
// 从warehouseInInfo中提取储位信息
showLocationName(locationList){
if(!locationList || !locationList.length) return ''
let locations = new Set()
locationList.forEach(item => {
locations.add((item.areaName || '') + (item.locationName || ''))
})
return Array.from(new Set(locations)).join(',')
},
// 货物详情
showGoodsDetail(show, row) {
this.goodsList = [];
if (show) {
this.currRow = row;
this.goodsList.push(row);
}
this.goodsModal = show;
},
/* 显示订单详情 */
showOrderDetail(show, id) {
this.orderDetailModal = show;
if (show) {
this.getOrderDetail(id);
}
},
// 显示入仓列表
showWarehouseList(row) {
this.orderId = row.orderId;
this.$refs.warehouseList.showDetail(row);
},
/* 读取订单详情 */
getOrderDetail(id) {
return new Promise((resolve, reject) => {
getOrderDetail(id).then((data) => {
//订单信息
this.orderDetail = data;
listByOrderId({ orderId: id }).then((data) => {
let positionNos = data.map((item) => {
return `${item.warehouseName}${item.areaName}${item.locationName || ''}`;
});
this.$set(this.orderDetail, "positionNo", positionNos.join(","));
});
});
});
},
/* 跳转到关联单 */
relatedClick(orderId) {
uni.navigateTo({
url: `./relatedOrder?orderId=${orderId}`,
});
},
},
onLoad: function (option) {
uni.setNavigationBarTitle({
title: this.$t("关联单"),
});
this.selfNo = option.selfNo
if ("orderId" in option) {
tallyListGuanlianOrder({orderId : option.orderId}).then((res) => {
console.log(res)
this.orderList = res;
});
}
},
};
</script>
<style lang="scss" scoped>
.scroll {
margin-top: -8px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
padding: 8px;
background: #fff;
::v-deep .uni-card {
margin: 12px 0 0 !important;
padding: 0 !important;
}
.img-wrap {
width: calc(100% - 68px);
::v-deep .uni-grid-item {
background: #fbf8fb;
}
.grid-item-box-add {
height: 100%;
display: flex;
flex-flow: column;
font-size: 10px;
padding: 16px 0;
text-align: center;
justify-content: center;
}
}
}
.cu-dialog {
background-color: #fff;
.content {
&.title-bolder {
color: #333333;
font-weight: bolder;
}
}
.item-content {
text-align: left;
padding: 10px 20px 0px 20px;
&.noPadding {
padding: 0;
}
> view {
display: flex;
padding: 4px 0;
> view {
flex: 1;
word-break: break-all;
padding-left: 4px;
}
}
.flex{
display: flex;
align-items: center;
justify-content: space-between;
.left{
flex: 1;
}
}
.btn{
background-color: rgb(47, 77, 174);
color: #fff;
border-radius: 5rpx;
padding: 5rpx 10rpx;
margin-left: 10px;
}
}
}
</style>
...@@ -57,12 +57,12 @@ ...@@ -57,12 +57,12 @@
</view> </view>
<!-- 包装类型 --> <!-- 包装类型 -->
<view style="color:red;fontWeight:bold;"> <view style="color:red;fontWeight:bold;">
<text v-for="(prod, index) in order.goodsList" :key="prod.orderItemId"> <text v-for="(prod, index) in uniqueArr(order.goodsList)" :key="prod.orderItemId">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== order.goodsList.length-1 ? ',':'' }} <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== uniqueArr(order.goodsList).length-1 ? ',':'' }}
</text> </text>
</view> </view>
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;">{{$t('关联单')}}</view> <view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 --> <!-- 混箱 -->
<view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view> <view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view>
</view> </view>
...@@ -633,6 +633,11 @@ export default { ...@@ -633,6 +633,11 @@ export default {
}); });
this.totalSecStatistics = totalSecStatistics; this.totalSecStatistics = totalSecStatistics;
}, },
/* 过滤包装类型 */
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.unit === obj.unit));
},
/* 读取理货详情 */ /* 读取理货详情 */
getLoadDetail() { getLoadDetail() {
this.focusStart = false this.focusStart = false
...@@ -785,6 +790,13 @@ export default { ...@@ -785,6 +790,13 @@ export default {
this.getLoadDetail(); this.getLoadDetail();
}); });
}, },
/* 跳转到关联单 */
relatedClick(orderNo) {
const { boxInfo } = this.loadData;
uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${boxInfo.selfNo}`,
});
},
/* 跳转到补单 */ /* 跳转到补单 */
toPatch() { toPatch() {
const { boxInfo } = this.loadData; const { boxInfo } = this.loadData;
......
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