Commit 604e4dd0 authored by dragondean@qq.com's avatar dragondean@qq.com

解决order.js冲突

parents 6006e588 7179b8c3
import request from '@/utils/request'
import request from "@/utils/request";
// 创建出货
export function createbox(data) {
return request({
url: '/shipment/box/create',
method: 'post',
data: data
})
url: "/shipment/box/create",
method: "post",
data: data,
});
}
// 更新出货
export function updatebox(data) {
return request({
url: '/shipment/box/update',
method: 'put',
data: data
})
url: "/shipment/box/update",
method: "put",
data: data,
});
}
// 删除出货
export function deletebox(id) {
return request({
url: '/shipment/box/delete?id=' + id,
method: 'delete'
})
url: "/shipment/box/delete?id=" + id,
method: "delete",
});
}
// 获得出货
export function getbox(id) {
return request({
url: '/shipment/box/get?id=' + id,
method: 'get'
})
url: "/shipment/box/get?id=" + id,
method: "get",
});
}
// 获得出货分页
export function getboxPage(query) {
return request({
url: '/shipment/box/page',
method: 'get',
params: query
})
url: "/shipment/box/page",
method: "get",
params: query,
});
}
// 导出出货 Excel
export function exportboxExcel(query) {
return request({
url: '/shipment/box/export-excel',
method: 'get',
url: "/shipment/box/export-excel",
method: "get",
params: query,
responseType: 'blob'
})
responseType: "blob",
});
}
// 创建费用登记
......@@ -64,10 +64,10 @@ export function createCost(data) {
}
return request({
url: '/ecw/box-cost/create',
method: 'post',
data
})
url: "/ecw/box-cost/create",
method: "post",
data,
});
}
// 删除费用登记
......@@ -75,44 +75,115 @@ export function deleteCost(id) {
return request({
url: `/ecw/box-cost/delete?id=${id}`,
method: "delete",
})
});
}
// 审核详情
export function approvalDetail(data) {
return request({
url: '/ecw/box-approval/approvalDetail',
method: 'post',
url: "/ecw/box-approval/approvalDetail",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
})
});
}
// 出货操作日志列表
export function getLogList(params) {
return request({
url: '/ecw/box-op-log/list',
method: 'get',
params
})
url: "/ecw/box-op-log/list",
method: "get",
params,
});
}
// 获得费用登记列表
export function getCostList(params) {
return request({
url: '/ecw/box-cost/list',
method: 'get',
params
})
url: "/ecw/box-cost/list",
method: "get",
params,
});
}
// 获得出货异常记录列表
export function getAbnormalList(params) {
return request({
url: '/ecw/box-abnormal/list',
method: 'get',
params
})
url: "/ecw/box-abnormal/list",
method: "get",
params,
});
}
// 获得制作提货单列表
export function getMakeBillList(params) {
return request({
url: "/shipment/make-bill-of-lading/getMakeLadingBillList",
method: "get",
params,
});
}
// 制作提货单
export function makeBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/make",
method: "get",
params,
});
}
// 创建制作提货单
export function createBillService(data) {
return request({
url: "/shipment/make-bill-of-lading/create",
method: "post",
data,
});
}
// 取消制作提货单审核
export function cancelBillService(id) {
return request({
url: `/shipment/make-bill-of-lading/cancel?id=${id}`,
method: "delete",
});
}
// 下载提货单
export function downloadBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/download",
responseType: "arraybuffer",
method: "get",
params,
});
}
// 更新制作提货单
export function updateBillService(data) {
return request({
url: "/shipment/make-bill-of-lading/update",
method: "put",
data,
});
}
// 删除制作提货单
export function deleteBillService(id) {
return request({
url: `/shipment/make-bill-of-lading/delete?id=${id}`,
method: "delete",
});
}
// 获得制作提货单
export function getBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/get",
method: "get",
params,
});
}
/**
......
......@@ -197,6 +197,15 @@ export function rollbackApply(data){
})
}
// 退仓-订单项退仓(不审批)
export function rollbackDelete(data){
return request({
url: '/order/order-warehouse-in/rollback-order-item',
method: 'put',
data
})
}
//取消订单
export function cancelOrder(orderId){
return request({
......
......@@ -67,6 +67,10 @@ export default {
cityId: {
type: Number,
default: undefined
},
warehouseId: {
type: Number,
default: undefined
}
},
......@@ -87,7 +91,7 @@ export default {
if (val) {
this.opened = true
getByWarehouseId({cityId: this.cityId}).then(r => {
getByWarehouseId({cityId: this.cityId,warehouseId: this.warehouseId }).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
......
......@@ -297,7 +297,7 @@ export const constantRoutes = [
meta: {title: '订单特价申请', icon: '', activeMenu: '/order/index'}
},
{
path: 'discount/:offerProdId(\\d+)',
path: 'discount/:orderItemId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/discount'),
props: true,
name: 'discount',
......
......@@ -141,10 +141,10 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" @pagination="getList" @current-change="pageChange" />
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.open" :width="dialogCfg.width" append-to-body class="shippingSea-dialog">
<el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.open" :width="dialogCfg.width" :fullscreen="dialogCfg.fullscreen" append-to-body class="shippingSea-dialog">
<template v-if="dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'">
<editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template>
......@@ -155,7 +155,7 @@
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
</template>
</el-dialog>
</div>
......@@ -169,7 +169,7 @@ import { getListTree } from "@/api/ecw/region";
import costForm from "./costForm.vue";
import regError from "./regError.vue";
import editForm from "./editForm.vue";
import ladingBill from "./ladingBill.vue";
import ladingBill from "./ladingBill/index.vue";
export default {
name: "indexSea",
......@@ -207,13 +207,14 @@ export default {
width: "600px",
// 是否显示弹出层
open: false,
fullscreen: false,
},
// 当前行
currRow: {},
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
page: 1,
pageSize: 10,
},
cabinetList: [],
......@@ -279,7 +280,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
......@@ -290,20 +291,21 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.$set(this.dialogCfg, "open", true);
this.$set(this.dialogCfg, "title", "添加出货");
this.$set(this.dialogCfg, "dialogType", "add");
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "fullscreen", false);
this.$set(this.dialogCfg, "open", true);
},
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id;
getbox(id).then((response) => {
this.currRow = response.data;
this.$set(this.dialogCfg, "open", true);
this.$set(this.dialogCfg, "title", "修改出货");
this.$set(this.dialogCfg, "dialogType", "edit");
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true);
});
},
/** 删除按钮操作 */
......@@ -323,7 +325,7 @@ export default {
handleExport() {
// 处理查询参数
let params = { ...this.queryParams };
params.pageNo = undefined;
params.page = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行导出
......@@ -348,6 +350,8 @@ export default {
},
/** 查看按钮操作 */
handleCommand(row, command) {
this.$set(this.dialogCfg, "fullscreen", false);
switch (command) {
case "sea":
this.$router.push("/boxSea/shippingSea/" + row.id);
......@@ -357,41 +361,44 @@ export default {
this.handleUpdate(row);
break;
case "delete":
this.handleDelete(row);
break;
case "detail":
this.$router.push("/boxSea/query/" + row.id);
break;
case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = `查看提单 ${row.selfNo} 柜号:${row.cubNo} 柜型:${cabinetLabel}`;
this.$set(this.dialogCfg, "open", true);
const title = `查看提单 ${row.selfNo ?? ""} 柜号:${
row.cubNo ?? ""
} 柜型:${cabinetLabel}`;
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "dialogType", "editLadingBill");
this.$set(this.dialogCfg, "width", "60%");
this.currRow = row;
break;
case "delete":
this.handleDelete(row);
this.$set(this.dialogCfg, "fullscreen", true);
break;
case "cost":
this.$set(this.dialogCfg, "open", true);
this.$set(this.dialogCfg, "title", "费用登记");
this.$set(this.dialogCfg, "dialogType", "cost");
this.$set(this.dialogCfg, "width", "600px");
this.currRow = row;
break;
case "error":
this.$set(this.dialogCfg, "open", true);
this.$set(this.dialogCfg, "title", "异常登记");
this.$set(this.dialogCfg, "dialogType", "error");
this.$set(this.dialogCfg, "width", "600px");
this.currRow = row;
break;
}
case "detail":
this.$router.push("/boxSea/query/" + row.id);
break;
if (["editLadingBill", "cost", "error"].includes(command)) {
this.currRow = row;
this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true);
}
},
/* 分页 */
pageChange(page) {
this.pageParam.page = page;
this.getList();
},
},
};
</script>
<template>
</template>
<script>
export default {
name: "ladingBill",
};
</script>
<style lang="scss" scoped>
</style>
<template>
<el-row class="shipping-ladingBill">
<el-row class="oper-button">
<el-button type="primary">打包下载</el-button>
<el-button type="primary">应收汇总单</el-button>
<el-button type="primary">下载已装单</el-button>
</el-row>
<el-row style="margin-top:15px">
<el-table :data="billData.list" border max-height="500px">
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="货物信息" align="center" prop="">
<template slot-scope="scope">
<section class="table-goodList">
<div v-for="(item, index) in scope.row.orderItemList" :key="index" class="goodList-div">
<p>品名:{{item.prodTitleZh}}</p>
<p>品牌:【
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
</p>
<p>其他:{{getTotlContent(item)}}</p>
</div>
</section>
</template>
</el-table-column>
<el-table-column label="控货" align="center" prop="">
<template slot-scope="scope">
{{scope.row.isCargoControl}}
</template>
</el-table-column>
<el-table-column label="计划箱数" align="center" prop="loadNum">
<template slot-scope="scope">
{{ scope.row.loadNum }}
</template>
</el-table-column>
<el-table-column label="实装箱数" align="center" prop="num">
<template slot-scope="scope">
{{ scope.row.num }}
</template>
</el-table-column>
<el-table-column label="提货点" align="center" prop="destWarehouse" />
<el-table-column label="体积" align="center" prop="loadVolume">
<template slot-scope="scope">
{{ scope.row.loadVolume }}
</template>
</el-table-column>
<el-table-column label="重量" align="center" prop="loadWeight">
<template slot-scope="scope">
{{ scope.row.loadWeight }}kg
</template>
</el-table-column>
<el-table-column label="跟进客服" align="center" prop="" />
<el-table-column label="制作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- 0 (未制作提货单) 1(审核中) 2(审核通过) 3(审核拒绝) -->
<el-button v-if="scope.row.status === 0" type="text" size="small" @click="handleCommand('makeBill',scope.row)">提单制作</el-button>
<el-button v-if="scope.row.status === 1" type="text" size="small" @click="handleCommand('queryBill',scope.row)">审核中</el-button>
<template v-if="scope.row.status === 2">
<el-button type="text" size="small" @click="handleCommand('previewBill',scope.row)" style="color:green">已审核通过</el-button>
<el-button type="text" size="small" @click="handleCommand('queryBill',scope.row)">重新制作</el-button>
<el-button type="text" size="small" @click="handleCommand('resetBill',scope.row)" style="color:#333333">重置</el-button>
</template>
<template v-if="scope.row.status === 3">
审核拒绝
</template>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row>
<el-col class="totle-info">
<div>总计:{{getSumData}}</div>
<div>容量:{{calcCapacity}}</div>
</el-col>
</el-row>
<el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.visible" :width="dialogCfg.width" :fullscreen="dialogCfg.fullscreen" append-to-body class="shippingSea-dialog">
<makeLadingBill v-if="['makeBill','queryBill','resetBill'].includes(dialogCfg.type)" :currData="currData" :currRow="currRow" :dialogCfg="dialogCfg" @closeDialog="closeDialog" />
<previewBill v-if="dialogCfg.type === 'previewBill'" :contentHtml="currData.billContent" :currRow="currRow" :type="dialogCfg.type" />
</el-dialog>
</el-row>
</template>
<script>
import {
getMakeBillList,
makeBillService,
getBillService,
deleteBillService,
} from "@/api/ecw/box";
import { getTotlContent, getCapacity } from "../shippingSea/utils";
import makeLadingBill from "./makeLadingBill.vue";
import previewBill from "./previewBill.vue";
export default {
name: "ladingBill",
components: { makeLadingBill, previewBill },
props: {
shipmentObj: Object,
getCabinetName: Function,
},
data() {
return {
billData: {
list: [],
},
// 提货单数据
currData: {},
// 当前行
currRow: {},
// 弹出类型
dialogCfg: {
title: "",
type: "",
width: "80%",
// 是否显示弹出层
visible: false,
fullscreen: false,
},
// 模板内容
billContent: "",
};
},
created() {
this.getBillList();
this.buildTitle();
},
methods: {
getTotlContent,
getBillList() {
getMakeBillList({ shipmentId: this.shipmentObj.id }).then((res) => {
this.billData = res.data;
});
},
buildTitle() {
const cabinetLabel = this.getCabinetName(this.shipmentObj.cabinetId);
const title = `查看提单 ${this.shipmentObj.selfNo ?? ""} 柜号:${
this.shipmentObj.cubNo ?? ""
} 柜型:${cabinetLabel}`;
this.$set(this.dialogCfg, "title", title);
},
closeDialog(type) {
this.$set(this.dialogCfg, "visible", false);
if (type === "query") {
this.getBillList();
}
},
handleCommand(type, row) {
switch (type) {
case "previewBill":
this.getBill(row);
break;
case "makeBill":
this.makeBill(row);
break;
case "queryBill":
this.getBill(row);
break;
case "resetBill":
// 先删除,在创建
deleteBillService(row.id).then((res) => {
const { code } = res;
if (code === 0) {
this.makeBill(row);
}
});
break;
}
this.currRow = row;
this.$set(this.dialogCfg, "type", type);
this.$set(this.dialogCfg, "visible", true);
},
makeBill(row) {
makeBillService({ orderId: row.orderId }).then((res) => {
const { data } = res;
const { titleZh = "", contentZh = "" } = data?.ladingTemplate ?? {};
let billContent = `${titleZh}${contentZh}`,
orderNo = data.orderInfo?.orderNo ?? "";
this.currData = {
billContent,
orderNo,
};
});
},
getBill(row) {
getBillService({ id: row.id }).then((res) => {
const { data } = res;
this.currData = {
billContent: data?.billContent ?? "",
orderNo: this.currRow.orderNo,
};
});
},
},
computed: {
/* 总计 */
getSumData() {
return `${this.billData.totalNum ?? 0} ${
this.billData.totalVolume ?? 0
}m³ ${this.billData.totalVolume ?? 0}kg`;
},
/* 容量 */
calcCapacity() {
const { cabinet } = this.billData;
return getCapacity(cabinet);
},
},
};
</script>
<style lang="scss" scoped>
.shipping-ladingBill {
.oper-button {
text-align: right;
}
.table-goodList {
p {
margin: 0;
}
.goodList-div {
border-bottom: 1px solid #e6ebf5;
> p {
text-align: left;
}
> p:last-child {
> span {
margin-right: 5px;
}
}
}
> div:last-child {
border-bottom: none;
}
}
.totle-info {
font-size: 20px;
margin-top: 15px;
}
}
</style>
<template>
<el-row class="shipping-makeLadingBill">
<el-row>
<div class="title-orderNo">订单号:{{orderNo}}</div>
</el-row>
<vue-ueditor-wrap v-model="billContent" :config="editorConfig" editor-id="billUeditor" />
<!-- 审核流程 -->
<el-row class="process-area">
<div class="process">
<div>审批流程</div>
<work-flow xmlkey="bill_lading" v-model="selectedUsers"></work-flow>
</div>
<div v-if="currRow.status === 1">
<el-button type="primary" disabled>审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="showLoaingTemplate">提单预览</el-button>
</div>
<div v-if="currRow.status !== 1">
<el-button type="primary" @click="submit">提交审核</el-button>
<el-button type="primary" @click="showLoaingTemplate">提单预览</el-button>
</div>
</el-row>
<el-dialog :title="dialogCfg.title" :visible.sync="visible" width="80%" append-to-body class="shippingSea-dialog">
<previewBill v-if="visible" :contentHtml="billContent" :currRow="currRow" :type="dialogCfg.type" />
</el-dialog>
</el-row>
</template>
<script>
import VueUeditorWrap from "vue-ueditor-wrap";
import WorkFlow from "@/components/WorkFlow";
import {
createBillService,
updateBillService,
cancelBillService,
} from "@/api/ecw/box";
import { serviceMsg } from "../shippingSea/utils";
import previewBill from "./previewBill.vue";
import { getToken } from "@/utils/auth";
export default {
name: "makeLadingBill",
components: {
VueUeditorWrap,
WorkFlow,
previewBill,
},
props: {
currData: Object,
currRow: Object,
dialogCfg: Object,
},
data() {
return {
orderNo: "",
billContent: "",
editorConfig: {
UEDITOR_HOME_URL: "/static/plugins/ueditor/",
autoHeightEnabled: false,
initialFrameHeight: 500,
initialFrameWidth: "100%",
zIndex: 9999,
toolbars: [
[
"anchor", //锚点
"undo", //撤销
"redo", //重做
"bold", //加粗
"indent", //首行缩进
"snapscreen", //截图
"italic", //斜体
"underline", //下划线
"strikethrough", //删除线
"subscript", //下标
"fontborder", //字符边框
"superscript", //上标
"formatmatch", //格式刷
"source", //源代码
"blockquote", //引用
"pasteplain", //纯文本粘贴模式
"selectall", //全选
"preview", //预览
"horizontal", //分隔线
"removeformat", //清除格式
"time", //时间
"date", //日期
"unlink", //取消链接
"insertrow", //前插入行
"insertcol", //前插入列
"mergeright", //右合并单元格
"mergedown", //下合并单元格
"deleterow", //删除行
"deletecol", //删除列
"splittorows", //拆分成行
"splittocols", //拆分成列
"splittocells", //完全拆分单元格
"deletecaption", //删除表格标题
"inserttitle", //插入标题
"mergecells", //合并多个单元格
"deletetable", //删除表格
"cleardoc", //清空文档
"insertparagraphbeforetable", //"表格前插入行"
"insertcode", //代码语言
"fontfamily", //字体
"fontsize", //字号
"paragraph", //段落格式
"simpleupload", //单图上传
"insertimage", //多图上传
"edittable", //表格属性
"edittd", //单元格属性
"link", //超链接
"emotion", //表情
"spechars", //特殊字符
"searchreplace", //查询替换
"insertvideo", //视频
"justifyleft", //居左对齐
"justifyright", //居右对齐
"justifycenter", //居中对齐
"justifyjustify", //两端对齐
"forecolor", //字体颜色
"backcolor", //背景色
"insertorderedlist", //有序列表
"insertunorderedlist", //无序列表
"fullscreen", //全屏
"directionalityltr", //从左向右输入
"directionalityrtl", //从右向左输入
"rowspacingtop", //段前距
"rowspacingbottom", //段后距
"pagebreak", //分页
"insertframe", //插入Iframe
"imagenone", //默认
"imageleft", //左浮动
"imageright", //右浮动
"attachment", //附件
"imagecenter", //居中
"wordimage", //图片转存
"lineheight", //行间距
"edittip ", //编辑提示
"customstyle", //自定义标题
"autotypeset", //自动排版
"touppercase", //字母大写
"tolowercase", //字母小写
"background", //背景
"scrawl", //涂鸦
"music", //音乐
"inserttable", //插入表格
"drafts", // 从草稿箱加载
"charts", // 图表
],
],
serverUrl:
process.env.VUE_APP_BASE_API +
"/admin-api/infra/file/editor?api_token=" +
getToken().replace("Bearer ", ""),
},
visible: false,
selectedUsers: [],
};
},
methods: {
showLoaingTemplate() {
this.visible = true;
},
submit() {
let params = {
billContent: this.billContent,
orderId: this.currRow.orderId,
copyUserId: this.selectedUsers,
};
if (['makeBill','resetBill'].includes(this.dialogCfg.type)) {
createBillService({ ...params, status: 1 }).then((res) => {
serviceMsg(res, this).then((res) => {
this.close("query");
});
});
} else {
updateBillService({
...params,
id: this.currRow.id,
status: 1,
}).then((res) => {
serviceMsg(res, this).then((res) => {
this.close("query");
});
});
}
},
/* 取消审核 */
canclAudit() {
cancelBillService(this.currRow.id).then((res) => {
serviceMsg(res, this).then(() => {
this.close("query");
});
});
},
close(type) {
this.$emit("closeDialog", type);
},
},
watch: {
currData: {
immediate: true,
handler(val) {
this.billContent = val?.billContent ?? "";
this.orderNo = val.orderNo;
},
},
},
};
</script>
<style lang="scss" scoped>
.shipping-makeLadingBill {
.title-orderNo {
text-align: center;
font-size: 28px;
font-weight: normal;
margin-bottom: 10px;
}
.process-area {
margin-top: 15px;
.process {
display: flex;
flex-direction: column;
> :first-child {
color: #606266;
font-weight: bolder;
font-size: 16px;
}
}
> :last-child {
text-align: center;
}
}
}
</style>
<template>
<el-row>
<div v-html="contentHtml"></div>
<el-row v-if="currRow.status === 2 && type === 'previewBill'" style="text-align: center;">
<el-button type="primary" @click="download">下载</el-button>
<el-button type="primary" @click="print">打印</el-button>
</el-row>
</el-row>
</template>
<script>
import { downloadBillService } from "@/api/ecw/box";
import lodop from "@/utils/lodop";
import FileSaver from "file-saver";
export default {
name: "previewBill",
props: {
contentHtml: String,
currRow: Object,
type: String,
},
methods: {
download() {
downloadBillService({ id: this.currRow.id }).then((res) => {
let blob = new Blob([res], { type: "application/pdf" });
FileSaver.saveAs(blob, this.currRow.orderNo + ".pdf");
});
},
print() {
lodop()
.then((LODOP) => {
LODOP.PRINT_INIT();
LODOP.SET_PRINT_STYLE("FontSize", 18);
LODOP.SET_PRINT_STYLE("Bold", 1);
// LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容");
// var stylePrint = "<style>table th,td{padding:0;margin:0;border:1px solid #000000;border-collapse:collapse;}</style>"
var htmlContent =
"<body>" + document.getElementById("print").innerHTML + "</body>";
LODOP.ADD_PRINT_HTM(
"6mm",
"6mm",
"RightMargin:6mm",
"BottomMargin:6mm",
htmlContent
);
LODOP.PRINT();
})
.catch((err) => {
console.error("lodop异常", err);
alert("请检查LODOP打印控件是否安装并启动");
});
},
},
watch: {
contentHtml(val) {
console.log(val);
},
},
};
</script>
<style lang="scss" scoped>
</style>
......@@ -61,8 +61,8 @@
</el-table-column>
<el-table-column label="货物信息" align="center" width="500px">
<template v-slot="{row}">
<section class="table-goodList">
<div v-for="(item, index) in row.goodsList" :key="index" class="goodList-div">
<section>
<div v-for="(item, index) in row.goodsList" :key="index">
{{index+1}}{{item.prodTitleZh}}
</div>
</section>
......@@ -70,9 +70,9 @@
</el-table-column>
<el-table-column label="入仓货物属性" align="center">
<template v-slot="{row}">
<section class="table-goodList">
<section>
<div>合计:{{calcSum(row.goodsList)}}</div>
<div v-for="(item, index) in row.goodsList" :key="index" class="goodList-div">
<div v-for="(item, index) in row.goodsList" :key="index">
{{getTotlContent(item,['volume','weight'])}}
</div>
</section>
......
......@@ -547,7 +547,7 @@ export default {
let count = 0;
if (Array.isArray(this.listData)) {
this.listData.forEach((item) => {
const { sectionOrderList } = item;
const { sectionOrderList = [] } = item;
sectionOrderList.forEach((item) => {
count = count + item.installNum;
});
......
......@@ -511,11 +511,13 @@ export default {
},
/* 增加部分 */
addPart() {
createSection({ shipmentId: this.shipmentObj.id }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
createSection({ shipmentId: this.shipmentObj.id, isCover: 0 }).then(
(res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
}
);
},
/* 删除部分 */
deletePart(part) {
......
......@@ -24,7 +24,7 @@
<el-button size="small" @click="$emit('closeDialog')">关闭</el-button>
</el-row>
<warehouse-area-dialog ref="area" :visible.sync="visible" v-model="storageSpaces" :order-id="orderId" :modal-append-to-body=false append-to-body />
<warehouse-area-dialog ref="area" :visible.sync="visible" v-model="storageSpaces" :order-id="orderId" :warehouseId="warehouseId" :modal-append-to-body=false append-to-body />
</div>
</template>
......@@ -50,6 +50,8 @@ export default {
orderId: -1,
// 仓位数据
storageList: deepClone(this.tallyRows),
// 仓库id
warehouseId: this.$attrs.shipmentObj.startWarehouseId,
};
},
methods: {
......
......@@ -68,7 +68,7 @@
<div class="label-font">
<p>
<span>已卸:</span>
<span>无返回</span>
<span>{{getUnLoadNumCount}}</span>
</p>
</div>
</el-row>
......@@ -253,7 +253,7 @@ export default {
const { shipmentObj } = this.$attrs;
approvalCancel({
applyReason: "取消审核",
id: shipmentObj['cabinetUnloadApprovalInfo'].id,
id: shipmentObj["cabinetUnloadApprovalInfo"].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
......@@ -277,6 +277,16 @@ export default {
return getTotlContent(secStatistics);
}
},
/* 已卸总数 */
getUnLoadNumCount() {
let count = 0;
if (this.pageData.sectionOrderList) {
this.pageData.sectionOrderList.forEach((item) => {
count = count + item.unloadNum;
});
}
return count;
},
},
};
</script>
......
......@@ -2,16 +2,16 @@
<div class="app-seaProcess">
<!-- 海运流程图 -->
<el-scrollbar :vertical="true" viewClass="shipping-chart">
<div v-for="(nodes,index) in seaBaseData" :key="index" class="chart-nodes">
<div v-for="(nodes,index) in processData" :key="index" class="chart-nodes">
<div class="node-area">
<div v-for="node in nodes" :key="node.title" @click="nodeClick(index, node)" class="node-div">
<div v-show="isShowAgent(node.type)">
<div>
<img :src="getImgSrc(node)" alt="">
<p>{{node.title}}</p>
</div>
</div>
</div>
<div class="arrow-area" v-if="index !== (seaBaseData.length-1)">
<div class="arrow-area" v-if="index !== (processData.length-1)">
<img src="@/assets/images/shipping/jt-start.png" alt="" v-if="index >= currIndex">
<img src="@/assets/images/shipping/jt-end.png" alt="" v-if="index < currIndex">
</div>
......@@ -90,10 +90,12 @@ export default {
currIndex: 0,
// 当前节点
currNode: {},
// 数据
processData: this.seaBaseData,
};
},
created() {},
computed: {
/* computed: {
isShowAgent() {
return (type) => {
if (type === "agent") {
......@@ -106,7 +108,7 @@ export default {
return true;
};
},
},
}, */
methods: {
/** 关闭弹窗 */
closeDialog(type) {
......@@ -176,6 +178,7 @@ export default {
watch: {
/* 监听发货对象 */
shipmentObj(val) {
let newNodes = [];
// 迭代每个节点
for (let i = 0; i < this.seaBaseData.length; i++) {
const nodes = this.seaBaseData[i];
......@@ -218,7 +221,9 @@ export default {
// 加1表示为已完成步骤后一步
this.currIndex = i + 1;
}
newNodes.push(nodes);
}
this.processData = newNodes;
},
},
};
......
......@@ -23,19 +23,19 @@
{{ form.isPayAdvance === 0 ? '' : '' }}
</el-form-item>
<el-form-item label="旧运费">
<el-input v-model="form.orgSeaFreight" readonly>
<el-input v-model="form.orgSeaFreight" readonly style="width: 400px">
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgSeaFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgSeaFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="旧清关费">
<el-input v-model="form.orgClearanceFreight" readonly>
<el-input v-model="form.orgClearanceFreight" readonly style="width: 400px">
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgClearanceFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgClearanceFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="新运费" required>
<el-input v-model.number="form.seaFreight">
<el-form-item label="新运费" required style="width: 400px">
<el-input v-model="form.seaFreight" type="number">
<el-select v-model="form.seaFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
......@@ -54,8 +54,8 @@
</el-select>
</el-input>
</el-form-item>
<el-form-item label="新清关费" required>
<el-input v-model.number="form.clearanceFreight">
<el-form-item label="新清关费" required style="width: 400px">
<el-input v-model="form.clearanceFreight" type="number">
<el-select v-model="form.clearanceFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
......
......@@ -86,7 +86,7 @@
<el-descriptions-item label="始发仓">{{FeeDetails.startWarehouse}}</el-descriptions-item>
<el-descriptions-item label="目的仓">{{FeeDetails.destWarehouse}}</el-descriptions-item>
</el-descriptions>
<el-descriptions v-else-if="type === 3" :column="4" border>
<el-descriptions v-else-if="type === 3 || type === 4" :column="4" border>
<el-descriptions-item label="订单号">{{FeeDetails.orderNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="FeeDetails.transportId"></dict-tag>
......
......@@ -8,7 +8,7 @@
</div>
<el-form v-if="!readonly" ref="form" :model="form" label-width="80px">
<el-form-item label="商品类型">
<span>{{ getProductAttrNameById(form.productType) }}</span>
<span>{{ getProductAttrNameById(form.prodType) }}</span>
</el-form-item>
<el-form-item label="商品名称">
<span>{{ form.prodTitleZh }}</span>
......@@ -17,26 +17,26 @@
<span>{{ form.prodTitleEn }}</span>
</el-form-item>
<el-form-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${startTitleZh}】发往【${destTitleZh}】`}}
</el-form-item>
<el-form-item label="是否预付">
{{ form.isPayAdvance === 0 ? '' : '' }}
</el-form-item>
<el-form-item label="旧运费">
<el-input v-model="form.orgSeaFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgSeaFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgSeaFreightVolume] }}</div>
<el-form-item label="旧运费" style="width: 400px">
<el-input v-model="form.orgFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="旧清关费">
<el-form-item label="旧清关费" style="width: 400px">
<el-input v-model="form.orgClearanceFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgClearanceFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgClearanceFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="新运费" required>
<el-input v-model.number="form.seaFreight">
<el-select v-model="form.seaFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-form-item label="新运费" required style="width: 400px">
<el-input v-model="form.freight" type="number">
<el-select v-model="form.freightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
......@@ -44,7 +44,7 @@
:value="item.id">
</el-option>
</el-select>
<el-select v-model="form.seaFreightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-select v-model="form.freightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in unitList"
:key="item.id"
......@@ -54,8 +54,8 @@
</el-select>
</el-input>
</el-form-item>
<el-form-item label="新清关费" required>
<el-input v-model.number="form.clearanceFreight">
<el-form-item label="新清关费" required style="width: 400px">
<el-input v-model="form.clearanceFreight" type="number">
<el-select v-model="form.clearanceFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
......@@ -84,12 +84,12 @@
<el-descriptions-item label="商品名称">{{ form.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文名称">{{ form.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${startTitleZh}】发往【${destTitleZh}】`}}
</el-descriptions-item>
<el-descriptions-item label="是否预付">{{ form.isPayAdvance === 0 ? '' : '' }}</el-descriptions-item>
<el-descriptions-item label="旧运费">{{ form.orgSeaFreight }} {{ currentMap[form.orgSeaFreightCurrency] }}/{{ unitMap[form.orgSeaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="旧运费">{{ form.orgFreight }} {{ currentMap[form.orgFreightCurrency] }}/{{ unitMap[form.orgFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="旧清关费">{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}/{{ unitMap[form.orgClearanceFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新运费">{{ form.seaFreight }} {{ currentMap[form.seaFreightCurrency] }}/{{ unitMap[form.seaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新运费">{{ form.freight }} {{ currentMap[form.freightCurrency] }}/{{ unitMap[form.freightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新清关费">{{ form.clearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}/{{ unitMap[form.clearanceFreightVolume] }}</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -106,11 +106,12 @@ import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
import {openedRouterList} from "@/api/ecw/warehouse"
export default {
name: "specialDiscount",
props: {
offerProdId: String,
orderItemId: String,
id: Number,
readonly: {
type: Boolean,
......@@ -122,14 +123,14 @@ export default {
},
created() {
// 临时
if(this.$route.query.offerId){
this.form.offerId = this.$route.query.offerId - 0
if(this.$route.query.orderId){
this.form.orderId = this.$route.query.orderId - 0
// this.getOrder()
}
// 查看详情,列表进来的
if(this.offerProdId){
this.form.offerProdId = this.offerProdId - 0
if(this.orderItemId){
this.form.orderItemId = this.orderItemId - 0
this.getOrderSpecial()
}
......@@ -155,7 +156,7 @@ export default {
"abnormalState": 0,
"applyResult": "",
"applyStatus": 0,
"applyType": 0,
"applyType": '1',
"ccIds": "",
"channelId": 0,
"charging": 0,
......@@ -206,26 +207,30 @@ export default {
"transportId": 0,
"vweight": "",
"wvolume": ""
}
},
startTitleZh: '',
destTitleZh: ''
}
},
methods: {
handleSubmit(){
createOrderSpecial({
"applyType": '1',
clearanceFreight: this.form.clearanceFreight,
clearanceFreightCurrency: this.form.clearanceFreightCurrency,
clearanceFreightVolume: this.form.clearanceFreightVolume,
offerId: this.form.offerId,
offerProdId: this.form.offerProdId,
seaFreight: this.form.seaFreight,
seaFreightCurrency: this.form.seaFreightCurrency,
seaFreightVolume: this.form.seaFreightVolume,
orderId: this.form.orderId,
orderItemId: this.form.orderItemId,
freight: this.form.freight,
freightCurrency: this.form.freightCurrency,
freightVolume: this.form.freightVolume,
}).then(r => {
this.$message.success(r.msg || '提交成功')
})
},
getOrderSpecial(){
getOrderSpecial(this.form.offerProdId).then(r => {
getOrderSpecial(this.form.orderItemId).then(r => {
this.form = r.data
})
},
......@@ -260,6 +265,19 @@ export default {
})
return map
}
},
watch: {
'form.lineId'(val){
if (val){
openedRouterList({lineId: val}).then(r => {
if(r.data && r.data.length > 0){
this.startTitleZh = r.data[0].startTitleZh
this.destTitleZh = r.data[0].destTitleZh
}
})
}
}
}
}
</script>
......
......@@ -4,7 +4,7 @@
<div slot="header" class="card-title">申请特价</div>
<!-- 列表 -->
<div class="order-header">
<span style="font-size: 15px;">订单号:{{ order.number }}</span>
<span style="font-size: 15px;">订单号:{{ order.orderNo }}</span>
</div>
<el-table v-loading="loading" :data="order.orderItemVOList">
......@@ -78,7 +78,7 @@
prop="address"
label="操作">
<template v-slot="{row}">
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount/${row.prodId}?orderId=${row.orderId}`)">优惠申请</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="$router.push(`/order/discount/${row.orderItemId}?orderId=${row.orderId}`)">优惠申请</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']">佣金规则</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:order:update']">管理折扣</el-button>
</template>
......
......@@ -170,7 +170,7 @@ import {
getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId,
orderWarehouseInFinish,
rollbackApply
rollbackDelete
} from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
......@@ -274,15 +274,17 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
rollbackApply({
rollbackDelete({
"orderId": item.orderId,
"orderNo": item.orderNo,
"reason": ""
"orderItemId": item.orderItemId
}).then(() => {
this.$message({
type: 'success',
message: '申请退仓成功!'
});
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data.reverse())
getOrder(this.orderId).then(r => this.order = r.data)
})
}).catch(() => {
......
......@@ -278,12 +278,17 @@
<!--设置服务-->
<el-dialog title="设置服务" :visible.sync="serviceOpen" width="1000px" append-to-body>
<el-form ref="form" :model="lineform" :rules="rules" label-width="80px">
<el-form-item label="其他服务" prop="otherServiceList">
<el-checkbox-group v-model="lineform.serviceList">
<el-form ref="form" :model="lineform" :rules="rules" label-width="120px">
<el-form-item label="始发港服务">
<el-checkbox-group v-model="lineform.startDestination">
<el-checkbox v-for="item in serviceGroup" :label="item.id" :key="item.id" :value="item.id"> {{item.text}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form-item>
<el-form-item label="目的港服务">
<el-checkbox-group v-model="lineform.endDestination">
<el-checkbox v-for="item in endServiceGroup" :label="item.id" :key="item.id" :value="item.id"> {{item.text}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -430,8 +435,13 @@ export default {
cityList: [],
serviceGroup: [
{id: '1', text: '送货上门'},
{id: '2', text: '非控货订单代收货款'}
{id: '1', text: '集运服务'},
{id: '2', text: '送货上门'}
],
endServiceGroup: [
{id: '3', text: '非控货订单代收货款'},
{id: '4', text: '海外仓'}
],
// 总条数
......@@ -489,7 +499,7 @@ export default {
// 表单参数
form: {checkList:[],},
ladingform: {prefixCounter:null,titleZh:null,contentZh:null,account:null,acctArr:[]},
lineform: {serviceList:[]},
lineform: {startDestination:[],endDestination:[]},
// 表单校验
rules: {
......@@ -767,17 +777,19 @@ export default {
serviceClick(row) {
if(row.otherService) {
this.lineform.serviceList = row.otherService.split(",");
this.lineform.startDestination = row.otherService?.split(",") ?? [];
this.lineform.endDestination = row.otherService?.split(",") ?? [];
} else {
this.lineform.serviceList = [];
this.lineform.startDestination = [];
this.lineform.endDestination = [];
}
this.serviceOpen = true;
this.lineform.lineId = row.lineId;
},
submitLineForm() {
let otherService = this.lineform.serviceList.join(',');
this.lineform.otherService = otherService;
let otherService = this.lineform.startDestination.concat(this.lineform.endDestination);
this.lineform.otherService = otherService.join(',');
serviceConfig(this.lineform).then(res => {
this.$modal.msgSuccess("操作成功");
......
This diff is collapsed.
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