Commit 92e1727d authored by renjintao's avatar renjintao

userProcess.load

parent 7d0b08b0
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
......@@ -14,39 +14,19 @@
</RadioGroup>
</FormItem>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.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">
......@@ -68,8 +48,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -111,30 +92,29 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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)
......@@ -148,16 +128,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 {}
})
}
},
......@@ -170,8 +148,8 @@ export default {
this.testObj = 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('加载失败')
......@@ -220,6 +198,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('审批通过失败')
......@@ -239,6 +218,7 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
......@@ -257,6 +237,7 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
......@@ -14,39 +14,19 @@
</RadioGroup>
</FormItem>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.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">
......@@ -68,8 +48,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -111,30 +92,29 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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)
......@@ -148,16 +128,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 {}
})
}
},
......@@ -170,8 +148,8 @@ export default {
this.testObj = 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('加载失败')
......@@ -220,6 +198,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('审批通过失败')
......@@ -239,6 +218,7 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
......@@ -257,6 +237,7 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
......@@ -14,39 +14,19 @@
</RadioGroup>
</FormItem>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.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">
......@@ -68,8 +48,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -111,30 +92,29 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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)
......@@ -148,16 +128,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 {}
})
}
},
......@@ -170,8 +148,8 @@ export default {
this.testObj = 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('加载失败')
......@@ -220,6 +198,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('审批通过失败')
......@@ -239,6 +218,7 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
......@@ -257,6 +237,7 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
......@@ -14,39 +14,19 @@
</RadioGroup>
</FormItem>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.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">
......@@ -68,8 +48,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from "../api";
import Detail from "./detail";
......@@ -111,26 +92,25 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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() {
......@@ -149,16 +129,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 {}
});
}
},
......@@ -221,6 +199,7 @@ export default {
Api.pass(param).then(r => {
if (r.success) {
this.$Message.success("审批通过成功");
this.$refs.userProcess.load(this.detailId);
this.modalCheckNo = false;
} else {
this.$Message.error("审批通过失败");
......@@ -240,6 +219,7 @@ export default {
Api.reject(param).then(r => {
if (r.success) {
this.$Message.success("驳回审批成功");
this.$refs.userProcess.load(this.detailId);
this.modalCheckNo = false;
} else {
this.$Message.error("加载失败");
......@@ -258,6 +238,7 @@ export default {
Api.terminate(param).then(r => {
if (r.success) {
this.$Message.success("终止审批成功");
this.$refs.userProcess.load(this.detailId);
this.modalCheckNo = false;
} else {
this.$Message.error("加载失败");
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
......@@ -14,39 +14,19 @@
</RadioGroup>
</FormItem>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.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">
......@@ -68,8 +48,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from "../api";
import Detail from "./detail";
......@@ -111,26 +92,25 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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() {
......@@ -149,16 +129,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 {}
});
}
},
......@@ -221,6 +199,7 @@ export default {
Api.pass(param).then(r => {
if (r.success) {
this.$Message.success("审批通过成功");
this.$refs.userProcess.load(this.detailId);
this.modalCheckNo = false;
} else {
this.$Message.error("审批通过失败");
......@@ -240,6 +219,7 @@ export default {
Api.reject(param).then(r => {
if (r.success) {
this.$Message.success("驳回审批成功");
this.$refs.userProcess.load(this.detailId);
this.modalCheckNo = false;
} else {
this.$Message.error("加载失败");
......@@ -258,6 +238,7 @@ export default {
Api.terminate(param).then(r => {
if (r.success) {
this.$Message.success("终止审批成功");
this.$refs.userProcess.load(this.detailId);
this.modalCheckNo = false;
} else {
this.$Message.error("加载失败");
......
......@@ -193,6 +193,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('审批通过失败')
......@@ -212,6 +213,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('加载失败')
......@@ -230,6 +232,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="审批意见:">
......@@ -19,44 +13,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">
......@@ -65,12 +35,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> 此工艺规程审批?
......@@ -81,8 +46,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -122,30 +88,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)
......@@ -160,16 +125,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 {}
})
}
},
......@@ -181,8 +144,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,6 +193,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('审批通过失败')
......@@ -248,6 +212,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('加载失败')
......@@ -265,6 +230,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" :resulstInfo="testObj"/>
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'">
<Form :model="formMyCheck" :label-width="100">
<Row>
......@@ -12,37 +12,15 @@
<Radio label="驳回"></Radio>
<!-- <Radio label="终止"></Radio> -->
</RadioGroup>
<Select
v-if="formMyCheck.radioSp === '驳回'"
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.rejectToNodeId"
>
<Select v-if="formMyCheck.radioSp === '驳回'" 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
v-if="formMyCheck.radioSp === '驳回'"
type="button"
size="small"
@on-change="changeToNode"
>
<RadioGroup v-if="formMyCheck.radioSp === '驳回'" type="button" size="small" @on-change="changeToNode">
<Radio label="1">上一节点</Radio>
<Radio label="2">第一节点</Radio>
</RadioGroup>
<Input
v-if="formMyCheck.radioSp === '驳回'"
v-model="formMyCheck.comment"
style="width:400px;margin-left:10px"
placeholder="请填写原因"/>
<Input v-if="formMyCheck.radioSp === '驳回'" v-model="formMyCheck.comment" style="width:400px;margin-left:10px" placeholder="请填写原因" />
</FormItem>
</Col>
<Col span="6" style="text-align:right;padding-right:40px">
......@@ -52,12 +30,7 @@
</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> 此材料消耗单审批?
......@@ -68,8 +41,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -84,7 +58,7 @@ export default {
},
data() {
return {
currentUserId:0,
currentUserId: 0,
formMyCheck: {
radioSp: '通过',
comment: '',
......@@ -108,15 +82,18 @@ export default {
firstNodeID: null, //第一个节点
preNodeID: null, //上一个节点
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj:{}
testObj: {}
}
},
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)
......@@ -128,11 +105,11 @@ export default {
if (this.formMyCheck.radioSp == '通过') {
this.checkOk()
} else if (this.formMyCheck.radioSp == '驳回') {
if(rejectToNode == null){
if (rejectToNode == null) {
this.$Message.error('请选择驳回节点')
return
}
if(commasge == ''){
if (commasge == '') {
this.$Message.error('请填写驳回原因')
return
}
......@@ -154,11 +131,11 @@ export default {
Id: idVal
}
Api.getdetail(param).then((r) => {
this.testObj=r
this.testObj = 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('加载失败')
......@@ -187,7 +164,6 @@ export default {
this.preNodeID = this.nodeList[0].value
}
},
changeToNode(val) {
if (val == '1') {
......@@ -207,6 +183,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('审批通过失败')
......@@ -224,6 +201,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('加载失败')
......@@ -240,6 +218,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('加载失败')
......@@ -255,7 +234,7 @@ export default {
// else if (this.formMyCheck.radioSp == '终止') {
// this.checkCancel()
// }
this.footerStatu=3
this.footerStatu = 3
},
l(key) {
key = 'MaterialPlacode' + '.' + key
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<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="审批意见:">
......@@ -19,44 +13,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">
......@@ -115,8 +85,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -158,30 +129,29 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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')
console.log(this.detailId)
......@@ -198,16 +168,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 {}
})
}
},
......@@ -220,8 +188,8 @@ export default {
this.testObj = 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('加载失败')
......@@ -263,7 +231,7 @@ export default {
let param = {
id: this.passId,
comment: '',
nextOperationIdList: this.nextNodeUserIdList,//this.nextNodeUserIdList
nextOperationIdList: this.nextNodeUserIdList, //this.nextNodeUserIdList
data: {}
}
console.log(param)
......@@ -271,7 +239,8 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.footerStatu=3
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
this.modalCheckNo = false
} else {
this.$Message.error('审批通过失败')
......@@ -291,7 +260,8 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.footerStatu=3
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('加载失败')
}
......@@ -309,7 +279,8 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.footerStatu=3
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" :resulstInfo="testObj" @node-click="show"/>
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" @node-click="show" />
<div class="footers" v-if="footerStatu === '2'">
<Form :model="formMyCheck" :label-width="150">
<Row>
......@@ -12,34 +12,16 @@
<Radio label="驳回"></Radio>
<!-- <Radio label="终止"></Radio> -->
</RadioGroup>
<Select
v-if="formMyCheck.radioSp === '驳回'"
style="width:200px" clearable ransfer
placeholder="请选择驳回节点" class="selectBox"
v-model="formMyCheck.rejectToNodeId">
<Select v-if="formMyCheck.radioSp === '驳回'" style="width:200px" clearable ransfer placeholder="请选择驳回节点" class="selectBox" 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
v-if="formMyCheck.radioSp === '驳回'"
type="button"
size="small"
@on-change="changeToNode">
<RadioGroup v-if="formMyCheck.radioSp === '驳回'" type="button" size="small" @on-change="changeToNode">
<Radio label="1">上一节点</Radio>
<Radio label="2">第一节点</Radio>
</RadioGroup>
<Input
v-if="formMyCheck.radioSp === '驳回' ||
formMyCheck.radioSp === '终止'"
v-model="formMyCheck.comment"
style="width:400px;margin-left:10px"
placeholder="请如如驳回原因"/>
<Input v-if="formMyCheck.radioSp === '驳回' ||
formMyCheck.radioSp === '终止'" v-model="formMyCheck.comment" style="width:400px;margin-left:10px" placeholder="请如如驳回原因" />
</FormItem>
</Col>
<Col span="6" style="text-align:right;padding-right:40px">
......@@ -49,18 +31,13 @@
</Form>
</div>
<!-- 不合格品通过form -->
<Modal
v-model="modalCheckOk"
title="不合格品审理"
width="800" :mask-closable="false"
:scrollable="true">
<Modal v-model="modalCheckOk" title="不合格品审理" width="800" :mask-closable="false" :scrollable="true">
<div v-if="showSize==2">
<Form :model="formMyCheck" ref="formMyCheck" :rules="ruleValidate" :label-width="150">
<Row>
<Col span="24">
<FormItem label="问题产生原因分析:" prop="causeAnalysis" style="width:100%">
<Input type="textarea" :autosize="{minRows: 1,maxRows: 5}" v-model="formMyCheck.causeAnalysis"
:disabled="disabledFlag" style="width: 600px"/>
<Input type="textarea" :autosize="{minRows: 1,maxRows: 5}" v-model="formMyCheck.causeAnalysis" :disabled="disabledFlag" style="width: 600px" />
</FormItem>
</Col>
<Col span="24">
......@@ -79,8 +56,7 @@
<Row>
<Col span="24">
<FormItem label="纠正措施:" prop="measures" style="width:100%">
<Input type="textarea" :autosize="{minRows: 1,maxRows: 5}" v-model="formMyCheck.measures"
:disabled="disabledFlag" style="width: 600px"/>
<Input type="textarea" :autosize="{minRows: 1,maxRows: 5}" v-model="formMyCheck.measures" :disabled="disabledFlag" style="width: 600px" />
</FormItem>
</Col>
<Col span="24">
......@@ -100,8 +76,7 @@
<Row>
<Col span="24">
<FormItem label="落实情况验证结果:" prop="resultText" style="width:100%">
<Input type="textarea" :autosize="{minRows:3,maxRows: 7}" v-model="formResultText.resultText"
:disabled="disabledFlag" style="width: 600px"/>
<Input type="textarea" :autosize="{minRows:3,maxRows: 7}" v-model="formResultText.resultText" :disabled="disabledFlag" style="width: 600px" />
</FormItem>
</Col>
</Row>
......@@ -112,10 +87,7 @@
<Button type="primary" @click="checkOk()" v-show="footerStatue">确定</Button>
</div>
</Modal>
<Modal
v-model="ResultModal"
title="测试步骤"
width="800" :scrollable="true">
<Modal v-model="ResultModal" title="测试步骤" width="800" :scrollable="true">
<div>
{{'第'+this.showSize+'布'}}
{{'id'+this.typeId}}
......@@ -125,11 +97,8 @@
<Button type="primary" @click="checkOk6">确定</Button>
</div>
</Modal>
<Modal
v-model="modalCheckNo"
title="不合格品审批"
width="800" :scrollable="true">
<br/>
<Modal v-model="modalCheckNo" title="不合格品审批" width="800" :scrollable="true">
<br />
<h4>
您确定 <span class="new-red">{{ statuTitle }}</span> 此不合格品审批?
</h4>
......@@ -139,8 +108,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -155,7 +125,7 @@ export default {
},
data() {
return {
currentUserId:0,
currentUserId: 0,
formMyCheck: {
radioSp: '通过',
comment: '',
......@@ -165,21 +135,46 @@ export default {
triaLevel: [], //审理级别
rejectToNodeId: null
},
formResultText:{resultText: ''},//落实情况
ResultModal: false,//落实情况
footerStatue: true,//详情隐藏确定
disabledFlag: false,//是否可用
stepeFlag: null,//审核flag
showSize:1,// 弹框默认展示内容
formResultText: {
resultText: ''
}, //落实情况
ResultModal: false, //落实情况
footerStatue: true, //详情隐藏确定
disabledFlag: false, //是否可用
stepeFlag: null, //审核flag
showSize: 1, // 弹框默认展示内容
ruleValidate: {
causeAnalysis: [{ required: true, message: '请填写原因分析', trigger: 'blur' }],
conclusion: [
{ required: true, type: 'array', min: 1, message: '至少选择一个审理结论', trigger: 'change' },
causeAnalysis: [{
required: true,
message: '请填写原因分析',
trigger: 'blur'
}],
conclusion: [{
required: true,
type: 'array',
min: 1,
message: '至少选择一个审理结论',
trigger: 'change'
},
// { type: 'array', max: 2, message: '最多选两个审理结论', trigger: 'change' }
],
measures: [{ required: true, message: '请填写纠正措施', trigger: 'blur' }],
resultText: [{ required: true, message: '请填写落实情况', trigger: 'blur' }],
triaLevel: [{ required: true, type: 'array', min: 1, message: '至少选择一个审理级别', trigger: 'change' }],
measures: [{
required: true,
message: '请填写纠正措施',
trigger: 'blur'
}],
resultText: [{
required: true,
message: '请填写落实情况',
trigger: 'blur'
}],
triaLevel: [{
required: true,
type: 'array',
min: 1,
message: '至少选择一个审理级别',
trigger: 'change'
}],
},
modalCheckOk: false,
modalCheckNo: false,
......@@ -191,21 +186,24 @@ export default {
getDetailProcess: [], //getdetail返回process信息
getDetailRecords: [], //getdetail返回当前records信息
passId: null, //通过审批/驳回/终止接口 id,
typeId: null,//审批节点
typeId: null, //审批节点
nodeList: [], //返回节点
currentNodeID: null, //当前节点
firstNodeID: null, //第一个节点
preNodeID: null, //上一个节点
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj:{}
testObj: {}
}
},
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)
......@@ -215,20 +213,19 @@ export default {
let rejectToNode = this.formMyCheck.rejectToNodeId
let commasge = this.formMyCheck.comment
if (this.formMyCheck.radioSp == '通过') {
if( this.typeId==2){
if (this.typeId == 2) {
this.modalCheckNo = true
this.statuTitle = '通过'
}
else{
} else {
this.footerStatue = true
this.modalCheckOk = true
}
} else if (this.formMyCheck.radioSp == '驳回') {
if(rejectToNode == null){
if (rejectToNode == null) {
this.$Message.error('请选择驳回节点')
return
}
if(commasge == ''){
if (commasge == '') {
this.$Message.error('请填写驳回原因')
return
}
......@@ -244,15 +241,15 @@ export default {
// this.statuTitle = '终止'
}
},
show(a){
show(a) {
this.disabledFlag = true
let contextDate = JSON.parse(a.contextData)
console.log(a)
if(contextDate.measures){
if (contextDate.measures) {
this.showSize = 2
this.stepeFlag = 2//第二步
this.stepeFlag = 2 //第二步
this.formMyCheck = contextDate
}else if(contextDate.resultText){
} else if (contextDate.resultText) {
this.showSize = 4
this.stepeFlag = 4
this.formResultText = contextDate
......@@ -274,7 +271,7 @@ export default {
this.passId = r.result.currentRecordId
this.typeId = r.result.currentIndexId
this.showSize = this.typeId + 1
this.nextNodeUserIdList=this.$refs.userProcess.immutData//获取下一节点的审核人
this.nextNodeUserIdList = this.$refs.userProcess.immutData //获取下一节点的审核人
this.getNodes(r.result.nodes)
} else {
this.$Message.error('加载失败')
......@@ -310,23 +307,23 @@ export default {
this.formMyCheck.rejectToNodeId = this.firstNodeID
}
},
cancelFn(){
cancelFn() {
this.modalCheckOk = false
this.formMyCheck.radioSp = '通过'
this.disabledFlag = false
if(this.stepeFlag = 2){
if (this.stepeFlag = 2) {
this.showSize = 4
}
},
cancelFn02(){
cancelFn02() {
this.ResultModal = false
},
checkOk6(){
checkOk6() {
this.ResultModal = false
},
//审批通过
checkOk() {
if(this.typeId==1){
if (this.typeId == 1) {
this.$refs['formMyCheck'].validate((valid) => {
// console.log(valid)
if (valid) {
......@@ -345,7 +342,8 @@ export default {
// console.log(param)
if (r.success) {
this.$Message.success('审批通过成功')
this.footerStatu=3
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('审批通过失败')
}
......@@ -355,9 +353,9 @@ export default {
console.log("审核不通过")
}
})
}else if(this.typeId==3){
} else if (this.typeId == 3) {
this.$refs['formResultText'].validate((valid) => {
if (valid){
if (valid) {
let param = {
id: this.passId,
comment: '',
......@@ -370,7 +368,8 @@ export default {
// console.log(param)
if (r.success) {
this.$Message.success('审批通过成功')
this.footerStatu=3
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('审批通过失败')
}
......@@ -391,6 +390,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('加载失败')
......@@ -407,6 +407,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('加载失败')
......@@ -415,7 +416,7 @@ export default {
})
},
// 通过
passFn(){
passFn() {
let param = {
id: this.passId,
comment: '',
......@@ -425,7 +426,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.footerStatu=3
this.footerStatu = 3
} else {
this.$Message.error('审批通过失败')
}
......@@ -436,13 +437,12 @@ export default {
checkFalse() {
if (this.formMyCheck.radioSp == '驳回') {
this.checkNo()
}else if(this.formMyCheck.radioSp == '通过'){
} else if (this.formMyCheck.radioSp == '通过') {
this.passFn()
}
else if (this.formMyCheck.radioSp == '终止') {
} else if (this.formMyCheck.radioSp == '终止') {
this.checkCancel()
}
this.footerStatu=3
this.footerStatu = 3
},
l(key) {
key = 'MaterialPlacode' + '.' + key
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" @node-click="show"/>
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" @node-click="show" />
<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="审批意见:">
......@@ -19,44 +13,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">
......@@ -112,11 +82,7 @@
</Row>
<Row>
<FormItem label="是否编写临时工艺">
<Select
v-model="formMyCheck.compilation_temporary_process"
placeholder="请选择"
style="width:225px;"
>
<Select v-model="formMyCheck.compilation_temporary_process" placeholder="请选择" style="width:225px;">
<Option value="是"></Option>
<Option value="否"></Option>
</Select>
......@@ -140,8 +106,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -160,12 +127,12 @@ export default {
formMyCheck: {
radioSp: '通过',
comment: '',
coordinate_results:'',
handling_suggestion:'',
change_design_file:'',
change_process_file:'',
close_situation:'',
compilation_temporary_process:'',
coordinate_results: '',
handling_suggestion: '',
change_design_file: '',
change_process_file: '',
close_situation: '',
compilation_temporary_process: '',
workHours: 0, //工时
printPeriod: 0, //打印周期
equipment: '', //设备
......@@ -173,12 +140,12 @@ export default {
rejectToNodeId: null
},
modalCheckOk: false,
modalCheckOk1:false,
modalCheckOk1: false,
modalCheckNo: false,
detailId: null,
statuTitle: '',
footerStatu: null, //是否显示footer
footerStatue:true,
footerStatue: true,
getDetailResults: [], //getdetail返回数据
getDetailResultOrder: [], //getdetail返回订单detail数据
getDetailProcess: [], //getdetail返回process信息
......@@ -191,30 +158,29 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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')
console.log(this.footerStatu)
......@@ -224,17 +190,13 @@ export default {
nextCheckOk() {
console.log(this.currentNodeID)
if (this.formMyCheck.radioSp == '通过') {
if(this.currentNodeID==165)
{
this.footerStatue=true
if (this.currentNodeID == 165) {
this.footerStatue = true
this.modalCheckOk = true
}
else if(this.currentNodeID==163)
{
this.footerStatue=true
} else if (this.currentNodeID == 163) {
this.footerStatue = true
this.modalCheckOk1 = true
}
else{
} else {
this.modalCheckNo = true
this.statuTitle = '通过'
}
......@@ -243,16 +205,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 {}
})
}
},
......@@ -265,8 +225,8 @@ export default {
this.testObj = 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('加载失败')
......@@ -311,8 +271,7 @@ export default {
// nextOperationIdList: this.nextNodeUserIdList,
// data: {}
}
if(this.currentNodeID==165)
{
if (this.currentNodeID == 165) {
if (!this.formMyCheck.close_situation) {
this.$Message.error('请填写闭环情况')
return
......@@ -325,9 +284,7 @@ export default {
close_situation: this.formMyCheck.close_situation
}
}
}
else if(this.currentNodeID==163)
{
} else if (this.currentNodeID == 163) {
if (!this.formMyCheck.coordinate_results) {
this.$Message.error('请填写协调结果')
return
......@@ -360,8 +317,7 @@ export default {
compilation_temporary_process: this.formMyCheck.compilation_temporary_process
}
}
}
else{
} else {
param = {
id: this.passId,
comment: '',
......@@ -374,7 +330,8 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.footerStatu=3
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
this.modalCheckNo = false
this.modalCheckOk = false
this.modalCheckOk1 = false
......@@ -396,7 +353,8 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.footerStatu=3
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('加载失败')
}
......@@ -414,7 +372,8 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.footerStatu=3
this.$refs.userProcess.load(this.detailId)
this.footerStatu = 3
} else {
this.$Message.error('加载失败')
}
......@@ -436,17 +395,14 @@ export default {
key = 'MaterialPlacode' + '.' + key
return this.$t(key)
},
show(a){
show(a) {
console.log(a)
this.footerStatue = false
let contextDate = JSON.parse(a.contextData)
this.formMyCheck = contextDate
if(a.nodeId==163)
{
if (a.nodeId == 163) {
this.modalCheckOk1 = true
}
else if(a.nodeId==165)
{
} else if (a.nodeId == 165) {
this.modalCheckOk = true
}
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
......@@ -14,39 +14,19 @@
</RadioGroup>
</FormItem>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.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">
......@@ -67,8 +47,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -110,30 +91,29 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
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)
......@@ -147,16 +127,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 {}
})
}
},
......@@ -169,8 +147,8 @@ export default {
this.testObj = 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('加载失败')
......@@ -219,6 +197,7 @@ export default {
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.$refs.userProcess.load(this.detailId)
this.modalCheckNo = false
} else {
this.$Message.error('审批通过失败')
......@@ -238,6 +217,7 @@ export default {
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.$refs.userProcess.load(this.detailId)
} else {
this.$Message.error('加载失败')
}
......@@ -255,6 +235,7 @@ export default {
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.$refs.userProcess.load(this.detailId)
} else {
this.$Message.error('加载失败')
}
......
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