Commit 97ddd548 authored by zhengyi's avatar zhengyi

fix:订单已装柜,未提单制作,修改是否控货,提交时提示“提单已制作,如需修改请联系客服”

parent 19e13b70
...@@ -127,7 +127,7 @@ export function getCostList(params) { ...@@ -127,7 +127,7 @@ export function getCostList(params) {
}); });
} }
// 收款单表 SELECT * from ecw_payment // 收款单表 SELECT * from ecw_payment
// 应付款表 SELECT * from ecw_payable // 应付款表 SELECT * from ecw_payable
// 根据明细获取主表ID // 根据明细获取主表ID
export function getPaymentId(id) { export function getPaymentId(id) {
return request({ return request({
...@@ -214,6 +214,13 @@ export function deleteBillService(id) { ...@@ -214,6 +214,13 @@ export function deleteBillService(id) {
method: "delete", method: "delete",
}); });
} }
// 检查提单状态是否已制作提单
export function checkBillOfLadingService(orderId) {
return request({
url: "/shipment/make-bill-of-lading/check/billOfLading/" + orderId,
method: "post",
});
}
// 获得制作提货单 // 获得制作提货单
export function getBillService(params) { export function getBillService(params) {
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
</template> </template>
<script> <script>
import {parseTime} from '@/utils/ruoyi' import {parseTime} from '@/utils/ruoyi'
import {getLadingBill} from '@/api/ecw/order'
import lodop from '@/utils/lodop' import lodop from '@/utils/lodop'
import PdfViewer from '@/components/PdfViewer' import PdfViewer from '@/components/PdfViewer'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
...@@ -83,10 +82,10 @@ export default { ...@@ -83,10 +82,10 @@ export default {
this.show = false this.show = false
this.$emit('close'); this.$emit('close');
}, },
download(){ download(){
let blob = new Blob([this.pdfData], {type: "application/pdf"}) let blob = new Blob([this.pdfData], {type: "application/pdf"})
FileSaver.saveAs(blob, this.detail.imgUrl.split("/").pop()); FileSaver.saveAs(blob, this.detail.imgUrl.split("/").pop());
}, },
print(){ print(){
lodop().then(LODOP => { lodop().then(LODOP => {
...@@ -106,7 +105,7 @@ export default { ...@@ -106,7 +105,7 @@ export default {
} }
LODOP.PREVIEW(); LODOP.PREVIEW();
// LODOP.ADD_PRINT_PDF(0,0,"100%","100%",data); // LODOP.ADD_PRINT_PDF(0,0,"100%","100%",data);
// LODOP.PREVIEW(); // 预览 // LODOP.PREVIEW(); // 预览
/* LODOP.PRINTA(); // 选择打印机 /* LODOP.PRINTA(); // 选择打印机
// 直接打印 */ // 直接打印 */
...@@ -114,8 +113,8 @@ export default { ...@@ -114,8 +113,8 @@ export default {
console.error('lodop异常', err) console.error('lodop异常', err)
// alert('请检查LODOP打印控件是否安装并启动'); // alert('请检查LODOP打印控件是否安装并启动');
}) })
} }
} }
} }
...@@ -149,4 +148,4 @@ export default { ...@@ -149,4 +148,4 @@ export default {
.checkbox{text-align: center;} .checkbox{text-align: center;}
.checkbox input{text-decoration: none;padding:10px 15px;background:#ccc;border-radius: 5px; cursor: pointer;margin-bottom: 15px;font-size: 16px;margin:0 2px;} .checkbox input{text-decoration: none;padding:10px 15px;background:#ccc;border-radius: 5px; cursor: pointer;margin-bottom: 15px;font-size: 16px;margin:0 2px;}
</style> </style>
\ No newline at end of file
...@@ -770,6 +770,7 @@ import {getCustomer} from "@/api/ecw/customer"; ...@@ -770,6 +770,7 @@ import {getCustomer} from "@/api/ecw/customer";
import {debounce} from "@/utils"; import {debounce} from "@/utils";
import {getOfferSelect, getOfferCheck} from "@/api/ecw/offer" import {getOfferSelect, getOfferCheck} from "@/api/ecw/offer"
import Template from '@/views/cms/template/index.vue' import Template from '@/views/cms/template/index.vue'
import {checkBillOfLadingService} from "@/api/ecw/box";
// 缓存默认的表单数据 // 缓存默认的表单数据
let makeDefaultFormData = () => { let makeDefaultFormData = () => {
...@@ -1699,6 +1700,12 @@ export default { ...@@ -1699,6 +1700,12 @@ export default {
}); });
} }
}, },
checkBillOfLading(){
return checkBillOfLadingService(this.form.orderId).then((res) => {
console.log("检查提单制作状态" , res.data)
return res.data
})
},
/** 提交按钮 */ /** 提交按钮 */
// type 在新建的时候表示状态,0草稿,2带入仓 // type 在新建的时候表示状态,0草稿,2带入仓
submitForm(submitType) { submitForm(submitType) {
...@@ -1778,7 +1785,7 @@ export default { ...@@ -1778,7 +1785,7 @@ export default {
// 修改的提交 // 修改的提交
if (this.form.orderId) { if (this.form.orderId) {
if (this.form.tidanNo) { if (await this.checkBillOfLading()) {
await this.$confirm(this.$t('提单已制作,如需修改请联系客服')) await this.$confirm(this.$t('提单已制作,如需修改请联系客服'))
} }
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
......
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