diff --git a/src/api/business/study/studyFormApply.js b/src/api/business/study/studyFormApply.js
index 33473d0..b14d96c 100644
--- a/src/api/business/study/studyFormApply.js
+++ b/src/api/business/study/studyFormApply.js
@@ -86,6 +86,14 @@ export function studyFormApply_bc(data) {
})
}
+//仅保存
+export function studyFormApply_bcOnly(data) {
+ return request({
+ url: '/system/business/studyFormApply/bcOnly',
+ method: 'post',
+ data: data
+ })
+}
//提交
export function studyFormApply_tj(data) {
return request({
diff --git a/src/api/business/study/studyFormFill.js b/src/api/business/study/studyFormFill.js
index 7093f2c..14d1263 100644
--- a/src/api/business/study/studyFormFill.js
+++ b/src/api/business/study/studyFormFill.js
@@ -88,6 +88,14 @@ export function studyFormFill_bc(data) {
})
}
+//仅保存
+export function studyFormFill_bcOnly(data) {
+ return request({
+ url: '/system/business/studyFormFill/bcOnly',
+ method: 'post',
+ data: data
+ })
+}
//提交
export function studyFormFill_tj(data) {
return request({
diff --git a/src/api/business/study/studyFormPlan.js b/src/api/business/study/studyFormPlan.js
index cee4d59..be88b3a 100644
--- a/src/api/business/study/studyFormPlan.js
+++ b/src/api/business/study/studyFormPlan.js
@@ -61,6 +61,14 @@ export function studyFormPlan_bc(data) {
})
}
+//仅保存
+export function studyFormPlan_bcOnly(data) {
+ return request({
+ url: '/system/business/studyFormPlan/bcOnly',
+ method: 'post',
+ data: data
+ })
+}
//提交
export function studyFormPlan_tj(data) {
return request({
diff --git a/src/api/business/study/studyFormPre.js b/src/api/business/study/studyFormPre.js
index d61d8bb..0b46252 100644
--- a/src/api/business/study/studyFormPre.js
+++ b/src/api/business/study/studyFormPre.js
@@ -43,6 +43,14 @@ export function studyFormPre_bc(data) {
})
}
+//仅保存
+export function studyFormPre_bcOnly(data) {
+ return request({
+ url: '/system/business/studyFormPre/bcOnly',
+ method: 'post',
+ data: data
+ })
+}
//提交
export function studyFormPre_tj(data) {
return request({
diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue
index 9ad7981..769b1fe 100644
--- a/src/components/Template/CustomTable.vue
+++ b/src/components/Template/CustomTable.vue
@@ -63,17 +63,7 @@
:error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
-
+
-
+
{{ row[col.bodySubKey] }}
@@ -228,7 +230,7 @@ export default {
fillType: sItem.bodyFillType,
maxlength: sItem.otherMaxlength || 50,
parentLabel: sItem.label,
- type:"input"
+ type: "input"
}
},
//判断是否显示其他输入框
@@ -238,10 +240,10 @@ export default {
//和凡哥商量,只要value为负数都显示其他
return arr.some(item => item < 0);
},
- isShowBodySub(col,row) {
+ isShowBodySub(col, row) {
if (col.hasOwnProperty("disabled")) {
return col.showBodySub
- }else if(col.bodySubType === 'span'&&!row[col.bodySubKey]){//如果是span没有值的话就隐藏
+ } else if (col.bodySubType === 'span' && !row[col.bodySubKey]) {//如果是span没有值的话就隐藏
return false;
}
return col.bodySubType && col.bodySubKey;
@@ -369,15 +371,20 @@ export default {
this.formErrors.push(errorItem);
}
}
+ console.log(col.otherCode, "col.otherCode")
+
// 检查其他输入框
- if (col.otherCode && col.bodySubType !== 'span') {
+ if (col.otherCode) {
+ const isSelectedOther = this.isShowOther(mainValue);
+ if (!isSelectedOther) {
+ return;
+ }
const otherValue = row[col.otherCode];
-
if (this.isValueEmpty(otherValue)) {
const errorItem = {
rowIndex,
colIndex,
- field: col.bodySubKey,
+ field: col.otherCode,
label: `${this.$t(col.label)}单位`,
error: `请填写${this.$t(col.otherLabel) ? this.$t(col.otherLabel) : '其他'}信息`
};
@@ -508,6 +515,7 @@ export default {
},
// 根据行索引更新数据
updateDataSourceByRowIndex(rowIndex, data) {
+ console.log(rowIndex, data, "updateDataSourceByRowIndex")
this.localDataSource[rowIndex] = { ...this.localDataSource[rowIndex], ...data };
this.localDataSource = [...this.localDataSource];
},
@@ -736,5 +744,6 @@ export default {
font-size: 14px;
font-weight: normal;
color: #606266;
+ width: auto;
}
\ No newline at end of file
diff --git a/src/components/Template/SelectTable.vue b/src/components/Template/SelectTable.vue
index b425c6c..c7e3338 100644
--- a/src/components/Template/SelectTable.vue
+++ b/src/components/Template/SelectTable.vue
@@ -68,7 +68,7 @@ export default {
default: () => {},
},
studyFormId: {
- type: String,
+ type: [String,Number],
default: "",
},
},
diff --git a/src/lang/en/business/study/studyFormFill.js b/src/lang/en/business/study/studyFormFill.js
index f523d27..02fd192 100644
--- a/src/lang/en/business/study/studyFormFill.js
+++ b/src/lang/en/business/study/studyFormFill.js
@@ -71,5 +71,7 @@ export default {
smxz: 'Declaration of Collaboration',
bcsm: 'Additional Remark',
fztgjj: 'Approve/Reject Record Abolition',
- ysy: 'Reviewed'
+ ysy: 'Reviewed',
+ bcjl:'保存记录',
+ txbbc:'填写并保存'
}
diff --git a/src/lang/en/template/sp.js b/src/lang/en/template/sp.js
index 2da54d5..a26d185 100644
--- a/src/lang/en/template/sp.js
+++ b/src/lang/en/template/sp.js
@@ -73,7 +73,8 @@ export default {
//生物样品分析方法学样品制备表(Dilution Integrity)- 生物样品分析方法学样品制备表(稀释可靠性)
sp016: {
title:
- 'Bioanalytical Methods Sample Preparation Record (Dilution Integrity)'
+ 'Bioanalytical Methods Sample Preparation Record (Dilution Integrity)',
+ bs: 'Multiple'
},
//生物样品分析方法学样品制备表(Stock solution comparison)- 生物样品分析方法学样品制备表(储备液对比)
sp017: {
diff --git a/src/lang/zh/business/study/studyFormFill.js b/src/lang/zh/business/study/studyFormFill.js
index 60d4148..8cea015 100644
--- a/src/lang/zh/business/study/studyFormFill.js
+++ b/src/lang/zh/business/study/studyFormFill.js
@@ -73,4 +73,6 @@ export default {
bcsm: '补充说明',
fztgjj: '废止通过/拒绝',
ysy: '已审阅',
+ bcjl:'保存记录',
+ txbbc:'填写并保存'
}
diff --git a/src/lang/zh/template/sp.js b/src/lang/zh/template/sp.js
index 6925f37..d311c12 100644
--- a/src/lang/zh/template/sp.js
+++ b/src/lang/zh/template/sp.js
@@ -68,7 +68,8 @@ export default {
},
//生物样品分析方法学样品制备表(Dilution Integrity)- 生物样品分析方法学样品制备表(稀释可靠性)
sp016: {
- title: '生物样品分析方法学样品制备表(稀释可靠性)'
+ title: '生物样品分析方法学样品制备表(稀释可靠性)',
+ bs: '倍数'
},
//生物样品分析方法学样品制备表(Stock solution comparison)- 生物样品分析方法学样品制备表(储备液对比)
sp017: {
diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
index 8be46bc..2c27d83 100644
--- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
@@ -418,8 +418,11 @@ export default {
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef",
"rongyeTableRef", "rongyeStepFormPackageRef", "remarkRef"]);
- console.log(content)
+ if(!content){
+ return false;
+ }
//生成resource
+
let tmpResource = []
let tableList = content.stepTableFormData
diff --git a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
index bd71241..0ba532f 100644
--- a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
+++ b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue
@@ -169,46 +169,45 @@ export default {
},
methods: {
// 为指定的表单数据数组分配编号
- async assignNumbersToTableData(tableDataArray) {
- if (!tableDataArray || tableDataArray.length === 0) {
- return;
- }
+ async assignNumbersToTableData(config) {
+ const configs = this.formData[config]
- // 检查表单数据中是否有任何一行的subTargetSolutionCode有值
- const hasAnyWithValue = tableDataArray.some(row =>
- row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
-
- // 如果没有任何一行有值,则为所有行分配编号
- if (!hasAnyWithValue) {
- const length = tableDataArray.length;
- const snList = await this.getLatestSn(length);
- tableDataArray.forEach((row, idx) => {
- row.subTargetSolutionCode = snList[idx] || '';
- });
- }
- },
-
- async handleUpdateCode() {
-
// 检查paralleConfigs中的paralleTableFormData数组
- if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) {
- for (let i = 0; i < this.formData.paralleConfigs.length; i++) {
- const config = this.formData.paralleConfigs[i];
- if (config.stepTableFormData && config.stepTableFormData.length > 0) {
- await this.assignNumbersToTableData(config.stepTableFormData);
+ if (configs && configs.length > 0) {
+ for (let i = 0; i < configs.length; i++) {
+ const ref = config === "paralleConfigs" ? `paralleStepTableRef_${i}` : `ladderStepTableRef_${i}`;
+ const {stepTableFormData = []} = configs[i];
+ if (stepTableFormData && stepTableFormData.length > 0) {
+ const tableDataArray = stepTableFormData;
+ // 检查表单数据中是否有任何一行的subTargetSolutionCode有值
+ const hasAnyWithValue = tableDataArray.some(row =>
+ row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== '');
+ // 如果没有任何一行有值,则为所有行分配编号
+ if (!hasAnyWithValue) {
+ const length = tableDataArray.length;
+ const snList = await this.getLatestSn(length);
+ tableDataArray.forEach((row, idx) => {
+ this.$refs[ref][0]?.updateDataSourceByRowIndex(idx,{subTargetSolutionCode: length==1?snList:snList[idx]});
+ });
+ }
}
}
}
+
+ },
- // 检查ladderConfigs中的ladderTableFormData数组
- if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) {
- for (let i = 0; i < this.formData.ladderConfigs.length; i++) {
- const config = this.formData.ladderConfigs[i];
- if (config.stepTableFormData && config.stepTableFormData.length > 0) {
- await this.assignNumbersToTableData(config.stepTableFormData);
+ async handleUpdateCode() {
+ this.assignNumbersToTableData("paralleConfigs");
+ this.assignNumbersToTableData("ladderConfigs");
+ this.$nextTick(() => {
+ //通知后端保存数据
+ const params = {
+ type: "fieldChanged",
+ newRecord: null,
+ resourceList: null,
}
- }
- }
+ EventBus.$emit('onModifyRecord', params,)
+ })
},
//新增平行配制
handleAddParalle() {
diff --git a/src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js b/src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js
index 617679e..6f45753 100644
--- a/src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js
+++ b/src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js
@@ -15,6 +15,7 @@ export const getSWYPFXFFXYPZBBTableConfig = (
bodyType: 'select',
bodyOptions: $this.getDictOptions(selectKey),
otherCode: 'bhOther',
+ otherLabel: 'template.sp.sp016.bs',
bodySubType: 'span',
bodySubKey: 'bhCode',
bodyFillType: 'preFill',
diff --git a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
index 5a9eff9..f4c1166 100644
--- a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
+++ b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
@@ -151,8 +151,8 @@ export const getParallelColumnsConfig = ($this) => {
prop: 'targetSolutionCode',
bodyType: 'select',
bodyOptions: $this.getDictOptions('business_sp_nbgzy'),
- subType: 'span',
- subKey: 'subTargetSolutionCode',
+ bodySubType: 'span',
+ bodySubKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
width: 280
},
diff --git a/src/views/business/form/drug/comp/tbbdList.vue b/src/views/business/form/drug/comp/tbbdList.vue
index 1aa9e20..90977d2 100644
--- a/src/views/business/form/drug/comp/tbbdList.vue
+++ b/src/views/business/form/drug/comp/tbbdList.vue
@@ -84,8 +84,8 @@
{{ $t('page.business.study.studyFormFill.tbz') }}
{{ $t('page.business.study.studyFormFill.ytj') }}
- {{ $t('page.business.study.studyFormFill.ywc') }}
- {{ $t('page.business.study.studyFormFill.ywcfh') }}
+ {{ $t('page.business.study.studyFormFill.ywcfh') }}
+ {{ $t('page.business.study.studyFormFill.ywc') }}
{{ $t('page.business.study.studyFormFill.dfz') }}
{{ $t('page.business.study.studyFormFill.yfz') }}
diff --git a/src/views/business/form/nonTrial/comp/tbbdList.vue b/src/views/business/form/nonTrial/comp/tbbdList.vue
index 93dffea..aad0b49 100644
--- a/src/views/business/form/nonTrial/comp/tbbdList.vue
+++ b/src/views/business/form/nonTrial/comp/tbbdList.vue
@@ -85,8 +85,8 @@
{{ $t('page.business.study.studyFormFill.tbz') }}
{{ $t('page.business.study.studyFormFill.ytj') }}
- {{ $t('page.business.study.studyFormFill.ywc') }}
- {{ $t('page.business.study.studyFormFill.ywcfh') }}
+ {{ $t('page.business.study.studyFormFill.ywcfh') }}
+ {{ $t('page.business.study.studyFormFill.ywc') }}
{{ $t('page.business.study.studyFormFill.dfz') }}
{{ $t('page.business.study.studyFormFill.yfz') }}
diff --git a/src/views/business/study/comp/jhbd/Bj.vue b/src/views/business/study/comp/jhbd/Bj.vue
index 346877b..65e61b8 100644
--- a/src/views/business/study/comp/jhbd/Bj.vue
+++ b/src/views/business/study/comp/jhbd/Bj.vue
@@ -126,7 +126,7 @@