changeClient.vue 3.7 KB

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