|
|
@ -23,8 +23,45 @@ G |
|
|
</div> |
|
|
</div> |
|
|
<div class="right-top"> |
|
|
<div class="right-top"> |
|
|
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button> |
|
|
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button> |
|
|
<el-button @click="save">暂存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="next">下一步</el-button> |
|
|
|
|
|
|
|
|
<template v-if="showIndex == 1"> |
|
|
|
|
|
<el-button @click="save">暂存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="next">下一步</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-else> |
|
|
|
|
|
<el-button @click="save">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="tj">提交</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="edit-content "> |
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="showIndex == 1"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.form.xtmbmc')" prop="templateId"> |
|
|
|
|
|
<el-input type="text" v-model="form.templateId" maxlength="50" |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.form.bdmc')" prop="bdmc"> |
|
|
|
|
|
<el-input type="text" v-model="form.bdmc" maxlength="50" :placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item label="表单说明" prop="bdsm"> |
|
|
|
|
|
<el-input type="textarea" v-model="form.bdsm" :rows="5" maxlength="500" |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<div v-else> |
|
|
|
|
|
表单详情todo |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -32,7 +69,7 @@ G |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { studyFormPre_bj, studyFormPre_tj } from "@/api/business/study/studyFormPre" |
|
|
|
|
|
|
|
|
import { studyFormPre_bc, studyFormPre_tj } from "@/api/business/study/studyFormPre" |
|
|
import { mapGetters } from 'vuex' |
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
@ -41,48 +78,20 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
open: false, |
|
|
open: false, |
|
|
|
|
|
showIndex: 1, |
|
|
form: {}, |
|
|
form: {}, |
|
|
rules: { |
|
|
rules: { |
|
|
mc: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
bh: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
nd: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
nddw: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
sxrq: [{ |
|
|
|
|
|
|
|
|
bdmc: [{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'blur' |
|
|
trigger: 'blur' |
|
|
}], |
|
|
}], |
|
|
cctj: [{ |
|
|
|
|
|
|
|
|
templateId: [{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'blur' |
|
|
trigger: 'blur' |
|
|
}], |
|
|
|
|
|
ccwz: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
qmrmm: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -94,6 +103,13 @@ export default { |
|
|
created() { |
|
|
created() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
next() { |
|
|
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
this.showIndex = 2 |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
cancel() { |
|
|
cancel() { |
|
|
this.$emit('close') |
|
|
this.$emit('close') |
|
|
}, |
|
|
}, |
|
|
@ -112,20 +128,27 @@ export default { |
|
|
}, |
|
|
}, |
|
|
edit(row) { |
|
|
edit(row) { |
|
|
this.reset() |
|
|
this.reset() |
|
|
if (row) { |
|
|
|
|
|
this.form = row |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.showIndex = 1 |
|
|
|
|
|
this.form = row |
|
|
this.open = true |
|
|
this.open = true |
|
|
}, |
|
|
}, |
|
|
save() { |
|
|
save() { |
|
|
this.$refs["form"].validate(valid => { |
|
|
this.$refs["form"].validate(valid => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
bj(this.form).then(response => { |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.$emit('callback') |
|
|
|
|
|
|
|
|
this.$modal.loading() |
|
|
|
|
|
studyFormPre_bc(this.form).then(response => { |
|
|
|
|
|
this.$emit('close') |
|
|
|
|
|
this.$modal.closeLoading() |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
tj() { |
|
|
|
|
|
this.$modal.loading() |
|
|
|
|
|
studyFormPre_tj(this.form).then(response => { |
|
|
|
|
|
this.$emit('close') |
|
|
|
|
|
this.$modal.closeLoading() |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|