| | |
| | | } else { |
| | | btn.style = item.style || {} |
| | | if (btn.class) { |
| | | if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || item.focus) { |
| | | if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || (item.focus && !btn.style.color)) { |
| | | if (btn.show === 'icon') { |
| | | btn.style.color = color[btn.class] |
| | | btn.style.backgroundColor = 'transparent' |
| | |
| | | if (/'/.test(val)) { |
| | | val = val.replace(/'/ig, '"') |
| | | } |
| | | _initFormfields.push(`@${_key}='${val}'`) |
| | | if (form.isconst) { |
| | | _initFormfields.push(`@${_key}=N'${val}'`) |
| | | } else { |
| | | _initFormfields.push(`@${_key}='${val}'`) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | // res.send_data = [{openid: 'o2E7gvoSFvQRG7I8_gZxf4y3ONkQ', send_id: '245dd33344', first: '您的缴费信息如下', p1: '010000000001', p2: '2022年07月03日', p3: '供暖缴费', p4: '20元', p5: '成功', remark: '感谢您的使用!'}] |
| | | res.send_data = [{openid: 'o2E7gvoSFvQRG7I8_gZxf4y3ONkQ', send_id: Utils.getuuid(), first: '您的缴费信息如下', p1: '010000000001', p2: '2022年07月03日', p3: '供暖缴费', p4: '20元', p5: '成功', remark: '感谢您的使用!'}] |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | } |
| | | |
| | | verify.wxNoteKeys.forEach(item => { |
| | | _param.data[item.key] = {value: '', color: '#000000'} |
| | | _param.data[item.key] = {value: ''} |
| | | }) |
| | | |
| | | let params = sends.map(item => { |
| | |
| | | fieldlen: item.fieldlength || 50, |
| | | writein: item.writein !== 'false', |
| | | type: item.type, |
| | | value: item.initval |
| | | value: item.initval, |
| | | isconst: item.constant === 'true' |
| | | } |
| | | |
| | | let key = item.field.toLowerCase() |
| | |
| | | fieldlen: item.fieldlength || 50, |
| | | writein: item.writein !== 'false', |
| | | type: item.type, |
| | | value: item.initval |
| | | value: item.initval, |
| | | isconst: item.constant === 'true' |
| | | } |
| | | |
| | | let key = item.field.toLowerCase() |
| | |
| | | readin: item.readin, |
| | | writein: item.writein, |
| | | fieldlen: item.fieldlength, |
| | | key: item.field |
| | | key: item.field, |
| | | isconst: item.constant === 'true' |
| | | } |
| | | |
| | | _item.value = record[item.field] !== undefined ? record[item.field] : '' |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'constant', |
| | | label: 'Unicode常量', |
| | | tooltip: '使用时将在提交内容前加上 N,代表存入数据库时以 Unicode 格式存储。', |
| | | initVal: card.constant || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: '使用' |
| | | }, { |
| | | value: 'false', |
| | | text: '不使用' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'sendType', |
| | | label: '发送方式', |
| | | initVal: card.sendType || 'local', |
| | |
| | | const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | |
| | | const modalTypeOptions = { |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'encryption', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl', 'inputType'], |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'encryption', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl', 'inputType', 'constant'], |
| | | 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', 'declare', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'], |
| | | checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'arrange', 'marginTop', 'marginBottom'], |
| | |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | | |
| | | const sysTempsIds = ['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'] |
| | | |
| | | class BillCodeForm extends Component { |
| | | static propTpyes = { |
| | | card: PropTypes.object, |
| | |
| | | let temps = [] |
| | | if (res.template_list) { |
| | | temps = res.template_list.filter(item => { |
| | | if (!item.primary_industry) return false |
| | | if (!item.primary_industry || sysTempsIds.includes(item.template_id)) return false |
| | | if (item.content) { |
| | | item.content = item.content.replace('{{first.DATA}}\n', '').replace('\n{{remark.DATA}}', '') |
| | | } |
| | |
| | | resetTemps = (wxTemps) => { |
| | | const { verify } = this.props |
| | | |
| | | let sysTemps = [{"template_id":"UdGBwbjFKnIBzW2TalsdJkwZ9R2LvaAozWZ-yo2Dn00","title":"缴费通知","primary_industry":"IT科技","deputy_industry":"IT软件与服务","content":"{{first.DATA}}\n受理编号:{{keyword1.DATA}}\n缴费时间:{{keyword2.DATA}}\n缴费类别:{{keyword3.DATA}}\n缴费金额:{{keyword4.DATA}}\n缴费结果:{{keyword5.DATA}}\n{{remark.DATA}}","example":"您的缴费信息如下\r\n受理编号:010000000001\r\n缴费时间:2018年07月23日\r\n缴费类别:供暖缴费\r\n缴费金额:20元\r\n缴费结果:成功\r\n感谢您的使用!"}] |
| | | let sysTemps = [ |
| | | // { |
| | | // template_id: '8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', |
| | | // title: '订单受理通知(明科云)', |
| | | // primary_industry: 'IT科技', |
| | | // deputy_industry: 'IT软件与服务', |
| | | // content: '订单号:{{keyword1.DATA}}\n订单类型:{{keyword2.DATA}}\n订单状态:{{keyword3.DATA}}\n通知时间:{{keyword4.DATA}}', |
| | | // example: '订单号:20190101001\r\n订单类型:衣柜\r\n订单状态:设计完成\r\n通知时间:2019年1月1日12:30' |
| | | // }, |
| | | // { |
| | | // template_id: 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok', |
| | | // title: '订单进度提醒(明科云)', |
| | | // primary_industry: 'IT科技', |
| | | // deputy_industry: 'IT软件与服务', |
| | | // content: '订单类型:{{keyword1.DATA}}\n订单号:{{keyword2.DATA}}\n订单状态:{{keyword3.DATA}}', |
| | | // example: '订单类型:退租申请\r\n订单号:TZ16101909\r\n订单状态:待取货' |
| | | // }, |
| | | // { |
| | | // template_id: 'mk_category_temp', |
| | | // title: '类目模板', |
| | | // primary_industry: '', |
| | | // deputy_industry: '', |
| | | // content: '', |
| | | // example: '' |
| | | // } |
| | | ] |
| | | |
| | | sysTemps = [] |
| | | |
| | | let _wxTemps = [...wxTemps, ...sysTemps] |
| | | |
| | | let selectTemp = _wxTemps.filter(item => item.template_id === verify.wxTemplateId)[0] |
| | |
| | | } else if (verify.wxNoteLink === 'url' && !verify.wxNoteLinkUrl) { |
| | | error = '请填写网址!' |
| | | } |
| | | |
| | | } |
| | | |
| | | return error |
| | |
| | | const { verify } = this.props |
| | | |
| | | let _verify = {...verify, wxTemplateId: val} |
| | | let selectTemp = {content: option.props.content.replace(/\r\n|\n/g, '<br/>'), example: option.props.example.replace(/\r\n|\n/g, '<br/>')} |
| | | let selectTemp = {template_id: val, content: option.props.content.replace(/\r\n|\n/g, '<br/>'), example: option.props.example.replace(/\r\n|\n/g, '<br/>')} |
| | | |
| | | let keys = [] |
| | | if (option.props.content) { |
| | |
| | | </Select> |
| | | </Form.Item> |
| | | </Col>) : null} |
| | | {selectTemp && verify.wxNoteKeys ? <Col span={24} className="wx-note"> |
| | | {selectTemp && selectTemp.template_id !== 'mk_category_temp' && verify.wxNoteKeys ? <Col span={24} className="wx-note"> |
| | | <div className="note-wrap"> |
| | | <div className="note"> |
| | | <p>内容示例</p> |
| | |
| | | if (/'/.test(val)) { |
| | | val = val.replace(/'/ig, '"') |
| | | } |
| | | _initFormfields.push(`@${_key}='${val}'`) |
| | | if (form.isconst) { |
| | | _initFormfields.push(`@${_key}=N'${val}'`) |
| | | } else { |
| | | _initFormfields.push(`@${_key}='${val}'`) |
| | | } |
| | | } |
| | | } |
| | | |