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
f3f885ae
Commit
f3f885ae
authored
Jun 29, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
市场线索查询联调
parent
754220b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
90 deletions
+107
-90
breakwords-market.nvue
pages/breakwords-market/breakwords-market.nvue
+87
-90
breakwords.js
servers/breakwords.js
+20
-0
No files found.
pages/breakwords-market/breakwords-market.nvue
View file @
f3f885ae
...
...
@@ -17,18 +17,26 @@
<view class="tab-item_line" :class="{'tab-item_line-active':activeTabIndex===1}"></view>
</view>
</view>
<view class="search-block">
<view class="search-block"
v-if="activeTabIndex===0"
>
<view class="search-type">
<picker class="
search-type-text" @change="bindPickerYearChange" mode="date
"
:value="
condition.RT_GJAHR[0].LOW" fields='year'
>
<text class="uni-input
-text">{{condition.RT_GJAHR[0].LOW
}}</text>
<picker class="
picker-block" @change="bindPickerTypesChange" range-key='name' mode="selector
"
:value="
viloationTypeSelected.name" :range="violationTypeData"
>
<text class="uni-input
">{{viloationTypeSelected.name
}}</text>
</picker>
<image class="icon-arrow-down" src="@/static/image/arrow_down@3x.png" mode=""></image>
<view class="icon-line"></view>
</view>
<view class="search-input-block">
<image class="icon-search" src="@/static/image/search_b@3x.png" mode=""></image>
<input class="search-input" type="text" v-model="condition.search" placeholder="请输入产品名称" />
<input class="search-input" type="text" @blur="getClueList" v-model="condition.productName"
placeholder="请输入产品名称" />
</view>
</view>
<view class="search-block" v-if="activeTabIndex===1">
<view class="search-input-block">
<image class="icon-search" src="@/static/image/search_b@3x.png" mode=""></image>
<input class="search-input" type="text" @blur="getClueList" v-model="condition.pwd"
placeholder="请输入口令进行查询" />
</view>
</view>
</view>
...
...
@@ -86,14 +94,9 @@
} from 'vuex'
import {
apiSalesPlanTypesSelect
} from '@/servers/common.js'
import {
apiSalesPlan
} from '@/servers/purchasePlan.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
apiGetClueList,
apiGetClueInfoPwdList
} from '@/servers/breakwords.js'
export default {
data() {
...
...
@@ -103,24 +106,17 @@
loadingText: '加载中...',
refreshing: false,
condition: {
MV_BP: '0081000010',
ROLE: 'WLYALL',
RT_GJAHR: [{
SIGN: 'I',
OPTION: 'EQ',
LOW: '',
HIGH: ''
}],
RT_PLAN_TYPE: [{
SIGN: 'I',
OPTION: 'EQ',
LOW: '',
HIGH: ''
}]
viloationTypes: [],
submitSource: 'DISTRIBUTER',
submitUserId: '',
status: '',
productName: '',
submitMethod: '',
pwd: ''
},
page: {
"
PAGE
": "1",
"
PAGESIZE
": "10",
"
currentPage
": "1",
"
pageSize
": "10",
},
loadParams: {
total: 0,
...
...
@@ -128,12 +124,24 @@
isDone: false,
isRefresh: false
},
selectedSalePlan: {},
selectedSalePlanTypes: [],
typesIndex: 0,
lists: [{
'sss': '2'
}],
viloationTypeSelected: {
'code': '',
'name': '全部类型'
},
violationTypeData: [{
'code': '',
'name': '全部类型'
},
{
'code': 'EFFECT_ORDER',
'name': '影响秩序'
},
{
'code': 'EFFECT_QUALITY',
'name': '影响质量'
}
],
lists: [],
activeTabIndex: 0
}
},
...
...
@@ -157,19 +165,33 @@
},
created() {
this.condition.RT_GJAHR[0].LOW = timeFormat(new Date(), 'yyyy')
this.condition.MV_BP = '0081000010' || this.userInfo.code
this.condition.submitUserId = this.userInfo.code
this.reset()
},
methods: {
async get
SalesPlan
(isRefresh) {
async get
ClueList
(isRefresh) {
if (this.loadParams.isDone) {
return
}
const params = {
...this.page,
...this.condition
let params = {}
if (this.activeTabIndex === 0) {
this.condition.submitMethod = 'REAL_NAME'
this.condition.viloationTypes[0] = this.viloationTypeSelected.code
const {
pwd,
...other
} = this.condition
params = {
...this.page,
...other
}
} else {
params = {
...this.page,
pwd: this.condition.pwd
}
}
uni.showLoading({
...
...
@@ -178,31 +200,23 @@
setTimeout(function() {
uni.hideLoading();
}, 2000);
// const res = await apiSalesPlan(params)
const res =
[]
const api = [apiGetClueList, apiGetClueInfoPwdList]
const res =
await api[this.activeTabIndex](params)
uni.hideLoading();
const {
lt_result,
page,
pagesize,
total
} = res
this.page.PAGE = page
this.page.PAGESIZE = pagesize
this.loadParams.total = total
this.loadParams.totalPage = Math.ceil(total * 1 / this.page.PAGESIZE * 1)
const dataMap = lt_result && lt_result.map((item) => {
item.checked = false
return item
})
totalNumberOfResults,
numberOfPages
} = res.data.pagination
this.loadParams.total = totalNumberOfResults
this.loadParams.totalPage = numberOfPages
if (isRefresh) {
this.lists =
dataMap
this.lists =
res.data.results
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(
dataMap
)
this.lists = this.lists.concat(
res.data.results
)
}
setTimeout(() => {
...
...
@@ -213,7 +227,7 @@
refresh(e) {
this.refreshing = true;
this.reset()
this.get
SalesPlan
(true)
this.get
ClueList
(true)
// #ifdef APP-NVUE
try {
// console.log('-------', this.$refs.list)
...
...
@@ -226,9 +240,9 @@
},
scrolltolower() {
console.log('onReachBottom');
if (this.page.
PAGE
< this.loadParams.totalPage) {
this.page.
PAGE
++
this.get
SalesPlan
()
if (this.page.
currentPage
< this.loadParams.totalPage) {
this.page.
currentPage
++
this.get
ClueList
()
} else {
this.loadParams.isDone = true
this.loadingText = '-- 到底了 --'
...
...
@@ -241,38 +255,13 @@
isDone: false,
isRefresh: false
}
this.page.
PAGE
= 1
this.page.
currentPage
= 1
this.lists = []
this.loadingText = '加载中'
},
async getSalesPlanTypes() {
const res = await apiSalesPlanTypesSelect()
this.selectedSalePlanTypes = res.DATA
this.selectedSalePlan = this.selectedSalePlanTypes[this.typesIndex]
this.condition.RT_PLAN_TYPE[0].LOW = this.selectedSalePlanTypes[this.typesIndex].KEY
this.getSalesPlan()
},
bindPickerTypesChange(e) {
console.log('bindPickerTypesChange', e.detail.value)
this.typesIndex = e.detail.value
this.condition.RT_PLAN_TYPE[0].LOW = this.selectedSalePlanTypes[this.typesIndex].KEY
this.getSalesPlan()
},
bindPickerYearChange(e) {
console.log('bindPickerYearChange', e.detail.value)
this.condition.RT_GJAHR[0].LOW = e.detail.value
this.getSalesPlan()
},
handleClick(e, content, index) {
console.log('click当前索引:', e, content, index);
},
nextStep() {
this.$emit('click', 'orderUpload')
},
preStep() {
uni.switchTab({
url: `/pages/go-order/go-order`
})
this.viloationTypeSelected = this.violationTypeData[e.detail.value]
},
checkTab(i) {
this.activeTabIndex = i
...
...
@@ -392,6 +381,7 @@
align-items: center;
background: #f5f6f7;
border-radius: 0 8rpx 8rpx 0;
padding-left: 10px;
}
.icon-search {
...
...
@@ -443,6 +433,11 @@
line-height: normal;
}
.uni-input-placeholder {
color: #DBDBDB;
font-size: 12px;
}
.uni-list-cell {
flex: 1;
}
...
...
@@ -453,6 +448,8 @@
.picker-block {
flex: 1;
height: 60rpx;
line-height: 60rpx;
}
.uni-input-text {
...
...
servers/breakwords.js
View file @
f3f885ae
...
...
@@ -48,4 +48,24 @@ export async function apiGetClueDistributer(params) {
export
async
function
apiClueSubmit
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/wmdpwebservices/clue/submit'
,
params
)
return
res
}
/**
* 市场线索查询
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetClueList
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/wmdpwebservices/clue/search'
,
params
)
return
res
}
/**
* 线索口令查询
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetClueInfoPwdList
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/wmdpwebservices/clue/info/pwd'
,
params
)
return
res
}
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