diff --git a/src/api/business/study/studyFormFill.js b/src/api/business/study/studyFormFill.js index 94d27bd..5c34342 100644 --- a/src/api/business/study/studyFormFill.js +++ b/src/api/business/study/studyFormFill.js @@ -111,6 +111,14 @@ export function studyFormFill_tj(data) { data: data }) } +//药剂存储 +export function studyFormFill_yjcc(data) { + return request({ + url: '/system/business/studyFormFill/yjcc', + method: 'post', + data: data + }) +} //观察 export function studyFormFill_gc(data) { diff --git a/src/lang/en.js b/src/lang/en.js index 3d56934..9ab1bff 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -77,7 +77,8 @@ export default { timeOutContent: 'The login status has expired. You can enter your password to access the page, or cancel', timeOutEnter: 'Enter', - timeOutTip: 'Invalid Session, Or Session Has Expired. Please Log In Again.' + timeOutTip: 'Invalid Session, Or Session Has Expired. Please Log In Again.', + enterPage: 'Enter Page' }, form: { search: 'Search', diff --git a/src/lang/en/business/study/studyFormFill.js b/src/lang/en/business/study/studyFormFill.js index 25fafca..4abb26f 100644 --- a/src/lang/en/business/study/studyFormFill.js +++ b/src/lang/en/business/study/studyFormFill.js @@ -73,5 +73,6 @@ export default { fztgjj: 'Approve/Reject Record Abolition', ysy: 'Reviewed', bcjl:'Save', - txbbc:'Fill In And Save' + txbbc:'Fill In And Save', + yjcc:'药剂存储' } diff --git a/src/lang/en/template/commonTemplate.js b/src/lang/en/template/commonTemplate.js index edff819..550f11f 100644 --- a/src/lang/en/template/commonTemplate.js +++ b/src/lang/en/template/commonTemplate.js @@ -11,6 +11,13 @@ export default { operationSteps: 'Operation Workflow', remark: 'Comments', step: 'Step', + bqdy: 'Label Print', + + //平行配制,阶梯配制 + xzpxpz:'新增平行配制', + pxpz:'平行配制', + xzjtpz:'新增阶梯配制', + jtpz:'阶梯配制', // 字段标签 storageConditionLabel: 'Storage Condition', @@ -39,6 +46,7 @@ export default { // 按钮 saveBtn: 'Save', + deleteBtn: 'Delete', // 错误提示 addStepError: 'Please add steps', diff --git a/src/lang/en/template/gsp.js b/src/lang/en/template/gsp.js index 56bb167..85e0514 100644 --- a/src/lang/en/template/gsp.js +++ b/src/lang/en/template/gsp.js @@ -30,5 +30,9 @@ export default { dwpjtz:'Average Body Weight', dwsl:'Number', }, + // 毒麻药品配制记录表 + DMYPPZJLB:{ + title: '毒麻药品配制记录表', + } } diff --git a/src/lang/zh.js b/src/lang/zh.js index 6572be8..c336a75 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -74,7 +74,8 @@ export default { crowdOut: '该账户已在其他地方登录,是否继续登录,继续登录挤掉原登录账号', timeOutContent: '登录状态已过期,您可以输入密码进入页面,或者取消', timeOutEnter: '进入页面', - timeOutTip: '无效的会话,或者会话已过期,请重新登录。' + timeOutTip: '无效的会话,或者会话已过期,请重新登录。', + enterPage: '进入页面' }, form: { search: '查询', diff --git a/src/lang/zh/business/study/drug.js b/src/lang/zh/business/study/drug.js index e5374ad..c6a249e 100644 --- a/src/lang/zh/business/study/drug.js +++ b/src/lang/zh/business/study/drug.js @@ -36,7 +36,7 @@ export default { jd: '解档', js: '解锁', - create: '创建精药文件夹', + create: '创建麻精药文件夹', inputName: '请输入名称', inputSn: '请输入编号', inputLeader: '请选择负责人', diff --git a/src/lang/zh/business/study/studyFormFill.js b/src/lang/zh/business/study/studyFormFill.js index 8cea015..fd76c40 100644 --- a/src/lang/zh/business/study/studyFormFill.js +++ b/src/lang/zh/business/study/studyFormFill.js @@ -74,5 +74,6 @@ export default { fztgjj: '废止通过/拒绝', ysy: '已审阅', bcjl:'保存记录', - txbbc:'填写并保存' + txbbc:'填写并保存', + yjcc:'药剂存储' } diff --git a/src/lang/zh/template/commonTemplate.js b/src/lang/zh/template/commonTemplate.js index 6df59fb..fe037a2 100644 --- a/src/lang/zh/template/commonTemplate.js +++ b/src/lang/zh/template/commonTemplate.js @@ -11,7 +11,14 @@ export default { operationSteps: '操作步骤', step: '步骤', remark: '备注', + bqdy: '标签打印', + //平行配制,阶梯配制 + xzpxpz:'新增平行配制', + pxpz:'平行配制', + xzjtpz:'新增阶梯配制', + jtpz:'阶梯配制', + // 字段标签 storageConditionLabel: '存储条件', testName: '试验名称', @@ -40,6 +47,7 @@ export default { // 按钮 saveBtn: '保存', + deleteBtn: '刪除', // 错误提示 addStepError: '请添加步骤', diff --git a/src/lang/zh/template/gsp.js b/src/lang/zh/template/gsp.js index c6c842c..ee57399 100644 --- a/src/lang/zh/template/gsp.js +++ b/src/lang/zh/template/gsp.js @@ -30,5 +30,9 @@ export default { dwpjtz:'动物平均体重', dwsl:'动物数量', }, - + // 毒麻药品配制记录表 + DMYPPZJLB:{ + title: '毒麻药品配制记录表', + + } } diff --git a/src/utils/menu.js b/src/utils/menu.js index 9d7e00f..82a0161 100644 --- a/src/utils/menu.js +++ b/src/utils/menu.js @@ -20,7 +20,7 @@ let menuObj = { 档案管理: 'Archive', 试验档案管理: 'Study Archive', 非试验档案管理: 'Non-study Archive', - 麻精药配置档案管理: 'Drug Archive', + 麻精药配制档案管理: 'Drug Archive', 供试品档案管理: 'Test Item Archive', 给药制剂档案管理: 'Formulation Archive', 麻精药档案管理: 'Controlled Drug Archive', diff --git a/src/views/business/comps/select/SelectTemplate.vue b/src/views/business/comps/select/SelectTemplate.vue index 526d5dc..c3e9cb5 100644 --- a/src/views/business/comps/select/SelectTemplate.vue +++ b/src/views/business/comps/select/SelectTemplate.vue @@ -29,6 +29,10 @@ export default { type: Number, default: 0 }, + studyType: { + type: Number, + default: 20 + }, }, watch: { value: { @@ -57,7 +61,7 @@ export default { methods: { showSelectTemplate(){ if(!this.disabled){ - this.$refs.selectTemplateDialog.show({needPre:this.needPre}) + this.$refs.selectTemplateDialog.show({needPre:this.needPre,studyType:this.studyType}) } }, handleChange(obj) { diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue index 36fdb55..3c0a7f7 100644 --- a/src/views/business/comps/template/TemplateTable.vue +++ b/src/views/business/comps/template/TemplateTable.vue @@ -42,8 +42,11 @@ import SP017 from "./comps/sp/SWYPFXFFXYPZBB/SP017.vue"; import SP018 from "./comps/sp/SWYPFXFFXYPZBB/SP018.vue"; import Demo from "./comps/sp/Demo.vue"; //供试品 + +//试验物质配制计划表/麻精药领取申请单/毒麻药品配制记录表 import SYWZPZJHB from "./comps/gsp/SYWZPZJHB.vue"; import MJYLQSQD from "./comps/gsp/MJYLQSQD.vue"; +import DMYPPZJLB from "./comps/gsp/DMYPPZJLB.vue"; // PCR import PCR001 from "./comps/pcr/PCR001.vue"; @@ -54,8 +57,9 @@ export default { components: { Demo, SubPackageDialog, TagPrintDialog, SelectReagentDialog, SelectInstrumentDialog, SelectMixReagentDialog, EditSign, + //试验物质配制计划表/麻精药领取申请单/毒麻药品配制记录表 + MJYLQSQD, SYWZPZJHB, DMYPPZJLB, //供试品 - MJYLQSQD, SYWZPZJHB, //色谱 SP001, SP002, SP003, SP00456,SP007, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018, // PCR @@ -104,8 +108,10 @@ export default { 'SP017': 'SP017', 'SP018': 'SP018', //供试品 + //试验物质配制计划表/麻精药领取申请单/毒麻药品配制记录表 'SYWZPZJHB': 'SYWZPZJHB', 'MJYLQSQD': 'MJYLQSQD', + 'DMYPPZJLB': 'DMYPPZJLB', //PCR 'PCR001': 'PCR001', 'PCR002': 'PCR002' diff --git a/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue b/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue new file mode 100644 index 0000000..70238cd --- /dev/null +++ b/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue @@ -0,0 +1,332 @@ + + + + + \ No newline at end of file diff --git a/src/views/business/comps/template/comps/pcr/PCR002.vue b/src/views/business/comps/template/comps/pcr/PCR002.vue index f0f2022..60c38b9 100644 --- a/src/views/business/comps/template/comps/pcr/PCR002.vue +++ b/src/views/business/comps/template/comps/pcr/PCR002.vue @@ -9,19 +9,25 @@ - + - +
- + @@ -53,14 +61,15 @@ import TableList from "@/components/Template/Table"; import Step from "@/components/Template/Step"; import templateMixin from "../../mixins/templateMixin"; import CustomTable from '@/components/Template/CustomTable.vue'; -import { getLatestSn } from '@/api/template'; +import { getLatestSnArr } from '@/api/template'; import { EventBus } from "@/utils/eventBus"; import { uniqeResource } from "@/utils/calUnitTools"; -import { debounce } from 'lodash-es' +import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import { getLadderColumnsConfig } from "../../formConfig/PCRTableConfig.js"; +import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" export default { - name: "PCR001", - components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable }, + name: "PCR002", + components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog }, mixins: [templateMixin], props: { fillType: { @@ -70,7 +79,7 @@ export default { }, computed: { tableStepColumns() { - return getLadderColumnsConfig(this); + return getLadderColumnsConfig(this, 'business_pcr_gzy'); }, // 配置条件 storageFormConfig() { @@ -233,32 +242,118 @@ export default { }, data() { return { - formData: {} + reagentType: null, // 1-表单 2-表格 + formData: {}, + currentSubKey: "",//当前点击的子项key + currentType: "",//当前点击的类型 + currentRowIndex: "",//当前点击的行索引 }; }, mounted() { const formData = this.getFormDataByTemplateData(); - if(this.fillType === "actFill"){ + if (this.fillType === "actFill") { this.getCode(formData); } }, methods: { + //更新记录 + onSureModifyRecord(key) { + if (key === "subStartSolution") {//选择起始源溶液需要同步更新table的变更记录。 + this.$refs.stepTableRef.updateRecords(); + } + }, + resetRecord() { + this.$refs.stepTableRef.resetRecord(); + }, + // 表单点击 + handleFormClickable(obj) { + if (this.fillType === "preFill") { + return; + } + console.log(obj) + const subKey = obj.subKey; + if (subKey === "subStartSolution" || subKey === "subSolution") {//起始源溶液点击事件 + this.$refs.selectReagentDialogRef.show(this.formData.id) + this.currentSubKey = subKey; + this.reagentType = 1; + } + }, + //点击表格单元格 + handleClickable(col, rowIndex) { + //本表单特殊字段 + this.reagentType = 2 + + this.rowIndex = rowIndex + this.currentSubKey = col.prop; + console.log("clickable",rowIndex, col) + if(col.prop === "sjry"){ + //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 + this.$refs.selectReagentDialogRef.show(this.formData.id) + } + }, + //选择试剂提交事件 + onSelectReagentSubmit(code,row){ + if(this.reagentType===1){ + this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); + // 实际起始源溶液浓度:根据所选的起始溶液自动回显浓度 + if(this.currentSubKey == 'subStartSolution') { + this.$refs.stepFormPackageRef.updateFormData("targetAcSolution", row.nd + row.nddw); + this.updateStepTableData(row); + } + }else{ + this.$refs.stepTableRef.updateDataSourceByRowIndex(this.rowIndex,{ + [this.currentSubKey]: code, + }) + } + this.$refs.selectReagentDialogRef.onCancel() + }, + //更新table数据 + updateStepTableData(row) { + const { stepTableFormData = [] } = this.$refs.stepTableRef.getFilledFormData(); + + // 创建新的表格数据副本 + const newStepTableData = JSON.parse(JSON.stringify(stepTableFormData)); + + // 遍历数据,按要求更新起始溶液编号 + for (let i = 0; i < newStepTableData.length; i++) { + const item = newStepTableData[i]; + if (i === 0) { + // 第一条记录的起始溶液编号是确认弹框带出来的,也就是row.code字段 + newStepTableData[i].startSolutionCode = row.bh; + } else { + // 第二条的起始溶液编号是第一条数据里面的targetSolutionCode字段, + // 第三条的起始溶液编号是第二条数据里面的targetSolutionCode字段,以此类推 + newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode + newStepTableData[i - 1].subTargetSolutionCode; + } + console.log(item, row, 'updateStepTableData') + const volResult = this.updateSjmbrynd(item, row.nd); + console.log(volResult, 'volResult') + if (!volResult) { + continue + } + item.actSolutionVolume = volResult.actVol; + item.actSolutionConcentration = volResult.actNd; + item.actSolutionExpire = row.sxr; + } + this.$refs.stepTableRef.updateDataSource(newStepTableData); + // 更新tableRef组件的数据 + }, //获取目标溶液编号 - async getCode(v){ - const {stepTableFormData = []} = v; - if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){ + async getCode(v) { + const { stepTableFormData = [] } = v; + if (stepTableFormData && stepTableFormData.length > 0 && !stepTableFormData[0].bhCode) { let postSn = [] - for(let i=0;i { + }).catch(() => { + }) + .finally(() => { + }) + }, + startConfig(val) { + console.log("开始配置数据:" + JSON.stringify(val)) + let postData = { + bh: val.rowData.bh + val.rowData.bhCode, + studyId: this.formData.studyId, + studyFormId: this.formData.id, + studySubjectId: this.formData.studySubjectId, + } + console.log("开始配置提交数据:" + JSON.stringify(postData)) + sj_startConfiguration(postData).then(() => { + }).catch(() => { + }) + .finally(() => { + }) + }, + subPackageSubmit(val) { + console.log("分装数据:" + JSON.stringify(val)) + if (val.fzsj.fzList && val.fzsj.fzList.length > 0) { + let list = [] + for (let i = 0; i < val.fzsj.fzList.length; i++) { + let item = val.fzsj.fzList[i] + list.push({ + bh: val.fzsj.mybh + item.preCode, + kc: item.num, + kcdw: val.fzsj.dw, + }) + } + let postData = { + studyId: this.formData.studyId, + studyFormId: this.formData.id, + studySubjectId: this.formData.studySubjectId, + bh: val.fzsj.mybh, + nd: val.rowData.hhwznd, + nddw: val.headerSelectFields.hhwzndUnit, + list: list + } + console.log("分装提交数据:" + JSON.stringify(postData)) + sj_subpackage(postData).then(() => { + }).catch(() => { + }) + .finally(() => { + }) + } + }, } }; diff --git a/src/views/business/comps/template/comps/sp/SP001.vue b/src/views/business/comps/template/comps/sp/SP001.vue index d42bf55..8e185a1 100644 --- a/src/views/business/comps/template/comps/sp/SP001.vue +++ b/src/views/business/comps/template/comps/sp/SP001.vue @@ -17,7 +17,7 @@
标签打印 + @click="printTag">{{ $t('template.common.bqdy') }}
diff --git a/src/views/business/comps/template/comps/sp/SP002.vue b/src/views/business/comps/template/comps/sp/SP002.vue index 83f995a..7823535 100644 --- a/src/views/business/comps/template/comps/sp/SP002.vue +++ b/src/views/business/comps/template/comps/sp/SP002.vue @@ -9,6 +9,7 @@ +
标签打印 + @click="printTag">{{ $t('template.common.bqdy') }}
diff --git a/src/views/business/comps/template/comps/sp/SP003.vue b/src/views/business/comps/template/comps/sp/SP003.vue index 3752862..87af7e7 100644 --- a/src/views/business/comps/template/comps/sp/SP003.vue +++ b/src/views/business/comps/template/comps/sp/SP003.vue @@ -3,12 +3,13 @@
{{ formData.bdmc || - "生物样品标曲工作液制备表" }}
+ $t('template.sp.sp003.title') }}
+ diff --git a/src/views/business/comps/template/comps/sp/SP00456.vue b/src/views/business/comps/template/comps/sp/SP00456.vue index 5c6f0df..cd42a81 100644 --- a/src/views/business/comps/template/comps/sp/SP00456.vue +++ b/src/views/business/comps/template/comps/sp/SP00456.vue @@ -9,14 +9,15 @@ +
- 新增平行配制 - 新增阶梯配制 + {{ $t('template.common.xzpxpz') }} + {{ $t('template.common.xzjtpz') }}
@@ -24,18 +25,18 @@
-
阶梯配制
+
{{ $t('template.common.jtpz') }}
删除 + @click="deleteLadderConfig(ladderIndex)">{{ $t('template.common.deleteBtn') }}
+ :formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')" :prefixKey="'ladder_' + ladderIndex" /> + :formData="ladderConfig" :prefixKey="'ladder_' + ladderIndex" :fieldItemLabel="$t('template.common.jtpz')">