Browse Source

fix:[模板管理]优化

luojie
15881625488@163.com 1 week ago
parent
commit
157b30306d
1 changed files with 82 additions and 28 deletions
  1. +82
    -28
      src/views/business/study/comp/tbbd/Bj.vue

+ 82
- 28
src/views/business/study/comp/tbbd/Bj.vue View File

@ -63,7 +63,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')" style="width: 100%;" @change="validForm">
<el-select v-model="form.sfbl" :placeholder="$t('form.placeholderSelect')" style="width: 100%;"
@change="validForm">
<el-option :label="$t('page.business.study.studyFormFill.yes')" value="是" />
<el-option :label="$t('page.business.study.studyFormFill.no')" value="否" />
</el-select>
@ -91,8 +92,8 @@
<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="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px" v-if="openApprove">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row v-if="form.sftb == 1&&form.onlySubmit == 1">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row v-if="form.sftb == 1 && form.onlySubmit == 1">
<el-col :psna="24">
<el-form-item>
<div><el-checkbox v-model="formApprove.sfcz" @change="sfczChange">{{
@ -108,9 +109,12 @@
<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;">
<div style="display: flex;">
<BusinessSelect v-model="citem.czfs" @change="czfsChange(cindex)" dictType="business_czfs"
style="width: 200px;">
</BusinessSelect>
<el-input type="text" v-if="citem.czfs == '其他'" v-model="citem.czfsqt" maxlength="50"
:placeholder="$t('form.placeholderInput')" style="width: 200px;" />
</div>
</div>
<div>
@ -152,10 +156,12 @@
</div>
<div style="display: flex; margin-left: 10px;">
<div> 存储条件</div>
<div>
<BusinessSelect v-model="citem.cctj" dictType="business_cctj" :multiple="true"
style="width: 200px;">
<div style="display: flex;">
<BusinessSelect v-model="citem.cctj" @change="cctjChange(cindex)" dictType="business_cctj"
:multiple="true" style="width: 200px;">
</BusinessSelect>
<el-input type="text" v-if="citem.cctj == '其他'" v-model="citem.cctjqt" maxlength="50"
:placeholder="$t('form.placeholderInput')" style="width: 200px;" />
</div>
</div>
</div>
@ -225,8 +231,8 @@
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<div class="sbzdtcma"> <input type="text"></div>
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="formApprove.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="formApprove.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
@ -240,8 +246,8 @@
<el-dialog :title="$t('page.business.study.studyFormFill.yjcc')" :visible.sync="openYjcc" width="1200px"
append-to-body :close-on-click-modal="false">
<el-form ref="formYjcc" :model="formYjcc" :rules="rulesYjcc" label-width="120px" v-if="openYjcc">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row v-if="">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row>
<el-col :psna="24">
<el-form-item>
<div>
@ -266,10 +272,12 @@
</div>
<div style="display: flex; margin-left: 10px;">
<div> 存储条件</div>
<div>
<BusinessSelect v-model="citem.cctj" dictType="business_cctj" :multiple="true"
style="width: 200px;">
<div style="display: flex;">
<BusinessSelect v-model="citem.cctj" @change="cctjYjChange(cindex)"
dictType="business_cctj" :multiple="true" style="width: 200px;">
</BusinessSelect>
<el-input type="text" v-if="citem.cctj == '其他'" v-model="citem.cctjqt" maxlength="50"
:placeholder="$t('form.placeholderInput')" style="width: 200px;" />
</div>
</div>
</div>
@ -318,8 +326,8 @@
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<div class="sbzdtcma"> <input type="text"></div>
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="formYjcc.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="formYjcc.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
@ -333,7 +341,7 @@
<el-dialog :title="$t('page.business.study.studyFormFill.bcjl')" :visible.sync="openSave" width="600px"
append-to-body :close-on-click-modal="false">
<el-form ref="formSave" :model="formSave" :rules="rulesSave" label-width="120px" v-if="openSave">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
@ -363,8 +371,8 @@
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<div class="sbzdtcma"> <input type="text"></div>
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="formSave.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="formSave.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
@ -378,7 +386,7 @@
<el-dialog :title="$t('page.business.study.studyFormFill.tjsh')" :visible.sync="openTjsh" width="600px"
append-to-body :close-on-click-modal="false">
<el-form ref="formTjsh" :model="formTjsh" :rules="rulesTjsh" label-width="120px" v-if="openTjsh">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
@ -408,8 +416,8 @@
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<div class="sbzdtcma"> <input type="text"></div>
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="formTjsh.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="formTjsh.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
@ -486,6 +494,7 @@ export default {
czfsqt: '',
czids: '',
sfcc: false,
cctjqt: '',
cctj: '',
ccwz: '',
ccids: '',
@ -502,6 +511,7 @@ export default {
czids: '',
sfcc: false,
cctj: '',
cctjqt: '',
ccwz: '',
ccids: '',
},
@ -563,7 +573,7 @@ export default {
this.getCcwz()
},
methods: {
validForm() {
validForm() {
this.$refs["form"].validate(valid => {
if (valid) { }
})
@ -578,6 +588,18 @@ export default {
this.ccwzlist = response.rows
})
},
czfsChange(cindex) {
let that = this
that.czlist[cindex].czfsqt = ''
},
cctjChange(cindex) {
let that = this
that.cclist[cindex].cctjqt = ''
},
cctjYjChange(cindex) {
let that = this
that.cclistYj[cindex].cctjqt = ''
},
ccwzChange(cindex) {
let that = this
let _index = _.findIndex(this.ccwzlist, function (item) {
@ -629,21 +651,24 @@ export default {
addCz() {
this.czlist.push({
list: [],
czfs: ''
czfs: '',
czfsqt: ''
})
},
addCc() {
this.cclist.push({
list: [],
cctj: '',
ccwz: ''
ccwz: '',
cctjqt: '',
})
},
addCcYj() {
this.cclistYj.push({
list: [],
cctj: '',
ccwz: ''
ccwz: '',
cctjqt: ''
})
},
getInfo() {
@ -980,6 +1005,10 @@ export default {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return
}
if (!that.cclistYj[i].cctjqt || that.cclistYj[i].cctjqt == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return
}
}
that.$modal.loading()
that.formYjcc.resource = JSON.stringify(that.resourceYj)
@ -999,7 +1028,6 @@ export default {
let that = this
this.$refs["formApprove"].validate(valid => {
if (valid) {
that.$modal.loading()
that.formApprove.resource = JSON.stringify(that.resource)
that.formApprove.yqResource = JSON.stringify(that.yqResource)
that.formApprove.jcbList = JSON.stringify(that.jcbList)
@ -1010,6 +1038,32 @@ export default {
if (that.cclist.length > 0) {
that.formApprove.cclist = JSON.stringify(that.cclist)
}
for (var i = 0; i < that.czlist.length; i++) {
if (!that.czlist[i].czfs || that.czlist[i].czfs == '') {
this.$modal.msgError('第' + (i + 1) + "个处置,处置方式不能为空")
return
}
if (!that.czlist[i].czfsqt || that.czlist[i].czfsqt == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,处置方式不能为空")
return
}
}
for (var i = 0; i < that.cclist.length; i++) {
if (!that.cclist[i].ccwz || that.cclist[i].ccwz == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,存储位置不能为空")
return
}
if (!that.cclist[i].cctj || that.cclist[i].cctj == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return
}
if (!that.cclist[i].cctjqt || that.cclist[i].cctjqt == '') {
this.$modal.msgError('第' + (i + 1) + "个存储,存储条件不能为空")
return
}
}
debugger
that.$modal.loading()
studyFormFill_tj(that.formApprove).then(response => {
that.openApprove = false
that.$modal.closeLoading()

Loading…
Cancel
Save