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
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
23 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.'
...
@@ -6,7 +6,7 @@ const path3 = 'dj.api.smartcarlife.'
// 获取当前登录园区店商户收货地址
// 获取当前登录园区店商户收货地址
const
addressGet
=
(
params
=
{})
=>
{
const
addressGet
=
(
params
=
{})
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.get
`
params
.
routerMethod
=
`
dj.api.smarcarlife.yqMerchantDeliveryAddress.getByNoLogin
`
return
http
({
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
@@ -29,7 +29,7 @@ const getAreaInfoApi = function (params) {
...
@@ -29,7 +29,7 @@ const getAreaInfoApi = function (params) {
// 分页查询采购订单
// 分页查询采购订单
const
getPurchaseOrderList
=
(
params
)
=>
{
const
getPurchaseOrderList
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
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
({
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
@@ -68,7 +68,7 @@ const listWithPagePurchaseInfo = (params) => {
...
@@ -68,7 +68,7 @@ const listWithPagePurchaseInfo = (params) => {
// 保存园区店商户收货地址
// 保存园区店商户收货地址
const
addressSave
=
(
params
)
=>
{
const
addressSave
=
(
params
)
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
`
${
path
}
yqMerchantDeliveryAddress.save
`
params
.
routerMethod
=
`
dj.api.smarcarlife.yqMerchantDeliveryAddress.saveByNoLogin
`
return
http
({
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
@@ -138,7 +138,7 @@ export function purchaseOrderAdd(params) {
...
@@ -138,7 +138,7 @@ export function purchaseOrderAdd(params) {
export
function
exportExcel
(
params
)
{
export
function
exportExcel
(
params
)
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
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
({
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
...
src/views/inSale/components/addressCom.vue
View file @
a37724d
<
template
>
<
template
>
<el-drawer
ref=
"drawerRef"
class=
"shoppingCartDrawerCon"
v-bind=
"$attrs"
title=
"收货地址管理"
size=
"774px"
<el-drawer
ref=
"drawerRef"
class=
"shoppingCartDrawerCon"
v-bind=
"$attrs"
title=
"收货地址管理"
size=
"774px"
:direction=
"direction"
:before-close=
"cancel"
>
: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"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
labelWidth=
"154px"
defaultWidth=
"432px"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<span
slot=
"provincesAndCities"
>
<span
slot=
"provincesAndCities"
>
<el-cascader
v-model=
"editForm.provincesAndCities"
size=
"mini"
ref=
"cascader"
placeholder=
"请选择 省/市/区"
<el-cascader
v-model=
"editForm.provincesAndCities"
size=
"mini"
ref=
"cascader"
placeholder=
"请选择 省/市/区"
style=
"width: 432px"
:options=
"provincesAndCities_options"
:props=
"
{ label: 'name', value: 'code', children: 'childrenList' }" />
style=
"width:432px"
:options=
"provincesAndCities_options"
:props=
"
{ label: 'name', value: 'code', children: 'childrenList' }" />
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<div
class=
"footer-btn"
>
<div
class=
"footer-btn"
>
...
@@ -14,7 +10,6 @@
...
@@ -14,7 +10,6 @@
<el-button
size=
"small"
@
click=
"cancel"
>
取消
</el-button>
<el-button
size=
"small"
@
click=
"cancel"
>
取消
</el-button>
<el-button
size=
"small"
@
click=
"submit"
type=
"primary"
>
保存
</el-button>
<el-button
size=
"small"
@
click=
"submit"
type=
"primary"
>
保存
</el-button>
</span>
</span>
</div>
</div>
</el-drawer>
</el-drawer>
</
template
>
</
template
>
...
@@ -106,8 +101,6 @@ export default {
...
@@ -106,8 +101,6 @@ export default {
this
.
editForm
=
{}
this
.
editForm
=
{}
}
}
}
}
}
}
},
},
created
()
{
created
()
{
...
@@ -118,7 +111,6 @@ export default {
...
@@ -118,7 +111,6 @@ export default {
getAreaInfo
()
{
getAreaInfo
()
{
this
.
$apis
.
purchase
.
getAreaInfoApi
({
areaType
:
'2'
}).
then
(
res
=>
{
this
.
$apis
.
purchase
.
getAreaInfoApi
({
areaType
:
'2'
}).
then
(
res
=>
{
this
.
provincesAndCities_options
=
res
.
areaList
this
.
provincesAndCities_options
=
res
.
areaList
})
})
},
},
getProvincesAndCities
()
{
getProvincesAndCities
()
{
...
@@ -137,7 +129,11 @@ export default {
...
@@ -137,7 +129,11 @@ export default {
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
getProvincesAndCities
()
this
.
getProvincesAndCities
()
let
{
merchantId
,
accountName
,
merchantName
}
=
this
.
$globalState
.
session
const
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
const
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
params
.
merchantId
=
merchantId
params
.
merchantName
=
merchantName
params
.
updatedBy
=
accountName
delete
params
.
provincesAndCities
delete
params
.
provincesAndCities
this
.
$apis
.
purchase
this
.
$apis
.
purchase
.
addressSave
(
params
)
.
addressSave
(
params
)
...
@@ -149,7 +145,7 @@ export default {
...
@@ -149,7 +145,7 @@ export default {
this
.
$parent
.
addressComVisible
=
false
this
.
$parent
.
addressComVisible
=
false
this
.
$emit
(
'handleConfirmAddress'
)
this
.
$emit
(
'handleConfirmAddress'
)
})
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{})
}
}
})
})
},
},
...
@@ -157,8 +153,7 @@ export default {
...
@@ -157,8 +153,7 @@ export default {
this
.
$parent
.
addressComVisible
=
false
this
.
$parent
.
addressComVisible
=
false
},
},
validPhone
(
mobile
)
{
validPhone
(
mobile
)
{
const
myreg
=
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}
$/
/^
(
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
)
return
myreg
.
test
(
mobile
)
}
}
}
}
...
@@ -167,7 +162,6 @@ export default {
...
@@ -167,7 +162,6 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.shoppingCartDrawerCon
{
.shoppingCartDrawerCon
{
//
position
:
relative
;
//
position
:
relative
;
/deep/
.el-drawer__header
{
/deep/
.el-drawer__header
{
border-bottom
:
1px
solid
#e7eaec
;
border-bottom
:
1px
solid
#e7eaec
;
...
@@ -178,7 +172,7 @@ export default {
...
@@ -178,7 +172,7 @@ export default {
}
}
/
deep
/
.el-textarea
{
/
deep
/
.el-textarea
{
width
:
580px
!important
;
width
:
580px
!important
;
.el-textarea__inner
{
.el-textarea__inner
{
height
:
auto
!important
;
height
:
auto
!important
;
}
}
...
@@ -188,7 +182,7 @@ export default {
...
@@ -188,7 +182,7 @@ export default {
width
:
774px
;
width
:
774px
;
height
:
64px
;
height
:
64px
;
border-radius
:
4px
;
border-radius
:
4px
;
border-top
:
1px
solid
#E5E5E
5
;
border-top
:
1px
solid
#e5e5e
5
;
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
text-align
:
right
;
text-align
:
right
;
...
...
src/views/inSale/porder.vue
View file @
a37724d
...
@@ -196,6 +196,7 @@ export default {
...
@@ -196,6 +196,7 @@ export default {
params
.
orderTimeStr
[
0
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
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
.
orderTimeStr
[
1
]
=
new
Date
(
this
.
searchForm
.
placeOrderTimeStr
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
}
params
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
delete
params
.
placeOrderTimeStr
delete
params
.
placeOrderTimeStr
return
params
return
params
},
},
...
@@ -229,7 +230,7 @@ export default {
...
@@ -229,7 +230,7 @@ export default {
},
},
//取消
//取消
handleCancel
(
row
)
{
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
)
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
...
...
src/views/inSale/purchase.vue
View file @
a37724d
...
@@ -191,8 +191,11 @@ export default {
...
@@ -191,8 +191,11 @@ export default {
}
,
}
,
methods
:
{
methods
:
{
getAddressInfo
()
{
getAddressInfo
()
{
const
{
merchantId
}
=
this
.
$globalState
.
session
this
.
$apis
.
purchase
this
.
$apis
.
purchase
.
addressGet
()
.
addressGet
({
merchantId
}
)
.
then
(
result
=>
{
.
then
(
result
=>
{
if
(
result
)
{
if
(
result
)
{
this
.
addressInfo
=
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