Browse Source

fix:[试验管理]表单落笔留痕

lkf
15881625488@163.com 3 months ago
parent
commit
f510afcc88
12 changed files with 251 additions and 23 deletions
  1. +27
    -2
      src/api/business/study/studyFormApply.js
  2. +28
    -0
      src/api/business/study/studyFormPlan.js
  3. +28
    -0
      src/api/business/study/studyFormPre.js
  4. +4
    -0
      src/views/business/comps/template/comps/gy/MJYLQSQD.vue
  5. +4
    -1
      src/views/business/comps/template/comps/gy/SYWZPZJHB.vue
  6. +27
    -4
      src/views/business/study/comp/jhbd/Bj.vue
  7. +39
    -4
      src/views/business/study/comp/jhbd/Fh.vue
  8. +27
    -4
      src/views/business/study/comp/sqbd/Bj.vue
  9. +38
    -2
      src/views/business/study/comp/sqbd/Fh.vue
  10. +0
    -1
      src/views/business/study/comp/tbbd/Bj.vue
  11. +2
    -2
      src/views/business/study/comp/tbbd/Fh.vue
  12. +27
    -3
      src/views/business/study/comp/ytbd/Bj.vue

+ 27
- 2
src/api/business/study/studyFormApply.js View File

@ -123,8 +123,6 @@ export function studyFormApply_shjj(data) {
}) })
} }
//审阅 //审阅
export function studyFormApply_sy(data) { export function studyFormApply_sy(data) {
return request({ return request({
@ -133,3 +131,30 @@ export function studyFormApply_sy(data) {
data: data data: data
}) })
} }
//保存字段勾选记录
export function studyFormApply_updateZdgxjl(data) {
return request({
url: '/system/business/studyFormApply/updateZdgxjl',
method: 'post',
data: data
})
}
//保存复核意见
export function studyFormApply_updateFhyjjl(data) {
return request({
url: '/system/business/studyFormApply/updateFhyjjl',
method: 'post',
data: data
})
}
//保存表单内容
export function studyFormApply_updateBdnr(data) {
return request({
url: '/system/business/studyFormApply/updateBdnr',
method: 'post',
data: data
})
}

+ 28
- 0
src/api/business/study/studyFormPlan.js View File

@ -91,3 +91,31 @@ export function studyFormPlan_sy(data) {
data: data data: data
}) })
} }
//保存字段勾选记录
export function studyFormPlan_updateZdgxjl(data) {
return request({
url: '/system/business/studyFormPlan/updateZdgxjl',
method: 'post',
data: data
})
}
//保存复核意见
export function studyFormPlan_updateFhyjjl(data) {
return request({
url: '/system/business/studyFormPlan/updateFhyjjl',
method: 'post',
data: data
})
}
//保存表单内容
export function studyFormPlan_updateBdnr(data) {
return request({
url: '/system/business/studyFormPlan/updateBdnr',
method: 'post',
data: data
})
}

+ 28
- 0
src/api/business/study/studyFormPre.js View File

@ -79,4 +79,32 @@ export function studyFormPre_jj(data) {
method: 'post', method: 'post',
data: data data: data
}) })
}
//保存字段勾选记录
export function studyFormPre_updateZdgxjl(data) {
return request({
url: '/system/business/studyFormPre/updateZdgxjl',
method: 'post',
data: data
})
}
//保存复核意见
export function studyFormPre_updateFhyjjl(data) {
return request({
url: '/system/business/studyFormPre/updateFhyjjl',
method: 'post',
data: data
})
}
//保存表单内容
export function studyFormPre_updateBdnr(data) {
return request({
url: '/system/business/studyFormPre/updateBdnr',
method: 'post',
data: data
})
} }

+ 4
- 0
src/views/business/comps/template/comps/gy/MJYLQSQD.vue View File

@ -203,6 +203,10 @@ export default {
this.visible = true; this.visible = true;
// this.$refs.baseInfoRef.setClickable("syNo", true); // this.$refs.baseInfoRef.setClickable("syNo", true);
}, },
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
async getFormData() { async getFormData() {
return await this.validFormFields(["baseInfoRef","remarkRef"]); return await this.validFormFields(["baseInfoRef","remarkRef"]);
}, },

+ 4
- 1
src/views/business/comps/template/comps/gy/SYWZPZJHB.vue View File

@ -186,7 +186,10 @@ export default {
}, },
methods: { methods: {
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
async getFormData() { async getFormData() {
return await this.validFormFields(["baseInfoRef", "stepFormPackageRef","stepTableRef","remarkRef"]); return await this.validFormFields(["baseInfoRef", "stepFormPackageRef","stepTableRef","remarkRef"]);
}, },

+ 27
- 4
src/views/business/study/comp/jhbd/Bj.vue View File

@ -65,7 +65,7 @@
</el-form> </el-form>
</div> </div>
<div class="content" v-if="showIndex == 2"> <div class="content" v-if="showIndex == 2">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="templateData" fillType="actFill" />
<TemplateTable ref="templateTable" emitName="onPlanCallback" @onPlanCallback="onPlanCallback" :sn="form.templateSn" :templateData="templateData" fillType="actFill" />
</div> </div>
</div> </div>
</div> </div>
@ -78,7 +78,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormPlan.shryId')" prop="fshryId"> <el-form-item :label="$t('page.business.study.studyFormPlan.shryId')" prop="fshryId">
<SelectStudyUser v-model="form.fshryId" :query="{
<SelectStudyUser v-model="form.fshryId" :query="{
studyId: form.studyId, studyId: form.studyId,
permit: 'business:studyFormPlan:fh' permit: 'business:studyFormPlan:fh'
}" key="fshryId" @change="selectDeptUserChange" /> }" key="fshryId" @change="selectDeptUserChange" />
@ -128,7 +128,7 @@
</template> </template>
<script> <script>
import { studyFormPlan_bc, studyFormPlan_tj, studyFormPlan_info } from "@/api/business/study/studyFormPlan"
import { studyFormPlan_bc, studyFormPlan_tj, studyFormPlan_info,studyFormPlan_updateBdnr } from "@/api/business/study/studyFormPlan"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate"; import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectStudyUser from '@/views/business/comps/select/SelectStudyUser'; import SelectStudyUser from '@/views/business/comps/select/SelectStudyUser';
@ -185,13 +185,36 @@ export default {
created() { created() {
}, },
methods: { methods: {
onPlanCallback(data) {
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'fieldChanged') {
studyFormPlan_updateBdnr(
{
id: this.form.id,
bdnr: JSON.stringify(this.$refs.templateTable.getFilledFormData()),
zdxgjl: JSON.stringify(data.resourceList),
filedValue: JSON.stringify(data.newRecord)
}
).then(response => {
})
}
},
pre() { pre() {
this.showIndex = 1 this.showIndex = 1
}, },
next() { next() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.showIndex = 2
this.$modal.loading()
studyFormPlan_bc(this.form).then(response => {
this.form = response.data
this.templateData = deepClone(this.form)
this.showIndex = 2
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
} }
}) })
}, },

+ 39
- 4
src/views/business/study/comp/jhbd/Fh.vue View File

@ -109,7 +109,7 @@
</template> </template>
<script> <script>
import { studyFormPlan_fhtg, studyFormPlan_fhjj, studyFormPlan_info, studyFormPlan_jcgj, studyFormPlan_qmxx } from "@/api/business/study/studyFormPlan"
import { studyFormPlan_updateFhyjjl,studyFormPlan_updateZdgxjl,studyFormPlan_fhtg, studyFormPlan_fhjj, studyFormPlan_info, studyFormPlan_jcgj, studyFormPlan_qmxx } from "@/api/business/study/studyFormPlan"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList"; import JcgjList from "@/views/business/comps/common/JcgjList";
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -160,7 +160,42 @@ export default {
created() { created() {
}, },
methods: { methods: {
onPlanFhCallback(data) {
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'checkbox') {
// {"type":"checkbox","fieldCheckObj":"{\"_methodCode\":{\"checked\":false}}"}
studyFormPlan_updateZdgxjl(
{
id: this.form.id,
zdxgjl: JSON.stringify(data.fieldCheckObj)
}
).then(response => {
})
}
else if (data.type == 'content') {
// {"type":"content","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormPlan_updateFhyjjl(
{
id: this.form.id,
content: JSON.stringify(data.newRecord),
fhyjjl: JSON.stringify(data.resourceList)
}
).then(response => {
})
}
else if (data.type == 'reply') {
// {"type":"reply","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormPlan_updateFhyjjl(
{
id: this.form.id,
replay: JSON.stringify(data.newRecord),
fhyjjl: JSON.stringify(data.resourceList)
}
).then(response => {
})
}
},
getJjcgjList(val) { getJjcgjList(val) {
this.$modal.loading() this.$modal.loading()
studyFormPlan_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => { studyFormPlan_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
@ -212,10 +247,10 @@ export default {
this.formApprove.qmyyMc = qmyy this.formApprove.qmyyMc = qmyy
if (qmyy == '复核通过') { if (qmyy == '复核通过') {
this.openTitle = 'page.business.study.studyFormPlan.fhtg' this.openTitle = 'page.business.study.studyFormPlan.fhtg'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormPlan.fhtg')
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormPlan.fhtg')
} else if (qmyy == '复核拒绝') { } else if (qmyy == '复核拒绝') {
this.openTitle = 'page.business.study.studyFormPlan.fhjj' this.openTitle = 'page.business.study.studyFormPlan.fhjj'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormPlan.fhtg')
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormPlan.fhtg')
} }
} }

+ 27
- 4
src/views/business/study/comp/sqbd/Bj.vue View File

@ -75,7 +75,7 @@
</el-form> </el-form>
</div> </div>
<div class="content" v-if="showIndex == 2"> <div class="content" v-if="showIndex == 2">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="actFill" />
<TemplateTable ref="templateTable" emitName="onApplyCallback" @onApplyCallback="onApplyCallback" :sn="form.templateSn" :templateData="form" fillType="actFill" />
</div> </div>
</div> </div>
</div> </div>
@ -127,7 +127,7 @@
</template> </template>
<script> <script>
import { studyFormApply_bc, studyFormApply_tj, studyFormApply_info } from "@/api/business/study/studyFormApply"
import { studyFormApply_bc, studyFormApply_tj, studyFormApply_info,studyFormApply_updateBdnr } from "@/api/business/study/studyFormApply"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate"; import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
@ -189,13 +189,36 @@ export default {
created() { created() {
}, },
methods: { methods: {
onApplyCallback(data) {
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'fieldChanged') {
studyFormApply_updateBdnr(
{
id: this.form.id,
bdnr: JSON.stringify(this.$refs.templateTable.getFilledFormData()),
zdxgjl: JSON.stringify(data.resourceList),
filedValue: JSON.stringify(data.newRecord)
}
).then(response => {
})
}
},
pre() { pre() {
this.showIndex = 1 this.showIndex = 1
}, },
next() { next() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.showIndex = 2
this.$modal.loading()
studyFormApply_bc(this.form).then(response => {
this.form = response.data
this.templateData = deepClone(this.form)
this.showIndex = 2
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
} }
}) })
}, },
@ -245,7 +268,7 @@ export default {
} else { } else {
this.showIndex = 1 this.showIndex = 1
this.form = _.merge({}, this.form, row) this.form = _.merge({}, this.form, row)
this.templateData = deepClone(this.form)
this.templateData = deepClone(this.form)
this.open = true this.open = true
} }
}, },

+ 38
- 2
src/views/business/study/comp/sqbd/Fh.vue View File

@ -18,7 +18,7 @@
</div> </div>
<div class="edit-content"> <div class="edit-content">
<div class="content-left"> <div class="content-left">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="qc" />
<TemplateTable ref="templateTable" emitName="onApplyFhCallback" @onApplyFhCallback="onApplyFhCallback" :sn="form.templateSn" :templateData="form" fillType="qc" />
<div class="content-title"> <div class="content-title">
<div class="line"></div> <div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormApply.qmxx') }}</div> <div class="subtitle"> {{ $t('page.business.study.studyFormApply.qmxx') }}</div>
@ -109,7 +109,7 @@
</template> </template>
<script> <script>
import { studyFormApply_fhtg, studyFormApply_fhjj, studyFormApply_info, studyFormApply_jcgj, studyFormApply_qmxx } from "@/api/business/study/studyFormApply"
import { studyFormApply_updateFhyjjl,studyFormApply_updateZdgxjl,studyFormApply_fhtg, studyFormApply_fhjj, studyFormApply_info, studyFormApply_jcgj, studyFormApply_qmxx } from "@/api/business/study/studyFormApply"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList"; import JcgjList from "@/views/business/comps/common/JcgjList";
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -160,6 +160,42 @@ export default {
created() { created() {
}, },
methods: { methods: {
onApplyFhCallback(data) {
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'checkbox') {
// {"type":"checkbox","fieldCheckObj":"{\"_methodCode\":{\"checked\":false}}"}
studyFormApply_updateZdgxjl(
{
id: this.form.id,
zdxgjl: JSON.stringify(data.fieldCheckObj)
}
).then(response => {
})
}
else if (data.type == 'content') {
// {"type":"content","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormApply_updateFhyjjl(
{
id: this.form.id,
content: JSON.stringify(data.newRecord),
fhyjjl: JSON.stringify(data.resourceList)
}
).then(response => {
})
}
else if (data.type == 'reply') {
// {"type":"reply","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormApply_updateFhyjjl(
{
id: this.form.id,
replay: JSON.stringify(data.newRecord),
fhyjjl: JSON.stringify(data.resourceList)
}
).then(response => {
})
}
},
getJjcgjList(val) { getJjcgjList(val) {
this.$modal.loading() this.$modal.loading()
studyFormApply_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => { studyFormApply_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {

+ 0
- 1
src/views/business/study/comp/tbbd/Bj.vue View File

@ -302,7 +302,6 @@ export default {
onFillCallback(data) { onFillCallback(data) {
console.log("data:" + JSON.stringify(data)) console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData())) console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
// {"type":"fieldChanged","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","oldValue":"1.0","value":"1.0333","title":"","time":"2026-01-14 19:44:02"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","oldValue":"1.0","value":"1.0","title":"","time":"2026-01-14 19:43:57"}]}
if (data.type == 'fieldChanged') { if (data.type == 'fieldChanged') {
studyFormFill_updateBdnr( studyFormFill_updateBdnr(
{ {

+ 2
- 2
src/views/business/study/comp/tbbd/Fh.vue View File

@ -20,7 +20,7 @@
</div> </div>
<div class="edit-content"> <div class="edit-content">
<div class="content-left"> <div class="content-left">
<TemplateTable emitName="onFhCallback" @onFhCallback="onFhCallback" ref="templateTable" :sn="form.templateSn"
<TemplateTable emitName="onFillFhCallback" @onFillFhCallback="onFillFhCallback" ref="templateTable" :sn="form.templateSn"
:templateData="form" fillType="qc" /> :templateData="form" fillType="qc" />
<div class="content-title"> <div class="content-title">
<div class="line"></div> <div class="line"></div>
@ -162,7 +162,7 @@ export default {
created() { created() {
}, },
methods: { methods: {
onFhCallback(data) {
onFillFhCallback(data) {
console.log("data:" + JSON.stringify(data)) console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData())) console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'checkbox') { if (data.type == 'checkbox') {

+ 27
- 3
src/views/business/study/comp/ytbd/Bj.vue View File

@ -65,7 +65,8 @@
</el-form> </el-form>
</div> </div>
<div class="content" v-if="showIndex == 2"> <div class="content" v-if="showIndex == 2">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="templateData" fillType="preFill" />
<TemplateTable ref="templateTable" emitName="onPreCallback" @onPreCallback="onPreCallback"
:sn="form.templateSn" :templateData="templateData" fillType="preFill" />
</div> </div>
</div> </div>
</div> </div>
@ -137,7 +138,7 @@
</template> </template>
<script> <script>
import { studyFormPre_bc, studyFormPre_tj, studyFormPre_info } from "@/api/business/study/studyFormPre"
import { studyFormPre_bc, studyFormPre_tj, studyFormPre_info,studyFormPre_updateBdnr } from "@/api/business/study/studyFormPre"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate"; import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectStudyUser from '@/views/business/comps/select/SelectStudyUser'; import SelectStudyUser from '@/views/business/comps/select/SelectStudyUser';
@ -193,13 +194,36 @@ export default {
created() { created() {
}, },
methods: { methods: {
onPreCallback(data) {
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'fieldChanged') {
studyFormFill_updateBdnr(
{
id: this.form.id,
bdnr: JSON.stringify(this.$refs.templateTable.getFilledFormData()),
zdxgjl: JSON.stringify(data.resourceList),
filedValue: JSON.stringify(data.newRecord)
}
).then(response => {
})
}
},
pre() { pre() {
this.showIndex = 1 this.showIndex = 1
}, },
next() { next() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.showIndex = 2
this.$modal.loading()
studyFormPre_bc(this.form).then(response => {
this.form = response.data
this.templateData = deepClone(this.form)
this.showIndex = 2
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
} }
}) })
}, },

Loading…
Cancel
Save