测试
This commit is contained in:
@@ -46,5 +46,11 @@ export default {
|
||||
},
|
||||
invoicingrecordsthatneeddetailstore(data) { //开票详情
|
||||
return uni.api.post("store/invoicingrecordsthatneeddetail", data);
|
||||
}
|
||||
},
|
||||
storedigitalinvoice(data) { //
|
||||
return uni.api.post("store/digitalinvoice", data);
|
||||
},
|
||||
szzpyissuedby(data) { //开票人列表
|
||||
return uni.api.post("szzpy/issuedby", data);
|
||||
},
|
||||
}
|
||||
@@ -4,17 +4,17 @@
|
||||
<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 || '选择项目名称' }}
|
||||
style="width: 60%; overflow:hidden; font-size:32rpx;text-overflow: ellipsis;white-space: nowrap; "
|
||||
v-model="form.article">{{ form.article}} <text v-if="!form.article"
|
||||
style="color: #86909c;">选择项目名称</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*金额</view>
|
||||
<view><input type="digit" v-model="form.price" @input="handleInputChange" placeholder="请填写金额" /></view>
|
||||
<view><input type="digit" v-model="form.price" @input="onInput" placeholder="请填写金额" /></view>
|
||||
</view>
|
||||
|
||||
<view class="Box_box flex-between">
|
||||
<view>*数量:</view>
|
||||
<view>*数量</view>
|
||||
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
@@ -25,15 +25,21 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*税额:</view>
|
||||
<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>*单价</view>
|
||||
<view><input type="text" disabled='false' v-model="form.d_price" placeholder="请填写单价"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between" @click="Issuedbyshowpicker = true">
|
||||
<view class="Box_boxlang Box_box_bouttme_item_O">*开票人</view>
|
||||
<view class="Box_box_bouttme_item_T">
|
||||
<text type="text" v-model="form.dlzhid">{{ form.dlzhid || '请选择开票人' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>备注:</view>
|
||||
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
||||
@@ -53,24 +59,28 @@
|
||||
<view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-picker :show="showpicker" @confirm="showpickerconfirm" :columns="columns"
|
||||
@cancel="showpicker = false"></u-picker>
|
||||
<u-picker :show="showpicker" @confirm="showpickerconfirm" :columns="columns" @cancel="showpicker = false"
|
||||
:defaultIndex='[0,0]'></u-picker>
|
||||
<u-picker :show="Issuedbyshowpicker" @confirm="Issuedbyconfirm" :columns="Issuedbycolumns"
|
||||
@cancel="Issuedbyshowpicker = false" keyName='name'></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: uni.getStorageSync('keyword'),
|
||||
keyword: uni.getStorageSync('keyword').name,
|
||||
showpopup: false,
|
||||
showpicker: false,
|
||||
Issuedbyshowpicker: false,
|
||||
columns: [],
|
||||
Issuedbycolumns: [],
|
||||
Uploadurlnumber: '',
|
||||
namelang: '',
|
||||
merchantAuditStatus: '',
|
||||
form: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: '',
|
||||
article: uni.cache.get('keyword').name,
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
@@ -78,51 +88,51 @@
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
// new: 'new'
|
||||
mcc: uni.cache.get('keyword').code,
|
||||
dlzh: '',
|
||||
dlzhid: "",
|
||||
is_new: 1
|
||||
}
|
||||
};
|
||||
},
|
||||
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
|
||||
let ress = await this.api.szzpyissuedby({
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
})
|
||||
this.Issuedbycolumns = [ress.data]
|
||||
console.log(this.Issuedbycolumns)
|
||||
},
|
||||
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.mcc = uni.cache.get('keyword').code
|
||||
this.form.article = uni.cache.get('keyword').name
|
||||
this.keyword = uni.cache.get('keyword').keyword
|
||||
// this.form.contactLine = res.unionpayCode
|
||||
// this.form.branchName = res.branchName
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
showpopupclick() {
|
||||
this.keyword = uni.getStorageSync('keyword')
|
||||
this.keyword = uni.getStorageSync('keyword').name
|
||||
this.showpopup = true
|
||||
},
|
||||
popupshowone_itemone() {
|
||||
this.showpopup = false
|
||||
this.form.article = this.keyword
|
||||
},
|
||||
handleInputChange() {
|
||||
handleInputChange(e) {
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
return false;
|
||||
}
|
||||
@@ -132,9 +142,25 @@
|
||||
if (this.form.type == null || this.form.type == '') {
|
||||
return false;
|
||||
}
|
||||
uni.$u.debounce(this.showpickerconfirm(), 1000)
|
||||
uni.$u.debounce(this.showpickerconfirm(), 500)
|
||||
|
||||
},
|
||||
onInput(e) {
|
||||
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;
|
||||
}
|
||||
if (e.detail.value) {
|
||||
uni.$u.debounce(this.showpickerconfirm(), 500)
|
||||
} else {
|
||||
this.subCategoryList = []
|
||||
}
|
||||
},
|
||||
showpickerconfirm(e) {
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
uni.showToast({
|
||||
@@ -177,6 +203,15 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
Issuedbyconfirm(e) {
|
||||
this.Issuedbyshowpicker = false
|
||||
console.log(e)
|
||||
if (e.value) {
|
||||
this.form.dlzh = e.value[0].id
|
||||
this.form.dlzhid = e.value[0].name
|
||||
// this.form.dlzh = e.value.toString();
|
||||
}
|
||||
},
|
||||
businesscategory() {
|
||||
this.showpopup = false
|
||||
uni.pro.navigateTo('index/businesscategory');
|
||||
@@ -224,7 +259,13 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.form.dlzh == null || this.form.dlzh == '') {
|
||||
uni.showToast({
|
||||
title: '请选择开票人',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/subinvoicing',
|
||||
data: this.form,
|
||||
@@ -233,14 +274,16 @@
|
||||
console.log(res)
|
||||
this.form = {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: '',
|
||||
article: uni.cache.get('keyword').name,
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
number: '',
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
se_amount: ''
|
||||
mcc: uni.cache.get('keyword').code,
|
||||
dlzh: ''
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.data.message || res.data.msg,
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
<u-popup :show="clickconfirmshow" mode="center" :round="10">
|
||||
<view class="popupshow">
|
||||
<view class="Box_box flex-between">
|
||||
@@ -53,7 +56,12 @@
|
||||
data() {
|
||||
return {
|
||||
clickconfirmshow: false,
|
||||
is_end: false,
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
no: '',
|
||||
saveMerchantBaseInfolsit: {
|
||||
item: {
|
||||
@@ -128,8 +136,25 @@
|
||||
})
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.list = res.data
|
||||
if (res.data.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res.data];
|
||||
if (res.data.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
}
|
||||
},
|
||||
categorySubClick(category) {
|
||||
uni.cache.set('keyword', category)
|
||||
uni.$emit("businesscategorys", category)
|
||||
uni.cache.set('keyword', category.name)
|
||||
uni.pro.navigateBack();
|
||||
},
|
||||
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
<image src="@/static/item8.png" mode="aspectFill"></image>
|
||||
<text>审核开票</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="jumpToMiniProgram" v-if="improveinformation">
|
||||
<image src="@/static/item8.png" mode="aspectFill"></image>
|
||||
<text>跳转小程序</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
|
||||
网页版地址:https://h5-invoice.sxczgkj.cn
|
||||
@@ -44,13 +48,13 @@
|
||||
improveinformationlist: {},
|
||||
onLoaduserId: '',
|
||||
onLoadtype: '',
|
||||
infos:uni.getSystemInfoSync()
|
||||
infos: uni.getSystemInfoSync()
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
if (e.userId) {
|
||||
// this.onLoaduserId = e.userId
|
||||
// this.onLoadtype = e.type
|
||||
// this.onLoadtype = e.type//295
|
||||
uni.cache.set('userId', e.userId);
|
||||
}
|
||||
let res = await this.api.storestorestatus({
|
||||
@@ -93,16 +97,51 @@
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
jumpToMiniProgram() {
|
||||
plus.share.getServices(function (res) {
|
||||
var sweixin = null;
|
||||
for (var i = 0; i < res.length; i++) {
|
||||
var t = res[i];
|
||||
if (t.id == 'weixin') {
|
||||
sweixin = t;
|
||||
}
|
||||
}
|
||||
if (sweixin) {
|
||||
sweixin.launchMiniProgram({
|
||||
id:'gh_fa9286427a5b', //这里写你的小程序原始id(以gh开头)
|
||||
type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
|
||||
path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
||||
});
|
||||
}
|
||||
});
|
||||
// // #ifdef H5
|
||||
// // 在H5环境中,调用此函数来跳转到小程序
|
||||
// wx.navigateToMiniProgram({
|
||||
// appId: 'wxd88fffa983758a30', // 小程序的appid
|
||||
// path: 'pages/index/index', // 打开的页面路径,若为空则打开首页
|
||||
// extraData: {}, // 需要传递给小程序的数据
|
||||
// success(res) {
|
||||
// // 打开成功的回调
|
||||
// console.log('跳转成功');
|
||||
// },
|
||||
// fail(err) {
|
||||
// // 打开失败的回调
|
||||
// console.error('跳转失败', err);
|
||||
// }
|
||||
// });
|
||||
// // jumpToMiniProgram('小程序的appid', '小程序页面路径');
|
||||
// // #endif
|
||||
},
|
||||
setClipboardData() {
|
||||
uni.setClipboardData({
|
||||
data: 'https://h5-invoice.sxczgkj.cn/?userId=' + uni.cache.get('userId'),
|
||||
success: function() {}
|
||||
});
|
||||
},
|
||||
auditbilling(){
|
||||
auditbilling() {
|
||||
uni.pro.navigateTo('index/auditbilling');
|
||||
},
|
||||
billingcode(){
|
||||
billingcode() {
|
||||
uni.pro.navigateTo('index/billingcode');
|
||||
},
|
||||
drawer() {
|
||||
@@ -160,7 +199,7 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
.setClipboardDataclass{
|
||||
.setClipboardDataclass {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 90rpx;
|
||||
@@ -168,8 +207,9 @@
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.Box {
|
||||
|
||||
|
||||
padding: 0rpx 28rpx;
|
||||
|
||||
.content {
|
||||
|
||||
2
unpackage/dist/build/web/index.html
vendored
2
unpackage/dist/build/web/index.html
vendored
@@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>发票</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
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=/static/js/chunk-vendors.5ca1542a.js></script><script src=/static/js/index.c950e6b2.js></script></body></html>
|
||||
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=1716359286335"></script><script src="/index.js?v=1716359286335"></script></body></html>
|
||||
22
vue.config.js
Normal file
22
vue.config.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user