Commit e53a5c48 authored by renjintao's avatar renjintao

订单审批数据展示

parent 9ee8c772
......@@ -266,6 +266,7 @@ export default {
if (r.success) {
this.$Message.success('审批通过成功')
this.footerStatu = 3
this.$refs.userProcess.load(this.detailId)
} else {
this.$Message.error('审批通过失败')
}
......@@ -282,6 +283,7 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('加载失败')
......@@ -298,6 +300,7 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('加载失败')
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
<Form
:model="formMyCheck"
:label-width="100"
:rules="ruleValidate"
inline
ref="formValidate"
>
<Form :model="formMyCheck" :label-width="100" :rules="ruleValidate" inline ref="formValidate">
<Row>
<Col span="18">
<FormItem label="审批意见:">
......@@ -20,44 +14,20 @@
<Radio label="终止"></Radio>
</RadioGroup>
</FormItem>
<FormItem
label="驳回节点:"
v-if="formMyCheck.radioSp === '驳回'"
prop="rejectToNodeId"
>
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.rejectToNodeId"
>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select style="width:200px" clearable transfer placeholder="请选择驳回节点" v-model="formMyCheck.rejectToNodeId">
<Option value class="option-text">请选择驳回节点</Option>
<Option
v-for="(item, index) in nodeList"
:value="item.value"
:label="item.label"
:key="index"
:disabled="item.statu > 0 ? false : true"
></Option>
<Option v-for="(item, index) in nodeList" :value="item.value" :label="item.label" :key="index" :disabled="item.statu > 0 ? false : true"></Option>
</Select>
<RadioGroup type="button" size="small" @on-change="changeToNode">
<Radio label="1">上一节点</Radio>
<Radio label="2">第一节点</Radio>
</RadioGroup>
</FormItem>
<FormItem
label="原因:"
v-if="
<FormItem label="原因:" v-if="
formMyCheck.radioSp === '驳回' || formMyCheck.radioSp === '终止'
"
prop="comment"
>
<Input
v-model="formMyCheck.comment"
style="width:400px;margin-left:10px"
placeholder="请输入原因"
/>
" prop="comment">
<Input v-model="formMyCheck.comment" style="width:400px;margin-left:10px" placeholder="请输入原因" />
</FormItem>
</Col>
<Col span="6" style="text-align:right;padding-right:40px">
......@@ -66,12 +36,7 @@
</Row>
</Form>
</div>
<Modal
v-model="modalCheckNo"
title="订单审批"
width="800"
:scrollable="true"
>
<Modal v-model="modalCheckNo" title="订单审批" width="800" :scrollable="true">
<br />
<h4>
您确定 <span class="new-red">{{ statuTitle }}</span> 此订单审批?
......@@ -82,8 +47,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -123,30 +89,29 @@ export default {
preNodeID: null, //上一个节点
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
ruleValidate: {
rejectToNodeId: [
{
rejectToNodeId: [{
required: true,
message: '请选择驳回节点',
type: 'number',
trigger: 'change'
}
],
comment: [
{
}],
comment: [{
required: true,
message: '请输入原因',
trigger: 'blur'
}
]
}]
}
}
},
props: {},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
created() {
this.currentUserId=this.$store.state.userInfo.userId
this.currentUserId = this.$store.state.userInfo.userId
this.detailId = this.$http.common.getquerystring('id')
this.footerStatu = this.$http.common.getquerystring('statu')
this.getDetailInfos(this.detailId)
......@@ -161,16 +126,14 @@ export default {
if (valid) {
this.modalCheckNo = true
this.statuTitle = '驳回'
} else {
}
} else {}
})
} else {
this.$refs['formValidate'].validate((valid) => {
if (valid) {
this.modalCheckNo = true
this.statuTitle = '终止'
} else {
}
} else {}
})
}
},
......@@ -182,8 +145,8 @@ export default {
Api.getdetail(param).then((r) => {
if (r.success) {
this.currentNodeID = r.result.currentNodeId
this.passId=r.result.currentRecordId
this.nextNodeUserIdList=this.$refs.userProcess.immutData//获取下一节点的审核人
this.passId = r.result.currentRecordId
this.nextNodeUserIdList = this.$refs.userProcess.immutData //获取下一节点的审核人
this.getNodes(r.result.nodes)
} else {
this.$Message.error('加载失败')
......@@ -230,13 +193,13 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.footerStatu=3
this.footerStatu = 3
} else {
this.$Message.error('审批通过失败')
}
})
this.modalCheckNo = false
this.footerStatu=3
this.footerStatu = 3
},
//审批驳回
checkNo() {
......@@ -249,7 +212,7 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.footerStatu=3
this.footerStatu = 3
} else {
this.$Message.error('加载失败')
}
......@@ -267,7 +230,7 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.footerStatu=3
this.footerStatu = 3
} else {
this.$Message.error('加载失败')
}
......
<style lang="less" scope>
<style lang="less">
@import "./shen.less";
</style>
<template>
<div class="Design">
<div class="Design">
<h3>{{ processTitle }}</h3>
<Divider />
<Timeline>
......@@ -27,29 +27,19 @@
<div v-if="index>cur">
<CheckboxGroup v-model="immutData">
<span>审批人:</span>
<Checkbox
v-for="(item1, index1) in item.defaultUsers.immutable"
:key="index1"
:label="item1"
:disabled="item.isFixed"
>
<Checkbox v-for="(item1, index1) in item.defaultUsers.immutable" :key="index1" :label="item1" :disabled="item.isFixed">
<User :value="item1" style="margin-right:5px;" />
</Checkbox>
</CheckboxGroup>
</div>
<div class="wait" v-else>
<span>审批人:</span>
<User
v-for="(item2, index2) in item.defaultUsers.immutable"
:key="index2"
:value="item2"
class="mr5"
/>
<User v-for="(item2, index2) in item.defaultUsers.immutable" :key="index2" :value="item2" class="mr5" />
</div>
<div style="width:98%" v-if="com(item.records).length>0">
<!-- <Table :columns="columns" border size="small" width="90%" :data="com(item.records)"></Table> -->
<p class="shen_row" v-for="(item3, index3) in item.records" :key="index3" :value="item3">
<User class="user_span" :value="item3.operatorId"/>
<User class="user_span" :value="item3.operatorId" />
<span class="plr row_time">{{item3.operationTime}}</span>
<state code="workflow.record.status" class="row_statu" :value="item3.status" type="text"></state>
<span class="plr remark" v-if="item3.remark">{{item3.remark}}</span>
......@@ -60,14 +50,18 @@
</div>
</TimelineItem>
</Timeline>
</div>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'process',
components: {},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
data() {
......@@ -78,8 +72,7 @@ export default {
dataImmut: [],
creatRows: [],
cur: 0,
columns: [
{
columns: [{
key: 'status',
title: '结果',
align: 'left',
......@@ -101,7 +94,11 @@ export default {
easy: true,
high: true,
render: (h, params) => {
return h('User', { attrs: { value: params.row.operatorId } })
return h('User', {
attrs: {
value: params.row.operatorId
}
})
}
},
{
......@@ -123,8 +120,11 @@ export default {
render: (h, params) => {
if (params.row.contextData.length > 2)
return h(
'a',
{ on: { click: () => this.edit(params.row) } },
'a', {
on: {
click: () => this.edit(params.row)
}
},
'详情'
)
return h('span', '')
......@@ -143,11 +143,16 @@ export default {
}
},
created() {
this.currentUserId=this.$store.state.userInfo.userId
this.currentUserId = this.$store.state.userInfo.userId
this.dataImmut = []
this.dataMut = []
Api.getdetail({ Id: this.idVal }).then((r) => {
this.load(this.idVal)
},
methods: {
load(v) {
Api.getdetail({
Id: v
}).then((r) => {
if (r.success) {
this.dataImmut = r.result.nodes
this.currentNodeId = r.result.currentNodeId
......@@ -159,12 +164,12 @@ export default {
};
// if(u.defaultUsers.mutable&&u.defaultUsers.mutable.length>0){
// u.defaultUsers.immutable=u.defaultUsers.immutable.concat(u.defaultUsers.mutable)
u.defaultUsers.immutable=u.defaultUsers.immutable||(u.defaultUsers.mutable)//审核人员bug
u.defaultUsers.immutable = u.defaultUsers.immutable || (u.defaultUsers.mutable) //审核人员bug
// }
})
if (this.dataImmut.length > this.cur + 1) {
// console.log("this.dataImmut[this.cur + 1]:",this.dataImmut[this.cur + 1],this.cur,this.dataImmut.length )
this.immutData = this.dataImmut[this.cur + 1].defaultUsers.immutable||(this.dataImmut[this.cur + 1].defaultUsers.mutable)//审核人员bug
this.immutData = this.dataImmut[this.cur + 1].defaultUsers.immutable || (this.dataImmut[this.cur + 1].defaultUsers.mutable) //审核人员bug
}
} else {
......@@ -172,8 +177,6 @@ export default {
}
})
},
methods: {
load(v) {},
type(i) {
if (i < this.cur) {
return 'primary'
......@@ -191,7 +194,7 @@ export default {
console.log(record)
},
com(items) {
if(items)
if (items)
return items.filter((u) => {
return [2, 3, 5, 6].indexOf(u.status) > -1
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment