Browse Source

2024-11-26

master
qiezi 1 year ago
parent
commit
e1106f94ad
  1. 9
      src/views/modules/code/item/itemValue.vue

9
src/views/modules/code/item/itemValue.vue

@ -115,6 +115,11 @@ export default {
conditionHeaderIndex(newVal,oldVal){ conditionHeaderIndex(newVal,oldVal){
this.searchCodeItemValueListItem(); this.searchCodeItemValueListItem();
this.codeConditionDetailList(); this.codeConditionDetailList();
},
"itemValueModal.valueNo"(newVal,oldVal){
if (newVal){
this.itemValueModal.valueNo = newVal.toUpperCase();
}
} }
}, },
methods: { methods: {
@ -258,6 +263,10 @@ export default {
saveItemValue(){ saveItemValue(){
this.$refs.saveItemValueForm.validate((valid,obj) => { this.$refs.saveItemValueForm.validate((valid,obj) => {
if (valid){ if (valid){
if (this.itemValueModal.valueNo.indexOf("I") >= 0 || this.itemValueModal.valueNo.indexOf("O") >= 0){
this.$message.error(`该"简码"不能包含字母I或者O!`);
return;
}
if (this.itemValueModal.valueNo && this.itemValueModal.valueNo.length > this.itemValue.bits){ if (this.itemValueModal.valueNo && this.itemValueModal.valueNo.length > this.itemValue.bits){
this.$message.error(`该"简码"位数超出了元素设置最大值${this.itemValue.bits}!`); this.$message.error(`该"简码"位数超出了元素设置最大值${this.itemValue.bits}!`);
return; return;

Loading…
Cancel
Save