@@ -24,6 +24,15 @@
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue"
:disabled="getDisabled()" :placeholder="getPlaceholder()" @change="onItemCheckboxChange">
+
+
+ {{ option.label }}
+
+
@@ -480,9 +489,10 @@ export default {
executeReagentSubmit(data) {
this.inputValue = data.selectedId;
const {filledCodes=[]} = this.item;
- const {selectInfo} = data;
+ console.log(filledCodes,"filledCodes")
+ const {selectInfo,row} = data;
if(filledCodes.length>0){
- this.inputValue = selectInfo[filledCodes[0]]+"("+selectInfo[filledCodes[1]]+")";
+ this.inputValue = row[filledCodes[0]]+"("+row[filledCodes[1]]+")";
}
this.selectRegentInfo = data;
EventBus.$emit("hideSelectMixReagentDialog");
@@ -1515,6 +1525,18 @@ export default {
}
}
+
+}
+
+.orange-border {
+ .checkbox-list-container {
+ border-color: #f9c588;
+
+ &:hover {
+ border-color: #f79b31;
+ }
+
+ }
.el-checkbox {
&.is-checked {
.el-checkbox__label {
@@ -1527,16 +1549,17 @@ export default {
}
}
}
-}
-
-.orange-border {
- .checkbox-list-container {
- border-color: #f9c588;
+ .el-radio {
+ &.is-checked {
+ .el-radio__label {
+ color: #606266;
+ }
- &:hover {
- border-color: #f79b31;
+ .el-radio__inner {
+ background-color: #f9c588;
+ border-color: #f9c588;
+ }
}
-
}
}
diff --git a/src/components/Template/mixins/formPackageMixins.js b/src/components/Template/mixins/formPackageMixins.js
index d342645..1c6ab3a 100644
--- a/src/components/Template/mixins/formPackageMixins.js
+++ b/src/components/Template/mixins/formPackageMixins.js
@@ -68,6 +68,7 @@ export default {
},
getRegentItem(item,fieldCode="type"){
const type = item[fieldCode] ;
+ console.log(item,"type")
return {
label: "",
type,
@@ -153,6 +154,14 @@ export default {
parentLabel: sItem.label,
}
},
+ getRadioOtherItem(sItem) {
+ return {
+ // label: sItem.otherLabel ? this.$t(sItem.otherLabel) : this.$t("template.common.other"),
+ fillType: sItem.fillType,
+ maxlength: sItem.otherMaxlength || 50,
+ parentLabel: sItem.label,
+ }
+ },
getClickableItem(sItem) {
return {
label: "",
@@ -206,14 +215,14 @@ export default {
// 处理特殊字段 - "其他"字段
if (currentConfig.otherCode) {
- const { otherCode } = currentConfig;
+ const { otherCode,type } = currentConfig;
//如果是更新的话,优先使用formFields中的值
if (update) {
result[otherCode] = formFields[otherCode] || formData[otherCode] || '';
} else {
result[otherCode] = formData[otherCode] || formFields[otherCode] || '';
}
- config[otherCode] = { label: "template.common.other", parentKey: key, type: "input", fillType: currentConfig.fillType }
+ config[otherCode] = { label: "template.common.other",parentType:type, parentKey: key, type: "input", fillType: currentConfig.fillType }
}
if (currentConfig.subKey) {
const { subKey } = currentConfig;
@@ -252,6 +261,7 @@ export default {
selectInfoKeys.forEach(key => {
result[key] = formData[key];
})
+ console.log(config,"allConfig")
// 更新表单字段
this.formFields = result;
this.allFieldsConfig = config;
@@ -302,6 +312,11 @@ export default {
if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段
formFields[o.otherCode] = "";
}
+ }else if(o.type === "radioAndOther"){
+ const isSelectedOther = this.isShowOtherByRadioAndOther(formFields[key]);
+ if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段
+ formFields[o.otherCode] = "";
+ }
}
}
@@ -318,7 +333,10 @@ export default {
}
if (this.isValueEmpty(formFields[key])) {
// 其他字段需要判断是否显示再校验
- if (o.label === "template.common.other" && !this.isShowOther(formFields[o.parentKey])) {
+ if (o.label === "template.common.other" && !this.isShowOther(formFields[o.parentKey]) && o.parentType !== "radioAndOther") {
+ continue
+ }
+ if (o.type === "radioAndOther" &&o.label === "template.common.other" && !this.isShowOtherByRadioAndOther(formFields[o.parentKey])) {
continue
}
//span的字段不校验
diff --git a/src/utils/formPackageCommon.js b/src/utils/formPackageCommon.js
index d28af7d..568e8d3 100644
--- a/src/utils/formPackageCommon.js
+++ b/src/utils/formPackageCommon.js
@@ -6,6 +6,14 @@ export const isShowOther = (v = [], col) => {
// 确保v是数组类型,以避免类型错误
const arr = Array.isArray(v) ? v : [v]
const otherArr = ['其他', '遮光', 'CA-QC Dilution-', '拒绝', '部分接受']
- //和凡哥商量,只要value为负数都显示其他
return arr.some((item) => otherArr.includes(item))
}
+
+//radioAndOther判断是否显示其他输入框
+export const isShowOtherByRadioAndOther = (v = '', col) => {
+ if (col && !col.otherCode) {
+ return false
+ }
+ const otherArr = ['其他', '异常', '不一致']
+ return otherArr.includes(v)
+}
diff --git a/src/views/business/comps/template/comps/sp/SP0019.vue b/src/views/business/comps/template/comps/sp/SP0019.vue
index 16edfbf..60fdaf9 100644
--- a/src/views/business/comps/template/comps/sp/SP0019.vue
+++ b/src/views/business/comps/template/comps/sp/SP0019.vue
@@ -28,6 +28,7 @@
onRegentSubmit(e)"
:showOperation = "fillType === 'preFill'"
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{}}" :prefixKey="`ryTable`"
>
@@ -118,6 +119,17 @@ export default {
},
methods: {
+ onRegentSubmit(e){
+ const {selectInfo, key, col, rowIndex, colIndex, rowData} = e;
+ const {row} = selectInfo;
+ if(key === "rymc"){
+ const params = {
+ pzrq: row.pzrq,
+ sxr: row.sxr,
+ }
+ this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params);
+ }
+ },
onYqSubmit(data, col, rowIndex, colIndex, row){
console.log(data, col, rowIndex, colIndex, row,"onRegentSubmit")
},
diff --git a/src/views/business/comps/template/comps/yp/YP002.vue b/src/views/business/comps/template/comps/yp/YP002.vue
index 07fdea3..f18ad11 100644
--- a/src/views/business/comps/template/comps/yp/YP002.vue
+++ b/src/views/business/comps/template/comps/yp/YP002.vue
@@ -10,8 +10,6 @@
{
{
label: '溶液名称(编号)',
prop: "rymc",
- bodyType: "input",
- disabled: true,
+ bodyType: "sj",
bodyFillType: 'actFill',
+ filledCodes:['mc','bh'],
},
{
label: '配置日期',
prop: "pzrq",
bodyType: "input",
- disabled: true,
+ bodyDisabled: true,
bodyFillType: 'actFill',
},
{
label: '失效日',
prop: "sxr",
bodyType: "input",
+ bodyDisabled: true,
bodyFillType: 'actFill',
},
]