Commit 155eb19d authored by xiaoyan's avatar xiaoyan

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

parent d3364ec0
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="order.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view> <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>
<view style="width:12%;">{{ order.volume | toFixed }}</view> <view style="width:12%;">{{ order.volume | toFixed }}</view>
<view style="width:12%;">{{ order.weight | toFixed }}</view> <view style="width:12%;">{{ order.weight | toFixed }}</view>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="order.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view> <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>
<view style="width:15%;">{{ order.volume | toFixed }}</view> <view style="width:15%;">{{ order.volume | toFixed }}</view>
<view style="width:15%;">{{ order.weight | toFixed }} kg</view> <view style="width:15%;">{{ order.weight | toFixed }} kg</view>
......
...@@ -15,14 +15,17 @@ ...@@ -15,14 +15,17 @@
<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="(order, index) in warehouseList" :key="'order-' + index"> <view v-for="(v, 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 text-center padding-sm" :key="'goods-' + index">
<view class="flex-sub">{{ index + 1 }}</view> <view class="flex-sub">{{ $lang.locale==='zh-Hans'? v.prodTitleZh:v.prodTitleEn }}</view>
<view class="flex-sub">{{ v.cartonsNum }}</view> <view class="flex-sub">
<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> <template v-if="v.brandName">{{v.brandName}}</template>
<view class="flex-sub">{{ v.boxGauge }}</view> <dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="v.brandType" />
<view class="flex-sub">{{ v.volume }}</view> </view>
<view class="flex-sub">{{ v.weight }}</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> </view>
</view> </view>
...@@ -37,6 +40,8 @@ ...@@ -37,6 +40,8 @@
</template> </template>
<script> <script>
import { getOrder, getOrderWarehouseIn } from "./api"; import { getOrder, getOrderWarehouseIn } from "./api";
import {getProductAttrList} from '@/api/system'
import { DICT_TYPE } from "@/util/dict";
export default { export default {
props: { props: {
...@@ -51,8 +56,22 @@ export default { ...@@ -51,8 +56,22 @@ export default {
orderDetail: null, orderDetail: null,
warehouseList: null, warehouseList: null,
locale: this.$lang.locale, 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: { methods: {
// 从warehouseInInfo中提取储位信息 // 从warehouseInInfo中提取储位信息
showLocationName(orderLocationBackVOList){ showLocationName(orderLocationBackVOList){
...@@ -63,6 +82,30 @@ export default { ...@@ -63,6 +82,30 @@ export default {
}) })
return locations.join(',') 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) { showDetail(row) {
this.show = true; this.show = true;
if (row.orderId) { if (row.orderId) {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="v.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view> <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>
<view class="flex-sub">{{ order.volume | toFixed }}</view> <view class="flex-sub">{{ order.volume | toFixed }}</view>
<view class="flex-sub">{{ order.weight | toFixed }}</view> <view class="flex-sub">{{ order.weight | toFixed }}</view>
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="order.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view> <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>
<view style="width:15%;">{{ order.volume | toFixed }}</view> <view style="width:15%;">{{ order.volume | toFixed }}</view>
<view style="width:15%;">{{ order.weight | toFixed }} kg</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