开票的时候,点击开票先跳转到开票列表,从接口成功后跳转改成直接跳转,由后端控制状态显示,防止特殊情况下存在接口无返回导致页面卡死的问题后用户重复点击导致多开发票的问题,以及pdf右上角默认展示菜单
This commit is contained in:
parent
10a0fd7c19
commit
7772b3de1a
@ -232,6 +232,7 @@ Page({
|
|||||||
wx.openDocument({
|
wx.openDocument({
|
||||||
filePath: data.tempFilePath,
|
filePath: data.tempFilePath,
|
||||||
fileType: ['xlsx'],
|
fileType: ['xlsx'],
|
||||||
|
showMenu: true,
|
||||||
success() {
|
success() {
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
|
@ -80,6 +80,7 @@ Page({
|
|||||||
}
|
}
|
||||||
wx.openDocument({
|
wx.openDocument({
|
||||||
filePath: res.tempFilePath,
|
filePath: res.tempFilePath,
|
||||||
|
showMenu: true,
|
||||||
// fileType: sheetRes.tapIndex === 0 ? 'xml' : "pdf", // 3. 这个必须写合法类型,不然下载不了 !!!
|
// fileType: sheetRes.tapIndex === 0 ? 'xml' : "pdf", // 3. 这个必须写合法类型,不然下载不了 !!!
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
|
||||||
|
@ -43,6 +43,15 @@ Component({
|
|||||||
page: page + 1,
|
page: page + 1,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
refresh() {
|
||||||
|
const that = this;
|
||||||
|
that.setData({
|
||||||
|
page: 1,
|
||||||
|
list: []
|
||||||
|
}, () => {
|
||||||
|
loadingFunc(() => that.getList())
|
||||||
|
})
|
||||||
|
},
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
loadingFunc(() => this.getList())
|
loadingFunc(() => this.getList())
|
||||||
},
|
},
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<scroll-view wx:if="{{list.length}}" scroll-y lower-threshold="100px" bindscrolltolower="scrollToLower" style="height: 80vh;" scroll-top="{{topHeight}}px" class="scrView">
|
<scroll-view wx:if="{{list.length}}" scroll-y lower-threshold="100px" bindscrolltolower="scrollToLower" style="height: 80vh;" scroll-top="{{topHeight}}px" class="scrView">
|
||||||
|
<view style="margin: 18rpx 30rpx;">
|
||||||
|
<van-button type="info" size="small" icon="replay" bind:click="refresh"> 刷新 </van-button>
|
||||||
|
</view>
|
||||||
<view class="card" wx:for="{{list}}">
|
<view class="card" wx:for="{{list}}">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
|
@ -82,18 +82,17 @@ Page({
|
|||||||
loadingFunc(async() => {
|
loadingFunc(async() => {
|
||||||
const {ids = [], remark } = this.data;
|
const {ids = [], remark } = this.data;
|
||||||
const tenement = wx.getStorageSync('tenement')
|
const tenement = wx.getStorageSync('tenement')
|
||||||
|
setTimeout(() => {
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/invoiceList/index?tab=1',
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
const { code, message, data } = await makeInvoice({ ids, tenement: tenement.id, remark })
|
const { code, message, data } = await makeInvoice({ ids, tenement: tenement.id, remark })
|
||||||
if (code !== OK) {
|
if (code !== OK) {
|
||||||
alertInfo(message)
|
alertInfo(message)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
alertSuccess("操作成功")
|
alertSuccess("操作成功")
|
||||||
setTimeout(() => {
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '/pages/invoiceList/index?tab=1',
|
|
||||||
})
|
|
||||||
}, 500)
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeShow() {
|
changeShow() {
|
||||||
|
@ -94,6 +94,7 @@ Page({
|
|||||||
wx.openDocument({
|
wx.openDocument({
|
||||||
filePath: res.tempFilePath,
|
filePath: res.tempFilePath,
|
||||||
fileType: [ "pdf"], // 3. 这个必须写合法类型,不然下载不了 !!!
|
fileType: [ "pdf"], // 3. 这个必须写合法类型,不然下载不了 !!!
|
||||||
|
showMenu: true,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
resolve()
|
resolve()
|
||||||
},
|
},
|
||||||
|
@ -45,10 +45,9 @@ export function getConfigByEnv() {
|
|||||||
switch (envVersion) {
|
switch (envVersion) {
|
||||||
// 开发版
|
// 开发版
|
||||||
case 'develop':
|
case 'develop':
|
||||||
api = "http://localhost:8000"
|
// api = "http://localhost:8000"
|
||||||
// api = "https://zgd.hbhcbn.com/api3"
|
// api = "https://zgd.hbhcbn.com/api3"
|
||||||
// api = "https://zgd.hbhcbn.com/api3"
|
api = "https://zgd.hbhcbn.com/wxApi"
|
||||||
// api = "https://zgd.hbhcbn.com/wxApi"
|
|
||||||
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
||||||
break;
|
break;
|
||||||
// 体验版
|
// 体验版
|
||||||
|
Loading…
x
Reference in New Issue
Block a user