cpm-contract-check.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <sd-webflow ref="webflow" :validate-form="validForm">
  3. <template v-slot:form="{ model, FlowData }">
  4. <sd-form-by-builder
  5. ref="builderform"
  6. :form-data="initDaF(FlowData.processFormData)"
  7. :keep-hidden-cell="false"
  8. />
  9. </template>
  10. </sd-webflow>
  11. </template>
  12. <script>
  13. import moment from 'moment'
  14. import { getUserInfo } from '@/common/store-mixin'
  15. import components from './_import-components/cpm-contract-check-import'
  16. export default {
  17. name: 'CpmContractCheck',
  18. metaInfo: {
  19. title: 'CpmContractCheck',
  20. },
  21. components,
  22. data() {
  23. return {}
  24. },
  25. created() {
  26. this.initData()
  27. },
  28. methods: {
  29. validForm() {
  30. this.$refs.webflow.setFieldValue('JBXX', 'true')
  31. this.$refs.webflow.setFieldValue('FLHGBYJ', 'true')
  32. return new Promise((resolve, reject) => {
  33. resolve(true)
  34. })
  35. },
  36. initDaF(array) {
  37. if (array) {
  38. array.attrFD.keepHiddenCell = false
  39. }
  40. return array
  41. },
  42. initData() {
  43. setTimeout(() => {
  44. if (this.$refs.webflow.flowData.processActiveLogInfo.length > 0) {
  45. const stepId = this.$refs.webflow.flowData.processActiveLogInfo[0].stepId
  46. if (stepId === 'G_1_CPM_CONTRACT_CHECK.4') {
  47. this.$refs.webflow.setFieldValue('LAW_EDIT_ID', getUserInfo().id)
  48. this.$refs.webflow.setFieldValue('LAW_EDIT_ACCOUNT', getUserInfo().account)
  49. this.$refs.webflow.setFieldValue('LAW_EDIT_NAME', getUserInfo().name)
  50. this.$refs.webflow.setFieldValue('LAW_EDIT_TIME', moment(new Date()))
  51. }
  52. }
  53. })
  54. },
  55. },
  56. }
  57. </script>
  58. <style module lang="scss">
  59. @use '@/common/design' as *;
  60. </style>