src/tabviews/commontable/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/subtable/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/subtabtable/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/treepage/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/zshare/formconfig.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/zshare/modalform/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/zshare/verifycard/billcodeform/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/zshare/verifycard/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/utils/utils.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/tabviews/commontable/index.jsx
@@ -731,10 +731,15 @@ insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ ` } param.custom_script = Utils.formatOptions(param.custom_script) } // 测试系统打印查询语句 if (options.sysType === 'local' && !window.GLOB.systemType) { LText && console.log(LText) param.custom_script && console.log(param.custom_script) } param.custom_script = Utils.formatOptions(param.custom_script) param.LText = Utils.formatOptions(LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' param.secretkey = Utils.encrypt(param.LText, param.timestamp) src/tabviews/subtable/index.jsx
@@ -608,10 +608,15 @@ insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ ` } param.custom_script = Utils.formatOptions(param.custom_script) } // 测试系统打印查询语句 if (options.sysType === 'local' && !window.GLOB.systemType) { LText && console.log(LText) param.custom_script && console.log(param.custom_script) } param.custom_script = Utils.formatOptions(param.custom_script) param.LText = Utils.formatOptions(LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' param.secretkey = Utils.encrypt(param.LText, param.timestamp) src/tabviews/subtabtable/index.jsx
@@ -489,10 +489,15 @@ insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ ` } param.custom_script = Utils.formatOptions(param.custom_script) } // 测试系统打印查询语句 if (options.sysType === 'local' && !window.GLOB.systemType) { LText && console.log(LText) param.custom_script && console.log(param.custom_script) } param.custom_script = Utils.formatOptions(param.custom_script) param.LText = Utils.formatOptions(LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' param.secretkey = Utils.encrypt(param.LText, param.timestamp) src/tabviews/treepage/index.jsx
@@ -529,10 +529,15 @@ insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ ` } param.custom_script = Utils.formatOptions(param.custom_script) } // 测试系统打印查询语句 if (options.sysType === 'local' && !window.GLOB.systemType) { LText && console.log(LText) param.custom_script && console.log(param.custom_script) } param.custom_script = Utils.formatOptions(param.custom_script) param.LText = Utils.formatOptions(LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' param.secretkey = Utils.encrypt(param.LText, param.timestamp) src/templates/zshare/formconfig.jsx
@@ -690,6 +690,7 @@ type: 'text', key: 'initval', label: Formdict['header.form.initval'], tooltip: '类型为下拉菜单时,初始值应为数据的Value值(使用数据源时,应为《值·字段》的值)', initVal: card.initval, required: false }, src/templates/zshare/modalform/index.jsx
@@ -145,6 +145,8 @@ } } let fieldValue = {} this.setState({ openType: value, formlist: this.state.formlist.map(form => { @@ -162,31 +164,36 @@ } else { form.type = 'text' } form.show = false if (form.show) { fieldValue.initval = form.initVal } } else if (form.key === 'fieldlength') { form.initVal = 50 if (value === 'textarea' || value === 'fileupload' || value === 'multiselect') { form.initVal = 512 } form.show = false if (form.show) { fieldValue.fieldlength = form.initVal } } else if (form.key === 'resourceType') { form.initVal = this.state.resourceType if (form.show) { fieldValue.resourceType = form.initVal } } else if (form.key === 'linkSubField') { form.initVal = this.state.linkSubFields.map(_field => _field.field) if (form.show) { fieldValue.linkSubField = form.initVal } } return form }) }, () => { this.setState({ formlist: this.state.formlist.map(form => { if (form.key === 'initval' && value !== 'fileupload' && value !== 'funcvar' && value !== 'linkMain') { form.show = true } else if (form.key === 'fieldlength' && (value === 'fileupload' || value === 'multiselect' || value === 'text' || value === 'textarea' || value === 'linkMain')) { form.show = true } return form }) }) this.props.form.setFieldsValue(fieldValue) }) } else if (key === 'quick') { let option = this.props.optionLibs.get(value) src/templates/zshare/verifycard/billcodeform/index.jsx
@@ -349,7 +349,7 @@ </Col> : null} {TypeCharOne === 'Lp' ? <Col span={7}> <Form.Item label={ <Tooltip placement="topLeft" title="该标识用于生成行号规则,为空时使用按钮ID"> <Tooltip placement="topLeft" title="该标识用于生成行号规则"> <Icon type="question-circle" /> {'标识'} </Tooltip> @@ -358,6 +358,10 @@ initialValue: '', rules: [ { required: true, message: this.props.dict['form.required.input'] + '标识!' }, { pattern: /^[a-zA-Z0-9]*$/ig, message: formRule.input.letternummsg } src/templates/zshare/verifycard/index.jsx
@@ -1666,23 +1666,6 @@ pagination={false} /> </TabPane> <TabPane tab={card.Ot !== 'requiredOnce' ? '唯一性验证' : '同类数据验证'} key="2"> <UniqueForm btn={card} fields={card.Ot !== 'requiredOnce' ? fields : columnsFields} dict={this.props.dict} uniqueChange={this.uniqueChange} wrappedComponentRef={(inst) => this.uniqueForm = inst} /> <Table bordered rowKey="uuid" className="custom-table" dataSource={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} pagination={false} /> </TabPane> <TabPane tab="自定义验证" key="3"> <CustomForm dict={this.props.dict} @@ -1722,6 +1705,23 @@ pagination={false} /> </TabPane> <TabPane tab={card.Ot !== 'requiredOnce' ? '唯一性验证' : '同类数据验证'} key="2"> <UniqueForm btn={card} fields={card.Ot !== 'requiredOnce' ? fields : columnsFields} dict={this.props.dict} uniqueChange={this.uniqueChange} wrappedComponentRef={(inst) => this.uniqueForm = inst} /> <Table bordered rowKey="uuid" className="custom-table" dataSource={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} pagination={false} /> </TabPane> <TabPane tab="创建凭证" key="5"> <VoucherForm dict={this.props.dict} src/utils/utils.js
@@ -1249,6 +1249,77 @@ }) } // 自定义验证 verify.customverifys && verify.customverifys.forEach(item => { _sql += ` /* 自定义验证 */ select @tbid='', @ErrorCode='',@retmsg='' select top 1 @tbid='X' from (${item.sql}) a If @tbid ${item.result === 'true' ? '!=' : '='}'' Begin select @ErrorCode='${item.errorCode}',@retmsg='${item.errmsg}' goto aaa end ` }) // 单号生成,使用上级id(BID)或列表数据,声明变量(检验) let _billcodesSql = '' if (verify.billcodes && verify.billcodes.length > 0) { verify.billcodes.forEach(item => { let _ModularDetailCode = '' let _lpline = '' if (item.TypeCharOne === 'Lp') { if (item.linkField === 'BID' && BID) { // 替换bid _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@BID@,48)` } else { _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${item.linkField},48)` } _ModularDetailCode = '@ModularDetailCode' } else if (item.TypeCharOne === 'BN') { let _val = '' if (item.linkField === 'BID' && BID) { // 替换bid _val = BID } else if (data && data.hasOwnProperty(item.linkField)) { _val = data[item.linkField] } _ModularDetailCode = `'${item.TypeCharOne + _val}'` } else { _ModularDetailCode = `'${item.ModularDetailCode}'` } let _declare = '' let _key = item.field.toLowerCase() if (!_vars.includes(_key)) { _declare = `Declare @${_key} nvarchar(50)` _vars.push(_key) } _billcodesSql += ` /* 单号生成 */ ${_declare} select @BillCode='', @${_key}='', @ModularDetailCode='' ${_lpline} exec s_get_BillCode @ModularDetailCode=${_ModularDetailCode}, @Type=${item.Type}, @TypeCharOne='${item.TypeCharOne}', @TypeCharTwo ='${item.TypeCharTwo}', @BillCode =@BillCode output, @ErrorCode =@ErrorCode output, @retmsg=@retmsg output if @ErrorCode!='' goto aaa set @${_key}=@BillCode ` }) if (_actionType !== 'insertOrUpdate') { _sql += _billcodesSql } } // 唯一性验证,必须存在表单(表单存在时,主键均为单值),必须填写数据源,多行拼接时不可用 if (formdata && verify.uniques && verify.uniques.length > 0 && btn.Ot !== 'requiredOnce') { let hasBid = false // 检验表单及列字段中是否有bid @@ -1322,77 +1393,6 @@ end ` }) } // 自定义验证 verify.customverifys && verify.customverifys.forEach(item => { _sql += ` /* 自定义验证 */ select @tbid='', @ErrorCode='',@retmsg='' select top 1 @tbid='X' from (${item.sql}) a If @tbid ${item.result === 'true' ? '!=' : '='}'' Begin select @ErrorCode='${item.errorCode}',@retmsg='${item.errmsg}' goto aaa end ` }) // 单号生成,使用上级id(BID)或列表数据,声明变量(检验) let _billcodesSql = '' if (verify.billcodes && verify.billcodes.length > 0) { verify.billcodes.forEach(item => { let _ModularDetailCode = '' let _lpline = '' if (item.TypeCharOne === 'Lp') { if (item.linkField === 'BID' && BID) { // 替换bid _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@BID@,48)` } else { _lpline = `set @ModularDetailCode= 'Lp'+ right('${item.mark || btn.uuid}'+@${item.linkField},48)` } _ModularDetailCode = '@ModularDetailCode' } else if (item.TypeCharOne === 'BN') { let _val = '' if (item.linkField === 'BID' && BID) { // 替换bid _val = BID } else if (data && data.hasOwnProperty(item.linkField)) { _val = data[item.linkField] } _ModularDetailCode = `'${item.TypeCharOne + _val}'` } else { _ModularDetailCode = `'${item.ModularDetailCode}'` } let _declare = '' let _key = item.field.toLowerCase() if (!_vars.includes(_key)) { _declare = `Declare @${_key} nvarchar(50)` _vars.push(_key) } _billcodesSql += ` /* 单号生成 */ ${_declare} select @BillCode='', @${_key}='', @ModularDetailCode='' ${_lpline} exec s_get_BillCode @ModularDetailCode=${_ModularDetailCode}, @Type=${item.Type}, @TypeCharOne='${item.TypeCharOne}', @TypeCharTwo ='${item.TypeCharTwo}', @BillCode =@BillCode output, @ErrorCode =@ErrorCode output, @retmsg=@retmsg output if @ErrorCode!='' goto aaa set @${_key}=@BillCode ` }) if (_actionType !== 'insertOrUpdate') { _sql += _billcodesSql } } let hasvoucher = false