| | |
| | | <basic-container class="code-total" style=" height: 100%"> |
| | | <!-- 编码规则信息展示区域 --> |
| | | <basic-container class="code-rule-container"> |
| | | <p |
| | | style=" |
| | | <div style="height: 40vh;overflow: auto;"> |
| | | <p |
| | | style=" |
| | | margin-top: -5px; |
| | | margin-bottom: 4px; |
| | | font-weight: 570; |
| | | font-size: 19px; |
| | | color: #0e2d5f; |
| | | " |
| | | > |
| | | 编码规则 |
| | | </p> |
| | | <avue-crud |
| | | ref="crud" |
| | | v-model="ruleForm" |
| | | :before-open="beforeOpen" |
| | | :data="data" |
| | | :option="optionRule" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :table-loading="loading" |
| | | class="code-rule-crud" |
| | | @row-click="codeRuleRowClick" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <!-- 表格内操作按钮 --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="permissionList.editBtn && (scope.row.lcStatus == 'Editing' ? true : false)" |
| | | icon="el-icon-edit" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openEdit(scope.row)" |
| | | >编 辑 |
| | | </el-button> |
| | | <el-button v-if="permissionList.releaseBtn && (scope.row.lcStatus == 'Editing' ? true : false)" |
| | | :loading="releadDisabled" |
| | | icon="el-icon-position" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="enableOrDeactivatse(scope.row.oid, 'release')" |
| | | >发 布 |
| | | </el-button> |
| | | <el-button v-if="permissionList.deactivateBtn && (scope.row.lcStatus == 'Released' ? true : false)" |
| | | icon="el-icon-video-pause" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="enableOrDeactivatse(scope.row.oid, 'disable')" |
| | | >停 用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.enableBtn && (scope.row.lcStatus == 'Disabled' ? true : false)" |
| | | icon="el-icon-video-play" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="enableOrDeactivatse(scope.row.oid, 'enable')" |
| | | >启 用 |
| | | </el-button> |
| | | </template> |
| | | <!-- 表格上方按钮区域 --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.rulDelBtn" |
| | | icon="el-icon-delete" |
| | | plain |
| | | size="small" |
| | | type="danger" |
| | | @click="handleDelete" |
| | | > |
| | | 删 除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.advancedQueryBtn" |
| | | icon="el-icon-search" |
| | | plain |
| | | size="small" |
| | | type="primary" |
| | | @click="openAdvancedQuery('codeRule')"> |
| | | 高级查询 |
| | | </el-button> |
| | | <el-button v-if="permissionList.cloneBtn" |
| | | icon="icon-kelong" |
| | | plain |
| | | size="small" |
| | | @click="openCodeRuleDialog" |
| | | > |
| | | 克 隆 |
| | | </el-button> |
| | | <el-button v-if="permissionList.otherCloneBtn" |
| | | icon="icon-lianjiekelong" |
| | | plain |
| | | size="small" |
| | | style="font-size: 12px" |
| | | @click="openOtherCodeRuleDialog" |
| | | > |
| | | 从其他规则中克隆码段 |
| | | </el-button> |
| | | <el-button v-if="permissionList.usescopeBtn" |
| | | icon="el-icon-s-help" |
| | | plain |
| | | size="small" |
| | | @click="handleRange" |
| | | > |
| | | 使用范围 |
| | | </el-button> |
| | | <el-button v-if="permissionList.clearBtn" |
| | | icon="icon-qingkong" |
| | | plain |
| | | size="small" |
| | | @click="clearAllCodeSec" |
| | | > |
| | | 清空码值 |
| | | </el-button> |
| | | <el-button v-if="permissionList.escapeOwnerBtn" |
| | | icon="el-icon-guide" |
| | | plain |
| | | size="small" |
| | | @click="escapeOwner" |
| | | > |
| | | 转移所有者 |
| | | </el-button> |
| | | <el-button v-if="permissionList.maxSerialnumBtn" |
| | | icon="el-icon-data-analysis" |
| | | plain |
| | | size="small" |
| | | @click="maxSerialNum" |
| | | > |
| | | 最大流水号 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | > |
| | | 编码规则 |
| | | </p> |
| | | <avue-crud |
| | | ref="crud" |
| | | v-model="ruleForm" |
| | | :before-open="beforeOpen" |
| | | :data="data" |
| | | :option="optionRule" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :table-loading="loading" |
| | | class="code-rule-crud" |
| | | @row-click="codeRuleRowClick" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <!-- 表格内操作按钮 --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="permissionList.editBtn && (scope.row.lcStatus == 'Editing' ? true : false)" |
| | | icon="el-icon-edit" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openEdit(scope.row)" |
| | | >编 辑 |
| | | </el-button> |
| | | <el-button v-if="permissionList.releaseBtn && (scope.row.lcStatus == 'Editing' ? true : false)" |
| | | :loading="releadDisabled" |
| | | icon="el-icon-position" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="enableOrDeactivatse(scope.row.oid, 'release')" |
| | | >发 布 |
| | | </el-button> |
| | | <el-button v-if="permissionList.deactivateBtn && (scope.row.lcStatus == 'Released' ? true : false)" |
| | | icon="el-icon-video-pause" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="enableOrDeactivatse(scope.row.oid, 'disable')" |
| | | >停 用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.enableBtn && (scope.row.lcStatus == 'Disabled' ? true : false)" |
| | | icon="el-icon-video-play" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="enableOrDeactivatse(scope.row.oid, 'enable')" |
| | | >启 用 |
| | | </el-button> |
| | | </template> |
| | | <!-- 表格上方按钮区域 --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.rulDelBtn" |
| | | icon="el-icon-delete" |
| | | plain |
| | | size="small" |
| | | type="danger" |
| | | @click="handleDelete" |
| | | > |
| | | 删 除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.advancedQueryBtn" |
| | | icon="el-icon-search" |
| | | plain |
| | | size="small" |
| | | type="primary" |
| | | @click="openAdvancedQuery('codeRule')"> |
| | | 高级查询 |
| | | </el-button> |
| | | <el-button v-if="permissionList.cloneBtn" |
| | | icon="icon-kelong" |
| | | plain |
| | | size="small" |
| | | @click="openCodeRuleDialog" |
| | | > |
| | | 克 隆 |
| | | </el-button> |
| | | <el-button v-if="permissionList.otherCloneBtn" |
| | | icon="icon-lianjiekelong" |
| | | plain |
| | | size="small" |
| | | style="font-size: 12px" |
| | | @click="openOtherCodeRuleDialog" |
| | | > |
| | | 从其他规则中克隆码段 |
| | | </el-button> |
| | | <el-button v-if="permissionList.usescopeBtn" |
| | | icon="el-icon-s-help" |
| | | plain |
| | | size="small" |
| | | @click="handleRange" |
| | | > |
| | | 使用范围 |
| | | </el-button> |
| | | <el-button v-if="permissionList.clearBtn" |
| | | icon="icon-qingkong" |
| | | plain |
| | | size="small" |
| | | @click="clearAllCodeSec" |
| | | > |
| | | 清空码值 |
| | | </el-button> |
| | | <el-button v-if="permissionList.escapeOwnerBtn" |
| | | icon="el-icon-guide" |
| | | plain |
| | | size="small" |
| | | @click="escapeOwner" |
| | | > |
| | | 转移所有者 |
| | | </el-button> |
| | | <el-button v-if="permissionList.maxSerialnumBtn" |
| | | icon="el-icon-data-analysis" |
| | | plain |
| | | size="small" |
| | | @click="maxSerialNum" |
| | | > |
| | | 最大流水号 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | |
| | | </basic-container> |
| | | |
| | | <!-- 高级查询对话框 --> |
| | |
| | | |
| | | <!-- 基础码段展示区域 --> |
| | | <basic-container class="code-basicsec-container"> |
| | | <p |
| | | style="margin-top: -5px; |
| | | <div style="height: 38.5vh;overflow: auto"> |
| | | <p |
| | | style="margin-top: -5px; |
| | | margin-bottom: 4px; |
| | | font-weight: 570; |
| | | font-size: 19px; |
| | | color: #0e2d5f;"> |
| | | 码段管理 |
| | | </p> |
| | | <avue-crud |
| | | ref="crudBasic" |
| | | :data="basicData" |
| | | :option="optionBasic" |
| | | :permission="basicPermissionList" |
| | | :table-loading="loadingBasic" |
| | | class="code-basic-crud" |
| | | @row-click="codeBasicSecRowClick" |
| | | @search-change="basicSearchChange" |
| | | @search-reset="basicSearchReset" |
| | | @selection-change="selectionBasicChange" |
| | | @refresh-change="refreshChangeBasicSec" |
| | | > |
| | | <!-- 基础码段表格内操作按钮 --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="basicPermissionList.viewBtn && currentRuleLcStatus != 'Editing'" |
| | | icon="el-icon-view" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openBasicDialog('view', scope.row)" |
| | | >查看 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.editBtn && currentRuleLcStatus === 'Editing'" |
| | | icon="el-icon-edit" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openBasicDialog('edit', scope.row)" |
| | | >编辑 |
| | | </el-button> |
| | | <el-button |
| | | v-if="basicPermissionList.basicMgrBtn && (scope.row.secType === 'codeclassifysec' || scope.row.secType == 'codefixedsec')" |
| | | icon="el-icon-setting" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openBasicSecCodeValueMgr(scope.row)" |
| | | >码值管理 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicMoveupBtn && scope.row.orderNum > 1" |
| | | icon="el-icon-arrow-up" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="upOrderNum(scope.row)" |
| | | >上移 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicDownBtn" |
| | | icon="el-icon-arrow-down" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="downOrderNum(scope.row)" |
| | | >下移 |
| | | </el-button> |
| | | </template> |
| | | 码段管理 |
| | | </p> |
| | | <avue-crud |
| | | ref="crudBasic" |
| | | :data="basicData" |
| | | :option="optionBasic" |
| | | :permission="basicPermissionList" |
| | | :table-loading="loadingBasic" |
| | | class="code-basic-crud" |
| | | @row-click="codeBasicSecRowClick" |
| | | @search-change="basicSearchChange" |
| | | @search-reset="basicSearchReset" |
| | | @selection-change="selectionBasicChange" |
| | | @refresh-change="refreshChangeBasicSec" |
| | | > |
| | | <!-- 基础码段表格内操作按钮 --> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="basicPermissionList.viewBtn && currentRuleLcStatus != 'Editing'" |
| | | icon="el-icon-view" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openBasicDialog('view', scope.row)" |
| | | >查看 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.editBtn && currentRuleLcStatus === 'Editing'" |
| | | icon="el-icon-edit" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openBasicDialog('edit', scope.row)" |
| | | >编辑 |
| | | </el-button> |
| | | <el-button |
| | | v-if="basicPermissionList.basicMgrBtn && (scope.row.secType === 'codeclassifysec' || scope.row.secType == 'codefixedsec')" |
| | | icon="el-icon-setting" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="openBasicSecCodeValueMgr(scope.row)" |
| | | >码值管理 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicMoveupBtn && scope.row.orderNum > 1" |
| | | icon="el-icon-arrow-up" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="upOrderNum(scope.row)" |
| | | >上移 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicDownBtn" |
| | | icon="el-icon-arrow-down" |
| | | plain |
| | | size="small" |
| | | type="text" |
| | | @click="downOrderNum(scope.row)" |
| | | >下移 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <!-- 基础码段表格左上方按钮区域 --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="basicPermissionList.addBtn" |
| | | :disabled="selectionList.length <= 0" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | type="primary" |
| | | @click="openAddBasicCodeSec" |
| | | > |
| | | 新 增 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicDelBtn" |
| | | :disabled="selectionList.length <= 0" |
| | | icon="el-icon-delete" |
| | | plain |
| | | size="small" |
| | | type="danger" |
| | | @click="deleteBasicCode(scope.row)" |
| | | > |
| | | 删 除 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicAdvancedQueryBtn" |
| | | :disabled="selectionList.length <= 0" |
| | | icon="el-icon-search" |
| | | plain |
| | | size="small" |
| | | type="primary" |
| | | @click="openAdvancedQuery('codeBasicSec')" |
| | | > |
| | | 高级查询 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 基础码段表格左上方按钮区域 --> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="basicPermissionList.addBtn" |
| | | :disabled="selectionList.length <= 0" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | type="primary" |
| | | @click="openAddBasicCodeSec" |
| | | > |
| | | 新 增 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicDelBtn" |
| | | :disabled="selectionList.length <= 0" |
| | | icon="el-icon-delete" |
| | | plain |
| | | size="small" |
| | | type="danger" |
| | | @click="deleteBasicCode(scope.row)" |
| | | > |
| | | 删 除 |
| | | </el-button> |
| | | <el-button v-if="basicPermissionList.basicAdvancedQueryBtn" |
| | | :disabled="selectionList.length <= 0" |
| | | icon="el-icon-search" |
| | | plain |
| | | size="small" |
| | | type="primary" |
| | | @click="openAdvancedQuery('codeBasicSec')" |
| | | > |
| | | 高级查询 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | </basic-container> |
| | | |
| | | <!-- 码段码值管理对话框 --> |
| | |
| | | > |
| | | <!-- 第一层对话框,添加码段信息对话框中的内容 --> |
| | | <div class="add-basicsec-total"> |
| | | <el-form :model="form" class="add-basicsec-form" :rules="rules" > |
| | | <el-form :model="form" :rules="rules" class="add-basicsec-form"> |
| | | <span class="left"> |
| | | <el-form-item |
| | | :label-width="leftFormLabelWidth" |
| | |
| | | :disabled="basicSecOnlyRead" |
| | | style="margin-right: 20px" |
| | | ></el-switch> |
| | | <el-input-number |
| | | <!-- <el-input-number |
| | | v-show="form.serialDependFlag" |
| | | v-model="form.serialDependOrder" |
| | | :readonly="basicSecOnlyRead" |
| | | controls-position="right" |
| | | ></el-input-number> |
| | | ></el-input-number> --> |
| | | </el-form-item> |
| | | |
| | | <el-form-item :label-width="leftFormLabelWidth" label="是否为空:"> |
| | |
| | | <template> |
| | | <vciWebRefer |
| | | ref="refer" |
| | | :referConfig="this.referConfig || {}" |
| | | :display="true" |
| | | :referConfig="this.referConfig || {}" |
| | | :serialType="form.serialType" |
| | | :text="form.customCodeSerialClassText" |
| | | :value="form.customCodeSerialClass" |
| | | :text="form.customCodeSerialClass" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | <!-- <el-input--> |
| | | <!-- v-model="form.customCodeSerialClass"--> |
| | | <!-- :readonly="basicSecOnlyRead"--> |
| | | <!-- @focus="streamFocusHandler"--> |
| | | <!-- ></el-input>--> |
| | | </template> |
| | | |
| | | |
| | |
| | | <!-- 日期码段 --> |
| | | <div v-show="form.secType === 'codedatesec' ? true : false"> |
| | | <el-form-item |
| | | prop="Dateformat" |
| | | :label-width="rightFormLabelWidth" |
| | | label="日期格式:" |
| | | prop="Dateformat" |
| | | > |
| | | <el-input |
| | | ref="codeDateFormatStr" |
| | |
| | | import vciWebRefer from "../../components/refer/vciWebRefer"; |
| | | |
| | | export default { |
| | | components: { vciWebRefer }, |
| | | components: {vciWebRefer}, |
| | | data() { |
| | | return { |
| | | rules: { |
| | |
| | | required: true, |
| | | trigger: 'blur', |
| | | validator: (rule, value, callback) => { |
| | | const Formats = ['yy', 'yyyy', 'yyyy-MM', 'yy-MM', 'yyyy-MM-dd','yy-MM-dd', 'yyyy-MM-dd HH:mm:ss', 'yy-MM-dd HH:mm:ss', 'HH:mm:ss']; |
| | | const Formats = ['yy', 'yyyy', 'yyyy-MM', 'yyyyMM','yyMM','yyyyMMdd','yyyyMMdd HH:mm:ss','yyMMdd HH:mm:ss','yy-MM', 'yyyy-MM-dd', 'yy-MM-dd', 'yyyy-MM-dd HH:mm:ss', 'yy-MM-dd HH:mm:ss', 'HH:mm:ss']; |
| | | if (!Formats.includes(this.form.codeDateFormatStr)) { |
| | | return callback(new Error('请输入正确日期格式,例如yyyy-MM-dd(并区分大小写)!')); |
| | | } |
| | |
| | | } |
| | | ] |
| | | }, |
| | | referConfig:{ |
| | | referConfig: { |
| | | title: '自定义流水参照', |
| | | showField: 'customCodeSerialClass', |
| | | showField: 'customCodeSerialClassText', |
| | | field: 'customCodeSerialClass', |
| | | fieldMap: {}, |
| | | placeholder:'请选择自定义流水', |
| | | options: { |
| | | fieldMap: { |
| | | serialType: "serialType" |
| | | }, |
| | | placeholder: '请选择自定义流水', |
| | | options: { |
| | | // 设置默认的属性 |
| | | url: 'api/ubcs-code/codeSerialAlgorithmController/gridCodeSerialAlgorithm', |
| | | valueField:'classFullName', |
| | | textField:'classFullName', |
| | | textField: 'name', |
| | | valueField: 'classFullName', |
| | | isMuti: false, |
| | | type: "grid", |
| | | method: 'get', |
| | |
| | | {title: '算法编号', field: 'id', width: 200}, |
| | | {title: '算法名称', field: 'name', width: 150}, |
| | | {title: '类全路径', field: 'classFullName', width: 300}, |
| | | {title: '类型', field: 'serialType', width: 300}, |
| | | {title: '描述', field: 'description'} |
| | | ], |
| | | queryColumns: [ |
| | |
| | | secType: "codefixedsec", //码段类型 |
| | | description: "", //描述 |
| | | serialDependFlag: false, //是否流水依赖 |
| | | serialDependOrder: "", //流水依赖顺序 |
| | | //serialDependOrder: "", //流水依赖顺序 |
| | | nullableFlag: false, //是否为空 |
| | | prefixCode: "", //前缀 |
| | | suffixCode: "", //后缀 |
| | |
| | | }, |
| | | methods: { |
| | | //自定义流水失焦 |
| | | setReferValue(data){ |
| | | console.log(data) |
| | | setReferValue(data) { |
| | | if (data.field) { |
| | | this.form[data.field] = data.value || ""; |
| | | this.form[data.showField] = data.text || ""; |
| | | this.form.serialType = data.rawData[0].serialType || ""; |
| | | |
| | | } |
| | | }, |
| | | /** 转移规则所有者对话框 */ |
| | | escapeOwner() { |
| | |
| | | //转换成JSON字符串进行父组件回显 |
| | | let submitFormJson = JSON.stringify(content); |
| | | this.form.referConfig = submitFormJson || ""; |
| | | debugger; |
| | | // debugger; |
| | | }, |
| | | /** 引用码段为【参照引用的业务类型】选取值之后的内容回显时调用 */ |
| | | echoReferBtmType(content) { |
| | |
| | | }, |
| | | /** 上移下移等操作的保存*/ |
| | | async saveCodeFixedOrClassifyValueOption(condition, editOrderNumdata) { |
| | | |
| | | //保存对固定码段码值的上移下移移出等操作 |
| | | if (condition == "fixedValue") { |
| | | let data = { |
| | |
| | | }, |
| | | { |
| | | data: [], |
| | | |
| | | |
| | | title: "描述", |
| | | fieldType: "text", |
| | | queryField: "description", |
| | |
| | | this.releadDisabled = false; |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | this.releadDisabled = false; |
| | | }); |
| | | this.releadDisabled = false; |
| | |
| | | }, |
| | | /** 新增基础码段*/ |
| | | async saveOrEditBasicCode() { |
| | | this.isLoadingSecCodeAddBtn = true; |
| | | const Formats = ['yy', 'yyyy', 'yyyy-MM', 'yyyyMM','yyMM','yyyyMMdd','yyyyMMdd HH:mm:ss','yyMMdd HH:mm:ss','yy-MM', 'yyyy-MM-dd', 'yy-MM-dd', 'yyyy-MM-dd HH:mm:ss', 'yy-MM-dd HH:mm:ss', 'HH:mm:ss']; |
| | | if (!Formats.includes(this.form.codeDateFormatStr)) { |
| | | this.$message.error('请检查日期格式!'); |
| | | return; |
| | | } |
| | | if ( |
| | | this.selectionList[0].oid == null || |
| | | this.selectionList[0].oid == "" |
| | |
| | | this.$message.warning("缺失必要参数,请重新选择编码规则后再试!"); |
| | | return; |
| | | } |
| | | if (!this.checkForm()) { |
| | | return; |
| | | } |
| | | this.isLoadingSecCodeAddBtn = true; |
| | | this.form.pkCodeRule = this.selectionList[0].oid; |
| | | if (this.form.oid == "" || this.form.oid == null) { |
| | | if (this.checkForm()) { |
| | | await addSave(this.form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false; |
| | | // 点击新增基础码段,关闭窗口之后触发重新加载 |
| | | this.loadBasic(this.selectionList[0]); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | } |
| | | await addSave(this.form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | console.log(this.form) |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false; |
| | | // 点击新增基础码段,关闭窗口之后触发重新加载 |
| | | this.loadBasic(this.selectionList[0]); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | } else { |
| | | // 可能参照引用的业务类型会发生改变所以这儿直接对referConfig的json进行改变 |
| | | if ( |
| | |
| | | // let referValueInfo = JSON.parse(this.form.referValueInfo); |
| | | // referValueInfo.referType = this.form.referBtmId; |
| | | } |
| | | let oldBasicSec = this.selectionBasicList.at(-1); |
| | | let oldBasicSec = this.selectionBasicList.slice(-1)[0]; |
| | | let secType = this.form.secType; |
| | | Vue.set(this.form, 'isClearValue', false); |
| | | if ((oldBasicSec.secType == "codefixedsec" || oldBasicSec.secType === "codeclassifysec") && oldBasicSec.secType != secType) { |
| | |
| | | if (!this.tipsMessage(this.selectionBasicList)) { |
| | | return; |
| | | } |
| | | if (this.selectionList.at(-1).lcStatus != "Editing") { |
| | | if (this.selectionList.slice(-1)[0].lcStatus != "Editing") { |
| | | this.$message.warning('编码规则状态不是"编辑中",不允许删除码段!'); |
| | | return; |
| | | } |
| | |
| | | }, |
| | | /** 基础码段刷新时查询*/ |
| | | refreshChangeBasicSec() { |
| | | this.loadBasic(this.selectionList.at(-1)); |
| | | this.loadBasic(this.selectionList.slice(-1)[0]); |
| | | }, |
| | | /** 操作基础码段中搜索清空等按钮的显示/隐藏*/ |
| | | hideBasicTable(hideBoolean) { |
| | |
| | | }, |
| | | /** 码段类型改变时,增加对应的form表单中的属性*/ |
| | | changeSectypeFormItems(row) { |
| | | //console.log(row) |
| | | if ( |
| | | func.isEmpty(this.enumParam.secTypeList) || |
| | | this.enumParam.secTypeList.length == 0 |
| | |
| | | secType: row != null ? row.secType : this.form.secType, //码段类型 |
| | | description: row != null ? row.description : this.form.description, //描述 |
| | | serialDependFlag: this.isNullJsonBoolean(row, this.form, 'serialDependFlag'), //是否流水依赖 |
| | | serialDependOrder: row != null ? row.serialDependOrder : this.form.serialDependOrder, //流水依赖顺序 |
| | | //serialDependOrder: row != null ? row.serialDependOrder : this.form.serialDependOrder, //流水依赖顺序 |
| | | nullableFlag: this.isNullJsonBoolean(row, this.form, 'nullableFlag'), //是否为空 |
| | | displayFlag: this.isNullJsonBoolean(row, this.form, 'displayFlag'), |
| | | componentCodeFlag: this.isNullJsonBoolean(row, this.form, 'componentCodeFlag'), //是否参与编码 |
| | | pkCodeRule: row != null ? row.pkCodeRule : this.form.pkCodeRule, //所属编码规则 |
| | | prefixCode: row != null ? row.prefixCode : this.form.prefixCode, //前缀 |
| | | suffixCode: row != null ? row.suffixCode : this.form.suffixCode, //后缀 |
| | | // customCodeSerialClass: row != null ? row.customCodeSerialClass : this.form.customCodeSerialClass |
| | | }; |
| | | if (this.form.secType === "codefixedsec") { |
| | | //固定码段 |
| | |
| | | font-size: 12px !important; |
| | | } |
| | | |
| | | .code-rule-crud > .avue-crud__search, |
| | | .code-basic-crud > .avue-crud__search { |
| | | margin-bottom: -15px; |
| | | } |
| | | |
| | | .clone-input-textarea > .el-form-item__content { |
| | | width: 495px; |
| | |
| | | |
| | | .right { |
| | | /* float: right; */ |
| | | margin-right: 2vw; |
| | | /* margin-right: 1vw; */ |
| | | height: 100%; |
| | | width: auto; |
| | | } |