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
7507986e
Commit
7507986e
authored
May 24, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售计划查询 联调
parent
e396f332
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
58 deletions
+142
-58
purchase-plan.nvue
pages/purchase-plan/purchase-plan.nvue
+128
-56
http.interceptor.js
servers/http.interceptor.js
+2
-2
purchasePlan.js
servers/purchasePlan.js
+12
-0
No files found.
pages/purchase-plan/purchase-plan.nvue
View file @
7507986e
...
...
@@ -4,17 +4,18 @@
<view class="header-bg"></view>
<view class="main">
<view class="middle view planout-block-item">
<view class="text-block
text-block-last
">
<view class="text-block">
<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">
<picker class="picker-block" @change="bindPickerChange" :value="index" :range="array">
<text class="uni-input">{{array[index]}}</text>
<picker class="picker-block" @change="bindPickerYearChange" mode="date"
:value="condition.RT_GJAHR.LOW" fields='year'>
<text class="uni-input">{{condition.RT_GJAHR.LOW}}</text>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="
aspectFit
"></image>
</view>
</view>
<view class="text-block text-block-last">
...
...
@@ -22,48 +23,55 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange" :value="index" :range="array">
<text class="uni-input">{{array[index]}}</text>
<picker class="picker-block" @change="bindPickerTypesChange" range-key='VALUE'
mode="selector" :value="typesIndex" :range="selectedSalePlanTypes">
<view class="uni-input">
{{selectedSalePlanTypes[typesIndex] && selectedSalePlanTypes[typesIndex].VALUE || '请选择'}}
</view>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="
aspectFit
"></image>
</view>
</view>
</view>
<view class="middle view planout-block-item">
<view class="item-block item-block-code">
<text class="item-block-label">单号:100820638</text>
</view>
<view class="item-block item-block-name">
<text class="item-block-label item-block__label">电商配额酒年度计划(1-5月)</text>
</view>
<view class="item-block">
<text class="item-block-label-des">2021-08</text>
</view>
<view class="block-detal">
<view class="block-detal-item">
<text class="detal-item-label">存货分类</text>
<text class="detal-item-value">1618五粮液 500ml*6</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">总计划(件)</text>
<text class="detal-item-value">220</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">初始计划(件)</text>
<text class="detal-item-value">7</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">已开票计划(件)</text>
<text class="detal-item-value">220</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">已占用计划(件)</text>
<text class="detal-item-value">7</text>
<view class="lists-block">
<scroll-view class="scroll-area" :scroll-top="scrollTop" scroll-y="true">
<view class="middle view planout-block-item" v-for="(item,index) in lists" :key="item.plan_number">
<view class="item-block item-block-code">
<text class="item-block-label">单号:{{item.plan_number}}</text>
</view>
<view class="item-block item-block-name">
<text class="item-block-label item-block__label">{{item.plan_type}}</text>
</view>
<view class="item-block">
<text class="item-block-label-des">{{item.gjahr}}-{{item.monat}}</text>
</view>
<view class="block-detal">
<view class="block-detal-item">
<text class="detal-item-label">存货分类</text>
<text class="detal-item-value">{{item.wlybrand}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">总计划(件)</text>
<text class="detal-item-value">{{item.total_qty}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">初始计划(件)</text>
<text class="detal-item-value">{{item.initplan_qty}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">已开票计划(件)</text>
<text class="detal-item-value">{{item.billing_qty}}</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">已占用计划(件)</text>
<text class="detal-item-value">{{item.atp_qty}}</text>
</view>
</view>
</view>
</view>
</
scroll-
view>
</view>
</view>
...
...
@@ -75,27 +83,45 @@
mapState
} from 'vuex'
import {
apiSalesPlanTypesSelect
} from '@/servers/common.js'
import {
apiSalesPlan
} from '@/servers/purchasePlan.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
export default {
data() {
return {
scrollTop: 0,
isOpened: 'none',
array: ['2021', '2020', '2019', '2018'],
index: 0
,
lists: [{
id: 1,
checked: false
,
product: '新品五粮液
',
quantity: 2
,
price: 100
condition: {
MV_BP: '0081000010'
,
ROLE: 'WLYALL',
RT_GJAHR: {
SIGN: 'I'
,
OPTION: 'EQ
',
LOW: ''
,
HIGH: ''
},
{
id: 2,
checked: false,
product: '新品五粮液91 52%',
quantity: 4,
price: 200
RT_PLAN_TYPE: {
SIGN: 'I',
OPTION: 'EQ',
LOW: '',
HIGH: ''
}
],
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
selectedSalePlan: {},
selectedSalePlanTypes: [],
typesIndex: 0,
lists: [],
}
},
computed: {
...
...
@@ -106,10 +132,45 @@
}
},
},
created() {
this.condition.RT_GJAHR.LOW = timeFormat(new Date(), 'yyyy')
this.getSalesPlanTypes();
this.getSalesPlan()
},
methods: {
bindPickerChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
async getSalesPlan() {
const params = {
...this.page,
...this.condition
}
const res = await apiSalesPlan(params)
const {
lt_result,
page,
pagesize
} = res
this.page.PAGE = page
this.page.PAGESIZE = pagesize
this.lists = lt_result.map((item) => {
item.checked = false
return item
})
},
async getSalesPlanTypes() {
const res = await apiSalesPlanTypesSelect()
this.selectedSalePlanTypes = res.DATA
},
bindPickerTypesChange(e) {
console.log('bindPickerTypesChange', e.detail.value)
this.typesIndex = e.detail.value
this.condition.RT_PLAN_TYPE.LOW = this.selectedSalePlanTypes[this.typesIndex].KEY
this.getSalesPlan()
},
bindPickerYearChange(e) {
console.log('bindPickerYearChange', e.detail.value)
this.condition.RT_GJAHR.LOW = e.detail.value
this.getSalesPlan()
},
handleClick(e, content, index) {
console.log('click当前索引:', e, content, index);
...
...
@@ -151,6 +212,8 @@
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
height: calc(100% - 147px + 85px);
overflow: hidden;
}
.middle {
...
...
@@ -221,6 +284,15 @@
flex-direction: column;
}
.lists-block {
height: calc(100% - 140px);
overflow-y: scroll;
}
.scroll-area {
padding-bottom: 40px;
}
.planout-block-item {
flex: 1;
margin-bottom: 32rpx;
...
...
servers/http.interceptor.js
View file @
7507986e
...
...
@@ -39,12 +39,12 @@ const install = (Vue, vm) => {
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
console
.
log
(
'response-----'
,
res
)
if
(
res
.
MSGTYPE
===
'S'
)
{
if
(
res
.
MSGTYPE
===
'S'
||
res
.
msgtype
===
'S'
)
{
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
return
res
;
}
else
{
uni
.
showToast
({
title
:
res
.
MESSAGE
,
title
:
res
.
MESSAGE
||
res
.
message
,
duration
:
2000
,
icon
:
'none'
});
...
...
servers/purchasePlan.js
0 → 100644
View file @
7507986e
import
apiHelper
from
'./api.helper.js'
/**
* 根据搜索条件查询销售计划信息。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiSalesPlan
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/planserch'
,
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