|
|
|
@ -88,18 +88,95 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :psna="24"> |
|
|
|
<el-form-item> |
|
|
|
<el-checkbox v-model="showCz">处置</el-checkbox> |
|
|
|
{{ formApprove.resource }} |
|
|
|
<div><el-checkbox v-model="formApprove.sfcz" @change="sfczChange">{{ |
|
|
|
$t('page.business.study.studyFormFill.cz') }}</el-checkbox> |
|
|
|
<el-button type="primary" v-if="formApprove.sfcz" @click="addCz" style="margin-left: 10px;">{{ |
|
|
|
$t('page.business.study.studyFormFill.tjcz') }}</el-button> |
|
|
|
</div> |
|
|
|
<template v-if="formApprove.sfcz"> |
|
|
|
<div v-if="czlist.length > 0"> |
|
|
|
<el-card class="box-card" v-for="(citem, cindex) in czlist" :key="'cz' + cindex" |
|
|
|
style="margin-top: 10px;"> |
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
<div style="display: flex;justify-content: space-between;"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div> 处置方式:</div> |
|
|
|
<div> |
|
|
|
<BusinessSelect v-model="citem.czfs" dictType="business_czfs" style="width: 200px;"> |
|
|
|
</BusinessSelect> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="danger" icon="el-icon-delete" circle @click="delcz(cindex)"></el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-checkbox-group v-model="citem.list"> |
|
|
|
<el-checkbox :label="item.bh" v-for="item in resource" :key="'icz' + item.bh" |
|
|
|
:disabled="getDisabledCz(item.bh, cindex)"></el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :psna="24"> |
|
|
|
<el-form-item> |
|
|
|
<el-checkbox v-model="showCc">存储</el-checkbox> |
|
|
|
<div><el-checkbox v-model="formApprove.sfcc" @change="sfccChange">{{ |
|
|
|
$t('page.business.study.studyFormFill.cc') }}</el-checkbox> |
|
|
|
<el-button type="primary" v-if="formApprove.sfcc" @click="addCc" style="margin-left: 10px;">{{ |
|
|
|
$t('page.business.study.studyFormFill.tjcc') }}</el-button> |
|
|
|
</div> |
|
|
|
<template v-if="formApprove.sfcc"> |
|
|
|
<div v-if="cclist.length > 0"> |
|
|
|
<el-card class="box-card" v-for="(citem, cindex) in cclist" :key="'cz' + cindex" |
|
|
|
style="margin-top: 10px;"> |
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
<div style="display: flex;justify-content: space-between;"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div> 存储条件:</div> |
|
|
|
<div> |
|
|
|
<BusinessSelect v-model="citem.cctj" dictType="business_cctj" style="width: 200px;"> |
|
|
|
</BusinessSelect> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="display: flex; margin-left: 10px;"> |
|
|
|
<div> 存储位置:</div> |
|
|
|
<div> |
|
|
|
<BusinessSelect v-model="citem.ccfs" dictType="business_ccwz" style="width: 200px;"> |
|
|
|
</BusinessSelect> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="danger" icon="el-icon-delete" circle @click="delcc(cindex)"></el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-checkbox-group v-model="citem.list"> |
|
|
|
<el-checkbox :label="item.bh" v-for="item in resource" :key="'icz' + item.bh" |
|
|
|
:disabled="getDisabledCc(item.bh, cindex)"></el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :psna="24"> |
|
|
|
<el-form-item> |
|
|
|
用量统计 |
|
|
|
<div>{{ $t('page.business.study.studyFormFill.yltj') }}</div> |
|
|
|
<div v-for="(item, index) in resource" :key="'r' + index"> |
|
|
|
{{ item.bh }} |
|
|
|
<el-input type="text" v-model="item.syl" maxlength="50" style="width: 250px;"> |
|
|
|
<template slot="append"> |
|
|
|
<div style="width: 70px;"> |
|
|
|
<BusinessSelect v-model="item.syldw" dictType="business_tjdw"> |
|
|
|
</BusinessSelect> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -152,16 +229,15 @@ import { mapGetters } from 'vuex' |
|
|
|
import SelectTemplate from "@/views/business/comps/select/SelectTemplate"; |
|
|
|
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; |
|
|
|
import TemplateTable from '@/views/business/comps/template/TemplateTable'; |
|
|
|
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "Bj", |
|
|
|
components: { SelectTemplate, SelectDeptUser, TemplateTable }, |
|
|
|
components: { SelectTemplate, SelectDeptUser, TemplateTable, BusinessSelect }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
open: false, |
|
|
|
showIndex: 1, |
|
|
|
showCz: false, |
|
|
|
showCc: false, |
|
|
|
form: {}, |
|
|
|
rules: { |
|
|
|
bdmc: [{ |
|
|
|
@ -181,8 +257,26 @@ export default { |
|
|
|
}], |
|
|
|
|
|
|
|
}, |
|
|
|
czlist: [], |
|
|
|
cclist: [], |
|
|
|
openApprove: false, |
|
|
|
formApprove: {}, |
|
|
|
formApprove: { |
|
|
|
id: null, |
|
|
|
qmyy: '填写并提交记录', |
|
|
|
remark: '', |
|
|
|
bdnr: '', |
|
|
|
resource: '', |
|
|
|
qmrmm: '', |
|
|
|
sfcz: false, |
|
|
|
czfs: '', |
|
|
|
czfsqt: '', |
|
|
|
czids: '', |
|
|
|
sfcc: false, |
|
|
|
cctj: '', |
|
|
|
ccwz: '', |
|
|
|
ccids: '', |
|
|
|
}, |
|
|
|
resource: [], |
|
|
|
bdmbTitle: this.$t('page.business.form.bdmb'), |
|
|
|
rulesApprove: { |
|
|
|
qmrmm: [{ |
|
|
|
@ -202,6 +296,25 @@ export default { |
|
|
|
this.getInfo() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
delcc(index) { |
|
|
|
this.cclist.splice(index, 1) |
|
|
|
}, |
|
|
|
delcz(index) { |
|
|
|
this.czlist.splice(index, 1) |
|
|
|
}, |
|
|
|
addCz() { |
|
|
|
this.czlist.push({ |
|
|
|
list: [], |
|
|
|
czfs: '' |
|
|
|
}) |
|
|
|
}, |
|
|
|
addCc() { |
|
|
|
this.cclist.push({ |
|
|
|
list: [], |
|
|
|
cctj: '', |
|
|
|
ccwz: '' |
|
|
|
}) |
|
|
|
}, |
|
|
|
getInfo() { |
|
|
|
let formId = this.$route.params.formId |
|
|
|
let studyId = this.$route.params.studyId |
|
|
|
@ -229,14 +342,52 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
getDisabledCz(bh, idx) { |
|
|
|
let mark = false |
|
|
|
for (var i = 0; i < this.czlist.length; i++) { |
|
|
|
if (idx != i) { |
|
|
|
for (var j = 0; j < this.czlist[i].list.length; j++) { |
|
|
|
if (this.czlist[i].list[j] == bh) { |
|
|
|
mark = true; |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return mark |
|
|
|
}, |
|
|
|
getDisabledCc(bh, idx) { |
|
|
|
let mark = false |
|
|
|
for (var i = 0; i < this.cclist.length; i++) { |
|
|
|
if (idx != i) { |
|
|
|
for (var j = 0; j < this.cclist[i].list.length; j++) { |
|
|
|
if (this.cclist[i].list[j] == bh) { |
|
|
|
mark = true; |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return mark |
|
|
|
}, |
|
|
|
sfczChange() { |
|
|
|
if (!this.formApprove.sfcz) { |
|
|
|
this.czlist = [] |
|
|
|
} |
|
|
|
}, |
|
|
|
sfccChange() { |
|
|
|
if (!this.formApprove.sfcc) { |
|
|
|
this.cclist = [] |
|
|
|
} |
|
|
|
}, |
|
|
|
async showApprove() { |
|
|
|
let that=this |
|
|
|
let that = this |
|
|
|
let content = await that.$refs.templateTable.getFormData() |
|
|
|
if (content) { |
|
|
|
that.resetApprove() |
|
|
|
that.formApprove.id = that.form.id |
|
|
|
that.formApprove.bdnr = JSON.stringify(content) |
|
|
|
that.formApprove.resource = JSON.stringify(that.$refs.templateTable.getResource()) |
|
|
|
that.resource = that.$refs.templateTable.getResource() |
|
|
|
that.openApprove = true |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -248,6 +399,10 @@ export default { |
|
|
|
bdnr: '', |
|
|
|
resource: '', |
|
|
|
qmrmm: '', |
|
|
|
sfcz: false, |
|
|
|
czlist: '', |
|
|
|
sfcc: false, |
|
|
|
cclist: '', |
|
|
|
} |
|
|
|
this.resetForm("formApprove") |
|
|
|
}, |
|
|
|
@ -325,15 +480,19 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
tj() { |
|
|
|
let that=this |
|
|
|
this.$refs["formApprove"].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.$modal.loading() |
|
|
|
studyFormFill_tj(this.formApprove).then(response => { |
|
|
|
this.openApprove = false |
|
|
|
this.$modal.closeLoading() |
|
|
|
this.cancel() |
|
|
|
that.$modal.loading() |
|
|
|
that.formApprove.resource = JSON.stringify(that.resource) |
|
|
|
that.formApprove.czlist = JSON.stringify(that.czlist) |
|
|
|
that.formApprove.cclist = JSON.stringify(that.cclist) |
|
|
|
studyFormFill_tj(that.formApprove).then(response => { |
|
|
|
that.openApprove = false |
|
|
|
that.$modal.closeLoading() |
|
|
|
that.cancel() |
|
|
|
}).finally(() => { |
|
|
|
this.$modal.closeLoading() |
|
|
|
that.$modal.closeLoading() |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|