Merge pull request '1、oms调拨时显示可调拨金额及哪些账户可进行调拨' (#5) from zyj into master

Reviewed-on: #5
pull/6/head
zhangyouji 12 months ago
commit c5ede2ad4c
  1. 7
      financialCenter/serviceStation/index.vue
  2. 4
      oilAccount/components/accountListItem.vue
  3. 148
      oilAccount/page/accountRecharge/add.vue
  4. 4
      oilAccount/page/accountRecharge/details.vue

@ -23,6 +23,8 @@
<image class="logo" src="@/static/serviceStation.png"></image>
<view>{{item.accountName}}</view>
<view>账户总余额{{handlerNumber(item.balance)}}</view>
<view>近3日平均销量{{handlerNumber(item.nlyThreedaysAvgAmount)}}</view>
<view>统计时间{{item.nlyThreedaysAvgTime?item.nlyThreedaysAvgTime:'--'}}</view>
</view>
</view>
</scroll-view>
@ -128,7 +130,7 @@
position: relative;
margin-bottom: 25rpx;
padding-top: 60rpx;
height: 200rpx;
height: 300rpx;
width: 100%;
background: #fff;
border-radius: 10rpx;
@ -155,9 +157,10 @@
font-weight: 550;
}
.container .item view:nth-of-type(2) {
.container .item view {
margin-top: 10rpx;
color: #778899;
font-size: 24rpx;
}
</style>

@ -92,13 +92,13 @@
}
case 'RECHARGE_REBETE':
return {
text: '返',
text: '返',
color: '#9F43CC',
bg: 'rgba(159, 67, 204, 0.1)'
}
case 'CONSUME_REBATE':
return {
text: '返',
text: '返',
color: '#9F43CC',
bg: 'rgba(159, 67, 204, 0.1)'
}

@ -2,9 +2,10 @@
<!-- 布局 flex 组件 view -->
<view class="addDiver_body">
<view class="sele_Bar">
<view :style="{transform: barIndex==2? 'translateX( calc(100% - 20rpx) )' :'' ,background:barIndex==2? '#EC4645' :'' }" class="move_item"></view>
<view :style="{transform: barIndex==2? 'translateX(100%)':barIndex==3? 'translateX(200%)' :'' ,background:barIndex==2? '#EC4645' :barIndex==3?'#13ce66':'' }" class="move_item"></view>
<view @tap="seleBarFn(1)" :style="{color:barIndex==1? 'white' : ''}" class="sele_Bar_item">调拨</view>
<view @tap="seleBarFn(2)" :style="{color:barIndex==2? 'white' : ''}" class="sele_Bar_item">回拨</view>
<view @tap="seleBarFn(3)" :style="{color:barIndex==3? 'white' : ''}" class="sele_Bar_item">充返</view>
</view>
<!-- 卡片 -->
<view class="addDiver_card">
@ -19,7 +20,7 @@
{{ postData.accountName?postData.accountName: '请选择油站账户' }}
</view>
</uni-list-item>
<uni-list-item @click="isShowFn('companyAccountBank')" link>
<uni-list-item @click="isShowFn('companyAccountBank')" link v-show="barIndex!=3">
<view class="list_header" slot="header">
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: 0;" mode="widthFix">
</image>
@ -29,6 +30,16 @@
{{postData.companyName?postData.companyName:'选择账户后自动带出'}}
</view>
</uni-list-item>
<view v-if="barIndex==1&&postData.siteChannelAccountId" style="padding: 0 16rpx;">
<view class="flex_jw">
<view>账户余额</view>
<view>{{postData.balance?postData.balance:''}}</view>
</view>
<view class="flex_jw">
<view>待审核充值金额</view>
<view>{{postData.theRemainingAmount?postData.theRemainingAmount:''}}</view>
</view>
</view>
<uni-list-item>
<view class="list_header" slot="header">
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: 0;" mode="widthFix">
@ -40,12 +51,46 @@
placeholder="请输入交易金额" class="list_right_input" />
</view>
</uni-list-item>
<uni-list-item v-show="barIndex==3">
<view class="list_header" slot="header">
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: 0;" mode="widthFix">
</image>
交易摘要
</view>
<view style="padding-right: 16px !important;" slot="body" class="list_right">
<input type="digit" v-model="postData.reverseRemark"
placeholder="请输入交易摘要" class="list_right_input" />
</view>
</uni-list-item>
<uni-datetime-picker @change='pickerClick' type="daterange"
rangeSeparator="至" v-model="rebateTimeSlot">
<uni-list-item v-show="barIndex==3" link>
<view class="list_header" slot="header">
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: 0;" mode="widthFix">
</image>
返利时间段
</view>
<view style="" slot="body" class="list_right">
<view slot="body" :style="{color:postData.rebateStartTime?'#333333':' '}"
class="list_right list_nosele">
{{postData.rebateStartTime?postData.rebateStartTime+','+postData.rebateEndTime:'请选择返利时间段'}}
</view>
</view>
</uni-list-item>
</uni-datetime-picker>
<uni-list-item v-show="barIndex==3" link>
<view class="list_header" slot="header">线下交易凭证</view>
<view @click="clickfn" slot="body" :style="{color:postData.offlineTransactionProof?'#333333':''}"
class="list_right list_nosele">
{{postData.offlineTransactionProof?'已上传':'请上传'}}
</view>
</uni-list-item>
</uni-list>
</view>
<!-- 底部按钮 -->
<view class="list_footer">
<button :style="{background:barIndex==2? '#EC4645' :'' }" @tap="postFn"
class="list_butten ">{{barIndex==1?'确认调拨':'确认回拨'}} {{postData.transactionAmount||''}}</button>
<button :style="{background:barIndex==2? '#EC4645':barIndex==3? '#13ce66':'' }" @tap="postFn"
class="list_butten ">{{barIndex==1?'确认调拨':barIndex==2?'确认回拨':'确认充返'}} {{postData.transactionAmount||''}}</button>
</view>
<!-- 企业打款账户选择器 -->
<cpicker ref ='cpicker' @localSeach='localSeach' @chargeChange='companyAccountConfirm' v-model="isShow.companyAccount" />
@ -60,6 +105,7 @@
import account from '@/api/oilAccount'
import md5 from 'js-md5'
import cpicker from '../../components/picker.vue'
import utils from '@/utils/encode'
export default {
components: {
cpicker
@ -78,6 +124,8 @@
oilCompanyBank: false
},
disabled: false,
rebateTimeSlot:[],
imageValue:[],
postData: {
accountName:'',
companyName:'',
@ -89,7 +137,10 @@
transactionType: "", //
createSource: "OMS-MINIAPP",
balance:'',
totalRechargeAmount:''
totalRechargeAmount:'',
rebateStartTime:'',
rebateEndTime:'',
offlineTransactionProof:''
}
}
},
@ -109,6 +160,16 @@
},
seleBarFn(e) {
this.barIndex = e
if(this.barIndex!=3){
this.postData.reverseRemark = ''
this.postData.rebateStartTime = ''
this.postData.rebateEndTime = ''
this.postData.offlineTransactionProof = ''
}
},
pickerClick(time) {
this.postData.rebateStartTime = time[0]
this.postData.rebateEndTime = time[1]
},
isShowFn(e) {
this.isShow[e] = !this.isShow[e]
@ -142,14 +203,14 @@
},
//
clickfn(e) {
// if (typeof e !== "object") {
// this.postData.offlineTransactionProof = e;
// uni.showToast({
// title: ''
// })
// return
// }
// tool.chooseImage(this.clickfn)
if (typeof e !== "object") {
this.postData.offlineTransactionProof = e;
uni.showToast({
title: '上传成功'
})
return
}
tool.chooseImage(this.clickfn)
},
companyAccountConfirm(e) {
this.clearFn(this.postData,['accountName','siteChannelAccountId','receivingCompanyId','companyName','theRemainingAmount','totalRechargeAmount'])
@ -164,6 +225,7 @@
account.getLikeBySiteComNameLimitNew({id:a[0].siteCompanyInfoId}).then(res=>{
this.postData.companyName = res.data[0]['companyName'];
this.postData.balance = res.data[0]['balance']
this.postData.theRemainingAmount = res.data[0]['theRemainingAmount']
})
}else{
uni.showToast({
@ -223,19 +285,41 @@
let that = this
let olicheck = null
let check = null
let checkPage = {
receivingCompanyId: {
tacitly: '',
WrongText: '请完善油站公司信息'
},
siteChannelAccountId: {
tacitly: '',
WrongText: '请完善油站账户信息'
},
transactionAmount: {
tacitly: '',
WrongText: '交易金额不能为空'
},
let checkPage = {}
if(this.barIndex==3){
checkPage = {
siteChannelAccountId: {
tacitly: '',
WrongText: '请完善油站账户信息'
},
transactionAmount: {
tacitly: '',
WrongText: '交易金额不能为空'
},
reverseRemark: {
tacitly: '',
WrongText: '交易摘要不能为空'
},
rebateStartTime: {
tacitly: '',
WrongText: '返利时间不能为空'
},
}
}else{
checkPage = {
receivingCompanyId: {
tacitly: '',
WrongText: '请完善油站公司信息'
},
siteChannelAccountId: {
tacitly: '',
WrongText: '请完善油站账户信息'
},
transactionAmount: {
tacitly: '',
WrongText: '交易金额不能为空'
},
}
}
check = tool.checkFn(this.postData, [], checkPage)
if (!check.result) {
@ -247,7 +331,9 @@
}
if(this.barIndex==1){
if(this.barIndex==3){
this.saveFn()
}else if(this.barIndex==1){
if(Number(this.postData.transactionAmount)>Number(this.postData.balance)){
uni.showModal({
title: '提示',
@ -282,7 +368,7 @@
}
},
saveFn() {
this.postData['transactionType'] = this.barIndex==1?'DISPATCH':'CALLBACK'
this.postData['transactionType'] = this.barIndex==1?'DISPATCH': this.barIndex==3?'RECHARGE_REBETE':'CALLBACK'
account.saveNew(this.postData).then(res => {
(res.code == 20000) && uni.showToast({
title: '操作成功',
@ -309,7 +395,7 @@
.move_item {
position: absolute;
left: 10rpx;
width: 50%;
width: 33%;
height: 60rpx;
background: #2866FF;
border-radius: 10rpx;
@ -479,6 +565,10 @@
box-sizing: border-box;
padding-left: 20rpx;
}
.flex_jw{
display: flex;
justify-content:space-between;
}
.addDiver_body {
padding: 0 40rpx;

@ -191,13 +191,13 @@
}
case 'RECHARGE_REBETE':
return {
text: '返',
text: '返',
color: '#9F43CC',
bg: 'rgba(159, 67, 204, 0.1)'
}
case 'CONSUME_REBATE':
return {
text: '返',
text: '返',
color: '#9F43CC',
bg: 'rgba(159, 67, 204, 0.1)'
}

Loading…
Cancel
Save