Commit 808df3f4 authored by Administrator's avatar Administrator

Merge branch 'release' into 'jd_dev'

Release分支合并到jd分支0117

See merge request !22
parents 75844b64 53f8b2d2
...@@ -42,13 +42,28 @@ ...@@ -42,13 +42,28 @@
<view style="color:blue;fontWeight:bold;"> <view style="color:blue;fontWeight:bold;">
{{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}} {{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
</view> </view>
<view style="color:sandybrown;fontWeight:bold;">
{{ order.adjustToDestWarehouseId > 0 ? ('('+$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-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:blue;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 --> <!-- 特性 -->
<view v-for="prod in uniqueArr(order.goodsList)" :key="prod.orderItemId" style="color:blue;fontWeight:bold;">{{ getProductAttrsByIds(prod.warehouseInProdAttrIds) }}</view> <text style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(order.goodsList, 'warehouseInProdAttrIds')) }}</text>
<!-- 报关方式 --> <!-- 报关方式 -->
<view v-if="order.customsType !== 1">
<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>
<!-- 包装类型 -->
<view style="color:red;fontWeight:bold;">
<text v-for="(unit, index) in order.units.split(',')" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== order.units.split(',').length-1 ? ',':'' }}
</text>
</view>
<!-- 关联单 -->
<view v-if="order.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 -->
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(order)">{{$t('混箱')}}</view>
</view>
<view class="flex-sub">{{ order.volume | toFixed }}</view> <view class="flex-sub">{{ order.volume | toFixed }}</view>
<view class="flex-sub">{{ order.weight | toFixed }} kg</view> <view class="flex-sub">{{ order.weight | toFixed }} kg</view>
<view class="flex-sub" @click="showUnload(true, order.orderId)"> <view class="flex-sub" @click="showUnload(true, order.orderId)">
...@@ -125,6 +140,7 @@ ...@@ -125,6 +140,7 @@
</view> </view>
</scroll-view> </scroll-view>
<mix-order-list ref="mixOrderList" />
<!-- 订单详情弹窗 --> <!-- 订单详情弹窗 -->
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal> <OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- <view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;"> <!-- <view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
...@@ -443,12 +459,13 @@ import { ...@@ -443,12 +459,13 @@ 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 MixOrderList from "@/pages/tally/mixOrderList.vue";
import {getProductAttrList} from "@/api/system"; import {getProductAttrList} from "@/api/system";
export default { export default {
name: "loading-detail", name: "loading-detail",
components: { components: {
OrderDetailModal OrderDetailModal, MixOrderList
}, },
mixins: [mixins], mixins: [mixins],
data() { data() {
...@@ -514,6 +531,7 @@ export default { ...@@ -514,6 +531,7 @@ export default {
//出仓信息 //出仓信息
params: {}, params: {},
selectItem: {}, selectItem: {},
orderId: null,
totalMergeData:{}, totalMergeData:{},
totalMergecheckoutData:{}, totalMergecheckoutData:{},
orderCheckoutData:{}, orderCheckoutData:{},
...@@ -757,10 +775,22 @@ export default { ...@@ -757,10 +775,22 @@ export default {
}); });
}); });
}, },
// 过滤重复的商品 /* 跳转到关联单 */
uniqueArr(arr) { relatedClick(orderNo) {
return arr.filter((obj, index, self) => const { boxInfo } = this.loadData;
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds)); uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${boxInfo.selfNo}`,
});
},
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
}, },
// 获取商品特性文本 // 获取商品特性文本
getProductAttrsByIds(ids){ getProductAttrsByIds(ids){
......
...@@ -47,11 +47,15 @@ ...@@ -47,11 +47,15 @@
</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" style="width:20%;"> <view class="text-break 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('外部仓')+')') : ''}}
</view> </view>
<!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.brandType && [$t('无牌'), $t('有牌'), $t('中性')][ele.brandType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 -->
<view style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(order.goodsList, 'warehouseInProdAttrIds')) }}</view>
<!-- 报关方式 --> <!-- 报关方式 -->
<view style="color: red;fontWeight:bold;" v-if="order.customsType !== 1"> <view style="color: red;fontWeight:bold;" v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
...@@ -512,7 +516,7 @@ import splitCom from "./components/split-com.vue"; ...@@ -512,7 +516,7 @@ import splitCom from "./components/split-com.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import WarehouseList from "@/pages/tally/warehouseList.vue"; import WarehouseList from "@/pages/tally/warehouseList.vue";
import MixOrderList from "@/pages/tally/mixOrderList.vue"; import MixOrderList from "@/pages/tally/mixOrderList.vue";
import { updateImg } from "@/api/system"; import { updateImg, getProductAttrList } from "@/api/system";
import dayjs from "dayjs"; import dayjs from "dayjs";
export default { export default {
...@@ -586,6 +590,7 @@ export default { ...@@ -586,6 +590,7 @@ export default {
goodsModal: false, goodsModal: false,
// 当前行 // 当前行
currRow: {}, currRow: {},
productAttrList:[],
}; };
}, },
computed: { computed: {
...@@ -899,6 +904,25 @@ export default { ...@@ -899,6 +904,25 @@ export default {
if (show) this.currRow = row; if (show) this.currRow = row;
this.goodsModal = show; this.goodsModal = show;
}, },
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
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'))
}
})
})
console.log('result', result)
return result.join('')
},
/* 显示订单详情 */ /* 显示订单详情 */
showOrderDetail(show, id) { showOrderDetail(show, id) {
this.orderDetailModal = show; this.orderDetailModal = show;
...@@ -1207,6 +1231,10 @@ export default { ...@@ -1207,6 +1231,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) {
...@@ -1359,4 +1387,7 @@ export default { ...@@ -1359,4 +1387,7 @@ export default {
.scroll-view{ .scroll-view{
height: calc(100vh - 44px - 75px); height: calc(100vh - 44px - 75px);
} }
.text-break {
word-break: break-word;
}
</style> </style>
...@@ -74,18 +74,22 @@ ...@@ -74,18 +74,22 @@
<text v-for="prod in item.orderItemDOS" :key="prod.orderItemId" style="color:red;fontWeight:bold;margin: 0 3px;"> <text v-for="prod in item.orderItemDOS" :key="prod.orderItemId" style="color:red;fontWeight:bold;margin: 0 3px;">
{{ prod.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}} {{ prod.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</text> </text>
<!-- 品牌 -->
<text v-if="item.orderItemDOS&&item.orderItemDOS.some(ele => [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;margin: 0 3px;">{{ $t('有牌') }}</text>
<!-- 特性 -->
<text style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(item.orderItemDOS, 'warehouseInProdAttrIds')) }}</text>
<!-- 报关方式 --> <!-- 报关方式 -->
<text v-if="item.customsType !== '1'">
<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>
<!-- 包装类型 --> <!-- 包装类型 -->
<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 uniqueArr(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!== item.orderItemDOS.length-1 ? ',':'' }} <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== uniqueArr(item.orderItemDOS).length-1 ? ',':'' }}
</text> </text>
<!-- 关联单 -->
<text v-if="item.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(item.orderId)">{{$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.mixStatus === 1" style="color:red;fontWeight:bold;margin: 0 3px;" @tap="showMixOrder(item)">{{$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&&item.orderItemDOS.some(ele => ele.electrifiedFreightPrice > 0)" style="color:red;fontWeight:bold;margin: 0 3px;">{{ $t('带电') }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -188,6 +192,7 @@ ...@@ -188,6 +192,7 @@
</view> </view>
</view> </view>
<mix-order-list ref="mixOrderList" />
<!-- 订单详情弹窗 --> <!-- 订单详情弹窗 -->
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal> <OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
...@@ -323,13 +328,16 @@ import { batchCreateMore,batchDeleteMore,singleCreate,orderTagList } from "../ ...@@ -323,13 +328,16 @@ import { batchCreateMore,batchDeleteMore,singleCreate,orderTagList } from "../
import { getOrderDetail, getOrderDetailByBoxNo } from "../loading/api"; import { getOrderDetail, getOrderDetailByBoxNo } from "../loading/api";
import EditMergePkgDialog from "@/pages/mergePkg/components/editMergePkgDialog.vue"; import EditMergePkgDialog from "@/pages/mergePkg/components/editMergePkgDialog.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import MixOrderList from "@/pages/tally/mixOrderList.vue";
import util from '@/util/util' import util from '@/util/util'
import { msg, alert } from "@/util/tools"; import { msg, alert } from "@/util/tools";
import Seal from "@/pages/mergePkg/components/seal.vue"; import Seal from "@/pages/mergePkg/components/seal.vue";
import Empty from "@/pages/mergePkg/components/empty.vue"; import Empty from "@/pages/mergePkg/components/empty.vue";
import * as types from "../../store/mutations-types.js"; import * as types from "../../store/mutations-types.js";
import {getProductAttrList} from "@/api/system";
export default { export default {
components: { Empty, Seal, EditMergePkgDialog, uniIcons, OrderDetailModal }, components: { Empty, Seal, EditMergePkgDialog, uniIcons, OrderDetailModal, MixOrderList },
filters:{ filters:{
toFixed(val){ toFixed(val){
return Number(val).toFixed(2) return Number(val).toFixed(2)
...@@ -337,6 +345,7 @@ export default { ...@@ -337,6 +345,7 @@ export default {
}, },
data() { data() {
return { return {
productAttrList:[],
// 出货Id // 出货Id
shipmentId: null, shipmentId: null,
// 自编号 // 自编号
...@@ -365,6 +374,7 @@ export default { ...@@ -365,6 +374,7 @@ export default {
batchModal: false, batchModal: false,
scanNumber: "", scanNumber: "",
batchOrderInfo: {}, batchOrderInfo: {},
orderId: null,
/* 装柜纠错 */ /* 装柜纠错 */
errorModal: false, errorModal: false,
unloadNumber: "", unloadNumber: "",
...@@ -418,6 +428,10 @@ export default { ...@@ -418,6 +428,10 @@ export default {
this.pkgId = +option.pkgId this.pkgId = +option.pkgId
this.getData() this.getData()
getProductAttrList().then(data => {
this.productAttrList = data
})
}, },
methods: { methods: {
formatDate: util.formatDate, formatDate: util.formatDate,
...@@ -453,6 +467,41 @@ export default { ...@@ -453,6 +467,41 @@ export default {
this.$set(item, 'checked', status) this.$set(item, 'checked', status)
}) })
}, },
/* 跳转到关联单 */
relatedClick(orderNo) {
uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${this.selfNo}`,
});
},
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
/* 过滤包装类型 */
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.unit === obj.unit));
},
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
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'))
}
})
})
console.log('result', result)
return result.join('')
},
/* 显示订单详情 */ /* 显示订单详情 */
showOrderDetail(show, id) { showOrderDetail(show, id) {
this.orderDetailModal = show; this.orderDetailModal = show;
......
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
<view style="color:sandybrown;fontWeight:bold;"> <view style="color:sandybrown;fontWeight:bold;">
{{ order.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}} {{ order.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</view> </view>
<!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 -->
<view style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(order.goodsList, 'warehouseInProdAttrIds')) }}</view>
<!-- 报关方式 --> <!-- 报关方式 -->
<view v-if="order.customsType !== 1"> <view v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
...@@ -267,6 +271,7 @@ import WarehouseDetail from "./warehouseDetail.vue"; ...@@ -267,6 +271,7 @@ import WarehouseDetail from "./warehouseDetail.vue";
import WarehouseList from "@/pages/tally/warehouseList.vue"; import WarehouseList from "@/pages/tally/warehouseList.vue";
import MixOrderList from "@/pages/tally/mixOrderList.vue"; import MixOrderList from "@/pages/tally/mixOrderList.vue";
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: "tally-detail", name: "tally-detail",
...@@ -304,6 +309,7 @@ export default { ...@@ -304,6 +309,7 @@ export default {
goodsModal: false, goodsModal: false,
// 当前行 // 当前行
currRow: {}, currRow: {},
productAttrList:[],
}; };
}, },
computed: { computed: {
...@@ -361,6 +367,25 @@ export default { ...@@ -361,6 +367,25 @@ export default {
if (show) this.currRow = row; if (show) this.currRow = row;
this.goodsModal = show; this.goodsModal = show;
}, },
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
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'))
}
})
})
console.log('result', result)
return result.join('')
},
/* 折叠 */ /* 折叠 */
fold(k) { fold(k) {
if (this.partShow[k]) this.partShow[k] = true; if (this.partShow[k]) this.partShow[k] = true;
...@@ -417,11 +442,6 @@ export default { ...@@ -417,11 +442,6 @@ 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) {
...@@ -572,15 +592,18 @@ export default { ...@@ -572,15 +592,18 @@ export default {
this.shipmentId = option.id; this.shipmentId = option.id;
this.getLoadDetail(); this.getLoadDetail();
} }
getProductAttrList().then(data => {
this.productAttrList = data
})
}, },
/* onShow() { onShow() {
if (this.onHideFlag) { if (this.onHideFlag) {
this.getLoadDetail(); this.getLoadDetail();
} }
}, },
onHide() { onHide() {
this.onHideFlag = true; this.onHideFlag = true;
}, */ },
}; };
</script> </script>
......
...@@ -4,50 +4,44 @@ ...@@ -4,50 +4,44 @@
<view> <view>
<view class="productsList"> <view 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 style="width:20%;">{{$t('关联单号')}}</view> <view style="width:25%;">{{$t('关联单号')}}</view>
<view class="flex-sub">{{$t('体积') + "(m³)"}}</view> <view class="flex-sub">{{$t('体积') + "(m³)"}}</view>
<view class="flex-sub">{{$t("重量") + "(kg)"}}</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 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>
<view v-for="(v, index) in orderList" :key="'order-' + index"> <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="flex text-center padding-sm">
<view class="text-break text-blue" style="width:20%;"> <view class="text-break text-blue" style="width:25%;">
<view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view> <view @tap="showOrderDetail(true, v.orderId)">{{ v.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"> <view v-if="v.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="v.customsType" style="color:red;fontWeight:bold;" />
</view> </view>
<!-- 包装类型 --> <!-- 包装类型 -->
<view style="color:red;fontWeight:bold;"> <view style="color:red;fontWeight:bold;">
<text v-for="(unit, index) in order.units.split(',')" :key="index"> <text v-for="(unit, index) in v.units.split(',')" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== order.units.split(',').length-1 ? ',':'' }} <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== v.units.split(',').length-1 ? ',':'' }}
</text> </text>
</view> </view>
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="v.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view> <view v-if="v.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(v.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 --> <!-- 混箱 -->
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(order)">{{$t('混箱')}}</view> <view v-if="v.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(v)">{{$t('混箱')}}</view>
</view> </view>
<view class="flex-sub">{{ order.volume | toFixed }}</view> <view class="flex-sub">{{ calcSum(v.orderItemList, 'volume') }}</view>
<view class="flex-sub">{{ order.weight | toFixed }}</view> <view class="flex-sub">{{ calcSum(v.orderItemList, 'weight') }}</view>
<view class="flex-sub"> <view class="flex-sub">
<view class="text-break text-blue" @tap="showGoodsDetail(true, order)">{{ order.num }}</view> <view class="text-break text-blue" @tap="showOrderDetail(true, v.orderId)">{{ v.num }}</view>
<view style="color:blue;fontWeight:bold;"> <view style="color:blue;fontWeight:bold;">
{{ order.multiSpecification === true ? ('('+$t('多规格')+')') : ''}} {{ v.multiSpecification === true ? ('('+$t('多规格')+')') : ''}}
</view> </view>
</view> </view>
<view class="flex-sub">{{ order.positionNo ? order.positionNo.split(',').join(', ') : '' }}</view> <!-- <view class="flex-sub">{{ order.positionNo ? order.positionNo.split(',').join(', ') : '' }}</view> -->
<view class="flex-sub">{{ order.containerNumber }}</view> <view class="flex-sub">{{ v.orderItemList.length ? v.orderItemList[0].containerNumber:'' }}</view>
<view class="flex-sub">{{ order.containerNumber === selfNo ? $t('') : $t('') }}</view> <view class="flex-sub">{{ v.orderItemList.length && v.orderItemList[0].containerNumber === selfNo ? $t('') : $t('') }}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -203,6 +197,10 @@ export default { ...@@ -203,6 +197,10 @@ export default {
url: `./relatedOrder?orderId=${orderId}`, url: `./relatedOrder?orderId=${orderId}`,
}); });
}, },
calcSum(arr, key) {
const num = parseFloat(arr.reduce((sum, v) => sum + v[key], 0)).toFixed(2)
return num
}
}, },
onLoad: function (option) { onLoad: function (option) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
......
...@@ -51,6 +51,10 @@ ...@@ -51,6 +51,10 @@
<view style="color:sandybrown;fontWeight:bold;"> <view style="color:sandybrown;fontWeight:bold;">
{{ order.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}} {{ order.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</view> </view>
<!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 -->
<view style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(order.goodsList, 'warehouseInProdAttrIds')) }}</view>
<!-- 报关方式 --> <!-- 报关方式 -->
<view v-if="order.customsType !== 1"> <view v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
...@@ -421,6 +425,7 @@ import MixOrderList from "@/pages/tally/mixOrderList.vue"; ...@@ -421,6 +425,7 @@ import MixOrderList from "@/pages/tally/mixOrderList.vue";
import Exception from "./components/exception.vue"; import Exception from "./components/exception.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import util from "../../util/util.js"; import util from "../../util/util.js";
import { getProductAttrList } from "@/api/system";
export default { export default {
name: "tally-detail", name: "tally-detail",
...@@ -458,6 +463,7 @@ export default { ...@@ -458,6 +463,7 @@ export default {
goodsModal: false, goodsModal: false,
// 当前行 // 当前行
currRow: {}, currRow: {},
productAttrList:[],
// 当前转异订单 // 当前转异订单
turnExceptionOrder: null, turnExceptionOrder: null,
keyword: "", keyword: "",
...@@ -584,6 +590,25 @@ export default { ...@@ -584,6 +590,25 @@ export default {
}) })
} }
}, },
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
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'))
}
})
})
console.log('result', result)
return result.join('')
},
/* 折叠 */ /* 折叠 */
fold(k) { fold(k) {
if (this.partShow[k]) this.partShow[k] = true; if (this.partShow[k]) this.partShow[k] = true;
...@@ -640,11 +665,6 @@ export default { ...@@ -640,11 +665,6 @@ 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
...@@ -969,16 +989,18 @@ export default { ...@@ -969,16 +989,18 @@ export default {
this.shipmentId = parseInt(option.id); this.shipmentId = parseInt(option.id);
this.getLoadDetail(); this.getLoadDetail();
} }
getProductAttrList().then(data => {
this.productAttrList = data
})
}, },
onShow() {
/* onShow() {
if (this.onHideFlag) { if (this.onHideFlag) {
this.getLoadDetail(); this.getLoadDetail();
} }
}, },
onHide() { onHide() {
this.onHideFlag = true; this.onHideFlag = true;
}, */ },
}; };
</script> </script>
......
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