Commit 03c1e926 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'release'

parents f26bfca9 863ff351
<template>
<view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder">{{$t('订单详情')}}</view>
</view>
<scroll-view scroll-y="true" style="height: 300px;">
<view class="cu-form-group margin-top">
<view class="title">{{$t('订单号')}}</view>
<view class="content">
{{ orderDetail.orderNo }}
<view style="color:blue;fontWeight:bold;">
{{ orderDetail.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
</view>
<view style="color:sandybrown;fontWeight:bold;">
{{ orderDetail.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</view>
</view>
</view>
<view class="cu-form-group">
<view class="title">{{$t('唛头')}}</view>
<view class="content">{{ orderDetail.marks }}</view>
</view>
<view class="cu-form-group">
<view class="title">{{$t('报关方式')}}</view>
<view class="content"><dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="orderDetail.customsType" /></view>
</view>
<view class="cu-form-group">
<view class="title">{{$t('入仓时间')}}</view>
<view class="content">{{ formatDate(orderDetail.rucangTime) }}</view>
</view>
<view class="cu-form-group">
<view class="title">{{$t('路线')}}</view>
<view class="content" v-if="orderDetail.logisticsInfoDto">
{{ $lang.locale==='zh-Hans'? `${orderDetail.logisticsInfoDto.startTitleZh} - ${orderDetail.logisticsInfoDto.destTitleZh}`: `${orderDetail.logisticsInfoDto.startTitleEn} - ${orderDetail.logisticsInfoDto.destTitleEn}` }}</view>
</view>
<view>
<view class="item-content" v-for="(v, goodsKey) in orderDetail.orderItemVOList" :key="'goods-' + goodsKey">
<view>
<view>{{$t('品名')}}{{ $lang.locale==='zh-Hans'?v.prodTitleZh:v.prodTitleEn }}</view>
<view>{{$t('备案')}}
<template v-if="v.brandName">{{$t(`${v.brandName}`)}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="v.feeType" />
</view>
</view>
<view>
<view>{{$t('箱数')}}{{ v.warehouseInInfoVO && v.warehouseInInfoVO.cartonsNum }}</view>
<view>{{$t('体积')}}{{ v.warehouseInInfoVO && toFixed(v.warehouseInInfoVO.volume) }} CBM</view>
</view>
<view>
<view>{{$t('重量')}}{{ v.warehouseInInfoVO && toFixed(v.warehouseInInfoVO.weight) }} kg</view>
<view>
{{$t('储位')}}
<template v-if="v.warehouseInInfoVO && v.warehouseInInfoVO.orderLocationMergeVOSet">
{{v.warehouseInInfoVO.orderLocationMergeVOSet.map(location => `${location.areaName}${location.locationName || ''}`).join(',')}}
</template>
</view>
</view>
<view>
<view >{{$t('特性')}}{{ getProductNamesByIds(v.warehouseInInfoVO ? v.warehouseInProdAttrIds : v.prodAttrIds) }}</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="showOrderDetail(false)">{{$t('取消')}}</button></view>
</view>
</view>
</view>
</template>
<script>
import {getProductAttrList} from '@/api/system'
import util from "@/util/util.js";
export default {
name: 'orderDetailModal',
props: {
orderDetail: {
type: Object,
default: ''
},
orderDetailModal:{
type: Boolean,
default: true
}
},
computed: {
isChinese(){
return uni.getLocale() === 'zh-Hans'
}
},
data() {
return {
productAttrList: [],
}
},
created() {
getProductAttrList().then(data => {
this.productAttrList = data
})
},
methods: {
formatDate: util.formatDate,
toFixed: util.toFixed,
showOrderDetail(index) {
this.$emit('close', false);
},
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('')
},
}
};
</script>
<style lang="scss" scoped>
.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;
}
}
}
}
</style>
\ No newline at end of file
......@@ -122,12 +122,14 @@
"装柜影像": "photo of container loading",
"补单": "add more",
"装柜纠错": "loading Correct errors",
"装箱纠错": "Packing Correct errors",
"下一步": "next step",
"审核中": "Under review",
"确认封柜": "confirm close container",
"订单详情": "Order Details",
"唛头": "Marks",
"入仓时间": "deliver time",
"路线": "Route",
"储位": "Storage site",
"未装": "not be loaded",
"密码": "password",
......@@ -198,11 +200,15 @@
"单位": "Unit",
"材质": "texture of material",
"数量": "quantity",
"用途": "Usage",
"关闭": "close",
"请问您是否要将订单:": "Would you like to place your order:",
"移出当前出货单": "Transfer out the current shipment order",
"未选择储位信息": "No storage location information is selected",
"件数": "number",
"混箱商品明细": "Details of mixed products",
"长/宽/高": "length/wide/height",
"入仓/包装类型": "Warehousing/Packaging type",
"待理货货柜列表": "Container list to be tally",
"数量(个)": "Quantity",
"包装类型": "Packaging type",
......@@ -340,6 +346,7 @@
"继续": "yes",
"英文品名": "English name",
"商品特性": "Product Features",
"特性": "Features",
"修改": "modify",
"删除": "delete",
"新商品入仓": "New produce",
......@@ -488,6 +495,8 @@
",是否需要一起移出?": "Do you need to remove them together?",
"国家": "country",
"预装关联单": "Pre installed related documents",
"关联单": "Rrelated documents",
"混箱": "Mixed",
"仅当前订单": "Only current orders",
"请扫描合包箱号、标签": "Please scan the package number and label",
"合包箱号": "Package number",
......@@ -551,7 +560,9 @@
"已到仓": "Received warehouse",
"到仓影像": "To warehouse imaging",
"合包装箱": "Combined packaging box",
"未合包装箱": "Uncombined packaging box",
"箱号": "Box number",
"编辑": "Edit",
"自动生成": "Automatic generation",
"编辑合包箱编号": "Edit package number",
"新建合包箱编号": "New packaging box number",
......
......@@ -124,6 +124,7 @@
"订单详情":"订单详情",
"唛头":"唛头",
"入仓时间":"入仓时间",
"路线":"路线",
"储位":"储位",
"未装":"未装",
"密码":"密码",
......@@ -340,6 +341,7 @@
"继续":"继续",
"英文品名":"英文品名",
"商品特性":"商品特性",
"特性":"特性",
"修改":"修改",
"删除":"删除",
"新商品入仓":"新商品入仓",
......
......@@ -224,6 +224,13 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/tally/relatedOrder",
"style": {
"navigationBarTitleText": "关联单",
"enablePullDownRefresh": true
}
},
{
"path": "pages/tallyAir/detail",
"style": {
......
......@@ -42,6 +42,27 @@
<view style="color:blue;fontWeight:bold;">
{{ order.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
</view>
<view style="color:sandybrown;fontWeight:bold;">
{{ order.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</view>
<!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:blue;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 -->
<text style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(order.goodsList, 'warehouseInProdAttrIds')) }}</text>
<!-- 报关方式 -->
<view v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:blue;fontWeight:bold;" />
</view>
<!-- 包装类型 -->
<view style="color:red;fontWeight:bold;">
<text v-for="(unit, index) in uniqueArr(order.units)" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== uniqueArr(order.units).length-1 ? ',':'' }}
</text>
</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="showMixOrder(order)">{{$t('混箱')}}</view>
</view>
<view class="flex-sub">{{ order.volume | toFixed }}</view>
<view class="flex-sub">{{ order.weight | toFixed }} kg</view>
......@@ -119,8 +140,10 @@
</view>
</scroll-view>
<mix-order-list ref="mixOrderList" />
<!-- 订单详情弹窗 -->
<view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- <view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder">{{$t('订单详情')}}</view>
......@@ -181,7 +204,7 @@
<view class="action"><button class="cu-btn bg-grey" @tap="showOrderDetail(false)">{{$t('取消')}}</button></view>
</view>
</view>
</view>
</view> -->
<!-- 未装弹窗 -->
<view class="cu-modal" :class="unloadModal ? 'show' : ''" style="z-index: 900;">
......@@ -435,16 +458,21 @@ import {
} from "../loading/api";
import { getAdjustWaitOutList, warehouseAdjustSendOutBatch, getSupplierPage,getAirShipmentByShipmentId,boxAirCheckoutGet,warehouseCreate,getAirCheckoutByShipmentId,searchLoadOrderByBoxNo,batchAirCreate,singleAirCreate } from './api'
import { updateImg } from "@/api/system";
import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import MixOrderList from "@/pages/tally/mixOrderList.vue";
import {getProductAttrList} from "@/api/system";
export default {
name: "loading-detail",
components: {
OrderDetailModal, MixOrderList
},
mixins: [mixins],
data() {
return {
movingOrderId: undefined,
popupMessage: '',
productAttrList:[],
/* 出货ID */
shipmentId: null,
/* 自编号 */
......@@ -503,6 +531,7 @@ export default {
//出仓信息
params: {},
selectItem: {},
orderId: null,
totalMergeData:{},
totalMergecheckoutData:{},
orderCheckoutData:{},
......@@ -746,6 +775,43 @@ export default {
});
});
},
/* 跳转到关联单 */
relatedClick(orderNo) {
const { boxInfo } = this.loadData;
uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${boxInfo.selfNo}`,
});
},
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
/* 过滤包装类型 */
uniqueArr(arr) {
if (!arr || !arr.length) return
return arr.split(',').filter((obj) =>
!['1', '2'].includes(obj));
},
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
getProductAttrsByIds(ids){
if(!ids) return ''
const result = []
ids.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id && this.$l(f, 'attrName') !== '普货') {
result.push(this.$l(f, 'attrName'))
}
})
})
console.log('result', result)
return result.join('')
},
scanCode(type) {
uni.scanCode({
success: (res) => {
......@@ -1074,6 +1140,10 @@ export default {
let today = util.formatDate(new Date().getTime(), true);
this.confirmCloseCloseBoxTime = today; //确认封柜弹窗表单-封仓时间
this.confirmLeaveStoreTime = today; //确认封柜弹窗表单-出仓时间
getProductAttrList().then(data => {
this.productAttrList = data
})
},
onShow() {
if (this.onHideFlag) {
......
......@@ -87,6 +87,19 @@ export const getLoadingDetail = (params) => {
});
};
/**
* 待装柜详情(扫描专用)
*
* @param {*} params
* @returns
*/
export const getLoadingDetailV2 = (params) => {
return http(`/my/shipment/cabinetDetailV2`, params, {
method: 'GET',
loading: true,
});
};
/**
* 批量装柜
*
......
This diff is collapsed.
......@@ -215,6 +215,7 @@ export default {
/* 发货ID */
shipmentId: "",
destWarehouseId: "", // 目的地
isTally: 0,
// loadDetail: {},
status: "more",
contentText: {
......@@ -280,6 +281,7 @@ export default {
),
secId: this.pathToList[this.pathToSelected].id,
shipmentId: this.shipmentId,
isTally: this.isTally,
};
createGoods({ ...params, relationStatus: 2, singleLoad }).then((res) => {
this.showPatch = false
......@@ -482,6 +484,7 @@ export default {
),
secId: this.pathToList[this.pathToSelected].id,
shipmentId: this.shipmentId,
isTally: this.isTally,
}).then((data) => {
if(data !== null && data?.data !== null) {
this.$store.dispatch(types.SHOW_TOAST, {
......@@ -527,6 +530,7 @@ export default {
if ("id" in option) {
this.shipmentId = option.id;
this.destWarehouseId = option.destWarehouseId;
this.isTally = option.isTally;
await this.getCountry()
this.getLoadDetail();
}
......
......@@ -151,7 +151,7 @@ export const getChannelList = (params = {}) => {
}
/**
* 获得空运待装列表
* 获得空运待装列表
*/
export function preloadPageAir(params) {
return http('/ecw/box-preload-goods/preloadPageAir', params, {
......
......@@ -68,9 +68,9 @@
</view>
</view>
<view style="flex:2;">
<button size="mini" type="primary" @click="editMergePkg(item)">编辑</button>
<button size="mini" type="warn" @click="package(item)">装箱</button>
<button size="mini" type="danger" @click="del(item)">删除</button>
<button size="mini" type="primary" @click="editMergePkg(item)">{{$t('编辑')}}</button>
<button size="mini" type="warn" @click="package(item)">{{$t('装箱')}}</button>
<button size="mini" type="danger" @click="del(item)">{{$t('删除')}}</button>
</view>
</view>
</view>
......
......@@ -48,7 +48,7 @@
<view class="info-wrap">
<empty v-if="!list.length"></empty>
<view v-for="(item, index) in filteredList" :key="index" class="item">
<view v-if="filteredList.length" v-for="(item, index) in filteredList" :key="index" class="item">
<view :class="'order-' + item.orderNo == heightLightId ? 'bg-yellow info-content' : 'bg-white info-content'">
<view>
<view>
......@@ -61,10 +61,35 @@
{{ index + 1 }}
</view>
</view>
</view>
<view>
<view>
<view class="label">{{$t('订单号')}}: </view>
<view class="content">
{{item.orderNo}}
<text class="text-blue" @tap="showOrderDetail(true, item.orderId)">{{item.orderNo}}</text>
<!-- 调仓 -->
<text style="color:blue;fontWeight:bold;margin: 0 3px;">
{{ item.isExternalWarehouse === 1 ? ('('+$t('外部仓')+')') : ''}}
</text>
<text style="color:red;fontWeight:bold;margin: 0 3px;">
{{ item.adjustToDestWarehouseId > 0 ? ('('+$t('调仓')+')') : ''}}
</text>
<!-- 品牌 -->
<text v-if="item.orderItemDOS&&item.orderItemDOS.some(ele => [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;margin: 0 3px;">{{ $t('有牌') }}</text>
<!-- 特性 -->
<text style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(item.orderItemDOS, 'warehouseInProdAttrIds')) }}</text>
<!-- 报关方式 -->
<text v-if="item.customsType !== '1'">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" style="color:red;fontWeight:bold;margin: 0 3px;" />
</text>
<!-- 包装类型 -->
<text v-for="(unit, index) in uniqueArr(item.units)" :key="index" style="color:red;fontWeight:bold;margin: 0 3px;">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== uniqueArr(item.units).length-1 ? ',':'' }}
</text>
<!-- 关联单 -->
<text v-if="item.hasRelationOrder" style="color:red;fontWeight:bold;" @tap="relatedClick(item.orderId)">{{$t('关联单')}}</text>
<!-- 混箱 -->
<text v-if="item.mixStatus === 1" style="color:red;fontWeight:bold;margin: 0 3px;" @tap="showMixOrder(item)">{{$t('混箱')}}</text>
</view>
</view>
</view>
......@@ -166,6 +191,10 @@
</view>
</view>
</view>
<mix-order-list ref="mixOrderList" />
<!-- 订单详情弹窗 -->
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- 批量输入 -->
<view class="cu-modal" :class="batchModal ? 'show' : ''" style="z-index: 900;">
......@@ -293,18 +322,22 @@ import {uniIcons} from '@dcloudio/uni-ui';
import {
createMergePkgOrder, createMergePkgOrderBatch, finishMergePkg,
getPkgPageByPkgId, getUnPkgPage, removeMergePkg, removeMergePkgBatch,
scanOrderNoCreate
scanOrderNoCreate, listByOrderId
} from "./api";
import { batchCreateMore,batchDeleteMore,singleCreate,orderTagList } from "../tallyAir/api";
import { getOrderDetailByBoxNo } from "../loading/api";
import { getOrderDetail, getOrderDetailByBoxNo } from "../loading/api";
import EditMergePkgDialog from "@/pages/mergePkg/components/editMergePkgDialog.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import MixOrderList from "@/pages/tally/mixOrderList.vue";
import util from '@/util/util'
import { msg, alert } from "@/util/tools";
import Seal from "@/pages/mergePkg/components/seal.vue";
import Empty from "@/pages/mergePkg/components/empty.vue";
import * as types from "../../store/mutations-types.js";
import {getProductAttrList} from "@/api/system";
export default {
components: { Empty, Seal, EditMergePkgDialog, uniIcons },
components: { Empty, Seal, EditMergePkgDialog, uniIcons, OrderDetailModal, MixOrderList },
filters:{
toFixed(val){
return Number(val).toFixed(2)
......@@ -312,6 +345,7 @@ export default {
},
data() {
return {
productAttrList:[],
// 出货Id
shipmentId: null,
// 自编号
......@@ -329,6 +363,9 @@ export default {
searchKeyword: null,
// 是否显示封箱弹层
showSealDialog: false,
/* 订单详情 */
orderDetailModal: false,
orderDetail: {},
keyword: "",
//未理货箱号
noTallyAir:false,
......@@ -337,6 +374,7 @@ export default {
batchModal: false,
scanNumber: "",
batchOrderInfo: {},
orderId: null,
/* 装柜纠错 */
errorModal: false,
unloadNumber: "",
......@@ -390,6 +428,10 @@ export default {
this.pkgId = +option.pkgId
this.getData()
getProductAttrList().then(data => {
this.productAttrList = data
})
},
methods: {
formatDate: util.formatDate,
......@@ -425,6 +467,66 @@ export default {
this.$set(item, 'checked', status)
})
},
/* 跳转到关联单 */
relatedClick(orderNo) {
uni.navigateTo({
url: `../tally/relatedOrder?orderId=${orderNo}&selfNo=${this.selfNo}`,
});
},
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
/* 过滤包装类型 */
uniqueArr(arr) {
if (!arr || !arr.length) return
return arr.split(',').filter((obj) =>
!['1', '2'].includes(obj));
},
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
getProductAttrsByIds(ids){
if(!ids) return ''
const result = []
ids.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id && this.$l(f, 'attrName') !== '普货') {
result.push(this.$l(f, 'attrName'))
}
})
})
console.log('result', result)
return result.join('')
},
/* 显示订单详情 */
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 ?? ""
}`;
});
this.$set(this.orderDetail, "positionNo", positionNos.join(","));
});
});
});
},
// 装箱
pack(item){
if(item.customsType!=='1'){
......
......@@ -105,7 +105,7 @@
<view class="cu-item">
<view class="content">
<text>{{$t('可出特性')}}:</text>
<text>{{ order.attrNameList ? order.attrNameList.join(',') : '' }}</text>
<text>{{ order.attrNameList ? order.attrNameList.filter(v => v).join(',') : '' }}</text>
</view>
</view>
</view>
......@@ -249,6 +249,7 @@ export default {
/* 发货ID */
shipmentId: "",
destWarehouseId: "", // 目的地
isTally: 0,
// loadDetail: {},
status: "more",
contentText: {
......@@ -335,6 +336,7 @@ export default {
),
secId: this.pathToList[this.pathToSelected].id,
shipmentId: this.shipmentId,
isTally: this.isTally,
};
createAir({ ...params, relationStatus: 2, singleLoad }).then((res) => {
this.showPatch = false
......@@ -547,6 +549,7 @@ export default {
),
secId: this.pathToList[this.pathToSelected].id,
shipmentId: this.shipmentId,
isTally: this.isTally,
}).then((data) => {
if(data !== null && data?.data !== null) {
this.$store.dispatch(types.SHOW_TOAST, {
......@@ -596,6 +599,7 @@ export default {
if ("id" in option) {
this.shipmentId = option.id;
this.destWarehouseId = option.destWarehouseId;
this.isTally = option.isTally;
// 查询出货详情
await this.getShipment()
await this.getCountry()
......
......@@ -39,7 +39,8 @@
</view>
</view>
<!-- 订单详情弹窗 -->
<view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- <view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder">{{$t('订单详情')}}</view>
......@@ -101,15 +102,18 @@
<view class="action"><button class="cu-btn bg-grey" @tap="showOrderDetail(false)">{{$t('取消')}}</button></view>
</view>
</view>
</view>
</view> -->
</view>
</template>
<script>
import { getWarehouseWaitInList,listByOrderId,getOrderDetailAdmin } from './api'
import mixins from "../../mixins/mixin.js";
import OrderDetailModal from "@/components/order-detail-modal/index.vue"
export default {
mixins: [mixins],
components: { OrderDetailModal },
data() {
return {
listData: [],
......
......@@ -104,3 +104,18 @@ export function quantityRequired(lineId) {
method: 'get'
})
}
/**
* 关联单
*
* @export
* @param {*} data
* @return {*}
*/
export function tallyListGuanlianOrder(data) {
return http('/shipment/box/tallyListGuanlianOrder', data, {
method: 'POST',
loading: true,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
});
}
\ No newline at end of file
......@@ -31,15 +31,32 @@
</view>
<view class="padding-sm" v-for="(order, key) in v.sectionOrderList" :key="key">
<view class="flex text-center">
<view class="text-break text-blue" style="width:20%;" @tap="showOrderDetail(true, order.orderId)">
<view>{{ order.orderNo }}</view>
<view class="text-break text-blue" style="width:20%;">
<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 style="color: red"><dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" /></view>
<!-- 品牌 -->
<!-- <view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view> -->
<!-- 特性 -->
<!-- <view style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(order.goodsList, 'warehouseInProdAttrIds')) }}</view> -->
<!-- 报关方式 -->
<view v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
</view>
<!-- 包装类型 -->
<view style="color:red;fontWeight:bold;">
<text v-for="(unit, index) in uniqueArr(order.units)" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== uniqueArr(order.units).length-1 ? ',':'' }}
</text>
</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="showMixOrder(order)">{{$t('混箱')}}</view>
</view>
<view style="width:15%;">{{ order.volume | toFixed }}</view>
<view style="width:15%;">{{ order.weight | toFixed }} kg</view>
......@@ -95,6 +112,9 @@
<view class="padding-xl">
<block>
<view class="flex-sub" style="padding-right: 10px;">
<button class="cu-btn block bg-yellow margin-tb-sm lg" @click="toPatch">{{$t('补单')}}</button>
</view>
<view class="flex">
<view class="flex-sub" style="padding-right: 10px;">
<button class="cu-btn block bg-blue margin-tb-sm lg" @click="tallyFinish">{{$t('完成理货')}}</button>
......@@ -109,7 +129,8 @@
</scroll-view>
<!-- 订单详情弹窗 -->
<view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- <view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder">{{$t('订单详情')}}</view>
......@@ -135,11 +156,6 @@
<view class="title">{{$t('报关方式')}}</view>
<view class="content"><dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="orderDetail.customsType" /></view>
</view>
<!-- <view class="cu-form-group">-->
<!-- <view class="title">{{$t('入仓时间')}}</view>-->
<!-- <view class="content">{{ orderDetail.rucangTime | formatDate }}</view>-->
<!-- </view>-->
<view>
<view class="item-content" v-for="(v, goodsKey) in orderDetail.orderItemVOList" :key="'goods-' + goodsKey">
<view>
......@@ -164,7 +180,7 @@
<view class="action"><button class="cu-btn bg-grey" @tap="showOrderDetail(false)">{{$t('取消')}}</button></view>
</view>
</view>
</view>
</view> -->
<!-- 货物详情弹窗 -->
<view class="cu-modal" :class="goodsModal ? 'show' : ''" style="z-index: 900;">
......@@ -220,6 +236,8 @@
</view>
<warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" />
<warehouse-list ref="warehouseList" />
<mix-order-list ref="mixOrderList" />
<uni-popup ref="popup" class="add-popup">
<view class="popup-content">
......@@ -250,10 +268,14 @@ import {
} from "./api";
import { getOrderDetail, getLoadingDetail } from "../loading/api";
import WarehouseDetail from "./warehouseDetail.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 { getProductAttrList } from "@/api/system";
export default {
name: "tally-detail",
components: { WarehouseDetail },
components: { WarehouseDetail,OrderDetailModal, WarehouseList, MixOrderList },
mixins: [mixins],
data() {
return {
......@@ -287,6 +309,7 @@ export default {
goodsModal: false,
// 当前行
currRow: {},
productAttrList:[],
};
},
computed: {
......@@ -314,15 +337,25 @@ export default {
},
},
methods: {
// 从warehouseInInfo中提取储位信息
showLocationName(locationList){
if(!locationList || !locationList.length) return ''
let locations = new Set()
locationList.forEach(item => {
locations.add((item.areaName || '') + (item.locationName || ''))
})
return Array.from(new Set(locations)).join(',')
},
// 从warehouseInInfo中提取储位信息
showLocationName(locationList){
if(!locationList || !locationList.length) return ''
let locations = new Set()
locationList.forEach(item => {
locations.add((item.areaName || '') + (item.locationName || ''))
})
return Array.from(new Set(locations)).join(',')
},
// 显示入仓列表
showWarehouseList(row) {
this.orderId = row.orderId;
this.$refs.warehouseList.showDetail(row);
},
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
// 显示入仓记录
showWarehouseLogs(row) {
this.orderId = row.orderId;
......@@ -334,6 +367,31 @@ export default {
if (show) this.currRow = row;
this.goodsModal = show;
},
/* 过滤包装类型 */
uniqueArr(arr) {
if (!arr || !arr.length) return
return arr.split(',').filter((obj) =>
!['1', '2'].includes(obj));
},
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
getProductAttrsByIds(ids){
if(!ids) return ''
const result = []
ids.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id && this.$l(f, 'attrName') !== '普货') {
result.push(this.$l(f, 'attrName'))
}
})
})
console.log('result', result)
return result.join('')
},
/* 折叠 */
fold(k) {
if (this.partShow[k]) this.partShow[k] = true;
......@@ -503,6 +561,20 @@ export default {
this.getLoadDetail();
});
},
/* 跳转到关联单 */
relatedClick(orderId) {
const { boxInfo } = this.loadData;
uni.navigateTo({
url: `./relatedOrder?orderId=${orderId}&selfNo=${boxInfo.selfNo}`,
});
},
/* 跳转到补单 */
toPatch() {
const { boxInfo } = this.loadData;
uni.navigateTo({
url: `../loading/patch?id=${this.shipmentId}&destWarehouseId=${boxInfo.destWarehouseId}&isTally=1`,
});
},
/* 理货完成 */
tallyFinish() {
tallyCommit({ shipmentId: this.shipmentId }).then((res) => {
......@@ -526,15 +598,18 @@ export default {
this.shipmentId = option.id;
this.getLoadDetail();
}
getProductAttrList().then(data => {
this.productAttrList = data
})
},
/* onShow() {
onShow() {
if (this.onHideFlag) {
this.getLoadDetail();
}
},
onHide() {
this.onHideFlag = true;
}, */
},
};
</script>
......
<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 v-for="(item, index) in order.orderWarehouseInBackItemDoList" :key="'item-' + index">
<view v-for="(v, index) in item.orderWarehouseInDetailsVOList" :key="'order-' + index">
<view class="flex text-center padding-sm" :key="'goods-' + index">
<view class="flex-sub">{{ $lang.locale==='zh-Hans'? v.prodTitleZh:v.prodTitleEn }}</view>
<view class="flex-sub">
<template v-if="v.brandName">{{$t(`${v.brandName}`)}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="v.brandType" />
</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.quantityAll }}</view>
</view>
</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";
import {getProductAttrList} from '@/api/system'
import { DICT_TYPE } from "@/util/dict";
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,
productAttrList: [],
};
},
computed: {
DICT_TYPE() {
return DICT_TYPE
},
isChinese(){
return uni.getLocale() === 'zh-Hans'
}
},
created() {
getProductAttrList().then(data => {
this.productAttrList = data
})
},
methods: {
// 从warehouseInInfo中提取储位信息
showLocationName(orderLocationBackVOList){
if(!orderLocationBackVOList) return ''
let locations = []
orderLocationBackVOList.forEach(item => {
locations.push(item.areaName + (item.locationName || ''))
})
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) {
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>
This diff is collapsed.
<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('体积') + "(m³)"}}</view>
<view class="flex-sub">{{$t("重量") + "(kg)"}}</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 class="flex-sub">{{ showLocationName(v.orderLocationBackVOList) }}</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>
......@@ -43,15 +43,32 @@
</view>
<view class="padding-sm" :id="'order-' + order.orderNo" :class="'order-' + order.orderNo == heightLightId ? 'bg-yellow' : 'bg-white'" v-for="(order, key) in v.sectionOrderList" :key="key">
<view class="flex text-center">
<view class="text-break text-blue" style="width:20%;" @tap="showOrderDetail(true, order.orderId)">
<view>{{ order.orderNo }}</view>
<view class="text-break text-blue" style="width:20%;">
<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 style="color: red"><dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" /></view>
<!-- 品牌 -->
<view v-if="order.goodsList.some(ele => ele.feeType && [$t('无牌'), $t('有牌'), $t('中性')][ele.feeType] !== $t('无牌'))" style="color:red;fontWeight:bold;">{{ $t('有牌') }}</view>
<!-- 特性 -->
<view style="color:red;fontWeight:bold;">{{ getProductAttrsByIds(uniqueProductAttrs(order.goodsList, 'warehouseInProdAttrIds')) }}</view>
<!-- 报关方式 -->
<view v-if="order.customsType !== 1">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="order.customsType" style="color:red;fontWeight:bold;" />
</view>
<!-- 包装类型 -->
<view style="color:red;fontWeight:bold;">
<text v-for="(unit, index) in uniqueArr(order.units)" :key="index">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="unit" />{{ index!== uniqueArr(order.units).length-1 ? ',':'' }}
</text>
</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="showMixOrder(order)">{{$t('混箱')}}</view>
</view>
<view style="width:15%;">{{ order.volume | toFixed }}</view>
<view style="width:15%;">{{ order.weight | toFixed }} kg</view>
......@@ -113,6 +130,9 @@
<view class="padding-xl">
<block>
<view class="flex-sub" style="padding-right: 10px;">
<button class="cu-btn block bg-yellow margin-tb-sm lg" @click="toPatch">{{$t('补单')}}</button>
</view>
<view class="flex">
<view class="flex-sub">
<button class="cu-btn block bg-red margin-tb-sm lg" @click="showErrorCorrection(true)">{{$t('理货纠错')}}</button>
......@@ -135,7 +155,8 @@
</scroll-view>
<!-- 订单详情弹窗 -->
<view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<OrderDetailModal :orderDetailModal="orderDetailModal" :orderDetail="orderDetail" @close="showOrderDetail"></OrderDetailModal>
<!-- <view class="cu-modal" :class="orderDetailModal ? 'show' : ''" style="z-index: 900;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end bottom-line">
<view class="content title-bolder">{{$t('订单详情')}}</view>
......@@ -161,10 +182,6 @@
<view class="title">{{$t('报关方式')}}</view>
<view class="content"><dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="orderDetail.customsType" /></view>
</view>
<!-- <view class="cu-form-group">-->
<!-- <view class="title">{{$t('入仓时间')}}</view>-->
<!-- <view class="content">{{ orderDetail.rucangTime | formatDate }}</view>-->
<!-- </view>-->
<view>
<view class="item-content" v-for="(v, goodsKey) in orderDetail.orderItemVOList" :key="'goods-' + goodsKey">
......@@ -190,7 +207,7 @@
<view class="action"><button class="cu-btn bg-grey" @tap="showOrderDetail(false)">{{$t('取消')}}</button></view>
</view>
</view>
</view>
</view> -->
<!-- 货物详情弹窗 -->
<view class="cu-modal" :class="goodsModal ? 'show' : ''" style="z-index: 900;">
......@@ -261,6 +278,8 @@
</view>
</view>
<warehouse-detail ref="warehouseDetail" :orderId="orderId" :orderItemId="showWarehouseInItemId" />
<warehouse-list ref="warehouseList" />
<mix-order-list ref="mixOrderList" />
<uni-popup ref="popup" class="add-popup">
<view class="popup-content">
......@@ -401,12 +420,16 @@ import {
} from "./api";
import { getOrderDetail, getLoadingDetail,getOrderDetailByBoxNo } from "../loading/api";
import WarehouseDetail from "./warehouseDetail.vue";
import WarehouseList from "@/pages/tally/warehouseList.vue";
import MixOrderList from "@/pages/tally/mixOrderList.vue";
import Exception from "./components/exception.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import util from "../../util/util.js";
import { getProductAttrList } from "@/api/system";
export default {
name: "tally-detail",
components: { Exception, WarehouseDetail },
components: { Exception, WarehouseDetail, OrderDetailModal, WarehouseList, MixOrderList },
mixins: [mixins],
data() {
return {
......@@ -440,6 +463,7 @@ export default {
goodsModal: false,
// 当前行
currRow: {},
productAttrList:[],
// 当前转异订单
turnExceptionOrder: null,
keyword: "",
......@@ -525,15 +549,25 @@ export default {
this.scanNumber = "";
this.batchModal = show;
},
// 从warehouseInInfo中提取储位信息
showLocationName(locationList){
if(!locationList || !locationList.length) return ''
let locations = new Set()
locationList.forEach(item => {
locations.add((item.areaName || '') + (item.locationName || ''))
})
return Array.from(new Set(locations)).join(',')
},
// 从warehouseInInfo中提取储位信息
showLocationName(locationList){
if(!locationList || !locationList.length) return ''
let locations = new Set()
locationList.forEach(item => {
locations.add((item.areaName || '') + (item.locationName || ''))
})
return Array.from(new Set(locations)).join(',')
},
// 显示入仓列表
showWarehouseList(row) {
this.orderId = row.orderId;
this.$refs.warehouseList.showDetail(row);
},
// 显示混箱明细
showMixOrder(row) {
this.orderId = row.orderId;
this.$refs.mixOrderList.showDetail(row);
},
// 显示入仓记录
showWarehouseLogs(row) {
this.orderId = row.orderId;
......@@ -545,17 +579,42 @@ export default {
if (show) this.currRow = row;
this.goodsModal = show;
},
showNoGoodsList(show,orderId=0) {
this.noTallyAir = show;
if(show){
this.noTallyAirList = []
orderTagList(orderId,0).then(data=>{
if(data&&data.unLoadList){
this.noTallyAirList = data.unLoadList
}
})
}
},
showNoGoodsList(show,orderId=0) {
this.noTallyAir = show;
if(show){
this.noTallyAirList = []
orderTagList(orderId,0).then(data=>{
if(data&&data.unLoadList){
this.noTallyAirList = data.unLoadList
}
})
}
},
/* 过滤包装类型 */
uniqueArr(arr) {
if (!arr || !arr.length) return
return arr.split(',').filter((obj) =>
!['1', '2'].includes(obj));
},
// 过滤商品特性
uniqueProductAttrs(arr, field) {
let uniqueValues = [...new Set(arr.map(item => item[field].split(',')).flat())];
return uniqueValues.join(',')
},
// 获取商品特性文本
getProductAttrsByIds(ids){
if(!ids) return ''
const result = []
ids.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id && this.$l(f, 'attrName') !== '普货') {
result.push(this.$l(f, 'attrName'))
}
})
})
console.log('result', result)
return result.join('')
},
/* 折叠 */
fold(k) {
if (this.partShow[k]) this.partShow[k] = true;
......@@ -764,6 +823,20 @@ 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;
uni.navigateTo({
url: `../mergePkg/patch?id=${this.shipmentId}&selfNo=${boxInfo.selfNo}&isTally=1`,
});
},
/* 理货完成 */
tallyFinish() {
this.$store.dispatch(types.SHOW_TOAST, {
......@@ -922,16 +995,18 @@ export default {
this.shipmentId = parseInt(option.id);
this.getLoadDetail();
}
getProductAttrList().then(data => {
this.productAttrList = data
})
},
/* onShow() {
onShow() {
if (this.onHideFlag) {
this.getLoadDetail();
}
},
onHide() {
this.onHideFlag = true;
}, */
},
};
</script>
......
......@@ -146,7 +146,7 @@
<button style="color: #007aff" @tap="next">{{$t('下一步')}}</button>
</view>
<view class="add-popup">
<uni-popup ref="popup" background-color="#fff" @maskClick="maskClick">
<uni-popup ref="popup" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{title}}</view>
<view class="add-form">
......@@ -293,7 +293,7 @@
<!-- 添加新商品-->
<view class="add-popup">
<uni-popup ref="product" background-color="#fff" @maskClick="maskClickAddProduct">
<uni-popup ref="product" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{$t('添加新商品')}}</view>
......@@ -908,25 +908,45 @@ export default {
})
},
maskClick() {
this.$refs.popup.close()
this.addForm = {
unit: '1',
orderWarehouseInItemDoList: [{cartonsNum:undefined}],
pictureUrls: [],
usageIds: [],
}
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
_this.$refs.popup.close()
_this.addForm = {
unit: '1',
orderWarehouseInItemDoList: [{cartonsNum:undefined}],
pictureUrls: [],
usageIds: [],
}
}
}
});
},
addProduct() {
this.$refs.product.open('center')
},
maskClickAddProduct() {
this.$refs.product.close()
this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
_this.$refs.product.close()
_this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
});
},
saveProductForm() {
if(!this.productForm.typeId){
......
......@@ -145,7 +145,7 @@
<button style="color: #007aff" @tap="next">{{$t('下一步')}}</button>
</view>
<view class="add-popup">
<uni-popup ref="popup" background-color="#fff" @maskClick="maskClick">
<uni-popup ref="popup" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{title}}</view>
<view class="add-form">
......@@ -292,7 +292,7 @@
<!-- 添加新商品-->
<view class="add-popup">
<uni-popup ref="product" background-color="#fff" @maskClick="maskClickAddProduct">
<uni-popup ref="product" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{$t('添加新商品')}}</view>
......@@ -906,25 +906,44 @@ export default {
})
},
maskClick() {
this.$refs.popup.close()
this.addForm = {
unit: '1',
orderWarehouseInItemDoList: [{cartonsNum:undefined}],
pictureUrls: [],
usageIds: [],
}
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
_this.$refs.popup.close()
_this.addForm = {
unit: '1',
orderWarehouseInItemDoList: [{cartonsNum:undefined}],
pictureUrls: [],
usageIds: [],
}
}
}
});
},
addProduct() {
this.$refs.product.open('center')
},
maskClickAddProduct() {
this.$refs.product.close()
this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
_this.$refs.product.close()
_this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
});
},
saveProductForm() {
if(!this.productForm.typeId){
......
......@@ -18,8 +18,9 @@ if (process.env.NODE_ENV === 'development') {
/**
* 配置api基础路径
*/
//let apiBaseUrl = 'https://api2.groupage.cn/'
let apiBaseUrl = 'https://api2.groupage.cn/'
// let apiBaseUrl = 'https://apitest.groupage.cn/'
// let apiBaseUrl = 'https://api.jd.qipx.top/'
//let apiBaseUrl = 'http://192.168.1.13:48080/'
let localApiBaseUrl = uni.getStorageSync("localApiBaseUrl")
if(localApiBaseUrl){
......
......@@ -11,7 +11,7 @@ let headers = {
// 'Content-Type': 'application/x-www-form-urlencoded' //设置默认头信息
"locale": 'zh-Hans',
}
const timeout = 20 * 1000 //默认20秒超时
const timeout = 60 * 1000 //默认60秒超时
/**
* 生成签名
......
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