Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
youyuzihan
2021-06-23 15:44:24 +08:00
4 changed files with 295 additions and 35 deletions
+3 -3
View File
@@ -91,7 +91,7 @@ export default {
let userInfo2 = decodeURIComponent(userInfoStr) let userInfo2 = decodeURIComponent(userInfoStr)
let userInfoObj = JSON.parse(userInfo2) let userInfoObj = JSON.parse(userInfo2)
this.setToken(userInfoObj.usid) // vuex存储token this.setToken(userInfoObj.usid) // vuex存储token
this.getByUserInfoCode().then((userInfo) => { this.getByUserInfoCode(userInfoObj.usid).then((userInfo) => {
if (userInfo !== '' && userInfo !== null) { if (userInfo !== '' && userInfo !== null) {
userInfo.workNum = userInfoObj.workNum userInfo.workNum = userInfoObj.workNum
if (userInfo.userPic !== null) { if (userInfo.userPic !== null) {
@@ -237,9 +237,9 @@ export default {
}) })
}, },
// 获取用户信息 // 获取用户信息
getByUserInfoCode () { getByUserInfoCode (userId) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$http.get('person/userInfo/getByUserInfoCode', { this.$http.get('person/userInfo/getByUserInfoCode?userId='+ userId, {
}, { }, {
_this: this, _this: this,
prefix: '/foton' prefix: '/foton'
@@ -3,11 +3,12 @@
<!-- 标准入库流程--> <!-- 标准入库流程-->
<ProcessHeader toggle> <ProcessHeader toggle>
<template slot="proName">标准入库流程</template> <template slot="proName">标准入库流程</template>
<template slot="proNode">经理人审批</template> <template slot="proNode">责任人会签</template>
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div> <div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
<!-- <div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>-->
</div> </div>
<div class="content" v-if="active === '1'"> <div class="content" v-if="active === '1'">
<div style="flex: auto; overflow: auto;"> <div style="flex: auto; overflow: auto;">
@@ -45,6 +46,7 @@
disabled disabled
v-model="form.standYear" v-model="form.standYear"
type="year" type="year"
value-format="yyy"
placeholder="请选择标准年份"> placeholder="请选择标准年份">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@@ -519,16 +521,16 @@
<el-collapse accordion> <el-collapse accordion>
<el-collapse-item title="意见填写"> <el-collapse-item title="意见填写">
<div style="margin: 10px 0;"> <div style="margin: 10px 0;">
<el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;"> <!-- <el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">-->
<el-option label="驳回" value="1"></el-option> <!-- <el-option label="驳回" value="1"></el-option>-->
<el-option label="通过" value="0"></el-option> <!-- <el-option label="通过" value="0"></el-option>-->
</el-select> <!-- </el-select>-->
<el-input <el-input
type="textarea" type="textarea"
:rows="3" :rows="3"
resize="none" resize="none"
placeholder="请输入意见" placeholder="请输入意见"
v-model="textarea"> v-model="commentText">
</el-input> </el-input>
</div> </div>
</el-collapse-item> </el-collapse-item>
@@ -581,6 +583,75 @@
</el-timeline> </el-timeline>
</div> </div>
</div> </div>
<div class="content" v-if="active === '3'">
<div class="flow-list">
<el-table
height="100%"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="name"
label="任务步骤"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="审批意见"
align="center">
<template slot-scope="scope">
<span>{{scope.row.commentText}}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<ProcessFooter <ProcessFooter
show-save show-save
show-submit show-submit
@@ -602,8 +673,14 @@ export default {
name: "bzrkStep3", name: "bzrkStep3",
data () { data () {
return { return {
// 当前流程类型(1待办/2已办)
processType: 1,
detailData: [],
userId:this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
approvalOpinion: '', // 通过/驳回 approvalOpinion: '', // 通过/驳回
textarea: '', // 意见 commentText: '', // 意见
title: '', // 新增编辑抽屉标题 title: '', // 新增编辑抽屉标题
ListModel: false, // 新增编辑抽屉开关 ListModel: false, // 新增编辑抽屉开关
active: '1', // 默认显示 active: '1', // 默认显示
@@ -668,6 +745,11 @@ export default {
glwj: '', // 关联文件 glwj: '', // 关联文件
xglc: '', // 相关流程 xglc: '', // 相关流程
chjl: '', // 参会记录 chjl: '', // 参会记录
//流程信息
prcNum:'',
commentText:'',
prcName:'',
standType: '',
}, // 标准信息 }, // 标准信息
standSortOptions: [], // 标准类别 standSortOptions: [], // 标准类别
standNatureOptions: [], // 标准性质 standNatureOptions: [], // 标准性质
@@ -688,6 +770,9 @@ export default {
user3: '', user3: '',
user4: '', user4: '',
user5: '', user5: '',
// 流程路由信息
prcNum : this.$route.query.prcNum,
prcName : this.$route.query.prcName,
} }
}, },
components: { components: {
@@ -695,20 +780,50 @@ export default {
ProcessFooter, ProcessFooter,
ProcessTitle ProcessTitle
}, },
computed: {
listNoDataText () {
return this.processType === 1 ? '暂无待办流程' : '暂无已办流程'
},
},
methods: { methods: {
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
}, {
loading: 'loading',
_this: this
}, res => {
this.detailData = res
}, e => {})
},
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
inboundLiaisonDetail({ inboundLiaisonDetail({
taskIds: this.$route.query.taskIds, taskIds: this.taskIds,
pId: this.$route.query.prcId pId: this.pId
}).then(res => { }).then(res => {
if (res) { if (res) {
this.form = JSON.parse(res.mesg) const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
} }
}).catch(e => { }).catch(e => {
}) })
}) })
}, },
/**
* @description: 动态表单读取
*/
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
})
},
closeDrawer() { closeDrawer() {
this.ListModel = false this.ListModel = false
}, },
@@ -728,8 +843,22 @@ export default {
}, },
handleSave() {}, handleSave() {},
handleSubmit() { handleSubmit() {
this.form.commentText = this.commentText
this.form.approvalOpinion = this.approvalOpinion
const json = JSON.stringify(this.form); const json = JSON.stringify(this.form);
console.log(json) console.log(json)
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.taskIds,
userId : this.userId,
json: json
}, {
_this: this
}, res => {
console.log(res);
// if (res.success) {
// this.processCreateStand(json)
// }
})
// this.$http.post('lawss/activiti/completeTask', { // this.$http.post('lawss/activiti/completeTask', {
// taskIds: res.data, // taskIds: res.data,
// userId : this.$store.getters.userInfo.userId, // userId : this.$store.getters.userInfo.userId,
@@ -767,6 +896,7 @@ export default {
}, },
}, },
mounted () { mounted () {
this.processTable()
this.getData() this.getData()
this.$http.get('sys/dictype/getDicTypeListCode', '', { this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this _this: this
@@ -3,11 +3,12 @@
<!-- 标准入库流程--> <!-- 标准入库流程-->
<ProcessHeader toggle> <ProcessHeader toggle>
<template slot="proName">标准入库流程</template> <template slot="proName">标准入库流程</template>
<template slot="proNode">经理人审批</template> <template slot="proNode">申请人修订</template>
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div> <div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
<!-- <div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>-->
</div> </div>
<div class="content" v-if="active === '1'"> <div class="content" v-if="active === '1'">
<div style="flex: auto; overflow: auto;"> <div style="flex: auto; overflow: auto;">
@@ -45,6 +46,7 @@
disabled disabled
v-model="form.standYear" v-model="form.standYear"
type="year" type="year"
value-format="yyy"
placeholder="请选择标准年份"> placeholder="请选择标准年份">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@@ -516,23 +518,23 @@
</el-form> </el-form>
</div> </div>
<div> <div>
<!-- <el-collapse accordion>--> <el-collapse accordion>
<!-- <el-collapse-item title="意见填写">--> <el-collapse-item title="意见填写">
<!-- <div style="margin: 10px 0;">--> <div style="margin: 10px 0;">
<!-- <el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">--> <!-- <el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">-->
<!-- <el-option label="驳回" value="1"></el-option>--> <!-- <el-option label="驳回" value="1"></el-option>-->
<!-- <el-option label="通过" value="0"></el-option>--> <!-- <el-option label="通过" value="0"></el-option>-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- <el-input--> <el-input
<!-- type="textarea"--> type="textarea"
<!-- :rows="3"--> :rows="3"
<!-- resize="none"--> resize="none"
<!-- placeholder="请输入意见"--> placeholder="请输入意见"
<!-- v-model="textarea">--> v-model="commentText">
<!-- </el-input>--> </el-input>
<!-- </div>--> </div>
<!-- </el-collapse-item>--> </el-collapse-item>
<!-- </el-collapse>--> </el-collapse>
</div> </div>
</div> </div>
<div class="content" v-if="active === '2'"> <div class="content" v-if="active === '2'">
@@ -581,6 +583,75 @@
</el-timeline> </el-timeline>
</div> </div>
</div> </div>
<div class="content" v-if="active === '3'">
<div class="flow-list">
<el-table
height="100%"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="name"
label="任务步骤"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="审批意见"
align="center">
<template slot-scope="scope">
<span>{{scope.row.commentText}}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<ProcessFooter <ProcessFooter
show-save show-save
show-submit show-submit
@@ -602,8 +673,14 @@ export default {
name: "bzrkStep4", name: "bzrkStep4",
data () { data () {
return { return {
// 当前流程类型(1待办/2已办)
processType: 1,
detailData: [],
userId:this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
approvalOpinion: '', // 通过/驳回 approvalOpinion: '', // 通过/驳回
textarea: '', // 意见 commentText: '', // 意见
title: '', // 新增编辑抽屉标题 title: '', // 新增编辑抽屉标题
ListModel: false, // 新增编辑抽屉开关 ListModel: false, // 新增编辑抽屉开关
active: '1', // 默认显示 active: '1', // 默认显示
@@ -668,6 +745,11 @@ export default {
glwj: '', // 关联文件 glwj: '', // 关联文件
xglc: '', // 相关流程 xglc: '', // 相关流程
chjl: '', // 参会记录 chjl: '', // 参会记录
//流程信息
prcNum:'',
commentText:'',
prcName:'',
standType: '',
}, // 标准信息 }, // 标准信息
standSortOptions: [], // 标准类别 standSortOptions: [], // 标准类别
standNatureOptions: [], // 标准性质 standNatureOptions: [], // 标准性质
@@ -688,6 +770,9 @@ export default {
user3: '', user3: '',
user4: '', user4: '',
user5: '', user5: '',
// 流程路由信息
prcNum : this.$route.query.prcNum,
prcName : this.$route.query.prcName,
} }
}, },
components: { components: {
@@ -695,20 +780,50 @@ export default {
ProcessFooter, ProcessFooter,
ProcessTitle ProcessTitle
}, },
computed: {
listNoDataText () {
return this.processType === 1 ? '暂无待办流程' : '暂无已办流程'
},
},
methods: { methods: {
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
}, {
loading: 'loading',
_this: this
}, res => {
this.detailData = res
}, e => {})
},
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
inboundLiaisonDetail({ inboundLiaisonDetail({
taskIds: this.$route.query.taskIds, taskIds: this.taskIds,
pId: this.$route.query.prcId pId: this.pId
}).then(res => { }).then(res => {
if (res) { if (res) {
this.form = JSON.parse(res.mesg) const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
} }
}).catch(e => { }).catch(e => {
}) })
}) })
}, },
/**
* @description: 动态表单读取
*/
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
})
},
closeDrawer() { closeDrawer() {
this.ListModel = false this.ListModel = false
}, },
@@ -728,8 +843,22 @@ export default {
}, },
handleSave() {}, handleSave() {},
handleSubmit() { handleSubmit() {
this.form.commentText = this.commentText
this.form.approvalOpinion = this.approvalOpinion
const json = JSON.stringify(this.form); const json = JSON.stringify(this.form);
console.log(json) console.log(json)
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.taskIds,
userId : this.userId,
json: json
}, {
_this: this
}, res => {
console.log(res);
if (res.success) {
this.processCreateStand(json)
}
})
// this.$http.post('lawss/activiti/completeTask', { // this.$http.post('lawss/activiti/completeTask', {
// taskIds: res.data, // taskIds: res.data,
// userId : this.$store.getters.userInfo.userId, // userId : this.$store.getters.userInfo.userId,
@@ -767,6 +896,7 @@ export default {
}, },
}, },
mounted () { mounted () {
this.processTable()
this.getData() this.getData()
this.$http.get('sys/dictype/getDicTypeListCode', '', { this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this _this: this
@@ -233,7 +233,7 @@ export default {
}) })
}else if (row.taskInfo === '责任人会签'){ }else if (row.taskInfo === '责任人会签'){
this.$router.push({ this.$router.push({
name: 'step3', name: 'bzrkStep3',
query: { query: {
taskIds: row.taskIds, taskIds: row.taskIds,
prcId: row.prcId, prcId: row.prcId,
@@ -244,7 +244,7 @@ export default {
}) })
}else if (row.taskInfo === '申请人修订'){ }else if (row.taskInfo === '申请人修订'){
this.$router.push({ this.$router.push({
name: 'step4', name: 'bzrkStep4',
query: { query: {
taskIds: row.taskIds, taskIds: row.taskIds,
prcId: row.prcId, prcId: row.prcId,