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 a37724de
authored
Aug 28, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
采购商城,订单接口切换
1 parent
ce0220b4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
36 deletions
src/api/modules/purchase.js
src/views/inSale/components/addressCom.vue
src/views/inSale/porder.vue
src/views/inSale/purchase.vue
src/api/modules/purchase.js
View file @
a37724d
...
...
@@ -6,7 +6,7 @@ const path3 = 'dj.api.smartcarlife.'
// 获取当前登录园区店商户收货地址
const
addressGet
=
(
params
=
{})
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.get
`
params
.
routerMethod
=
`
dj.api.smarcarlife.yqMerchantDeliveryAddress.getByNoLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
@@ -29,7 +29,7 @@ const getAreaInfoApi = function (params) {
// 分页查询采购订单
const
getPurchaseOrderList
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.page`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.page
.noLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
@@ -68,7 +68,7 @@ const listWithPagePurchaseInfo = (params) => {
// 保存园区店商户收货地址
const
addressSave
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.save
`
params
.
routerMethod
=
`
dj.api.smarcarlife.yqMerchantDeliveryAddress.saveByNoLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
@@ -138,7 +138,7 @@ export function purchaseOrderAdd(params) {
export
function
exportExcel
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.export`
params
.
routerMethod
=
`dj.api.smarcarlife.purchaseApply.export
.noLogin
`
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
...
...
src/views/inSale/components/addressCom.vue
View file @
a37724d
<
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 @
a37724d
...
...
@@ -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 @
a37724d
...
...
@@ -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
...
...
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