Commit 2727ebc4 authored by chicheng's avatar chicheng

添加账票管理模块

parent fbe1daab
......@@ -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",
"style": {
......@@ -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": {
......
......@@ -3,19 +3,17 @@
<view class="status_bar" :style="navHeight"></view>
<view class="listview">
<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>
<view class="cell-list-block__content">
<text class="cell-list-block__title">账款查询</text>
<text class="cell-list-block__desc">Account inquiry</text>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</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>
<view class="cell-list-block__content">
<text class="cell-list-block__title">市场支持费用查询</text>
<text class="cell-list-block__desc">Market support fee inquiry</text>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
......@@ -45,9 +43,9 @@
...mapState(['sysinfo'])
},
methods: {
goOrder(type) {
goOrder(path) {
uni.navigateTo({
url: `/pages/${type}/${type}`
url: `/pages/${path}`
});
}
}
......
......@@ -6,7 +6,7 @@
</view>
<view class="main">
<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">
<view class="listview">
<view class="cell-list">
......@@ -18,16 +18,16 @@
<text class="item-block-label item-block__label">{{item.billto_name}}</text>
</view>
<view class="item-block item-block-date">
<text class="detal-item-label">开票方名称</text>
<text class="detal-item-label">发生日期:{{item.posting_date}}</text>
</view>
<view class="block-detal block-detal-last">
<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>
</view>
<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>
</view>
<view class="block-detal-item block-detal-item-last">
......@@ -43,9 +43,12 @@
</view>
</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>
</view>
<view class="loading-more" v-else>
<text class="loading-more-text">暂无数据</text>
</view>
</cell>
</list>
</view>
......@@ -66,13 +69,15 @@
data() {
return {
itemHead: {},
lists: [{
BILLTO_BP: '--',
BILLTO_NAME: '',
GOODS_AMOUNT: '',
FORWARD_AMOUNT: '',
DEALING_AMOUNT: '',
}]
lists: [],
condition: {
customer: []
},
page: {
page: 1,
pagesize: 50,
totalCount: 0
}
}
},
computed: {
......@@ -91,244 +96,192 @@
'height': `${this.sysinfo.safeArea.height -58}px`,
}
},
...mapState(['sysinfo', 'userInfo'])
...mapState(['sysinfo', 'userInfo', 'userBpData'])
},
created() {
this.accountInquiry();
this.accountInquiry(1);
},
methods: {
async accountInquiry() {
let CUSTOMER = []
if (this.userInfo.role !== 'WLY001') {
CUSTOMER = [{
SIGN: 'I',
OPTION: 'EQ',
LOW: this.userInfo.code,
HIGH: ''
}]
scrolltolower() {
if (this.lists.length >= this.page.totalCount && this.page.totalCount > 0) {
return;
}
const params = {
'USER_BP': this.userInfo.code,
ROLE: 'WLY001',
CUSTOMER,
this.page.page++;
this.accountInquiry(this.page.page);
},
async accountInquiry(pageNo = 1) {
// 处理客户条件,转换为SAP格式(属性名小写,与PC端保持一致)
const customer = (this.condition.customer || []).map(v => ({
sign: v.sign || v.SIGN || 'I',
option: v.option || v.OPTION || 'EQ',
low: v.low || v.LOW || '',
high: v.high || v.HIGH || ''
}))
// 构建查询条件对象,与PC端格式保持一致
const allConditions = {}
if (customer.length > 0) {
allConditions.customer = customer
}
// 获取用户编号和角色信息,参考 ticket-order.nvue 的方式
const userCode = this.userInfo?.code || ''
// 从 userBpData 获取第一个角色的 ROLE_ID
const roleId = this.userBpData?.ROLES && this.userBpData.ROLES.length > 0
? this.userBpData.ROLES[0].ROLE_ID
: ''
let params = {
user_bp: userCode,
role: roleId,
...allConditions,
page: pageNo,
pagesize: this.page.pagesize,
totalCount: this.page.totalCount,
is_result: 1,
sort: []
}
uni.showLoading({
title: '加载中'
});
const res = await apiAccountInquiry(params);
uni.hideLoading();
if (res) {
if (pageNo === 1) {
this.lists = res.data || [];
} else {
this.lists = this.lists.concat(res.data || []);
}
this.page.totalCount = res?.TOTALCOUNT || res?.totalCount || res?.Total || this.page.totalCount;
}
const res = await apiAccountInquiry(params)
this.lists = res.data
}
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
/* #ifndef APP-PLUS */
page {
width: 100%;
min-height: 100%;
display: flex;
background: #F2F3F5;
}
.header-bg {
height: 284rpx;
margin-top: -88rpx;
.status_bar {
height: var(--status-bar-height);
}
.header-bg-img {
width: 750rpx;
}
/* #endif */
.lists {
position: relative;
flex-direction: column;
background: #f0f4f5;
overflow: hidden;
}
.main {
position: relative;
flex-direction: column;
margin-top: -164rpx;
padding: 0 16rpx;
// overflow-y: scroll;
}
.list-wrapper {
display: flex;
flex-direction: column;
flex: 1;
background: #F2F3F5;
}
.list {
display: flex;
flex-direction: column;
.header-bg {
position: absolute;
left: 0;
right: 0;
height: 382rpx;
}
.order {
display: flex;
padding: 0 16rpx;
background: #f0f4f5;
.header-bg-img {
width: 750rpx;
height: 382rpx;
}
.list-cell {
padding-bottom: 26rpx;
.main {
flex: 1;
padding: 0 32rpx;
margin-top: 100rpx;
}
.listview {
.list-wrapper {
flex: 1;
flex-direction: column;
}
.empty-block {
height: 14px;
background: #f0f4f5;
.list {
flex: 1;
}
.cell-list {
.listview {
flex-direction: column;
}
.date {
font-size: 28rpx;
color: #999999;
font-size: 28rpx;
text-align: center;
background-color: #FFFFFF;
border-radius: 10rpx;
margin-bottom: 24rpx;
padding: 24rpx;
}
.icon-address {
width: 44rpx;
height: 44rpx;
margin-right: 16rpx;
}
.cell-list-block__content {
display: flex;
flex: 1;
.cell-list {
flex-direction: column;
margin-bottom: 40rpx;
}
.cell-list-block__title {
color: #333;
font-size: 30rpx;
flex: 1;
align-items: center;
margin-bottom: 4rpx;
}
.cell-list-block {
overflow: hidden;
display: flex;
.planout-block-item {
flex-direction: column;
background: #fff;
padding: 20rpx 24rpx;
border-radius: 20rpx;
margin-bottom: 56rpx;
}
.list-block-title {
display: flex;
.item-block {
flex-direction: row;
align-items: center;
margin-bottom: 16rpx;
}
.list-block-title__text {
color: #999999;
font-size: 26rpx;
}
.planout-block-item {
flex: 1;
padding: 40rpx 32rpx;
background-color: #fff;
border-radius: 16rpx 100rpx 16rpx 16rpx;
}
.item-block {
overflow: hidden;
background-color: #fff;
padding: 0 16rpx;
.item-block-code {
justify-content: space-between;
}
.item-block-label {
font-size: 24rpx;
color: #333;
font-size: 28rpx;
color: #333333;
}
.item-block__label {
flex: 1;
text-align: left;
font-weight: bold;
font-size: 32rpx;
color: #333;
font-weight: 500;
// white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item-block-code {
display: flex;
align-items: center;
justify-content: space-between;
}
.item-block-name {
margin-top: 32rpx;
margin-bottom: 8rpx;
}
.item-block-date {
margin-top: 12rpx;
margin-bottom: 48rpx;
margin-bottom: 24rpx;
}
.item-block-label-des {
flex: 1;
text-align: left;
font-size: 28rpx;
color: #333;
.detal-item-label {
font-size: 24rpx;
color: #999999;
}
.block-detal {
display: flex;
flex-direction: column;
background: #f8f8f8;
border-radius: 20rpx;
padding: 28rpx 32rpx;
margin-bottom: 52rpx;
}
.block-detal-last {
margin-bottom: 32rpx;
flex-direction: row;
background-color: #F8F8F8;
padding: 24rpx;
border-radius: 8rpx;
}
.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;
flex: 1;
align-items: center;
}
.detal-item-value {
color: #333;
font-size: 28rpx;
color: #333333;
margin-top: 8rpx;
font-weight: bold;
}
.loading-more {
flex: 1;
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
padding-top: 20rpx;
padding-bottom: 20rpx;
}
.loading-more-text {
font-size: 12px;
font-size: 28rpx;
color: #999;
}
.empty-block {
height: 24rpx;
}
</style>
......@@ -36,7 +36,7 @@
<text class="entry-bill-text">销售订单</text>
</view>
<!-- <view class="entry-block" @click="goPage('billing-invoice')">
<view class="entry-block" @click="goPage('billing-invoice')">
<view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing"
src="@/static/image/usercenter_billinginvoice@3x.png" mode="">
......@@ -44,7 +44,6 @@
</view>
<text class="entry-bill-text">账票管理</text>
</view>
-->
<view class="entry-block" @click="goPage('ticket-order')" v-if='!isChildCustomer'>
<view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing"
......
......@@ -183,23 +183,23 @@ class Request {
if (config.url.indexOf('crm-app') !== -1) {
config.baseUrl = 'https://crm.wuliangye.com.cn'
// config.baseUrl = 'http://221.10.127.60:5000'
// config.baseUrl = 'https://crm.wuliangye.com.cn'
config.baseUrl = 'http://221.10.127.60:5000'
} else if (config.url.indexOf('adapter') !== -1) {
config.baseUrl = 'http://api.wuliangcreart.com'
// config.baseUrl = 'http://221.10.127.60:5000/gateway/cyj'
// config.baseUrl = 'http://api.wuliangcreart.com'
config.baseUrl = 'http://221.10.127.60:5000/gateway/cyj'
} else if (config.url.indexOf('wmdpwebservices') !== -1) {
config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/sczx'
// config.baseUrl = 'http://221.10.127.60:5000/gateway/sczx'
// config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/sczx'
config.baseUrl = 'http://221.10.127.60:5000/gateway/sczx'
} else if (config.url.indexOf('wmdp-storeapp') !== -1) {
config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/zdcx'
// config.baseUrl = 'http://221.10.127.60:5000/gateway/zdcx'
// config.baseUrl = 'https://crm.wuliangye.com.cn/gateway/zdcx'
config.baseUrl = 'http://221.10.127.60:5000/gateway/zdcx'
} else if (config.url.indexOf('uusafe') !== -1) {
config.baseUrl = 'https://apps.wuliangye.com.cn:9076'
// config.baseUrl = 'https://zzy.ipincloud.cn:9070'
// config.baseUrl = 'https://apps.wuliangye.com.cn:9076'
config.baseUrl = 'https://zzy.ipincloud.cn:9070'
} else {
config.baseUrl = 'http://218.89.67.37:8001/wlySap'
// config.baseUrl = 'http://221.10.127.60:5000/wlySap'
// config.baseUrl = 'http://218.89.67.37:8001/wlySap'
config.baseUrl = 'http://221.10.127.60:5000/wlySap'
}
console.log(config.baseUrl)
} catch (e) {
......
......@@ -12,7 +12,7 @@ try {
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
let saveStateKeys = ['vuex_user', 'vuex_token'];
let saveStateKeys = ['vuex_user', 'vuex_token', 'userInfo', 'userBpData', 'isChildCustomer'];
// 保存变量到本地存储中
const saveLifeData = function(key, value) {
......@@ -38,11 +38,12 @@ const store = new Vuex.Store({
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version: '1.0.1',
vuex_demo: '绛紫',
userInfo: {
// 从本地存储恢复登录信息,避免热重载时丢失
userInfo: lifeData.userInfo ? lifeData.userInfo : {
name: '',
code: ''
},
userBpData: {
userBpData: lifeData.userBpData ? lifeData.userBpData : {
USER_BP: '',
ROLES: [{
"ROLE_DESC": "",
......@@ -69,7 +70,27 @@ const store = new Vuex.Store({
'INFO': {},
'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: {
$uStore(state, payload) {
......
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