apply.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view>
  3. <h3>请求退回说明</h3>
  4. <view class="centent">
  5. <u-input v-model="content" type="textarea" :border="true" height="200" />
  6. <u-button type="error" class="btn" @click="getSave">提交申请</u-button>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import {
  12. ACCESS_TOKEN,
  13. USER_NAME,
  14. USER_INFO
  15. } from "@/common/util/constants"
  16. export default {
  17. props: {
  18. id: {
  19. type: String,
  20. default: ''
  21. },
  22. value: {
  23. type: String,
  24. default: ''
  25. }
  26. },
  27. data() {
  28. return {
  29. // value: '',
  30. content: this.value,
  31. userid: '',
  32. time: ''
  33. }
  34. },
  35. created() {
  36. this.getInit()
  37. },
  38. methods: {
  39. getInit() {
  40. let info = uni.getStorageSync(USER_INFO);
  41. if (info.employee.id) {
  42. this.userid = info.employee.id || ''
  43. }
  44. var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
  45. var time = nowDate.toJSON().split('T').join(' ').substr(0, 19)
  46. this.time = time
  47. },
  48. //提交
  49. getSave() {
  50. let pp = {
  51. paramWhere: [{
  52. id_: this.id
  53. }],
  54. tableName: "t_lhwtsqb",
  55. paramCond: {
  56. xiu_gai_bei_zhu_: this.content,
  57. update_time_: this.time,
  58. update_by_: this.userid
  59. }
  60. }
  61. let data = this.$sig(pp)
  62. this.$http.post("ibps/business/v3/sys/universal/updateDatasContextTable", data).then(res => {
  63. if (res.data.state == 200) {
  64. this.getFullAll()
  65. uni.showToast({
  66. title: '提交成功',
  67. icon: 'none',
  68. duration: 2000
  69. })
  70. this.$emit('saveSuccees')
  71. } else {
  72. uni.showToast({
  73. title: '提交失败',
  74. icon: 'none',
  75. duration: 2000
  76. })
  77. }
  78. });
  79. },
  80. // 清理缓存
  81. getFullAll() {
  82. this.$http.post("ibps/business/v3/form/cache/system/flushAll", {}).then(res => {
  83. })
  84. }
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. h3 {
  90. text-align: center;
  91. margin: 30rpx 0;
  92. }
  93. .centent {
  94. margin: 30rpx;
  95. }
  96. .btn {
  97. margin-top: 30rpx;
  98. }
  99. </style>