Commit 2d5abdf1 authored by houjn@hikoon.cn's avatar houjn@hikoon.cn

Merge remote-tracking branch 'origin/dev' into dev

parents ceb11a90 180a7488
......@@ -536,12 +536,27 @@ export function deleteGoods(id) {
*/
export function createGoods(data) {
return request({
url: "/ecw/box-preload-goods/create",
url: "/ecw/box-preload-goods/v2/create",
method: "post",
data,
});
}
/**
* 获得订单所有关联列表
*
* @export
* @param {*} params
* @return {*}
*/
export function getAllRelateOrderList(params) {
return request({
url: "/order/guanlian/getAllRelateOrderList",
method: "get",
params,
});
}
/**
* 预装关联订单
*
......
......@@ -50,6 +50,7 @@ import html2canvas from 'html2canvas';
import { jsPDF } from "jspdf";
import {uploadFile} from '@/api/infra/file'
import FileSaver from 'file-saver'
import {getOrder, getOrderDetail} from "@/api/ecw/order";
window.html2canvas = html2canvas
export default {
name: "makeLadingBill",
......@@ -175,7 +176,13 @@ export default {
showLoaingTemplate() {
this.visible = true;
},
// 先获取订单信息,pdf用 订单号+唛头命名
createPdf(){
getOrder(this.currRow.orderId).then(res => {
this.afterCreatePdf(res.data)
})
},
afterCreatePdf(orderData){
let loading = this.$loading()
html2canvas(document.querySelector("#html2canvas-container"), {dpi:144, useCORS: true}).then(canvas => {
const doc = new jsPDF('p','pt','a4',true);
......@@ -194,13 +201,13 @@ export default {
/* doc.save("a4.pdf");
return Promise.reject() */
let form = new FormData()
let file = this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
let file = this.currRow.orderNo + '-' + orderData.marks + '.pdf' //this.selfNo + '-' + this.currRow.tidanNo + '.pdf'
form.append('file', new File([doc.output('arraybuffer')], file, {type: 'application/pdf'}))
form.append('path', `admin/shipment/${this.selfNo}/pdf/${file}`) // 最前面不能有/,否则返回的url会有两个/
/* let blob = new Blob([doc.output('arraybuffer')], {type: "application/pdf"})
FileSaver.saveAs(blob, file);
FileSaver.saveAs(blob, file);
return */
return uploadFile(form)
}).then(res => {
......
......@@ -319,9 +319,15 @@
</el-row>
<!-- 关联订单弹窗 -->
<el-dialog :title="relationOrderListDialog.title" :visible.sync="relationOrderListDialog.visible" width="30%" append-to-body>
<el-row v-for="(item,index) in relationOrderListDialog.data" :key="item.id">
{{index+1}}. {{item.orderNo}}
</el-row>
<el-tree
:data="relationOrderListDialog.data"
node-key="id"
default-expand-all
:expand-on-click-node="false">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ data.order.orderNo }}</span>
</span>
</el-tree>
<el-row style="margin-top: 10px;text-align: center;">
<el-button type="primary" @click="relationOrderListDialog.visible = false">{{$t('关闭窗口')}}</el-button>
</el-row>
......@@ -343,6 +349,7 @@ import {
approvalCreate,
approvalCancel,
loadRelationOrder,
getAllRelateOrderList
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import {
......@@ -516,10 +523,12 @@ export default {
},
/**查看关联订单 */
getRelationOrder(item) {
console.log(item)
this.relationOrderListDialog.title = item.orderNo+'关联订单'
this.relationOrderListDialog.visible = true
this.relationOrderListDialog.data = item.relateOrderList
getAllRelateOrderList({orderId:item.orderId,orderNo:item.orderNo}).then(res=>{
this.relationOrderListDialog.title = item.orderNo+'关联订单'
this.relationOrderListDialog.visible = true
this.relationOrderListDialog.data = [res.data]
})
},
/** 搜索按钮操作 */
handleQuery(type) {
......
......@@ -57,6 +57,13 @@
<el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
......
......@@ -85,6 +85,13 @@
<el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<!-- <el-button icon="el-icon-refresh" @click="reset">{{ $t('重置') }}</el-button> -->
......
......@@ -105,7 +105,13 @@
<dict-selector :type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE" v-model="queryParams.auditType"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......
......@@ -391,6 +391,12 @@ export default {
});
},
},
// 关闭放入弹层的时候清理弹层表单内容
shopOpen(show){
if(!show){
this.shopForm = {}
}
}
},
computed:{
getDictData(){
......
......@@ -8,14 +8,14 @@
<div class="title">{{$t('新增订单生成成功')}}</div>
<div class="line">{{$t('订单号')}}{{order.orderNo}}</div>
<div class="line">{{$t('运输方式')}}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" /></div>
<div class="line">{{$t('路线')}}{{order.logisticsInfoDto.startTitleZh}} >> {{order.logisticsInfoDto.destTitleZh}}</div>
<div class="line">{{$t('路线')}}{{$l(order.logisticsInfoDto, 'startTitle')}} >> {{$l(order.logisticsInfoDto, 'destTitle')}}</div>
<div class="line">{{$t('商品列表')}}
<span v-for="(item, index) in order.orderItemVOList" :key="index">
{{item.prodTitleZh}}
{{$l(item, 'prodTitle')}}
<template v-if="index < order.orderItemVOList.length - 1">{{ $t('') }}</template>
</span>
</div>
<div class="line">{{$t('仓库地址')}}:{{order.logisticsInfoDto.startAddressZh}}</div>
<div class="line">{{$t('仓库地址')}}:{{$l(order.logisticsInfoDto, 'startAddress')}}</div>
<div class="line">{{$t('仓库电话')}}: {{order.logisticsInfoDto.startTell}}</div>
<!-- v1.7新增 -->
<div class="line">{{$t('为保证入仓数据准确性,入仓请带上一份装箱单(品名,件数,毛重,尺寸方数,是否有牌)')}}</div>
......@@ -94,4 +94,4 @@ export default {
display: flex;
justify-content: center;
}
</style>
\ No newline at end of file
</style>
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