Commit 7569de19 authored by xiaoyan's avatar xiaoyan

feature: 关联单联调

parent 825128d1
...@@ -817,8 +817,9 @@ export default { ...@@ -817,8 +817,9 @@ export default {
}, },
/* 跳转到关联单 */ /* 跳转到关联单 */
relatedClick(orderNo) { relatedClick(orderNo) {
const { boxInfo } = this.loadData;
uni.navigateTo({ uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}`, url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${boxInfo.selfNo}`,
}); });
}, },
/* 跳转到补单 */ /* 跳转到补单 */
......
...@@ -525,9 +525,9 @@ export default { ...@@ -525,9 +525,9 @@ export default {
}, },
/* 跳转到关联单 */ /* 跳转到关联单 */
relatedClick(orderId) { relatedClick(orderId) {
console.log('跳转到关联单') const { boxInfo } = this.loadData;
uni.navigateTo({ uni.navigateTo({
url: `./relatedOrder?orderId=${orderId}`, url: `./relatedOrder?orderId=${orderId}&selfNo=${boxInfo.selfNo}`,
}); });
}, },
/* 跳转到补单 */ /* 跳转到补单 */
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="flex-sub">{{$t('同一个自编号')}}</view> <view class="flex-sub">{{$t('同一个自编号')}}</view>
</view> </view>
<view v-for="(v, index) in orderList" :key="'order-' + index"> <view v-for="(v, index) in orderList" :key="'order-' + index">
<view class="flex text-center padding-sm" v-for="(order, index) in order.orderItemList" :key="'goods-' + index"> <view class="flex text-center padding-sm" v-for="(order, index) in v.orderItemList" :key="'goods-' + index">
<view class="text-break text-blue" style="width:20%;"> <view class="text-break text-blue" style="width:20%;">
<view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view> <view @tap="showOrderDetail(true, order.orderId)">{{ order.orderNo }}</view>
<view style="color:blue;fontWeight:bold;"> <view style="color:blue;fontWeight:bold;">
...@@ -28,12 +28,10 @@ ...@@ -28,12 +28,10 @@
</view> </view>
<!-- 包装类型 --> <!-- 包装类型 -->
<view style="color:red;fontWeight:bold;"> <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="order.unit" />
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="prod.unit" />{{ index!== order.goodsList.length-1 ? ',':'' }}
</text>
</view> </view>
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="v.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderNo)">{{$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;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view>
</view> </view>
...@@ -45,7 +43,9 @@ ...@@ -45,7 +43,9 @@
{{ order.multiSpecification === true ? ('('+$t('多规格')+')') : ''}} {{ order.multiSpecification === true ? ('('+$t('多规格')+')') : ''}}
</view> </view>
</view> </view>
<view class="flex-sub">{{ v.positionNo ? v.positionNo.split(',').join(', ') : '' }}</view> <view class="flex-sub">{{ order.positionNo }}</view>
<view class="flex-sub">{{ order.containerNumber }}</view>
<view class="flex-sub">{{ order.containerNumber === selfNo ? $t('') : $t('') }}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<view class="content title-bolder" style="width:100%;">{{`${$t('货物详情')}-${$t('订单号')}${currRow.orderNo}`}}</view> <view class="content title-bolder" style="width:100%;">{{`${$t('货物详情')}-${$t('订单号')}${currRow.orderNo}`}}</view>
</view> </view>
<scroll-view scroll-y="true" style="height: 400px;"> <scroll-view scroll-y="true" style="height: 400px;">
<uni-card v-for="(v, key) in currRow.goodsList" :key="key"> <uni-card v-for="(v, key) in goodsList" :key="key">
<view class="item-content noPadding"> <view class="item-content noPadding">
<view> <view>
<view>{{$t('中文名')}}{{ v.prodTitleZh }}</view> <view>{{$t('中文名')}}{{ v.prodTitleZh }}</view>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</view> </view>
<view> <view>
<view>{{$t('重量')}}{{ v.weight }}kg</view> <view>{{$t('重量')}}{{ v.weight }}kg</view>
<view>{{$t('入仓快递单号')}}{{ JSON.parse(v.warehouseInInfo).expressNo }}</view> <view>{{$t('入仓快递单号')}}{{ v.expressNo ? v.expressNo: '' }}</view>
</view> </view>
<view> <view>
<view>{{$t('数量') + '(个)'}}{{ v.num }}</view> <view>{{$t('数量') + '(个)'}}{{ v.num }}</view>
...@@ -114,7 +114,8 @@ ...@@ -114,7 +114,8 @@
</view> </view>
</template> </template>
<script> <script>
import { getOrder, getOrderWarehouseIn, tallyListGuanlianOrder } from "./api"; import { getOrder, listByOrderId, tallyListGuanlianOrder } from "./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 OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
...@@ -133,9 +134,11 @@ export default { ...@@ -133,9 +134,11 @@ export default {
goodsModal: false, goodsModal: false,
// 当前行 // 当前行
currRow: {}, currRow: {},
goodsList: [],
// 入仓记录 // 入仓记录
showWarehouseInItemId: null, showWarehouseInItemId: null,
orderId: null, orderId: null,
selfNo: null,
warehouseList: null, warehouseList: null,
}; };
}, },
...@@ -149,45 +152,57 @@ export default { ...@@ -149,45 +152,57 @@ export default {
}) })
return Array.from(new Set(locations)).join(',') return Array.from(new Set(locations)).join(',')
}, },
getOrderWarehouseIn() { // 货物详情
getOrderWarehouseIn(this.orderDetail.orderId).then((res) => { showGoodsDetail(show, row) {
this.warehouseList = res; this.goodsList = [];
}); if (show) {
this.currRow = row;
this.goodsList.push(row);
}
this.goodsModal = show;
},
/* 显示订单详情 */
showOrderDetail(show, id) {
this.orderDetailModal = show;
if (show) {
this.getOrderDetail(id);
}
}, },
}, // 显示入仓列表
// 货物详情 showWarehouseList(row) {
showGoodsDetail(show, row) { this.orderId = row.orderId;
if (show) this.currRow = row; this.$refs.warehouseList.showDetail(row);
this.goodsModal = show;
}, },
/* 显示订单详情 */ /* 读取订单详情 */
showOrderDetail(show, id) { getOrderDetail(id) {
this.orderDetailModal = show; return new Promise((resolve, reject) => {
if (show) { getOrderDetail(id).then((data) => {
this.getOrderDetail(id); //订单信息
} this.orderDetail = data;
}, listByOrderId({ orderId: id }).then((data) => {
/* 读取订单详情 */ let positionNos = data.map((item) => {
getOrderDetail(id) { return `${item.warehouseName}${item.areaName}${item.locationName || ''}`;
return new Promise((resolve, reject) => { });
getOrderDetail(id).then((data) => { this.$set(this.orderDetail, "positionNo", positionNos.join(","));
//订单信息
this.orderDetail = data;
listByOrderId({ orderId: id }).then((data) => {
let positionNos = data.map((item) => {
return `${item.warehouseName}${item.areaName}${item.locationName || ''}`;
}); });
this.$set(this.orderDetail, "positionNo", positionNos.join(","));
}); });
}); });
}); },
/* 跳转到关联单 */
relatedClick(orderId) {
uni.navigateTo({
url: `./relatedOrder?orderId=${orderId}`,
});
},
}, },
onLoad: function (option) { onLoad: function (option) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.$t("关联单"), title: this.$t("关联单"),
}); });
this.selfNo = option.selfNo
if ("orderId" in option) { if ("orderId" in option) {
tallyListGuanlianOrder({orderId : option.orderId}).then((res) => { tallyListGuanlianOrder({orderId : option.orderId}).then((res) => {
console.log(res)
this.orderList = res; this.orderList = res;
}); });
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</text> </text>
</view> </view>
<!-- 关联单 --> <!-- 关联单 -->
<view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;">{{$t('关联单')}}</view> <view v-if="order.guanLianOrderStatusVOList&&order.guanLianOrderStatusVOList.length>0" style="color:red;fontWeight:bold;" @tap="relatedClick(order.orderId)">{{$t('关联单')}}</view>
<!-- 混箱 --> <!-- 混箱 -->
<view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view> <view v-if="order.goodsList&&order.goodsList.length>1" style="color:red;fontWeight:bold;" @tap="showWarehouseList(order)">{{$t('混箱')}}</view>
</view> </view>
...@@ -785,6 +785,13 @@ export default { ...@@ -785,6 +785,13 @@ export default {
this.getLoadDetail(); this.getLoadDetail();
}); });
}, },
/* 跳转到关联单 */
relatedClick(orderNo) {
const { boxInfo } = this.loadData;
uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${boxInfo.selfNo}`,
});
},
/* 跳转到补单 */ /* 跳转到补单 */
toPatch() { toPatch() {
const { boxInfo } = this.loadData; const { boxInfo } = this.loadData;
......
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