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
ea6df539
Commit
ea6df539
authored
Oct 15, 2023
by
我在何方
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator
into dev
parents
1b55f039
08dd2438
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
242 additions
and
82 deletions
+242
-82
App.vue
src/App.vue
+4
-4
product.js
src/api/ecw/product.js
+9
-0
success.svg
src/assets/svg/success.svg
+1
-0
index.vue
src/components/ProductsSelector/index.vue
+35
-21
index.vue
src/views/ecw/coupon/index.vue
+23
-2
PrintWarehouseReceipt.vue
src/views/ecw/order/components/PrintWarehouseReceipt.vue
+42
-1
success.vue
src/views/ecw/order/success.vue
+43
-25
batchEdit.vue
src/views/ecw/productPrice/batchEdit.vue
+34
-12
batchIncrease.vue
src/views/ecw/productPrice/batchIncrease.vue
+29
-5
edit.vue
src/views/ecw/productPrice/edit.vue
+15
-8
index.vue
src/views/ecw/productPrice/index.vue
+7
-4
No files found.
src/App.vue
View file @
ea6df539
...
...
@@ -78,16 +78,16 @@ $sizes: 0, 5, 10,20,30,50,75,100,150,200,300,500,800,1000;
margin-top
:
#{
$item
}
px
!
important
;
}
.pl-
#{
$item
}
{
margin
-left
:
#{
$item
}
px
!
important
;
padding
-left
:
#{
$item
}
px
!
important
;
}
.pr-
#{
$item
}
{
margin
-right
:
#{
$item
}
px
!
important
;
padding
-right
:
#{
$item
}
px
!
important
;
}
.pb-
#{
$item
}
{
margin
-bottom
:
#{
$item
}
px
!
important
;
padding
-bottom
:
#{
$item
}
px
!
important
;
}
.pt-
#{
$item
}
{
margin
-top
:
#{
$item
}
px
!
important
;
padding
-top
:
#{
$item
}
px
!
important
;
}
.w-
#{
$item
}
{
width
:
#{
$item
}
px
!
important
;
...
...
src/api/ecw/product.js
View file @
ea6df539
...
...
@@ -61,6 +61,15 @@ export function getProductPage(query) {
})
}
// 获得产品ID
export
function
getProductIds
(
params
)
{
return
request
({
url
:
'
/ecw/product/simpleIdList
'
,
params
,
method
:
'
get
'
})
}
// 导出产品 Excel
export
function
exportProductExcel
(
query
)
{
return
request
({
...
...
src/assets/svg/success.svg
0 → 100644
View file @
ea6df539
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1697265053025"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"4223"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><path
d=
"M874.119618 149.859922A510.816461 510.816461 0 0 0 511.997 0.00208a509.910462 509.910462 0 0 0-362.119618 149.857842c-199.817789 199.679789-199.817789 524.581447 0 724.260236a509.969462 509.969462 0 0 0 362.119618 149.857842A508.872463 508.872463 0 0 0 874.119618 874.120158c199.836789-199.679789 199.836789-524.581447 0-724.260236zM814.94268 378.210681L470.999043 744.132295a15.359984 15.359984 0 0 1-5.887994 4.095996c-1.751998 1.180999-2.913997 2.362998-5.276994 2.913997a34.499964 34.499964 0 0 1-13.469986 2.914997 45.547952 45.547952 0 0 1-12.897986-2.303998l-4.095996-2.363997a45.291952 45.291952 0 0 1-7.009992-4.095996l-196.902793-193.789796a34.126964 34.126964 0 0 1-10.555989-25.186973c0-9.37399 3.583996-18.74698 9.98399-25.186974a36.429962 36.429962 0 0 1 50.372947 0l169.98382 167.423824L763.389735 330.220732a37.059961 37.059961 0 0 1 50.371947-1.732998 33.647965 33.647965 0 0 1 11.165988 25.186973 35.544963 35.544963 0 0 1-9.98399 24.575974v-0.04z m0 0"
fill=
"#52C41A"
p-id=
"4224"
></path></svg>
\ No newline at end of file
src/components/ProductsSelector/index.vue
View file @
ea6df539
...
...
@@ -3,18 +3,19 @@
<div
class=
"flex-1"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-select
v-model=
"queryParams.typeId"
:placeholder=
"$t('选择类型')"
style=
"width:120px"
clearable
>
<el-select
v-model=
"queryParams.typeId"
:placeholder=
"$t('选择类型')"
style=
"width:120px"
clearable
@
change=
"getList"
:disabled=
"loading"
>
<el-option
v-for=
"item in typeList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
<el-select
v-model=
"queryParams.attrId"
:placeholder=
"$t('选择属性')"
style=
"width:120px"
clearable
>
<el-select
v-model=
"queryParams.attrId"
:placeholder=
"$t('选择属性')"
style=
"width:120px"
clearable
@
change=
"getList"
:disabled=
"loading"
>
<el-option
v-for=
"item in attrList"
:key=
"item.id"
:label=
"item.attrName"
:value=
"item.id"
/>
</el-select>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('产品关键字')"
style=
"width:120px"
clearable
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('产品关键字')"
style=
"width:120px"
clearable
:disabled=
"loading"
/>
<el-button
type=
"primary"
@
click=
"reLoad"
:loading=
"loading"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<div
v-if=
"showAll"
>
<el-checkbox
:label=
"$t('全选') + `($
{total > 500 ? $t('最多500') : $t('{total}个', {total})})`" @change="toggleAll" :disabled="isAllProduct">
</el-checkbox>
<el-checkbox
:label=
"$t('全选库内商品(共
{cnt}个)', {cnt: allTotal})" v-model="isAllProduct">
</el-checkbox>
<el-checkbox
:label=
"$t('全选') + `($
{total > 500 ? $t('最多500') : $t('{total}个', {total})})`" @change="toggleAll" :disabled="isAllProduct || loading">
</el-checkbox>
<el-checkbox
:label=
"$t('全选库内商品(共
{cnt}个)', {cnt: allTotal})" v-model="isAllProduct" :disabled="loading">
</el-checkbox>
<el-checkbox
v-if=
"showFiltered && enableFiltered"
:label=
"$t('根据商品搜索结果(共
{cnt}个)', {cnt: total})" v-model="isAllFiltered" :disabled="loading">
</el-checkbox>
</div>
</div>
<div
class=
"list"
>
...
...
@@ -28,9 +29,9 @@
<div
class=
"flex-1 ml-10"
>
<el-card
style=
"height:100%"
>
<div
slot=
"header"
class=
"header flex"
>
<div
class=
"flex-1 flex items-center"
>
{{
$t
(
'
已选{cnt
}
个产品
'
,
{
cnt
:
isAllProduct
?
total
:
choosedList
.
length
}
)
}}
<
/div
>
<div
class=
"flex-1 flex items-center"
>
{{
$t
(
'
已选{cnt
}
个产品
'
,
{
cnt
:
isAllProduct
||
isAllFiltered
?
total
:
choosedList
.
length
}
)
}}
<
/div
>
<
el
-
button
v
-
if
=
"
choosedList.length
"
type
=
"
text
"
@
click
=
"
clearAll
"
>
{{
$t
(
'
全部清除
'
)
}}
<
/el-button
>
<
el
-
button
:
disabled
=
"
!
choosedList.length
"
type
=
"
text
"
@
click
=
"
clearAll
"
>
{{
$t
(
'
全部清除
'
)
}}
<
/el-button
>
<
/div
>
<
div
class
=
"
list
"
>
<
div
class
=
"
item
"
v
-
for
=
"
(choosed) in choosedList
"
:
key
=
"
choosed.id
"
:
data
-
data
=
"
JSON.stringify(choosed)
"
>
...
...
@@ -43,7 +44,7 @@
<
/div
>
<
/template
>
<
script
>
import
{
getProductPage
,
getProductList
}
from
'
@/api/ecw/product
'
import
{
getProductPage
,
getProductList
,
getProductIds
}
from
'
@/api/ecw/product
'
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductAttrList
}
from
'
@/api/ecw/productAttr
'
...
...
@@ -56,10 +57,13 @@ export default {
}
}
,
showAll
:
Boolean
,
isall
:
Boolean
isall
:
Boolean
,
// 是否允许勾选全部搜索结果,优惠券那边无法回显所以不能启用,编辑路线价格等不需要回显的场景可以启用
enableFiltered
:
Boolean
}
,
data
()
{
return
{
loading
:
false
,
list
:
[],
page
:
1
,
pages
:
1
,
...
...
@@ -75,7 +79,10 @@ export default {
choosedList
:
[],
typeList
:
[],
attrList
:
[],
isAllProduct
:
false
isAllProduct
:
false
,
isAllFiltered
:
false
,
// 是否全部搜索结果
// 是否显示搜索结果勾选,有筛选条件才显示
showFiltered
:
false
}
}
,
computed
:
{
...
...
@@ -101,6 +108,11 @@ export default {
this
.
choosedList
=
[]
this
.
$emit
(
'
setall
'
,
isAllProduct
)
}
,
isAllFiltered
(
isAllFiltered
){
this
.
choosedList
=
[]
this
.
isAllProduct
=
false
this
.
$emit
(
'
setFiltered
'
,
isAllFiltered
)
}
,
defaultIds
(
newValue
,
oldValue
){
if
(
!
oldValue
||
!
oldValue
.
length
){
this
.
loadDefaultProds
()
...
...
@@ -158,21 +170,23 @@ export default {
this
.
getList
()
}
,
getList
()
{
this
.
loading
=
true
getProductPage
(
this
.
queryParams
).
then
(
res
=>
{
this
.
list
=
res
.
data
.
list
//.concat(res.data.list || [])
this
.
page
=
res
.
data
.
page
this
.
pages
=
res
.
data
.
pages
this
.
total
=
res
.
data
.
total
// this.choosedList = [] //搜搜重置,数据回显
/* if (this.defaultIds.length > 0) {
this.defaultIds.map(item => {
this.list.map(items => {
if (items.id == item) {
this.choosedList.push(items)
}
}
)
}
)
}
*/
// 必须在搜索之后才显示勾选,这个时候才有数量
this
.
showFiltered
=
!!
this
.
queryParams
.
attrId
||
!!
this
.
queryParams
.
titleZh
||
!!
this
.
queryParams
.
typeId
}
).
finally
(()
=>
{
this
.
loading
=
false
}
)
}
,
// 获得指定条件的商品的全部ID
getFilteredIds
(){
return
getProductIds
(
this
.
queryParams
).
then
(
res
=>
{
return
res
.
data
}
)
}
,
toggleCheck
(
item
,
checked
)
{
...
...
src/views/ecw/coupon/index.vue
View file @
ea6df539
...
...
@@ -70,7 +70,7 @@
<
el
-
table
-
column
:
label
=
"
$t('结束时间')
"
align
=
"
center
"
prop
=
"
endTime
"
width
=
"
180
"
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
div
:
style
=
"
{color: !row.overdueStatus ? 'red' : null
}
"
>
{{
parseTime
(
row
.
endTime
,
'
{y
}
-{m
}
-{d
}
'
)
}}
<
/div
>
<
div
v
-
if
=
"
!row.overdueStatus
"
style
=
"
color: red
"
>
{{
$t
(
'
已过期
'
)
}}
<
/div
>
<
div
style
=
"
color: red
"
>
{{
!
row
.
overdueStatus
?
$t
(
'
已过期
'
)
:
expireTips
(
row
.
endTime
)
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<!--
...
...
@@ -115,7 +115,7 @@
v
-
hasPermi
=
"
['ecw:coupon:update']
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleCopy(scope.row)
"
v
-
hasPermi
=
"
['ecw:coupon:copy']
"
>
{{
$t
(
'
复制
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
updateEndtimeItem = scope.row
"
v
-
if
=
"
scope.row.endTime
&& scope.row.status
"
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
updateEndtimeItem = scope.row
"
v
-
if
=
"
scope.row.endTime
"
v
-
hasPermi
=
"
['ecw:coupon:delay']
"
>
{{
$t
(
'
延期
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['ecw:coupon:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
...
...
@@ -232,6 +232,27 @@ export default {
{
required
:
!
this
.
updateEndtimeForm
.
forever
,
message
:
"
请填写结束时间
"
}
]
}
}
,
expireTips
(){
return
endTime
=>
{
if
(
!
endTime
)
return
''
console
.
log
({
endTime
}
)
// 7天以内用红色标注提醒:“还有N天到期”,最后一天显示1天过期
let
endDate
=
new
Date
(
endTime
.
replace
(
/-/g
,
'
/
'
))
if
(
endDate
.
getHours
()
==
0
){
endDate
.
setHours
(
23
)
endDate
.
setMinutes
(
59
)
endDate
.
setSeconds
(
59
)
}
let
now
=
new
Date
()
let
diff
=
endDate
.
getTime
()
-
now
.
getTime
()
let
days
=
Math
.
ceil
(
diff
/
(
24
*
60
*
60
*
1000
))
if
(
days
<=
1
){
return
this
.
$t
(
'
1天内过期
'
)
}
else
if
(
days
<=
7
){
return
this
.
$t
(
'
还有{days
}
天到期
'
,
{
days
}
)
}
}
}
}
,
watch
:{
...
...
src/views/ecw/order/components/PrintWarehouseReceipt.vue
View file @
ea6df539
...
...
@@ -60,6 +60,35 @@
</td>
</tr>
</
template
>
<tr>
<td
style=
"text-align:center;width: 50px;"
v-if=
"!preview"
>
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
{{calcTotal('cartonsNum')}}
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
{{calcTotal('volume')}}
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
{{calcTotal('weight')}}
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
>
</td>
<td
style=
"text-align:center;padding:0 0px;border:1px dashed #ccc;"
v-if=
"!preview"
>
</td>
</tr>
</table>
</div>
<!--edit by liuyc 20210121 结尾增加文字-->
...
...
@@ -80,6 +109,7 @@ import {parseTime} from '@/utils/ruoyi'
import
lodop
from
'
@/utils/lodop
'
import
{
getOrderWarehouseIn
,
getOrderDetail
}
from
'
@/api/ecw/order
'
import
qrcode
from
'
qrcode
'
import
Decimal
from
'
decimal.js
'
export
default
{
filters
:
{
parseTime
},
components
:
{
},
...
...
@@ -136,7 +166,18 @@ export default {
})
})
return
arr
}
},
calcTotal
(){
return
field
=>
{
let
total
=
new
Decimal
(
0
)
this
.
items
.
forEach
(
item
=>
{
if
(
!
this
.
preview
||
item
.
checked
){
total
=
total
.
plus
(
item
[
field
]
||
0
)
}
})
return
total
.
toNumber
()
}
}
},
watch
:{
checkAll
(
val
){
...
...
src/views/ecw/order/success.vue
View file @
ea6df539
<
template
>
<div
v-if=
"order"
>
<
el-row
class=
"wrapper
"
>
<
el-col
:span=
"10"
class=
"icon"
>
<img
src=
"../../../assets/
images/u5.pn
g"
/>
</
el-col
>
<
el-col
:span=
"14
"
>
<
div
class=
"wrapper flex w-1000 pb-20"
style=
"margin:auto
"
>
<
div
class=
"icon"
>
<img
src=
"../../../assets/
svg/success.sv
g"
/>
</
div
>
<
div
class=
"flex-1
"
>
<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"
v-if=
"order.channelName"
>
{{
$t
(
'
出货渠道
'
)
}}
:
{{
order
.
channelName
}}
</div>
<div
class=
"line"
>
{{
$t
(
'
路线
'
)
}}
:
{{
$l
(
order
.
logisticsInfoDto
,
'
startTitle
'
)
}}
>>
{{
$l
(
order
.
logisticsInfoDto
,
'
destTitle
'
)
}}
</div>
<div
class=
"line bold font-lg"
>
{{
$t
(
'
订单号
'
)
}}
:
{{
order
.
orderNo
}}
</div>
<div
class=
"line"
>
{{
$t
(
'
唛头
'
)
}}
:
{{
order
.
marks
}}
</div>
<div
class=
"flex"
>
<div
class=
"line flex-1"
>
{{
$t
(
'
运输方式
'
)
}}
:
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"order.transportId"
/></div>
<div
class=
"line flex-1"
v-if=
"order.channelName"
>
{{
$t
(
'
出货渠道
'
)
}}
:
{{
order
.
channelName
}}
</div>
</div>
<div
class=
"flex"
>
<div
class=
"line flex-1"
>
{{
$t
(
'
路线
'
)
}}
:
{{
$l
(
order
.
logisticsInfoDto
,
'
startTitle
'
)
}}
>>
{{
$l
(
order
.
logisticsInfoDto
,
'
destTitle
'
)
}}
</div>
<div
class=
"line flex-1"
>
{{
$t
(
'
单证报关
'
)
}}
:
<dict-tag
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
:value=
"order.customsType"
/></div>
</div>
<div
class=
"line"
>
{{
$t
(
'
商品列表
'
)
}}
:
<span
v-for=
"(item, index) in order.orderItemVOList"
:key=
"index"
>
{{
$l
(
item
,
'
prodTitle
'
)
}}
<template
v-if=
"index
<
order
.
orderItemVOList
.
length
-
1
"
>
{{
$t
(
'
、
'
)
}}
</
template
>
</span>
</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>
<div
class=
"line"
></div>
<div
class=
"line"
>
{{$t('您的订单已提交,谢谢您选择捷道物流!')}}
</div>
</el-col>
</el-row>
<div
class=
"actions"
>
<div
class=
"line"
>
{{$t('总件数')}}:{{order.sumNum}}
</div>
</div>
</div>
<div
class=
"w-800"
style=
"margin: auto"
>
<div
class=
"line mt-20"
>
{{$t('仓库地址')}}:{{$l(order.logisticsInfoDto, 'startAddress')}}
</div>
<div
class=
"line"
>
{{$t('仓库电话')}}: {{order.logisticsInfoDto.startTell}}
</div>
<!-- v1.7新增 -->
<div
class=
"line"
>
{{$t('为保证入仓数据准确性,入仓请带上一份装箱单(品名,件数,毛重,尺寸方数,是否有牌)')}}
</div>
<div
class=
"line"
></div>
<div
class=
"line"
>
{{$t('您的订单已提交,谢谢您选择捷道物流!')}}
</div>
</div>
<div
class=
"actions mt-50"
>
<el-button
type=
"primary"
@
click=
"$redirect('detail?orderId=' + order.orderId)"
>
{{$t('查看订单')}}
</el-button>
<el-button
type=
"warning"
@
click=
"showNotice = true"
>
{{$t('入仓须知')}}
</el-button>
<el-button
type=
"info"
@
click=
"$redirect('create')"
>
{{$t('再来一单')}}
</el-button>
...
...
@@ -75,24 +86,31 @@ export default {
.icon
{
display
:
flex
;
justify-content
:
flex-end
;
margin-right
:
2
0px
;
margin-right
:
5
0px
;
align-items
:
center
;
img
{
width
:
2
00px
;
height
:
2
00px
;
width
:
1
00px
;
height
:
1
00px
;
}
}
.title
{
font-size
:
30px
;
margin-bottom
:
20px
;
}
.line
{
font-size
:
14px
;
margin-bottom
:
10px
;
}
}
.line
{
font-size
:
14px
;
margin-bottom
:
10px
;
}
.actions
{
display
:
flex
;
justify-content
:
center
;
}
.bold
{
font-weight
:
bold
;
}
.font-lg
{
font-size
:
1
.5rem
!
important
;
}
</
style
>
src/views/ecw/productPrice/batchEdit.vue
View file @
ea6df539
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<products-selector
ref=
"productSelector"
v-model=
"form.productIdList"
show-all
@
setall=
"isAllProduct=$event"
:default-ids=
"form.productIdList"
class=
"mb-20"
/>
<products-selector
ref=
"productSelector"
v-model=
"form.productIdList"
show-all
@
setall=
"isAllProduct=$event"
:default-ids=
"form.productIdList"
enable-filtered
@
setFiltered=
"isAllFilteredProduct=$event"
class=
"mb-20"
/>
<routers-selector
v-model=
"selectedRoutes"
:type=
"type"
/>
...
...
@@ -24,6 +24,13 @@
<el-form-item
:label=
"$t('单价模式')"
prop=
"priceType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_TYPE"
v-model=
"form.priceType"
form-type=
"radio"
formatter=
'number'
/>
</el-form-item>
<el-form-item
:label=
"$t('最小起计量')"
:prop=
"`minWeight`"
>
<inputor
default2=
"0"
v-model.number=
"form.minWeight"
type=
"number"
class=
"w-100"
:rules=
"
{validator: priceValidator, trigger: 'blur', message: '数量错误'}"/>
/
<selector
v-model=
"form.minWeightUnit"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100"
disabled
/>
</el-form-item>
<!--阶梯订单-->
<template
v-if=
"form.stepPrice==1"
>
...
...
@@ -63,13 +70,6 @@
<
/template
>
<!--
非阶梯订单
-->
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('最小起计量')
"
:
prop
=
"
`minWeight`
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.minWeight
"
type
=
"
number
"
class
=
"
w-100
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '数量错误'
}
"
/>
/ <selector v-model="form.minWeightUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable2 class="w-100" disabled /
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
...
...
@@ -216,6 +216,7 @@ export default {
// dayLimit: 10000
}
,
isAllProduct
:
false
,
// 是否全部商品
isAllFilteredProduct
:
false
,
// 是否勾選全部搜索結果
specialProducts
:
[],
// priceStepList: [
{
}
,{
}
],
// 阶梯价格
// specialList:[], // 特殊需求,默认四个
...
...
@@ -303,6 +304,10 @@ export default {
if
(
this
.
type
==
'
air
'
){
this
.
$set
(
this
.
form
,
'
stepPrice
'
,
1
)
}
await
this
.
$nextTick
()
// 默认单位,空运千克,海运立方米
this
.
setDefaultVolumeUnit
(
this
.
type
==
'
air
'
?
6
:
7
)
// 如果是复制,则获取数据并填充,先复制,然后填充特需,避免数据的特需不全导致部分不显示
if
(
this
.
$route
.
query
.
templateId
){
await
this
.
getTemplateDetail
(
this
.
$route
.
query
.
templateId
)
...
...
@@ -453,6 +458,17 @@ export default {
this
.
$set
(
this
.
form
,
'
transportVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
clearanceVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
allVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
minWeightUnit
'
,
unit
)
console
.
log
(
this
.
form
.
priceStepList
,
this
.
form
.
stepPrice
)
// 阶梯价
if
(
this
.
form
.
stepPrice
==
1
&&
this
.
form
.
priceStepList
?.
length
){
this
.
form
.
priceStepList
.
forEach
(
item
=>
{
this
.
$set
(
item
,
'
transportVolumeUnit
'
,
unit
)
this
.
$set
(
item
,
'
clearanceVolumeUnit
'
,
unit
)
this
.
$set
(
item
,
'
allVolumeUnit
'
,
unit
)
this
.
$set
(
item
,
'
weightUnit
'
,
unit
)
}
)
}
}
,
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
async
(
valid
)
=>
{
...
...
@@ -465,14 +481,20 @@ export default {
this
.
$message
.
error
(
this
.
$t
(
'
请选择线路
'
));
return
;
}
if
(
!
this
.
isAllProduct
&&
(
!
this
.
form
.
productIdList
||
!
this
.
form
.
productIdList
.
length
)){
return
this
.
$message
.
error
(
'
请选择商品
'
)
}
let
data
=
Object
.
assign
({
}
,
this
.
form
,
{
// lineChannelList: this.selectedRoutes,
// specialList: this.specialProducts,
isAllProduct
:
this
.
isAllProduct
?
1
:
0
}
)
// 如果是勾選了全部篩選商品,則獲取商品ID
if
(
this
.
isAllFilteredProduct
){
data
.
productIdList
=
await
this
.
$refs
.
productSelector
.
getFilteredIds
()
}
if
(
!
data
.
isAllProduct
&&
(
!
data
.
productIdList
||
!
data
.
productIdList
.
length
)){
return
this
.
$message
.
error
(
'
请选择商品
'
)
}
/* if(this.form.stepPrice == 1){
data.priceStepList = this.form.priceStepList
}
*/
...
...
@@ -488,7 +510,7 @@ export default {
}
await
this
.
$confirm
(
this
.
$t
(
'
已选择{route
}
条路线,{product
}
个商品;确认提交修改?
'
,
{
route
:
data
.
lineChannelList
.
length
,
product
:
this
.
isAllProduct
?
this
.
$refs
.
productSelector
.
allTotal
:
this
.
form
.
productIdList
.
length
product
:
this
.
isAllProduct
?
this
.
$refs
.
productSelector
.
allTotal
:
data
.
productIdList
.
length
}
))
this
.
loading
=
true
batchUpdateProductPrice
(
data
).
then
(
response
=>
{
...
...
src/views/ecw/productPrice/batchIncrease.vue
View file @
ea6df539
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<products-selector
ref=
"productSelector"
v-model=
"form.productIdList"
show-all
@
setall=
"isAllProduct=$event"
:default-ids=
"form.productIdList"
class=
"mb-20"
/>
<products-selector
ref=
"productSelector"
v-model=
"form.productIdList"
show-all
@
setall=
"isAllProduct=$event"
enable-filtered
@
setFiltered=
"isAllFilteredProduct=$event"
:default-ids=
"form.productIdList"
class=
"mb-20"
/>
<routers-selector
v-model=
"selectedRoutes"
:type=
"type"
/>
...
...
@@ -96,6 +98,7 @@ export default {
stepPrice
:
0
},
isAllProduct
:
false
,
// 是否全部商品
isAllFilteredProduct
:
false
,
// 是否全部篩選商品
specialProducts
:
[],
rules
:
{},
product
:
null
,
...
...
@@ -164,6 +167,10 @@ export default {
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
this
.
$nextTick
(
async
()
=>
{
this
.
setDefaultVolumeUnit
(
this
.
type
==
'
air
'
?
6
:
7
)
})
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
// 没有的才push,已有的可能是从复制模板携带过来的数据
if
(
!
this
.
form
.
specialList
.
find
(
special
=>
special
.
specialDictType
==
item
.
value
))
{
...
...
@@ -240,6 +247,17 @@ export default {
this
.
$set
(
this
.
form
,
'
transportVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
clearanceVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
allVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
minWeightUnit
'
,
unit
)
console
.
log
(
this
.
form
.
priceStepList
,
this
.
form
.
stepPrice
)
// 阶梯价
if
(
this
.
form
.
stepPrice
==
1
&&
this
.
form
.
priceStepList
?.
length
){
this
.
form
.
priceStepList
.
forEach
(
item
=>
{
this
.
$set
(
item
,
'
transportVolumeUnit
'
,
unit
)
this
.
$set
(
item
,
'
clearanceVolumeUnit
'
,
unit
)
this
.
$set
(
item
,
'
allVolumeUnit
'
,
unit
)
this
.
$set
(
item
,
'
weightUnit
'
,
unit
)
})
}
},
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
async
(
valid
)
=>
{
...
...
@@ -252,15 +270,21 @@ export default {
this
.
$message
.
error
(
this
.
$t
(
'
请选择线路
'
));
return
;
}
if
(
!
this
.
isAllProduct
&&
(
!
this
.
form
.
productIdList
||
!
this
.
form
.
productIdList
.
length
)){
return
this
.
$message
.
error
(
'
请选择商品
'
)
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
// lineChannelList: this.selectedRoutes,
// specialList: this.specialProducts,
isAllProduct
:
this
.
isAllProduct
?
1
:
0
})
// 如果是勾選了全部篩選商品,則獲取商品ID
if
(
this
.
isAllFilteredProduct
){
data
.
productIdList
=
await
this
.
$refs
.
productSelector
.
getFilteredIds
()
}
if
(
!
data
.
isAllProduct
&&
(
!
data
.
productIdList
||
!
data
.
productIdList
.
length
)){
return
this
.
$message
.
error
(
this
.
$t
(
'
请选择商品
'
)
+
"
!
"
)
}
data
.
lineChannelList
=
this
.
selectedRoutes
if
(
data
.
lineChannelList
.
length
<
1
){
...
...
@@ -268,7 +292,7 @@ export default {
}
await
this
.
$confirm
(
this
.
$t
(
'
已选择{route}条路线,{product}个商品;确认提交修改?
'
,
{
route
:
data
.
lineChannelList
.
length
,
product
:
this
.
isAllProduct
?
this
.
$refs
.
productSelector
.
allTotal
:
this
.
form
.
productIdList
.
length
product
:
this
.
isAllProduct
?
this
.
$refs
.
productSelector
.
allTotal
:
data
.
productIdList
.
length
}))
this
.
loading
=
true
batchAddPrice
(
data
).
then
(
async
(
response
)
=>
{
...
...
src/views/ecw/productPrice/edit.vue
View file @
ea6df539
...
...
@@ -88,6 +88,13 @@
<el-form-item
:label=
"$t('单价模式')"
prop=
"priceType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_TYPE"
v-model=
"form.priceType"
form-type=
"radio"
formatter=
"number"
defaultable2
/>
</el-form-item>
<el-form-item
:label=
"$t('最小起计量')"
:prop=
"`minWeight`"
>
<inputor
default2=
"0"
v-model.number=
"form.minWeight"
type=
"number"
class=
"w-100"
:rules=
"{validator: priceValidator, trigger: 'blur', message: '数量错误'}"
/>
/
<selector
v-model=
"form.minWeightUnit"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100"
disabled
/>
</el-form-item>
<!--阶梯定价-->
<
template
v-if=
"form.stepPrice==1"
>
<div
v-for=
"(item, index) in form.priceStepList"
:key=
"index"
>
...
...
@@ -130,14 +137,6 @@
<
/div
>
<
/template
>
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('最小起计量')
"
:
prop
=
"
`minWeight`
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.minWeight
"
type
=
"
number
"
class
=
"
w-100
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '数量错误'
}
"
/>
/ <selector v-model="form.minWeightUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable2 class="w-100" disabled /
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
prop
=
"
allPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
test
=
"
allPriceUnit
"
v
-
model
=
"
form.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10 aaa
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr10
"
/>
...
...
@@ -543,6 +542,7 @@ export default {
this
.
$set
(
this
.
form
,
'
priceStepList
'
,
[{
}
,{
}
])
}
this
.
syncAllUnit
()
this
.
stepPrice
=
!!
stepPrice
}
,
needPay
(
val
){
this
.
$set
(
this
.
form
,
'
needPay
'
,
val
?
1
:
0
)
...
...
@@ -701,6 +701,13 @@ export default {
}
}
)
// 空命则阶梯订单
this
.
$nextTick
(()
=>
{
if
(
this
.
type
==
'
air
'
){
this
.
stepPrice
=
true
}
}
)
}
,
methods
:
{
// 同步全部单位
...
...
src/views/ecw/productPrice/index.vue
View file @
ea6df539
...
...
@@ -139,7 +139,7 @@
<el-table-column
prop=
"price"
:label=
"$t('价格')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.stepPrice == 1"
>
<template
v-if=
"scope.row.stepPrice == 1
&& scope.row.priceStepList && scope.row.priceStepList.length
"
>
{{
$t
(
"
第{no
}
阶梯({start
}
~{end
}
{weightUnit
}
)
"
,
{
no
:
1
,
start
:
scope
.
row
.
priceStepList
[
0
].
startNum
,
...
...
@@ -171,6 +171,9 @@
<
/div
>
<
el
-
button
type
=
"
text
"
@
click
=
"
showMoreStepPriceItem=scope.row
"
>
{{
$t
(
'
查看更多
'
)
}}
<
/el-button
>
<
/template
>
<
template
v
-
else
-
if
=
"
scope.row.stepPrice
"
>
{{
$t
(
'
缺少阶梯价格设置
'
)
}}
<
/template
>
<
template
v
-
else
>
<
div
v
-
if
=
"
scope.row.priceType == 0
"
>
{{
$t
(
'
运费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
transportPriceUnit
)
+
scope
.
row
.
transportPrice
}}
&
nbsp
;
...
...
@@ -229,9 +232,9 @@
v
-
hasPermi
=
"
['ecw:product-price:down']
"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
$t
(
'
下架
'
)
:
$t
(
'
上架
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['ecw:product-price:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
copyTemplate(scope.row)
"
size
=
"
mini
"
type
=
"
text
"
>
复制模板
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 0)
"
v
-
if
=
"
scope.row.needOrderInquiry
"
size
=
"
mini
"
type
=
"
text
"
>
取消单询
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 1)
"
v
-
else
size
=
"
mini
"
type
=
"
text
"
>
单询异常
<
/el-button
>
<
el
-
button
@
click
=
"
copyTemplate(scope.row)
"
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
'
复制模板
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 0)
"
v
-
if
=
"
scope.row.needOrderInquiry
"
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
'
取消单询
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 1)
"
v
-
else
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
'
单询异常
'
)
}}
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
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