完成发票初始版本
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { getInvoiceInfo, updateInvoiceInfo } from "../../../../service/invoice"
|
||||
import { getUserInfo } from "../../../../service/user";
|
||||
import { alertInfo, alertSuccess } from "../../../../utils/index";
|
||||
|
||||
// pages/invoiceList/components/info/index.js
|
||||
@@ -13,6 +14,7 @@ Component({
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.getDetail();
|
||||
this.getUser();
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -33,6 +35,10 @@ Component({
|
||||
|
||||
this.setData({ detail: {...data, },editType: 'detail', formData: {} })
|
||||
},
|
||||
async getUser() {
|
||||
const { code, message, data } = await getUserInfo()
|
||||
this.setData({ user: data });
|
||||
},
|
||||
changeEditType() {
|
||||
this.setData({ editType: 'edit', formData: this.data.detail })
|
||||
},
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<view
|
||||
slot="operate"
|
||||
class="cardOperate"
|
||||
wx:if="{{editType === 'detail'}}"
|
||||
wx:if="{{editType === 'detail' && user.isAdmin}}"
|
||||
bind:tap="changeEditType"
|
||||
>
|
||||
<van-icon name="edit" />
|
||||
|
Reference in New Issue
Block a user