H5
This commit is contained in:
383
pages/index/Invoicing.vue
Normal file
383
pages/index/Invoicing.vue
Normal file
@@ -0,0 +1,383 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between" @click="showpopupclick">
|
||||
<view>*项目名称</view>
|
||||
<view class=""
|
||||
style="width: 60%; overflow:hidden; font-size:32rpx;color:grey;text-overflow: ellipsis;white-space: nowrap; "
|
||||
v-model="form.article">{{ form.article || '选择项目名称' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*金额</view>
|
||||
<view><input type="digit" v-model="form.price" @input="handleInputChange" placeholder="请填写金额" /></view>
|
||||
</view>
|
||||
|
||||
<view class="Box_box flex-between">
|
||||
<view>*数量:</view>
|
||||
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between" @click="showpicker = true">
|
||||
<view class="Box_boxlang Box_box_bouttme_item_O">*发票类型</view>
|
||||
<view class="Box_box_bouttme_item_T">
|
||||
<text type="text" v-model="form.type">{{ form.type || '请输入发票类型' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*税额:</view>
|
||||
<view><input type="text" disabled='false' v-model="form.tax_amount" placeholder="请填写税额"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*单价:</view>
|
||||
<view><input type="text" disabled='false' v-model="form.d_price" placeholder="请填写单价"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>备注:</view>
|
||||
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preservation flex-colum">
|
||||
<view class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
|
||||
</view>
|
||||
<u-popup :show="showpopup" @close="showpopup = false" @open="openpopup">
|
||||
<view class="popupshow">
|
||||
<view class="popupshowone">请选择项目名称</view>
|
||||
<view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword">
|
||||
<view class="popupshowone_itemone" @click="popupshowone_itemone">
|
||||
{{keyword}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-picker :show="showpicker" @confirm="showpickerconfirm" :columns="columns"
|
||||
@cancel="showpicker = false"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: uni.getStorageSync('keyword'),
|
||||
showpopup: false,
|
||||
showpicker: false,
|
||||
columns: [],
|
||||
Uploadurlnumber: '',
|
||||
namelang: '',
|
||||
merchantAuditStatus: '',
|
||||
form: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: '',
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
number: '',
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onNavigationBarButtonTap() {
|
||||
uni.pro.navigateTo('index/order');
|
||||
},
|
||||
onLoad(e) {
|
||||
// #ifdef APP-PLUS
|
||||
let webView = this.$mp.page.$getAppWebview();
|
||||
webView.setTitleNViewButtonStyle(0, {
|
||||
width: '70px'
|
||||
});
|
||||
// #endif
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/digitalinvoice',
|
||||
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
console.log(res.data.data)
|
||||
this.columns = res.data.data
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// uni.$on('businesscategorys', res => {
|
||||
// console.log(res);
|
||||
// this.form.mcc = res.code;
|
||||
// this.form.article = res.name;
|
||||
// this.keyword = uni.cache.get('keyword')
|
||||
// // this.form.contactLine = res.unionpayCode
|
||||
// // this.form.branchName = res.branchName
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
showpopupclick() {
|
||||
this.keyword = uni.getStorageSync('keyword')
|
||||
this.showpopup = true
|
||||
},
|
||||
popupshowone_itemone() {
|
||||
this.showpopup = false
|
||||
this.form.article = this.keyword
|
||||
},
|
||||
handleInputChange() {
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
return false;
|
||||
}
|
||||
if (this.form.number == null || this.form.number == '') {
|
||||
return false;
|
||||
}
|
||||
if (this.form.type == null || this.form.type == '') {
|
||||
return false;
|
||||
}
|
||||
uni.$u.debounce(this.showpickerconfirm(), 1000)
|
||||
|
||||
},
|
||||
showpickerconfirm(e) {
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入开票金额',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.number == null || this.form.number == '') {
|
||||
uni.showToast({
|
||||
title: '请输入数量',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
if (e.value) {
|
||||
if (e.value[1] == "1%") {
|
||||
this.form.se_amount = 1
|
||||
} else {
|
||||
this.form.se_amount = 3
|
||||
}
|
||||
this.form.type = e.value.toString();
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/se',
|
||||
data: {
|
||||
//参数
|
||||
amount: this.form.price,
|
||||
se_amount: this.form.se_amount
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
this.form.tax_amount = res.data.data.tx
|
||||
this.form.d_price = res.data.data.d_amount
|
||||
this.showpicker = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
businesscategory() {
|
||||
this.showpopup = false
|
||||
uni.pro.navigateTo('index/businesscategory');
|
||||
},
|
||||
async saveMerchantBaseInfoV2() {
|
||||
if (this.form.article == null || this.form.article == '') {
|
||||
uni.showToast({
|
||||
title: '选择项目名称',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.type == null || this.form.type == '') {
|
||||
uni.showToast({
|
||||
title: '请选择类型',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入开票金额',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.number == null || this.form.number == '') {
|
||||
uni.showToast({
|
||||
title: '请输入数量',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.tax_amount == null || this.form.tax_amount == '') {
|
||||
uni.showToast({
|
||||
title: '请输入税额',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.d_price == null || this.form.d_price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入单价',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/subinvoicing',
|
||||
data: this.form,
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
console.log(res)
|
||||
this.form = {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: '',
|
||||
type: '',
|
||||
price: '',
|
||||
number: '',
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
se_amount: ''
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.data.message || res.data.msg,
|
||||
icon: "none",
|
||||
})
|
||||
setTimeout(datalange => {
|
||||
uni.pro.navigateTo('index/wxinvoicing', res.data.data.invoice_records)
|
||||
}, 2000)
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.Box {
|
||||
.Box_box_O {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.Box_box {
|
||||
text-align: right;
|
||||
padding: 24rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.Box_box_bouttme_item_T {
|
||||
padding-left: 30rpx;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
|
||||
text {
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box_box_T {
|
||||
padding: 0 28rpx;
|
||||
border-top: 16rpx solid #e5e5e5;
|
||||
|
||||
.Box_box_T_o {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
image {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.Box_box_Ts {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(@/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.preservation {
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
|
||||
.preservation_box {
|
||||
width: 70%;
|
||||
height: 72rpx;
|
||||
background: #288efb;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.popupshow {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.popupshowone {
|
||||
margin-top: 22rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popupshowone_item {
|
||||
padding: 26rpx 52rpx;
|
||||
|
||||
.popupshowone_itemone {
|
||||
text-align: center;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.popupshowonebotton {
|
||||
margin: 100rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 50rpx 50rpxmy2 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
padding-bottom: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
186
pages/index/businesscategory.vue
Normal file
186
pages/index/businesscategory.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<view class="Box_top"><input placeholder="请输入开票服务名称" :showAction='false' :focus='true' v-model="keyword"
|
||||
@input="onInput" />
|
||||
</view>
|
||||
<view class="nav">
|
||||
<view class="nav-right">
|
||||
<scroll-view scroll-y :scroll-top="scrollTop" @scroll="scroll" @scrolltolower="loadMores" :style="h"
|
||||
scroll-with-animation>
|
||||
<view class="nav-right-item" v-for="(item, index2) in subCategoryList" :key="index2"
|
||||
@click="categorySubClick(item)">
|
||||
<view>{{ item.name }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-wrap">
|
||||
<!-- <view class="empty" v-if="!subCategoryList.length && loadStatus == 'nomore'"><u-empty text="暂无数据"
|
||||
:icon="require('@/static/notice/icon_empty.png')"></u-empty></view>
|
||||
<u-loadmore color="#999" :status="loadStatus" v-else></u-loadmore> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import category from '@/components/qiyue-category/qiyue-category.vue';
|
||||
export default {
|
||||
// components: {
|
||||
// category
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
size: 20,
|
||||
page: 1,
|
||||
keyWord: '',
|
||||
subCategoryList: [],
|
||||
loadStatus: 'nomore',
|
||||
h: null,
|
||||
namelang: '',
|
||||
height: 0,
|
||||
scrollTop: 0,
|
||||
scrollHeight: 0,
|
||||
categoryActive: 0,
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
mounted() {
|
||||
this.computed_h();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.loadMores()
|
||||
},
|
||||
methods: {
|
||||
onInput(e) {
|
||||
// 【不用v-model绑定表单,直接时间获取值】这种方式是uni-app官方的方式,测试结果正确!
|
||||
console.log(e.detail)
|
||||
this.keyword = e.detail.value
|
||||
if (e.detail.value) {
|
||||
uni.$u.debounce(this.getOrder(), 500)
|
||||
} else {
|
||||
this.subCategoryList = []
|
||||
}
|
||||
},
|
||||
async computed_h() {
|
||||
//获取div宽度
|
||||
try {
|
||||
let content_Icon = await uni.utils.info_distance('Box_top');
|
||||
let content_top_box = await uni.utils.info_distance('Box_text');
|
||||
let system_info = await uni.pro.getSystemInfo();
|
||||
var h_ = system_info.windowHeight - content_Icon.height - content_top_box.height - 45 + 'px';
|
||||
this.h = {
|
||||
height: h_
|
||||
};
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
categorySubClick(category) {
|
||||
uni.$emit("businesscategorys", category)
|
||||
uni.cache.set('keyword', category.name)
|
||||
uni.pro.navigateBack();
|
||||
},
|
||||
|
||||
loadMores() {
|
||||
if (this.loadStatus != 'nomore') {
|
||||
this.loadStatus = 'loading'
|
||||
this.page++;
|
||||
this.getOrder();
|
||||
}
|
||||
},
|
||||
searchkeyword(e) {
|
||||
this.name = e
|
||||
this.page = 1
|
||||
this.getOrder()
|
||||
},
|
||||
async getOrder() {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/industrylist',
|
||||
data: {
|
||||
//参数
|
||||
name: this.keyword,
|
||||
page: this.page
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
setTimeout(() => {
|
||||
if (this.page == 1) {
|
||||
this.subCategoryList = res.data.msg;
|
||||
this.loadStatus = 'loadmore'
|
||||
} else {
|
||||
this.subCategoryList.push(...res.data.msg);
|
||||
}
|
||||
if (res.data.msg.length == 20) {
|
||||
this.loadStatus = 'loadmore';
|
||||
} else {
|
||||
this.loadStatus = 'nomore';
|
||||
}
|
||||
console.log('接口返回------', res);
|
||||
}, 500)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.Box {
|
||||
|
||||
.Box_top {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
input {
|
||||
padding: 18rpx 16rpx;
|
||||
width: 100%;
|
||||
border: 2rpx solid #2F87FD;
|
||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
.nav-right {
|
||||
width: 100%;
|
||||
|
||||
.nav-right-item {
|
||||
width: 100%;
|
||||
/* height: 100px; */
|
||||
text-align: left;
|
||||
padding: 24rpx 32rpx;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.nav-right-item image {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box_text {
|
||||
background: #F1F0F5;
|
||||
padding: 10rpx 28rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
text {
|
||||
margin-left: 16rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
157
pages/index/index.vue
Normal file
157
pages/index/index.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<view class="Box flex-between">
|
||||
<view class="content flex-colum" @click="indexInvoicing" v-if="improveinformation">
|
||||
<image src="@/static/item3.png" mode="aspectFill"></image>
|
||||
<text>自开票</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="webview" v-if="improveinformation">
|
||||
<image src="@/static/item2.png" mode="aspectFill"></image>
|
||||
<text>开票员管理</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="indexorder" v-if="improveinformation">
|
||||
<image src="@/static/item1.png" mode="aspectFill"></image>
|
||||
<text>开票记录</text>
|
||||
</view>
|
||||
<!-- <view class="content flex-colum" @click="information">
|
||||
<image src="@/static/item4.png" mode="aspectFill"></image>
|
||||
<text>完善商家信息</text>
|
||||
</view> -->
|
||||
<view class="content flex-colum" @click="notification" v-if="improveinformation">
|
||||
<image src="@/static/item6.png" mode="aspectFill"></image>
|
||||
<text>绑定通知</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
improveinformation: false,
|
||||
improveinformationlist: {}
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
// getLocationInfo() {
|
||||
// uni.getLocation({
|
||||
// type: 'wgs84',
|
||||
// success: (res) => {
|
||||
// console.log(res, '获取距离')
|
||||
// // this.lng = res.longitude
|
||||
// // this.lat = res.latitude
|
||||
// // this.positionindex()
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// // this.positionindex()
|
||||
// console.log(err, '获取错误')
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
if (e.userId) {
|
||||
uni.cache.set('userId', e.userId);
|
||||
}
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/storestatus',
|
||||
data: {
|
||||
//参数
|
||||
store_id: uni.getStorageSync('userId')
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
this.improveinformationform = res.data.data.store
|
||||
uni.cache.set('form', this.improveinformationform);
|
||||
if (res.data.data.sz_status == 0) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/information'
|
||||
});
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/index/information?store=' + JSON.stringify(this.improveinformationform)
|
||||
// });
|
||||
} else {
|
||||
this.improveinformation = true
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
information() {
|
||||
uni.pro.navigateTo('index/information', this.improveinformationform);
|
||||
},
|
||||
notification() {
|
||||
uni.pro.navigateTo('index/notification');
|
||||
},
|
||||
indexInvoicing() {
|
||||
uni.pro.navigateTo('index/Invoicing');
|
||||
},
|
||||
webview() {
|
||||
uni.pro.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
try {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'szzpy/h5url',
|
||||
data: {
|
||||
//参数
|
||||
store_id: uni.getStorageSync('userId')
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
console.log(res.data.data.url)
|
||||
uni.pro.navigateTo('webview/webview', {
|
||||
url: res.data.data.url,
|
||||
tape: 1
|
||||
});
|
||||
uni.pro.hideLoading()
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
uni.pro.hideLoading()
|
||||
}
|
||||
|
||||
},
|
||||
indexorder() {
|
||||
uni.pro.navigateTo('index/order');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.Box {
|
||||
padding: 0rpx 28rpx;
|
||||
|
||||
.content {
|
||||
margin-top: 32rpx;
|
||||
width: 218rpx;
|
||||
height: 218rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.Box::after {
|
||||
content: '';
|
||||
width: 218rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
435
pages/index/information.vue
Normal file
435
pages/index/information.vue
Normal file
@@ -0,0 +1,435 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between">
|
||||
<view>请填写公司名字</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled="disabled" v-model="form.title"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>请填写法人姓名</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.legal_person_name"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>请填写法人手机号</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.phone"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>电子税局账号</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.dlzh"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>电子税局密码</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.dlmm"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between" @click="showpicker = true">
|
||||
<view>省份</view>
|
||||
<view class="flex-start">
|
||||
{{form.provinceno_name || ''}}<u-icon name="arrow-right" color="#999999" size="16"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>邀请码</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.code"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box_T">
|
||||
<view class="Box_box_T_o">请上传法人身份证图片</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<view class="Box_box_d" v-if="form.id_card_straight" @click="Upload(0)">
|
||||
<image :src="form.id_card_straight" mode=""></image>
|
||||
</view>
|
||||
<view v-else class="Box_box_Ts" @click="Upload(0)"></view>
|
||||
</view>
|
||||
<view class="Box_box_T_o">请上传法人国徽身份证图片</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<view class="Box_box_d" v-if="form.id_card_reverse" @click="Upload(1)">
|
||||
<image :src="form.id_card_reverse" mode=""></image>
|
||||
</view>
|
||||
<view v-else class="Box_box_Ts" @click="Upload(1)"></view>
|
||||
</view>
|
||||
<view class="Box_box_T_o">请拍摄并上传你的营业执照</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<view class="Box_box_d" v-if="form.business_license" @click="Upload(2)">
|
||||
<image :src="form.business_license" mode=""></image>
|
||||
</view>
|
||||
<view v-else class="Box_box_Ts" @click="Upload(2)"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preservation flex-colum">
|
||||
<view v-if="form.status == '2'" style="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;">
|
||||
拒接原因:({{form.no|| '无'}})</view>
|
||||
<view v-if="disabled" class="preservation_boxs">审核中</view>
|
||||
<view v-else class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
|
||||
|
||||
</view>
|
||||
<u-picker :show="showpicker" :columns="columns" @confirm='confirm' keyName="name"
|
||||
@cancel='showpicker = false'></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import selectaddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue';
|
||||
export default {
|
||||
components: {
|
||||
selectaddress
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showpicker: false,
|
||||
disabled: true,
|
||||
Uploadurlnumber: '',
|
||||
namelang: '',
|
||||
merchantAuditStatus: '',
|
||||
columns: [
|
||||
|
||||
],
|
||||
form: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
title: '',
|
||||
id_card_straight: '',
|
||||
id_card_reverse: '',
|
||||
business_license: '',
|
||||
phone: '',
|
||||
legal_person_name: '',
|
||||
no: '',
|
||||
provinceno: '',
|
||||
provinceno_name: '',
|
||||
dlzh: '',
|
||||
dlmm: '',
|
||||
code: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e.store)
|
||||
let data = uni.getStorageSync('form')
|
||||
if (data.status == '0') {
|
||||
this.disabled = true
|
||||
} else {
|
||||
this.disabled = false
|
||||
}
|
||||
if (data.phone) {
|
||||
this.form.store_id = uni.getStorageSync('userId')
|
||||
this.form.title = data.title
|
||||
this.form.status = data.status
|
||||
this.form.id_card_straight = data.id_card_straight
|
||||
this.form.id_card_reverse = data.id_card_reverse
|
||||
this.form.business_license = data.business_license
|
||||
this.form.phone = data.phone
|
||||
this.form.legal_person_name = data.legal_person_name
|
||||
this.form.no = data.no
|
||||
this.form.dlzh = data.dlzh
|
||||
this.form.dlmm = data.dlmm
|
||||
this.form.code = data.invitation
|
||||
this.form.provinceno = data.provinceno
|
||||
this.form.provinceno_name = data.provinceno_name
|
||||
}
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.onShowdata()
|
||||
},
|
||||
methods: {
|
||||
onShowdata(){
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'szzpy/getprovinceno',
|
||||
data: this.form,
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
if (res.data.data) {
|
||||
this.columns = [res.data.data]
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
uni.showToast({
|
||||
title: res.data.message || res.data.msg,
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.pro.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm(e) {
|
||||
console.log('confirm', e)
|
||||
this.form.provinceno_name = e.value[0].name
|
||||
this.form.provinceno = e.value[0].code
|
||||
this.showpicker = false
|
||||
},
|
||||
Upload(i) {
|
||||
if (this.disabled) {
|
||||
return false;
|
||||
} else {
|
||||
this.Uploadurlnumber = i;
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册选择,和摄像头功能,默认二者都有
|
||||
success: res => {
|
||||
uni.pro.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
var thisimgUrlcaca = res.tempFilePaths[0];
|
||||
var that = this;
|
||||
uni.uploadFile({
|
||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
||||
filePath: thisimgUrlcaca,
|
||||
name: 'file', // 后端接收的文件名
|
||||
header: {
|
||||
userId: uni.cache.get('userId'),
|
||||
token: uni.cache.get('token'),
|
||||
myLoginName: uni.cache.get('myLoginName')
|
||||
},
|
||||
success: res => {
|
||||
var thisdata_ = JSON.parse(res.data);
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.pro.hideLoading();
|
||||
console.log(thisdata_.data[0]);
|
||||
if (this.Uploadurlnumber == 0) {
|
||||
this.$set(this.form,
|
||||
'id_card_straight', thisdata_
|
||||
.data[0])
|
||||
} else if (this.Uploadurlnumber == 1) {
|
||||
this.$set(this.form, 'id_card_reverse',
|
||||
thisdata_.data[0])
|
||||
} else {
|
||||
this.$set(this.form,
|
||||
'business_license', thisdata_
|
||||
.data[0])
|
||||
}
|
||||
console.log(this.form)
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: err => {
|
||||
uni.pro.hideLoading();
|
||||
uni.showToast({
|
||||
title: thisdata_.message || thisdata_.msg,
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
async saveMerchantBaseInfoV2() {
|
||||
console.log(this.form)
|
||||
if (this.form.title == null || this.form.title == '') {
|
||||
uni.showToast({
|
||||
title: '请填写公司名字',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.phone == null || this.form.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请填写法人手机号',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.form.legal_person_name == null || this.form.legal_person_name == '') {
|
||||
uni.showToast({
|
||||
title: '请填写法人姓名',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.id_card_straight == null || this.form.id_card_straight == '') {
|
||||
uni.showToast({
|
||||
title: '请上传身份证人像面',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.id_card_reverse == null || this.form.id_card_reverse == '') {
|
||||
uni.showToast({
|
||||
title: '请上传身份证国徽面',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.business_license == null || this.form.business_license == '') {
|
||||
uni.showToast({
|
||||
title: '请上传营业执照',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.provinceno == null || this.form.provinceno == '') {
|
||||
uni.showToast({
|
||||
title: '请选择省份编码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.dlzh == null || this.form.dlzh == '') {
|
||||
uni.showToast({
|
||||
title: '请填写电子税局账号',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.dlmm == null || this.form.dlmm == '') {
|
||||
uni.showToast({
|
||||
title: '请填写电子税局账密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.code == null || this.form.code == '') {
|
||||
uni.showToast({
|
||||
title: '请填写邀请码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// if (/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig
|
||||
// .test(this.form.alias)) {
|
||||
// uni.showToast({
|
||||
// title: '请不要输入Emoji!!!',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/storeinfo',
|
||||
data: this.form,
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
uni.showToast({
|
||||
title: res.data.message || res.data.msg,
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.pro.hideLoading();
|
||||
}
|
||||
});
|
||||
if (res.data.code == 1) {
|
||||
setTimeout(() => {
|
||||
uni.cache.set('form','');
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
// uni.navigateBack();
|
||||
}, 2000);
|
||||
}
|
||||
console.log(res)
|
||||
// this.form = res.data.data
|
||||
console.log('接口返回------', res);
|
||||
},
|
||||
fail(res) {
|
||||
uni.showToast({
|
||||
title: res.data.message || res.data.msg,
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.pro.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.Box {
|
||||
.Box_box_O {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.Box_box {
|
||||
text-align: right;
|
||||
padding: 24rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
|
||||
.Box_box_input {
|
||||
width: 60%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box_box_T {
|
||||
padding: 0 28rpx;
|
||||
border-top: 16rpx solid #e5e5e5;
|
||||
|
||||
.Box_box_T_o {
|
||||
padding: 28rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
image {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.Box_box_Ts {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(@/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.preservation {
|
||||
width: 100%;
|
||||
padding: 50rpx;
|
||||
|
||||
.preservation_box {
|
||||
width: 70%;
|
||||
height: 72rpx;
|
||||
background: #288efb;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.preservation_boxs {
|
||||
width: 70%;
|
||||
height: 72rpx;
|
||||
background: #999999;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
245
pages/index/notification.vue
Normal file
245
pages/index/notification.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- <view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{datalsit.type}}
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<view class="content_boxt_tow">
|
||||
<view class="content_boxt_towtext">
|
||||
扫码绑定公众号,将会收到通知
|
||||
</view>
|
||||
<view class="content_boxt_towrelative" style="242px;height: 242px;">
|
||||
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
|
||||
<image class="content_boxt_towabsolute" src="@/static/icons.png" mode=""></image>
|
||||
</view>
|
||||
<!-- <view class="content_boxt_towtexts" style="color: blue; " @click="savealbum">
|
||||
已完成
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 242,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id
|
||||
this.status = e.status
|
||||
|
||||
},
|
||||
onReady() {
|
||||
setTimeout(() => {
|
||||
uni.$u.debounce(this.storeinvoicelist(), 500)
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
storeinvoicelist() {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/bindinginvopush',
|
||||
data: {
|
||||
//参数
|
||||
store_id: uni.getStorageSync('userId')
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
this.datalsit = res.data.data.qrcode;
|
||||
console.log(this.datalsit)
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.data.qrcode;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
});
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
},
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
// //加载框
|
||||
// title: '保存中...',
|
||||
// mask: true
|
||||
// });
|
||||
// var pages = getCurrentPages();
|
||||
// var page = pages[pages.length - 1];
|
||||
// console.log('当前页' + pages.length - 1);
|
||||
// var bitmap = null;
|
||||
// var currentWebview = page.$getAppWebview();
|
||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// // 将webview内容绘制到Bitmap对象中
|
||||
// currentWebview.draw(
|
||||
// bitmap,
|
||||
// function() {
|
||||
// console.log('截屏绘制图片成功');
|
||||
// bitmap.save(
|
||||
// '_doc/a.jpg', {},
|
||||
// function(i) {
|
||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: i.target,
|
||||
// success: function() {
|
||||
// bitmap.clear(); //销毁Bitmap图片
|
||||
// uni.showToast({
|
||||
// title: '保存图片成功',
|
||||
// mask: false,
|
||||
// duration: 1500
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.content_boxtopone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content_boxtoptow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_one {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FF6565;
|
||||
}
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.content_boxt_towtext {
|
||||
padding-top: 32rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_boxt_towtexts {
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 242px;
|
||||
height: 242px;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -50rpx;
|
||||
margin-left: -50rpx;
|
||||
border-radius: 16rpx;
|
||||
// transform: translate(-50% -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
141
pages/index/order.vue
Normal file
141
pages/index/order.vue
Normal file
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="content_item" v-for="(item,index) in list" :key="index" @click="clickoange(item)">
|
||||
<view class="content_item_top flex-between">
|
||||
<view class="content_item_topone flex-start">
|
||||
<image src="@/static/sz.png" mode="aspectFill"></image>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="content_item_toptow flex-start">
|
||||
<text class="content_item_toptowtext">¥{{item.price}}</text>
|
||||
<u-icon name="arrow-right" color="#9d9d9d" size="10"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background: #318AFE;" v-if="item.status == 0">
|
||||
客户未提交信息
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background:#8B8B8B ;" v-if="item.status == 1">
|
||||
开票中
|
||||
</view>
|
||||
<view class="content_item_bottom" v-if="item.status == 2">
|
||||
已开票
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background: #ffbb76;" v-if="item.status == 4">
|
||||
已作废
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-wrap">
|
||||
<view class="empty" v-if="!list.length"><u-empty text="暂无数据"
|
||||
:icon="require('@/static/icon_empty.png')"></u-empty></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.storeinvoicelist()
|
||||
},
|
||||
methods: {
|
||||
clickoange(e) {
|
||||
if (e.status == 2 || e.status == 4) {
|
||||
uni.pro.navigateTo('index/orderinfo', {
|
||||
id: e.id,
|
||||
status: e.status
|
||||
});
|
||||
}
|
||||
if (e.status == 0) {
|
||||
uni.pro.navigateTo('index/orderinfos', {
|
||||
id: e.id,
|
||||
status: e.status
|
||||
});
|
||||
}
|
||||
// uni.pro.navigateTo('index/merchant/orderinfo');
|
||||
},
|
||||
storeinvoicelist() {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/invoicelist',
|
||||
// url:'http://192.168.1.117:8084/merchant/sz/merchant/authPay',
|
||||
data: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
this.list = res.data.data
|
||||
console.log('接口返回------', res);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 6px 28rpx;
|
||||
|
||||
.content_item {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
|
||||
.content_item_top {
|
||||
padding: 34rpx 16rpx 30rpx 42rpx;
|
||||
|
||||
.content_item_topone {
|
||||
image {
|
||||
width: 37.11rpx;
|
||||
height: 37.11rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-left: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.content_item_toptow {
|
||||
.content_item_toptowtext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_item_bottom {
|
||||
padding: 16rpx 0 16rpx 108rpx;
|
||||
background: rgba(85, 159, 255, 0.74);
|
||||
box-shadow: 0px 3rpx 6rpx 1px rgba(0, 0, 0, 0.16);
|
||||
border-radius: 0rpx 0rpx 30rpx 30rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
270
pages/index/orderinfo.vue
Normal file
270
pages/index/orderinfo.vue
Normal file
@@ -0,0 +1,270 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{datalsit.type}}
|
||||
</view>
|
||||
<view class="content_boxtoptow" v-if="datalsit.status == 0">
|
||||
客户未扫码
|
||||
</view>
|
||||
<view class="content_boxtoptow" v-if="datalsit.status ==1">
|
||||
开票中
|
||||
</view>
|
||||
<view class="content_boxtoptow" style="color:#3DC85E;" v-if="datalsit.status == 2">
|
||||
开票成功
|
||||
</view>
|
||||
<view class="content_boxtoptow" v-if="datalsit.status == 4">
|
||||
已作废
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_boxt_one">
|
||||
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
|
||||
{{datalsit.string2}}
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
|
||||
<text class="classvie_itemone">{{datalsit.user_type == 2 ? '公司名称':'发票抬头'}}:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.user_name}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4) ">
|
||||
<text class="classvie_itemone">公司税号:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.user_duty}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票金额:</text>
|
||||
<text class="classvie_itemtow" style="color: #FF6565;">¥{{datalsit.price}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" >
|
||||
<text class="classvie_itemone">发票类型:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.type}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">项目名称:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.article}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">开票时间:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.createtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 240,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id
|
||||
this.status = e.status
|
||||
|
||||
},
|
||||
onReady(){
|
||||
this.storeinvoicelist()
|
||||
},
|
||||
methods: {
|
||||
storeinvoicelist() {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/invoicedetail',
|
||||
data: {
|
||||
id: this.ID,
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
this.datalsit = res.data.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.data.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
});
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
},
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
// //加载框
|
||||
// title: '保存中...',
|
||||
// mask: true
|
||||
// });
|
||||
// var pages = getCurrentPages();
|
||||
// var page = pages[pages.length - 1];
|
||||
// console.log('当前页' + pages.length - 1);
|
||||
// var bitmap = null;
|
||||
// var currentWebview = page.$getAppWebview();
|
||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// // 将webview内容绘制到Bitmap对象中
|
||||
// currentWebview.draw(
|
||||
// bitmap,
|
||||
// function() {
|
||||
// console.log('截屏绘制图片成功');
|
||||
// bitmap.save(
|
||||
// '_doc/a.jpg', {},
|
||||
// function(i) {
|
||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: i.target,
|
||||
// success: function() {
|
||||
// bitmap.clear(); //销毁Bitmap图片
|
||||
// uni.showToast({
|
||||
// title: '保存图片成功',
|
||||
// mask: false,
|
||||
// duration: 1500
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.content_boxtopone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content_boxtoptow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_one {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FF6565;
|
||||
}
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.content_boxt_towtext {
|
||||
padding-top: 32rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_boxt_towtexts {
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 484rpx;
|
||||
height: 484rpx;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -50rpx;
|
||||
margin-left: -50rpx;
|
||||
border-radius: 16rpx;
|
||||
// transform: translate(-50% -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
285
pages/index/orderinfos.vue
Normal file
285
pages/index/orderinfos.vue
Normal file
@@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{datalsit.type}}
|
||||
</view>
|
||||
<view class="content_boxtoptow" v-if="datalsit.status == 0">
|
||||
客户未扫码
|
||||
</view>
|
||||
<view class="content_boxtoptow" v-if="datalsit.status ==1">
|
||||
开票中
|
||||
</view>
|
||||
<view class="content_boxtoptow" style="color:#3DC85E;" v-if="datalsit.status == 2">
|
||||
开票成功
|
||||
</view>
|
||||
<view class="content_boxtoptow" v-if="datalsit.status == 4">
|
||||
已作废
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_boxt_one">
|
||||
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
|
||||
{{datalsit.string2}}
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
|
||||
<text class="classvie_itemone">{{datalsit.user_type == 2 ? '公司名称':'发票抬头'}}:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.user_name}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start"
|
||||
v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4) ">
|
||||
<text class="classvie_itemone">公司税号:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.user_duty}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票金额:</text>
|
||||
<text class="classvie_itemtow" style="color: #FF6565;">¥{{datalsit.price}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票类型:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.type}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">项目名称:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.article}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">开票时间:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.createtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_boxt_tow">
|
||||
<view class="content_boxt_towtext">
|
||||
微信扫一扫,即可开票
|
||||
</view>
|
||||
<view class="content_boxt_towrelative" style="242px;height: 242px;">
|
||||
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
|
||||
<image class="content_boxt_towabsolute" src="@/static/icons.png" mode=""></image>
|
||||
</view>
|
||||
<!-- <view class="content_boxt_towtexts" style="color: blue; " @click="savealbum">
|
||||
已完成
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 242,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id
|
||||
this.status = e.status
|
||||
|
||||
},
|
||||
onReady() {
|
||||
setTimeout(() => {
|
||||
uni.$u.debounce(this.storeinvoicelist(), 500)
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
storeinvoicelist() {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/invoicedetail',
|
||||
// url:'http://192.168.1.117:8084/wap/merchant/authPay',
|
||||
data: {
|
||||
id: this.ID,
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
this.datalsit = res.data.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.data.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
});
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
},
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
// //加载框
|
||||
// title: '保存中...',
|
||||
// mask: true
|
||||
// });
|
||||
// var pages = getCurrentPages();
|
||||
// var page = pages[pages.length - 1];
|
||||
// console.log('当前页' + pages.length - 1);
|
||||
// var bitmap = null;
|
||||
// var currentWebview = page.$getAppWebview();
|
||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// // 将webview内容绘制到Bitmap对象中
|
||||
// currentWebview.draw(
|
||||
// bitmap,
|
||||
// function() {
|
||||
// console.log('截屏绘制图片成功');
|
||||
// bitmap.save(
|
||||
// '_doc/a.jpg', {},
|
||||
// function(i) {
|
||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: i.target,
|
||||
// success: function() {
|
||||
// bitmap.clear(); //销毁Bitmap图片
|
||||
// uni.showToast({
|
||||
// title: '保存图片成功',
|
||||
// mask: false,
|
||||
// duration: 1500
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.content_boxtopone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content_boxtoptow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_one {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FF6565;
|
||||
}
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.content_boxt_towtext {
|
||||
padding-top: 32rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_boxt_towtexts {
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 242px;
|
||||
height: 242px;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -50rpx;
|
||||
margin-left: -50rpx;
|
||||
border-radius: 16rpx;
|
||||
// transform: translate(-50% -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
391
pages/index/wxinvoicing.vue
Normal file
391
pages/index/wxinvoicing.vue
Normal file
@@ -0,0 +1,391 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<view class="Box_item" v-show="qrodeshow == 0">
|
||||
<view id="Box">
|
||||
<view class="Box_item_content flex-colum">
|
||||
<view class="Box_item_content_T flex-center" style="padding: 16rpx;">
|
||||
<view style="width:242px; height:242px;"><canvas style="width:100%; height:100%;" id="qrcode"
|
||||
ref="qrcode" canvas-id="qrcode"></canvas></view>
|
||||
</view>
|
||||
<view class="Box_item_content_f flex-center" @click="savealbum">保存二维码</view>
|
||||
<view class="Box_item_content_fs flex-center">{{datares.string1}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="classvie">
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票金额:</text>
|
||||
<text class="classvie_itemtow" style="color: #FF6565;">¥{{datares.price}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票名称:</text>
|
||||
<text class="classvie_itemtow">{{datares.title}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票类型:</text>
|
||||
<text class="classvie_itemtow">{{datares.type}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box_class" @click="box_class">
|
||||
已完成
|
||||
</view>
|
||||
<view class="" v-show="qrodeshow == 1"></view>
|
||||
<u-modal :show="modalshow.show" :showCancelButton="true" :title="modalshow.title"
|
||||
:content="modalshow.content"></u-modal>
|
||||
<u-popup :show="imgShow" @close="imgShow = false">
|
||||
<view class="img-box">
|
||||
<view class="tips">
|
||||
<view class="close" @click="imgShow = false"><u-icon name="close" size="16" color="#fff"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<image :show-menu-by-longpress="true" class="img-box-img" :src="img" mode="widthFix"></image>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef H5
|
||||
import dayjs from 'dayjs';
|
||||
import html2canvas from 'html2canvas';
|
||||
// #endif
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
qrodeshow: 0,
|
||||
modalshow: {
|
||||
show: false,
|
||||
title: '温馨提示',
|
||||
content: '微信支付认证未审核,该收款码,暂不支持微信支付'
|
||||
},
|
||||
userApp: uni.cache.get('userApp'),
|
||||
size: 242,
|
||||
data: {},
|
||||
fowxAuditInfo: {},
|
||||
imgShow: false,
|
||||
img: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
this.datares = e
|
||||
},
|
||||
onReady() {
|
||||
this.merchantStoreshowMerchantStoreReceipt();
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
box_class() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
savealbum(e) {
|
||||
// #ifdef APP
|
||||
uni.showLoading({
|
||||
//加载框
|
||||
title: '保存中...',
|
||||
mask: true
|
||||
});
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: "qrcode",
|
||||
complete(res) {
|
||||
// 在 app 中, 图片地址直接返回的值 临时地址 png 或 jpg,直接使用uni的方法
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: "保存成功",
|
||||
icon: "success"
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
uni.showToast({
|
||||
title: "保存失败",
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
// let query = uni.createSelectorQuery().in(this);
|
||||
// console.log(document.querySelector('#Box'));
|
||||
// return;
|
||||
if (this.img) {
|
||||
this.imgShow = true;
|
||||
} else {
|
||||
uni.showLoading({
|
||||
//加载框
|
||||
title: '保存中...',
|
||||
mask: true
|
||||
});
|
||||
html2canvas(document.querySelector('#Box'), {
|
||||
backgroundColor: 'transparent',
|
||||
useCORS: true // 如果截图的内容里有图片,可能会有跨域的情况,加上这个参数,解决文件跨域问题
|
||||
})
|
||||
.then(canvas => {
|
||||
uni.hideLoading();
|
||||
// const dataURL = canvas.toDataURL('image/png');
|
||||
// this.imgShow = true;
|
||||
// this.img = dataURL;
|
||||
// console.log(this.img)
|
||||
const dataURL = canvas.toDataURL('image/png');
|
||||
const creatDom = document.createElement('a');
|
||||
document.body.appendChild(creatDom);
|
||||
creatDom.href = dataURL;
|
||||
console.log(creatDom.href)
|
||||
creatDom.download = dayjs().valueOf();
|
||||
creatDom.click();
|
||||
creatDom.remove(); // 下载之后把创建的元素删除
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
|
||||
async merchantStoreshowMerchantStoreReceipt(lane) {
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
console.log(lane)
|
||||
qr.data = this.datares.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
},
|
||||
requestlang() {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'wap/merchant/authPay',
|
||||
// url:'http://192.168.1.117:8084/wap/merchant/authPay',
|
||||
data: {
|
||||
//参数
|
||||
userAppId: 2,
|
||||
channel: 1,
|
||||
qrNo: 1,
|
||||
view: 1
|
||||
},
|
||||
header: {
|
||||
'user-agent': 'micromessenger' //自定义请求头信息
|
||||
},
|
||||
method: 'GET', //请求方式,必须为大写
|
||||
success: res => {
|
||||
console.log('接口返回------', res);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.img-box {
|
||||
padding: 0 28upx 28upx;
|
||||
|
||||
.img-box-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tips {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 28upx 0;
|
||||
font-size: 32upx;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
position: relative;
|
||||
|
||||
.close {
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: -20upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box {
|
||||
.box_nav {
|
||||
// background: #318afe;
|
||||
padding: 100rpx 28rpx 0 28rpx;
|
||||
|
||||
.box_navT {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.box_navO {
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
// background: #e5e5e5;
|
||||
border-radius: 2rpx;
|
||||
|
||||
text {
|
||||
padding: 8rpx 16rpx;
|
||||
}
|
||||
|
||||
.box_navO_text_O {
|
||||
color: #333333;
|
||||
// background: #ffffff;
|
||||
border-radius: 0 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box_item {
|
||||
padding: 28rpx;
|
||||
|
||||
.Box_item_content {
|
||||
position: relative;
|
||||
margin-top: 48rpx;
|
||||
width: 100%;
|
||||
background: #318AFE;
|
||||
border-radius: 35rpx;
|
||||
|
||||
.Box_item_content_T {
|
||||
margin-top: 62rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
|
||||
.Box_item_content_E {
|
||||
margin-top: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.Box_item_content_f {
|
||||
margin-top: 32rpx;
|
||||
width: 282rpx;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(41, 112, 204, 0.99);
|
||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #318AFE;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.Box_item_content_fs {
|
||||
margin-bottom: 36rpx;
|
||||
margin-top: 30rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 0rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.classvie {
|
||||
padding: 16rpx 32rpx 32rpx 56rpx;
|
||||
background: #fff;
|
||||
border-radius: 0rpx 0rpx 12rpx 12rpx;
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box_item_content_botton_text {
|
||||
margin-top: 48rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.Box_item_content_botton_bouut {
|
||||
margin-top: 48rpx;
|
||||
width: 100%;
|
||||
|
||||
view {
|
||||
padding: 8rpx 0;
|
||||
width: 558rpx;
|
||||
background: #288efb;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.Box_item_content_botton_bouuts {
|
||||
margin-top: 22rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.box_class {
|
||||
margin: 100rpx auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
35
pages/webview/webview.vue
Normal file
35
pages/webview/webview.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<web-view :src="url"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: '', //PDF路径
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if (options.tape == 1) {
|
||||
this.url = options.url;
|
||||
} else {
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'szzpy/downloadurl',
|
||||
data: {
|
||||
//参数
|
||||
id: options.id
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
let fileUrl = options.url
|
||||
this.url = 'http://www.pfile.com.cn/api/profile/onlinePreview?url=' +
|
||||
encodeURIComponent(res.data.data);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user