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}`
}); });
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</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">
...@@ -18,16 +18,16 @@ ...@@ -18,16 +18,16 @@
<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">
...@@ -43,9 +43,12 @@ ...@@ -43,9 +43,12 @@
</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>
<view class="loading-more" v-else>
<text class="loading-more-text">暂无数据</text>
</view>
</cell> </cell>
</list> </list>
</view> </view>
...@@ -66,13 +69,15 @@ ...@@ -66,13 +69,15 @@
data() { data() {
return { return {
itemHead: {}, itemHead: {},
lists: [{ lists: [],
BILLTO_BP: '--', condition: {
BILLTO_NAME: '', customer: []
GOODS_AMOUNT: '', },
FORWARD_AMOUNT: '', page: {
DEALING_AMOUNT: '', page: 1,
}] pagesize: 50,
totalCount: 0
}
} }
}, },
computed: { computed: {
...@@ -91,244 +96,192 @@ ...@@ -91,244 +96,192 @@
'height': `${this.sysinfo.safeArea.height -58}px`, 'height': `${this.sysinfo.safeArea.height -58}px`,
} }
}, },
...mapState(['sysinfo', 'userInfo']) ...mapState(['sysinfo', 'userInfo', 'userBpData'])
}, },
created() { created() {
this.accountInquiry(); this.accountInquiry(1);
}, },
methods: { methods: {
async accountInquiry() { scrolltolower() {
let CUSTOMER = [] if (this.lists.length >= this.page.totalCount && this.page.totalCount > 0) {
if (this.userInfo.role !== 'WLY001') { return;
CUSTOMER = [{
SIGN: 'I',
OPTION: 'EQ',
LOW: this.userInfo.code,
HIGH: ''
}]
} }
const params = { this.page.page++;
'USER_BP': this.userInfo.code, this.accountInquiry(this.page.page);
ROLE: 'WLY001', },
CUSTOMER, 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.view { /* #ifndef APP-PLUS */
flex-direction: column; page {
width: 100%;
min-height: 100%;
display: flex;
background: #F2F3F5;
} }
.header-bg { .status_bar {
height: 284rpx; height: var(--status-bar-height);
margin-top: -88rpx;
} }
.header-bg-img { /* #endif */
width: 750rpx;
}
.lists { .lists {
position: relative; flex: 1;
flex-direction: column; background: #F2F3F5;
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;
} }
.list { .header-bg {
display: flex; position: absolute;
flex-direction: column; left: 0;
right: 0;
height: 382rpx;
} }
.order { .header-bg-img {
display: flex; width: 750rpx;
padding: 0 16rpx; height: 382rpx;
background: #f0f4f5;
} }
.list-cell { .main {
padding-bottom: 26rpx; flex: 1;
padding: 0 32rpx;
margin-top: 100rpx;
} }
.listview { .list-wrapper {
flex: 1; flex: 1;
flex-direction: column;
} }
.empty-block { .list {
height: 14px; flex: 1;
background: #f0f4f5;
} }
.cell-list { .listview {
flex-direction: column; flex-direction: column;
} background-color: #FFFFFF;
border-radius: 10rpx;
.date {
font-size: 28rpx;
color: #999999;
font-size: 28rpx;
text-align: center;
margin-bottom: 24rpx; margin-bottom: 24rpx;
padding: 24rpx;
} }
.icon-address { .cell-list {
width: 44rpx;
height: 44rpx;
margin-right: 16rpx;
}
.cell-list-block__content {
display: flex;
flex: 1;
flex-direction: column; 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 { .planout-block-item {
overflow: hidden;
display: flex;
flex-direction: column; flex-direction: column;
background: #fff;
padding: 20rpx 24rpx;
border-radius: 20rpx;
margin-bottom: 56rpx;
} }
.list-block-title { .item-block {
display: flex; flex-direction: row;
align-items: center; align-items: center;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.list-block-title__text { .item-block-code {
color: #999999; justify-content: space-between;
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-label { .item-block-label {
font-size: 24rpx; font-size: 28rpx;
color: #333; color: #333333;
} }
.item-block__label { .item-block__label {
flex: 1; font-weight: bold;
text-align: left;
font-size: 32rpx; 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 { .item-block-date {
margin-top: 12rpx; margin-bottom: 24rpx;
margin-bottom: 48rpx;
} }
.item-block-label-des { .detal-item-label {
flex: 1; font-size: 24rpx;
text-align: left; color: #999999;
font-size: 28rpx;
color: #333;
} }
.block-detal { .block-detal {
display: flex; flex-direction: row;
flex-direction: column; background-color: #F8F8F8;
background: #f8f8f8; padding: 24rpx;
border-radius: 20rpx; border-radius: 8rpx;
padding: 28rpx 32rpx;
margin-bottom: 52rpx;
}
.block-detal-last {
margin-bottom: 32rpx;
} }
.block-detal-item { .block-detal-item {
display: flex; flex: 1;
margin-bottom: 32rpx; align-items: center;
justify-content: space-between;
}
.block-detal-item-last {
margin-bottom: 0;
}
.detal-item-label {
color: #999;
font-size: 24rpx;
} }
.detal-item-value { .detal-item-value {
color: #333;
font-size: 28rpx; font-size: 28rpx;
color: #333333;
margin-top: 8rpx;
font-weight: bold;
} }
.loading-more { .loading-more {
flex: 1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 14px; padding-top: 20rpx;
padding-bottom: 14px; padding-bottom: 20rpx;
text-align: center;
} }
.loading-more-text { .loading-more-text {
font-size: 12px; font-size: 28rpx;
color: #999; color: #999;
} }
.empty-block {
height: 24rpx;
}
</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) {
......
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