Browse Source

fix:[模板管理]sp001,sp002

lkf
15881625488@163.com 2 months ago
parent
commit
23d870c57d
4 changed files with 91 additions and 97 deletions
  1. +7
    -1
      src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
  2. +2
    -16
      src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue
  3. +42
    -36
      src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue
  4. +40
    -44
      src/views/business/comps/template/comps/sp/SWYPFXRYPZB.vue

+ 7
- 1
src/views/business/comps/template/comps/gsp/MJYLQSQD.vue View File

@ -215,6 +215,7 @@ export default {
mounted() {
},
methods: {
//sywzmcgyjlgynd
init(val) {
if (val.key == 'sywzmc') {
this.filterGyjl(val, false)
@ -223,6 +224,7 @@ export default {
this.filterGynd(val, false)
}
},
//sywzmcgyjl
onSelectBlur(val) {
if (val.key == 'sywzmc' && ((!this.formData.sywzmc||this.formData.sywzmc=='') || val.type == 'save')) {
this.filterGyjl(val, true)
@ -231,6 +233,7 @@ export default {
this.filterGynd(val, true)
}
},
//gyjl
filterGyjl(val, reset) {
let that = this
let tmp = []
@ -257,6 +260,7 @@ export default {
// }, 10)
}
},
//gynd
filterGynd(val, reset) {
let tmp = []
_.forEach(_.filter(this.gyndOptionsOld, function (o) {
@ -308,6 +312,7 @@ export default {
}
})
},
//
onDialogSubmit(selectedId, currentRow) {
console.log(JSON.stringify(currentRow))
//
@ -332,7 +337,7 @@ export default {
}
this.$refs.selectReagentDialogRef.onCancel()
},
//
//
onClickSybh() {
this.$refs.selectReagentDialogRef.show(this.formData.id)
// this.$refs.baseInfoRef.setClickable("syNo", true);
@ -345,6 +350,7 @@ export default {
content.sdId = this.formData.sdId
return content;
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "remarkRef"]);
content.syId = this.formData.syId

+ 2
- 16
src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue View File

@ -15,7 +15,7 @@
<CustomTable @blur="onHandleTableBlur" :showHeaderSelect="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" :showOperation="fillType === 'actFill'" ref="stepTableRef" :columns="stepColumns"
:formData="formData" >
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
@ -62,7 +62,6 @@ export default {
},
},
computed: {
//
remarkConig() {
return [
@ -177,7 +176,6 @@ export default {
currentSubKey: "",//key
dataSource: [],
stepTableDataSource: [],
};
},
mounted() {
@ -188,21 +186,9 @@ export default {
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef","stepFormPackageRef", "remarkRef","stepTableRef"])
},
//
async getFormData() {
return await this.validFormFields(["baseInfoRef", "stepFormPackageRef","stepTableRef","remarkRef"]);
},
async onSave() {
const formData = await this.getFormData();
// const formData = await this.$refs.stepTableRef.getFormData();
console.log(formData, "formData")
},
//
addRow() {
this.$refs.stepTableRef.addRow({
startSolutionCode: "",
preparationConcentration: "",
preparationVolume: "",
})
}
}
};

+ 42
- 36
src/views/business/comps/template/comps/sp/SWYPFXCBYPZB.vue View File

@ -6,27 +6,26 @@
$t('template.sp.sp002.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" ref="baseInfoRef"
:formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns"
:dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqsColumns"
:dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef"
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqsColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">标签打印</el-button>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" ref="remarkRef" :formConfig="remarkConig"
:formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click = "onSave">保存</button> -->
</div>
</template>
@ -38,6 +37,7 @@ import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
export default {
name: "SWYPFXCBYPZB",
@ -50,6 +50,7 @@ export default {
},
},
computed: {
//
storageFormConfig() {
return [
{
@ -67,6 +68,7 @@ export default {
}
];
},
//
remarkConig() {
return [
{
@ -85,7 +87,7 @@ export default {
}
]
},
//
baseInfoFormConfig() {
return [
{
@ -111,7 +113,7 @@ export default {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
prepend:"V",
prepend: "V",
maxlength: 50
},
@ -155,6 +157,7 @@ export default {
}
]
},
//
stepFormConfig() {
return [
{
@ -182,7 +185,7 @@ export default {
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
selectTo:"targetActConcentrationUnit",//
selectTo: "targetActConcentrationUnit",//
},
targetActConcentration: {
label: 'template.common.targetActConcentration',
@ -204,7 +207,7 @@ export default {
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10,
selectTo:"targetActVolumeUnit",//
selectTo: "targetActVolumeUnit",//
},
targetActVolume: {
label: 'template.common.targetActVolume',
@ -250,35 +253,45 @@ export default {
formData: {
immediate: true,
handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
if (!v.targetCodeSn && this.fillType === "actFill") {
this.getCode();
}
}
}
},
methods: {
//
printTag() {
const printConfig = this.getBasePrintConfig();
const { storageCondition, targetCodeSn } = this.formData;
printConfig["存储条件"] = storageCondition;
printConfig["编号"] = targetCodeSn;
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
async getCode(){
async getCode() {
const result = await getLatestSn({
count: 1,
})
if(result.code == 200){
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data[0])
if (result.code == 200) {
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0])
}
},
//
getFilledFormData(){
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
if(this.fillType === "actFill"){
if (this.fillType === "actFill") {
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode+content.targetCodeSn,
bh: content.targetCode + content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
@ -288,22 +301,15 @@ export default {
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
syldw:content.targetActVolumeUnit,
yxzq:content.effectivePeriod,
yxzqdw:content.effectivePeriodUnit,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
}
//使
this.resourceTmp=tmpResource
this.resourceTmp = tmpResource
return content;
},
async onSave() {
const formData = await this.getFilledFormData();
console.log(formData, "formData")
},
}
}
};
</script>

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

@ -3,32 +3,29 @@
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
$t('template.sp.sp001.title') }}<img src="@/assets/images/detail-title.png" /></div>
$t('template.sp.sp001.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" ref="baseInfoRef"
:formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns"
:dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqsColumns"
:dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef"
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqsColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<el-button class="print-btn" v-if = "fillType === 'actFill'" type="primary" @click="printTag">标签打印</el-button>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">标签打印</el-button>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" ref="remarkRef" :formConfig="remarkConig"
:formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click = "onSave">保存</button> -->
</div>
</template>
@ -41,6 +38,7 @@ import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
export default {
name: "Sp001",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable },
@ -52,6 +50,7 @@ export default {
},
},
computed: {
//
storageFormConfig() {
return [
{
@ -64,11 +63,11 @@ export default {
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
//
remarkConig() {
return [
{
@ -87,7 +86,7 @@ export default {
}
]
},
//
baseInfoFormConfig() {
return [
{
@ -113,7 +112,7 @@ export default {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
prepend:"V",
prepend: "V",
maxlength: 50
},
@ -158,6 +157,7 @@ export default {
}
]
},
//
stepFormConfig() {
return [
{
@ -185,7 +185,7 @@ export default {
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
selectTo:"targetActConcentrationUnit",//
selectTo: "targetActConcentrationUnit",//
},
targetActConcentration: {
label: 'template.common.targetActConcentration',
@ -207,7 +207,7 @@ export default {
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10,
selectTo:"targetActVolumeUnit",//
selectTo: "targetActVolumeUnit",//
},
targetActVolume: {
label: 'template.common.targetActVolume',
@ -251,43 +251,45 @@ export default {
formData: {
immediate: true,
handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
if (!v.targetCodeSn && this.fillType === "actFill") {
this.getCode();
}
}
}
},
methods: {
printTag(){
//
printTag() {
const printConfig = this.getBasePrintConfig();
const {storageCondition,targetCodeSn} = this.formData;
const { storageCondition, targetCodeSn } = this.formData;
printConfig["存储条件"] = storageCondition;
printConfig["编号"] = targetCodeSn;
printConfig["编号"] = targetCodeSn;
EventBus.$emit('showTagPrintDialog', {printConfig})
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
async getCode(){
async getCode() {
const result = await getLatestSn({
count: 1,
})
if(result.code == 200){
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data[0])
if (result.code == 200) {
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0])
}
},
//
getFilledFormData(){
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
if(this.fillType === "actFill"){
if (this.fillType === "actFill") {
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode+content.targetCodeSn,
bh: content.targetCode + content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
@ -297,22 +299,15 @@ export default {
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
syldw:content.targetActVolumeUnit,
yxzq:content.effectivePeriod,
yxzqdw:content.effectivePeriodUnit,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
}
//使
this.resourceTmp=tmpResource
this.resourceTmp = tmpResource
return content;
},
async onSave() {
const formData = await this.validFormFields(["stepRef"]);
console.log(formData, "formData")
},
}
};
</script>
@ -320,7 +315,8 @@ export default {
.mt-20 {
margin-top: 20px;
}
.print-btn{
.print-btn {
margin-bottom: 20px;
}
</style>

Loading…
Cancel
Save