Ver código fonte

app教务采购指派审核人

娄底高职分支
yxq 1 ano atrás
pai
commit
e82007742e
3 arquivos alterados com 165 adições e 15 exclusões
  1. +3
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/list.vue
  2. +160
    -10
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/single.vue
  3. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsapplyManagement/Purchase_Student_Apply/list.vue

+ 3
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/list.vue Ver arquivo

@@ -66,7 +66,7 @@
<view
v-if="item.Status != '1'"
@click="action('edit', item.Id)"
@click="action('edit', item.Id, item)"
class="customlist-banner-action-btn line-blue text-sm"
style="border: currentColor 1px solid">
<l-icon type="edit" />
@@ -265,7 +265,7 @@ export default {
},
// 点击「编辑」、「查看」、「添加」、「删除」按钮
async action(type, id = '') {
async action(type, id = '',item) {
switch (type) {
case 'view':
this.NAV_TO(`./single?type=view&id=${id}`)
@@ -276,7 +276,7 @@ export default {
return
case 'edit':
this.NAV_TO(`./single?type=edit&id=${id}`)
this.NAV_TO(`./single?type=edit&id=${id}`,item,true)
return
case 'submit':
if (!(await this.CONFIRM('提交项目', '是否确认提交该项?', true))) {


+ 160
- 10
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Purchase_Edu/single.vue Ver arquivo

@@ -88,10 +88,20 @@
:edit="edit"
/>
</view>
<!-- 指派审核人弹窗 -->
<l-modal v-model="modal" @close="reviewer = ''" title="指派审核人">
<l-checkbox-picker @input="(e)=>{reviewer = e}" :value="reviewer" :readonly="false" :range="reviewerList"
required title="审核人" />
<l-button @click="userAssign" color="blue" class="block" block>确定指派</l-button>
<l-button @click="()=>{modal = false;reviewer = ''}" line="blue" class="block margin-top-sm" block>取消</l-button>
</l-modal>
<view v-if="ready && current.Purchase_Edu && current.Purchase_Edu.status != '1'" 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" @click="action('save',true)" size="lg" color="orange" 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>
编辑本页
</l-button>
@@ -128,9 +138,10 @@ import get from 'lodash/get'
import set from 'lodash/set'
import moment from 'moment'
import customPageMixins from '@/common/custompage.js'
import workflowFormMixins from '@/pages/nworkflow/workflow.js'
export default {
mixins: [customPageMixins],
mixins: [workflowFormMixins,customPageMixins,],
data() {
return {
@@ -175,7 +186,20 @@ export default {
CheckStatus:[{text:'审核中',value:'1'},{text:'审核通过',value:'2'},{text:'',value:'草稿'}]
},
}
},
type:null,
code:null,
level: '1',
processId:null,
// 指派审核人数据
modal: false,
userAssignData:{},//收集数据用来判断是否需要审核人
reviewerListId:'',
reviewerList:[],
submitPostData:{},
reviewer: [],
}
},
@@ -190,7 +214,29 @@ export default {
this.id = id
this.mode = type
this.edit = ['create', 'edit'].includes(this.mode)
this.edit = ['create', 'edit'].includes(this.mode)
this.type = type
this.code = '2-7'
const currentTask = this.GET_PARAM()
// 新建表单则生成
this.processId = this.GUID('-')
const processInfo = await this.fetchProcessInfo({ code:this.code })
const currentNode = this.getCurrentNode(processInfo)
this.userAssignData.currentTask = currentTask
this.userAssignData.currentNode = currentNode
// wfForms 的数组成员 t,表示表单数据项(TAB页),t.type 表示类别,注意它是字符串型,用 Number(t.type) 转换
// 为 1 则使用工作流表单,依据它的 .formId
// 不为 1 则使用系统表单,依据它的 .appurl
const { wfForms } = currentNode
// 处理没有有效表单的情况,停止加载
if (!wfForms || wfForms.length <= 0) {
this.HIDE_LOADING()
this.TOAST('移动表单数据(wfForms)中无有效表单')
return
}
// 拉取表单数据,同时拉取所有来自数据源的选单数据
await Promise.all([
@@ -271,8 +317,108 @@ export default {
return (arg1 * m + arg2 * m) / m
},
// 点击 「编辑」、「重置」、「保存」、「删除」 按钮
async action(type) {
// 指派审核人
async userAssign() {
this.modal = false
if(!this.reviewer.length){
this.TOAST('请选择审核人')
return
}
this.LOADING('正在提交…')
let postData = {
auditors :JSON.stringify({[this.reviewerListId]:this.reviewer.toString()}),
level : this.level,
schemeCode: this.code,
processId: this.processId,
}
const url = 'learun/adms/newwf/create'
const tips = `流程发起失败`
this.HTTP_POST(url, postData, tips).then(success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.submit1()
})
},
// 发起流程
async submit() {
// 判断是否指派审核人
let isNext = this.userAssignData.currentNode.isNext
Object.assign(this.userAssignData,{ code: 'agree' })
if (this.userAssignData.next == '2') {
isNext = '1';
}
if (isNext == '1') {
let params = {
code: this.code,
processId: this.processId,
taskId: '',
nodeId: this.userAssignData.currentNode.id,
operationCode: this.userAssignData.code,
}
this.LOADING('正在获取审核人…')
const userList = await this.HTTP_GET('learun/adms/newwf/auditer', params, `获取审核人时发生错误`)
this.HIDE_LOADING()
if (!userList) {
return
}
let arr = Object.entries(userList)
this.reviewerListId = arr[0][0]
this.reviewerList = arr[0][1].map(item => {
return {
text: item.Name,
value: item.Id
}
})
if(this.reviewerList.length>1){
this.modal = true
return
}
}
this.LOADING('正在提交…')
let postData = {
auditors :JSON.stringify({}),
level : this.level,
schemeCode: this.code,
processId: this.processId,
}
const url = 'learun/adms/newwf/create'
const tips = `流程发起失败`
this.HTTP_POST(url, postData, tips).then(success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.submit1()
})
},
// 提交
async submit1(){
if (!(await this.CONFIRM('提交项目', '是否确认提交该项?', true))) {
return
}
this.LOADING('正在提交...')
this.HTTP_POST('learun/adms/purchaseedu/submit', {Id:this.id,ProcessId:this.processId} , '提交失败').then(
success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.TOAST('提交成功', 'success')
this.EMIT('LogisticsManagement-Purchase_Edu-list-change')
this.NAV_BACK()
})
return
},
// 点击 「编辑」、「重置」、「保存」、「删除」 按钮
async action(type,isSubmit=false) {
switch (type) {
case 'edit':
this.edit = true
@@ -298,7 +444,7 @@ export default {
return
}
this.LOADING('正在提交...')
this.LOADING('正在提交...')
const postData = await this.getPostData(this.id)
// 处理采购列表数据
@@ -316,16 +462,20 @@ export default {
strEntity.CreatorName = userInfo.realName
postData.strEntity = JSON.stringify(strEntity)
// console.log(postData,JSON.parse(postData.strEntity))
this.HTTP_POST('learun/adms/purchaseedu/save', postData, '表单提交保存失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.id = success.Id
if(isSubmit){
this.submit()
return
}
this.EMIT('LogisticsManagement-Purchase_Edu-list-change')
this.NAV_BACK()
this.NAV_BACK()
this.TOAST('提交保存成功')
})
break


+ 2
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsapplyManagement/Purchase_Student_Apply/list.vue Ver arquivo

@@ -180,13 +180,13 @@ export default {
await this.init()
},
onUnload() {
this.OFF('LogisticsapplyManagement-Purchase_Edu-list-change')
this.OFF('LogisticsapplyManagement-Purchase_Student-list-change')
},
methods: {
// 页面初始化
async init() {
this.ON('LogisticsapplyManagement-Purchase_Edu-list-change', this.reset)
this.ON('LogisticsapplyManagement-Purchase_Student-list-change', this.reset)
// 拉取加载列表和数据源
await Promise.all([
this.FETCH_DATASOURCE('classdata').then(data => {


Carregando…
Cancelar
Salvar