Commit bb660d11 authored by xiaoyan's avatar xiaoyan

fix: 修改关联单多产品显示

parent d4c9be18
......@@ -13,41 +13,35 @@
<view class="flex-sub">{{$t('同一个自编号')}}</view>
</view>
<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">
<view class="text-break text-blue" style="width:25%;">
<view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view>
<view style="color:blue;fontWeight:bold;">
{{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
</view>
<view style="color:sandybrown;fontWeight:bold;">
{{ order.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</view>
<view @tap="showOrderDetail(true, v.orderId)">{{ v.orderNo }}</view>
<!-- 报关方式 -->
<view v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
<view v-if="v.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="v.customsType" style="color:red;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 v-for="(unit, index) in v.units.split(',')" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== v.units.split(',').length-1 ? ',':'' }}
</text>
</view>
<!-- 关联单 -->
<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(v.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 -->
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(order)">{{$t('混箱')}}</view>
<view v-if="v.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showMixOrder(v)">{{$t('混箱')}}</view>
</view>
<view class="flex-sub">{{ order.volume | toFixed }}</view>
<view class="flex-sub">{{ order.weight | toFixed }}</view>
<view class="flex-sub">{{ calcSum(v.orderItemList, 'volume') }}</view>
<view class="flex-sub">{{ calcSum(v.orderItemList, 'weight') }}</view>
<view class="flex-sub">
<view class="text-break text-blue" @tap="showGoodsDetail(true, order)">{{ order.num }}</view>
<view class="text-break text-blue" @tap="showOrderDetail(true, v.orderId)">{{ v.num }}</view>
<view style="color:blue;fontWeight:bold;">
{{ order.multiSpecification === true ? ('('+$t('多规格')+')') : ''}}
{{ v.multiSpecification === true ? ('('+$t('多规格')+')') : ''}}
</view>
</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 === selfNo ? $t('') : $t('') }}</view>
<view class="flex-sub">{{ v.orderItemList.length ? v.orderItemList[0].containerNumber:'' }}</view>
<view class="flex-sub">{{ v.orderItemList.length && v.orderItemList[0].containerNumber === selfNo ? $t('') : $t('') }}</view>
</view>
</view>
</view>
......@@ -203,6 +197,10 @@ export default {
url: `./relatedOrder?orderId=${orderId}`,
});
},
calcSum(arr, key) {
const num = parseFloat(arr.reduce((sum, v) => sum + v[key], 0)).toFixed(2)
return num
}
},
onLoad: function (option) {
uni.setNavigationBarTitle({
......
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