Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getCodePrice = (data) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/ubcs-code/mdmRule/getCodeRuleAndBasicSecByRuleOid', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog title="æå¤§æµæ°´å·" width="30%" append-to-body="true" :visible.sync="visible"> |
| | | <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> |
| | | <el-tab-pane label="æå¤§æµæ°´å·" name="codeApply"> |
| | | <form-template v-bind="$attrs" type="add" :selfColumnType="selfColumnType" :selfColumnConfig="selfColumnConfig" |
| | | ref="CodeApply" @getFormData="getCodeApplyFormData" |
| | | @referConfigDataUpdate="referConfigDataUpdate"></form-template> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import FormTemplate from "@/components/FormTemplate/FormTemplate"; |
| | | import { getCodePrice } from "@/api/code/maxSerialNum.js" |
| | | export default { |
| | | name: 'maxSerialnumDialog', |
| | | components: { |
| | | FormTemplate |
| | | }, |
| | | props: { |
| | | // æ¯å¦æå¼ |
| | | visible: { |
| | | typeof: Boolean, |
| | | default: false |
| | | }, |
| | | // ruleOid |
| | | ruleOid: { |
| | | typeof: String, |
| | | default: "" |
| | | } |
| | | }, |
| | | watch: { |
| | | visible(n) { |
| | | this.dialogVisible = n; |
| | | }, |
| | | dialogVisible(n) { |
| | | this.$emit('update:visible', n) |
| | | if (n) this.apiGetCode() |
| | | }, |
| | | selfColumnConfig: { |
| | | handler(newval) { |
| | | console.log('selfColumnConfig', newval) |
| | | }, |
| | | immediate: true, |
| | | deep: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: this.visible, |
| | | activeName: 'codePrice', |
| | | codeApplyForm: {}, |
| | | secVOList: [], |
| | | selfColumnType: { |
| | | codefixedsec: "combox", |
| | | codeclassifysec: "refer", |
| | | codevariablesec: "text", |
| | | coderefersec: "refer", |
| | | }, |
| | | selfColumnConfig: { |
| | | function: { |
| | | required: this.isRequired, |
| | | dicData: this.getOptionList, |
| | | type: this.getType, |
| | | referConfig: this.getReferConfig, |
| | | readOnly: this.getDisabled, |
| | | }, |
| | | exchange: { |
| | | text: "name", |
| | | field: "oid", |
| | | prop: "oid", |
| | | showField: "name", |
| | | parentClassifySecOid: "parentClassifySecOid", |
| | | label: "name", |
| | | maxlength: "codeSecLength", |
| | | data: "fixedValueVOList", |
| | | }, |
| | | directVoluation: { |
| | | search: true, |
| | | props: { |
| | | label: "id", |
| | | value: "id", |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | async apiGetCode() { |
| | | const response = await getCodePrice({ ruleOid: this.ruleOid }) |
| | | const res = response.data |
| | | if (res.success && res.code === 200) { |
| | | console.log(response) |
| | | const typeList = [ |
| | | "codefixedsec", |
| | | "codeclassifysec", |
| | | "codevariablesec", |
| | | "coderefersec", |
| | | ]; |
| | | this.secVOList = (res.data.secVOList || []).filter((item) => |
| | | typeList.includes(item.secType) |
| | | ); |
| | | console.log(this.secVOList) |
| | | if (this.secVOList.length > 0) { |
| | | // this.showCodeApply = true; |
| | | this.activeName = "codePrice"; |
| | | this.$nextTick(() => { |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | }); |
| | | } else { |
| | | // this.showCodeApply = false; |
| | | } |
| | | } |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(event) |
| | | }, |
| | | getCodeApplyFormData(codeApplyForm) { |
| | | this.codeApplyForm = codeApplyForm; |
| | | }, |
| | | // åç
§ç»ä»¶æ°æ®åæ´ |
| | | referConfigDataUpdate(data) { |
| | | console.log(data) |
| | | const { field } = data; |
| | | this.secVOList = this.secVOList.map((item) => { |
| | | if (item.parentClassifySecOid === field) { |
| | | this.$refs.CodeApply.form[item.oid] = undefined; |
| | | this.$refs.CodeApply.form[item.name] = undefined; |
| | | } |
| | | return item; |
| | | }); |
| | | console.log(this.secVOList) |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | }, |
| | | isRequired(item) { |
| | | return item.nullableFlag != "true"; |
| | | }, |
| | | getType(item) { |
| | | return this.selfColumnType[item.secType]; |
| | | }, |
| | | getDisabled(item) { |
| | | if (item.secType === "codeclassifysec") { |
| | | if (item.parentClassifySecOid) { |
| | | if (!this.codeApplyForm[item.parentClassifySecOid]) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | getReferConfig(item) { |
| | | console.log(item) |
| | | let params = {}; |
| | | if (item.secType == "codeclassifysec") { |
| | | params = { |
| | | isMuti: false, |
| | | type: "grid", |
| | | tableConfig: { |
| | | limit: -1, |
| | | cols: [ |
| | | { |
| | | field: "id", |
| | | title: "è±æåç§°", |
| | | sort: true, |
| | | width: 150, |
| | | }, |
| | | { |
| | | field: "name", |
| | | title: "䏿åç§°", |
| | | sort: true, |
| | | width: 150, |
| | | }, |
| | | { |
| | | field: "description", |
| | | title: "æè¿°", |
| | | width: 250, |
| | | }, |
| | | ], |
| | | queryColumns: [ |
| | | { |
| | | field: "id", |
| | | title: "è±æåç§°", |
| | | }, |
| | | { |
| | | field: "name", |
| | | title: "䏿åç§°", |
| | | }, |
| | | ], |
| | | }, |
| | | url: "api/ubcs-code/ubcs-code/mdmEngineController/listCodeClassifyValueBySecOid", |
| | | extraParams: { |
| | | classifySecOid: item.oid, |
| | | parentClassifyValueOid: item.parentClassifySecOid |
| | | ? this.codeApplyForm[item.parentClassifySecOid] |
| | | : "", |
| | | }, |
| | | }; |
| | | } else if (item.secType == "coderefersec") { |
| | | params = JSON.parse(item.referValueInfo); |
| | | } |
| | | console.log(params) |
| | | return params; |
| | | |
| | | }, |
| | | getOptionList(item) { |
| | | if ( |
| | | Array.isArray(item.fixedValueVOList) && |
| | | item.fixedValueVOList.length > 0 |
| | | ) { |
| | | const configAttr = { |
| | | key: "id", |
| | | value: "id", |
| | | }; |
| | | const optionList = item.fixedValueVOList.map((item) => { |
| | | for (const key in configAttr) { |
| | | if (Object.hasOwnProperty.call(configAttr, key)) { |
| | | const element = configAttr[key]; |
| | | item[key] = item[element]; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | return optionList; |
| | | } else { |
| | | return []; |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | import businesswork from "@/components/work/BusinessWork" |
| | | import MasterTransfer from "@/components/Master/MasterTransfer"; |
| | | import ThemeImport from "@/components/Theme/ThemeImport"; |
| | | import maxSerialnumDialog from '@/components/code-dialog-page/maxSerialnumDialog' |
| | | // å°å·¥å
·å½æ°æ·»å å°å
¨å± |
| | | import utilFunc from './util/func' |
| | | Vue.prototype.$utilFunc = utilFunc |
| | |
| | | Vue.component('businesswork', businesswork) |
| | | Vue.component('MasterTransfer', MasterTransfer) |
| | | Vue.component('ThemeImport', ThemeImport) |
| | | Vue.component('maxSerialnumDialog', maxSerialnumDialog) |
| | | |
| | | // å è½½ç¸å
³urlå°å |
| | | Object.keys(urls).forEach(key => { |
| | |
| | | @click="escapeOwner"> |
| | | 转移ææè
|
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | icon="el-icon-guide" |
| | | plain |
| | | @click="maxSerialNum"> |
| | | æå¤§æµæ°´å· |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | |
| | | <el-button type="primary" @click="escapeOwnerConfirm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- æå¤§æµæ°´å·å¯¹è¯æ¡ --> |
| | | <max-serialnum-dialog :visible.sync="maxSerial.visible" :ruleOid="maxSerial.ruleOid"></max-serialnum-dialog> |
| | | |
| | | <!-- åºç¡ç 段å±ç¤ºåºå --> |
| | | <basic-container class="code-basicsec-container"> |
| | |
| | | ruleOwner: '', // å½åè¦è½¬ç§»ç»åªä¸ªè§å管çåçID |
| | | releadDisabled: false, // é¿å
è§ååå¸éå¤æäº¤ |
| | | |
| | | /*æå¤§æµæ°´å·*/ |
| | | maxSerial:{ |
| | | visible:false, |
| | | |
| | | }, |
| | | |
| | | /*使ç¨èå´å¯¹è¯æ¡æ¾ç¤ºæ§å¶*/ |
| | | codeRangeSettingBox: false, |
| | | useRangeData: [], |
| | |
| | | let enumList = this.getLocalStorageEnum("codeGetValueType"); |
| | | this.enumParam.codeGetValueType = enumList.length>0 ? enumList:[]; |
| | | }, |
| | | // æå¤§æµæ°´å· |
| | | maxSerialNum(){ |
| | | console.log(this.selectionList) |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡ç¼ç è§åï¼"); |
| | | return; |
| | | } |
| | | this.maxSerial.visible = true |
| | | this.maxSerial.ruleOid = this.selectionList[0]['oid'] |
| | | } |
| | | |
| | | } |
| | | }; |
| | |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | // target: 'http://127.0.0.1', |
| | | // target: 'http://192.168.1.51:37000', |
| | | target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.104:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | target: 'http://192.168.1.16:37000', |
| | | // target: 'http://192.168.0.105:37000', |
| | | // target: 'http://192.168.0.103:37000', |
| | | // target: 'http://192.168.1.63:37000', |