publish2.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <div class="tv-container">
  3. <div class="container-box">
  4. <div>
  5. <div class="el-label"><i class="el-icon-collection-tag"></i>基本信息</div>
  6. <div class="el-line"></div>
  7. <baseTable ref="bTable" v-if="woNo" :woNo="woNo" step="15" @callBack="callBack"/>
  8. <div class="el-line"></div>
  9. <div class="el-label"><i class="el-icon-collection-tag"></i>上线</div>
  10. <div class="el-line"></div>
  11. <div>
  12. <el-row>
  13. <el-col :span="6">&nbsp;</el-col>
  14. <el-col :span="12">
  15. <el-form ref="form" :model="form" label-width="80px">
  16. <el-form-item label="备注信息">
  17. <el-input type="textarea" v-model="form.note"></el-input>
  18. </el-form-item>
  19. </el-form>
  20. </el-col>
  21. <el-col :span="6">&nbsp;</el-col>
  22. </el-row>
  23. </div>
  24. <div class="el-line"></div>
  25. <div class="el-label"></div>
  26. <div class="el-line"></div>
  27. <div style="text-align:right">
  28. <el-button type="primary" @click="handleAudit">确定</el-button>
  29. </div>
  30. </div>
  31. </div>
  32. <!--<fullscreen :fullscreen.sync="fullscreen" class="container"></fullscreen>-->
  33. </div>
  34. </template>
  35. <script>
  36. import baseTable from "./basePeerReview"
  37. export default {
  38. components:{ baseTable },
  39. data(){
  40. return{
  41. woNo:'',
  42. itemId:'',
  43. fullscreen:true,
  44. form:{note:""},
  45. assigneeNo:'',
  46. assigneeName:'',
  47. bpmInfo:{},
  48. puhlishFileList:[]
  49. }
  50. },
  51. methods:{
  52. callBack(itemId){
  53. this.itemId = itemId
  54. },
  55. completeTask(){
  56. if(this.assigneeNo===""){
  57. this.$message({ showClose: true, message:"数据异常",type: 'error'});
  58. return
  59. }
  60. //拼装参数
  61. let info={}
  62. info.params={
  63. "note":this.form.note,
  64. "itemId":this.itemId,
  65. "woNo":this.woNo,
  66. "assigneeNo":this.assigneeNo,
  67. "assigneeName":this.assigneeName,
  68. },
  69. info.taskId = this.bpmInfo.taskId
  70. info.woNo = this.bpmInfo.woNo
  71. info.stepId = this.bpmInfo.stepId
  72. info.procId = this.bpmInfo.procId
  73. info.procVersion = this.bpmInfo.procVersion
  74. //POST请求
  75. this.$http({
  76. url: "/bpm/api/submitTask",
  77. method: "post",
  78. headers: {"Content-Type": "application/json"},
  79. data:info
  80. }).then((res) => {
  81. if(res.data.result==0){
  82. this.$router.push({ path: '/tvIntroduction'});
  83. }else{
  84. this.$message({ showClose: true, message: res.data.desc,type: 'error'});
  85. }
  86. });
  87. },
  88. handleAudit(){
  89. //均给发起人
  90. this.$http({
  91. url: "/market/tvImport/beforePublish2",
  92. method: "post",
  93. headers: {"Content-Type": "application/json"},
  94. data:{"itemId":this.itemId,"woNo":this.woNo}
  95. }).then((res) => {
  96. if(res.data.result!==0){
  97. this.$message({ showClose: true, message: res.data.desc,type: 'error'});
  98. }else{
  99. this.$http({
  100. url: "/market/tvImport/basicInfo",
  101. method: "post",
  102. headers: {"Content-Type": "application/json"},
  103. data:{"itemId":this.itemId,"woNo":this.woNo}
  104. }).then((res) => {
  105. if(res.data.result==0){
  106. let user = res.data.body.imp
  107. if(null==user){
  108. this.$message({ showClose: true, message: "数据异常",type: 'error'});
  109. }else{
  110. this.assigneeNo = user.createLogin
  111. this.assigneeName = user.createLoginName
  112. this.completeTask()
  113. }
  114. }else{
  115. this.$message({ showClose: true, message: res.data.desc,type: 'error'});
  116. }
  117. });
  118. }
  119. });
  120. }
  121. },
  122. mounted(){
  123. this.woNo = this.$route.query.woNo
  124. this.bpmInfo.taskId = this.$route.query.taskId
  125. this.bpmInfo.woNo = this.woNo
  126. this.bpmInfo.stepId = this.$route.query.stepId
  127. this.bpmInfo.procId = this.$route.query.procId
  128. this.bpmInfo.procVersion = this.$route.query.procVersion
  129. }
  130. }
  131. </script>
  132. <style lang="scss" scoped>
  133. .tv-container{
  134. background-color: white;
  135. margin:15px 15px 15px 15px;
  136. padding:20px ;
  137. }
  138. .el-label{
  139. /*border-left:5px solid #0b82ff;*/
  140. /*padding-left:5px;*/
  141. color: #606266;
  142. border-bottom:1px dotted #bfc1c5;
  143. padding-bottom:5px;
  144. }
  145. .el-line{
  146. margin: 0px 0px 20px 0px;
  147. }
  148. </style>