12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <div>
- <el-radio-group v-model="current" size="mini">
- <el-radio-button class="my-width" label="detail">审核</el-radio-button>
- <el-radio-button class="my-width" label="record">操作记录</el-radio-button>
- </el-radio-group>
- <div v-show="current === 'detail'">
- <el-form disabled>
- <Base :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
- <Model :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
- </el-form>
- <Examine :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
- <div style="margin: 20px 0">
- <el-button type="primary" size="small" @click="onSbumit">提交</el-button>
- <el-button size="small" @click="handleBack">返回</el-button>
- </div>
- </div>
- <OperationRecords v-show="current === 'record'" :detail-id="detailId" />
- </div>
- </template>
- <script>
- import Base from '../components/base.vue'
- import Model from '../components/model.vue'
- import Examine from '../components/examine.vue'
- import Mixin from '../mixin'
- import { examineLoginFrock } from '@/api/frock'
- import OperationRecords from '../components/operationRecords.vue'
- export default {
- components: {
- Base,
- Model,
- Examine,
- OperationRecords
- },
- mixins: [Mixin],
- data() {
- return {
- current: 'detail'
- }
- },
- methods: {
- onSbumit() {
- const params = {
- ...this.formData,
- joinData : function () {
- this.joinAddress = (this.province || '') + (this.city || '') + (this.area || '') + (this.street || '') + (this.address || '')
- }
- }
- params.joinData()
- if (this.formData.files.length) {
- params.files = this.formData.files.map(k => {
- return {
- ...k,
- fileName: k.name,
- fileUrl: k.url
- }
- })
- }
- if (params.loginStatus === 'FAIL' && !params.projectNo) {
- this.$errorMsg('请填写项目编号')
- return
- }
- if (params.loginStatus === 'REJECT' && !params.examineNote) {
- this.$errorMsg('请填写审核备注')
- return
- }
- if (params.loginStatus === 'FAIL' && params.projectNo === params.successLoginProject) {
- this.$errorMsg('项目编号不能审核项目编号')
- return
- }
- examineLoginFrock(params).then(res => {
- this.commonFn('审核成功')
- })
- },
- commonFn(name) {
- this.$successMsg(name)
- this.handleBack()
- },
- handleBack() {
- this.$emit('updateList')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .my-width ::v-deep .el-radio-button__inner {
- width: 100px;
- }
- </style>
|