examine.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div>
  3. <el-form disabled>
  4. <Base :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
  5. <Model :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
  6. </el-form>
  7. <Examine :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
  8. <div style="margin: 20px 0">
  9. <el-button type="primary" size="small" @click="onSbumit">提交</el-button>
  10. <el-button size="small" @click="handleBack">返回</el-button>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. import Base from '../components/base.vue'
  16. import Model from '../components/model.vue'
  17. import Examine from '../components/examine.vue'
  18. import Mixin from '../mixin'
  19. import { examineLoginFrock } from '@/api/frock'
  20. export default {
  21. components: {
  22. Base,
  23. Model,
  24. Examine
  25. },
  26. mixins: [Mixin],
  27. methods: {
  28. onSbumit() {
  29. const params = {
  30. ...this.formData,
  31. orderStatus: 'OK'
  32. }
  33. if (params.loginStatus === 'FAIL' && !params.projectNo) {
  34. this.$errorMsg('请填写项目编号')
  35. return
  36. }
  37. if (params.loginStatus === 'REJECT' && !params.examineNote) {
  38. this.$errorMsg('请填写审核备注')
  39. return
  40. }
  41. examineLoginFrock(params).then(res => {
  42. this.commonFn('审核成功')
  43. })
  44. },
  45. commonFn(name) {
  46. this.$successMsg(name)
  47. this.handleBack()
  48. },
  49. handleBack() {
  50. this.$emit('updateList')
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="scss" scoped></style>