This commit is contained in:
wzz
2024-08-05 09:14:54 +08:00
parent 1dd22ddb54
commit fb7d0cc232
22 changed files with 300 additions and 1137 deletions

View File

@@ -59,4 +59,37 @@ export default {
storepaidkeywordsearch(data) { //企业关键词搜索Paid
return uni.api.post("store/paidkeywordsearch", data);
},
szzpydeltaxation(data) { //删除开票人2
return uni.api.post("szzpy/deltaxation", data);
},
szzpynewissuedbylist(data) { //开票人列表2
return uni.api.post("szzpy/newissuedbylist", data);
},
enterprisestore(data) { //开票人列表2
return uni.api.post("store/enterprise", data, false);
},
storese(data) {
return uni.api.post("store/se", data);
},
storesubinvoicing(data) {
return uni.api.post("store/subinvoicing", data);
},
storeindustrylist(data) {
return uni.api.post("store/industrylist", data);
},
szzpyhurl(data) {
return uni.api.post("szzpy/h5url", data);
},
szzpygetprovinceno(data) {
return uni.api.post("szzpy/getprovinceno", data);
},
storebindinginvopush(data) {
return uni.api.post("store/bindinginvopush", data);
},
storeinvoicedetail(data) {
return uni.api.post("store/invoicedetail", data);
},
szzpydownloadurl(data) {
return uni.api.post("szzpy/downloadurl", data);
},
}

View File

@@ -1,6 +1,6 @@
{
"name" : "invoice_H5",
"appid" : "__UNI__E4501F1",
"appid" : "__UNI__93601F2",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

View File

@@ -3,7 +3,6 @@
"dayjs": "^1.11.11",
"html2canvas": "^1.4.1",
"uview-ui": "^2.0.36",
"vue-pdf": "^4.3.0",
"weixin-js-sdk": "^1.6.5"
}
}

View File

@@ -33,6 +33,12 @@
"navigationBarTitleText": "新增开票员",
"navigationStyle": "custom"
}
}, {
"path": "pages/index/drawerlist",
"style": {
"navigationBarTitleText": "开票员列表",
"navigationStyle": "custom"
}
}, {
"path": "pages/index/notification",
"style": {

View File

@@ -44,19 +44,23 @@
<template v-if="showElse">
<view class="Box_box flex-between">
<view class="Box_boxone">公司地址</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_address" placeholder="请填写公司地址" /></view>
<view class="Box_boxtow"><input type="text" v-model="form.c_address" placeholder="请填写公司地址" />
</view>
</view>
<view class="Box_box flex-between">
<view class="Box_boxone">联系电话</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_phone" placeholder="请填写公司联系电话" /></view>
<view class="Box_boxtow"><input type="text" v-model="form.c_phone" placeholder="请填写公司联系电话" />
</view>
</view>
<view class="Box_box flex-between">
<view class="Box_boxone">开户行名称</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_bank_name" placeholder="请填写公司开户行名称" /></view>
<view class="Box_boxtow"><input type="text" v-model="form.c_bank_name"
placeholder="请填写公司开户行名称" /></view>
</view>
<view class="Box_box flex-between">
<view class="Box_boxone">开户行账号</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_bank_account" placeholder="请填写公司开户行账号" /></view>
<view class="Box_boxtow"><input type="text" v-model="form.c_bank_account"
placeholder="请填写公司开户行账号" /></view>
</view>
</template>
</template>
@@ -133,7 +137,6 @@
},
methods: {
stopPropagation() {
console.log(1111)
this.subCategoryList = [];
},
wxInit() {
@@ -168,6 +171,7 @@
// 函数执行内容
}, 500),
async categorySubClick(category) {
console.log(category)
if (category.companyName == '以上都不是') {
let res = await this.api.storepaidkeywordsearch({
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'),
@@ -176,9 +180,14 @@
})
this.subCategoryList = res.data
} else {
this.form.user_name = category.companyName;
this.form.user_duty = category.creditCode;
setTimeout(() => {
this.$set(this.form, 'user_name', category.companyName);
this.$set(this.form, 'user_duty', category.creditCode);
// this.form.user_name = category.companyName;
// this.form.user_duty = category.creditCode;
this.subCategoryList = [];
}, 500)
}
@@ -299,41 +308,7 @@
}
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
}
// uni.request({
// url: 'https://invoice.sxczgkj.cn/api/' + 'user/subopeninvoice',
// data: {
// //参数
// id: this.form.id,
// open_id: this.form.open_id,
// user_name: this.form.user_name,
// user_type: this.form.user_type,
// user_duty: this.form.user_duty,
// email: this.form.email,
// img: this.form.img,
// mobile: this.form.mobile,
// notes: this.form.notes
// },
// method: 'POST', //请求方式,必须为大写
// success: res => {
// uni.showToast({
// title: res.data.message || res.data.msg,
// icon: "none",
// })
// if (res.data.code == 1) {
// setTimeout(() => {
// if (res.data.data.url) {
// window.location.href = res.data.data.url
// }
// // let data = encodeURIComponent(res.data.data.url);
// // uni.navigateTo({
// // url: '/pages/index/web?src=' + data
// // })
// }, 1000);
// // window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
// }
// }
// });
},
clickakex(e) {
this.form.user_type = e;
@@ -343,34 +318,22 @@
this.form.email = '';
this.form.mobile = '';
},
async getOrder() {
//搜索值
uni.request({
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
data: {
//参数
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'),
async getOrder() { //搜索值
let res = await this.api.enterprisestore({
like: this.form.user_name,
open_id: this.form.open_id
},
method: 'POST', //请求方式,必须为大写
success: async (res) => {
console.log('接口返回------', res);
setTimeout(() => {
open_id: this.form.open_id,
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
})
if (res.code == 1) {
this.subCategoryList = res.data
// this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
// this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
// if (this.page == 1) {
// if (res.data.data.length != 0) {
this.subCategoryList = [...res.data.data, ...[{
companyName: '以上都不是'
}]];
// }
// this.subCategoryList = res.data;
// } else {
// this.subCategoryList.push(...res.data.data);
// this.subCategoryList.push(...res.data);
// }
}, 500);
}
});
}
}
};
@@ -445,13 +408,16 @@
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
.Box_boxone {
width: 160rpx;
text-align: left;
}
.Box_boxtow {
flex: auto;
}
.position {
position: absolute;
right: 0;

View File

@@ -74,13 +74,14 @@
return {
showtext: 0,
subCategoryList: [],
open_id: '',
form: {
id: '',
open_id: '',
user_type: 2,
img: '',
user_name: "",
user_duty: "",
open_id: '',
email: "",
mobile: '',
status_note: '', //原因备注
@@ -91,7 +92,9 @@
},
async onLoad(e) {
if (e.id) {
console.log(e)
this.form.id = e.id
this.form.open_id = e.open_id
let res = await this.api.szzpyfailccho({
id: this.form.id,
view_type: this.form.view_type
@@ -107,29 +110,11 @@
this.form.body = e.body
this.form.open_id = e.open_id
}
// this.form.id = e.id
// this.form.open_id = e.open_id
// if (e.view_type == 'fail') {
// // http://localhost:8080/pages/hindex/indexs?id=7668&open_id=102132&view_type=fail
// this.form.view_type = e.view_type
// let res = await this.api.szzpyfailccho({
// id: this.form.id,
// view_type: this.form.view_type
// })
// try {
// if (res.code == 1) {
// this.form = res.data
// }
// } catch (e) {
// //TODO handle the exception
// }
// }
},
methods: {
onInput(e) {
if (this.form.user_type == 2) {
if ([...e.detail.value].length >= 6) {
console.log(100000)
this.handleClick()
} else {
this.subCategoryList = []
@@ -138,7 +123,6 @@
},
handleClick: _.debounce(function() {
console.log(100000)
this.getOrder()
// 函数执行内容
@@ -244,26 +228,21 @@
this.form.mobile = ''
},
async getOrder() { //搜索值
uni.request({
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
data: {
//参数
console.log(this.form.open_id)
let res = await this.api.enterprisestore({
like: this.form.user_name,
open_id: this.form.open_id
},
method: 'POST', //请求方式,必须为大写
success: res => {
console.log('接口返回------', res);
open_id: this.form.open_id,
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
})
if (res.code == 1) {
setTimeout(() => {
if (this.page == 1) {
this.subCategoryList = res.data.data;
this.subCategoryList = res.data;
} else {
this.subCategoryList.push(...res.data.data);
this.subCategoryList.push(...res.data);
}
}, 500)
}
});
}
}
}

View File

@@ -18,6 +18,14 @@
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>规格型号</view>
<view><input v-model="form.ggxh" placeholder="请填写规格型号" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>单位</view>
<view><input v-model="form.dw" 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">
@@ -91,7 +99,9 @@
mcc: uni.cache.get('keyword').code,
dlzh: '',
dlzhid: "",
is_new: 1
is_new: 1,
ggxh: '',
dw: ''
}
};
},
@@ -161,7 +171,7 @@
this.subCategoryList = []
}
},
showpickerconfirm(e) {
async showpickerconfirm(e) {
if (this.form.price == null || this.form.price == '') {
uni.showToast({
title: '请输入开票金额',
@@ -188,20 +198,15 @@
} catch (e) {
//TODO handle the exception
}
uni.request({
url: uni.conf.baseUrl + 'store/se',
data: {
//参数
let res = await this.api.storese({
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
})
if (res) {
this.form.tax_amount = res.data.tx
this.form.d_price = res.data.d_amount
this.showpicker = false;
}
});
},
Issuedbyconfirm(e) {
this.Issuedbyshowpicker = false
@@ -266,12 +271,8 @@
});
return false;
}
uni.request({
url: uni.conf.baseUrl + 'store/subinvoicing',
data: this.form,
method: 'POST', //请求方式,必须为大写
success: res => {
console.log(res)
let res = await this.api.storesubinvoicing(this.form)
if (res) {
this.form = {
store_id: uni.getStorageSync('userId'),
article: uni.cache.get('keyword').name,
@@ -284,19 +285,13 @@
notes: '',
mcc: uni.cache.get('keyword').code,
dlzh: '',
is_new:1
is_new: 1,
ggxh: '',
dw: ''
}
uni.showToast({
title: res.data.message || res.data.msg,
icon: "none",
})
setTimeout(datalange => {
uni.pro.navigateTo('index/wxinvoicing', res.data.data.invoice_records)
}, 2000)
uni.pro.navigateTo('index/wxinvoicing', res.data.invoice_records)
}
});
}
}
};

View File

@@ -71,8 +71,20 @@
}
};
},
async onLoad(e) {},
async onLoad(e) {
try {
if (e.userId) {
uni.cache.set('userId', e.userId);
}
} catch (e) {
//TODO handle the exception
}
},
onShow() {
this.list = []
this.is_end = false
this.form.status = 'loadmore'
this.form.page = 0
this.storeinvoicingrecordsthatneed()
},
methods: {

View File

@@ -27,7 +27,7 @@
<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}}
{{keyword.name}}
</view>
</view>
<view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view>
@@ -60,22 +60,15 @@
onNavigationBarButtonTap() {
uni.pro.navigateTo('index/order');
},
onLoad(e) {
async 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
}
});
let res = await this.api.storedigitalinvoice()
this.columns = res.data
},
onShow() {
@@ -95,7 +88,7 @@
},
popupshowone_itemone() {
this.showpopup = false
this.form.article = this.keyword
this.form.article = this.keyword.name
},
handleInputChange() {
if (this.form.type == null || this.form.type == '') {
@@ -149,30 +142,6 @@
tope:0
})
}, 1000)
// 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: '',
// 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)
// }
// });
}
}
};

View File

@@ -94,32 +94,26 @@
this.getOrder()
},
async getOrder() {
uni.request({
url: uni.conf.baseUrl + 'store/industrylist',
data: {
//参数
let res = await this.api.storeindustrylist({
name: this.keyword,
page: this.page
},
method: 'POST', //请求方式,必须为大写
success: res => {
})
if (res) {
setTimeout(() => {
if (this.page == 1) {
this.subCategoryList = res.data.msg;
this.subCategoryList = res.msg;
this.loadStatus = 'loadmore'
} else {
this.subCategoryList.push(...res.data.msg);
this.subCategoryList.push(...res.msg);
}
if (res.data.msg.length == 20) {
if (res.msg.length == 20) {
this.loadStatus = 'loadmore';
} else {
this.loadStatus = 'nomore';
}
console.log('接口返回------', res);
}, 500)
}
});
}
},
};

View File

@@ -19,7 +19,7 @@
</view>
<view class="content flex-colum" @click="drawer" v-if="improveinformation">
<image src="@/static/item5.png" mode="aspectFill"></image>
<text>新增开票员</text>
<text>开票员列表</text>
</view>
<view class="content flex-colum" @click="billingcode" v-if="improveinformation">
<image src="@/static/item7.png" mode="aspectFill"></image>
@@ -43,9 +43,9 @@
</script>
</wx-open-launch-weapp> -->
</view>
<view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
<!-- <view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
网页版地址:https://h5-invoice.sxczgkj.cn
</view>
</view> -->
<!-- <pdf style="width: 400px; height: 400px;"
src="https://dppt.shaanxi.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=124C&Fphm=24612000000037614300&Kprq=20240430152603&Czsj=1714461964182">
</pdf> -->
@@ -54,18 +54,13 @@
</view>
</template>
<script>
import pdf from 'vue-pdf'
import wx from 'weixin-js-sdk';
export default {
components: {
pdf
},
data() {
return {
improveinformation: false,
improveinformationlist: {},
onLoaduserId: '',
onLoadtype: '',
infos: uni.getSystemInfoSync()
};
},
@@ -73,7 +68,7 @@
// alert(location.href.split('#')[0])
if (e.userId) {
// this.onLoaduserId = e.userId
// this.onLoadtype = e.type//295
uni.cache.set('Type', e.type);
uni.cache.set('userId', e.userId);
}
// this.jumpToMiniProgram()
@@ -92,28 +87,6 @@
this.improveinformation = true
}
}
uni.request({
url: uni.conf.baseUrl + 'store/storestatus',
data: {
//参数
store_id: uni.cache.get('userId')
// type: this.onLoadtype
},
method: 'POST', //请求方式,必须为大写
success: res => {
this.improveinformationform = res.data.data.store
uni.cache.set('form', this.improveinformationform);
// uni.cache.set('userId', this.improveinformationform.id);
if (res.data.data.sz_status == 0) {
uni.reLaunch({
url: '/pages/index/information'
});
} else {
this.improveinformation = true
}
},
});
},
// 监听跳转
handleLaunch() {
@@ -207,7 +180,7 @@
uni.pro.navigateTo('index/billingcode');
},
drawer() {
uni.pro.navigateTo('index/drawer');
uni.pro.navigateTo('index/drawerlist');
},
merchant() {
uni.pro.navigateTo('index/merchant');
@@ -221,32 +194,16 @@
indexInvoicing() {
uni.pro.navigateTo('index/Invoicing');
},
webview() {
uni.pro.showLoading({
title: '加载中',
mask: true
})
try {
uni.request({
url: uni.conf.baseUrl + 'szzpy/h5url',
data: {
//参数
async webview() {
let res = await this.api.szzpyhurl({
store_id: uni.getStorageSync('userId')
},
method: 'POST', //请求方式,必须为大写
success: res => {
console.log(res.data.data.url)
})
if(res){
uni.pro.navigateTo('webview/webview', {
url: res.data.data.url,
url: res.data.url,
tape: 1
});
uni.pro.hideLoading()
}
});
} catch (e) {
uni.pro.hideLoading()
}
},
indexorder() {
uni.pro.navigateTo('index/order');

View File

@@ -1,579 +0,0 @@
<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 class="Box_box flex-between">
<view>办税人姓名</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.taxname"
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.taxphone"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>验证码</view>
<view class="Box_box_input" style="display: flex; justify-content: flex-start;align-items: center;">
<input class="Box_box_inpuinputt" type="text" v-model="form.verification" placeholder="请填写"
data-key="mobile" />
<view class="repeats">
<view v-if="showText == true"
style="padding: 8rpx 0;background: #288EFB; border-radius: 15rpx;"
@tap="$u.debounce(CodeRegister, 500)">
{{ Recapture }}
</view>
<view v-else
style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 0; border-radius: 15rpx;">
{{ second }}s重新发送
</view>
</view>
</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 || !codefailed" 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: [
],
codefailed: false, //验证码是否发送成功
store_id: '',
// 注册定时器 初始值
second: 60,
showText: true,
Recapture: '发送验证码',
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: {
async CodeRegister() {
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.taxname == null || this.form.taxname == '') {
uni.showToast({
title: '请填写办税人姓名',
icon: 'none'
});
return false;
}
if (this.form.taxphone == null || this.form.taxphone == '') {
uni.showToast({
title: '请填写办税人手机号码',
icon: 'none'
});
return false;
}
uni.pro.showLoading({
title: '加载中',
mask: true
})
uni.request({
url: uni.conf.baseUrl + 'szzpy/invoicerregistration',
data: this.form,
method: 'POST', //请求方式,必须为大写
success: res => {
if (res.data.code == 0) { //失败
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
});
return false;
}
if (res.data.code == 1) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
// 定时器
this.showText = false;
this.Recapture = '重新获取';
var interval = setInterval(() => {
let times = --this.second;
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
}, 1000);
setTimeout(() => {
clearInterval(interval);
this.second = 60;
this.showText = true;
}, 60000);
this.store_id = res.data.data.store_id
this.codefailed = true
}
// setTimeout(() => {
// uni.pro.hideLoading();
// }, 2000)
},
fail: (res) => {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
}
});
},
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 => {
console.log(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() {
if (this.form.verification == null || this.form.verification == '') {
uni.showToast({
title: '请填写验证码',
icon: 'none'
});
return false;
}
uni.request({
url: uni.conf.baseUrl + 'szzpy/sendverification',
data: {
code: this.form.verification,
store_id: this.store_id
},
method: 'POST',
success: res => {
if (res.data.code == 0) { //失败
this.codefailed = false
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
return false;
}
if (res.data.code == 1) {
this.store_id = res.data.data.store_id
//请求数电授权
this.szzpyauthorization()
}
console.log('接口返回------', res);
},
fail(res) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
}
});
},
szzpyauthorization() {
uni.request({
url: uni.conf.baseUrl + 'szzpy/authorization',
data: {
store_id: this.store_id
},
method: 'POST',
success: res => {
if (res.data.code == 0) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
return false;
}
if (res.data.code == 1) {
setTimeout(() => {
uni.cache.set('form', '');
uni.reLaunch({
url: '/pages/index/index'
});
// uni.navigateBack();
}, 2000);
}
console.log('接口返回------', res);
},
});
}
}
};
</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 {
position: relative;
width: 60%;
.Box_box_inpuinputt {
padding-right: 15rpx;
}
.repeats {
width: 280rpx;
text-align: center;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
border-radius: 12rpx;
}
}
}
}
.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>

View File

@@ -347,27 +347,12 @@
}, 2000);
}
},
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]
async onShowdata() {
let res = await this.api.szzpygetprovinceno(this.form)
if (res) {
this.columns = [res.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

View File

@@ -44,21 +44,17 @@
}, 500)
},
methods: {
storeinvoicelist() {
uni.request({
url: uni.conf.baseUrl + 'store/bindinginvopush',
data: {
//参数
async storeinvoicelist() {
let res = await this.api.storebindinginvopush({
store_id: uni.getStorageSync('userId')
},
method: 'POST', //请求方式,必须为大写
success: res => {
this.datalsit = res.data.data.qrcode;
})
if(res){
this.datalsit = res.data.qrcode;
console.log(this.datalsit)
// 获取uQRCode实例
var qr = new uQRCode();
// 设置二维码内容
qr.data = res.data.data.qrcode;
qr.data = res.data.qrcode;
// 设置二维码大小必须与canvas设置的宽高一致
qr.size = this.size;
// 调用制作二维码方法
@@ -70,57 +66,10 @@
// 调用绘制方法将二维码图案绘制到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>

View File

@@ -73,7 +73,6 @@
methods: {
print() {
let LODOP = getLodop();
console.log(LODOP)
if (LODOP == null) {
alert('请先安装打印控件')
return;
@@ -82,38 +81,25 @@
// 设置打印纸大小
// LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', "");
LODOP.SET_PRINT_PAGESIZE(1, 800, '120px', "");
// // 二维码控制大小
LODOP.ADD_PRINT_BARCODE('', '30px', '150px', '150px', "QRCode", 'https://www.baidu.com'); //打印产品代码条码
// LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Width "); //设置打印风格,这里是等宽打印
// LODOP.SET_PRINTER_INDEX("GP-58MB Series"); //设置默认打印机(这里用的是打印机名称)
// // 文字内容
// var strHTML = document.getElementById('viewtext')
// console.log(strHTML.innerHTML)
// LODOP.ADD_PRINT_HTM('150px', '5px', "100%", "100%",
// `<div style="width: 100%;font-size: 12px; ">销售方名称:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">开票金额:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">生成时间:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">生成时间:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">二维码有效期:30天</div><div style="width: 100%;font-size: 14px; margin-top: 15px;">您可以使用微信,扫码开票</div>`
// );
LODOP.SET_LICENSES("", "DCFF409304DFCEB3E2C644BF96CD0720", "", "");
// LODOP.PREVIEW(); //带预览的打印
LODOP.PRINT()
},
storeinvoicelist() {
uni.request({
url: uni.conf.baseUrl + 'store/bindinginvopush',
data: {
//参数
async storeinvoicelist() {
let res = await this.api.storebindinginvopush({
store_id: uni.getStorageSync('userId')
},
method: 'POST', //请求方式,必须为大写
success: res => {
this.datalsit = res.data.data.qrcode;
})
if (res) {
this.datalsit = res.data.qrcode;
console.log(this.datalsit)
// 获取uQRCode实例
var qr = new uQRCode();
// 设置二维码内容
qr.data = res.data.data.qrcode;
qr.data = res.data.qrcode;
// 设置二维码大小必须与canvas设置的宽高一致
qr.size = this.size;
// 调用制作二维码方法
@@ -125,7 +111,6 @@
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
}
});
},
savealbum(e) {
uni.pro.navigateBack();

View File

@@ -62,19 +62,16 @@ export default {
this.storeinvoicelist();
},
methods: {
storeinvoicelist() {
uni.request({
url: uni.conf.baseUrl + 'store/invoicedetail',
data: {
async storeinvoicelist() {
let res = await this.api.storeinvoicedetail({
id: this.ID
},
method: 'POST', //请求方式,必须为大写
success: (res) => {
this.datalsit = res.data.data;
})
if(res){
this.datalsit = res.data;
// 获取uQRCode实例
var qr = new uQRCode();
// 设置二维码内容
qr.data = res.data.data.url;
qr.data = res.data.url;
// 设置二维码大小必须与canvas设置的宽高一致
qr.size = this.size;
// 调用制作二维码方法
@@ -86,7 +83,6 @@ export default {
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
}
});
},
savealbum(e) {
uni.pro.navigateBack();

View File

@@ -90,30 +90,6 @@
if(res.code = 1){
this.datalsit = res.data;
}
// 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();
// }
// });
},
// 预览图片
previewImage(e) {

View File

@@ -88,20 +88,16 @@
}, 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;
async storeinvoicelist() {
let res = await this.api.storeinvoicedetail({
id: this.ID
})
if(res){
this.datalsit = res.data;
// 获取uQRCode实例
var qr = new uQRCode();
// 设置二维码内容
qr.data = res.data.data.url;
qr.data = res.data.url;
// 设置二维码大小必须与canvas设置的宽高一致
qr.size = this.size;
// 调用制作二维码方法
@@ -113,7 +109,6 @@
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
}
});
},
savealbum(e) {
uni.pro.navigateBack();

View File

@@ -224,26 +224,6 @@
}
}, 1000)
},
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>

View File

@@ -9,39 +9,27 @@
url: '', //PDF路径
};
},
onLoad(options) {
async onLoad(options) {
console.log(options)
if (options.tape == 1) {
this.url = options.url;
} else {
uni.request({
url: uni.conf.baseUrl + 'szzpy/downloadurl',
data: {
//参数
let res = await this.api.szzpydownloadurl({
id: options.id
},
method: 'POST', //请求方式,必须为大写
success: res => {
})
if (res) {
let fileUrl = options.url
// this.url = 'https://www.pfile.com.cn/api/profile/onlinePreview?url=' +
// encodeURIComponent(res.data.data);
// this.url = 'https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data
// console.log(this.url)
var user = navigator.userAgent;
//android端
var isAndroid = user.indexOf("Android") > -1 || user.indexOf("Adr") > -1;
//ios端
var isiOS = !!user.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if (isAndroid) {
window.open(res.data.data)
window.open(res.data)
} else if (isiOS) {
window.location.href = res.data.data;
window.location.href = res.data;
}
// window.open(res.data.data)
}
});
}
}

View File

@@ -3,4 +3,4 @@
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') +
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src="/chunk-vendors.js?v=1717141437954"></script><script src="/index.js?v=1717141437954"></script></body></html>
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.41073de1.js></script><script src=/static/js/index.eb42db61.js></script></body></html>

View File

@@ -1,22 +0,0 @@
if (process.env.UNI_PLATFORM === 'h5') {
// 由于这种方式的打包,会导致编译生成微信小程序(只验证了微信小程序)无法正常使用,所以必须分开
let filePath = ''
let Timestamp = new Date().getTime()
module.exports = {
// ... webpack 相关配置
filenameHashing: false,
configureWebpack: { // webpack 配置 解决js缓存的问题目前只适配H5端打包
output: { // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】
filename: `${filePath}[name].js?v=${Timestamp}`,
chunkFilename: `${filePath}[name].js?v=${Timestamp}`
},
}
}
} else {
// 其他打包需要的相关配置
//由于vue-cli打包vue文件的时候静态文件会默认会带有hash值我们首先要去掉hash值。
module.exports = {
// ... webpack 相关配置
filenameHashing: false
}
}