Source/UBCS-WEB/src/api/code/maxSerialNum.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Source/UBCS-WEB/src/api/code/maxSerialNum.js
@@ -17,13 +17,10 @@ }) } export const getMaxSerialNumber = (codeRuleOid,secDTOList) => { export const getMaxSerialNumber = (params) => { return request({ url: '/api/ubcs-code/codeBasicSecController/getMaxSerialNumberForCodeRule', method: 'get', params:{ codeRuleOid, secDTOList } params }) } Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -101,6 +101,7 @@ }, data() { return { ValidataValue:false, eventFlag:{}, TreeValueForm:'', updateIndex: 0, @@ -131,6 +132,8 @@ }, mounted() { this.handleResize(); }, updated() { }, created() { if (this.LoadingStatus === 'code') { @@ -165,7 +168,7 @@ }, deep:true, immediate:true } }, }, methods: { // 渲染表单模板 @@ -510,6 +513,7 @@ if (valid) { done(); resolve(true); this.ValidataValue=true; } else { resolve(false); } Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -43,6 +43,15 @@ <el-table-column v-if="tableData.length != 0" fixed type="selection" width="55"></el-table-column> <el-table-column v-if="tableData.length != 0" fixed label="序号" type="index" width="55"> </el-table-column> <!-- 生命周期--> <el-table-column v-for="item in lcstatusArray" v-if=" lcstatusArray.length !== 0 && !item.hidden" label="生命周期值" prop="lcstatus" :show-overflow-tooltip="true" :sortable="item.sortable" :width="item.width" align="center"> <template slot-scope="scope"> <span>{{ scope.row.lcstatus_text }}</span> </template> </el-table-column> <!-- 编号--> <el-table-column v-for="item in CodeArray" v-if="CodeArray.length !== 0 && !item.hidden" :label="item.label" :prop="item.prop" :show-overflow-tooltip="true" :sortable="item.sortable" :width="item.width" align="center"> @@ -61,13 +70,7 @@ :width="item.width" align="center"> </el-table-column> <el-table-column v-for="item in lcstatusArray" v-if=" lcstatusArray.length !== 0 && !item.hidden" label="生命周期值" prop="lcstatus" :show-overflow-tooltip="true" :sortable="item.sortable" :width="item.width" align="center"> <template slot-scope="scope"> <span>{{ scope.row.lcstatus_text }}</span> </template> </el-table-column> </el-table> </el-row> <!-- 新增--> @@ -966,16 +969,5 @@ .bottom { margin-top: 10px; } //.custom-scrollbar::-webkit-scrollbar { // width: 10px !important;;/* 设置滚动条的宽度 */ //} // //.custom-scrollbar::-webkit-scrollbar-thumb { // background-color: #a11313 !important;; /* 设置滚动条的颜色 */ // border-radius: 5px !important;; /* 设置滚动条的边框弧度 */ //} // //.custom-scrollbar::-webkit-scrollbar-track { // background-color: #f1f1f1 !important;; /* 设置滚动条的轨道颜色 */ //} </style> Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue
@@ -1,8 +1,8 @@ <template> <el-dialog title="最大流水号" width="30%" append-to-body="true" class="avue-dialog avue-dialog--top" top="-3%" :visible.sync="dialogVisible"> <el-form :label-position="right" ref="ruleForm" label-width="80px" :model="formModel" :rules="rules"> <el-form :label-position="right" ref="ruleForm" label-width="80px" :model="formModel" :rules="rules" v-loading="loading"> <el-form-item label="流水号" prop="maxSecNum"> <el-input v-model="formModel.maxSecNum"></el-input> <el-input v-model="formModel.maxSecNum" @blur="handleBlur"></el-input> </el-form-item> </el-form> <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> @@ -52,10 +52,15 @@ }, immediate: true, deep: true } }, }, mounted() { }, data() { return { loading:false, maxNum:Number, ruleFormFlag:Boolean, dialogVisible: this.visible, activeName: 'codePrice', confirmLoadding: false, @@ -68,7 +73,17 @@ }, rules: { maxSecNum: [ { required: true, message: '请输入流水号', trigger: 'blur' } { required: true, message: '请输入流水号', trigger: 'blur' }, { validator: (rule, value, callback) => { if (value > this.maxNum) { callback(new Error('不能大于最大流水号')); } else { callback(); } }, trigger: 'blur' } ], }, selfColumnType: { @@ -110,6 +125,10 @@ } }, methods: { //清除正则 handleBlur() { this.$refs.ruleForm.clearValidate('maxSecNum'); }, // 获取码段 async apiGetCode() { this.activeName = "codeApply"; @@ -142,7 +161,45 @@ }, getCodeApplyFormData(codeApplyForm) { this.codeApplyForm = codeApplyForm; //最大流水Number const objcodekey = Object.keys(codeApplyForm) const filteredObj = objcodekey.reduce((acc, key) => { const pattern = /[\u4e00-\u9fa5]/; // 匹配中文字符的正则表达式 const patterns = /\$/; if (!pattern.test(key)&&!patterns.test(key)) { acc[key] = this.codeApplyForm[key]; } return acc; }, {}); const arrCode = Object.entries(filteredObj).map(([key, value]) => { return { secOid: key, secValue: value } }) this.ruleFormFlag = Object.values(codeApplyForm).every(value => { return value !== null && value !== undefined && value !== ''; }); if (this.ruleFormFlag && this.secVOList.length>0) { this.loading=true; let params = {}; params['codeRuleOid'] = this.ruleOid; Object.keys(arrCode).forEach((key) => { params[key] = arrCode[key]; }); getMaxSerialNumber(params).then(res => { this.formModel.maxSecNum = res.data.data; this.loading=false; this.maxNum=res.data.data }); } }, // 取消 cancel() { this.dialogVisible = false @@ -172,10 +229,13 @@ }) this.formModel['secDTOList'] = arrCode this.formModel['codeRuleOid'] = this.ruleOid this.confirmLoadding = true const rule = await this.$refs.CodeApply.validate() this.confirmLoadding = true; // this.FormRule= await this.$refs.CodeApply.validate(); const rule = await this.$refs.CodeApply.validate(); // console.log(rule) this.$refs.ruleForm.validate(res => { if (rule && res) { // console.log(rule,res) saveMaxSerialNum(this.formModel).then(res => { if (res.data.success) { this.$message.success('操作成功!'); @@ -189,12 +249,6 @@ this.confirmLoadding = false } }) // let object={} // object['secDTOList'] = arrCode; // object['codeRuleOid'] = this.ruleOid; // getMaxSerialNumber(object.codeRuleOid,object.secDTOList).then(res=>{ // console.log(res) // }) }, // 参照组件数据变更