19 Commits

40 changed files with 770 additions and 238 deletions
Unified View
  1. +1
    -1
      src/components/Template/BaseInfoFormPackage.vue
  2. +71
    -4
      src/components/Template/HandleFormItem.vue
  3. +55
    -0
      src/components/Template/StepFormPackage.vue
  4. +2
    -2
      src/components/Template/mixins/stepMixins.js
  5. +5
    -5
      src/lang/en.js
  6. +4
    -0
      src/lang/en/business/resource/resource.js
  7. +4
    -4
      src/lang/en/business/study/studyFormFill.js
  8. +25
    -23
      src/lang/en/template/gsp.js
  9. +4
    -0
      src/lang/zh/business/resource/resource.js
  10. +4
    -2
      src/lang/zh/template/gsp.js
  11. +1
    -1
      src/utils/formPackageCommon.js
  12. +21
    -16
      src/utils/index.js
  13. +52
    -22
      src/views/business/comps/select/SelectBalanceValue.vue
  14. +3
    -1
      src/views/business/comps/template/comps/dl/DL011.vue
  15. +3
    -1
      src/views/business/comps/template/comps/dl/DL012.vue
  16. +10
    -1
      src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
  17. +3
    -1
      src/views/business/comps/template/comps/gsp/GSP001.vue
  18. +5
    -3
      src/views/business/comps/template/comps/gsp/GSP002.vue
  19. +3
    -1
      src/views/business/comps/template/comps/gsp/GSP003.vue
  20. +6
    -2
      src/views/business/comps/template/comps/gsp/GSP005.vue
  21. +3
    -1
      src/views/business/comps/template/comps/gsp/GSP010.vue
  22. +14
    -1
      src/views/business/comps/template/comps/gsp/GSP015.vue
  23. +2
    -2
      src/views/business/comps/template/comps/pcr/PCR007.vue
  24. +64
    -13
      src/views/business/comps/template/comps/pcr/PCR008.vue
  25. +47
    -0
      src/views/business/comps/template/comps/pcr/PCR009.vue
  26. +51
    -0
      src/views/business/comps/template/comps/pcr/PCR010.vue
  27. +47
    -0
      src/views/business/comps/template/comps/pcr/PCR011.vue
  28. +3
    -1
      src/views/business/comps/template/comps/sp/SP001.vue
  29. +75
    -36
      src/views/business/comps/template/comps/sp/SP0019.vue
  30. +41
    -37
      src/views/business/comps/template/comps/sp/SP0021.vue
  31. +11
    -11
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue
  32. +3
    -2
      src/views/business/comps/template/dialog/SubPackageDialog.vue
  33. +4
    -0
      src/views/business/comps/template/formConfig/gsp/gsp015.js
  34. +13
    -13
      src/views/business/comps/template/formConfig/sp/SP0019.js
  35. +1
    -1
      src/views/business/comps/template/formConfig/sp/SP0020.js
  36. +35
    -11
      src/views/business/resource/gyzj/comps/gyzj/Ff.vue
  37. +18
    -6
      src/views/business/resource/gyzj/comps/gyzj/Gh.vue
  38. +31
    -5
      src/views/business/resource/mjy/comps/mjy/Ff.vue
  39. +23
    -6
      src/views/business/resource/mjy/comps/mjy/Gh.vue
  40. +2
    -2
      src/views/business/study/comp/wzlb/gspList.vue

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

@ -345,7 +345,7 @@
<div class="p-r-20 item-center" :class="sItem.span == 1 ? 'full-row' : ''"> <div class="p-r-20 item-center" :class="sItem.span == 1 ? 'full-row' : ''">
<div class="form-title mr-20 checkboxList-title">{{ $t(sItem.label) }}</div> <div class="form-title mr-20 checkboxList-title">{{ $t(sItem.label) }}</div>
<div class="flex flex1"> <div class="flex flex1">
<HandleFormItem v-if="sItem.type === 'checkboxTree'" :field-item-label="fieldItemLabel"
<HandleFormItem v-if="sItem.type === 'checkboxTree' || sItem.type === 'radioTree'" :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + key" :type="sItem.type" :item="sItem" :field-key="prefixKey + '_' + key" :type="sItem.type" :item="sItem"
:value="formFields[key]" @change="(e) => onAttachmentChange(key, e)" :value="formFields[key]" @change="(e) => onAttachmentChange(key, e)"
:error="errors[key]" @update:error="errors[key] = false" :error="errors[key]" @update:error="errors[key] = false"

+ 71
- 4
src/components/Template/HandleFormItem.vue View File

@ -70,6 +70,23 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else-if="type === 'radioTree'" class="flex1 radio-tree-container"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '') + (error ? ' form-error-border' : '') + (item.noBorder ? ' no-border' : '') + (item.layout === 'horizontal' ? ' flex' : '')">
<el-radio-group v-model="inputValue.checkedValues" :disabled="getDisabled()" @input="onRadioTreeChange">
<div v-for="option in item.options" :key="option.value" class="radio-tree-item">
<el-radio :label="option.value">
{{ option.label }}
</el-radio>
<div v-if="isShowOtherByCheckboxTree(option.value) && inputValue.checkedValues === option.value"
class="checkbox-tree-input-container">
<el-input maxlength="100" v-model="inputValue.otherValues[option.value]"
:disabled="getDisabled()" placeholder="请输入"
@blur="onCheckboxTreeOtherBlur(option.value, $event)" />
</div>
</div>
</el-radio-group>
</div>
<el-date-picker v-else-if="type === 'dateTime' || type === 'datePicker'" <el-date-picker v-else-if="type === 'dateTime' || type === 'datePicker'"
:type="type === 'dateTime' ? 'datetime' : 'date'" class="flex1" :type="type === 'dateTime' ? 'datetime' : 'date'" class="flex1"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue"
@ -295,9 +312,11 @@ export default {
})); }));
} else if (this.type === 'fqyq' && !this.value) { } else if (this.type === 'fqyq' && !this.value) {
initialValue = { mainRadio: '', subRadio: '', inputValue: "" }; initialValue = { mainRadio: '', subRadio: '', inputValue: "" };
} else if (this.type === 'checkboxTree' && !this.value) {
} else if ((this.type === 'checkboxTree') && !this.value) {
const defaultCheckedValue = getDefaultValueByOptions(this.item.options || []); const defaultCheckedValue = getDefaultValueByOptions(this.item.options || []);
initialValue = { checkedValues: defaultCheckedValue, otherValues: {} }; initialValue = { checkedValues: defaultCheckedValue, otherValues: {} };
} else if ((this.type === 'radioTree') && !this.value) {
initialValue = { checkedValues: "", otherValues: {} };
} }
const { type } = this; const { type } = this;
return { return {
@ -631,8 +650,8 @@ export default {
mix: "1",//// mix: "1",////
gyzj: "3",// gyzj: "3",//
mjy: "5",// mjy: "5",//
xj: "9",//
xb: "11",//
xb: "9",//
xj: "11",//
jcb: "13",// jcb: "13",//
qxbd: "15",// qxbd: "15",//
} }
@ -738,7 +757,7 @@ export default {
}, },
getFillTypeStyle(type) { getFillTypeStyle(type) {
const { fillType } = this.item; const { fillType } = this.item;
const filterType = ["attachment", "checkboxTag", "fqyq", "checkboxTree", "radio"]
const filterType = ["attachment", "checkboxTag", "fqyq", "checkboxTree", "radio","radioTree"]
const typeObj = { const typeObj = {
actFill: "orange-border",// actFill: "orange-border",//
blxjsh: "orange-border",// blxjsh: "orange-border",//
@ -852,6 +871,12 @@ export default {
onItemCheckboxChange() { onItemCheckboxChange() {
this.onCommonHandleSaveRecord(this.inputValue); this.onCommonHandleSaveRecord(this.inputValue);
}, },
onRadioTreeChange(val) {
this.inputValue.checkedValues = val;
this.currentHandleType = 'checkboxTreeCheckbox';
this.currentCheckboxTreeValue = val;
this.onCommonHandleSaveRecord(this.inputValue);
},
// //
onSelectBlur(visible) { onSelectBlur(visible) {
if (!visible) { if (!visible) {
@ -1112,6 +1137,16 @@ export default {
} }
return o[currentHandleType]; return o[currentHandleType];
}, },
getRadioTreeInfo() {
const { checkedValues, otherValues } = this.inputValue;
const { checkedValues: oldCheckedValues, otherValues: oldOtherValues } = this.oldValue;
const { currentHandleType, currentCheckboxTreeValue } = this;
const o = {
"checkboxTreeCheckbox": { oldValue: oldCheckedValues, newValue: checkedValues, des: "" },
"checkboxTreeOther": { oldValue: oldOtherValues[currentCheckboxTreeValue], newValue: otherValues[currentCheckboxTreeValue], des: `${currentCheckboxTreeValue}`, key: this.fieldKey + "_" + checkedValues },
}
return o[currentHandleType];
},
async onCommonHandleSaveRecord(val) { async onCommonHandleSaveRecord(val) {
const isEmpty = isValueEmpty(this.inputValue); const isEmpty = isValueEmpty(this.inputValue);
if (this.error && !isEmpty) { if (this.error && !isEmpty) {
@ -1183,6 +1218,17 @@ export default {
isOldValueEmpty = this.isUnSubmitted(current.key); isOldValueEmpty = this.isUnSubmitted(current.key);
} }
} else if(this.type === "radioTree"){
const current = this.getRadioTreeInfo();
const { oldValue = {}, newValue = {} } = current;
if (this.currentHandleType === "checkboxTreeCheckbox") {
isSame = isEqual(oldValue, newValue);
console.log(oldValue,newValue,oldValue !== newValue,"newValue")
isOldValueEmpty = oldValue === newValue;
} else {
isSame = isEqual(current.oldValue, current.newValue);
isOldValueEmpty = this.isUnSubmitted(current.key);
}
} else if (this.type === "checkbox") { } else if (this.type === "checkbox") {
isSame = isEqual(this.oldValue, this.inputValue) isSame = isEqual(this.oldValue, this.inputValue)
@ -1207,6 +1253,7 @@ export default {
// //
isUnSubmitted(key) { isUnSubmitted(key) {
const finallyKey = key || this.fieldKey; const finallyKey = key || this.fieldKey;
console.log(this.getSubmittedCodes(),finallyKey,"finallyKey")
const has = this.getSubmittedCodes().includes(finallyKey) const has = this.getSubmittedCodes().includes(finallyKey)
return !has; return !has;
}, },
@ -1275,10 +1322,23 @@ export default {
recordOldVlaue = `${oldValue?.label || ''}:${oldValue?.checked ? '勾选' : '未勾选'}`; recordOldVlaue = `${oldValue?.label || ''}:${oldValue?.checked ? '勾选' : '未勾选'}`;
recordValue = `${newValue.label || ''}:${newValue.checked ? '勾选' : '未勾选'}`; recordValue = `${newValue.label || ''}:${newValue.checked ? '勾选' : '未勾选'}`;
isModify = newValue.checked !== undefined; isModify = newValue.checked !== undefined;
} else {
recordOldVlaue = `${current.des + (current.oldValue || '')}`;
recordValue = `${current.des + (current.newValue || '')}`;
finallyKey = current.key; finallyKey = current.key;
isModify = !!current.oldValue;
}
} else if (this.type === "radioTree") {
const current = this.getRadioTreeInfo();
if (this.currentHandleType === "checkboxTreeCheckbox") {
const { oldValue = {}, newValue = {} } = current;
recordOldVlaue = `${oldValue || ''}`;
recordValue = `${newValue || ''}`;
isModify = newValue !== oldValue;
} else { } else {
recordOldVlaue = `${current.des + (current.oldValue || '')}`; recordOldVlaue = `${current.des + (current.oldValue || '')}`;
recordValue = `${current.des + (current.newValue || '')}`; recordValue = `${current.des + (current.newValue || '')}`;
finallyKey = current.key;
isModify = !!current.oldValue; isModify = !!current.oldValue;
} }
} else if (this.type === "checkbox") { } else if (this.type === "checkbox") {
@ -2106,4 +2166,11 @@ export default {
.record-row{ .record-row{
text-align: left; text-align: left;
} }
.radio-tree-item{
display: flex;
align-items: center;
&:not(:last-child) {
margin-bottom: 10px;
}
}
</style> </style>

+ 55
- 0
src/components/Template/StepFormPackage.vue View File

@ -235,6 +235,61 @@ export default {
getSjResource(){ getSjResource(){
const {allFieldsConfig,formFields} = this; const {allFieldsConfig,formFields} = this;
const sjResource = [],yqResource = []; const sjResource = [],yqResource = [];
if(formFields && formFields.fzInfo){
let fzInfo = formFields.fzInfo
let myInfo = fzInfo.myInfo || {};
let fzList = fzInfo.fzList || [];
let myCount = 0
//
if(fzList.length>0){
for(let j=0;j<fzList.length;j++){
let fzItem = fzList[j]
myCount+= parseFloat(fzItem.num || 0);
sjResource.push({
mc: null,
bh: fzItem.preCode,
ph: null,
ndz: myInfo.ndz,
nd: myInfo.nd,
nddw: myInfo.nddw,
ly: 'ELN配制',
sxrq: myInfo.sxrq,
kc: fzItem.num,
kcdw: fzInfo.dw,
syl: null,
type: myInfo.elnType,
elnType: myInfo.elnType,
syldw: fzInfo.dw,
yxzq:myInfo.yxzq,
yxzqdw:myInfo.yxzqdw,
value:fzItem.preCode,
})
}
}
//使
sjResource.push({
mc: null,
bh: fzInfo.mybh,
ph: null,
ndz: myInfo.ndz,
nd: myInfo.nd,
nddw: myInfo.nddw,
ly: 'ELN配制',
sxrq: myInfo.sxrq,
kc: myInfo.maxVolume,
kcdw: myInfo.maxVolumeUnit,
syl: myCount,
type: myInfo.elnType,
elnType: myInfo.elnType,
syldw: fzInfo.dw,
yxzq:myInfo.yxzq,
yxzqdw:myInfo.yxzqdw,
value:fzInfo.mybh,
})
}
for(const key in allFieldsConfig){ for(const key in allFieldsConfig){
const item = allFieldsConfig[key]; const item = allFieldsConfig[key];
if(item.type === "xj" || item.type === "xb" || item.type === "sj" || item.type === "gsp" || item.type === "mix"){ if(item.type === "xj" || item.type === "xb" || item.type === "sj" || item.type === "gsp" || item.type === "mix"){

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

@ -182,10 +182,9 @@ export default {
if (buttonName === '分装') { if (buttonName === '分装') {
const stepFormData = this.getFilledFormData() const stepFormData = this.getFilledFormData()
const fzInfo = stepFormData.fzInfo || this.formData.fzInfo; const fzInfo = stepFormData.fzInfo || this.formData.fzInfo;
let fields = [], options = []
let fields = [], options = [],result = {};
let maxVolume, maxVolumeUnit; let maxVolume, maxVolumeUnit;
if (this.getMybh || this.getMybhByIndex) {//某些表单的步骤需要分装表单上的数据 if (this.getMybh || this.getMybhByIndex) {//某些表单的步骤需要分装表单上的数据
let result = {};
if (this.getMybh) { if (this.getMybh) {
result = this.getMybh() result = this.getMybh()
} else if (this.getMybhByIndex) { } else if (this.getMybhByIndex) {
@ -220,6 +219,7 @@ export default {
mybhOptions: options, mybhOptions: options,
maxVolumeUnit, maxVolumeUnit,
uuid: this.uuid, uuid: this.uuid,
myInfo:result,
}) })
} else if (buttonName === '获取值') { } else if (buttonName === '获取值') {
const { dataSource, dwField = "", fillField,fillDwField = "", yqCode } = e; const { dataSource, dwField = "", fillField,fillDwField = "", yqCode } = e;

+ 5
- 5
src/lang/en.js View File

@ -127,12 +127,12 @@ export default {
modify: 'Modify', modify: 'Modify',
modifyRecord: 'Change Data', modifyRecord: 'Change Data',
hqz: 'Get the value', hqz: 'Get the value',
xztp: '选择天平',
xztp: 'Select balance',
lengthLimit: '长度不能超过',
notEmpty: '不能为空',
operationSuccess: '操作成功',
OperationFailed: '操作失败',
lengthLimit: 'The length cannot exceed',
notEmpty: 'Cannot be empty',
operationSuccess: 'Operation Successful',
OperationFailed: 'Operation Failed',
selectMember: 'Select User' selectMember: 'Select User'
}, },

+ 4
- 0
src/lang/en/business/resource/resource.js View File

@ -24,4 +24,8 @@ export default {
cc: 'Storage', cc: 'Storage',
qc: 'Take Out', qc: 'Take Out',
}, },
common:{
tj:'Volume',
zl:'Quality'
}
} }

+ 4
- 4
src/lang/en/business/study/studyFormFill.js View File

@ -22,8 +22,8 @@ export default {
next: 'Next', next: 'Next',
pre: 'Pre', pre: 'Pre',
save: 'Save', save: 'Save',
blxjshtg:'病历学家审核通过',
blxjshjj:'病历学家审核拒绝',
blxjshtg:'Pathologist Approved',
blxjshjj:'Pathologist Rejected',
submit: 'Submit', submit: 'Submit',
bdnr: 'Record Information', bdnr: 'Record Information',
qmxx: 'Signature information', qmxx: 'Signature information',
@ -34,7 +34,7 @@ export default {
jcgj: 'Track Record', jcgj: 'Track Record',
cjjl: 'Create Record', cjjl: 'Create Record',
tjsh:'Submit Audit', tjsh:'Submit Audit',
blxjsh:'病理学家审核',
blxjsh:'Pathologist Audit',
sfbl: 'Back Entry', sfbl: 'Back Entry',
yes: 'Yes', yes: 'Yes',
no: 'No', no: 'No',
@ -78,5 +78,5 @@ export default {
ysy: 'Reviewed', ysy: 'Reviewed',
bcjl:'Save', bcjl:'Save',
txbbc:'Fill In And Save', txbbc:'Fill In And Save',
yjcc:'药剂存储'
yjcc:'Medicine Storage'
} }

+ 25
- 23
src/lang/en/template/gsp.js View File

@ -29,42 +29,44 @@ export default {
dwsl: 'Number' dwsl: 'Number'
}, },
// 毒麻药品配制记录表 // 毒麻药品配制记录表
DMYPPZJLB: {},
DMYPPZJLB: {
mbsybh:'Study Solution ID'
},
GSP002: { GSP002: {
xsy: '稀释液',
cbybdpz: '储备液比对配制',
zlkz: '质量控制',
cbywdx: '储备液稳定性',
lmd: '灵敏度',
clhwdx: '处理后稳定性'
xsy: 'Diluent',
cbybdpz: 'Comparison And Preparation Of Reserve Solution',
zlkz: 'Quality Control',
cbywdx: 'Stability Of Reserve Solution',
lmd: 'Sensitivity',
clhwdx: 'Stability After Processing'
}, },
GSP003: { GSP003: {
calcConditionLabel: '计算公式',
sfxyzjfx: '是否需要制剂分析'
calcConditionLabel: 'Calculation Formula',
sfxyzjfx: 'Require Analysis'
}, },
GSP005: { GSP005: {
xzzl: '新增质量',
xzry: '新增溶液',
zl: '质量',
ry: '溶液',
jspz: '结束配制',
kspz: '开始配制',
pzkssj: '配制开始时间',
pzjssj: '配制结束时间',
xzzl: 'Add Quality',
xzry: 'Add Solution',
zl: 'Quality',
ry: 'Solution',
jspz: 'End Configuration',
kspz: 'Start Configuring',
pzkssj: 'Start Date',
pzjssj: 'End Date',
sywzbhph: '试验物质编号/批号', sywzbhph: '试验物质编号/批号',
yrybhph: '源溶液编号/批号', yrybhph: '源溶液编号/批号',
yrymc: '源溶液名称',
yrymc: 'Source Solution Name',
yryyjtj: '源溶液预计体积', yryyjtj: '源溶液预计体积',
yrysjtj: '源溶液实际体积', yrysjtj: '源溶液实际体积',
yryyjnd: '源溶液预计浓度', yryyjnd: '源溶液预计浓度',
yrysjnd: '源溶液实际浓度', yrysjnd: '源溶液实际浓度',
yryxs: '源溶液系数', yryxs: '源溶液系数',
sywzmc: '试验物资名称', sywzmc: '试验物资名称',
sywzzsxs: '试验物资折系数',
sywzzsxs: '试验物资折系数',
sywzyjclz: '试验物质预计称量值', sywzyjclz: '试验物质预计称量值',
sywzsjclz: '试验物质实际称量值', sywzsjclz: '试验物质实际称量值',
rjbhph: '溶剂编号/批号', rjbhph: '溶剂编号/批号',
rjmc: '溶剂名称',
rjmc: 'Solvent Name',
rjyjtj: '溶剂预计体积', rjyjtj: '溶剂预计体积',
rjsjtj: '溶剂实际体积' rjsjtj: '溶剂实际体积'
}, },
@ -74,11 +76,11 @@ export default {
gsp009: { gsp009: {
xtsyx: '系统适应性', xtsyx: '系统适应性',
ypbh: '样品编号', ypbh: '样品编号',
xz: '选择',
zw: '作为系统适应性样品'
xz: 'Select',
zw: '作为系统适应性样品'
}, },
gsp011: { gsp011: {
cl: '残留', cl: '残留',
zw: '作为残留样品'
zw: '作为残留样品'
} }
} }

+ 4
- 0
src/lang/zh/business/resource/resource.js View File

@ -24,4 +24,8 @@ export default {
cc: '存储', cc: '存储',
qc: '取出', qc: '取出',
}, },
common:{
tj:'体积',
zl:'质量'
}
} }

+ 4
- 2
src/lang/zh/template/gsp.js View File

@ -29,7 +29,9 @@ export default {
dwsl: '动物数量' dwsl: '动物数量'
}, },
// 毒麻药品配制记录表 // 毒麻药品配制记录表
DMYPPZJLB: {},
DMYPPZJLB: {
mbsybh:'目标试验编号'
},
GSP002: { GSP002: {
xsy: '稀释液', xsy: '稀释液',
cbybdpz: '储备液比对配制', cbybdpz: '储备液比对配制',
@ -60,7 +62,7 @@ export default {
yrysjnd: '源溶液实际浓度', yrysjnd: '源溶液实际浓度',
yryxs: '源溶液系数', yryxs: '源溶液系数',
sywzmc: '试验物资名称', sywzmc: '试验物资名称',
sywzzsxs: '试验物资折系数',
sywzzsxs: '试验物资折系数',
sywzyjclz: '试验物质预计称量值', sywzyjclz: '试验物质预计称量值',
sywzsjclz: '试验物质实际称量值', sywzsjclz: '试验物质实际称量值',
rjbhph: '溶剂编号/批号', rjbhph: '溶剂编号/批号',

+ 1
- 1
src/utils/formPackageCommon.js View File

@ -21,7 +21,7 @@ export const isShowOtherByRadioAndOther = (v = '', col) => {
//checkboxTree判断是否显示其他输入框 //checkboxTree判断是否显示其他输入框
export const isShowOtherByCheckboxTree = (v = "") => { export const isShowOtherByCheckboxTree = (v = "") => {
const otherArr = ['其他', '其它', '样品信息', '样品', '部分接受', '给药 ',
const otherArr = ['其他', '其它', '样品信息', '样品', '部分接受','分析批拒绝', '给药 ',
'样本采集', '样本采集',
'日常观察 ', '日常观察 ',
'皮肤评分', '皮肤评分',

+ 21
- 16
src/utils/index.js View File

@ -1,7 +1,7 @@
import { parseTime } from './ruoyi' import { parseTime } from './ruoyi'
import { encrypt, decrypt } from '@/utils/encryptUtil' import { encrypt, decrypt } from '@/utils/encryptUtil'
import moment from 'moment' import moment from 'moment'
import {EventBus} from './eventBus'
import { EventBus } from './eventBus'
/** /**
* 表格时间格式化 * 表格时间格式化
*/ */
@ -419,8 +419,8 @@ export const getExpireDate = (
effectivePeriod, effectivePeriod,
effectivePeriodUnit effectivePeriodUnit
) => { ) => {
if(effectivePeriod === "NA" || effectivePeriodUnit === "NA"){
return "NA";
if (effectivePeriod === 'NA' || effectivePeriodUnit === 'NA') {
return 'NA'
} }
const start = moment(startDate) const start = moment(startDate)
const unit = effectivePeriodUnit === '天' ? 'days' : 'hours' const unit = effectivePeriodUnit === '天' ? 'days' : 'hours'
@ -436,7 +436,12 @@ export function getuuid() {
// 判断值是否为空 // 判断值是否为空
export function isValueEmpty(value) { export function isValueEmpty(value) {
if (value === null || value === undefined || value === '' || value === false) {
if (
value === null ||
value === undefined ||
value === '' ||
value === false
) {
return true return true
} }
if (typeof value === 'string' && value.trim() === '') { if (typeof value === 'string' && value.trim() === '') {
@ -446,7 +451,7 @@ export function isValueEmpty(value) {
return true return true
} }
if (Object.keys(value).length === 0 && typeof value == 'object') { if (Object.keys(value).length === 0 && typeof value == 'object') {
return true;
return true
} }
return false return false
} }
@ -591,31 +596,31 @@ export function getStringWidth(str) {
//根据选项获取默认值,为了 //根据选项获取默认值,为了
export const getDefaultValueByOptions = (options = []) => { export const getDefaultValueByOptions = (options = []) => {
const arr = [];
options.forEach(item => {
const { children = [], label } = item;
const arr = []
options.forEach((item) => {
const { children = [], label } = item
//目前只考虑2层,也不考虑label值重复的问题; //目前只考虑2层,也不考虑label值重复的问题;
if (children.length > 0) { if (children.length > 0) {
children.forEach(child => {
children.forEach((child) => {
arr.push({ label: child.label, checked: undefined }) arr.push({ label: child.label, checked: undefined })
}) })
} else { } else {
arr.push({ label, checked: undefined }) arr.push({ label, checked: undefined })
} }
}) })
return arr;
return arr
} }
// 只是更新已填写的表单数据,不触发其他事件 // 只是更新已填写的表单数据,不触发其他事件
export const justUpdateFilledFormData = () => { export const justUpdateFilledFormData = () => {
const params = { const params = {
type: "fieldChanged",
type: 'fieldChanged',
newRecord: null, newRecord: null,
resourceList: null,
resourceList: null
} }
EventBus.$emit('onModifyRecord', params,)
EventBus.$emit('onModifyRecord', params)
} }
export const formatNumberByDigits =(num, digits = 3)=> {
return num.toString().padStart(digits, '0');
}
export const formatNumberByDigits = (num, digits = 3) => {
return num.toString().padStart(digits, '0')
}

+ 52
- 22
src/views/business/comps/select/SelectBalanceValue.vue View File

@ -1,21 +1,33 @@
<template> <template>
<div> <div>
<div style="display: flex;"> <div style="display: flex;">
<div>
<el-input v-model="tpName" :placeholder="$t('form.xztp')" readonly
@click.native="showSelectBalance" style="width: 100px;"/>
</div>
<div>
<el-input v-model="tpz" :placeholder="$t('form.placeholderInput')" maxlength="20" @change="tpzChange">
<template slot="append">{{ dw }}
<el-select v-model="type" :placeholder="$t('form.placeholderSelect')" @change="typeChange" style="width: 100px;">
<el-option :label="$t('page.business.resource.resource.common.tj')" :value="1"></el-option>
<el-option :label="$t('page.business.resource.resource.common.zl')" :value="3"></el-option>
</el-select>
<template v-if="type == 1">
<el-input v-model="srz" :placeholder="$t('form.placeholderInput')" maxlength="20" @change="inputChange">
<template slot="append">{{ dw||'' }}
</template> </template>
</el-input> </el-input>
</div>
<div>
<el-button type="primary" @click="getBalanceValue">{{ $t('form.hqz') }}</el-button>
</div>
</template>
<template v-if="type == 3">
<div>
<el-input v-model="tpName" :placeholder="$t('form.xztp')" readonly @click.native="showSelectBalance"
style="width: 100px;" />
</div>
<div>
<el-input v-model="tpz" :placeholder="$t('form.placeholderInput')" maxlength="20" @change="tpzChange">
<template slot="append">{{ tpdw||'' }}
</template>
</el-input>
</div>
<div>
<el-button type="primary" @click="getBalanceValue">{{ $t('form.hqz') }}</el-button>
</div>
</template>
</div> </div>
<SelectInstrumentDialog ref="selectInstrumentDialog" @change="selectInstrumentChange"/>
<SelectInstrumentDialog ref="selectInstrumentDialog" @change="selectInstrumentChange" />
</div> </div>
</template> </template>
@ -24,12 +36,16 @@ import SelectInstrumentDialog from '@/views/business/comps/select/SelectInstrume
import { getBalance } from "@/utils/tpph"; import { getBalance } from "@/utils/tpph";
export default { export default {
name: "SelectBalanceValue", name: "SelectBalanceValue",
components: {SelectInstrumentDialog},
components: { SelectInstrumentDialog },
props: { props: {
value: { value: {
type: [Number, String], type: [Number, String],
default: '' default: ''
}, },
selectkey: {
type: String,
default: ''
},
dw: { dw: {
type: String, type: String,
default: '' default: ''
@ -45,10 +61,12 @@ export default {
}, },
data() { data() {
return { return {
type: '',
srz: '',
tpName: '', tpName: '',
tpz: '', tpz: '',
yq:{}
tpdw: '',
yq: {}
}; };
}, },
mounted() { mounted() {
@ -57,28 +75,40 @@ export default {
showSelectBalance() { showSelectBalance() {
this.$refs.selectInstrumentDialog.show() this.$refs.selectInstrumentDialog.show()
}, },
selectInstrumentChange(val,row){
this.tpName=row.mc
selectInstrumentChange(val, row) {
this.tpName = row.mc
this.yq = row this.yq = row
}, },
async getBalanceValue() { async getBalanceValue() {
if(!this.yq || !this.yq.bh){
if (!this.yq || !this.yq.bh) {
this.$message.error('请选择仪器') this.$message.error('请选择仪器')
return return
} }
this.tpz = '' this.tpz = ''
let x = await getBalance({yq:this.yq,dw:this.dw})
if(x && x.success){
let x = await getBalance({ yq: this.yq, dw: null })
if (x && x.success) {
this.tpz = x.value this.tpz = x.value
}else{
this.tpdw = x.unit
} else {
this.$message.error(x.message || '获取值失败') this.$message.error(x.message || '获取值失败')
} }
this.tpzChange() this.tpzChange()
}, },
tpzChange() { tpzChange() {
this.$emit('change', this.tpz)
this.$emit('change', { tpz: this.tpz, dw: this.tpdw,key:this.selectkey})
this.$emit('input', this.tpz) this.$emit('input', this.tpz)
}, },
inputChange() {
this.$emit('change', { tpz: this.srz, dw: this.dw,key:this.selectkey })
this.$emit('input', this.srz)
},
typeChange(){
this.$emit('change', null)
this.$emit('input', null)
this.srz=null
this.tpz=null
this.tpdw=null
}
} }
}; };
</script> </script>

+ 3
- 1
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -125,7 +125,9 @@ export default {
return { return {
getMybh: () => { getMybh: () => {
const data = this.$refs[refConf.xbxx].getFilledFormData() const data = this.$refs[refConf.xbxx].getFilledFormData()
return { mybh: data.fshxbbh + data.fshxbbhCodeSn, maxVolume: data.fshxbsjtj, maxVolumeUnit: data.fshxbsjtjUnit }
return { mybh: data.fshxbbh + data.fshxbbhCodeSn, maxVolume: data.fshxbsjtj, maxVolumeUnit: data.fshxbsjtjUnit,
nd:null,ndz:null,nddw:null,sxrq:null,elnType:this.product,yxzq:null,yxzqdw:null
}
} }
} }
}, },

+ 3
- 1
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -79,7 +79,9 @@ export default {
getMybh: () => { getMybh: () => {
const data = this.$refs[refConf.xbxx].getFilledFormData(); const data = this.$refs[refConf.xbxx].getFilledFormData();
const mybhs = this.transformMybh(data); const mybhs = this.transformMybh(data);
return { mybhOptions:mybhs, maxVolume: data.zbhxbsjtj, maxVolumeUnit: data.zbhxbsjtjUnit }
return { mybhOptions:mybhs, maxVolume: data.zbhxbsjtj, maxVolumeUnit: data.zbhxbsjtjUnit,
nd:null,ndz:null,nddw:null,sxrq:null,elnType:this.product,yxzq:null,yxzqdw:null
}
} }
} }
}, },

+ 10
- 1
src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue View File

@ -76,7 +76,9 @@ export default {
return { return {
getMybhByIndex: (index) => { getMybhByIndex: (index) => {
const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData() const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData()
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit }
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit,
nd:data.targetActConcentration,ndz:`${data.targetActConcentration}${data.targetActConcentrationUnit}`,nddw:data.targetActConcentrationUnit,sxrq:data.expireDate,elnType:this.product,yxzq:data.effectivePeriod,yxzqdw:data.effectivePeriodUnit
}
} }
} }
}, },
@ -182,6 +184,13 @@ export default {
{ {
type: "step", type: "step",
config: { config: {
mbsybh: {
label: 'template.gsp.DMYPPZJLB.mbsybh',
type: "input",
fillType: "preFill",
with:'100%',
span:1,
},
targetName: { targetName: {
label: 'template.common.targetSolutionName', label: 'template.common.targetSolutionName',
type: "input", type: "input",

+ 3
- 1
src/views/business/comps/template/comps/gsp/GSP001.vue View File

@ -79,7 +79,9 @@ export default {
return { return {
getMybhByIndex: (index) => { getMybhByIndex: (index) => {
const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData() const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData()
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit }
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit,
nd:data.targetActConcentration,ndz:`${data.targetActConcentration}${data.targetActConcentrationUnit}`,nddw:data.targetActConcentrationUnit,sxrq:data.expireDate,elnType:this.product,yxzq:data.effectivePeriod,yxzqdw:data.effectivePeriodUnit
}
} }
} }
}, },

+ 5
- 3
src/views/business/comps/template/comps/gsp/GSP002.vue View File

@ -403,7 +403,7 @@ export default {
prop: 'actStartSolutionCode', prop: 'actStartSolutionCode',
width: 280, width: 280,
showWidth: 180, showWidth: 180,
bodyType: 'sj',
bodyType: 'mix',
bodyFillType: 'actFill', bodyFillType: 'actFill',
compareTo: 'startSolutionCode', // compareTo: 'startSolutionCode', //
}, },
@ -742,8 +742,9 @@ export default {
}, },
// table // table
onTableRegentSubmit(type, configIndex, data) { onTableRegentSubmit(type, configIndex, data) {
debugger
const { selectInfo, rowIndex, key, rowData } = data; const { selectInfo, rowIndex, key, rowData } = data;
const { row, selectedId } = selectInfo;
const { row, selectedId,selectType } = selectInfo;
if (key === "actStartSolutionCode") {// if (key === "actStartSolutionCode") {//
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0]; const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0];
// //
@ -758,6 +759,7 @@ export default {
//code //code
tableRef.updateDataSourceByRowIndex(rowIndex, { tableRef.updateDataSourceByRowIndex(rowIndex, {
actStartSolutionCode: selectedId, actStartSolutionCode: selectedId,
actStartSolutionCodeType: selectType, //
targetAcSolution: row.nd, targetAcSolution: row.nd,
}) })
if (!volResult) { if (!volResult) {
@ -923,7 +925,7 @@ export default {
sxrq: null, sxrq: null,
kc: null, kc: null,
kcdw: null, kcdw: null,
type: 1,
type: stepTableFormData[j].actStartSolutionCodeType,
syl: stepTableFormData[j].actStartSolutionVolume, syl: stepTableFormData[j].actStartSolutionVolume,
syldw: paralleConfigs.headerSelectFields.actStartSolutionVolumeUnit, syldw: paralleConfigs.headerSelectFields.actStartSolutionVolumeUnit,
yxzq: null, yxzq: null,

+ 3
- 1
src/views/business/comps/template/comps/gsp/GSP003.vue View File

@ -81,7 +81,9 @@ export default {
return { return {
getMybhByIndex: (index) => { getMybhByIndex: (index) => {
const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData() const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData()
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit }
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit,
nd:data.targetActConcentration,ndz:`${data.targetActConcentration}${data.targetActConcentrationUnit}`,nddw:data.targetActConcentrationUnit,sxrq:data.expireDate,elnType:this.product,yxzq:data.effectivePeriod,yxzqdw:data.effectivePeriodUnit
}
} }
} }
}, },

+ 6
- 2
src/views/business/comps/template/comps/gsp/GSP005.vue View File

@ -119,11 +119,15 @@ export default {
getMybhByIndex: (index, type) => { getMybhByIndex: (index, type) => {
if (type === 'formZl') { if (type === 'formZl') {
const data = this.$refs[`formZlConfigFormPackageRef_${index}`][0].getFilledFormData() const data = this.$refs[`formZlConfigFormPackageRef_${index}`][0].getFilledFormData()
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit }
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit,
nd:data.targetActConcentration,ndz:`${data.targetActConcentration}${data.targetActConcentrationUnit}`,nddw:data.targetActConcentrationUnit,sxrq:data.expireDate,elnType:this.product,yxzq:data.effectivePeriod,yxzqdw:data.effectivePeriodUnit
}
} else { } else {
const data = this.$refs[`formRyConfigFormPackageRef_${index}`][0].getFilledFormData() const data = this.$refs[`formRyConfigFormPackageRef_${index}`][0].getFilledFormData()
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit }
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit,
nd:data.targetActConcentration,ndz:`${data.targetActConcentration}${data.targetActConcentrationUnit}`,nddw:data.targetActConcentrationUnit,sxrq:data.expireDate,elnType:this.product,yxzq:data.effectivePeriod,yxzqdw:data.effectivePeriodUnit
}
} }
} }
} }

+ 3
- 1
src/views/business/comps/template/comps/gsp/GSP010.vue View File

@ -72,7 +72,9 @@ export default {
return { return {
getMybhByIndex: (index) => { getMybhByIndex: (index) => {
const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData() const data = this.$refs[`formConfigStepFormPackageRef_${index}`][0].getFilledFormData()
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit }
return { mybh: data.targetCode + data.targetCodeSn, maxVolume: data.targetActVolume, maxVolumeUnit: data.targetActVolumeUnit,
nd:data.targetActConcentration,ndz:`${data.targetActConcentration}${data.targetActConcentrationUnit}`,nddw:data.targetActConcentrationUnit,sxrq:data.expireDate,elnType:this.product,yxzq:data.effectivePeriod,yxzqdw:data.effectivePeriodUnit
}
} }
} }
}, },

+ 14
- 1
src/views/business/comps/template/comps/gsp/GSP015.vue View File

@ -222,9 +222,19 @@ export default {
}; };
}, },
mounted() { mounted() {
if (this.fillType === "actFill") {
setTimeout(() => {
this.handleUpdateCode();
}, 0);
}
}, },
methods: { methods: {
handleUpdateCode(){
const refs = ["jyTableRef"]
const {ecDataList = [],ybsmDataList= []} = this.fromData;
console.log(this.formData,"fff")
},
//blog //blog
async handleBeforeDownload({ html2pdf, options, pdfContent }) { async handleBeforeDownload({ html2pdf, options, pdfContent }) {
this.$modal.loading() this.$modal.loading()
@ -431,6 +441,7 @@ export default {
deleteConfig(item, type = "ybsmDataList") { deleteConfig(item, type = "ybsmDataList") {
if (this.formData[type].length > 1) { if (this.formData[type].length > 1) {
const configIndex = this.formData[type].findIndex(config => config.id === item.id); const configIndex = this.formData[type].findIndex(config => config.id === item.id);
console.log(configIndex,item,"configIndex")
if (configIndex > -1) { if (configIndex > -1) {
const newList = [...this.formData[type]] const newList = [...this.formData[type]]
newList.splice(configIndex, 1); newList.splice(configIndex, 1);
@ -478,6 +489,7 @@ export default {
...ybsmTableData, ...ybsmTableData,
jyStepTableFormData: jyTableData.stepTableFormData, jyStepTableFormData: jyTableData.stepTableFormData,
jyHeaderSelectFields: jyTableData.headerSelectFields, jyHeaderSelectFields: jyTableData.headerSelectFields,
id: item.id,
}; };
}); });
const eData = ecDataList.map((item, index) => { const eData = ecDataList.map((item, index) => {
@ -486,6 +498,7 @@ export default {
return { return {
...ecFormData, ...ecFormData,
...ecTableData, ...ecTableData,
id: item.id,
}; };
}); });
return { return {

+ 2
- 2
src/views/business/comps/template/comps/pcr/PCR007.vue View File

@ -24,7 +24,7 @@
}}</el-button> }}</el-button>
</div> </div>
<el-button type="primary" @click="downloadTableData">{{
<el-button v-if="fillType == 'qc'" type="primary" @click="downloadTableData">{{
$t('template.common.downloadTableData') }}</el-button> $t('template.common.downloadTableData') }}</el-button>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
@ -208,7 +208,7 @@ export default {
'<table border="1" class="html-tabel">' + '<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' + '<tr style="background:#eee;">' +
'<th style="text-align: center;">' + '样品名称' + '</th>' + '<th style="text-align: center;">' + '样品名称' + '</th>' +
'<th style="text-align: center;">' + '采集管重量' + content.headerSelectFields.cjgzlUnit + '</th>' +
'<th style="text-align: center;">' + '采集管重量'+ '</th>' +
' </tr>' ' </tr>'
let _datastr = '' let _datastr = ''
_.forEach(content.stepTableFormData, function (value) { _.forEach(content.stepTableFormData, function (value) {

+ 64
- 13
src/views/business/comps/template/comps/pcr/PCR008.vue View File

@ -22,11 +22,14 @@
$t('form.delete') }}</el-button> $t('form.delete') }}</el-button>
</div> </div>
<el-button v-if="fillType == 'qc'" type="primary" @click="downloadTableData">{{
$t('template.common.downloadTableData') }}</el-button>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`" :ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showCheckAll="true" @selectionChange="handleSelectionChange" :showCheckAll="true" @selectionChange="handleSelectionChange"
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps" :showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps"
@clickButton="handleClickButton">
@clickButton="handleClickButton">
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns" <TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion> @deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion>
@ -59,7 +62,7 @@ import { convertConcentration } from "@/utils/conConverter";//浓度单位转换
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getPCR008Config } from "../../formConfig/PCRTableConfig.js"; import { getPCR008Config } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals,uniqeYqOne } from "@/utils/calUnitTools";
import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals, uniqeYqOne } from "@/utils/calUnitTools";
import ImportExcelDialog from '../../dialog/ImportExcelDialog' import ImportExcelDialog from '../../dialog/ImportExcelDialog'
import { getBalance } from '@/utils/tpph.js'; import { getBalance } from '@/utils/tpph.js';
export default { export default {
@ -160,7 +163,7 @@ export default {
label: 'template.common.actualFill', label: 'template.common.actualFill',
type: "select", type: "select",
fillType: "actFill", fillType: "actFill",
otherCode: "actOther",otherCodeCompareTo: "preOther",
otherCode: "actOther", otherCodeCompareTo: "preOther",
multiple: true, multiple: true,
compareTo: "pre", compareTo: "pre",
options: this.getDictOptions('business_pztj') options: this.getDictOptions('business_pztj')
@ -247,6 +250,54 @@ export default {
this.onHandleTableBlur() this.onHandleTableBlur()
}, },
methods: { methods: {
downloadTableData() {
this.$modal.loading()
let content = this.getFilledFormData();
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + '样品名称' + '</th>' +
'<th style="text-align: center;">' + '组织重量' + '</th>' +
'<th style="text-align: center;">' + '实际匀浆溶液补加入量' + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(content.stepTableFormData, function (value) {
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.ypmc +
'</td>' +
' <td>' +
value.zzzl +
'</td>' +
' <td>' +
value.sjyjrybjrl +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = this.formData.bdmc
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
this.$modal.closeLoading()
},
onBeforeReagentSubmit(data) { onBeforeReagentSubmit(data) {
const { selectData, callback } = data; const { selectData, callback } = data;
@ -339,7 +390,7 @@ export default {
let cjgz = item.cjgz let cjgz = item.cjgz
let tabZzzl; let tabZzzl;
// = // =
if(lzzgz && cjgz) {
if (lzzgz && cjgz) {
let temp = subTj([lzzgz, cjgz], [content.headerSelectFields.lzzgzUnit, content.headerSelectFields.cjgzUnit]) let temp = subTj([lzzgz, cjgz], [content.headerSelectFields.lzzgzUnit, content.headerSelectFields.cjgzUnit])
let zzzl = temp.total let zzzl = temp.total
let zzzlUnit = temp.unit let zzzlUnit = temp.unit
@ -348,7 +399,7 @@ export default {
} }
// = // =
if(tabZzzl && bs && yjyjry) {
if (tabZzzl && bs && yjyjry) {
let temp = subTj([tabZzzl * bs, yjyjry], [content.headerSelectFields.zzzlUnit, yjyjryUnit]) let temp = subTj([tabZzzl * bs, yjyjry], [content.headerSelectFields.zzzlUnit, yjyjryUnit])
let ysyjrybjrl = temp.total let ysyjrybjrl = temp.total
let ysyjrybjrlUnit = temp.unit let ysyjrybjrlUnit = temp.unit
@ -408,7 +459,7 @@ export default {
//使 //使
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || []) this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = uniqeYqOne([...stepResource.yqResource || [],...tmpYq])
this.yqResourceTmp = uniqeYqOne([...stepResource.yqResource || [], ...tmpYq])
return this.resourceTmp; return this.resourceTmp;
}, },
// //
@ -425,19 +476,19 @@ export default {
} }
}, },
// //
async handleClickButton(e, rowIndex,colIndex,ee,data) {
async handleClickButton(e, rowIndex, colIndex, ee, data) {
debugger debugger
if(e==='lzzgzBtn'){
if (e === 'lzzgzBtn') {
const content = this.getFilledFormData() const content = this.getFilledFormData()
let formData = this.formData;
let formData = this.formData;
let qy = content.yqInfo_dztpbh || formData.yqInfo_dztpbh let qy = content.yqInfo_dztpbh || formData.yqInfo_dztpbh
let dw = content.headerSelectFields.lzzgzUnit let dw = content.headerSelectFields.lzzgzUnit
let x = await getBalance({yq:qy,dw:dw})
if(x && x.success){
this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, { lzzgz: x.value },{signData:data,updateFields:['lzzgz']});
}else{
let x = await getBalance({ yq: qy, dw: dw })
if (x && x.success) {
this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, { lzzgz: x.value }, { signData: data, updateFields: ['lzzgz'] });
} else {
this.$message.error(x.message || '称量失败') this.$message.error(x.message || '称量失败')
} }
} }

+ 47
- 0
src/views/business/comps/template/comps/pcr/PCR009.vue View File

@ -24,6 +24,9 @@
}}</el-button> }}</el-button>
</div> </div>
<el-button v-if="fillType == 'qc'" type="primary" @click="downloadTableData">{{
$t('template.common.downloadTableData') }}</el-button>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`" :ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps"> :showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps">
@ -235,6 +238,50 @@ export default {
this.onHandleTableBlur() this.onHandleTableBlur()
}, },
methods: { methods: {
downloadTableData() {
this.$modal.loading()
let content = this.getFilledFormData();
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + '样品名称' + '</th>' +
'<th style="text-align: center;">' + '实际匀浆溶液补加入量' + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(content.stepTableFormData, function (value) {
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.ypmc +
'</td>' +
' <td>' +
value.sjyjrybjrl +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = this.formData.bdmc
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
this.$modal.closeLoading()
},
downloadExcelTemplate() { downloadExcelTemplate() {
this.exportExcel(['样品名称', '组织重'], 'PCR分析组织匀浆表-知组织重导入模板') this.exportExcel(['样品名称', '组织重'], 'PCR分析组织匀浆表-知组织重导入模板')
}, },

+ 51
- 0
src/views/business/comps/template/comps/pcr/PCR010.vue View File

@ -24,6 +24,9 @@
}}</el-button> }}</el-button>
</div> </div>
<el-button v-if="fillType == 'qc'" type="primary" @click="downloadTableData">{{
$t('template.common.downloadTableData') }}</el-button>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`" :ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps" :showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps"
@ -230,6 +233,54 @@ export default {
this.onHandleTableBlur() this.onHandleTableBlur()
}, },
methods: { methods: {
downloadTableData() {
this.$modal.loading()
let content = this.getFilledFormData();
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + '样品名称' + '</th>' +
'<th style="text-align: center;">' + '称取重量' + '</th>' +
'<th style="text-align: center;">' + '实际匀浆溶液加入量' + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(content.stepTableFormData, function (value) {
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.ypmc +
'</td>' +
' <td>' +
value.cqzl +
'</td>' +
' <td>' +
value.sjyjryjrl +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = this.formData.bdmc
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
this.$modal.closeLoading()
},
downloadExcelTemplate() { downloadExcelTemplate() {
this.exportExcel(['样品名称'], 'PCR分析组织匀浆表-常规导入模板') this.exportExcel(['样品名称'], 'PCR分析组织匀浆表-常规导入模板')
}, },

+ 47
- 0
src/views/business/comps/template/comps/pcr/PCR011.vue View File

@ -24,6 +24,9 @@
}}</el-button> }}</el-button>
</div> </div>
<el-button v-if="fillType == 'qc'" type="primary" @click="downloadTableData">{{
$t('template.common.downloadTableData') }}</el-button>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`" :ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps"> :showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps">
@ -218,6 +221,50 @@ export default {
this.onHandleTableBlur() this.onHandleTableBlur()
}, },
methods: { methods: {
downloadTableData() {
this.$modal.loading()
let content = this.getFilledFormData();
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + '样品名称' + '</th>' +
'<th style="text-align: center;">' + '实际样品加样体积' + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(content.stepTableFormData, function (value) {
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.ypmc +
'</td>' +
' <td>' +
value.sjypjytj +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = this.formData.bdmc
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
this.$modal.closeLoading()
},
downloadExcelTemplate() { downloadExcelTemplate() {
this.exportExcel(['样品名称'], 'PCR分析核酸提取样品处理表导入模板') this.exportExcel(['样品名称'], 'PCR分析核酸提取样品处理表导入模板')
}, },

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

@ -50,7 +50,9 @@ export default {
return { return {
getMybh: ()=>{ getMybh: ()=>{
const data = this.$refs['stepFormPackageRef'].getFilledFormData() const data = this.$refs['stepFormPackageRef'].getFilledFormData()
return {mybh:data.targetCode+data.targetCodeSn,maxVolume:data.targetActVolume,maxVolumeUnit:data.targetActVolumeUnit}
return {mybh:data.targetCode+data.targetCodeSn,maxVolume:data.targetActVolume,maxVolumeUnit:data.targetActVolumeUnit,
nd:data.targetActConcentration,ndz:`${data.targetActConcentration}${data.targetActConcentrationUnit}`,nddw:data.targetActConcentrationUnit,sxrq:data.expireDate,elnType:this.product,yxzq:data.effectivePeriod,yxzqdw:data.effectivePeriodUnit
}
} }
} }
}, },

+ 75
- 36
src/views/business/comps/template/comps/sp/SP0019.vue View File

@ -8,33 +8,27 @@
<div class="content"> <div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" <BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.sjInfo" :columns="sjColumns" :dataSource="resourceSj" />
<LineLabel label="template.common.instrumentInfo" /> <LineLabel label="template.common.instrumentInfo" />
<CustomTable
:columns="yqInfoColumns"
:formData = "formData"
ref = "yqInfoTableRef"
@onRegentSubmit="(data, col, rowIndex, colIndex, row)=>onYqSubmit(data, col, rowIndex, colIndex, row)"
:showAddRow = "fillType === 'actFill'"
:showOperation = "fillType === 'actFill'"
:prefixKey="`yqTable`"
>
<CustomTable :columns="yqInfoColumns" :formData="formData" ref="yqInfoTableRef"
@onRegentSubmit="(data, col, rowIndex, colIndex, row) => onYqSubmit(data, col, rowIndex, colIndex, row)"
:showAddRow="fillType === 'actFill'" :showOperation="fillType === 'actFill'"
:prefixKey="`yqTable`">
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="()=>deleteRow(rowIndex,'yqInfoTableRef')" ></TableOpertaionDelete>
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="() => deleteRow(rowIndex, 'yqInfoTableRef')"></TableOpertaionDelete>
</template> </template>
</CustomTable> </CustomTable>
<BaseInfoFormPackage class="mt-20" fieldItemLabel="色谱柱型号" label="色谱柱型号" ref="spzxhRef" <BaseInfoFormPackage class="mt-20" fieldItemLabel="色谱柱型号" label="色谱柱型号" ref="spzxhRef"
@remoteMethod="remoteMethod"
:formConfig="storageFormConfig" :formData="formData" />
@remoteMethod="remoteMethod" :formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="溶液" /> <LineLabel label="溶液" />
<CustomTable
:columns="ryColumns"
ref = "ryTableRef"
@onRegentSubmit = "(e)=>onRegentSubmit(e)"
:showOperation = "fillType === 'preFill'"
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{}}" :prefixKey="`ryTable`"
>
<CustomTable :columns="ryColumns" ref="ryTableRef" @onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'preFill'"
:formData="{ stepTableFormData: formData.stepTableFormData_1, headerSelectFields: {} }"
:prefixKey="`ryTable`">
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="()=>deleteRow(rowIndex,'ryTableRef')" ></TableOpertaionDelete>
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="() => deleteRow(rowIndex, 'ryTableRef')"></TableOpertaionDelete>
</template> </template>
</CustomTable> </CustomTable>
<BaseInfoFormPackage class="mt-20" fieldItemLabel="仪器平衡" label="仪器平衡" ref="storageConditionRef" <BaseInfoFormPackage class="mt-20" fieldItemLabel="仪器平衡" label="仪器平衡" ref="storageConditionRef"
@ -57,12 +51,13 @@ import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue'; import CustomTable from '@/components/Template/CustomTable.vue';
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import { public_sjList } from '@/api/business/public/public'; import { public_sjList } from '@/api/business/public/public';
import { uniqeResourceOne,uniqeYqOne } from "@/utils/calUnitTools";
import { getBaseInfoFormConfig, getStorageFormConfig, getYqColumns,getRyColumns,getYqphFormConfig } from "../../formConfig/sp/SP0019"
import { getBaseInfoFormConfig, getStorageFormConfig, getYqColumns, getRyColumns, getYqphFormConfig } from "../../formConfig/sp/SP0019"
export default { export default {
name: "SP0019", name: "SP0019",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete },
mixins: [templateMixin], mixins: [templateMixin],
props: { props: {
fillType: { fillType: {
@ -72,11 +67,11 @@ export default {
}, },
computed: { computed: {
// //
yqphFormConfig(){
yqphFormConfig() {
return getYqphFormConfig(this); return getYqphFormConfig(this);
}, },
// //
ryColumns(){
ryColumns() {
return getRyColumns(this); return getRyColumns(this);
}, },
// //
@ -118,7 +113,7 @@ export default {
}; };
}, },
mounted() { mounted() {
}, },
methods: { methods: {
@ -129,8 +124,8 @@ export default {
pageSize: 10, pageSize: 10,
mc: query mc: query
}); });
if(res.code === 200){
const {rows = []} = res;
if (res.code === 200) {
const { rows = [] } = res;
this.spzxhOptions = rows.map(item => ({ this.spzxhOptions = rows.map(item => ({
label: item.bh, label: item.bh,
value: item.bh, value: item.bh,
@ -138,10 +133,10 @@ export default {
} }
} }
}, },
onRegentSubmit(e){
const {selectInfo, key, col, rowIndex, colIndex, rowData} = e;
const {row} = selectInfo;
if(key === "rymc"){
onRegentSubmit(e) {
const { selectInfo, key, col, rowIndex, colIndex, rowData } = e;
const { row } = selectInfo;
if (key === "rymc") {
const params = { const params = {
pzrq: row.pzrq, pzrq: row.pzrq,
sxr: row.sxr, sxr: row.sxr,
@ -149,10 +144,10 @@ export default {
this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params); this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params);
} }
}, },
onYqSubmit(data){
const {selectInfo,rowIndex,key} = data;
const {row} = selectInfo;
if(key === "bh"){//
onYqSubmit(data) {
const { selectInfo, rowIndex, key } = data;
const { row } = selectInfo;
if (key === "bh") {//
const params = { const params = {
mc: row.mc, mc: row.mc,
xh: row.xh, xh: row.xh,
@ -165,9 +160,53 @@ export default {
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "spzxhRef", "yqInfoTableRef", "ryTableRef", "remarkRef"]) return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "spzxhRef", "yqInfoTableRef", "ryTableRef", "remarkRef"])
}, },
getResource() {
let content = this.getFilledFormData();
//resource
let tmpResource = []
let tmpYq=[]
if (this.fillType === "actFill") {
let _formData = content.stepTableFormData_1
for (var i = 0; i < _formData.length; i++) {
//使
tmpResource.push({
mc: null,
bh: _formData[i].rymc,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: 'ELN配制',
sxrq: null,
kc: null,
kcdw: null,
syl: null,
type: _formData[i].selectInfo_rymc.type,
elnType: null,
syldw: _formData[i].selectInfo_rymc.kcdw,
yxzq: null,
yxzqdw: null,
})
}
let _formData2 = content.stepTableFormData
for (var i = 0; i < _formData2.length; i++) {
tmpYq.push({
mc: _formData2[i].selectInfo_bh.mc,
xh: _formData2[i].selectInfo_bh.xh,
bh: _formData2[i].selectInfo_bh.bh,
jzrq: _formData2[i].selectInfo_bh.jzrq,
})
}
}
this.yqResourceTmp = uniqeYqOne(tmpYq)
this.resourceTmp = uniqeResourceOne(tmpResource)
return this.resourceTmp;
},
// //
async getFormData() { async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "spzxhRef","yqInfoTableRef","ryTableRef", "remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "spzxhRef", "yqInfoTableRef", "ryTableRef", "remarkRef"]);
console.log(content) console.log(content)
return content; return content;
}, },

+ 41
- 37
src/views/business/comps/template/comps/sp/SP0021.vue View File

@ -26,19 +26,20 @@
</el-popconfirm> </el-popconfirm>
</div> </div>
<BaseInfoFormPackage fieldItemLabel="样本说明" :ref="`ybsmFormPackageRef${index}`" <BaseInfoFormPackage fieldItemLabel="样本说明" :ref="`ybsmFormPackageRef${index}`"
:prefixKey = "'ybsm_'+index"
:formConfig="ybsmFormConfig" @blur="onHandleBlur" :formData="item" /> :formConfig="ybsmFormConfig" @blur="onHandleBlur" :formData="item" />
<el-button v-if="fillType === 'actFill'" type="primary" <el-button v-if="fillType === 'actFill'" type="primary"
@click="onImportAnimal(item, index)">导入动物</el-button> @click="onImportAnimal(item, index)">导入动物</el-button>
<CustomTable :ref="`ybsmTableRef${index}`" :columns="ybsmColumns"
<CustomTable :ref="`ybsmTableRef${index}`" :columns="ybsmColumns" :prefixKey = "'ybsm_table_'+index"
:showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" :showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'"
:formData="item">
:formData="item" @clickButton="(e, rowIndex,colIndex,ee,data)=>handleClickButton(e, rowIndex,colIndex,ee,data,index)">
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" <TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, `ybsmTableRef${index}`)"> @deleteRow="() => deleteTableRow(rowIndex, `ybsmTableRef${index}`)">
</TableOpertaionDelete> </TableOpertaionDelete>
</template> </template>
</CustomTable> </CustomTable>
<Step :ref="`stepRef${index}`" :formData="item.stepData || []"></Step>
<Step :ref="`stepRef${index}`" :prefixKey = "'ybsm_step_'+index" :formData="item.stepData || []"></Step>
</div> </div>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
:ref="refConfig.remarkRef" :formConfig="remarkConig" :formData="formData" /> :ref="refConfig.remarkRef" :formConfig="remarkConig" :formData="formData" />
@ -61,9 +62,10 @@ import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step"; import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin"; import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue'; import CustomTable from '@/components/Template/CustomTable.vue';
import { uniqeResource } from "@/utils/calUnitTools";
import { uniqeResource ,uniqeYqOne} from "@/utils/calUnitTools";
import { getuuid, justUpdateFilledFormData } from "@/utils/index"; import { getuuid, justUpdateFilledFormData } from "@/utils/index";
import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig, getTableColumns } from "../../formConfig/sp/SP0021"; import { getBaseInfoFormConfig, getStorageFormConfig, getRemarkFormConfig, getYbsmFormConfig, getTableColumns } from "../../formConfig/sp/SP0021";
import { getBalance } from '@/utils/tpph.js';
const refConfig = { const refConfig = {
baseInfoRef: "baseInfoRef", baseInfoRef: "baseInfoRef",
remarkRef: "remarkRef", remarkRef: "remarkRef",
@ -122,6 +124,7 @@ export default {
}, },
methods: { methods: {
// //
deleteConfig(item) { deleteConfig(item) {
// ybsmDataList // ybsmDataList
if (this.formData.ybsmDataList.length > 1) { if (this.formData.ybsmDataList.length > 1) {
@ -207,19 +210,17 @@ export default {
// //
async getFormData() { async getFormData() {
// //
let content = await this.validFormFields(compRefs);
if (!content) return null;
const refs = [];
// //
for (let index = 0; index < this.formData.ybsmDataList.length; index++) { for (let index = 0; index < this.formData.ybsmDataList.length; index++) {
refs.push(`ybsmFormPackageRef${index}`)
refs.push(`ybsmTableRef${index}`)
refs.push(`stepRef${index}`)
// //
const ybsmFormValid = await this.$refs[`ybsmFormPackageRef${index}`][0]?.getFormData() || true;
if (!ybsmFormValid) return null;
//
const stepValid = await this.$refs[`stepRef${index}`][0]?.getFormData() || true;
if (!stepValid) return null;
} }
let content = await this.validFormFields([...compRefs, ...refs]);
if (!content) return null;
// //
return this.getFilledFormData(); return this.getFilledFormData();
@ -228,38 +229,26 @@ export default {
let content = this.getFilledFormData(); let content = this.getFilledFormData();
//resource //resource
let tmpResource = [] let tmpResource = []
if (this.fillType === "actFill") {
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode + content.targetCodeSn,
ph: '',
ndz: content.targetActConcentration + content.targetActConcentrationUnit,
nd: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: content.expireDate,
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
}
//使 //使
let allSjResource = []; let allSjResource = [];
let allYqResource = []; let allYqResource = [];
const {ybsmDataList = []} = content
// //
for (let index = 0; index < this.formData.ybsmDataList.length; index++) {
const stepResource = this.$refs[`stepRef${index}`][0]?.getStepResource() || { sjResource: [], yqResource: [] };
for (let index = 0; index < ybsmDataList.length; index++) {
const stepResource = ybsmDataList[index].stepData || { sjResource: [], yqResource: [] };
allSjResource = [...allSjResource, ...(stepResource.sjResource || [])]; allSjResource = [...allSjResource, ...(stepResource.sjResource || [])];
allYqResource = [...allYqResource, ...(stepResource.yqResource || [])]; allYqResource = [...allYqResource, ...(stepResource.yqResource || [])];
} }
for(var i=0;i<ybsmDataList.length;i++){
allYqResource.push({
mc: ybsmDataList[i].selectInfo_xztp.mc,
xh: ybsmDataList[i].selectInfo_xztp.xh,
bh: ybsmDataList[i].selectInfo_xztp.bh,
jzrq: ybsmDataList[i].selectInfo_xztp.jzrq,
})
}
this.resourceTmp = uniqeResource(tmpResource, allSjResource) this.resourceTmp = uniqeResource(tmpResource, allSjResource)
this.yqResourceTmp = allYqResource
this.yqResourceTmp = uniqeYqOne(allYqResource)
return this.resourceTmp; return this.resourceTmp;
}, },
// //
@ -268,6 +257,21 @@ export default {
console.log(content); console.log(content);
}, },
//
async handleClickButton(e, rowIndex,colIndex,ee,data,index) {
if(e==='calcCqzl'){
const content = this.getFilledFormData()
let formData = this.formData;
let qy = content.ybsmDataList[index].yqInfo_xztp || formData.ybsmDataList[index].yqInfo_xztp
let dw = 'g'
let x = await getBalance({yq:qy,dw:dw})
if(x && x.success){
this.$refs[`ybsmTableRef${index}`][0]?.updateDataSourceByRowIndex(rowIndex, { cqzl: x.value },{signData:data,updateFields:['cqzl']});
}else{
this.$message.error(x.message || '称量失败')
}
}
},
} }
}; };
</script> </script>

+ 11
- 11
src/views/business/comps/template/dialog/SelectMixReagentDialog.vue View File

@ -37,6 +37,12 @@ const typeMap = {
listApi: public_sjList, listApi: public_sjList,
title:"选择试剂" title:"选择试剂"
}, },
"3": {
searchForm: getGyzjSearchForm(),
columns: getGyzjColumns(),
listApi: public_gyzjList,
title:"选择给药制剂"
},
'7': { '7': {
searchForm: getGspSearchForm(), searchForm: getGspSearchForm(),
columns: getGspColumns(), columns: getGspColumns(),
@ -44,22 +50,16 @@ const typeMap = {
title:"选择供试品" title:"选择供试品"
}, },
"9": { "9": {
searchForm: getXjSearchForm(),
columns: getXjColumns(),
listApi: public_xjList,
title:"选择细菌"
},
"11": {
searchForm: getXbSearchForm(), searchForm: getXbSearchForm(),
columns: getXbColumns(), columns: getXbColumns(),
listApi: public_xbList, listApi: public_xbList,
title:"选择细胞" title:"选择细胞"
}, },
"3": {
searchForm: getGyzjSearchForm(),
columns: getGyzjColumns(),
listApi: public_gyzjList,
title:"选择给药制剂"
"11": {
searchForm: getXjSearchForm(),
columns: getXjColumns(),
listApi: public_xjList,
title:"选择细菌"
}, },
"13": { "13": {
searchForm: getJcbSearchForm(), searchForm: getJcbSearchForm(),

+ 3
- 2
src/views/business/comps/template/dialog/SubPackageDialog.vue View File

@ -110,6 +110,7 @@ export default {
uuid: getuuid(),//id uuid: getuuid(),//id
mybhOptions: [],// mybhOptions: [],//
id: "",//id id: "",//id
myInfo: {},//
} }
}, },
computed: { computed: {
@ -174,7 +175,7 @@ export default {
} }
this.id = data.id; this.id = data.id;
this.myInfo = cloneData.myInfo;
this.formData = cloneData; this.formData = cloneData;
// //
this.resetErrors(); this.resetErrors();
@ -224,7 +225,7 @@ export default {
} }
}, },
handleSubmit() { handleSubmit() {
EventBus.$emit('dialogSubPackageSubmit', { ...this.formData, fzList: this.fzList, uuid: this.uuid });
EventBus.$emit('dialogSubPackageSubmit', { ...this.formData, fzList: this.fzList, uuid: this.uuid, myInfo: this.myInfo });
setTimeout(() => { setTimeout(() => {
this.close(); this.close();
}, 500); }, 500);

+ 4
- 0
src/views/business/comps/template/formConfig/gsp/gsp015.js View File

@ -118,6 +118,8 @@ export const getQyTableColumns = ($this) => {
width: 200, width: 200,
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill', bodyFillType: 'preFill',
subBodyType:"span",
subBodyKey: "qybhCode",
}, },
{ {
label: '制剂编号', label: '制剂编号',
@ -209,6 +211,8 @@ export const getJyTableColumns = ($this) => {
width: 200, width: 200,
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill', bodyFillType: 'preFill',
subBodyType:"span",
subBodyKey: "jybhCode",
}, },
{ {
label: '取样编号', label: '取样编号',

+ 13
- 13
src/views/business/comps/template/formConfig/sp/SP0019.js View File

@ -43,19 +43,19 @@ export const getBaseInfoFormConfig = (formType) => {
type: 'input', type: 'input',
disabled: true disabled: true
}, },
methodCode: {
label: 'template.common.methodCode',
type: 'input',
fillType: formType === 'sp0020' ? 'actFill' : 'preFill',
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: 'inputNumber',
fillType: formType === 'sp0020' ? 'actFill' : 'preFill',
prepend: 'V',
maxlength: 50
},
// methodCode: {
// label: 'template.common.methodCode',
// type: 'input',
// fillType: formType === 'sp0020' ? 'actFill' : 'preFill',
// maxlength: 50
// },
// versionNum: {
// label: 'template.common.versionNumber',
// type: 'inputNumber',
// fillType: formType === 'sp0020' ? 'actFill' : 'preFill',
// prepend: 'V',
// maxlength: 50
// },
clpbh: { clpbh: {
label: '处理批编号', label: '处理批编号',
type: 'input', type: 'input',

+ 1
- 1
src/views/business/comps/template/formConfig/sp/SP0020.js View File

@ -94,7 +94,7 @@ export const getYqjgFormConfig = () => {
type: 'checkboxList', type: 'checkboxList',
config: { config: {
jg: { jg: {
type: 'checkboxTree',
type: 'radioTree',
label: '结果', label: '结果',
options: [ options: [
{ label: '分析批接受', value: '分析批接受' }, { label: '分析批接受', value: '分析批接受' },

+ 35
- 11
src/views/business/resource/gyzj/comps/gyzj/Ff.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 发放弹窗 --> <!-- 发放弹窗 -->
<el-dialog :title="$t('page.business.resource.gyzj.fafang')" :visible.sync="open" width="1200px" append-to-body
<el-dialog :title="$t('page.business.resource.gyzj.fafang')" :visible.sync="open" width="80%" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'" <el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'"
v-if="open"> v-if="open">
@ -44,7 +44,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.resource.gyzj.ckmz')" align="center" width="400px"> <el-table-column :label="$t('page.business.resource.gyzj.ckmz')" align="center" width="400px">
<template slot-scope="scope"> <template slot-scope="scope">
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.kcdw" />
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.kcdw" :selectkey="scope.row.id + ''"
@change="tpChange" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('form.remark')" align="center" width="250px"> <el-table-column :label="$t('form.remark')" align="center" width="250px">
@ -124,7 +125,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ckmz')" prop="ckmz"> <el-form-item :label="$t('page.business.resource.gyzj.ckmz')" prop="ckmz">
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" />
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckldw" @change="tpChange2" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -154,12 +155,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2')" prop="lqr2Id">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2')" >
<SelectDeptUser v-model="form.lqr2Id" key="lqr2Id" @change="validateForm" /> <SelectDeptUser v-model="form.lqr2Id" key="lqr2Id" @change="validateForm" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2') + $t('form.password')" prop="lqr2mm">
<el-form-item :label="$t('page.business.resource.gyzj.lqr2') + $t('form.password')" >
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent <el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="form.lqr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" /> show-password v-model="form.lqr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item> </el-form-item>
@ -181,12 +182,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2')" prop="ffr2Id">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2')" >
<SelectDeptUser v-model="form.ffr2Id" key="ffr2Id" @change="validateForm" /> <SelectDeptUser v-model="form.ffr2Id" key="ffr2Id" @change="validateForm" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2') + $t('form.password')" prop="ffr2mm">
<el-form-item :label="$t('page.business.resource.gyzj.ffr2') + $t('form.password')" >
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent <el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="form.ffr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" /> show-password v-model="form.ffr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item> </el-form-item>
@ -325,6 +326,29 @@ export default {
} }
} }
}, },
tpChange2(val) {
let that = this
if (val) {
that.form.ckmz = val.tpz
that.form.ckmzdw = val.dw
} else {
that.form.ckmz = null
that.form.ckmzdw = null
}
},
tpChange(val) {
let that = this
if (val) {
const _index = _.findIndex(that.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) {
that.selectList[_index].ckmz = val.tpz
that.selectList[_index].ckmzdw = val.dw
}
} else {
that.selectList[_index].ckmz = null
that.selectList[_index].ckmzdw = null
}
},
handleSc(row) { handleSc(row) {
const that = this const that = this
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => { this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
@ -428,24 +452,24 @@ export default {
for (var i = 0; i < params.list.length; i++) { for (var i = 0; i < params.list.length; i++) {
if (!params.list[i].zytj || params.list[i].zytj == '') { if (!params.list[i].zytj || params.list[i].zytj == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "转移条件不能为空")
this.$modal.msgError("转移条件不能为空")
return return
} }
if (!params.list[i].mdMcs || params.list[i].mdMcs == '') { if (!params.list[i].mdMcs || params.list[i].mdMcs == '') {
if (!params.list[i].mdOther || params.list[i].mdOther == '') { if (!params.list[i].mdOther || params.list[i].mdOther == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "目的不能为空")
this.$modal.msgError("目的不能为空")
} }
return return
} }
if (!params.list[i].ckmz || params.list[i].ckmz == '') { if (!params.list[i].ckmz || params.list[i].ckmz == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "出库毛重不能为空")
this.$modal.msgError("出库毛重不能为空")
return return
} }
if (!params.list[i].remark || params.list[i].remark == '') { if (!params.list[i].remark || params.list[i].remark == '') {
// this.$modal.msgError(params.list[i].mc + "") // this.$modal.msgError(params.list[i].mc + "")
this.$modal.msgError( "备注不能为空")
this.$modal.msgError("备注不能为空")
return return
} }
} }

+ 18
- 6
src/views/business/resource/gyzj/comps/gyzj/Gh.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 确认归还弹窗 --> <!-- 确认归还弹窗 -->
<el-dialog :title="$t('page.business.resource.gyzj.guihuan')" :visible.sync="open" width="800px" append-to-body
<el-dialog :title="$t('page.business.resource.gyzj.guihuan')" :visible.sync="open" width="1000px" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open"> <el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open">
<div class="sbzdtcma"> <input type="text"> <input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password> </div> <div class="sbzdtcma"> <input type="text"> <input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password> </div>
@ -94,9 +94,10 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.rkmz')" prop="rkmz"> <el-form-item :label="$t('page.business.resource.gyzj.rkmz')" prop="rkmz">
<el-input type="number" v-model="form.rkmz" maxlength="50" :placeholder="$t('form.placeholderInput')">
<SelectBalanceValue v-model="form.rkmz" :dw="form.ckldw" @change="tpChange" />
<!-- <el-input type="number" v-model="form.rkmz" maxlength="50" :placeholder="$t('form.placeholderInput')">
<template slot="append">{{ form.ckldw }}</template> <template slot="append">{{ form.ckldw }}</template>
</el-input>
</el-input> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -137,12 +138,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id')" prop="jsr2Id">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id')" >
<SelectDeptUser v-model="form.jsr2Id" key="jsr2Id" /> <SelectDeptUser v-model="form.jsr2Id" key="jsr2Id" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id') + $t('form.password')" prop="jsr2mm">
<el-form-item :label="$t('page.business.resource.gyzj.jsr2Id') + $t('form.password')" >
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="form.jsr2mm" maxlength="20" <el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="form.jsr2mm" maxlength="20"
:placeholder="$t('form.placeholderInput')" /> :placeholder="$t('form.placeholderInput')" />
</el-form-item> </el-form-item>
@ -169,11 +170,12 @@
import { gh, info } from "@/api/business/gyzj/gyzj" import { gh, info } from "@/api/business/gyzj/gyzj"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import SelectBalanceValue from '@/views/business/comps/select/SelectBalanceValue';
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
export default { export default {
name: "Gh", name: "Gh",
components: { SelectDeptUser,BusinessSelect },
components: { SelectDeptUser,BusinessSelect,SelectBalanceValue },
data() { data() {
return { return {
isBatch: false, isBatch: false,
@ -238,6 +240,16 @@ export default {
created() { created() {
}, },
methods: { methods: {
tpChange(val) {
let that = this
if (val) {
that.form.rkmz = val.tpz
that.form.rkmzdw = val.dw
} else {
that.form.rkmz = null
that.form.rkmzdw = null
}
},
cancel() { cancel() {
this.open = false this.open = false
}, },

+ 31
- 5
src/views/business/resource/mjy/comps/mjy/Ff.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 发放弹窗 --> <!-- 发放弹窗 -->
<el-dialog :title="$t('page.business.resource.mjy.fafang')" :visible.sync="open" width="1200px" append-to-body
<el-dialog :title="$t('page.business.resource.mjy.fafang')" :visible.sync="open" width="80%" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'" <el-form ref="form" :model="form" :rules="rules" :label-width="$i18n.locale === 'zh_CN' ? '120px' : '170px'"
v-if="open"> v-if="open">
@ -37,7 +37,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.ckmz')" align="center" width="400px"> <el-table-column :label="$t('page.business.resource.mjy.ckmz')" align="center" width="400px">
<template slot-scope="scope"> <template slot-scope="scope">
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.ckmzdw" />
<SelectBalanceValue v-model="scope.row.ckmz" :dw="scope.row.kcdw" :selectkey="scope.row.id + ''"
@change="tpChange"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.md')" align="center" width="250px"> <el-table-column :label="$t('page.business.resource.mjy.md')" align="center" width="250px">
@ -124,7 +125,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.ckmz')" prop="ckmz"> <el-form-item :label="$t('page.business.resource.mjy.ckmz')" prop="ckmz">
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckmzdw" />
<SelectBalanceValue v-model="form.ckmz" :dw="form.ckldw" @change="tpChange2"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -318,16 +319,41 @@ export default {
}, },
selectStudyChangeBatch(val) { selectStudyChangeBatch(val) {
if (val && val.id && val.id !== '') { if (val && val.id && val.id !== '') {
const _index = _.findIndex(this.selectList, function (o) { return o.id + '' === val.key })
let _index = _.findIndex(this.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) { if (_index > -1) {
this.selectList[_index].mdMcs = val.name this.selectList[_index].mdMcs = val.name
this.selectList[_index].mdOther = val.mdOther this.selectList[_index].mdOther = val.mdOther
} }
} }
}, },
tpChange2(val) {
let that = this
if (val) {
that.form.ckmz = val.tpz
that.form.ckmzdw = val.dw
} else {
that.form.ckmz = null
that.form.ckmzdw = null
}
},
tpChange(val) {
let that = this
debugger
if (val) {
let _index = _.findIndex(that.selectList, function (o) { return o.id + '' === val.key })
debugger
if (_index > -1) {
that.selectList[_index].ckmz = val.tpz
that.selectList[_index].ckmzdw = val.dw
}
} else {
that.selectList[_index].ckmz = null
that.selectList[_index].ckmzdw = null
}
},
handleSc(row) { handleSc(row) {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => { this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
const _index = _.findIndex(this.selectList, function (o) { return o.id === row.id })
let _index = _.findIndex(this.selectList, function (o) { return o.id === row.id })
if (_index > -1) { if (_index > -1) {
this.selectList.splice(_index, 1) this.selectList.splice(_index, 1)
this.form.ids = this.selectList.map(item => item.id) this.form.ids = this.selectList.map(item => item.id)

+ 23
- 6
src/views/business/resource/mjy/comps/mjy/Gh.vue View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- 归还弹窗 --> <!-- 归还弹窗 -->
<el-dialog :title="$t('page.business.resource.mjy.guihuan')" :visible.sync="open" width="800px" append-to-body
<el-dialog :title="$t('page.business.resource.mjy.guihuan')" :visible.sync="open" width="1000px" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open"> <el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open">
<div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div> <div class="sbzdtcma"> <input type="text"> <input type="password" show-password> </div>
@ -95,19 +95,20 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.rkmz')" prop="rkmz"> <el-form-item :label="$t('page.business.resource.mjy.rkmz')" prop="rkmz">
<el-input type="number" v-model="form.rkmz" maxlength="50" @change="rklChange"
<SelectBalanceValue v-model="form.rkmz" :dw="form.kcdw" @change="tpChange" />
<!-- <el-input type="number" v-model="form.rkmz" maxlength="50" @change="rklChange"
:placeholder="$t('form.placeholderInput')"> :placeholder="$t('form.placeholderInput')">
<template slot="append">{{ form.kcdw }}</template> <template slot="append">{{ form.kcdw }}</template>
</el-input>
</el-input> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('page.business.resource.mjy.jsl')" prop="jsl"> <el-form-item :label="$t('page.business.resource.mjy.jsl')" prop="jsl">
<el-input type="number" v-model="form.jsl" maxlength="50" disabled
<el-input type="number" v-model="form.jsl" maxlength="50"
:placeholder="$t('form.placeholderInput')"> :placeholder="$t('form.placeholderInput')">
<template slot="append">{{ form.kcdw }}</template>
<template slot="append">{{ form.ckmzdw }}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -206,10 +207,11 @@ import { gh, info } from "@/api/business/mjy/mjy"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectBalanceValue from '@/views/business/comps/select/SelectBalanceValue';
export default { export default {
name: "Gh", name: "Gh",
components: { SelectDeptUser, BusinessSelect },
components: { SelectDeptUser, BusinessSelect,SelectBalanceValue },
data() { data() {
return { return {
isBatch: false, isBatch: false,
@ -299,6 +301,21 @@ export default {
created() { created() {
}, },
methods: { methods: {
tpChange(val) {
let that = this
if (val) {
that.form.rkmz = val.tpz
that.form.rkmzdw = val.dw
} else {
that.form.rkmz = null
that.form.rkmzdw = null
}
if(that.form.rkmzdw==that.form.ckmzdw){
that.rklChange()
}else{
this.form.jsl = ''
}
},
rkwzChange(val) { rkwzChange(val) {
this.form.rktj = val.wc this.form.rktj = val.wc
}, },

+ 2
- 2
src/views/business/study/comp/wzlb/gspList.vue View File

@ -101,11 +101,11 @@
</template> </template>
<!-- 取出 --> <!-- 取出 -->
<el-button type="text" v-if="scope.row.cczt == 3" @click="handleQc(scope.row)"
<el-button type="text" v-if="(scope.row.zjzt == 3||scope.row.zjzt == 2) && scope.row.cczt == 3" @click="handleQc(scope.row)"
v-hasPermi="['business:studyGsp:qc', 'business:nonTrialGsp:qc', 'business:drugGsp:qc']">{{ v-hasPermi="['business:studyGsp:qc', 'business:nonTrialGsp:qc', 'business:drugGsp:qc']">{{
$t('page.business.resource.gyzj.quchu') }}</el-button> $t('page.business.resource.gyzj.quchu') }}</el-button>
<!-- 存储 --> <!-- 存储 -->
<el-button type="text" v-if="scope.row.cczt == 1" @click="handleCc(scope.row)"
<el-button type="text" v-if="(scope.row.zjzt == 3||scope.row.zjzt == 2) && scope.row.cczt == 1" @click="handleCc(scope.row)"
v-hasPermi="['business:studyGsp:cc', 'business:nonTrialGsp:cc', 'business:drugGsp:cc']">{{ v-hasPermi="['business:studyGsp:cc', 'business:nonTrialGsp:cc', 'business:drugGsp:cc']">{{
$t('page.business.resource.gyzj.cunchu') }}</el-button> $t('page.business.resource.gyzj.cunchu') }}</el-button>
</template> </template>

Loading…
Cancel
Save