Commit 68b7bb0e authored by huhaiqing's avatar huhaiqing

修复海运操作缺陷单

parent 234ccbc1
......@@ -275,7 +275,6 @@ export function downloadSoncapFiles(params) {
export function downloadCustomFiles(params) {
return request({
url: "/ecw/box-preload-goods/downloadCustomFiles",
responseType: "arraybuffer",
method: "get",
params,
});
......
......@@ -701,6 +701,21 @@ export function batchUnload(data) {
});
}
/**
* 单个卸柜
*
* @export
* @param {*} data
* @return {*}
*/
export function singleUnload(data) {
return request({
url: "/ecw/box-load-info/singleUnload",
method: "post",
data,
});
}
/**
* 一键卸柜
*
......
......@@ -182,15 +182,15 @@
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="100px">
<el-row>
<el-form-item label="中文品名:" prop="prodTitleZh">
<el-select v-model="shopForm.prodTitleZh" placeholder="请选择中文品名" @change="changeProdTitleZh">
<el-option v-for="item in orderItems" :label="item.prodTitleZh" :value="item.prodTitleZh" :key="item.prodTitleZh"></el-option>
<el-select v-model="shopForm.zhId" placeholder="请选择中文品名" @change="changeProdTitleZh">
<el-option v-for="item in orderItems" :label="item.prodTitleZh" :value="iitem.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="英文品名:" prop="prodTitleEn">
<el-select v-model="shopForm.prodTitleEn" placeholder="请选择英文品名" @change="changeProdTitleEn">
<el-option v-for="item in orderItems" :label="item.prodTitleEn" :value="item.prodTitleEn" :key="item.prodTitleEn"></el-option>
<el-select v-model="shopForm.enId" placeholder="请选择英文品名" @change="changeProdTitleEn">
<el-option v-for="item in orderItems" :label="item.prodTitleEn" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="剩余箱数:">
......@@ -342,6 +342,7 @@ export default {
const { orderSplitBackVOList } = res.data;
if (orderSplitBackVOList && orderSplitBackVOList.length) {
this.orderItems = this.currRow.goodsList ?? [];
console.log(this.orderItems)
// 取拆单项
this.splitData = orderSplitBackVOList.filter(
(item) => !item.isMaster
......@@ -385,11 +386,11 @@ export default {
leviteSum,
column.warehouseInInfoVO?.cartonsNum ?? 0
).toNumber();
leviteV += Decimal.add(
leviteV = Decimal.add(
leviteV,
column.warehouseInInfoVO?.volume ?? 0
).toFixed(2);
leviteW += Decimal.add(
leviteW = Decimal.add(
leviteW,
column.warehouseInInfoVO?.weight ?? 0
).toFixed(2);
......@@ -440,7 +441,7 @@ export default {
changeProdTitleZh() {
let list = [];
list = this.currRow.goodsList.filter(
(item) => item.prodTitleZh == this.shopForm.prodTitleZh
(item) => item.id == this.shopForm.zhId
);
this.shopForm.sum =
this.currRow.num - this.currRow.installNum - this.totalSplitNum();
......@@ -450,7 +451,7 @@ export default {
changeProdTitleEn() {
let list = [];
list = this.orderData.orderItemVOList.filter(
(item) => item.prodTitleEn == this.shopForm.prodTitleEn
(item) => item.id == this.shopForm.enId
);
this.shopForm.sum =
this.currRow.num - this.currRow.installNum - this.totalSplitNum();
......
......@@ -159,7 +159,7 @@ import {
formatDateStr,
serviceMsg,
toReviewDetail,
downloadFile,
downloadFileByUrl,
} from "../utils";
import ImageUpload from "@/components/ImageUpload";
import Decimal from "decimal.js";
......@@ -477,12 +477,7 @@ export default {
},
/* 下载报关单 */
downloadCusFile() {
downloadFile(
"downloadCustomFiles",
{ shipmentId: this.shipmentObj.id },
`报关单(${this.shipmentObj.selfNo}).xlsx`,
"xlsx"
);
downloadFileByUrl('downloadCustomFiles', { shipmentId: this.shipmentObj.id });
},
},
watch: {
......
......@@ -5,8 +5,9 @@
<el-row class="number-area">
<p class="label-font">自编号:</p>
<p class="label-font">{{selfNo}}</p>
<el-input v-model="labelNo" placeholder="请输入标签号"></el-input>
<el-input v-model="labelNo" placeholder="请输入"></el-input>
<div>
<el-button type="primary" @click="modifyUnload">提交</el-button>
<el-button type="primary" @click="modifyBatchUnload">批量输入</el-button>
<el-button type="primary" @click="modifyAllUnload">一键卸柜</el-button>
</div>
......@@ -122,6 +123,7 @@ import {
approvalCreate,
approvalCancel,
getSectionList,
singleUnload,
} from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils";
import WorkFlow from "@/components/WorkFlow";
......@@ -190,14 +192,30 @@ export default {
this.loading = false;
});
},
/* 单个卸柜 */
modifyUnload() {
if (!this.labelNo) {
this.$message.error("请输入箱号标签");
return;
}
singleUnload({
orderNumCode: this.labelNo,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then((res) => {
this.labelNo = "";
this.getLoadGoodsList();
});
});
},
/* 批量输入 */
modifyBatchUnload() {
if (!this.labelNo) {
this.$message.error("请输入标签");
this.$message.error("请输入订单");
return;
}
batchUnload({
orderNumCode: this.labelNo,
orderNo: this.labelNo,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then((res) => {
......
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