首页新增跳转用电查询
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { getInvoiceInfo, makeInvoice } from "../../service/invoice"
|
||||
import { alertInfo, alertSuccess } from "../../utils/index";
|
||||
import { alertInfo, alertSuccess, loadingFunc } from "../../utils/index";
|
||||
import request from '../../utils/request'
|
||||
const { OK } = request
|
||||
|
||||
@@ -91,14 +91,22 @@ Page({
|
||||
|
||||
},
|
||||
async onSubmit() {
|
||||
const {ids = [], remark } = this.data;
|
||||
const tenement = wx.getStorageSync('tenement')
|
||||
const { code, message, data } = await makeInvoice({ ids, tenement: tenement.id, remark })
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
}
|
||||
alertSuccess("开票成功,未完")
|
||||
loadingFunc(async() => {
|
||||
const {ids = [], remark } = this.data;
|
||||
const tenement = wx.getStorageSync('tenement')
|
||||
const { code, message, data } = await makeInvoice({ ids, tenement: tenement.id, remark })
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
}
|
||||
alertSuccess("操作成功")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '/pages/invoiceList/index?tab=1',
|
||||
})
|
||||
}, 500)
|
||||
|
||||
})
|
||||
},
|
||||
changeShow() {
|
||||
this.setData({ show: true })
|
||||
|
Reference in New Issue
Block a user