|
|
|
@ -29,7 +29,7 @@ |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<el-button @click="saveNext">{{ $t('page.business.study.studyFormFill.save') }}</el-button> |
|
|
|
<el-button type="primary" @click="openSubmit = true">{{ $t('page.business.study.studyFormFill.submit') |
|
|
|
<el-button type="primary" @click="showApprove">{{ $t('page.business.study.studyFormFill.submit') |
|
|
|
}}</el-button> |
|
|
|
<el-button type="primary" @click="pre">{{ $t('page.business.study.studyFormFill.pre') }}</el-button> |
|
|
|
</template> |
|
|
|
@ -40,9 +40,9 @@ |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item :label="$t('page.business.form.bdmb')" prop="templateId"> |
|
|
|
<SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" :name="form.templateMc" |
|
|
|
@change="selectTemplateChange" :needPre="1" /> |
|
|
|
<el-form-item :label="bdmbTitle" prop="templateId"> |
|
|
|
<SelectTemplate v-model="form.templateId" :disabled="form.id && form.id !== ''" |
|
|
|
:name="form.templateMc" @change="selectTemplateChange" :needPre="1" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -56,7 +56,8 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item :label="$t('page.business.study.studyFormFill.sfbl')" prop="sfbl"> |
|
|
|
<el-select v-model="form.sfbl" :placeholder="$t('form.placeholderSelect')" :disabled="form.id && form.id !== ''"> |
|
|
|
<el-select v-model="form.sfbl" :placeholder="$t('form.placeholderSelect')" |
|
|
|
:disabled="form.id && form.id !== ''"> |
|
|
|
<el-option :label="$t('page.business.study.studyFormFill.yes')" :value="10" /> |
|
|
|
<el-option :label="$t('page.business.study.studyFormFill.no')" :value="1" /> |
|
|
|
</el-select> |
|
|
|
@ -80,15 +81,64 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-dialog :title="$t('page.business.study.studyFormFill.tjjl')" :visible.sync="openSubmit" width="500px" |
|
|
|
<el-dialog :title="$t('page.business.study.studyFormFill.tjjl')" :visible.sync="openApprove" width="1200px" |
|
|
|
append-to-body :close-on-click-modal="false"> |
|
|
|
<el-form ref="formSubmit" :model="form" :rules="rulesApprove" label-width="120px"> |
|
|
|
todo |
|
|
|
<el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px"> |
|
|
|
<el-row> |
|
|
|
<el-col :psna="24"> |
|
|
|
<el-form-item> |
|
|
|
<el-checkbox v-model="showCz">处置</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :psna="24"> |
|
|
|
<el-form-item> |
|
|
|
<el-checkbox v-model="showCc">存储</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :psna="24"> |
|
|
|
<el-form-item> |
|
|
|
用量统计 |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item :label="$t('form.qmyy')" prop="qmyy"> |
|
|
|
<el-input type="text" :value="formApprove.qmyy" maxlength="50" disabled |
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item :label="$t('form.remark')" prop="remark"> |
|
|
|
<el-input type="textarea" v-model="formApprove.remark" :rows="5" maxlength="500" |
|
|
|
:placeholder="$t('form.placeholderInput')"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item :label="$t('form.signer')"> |
|
|
|
<el-input type="text" v-model="nickName" maxlength="50" disabled |
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item :label="$t('form.password')" prop="qmrmm"> |
|
|
|
<el-input type="password" v-model="formApprove.qmrmm" maxlength="20" |
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<!-- <div slot="footer" class="dialog-footer"> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="tj">{{ $t('form.confirm') }}</el-button> |
|
|
|
<el-button @click="openSubmit = false">{{ $t('form.cancel') }}</el-button> |
|
|
|
</div> --> |
|
|
|
<el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -107,25 +157,9 @@ export default { |
|
|
|
return { |
|
|
|
open: false, |
|
|
|
showIndex: 1, |
|
|
|
showCz: false, |
|
|
|
showCc: false, |
|
|
|
form: {}, |
|
|
|
openSubmit: false, |
|
|
|
rulesApprove: { |
|
|
|
qmrmm: [{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
fzrsh: [{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
shryId: [{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'blur' |
|
|
|
}] |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
bdmc: [{ |
|
|
|
required: true, |
|
|
|
@ -143,17 +177,67 @@ export default { |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
openApprove: false, |
|
|
|
formApprove: {}, |
|
|
|
bdmbTitle:this.$t('page.business.form.bdmb'), |
|
|
|
rulesApprove: { |
|
|
|
qmrmm: [{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'blur' |
|
|
|
}] |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'nickName','name' |
|
|
|
'nickName', 'name' |
|
|
|
]), |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getInfo() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getInfo() { |
|
|
|
let formId = this.$route.params.formId |
|
|
|
let studyId = this.$route.params.studyId |
|
|
|
let fromYt = this.$route.params.fromYt |
|
|
|
this.reset() |
|
|
|
if (parseInt(formId) > 0) { |
|
|
|
if (fromYt + '' == "10") { |
|
|
|
this.showIndex = 1 |
|
|
|
this.bdmbTitle=this.$t('page.business.study.studyFormFill.ytbd') |
|
|
|
} else { |
|
|
|
this.showIndex = 2 |
|
|
|
} |
|
|
|
this.$modal.loading() |
|
|
|
studyFormFill_info({ id: formId }).then(response => { |
|
|
|
this.form = response.data |
|
|
|
this.form.qmyy = '制作提交预制表单' |
|
|
|
this.$modal.closeLoading() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.showIndex = 1 |
|
|
|
this.form = _.merge({}, this.form, { stydyId: studyId }) |
|
|
|
} |
|
|
|
}, |
|
|
|
showApprove() { |
|
|
|
this.resetApprove() |
|
|
|
this.formApprove.id = this.form.id |
|
|
|
this.openApprove = true |
|
|
|
}, |
|
|
|
resetApprove() { |
|
|
|
this.formApprove = { |
|
|
|
id: null, |
|
|
|
qmyy: '填写并提交记录', |
|
|
|
remark: '', |
|
|
|
bdnr: '', |
|
|
|
resource: '', |
|
|
|
qmrmm: '', |
|
|
|
} |
|
|
|
this.resetForm("formApprove") |
|
|
|
}, |
|
|
|
pre() { |
|
|
|
this.showIndex = 1 |
|
|
|
}, |
|
|
|
@ -171,7 +255,12 @@ export default { |
|
|
|
this.form.templateSn = val.sn |
|
|
|
}, |
|
|
|
cancel() { |
|
|
|
this.$emit('close') |
|
|
|
let data = localStorage.getItem(this.$route.params.key) |
|
|
|
if (data && data != '') { |
|
|
|
let params = JSON.parse(data) |
|
|
|
const obj = { path: params.url } |
|
|
|
this.$tab.closeOpenPage(obj) |
|
|
|
} |
|
|
|
}, |
|
|
|
reset() { |
|
|
|
this.form = { |
|
|
|
@ -194,30 +283,13 @@ export default { |
|
|
|
selectDeptUserChange(val) { |
|
|
|
this.form.shryMc = val.name |
|
|
|
}, |
|
|
|
edit(row) { |
|
|
|
this.reset() |
|
|
|
if (row && row.id) { |
|
|
|
this.showIndex = 2 |
|
|
|
this.$modal.loading() |
|
|
|
studyFormFill_info({ id: row.id }).then(response => { |
|
|
|
this.form = response.data |
|
|
|
this.form.qmyy = '制作提交预制表单' |
|
|
|
this.open = true |
|
|
|
this.$modal.closeLoading() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.showIndex = 1 |
|
|
|
this.form = _.merge({}, this.form, row) |
|
|
|
this.open = true |
|
|
|
} |
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.$modal.loading() |
|
|
|
studyFormFill_bc(this.form).then(response => { |
|
|
|
this.$emit('close') |
|
|
|
this.$modal.closeLoading() |
|
|
|
this.cancel() |
|
|
|
}).finally(() => { |
|
|
|
this.$modal.closeLoading() |
|
|
|
}) |
|
|
|
@ -229,14 +301,14 @@ export default { |
|
|
|
this.form.bdnr = JSON.stringify(content) |
|
|
|
this.$modal.loading() |
|
|
|
studyFormFill_bc(this.form).then(response => { |
|
|
|
this.$emit('close') |
|
|
|
this.$modal.closeLoading() |
|
|
|
this.cancel() |
|
|
|
}).finally(() => { |
|
|
|
this.$modal.closeLoading() |
|
|
|
}) |
|
|
|
}, |
|
|
|
tj() { |
|
|
|
this.$refs["formSubmit"].validate(valid => { |
|
|
|
this.$refs["formApprove"].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.dotj() |
|
|
|
} |
|
|
|
@ -244,12 +316,12 @@ export default { |
|
|
|
}, |
|
|
|
async dotj() { |
|
|
|
let content = await this.$refs.templateTable.getFormData() |
|
|
|
this.form.bdnr = JSON.stringify(content) |
|
|
|
this.formApprove.bdnr = JSON.stringify(content) |
|
|
|
this.$modal.loading() |
|
|
|
studyFormFill_tj(this.form).then(response => { |
|
|
|
this.$emit('close') |
|
|
|
this.openSubmit = false |
|
|
|
studyFormFill_tj(this.formApprove).then(response => { |
|
|
|
this.openApprove = false |
|
|
|
this.$modal.closeLoading() |
|
|
|
this.cancel() |
|
|
|
}).finally(() => { |
|
|
|
this.$modal.closeLoading() |
|
|
|
}) |
|
|
|
|