Commit 7d95c36b authored by dragondean@qq.com's avatar dragondean@qq.com
parents c52002e4 b2b82715
......@@ -186,6 +186,16 @@ export function getBillService(params) {
});
}
// 打包下载提货单
export function zipDownload(params) {
return request({
url: "/shipment/make-bill-of-lading/zipDownload",
responseType: "arraybuffer",
method: "get",
params,
});
}
/**
* formData数据
*
......
<template>
<el-row class="shipping-ladingBill">
<el-row class="oper-button">
<el-button type="primary">打包下载</el-button>
<el-button type="primary" @click="clickZipDownload">打包下载</el-button>
<el-button type="primary">应收汇总单</el-button>
<el-button type="primary">下载已装单</el-button>
</el-row>
......@@ -89,10 +89,12 @@ import {
makeBillService,
getBillService,
deleteBillService,
zipDownload,
} from "@/api/ecw/box";
import { getTotlContent, getCapacity } from "../shippingSea/utils";
import makeLadingBill from "./makeLadingBill.vue";
import previewBill from "./previewBill.vue";
import FileSaver from "file-saver";
export default {
name: "ladingBill",
......@@ -193,6 +195,12 @@ export default {
};
});
},
clickZipDownload() {
zipDownload({ shipmentId: this.shipmentObj.id }).then((res) => {
let blob = new Blob([res], { type: "application/zip" });
FileSaver.saveAs(blob, "打包文件.zip");
});
},
},
computed: {
/* 总计 */
......
<template>
<div>
<el-form ref="cDocForm" :model="cDocObj" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="出单方式">
<el-select v-model="cDocObj.cdOutBillType" placeholder="请选择出单方式">
<el-option v-for="item in method" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<template v-if="cDocObj.cdOutBillType === '1'">
<el-form-item label="电放时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdElectricTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="电放凭证附件">
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdElectricVoucher" :fileType="fileType" />
</el-form-item>
</template>
<template v-if="cDocObj.cdOutBillType === '2'">
<el-form-item label="寄送时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdSendTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="快递单号">
<el-input v-model="cDocObj.cdBillNo" placeholder="请输入快递单号"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="电放凭证附件">
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdElectricVoucher" :fileType="fileType" />
</el-form-item>
</template>
<el-form-item label="agent list">
<el-radio-group v-model="cDocObj.cdAgentlistType">
......
......@@ -30,7 +30,7 @@
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="订单号" align="center" prop="orderNo">
<template slot-scope="scope">
<a href="javascript:void(0);" class="order-href">{{ scope.row.orderNo }}</a>
{{ scope.row.orderNo }}
</template>
</el-table-column>
<el-table-column label="商品信息" align="center" prop="goodsList">
......@@ -49,6 +49,21 @@
</el-table-column>
<el-table-column label="体积" align="center" prop="volume" />
<el-table-column label="重量" align="center" prop="weight" />
<el-table-column label="订单状态" align="center" prop="">
<template slot-scope="scope">
{{getOrderError(scope.row, 'orderStatus')}}
</template>
</el-table-column>
<el-table-column label="异常状态" align="center" prop="">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{getOrderError(scope.row, 'errorStatus')}}</el-button>
</template>
</el-table-column>
<el-table-column label="异常类型" align="center" prop="">
<template slot-scope="scope">
{{getUnloadError(scope.row.exceptionList)}}
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="openError(scope.row)">异常</el-button>
......@@ -261,6 +276,32 @@ export default {
});
});
},
// 获取异常类型
getUnloadError(exceptionList) {
const codes = this.getDictDatas(this.DICT_TYPE.ORDER_ERROR_TYPE);
let errorLabels = [];
exceptionList.forEach((item) => {
const errObj = codes.find(
(cItem) => cItem.value === item.orderExceptionType
);
if (errObj) errorLabels.push(errObj.label);
});
return errorLabels.join(",");
},
// 订单异常
getOrderError(row, type) {
if (row.exceptionList && row.exceptionList.length) {
return type === "orderStatus" ? "卸柜异常" : "待处理";
}
return type === "orderStatus" ? "已到港" : "";
},
// 处理异常
handleError(row) {
this.$emit("closeStart", "close");
this.$router.push({
path: `/order/pending?id=${row.orderId}`,
});
},
},
computed: {
/* 是否审核中 */
......
......@@ -40,7 +40,9 @@ export default {
return {
// 异常对象
errorObj: {},
errorObj: {
productId: currRow.goodsList[0].orderItemId,
},
// 品名
goodsList: currRow.goodsList ?? [],
};
......
......@@ -100,6 +100,11 @@
<el-input v-model="form.name" placeholder="请输入菜单名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="英文名称" prop="enName">
<el-input v-model="form.enName" placeholder="请输入菜单英文名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="显示排序" prop="sort">
<el-input-number v-model="form.sort" controls-position="right" :min="0" />
......@@ -180,6 +185,9 @@ export default {
name: [
{ required: true, message: "菜单名称不能为空", trigger: "blur" }
],
enName: [
{ required: true, message: "菜单英文名称不能为空", trigger: "blur" }
],
sort: [
{ required: true, message: "菜单顺序不能为空", trigger: "blur" }
],
......@@ -246,6 +254,7 @@ export default {
id: undefined,
parentId: 0,
name: undefined,
enName: undefined,
icon: undefined,
isShowInMenuBar: undefined,
type: SystemMenuTypeEnum.DIR,
......
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