Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
wly-APP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
刘川
wly-APP
Commits
c4d8d4ee
Commit
c4d8d4ee
authored
May 19, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团购单位 团购商机 mock数据联调
parent
f9e98733
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
244 additions
and
100 deletions
+244
-100
group-baseinfo.nvue
pages/group-buy/group-baseinfo.nvue
+62
-34
select-business.vue
pages/select-business/select-business.vue
+85
-29
select-group-client.vue
pages/select-group-client/select-group-client.vue
+74
-33
select-sale-plan.vue
pages/select-sale-plan/select-sale-plan.vue
+0
-3
common.js
servers/common.js
+23
-1
No files found.
pages/group-buy/group-baseinfo.nvue
View file @
c4d8d4ee
...
...
@@ -6,7 +6,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">
请选择
</text>
<text class="middle-date-des">
{{selectedGroupClient.OBJNAME}}
</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
...
...
@@ -17,7 +17,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">{{selectedBusiness.
product
}}</text>
<text class="middle-date-des">{{selectedBusiness.
NAME
}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
...
...
@@ -28,7 +28,10 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择</text>
<picker class="picker-block" @change="bindPickerYearChange" mode="selector"
range-key='value' :value="condition.ZZFLD000099" :range="status">
<text class="uni-input">{{status[condition.ZZFLD000099].value}}</text>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
...
...
@@ -39,7 +42,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">
请选择
</text>
<text class="middle-date-des">
{{selectedAddress.name}}
</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
...
...
@@ -80,24 +83,42 @@
export default {
data() {
return {
selectedBusiness: {
id:'请选择',
checked:false,
product:'请填写',
quantity:0,
price:0
selectedBusiness: {},
selectedGroupClient: {
ADDRESS: "中南海",
CITYDESC: "北京市",
DISTRICTDESC: "东城区",
ID: "CVG00000FGI",
OBJNAME: "哈工",
PROVICEDESC: "北京市",
SALESAREADESC: "北京营销战区",
SUBSALESAREADESC: "北京基地"
},
selectedGroupClient:{
id:'请选择',
checked:false,
product:'请填写',
quantity:0,
price:0
selectedAddress: {},
condition: {
'GRPUTID': '', // 团购单位编码
'BUSOPPID': '', // 商机编码
'ZZFLD000099': 0, // 是否盒外刻字
'ZZFLD00008T': '', // 收货方
'ZZFLD000098': '', // 喷码内容
'ZZFLD00002L': '', // 收货联系人
'ZZFLD00002M': '', // 收货联系电话
'ZZFLD00002N': '', // 收货地址
},
designIndex: 0,
status: [{
key: 0,
value: '否'
},
{
key: 1,
value: '是',
}
]
}
},
onBackPress(event){
console.log('event',event)
onBackPress(event)
{
console.log('event',
event)
uni.switchTab({
url: `/pages/go-order/go-order`
})
...
...
@@ -106,27 +127,35 @@
mounted() {
console.log('监听到事件来自 update');
let _this = this
uni.$once('selectedBusiness',function(data){
console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:' + data.selectedBusiness.id);
_this.selectedBusiness = {...data.selectedBusiness}
uni.$once('selectedBusiness', function(data) {
console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:', data);
_this.selectedBusiness = {
...data.selectedBusiness
}
})
uni.$once('selectedGroupClient',function(data){
console.log('监听到事件来自 selectedGroupClient ,携带参数 msg 为:' + data.selectedGroupClient.id);
_this.selectedGroupClient = {...data.selectedGroupClient}
uni.$once('selectedGroupClient', function(data) {
console.log('监听到事件来自 selectedGroupClient ,携带参数 msg 为:', data);
_this.selectedGroupClient = {
...data.selectedGroupClient
}
})
},
methods: {
selectGroupClient(){
bindPickerYearChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.condition.ZZFLD000099 = e.detail.value
},
selectGroupClient() {
uni.navigateTo({
url: `/pages/select-group-client/select-group-client`
url: `/pages/select-group-client/select-group-client
?from=groupBaseInfo&mode=&index=
`
});
},
selectBusiness(){
selectBusiness()
{
uni.navigateTo({
url: `/pages/select-business/select-business`
});
},
selectAddress(){
selectAddress()
{
uni.navigateTo({
url: `/pages/address-manage/address-manage`
});
...
...
@@ -230,8 +259,7 @@
flex-direction: column;
}
.planout-block-item {
}
.planout-block-item {}
.bottom-area {
height: 140rpx;
...
...
pages/select-business/select-business.vue
View file @
c4d8d4ee
...
...
@@ -6,18 +6,18 @@
<view
class=
"middle view planout-block-item"
>
<view
class=
"text-block"
>
<text
class=
"middle-date"
>
商机名称
</text>
<input
class=
"middle-date-des"
type=
"text"
v
alue=
"
"
placeholder=
"请填写"
/>
<input
class=
"middle-date-des"
type=
"text"
v
-model=
"condition.BUNAME
"
placeholder=
"请填写"
/>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date"
>
商机所有人
</text>
<input
class=
"middle-date-des"
type=
"text"
v
alue=
"
"
placeholder=
"请填写"
/>
<input
class=
"middle-date-des"
type=
"text"
v
-model=
"condition.OWNERCODE
"
placeholder=
"请填写"
/>
</view>
<view
class=
"text-block text-block-last"
>
<view
class=
"text-block text-block-last"
@
click=
"selectGroupClient"
>
<text
class=
"middle-date"
>
团购单位名称
</text>
<view
class=
"middle-date-des uni-list picker-year"
>
<view
class=
"uni-list-cell"
>
<view
class=
"uni-list-cell-db"
>
<text
class=
"middle-date-des"
>
请选择
</text>
<text
class=
"middle-date-des"
>
{{
selectedGroupClient
.
OBJNAME
}}
</text>
</view>
</view>
<image
class=
"icon-arrow"
src=
"@/static/image/arrow_r@3x.png"
mode=
"aspectFit"
></image>
...
...
@@ -32,7 +32,7 @@
</view>
<uni-swipe-action
class=
"planout-block-lists"
>
<uni-swipe-action-item
v-for=
"(item,index) in lists"
:key=
'item.
id
'
:auto-close=
"false"
:disabled=
'true'
<uni-swipe-action-item
v-for=
"(item,index) in lists"
:key=
'item.
ID
'
:auto-close=
"false"
:disabled=
'true'
:show=
"isOpened"
@
click=
"handleClick"
>
<template
v-slot:left
>
<view
class=
"swipe-right-block"
@
click=
"handleChecked($event,item, index)"
><text
...
...
@@ -43,19 +43,19 @@
<view
class=
"middle view planout-block-item"
>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
商机编码
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
300820638
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.ID}}
</text>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
商机名称
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
年底促销
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.NAME}}
</text>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
客户编号
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
800235672
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.CUSTOMERCODE}}
</text>
</view>
<view
class=
"text-block text-block-last"
>
<text
class=
"middle-date middle-date-select"
>
客户名称
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
机关单位
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.CUSTOMERNAME}}
</text>
</view>
</view>
...
...
@@ -70,28 +70,34 @@
mapState
}
from
'vuex'
import
{
apiBusinessSelect
}
from
'@/servers/common.js'
export
default
{
data
()
{
return
{
isOpened
:
'none'
,
array
:
[
'2021'
,
'2020'
,
'2019'
,
'2018'
],
index
:
0
,
lists
:
[{
id
:
1
,
checked
:
false
,
product
:
'新品五粮液'
,
quantity
:
2
,
price
:
100
condition
:
{
BUNAME
:
''
,
OWNERCODE
:
''
,
CUNAME
:
''
},
lists
:
[],
selectedBusiness
:
{},
selectedGroupClient
:
{
ADDRESS
:
"中南海"
,
CITYDESC
:
"北京市"
,
DISTRICTDESC
:
"东城区"
,
ID
:
"CVG00000FGI"
,
OBJNAME
:
"哈工"
,
PROVICEDESC
:
"北京市"
,
SALESAREADESC
:
"北京营销战区"
,
SUBSALESAREADESC
:
"北京基地"
},
{
id
:
2
,
checked
:
false
,
product
:
'新品五粮液91 52%'
,
quantity
:
4
,
price
:
200
toPageParams
:
{
page
:
''
}
],
selectedBusiness
:
{}
}
},
computed
:
{
...
...
@@ -104,7 +110,7 @@
},
onNavigationBarButtonTap
(
e
)
{
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedBusiness);
if
(
this
.
isOpened
===
'left'
&&
this
.
selectedBusiness
&&
this
.
selectedBusiness
.
id
)
{
if
(
this
.
isOpened
===
'left'
&&
this
.
selectedBusiness
&&
this
.
selectedBusiness
.
ID
)
{
uni
.
$emit
(
'selectedBusiness'
,
{
selectedBusiness
:
this
.
selectedBusiness
})
...
...
@@ -130,7 +136,52 @@
// })
// #endif
},
onLoad
(
option
)
{
console
.
log
(
'select-saleplan'
,
option
)
if
(
option
&&
option
.
from
)
{
const
{
from
}
=
option
this
.
toPageParams
.
page
=
from
}
},
created
()
{
this
.
getBusiness
();
},
mounted
()
{
console
.
log
(
'监听到事件来自 update'
);
let
_this
=
this
uni
.
$once
(
'selectedGroupClient'
,
function
(
data
)
{
console
.
log
(
'监听到事件来自 selectedGroupClient ,携带参数 msg 为:'
,
data
);
_this
.
selectedGroupClient
=
{
...
data
.
selectedGroupClient
}
_this
.
condition
.
CUNAME
=
data
.
selectedGroupClient
.
OBJNAME
})
},
methods
:
{
async
getBusiness
()
{
const
{
BUNAME
,
OWNERCODE
,
CUNAME
}
=
this
.
condition
const
params
=
{
'page'
:
1
,
'pagesize'
:
'10'
,
"input"
:
{
BUNAME
:
''
,
OWNERCODE
:
''
,
CUNAME
:
''
},
}
const
res
=
await
apiBusinessSelect
(
params
)
this
.
lists
=
res
.
DATA
.
map
((
item
)
=>
{
item
.
checked
=
false
return
item
})
console
.
log
(
'ddd2'
,
res
)
},
search
()
{
},
...
...
@@ -141,10 +192,15 @@
handleClick
(
e
,
content
,
index
)
{
console
.
log
(
'click当前索引:'
,
e
,
content
,
index
);
},
selectGroupClient
()
{
uni
.
navigateTo
({
url
:
`/pages/select-group-client/select-group-client?from=selectBusiness&mode=&index=`
});
},
handleChecked
(
e
,
item
,
index
)
{
console
.
log
(
'当前索引:'
,
e
,
index
);
this
.
lists
.
forEach
((
cur
)
=>
{
if
(
cur
.
id
===
item
.
id
)
{
if
(
cur
.
ID
===
item
.
ID
)
{
cur
.
checked
=
!
cur
.
checked
}
else
{
cur
.
checked
=
false
...
...
pages/select-group-client/select-group-client.vue
View file @
c4d8d4ee
...
...
@@ -6,19 +6,22 @@
<view
class=
"middle view planout-block-item"
>
<view
class=
"text-block"
>
<text
class=
"middle-date"
>
团购单位类型
</text>
<input
class=
"middle-date-des"
type=
"text"
value=
""
placeholder=
"请填写"
/>
</view>
<view
class=
"text-block text-block-last"
>
<text
class=
"middle-date"
>
团购单位名称
</text>
<view
class=
"middle-date-des uni-list picker-year"
>
<view
class=
"uni-list-cell"
>
<view
class=
"uni-list-cell-db"
>
<text
class=
"middle-date-des"
>
请选择
</text>
<picker
class=
"picker-block"
@
change=
"bindPickerTypesChange"
range-key=
'VALUE'
mode=
"selector"
:value=
"typesIndex"
:range=
"selectedSalePlanTypes"
>
<view
class=
"uni-input"
>
{{
selectedSalePlanTypes
[
typesIndex
].
VALUE
}}
</view>
</picker>
</view>
</view>
<image
class=
"icon-arrow"
src=
"@/static/image/arrow_r@3x.png"
mode=
"aspectFit"
></image>
</view>
</view>
<view
class=
"text-block text-block-last"
>
<text
class=
"middle-date"
>
团购单位名称
</text>
<input
class=
"middle-date-des"
type=
"text"
v-model=
"condition.COMPANY_NAME"
placeholder=
"请填写"
/>
</view>
</view>
<view
class=
"planout-block"
>
...
...
@@ -28,7 +31,7 @@
</view>
<uni-swipe-action
class=
"planout-block-lists"
>
<uni-swipe-action-item
v-for=
"(item,index) in lists"
:key=
'item.
id
'
:auto-close=
"false"
:disabled=
'true'
<uni-swipe-action-item
v-for=
"(item,index) in lists"
:key=
'item.
ID
'
:auto-close=
"false"
:disabled=
'true'
:show=
"isOpened"
@
click=
"handleClick"
>
<template
v-slot:left
>
<view
class=
"swipe-right-block"
@
click=
"handleChecked($event,item, index)"
><text
...
...
@@ -39,22 +42,21 @@
<view
class=
"middle view planout-block-item"
>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
团购编码
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
300820638
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.ID}}
</text>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
团购名称
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
迎新年退休职工团拜会
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.OBJNAME}}
</text>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
城市
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
山东省淄博市张店区
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.CITYDESC}}
</text>
</view>
<view
class=
"text-block text-block-last"
>
<text
class=
"middle-date middle-date-select"
>
地址
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
新生活广场 12栋 1单元 2708
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.ADDRESS}}
</text>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
...
...
@@ -66,28 +68,28 @@
mapState
}
from
'vuex'
import
{
apiGroupClientSelect
}
from
'@/servers/common.js'
export
default
{
data
()
{
return
{
isOpened
:
'none'
,
array
:
[
'2021'
,
'2020'
,
'2019'
,
'2018'
],
index
:
0
,
lists
:
[{
id
:
1
,
checked
:
false
,
product
:
'新品五粮液'
,
quantity
:
2
,
price
:
100
condition
:
{
'INFOTP'
:
''
,
'COMPANY_NAME'
:
''
},
{
id
:
2
,
checked
:
false
,
product
:
'新品五粮液91 52%'
,
quantity
:
4
,
price
:
200
lists
:
[],
selectedGroupClient
:
{},
selectedSalePlanTypes
:
[{
KEY
:
'2'
,
VALUE
:
'ddd'
}],
typesIndex
:
0
,
toPageParams
:
{
page
:
''
}
],
selectedGroupClient
:
{}
}
},
computed
:
{
...
...
@@ -101,7 +103,7 @@
onNavigationBarButtonTap
(
e
)
{
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedGroupClient);
if
(
this
.
isOpened
===
'left'
&&
this
.
selectedGroupClient
&&
this
.
selectedGroupClient
.
id
)
{
if
(
this
.
isOpened
===
'left'
&&
this
.
selectedGroupClient
&&
this
.
selectedGroupClient
.
ID
)
{
uni
.
$emit
(
'selectedGroupClient'
,
{
selectedGroupClient
:
this
.
selectedGroupClient
})
...
...
@@ -127,13 +129,51 @@
// })
// #endif
},
onLoad
(
option
)
{
console
.
log
(
'select-saleplan'
,
option
)
if
(
option
&&
option
.
from
)
{
const
{
from
}
=
option
this
.
toPageParams
.
page
=
from
}
},
created
()
{
this
.
getGroupClient
()
},
methods
:
{
async
getGroupClient
()
{
const
{
INFOTP
,
COMPANY_NAME
}
=
this
.
condition
const
params
=
{
'page'
:
1
,
'pagesize'
:
'10'
,
"input"
:
{
INFOTP
,
COMPANY_NAME
},
}
const
res
=
await
apiGroupClientSelect
(
params
)
this
.
lists
=
res
.
DATA
.
map
((
item
)
=>
{
item
.
checked
=
false
return
item
})
console
.
log
(
'ddd2'
,
res
)
},
// async getSalesPlanTypes() {
// const res = await apiSalesPlanTypesSelect()
// this.selectedSalePlanTypes = res.DATA
// console.log('getSalesPlanTypes', res)
// },
search
()
{
},
bindPickerChange
(
e
)
{
bindPicker
Types
Change
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
)
this
.
index
=
e
.
detail
.
value
this
.
typesIndex
=
e
.
detail
.
value
this
.
condition
.
INFOTP
=
this
.
selectedSalePlanTypes
[
this
.
typesIndex
].
KEY
},
handleClick
(
e
,
content
,
index
)
{
console
.
log
(
'click当前索引:'
,
e
,
content
,
index
);
...
...
@@ -141,7 +181,7 @@
handleChecked
(
e
,
item
,
index
)
{
console
.
log
(
'当前索引:'
,
e
,
index
);
this
.
lists
.
forEach
((
cur
)
=>
{
if
(
cur
.
id
===
item
.
id
)
{
if
(
cur
.
ID
===
item
.
ID
)
{
cur
.
checked
=
!
cur
.
checked
}
else
{
cur
.
checked
=
false
...
...
@@ -188,6 +228,7 @@
overflow-y
:
scroll
;
background
:
#f0f4f5
;
overflow-x
:
hidden
;
height
:
100%
;
}
.main
{
...
...
pages/select-sale-plan/select-sale-plan.vue
View file @
c4d8d4ee
...
...
@@ -102,9 +102,6 @@
data
()
{
return
{
isOpened
:
'none'
,
array
:
[
'2022'
,
'2021'
,
'2020'
,
'2019'
,
'2018'
],
months
:
[
'十二月'
,
'十一月'
,
'十月'
,
'九月'
,
'八月'
],
index
:
0
,
condition
:
{
year
:
''
,
MONAT
:
''
,
...
...
servers/common.js
View file @
c4d8d4ee
...
...
@@ -34,7 +34,29 @@ export async function apiSalesPlanTypesSelect(params) {
return
res
}
/**
* 团购单位信息查询
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGroupClientSelect
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/grputid_ovs'
,
params
)
return
res
}
/**
* 输入团购单位名称后可进行商机编号查询
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiBusinessSelect
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/busoppid_ovs'
,
params
)
return
res
}
export
default
{
apiProductSelect
,
apiSalesPlanSelect
apiSalesPlanSelect
,
apiGroupClientSelect
,
apiBusinessSelect
}
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