Commit a168cb54 authored by xiaoyan's avatar xiaoyan

fix: 出仓/装箱增加属性

parent bb660d11
...@@ -42,13 +42,26 @@ ...@@ -42,13 +42,26 @@
<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="v.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.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 +138,7 @@ ...@@ -125,6 +138,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 +457,13 @@ import { ...@@ -443,12 +457,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 +529,7 @@ export default { ...@@ -514,6 +529,7 @@ export default {
//出仓信息 //出仓信息
params: {}, params: {},
selectItem: {}, selectItem: {},
orderId: null,
totalMergeData:{}, totalMergeData:{},
totalMergecheckoutData:{}, totalMergecheckoutData:{},
orderCheckoutData:{}, orderCheckoutData:{},
...@@ -757,10 +773,15 @@ export default { ...@@ -757,10 +773,15 @@ export default {
}); });
}); });
}, },
// 过滤重复的商品 // 显示混箱明细
uniqueArr(arr) { showMixOrder(row) {
return arr.filter((obj, index, self) => this.orderId = row.orderId;
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds)); 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){
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<!-- 品牌 --> <!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.brandType && [$t('无牌'), $t('有牌'), $t('中性')][ele.brandType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view> <view v-if="order.goodsList.some(ele => ele.brandType && [$t('无牌'), $t('有牌'), $t('中性')][ele.brandType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 --> <!-- 特性 -->
<view v-for="prod in uniqueArr(order.goodsList)" :key="prod.orderItemId" style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(prod.warehouseInProdAttrIds) }}</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;" />
...@@ -904,10 +904,10 @@ export default { ...@@ -904,10 +904,10 @@ export default {
if (show) this.currRow = row; if (show) this.currRow = row;
this.goodsModal = show; this.goodsModal = show;
}, },
// 过滤重复的商品 // 过滤商品特性
uniqueArr(arr) { uniqueProductAttrs(arr, field) {
return arr.filter((obj, index, self) => let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds)); return uniqueValues.join(',')
}, },
// 获取商品特性文本 // 获取商品特性文本
getProductAttrsByIds(ids){ getProductAttrsByIds(ids){
......
...@@ -74,20 +74,20 @@ ...@@ -74,20 +74,20 @@
<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'"> <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>
<!-- 包装类型 --> <!-- 包装类型 -->
<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.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>
...@@ -190,6 +190,7 @@ ...@@ -190,6 +190,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>
...@@ -325,13 +326,16 @@ import { batchCreateMore,batchDeleteMore,singleCreate,orderTagList } from "../ ...@@ -325,13 +326,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)
...@@ -339,6 +343,7 @@ export default { ...@@ -339,6 +343,7 @@ export default {
}, },
data() { data() {
return { return {
productAttrList:[],
// 出货Id // 出货Id
shipmentId: null, shipmentId: null,
// 自编号 // 自编号
...@@ -367,6 +372,7 @@ export default { ...@@ -367,6 +372,7 @@ export default {
batchModal: false, batchModal: false,
scanNumber: "", scanNumber: "",
batchOrderInfo: {}, batchOrderInfo: {},
orderId: null,
/* 装柜纠错 */ /* 装柜纠错 */
errorModal: false, errorModal: false,
unloadNumber: "", unloadNumber: "",
...@@ -420,6 +426,10 @@ export default { ...@@ -420,6 +426,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,
...@@ -455,6 +465,35 @@ export default { ...@@ -455,6 +465,35 @@ export default {
this.$set(item, 'checked', status) this.$set(item, 'checked', status)
}) })
}, },
// 显示混箱明细
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;
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!-- 品牌 --> <!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view> <view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 --> <!-- 特性 -->
<view v-for="prod in uniqueArr(order.goodsList)" :key="prod.orderItemId" style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(prod.warehouseInProdAttrIds) }}</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;" />
...@@ -367,10 +367,10 @@ export default { ...@@ -367,10 +367,10 @@ export default {
if (show) this.currRow = row; if (show) this.currRow = row;
this.goodsModal = show; this.goodsModal = show;
}, },
// 过滤重复的商品 // 过滤商品特性
uniqueArr(arr) { uniqueProductAttrs(arr, field) {
return arr.filter((obj, index, self) => let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds)); return uniqueValues.join(',')
}, },
// 获取商品特性文本 // 获取商品特性文本
getProductAttrsByIds(ids){ getProductAttrsByIds(ids){
...@@ -442,11 +442,6 @@ export default { ...@@ -442,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) {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<!-- 品牌 --> <!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view> <view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 --> <!-- 特性 -->
<view v-for="prod in uniqueArr(order.goodsList)" :key="prod.orderItemId" style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(prod.warehouseInProdAttrIds) }}</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;" />
...@@ -590,10 +590,10 @@ export default { ...@@ -590,10 +590,10 @@ export default {
}) })
} }
}, },
// 过滤重复的商品 // 过滤商品特性
uniqueArr(arr) { uniqueProductAttrs(arr, field) {
return arr.filter((obj, index, self) => let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds)); return uniqueValues.join(',')
}, },
// 获取商品特性文本 // 获取商品特性文本
getProductAttrsByIds(ids){ getProductAttrsByIds(ids){
...@@ -665,11 +665,6 @@ export default { ...@@ -665,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
......
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