apply.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view>
  3. <h3>修改报告请求说明</h3>
  4. <view class="centent">
  5. <u-input v-model="value" 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. },
  23. data() {
  24. return {
  25. value: '',
  26. userid: '',
  27. time: ''
  28. }
  29. },
  30. created() {
  31. this.getInit()
  32. },
  33. methods: {
  34. getInit() {
  35. let info = uni.getStorageSync(USER_INFO);
  36. if (info.employee.id) {
  37. this.userid = info.employee.id || ''
  38. }
  39. var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
  40. var time = nowDate.toJSON().split('T').join(' ').substr(0, 19)
  41. this.time = time
  42. },
  43. //提交
  44. getSave() {
  45. let pp = {
  46. paramWhere: [{
  47. id_: this.id
  48. }],
  49. tableName: "t_lhjcbgb",
  50. paramCond: {
  51. xiu_gai_bao_gao_b: this.value,
  52. update_time_: this.time,
  53. update_by_: this.userid
  54. }
  55. }
  56. let data = this.$sig(pp)
  57. this.$http.post("ibps/business/v3/sys/universal/updateDatasContextTable", data).then(res => {
  58. if (res.data.state == 200) {
  59. uni.showToast({
  60. title: '提交成功',
  61. icon: 'none',
  62. duration: 2000
  63. })
  64. this.$emit('saveSuccees')
  65. } else {
  66. uni.showToast({
  67. title: '提交失败',
  68. icon: 'none',
  69. duration: 2000
  70. })
  71. }
  72. });
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. h3 {
  79. text-align: center;
  80. margin: 30rpx 0;
  81. }
  82. .centent {
  83. margin: 30rpx;
  84. }
  85. .btn {
  86. margin-top: 30rpx;
  87. }
  88. </style>