Commit 61476edd authored by zhoutong's avatar zhoutong

理货增加标签扫码、批量输入、纠错、批量纠错

parent f0bd0d76
...@@ -403,3 +403,93 @@ export function downloadLoadGoods(params) { ...@@ -403,3 +403,93 @@ export function downloadLoadGoods(params) {
params, params,
}) })
} }
/**
* 创建理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoSingleCreate(data) {
return request({
url: `/ecw/box-order-check-info/singleCreate`,
method: "post",
data: data
});
}
/**
* 批量创建理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoBatchCreate(data) {
return request({
url: `/ecw/box-order-check-info/batchCreate`,
method: "post",
data: data
});
}
/**
* 删除理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoSingleDelete(data) {
return request({
url: `/ecw/box-order-check-info/singleDelete`,
method: "post",
data: data
});
}
/**
* 批量删除理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoBatchDelete(data) {
return request({
url: `/ecw/box-order-check-info/batchDelete`,
method: "post",
data: data
});
}
/**
* 获取订单理货,合包编号列表
*
* @export
* @param {*} data
* @return {*}
*/
export function getOrderTagList(params) {
return request({
url: `/ecw/box-order-check-info/orderTagList`,
method: "get",
params
});
}
/**
* 根据箱号、订单号查找订单号码,理货和合包使用
*
* @export
* @param {*} data
* @return {*}
*/
export function searchLoadOrderByBoxNo(data) {
return request({
url: `/ecw/box-order-check-info/searchLoadOrderByBoxNo`,
method: "post",
data: data
});
}
\ No newline at end of file
<template> <template>
<div> <div>
<el-row style="margin-top: 25px"> <el-row style="margin-top: 25px">
<el-row v-if="flag == 'edit'"> <el-row v-if="flag == 'edit'" class="table-title">
<div>
<el-button size="small" type="primary" @click="removeBatch">{{ $t('批量移出合包') }}</el-button> <el-button size="small" type="primary" @click="removeBatch">{{ $t('批量移出合包') }}</el-button>
<el-button size="small" type="primary" @click="sealBox">{{ $t('封箱') }}</el-button> <el-button size="small" type="primary" @click="sealBox">{{ $t('封箱') }}</el-button>
</div>
<div>
<template>
<el-input v-model="qrCode" :placeholder="$t('请输入二维码/条码编号')" clearable></el-input>
<el-button type="primary" @click="handlerBatchCreate()">{{$t('确定')}}</el-button>
<el-button type="primary" @click="handlerClick('batchInput',$t('批量输入'))">{{$t('批量输入')}}</el-button>
<el-button type="primary" @click="handlerClick('correction',$t('装箱纠错'))">{{$t('装箱纠错')}}</el-button>
<el-button type="primary" @click="handlerClick('correctionOrder',$t('批量装箱纠错'))">{{$t('批量装箱纠错')}}</el-button>
</template>
</div>
</el-row> </el-row>
<el-row style="margin-top: 5px"> <el-row style="margin-top: 5px">
<el-table border :data="pagList" max-height="600px" @select="checkboxSelect" @select-all="checkboxSelect"> <el-table border :data="pagList" max-height="600px" @select="checkboxSelect" @select-all="checkboxSelect">
...@@ -11,7 +22,9 @@ ...@@ -11,7 +22,9 @@
<el-table-column align="center" :label="$t('序号')" width="50" type="index" /> <el-table-column align="center" :label="$t('序号')" width="50" type="index" />
<el-table-column :label="$t('订单号')" align="center" prop="orderNo"> <el-table-column :label="$t('订单号')" align="center" prop="orderNo">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click.native="orderClick(scope.row)">
{{ scope.row.orderNo }} {{ scope.row.orderNo }}
</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('商品信息')" width="250px" align="center"> <el-table-column :label="$t('商品信息')" width="250px" align="center">
...@@ -26,9 +39,9 @@ ...@@ -26,9 +39,9 @@
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="row.productRecord" /> <dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="row.productRecord" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="sumNum"> <el-table-column :label="$t('计划/已装')" align="center" prop="sumNum">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.sumNum }} {{ scope.row.sumNum }}/{{ scope.row.installNum }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('纸箱尺寸')" align="center"> <el-table-column :label="$t('纸箱尺寸')" align="center">
...@@ -125,13 +138,91 @@ ...@@ -125,13 +138,91 @@
<el-dialog :title="$t('集运封箱标签')" :visible.sync="printdialogVisible" width="350px" :modal-append-to-body="false" append-to-body> <el-dialog :title="$t('集运封箱标签')" :visible.sync="printdialogVisible" width="350px" :modal-append-to-body="false" append-to-body>
<print-tag v-if="printdialogVisible" :tagData="tagData" /> <print-tag v-if="printdialogVisible" :tagData="tagData" />
</el-dialog> </el-dialog>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="checkDialogConfig.title" :visible.sync="checkDialogConfig.dialogVisible" :fullscreen="checkDialogConfig.fullscreen" :width="checkDialogConfig.width" :modal-append-to-body=false append-to-body>
<!-- 已装未装订单 -->
<template v-if="checkDialogConfig.type === 'orderTable'">
<el-table :data="orderList" height="500px" border>
<el-table-column :label="$t('已装')" align="center" prop="loadTag" />
<el-table-column :label="$t('未装')" align="center" prop="unloadTag" />
</el-table>
</template>
<!-- 装柜纠错 -->
<template v-if="checkDialogConfig.type === 'correction' && checkDialogConfig.dialogVisible">
<el-form ref="correctionForm" :rules="rules" :model="correctionObj" label-position="top">
<el-form-item :label="$t('装柜纠错(二维码/条形码编号)')" prop="qrCode">
<el-input v-model="correctionObj.qrCode" :placeholder="$t('请输入二维码/条形码编号')" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="delCheck()">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row>
</template>
<!-- 批量装柜纠错(订单号) -->
<template v-if="checkDialogConfig.type === 'correctionOrder' && checkDialogConfig.dialogVisible">
<el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top">
<el-form-item :label="$t('装柜纠错') +'(' + $t('订单号') + ')'" prop="orderNo">
<el-input type="textarea" :rows="3" v-model="orderObj.orderNo" :placeholder="$t('请输入,多个以逗号分隔')" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="batchDelCheck()">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row>
</template>
<!-- 装柜批量输入 -->
<template v-if="checkDialogConfig.type === 'batchInput' && checkDialogConfig.dialogVisible">
<el-form ref="batchForm" :rules="rules" :model="batchObj">
<el-form-item label="" prop="qrCode" class="two-element">
<el-input v-model="batchObj.qrCode" :placeholder="$t('请输入订单号')" clearable />
<el-button style="marginLeft:10px;" type="primary" @click="queryOrderInfo">{{$t('确定')}}</el-button>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('订单号')">
{{boxOrderInfo.orderNo}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('箱数')">
<el-input-number v-if="boxOrderInfo.isExternalWarehouse === 1" v-model="batchObj.boxNum" :min="0" :max="boxOrderInfo.num" />
<template v-else>
{{boxOrderInfo.num}}
</template>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('方数')">
{{getTotlContent(boxOrderInfo, ['volume'])}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('重量')">
{{getTotlContent(boxOrderInfo, ['weight'])}}
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row class="operate-button">
<el-button type="primary" :disabled="boxOrderInfo.orderId ? false : true" @click="batchLoad">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row>
</template>
</el-dialog>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { getPkgPageByPkgId, deleteRelate, deleteBatchRelate, getMergePkgInfoById, updateMergePkg, getMergeTagById } from '@/api/ecw/boxAir' import { getPkgPageByPkgId, deleteRelate, deleteBatchRelate, getMergePkgInfoById, updateMergePkg, getMergeTagById, checkInfoSingleCreate, checkInfoBatchCreate, getOrderTagList, checkInfoSingleDelete, checkInfoBatchDelete } from '@/api/ecw/boxAir'
import { formatDate, serviceMsg } from '../../utils' import { formatDate, serviceMsg, getTotlContent } from '../../utils'
import { getOrderDetailByBoxNo } from "@/api/ecw/boxSea";
import printTag from './printTag.vue' import printTag from './printTag.vue'
export default { export default {
props: { props: {
...@@ -159,7 +250,37 @@ export default { ...@@ -159,7 +250,37 @@ export default {
sealBoxdialogVisible: false, sealBoxdialogVisible: false,
sealBoxForm: {}, sealBoxForm: {},
printdialogVisible: false, printdialogVisible: false,
tagData: {} tagData: {},
// 二维码/条码编号
qrCode: "",
// 批量输入
batchObj: {
boxNum: 0,
},
// 批量纠错(订单号)
orderObj: {},
// 纠错
correctionObj: {},
// 弹窗配置
checkDialogConfig: {
title: "",
dialogVisible: false,
width: "30%",
type: "",
fullscreen: false,
},
// 订单信息
boxOrderInfo: {},
rules: {
qrCode: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
orderNo: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
// 已理/未理
orderList: [],
} }
}, },
created() { created() {
...@@ -168,7 +289,7 @@ export default { ...@@ -168,7 +289,7 @@ export default {
methods: { methods: {
getList() { getList() {
let queryParams = { let queryParams = {
id: this.pkgData.id , id: this.pkgData.id,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
...this.queryParams ...this.queryParams
} }
...@@ -179,6 +300,7 @@ export default { ...@@ -179,6 +300,7 @@ export default {
}, },
// 格式化日期 // 格式化日期
formatDate, formatDate,
getTotlContent,
//去重 //去重
notset(string) { notset(string) {
if (!string) return string if (!string) return string
...@@ -227,6 +349,18 @@ export default { ...@@ -227,6 +349,18 @@ export default {
}, },
//封箱 //封箱
sealBox() { sealBox() {
let flag = false
let orderNo = ''
this.pagList.forEach(item=>{
if(item.installNum != item.num){
flag = true
orderNo = orderNo + '' + item.orderNo + ''
}
})
if(flag){
this.$message.error(this.$t(`订单号${orderNo}未完成装箱,请完成全部订单装箱后重试`));
return;
}
getMergePkgInfoById(this.pkgData.id).then(res=>{ getMergePkgInfoById(this.pkgData.id).then(res=>{
this.sealBoxForm = { this.sealBoxForm = {
pkgHight: res.data.pkgHight, pkgHight: res.data.pkgHight,
...@@ -264,10 +398,178 @@ export default { ...@@ -264,10 +398,178 @@ export default {
}); });
}) })
}) })
},
/** 表格订单号点击 */
orderClick(row) {
getOrderTagList({ orderId: row.orderId, type: 1 }).then((res) => {
const { data = {} } = res;
this.orderList = [];
// 取最长的list
let dataLength = data.loadList.length;
if (data.unLoadList.length > dataLength) {
dataLength = data.unLoadList.length;
}
// 组装数据,用一个table组件渲染
for (let index = 0; index < dataLength; index++) {
this.orderList.push({
loadTag: data.loadList[index],
unloadTag: data.unLoadList[index],
});
}
});
this.shwoDialog({
type: "orderTable",
title: row.selfNo,
});
},
/** 点击事件统一入口 */
handlerClick(type, title) {
this.shwoDialog({ type, title });
},
/** 弹窗事件 */
shwoDialog(config) {
this.$set(this.checkDialogConfig, "title", config.title);
this.$set(this.checkDialogConfig, "type", config.type);
switch (config.type) {
case "orderTable":
this.$set(this.checkDialogConfig, "fullscreen", false);
break;
case "batchInput":
this.$set(this.checkDialogConfig, "fullscreen", false);
this.batchObj = { boxNum: 0 };
this.boxOrderInfo = {};
break;
case "correction":
this.$set(this.checkDialogConfig, "fullscreen", false);
this.correctionObj = {};
break;
case "correctionOrder":
this.$set(this.checkDialogConfig, "fullscreen", false);
this.orderObj = {};
break;
}
this.$set(this.checkDialogConfig, "dialogVisible", true);
},
/** 关闭弹窗 */
closeDialog2() {
this.$set(this.checkDialogConfig, "dialogVisible", false);
},
/* 创建装柜标签 */
handlerBatchCreate() {
if (!this.qrCode) {
this.$message.error(this.$t("请输入二维码/条码编号"));
return;
}
let params = {
shipmentId: this.shipmentObj.id,
pkgId: this.pkgData.id,
type: 1,
};
params.orderNumCode = this.qrCode;
checkInfoSingleCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.qrCode = "";
this.getList();
});
});
},
queryOrderInfo() {
this.$refs["batchForm"].validate((valid) => {
if (valid) {
getOrderDetailByBoxNo({
orderNumCode: this.batchObj.qrCode,
shipmentId: this.shipmentObj.id,
}).then((res) => {
const { data } = res;
this.boxOrderInfo = data;
this.batchObj.boxNum = Number(data.num);
});
}
});
},
/**批量创建装柜标签 */
batchLoad() {
if (!this.boxOrderInfo.orderId) {
this.$message.error(this.$t("请输入订单号"));
return;
}
if (this.batchObj.boxNum === 0) {
this.$message.error(this.$t("箱数不能为0"));
return;
}
let params = {
orderId: this.boxOrderInfo.orderId,
orderNo: this.boxOrderInfo.orderNo,
shipmentId: this.shipmentObj.id,
pkgId: this.pkgData.id,
type: 1
};
checkInfoBatchCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog2();
this.boxOrderInfo = {};
this.getList();
});
});
},
/**装柜纠错 */
delCheck() {
if (!this.correctionObj.qrCode) {
this.$message.error(this.$t("请输入二维码/条码编号"));
return;
}
let params = {
shipmentId: this.shipmentObj.id,
type: 1,
pkgId: this.pkgData.id,
orderNumCode: this.correctionObj.qrCode
};
checkInfoSingleDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog2();
this.getList();
});
});
},
/**批量装柜纠错 */
batchDelCheck() {
if (!this.orderObj.orderNo) {
this.$message.error(this.$t("请输入订单号"));
return;
}
let params = {
shipmentId: this.shipmentObj.id,
pkgId: this.pkgData.id,
type: 1,
orderNo: this.orderObj.orderNo
};
checkInfoBatchDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog2();
this.getList();
});
});
} }
} }
} }
</script> </script>
<style> <style lang="scss" scoped>
.table-title {
display: flex;
align-items: center;
margin-bottom: 10px;
> div:first-child {
flex: 1;
font-size: 16px;
}
> div:last-child {
display: flex;
> .el-input {
margin-right: 10px;
}
}
}
</style> </style>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div> <div>
<template> <template>
<el-input v-model="qrCode" :placeholder="$t('请输入二维码/条码编号')" clearable></el-input> <el-input v-model="qrCode" :placeholder="$t('请输入二维码/条码编号')" clearable></el-input>
<el-button type="primary" @click="handlerBatchCreate('single')">{{$t('确定')}}</el-button> <el-button type="primary" @click="handlerBatchCreate()">{{$t('确定')}}</el-button>
<el-button type="primary" @click="handlerClick('batchInput',$t('批量输入'))">{{$t('批量输入')}}</el-button> <el-button type="primary" @click="handlerClick('batchInput',$t('批量输入'))">{{$t('批量输入')}}</el-button>
<el-button type="primary" @click="handlerClick('correction',$t('理货纠错'))">{{$t('理货纠错')}}</el-button> <el-button type="primary" @click="handlerClick('correction',$t('理货纠错'))">{{$t('理货纠错')}}</el-button>
<el-button type="primary" @click="handlerClick('correctionOrder',$t('批量理货纠错'))">{{$t('批量理货纠错')}}</el-button> <el-button type="primary" @click="handlerClick('correctionOrder',$t('批量理货纠错'))">{{$t('批量理货纠错')}}</el-button>
...@@ -74,10 +74,10 @@ ...@@ -74,10 +74,10 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfo.cartonsNum"> <el-table-column :label="$t('计划/已理')" align="center" prop="warehouseInInfo.cartonsNum">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click.native="showWarehouseLogs(scope.row)"> <el-link type="primary" @click.native="orderClick(scope.row)">
{{scope.row.warehouseInInfo.cartonsNum}} {{scope.row.num}}/{{scope.row.installNum}}
</el-link> </el-link>
<div style="color:blue;fontWeight:bold;"> <div style="color:blue;fontWeight:bold;">
{{ scope.row.multiSpecification === true ? '(多规格)' : ''}} {{ scope.row.multiSpecification === true ? '(多规格)' : ''}}
...@@ -136,33 +136,40 @@ ...@@ -136,33 +136,40 @@
@cancel="currentTurnExceptionOrder=null" @cancel="currentTurnExceptionOrder=null"
@success="currentTurnExceptionOrder=null" /> @success="currentTurnExceptionOrder=null" />
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body> <el-dialog custom-class="shipping-dialog" :title="checkDialogConfig.title" :visible.sync="checkDialogConfig.dialogVisible" :fullscreen="checkDialogConfig.fullscreen" :width="checkDialogConfig.width" :modal-append-to-body=false append-to-body>
<!-- 装柜纠错 --> <!-- 已装未装订单 -->
<template v-if="dialogConfig.type === 'correction' && dialogConfig.dialogVisible"> <template v-if="checkDialogConfig.type === 'orderTable'">
<el-table :data="orderList" height="500px" border>
<el-table-column :label="$t('已理')" align="center" prop="loadTag" />
<el-table-column :label="$t('未理')" align="center" prop="unloadTag" />
</el-table>
</template>
<!-- 理货纠错 -->
<template v-if="checkDialogConfig.type === 'correction' && checkDialogConfig.dialogVisible">
<el-form ref="correctionForm" :rules="rules" :model="correctionObj" label-position="top"> <el-form ref="correctionForm" :rules="rules" :model="correctionObj" label-position="top">
<el-form-item :label="$t('装柜纠错(二维码/条形码编号)')" prop="qrCode"> <el-form-item :label="$t('理货纠错(二维码/条形码编号)')" prop="qrCode">
<el-input v-model="correctionObj.qrCode" :placeholder="$t('请输入二维码/条形码编号')" clearable /> <el-input v-model="correctionObj.qrCode" :placeholder="$t('请输入二维码/条形码编号')" clearable />
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit('correctionForm')">{{$t('提交')}}</el-button> <el-button type="primary" @click="delCheck()">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button> <el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row> </el-row>
</template> </template>
<!-- 批量装柜纠错(订单号) --> <!-- 批量理货纠错(订单号) -->
<template v-if="dialogConfig.type === 'correctionOrder' && dialogConfig.dialogVisible"> <template v-if="checkDialogConfig.type === 'correctionOrder' && checkDialogConfig.dialogVisible">
<el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top"> <el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top">
<el-form-item :label="$t('装柜纠错') +'(' + $t('订单号') + ')'" prop="orderNo"> <el-form-item :label="$t('理货纠错') +'(' + $t('订单号') + ')'" prop="orderNo">
<el-input type="textarea" :rows="3" v-model="orderObj.orderNo" :placeholder="$t('请输入,多个以逗号分隔')" clearable /> <el-input type="textarea" :rows="3" v-model="orderObj.orderNo" :placeholder="$t('请输入,多个以逗号分隔')" clearable />
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit('orderForm')">{{$t('提交')}}</el-button> <el-button type="primary" @click="batchDelCheck()">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button> <el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row> </el-row>
</template> </template>
<!-- 装柜批量输入 --> <!-- 理货批量输入 -->
<template v-if="dialogConfig.type === 'batchInput' && dialogConfig.dialogVisible"> <template v-if="checkDialogConfig.type === 'batchInput' && checkDialogConfig.dialogVisible">
<el-form ref="batchForm" :rules="rules" :model="batchObj"> <el-form ref="batchForm" :rules="rules" :model="batchObj">
<el-form-item label="" prop="qrCode" class="two-element"> <el-form-item label="" prop="qrCode" class="two-element">
<el-input v-model="batchObj.qrCode" :placeholder="$t('请输入订单号')" clearable /> <el-input v-model="batchObj.qrCode" :placeholder="$t('请输入订单号')" clearable />
...@@ -210,7 +217,8 @@ ...@@ -210,7 +217,8 @@
<script> <script>
import batchTally from "./batchTally.vue"; import batchTally from "./batchTally.vue";
import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea"; import { getTallyList, tallyRemove, tallyCommit, getOrderDetailByBoxNo } from "@/api/ecw/boxSea";
import { checkInfoSingleCreate, checkInfoBatchCreate, getOrderTagList, checkInfoSingleDelete, checkInfoBatchDelete } from "@/api/ecw/boxAir";
import { formatDate, serviceMsg, getTotlContent } from "../../utils"; import { formatDate, serviceMsg, getTotlContent } from "../../utils";
import WarehouseDetail from "./warehouseDetail"; import WarehouseDetail from "./warehouseDetail";
import {getOrder, orderSpecialNeed} from "@/api/ecw/order"; import {getOrder, orderSpecialNeed} from "@/api/ecw/order";
...@@ -264,8 +272,26 @@ export default { ...@@ -264,8 +272,26 @@ export default {
type: "", type: "",
fullscreen: false, fullscreen: false,
}, },
checkDialogConfig: {
title: "",
dialogVisible: false,
width: "30%",
type: "",
fullscreen: false,
},
// 订单信息 // 订单信息
boxOrderInfo: {}, boxOrderInfo: {},
rules: {
qrCode: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
orderNo: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
// 已理/未理
orderList: [],
checkOrderList: []
}; };
}, },
created() { created() {
...@@ -285,6 +311,7 @@ export default { ...@@ -285,6 +311,7 @@ export default {
// 查询理货列表 // 查询理货列表
getList() { getList() {
getTallyList({ shipmentId: this.shipmentObj.id }).then((res) => { getTallyList({ shipmentId: this.shipmentObj.id }).then((res) => {
this.checkOrderList = res.data
let list = []; let list = [];
res.data.forEach((item) => { res.data.forEach((item) => {
item.orderItemList.forEach((oItem) => { item.orderItemList.forEach((oItem) => {
...@@ -301,6 +328,7 @@ export default { ...@@ -301,6 +328,7 @@ export default {
positionNo: oItem.positionNo, positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus, tallyStatus: item.tallyStatus,
tallyTime: item.tallyTime, tallyTime: item.tallyTime,
installNum: item.installNum,
}); });
}); });
}); });
...@@ -447,6 +475,16 @@ export default { ...@@ -447,6 +475,16 @@ export default {
}, },
// 理货完成 // 理货完成
tallyFinish() { tallyFinish() {
let flag = false
this.checkOrderList.forEach(item=>{
if(item.installNum != item.num){
flag = true
}
})
if(flag){
this.$message.error(this.$t("仍有订单未理货,请完成所有订单箱号标签扫码后完成理货"));
return;
}
tallyCommit({ shipmentId: this.shipmentObj.id }).then((res) => { tallyCommit({ shipmentId: this.shipmentObj.id }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit"); this.$emit("closeDialog", "submit");
...@@ -460,31 +498,155 @@ export default { ...@@ -460,31 +498,155 @@ export default {
this.showWarehouseInItemId = row.orderItemId; this.showWarehouseInItemId = row.orderItemId;
}); });
}, },
/** 表格订单号点击 */
orderClick(row) {
getOrderTagList({ orderId: row.orderId, type: 0 }).then((res) => {
const { data = {} } = res;
this.orderList = [];
// 取最长的list
let dataLength = data.loadList.length;
if (data.unLoadList.length > dataLength) {
dataLength = data.unLoadList.length;
}
// 组装数据,用一个table组件渲染
for (let index = 0; index < dataLength; index++) {
this.orderList.push({
loadTag: data.loadList[index],
unloadTag: data.unLoadList[index],
});
}
});
this.shwoDialog({
type: "orderTable",
title: row.selfNo,
});
},
/** 点击事件统一入口 */ /** 点击事件统一入口 */
handlerClick(type, title) { handlerClick(type, title) {
this.shwoDialog({ type, title }); this.shwoDialog({ type, title });
}, },
/** 弹窗事件 */ /** 弹窗事件 */
shwoDialog(config) { shwoDialog(config) {
this.$set(this.dialogConfig, "title", config.title); this.$set(this.checkDialogConfig, "title", config.title);
this.$set(this.dialogConfig, "type", config.type); this.$set(this.checkDialogConfig, "type", config.type);
switch (config.type) { switch (config.type) {
case "orderTable":
this.$set(this.checkDialogConfig, "fullscreen", false);
break;
case "batchInput": case "batchInput":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.checkDialogConfig, "fullscreen", false);
this.batchObj = { boxNum: 0 }; this.batchObj = { boxNum: 0 };
this.boxOrderInfo = {}; this.boxOrderInfo = {};
break; break;
case "correction": case "correction":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.checkDialogConfig, "fullscreen", false);
this.correctionObj = {}; this.correctionObj = {};
break; break;
case "correctionOrder": case "correctionOrder":
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.checkDialogConfig, "fullscreen", false);
this.orderObj = {}; this.orderObj = {};
break; break;
} }
this.$set(this.dialogConfig, "dialogVisible", true); this.$set(this.checkDialogConfig, "dialogVisible", true);
}, },
/** 关闭弹窗 */
closeDialog2() {
this.$set(this.checkDialogConfig, "dialogVisible", false);
},
/* 创建理货标签 */
handlerBatchCreate() {
if (!this.qrCode) {
this.$message.error(this.$t("请输入二维码/条码编号"));
return;
}
let params = {
shipmentId: this.shipmentObj.id,
type: 0,
};
params.orderNumCode = this.qrCode;
checkInfoSingleCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.qrCode = "";
this.getList();
});
});
},
queryOrderInfo() {
this.$refs["batchForm"].validate((valid) => {
if (valid) {
getOrderDetailByBoxNo({
orderNumCode: this.batchObj.qrCode,
shipmentId: this.shipmentObj.id,
}).then((res) => {
const { data } = res;
this.boxOrderInfo = data;
this.batchObj.boxNum = Number(data.num);
});
}
});
},
/**批量创建理货标签 */
batchLoad() {
if (!this.boxOrderInfo.orderId) {
this.$message.error(this.$t("请输入订单号"));
return;
}
if (this.batchObj.boxNum === 0) {
this.$message.error(this.$t("箱数不能为0"));
return;
}
let params = {
orderId: this.boxOrderInfo.orderId,
orderNo: this.boxOrderInfo.orderNo,
shipmentId: this.shipmentObj.id,
type: 0
};
checkInfoBatchCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog2();
this.boxOrderInfo = {};
this.getList();
});
});
},
/**理货纠错 */
delCheck() {
if (!this.correctionObj.qrCode) {
this.$message.error(this.$t("请输入二维码/条码编号"));
return;
}
let params = {
shipmentId: this.shipmentObj.id,
type: 0,
orderNumCode: this.correctionObj.qrCode
};
checkInfoSingleDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog2();
this.getList();
});
});
},
/**批量理货纠错 */
batchDelCheck() {
if (!this.orderObj.orderNo) {
this.$message.error(this.$t("请输入订单号"));
return;
}
let params = {
shipmentId: this.shipmentObj.id,
type: 0,
orderNo: this.orderObj.orderNo
};
checkInfoBatchDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog2();
this.getList();
});
});
}
}, },
computed: { computed: {
/* 获取仓库 */ /* 获取仓库 */
......
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