luojie 18 hours ago
parent
commit
1e7855d6ad
7 changed files with 201 additions and 27 deletions
  1. +8
    -2
      src/api/business/public/public.js
  2. +8
    -0
      src/lang/zh/business/study/studyFormFill.js
  3. +3
    -3
      src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue
  4. +1
    -1
      src/views/business/resource/gyzj/comps/gyzj/Xgkc.vue
  5. +1
    -1
      src/views/business/resource/mjy/comps/mjy/Xgkc.vue
  6. +175
    -16
      src/views/business/study/comp/tbbd/Bj.vue
  7. +5
    -4
      src/views/business/template/list.vue

+ 8
- 2
src/api/business/public/public.js View File

@ -1,4 +1,12 @@
import request from '@/utils/request'
// 获取编号(参数count,没有参数或者count<=1返回1个string,>1就返回list)
export function public_getSn(query) {
return request({
url: '/system/business/public/getSn',
method: 'get',
params: query
})
}
// 暂存柜列表
export function public_zcgList(query) {
@ -18,7 +26,6 @@ export function public_templateList(query) {
})
}
// 查询试验列表
export function public_studyList(query) {
return request({
@ -28,7 +35,6 @@ export function public_studyList(query) {
})
}
// 查询试验预填表单列表
export function public_studyFormPreList(query) {
return request({

+ 8
- 0
src/lang/zh/business/study/studyFormFill.js View File

@ -1,4 +1,12 @@
export default {
mc:'名称',
bh:'编号',
syl:'使用量',
cz:'处置',
tjcz:'添加处置',
cc:'存储',
tjcc:'添加存储',
yltj:'用量统计',
jcsz:'基础设置',
bdtb:'表单填报',
xzbd:'新增表单',

+ 3
- 3
src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue View File

@ -262,7 +262,7 @@ export default {
//resource todo ,
// type1357,syl使syldw使
let tmpResource = []
debugger
//
tmpResource.push({
mc: content.targetName,
@ -275,10 +275,10 @@ export default {
sxrq: content.expireDate,
ndz: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
kc: content.targetActVolume,
kc: content.targetActVolume*content.targetActConcentration,
kcdw: content.targetActVolumeUnit,
syl: null,
syldw: content.targetActVolumeUnit,
syldw:content.targetActVolumeUnit,
})
//使
this.resource=tmpResource

+ 1
- 1
src/views/business/resource/gyzj/comps/gyzj/Xgkc.vue View File

@ -25,7 +25,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.kcdw')" prop="kcdw">
<BusinessSelect v-model="form.kcdw" dictType="business_nddw"></BusinessSelect>
<BusinessSelect v-model="form.kcdw" dictType="business_tjdw"></BusinessSelect>
</el-form-item>
</el-col>
</el-row>

+ 1
- 1
src/views/business/resource/mjy/comps/mjy/Xgkc.vue View File

@ -24,7 +24,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.kcdw')" prop="kcdw">
<BusinessSelect v-model="form.kcdw" dictType="business_nddw"></BusinessSelect>
<BusinessSelect v-model="form.kcdw" dictType="business_tjdw"></BusinessSelect>
</el-form-item>
</el-col>
</el-row>

+ 175
- 16
src/views/business/study/comp/tbbd/Bj.vue View File

@ -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()
})
}
})

+ 5
- 4
src/views/business/template/list.vue View File

@ -31,6 +31,7 @@
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.system.template.sn')" align="center" prop="sn" />
<el-table-column :label="$t('page.system.template.sn')" align="center" prop="showSn" />
<el-table-column :label="$t('page.system.template.name')" align="center" prop="name" />
<el-table-column :label="$t('page.system.template.department')" align="center" prop="deptName" />
<el-table-column :label="$t('page.system.template.status')" prop="status" align="center" width="100">
@ -45,12 +46,12 @@
<span v-if="scope.row.needPre === 1"></span>
</template>
</el-table-column>
<el-table-column label="模板类型" prop="type" align="center" width="100">
<!-- <el-table-column label="模板类型" prop="type" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.type === 10">高风险表单</span>
<span v-if="scope.row.type === 1">普通表单</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column :label="$t('form.operate')" fixed="right" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">{{ $t('page.system.template.bj') }}</el-button>
@ -97,14 +98,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<!-- <el-col :span="24">
<el-form-item label="类型:" prop="type">
<el-select v-model="infoDialog.formData.type" :placeholder="$t('form.placeholderSelect')" style="width:100%">
<el-option label="普通表单" :value="1" />
<el-option label="高风险表单" :value="10" />
</el-select>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
</el-form>

Loading…
Cancel
Save