| | |
| | | > |
| | | <!-- 第一层对话框,添加码段信息对话框中的内容 --> |
| | | <div class="add-basicsec-total"> |
| | | <el-form :model="form" class="add-basicsec-form"> |
| | | <el-form :model="form" class="add-basicsec-form" :rules="rules" > |
| | | <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="是否为空:"> |
| | |
| | | :referConfig="this.referConfig || {}" |
| | | :display="true" |
| | | :value="form.customCodeSerialClass" |
| | | :text="form.customCodeSerialClass" |
| | | :text="form.customCodeSerialClassText" |
| | | :serialType="form.serialType" |
| | | @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="日期格式:" |
| | | required |
| | | > |
| | | <el-input |
| | | ref="codeDateFormatStr" |
| | |
| | | components: { vciWebRefer }, |
| | | data() { |
| | | return { |
| | | rules: { |
| | | Dateformat: [ |
| | | { |
| | | 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']; |
| | | if (!Formats.includes(this.form.codeDateFormatStr)) { |
| | | return callback(new Error('请输入正确日期格式,例如yyyy-MM-dd(并区分大小写)!')); |
| | | } |
| | | callback(); |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | referConfig:{ |
| | | title: '自定义流水参照', |
| | | showField: 'customCodeSerialClass', |
| | | showField: 'customCodeSerialClassText', |
| | | field: 'customCodeSerialClass', |
| | | fieldMap: {}, |
| | | fieldMap: { |
| | | serialType:"serialType" |
| | | }, |
| | | placeholder:'请选择自定义流水', |
| | | options: { |
| | | // 设置默认的属性 |
| | | url: 'api/ubcs-code/codeSerialAlgorithmController/gridCodeSerialAlgorithm', |
| | | textField:'name', |
| | | valueField:'classFullName', |
| | | textField:'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: [ |
| | | {field: 'id', title: '算法编号'}, |
| | | {field: 'name', title: '算法名称'} |
| | | // {field: 'id', title: '算法编号'}, |
| | | // {field: 'name', title: '算法名称'} |
| | | ] |
| | | } |
| | | } |
| | |
| | | secType: "codefixedsec", //码段类型 |
| | | description: "", //描述 |
| | | serialDependFlag: false, //是否流水依赖 |
| | | serialDependOrder: "", //流水依赖顺序 |
| | | //serialDependOrder: "", //流水依赖顺序 |
| | | nullableFlag: false, //是否为空 |
| | | prefixCode: "", //前缀 |
| | | suffixCode: "", //后缀 |
| | |
| | | methods: { |
| | | //自定义流水失焦 |
| | | setReferValue(data){ |
| | | console.log(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) { |
| | |
| | | this.releadDisabled = false; |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | this.releadDisabled = false; |
| | | }); |
| | | this.releadDisabled = false; |
| | |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | console.log(this.form) |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false; |
| | | // 点击新增基础码段,关闭窗口之后触发重新加载 |
| | |
| | | }, |
| | | /** 码段类型改变时,增加对应的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") { |
| | | //固定码段 |