Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
0e484bba
Commit
0e484bba
authored
Sep 05, 2022
by
huhaiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑提货单开发
parent
1aba93ee
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
699 additions
and
88 deletions
+699
-88
box.js
src/api/ecw/box.js
+114
-43
indexSea.vue
src/views/ecw/box/indexSea.vue
+36
-29
ladingBill.vue
src/views/ecw/box/ladingBill.vue
+0
-12
index.vue
src/views/ecw/box/ladingBill/index.vue
+242
-0
makeLadingBill.vue
src/views/ecw/box/ladingBill/makeLadingBill.vue
+238
-0
previewBill.vue
src/views/ecw/box/ladingBill/previewBill.vue
+65
-0
shippingDetail.vue
src/views/ecw/box/shippingDetail.vue
+4
-4
No files found.
src/api/ecw/box.js
View file @
0e484bba
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
,
});
}
/**
...
...
src/views/ecw/box/indexSea.vue
View file @
0e484bba
...
...
@@ -141,10 +141,10 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page
No"
: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
:
{
page
No
:
1
,
page
:
1
,
pageSize
:
10
,
},
cabinetList
:
[],
...
...
@@ -279,7 +280,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
No
=
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
.
page
No
=
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
>
src/views/ecw/box/ladingBill.vue
deleted
100644 → 0
View file @
1aba93ee
<
template
>
</
template
>
<
script
>
export
default
{
name
:
"
ladingBill
"
,
};
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/views/ecw/box/ladingBill/index.vue
0 → 100644
View file @
0e484bba
<
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
}}
m³
</
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
>
src/views/ecw/box/ladingBill/makeLadingBill.vue
0 → 100644
View file @
0e484bba
<
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
(
this
.
dialogCfg
.
type
===
"
makeBill
"
)
{
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
>
src/views/ecw/box/ladingBill/previewBill.vue
0 → 100644
View file @
0e484bba
<
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
:
1
px
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
>
src/views/ecw/box/shippingDetail.vue
View file @
0e484bba
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment