changeClient.vue 3.2 KB

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