添加采购管理页面详情页, 权限修改
This commit is contained in:
@@ -20,12 +20,15 @@ Page({
|
||||
data: {
|
||||
params: cloneLite(defaultParams) as any,
|
||||
list: [] as any[],
|
||||
accounts: [] as any[],
|
||||
crms: [] as any[],
|
||||
count: 0,
|
||||
states: [
|
||||
payType: [
|
||||
{ value: '', label: '全部' },
|
||||
{ value: '1', label: '未审核' },
|
||||
{ value: '2', label: '已审核' },
|
||||
{ value: '1', label: '收入' },
|
||||
{ value: '2', label: '支出' },
|
||||
],
|
||||
payTypeObj: { 1: '收入', 2: '支出' },
|
||||
sort: [{ label: '创建日期', value: 'create_date' }],
|
||||
},
|
||||
handleLogin(e: any) {
|
||||
@@ -37,6 +40,7 @@ Page({
|
||||
init() {
|
||||
this.setData({ authInfo: getAuthInfo() });
|
||||
this.getList();
|
||||
this.getData();
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
@@ -63,21 +67,26 @@ Page({
|
||||
paginationChange(e: any) {
|
||||
this.getList(e.detail.curr_page);
|
||||
},
|
||||
getData() {
|
||||
post('ErpAccount/ajaxList', { state: 1 }).then((res: any) => {
|
||||
const list = toArray(res.data?.list).map((el) => ({
|
||||
label: el.account_name,
|
||||
value: el.account_id,
|
||||
}));
|
||||
this.setData({ accounts: list });
|
||||
});
|
||||
post('ErpCrm/ajaxList').then((res: any) => {
|
||||
const list = toArray(res.data?.list).map((el) => ({
|
||||
label: el.crm_name,
|
||||
value: el.crm_id,
|
||||
}));
|
||||
this.setData({ crms: list });
|
||||
});
|
||||
},
|
||||
getList(curr: number = 1) {
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
const temp = cloneLite(this.data.params);
|
||||
if (temp.order_step && temp.order_step.length) {
|
||||
temp.order_step = temp.order_step.join(',');
|
||||
} else {
|
||||
delete temp.order_step;
|
||||
}
|
||||
|
||||
if (temp.process_state && temp.process_state.length) {
|
||||
temp.process_state = temp.process_state.join(',');
|
||||
} else {
|
||||
delete temp.process_state;
|
||||
}
|
||||
|
||||
post('ErpAccount/flow', temp).then((res: any) => {
|
||||
const list = toArray(res.data);
|
||||
@@ -104,6 +113,16 @@ Page({
|
||||
});
|
||||
});
|
||||
},
|
||||
onViewAttachment(e: any) {
|
||||
const data = getDataSet(e);
|
||||
const index = data.index;
|
||||
const item = this.data.list[index];
|
||||
wx.navigateTo({
|
||||
url: `/pages/base/viewAttachment/viewAttachment?rel_account_log_id=${
|
||||
item.rel_account_log_id || ''
|
||||
}&rel_bill_no=${item.rel_bill_no}&title=${encodeURIComponent(`${item.rel_bill_no} 附件`)}`,
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user