|
|
@@ -31,7 +31,7 @@ |
|
|
|
<text class="customlist-item-field-title">审核状态:</text> |
|
|
|
{{ displayListItem(item, 'CheckStatus') || '--' }} |
|
|
|
</view> |
|
|
|
<l-customlist-action :showButton="!checkDisable&&item.CheckStatus === '1'" :buttonText="'审核'" @join="action('check',item)" :showEdit="item.CheckStatus === '0'" @edit="action('edit', item.Id)" :showDelete="item.CheckStatus === '0'" @delete="action('delete', item.Id)" @view="action('view', item.Id)" /> |
|
|
|
<l-customlist-action :showButton="!checkDisable&&['0','1'].includes(item.CheckStatus)" :buttonText="item.CheckStatus==='1'?'审核':'提交'" @join="action(item.CheckStatus==='1'?'check':'submit',item)" :showEdit="item.CheckStatus === '0'" @edit="action('edit', item.Id)" :showDelete="item.CheckStatus === '0'" @delete="action('delete', item.Id)" @view="action('view', item.Id)" /> |
|
|
|
</view> |
|
|
|
</l-customlist> |
|
|
|
</l-scroll-list> |
|
|
@@ -89,6 +89,7 @@ |
|
|
|
</view> |
|
|
|
<l-button @click="action('checkAgree','1')" color="blue" class="block" block>同意</l-button> |
|
|
|
<l-button @click="action('checkAgree','2')" color="red" class="block margin-top-sm" block>不同意</l-button> |
|
|
|
|
|
|
|
<l-button @click="modal = false" line="blue" class="block margin-top-sm" block>取消</l-button> |
|
|
|
</l-modal> |
|
|
|
</view> |
|
|
@@ -177,8 +178,7 @@ export default { |
|
|
|
|
|
|
|
methods: { |
|
|
|
// 页面初始化 |
|
|
|
async init() { |
|
|
|
console.log(this.GET_GLOBAL('loginUser')) |
|
|
|
async init() { |
|
|
|
if(['教师','管理员'].includes(this.GET_GLOBAL('loginUser').Description)){ |
|
|
|
this.checkDisable = false |
|
|
|
} |
|
|
@@ -288,25 +288,41 @@ export default { |
|
|
|
return |
|
|
|
|
|
|
|
case 'checkAgree': |
|
|
|
// if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) { |
|
|
|
// return |
|
|
|
// } |
|
|
|
this.modal = false |
|
|
|
const postData = { |
|
|
|
keyValue:this.selectItem.Id, |
|
|
|
strEntity:JSON.stringify({ |
|
|
|
...this.selectItem, |
|
|
|
CheckStatus:id, |
|
|
|
CheckUserNo:this.GET_GLOBAL('loginUser').account, |
|
|
|
CheckUserId:this.GET_GLOBAL('loginUser').userId, |
|
|
|
}) |
|
|
|
} |
|
|
|
this.HTTP_POST('learun/adms/stuleavemanagement/savecheck',postData , '提交失败').then(success => { |
|
|
|
if(!success) { return } |
|
|
|
this.TOAST('提交成功', 'success') |
|
|
|
this.refreshList() |
|
|
|
}) |
|
|
|
this.modal = false |
|
|
|
const postData = { |
|
|
|
keyValue:this.selectItem.Id, |
|
|
|
strEntity:JSON.stringify({ |
|
|
|
...this.selectItem, |
|
|
|
CheckStatus:id, |
|
|
|
CheckUserNo:this.GET_GLOBAL('loginUser').account, |
|
|
|
CheckUserId:this.GET_GLOBAL('loginUser').userId, |
|
|
|
}) |
|
|
|
} |
|
|
|
this.HTTP_POST('learun/adms/stuleavemanagement/savecheck',postData , '提交失败').then(success => { |
|
|
|
if(!success) { return } |
|
|
|
this.TOAST('提交成功', 'success') |
|
|
|
this.refreshList() |
|
|
|
}) |
|
|
|
return |
|
|
|
|
|
|
|
case 'submit': |
|
|
|
if (!(await this.CONFIRM('提交申请', '是否确认提交请假申请?', true))) { |
|
|
|
return |
|
|
|
} |
|
|
|
const postdata = { |
|
|
|
keyValue:id.Id, |
|
|
|
strEntity:JSON.stringify(id) |
|
|
|
} |
|
|
|
|
|
|
|
this.HTTP_POST('learun/adms/stuleavemanagement/submit', postdata, '表单提交保存失败').then(success => { |
|
|
|
this.HIDE_LOADING() |
|
|
|
if (!success) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.TOAST('提交保存成功') |
|
|
|
this.refreshList() |
|
|
|
}) |
|
|
|
return |
|
|
|
|
|
|
|
default: |
|
|
|
return |
|
|
|