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
d2308455
Commit
d2308455
authored
Jun 01, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海运和空运批量价格设置,价格列表
parent
47b6fa0b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
232 additions
and
154 deletions
+232
-154
App.vue
src/App.vue
+3
-0
productPrice.js
src/api/ecw/productPrice.js
+10
-1
dict.js
src/utils/dict.js
+2
-0
batchEdit.vue
src/views/ecw/productPrice/batchEdit.vue
+159
-146
index.vue
src/views/ecw/productPrice/index.vue
+58
-7
No files found.
src/App.vue
View file @
d2308455
...
...
@@ -46,6 +46,9 @@ export default {
align-items
:
center
;
justify-content
:
center
;
}
.items-center
{
align-items
:
center
;
}
.empty-placeholder
{
padding
:
50px
;
text-align
:
center
;
...
...
src/api/ecw/productPrice.js
View file @
d2308455
...
...
@@ -107,3 +107,12 @@ export function getProductPriceGetPrice(query) {
params
:
query
})
}
// 更新单询
export
function
updateOrderInquiry
(
data
)
{
return
request
({
url
:
'
/ecw/product-price/updateOrderInquiry
'
,
method
:
'
put
'
,
data
:
data
})
}
src/utils/dict.js
View file @
d2308455
...
...
@@ -188,6 +188,8 @@ export const DICT_TYPE = {
WAREHOUSING_SPECIFICATION_TYPE
:
'
warehousing_specification_type
'
,
ECW_AUTH_TYPE
:
'
auth_type
'
,
//品牌授权
NEED_ORDER_INQUIRY
:
'
need_order_inquiry
'
,
// 是否需要単询
ECASH_INIT
:
'
ecash_init
'
,
//e-cash
FEE_TYPE
:
'
receivable_fee_type
'
,
// PAY_TYPE:'payment_type',
...
...
src/views/ecw/productPrice/batchEdit.vue
View file @
d2308455
...
...
@@ -13,6 +13,8 @@
<el-checkbox
label=
""
@
change=
"form.stepPrice=$event ? 1 : 0"
>
{{
$t
(
'
阶梯价格
'
)
}}
</el-checkbox>
</span>
</div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('预付')"
prop=
"needPay"
>
<el-radio-group
v-model=
"form.needPay"
>
<el-radio
:label=
"1"
>
{{
$t
(
'
预付
'
)
}}
</el-radio>
...
...
@@ -59,7 +61,7 @@
<
/el-form-item
>
<
/div
>
<
/template
>
<!--
非阶梯订单
-->
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('最小起计量')
"
...
...
@@ -125,6 +127,28 @@
-
<
el
-
date
-
picker
v
-
model
=
"
form.validateEndDate
"
value
-
format
=
"
yyyy-MM-dd HH:mm:ss
"
><
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
v
-
if
=
"
form.stepPrice
"
>
<
h2
>
{{
$t
(
'
快捷设置
'
)
}}
<
/h2
>
<
div
class
=
"
flex items-center
"
>
{{
$t
(
'
批量加价
'
)
}}
+
<
el
-
input
v
-
model
=
"
quickForm.plus
"
class
=
"
w-100 ml-10 mr-10
"
:
disabled
=
"
!!quickForm.minus
"
><
/el-input
>
<
selector
disabled
v
-
model
=
"
currencyAndUnit.currency
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/ <selector disabled v-model="currencyAndUnit.unit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" class="w-100" /
>
<
div
class
=
"
ml-10
"
>
{{
$t
(
'
*针对所有价格加价
'
)
}}
<
/div
>
<
/div
>
<
div
class
=
"
flex items-center mt-10
"
>
{{
$t
(
'
批量减价
'
)
}}
-
<
el
-
input
v
-
model
=
"
quickForm.minus
"
class
=
"
w-100 ml-10 mr-10
"
:
disabled
=
"
!!quickForm.plus
"
><
/el-input
>
<
selector
disabled
v
-
model
=
"
currencyAndUnit.currency
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/ <selector disabled v-model="currencyAndUnit.unit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" class="w-100" /
>
<
div
class
=
"
ml-10
"
>
{{
$t
(
'
*针对所有价格加价
'
)
}}
<
/div
>
<
/div
>
<
div
class
=
"
mt-10
"
>
<
el
-
button
@
click
=
"
quickSet
"
type
=
"
primary
"
:
disabled
=
"
!quickForm.plus && !quickForm.minus
"
>
{{
$t
(
'
确定
'
)
}}
<
/el-button
>
<
/div
>
<
/el-col
>
<
/el-row
>
<
/el-card
>
...
...
@@ -154,8 +178,7 @@
<
/template
>
<
el
-
form
-
item
:
label
=
"
$t('是否単询')
"
prop
=
"
inquiry
"
>
<!--
// TODO 字段待完善-->
<
el
-
input
v
-
model
.
number
=
"
form.needOrderInquiry
"
type
=
"
number
"
style
=
"
width:200px
"
/>
<
dict
-
selector
:
type
=
"
DICT_TYPE.NEED_ORDER_INQUIRY
"
v
-
model
=
"
form.needOrderInquiry
"
form
-
type
=
"
radio
"
><
/dict-selector
>
<
/el-form-item
>
<
/el-card
>
<
/el-form
>
...
...
@@ -168,19 +191,16 @@
<
/template
>
<
script
>
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
{
createProductPrice
,
updateProductPrice
,
batchUpdateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPriceList
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
getProductType
,
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
batchUpdateProductPrice
}
from
"
@/api/ecw/productPrice
"
;
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
Selector
from
'
@/components/Selector
'
import
Inputor
from
'
@/components/Inputor
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
Template
from
"
@/views/cms/template
"
;
import
Decimal
from
'
decimal.js
'
export
default
{
components
:
{
Template
,
RoutersSelector
,
ProductsSelector
,
Selector
,
Inputor
}
,
components
:
{
RoutersSelector
,
ProductsSelector
,
Selector
,
Inputor
}
,
data
()
{
return
{
checkList
:
[],
...
...
@@ -206,12 +226,30 @@ export default {
productDisabled
:
true
,
lineList
:
[],
//路线数组
loading
:
false
,
// 批量加价/减价
quickForm
:{
}
}
}
,
computed
:
{
// 类型,默认海运sea,air表示空运
type
(){
return
this
.
$route
.
path
.
split
(
/
[
-_
]
/
).
pop
()
}
,
// 默认运费的货币和体积单位
currencyAndUnit
(){
let
currency
=
null
,
unit
=
null
,
fields
=
null
// 如果是阶梯价格则取第一阶梯,否则就取form中的字段
let
obj
=
this
.
form
.
stepPrice
==
1
?
this
.
form
.
priceStepList
[
0
]
:
this
.
form
// 全包价
if
(
this
.
form
.
priceType
==
1
){
currency
=
obj
.
allPriceUnit
unit
=
obj
.
allVolumeUnit
}
else
{
currency
=
obj
.
transportPriceUnit
unit
=
obj
.
transportVolumeUnit
}
return
{
currency
,
unit
}
}
}
,
watch
:
{
...
...
@@ -226,43 +264,7 @@ export default {
}
,
product
()
{
this
.
$set
(
this
.
form
,
'
productType
'
,
this
.
product
.
typeId
)
/* getProductType(this.product.typeId).then(res => {
this.productType = res.data
}
) */
}
,
/*
批量操作没有回显需求
form(val) {
if (!val) return
// 特殊需求回显
if (val.specialList) {
let keyed = arrryToKeyedObjectBy(val.specialList, 'specialDictType')
this.specialList.map((item, index) => {
if (keyed[item.specialDictType]) {
for (let field in item) {
if (keyed[item.specialDictType][field]) {
item[field] = keyed[item.specialDictType][field]
}
}
}
}
)
}
}
, */
/* 'form.transportVolumeUnit'(val){
this.specialProducts.forEach(item => {
item.transportVolumeUnit = val
}
)
}
,
'form.clearanceVolumeUnit'(val){
this.specialProducts.forEach(item => {
item.clearanceVolumeUnit = val
}
)
}
,
'form.allVolumeUnit'(val){
this.specialProducts.forEach(item => {
item.allVolumeUnit = val
}
)
}
, */
'
form.stepPrice
'
(
stepPrice
){
if
(
stepPrice
==
1
&&
!
this
.
form
.
priceStepList
.
length
){
this
.
form
.
priceStepList
=
[{
}
,
{
}
]
...
...
@@ -413,6 +415,17 @@ export default {
.
finally
(
res
=>
this
.
loading
=
false
)
}
);
}
,
// 快捷设置,只更新默认运费
quickSet
(){
// 字段,根据是否全包价来取
let
field
=
this
.
form
.
priceType
==
1
?
'
allPrice
'
:
'
transportPrice
'
// 取得要加的数额(减少则是负数)
let
amount
=
Decimal
(
this
.
quickForm
.
plus
||
-
this
.
quickForm
.
minus
)
this
.
form
.
priceStepList
.
forEach
(
item
=>
{
// 加上对应的价格,但是不能小于0
this
.
$set
(
item
,
field
,
Math
.
max
(
0
,
Decimal
(
item
[
field
]
||
0
).
plus
(
amount
).
toNumber
()))
}
)
}
}
}
<
/script
>
...
...
src/views/ecw/productPrice/index.vue
View file @
d2308455
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
:
this
.
$t
(
'
全部
'
)
}}{{
$t
(
'
路线价格列表
'
)
}}
</div>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
+
$t
(
'
路线价格列表
'
)
:
routeName
}}
</div>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
:label=
"$t('商品名称')"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
...
...
@@ -15,7 +15,8 @@
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
>
<!--海运不显示渠道-->
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
v-if=
"type == 'sea'"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
</el-select>
...
...
@@ -61,9 +62,9 @@
<!--
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit"
>
{{
$t
(
'
批量设置价格
'
)
}}
</el-button>
-->
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:bartch_black']"
size=
"mini"
@
click=
"batchBlock"
:disabled=
"multiple"
>
{{
$t
(
'
批量加入黑名单
'
)
}}
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_down']"
size=
"mini"
@
click=
"batchOff"
:disabled=
"multiple"
>
{{
$t
(
'
批量下架
'
)
}}
</el-button>
<el-button
type=
"warning"
v-hasPermi=
"['ecw:product-price:export']"
@
click=
"handleExport"
:loading=
"exportLoading"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('sea')"
>
{{
$t
(
'
批量设置海运价格
'
)
}}
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('air')"
>
{{
$t
(
'
批量设置空运价格
'
)
}}
</el-button>
<el-button
type=
"warning"
v-hasPermi=
"['ecw:product-price:export']"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
<el-button
type=
"primary"
v-
if=
"type != 'air'"
v-
hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('sea')"
>
{{
$t
(
'
批量设置海运价格
'
)
}}
</el-button>
<el-button
type=
"primary"
v-
if=
"type != 'sea'"
v-
hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('air')"
>
{{
$t
(
'
批量设置空运价格
'
)
}}
</el-button>
</
template
>
<!--指定商品-->
...
...
@@ -179,7 +180,11 @@
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('単询')
"
align
=
"
center
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.NEED_ORDER_INQUIRY
"
:
value
=
"
scope.row.needOrderInquiry
"
><
/dict-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('预付')
"
align
=
"
center
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
>
...
...
@@ -208,6 +213,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
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
@@ -219,7 +227,17 @@
<
/template
>
<
script
>
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
,
batchBlock
,
batchOff
}
from
"
@/api/ecw/productPrice
"
;
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
,
batchBlock
,
batchOff
,
updateOrderInquiry
}
from
"
@/api/ecw/productPrice
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
...
...
@@ -325,6 +343,22 @@ export default {
}
,
computed
:
{
// 路径中的运输方式参数
transportType
()
{
return
this
.
$route
.
path
.
split
(
'
-
'
).
pop
();
}
,
// 路由中的标题
routeName
(){
return
this
.
$route
.
name
}
,
// 类型,transportType是1和2(1_2用一个表示)表示海运,3和4表示空运
type
(){
// 如果没有则表示商品路线价格
if
(
!
this
.
transportType
){
return
null
}
return
[
'
3
'
,
'
4
'
].
indexOf
(
this
.
transportType
)
>
-
1
?
'
air
'
:
'
sea
'
}
,
// 商品名称
productTitle
(){
if
(
!
this
.
product
){
...
...
@@ -468,6 +502,10 @@ export default {
this
.
product
=
res
.
data
}
)
}
else
{
// 如果指定了单个的运输方式则赋值
if
(
this
.
transportType
.
split
(
'
_
'
).
length
==
1
){
this
.
$set
(
this
.
queryParams
,
'
transportType
'
,
+
this
.
transportType
)
}
this
.
getAttrList
();
}
...
...
@@ -754,6 +792,19 @@ export default {
}
)
}
,
// 设置,取消単询
setOrderInquiry
(
row
,
needOrderInquiry
){
row
.
needOrderInquiry
=
needOrderInquiry
updateOrderInquiry
(
row
).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
}
)
}
,
// 复制模板
copyTemplate
(
row
){
this
.
$alert
(
'
// TODO
'
)
}
}
}
;
<
/script
>
...
...
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