Commit 7569de19 authored by xiaoyan's avatar xiaoyan

feature: 关联单联调

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