Commit 623e6a1d authored by xiaoyan's avatar xiaoyan

fix: 理货入仓类型去重&出仓特性显示

parent 9d225bad
......@@ -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-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;" />
</view>
......@@ -443,6 +443,7 @@ 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 {getProductAttrList} from "@/api/system";
export default {
name: "loading-detail",
......@@ -454,6 +455,7 @@ export default {
return {
movingOrderId: undefined,
popupMessage: '',
productAttrList:[],
/* 出货ID */
shipmentId: null,
/* 自编号 */
......@@ -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) {
uni.scanCode({
success: (res) => {
......@@ -1083,6 +1098,10 @@ export default {
let today = util.formatDate(new Date().getTime(), true);
this.confirmCloseCloseBoxTime = today; //确认封柜弹窗表单-封仓时间
this.confirmLeaveStoreTime = today; //确认封柜弹窗表单-出仓时间
getProductAttrList().then(data => {
this.productAttrList = data
})
},
onShow() {
if (this.onHideFlag) {
......
......@@ -45,8 +45,8 @@
</view>
<!-- 包装类型 -->
<view style="color:red;fontWeight:bold;">
<text v-for="(prod, index) in order.goodsList" :key="prod.orderItemId">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== order.goodsList.length-1 ? ',':'' }}
<text v-for="(prod, index) in uniqueArr(order.goodsList)" :key="prod.orderItemId">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== uniqueArr(order.goodsList).length-1 ? ',':'' }}
</text>
</view>
<!-- 关联单 -->
......@@ -410,6 +410,11 @@ 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) {
......
......@@ -57,8 +57,8 @@
</view>
<!-- 包装类型 -->
<view style="color:red;fontWeight:bold;">
<text v-for="(prod, index) in order.goodsList" :key="prod.orderItemId">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== order.goodsList.length-1 ? ',':'' }}
<text v-for="(prod, index) in uniqueArr(order.goodsList)" :key="prod.orderItemId">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== uniqueArr(order.goodsList).length-1 ? ',':'' }}
</text>
</view>
<!-- 关联单 -->
......@@ -633,6 +633,11 @@ 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