Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 360ee3fc
authored
Sep 01, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'V4.27.0' into 'master'
V4.27.0 See merge request
!32
2 parents
bf7c1cd2
9bce928c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
149 deletions
src/api/modules/purchase.js
src/views/beforeSale/editEquity.vue
src/views/beforeSale/equityList.vue
src/views/inSale/components/addressCom.vue
src/views/inSale/porder.vue
src/views/inSale/purchase.vue
src/api/modules/purchase.js
View file @
360ee3f
import
{
http
}
from
'@/main'
const
path
=
'dj.api.smarcarlife.'
const
path2
=
'dj.api.goodsInfo.'
const
path3
=
'dj.api.smartcarlife.'
// 获取当前登录园区店商户收货地址
const
addressGet
=
(
params
=
{})
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.get
`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`
dj.api.smarcarlife.yqMerchantDeliveryAddress.getByNoLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
@@ -16,7 +14,7 @@ const addressGet = (params = {}) => {
}
// 获取省市区信息
const
getAreaInfoApi
=
function
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`dj.api.yseMerchantOffline.getAreaInfo`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
...
...
@@ -28,8 +26,8 @@ const getAreaInfoApi = function (params) {
// 分页查询采购订单
const
getPurchaseOrderList
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.page`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.page
.noLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
@@ -39,7 +37,7 @@ const getPurchaseOrderList = (params) => {
}
// 采购订单取消/审核
const
purchaseOrderCancelOrCheck
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.cancel`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
...
...
@@ -52,7 +50,7 @@ const purchaseOrderCancelOrCheck = (params) => {
// 分页查询采购上架记录
const
listWithPagePurchaseInfo
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`dj.api.smartcarlife.purchaseMall.page`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
...
...
@@ -67,8 +65,8 @@ const listWithPagePurchaseInfo = (params) => {
// 保存园区店商户收货地址
const
addressSave
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.save
`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`
dj.api.smarcarlife.yqMerchantDeliveryAddress.saveByNoLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
@@ -79,7 +77,7 @@ const addressSave = (params) => {
// 按商品类目分组获取购物车列表
const
listGroupByGoodsType
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.listGroupByGoodsType`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
...
...
@@ -90,41 +88,9 @@ const listGroupByGoodsType = (params) => {
}
// 更新购物车商品选中标识
const
updateSelectedFlag
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.updateSelectedFlag`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 添加到购物车
const
shoppingCarAdd
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseShoppingCar.add`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 添加采购订单
export
function
purchaseOrderAdd
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.add`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
...
...
@@ -137,8 +103,8 @@ export function purchaseOrderAdd(params) {
export
function
exportExcel
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router
.twoCityTale
`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.export`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.export
.noLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
@@ -147,68 +113,10 @@ export function exportExcel(params) {
})
}
// 采购订单入库
export
function
purchaseOrderPutIn
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
purchaseOrder.putIn`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 获取下单/入库门店
export
function
getMerchantList
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path3
}
permission.yqMerchant.list`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//查询园区店关联的4s店列表 -入库门店
const
get4SRefByYqShopList
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.scenemerchantref.query4SRefByYqShop`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//编辑
export
function
selectByOrderCode
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseOrder.selectByOrderCode`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 是否有发货主体
export
function
checkShipper
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseOrder.checkShipper`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 确认发货
// export function purchaseOrderConfirmDelivery(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// data.routerMethod = `${path}purchaseOrder.confirmDelivery`
// return http(data)
// }
export
default
{
getAreaInfoApi
,
checkShipper
,
get4SRefByYqShopList
,
selectByOrderCode
,
getMerchantList
,
purchaseOrderPutIn
,
exportExcel
,
purchaseOrderAdd
,
shoppingCarAdd
,
updateSelectedFlag
,
listGroupByGoodsType
,
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
export
default
{
getAreaInfoApi
,
exportExcel
,
purchaseOrderAdd
,
listGroupByGoodsType
,
getPurchaseOrderList
,
purchaseOrderCancelOrCheck
,
listWithPagePurchaseInfo
,
addressGet
,
addressSave
}
\ No newline at end of file
src/views/beforeSale/editEquity.vue
View file @
360ee3f
...
...
@@ -1399,7 +1399,7 @@ export default {
let
targetItem
=
productArrData
.
find
(
k
=>
k
.
packageCode
==
item
.
packageCode
)
const
defalutAttr
=
this
.
handleDefaultValue
(
targetItem
,
item
.
attributeDTOList
)
if
(
defalutAttr
.
length
)
{
item
.
attributeDTOList
=
[...
defalutAttr
,...
item
.
attributeDTOList
]
item
.
attributeDTOList
=
this
.
handlerAttrSetValue
(
this
.
unique
(
defalutAttr
),
item
.
attributeDTOList
)
}
if
(
targetItem
.
packageType
==
1
)
{
this
.
equityRadio
=
2
...
...
@@ -1519,6 +1519,22 @@ export default {
this
.
checkCodeList
=
packCode
this
.
handleProductArrParam
(
attrList
,
packCode
)
},
// 处理详情属性值赋值
handlerAttrSetValue
(
defaultList
,
targetList
){
let
arr
=
[],
nameList
=
[],
result
=
[]
targetList
.
forEach
(
el
=>
{
nameList
.
push
(
el
.
attributeName
)
})
defaultList
.
forEach
(
el
=>
{
if
(
nameList
.
includes
(
el
.
attributeName
)){
}
else
{
arr
.
push
(
el
)
}
})
result
=
[...
arr
,...
targetList
]
return
result
},
// 处理默认值赋值
handleDefaultValue
(
targetItem
,
attributeDTOList
)
{
const
currentPackageValue
=
this
.
productModal
[
targetItem
.
idName
]
...
...
src/views/beforeSale/equityList.vue
View file @
360ee3f
...
...
@@ -185,7 +185,7 @@ export default {
searchForm
:
{
queryText
:
''
,
orderStatus
:
''
,
packageCode
:
''
,
packageCode
List
:
[]
,
merchantId
:
''
,
dqtId
:
''
,
pqId
:
''
,
...
...
@@ -256,12 +256,13 @@ export default {
},
{
label
:
'产品名称'
,
name
:
'packageCode'
,
name
:
'packageCode
List
'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'packageCode'
,
optionLabel
:
'packageName'
,
optionsName
:
'goodsStatusList'
optionsName
:
'goodsStatusList'
,
multiple
:
true
},
{
label
:
'提单成功时间'
,
...
...
@@ -650,8 +651,10 @@ export default {
this
.
$refs
.
equityRef
.
page
.
pageSize
=
5
this
.
$apis
.
beforeSale
.
getProListApi
({}).
then
(
res
=>
{
this
.
baseData
.
goodsStatusList
=
res
this
.
getOptionsList
(
'searchFormData'
)
this
.
getOptionsList
(
'searchFormData'
,
false
,
'packageCodeList'
)
})
//服务状态
this
.
getOptionsList
(
'searchFormData'
,
true
,
'orderStatus'
)
this
.
getCountNoData
()
this
.
$apis
.
beforeSale
.
getUserInfoApi
({}).
then
(
res
=>
{
this
.
userInfo
=
res
...
...
src/views/inSale/components/addressCom.vue
View file @
360ee3f
<
template
>
<el-drawer
ref=
"drawerRef"
class=
"shoppingCartDrawerCon"
v-bind=
"$attrs"
title=
"收货地址管理"
size=
"774px"
:direction=
"direction"
:before-close=
"cancel"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
labelWidth=
"154px"
defaultWidth=
"432px"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<el-drawer
ref=
"drawerRef"
class=
"shoppingCartDrawerCon"
v-bind=
"$attrs"
title=
"收货地址管理"
size=
"774px"
:direction=
"direction"
:before-close=
"cancel"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
labelWidth=
"154px"
defaultWidth=
"432px"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<span
slot=
"provincesAndCities"
>
<el-cascader
v-model=
"editForm.provincesAndCities"
size=
"mini"
ref=
"cascader"
placeholder=
"请选择 省/市/区"
style=
"width:432px"
:options=
"provincesAndCities_options"
:props=
"
{ label: 'name', value: 'code', children: 'childrenList' }" />
<el-cascader
v-model=
"editForm.provincesAndCities"
size=
"mini"
ref=
"cascader"
placeholder=
"请选择 省/市/区"
style=
"width: 432px"
:options=
"provincesAndCities_options"
:props=
"
{ label: 'name', value: 'code', children: 'childrenList' }" />
</span>
</glsx-combi-form>
<div
class=
"footer-btn"
>
<span
class=
"btn"
>
<el-button
size=
"small"
@
click=
"cancel"
>
取消
</el-button>
<el-button
size=
"small"
@
click=
"submit"
type=
"primary"
>
保存
</el-button>
<el-button
size=
"small"
@
click=
"cancel"
>
取消
</el-button>
<el-button
size=
"small"
@
click=
"submit"
type=
"primary"
>
保存
</el-button>
</span>
</div>
</el-drawer>
</
template
>
...
...
@@ -106,8 +101,6 @@ export default {
this
.
editForm
=
{}
}
}
}
},
created
()
{
...
...
@@ -118,7 +111,6 @@ export default {
getAreaInfo
()
{
this
.
$apis
.
purchase
.
getAreaInfoApi
({
areaType
:
'2'
}).
then
(
res
=>
{
this
.
provincesAndCities_options
=
res
.
areaList
})
},
getProvincesAndCities
()
{
...
...
@@ -137,7 +129,11 @@ export default {
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
getProvincesAndCities
()
let
{
merchantId
,
accountName
,
merchantName
}
=
this
.
$globalState
.
session
const
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
params
.
merchantId
=
merchantId
params
.
merchantName
=
merchantName
params
.
updatedBy
=
accountName
delete
params
.
provincesAndCities
this
.
$apis
.
purchase
.
addressSave
(
params
)
...
...
@@ -149,7 +145,7 @@ export default {
this
.
$parent
.
addressComVisible
=
false
this
.
$emit
(
'handleConfirmAddress'
)
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{})
}
})
},
...
...
@@ -157,8 +153,7 @@ export default {
this
.
$parent
.
addressComVisible
=
false
},
validPhone
(
mobile
)
{
const
myreg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
const
myreg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
return
myreg
.
test
(
mobile
)
}
}
...
...
@@ -167,7 +162,6 @@ export default {
<
style
lang=
"scss"
scoped
>
.shoppingCartDrawerCon
{
//
position
:
relative
;
/deep/
.el-drawer__header
{
border-bottom
:
1px
solid
#e7eaec
;
...
...
@@ -178,26 +172,26 @@ export default {
}
/
deep
/
.el-textarea
{
width
:
580px
!important
;
width
:
580px
!important
;
.el-textarea__inner
{
height
:
auto
!important
;
}
}
.footer-btn
{
width
:
774px
;
height
:
64px
;
border-radius
:
4px
;
border-top
:
1px
solid
#E5E5E
5
;
position
:
fixed
;
bottom
:
0
;
text-align
:
right
;
line-height
:
64px
;
width
:
774px
;
height
:
64px
;
border-radius
:
4px
;
border-top
:
1px
solid
#e5e5e
5
;
position
:
fixed
;
bottom
:
0
;
text-align
:
right
;
line-height
:
64px
;
.btn
{
text-align
:
right
;
margin-right
:
20px
;
}
.btn
{
text-align
:
right
;
margin-right
:
20px
;
}
}
}
</
style
>
src/views/inSale/porder.vue
View file @
360ee3f
...
...
@@ -196,6 +196,7 @@ export default {
params
.
orderTimeStr
[
0
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
orderTimeStr
[
1
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
params
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
delete
params
.
placeOrderTimeStr
return
params
},
...
...
@@ -229,7 +230,7 @@ export default {
},
//取消
handleCancel
(
row
)
{
this
.
secondConfirm
(
'取消'
,
'订单取消后即自动作废该订单,且无法撤回。是否确定取消?'
,
'purchase'
,
'purchaseOrderCancelOrCheck'
,
{
id
:
row
.
id
})
this
.
secondConfirm
(
'取消'
,
'订单取消后即自动作废该订单,且无法撤回。是否确定取消?'
,
'purchase'
,
'purchaseOrderCancelOrCheck'
,
{
id
:
row
.
id
,
updatedBy
:
this
.
$globalState
.
session
.
accountName
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
...
...
src/views/inSale/purchase.vue
View file @
360ee3f
...
...
@@ -191,8 +191,11 @@ export default {
}
,
methods
:
{
getAddressInfo
()
{
const
{
merchantId
}
=
this
.
$globalState
.
session
this
.
$apis
.
purchase
.
addressGet
()
.
addressGet
({
merchantId
}
)
.
then
(
result
=>
{
if
(
result
)
{
this
.
addressInfo
=
result
...
...
@@ -258,6 +261,7 @@ export default {
handleSubmit
()
{
this
.
throttleSubmit
=
true
const
{
contactAddress
,
contactName
,
contactPhone
,
provinceId
,
provinceName
,
cityId
,
cityName
,
areaId
,
areaName
}
=
this
.
addressInfo
let
{
merchantId
,
accountName
,
merchantName
}
=
this
.
$globalState
.
session
const
params
=
{
purchaseMallId
:
this
.
goodsInfo
.
id
,
goodsNumber
:
this
.
goodsNumber
,
...
...
@@ -269,7 +273,10 @@ export default {
cityId
,
cityName
,
areaId
,
areaName
areaName
,
merchantId
,
merchantName
,
updatedBy
:
accountName
}
if
(
provinceName
==
null
)
{
this
.
$message
.
error
(
'请先完善收货地址'
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment