Commit 2727ebc4 authored by chicheng's avatar chicheng

添加账票管理模块

parent fbe1daab
...@@ -937,39 +937,6 @@ ...@@ -937,39 +937,6 @@
} }
} }
}, },
{
"path": "pages/account-inquiry/account-inquiry",
"style": {
"app-plus": {
"titleNView": {
"titleAlign": "left",
"titleColor": "#333",
"titleSize": "17px",
"backgroundColor": "transparent",
"titleText": "账款查询",
"autoBackButton": true
},
"bounce": "none"
}
}
},
{
"path": "pages/marketsupportfee-select/marketsupportfee-select",
"style": {
"app-plus": {
"titleNView": {
"titleAlign": "left",
"titleColor": "#333",
"titleSize": "17px",
"backgroundColor": "transparent",
"titleText": "市场支持费用查询",
"autoBackButton": true
},
"bounce": "none"
}
// "enablePullDownRefresh": true
}
},
{ {
"path": "pages/storage-list/storage-list", "path": "pages/storage-list/storage-list",
"style": { "style": {
...@@ -1456,6 +1423,36 @@ ...@@ -1456,6 +1423,36 @@
} }
} }
} }
},
{
"path": "pages/billing-invoice/invoice-query",
"style": {
"app-plus": {
"titleNView": {
"titleAlign": "left",
"titleColor": "#333",
"titleSize": "17px",
"backgroundColor": "transparent",
"titleText": "账款查询",
"autoBackButton": true
}
}
}
},
{
"path": "pages/billing-invoice/market-support-query",
"style": {
"app-plus": {
"titleNView": {
"titleAlign": "left",
"titleColor": "#333",
"titleSize": "17px",
"backgroundColor": "#fff",
"titleText": "市场支持费用查询",
"autoBackButton": true
}
}
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -3,19 +3,17 @@ ...@@ -3,19 +3,17 @@
<view class="status_bar" :style="navHeight"></view> <view class="status_bar" :style="navHeight"></view>
<view class="listview"> <view class="listview">
<view class="cell-list"> <view class="cell-list">
<view class="cell-list-block" @click="goOrder('account-inquiry')"> <view class="cell-list-block" @click="goOrder('billing-invoice/invoice-query')">
<image class="icon-address" src="@/static/image/billing_inquiry@3x.png" mode="aspectFit"></image> <image class="icon-address" src="@/static/image/billing_inquiry@3x.png" mode="aspectFit"></image>
<view class="cell-list-block__content"> <view class="cell-list-block__content">
<text class="cell-list-block__title">账款查询</text> <text class="cell-list-block__title">账款查询</text>
<text class="cell-list-block__desc">Account inquiry</text>
</view> </view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view> </view>
<view class="cell-list-block" @click="goOrder('marketsupportfee-select')"> <view class="cell-list-block" @click="goOrder('billing-invoice/market-support-query')">
<image class="icon-address" src="@/static/image/billing_market@3x.png" mode="aspectFit"></image> <image class="icon-address" src="@/static/image/billing_market@3x.png" mode="aspectFit"></image>
<view class="cell-list-block__content"> <view class="cell-list-block__content">
<text class="cell-list-block__title">市场支持费用查询</text> <text class="cell-list-block__title">市场支持费用查询</text>
<text class="cell-list-block__desc">Market support fee inquiry</text>
</view> </view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view> </view>
...@@ -45,9 +43,9 @@ ...@@ -45,9 +43,9 @@
...mapState(['sysinfo']) ...mapState(['sysinfo'])
}, },
methods: { methods: {
goOrder(type) { goOrder(path) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/${type}/${type}` url: `/pages/${path}`
}); });
} }
} }
...@@ -129,4 +127,4 @@ ...@@ -129,4 +127,4 @@
padding: 0 36rpx 0 16rpx; padding: 0 36rpx 0 16rpx;
align-items: center; align-items: center;
} }
</style> </style>
<template> <template>
<view class="lists"> <view class="lists">
<view class="status_bar" :style="navHeight"></view> <view class="status_bar" :style="navHeight"></view>
<view class="header-bg"> <view class="header-bg">
<image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image> <image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image>
</view> </view>
<view class="main"> <view class="main">
<view class="list-wrapper" :style="scrollHeight"> <view class="list-wrapper" :style="scrollHeight">
<list class="list" scrollable loadmoreoffset='1' show-scrollbar='false'> <list class="list" scrollable loadmoreoffset='1' show-scrollbar='false' @loadmore="scrolltolower">
<cell class="list-cell" v-for="(item,index) in lists" :key="index"> <cell class="list-cell" v-for="(item,index) in lists" :key="index">
<view class="listview"> <view class="listview">
<view class="cell-list"> <view class="cell-list">
<view class="middle view planout-block-item"> <view class="middle view planout-block-item">
<view class="item-block item-block-code"> <view class="item-block item-block-code">
<text class="item-block-label">开票方编号:{{item.billto_bp}}</text> <text class="item-block-label">开票方编号:{{item.billto_bp}}</text>
</view> </view>
<view class="item-block item-block-name"> <view class="item-block item-block-name">
<text class="item-block-label item-block__label">{{item.billto_name}}</text> <text class="item-block-label item-block__label">{{item.billto_name}}</text>
</view> </view>
<view class="item-block item-block-date"> <view class="item-block item-block-date">
<text class="detal-item-label">开票方名称</text> <text class="detal-item-label">发生日期:{{item.posting_date}}</text>
</view> </view>
<view class="block-detal block-detal-last"> <view class="block-detal block-detal-last">
<view class="block-detal-item"> <view class="block-detal-item">
<text class="detal-item-label">贷款</text> <text class="detal-item-label">货款金额</text>
<text class="detal-item-value">{{item.goods_amount}}</text> <text class="detal-item-value">{{item.goods_amount}}</text>
</view> </view>
<view class="block-detal-item"> <view class="block-detal-item">
<text class="detal-item-label">随量保证金</text> <text class="detal-item-label">随货保证金</text>
<text class="detal-item-value">{{item.forward_amount}}</text> <text class="detal-item-value">{{item.forward_amount}}</text>
</view> </view>
<view class="block-detal-item block-detal-item-last"> <view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">经销商保证金</text> <text class="detal-item-label">经销商保证金</text>
<text class="detal-item-value">{{item.dealing_amount}}</text> <text class="detal-item-value">{{item.dealing_amount}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="empty-block"> <view class="empty-block">
</view> </view>
</cell> </cell>
<cell> <cell>
<view class="loading-more" v-if='lists.length>2'> <view class="loading-more" v-if='lists.length>0'>
<text class="loading-more-text">-- 到底了 --</text> <text class="loading-more-text">-- 到底了 --</text>
</view> </view>
</cell> <view class="loading-more" v-else>
</list> <text class="loading-more-text">暂无数据</text>
</view> </view>
</view> </cell>
</view> </list>
</template> </view>
</view>
<script> </view>
import { </template>
mapState
} from 'vuex' <script>
import {
import { mapState
apiAccountInquiry } from 'vuex'
} from '@/servers/billingInvoice.js'
import {
export default { apiAccountInquiry
data() { } from '@/servers/billingInvoice.js'
return {
itemHead: {}, export default {
lists: [{ data() {
BILLTO_BP: '--', return {
BILLTO_NAME: '', itemHead: {},
GOODS_AMOUNT: '', lists: [],
FORWARD_AMOUNT: '', condition: {
DEALING_AMOUNT: '', customer: []
}] },
} page: {
}, page: 1,
computed: { pagesize: 50,
navHeight() { totalCount: 0
return { }
'height': `${this.sysinfo.safeArea.top + 44}px` }
} },
}, computed: {
mainHeight() { navHeight() {
return { return {
'height': `${this.sysinfo.safeArea.height }px`, 'height': `${this.sysinfo.safeArea.top + 44}px`
} }
}, },
scrollHeight() { mainHeight() {
return { return {
'height': `${this.sysinfo.safeArea.height -58}px`, 'height': `${this.sysinfo.safeArea.height }px`,
} }
}, },
...mapState(['sysinfo', 'userInfo']) scrollHeight() {
}, return {
created() { 'height': `${this.sysinfo.safeArea.height -58}px`,
this.accountInquiry(); }
}, },
methods: { ...mapState(['sysinfo', 'userInfo', 'userBpData'])
async accountInquiry() { },
let CUSTOMER = [] created() {
if (this.userInfo.role !== 'WLY001') { this.accountInquiry(1);
CUSTOMER = [{ },
SIGN: 'I', methods: {
OPTION: 'EQ', scrolltolower() {
LOW: this.userInfo.code, if (this.lists.length >= this.page.totalCount && this.page.totalCount > 0) {
HIGH: '' return;
}] }
} this.page.page++;
const params = { this.accountInquiry(this.page.page);
'USER_BP': this.userInfo.code, },
ROLE: 'WLY001', async accountInquiry(pageNo = 1) {
CUSTOMER, // 处理客户条件,转换为SAP格式(属性名小写,与PC端保持一致)
} const customer = (this.condition.customer || []).map(v => ({
const res = await apiAccountInquiry(params) sign: v.sign || v.SIGN || 'I',
option: v.option || v.OPTION || 'EQ',
this.lists = res.data low: v.low || v.LOW || '',
} high: v.high || v.HIGH || ''
} }))
}
</script> // 构建查询条件对象,与PC端格式保持一致
const allConditions = {}
<style lang="scss" scoped> if (customer.length > 0) {
.view { allConditions.customer = customer
flex-direction: column; }
}
// 获取用户编号和角色信息,参考 ticket-order.nvue 的方式
.header-bg { const userCode = this.userInfo?.code || ''
height: 284rpx; // 从 userBpData 获取第一个角色的 ROLE_ID
margin-top: -88rpx; const roleId = this.userBpData?.ROLES && this.userBpData.ROLES.length > 0
} ? this.userBpData.ROLES[0].ROLE_ID
: ''
.header-bg-img { let params = {
width: 750rpx; user_bp: userCode,
} role: roleId,
...allConditions,
.lists { page: pageNo,
position: relative; pagesize: this.page.pagesize,
flex-direction: column; totalCount: this.page.totalCount,
background: #f0f4f5; is_result: 1,
overflow: hidden; sort: []
} }
uni.showLoading({
.main { title: '加载中'
position: relative; });
flex-direction: column; const res = await apiAccountInquiry(params);
margin-top: -164rpx; uni.hideLoading();
padding: 0 16rpx; if (res) {
// overflow-y: scroll; if (pageNo === 1) {
} this.lists = res.data || [];
} else {
.list-wrapper { this.lists = this.lists.concat(res.data || []);
display: flex; }
flex-direction: column; this.page.totalCount = res?.TOTALCOUNT || res?.totalCount || res?.Total || this.page.totalCount;
} }
}
.list { }
display: flex; }
flex-direction: column; </script>
}
<style lang="scss" scoped>
.order { /* #ifndef APP-PLUS */
display: flex; page {
padding: 0 16rpx; width: 100%;
background: #f0f4f5; min-height: 100%;
} display: flex;
background: #F2F3F5;
.list-cell { }
padding-bottom: 26rpx;
} .status_bar {
height: var(--status-bar-height);
.listview { }
flex: 1;
flex-direction: column; /* #endif */
}
.lists {
.empty-block { flex: 1;
height: 14px; background: #F2F3F5;
background: #f0f4f5; }
}
.header-bg {
.cell-list { position: absolute;
flex-direction: column; left: 0;
} right: 0;
height: 382rpx;
.date { }
font-size: 28rpx;
color: #999999; .header-bg-img {
font-size: 28rpx; width: 750rpx;
text-align: center; height: 382rpx;
margin-bottom: 24rpx; }
}
.main {
.icon-address { flex: 1;
width: 44rpx; padding: 0 32rpx;
height: 44rpx; margin-top: 100rpx;
margin-right: 16rpx; }
}
.list-wrapper {
.cell-list-block__content { flex: 1;
display: flex; }
flex: 1;
flex-direction: column; .list {
margin-bottom: 40rpx; flex: 1;
} }
.cell-list-block__title { .listview {
color: #333; flex-direction: column;
font-size: 30rpx; background-color: #FFFFFF;
flex: 1; border-radius: 10rpx;
align-items: center; margin-bottom: 24rpx;
margin-bottom: 4rpx; padding: 24rpx;
} }
.cell-list-block { .cell-list {
overflow: hidden; flex-direction: column;
display: flex; }
flex-direction: column;
background: #fff; .planout-block-item {
padding: 20rpx 24rpx; flex-direction: column;
border-radius: 20rpx; }
margin-bottom: 56rpx;
} .item-block {
flex-direction: row;
.list-block-title { align-items: center;
display: flex; margin-bottom: 16rpx;
align-items: center; }
margin-bottom: 16rpx;
} .item-block-code {
justify-content: space-between;
.list-block-title__text { }
color: #999999;
font-size: 26rpx; .item-block-label {
} font-size: 28rpx;
color: #333333;
.planout-block-item { }
flex: 1;
padding: 40rpx 32rpx; .item-block__label {
background-color: #fff; font-weight: bold;
border-radius: 16rpx 100rpx 16rpx 16rpx; font-size: 32rpx;
} }
.item-block { .item-block-date {
overflow: hidden; margin-bottom: 24rpx;
background-color: #fff; }
padding: 0 16rpx;
} .detal-item-label {
font-size: 24rpx;
.item-block-label { color: #999999;
font-size: 24rpx; }
color: #333;
} .block-detal {
flex-direction: row;
.item-block__label { background-color: #F8F8F8;
flex: 1; padding: 24rpx;
text-align: left; border-radius: 8rpx;
font-size: 32rpx; }
color: #333;
font-weight: 500; .block-detal-item {
// white-space: nowrap; flex: 1;
overflow: hidden; align-items: center;
text-overflow: ellipsis; }
}
.detal-item-value {
.item-block-code { font-size: 28rpx;
display: flex; color: #333333;
align-items: center; margin-top: 8rpx;
justify-content: space-between; font-weight: bold;
} }
.item-block-name { .loading-more {
margin-top: 32rpx; align-items: center;
margin-bottom: 8rpx; justify-content: center;
} padding-top: 20rpx;
padding-bottom: 20rpx;
.item-block-date { }
margin-top: 12rpx;
margin-bottom: 48rpx; .loading-more-text {
} font-size: 28rpx;
color: #999;
.item-block-label-des { }
flex: 1;
text-align: left; .empty-block {
font-size: 28rpx; height: 24rpx;
color: #333; }
}
.block-detal {
display: flex;
flex-direction: column;
background: #f8f8f8;
border-radius: 20rpx;
padding: 28rpx 32rpx;
margin-bottom: 52rpx;
}
.block-detal-last {
margin-bottom: 32rpx;
}
.block-detal-item {
display: flex;
margin-bottom: 32rpx;
justify-content: space-between;
}
.block-detal-item-last {
margin-bottom: 0;
}
.detal-item-label {
color: #999;
font-size: 24rpx;
}
.detal-item-value {
color: #333;
font-size: 28rpx;
}
.loading-more {
flex: 1;
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 12px;
color: #999;
}
</style> </style>
<template> <template>
<view class="lists"> <view class="lists">
<view class="status_bar" :style="navHeight"></view> <view class="status_bar" :style="navHeight"></view>
<view class="header-bg"> <view class="header-bg">
<image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image> <image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image>
</view> </view>
<view class="main"> <view class="main">
<view class="middle view"> <view class="middle view">
<view class="text-block"> <view class="text-block text-block-last">
<text class="middle-date">开始日期</text> <text class="middle-date">查询日期</text>
<view class="middle-date-des uni-list picker-year"> <view class="middle-date-des">
<view class="uni-list-cell"> <view class="picker-year">
<view class="uni-list-cell-db"> <view class="uni-list-cell">
<picker class="picker-block" @change="bindPickerYearStartChange" mode="date" <view class="uni-list-cell-db">
:value="condition.start" fields='day'> <picker class="picker-block" @change="bindPickerDateChange" mode="date"
<text class="uni-input">{{condition.start}}</text> :value="condition.posting_date" fields='day'>
</picker> <text class="uni-input">{{condition.posting_date || '请选择日期'}}</text>
</view> </picker>
</view> </view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> </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"> </view>
<text class="middle-date">截止日期</text> </view>
<view class="middle-date-des uni-list picker-year"> </view>
<view class="uni-list-cell"> <view class="planout-block">
<view class="uni-list-cell-db"> <button class="btn" type="default" @tap="search">
<picker class="picker-block" @change="bindPickerYearEndChange" mode="date" <text class="btn-text">查询</text>
:value="condition.end" fields='day'> </button>
<text class="uni-input">{{condition.end}}</text> </view>
</picker> <scroll-view :style='scrollHeight' class="scroll-area" scroll-y="true" lower-threshold='150'
</view> @scrolltolower='scrolltolower'>
</view> <list class="scroll-area view" loadmoreoffset='100' show-scrollbar='false' @loadmore="scrolltolower">
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> <cell class="list-cell" v-for="(item,index) in lists" :key='index'>
</view> <view class="middle view planout-block-item">
</view> <view class="text-block">
</view> <text class="middle-date middle-date-select">客户编码</text>
<text class="middle-date-des middle-date-des-select">{{item.billto_bp}}</text>
<view class="planout-block"> </view>
<button class="btn" type="default" @tap="search"> <view class="text-block">
<text class="btn-text">查询</text> <text class="middle-date middle-date-select">客户名称</text>
</button> <text class="middle-date-des middle-date-des-select">{{item.billto_name}}</text>
</view> </view>
<scroll-view :style='scrollHeight' class="scroll-area" scroll-y="true" lower-threshold='150' <view class="text-block">
@scrolltolower='scrolltolower'> <text class="middle-date middle-date-select">上账日期</text>
<list class="scroll-area view" loadmoreoffset='100' show-scrollbar='false' @loadmore="scrolltolower"> <text class="middle-date-des middle-date-des-select">{{item.posting_date}}</text>
<cell class="list-cell" v-for="(item,index) in lists" :key='index'> </view>
<!-- <scroll-view class="scroll-area" :style='scrollHeight' scroll-y="true" lower-threshold='150' <view class="text-block">
@scrolltolower='scrolltolower'> --> <text class="middle-date middle-date-select">摘要</text>
<view class="middle view planout-block-item"> <text class="middle-date-des middle-date-des-select">{{item.zy}}</text>
<view class="text-block"> </view>
<text class="middle-date middle-date-select">客户编码</text> <view class="text-block text-block-last">
<text class="middle-date-des middle-date-des-select">{{item.customer}}</text> <text class="middle-date middle-date-select">金额</text>
</view> <text class="middle-date-des middle-date-des-select">{{item.forward_amount}}</text>
<view class="text-block"> </view>
<text class="middle-date middle-date-select">客户名称</text> </view>
<text class="middle-date-des middle-date-des-select">{{item.customer_name}}</text> <view class="empty-block"></view>
</view> </cell>
<view class="text-block"> <cell>
<text class="middle-date middle-date-select">上账日期</text> <view class="loading-more" v-if='lists.length>0'>
<text class="middle-date-des middle-date-des-select">{{item.posting_date}}</text> <text class="loading-more-text">-- 到底了 --</text>
</view> </view>
<view class="text-block text-block-last"> <view class="loading-more" v-else>
<text class="middle-date middle-date-select">金额</text> <text class="loading-more-text">暂无数据</text>
<text class="middle-date-des middle-date-des-select">{{item.goods_amount}}</text> </view>
</view> </cell>
</view> </list>
<view class="empty-block"></view> </scroll-view>
<!-- </scroll-view> -->
</cell> </view>
</list> </view>
</scroll-view> </template>
</view> <script>
</view> import {
</template> mapState
} from 'vuex'
<script>
import { import {
mapState apiGetMarketSupportFee
} from 'vuex' } from '@/servers/billingInvoice.js'
import { import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
apiGetMarketSupportFee
} from '@/servers/billingInvoice.js' export default {
data() {
import timeFormat from '@/uview-ui/libs/function/timeFormat.js' return {
loadingText: '加载中...',
export default { refreshing: false,
data() { isOpened: 'none',
return { condition: {
loadingText: '加载中...', posting_date: ''
refreshing: false, },
isOpened: 'none', lists: [],
condition: { page: {
start: '', page: 1,
end: '' pagesize: 20,
}, totalCount: 0
lists: [], }
page: { }
"PAGE": "1", },
"PAGESIZE": "10", computed: {
}, navHeight() {
toPageParams: { return {
page: '', 'height': `${this.sysinfo.safeArea.top + 44}px`
mode: '', }
index: 0, },
head: {} mainHeight() {
} return {
} 'height': `${this.sysinfo.safeArea.height }px`,
}, }
computed: { },
...mapState(['sysinfo', 'userInfo']), scrollHeight() {
navHeight() { return {
return { 'height': `${this.sysinfo.safeArea.height - 180 - 44}px`,
'height': `${this.sysinfo.safeArea.top + 44}px` }
} },
}, ...mapState(['sysinfo', 'userInfo', 'userBpData'])
mainHeight() { },
return { created() {
'height': `${this.sysinfo.safeArea.height}px`, // 不设置默认日期,让用户自己选择
} // this.queryData(1);
}, },
scrollHeight() { methods: {
return { bindPickerDateChange(e) {
'height': `${this.sysinfo.safeArea.height - 265 - 44}px` this.condition.posting_date = e.detail.value
} },
} search() {
}, this.lists = [];
onPullDownRefresh() { this.page.page = 1;
console.log('refresh'); this.queryData(1);
this.reset() },
this.getMarketSupportFee(true) scrolltolower() {
setTimeout(function() { if (this.lists.length >= this.page.totalCount) {
uni.stopPullDownRefresh(); return;
}, 600); }
}, this.page.page++;
created() { this.queryData(this.page.page);
this.condition.start = timeFormat(new Date(), 'yyyy-mm-dd') },
this.condition.end = timeFormat(new Date(), 'yyyy-mm-dd') async queryData(pageNo) {
this.reset() // 构建查询条件对象,与PC端格式保持一致
this.getMarketSupportFee(true); const allConditions = {}
},
methods: { // 处理日期条件,单个日期查询(EQ),转换为SAP格式数组(属性名小写,与PC端保持一致)
async getMarketSupportFee() { if (this.condition.posting_date) {
let CUSTOMER = [] allConditions.posting_date = [{
let POSTING_DATE = [] sign: 'I',
if (this.condition.start) { option: 'EQ',
POSTING_DATE = [{ low: this.condition.posting_date,
SIGN: 'I', high: ''
OPTION: 'BT', }]
LOW: '20220401' || this.condition.start.replaceAll('-', ''), }
// LOW: '20220401' || this.condition.start.replaceAll('-', ''),
HIGH: '20220530' || this.condition.end.replaceAll('-', '') // 处理客户条件(如果存在)
// HIGH: '20220530' || this.condition.end.replaceAll('-', '') if (this.condition.customer && this.condition.customer.length > 0) {
}] const customer = this.condition.customer.map(v => ({
} sign: v.sign || v.SIGN || 'I',
if (this.userInfo.role !== 'WLY001') { option: v.option || v.OPTION || 'EQ',
CUSTOMER = [{ low: v.low || v.LOW || '',
SIGN: 'I', high: v.high || v.HIGH || ''
OPTION: 'EQ', }))
// LOW: '4000000105' || this.userInfo.code, // 字段名使用小写,与PC端保持一致
LOW: this.userInfo.code, allConditions.customer = customer
HIGH: '' }
}]
} // 获取用户编号和角色信息,参考 ticket-order.nvue 的方式
const params = { const userCode = this.userInfo?.code || ''
'USER_BP': this.userInfo.code || '4000000105', // 从 userBpData 获取第一个角色的 ROLE_ID
ROLE: 'WLY001', const roleId = this.userBpData?.ROLES && this.userBpData.ROLES.length > 0
CUSTOMER, ? this.userBpData.ROLES[0].ROLE_ID
POSTING_DATE, : ''
} let params = {
const res = await apiGetMarketSupportFee(params) user_bp: userCode,
role: roleId,
this.lists = res.data ...allConditions,
}, page: pageNo,
reset() { pagesize: this.page.pagesize,
this.loadParams = { totalCount: this.page.totalCount,
total: 0, is_result: 1,
totalPage: 1, sort: []
isDone: false, }
isRefresh: false uni.showLoading({
} title: '加载中'
this.page.PAGE = 1 });
this.lists = [] const res = await apiGetMarketSupportFee(params);
this.loadingText = '加载中' uni.hideLoading();
}, if (res && res.data) {
scrolltolower() { if (pageNo === 1) {
console.log('onReachBottom'); this.lists = res.data || [];
if (this.page.PAGE < this.loadParams.totalPage) { } else {
this.page.PAGE++ this.lists = this.lists.concat(res.data || []);
this.getMarketSupportFee() }
} else { this.page.totalCount = res?.TOTALCOUNT || res?.totalCount || res?.Total || this.page.totalCount;
this.loadParams.isDone = true }
this.loadingText = '-- 到底了 --' }
} }
}, }
search() { </script>
this.reset()
this.getMarketSupportFee(true) <style lang="scss" scoped>
}, /* #ifndef APP-PLUS */
bindPickerYearStartChange(e) { page {
console.log('picker发送选择改变,携带值为', e.detail.value) width: 100%;
this.condition.start = e.detail.value min-height: 100%;
}, display: flex;
bindPickerYearEndChange(e) { background: #F2F3F5;
console.log('picker发送选择改变,携带值为', e.detail.value) }
this.condition.end = e.detail.value
}, .status_bar {
} height: var(--status-bar-height);
} }
</script>
/* #endif */
<style lang="scss" scoped>
.view { .lists {
flex-direction: column; position: relative;
} flex-direction: column;
overflow-y: scroll;
.header-bg { background: #f0f4f5;
height: 284rpx; overflow-x: hidden;
margin-top: -88rpx; }
}
.header-bg {
.header-bg-img { height: 284rpx;
width: 750rpx; margin-top: -88rpx;
} }
.lists { .header-bg-img {
position: relative; width: 750rpx;
flex-direction: column; }
overflow-y: scroll;
background: #f0f4f5; .view {
overflow-x: hidden; flex-direction: column;
} }
.main { .main {
position: relative; position: relative;
flex-direction: column; flex-direction: column;
margin-top: -164rpx; margin-top: -164rpx;
padding: 0 16rpx; padding: 0 16rpx;
} }
.middle { .middle {
background-color: #fff; background-color: #fff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 32rpx 64rpx 32rpx 48rpx; padding: 32rpx 64rpx 32rpx 48rpx;
} margin-bottom: 0;
}
.text-block {
display: flex; .text-block {
overflow: hidden; display: flex;
height: 96rpx; overflow: hidden;
margin-bottom: 14rpx; height: 96rpx;
border-bottom: 1px solid #f4f5f6; margin-bottom: 14rpx;
} border-bottom: 1px solid #f4f5f6;
justify-content: space-between;
.text-block-last { align-items: center;
margin-bottom: 0; }
border-bottom: 0;
} .text-block-last {
margin-bottom: 0;
.middle-date { border-bottom: 0;
flex: 2; }
font-size: 28rpx;
line-height: 96rpx; .middle-date {
color: #333; flex: 2;
margin-bottom: 8rpx; font-size: 28rpx;
} line-height: 96rpx;
color: #333;
.middle-date-des { margin-bottom: 8rpx;
flex: 3; }
font-size: 28rpx;
line-height: 96rpx; .middle-date-des {
height: 96rpx; flex: 3;
overflow: hidden; font-size: 28rpx;
text-overflow: ellipsis; line-height: 96rpx;
color: #888; height: 96rpx;
} white-space: nowrap;
overflow: hidden;
.middle-date-select { text-overflow: ellipsis;
color: #888; color: #888;
} display: flex;
align-items: center;
.middle-date-des-select { justify-content: flex-start;
color: #333; }
}
.picker-year {
.picker-year { position: relative;
position: relative; border-radius: 4px;
border-radius: 4px; align-items: center;
align-items: center; flex: 1;
} flex-direction: row;
justify-content: flex-start;
.uni-input { width: 100%;
font-size: 12px; padding-right: 24rpx;
color: #888; }
}
.uni-list-cell {
.uni-list-cell { flex: 1;
flex: 1; min-width: 0;
} display: flex;
align-items: center;
.uni-list-cell-db { justify-content: flex-start;
flex: 1; }
}
.uni-list-cell-db {
.picker-block { flex: 1;
flex: 1; height: 48px;
} line-height: 48px;
min-width: 0;
.icon-arrow { display: flex;
position: absolute; align-items: center;
right: 0; justify-content: flex-start;
top: 16px; text-align: left;
width: 12rpx; }
height: 20rpx;
z-index: 10; .picker-block {
} flex: 1;
min-width: 0;
.planout-block-lists { width: 100%;
display: flex; text-align: left;
flex-direction: column; display: flex;
background: #f0f4f5; align-items: center;
} justify-content: flex-start;
}
.list-cell {
padding-bottom: 26rpx; .uni-input {
} font-size: 28rpx;
color: #333;
.lists-wrapper { text-align: left;
display: flex; width: 100%;
flex-direction: column; overflow: visible;
} white-space: nowrap;
display: block;
.planout-block { text-align: left;
display: flex; }
justify-content: space-between;
height: 92rpx; .icon-arrow {
margin-top: 64rpx; position: absolute;
margin-bottom: 48rpx; right: 0;
padding: 0 24rpx; top: 50%;
} margin-top: -10rpx;
width: 12rpx;
.planout-block-item { height: 20rpx;
flex: 1; z-index: 10;
} flex-shrink: 0;
}
.btn {
flex: 1; .planout-block {
height: 92rpx; display: flex;
background: $wly-primary-color; justify-content: space-between;
border-radius: 46rpx; margin-top: 30rpx;
} margin-bottom: 30rpx;
padding: 0 24rpx;
.btn-text { }
color: #fff;
font-size: 34rpx; .planout-block-item {
} flex: 1;
width: 750rpx;
.empty-block { margin-bottom: 26rpx;
height: 26rpx; background-color: #fff;
background: #f0f4f5; border-radius: 16rpx;
} padding: 32rpx 64rpx 32rpx 48rpx;
.scroll-area { }
overflow-y: scroll;
} .middle-date-select {
color: #888;
}
.middle-date-des-select {
color: #333;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
justify-content: center;
align-items: center;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
.scroll-area {
overflow-y: scroll;
}
.list-cell {
flex-direction: column;
}
.empty-block {
height: 24rpx;
}
.loading-more {
align-items: center;
justify-content: center;
padding-top: 20rpx;
padding-bottom: 20rpx;
}
.loading-more-text {
font-size: 28rpx;
color: #999;
}
</style> </style>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<text class="entry-bill-text">销售订单</text> <text class="entry-bill-text">销售订单</text>
</view> </view>
<!-- <view class="entry-block" @click="goPage('billing-invoice')"> <view class="entry-block" @click="goPage('billing-invoice')">
<view class="entry-bill"> <view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing" <image class="entry-bill-icon entry-bill-icon_billing"
src="@/static/image/usercenter_billinginvoice@3x.png" mode=""> src="@/static/image/usercenter_billinginvoice@3x.png" mode="">
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
</view> </view>
<text class="entry-bill-text">账票管理</text> <text class="entry-bill-text">账票管理</text>
</view> </view>
-->
<view class="entry-block" @click="goPage('ticket-order')" v-if='!isChildCustomer'> <view class="entry-block" @click="goPage('ticket-order')" v-if='!isChildCustomer'>
<view class="entry-bill"> <view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing" <image class="entry-bill-icon entry-bill-icon_billing"
......
...@@ -183,23 +183,23 @@ class Request { ...@@ -183,23 +183,23 @@ class Request {
if (config.url.indexOf('crm-app') !== -1) { if (config.url.indexOf('crm-app') !== -1) {
config.baseUrl = 'https://crm.wuliangye.com.cn' // config.baseUrl = 'https://crm.wuliangye.com.cn'
// config.baseUrl = 'http://221.10.127.60:5000' config.baseUrl = 'http://221.10.127.60:5000'
} else if (config.url.indexOf('adapter') !== -1) { } else if (config.url.indexOf('adapter') !== -1) {
config.baseUrl = 'http://api.wuliangcreart.com' // config.baseUrl = 'http://api.wuliangcreart.com'
// config.baseUrl = 'http://221.10.127.60:5000/gateway/cyj' config.baseUrl = 'http://221.10.127.60:5000/gateway/cyj'
} else if (config.url.indexOf('wmdpwebservices') !== -1) { } else if (config.url.indexOf('wmdpwebservices') !== -1) {
config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/sczx' // config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/sczx'
// config.baseUrl = 'http://221.10.127.60:5000/gateway/sczx' config.baseUrl = 'http://221.10.127.60:5000/gateway/sczx'
} else if (config.url.indexOf('wmdp-storeapp') !== -1) { } else if (config.url.indexOf('wmdp-storeapp') !== -1) {
config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/zdcx' // config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/zdcx'
// config.baseUrl = 'http://221.10.127.60:5000/gateway/zdcx' config.baseUrl = 'http://221.10.127.60:5000/gateway/zdcx'
} else if (config.url.indexOf('uusafe') !== -1) { } else if (config.url.indexOf('uusafe') !== -1) {
config.baseUrl = 'https://apps.wuliangye.com.cn:9076' // config.baseUrl = 'https://apps.wuliangye.com.cn:9076'
// config.baseUrl = 'https://zzy.ipincloud.cn:9070' config.baseUrl = 'https://zzy.ipincloud.cn:9070'
} else { } else {
config.baseUrl = 'http://218.89.67.37:8001/wlySap' // config.baseUrl = 'http://218.89.67.37:8001/wlySap'
// config.baseUrl = 'http://221.10.127.60:5000/wlySap' config.baseUrl = 'http://221.10.127.60:5000/wlySap'
} }
console.log(config.baseUrl) console.log(config.baseUrl)
} catch (e) { } catch (e) {
......
...@@ -12,7 +12,7 @@ try { ...@@ -12,7 +12,7 @@ try {
} }
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
let saveStateKeys = ['vuex_user', 'vuex_token']; let saveStateKeys = ['vuex_user', 'vuex_token', 'userInfo', 'userBpData', 'isChildCustomer'];
// 保存变量到本地存储中 // 保存变量到本地存储中
const saveLifeData = function(key, value) { const saveLifeData = function(key, value) {
...@@ -38,11 +38,12 @@ const store = new Vuex.Store({ ...@@ -38,11 +38,12 @@ const store = new Vuex.Store({
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式 // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version: '1.0.1', vuex_version: '1.0.1',
vuex_demo: '绛紫', vuex_demo: '绛紫',
userInfo: { // 从本地存储恢复登录信息,避免热重载时丢失
userInfo: lifeData.userInfo ? lifeData.userInfo : {
name: '', name: '',
code: '' code: ''
}, },
userBpData: { userBpData: lifeData.userBpData ? lifeData.userBpData : {
USER_BP: '', USER_BP: '',
ROLES: [{ ROLES: [{
"ROLE_DESC": "", "ROLE_DESC": "",
...@@ -69,7 +70,27 @@ const store = new Vuex.Store({ ...@@ -69,7 +70,27 @@ const store = new Vuex.Store({
'INFO': {}, 'INFO': {},
'baseinfo': {} 'baseinfo': {}
}, },
isChildCustomer: false // 从本地存储恢复登录信息,避免热重载时丢失
isChildCustomer: lifeData.isChildCustomer !== undefined ? lifeData.isChildCustomer : false
},
getters: {
// 获取角色信息,包含 USER_BP 和 ROLE
role(state) {
if (!state.userBpData) {
return {
USER_BP: '',
ROLE: ''
}
}
// 获取第一个角色的 ROLE_ID
const roleId = state.userBpData.ROLES && state.userBpData.ROLES.length > 0
? state.userBpData.ROLES[0].ROLE_ID
: ''
return {
USER_BP: state.userBpData.USER_BP || '',
ROLE: roleId
}
}
}, },
mutations: { mutations: {
$uStore(state, payload) { $uStore(state, payload) {
...@@ -95,4 +116,4 @@ const store = new Vuex.Store({ ...@@ -95,4 +116,4 @@ const store = new Vuex.Store({
} }
}) })
export default store export default store
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