Browse Source

feat:[模板管理][update]

lkf
luojie 2 months ago
parent
commit
ad1f202339
39 changed files with 115 additions and 80 deletions
  1. +10
    -5
      src/components/Template/CustomTable.vue
  2. +7
    -2
      src/components/Template/HandleFormItem.vue
  3. +1
    -1
      src/components/Template/StepComponents/ry/bdtj.vue
  4. +1
    -1
      src/components/Template/StepComponents/ry/bdzl.vue
  5. +1
    -1
      src/components/Template/StepComponents/ry/clcz.vue
  6. +1
    -1
      src/components/Template/StepComponents/ry/clfcz.vue
  7. +1
    -1
      src/components/Template/StepComponents/ry/cs.vue
  8. +1
    -1
      src/components/Template/StepComponents/ry/czdd.vue
  9. +1
    -1
      src/components/Template/StepComponents/ry/czhj.vue
  10. +1
    -1
      src/components/Template/StepComponents/ry/dc.vue
  11. +2
    -2
      src/components/Template/StepComponents/ry/fr.vue
  12. +2
    -2
      src/components/Template/StepComponents/ry/frdrq.vue
  13. +1
    -1
      src/components/Template/StepComponents/ry/fs.vue
  14. +1
    -1
      src/components/Template/StepComponents/ry/fy.vue
  15. +1
    -1
      src/components/Template/StepComponents/ry/glsd.vue
  16. +2
    -2
      src/components/Template/StepComponents/ry/glzd.vue
  17. +1
    -1
      src/components/Template/StepComponents/ry/hwhy.vue
  18. +1
    -1
      src/components/Template/StepComponents/ry/jb.vue
  19. +1
    -1
      src/components/Template/StepComponents/ry/jd.vue
  20. +1
    -1
      src/components/Template/StepComponents/ry/jrjb.vue
  21. +2
    -2
      src/components/Template/StepComponents/ry/jrry.vue
  22. +1
    -1
      src/components/Template/StepComponents/ry/js.vue
  23. +1
    -1
      src/components/Template/StepComponents/ry/jz.vue
  24. +1
    -1
      src/components/Template/StepComponents/ry/lx.vue
  25. +1
    -1
      src/components/Template/StepComponents/ry/mj.vue
  26. +2
    -2
      src/components/Template/StepComponents/ry/rs.vue
  27. +1
    -1
      src/components/Template/StepComponents/ry/sy.vue
  28. +3
    -3
      src/components/Template/StepComponents/ry/tjphcz.vue
  29. +3
    -3
      src/components/Template/StepComponents/ry/tjphfcz.vue
  30. +1
    -1
      src/components/Template/StepComponents/ry/tpjydd.vue
  31. +1
    -1
      src/components/Template/StepComponents/ry/tpjysd.vue
  32. +1
    -1
      src/components/Template/StepComponents/ry/wxhy.vue
  33. +2
    -2
      src/components/Template/StepComponents/ry/ym.vue
  34. +1
    -1
      src/components/Template/StepComponents/ry/zy.vue
  35. +1
    -1
      src/components/Template/StepComponents/ry/zyhy.vue
  36. +30
    -14
      src/components/Template/StepFormPackage.vue
  37. +3
    -2
      src/components/Template/mixins/formPackageMixins.js
  38. +12
    -8
      src/views/business/comps/template/comps/sp/SP003.vue
  39. +10
    -6
      src/views/business/comps/template/mixins/templateMixin.js

+ 10
- 5
src/components/Template/CustomTable.vue View File

@ -4,7 +4,7 @@
<div class="custom-table-header"> <div class="custom-table-header">
<div class="custom-table-row"> <div class="custom-table-row">
<div v-for="(col, index) in columns" :key="index" class="custom-table-cell header-cell" <div v-for="(col, index) in columns" :key="index" class="custom-table-cell header-cell"
:style="{ width: (templateFillType !== 'actFill'&&col.showWidth)?col.showWidth + 'px' :(col.width ? col.width + 'px' : 'auto') }">
:style="getCellWidth(col)">
<div class="header-cell-content"> <div class="header-cell-content">
<div>{{ $t(col.label) }}</div> <div>{{ $t(col.label) }}</div>
<template <template
@ -34,7 +34,7 @@
<div class="custom-table-body"> <div class="custom-table-body">
<div v-for="(row, rowIndex) in localDataSource" :key="rowIndex" class="custometable-row"> <div v-for="(row, rowIndex) in localDataSource" :key="rowIndex" class="custometable-row">
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell" <div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell body-cell"
:style="{ width: (templateFillType !== 'actFill'&&col.showWidth)?col.showWidth + 'px' :(col.width ? col.width + 'px' : 'auto') }">
:style="getCellWidth(col)">
<div class="inner-table-cell"> <div class="inner-table-cell">
<div class="flex1"> <div class="flex1">
<template v-if="col.bodyType === 'input'"> <template v-if="col.bodyType === 'input'">
@ -264,9 +264,14 @@ export default {
this.oldLocalDataSource = []; this.oldLocalDataSource = [];
}, },
methods: { methods: {
getCellWidth(col){
const {templateFillType} = this;
let width = col.width ? col.width + 'px' : 'auto';
if(templateFillType !== "actFill" && templateFillType !== "preFill"){
width = (col.showWidth)?col.showWidth + 'px' :(col.width ? col.width + 'px' : 'auto')
}
return { width }
},
// //
resetRecord(rowIndex, colIndex,) { resetRecord(rowIndex, colIndex,) {
if (this.localDataSource.length) { if (this.localDataSource.length) {

+ 7
- 2
src/components/Template/HandleFormItem.vue View File

@ -234,7 +234,7 @@ export default {
// //
EventBus.$on("onReagentSubmit", this.onReagentSubmit) EventBus.$on("onReagentSubmit", this.onReagentSubmit)
// //
EventBus.$on("onInstrumentSubmit", this.onInstrumentSubmit)
EventBus.$on("onInstrumentSubmit", this.onMixReagentSubmit)
//// ////
EventBus.$on("onMixReagentSubmit", this.onMixReagentSubmit) EventBus.$on("onMixReagentSubmit", this.onMixReagentSubmit)
}, },
@ -243,10 +243,15 @@ export default {
EventBus.$off('onEditSignCancel', this.handleEditSignCancel); EventBus.$off('onEditSignCancel', this.handleEditSignCancel);
EventBus.$off('onEditSignCallback', this.handleEditSignCallback); EventBus.$off('onEditSignCallback', this.handleEditSignCallback);
EventBus.$off("onReagentSubmit", this.onReagentSubmit) EventBus.$off("onReagentSubmit", this.onReagentSubmit)
EventBus.$off("onInstrumentSubmit", this.onInstrumentSubmit)
EventBus.$off("onInstrumentSubmit", this.onMixReagentSubmit)
EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit) EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit)
}, },
methods: { methods: {
onInstrumentSubmit(data){
if(data.uuid !== this.uuid) return;
this.selectRegentInfo = data;
console.log(data,"yq")
},
handleSuccess(res, file, fileList) { handleSuccess(res, file, fileList) {
if(res.code == 200){ if(res.code == 200){
this.fileList = fileList; this.fileList = fileList;

+ 1
- 1
src/components/Template/StepComponents/ry/bdtj.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 1
- 1
src/components/Template/StepComponents/ry/bdzl.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 1
- 1
src/components/Template/StepComponents/ry/clcz.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/clfcz.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/cs.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/czdd.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 1
- 1
src/components/Template/StepComponents/ry/czhj.vue View File

@ -25,7 +25,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/dc.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/fr.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{
@ -37,7 +37,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
sj:{ sj:{
type:"regent",
type:"sj",
fillType:"actFill", fillType:"actFill",
ylCode: "sjtj", ylCode: "sjtj",
dwCode: "sjtjdw", dwCode: "sjtjdw",

+ 2
- 2
src/components/Template/StepComponents/ry/frdrq.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{
@ -37,7 +37,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
sj:{ sj:{
type:"regent",
type:"sj",
fillType:"actFill", fillType:"actFill",
ylCode: "sjtj", ylCode: "sjtj",
dwCode: "sjtjdw", dwCode: "sjtjdw",

+ 1
- 1
src/components/Template/StepComponents/ry/fs.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/fy.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/glsd.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
sj:{ sj:{
type:"regent",
type:"sj",
fillType:"actFill", fillType:"actFill",
}, },
text3:{ text3:{

+ 2
- 2
src/components/Template/StepComponents/ry/glzd.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{
@ -33,7 +33,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
sj:{ sj:{
type:"regent",
type:"sj",
fillType:"actFill", fillType:"actFill",
}, },
text3:{ text3:{

+ 1
- 1
src/components/Template/StepComponents/ry/hwhy.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
yq1: { yq1: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/jb.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text4: { text4: {

+ 1
- 1
src/components/Template/StepComponents/ry/jd.vue View File

@ -26,7 +26,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
sj: { sj: {
type: "regent",
type: "sj",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/jrjb.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/jrry.vue View File

@ -26,7 +26,7 @@ export default {
}, },
sjrqcz: { sjrqcz: {
fillType: "actFill", fillType: "actFill",
type: "instrument",
type: "yq",
}, },
text2: { text2: {
label: "仪器,吸取", label: "仪器,吸取",
@ -38,7 +38,7 @@ export default {
}, },
sjrq:{ sjrq:{
fillType: "actFill", fillType: "actFill",
type: "regent",
type: "sj",
ylCode: "sjsr2", ylCode: "sjsr2",
dwCode: "sjsrdw2", dwCode: "sjsrdw2",
}, },

+ 1
- 1
src/components/Template/StepComponents/ry/js.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 1
- 1
src/components/Template/StepComponents/ry/jz.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
sj:{ sj:{
type:"regent",
type:"sj",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 1
- 1
src/components/Template/StepComponents/ry/lx.vue View File

@ -21,7 +21,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {

+ 1
- 1
src/components/Template/StepComponents/ry/mj.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/rs.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{
@ -78,7 +78,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yjsj:{ yjsj:{
type:"regent",
type:"sj",
fillType:"actFill", fillType:"actFill",
ylCode: "sjtj2", ylCode: "sjtj2",
dwCode: "sjtjdw1", dwCode: "sjtjdw1",

+ 1
- 1
src/components/Template/StepComponents/ry/sy.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 3
- 3
src/components/Template/StepComponents/ry/tjphcz.vue View File

@ -21,7 +21,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {
@ -41,7 +41,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
sj1: { sj1: {
type: "regent",
type: "sj",
fillType: "actFill", fillType: "actFill",
ylCode: "sjjrl", ylCode: "sjjrl",
dwCode: "sjjrldw", dwCode: "sjjrldw",
@ -70,7 +70,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
sj2: { sj2: {
type: "regent",
type: "sj",
fillType: "actFill", fillType: "actFill",
ylCode: "sjjrl1", ylCode: "sjjrl1",
dwCode: "sjjrldw1", dwCode: "sjjrldw1",

+ 3
- 3
src/components/Template/StepComponents/ry/tjphfcz.vue View File

@ -21,7 +21,7 @@ export default {
type: "text", type: "text",
}, },
yq: { yq: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
text2: { text2: {
@ -41,7 +41,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
sj1: { sj1: {
type: "regent",
type: "sj",
fillType: "actFill", fillType: "actFill",
ylCode: "sjjrl", ylCode: "sjjrl",
dwCode: "sjjrldw", dwCode: "sjjrldw",
@ -70,7 +70,7 @@ export default {
fillType: "preFill", fillType: "preFill",
}, },
sj2: { sj2: {
type: "regent",
type: "sj",
fillType: "actFill", fillType: "actFill",
ylCode: "sjjrl1", ylCode: "sjjrl1",
dwCode: "sjjrldw1", dwCode: "sjjrldw1",

+ 1
- 1
src/components/Template/StepComponents/ry/tpjydd.vue View File

@ -24,7 +24,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
ddsys:{ ddsys:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 1
- 1
src/components/Template/StepComponents/ry/tpjysd.vue View File

@ -22,7 +22,7 @@ export default {
type: "text", type: "text",
}, },
ddsys: { ddsys: {
type: "instrument",
type: "yq",
fillType: "actFill", fillType: "actFill",
}, },
} }

+ 1
- 1
src/components/Template/StepComponents/ry/wxhy.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq1:{ yq1:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 2
- 2
src/components/Template/StepComponents/ry/ym.vue View File

@ -33,7 +33,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text3:{ text3:{
@ -45,7 +45,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
sj:{ sj:{
type:"regent",
type:"sj",
fillType:"actFill", fillType:"actFill",
ylCode: "ry3", ylCode: "ry3",
dwCode: "sjrytjdw", dwCode: "sjrytjdw",

+ 1
- 1
src/components/Template/StepComponents/ry/zy.vue View File

@ -21,7 +21,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
type:"text", type:"text",
}, },
yq:{ yq:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 1
- 1
src/components/Template/StepComponents/ry/zyhy.vue View File

@ -25,7 +25,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
fillType:"preFill", fillType:"preFill",
}, },
yq1:{ yq1:{
type:"instrument",
type:"yq",
fillType:"actFill", fillType:"actFill",
}, },
text2:{ text2:{

+ 30
- 14
src/components/Template/StepFormPackage.vue View File

@ -34,11 +34,12 @@
:item="getButtonItem(sItem)" :item="getButtonItem(sItem)"
@clickButton="(e)=>handleClickButton(e,item)" /> @clickButton="(e)=>handleClickButton(e,item)" />
</template> </template>
<!-- 仪器instrumentregent(药剂) gsp(供试品) mix药剂/供试品/给药制剂 -->
<template v-else-if="sItem.type === 'instrument' || sItem.type === 'regent' || sItem.type === 'gsp' || sItem.type === 'mix' || sItem.type === 'xb'">
<!-- 仪器instrumentsj(药剂) gsp(供试品) mix药剂/供试品/给药制剂 -->
<template v-else-if="isRegent(sItem)">
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key" <HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="clickable" @clickable="handleClickInstrument(key,sItem.type)" :error="errors[key]"
@update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="getClickableItem(sItem)"
:type="sItem.type" :error="errors[key]"
@onRegentSubmit="(data)=>onRegentSubmit(data,key,sItem)"
@update:error="errors[key] = false" :item="getRegentItem(sItem)"
:value="formFields[key]" /> :value="formFields[key]" />
</template> </template>
<template v-else-if="sItem.type === 'text'"> <template v-else-if="sItem.type === 'text'">
@ -71,7 +72,7 @@ import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js
import ZLSubPackage from '@/components/Template/StepComponents/ZLSubPackage.vue' import ZLSubPackage from '@/components/Template/StepComponents/ZLSubPackage.vue'
import { isShowOther } from "@/utils/formPackageCommon.js"; import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus"; import { EventBus } from "@/utils/eventBus";
import { getuuid } from "@/utils/index.js";
import { getuuid,isRegent} from "@/utils/index.js";
import moment from 'moment' import moment from 'moment'
export default { export default {
inject: ['templateFillType','templateData'], inject: ['templateFillType','templateData'],
@ -101,13 +102,13 @@ export default {
}, },
mounted() { mounted() {
EventBus.$on("onReagentSubmit",this.onReagentSubmit) EventBus.$on("onReagentSubmit",this.onReagentSubmit)
EventBus.$on("onInstrumentSubmit",this.onInstrumentSubmit)
EventBus.$on("onMixReagentSubmit",this.onMixReagentSubmit)
// EventBus.$on("onInstrumentSubmit",this.onInstrumentSubmit)
// EventBus.$on("onMixReagentSubmit",this.onMixReagentSubmit)
}, },
unmounted() { unmounted() {
EventBus.$off("onReagentSubmit",this.onReagentSubmit) EventBus.$off("onReagentSubmit",this.onReagentSubmit)
EventBus.$off("onInstrumentSubmit",this.onInstrumentSubmit)
EventBus.$off("onMixReagentSubmit",this.onMixReagentSubmit)
// EventBus.$off("onInstrumentSubmit",this.onInstrumentSubmit)
// EventBus.$off("onMixReagentSubmit",this.onMixReagentSubmit)
}, },
data() { data() {
return { return {
@ -118,9 +119,24 @@ export default {
isShowOther, isShowOther,
currentClickKey: "",//key currentClickKey: "",//key
uuid:getuuid(), uuid:getuuid(),
isRegent,
} }
}, },
methods: { methods: {
// ///
// onRegentSubmit(data,key,item){
// this.updateFormData(key,data.selectedId);
// this.$emit("onRegentSubmit", {selectInfo:data,key,config:item});
// },
getRegentItem(item,fieldCode="type"){
const type = item[fieldCode] ;
return {
label: "",
type,
fillType: item.subFillType || item.fillType,
parentLabel: item.label,
}
},
updateZlfzData(key,data){ updateZlfzData(key,data){
const ref = this.$refs[`zlSubPackageRef_${key}`][0]; const ref = this.$refs[`zlSubPackageRef_${key}`][0];
if(ref){ if(ref){
@ -163,7 +179,7 @@ export default {
const sjResource = [],yqResource = []; const sjResource = [],yqResource = [];
for(const key in allFieldsConfig){ for(const key in allFieldsConfig){
const item = allFieldsConfig[key]; const item = allFieldsConfig[key];
if(item.type === "xb" || item.type === "regent" || item.type === "gsp" || item.type === "mix"){
if(item.type === "xb" || item.type === "sj" || item.type === "gsp" || item.type === "mix"){
if(formFields[key]){ if(formFields[key]){
let o = { let o = {
...formFields[`selectInfo_${key}`], ...formFields[`selectInfo_${key}`],
@ -177,7 +193,7 @@ export default {
} }
sjResource.push(o); sjResource.push(o);
} }
}else if(item.type === "instrument"){
}else if(item.type === "yq"){
if(formFields[key]){ if(formFields[key]){
yqResource.push({ yqResource.push({
type:item.type, type:item.type,
@ -235,13 +251,13 @@ export default {
getClickableItem(sItem) { getClickableItem(sItem) {
return { return {
...sItem, ...sItem,
type:"clickable",
type:sItem.type,
} }
}, },
handleClickInstrument(key,type) { handleClickInstrument(key,type) {
this.currentClickKey = key; this.currentClickKey = key;
if(type === 'regent'){//
if(type === 'sj'){//
EventBus.$emit("showSelectMixReagentDialog",{ EventBus.$emit("showSelectMixReagentDialog",{
studyFormId:this.templateData.id, studyFormId:this.templateData.id,
uuid:this.uuid, uuid:this.uuid,
@ -291,7 +307,7 @@ export default {
sourceFrom:'step', sourceFrom:'step',
type:"11", type:"11",
}) })
}else if(type === 'instrument'){
}else if(type === 'yq'){
EventBus.$emit("showSelectInstrumentDialog",{ EventBus.$emit("showSelectInstrumentDialog",{
studyFormId:this.templateData.id, studyFormId:this.templateData.id,
uuid:this.uuid, uuid:this.uuid,

+ 3
- 2
src/components/Template/mixins/formPackageMixins.js View File

@ -46,6 +46,9 @@ export default {
}, },
methods: { methods: {
onSelectChange(){
},
//试剂/仪器等弹窗提交 //试剂/仪器等弹窗提交
onRegentSubmit(data,key,item){ onRegentSubmit(data,key,item){
this.updateFormData(key,data.selectedId); this.updateFormData(key,data.selectedId);
@ -219,7 +222,6 @@ export default {
selectInfoKeys.forEach(key => { selectInfoKeys.forEach(key => {
result[key] = formData[key]; result[key] = formData[key];
}) })
console.log(result,"result")
// 更新表单字段 // 更新表单字段
this.formFields = result; this.formFields = result;
this.allFieldsConfig = config; this.allFieldsConfig = config;
@ -257,7 +259,6 @@ export default {
const errors = []; const errors = [];
// 清空之前的错误状态 // 清空之前的错误状态
this.errors = {}; this.errors = {};
console.log(allFieldsConfig,formFields,"allFieldsConfig")
for (const key in allFieldsConfig) { for (const key in allFieldsConfig) {
const o = allFieldsConfig[key]; const o = allFieldsConfig[key];
if (o.otherCode) {// if (o.otherCode) {//

+ 12
- 8
src/views/business/comps/template/comps/sp/SP003.vue View File

@ -297,6 +297,7 @@ export default {
bodyPrecisionKey: "targetStartSolutionVolumePrecision", bodyPrecisionKey: "targetStartSolutionVolumePrecision",
bodyMaxlength: 10, bodyMaxlength: 10,
bodySubPlaceholder: "template.common.xswsPlaceholder", bodySubPlaceholder: "template.common.xswsPlaceholder",
headerSelectTo: "actStartSolutionVolumeUnit",
}, },
{ {
label: "template.sp.sp003.sjqsrytj", label: "template.sp.sp003.sjqsrytj",
@ -330,6 +331,7 @@ export default {
bodyPrecisionKey: "targetDiluentVolumePrecision", bodyPrecisionKey: "targetDiluentVolumePrecision",
bodyMaxlength: 10, bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数", bodySubPlaceholder: "请输入保留小数位数",
headerSelectTo: "actDiluentVolumeUnit",
}, },
{ {
label: "template.sp.sp003.sjxsytj", label: "template.sp.sp003.sjxsytj",
@ -348,20 +350,21 @@ export default {
{ {
label: "template.sp.sp003.ysmbrynd", label: "template.sp.sp003.ysmbrynd",
prop: "targetSolutionConcentration", prop: "targetSolutionConcentration",
width: 180,
showWidth: 100,
width: 210,
showWidth: 120,
headerSelectKey: "targetSolutionConcentrationUnit", headerSelectKey: "targetSolutionConcentrationUnit",
fillType: "preFill", fillType: "preFill",
headerOptions: this.getDictOptions('business_nddw'), headerOptions: this.getDictOptions('business_nddw'),
bodyType: "inputNumber", bodyType: "inputNumber",
bodyFillType: "preFill", bodyFillType: "preFill",
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectTo:"actSolutionConcentrationUnit",
}, },
{ {
label: "template.sp.sp003.sjmbrynd", label: "template.sp.sp003.sjmbrynd",
prop: "actSolutionConcentration", prop: "actSolutionConcentration",
width: 190,
showWidth: 100,
width: 210,
showWidth: 120,
headerSelectKey: "actSolutionConcentrationUnit", headerSelectKey: "actSolutionConcentrationUnit",
fillType: "preFill", fillType: "preFill",
headerOptions: this.getDictOptions('business_nddw'), headerOptions: this.getDictOptions('business_nddw'),
@ -380,20 +383,21 @@ export default {
{ {
label: "template.sp.sp003.ysmbrytj", label: "template.sp.sp003.ysmbrytj",
prop: "targetSolutionVolume", prop: "targetSolutionVolume",
width: 180,
showWidth: 100,
width: 200,
showWidth: 120,
headerSelectKey: "targetSolutionVolumeUnit", headerSelectKey: "targetSolutionVolumeUnit",
fillType: "preFill", fillType: "preFill",
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
bodyType: "inputNumber", bodyType: "inputNumber",
bodyFillType: "preFill", bodyFillType: "preFill",
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectTo:"actSolutionVolumeUnit",
}, },
{ {
label: "template.sp.sp003.sjmbrytj", label: "template.sp.sp003.sjmbrytj",
prop: "actSolutionVolume", prop: "actSolutionVolume",
width: 180,
showWidth: 100,
width: 200,
showWidth: 120,
headerSelectKey: "actSolutionVolumeUnit", headerSelectKey: "actSolutionVolumeUnit",
fillType: "preFill", fillType: "preFill",
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),

+ 10
- 6
src/views/business/comps/template/mixins/templateMixin.js View File

@ -358,8 +358,10 @@ export default {
const volume = const volume =
this.$refs.stepFormPackageRef?.getFormDataByKey( this.$refs.stepFormPackageRef?.getFormDataByKey(
'targetStartSolution' 'targetStartSolution'
) || 0
if (volume) {
)
if(isValueEmpty(volume)){
this.$message.error('请先选择预设起始源溶液浓度')
}else{
this.updateTargetStartSolutionVolume(item, volume) this.updateTargetStartSolutionVolume(item, volume)
} }
} else if ( } else if (
@ -368,9 +370,12 @@ export default {
) { ) {
//实际起始溶液体积和实际目标溶液体积 //实际起始溶液体积和实际目标溶液体积
const targetAcSolution = const targetAcSolution =
this.$refs.stepFormPackageRef?.getFormDataByKey('targetAcSolution') ||
0 //获取实际起始溶液浓度
if (targetAcSolution) {
this.$refs.stepFormPackageRef?.getFormDataByKey('targetAcSolution') //获取实际起始溶液浓度
console.log(targetAcSolution,"targetAcSolution")
if(isValueEmpty(targetAcSolution)){
this.$message.error('请先选择起始源溶液')
return
}else {
const volResult = this.updateSjmbrynd(item, targetAcSolution); const volResult = this.updateSjmbrynd(item, targetAcSolution);
if(!volResult){ if(!volResult){
return return
@ -413,7 +418,6 @@ export default {
}, },
//更新起始溶液体积时,计算目标溶液预计浓度 //更新起始溶液体积时,计算目标溶液预计浓度
updateTargetStartSolutionVolume(item, volume) { updateTargetStartSolutionVolume(item, volume) {
debugger
const precision = item.targetStartSolutionVolumePrecision || 0 const precision = item.targetStartSolutionVolumePrecision || 0
const concentration = item.targetSolutionConcentration || 0 const concentration = item.targetSolutionConcentration || 0
const targetVolume = item.targetSolutionVolume || 0 const targetVolume = item.targetSolutionVolume || 0

Loading…
Cancel
Save