From 2a3fc3e6493833ef25eb0d25c9b00c42e5735f4d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 12 七月 2022 00:29:35 +0800 Subject: [PATCH] 2022-07-12 --- src/index.js | 5 - src/tabviews/custom/components/form/tab-form/index.jsx | 4 + src/templates/zshare/modalform/index.jsx | 23 ++++++- src/templates/zshare/formconfig.jsx | 62 ++++++++++++-------- src/menu/components/form/dragtitle/options.jsx | 12 ++++ src/menu/components/form/tab-form/index.scss | 4 + src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 12 ++- src/tabviews/custom/components/form/normal-form/index.jsx | 4 + public/options.json | 10 +- src/tabviews/zshare/mutilform/index.jsx | 3 + src/menu/components/share/actioncomponent/actionform/index.jsx | 9 ++- src/api/index.js | 3 + src/templates/sharecomponent/actioncomponent/dragaction/index.jsx | 1 src/menu/components/form/normal-form/index.scss | 4 + src/menu/components/form/dragtitle/card.jsx | 2 15 files changed, 109 insertions(+), 49 deletions(-) diff --git a/public/options.json b/public/options.json index fbdb8bf..523da64 100644 --- a/public/options.json +++ b/public/options.json @@ -1,12 +1,12 @@ { - "appId": "202108312122504607B107A83F55B40C98CCF", - "appkey": "20210831212235413F287EC3BF489424496C8", + "appId": "201912040924165801464FF1788654BC5AC73", + "appkey": "20191106103859640976D6E924E464D029CF0", "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", "systemType": "", "externalDatabase": "false", "lineColor": "", "filter": "false", - "defaultApp": "mkindustry", + "defaultApp": "mk", "defaultLang": "zh-CN", "WXAppID": "", "WXminiAppID": "", @@ -15,6 +15,6 @@ "probation": "", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "http://demo.mk9h.cn", - "service": "erp_new/" + "host": "http://qingqiumarket.cn", + "service": "MKWMS/" } \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index 24695e0..574fa7a 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -144,6 +144,9 @@ if (process.env.NODE_ENV === 'production') { _url = document.location.origin + ':8080/' + url } + if (/https/.test(_url)) { + _url = _url.replace(/:8080/g, ':8443') + } if (param) { return axios({ diff --git a/src/index.js b/src/index.js index 1f027ac..9e500b6 100644 --- a/src/index.js +++ b/src/index.js @@ -73,10 +73,7 @@ GLOB.keepKey = config.keepPassword !== 'false' GLOB.WXAppID = config.WXAppID || '' GLOB.WXminiAppID = config.WXminiAppID || '' - GLOB.accessToken = { - accessTime: parseInt(new Date().getTime() / 1000), - oa_access_token: '58_n--VVhcdIR_Y70FreSGNCqoKuhIjY9CHYjIiVNaOQ3k_wZYvz9FaZdU65WJ6qKAHCmePComqYfyEd11qaqhXIrUToUvP8cFxVo6gvNeIFO2XR4HgBzbhHCNtxH6spvlsXoH5xlUmNB-9cIIoOEQgACAXNZ' - } + GLOB.accessToken = {} if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' diff --git a/src/menu/components/form/dragtitle/card.jsx b/src/menu/components/form/dragtitle/card.jsx index 92f4501..f0ff624 100644 --- a/src/menu/components/form/dragtitle/card.jsx +++ b/src/menu/components/form/dragtitle/card.jsx @@ -43,7 +43,7 @@ selectCard(id) } - const getForms = () =>{ + const getForms = () => { return getForm(card) } diff --git a/src/menu/components/form/dragtitle/options.jsx b/src/menu/components/form/dragtitle/options.jsx index 55cd85d..b367eab 100644 --- a/src/menu/components/form/dragtitle/options.jsx +++ b/src/menu/components/form/dragtitle/options.jsx @@ -46,6 +46,18 @@ }, { type: 'radio', + field: 'cache', + label: '閫夐」鏌ヨ', + initval: group.setting.cache || 'true', + tooltip: '闇�瑕侀�氳繃鏁版嵁婧愭煡璇㈢殑閫夐」锛屾槸鍚︿娇鐢ㄧ紦瀛樸��', + required: false, + options: [ + {value: 'true', label: '缂撳瓨'}, + {value: 'false', label: '瀹炴椂'}, + ] + }, + { + type: 'radio', field: 'align', label: '琛ㄥ崟鎺掑垪', initval: group.setting.align || 'left_right', diff --git a/src/menu/components/form/normal-form/index.scss b/src/menu/components/form/normal-form/index.scss index 60df5e6..506e5ff 100644 --- a/src/menu/components/form/normal-form/index.scss +++ b/src/menu/components/form/normal-form/index.scss @@ -67,6 +67,10 @@ padding-top: 10px; padding-bottom: 30px; } + .modal-fields-row:not(.mob-form) { + padding-left: 10px; + padding-right: 10px; + } .am-list-item { background-color: transparent; } diff --git a/src/menu/components/form/tab-form/index.scss b/src/menu/components/form/tab-form/index.scss index 60df5e6..506e5ff 100644 --- a/src/menu/components/form/tab-form/index.scss +++ b/src/menu/components/form/tab-form/index.scss @@ -67,6 +67,10 @@ padding-top: 10px; padding-bottom: 30px; } + .modal-fields-row:not(.mob-form) { + padding-left: 10px; + padding-right: 10px; + } .am-list-item { background-color: transparent; } diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 4a1fae8..e3aff10 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -476,7 +476,6 @@ if (value === 'pop' || value === 'prompt' || value === 'exec') { _fieldval.intertype = 'system' _fieldval.sqlType = '' - } else if (value === 'form') { _fieldval.Ot = 'requiredSgl' @@ -496,9 +495,11 @@ _fieldval.intertype = 'system' _fieldval.label = this.props.dict['model.form.excelOut'] _fieldval.class = 'dgreen' + _fieldval.execSuccess = 'never' this.record.Ot = 'notRequired' this.record.label = this.props.dict['model.form.excelOut'] this.record.class = 'dgreen' + this.record.execSuccess = 'never' } else if (value === 'popview') { _fieldval.display = 'modal' @@ -563,7 +564,7 @@ } } else if (value === 'audit') { _fieldval.label = '瀹℃牳' - _fieldval.Ot = 'requiredSgl' + _fieldval.Ot = 'required' if (hasclass) { _fieldval.class = 'primary' } else { @@ -571,12 +572,14 @@ } } else if (value === 'LogicDelete' || value === 'delete') { _fieldval.label = '鍒犻櫎' - _fieldval.Ot = 'requiredSgl' + _fieldval.Ot = 'required' if (hasclass) { _fieldval.class = 'danger' } else { _fieldval.color = 'danger' } + } else if (value === 'custom') { + _fieldval.Ot = 'required' } this.record.label = _fieldval.label || this.record.label || '' diff --git a/src/tabviews/custom/components/form/normal-form/index.jsx b/src/tabviews/custom/components/form/normal-form/index.jsx index 1e3a7ad..717ecc3 100644 --- a/src/tabviews/custom/components/form/normal-form/index.jsx +++ b/src/tabviews/custom/components/form/normal-form/index.jsx @@ -258,7 +258,9 @@ if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { this.setState({ - data: {$$empty: true} + data: null + }, () => { + this.setState({data: {$$empty: true}}) }) return } diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index acddb29..2fd0b16 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -219,7 +219,9 @@ if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { this.setState({ - data: {$$empty: true} + data: null + }, () => { + this.setState({data: {$$empty: true}}) }) return } diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index e828865..e75b9b7 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -935,6 +935,9 @@ if (item.declareType === 'nvarchar(50)') { _item.type = 'text' } + } else if (item.declare === 'decimal' && ['select', 'link', 'radio', 'checkcard'].includes(item.type)) { + _item.type = 'number' + _item.fieldlen = item.decimal || 0 } if (item.type === 'text' && item.lenControl && item.lenControl !== 'limit') { diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 2f62125..e1850f3 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -341,7 +341,6 @@ if (value === 'pop' || value === 'prompt' || value === 'exec') { _fieldval.intertype = 'system' _fieldval.sqlType = '' - } else if (value === 'excelIn') { _fieldval.intertype = 'system' _fieldval.Ot = 'notRequired' @@ -351,15 +350,15 @@ this.record.Ot = 'notRequired' this.record.label = this.props.dict['model.form.excelIn'] this.record.class = 'dgreen' - - } else if (value === 'excelOut') { _fieldval.intertype = 'system' _fieldval.label = this.props.dict['model.form.excelOut'] _fieldval.class = 'dgreen' + _fieldval.execSuccess = 'never' this.record.Ot = 'notRequired' this.record.label = this.props.dict['model.form.excelOut'] this.record.class = 'dgreen' + this.record.execSuccess = 'never' } else if (value === 'popview') { _fieldval.display = 'modal' @@ -424,13 +423,16 @@ _fieldval.class = 'purple' } else if (value === 'audit') { _fieldval.label = '瀹℃牳' - _fieldval.Ot = 'requiredSgl' + _fieldval.Ot = 'required' _fieldval.class = 'primary' } else if (value === 'LogicDelete' || value === 'delete') { _fieldval.label = '鍒犻櫎' - _fieldval.Ot = 'requiredSgl' + _fieldval.Ot = 'required' _fieldval.class = 'danger' + } else if (value === 'custom') { + _fieldval.Ot = 'required' } + if (this.record.position === 'grid') { _fieldval.Ot = 'requiredSgl' diff --git a/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx b/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx index e98d0a5..5369beb 100644 --- a/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx @@ -131,6 +131,7 @@ newcard.sysInterface = setting.sysInterface newcard.outerFunc = setting.outerFunc newcard.interface = setting.interface + newcard.execSuccess = 'never' newcard.class = 'dgreen' } diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 316b3c8..3d624c3 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -2768,16 +2768,6 @@ }, { type: 'number', - key: 'decimal', - min: 0, - max: 18, - precision: 0, - label: Formdict['header.form.decimal'], - initVal: card.decimal || 0, - required: true - }, - { - type: 'number', key: 'min', label: '鏈�灏忓��', initVal: card.min || card.min === 0 ? card.min : '', @@ -2908,6 +2898,44 @@ value: 'second', text: '绉�' }] + }, + { + type: 'radio', + key: 'declareType', + label: '鏁版嵁绫诲瀷', + tooltip: '澹版槑鍙橀噺鏃剁殑绫诲瀷锛屾椂闂存牸寮廳atetime鎴栨枃鏈牸寮弉varchar(50)銆�', + initVal: card.declareType || 'datetime', + options: [{ + value: 'datetime', + text: 'datetime' + }, { + value: 'nvarchar(50)', + text: 'nvarchar(50)' + }] + }, + { + type: 'radio', + key: 'declare', + label: '鏁版嵁绫诲瀷', + initVal: card.declare || 'nvarchar', + tooltip: '澹版槑鍙橀噺鏃剁殑绫诲瀷銆備娇鐢� decimal 鏃讹紝璇风‘璁alue涓烘暟鍊硷紝涓斾笉鍙负绌恒��', + options: [{ + value: 'nvarchar', + text: 'nvarchar' + }, { + value: 'decimal', + text: 'decimal' + }] + }, + { + type: 'number', + key: 'decimal', + min: 0, + max: 18, + precision: 0, + label: Formdict['header.form.decimal'], + initVal: card.decimal || 0, + required: true }, { type: 'number', @@ -3196,20 +3224,6 @@ initVal: card.backgroundColor || '', tooltip: '璁剧疆鑳屾櫙鑹插悗锛岄�変腑鏁堟灉鐢辫儗鏅鑹叉帶鍒躲��', required: true - }, - { - type: 'radio', - key: 'declareType', - label: '鏁版嵁绫诲瀷', - tooltip: '澹版槑鍙橀噺鏃剁殑绫诲瀷锛屾椂闂存牸寮廳atetime鎴栨枃鏈牸寮弉varchar(50)銆�', - initVal: card.declareType || 'datetime', - options: [{ - value: 'datetime', - text: 'datetime' - }, { - value: 'nvarchar(50)', - text: 'nvarchar(50)' - }] }, // { // type: 'radio', diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 605c7a5..ebb65e2 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -21,12 +21,12 @@ const modalTypeOptions = { text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl'], number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom'], - select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], + select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange', 'marginTop', 'marginBottom'], - radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange', 'marginTop', 'marginBottom'], - checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'], + radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange', 'marginTop', 'marginBottom'], + checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'], multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], - link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], + link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline', 'marginTop', 'marginBottom'], switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'], date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'], @@ -162,6 +162,13 @@ shows.push('linkField') reRequired.linkField = false } + if (['select', 'link', 'radio'].includes(type)) { + if (this.record.declare === 'nvarchar') { + shows.push('fieldlength') + } else if (this.record.declare === 'decimal') { + shows.push('decimal') + } + } } else if (type === 'checkcard') { reRequired.fields = false if (this.record.display === 'picture') { @@ -189,8 +196,14 @@ } if (this.record.multiple === 'false') { - shows.push('linkSubField') + shows.push('linkSubField', 'declare') + if (this.record.declare === 'nvarchar') { + shows.push('fieldlength') + } else if (this.record.declare === 'decimal') { + shows.push('decimal') + } } else { + shows.push('fieldlength') reTooltip.initval = '娣诲姞澶氫釜鍒濆鍊艰浣跨敤閫楀彿鍒嗛殧銆�' } -- Gitblit v1.8.0