Browse Source

feat:[模板管理][烦人的提交记录]

lkf
luojie 2 months ago
parent
commit
c710e5dea3
10 changed files with 249 additions and 252 deletions
  1. +1
    -2
      src/components/Template/Step.vue
  2. +3
    -3
      src/components/Template/StepComponents/ry/cs.vue
  3. +2
    -0
      src/components/Template/StepComponents/ry/jd.vue
  4. +209
    -213
      src/components/Template/StepComponents/ry/tpjysd.vue
  5. +2
    -2
      src/components/Template/StepFormPackage.vue
  6. +0
    -1
      src/views/business/comps/select/SelectTemplateDialog.vue
  7. +1
    -1
      src/views/business/comps/template/comps/sp/SP001.vue
  8. +2
    -1
      src/views/business/comps/template/comps/sp/SP003.vue
  9. +2
    -2
      src/views/business/comps/template/comps/sp/SP00456.vue
  10. +27
    -27
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js

+ 1
- 2
src/components/Template/Step.vue View File

@ -15,7 +15,7 @@
<component class="flex1" :is="getStepComponent(step.type)" :formData="step.formData"
@update="onFormUpdate(index, $event)" :ref="'stepCompRef_' + index">
</component>
<div class="step-header-item">
<div v-if="templateFillType === 'preFill'" class="step-header-item">
<el-popconfirm
@confirm="removeStep(index)"
title="确定删除当前步骤吗?"
@ -23,7 +23,6 @@
<el-button type="text" slot="reference" icon="el-icon-delete"
class="delete-btn"></el-button>
</el-popconfirm>
</div>
</div>
</div>

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

@ -53,7 +53,7 @@ export default {
},
yjscdw: {
type: "select",
options: this.getDictOptions("business_tjdw"),
options: this.getDictOptions("business_yqscdw"),
selectTo: "sjscdw",
fillType: "preFill",
},
@ -63,13 +63,13 @@ export default {
},
sjsc: {
type: "inputNumber",
fillType: "preFill",
fillType: "actFill",
compareTo: "yjsc",
copyFrom: "yjsc",
},
sjscdw: {
type: "select",
options: this.getDictOptions("business_tjdw"),
options: this.getDictOptions("business_yqscdw"),
fillType: "preFill",
},
text6: {

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

@ -75,12 +75,14 @@ export default {
options: this.getDictOptions("business_wddw"),
fillType: "actFill",
otherCode: "sjwdOther",
compareTo: "yjwd",
},
sjhj: {
type: "select",
options: this.getDictOptions("business_hjxx"),
fillType: "actFill",
otherCode: "sjhjOther",
compareTo: "yjhj",
},
text6: {
label: ",放置",

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

@ -1,230 +1,226 @@
<!-- 天平校验(双点) -->
<template>
<StepFormPackage
ref = "stepFormPackageRef" prefixKey="ry_tpjysd" @resetRecord = "resetRecord"
@clickButton="handleClickButton"
:form-config="formConfig" :formData = "formData" />
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_tpjysd" @resetRecord="resetRecord"
@clickButton="handleClickButton" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config:{
text1:{
label:"校验天平编号为",
type:"text",
},
ddsys:{
type:"instrument",
fillType:"actFill",
},
}
},
export default {
mixins: [stepMixins],
components: {
StepFormPackage
},
computed: {
formConfig() {
return [{
config: {
text1: {
label: "校验天平编号为",
type: "text",
},
ddsys: {
type: "instrument",
fillType: "actFill",
},
}
},
{
config:{
dfmtext1:{
label:"低砝码校验:",
type:"text",
},
dfmtext2:{
label:"皮重显示值为",
type:"text",
},
dfmpz:{
type:"inputNumber",
fillType:"actFill",
disabled:true,
},
dfmbutton1:{
type:"button",
buttonName:"获取值",
},
dfmtext3:{
label:",标准砝码编号为",
type:"text",
},
dfmsjsr1:{
type:"input",
fillType:"actFill",
},
dfmtext4:{
label:",标准砝码实际值为",
type:"text",
},
dfmsjsr2:{
type:"inputNumber",
fillType:"actFill",
},
dfmsjsrdw2:{
type:"select",
fillType:"actFill",
options:this.getDictOptions("business_zldw")
},
dfmtext5:{
label:"标准砝码修正值为",
type:"text",
},
dfmsjsr3:{
type:"inputNumber",
fillType:"actFill",
},
dfmsjsrdw3:{
type:"select",
fillType:"actFill",
options:this.getDictOptions("business_zldw")
},
dfmtext6:{
label:",标准砝码显示值为",
type:"text",
},
dfmfmz:{
type:"inputNumber",
fillType:"actFill",
disabled:true,
},
dfmbutton2:{
type:"button",
buttonName:"获取值",
},
dfmtext7:{
label:"允许的偏差范围为±",
type:"text",
},
dfmsjsr4:{
type:"inputNumber",
fillType:"actFill",
},
dfmsjsrdw4:{
type:"select",
fillType:"actFill",
options:this.getDictOptions("business_zldw")
},
dfmtext8:{
label:",结果判定",
type:"text",
},
dfmjgpd:{
label:"通过/不通过",
type:"span",
}
config: {
dfmtext1: {
label: "低砝码校验:",
type: "text",
},
dfmtext2: {
label: "皮重显示值为",
type: "text",
},
dfmpz: {
type: "inputNumber",
fillType: "actFill",
disabled: true,
},
dfmbutton1: {
type: "button",
buttonName: "获取值",
},
dfmtext3: {
label: ",标准砝码编号为",
type: "text",
},
dfmsjsr1: {
type: "input",
fillType: "actFill",
},
dfmtext4: {
label: ",标准砝码实际值为",
type: "text",
},
dfmsjsr2: {
type: "inputNumber",
fillType: "actFill",
},
dfmsjsrdw2: {
type: "select",
fillType: "actFill",
options: this.getDictOptions("business_zldw")
},
dfmtext5: {
label: "标准砝码修正值为",
type: "text",
},
dfmsjsr3: {
type: "inputNumber",
fillType: "actFill",
},
dfmsjsrdw3: {
type: "select",
fillType: "actFill",
options: this.getDictOptions("business_zldw")
},
dfmtext6: {
label: ",标准砝码显示值为",
type: "text",
},
dfmfmz: {
type: "inputNumber",
fillType: "actFill",
disabled: true,
},
dfmbutton2: {
type: "button",
buttonName: "获取值",
},
dfmtext7: {
label: "允许的偏差范围为±",
type: "text",
},
dfmsjsr4: {
type: "inputNumber",
fillType: "actFill",
},
dfmsjsrdw4: {
type: "select",
fillType: "actFill",
options: this.getDictOptions("business_zldw")
},
dfmtext8: {
label: ",结果判定",
type: "text",
},
dfmjgpd: {
label: "通过/不通过",
type: "span",
}
},
{
config:{
text1:{
label:"高砝码校验:",
type:"text",
},
text2:{
label:"皮重显示值为",
type:"text",
},
pz:{
type:"inputNumber",
fillType:"actFill",
disabled:true,
},
button1:{
type:"button",
buttonName:"获取值",
},
text3:{
label:",标准砝码编号为",
type:"text",
},
sjsr1:{
type:"input",
fillType:"actFill",
},
text4:{
label:",标准砝码实际值为",
type:"text",
},
sjsr2:{
type:"inputNumber",
fillType:"actFill",
},
sjsrdw2:{
type:"select",
fillType:"actFill",
options:this.getDictOptions("business_zldw")
},
text5:{
label:"标准砝码修正值为",
type:"text",
},
sjsr3:{
type:"inputNumber",
fillType:"actFill",
},
sjsrdw3:{
type:"select",
fillType:"actFill",
options:this.getDictOptions("business_zldw")
},
text6:{
label:",标准砝码显示值为",
type:"text",
},
fmz:{
type:"inputNumber",
fillType:"actFill",
disabled:true,
},
button2:{
type:"button",
buttonName:"获取值",
},
text7:{
label:"允许的偏差范围为±",
type:"text",
},
sjsr4:{
type:"inputNumber",
fillType:"actFill",
},
sjsrdw4:{
type:"select",
fillType:"actFill",
options:this.getDictOptions("business_zldw")
},
text8:{
label:",结果判定",
type:"text",
},
jgpd:{
label:"通过/不通过",
type:"span",
},
text9:{
label:"。",
type:"text",
}
}
},
{
config: {
text1: {
label: "高砝码校验:",
type: "text",
},
text2: {
label: "皮重显示值为",
type: "text",
},
pz: {
type: "inputNumber",
fillType: "actFill",
disabled: true,
},
button1: {
type: "button",
buttonName: "获取值",
},
text3: {
label: ",标准砝码编号为",
type: "text",
},
sjsr1: {
type: "input",
fillType: "actFill",
},
text4: {
label: ",标准砝码实际值为",
type: "text",
},
sjsr2: {
type: "inputNumber",
fillType: "actFill",
},
sjsrdw2: {
type: "select",
fillType: "actFill",
options: this.getDictOptions("business_zldw")
},
text5: {
label: "标准砝码修正值为",
type: "text",
},
sjsr3: {
type: "inputNumber",
fillType: "actFill",
},
sjsrdw3: {
type: "select",
fillType: "actFill",
options: this.getDictOptions("business_zldw")
},
text6: {
label: ",标准砝码显示值为",
type: "text",
},
fmz: {
type: "inputNumber",
fillType: "actFill",
disabled: true,
},
button2: {
type: "button",
buttonName: "获取值",
},
text7: {
label: "允许的偏差范围为±",
type: "text",
},
sjsr4: {
type: "inputNumber",
fillType: "actFill",
},
sjsrdw4: {
type: "select",
fillType: "actFill",
options: this.getDictOptions("business_zldw")
},
text8: {
label: ",结果判定",
type: "text",
},
jgpd: {
label: "通过/不通过",
type: "span",
},
text9: {
label: "。",
type: "text",
}
}
}
]
}
},
methods: {
handleClickButton(key){
console.log(key)
}
}
},
methods: {
handleClickButton(key) {
console.log(key)
}
}
}
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

+ 2
- 2
src/components/Template/StepFormPackage.vue View File

@ -154,9 +154,9 @@ export default {
const {buttonName = ""} = e;
const {config} = item;
if(buttonName === '开始' && config.hasOwnProperty("startDate")){
this.formFields["startDate"] = moment().format('YYYY-MM-DD HH:mm:ss');
this.updateFormData("startDate",moment().format('YYYY-MM-DD HH:mm:ss'))
}else if(buttonName === '结束' && config.hasOwnProperty("endDate")){
this.formFields["endDate"] = moment().format('YYYY-MM-DD HH:mm:ss');
this.updateFormData("endDate",moment().format('YYYY-MM-DD HH:mm:ss'))
}
this.$emit("clickButton",e,item)
},

+ 0
- 1
src/views/business/comps/select/SelectTemplateDialog.vue View File

@ -105,7 +105,6 @@ export default {
handleSelect() {
let that = this
let _index = _.findIndex(this.list, function (item) { return item.id == that.selectedId })
debugger
this.$emit('callback', this.list[_index]);
this.open = false
}

+ 1
- 1
src/views/business/comps/template/comps/sp/SP001.vue View File

@ -27,7 +27,7 @@
</div>
</div>
</div>
<button @click="onSave">保存</button>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>

+ 2
- 1
src/views/business/comps/template/comps/sp/SP003.vue View File

@ -380,6 +380,7 @@ export default {
bodyPrecisionKey: "actSolutionConcentrationPrecision",
bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数",
compareTo: "targetSolutionConcentration",//
},
{
label: "template.sp.sp003.ysmbrytj",
@ -409,6 +410,7 @@ export default {
bodyPrecisionKey: "actSolutionVolumePrecision",
bodyMaxlength: 10,
bodySubPlaceholder: "请输入保留小数位数",
compareTo: "targetSolutionVolume",//
},
]
},
@ -564,7 +566,6 @@ export default {
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
debugger
if (this.fillType === "actFill") {
//
let tableList = content.stepTableFormData

+ 2
- 2
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -32,7 +32,7 @@
@resetRecord="(e) => resetRecord('ladder', ladderIndex, e)"
@onSureModifyRecord="(e) => onSureModifyRecord('ladder', ladderIndex, e)"
:ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig"
@blur="onHandleBlur" :formData="ladderConfig" fieldItemLabel="阶梯配制"
:formData="ladderConfig" fieldItemLabel="阶梯配制"
:prefixKey="'ladder_' + ladderIndex" />
<CustomTable @blur="(e) => onHandleTableBlur('ladder', ladderIndex, e)"
:ref="`ladderStepTableRef_${ladderIndex}`" :columns="ladderStepColumns"
@ -66,7 +66,7 @@
</div>
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)"
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
@blur="onHandleBlur" :formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
fieldItemLabel="平行配制" />
<CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)"
:ref="`paralleStepTableRef_${paralleIndex}`" :columns="paralleStepColumns"

+ 27
- 27
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -8,7 +8,7 @@ export const getLadderColumnsConfig = ($this) => {
bodySubType: 'span',
bodySubKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
width: 180,
width: 280,
myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段
maxVolumeField: "actSolutionVolume",//分装的最大量字段
maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段
@ -16,7 +16,7 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.qsrybh',
prop: 'startSolutionCode',
width: 180,
width: 280,
bodyType: 'input',
bodyFillType: 'actFill',
bodyMaxlength: 10
@ -24,7 +24,7 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.ysqsrytj',
prop: 'targetStartSolutionVolume',
width: 180,
width: 280,
headerSelectKey: 'targetStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
@ -42,7 +42,7 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.sjqsrytj',
prop: 'actStartSolutionVolume',
width: 180,
width: 280,
headerSelectKey: 'actStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
@ -55,7 +55,7 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.ysxsytj',
prop: 'targetDiluentVolume',
width: 180,
width: 280,
headerSelectKey: 'targetDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
@ -74,20 +74,20 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.sjxsytj',
prop: 'actDiluentVolume',
width: 180,
width: 280,
headerSelectKey: 'actDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
// copyFrom: 'targetDiluentVolume', //复制哪个字段
copyFrom: 'targetDiluentVolume', //复制哪个字段
compareTo: 'targetDiluentVolume', //比较哪个字段
},
{
label: 'template.sp.sp00456.ysmbrynd',
prop: 'targetSolutionConcentration',
width: 180,
width: 280,
headerSelectKey: 'targetSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
@ -98,7 +98,7 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.sjmbrynd',
prop: 'actSolutionConcentration',
width: 180,
width: 280,
headerSelectKey: 'actSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
@ -118,7 +118,7 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.ysmbrytj',
prop: 'targetSolutionVolume',
width: 180,
width: 280,
headerSelectKey: 'targetSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
@ -129,7 +129,7 @@ export const getLadderColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.sjmbrytj',
prop: 'actSolutionVolume',
width: 180,
width: 280,
headerSelectKey: 'actSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
@ -143,7 +143,7 @@ export const getLadderColumnsConfig = ($this) => {
bodyPrecisionKey: 'actSolutionVolumePrecision',
bodyMaxlength: 10,
copyFrom: 'targetSolutionVolume', //复制哪个字段
// copyFrom: 'targetSolutionVolume', //复制哪个字段
bodySubPlaceholder: 'template.common.xswsPlaceholder',
compareTo: 'targetSolutionVolume', //比较哪个字段
}
@ -169,12 +169,12 @@ export const getParallelColumnsConfig = ($this) => {
myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段
maxVolumeField: "actSolutionVolume",//分装的最大量字段
maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段
width: 120
width: 280
},
{
label: 'template.sp.sp00456.ysmbrynd',
prop: 'targetSolutionConcentration',
width: 180,
width: 280,
headerSelectKey: 'targetSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
@ -185,7 +185,7 @@ export const getParallelColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.sjmbrynd',
prop: 'actSolutionConcentration',
width: 180,
width: 280,
headerSelectKey: 'actSolutionConcentrationUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
@ -204,7 +204,7 @@ export const getParallelColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.ysmbrytj',
prop: 'targetSolutionVolume',
width: 180,
width: 280,
headerSelectKey: 'targetSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
@ -215,7 +215,7 @@ export const getParallelColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.sjmbrytj',
prop: 'actSolutionVolume',
width: 180,
width: 280,
headerSelectKey: 'actSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
@ -234,7 +234,7 @@ export const getParallelColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.mbryyxzq',
prop: 'targetSolutionCycle',
width: 180,
width: 280,
fillType: 'preFill',
bodyType: 'inputNumber',
bodySubType: 'select',
@ -248,20 +248,20 @@ export const getParallelColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.mbrysxr',
prop: 'targetSolutionExpirationDate',
width: 160,
width: 180,
bodyType: 'span'
},
{
label: 'template.sp.sp00456.ysysrybh',
prop: 'startSolutionCode',
width: 160,
width: 280,
bodyType: 'input',
bodyFillType: 'preFill'
},
{
label: 'template.sp.sp00456.sjysrybh',
prop: 'actStartSolutionCode',
width: 250,
width: 280,
bodyType: 'clickable',
bodyFillType: 'actFill',
compareTo: 'startSolutionCode', //比较哪个字段
@ -269,7 +269,7 @@ export const getParallelColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.ysysrynd',
prop: 'targetStartSolutionConcentration',
width: 160,
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodySubType: 'select',
@ -282,7 +282,7 @@ export const getParallelColumnsConfig = ($this) => {
{
label: 'template.sp.sp00456.sjysrynd',
prop: 'targetAcSolution',
width: 160,
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyDisabled: true,
@ -294,7 +294,7 @@ export const getParallelColumnsConfig = ($this) => {
headerSelectKey: 'targetStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 160,
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodySubType: 'inputNumber',
@ -315,7 +315,7 @@ export const getParallelColumnsConfig = ($this) => {
headerSelectKey: 'actStartSolutionVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 160,
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
@ -329,7 +329,7 @@ export const getParallelColumnsConfig = ($this) => {
headerSelectKey: 'preDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 160,
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodySubType: 'inputNumber',
@ -347,7 +347,7 @@ export const getParallelColumnsConfig = ($this) => {
headerSelectKey: 'actDiluentVolumeUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
width: 160,
width: 280,
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,

Loading…
Cancel
Save