Commit a168cb54 authored by xiaoyan's avatar xiaoyan

fix: 出仓/装箱增加属性

parent bb660d11
......@@ -42,13 +42,26 @@
<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.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;" />
</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.weight | toFixed }} kg</view>
<view class="flex-sub" @click="showUnload(true, order.orderId)">
......@@ -125,6 +138,7 @@
</view>
</scroll-view>
<mix-order-list ref="mixOrderList" />
<!-- 订单详情弹窗 -->
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- <view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
......@@ -443,12 +457,13 @@ import {
import { getAdjustWaitOutList, warehouseAdjustSendOutBatch, getSupplierPage,getAirShipmentByShipmentId,boxAirCheckoutGet,warehouseCreate,getAirCheckoutByShipmentId,searchLoadOrderByBoxNo,batchAirCreate,singleAirCreate } from './api'
import { updateImg } from "@/api/system";
import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import MixOrderList from "@/pages/tally/mixOrderList.vue";
import {getProductAttrList} from "@/api/system";
export default {
name: "loading-detail",
components: {
OrderDetailModal
OrderDetailModal, MixOrderList
},
mixins: [mixins],
data() {
......@@ -514,6 +529,7 @@ export default {
//出仓信息
params: {},
selectItem: {},
orderId: null,
totalMergeData:{},
totalMergecheckoutData:{},
orderCheckoutData:{},
......@@ -757,10 +773,15 @@ export default {
});
});
},
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
// 显示混箱明细
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){
......
......@@ -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-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">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
......@@ -904,10 +904,10 @@ export default {
if (show) this.currRow = row;
this.goodsModal = show;
},
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
getProductAttrsByIds(ids){
......
......@@ -74,20 +74,20 @@
<text v-for="prod in item.orderItemDOS" :key="prod.orderItemId" style="color:red;fontWeight:bold;margin: 0 3px;">
{{ prod.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</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;" />
</text>
<!-- 包装类型 -->
<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!== item.orderItemDOS.length-1 ? ',':'' }}
<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!== uniqueArr(item.orderItemDOS).length-1 ? ',':'' }}
</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&&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>
<text v-if="item.mixStatus === 1" style="color:red;fontWeight:bold;margin: 0 3px;" @tap="showMixOrder(item)">{{$t('混箱')}}</text>
</view>
</view>
</view>
......@@ -190,6 +190,7 @@
</view>
</view>
<mix-order-list ref="mixOrderList" />
<!-- 订单详情弹窗 -->
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
......@@ -325,13 +326,16 @@ import { batchCreateMore,batchDeleteMore,singleCreate,orderTagList } from "../
import { getOrderDetail, getOrderDetailByBoxNo } from "../loading/api";
import EditMergePkgDialog from "@/pages/mergePkg/components/editMergePkgDialog.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import MixOrderList from "@/pages/tally/mixOrderList.vue";
import util from '@/util/util'
import { msg, alert } from "@/util/tools";
import Seal from "@/pages/mergePkg/components/seal.vue";
import Empty from "@/pages/mergePkg/components/empty.vue";
import * as types from "../../store/mutations-types.js";
import {getProductAttrList} from "@/api/system";
export default {
components: { Empty, Seal, EditMergePkgDialog, uniIcons, OrderDetailModal },
components: { Empty, Seal, EditMergePkgDialog, uniIcons, OrderDetailModal, MixOrderList },
filters:{
toFixed(val){
return Number(val).toFixed(2)
......@@ -339,6 +343,7 @@ export default {
},
data() {
return {
productAttrList:[],
// 出货Id
shipmentId: null,
// 自编号
......@@ -367,6 +372,7 @@ export default {
batchModal: false,
scanNumber: "",
batchOrderInfo: {},
orderId: null,
/* 装柜纠错 */
errorModal: false,
unloadNumber: "",
......@@ -420,6 +426,10 @@ export default {
this.pkgId = +option.pkgId
this.getData()
getProductAttrList().then(data => {
this.productAttrList = data
})
},
methods: {
formatDate: util.formatDate,
......@@ -455,6 +465,35 @@ export default {
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) {
this.orderDetailModal = show;
......
......@@ -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-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">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
......@@ -367,10 +367,10 @@ export default {
if (show) this.currRow = row;
this.goodsModal = show;
},
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
getProductAttrsByIds(ids){
......@@ -442,11 +442,6 @@ export default {
});
this.totalSecStatistics = totalSecStatistics;
},
/* 过滤包装类型 */
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.unit === obj.unit));
},
/* 读取理货详情 */
getLoadDetail() {
if (this.shipmentId) {
......
......@@ -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-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">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
......@@ -590,10 +590,10 @@ export default {
})
}
},
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
getProductAttrsByIds(ids){
......@@ -665,11 +665,6 @@ export default {
});
this.totalSecStatistics = totalSecStatistics;
},
/* 过滤包装类型 */
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.unit === obj.unit));
},
/* 读取理货详情 */
getLoadDetail() {
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