Commit d3364ec0 authored by xiaoyan's avatar xiaoyan

fix: 包装类型转义&特性去重

parent 845affd4
...@@ -45,7 +45,7 @@ ...@@ -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-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;">{{ getProductAttrsByIds(prod.warehouseInProdAttrIds) }}</view> <view v-for="prod in uniqueArr(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;" /> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:blue;fontWeight:bold;" />
</view> </view>
...@@ -757,6 +757,11 @@ export default { ...@@ -757,6 +757,11 @@ export default {
}); });
}); });
}, },
// 过滤重复的商品
uniqueArr(arr) {
return arr.filter((obj, index, self) =>
index === self.findIndex((t) => t.warehouseInProdAttrIds === obj.warehouseInProdAttrIds));
},
// 获取商品特性文本 // 获取商品特性文本
getProductAttrsByIds(ids){ getProductAttrsByIds(ids){
if(!ids) return '' if(!ids) return ''
...@@ -768,6 +773,7 @@ export default { ...@@ -768,6 +773,7 @@ export default {
} }
}) })
}) })
console.log('result', result)
return result.join('') return result.join('')
}, },
scanCode(type) { scanCode(type) {
......
...@@ -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;" @tap="showWarehouseLogs(order)">{{$t('混箱')}}</view> <view v-if="order.mixStatus=== 1" style="color:red;fontWeight:bold;">{{$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>
...@@ -307,6 +307,7 @@ ...@@ -307,6 +307,7 @@
</view> </view>
<warehouse-list ref="warehouseList" /> <warehouse-list ref="warehouseList" />
<mix-order-list ref="mixOrderList" />
<!-- 未装弹窗 --> <!-- 未装弹窗 -->
<view class="cu-modal" :class="unloadModal ? 'show' : ''" style="z-index: 900;"> <view class="cu-modal" :class="unloadModal ? 'show' : ''" style="z-index: 900;">
...@@ -510,6 +511,7 @@ import { ...@@ -510,6 +511,7 @@ import {
import splitCom from "./components/split-com.vue"; 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 { updateImg } from "@/api/system"; import { updateImg } from "@/api/system";
import dayjs from "dayjs"; import dayjs from "dayjs";
...@@ -518,6 +520,7 @@ export default { ...@@ -518,6 +520,7 @@ export default {
components: { components: {
splitCom, splitCom,
OrderDetailModal, OrderDetailModal,
MixOrderList,
WarehouseList WarehouseList
}, },
mixins: [mixins], mixins: [mixins],
...@@ -881,6 +884,11 @@ export default { ...@@ -881,6 +884,11 @@ export default {
this.unloadSubNumberBegin = ""; this.unloadSubNumberBegin = "";
this.unloadSubNumberEnd = ""; this.unloadSubNumberEnd = "";
}, },
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
// 显示入仓记录 // 显示入仓记录
showWarehouseLogs(row) { showWarehouseLogs(row) {
this.orderId = row.orderId; this.orderId = row.orderId;
......
...@@ -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;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view> <view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;">{{$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>
...@@ -233,6 +233,7 @@ ...@@ -233,6 +233,7 @@
<warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" /> <warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" />
<warehouse-list ref="warehouseList" /> <warehouse-list ref="warehouseList" />
<mix-order-list ref="mixOrderList" />
<uni-popup ref="popup" class="add-popup"> <uni-popup ref="popup" class="add-popup">
<view class="popup-content"> <view class="popup-content">
...@@ -264,11 +265,12 @@ import { ...@@ -264,11 +265,12 @@ import {
import { getOrderDetail, getLoadingDetail } from "../loading/api"; import { getOrderDetail, getLoadingDetail } from "../loading/api";
import WarehouseDetail from "./warehouseDetail.vue"; 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 OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
export default { export default {
name: "tally-detail", name: "tally-detail",
components: { WarehouseDetail,OrderDetailModal, WarehouseList }, components: { WarehouseDetail,OrderDetailModal, WarehouseList, MixOrderList },
mixins: [mixins], mixins: [mixins],
data() { data() {
return { return {
...@@ -343,6 +345,11 @@ export default { ...@@ -343,6 +345,11 @@ export default {
this.orderId = row.orderId; this.orderId = row.orderId;
this.$refs.warehouseList.showDetail(row); this.$refs.warehouseList.showDetail(row);
}, },
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
// 显示入仓记录 // 显示入仓记录
showWarehouseLogs(row) { showWarehouseLogs(row) {
this.orderId = row.orderId; this.orderId = row.orderId;
......
<template>
<view class="cu-modal" :class="show ? 'show' : ''" style="z-index: 901;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder" style="width:100%;">{{ $t('混箱商品明细') }}</view>
</view>
<scroll-view scroll-y="true" style="height: 400px;">
<view>
<view class="productsList">
<view class="flex text-center text-black bg-white text-bold padding-sm">
<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 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>
</view>
</view>
</view>
</scroll-view>
<view class="cu-bar bg-white justify-end top-line">
<view class="action"><button class="cu-btn bg-grey" @tap="closeDialog">{{$t('关闭')}}</button></view>
</view>
</view>
</view>
</template>
<script>
import { getOrder, getOrderWarehouseIn } from "./api";
export default {
props: {
orderId: Number,
orderItemId: Number,
locationModifiable: Boolean ,// 是否可以修改储位
warehouseId: Number, // 当前仓库ID,如果是调拨则是调拨入仓的ID,否则就是始发仓ID
},
data() {
return {
show: false,
orderDetail: null,
warehouseList: null,
locale: this.$lang.locale,
};
},
methods: {
// 从warehouseInInfo中提取储位信息
showLocationName(orderLocationBackVOList){
if(!orderLocationBackVOList) return ''
let locations = []
orderLocationBackVOList.forEach(item => {
locations.push(item.areaName + (item.locationName || ''))
})
return locations.join(',')
},
showDetail(row) {
this.show = true;
if (row.orderId) {
getOrder(row.orderId).then((res) => {
this.orderDetail = res;
this.getOrderWarehouseIn();
});
}
},
closeDialog() {
this.show = false;
},
getOrderWarehouseIn() {
getOrderWarehouseIn(this.orderDetail.orderId).then((res) => {
this.warehouseList = res;
});
},
},
};
</script>
<style lang="scss" scoped>
.scroll {
margin-top: -8px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
padding: 8px;
background: #fff;
::v-deep .uni-card {
margin: 12px 0 0 !important;
padding: 0 !important;
}
.img-wrap {
width: calc(100% - 68px);
::v-deep .uni-grid-item {
background: #fbf8fb;
}
.grid-item-box-add {
height: 100%;
display: flex;
flex-flow: column;
font-size: 10px;
padding: 16px 0;
text-align: center;
justify-content: center;
}
}
}
.cu-dialog {
background-color: #fff;
.content {
&.title-bolder {
color: #333333;
font-weight: bolder;
}
}
.item-content {
text-align: left;
padding: 10px 20px 0px 20px;
&.noPadding {
padding: 0;
}
> view {
display: flex;
padding: 4px 0;
> view {
flex: 1;
word-break: break-all;
padding-left: 4px;
}
}
.flex{
display: flex;
align-items: center;
justify-content: space-between;
.left{
flex: 1;
}
}
.btn{
background-color: rgb(47, 77, 174);
color: #fff;
border-radius: 5rpx;
padding: 5rpx 10rpx;
margin-left: 10px;
}
}
}
</style>
...@@ -28,13 +28,14 @@ ...@@ -28,13 +28,14 @@
</view> </view>
<!-- 包装类型 --> <!-- 包装类型 -->
<view style="color:red;fontWeight:bold;"> <view style="color:red;fontWeight:bold;">
{{ order.units ? order.units.split(',').join(', ') : '' }} <text v-for="(unit, index) in order.units.split(',')" :key="index">
<!-- <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="order.unit" /> --> <dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== order.units.split(',').length-1 ? ',':'' }}
</text>
</view> </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(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 --> <!-- 混箱 -->
<view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view> <view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;">{{$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>
...@@ -111,6 +112,7 @@ ...@@ -111,6 +112,7 @@
<warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" /> <warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" />
<warehouse-list ref="warehouseList" /> <warehouse-list ref="warehouseList" />
<mix-order-list ref="mixOrderList" />
</view> </view>
</template> </template>
...@@ -119,11 +121,12 @@ import { getOrder, listByOrderId, tallyListGuanlianOrder } from "./api"; ...@@ -119,11 +121,12 @@ import { getOrder, listByOrderId, tallyListGuanlianOrder } from "./api";
import { getOrderDetail } from "../loading/api"; import { getOrderDetail } from "../loading/api";
import WarehouseDetail from "./warehouseDetail.vue"; 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 OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
export default { export default {
name: "related-order", name: "related-order",
components: { WarehouseDetail,OrderDetailModal, WarehouseList }, components: { WarehouseDetail,OrderDetailModal, WarehouseList, MixOrderList },
data() { data() {
return { return {
/* 订单详情 */ /* 订单详情 */
...@@ -174,6 +177,11 @@ export default { ...@@ -174,6 +177,11 @@ export default {
this.orderId = row.orderId; this.orderId = row.orderId;
this.$refs.warehouseList.showDetail(row); this.$refs.warehouseList.showDetail(row);
}, },
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
/* 读取订单详情 */ /* 读取订单详情 */
getOrderDetail(id) { getOrderDetail(id) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="cu-modal" :class="show ? 'show' : ''" style="z-index: 901;"> <view class="cu-modal" :class="show ? 'show' : ''" style="z-index: 901;">
<view class="cu-dialog"> <view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line"> <view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder" style="width:100%;">{{ $t('混箱商品明细') }}</view> <view class="content title-bolder" style="width:100%;">{{ $t('入仓记录') }}</view>
</view> </view>
<scroll-view scroll-y="true" style="height: 400px;"> <scroll-view scroll-y="true" style="height: 400px;">
<view> <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;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view> <view v-if="order.mixStatus === 1" style="color:red;fontWeight:bold;">{{$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>
...@@ -275,6 +275,7 @@ ...@@ -275,6 +275,7 @@
</view> </view>
<warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" /> <warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" />
<warehouse-list ref="warehouseList" /> <warehouse-list ref="warehouseList" />
<mix-order-list ref="mixOrderList" />
<uni-popup ref="popup" class="add-popup"> <uni-popup ref="popup" class="add-popup">
<view class="popup-content"> <view class="popup-content">
...@@ -416,13 +417,14 @@ import { ...@@ -416,13 +417,14 @@ import {
import { getOrderDetail, getLoadingDetail,getOrderDetailByBoxNo } from "../loading/api"; import { getOrderDetail, getLoadingDetail,getOrderDetailByBoxNo } from "../loading/api";
import WarehouseDetail from "./warehouseDetail.vue"; 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 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";
export default { export default {
name: "tally-detail", name: "tally-detail",
components: { Exception, WarehouseDetail, OrderDetailModal, WarehouseList }, components: { Exception, WarehouseDetail, OrderDetailModal, WarehouseList, MixOrderList },
mixins: [mixins], mixins: [mixins],
data() { data() {
return { return {
...@@ -555,6 +557,11 @@ export default { ...@@ -555,6 +557,11 @@ export default {
this.orderId = row.orderId; this.orderId = row.orderId;
this.$refs.warehouseList.showDetail(row); this.$refs.warehouseList.showDetail(row);
}, },
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
// 显示入仓记录 // 显示入仓记录
showWarehouseLogs(row) { showWarehouseLogs(row) {
this.orderId = row.orderId; this.orderId = row.orderId;
......
...@@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') { ...@@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') {
/** /**
* 配置api基础路径 * 配置api基础路径
*/ */
// let apiBaseUrl = 'https://api2.groupage.cn/' let apiBaseUrl = 'https://api2.groupage.cn/'
let apiBaseUrl = 'https://apitest.groupage.cn/' // let apiBaseUrl = 'https://apitest.groupage.cn/'
// let apiBaseUrl = 'https://api.jd.qipx.top/' // let apiBaseUrl = 'https://api.jd.qipx.top/'
//let apiBaseUrl = 'http://192.168.1.13:48080/' //let apiBaseUrl = 'http://192.168.1.13:48080/'
let localApiBaseUrl = uni.getStorageSync("localApiBaseUrl") let localApiBaseUrl = uni.getStorageSync("localApiBaseUrl")
......
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