This commit is contained in:
zhutianqi
2021-11-01 11:00:29 +08:00
parent d4b7ae43a0
commit a6cea513bd
6 changed files with 135 additions and 64 deletions
@@ -392,7 +392,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { saveTaskFirst,inboundLiaisonDetail } from "api/process";
import { saveTaskFirst,inboundLiaisonDetail,queryTaskFirst } from "api/process";
export default {
name: "zcchStep1-1",
@@ -484,32 +484,45 @@
},
methods: {
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
if (this.$route.query.bpnId) {
queryTaskFirst({
bpnId: this.$route.query.bpnId
}).then(res => {
let data = JSON.parse(res.mesg)
this.json = data
this.data1 = data.data1
this.data2 = data.data2
this.rhform.commentText = data.commentText
this.rhform.content = data.content
this.rhform.price = data.price
this.rhform.time = data.time
this.rhform.title = data.title
this.rhform.Company = data.Company
this.rhform.place = data.place
this.rhform.time2 = data.time2
this.rhform.modelList = data.modelList
this.rhform.modelNameList = data.modelNameList
this.roleForm.ministerId = data.ministerId
this.roleForm.ministerIdName = data.ministerIdName
this.roleForm.presidentId = data.presidentId
this.roleForm.presidentIdName = data.presidentIdName
}).catch(e => {
let mes = JSON.parse(res.mes)
this.rhform = mes.form
this.data1 = mes.data1
this.data2 = mes.data2
this.roleForm = mes.roleForm
this.commentText = mes.commentText
})
})
} else {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
this.json = data
this.data1 = data.data1
this.data2 = data.data2
this.rhform.commentText = data.commentText
this.rhform.content = data.content
this.rhform.price = data.price
this.rhform.time = data.time
this.rhform.title = data.title
this.rhform.Company = data.Company
this.rhform.place = data.place
this.rhform.time2 = data.time2
this.rhform.modelList = data.modelList
this.rhform.modelNameList = data.modelNameList
this.roleForm.ministerId = data.ministerId
this.roleForm.ministerIdName = data.ministerIdName
this.roleForm.presidentId = data.presidentId
this.roleForm.presidentIdName = data.presidentIdName
}).catch(e => {
})
})
}
},
add1() {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
@@ -664,6 +664,26 @@
this.foldFormFlag = !this.foldFormFlag
}, // 基础信息显隐
handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '18')
_formData.append('json', JSON.stringify({
form: this.rhform,
roleForm: this.roleForm,
commentText: this.commentText,
data1: this.data1,
data2: this.data2
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
}, // 保存事件
handleSubmit() {
this.$refs['rhForm'].validate((valid) => {
@@ -381,7 +381,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { saveTaskFirst,inboundLiaisonDetail } from "api/process";
import { saveTaskFirst,inboundLiaisonDetail,queryTaskFirst } from "api/process";
export default {
name: "zcrhStep1",
@@ -463,31 +463,44 @@
},
methods: {
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
if (this.$route.query.bpnId) {
queryTaskFirst({
bpnId: this.$route.query.bpnId
}).then(res => {
let data = JSON.parse(res.mesg)
this.json = data
this.data1 = data.data1
this.data2 = data.data2
this.rhform.commentText = data.commentText
this.rhform.content = data.content
this.rhform.price = data.price
this.rhform.time = data.time
this.rhform.title = data.title
this.rhform.modelList = data.modelList
this.rhform.modelNameList = data.modelNameList
this.roleForm.inspectorId = data.inspectorId
this.roleForm.inspectorIdName = data.inspectorIdName
this.roleForm.ministerId = data.ministerId
this.roleForm.ministerIdName = data.ministerIdName
this.roleForm.presidentId = data.presidentId
this.roleForm.presidentIdName = data.presidentIdName
}).catch(e => {
let mes = JSON.parse(res.mes)
this.rhform = mes.form
this.data1 = mes.data1
this.data2 = mes.data2
this.roleForm = mes.roleForm
this.commentText = mes.commentText
})
})
} else {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
let data = JSON.parse(res.mesg)
this.json = data
this.data1 = data.data1
this.data2 = data.data2
this.rhform.commentText = data.commentText
this.rhform.content = data.content
this.rhform.price = data.price
this.rhform.time = data.time
this.rhform.title = data.title
this.rhform.modelList = data.modelList
this.rhform.modelNameList = data.modelNameList
this.roleForm.inspectorId = data.inspectorId
this.roleForm.inspectorIdName = data.inspectorIdName
this.roleForm.ministerId = data.ministerId
this.roleForm.ministerIdName = data.ministerIdName
this.roleForm.presidentId = data.presidentId
this.roleForm.presidentIdName = data.presidentIdName
}).catch(e => {
})
})
}
},
add1() {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
@@ -643,6 +643,26 @@
this.foldFormFlag = !this.foldFormFlag
}, // 基础信息显隐
handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '17')
_formData.append('json', JSON.stringify({
form: this.rhform,
roleForm: this.roleForm,
commentText: this.commentText,
data1: this.data1,
data2: this.data2
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
}, // 保存事件
handleSubmit() {
this.$refs['rhForm'].validate((valid) => {
@@ -172,21 +172,6 @@
</div>
</el-card>
</el-col>
<el-col :span="size ? 6 : 8">
<el-card shadow="hover">
<div class="card-box" @click="handleCreateProcess('19')">
<div class="card-top">
<div class="card-top-left">
<img :src="getImg(Math.floor(Math.random() * 6))">
</div>
<div class="card-top-right">
<div class="card-top-right-text">政策课题会后流程</div>
<div class="card-top-right-line"></div>
</div>
</div>
</div>
</el-card>
</el-col>
<el-col :span="size ? 6 : 8">
<el-card shadow="hover">
<div class="card-box" @click="handleCreateProcess('16')">
@@ -389,6 +389,26 @@ export default {
}
})
break
case '17':
this.$router.push({
name: 'zcrhStep1-1',
query: {
type: '17',
processName: '政策课题入会流程',
bpnId: id
}
})
break
case '18':
this.$router.push({
name: 'zcchStep1-1',
query: {
type: '18',
processName: '政策课题参会流程',
bpnId: id
}
})
break
}
},
...mapMutations(['setProcess', 'setHandleInfo']),