Commit fffb7851 authored by xiaoyan's avatar xiaoyan

fix: 优化显示&理货等增加品牌和特性显示

parent 0eba59c9
...@@ -37,21 +37,25 @@ ...@@ -37,21 +37,25 @@
</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 style="width:20%;">{{$t('订单号')}}</view> <view style="width:24%;">{{$t('订单号')}}</view>
<view style="width:12%;">{{$t('体积') + "(m³)"}}</view> <view style="width:12%;">{{$t('体积') + "(m³)"}}</view>
<view style="width:12%;">{{$t('重量') + "(kg)"}}</view> <view style="width:12%;">{{$t('重量') + "(kg)"}}</view>
<view style="width:12%;">{{$t('箱数')}}</view> <view style="width:12%;">{{$t('箱数')}}</view>
<view style="width:12%;">{{$t('储位')}}</view> <view style="width:12%;">{{$t('储位')}}</view>
<view style="width:12%;">{{$t('计划')}}/{{$t('实装')}}</view> <view style="width:12%;">{{$t('计划')}}/{{$t('实装')}}</view>
<view style="width:20%;">{{$t('操作')}}</view> <view style="width:16%;">{{$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" style="width:20%;"> <view class="flex-sub text-blue" style="width:24%;">
<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 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;" 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;" />
...@@ -79,7 +83,7 @@ ...@@ -79,7 +83,7 @@
<view style="width:12%;" @click="showUnload(true, order.orderId)"> <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> <text style="width:12%;">{{ order.num }}</text>/<text :class="actualClass(order.num, order.installNum)">{{ order.installNum }}</text>
</view> </view>
<view class="flex justify-center" style="width:20%;"> <view class="flex justify-center" style="width:16%;">
<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>
...@@ -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;
}, },
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
},
// 获取商品特性文本
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) {
......
...@@ -75,7 +75,9 @@ ...@@ -75,7 +75,9 @@
{{ prod.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}} {{ prod.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</text> </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 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!== item.orderItemDOS.length-1 ? ',':'' }}
......
...@@ -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.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 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;
}, },
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
},
// 获取商品特性文本
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;
...@@ -572,15 +597,18 @@ export default { ...@@ -572,15 +597,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,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<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" v-for="(order, index) in v.orderItemList" :key="'goods-' + index">
<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, 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('外部仓')+')') : ''}}
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
{{ order.multiSpecification === true ? ('('+$t('多规格')+')') : ''}} {{ order.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">{{ order.containerNumber }}</view>
<view class="flex-sub">{{ order.containerNumber === selfNo ? $t('') : $t('') }}</view> <view class="flex-sub">{{ order.containerNumber === selfNo ? $t('') : $t('') }}</view>
</view> </view>
......
...@@ -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.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 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 {
}) })
} }
}, },
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
},
// 获取商品特性文本
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;
...@@ -969,16 +994,18 @@ export default { ...@@ -969,16 +994,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