Browse Source

feat:[模板管理][update]

luojie
luojie 3 weeks ago
parent
commit
f838632c14
3 changed files with 75 additions and 28 deletions
  1. +1
    -1
      src/components/Template/HandleFormItem.vue
  2. +48
    -27
      src/components/Template/StepComponents/pcr/hsypfz.vue
  3. +26
    -0
      src/components/Template/mixins/stepMixins.js

+ 1
- 1
src/components/Template/HandleFormItem.vue View File

@ -1202,7 +1202,7 @@ console.log("fillll")
if (!isOldValueEmpty && !(isSame) && (this.templateFillType === "actFill" || this.templateFillType === "blxjsh")&&this.type !== "attachment") {
console.log("需要电子签名")
// EventBus
// EventBus.$emit('showEditSignDialog', { uuid: this.uuid });
EventBus.$emit('showEditSignDialog', { uuid: this.uuid });
} else {//
this.handleUpdateRecord()
}

+ 48
- 27
src/components/Template/StepComponents/pcr/hsypfz.vue View File

@ -1,6 +1,7 @@
<!-- 核酸样品分装 -->
<template>
<StepFormPackage @clickButton="onHandleClickButton" ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'pcr_hsypfz'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage @clickButton="onHandleClickButton" ref="stepFormPackageRef" :prefixKey="stepIndex + '_' + 'pcr_hsypfz'"
@resetRecord="resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
@ -10,14 +11,33 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'hsypfz',
},
},
sn: {
type: String,
default: 'hsypfz',
},
},
components: {
StepFormPackage
},
mounted() {
this.getCode();
},
methods: {
async getCode() {
const { lbbhCode } = this.formData;
if (this.templateFillType === 'actFill') {
const stepFormData = this.getFilledFormData();
const { lbbh } = stepFormData;
const result = await this.getLatestSn({
count: 1,
type: 1,
pre: lbbh,
})
this.$refs.stepFormPackageRef.updateFormData("lbbhCode",result[0])
console.log(result,"reee")
}
}
},
computed: {
formConfig() {
return [{
@ -42,61 +62,62 @@ export default {
label: "吸取到离心管中,其体积预计为",
type: "text",
},
yjtj:{
yjtj: {
fillType: "preFill",
type: "inputNumber",
},
yjtjdw:{
yjtjdw: {
fillType: "preFill",
type: "select",
selectTo: "sjtjdw",
options:this.getDictOptions('business_tjdw'),
options: this.getDictOptions('business_tjdw'),
},
text4:{
text4: {
label: "实际体积为",
type: "text",
},
sjtj:{
sjtj: {
fillType: "actFill",
type: "inputNumber",
compareTo:"yjtj",
copyFrom:"yjtj"
compareTo: "yjtj",
copyFrom: "yjtj"
},
sjtjdw:{
sjtjdw: {
fillType: "preFill",
type: "select",
options:this.getDictOptions('business_tjdw'),
options: this.getDictOptions('business_tjdw'),
},
text5:{
text5: {
label: "其编号为",
type: "text",
},
lbbh:{
lbbh: {
fillType: "preFill",
type: "input",
},
text6:{
text6: {
label: "-",
type: "text",
},
//todo :
lbbhCode:{
lbbhCode: {
fillType: "actFill",
type: "input",
disabled: true,
},
text7:{
text7: {
label: ",进行分装",
type: "text",
},
//todo :
fzbutton:{
type:"button",
fzbutton: {
type: "button",
fillType: "actFill",
fzType:"step",
buttonName:"分装",
maxVolumeField:"sjtj",
maxVolumeUnitField:"sjtjdw",
myCodeFields:["lbbh","lbbhCode"],
fzType: "step",
buttonName: "分装",
maxVolumeField: "sjtj",
maxVolumeUnitField: "sjtjdw",
myCodeFields: ["lbbh", "lbbhCode"],
},
}
}]

+ 26
- 0
src/components/Template/mixins/stepMixins.js View File

@ -1,6 +1,8 @@
import { getuuid } from '@/utils/index.js';
import { EventBus } from "@/utils/eventBus";
import { getLatestSn, getLatestSnArr } from '@/api/template';
export default {
inject: ['templateFillType'],
dicts: [
"business_tjdw", "business_czhj", "business_rqcz", "business_zldw",
"business_yqscdw", "business_zsdw", "business_wddw", "business_ccwz", "business_ggdw",
@ -20,6 +22,7 @@ export default {
data() {
return {
uuid: getuuid(),
fzInfo:null,
}
},
mounted() {
@ -34,7 +37,29 @@ export default {
EventBus.$off("dialogSubPackageSubmit")
EventBus.$off("subPackageDialogPrintTag")
},
methods: {
//获取最新的多个编号
async getLatestSnArr(params) {
const res = await getLatestSnArr(params)
if (res.code === 200) {
return res.data
}
return []
},
async getLatestSn(params) {
const defaultParams = {
count: 1,
type:1,
pre: '',
}
const finalParams = {...defaultParams, ...params}
const res = await getLatestSn(finalParams)
if (res.code === 200) {
return res.data
}
return []
},
// 打印标签
onPrintTag(data) {
this.$emit("printTag")
@ -42,6 +67,7 @@ export default {
onSubPackageSubmit(data) {
if (data.uuid === this.uuid) {
console.log(data, "ddd")
this.fzInfo = data;
//通知后端保存数据
const params = {
type: "fieldChanged",

Loading…
Cancel
Save