Commit 155eb19d authored by xiaoyan's avatar xiaoyan

fix: 装柜和理货增加混箱明细

parent d3364ec0
......@@ -65,7 +65,7 @@
<!-- 关联单 -->
<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;">{{$t('混箱')}}</view>
<view v-if="order.mixStatus=== 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(order)">{{$t('混箱')}}</view>
</view>
<view style="width:12%;">{{ order.volume | toFixed }}</view>
<view style="width:12%;">{{ order.weight | toFixed }}</view>
......
......@@ -52,7 +52,7 @@
<!-- 关联单 -->
<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;">{{$t('混箱')}}</view>
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(order)">{{$t('混箱')}}</view>
</view>
<view style="width:15%;">{{ order.volume | toFixed }}</view>
<view style="width:15%;">{{ order.weight | toFixed }} kg</view>
......
......@@ -15,14 +15,17 @@
<view class="flex-sub">{{$t('用途')}}</view>
<view class="flex-sub">{{$t("数量")}}</view>
</view>
<view v-for="(order, index) in warehouseList" :key="'order-' + index">
<view class="flex text-center padding-sm" v-for="(v, index) in order.orderWarehouseInBackItemDoList" :key="'goods-' + index">
<view class="flex-sub">{{ index + 1 }}</view>
<view class="flex-sub">{{ v.cartonsNum }}</view>
<view class="flex-sub"><dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="v.specificationType" />/<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="v.unit" /></view>
<view class="flex-sub">{{ v.boxGauge }}</view>
<view class="flex-sub">{{ v.volume }}</view>
<view class="flex-sub">{{ v.weight }}</view>
<view v-for="(v, index) in warehouseList" :key="'order-' + index">
<view class="flex text-center padding-sm" :key="'goods-' + index">
<view class="flex-sub">{{ $lang.locale==='zh-Hans'? v.prodTitleZh:v.prodTitleEn }}</view>
<view class="flex-sub">
<template v-if="v.brandName">{{v.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="v.brandType" />
</view>
<view class="flex-sub"><dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="v.material" /></view>
<view class="flex-sub">{{ getProductNamesByIds(v.prodAttrIds) }}</view>
<view class="flex-sub">{{ getProductUsageByIds(v.usageIds) }}</view>
<view class="flex-sub">{{ v.num }}</view>
</view>
</view>
</view>
......@@ -37,6 +40,8 @@
</template>
<script>
import { getOrder, getOrderWarehouseIn } from "./api";
import {getProductAttrList} from '@/api/system'
import { DICT_TYPE } from "@/util/dict";
export default {
props: {
......@@ -51,18 +56,56 @@ export default {
orderDetail: null,
warehouseList: null,
locale: this.$lang.locale,
productAttrList: [],
};
},
computed: {
DICT_TYPE() {
return DICT_TYPE
},
isChinese(){
return uni.getLocale() === 'zh-Hans'
}
},
created() {
getProductAttrList().then(data => {
this.productAttrList = data
})
},
methods: {
// 从warehouseInInfo中提取储位信息
showLocationName(orderLocationBackVOList){
if(!orderLocationBackVOList) return ''
let locations = []
orderLocationBackVOList.forEach(item => {
locations.push(item.areaName + (item.locationName || ''))
})
return locations.join(',')
},
// 从warehouseInInfo中提取储位信息
showLocationName(orderLocationBackVOList){
if(!orderLocationBackVOList) return ''
let locations = []
orderLocationBackVOList.forEach(item => {
locations.push(item.areaName + (item.locationName || ''))
})
return locations.join(',')
},
getProductNamesByIds(ids){
const result = []
ids?.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id) {
result.push(this.isChinese ? f.attrName : f.attrNameEn)
}
})
})
return result.join('')
},
// 获取用途文本
getProductUsageByIds(ids){
if(!ids) return ''
const result = []
ids.split(',').forEach(e => {
this.getDictDatas(this.DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE).forEach(f => {
if (e === f.value) {
result.push(this.$l(f, 'label'))
}
})
})
return result.join('')
},
showDetail(row) {
this.show = true;
if (row.orderId) {
......
......@@ -35,7 +35,7 @@
<!-- 关联单 -->
<view v-if="v.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 -->
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;">{{$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.weight | toFixed }}</view>
......
......@@ -64,7 +64,7 @@
<!-- 关联单 -->
<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;">{{$t('混箱')}}</view>
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(order)">{{$t('混箱')}}</view>
</view>
<view style="width:15%;">{{ order.volume | toFixed }}</view>
<view style="width:15%;">{{ order.weight | toFixed }} kg</view>
......
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