reviewSummary.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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 v-if="woNo" :woNo="woNo" step="5" @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-radio v-model="audit2" label="Y">通过</el-radio>
  18. <el-radio v-model="audit2" label="N">结束</el-radio>
  19. </el-form-item>
  20. <el-form-item label="备注信息">
  21. <el-input type="textarea" v-model="form.note"></el-input>
  22. </el-form-item>
  23. </el-form>
  24. </el-col>
  25. <el-col :span="6">&nbsp;</el-col>
  26. </el-row>
  27. </div>
  28. <div class="el-line"></div>
  29. <div class="el-label"></div>
  30. <div class="el-line"></div>
  31. <div style="text-align:right">
  32. <el-button type="primary" @click="handleAudit">确定</el-button>
  33. </div>
  34. </div>
  35. </div>
  36. <!--<fullscreen :fullscreen.sync="fullscreen" class="container"></fullscreen>-->
  37. <el-dialog
  38. title="请选择"
  39. :visible.sync="userDlgVisual"
  40. width="30%"
  41. :modal-append-to-body="false"
  42. :close-on-click-modal="false"
  43. :before-close="handleClose">
  44. <div>
  45. <el-radio v-for="user in userList " v-model="assigneeNo" :key="user.loginNoStr" :label="user.loginNoStr">{{user.loginNameStr}}</el-radio>
  46. </div>
  47. <span slot="footer" class="dialog-footer">
  48. <el-button @click="userDlgVisual = false">取 消</el-button>
  49. <el-button type="primary" @click="checkSelectUser">确 定</el-button>
  50. </span>
  51. </el-dialog>
  52. </div>
  53. </template>
  54. <script>
  55. import baseTable from "./basePeerReview"
  56. export default {
  57. components:{ baseTable },
  58. data(){
  59. return{
  60. woNo:'',
  61. itemId:'',
  62. fullscreen:true,
  63. form:{note:""},
  64. audit2:'Y',
  65. extendInfo:'',
  66. assigneeNo:'',
  67. assigneeName:'',
  68. bpmInfo:{},
  69. userList:[],
  70. userDlgVisual:false
  71. }
  72. },
  73. methods:{
  74. callBack(itemId){
  75. this.itemId = itemId
  76. },
  77. completeTask(){
  78. if(this.assigneeNo===""){
  79. this.$message({ showClose: true, message:"数据异常",type: 'error'});
  80. return
  81. }
  82. //拼装参数
  83. let info={}
  84. info.params={
  85. "note":this.form.note,
  86. "itemId":this.itemId,
  87. "woNo":this.woNo,
  88. "assigneeNo":this.assigneeNo,
  89. "assigneeName":this.assigneeName,
  90. "audit2":this.audit2,
  91. "extendInfo":this.extendInfo
  92. },
  93. info.taskId = this.bpmInfo.taskId
  94. info.woNo = this.bpmInfo.woNo
  95. info.stepId = this.bpmInfo.stepId
  96. info.procId = this.bpmInfo.procId
  97. info.procVersion = this.bpmInfo.procVersion
  98. //POST请求
  99. this.$http({
  100. url: "/bpm/api/submitTask",
  101. method: "post",
  102. headers: {"Content-Type": "application/json"},
  103. data:info
  104. }).then((res) => {
  105. if(res.data.result==0){
  106. this.$router.push({ path: '/tvIntroduction'});
  107. }else{
  108. this.$message({ showClose: true, message: res.data.desc,type: 'error'});
  109. }
  110. });
  111. },
  112. handleAudit(){
  113. this.$http({
  114. url: "/market/tvImport/beforeReviewSummary",
  115. method: "post",
  116. headers: {"Content-Type": "application/json"},
  117. data:{"itemId":this.itemId,"woNo":this.woNo}
  118. }).then((res) => {
  119. if(res.data.result==0){
  120. let has85 = res.data.body.has85;
  121. if(has85==='N'){
  122. this.audit2 = 'N';
  123. this.extendInfo = '无超过85分的记录'
  124. }
  125. let user = res.data.body.user
  126. if(null==user || user.length==0){
  127. this.$message({ showClose: true, message: "数据异常",type: 'error'});
  128. }else{
  129. if(user.length==1){
  130. this.assigneeNo = user[0].loginNoStr
  131. this.assigneeName = user[0].loginNameStr
  132. this.completeTask()
  133. }else{
  134. this.userList = user;
  135. this.userDlgVisual = true;
  136. }
  137. }
  138. }else{
  139. this.$message({ showClose: true, message: res.data.desc,type: 'error'});
  140. }
  141. });
  142. },
  143. checkSelectUser(){
  144. if(this.assigneeNo===''){
  145. this.$message.error('请选择下一步处理人');
  146. return
  147. }
  148. //
  149. this.userList.forEach((e)=>{
  150. if(e.loginNoStr === this.assigneeNo){
  151. this.assigneeName = e.loginNameStr
  152. }
  153. });
  154. //
  155. this.userDlgVisual = false
  156. this.completeTask()
  157. },
  158. handleClose(){
  159. this.userDlgVisual = false
  160. }
  161. },
  162. mounted(){
  163. this.woNo = this.$route.query.woNo
  164. this.bpmInfo.taskId = this.$route.query.taskId
  165. this.bpmInfo.woNo = this.woNo
  166. this.bpmInfo.stepId = this.$route.query.stepId
  167. this.bpmInfo.procId = this.$route.query.procId
  168. this.bpmInfo.procVersion = this.$route.query.procVersion
  169. }
  170. }
  171. </script>
  172. <style lang="scss" scoped>
  173. .tv-container{
  174. background-color: white;
  175. margin:15px 15px 15px 15px;
  176. padding:20px ;
  177. }
  178. .el-label{
  179. /*border-left:5px solid #0b82ff;*/
  180. /*padding-left:5px;*/
  181. color: #606266;
  182. border-bottom:1px dotted #bfc1c5;
  183. padding-bottom:5px;
  184. }
  185. .el-line{
  186. margin: 0px 0px 20px 0px;
  187. }
  188. </style>