dev-1021
Seep 1 year ago
parent 6705ce24a8
commit 084092a7ad
  1. 9
      common/api.js
  2. 7
      common/config.js
  3. 9
      pages/home/home.vue
  4. 142
      pages/my/incomeExpenditureDetail.vue
  5. 128
      pages/my/mySign.vue
  6. BIN
      static/image/x1.png
  7. BIN
      static/image/x2.png

@ -74,4 +74,13 @@ export const orderPay = (params, config = {custom: { auth: true }}) => http.post
export const bindInvitor = (params, config = {custom: { auth: true }}) => http.post('/api/user/bindInvitor', params, config); export const bindInvitor = (params, config = {custom: { auth: true }}) => http.post('/api/user/bindInvitor', params, config);
//上架 //上架
export const payUpGoods = (params, config = {custom: { auth: true }}) => http.post('/api/order/payUpGoods', params, config); export const payUpGoods = (params, config = {custom: { auth: true }}) => http.post('/api/order/payUpGoods', params, config);
//收支详情
export const incomeDetail = (params, config = {custom: { auth: true }}) => http.get('/api/user/getUserIncomeAndExpandList', {params}, config);
//提交支付凭证
export const submitPingzheng = (params, config = {custom: { auth: true }}) => http.post('/api/user/submitPay', params, config);
//确认收款
export const confirmPay = (params, config = {custom: { auth: true }}) => http.post('/api/user/confirmPay', params, config);
//确认签约
export const confirmSign = (params, config = {custom: { auth: true }}) => http.post('/api/user/updateUserInfo', params, config);

@ -1,2 +1,5 @@
export const $apiLinks = "https://admin.hezhiying.com.cn/" // api 接口地址 // export const $apiLinks = "https://admin.hezhiying.com.cn/" // api 接口地址
export const baseUrl = "https://admin.hezhiying.com.cn/" // export const baseUrl = "https://admin.hezhiying.com.cn/"
export const $apiLinks = "https://huazhiyuadmin.first315.com/" // api 接口地址
export const baseUrl = "https://huazhiyuadmin.first315.com/"

@ -62,7 +62,10 @@
</view> </view>
</view> </view>
<image src="/static/image/x.png" @click="onSkip('goods','/static/image/x.png')" class="zenxuan" mode=""></image> <view class="zeng-xuan">
<image mode="widthFix" style="width: 49%;display: block;" src="/static/image/x1.png" @click="onSkip('goods','/static/image/x.png')" class="zenxuan" ></image>
<image mode="widthFix" style="width: 49%;display: block;" src="/static/image/x2.png" @click="onSkip('goods','/static/image/x.png')" class="zenxuan" ></image>
</view>
</view> </view>
<view class="devide"></view> <view class="devide"></view>
<view class="new-product"> <view class="new-product">
@ -239,4 +242,8 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import 'home.scss'; @import 'home.scss';
.zeng-xuan{
display: flex;
justify-content: space-between;
}
</style> </style>

@ -1,26 +1,34 @@
<template> <template>
<view class="page"> <view v-if="incomeDetail !== ''" class="page">
<view class="info"> <view v-if="!incomeDetail.id" style="text-align: center;padding-top: 40vh;">暂无数据</view>
<view v-if="incomeDetail.type === 2" class="info" style="padding: 10px 0 10px 10px;position: relative;">
<view style="padding-bottom: 5px;">付款人{{incomeDetail.buyer.nickname}}</view>
<view style="padding-bottom: 5px;">联系电话{{incomeDetail.buyer.mobile}}</view>
<view>付款金额{{incomeDetail.amount}}</view>
<view v-if="incomeDetail.pay_voucher" class="saveBtn other-btn" style="background-color: orange;border: 0;" @click="lookPic">支付凭证</view>
<view class="saveBtn other-btn" style="top: 50px !important" @click="sureIncome">确认收款</view>
</view>
<view v-if="incomeDetail.type === 1" class="info">
<view class="title">测试优先公司</view> <view class="title">测试优先公司</view>
<view>收款人xxx 付款金额xxx元</view> <view>收款人{{incomeDetail.seller.nickname}} <text style="padding-left: 30px;">付款金额{{incomeDetail.amount}}</text></view>
</view> </view>
<view class="tabs"> <view v-if="incomeDetail.type === 1" class="tabs">
<view :class="activeIndex==item.id?'tabsItem active':'tabsItem'" @click="getPay(item)" v-for="item in list4" :key="item.id"> <view :class="activeIndex==item.id?'tabsItem active':'tabsItem'" @click="getPay(item)" v-for="item in list4" :key="item.id">
{{item.name}} {{item.name}}
</view> </view>
</view> </view>
<view > <view v-if="incomeDetail.type === 1" >
<view class="yhk" v-show="activeIndex==1"> <view class="yhk" v-show="activeIndex==1">
<view class="list-input"> <view class="list-input">
<view class="title"> <view class="title">
<text>银行卡姓名</text> <text>银行卡姓名</text>
</view> </view>
<view class="content"> <view class="content">
<text>{{yhk.bank_realname}}</text> <text>{{incomeDetail.seller.bank_realname}}</text>
<image <image
v-clipboard:copy="yhk.bank_realname" v-clipboard:copy="incomeDetail.seller.bank_realname"
    v-clipboard:success="(type) => onCopyResult('success')"     v-clipboard:success="(type) => onCopyResult('success')"
    v-clipboard:error="(type) => onCopyResult('error')"     v-clipboard:error="(type) => onCopyResult('error')"
src="../../static/image/copy.png" mode="widthFix"></image> src="../../static/image/copy.png" mode="widthFix"></image>
@ -31,9 +39,9 @@
<text>卡号</text> <text>卡号</text>
</view> </view>
<view class="content" > <view class="content" >
<text>{{yhk.bank_no}}</text> <text>{{incomeDetail.seller.bank_no}}</text>
<image <image
v-clipboard:copy="yhk.bank_no" v-clipboard:copy="incomeDetail.seller.bank_no"
    v-clipboard:success="(type) => onCopyResult('success')"     v-clipboard:success="(type) => onCopyResult('success')"
    v-clipboard:error="(type) => onCopyResult('error')"     v-clipboard:error="(type) => onCopyResult('error')"
src="../../static/image/copy.png" mode="widthFix"></image> src="../../static/image/copy.png" mode="widthFix"></image>
@ -44,9 +52,9 @@
<text>开户行</text> <text>开户行</text>
</view> </view>
<view class="content"> <view class="content">
<text>{{yhk.bank_address}}</text> <text>{{incomeDetail.seller.bank_address}}</text>
<image <image
v-clipboard:copy="yhk.bank_address" v-clipboard:copy="incomeDetail.seller.bank_address"
    v-clipboard:success="(type) => onCopyResult('success')"     v-clipboard:success="(type) => onCopyResult('success')"
    v-clipboard:error="(type) => onCopyResult('error')"     v-clipboard:error="(type) => onCopyResult('error')"
src="../../static/image/copy.png" mode="widthFix"></image> src="../../static/image/copy.png" mode="widthFix"></image>
@ -57,15 +65,22 @@
<text>支行</text> <text>支行</text>
</view> </view>
<view class="content"> <view class="content">
<text>{{yhk.bank_address}}</text> <text>{{incomeDetail.seller.bank_sub_address}}</text>
<image <image
v-clipboard:copy="yhk.bank_address" v-clipboard:copy="incomeDetail.seller.bank_sub_address"
    v-clipboard:success="(type) => onCopyResult('success')"     v-clipboard:success="(type) => onCopyResult('success')"
    v-clipboard:error="(type) => onCopyResult('error')"     v-clipboard:error="(type) => onCopyResult('error')"
src="../../static/image/copy.png" mode="widthFix"></image> src="../../static/image/copy.png" mode="widthFix"></image>
</view> </view>
</view> </view>
</view>
<view v-show="activeIndex!=1" class="ping-zheng">
<image v-show="activeIndex==2" style="width: 60%;height: 110px;" :src="incomeDetail.buyer.alipay_image||''" mode="aspectFit" ></image>
<image v-show="activeIndex==3" style="width: 60%;height: 110px;" :src="incomeDetail.buyer.wechat_image||''" mode="aspectFit" ></image>
<view>收款码</view>
</view> </view>
<view class="ping-zheng"> <view class="ping-zheng">
<u-upload <u-upload
@ -85,7 +100,7 @@
</view> </view>
</view> </view>
<view class="saveBtn">提交</view> <view v-if="incomeDetail.type === 1" class="saveBtn" @click="submit">提交</view>
<u-popup :show="show" mode="bottom" @close="close" round="10" > <u-popup :show="show" mode="bottom" @close="close" round="10" >
<view style="padding:24rpx;max-height:calc(60vh);overflow: auto;"> <view style="padding:24rpx;max-height:calc(60vh);overflow: auto;">
<u-parse :content="content" style="margin-top:45px;"></u-parse> <u-parse :content="content" style="margin-top:45px;"></u-parse>
@ -97,7 +112,7 @@
<script> <script>
import {getToken} from '@/common/auth.js' import {getToken} from '@/common/auth.js'
import {orderDetail,privacyPolicy} from '@/common/api.js' import {incomeDetail,privacyPolicy,submitPingzheng,confirmPay} from '@/common/api.js'
export default { export default {
data() { data() {
return { return {
@ -126,15 +141,38 @@
}, },
pingzhengUrl:'', pingzhengUrl:'',
wxurl:'', wxurl:'',
incomeDetail: '',
}; };
}, },
onLoad(option) { onShow() {
this.num = option.num;
this.id = option.id;
this.getOrderDetails() this.getOrderDetails()
this.getText()
}, },
methods:{ methods:{
submit(){
if(this.finishImageList.length === 0){
this.$refs.uToast.show({
message:'请上传支付凭证'
})
return;
}
submitPingzheng({
id: this.incomeDetail.id,
pay_voucher: this.finishImageList[0].url
}).then(res => {
console.log(res,'res')
if(res.code === 1){
this.$refs.uToast.show({
message:'已上传'
})
const tem = setTimeout(() => {
uni.navigateBack({
delta:1
})
clearTimeout(tem)
},1000)
}
})
},
uploadPingzheng(){ uploadPingzheng(){
this.finishImageList = [] this.finishImageList = []
this.$refs.upload.chooseFile() this.$refs.upload.chooseFile()
@ -153,13 +191,13 @@
}) })
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url) const result = await this.uploadFilePromise(lists[i].url)
this.avatarUrl = JSON.parse(result).data.fullurl; // this.avatarUrl = JSON.parse(result).data.fullurl;
this.avatarUrl_short = JSON.parse(result).data.url; // this.avatarUrl_short = JSON.parse(result).data.url;
updateUserInfo({avatar:this.avatarUrl}).then(res=>{ // updateUserInfo({avatar:this.avatarUrl}).then(res=>{
this.$refs.uToast.show({ // this.$refs.uToast.show({
message:'修改头像成功' // message:''
}) // })
}) // })
} }
}, },
@ -200,10 +238,27 @@
}); });
}) })
}, },
lookPic(imgArr){ sureIncome(){
confirmPay({
id: this.incomeDetail.id,
}).then(res => {
if(res.code === 1){
this.$refs.uToast.show({
message:'确认收款'
})
const tem = setTimeout(() => {
uni.navigateBack({
delta:1
})
clearTimeout(tem)
},1000)
}
})
},
lookPic(){
uni.previewImage({ uni.previewImage({
// current: imgArr[indez], urls: [this.incomeDetail.pay_voucher],
urls: imgArr,
success: (res) => { success: (res) => {
} }
@ -225,12 +280,16 @@
}, },
getOrderDetails(){ getOrderDetails(){
orderDetail({id:this.id,custom: { auth: true }}).then(res=>{ incomeDetail({custom: { auth: true }}).then(res=>{
Object.keys(this.yhk).forEach(item=>{ console.log(res, 'res');
this.yhk[item] = res.data.seller[item] if(res.data.length > 0){
}) this.incomeDetail = res.data[0]
this.pingzhengUrl = res.data.seller.alipay_image if(this.incomeDetail.pay_voucher){
this.wxurl = res.data.seller.wechat_image this.finishImageList = [{url:this.incomeDetail.pay_voucher,path:this.incomeDetail.pay_voucher}]
}
}else{
this.incomeDetail = {}
}
}) })
}, },
@ -255,7 +314,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.info{ .info{
padding: 10px 0 20px 20px; padding: 10px 0 20px 10px;
background: #fff; background: #fff;
.title{ .title{
text-align: center; text-align: center;
@ -417,4 +476,15 @@
color: #999; color: #999;
} }
} }
.other-btn{
width: 75px !important;
height: 30px !important;
font-size: 13px !important;
line-height: 30px !important;
position: absolute !important;
right: 10px;
top: 10px !important;
margin-top: 0px !important;
}
</style> </style>

@ -1,37 +1,36 @@
<template> <template>
<view class="qianyue"> <view class="qianyue">
<!-- <div class="xieyi-content" v-html="content"></div> --> <div class="xieyi-content" v-html="content"></div>
<div> <div>
<u-form :model="form" ref="uForm" :rules="rules"> <u-form :model="form" ref="uForm" :rules="rules">
<u-form-item label="姓名" prop="name" border-bottom required> <u-form-item label="姓名" prop="bank_username" border-bottom required>
<u-input :border="false" v-model="form.name" /> <u-input :border="false" placeholder="请输入姓名" v-model="form.bank_username" />
</u-form-item> </u-form-item>
<u-form-item :label-width="100" label="银行卡姓名" prop="intro" border-bottom required> <u-form-item :label-width="100" label="银行卡姓名" prop="bank_realname" border-bottom required>
<u-input :border="false" v-model="form.intro" /> <u-input :border="false" placeholder="请输入银行卡姓名" v-model="form.bank_realname" />
</u-form-item> </u-form-item>
<u-form-item :label-width="85" label="银行卡号" prop="intro" border-bottom required> <u-form-item :label-width="85" label="银行卡号" prop="bank_no" border-bottom required>
<u-input :border="false" v-model="form.intro" /> <u-input :border="false" placeholder="请输入银行卡号" v-model="form.bank_no" />
</u-form-item> </u-form-item>
<u-form-item :label-width="70" label="开户行" prop="intro" border-bottom required> <u-form-item :label-width="70" label="开户行" prop="bank_address" border-bottom required>
<u-input :border="false" v-model="form.intro" /> <u-input :border="false" placeholder="请输入开户行" v-model="form.bank_address" />
</u-form-item> </u-form-item>
<u-form-item label="支行" prop="intro" border-bottom required> <u-form-item label="支行" prop="bank_sub_address" border-bottom required>
<u-input :border="false" v-model="form.intro" /> <u-input :border="false" placeholder="请输入支行" v-model="form.bank_sub_address" />
</u-form-item> </u-form-item>
<u-form-item label="签字" prop="intro" border-bottom required> <u-form-item label="签字" prop="sign_image" border-bottom required>
<view class="sign-btn" @click="show=true">点击签名</view> <view v-if="!form.sign_image" class="sign-btn" @click="show=true">点击签名</view>
<image v-else style="width: 60vw;" mode="aspectFit" @click="show=true" :src="form.sign_image"></image>
</u-form-item> </u-form-item>
</u-form> </u-form>
</div> </div>
<u-button class="saveBtn">提交</u-button> <view class="saveBtn" @click="submitSign">提交</view>
<u-toast ref="uToast"></u-toast> <u-toast ref="uToast"></u-toast>
<u-popup :show="show" mode="bottom" @close="show=false" round="10" > <u-popup :show="show" mode="bottom" @close="show=false" round="10" >
<view style="width: 100vw; height: 60vh;"> <view style="width: 100vw; height: 60vh;">
<l-signature disableScroll backgroundColor="#ddd" <l-signature disableScroll backgroundColor="#ddd"
ref="signatureRef" ref="signatureRef"
:penColor="penColor"
:penSize="penSize"
:landscape="true" :landscape="true"
:openSmooth="openSmooth" ></l-signature> :openSmooth="openSmooth" ></l-signature>
</view> </view>
@ -45,7 +44,7 @@
</template> </template>
<script> <script>
import {getWarehouseList,getUserInfo,privacyPolicy} from '@/common/api.js' import {getWarehouseList,getUserInfo,privacyPolicy, confirmSign} from '@/common/api.js'
import {getToken} from '@/common/auth.js' import {getToken} from '@/common/auth.js'
import {updateUserInfo} from '@/common/api.js' import {updateUserInfo} from '@/common/api.js'
var base64Img = require('base64-img'); var base64Img = require('base64-img');
@ -56,11 +55,15 @@ export default{
data(){ data(){
return{ return{
form: { form: {
name: '', bank_username: '',
intro: '', bank_realname: '',
bank_no: '',
bank_address: '',
bank_sub_address: '',
sign_image: '',
}, },
rules: { rules: {
name: [ bank_username: [
{ {
required: true, required: true,
message: '请输入姓名', message: '请输入姓名',
@ -68,13 +71,46 @@ export default{
trigger: ['change','blur'], trigger: ['change','blur'],
} }
], ],
intro: [ bank_realname: [
{ {
min: 5, required: true,
message: '简介不能少于5个字', message: '请输入银行卡姓名',
trigger: 'change' //
trigger: ['change','blur'],
}
],
bank_no: [
{
required: true,
message: '请输入银行卡号',
//
trigger: ['change','blur'],
}
],
bank_address: [
{
required: true,
message: '请输入开户行',
//
trigger: ['change','blur'],
}
],
bank_address: [
{
required: true,
message: '请输入开户行',
//
trigger: ['change','blur'],
}
],
bank_sub_address: [
{
required: true,
message: '请输入支行',
//
trigger: ['change','blur'],
} }
] ],
}, },
showList:true, showList:true,
show:false, show:false,
@ -83,6 +119,37 @@ export default{
} }
}, },
methods:{ methods:{
submitSign(){
console.log('submit')
console.log(this.$refs.uForm.validate,'submit')
if(!this.form.bank_address||!this.form.bank_no||!this.form.bank_realname||!this.form.bank_sub_address||!this.form.bank_username||!this.form.sign_image){
return
}
confirmSign(this.form).then(res => {
if(res.code === 1){
this.$refs.uToast.show({
message:'签约信息已提交'
})
const tem = setTimeout(() => {
uni.navigateBack({
delta:1
})
clearTimeout(tem)
},1000)
}
})
// this.$refs.uForm.validate(valid => {
// debugger
// console.log(valid, 'ca')
// if (valid) {
// } else {
// console.log('');
// }
// });
},
base64toBlob(dataurl) { base64toBlob(dataurl) {
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
@ -117,12 +184,11 @@ export default{
formData: { formData: {
}, },
success: (res) => { success: (res) => {
console.log(JSON.parse(res.data),"00") const data = JSON.parse(res.data)
if(JSON.parse(res.data).code==1){ if(data.code==1){
setTimeout(() => { this.form.sign_image = data.data.fullurl
this.saveSignPic(JSON.parse(res.data).data.url) console.log(data, 'this.form.sign_image')
this.show = false
}, 1000)
}else{ }else{
uni.$u.toast(JSON.parse(res.data).msg) uni.$u.toast(JSON.parse(res.data).msg)

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Loading…
Cancel
Save