ChangeClient.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <el-dialog
  3. :close-on-click-modal="false"
  4. :close-on-press-escape="false"
  5. :title="dialogTitle"
  6. :visible.sync="dialogVisible"
  7. top="50px"
  8. width="50%"
  9. >
  10. <el-card shadow="always" style="padding: 15px 5px 5px 15px">
  11. <div class="tabsdom">
  12. <el-form ref="form" :model="form" style="width: 100%;padding: 5px" label-width="100px">
  13. <el-row style="margin-top: 25px">
  14. <el-col style="padding-bottom: 10px" :span="24">
  15. <el-form-item label="原处理人">
  16. <el-select v-model="form.flowMainPushId" placeholder="请选择">
  17. <el-option
  18. v-for="item in findPushInfo"
  19. :key="item.value"
  20. :label="item.pushUserName"
  21. :value="item.id">
  22. </el-option>
  23. </el-select>
  24. </el-form-item>
  25. </el-col>
  26. <el-col style="padding-bottom: 10px" :span="24">
  27. <el-form-item label="新委托处理人">
  28. <user-select
  29. :default-select="selectList"
  30. :multiple="false"
  31. width="700"
  32. @selectValue="parentMethod"
  33. />
  34. </el-form-item>
  35. </el-col>
  36. </el-row>
  37. </el-form>
  38. </div>
  39. </el-card>
  40. <div slot="footer">
  41. <el-button @click="dialogVisible = false">取 消</el-button>
  42. <el-button type="primary" @click="confirmSubmit()">确 定</el-button>
  43. </div>
  44. </el-dialog>
  45. </template>
  46. <script>
  47. import UserSelect from '@/views/components/UserSelect'
  48. import Base from '@/views/base/base.vue'
  49. import BaseData from '@/views/base/baseData.vue'
  50. import {upload} from '@/static/utils/channel'
  51. export default {
  52. name: 'ApplyPay',
  53. components: {
  54. UserSelect
  55. },
  56. mixins: [Base, BaseData],
  57. data() {
  58. return {
  59. findPushInfo: [],
  60. dialogVisible: false,
  61. form: {},
  62. fileError: false,
  63. fileList: [],
  64. selectList: [],
  65. value1: [],
  66. ProjectData: [
  67. {name: '年假(剩余x天)', type: 'year'},
  68. {name: '事假(剩余x小时)', type: 'affair'},
  69. {name: '病假', type: 'illness'}
  70. ],
  71. dialogTitle: '变更委托人',
  72. }
  73. },
  74. methods: {
  75. uploadFile(param) {
  76. upload(param, true).then((res) => {
  77. this.form.fileUrlList.push(res)
  78. })
  79. },
  80. parentMethod: function (val) {
  81. if (val.length > 0) {
  82. console.log(val)
  83. this.form.pushEntrustId = val.join(',')
  84. }
  85. },
  86. async setVisible(status, row) {
  87. this.dialogVisible = status
  88. const {data: findPushInfo} = await this.baseRequest1('FlowMainController', 'findPushInfoByFlowMainId', {flowMainid: row.id})
  89. this.findPushInfo = findPushInfo
  90. this.form.flowMainPushId = findPushInfo[0].id
  91. },
  92. async confirmSubmit() {
  93. if (!this.form.pushEntrustId || this.form.pushEntrustId.length == 0) return this.$message.warning("请选择新的委托人")
  94. const {data: data} = await this.baseRequest1('FlowMainController', 'topEntrustOperate', {...this.form})
  95. if (data.code == 200) {
  96. this.$message.success('委托人变更成功')
  97. this.dialogVisible = false
  98. this.$emit("getData")
  99. } else {
  100. this.$message.warning(data.msg)
  101. }
  102. },
  103. baseRequest1(prefix, opUrl, postData) {
  104. return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
  105. },
  106. }
  107. }
  108. </script>
  109. <style lang="scss">
  110. .ml5 {
  111. margin-left: 5px;
  112. }
  113. .tabsdom {
  114. .el-tabs__header {
  115. text-align: center !important;
  116. width: 139px !important;
  117. text-align: center !important;
  118. display: block !important;
  119. margin: auto !important;
  120. margin-bottom: 15px !important;
  121. }
  122. .el-tabs__nav-wrap::after {
  123. display: none;
  124. }
  125. .el-upload {
  126. width: 100%;
  127. }
  128. }
  129. </style>