|
|
@@ -55,11 +55,16 @@ |
|
|
|
/> --> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> |
|
|
|
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> |
|
|
|
提交保存 |
|
|
|
</l-button> |
|
|
|
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block> |
|
|
|
<view v-if="ready && edit" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> |
|
|
|
<template v-if="edit"> |
|
|
|
<l-button v-if="edit" @click="action('save','0')" size="lg" color="green" class="block margin-top" block> |
|
|
|
保存草稿 |
|
|
|
</l-button> |
|
|
|
<l-button v-if="edit&&getValue('StuMail.CheckStatus') === '0'" @click="action('save','1')" size="lg" color="blue" class="block margin-top" block> |
|
|
|
提交申请 |
|
|
|
</l-button> |
|
|
|
</template> |
|
|
|
<!-- <l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block> |
|
|
|
编辑本页 |
|
|
|
</l-button> |
|
|
|
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block> |
|
|
@@ -67,7 +72,7 @@ |
|
|
|
</l-button> |
|
|
|
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block> |
|
|
|
删除 |
|
|
|
</l-button> |
|
|
|
</l-button> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@@ -120,7 +125,7 @@ export default { |
|
|
|
LeaveDay:{ title: '请假天数', verify: 'Num' }, |
|
|
|
Files:{ type: 'upload', title: '附件上传'}, |
|
|
|
LeaveReason:{ type: 'textarea', title: '请假事由'}, |
|
|
|
// CheckStatus:{ type: 'select', title: '审核状态' }, |
|
|
|
CheckStatus:{ type: 'select', title: '审核状态' }, |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
@@ -128,8 +133,8 @@ export default { |
|
|
|
// 数据源 |
|
|
|
dataSource: { |
|
|
|
StuMail: { |
|
|
|
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({ value: t.value, text: t.text })), |
|
|
|
// CheckStatus:Object.values(this.GET_GLOBAL('dataDictionary').AuditStatus).map(t => ({ value: t.value, text: t.text })), |
|
|
|
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveTypeOfStu).map(t => ({ value: t.value, text: t.text })), |
|
|
|
CheckStatus:[{text:'草稿',value:'0'},{text:'审核中',value:'1'},{text:'通过',value:'2'},{text:'不通过',value:'3'}] |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
@@ -173,7 +178,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 点击 「编辑」、「重置」、「保存」、「删除」 按钮 |
|
|
|
async action(type) { |
|
|
|
async action(type,checkType) { |
|
|
|
switch (type) { |
|
|
|
case 'edit': |
|
|
|
this.edit = true |
|
|
@@ -199,7 +204,7 @@ export default { |
|
|
|
this.LOADING('正在提交...') |
|
|
|
const postData = await this.getPostData(this.id) |
|
|
|
|
|
|
|
this.HTTP_POST('learun/adms/stuleavemanagement/save', postData, '表单提交保存失败').then(success => { |
|
|
|
this.HTTP_POST('learun/adms/stuleavemanagement/'+ (checkType === '0'?'save':'submit'), postData, '表单提交保存失败').then(success => { |
|
|
|
this.HIDE_LOADING() |
|
|
|
if (!success) { |
|
|
|
return |
|
|
|