Commit 2bcd2c35 authored by chuan.liu's avatar chuan.liu

违约任务联调

parent a035a093
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="search-input-block"> <view class="search-input-block">
<image class="icon-search" src="@/static/image/search_b@3x.png" mode=""></image> <image class="icon-search" src="@/static/image/search_b@3x.png" mode=""></image>
<input class="search-input" type="text" @blur="getClueList" v-model="condition.productId" <input class="search-input" type="text" @blur="getClueList" v-model="condition.productId"
placeholder="请输入产品名称" /> placeholder="请输入产品ID" />
</view> </view>
</view> </view>
<view class="search-block" v-if="activeTabIndex===1"> <view class="search-block" v-if="activeTabIndex===1">
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<cell v-for="(item,index) in lists" :key="index"> <cell v-for="(item,index) in lists" :key="index">
<view class="scroll-item"> <view class="scroll-item">
<view v-if="index===0" class="item-block item-block-sum"> <view v-if="index===0" class="item-block item-block-sum">
<text class="item-block-label">共 1 项</text> <text class="item-block-label">共 {{loadParams.total}} 项</text>
</view> </view>
<view class="block-detal"> <view class="block-detal">
<view class="block-detal-head"> <view class="block-detal-head">
...@@ -196,6 +196,7 @@ ...@@ -196,6 +196,7 @@
...this.page, ...this.page,
pwd: this.condition.pwd pwd: this.condition.pwd
} }
if (!this.condition.pwd) return
} }
uni.showLoading({ uni.showLoading({
...@@ -224,6 +225,7 @@ ...@@ -224,6 +225,7 @@
} }
} else { } else {
this.lists = [res.data] this.lists = [res.data]
this.loadParams.total = 1
this.loadParams.isDone = true this.loadParams.isDone = true
} }
...@@ -273,6 +275,7 @@ ...@@ -273,6 +275,7 @@
}, },
checkTab(i) { checkTab(i) {
this.activeTabIndex = i this.activeTabIndex = i
this.getClueList()
} }
} }
} }
......
...@@ -26,24 +26,28 @@ ...@@ -26,24 +26,28 @@
</refresh> </refresh>
<cell v-for="(item,index) in lists" :key="index"> <cell v-for="(item,index) in lists" :key="index">
<view class="scroll-item"> <view class="scroll-item">
<view class="item-block item-block-code"> <view v-if="index===0" class="item-block item-block-sum">
<text class="item-block-label">单号:333</text> <text class="item-block-label">共 {{loadParams.total}} 项</text>
</view>
<view class="item-block item-block-name">
<text class="item-block-label item-block__label">2</text>
</view>
<view class="item-block">
<text class="item-block-label-des">2-3</text>
</view> </view>
<view class="block-detal"> <view class="block-detal">
<view class="block-detal-item"> <view class="block-detal-head">
<text class="detal-item-label">存货分类</text> <text
<text class="detal-item-value">sss</text> class="detal-head-item-value detal-head-item-value-first">{{item.auditTime}}</text>
<text class="detal-head-item-value">{{item.viloationTypeName}}</text>
<text class="detal-head-item-value">{{item.childTypeName}}</text>
<text
class="detal-head-item-value detal-head-item-value-last status-done">{{item.statusName}}</text>
</view>
<view class="block-detal-body">
<text class="detal-item-value">{{item.terminalName}}</text>
<text class="detal-item-value">{{item.terminalAddress}}</text>
<text class="detal-item-value">{{item.platformName}}</text>
<text class="detal-item-value">{{item.storeName}}</text>
<view class="detal-item-value" v-for="(product,index2) in item.entries" :key='index2'>
<text class="product-val">{{product.productName}}</text>
<text class="product-val">{{product.barcodeTypeName}}</text>
<text class="product-val"> {{product.barcode}}</text>
</view> </view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">已占用计划(件)</text>
<text class="detal-item-value">3</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -72,8 +76,7 @@ ...@@ -72,8 +76,7 @@
} from 'vuex' } from 'vuex'
import { import {
apiGetClueList, apiGetMissionList
apiGetClueInfoPwdList
} from '@/servers/breakwords.js' } from '@/servers/breakwords.js'
export default { export default {
...@@ -84,13 +87,9 @@ ...@@ -84,13 +87,9 @@
loadingText: '加载中...', loadingText: '加载中...',
refreshing: false, refreshing: false,
condition: { condition: {
viloationTypes: [], distributer: true,
submitSource: 'DISTRIBUTER', userId: '',
submitUserId: '', type: '', // 全部9 代办0 已办2
status: '',
productName: '',
submitMethod: '',
pwd: ''
}, },
page: { page: {
"currentPage": "1", "currentPage": "1",
...@@ -102,23 +101,6 @@ ...@@ -102,23 +101,6 @@
isDone: false, isDone: false,
isRefresh: false isRefresh: false
}, },
viloationTypeSelected: {
'code': '',
'name': '全部类型'
},
violationTypeData: [{
'code': '',
'name': '全部类型'
},
{
'code': 'EFFECT_ORDER',
'name': '影响秩序'
},
{
'code': 'EFFECT_QUALITY',
'name': '影响质量'
}
],
lists: [], lists: [],
activeTabIndex: 0 activeTabIndex: 0
} }
...@@ -143,7 +125,7 @@ ...@@ -143,7 +125,7 @@
}, },
created() { created() {
this.condition.submitUserId = this.userInfo.code this.condition.userId = this.userInfo.code
this.reset() this.reset()
}, },
methods: { methods: {
...@@ -155,21 +137,15 @@ ...@@ -155,21 +137,15 @@
let params = {} let params = {}
if (this.activeTabIndex === 0) { if (this.activeTabIndex === 0) {
this.condition.submitMethod = 'REAL_NAME' this.condition.type = 0
this.condition.viloationTypes[0] = this.viloationTypeSelected.code
const {
pwd,
...other
} = this.condition
params = {
...this.page,
...other
}
} else { } else {
this.condition.type = 2
}
params = { params = {
...this.page, ...this.page,
pwd: this.condition.pwd ...this.condition
}
} }
uni.showLoading({ uni.showLoading({
...@@ -178,23 +154,23 @@ ...@@ -178,23 +154,23 @@
setTimeout(function() { setTimeout(function() {
uni.hideLoading(); uni.hideLoading();
}, 2000); }, 2000);
const api = [apiGetClueList, apiGetClueInfoPwdList] const res = await apiGetMissionList(params)
const res = await api[this.activeTabIndex](params)
uni.hideLoading(); uni.hideLoading();
const { const {
totalNumberOfResults, count,
numberOfPages pagesize,
} = res.data.pagination data
this.loadParams.total = totalNumberOfResults } = res.data
this.loadParams.totalPage = numberOfPages this.loadParams.total = count
this.loadParams.totalPage = Math.ceil(count * 1 / pagesize * 1)
if (isRefresh) { if (isRefresh) {
this.lists = res.data.results this.lists = data
this.loadParams.isDone = false this.loadParams.isDone = false
} else { } else {
this.lists = this.lists.concat(res.data.results) this.lists = this.lists.concat(data)
} }
setTimeout(() => { setTimeout(() => {
...@@ -237,12 +213,9 @@ ...@@ -237,12 +213,9 @@
this.lists = [] this.lists = []
this.loadingText = '加载中' this.loadingText = '加载中'
}, },
bindPickerTypesChange(e) {
console.log('bindPickerTypesChange', e.detail.value)
this.viloationTypeSelected = this.violationTypeData[e.detail.value]
},
checkTab(i) { checkTab(i) {
this.activeTabIndex = i this.activeTabIndex = i
this.getClueList()
} }
} }
} }
...@@ -448,6 +421,12 @@ ...@@ -448,6 +421,12 @@
padding-bottom: 32rpx; padding-bottom: 32rpx;
} }
.item-block-sum {
padding-bottom: 10px;
margin-bottom: 28rpx;
border-bottom: 1px solid #f4f5f6;
}
.item-block-label-des { .item-block-label-des {
flex: 1; flex: 1;
text-align: left; text-align: left;
...@@ -464,24 +443,46 @@ ...@@ -464,24 +443,46 @@
margin-top: 32rpx; margin-top: 32rpx;
} }
.block-detal-item { .block-detal-head {
display: flex; display: flex;
margin-bottom: 32rpx;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #ddd;
padding-bottom: 6px;
} }
.block-detal-item-last { .detal-head-item-value {
margin-bottom: 0; flex: 1;
text-align: center;
} }
.detal-item-label { .detal-head-item-value-first {
color: #999; flex: 1.2;
font-size: 24rpx; text-align: left;
}
.detal-head-item-value-last {
flex: 0.7;
text-align: right;
}
.status-done {
color: #F62C29;
}
.product-val {
margin-right: 10px;
}
.block-detal-body {
display: flex;
flex-direction: column;
padding-top: 20rpx;
} }
.detal-item-value { .detal-item-value {
color: #333; color: #333;
font-size: 28rpx; font-size: 24rpx;
margin-bottom: 8rpx;
} }
.btn { .btn {
......
...@@ -79,3 +79,13 @@ export async function apiGetSalesAreaAccountList(params) { ...@@ -79,3 +79,13 @@ export async function apiGetSalesAreaAccountList(params) {
const res = await apiHelper.post('/wmdpwebservices/salesareaaccountinfo/page/query', params) const res = await apiHelper.post('/wmdpwebservices/salesareaaccountinfo/page/query', params)
return res return res
} }
/**
* 经销商待办查询接口
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiGetMissionList(params) {
const res = await apiHelper.post('/wmdpwebservices/backlog/search/distributer', params)
return res
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment