king
2023-02-10 49cd775392f5aa1da349703c9128cedf513d4317
2023-02-10
8个文件已修改
131 ■■■■ 已修改文件
public/options.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/voucher/options.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/pastecomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/index.jsx 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/updatetable/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,12 +1,12 @@
{
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mk",
  "defaultApp": "mkindustry",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "WXminiAppID": "",
@@ -17,6 +17,6 @@
  "transfer": "false",
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
}
src/menu/components/module/voucher/options.jsx
@@ -46,6 +46,7 @@
        {field: 'voucherTypeText', values: ['createVoucher', 'checkVoucher']},
        {field: 'voucherSign', values: ['createVoucher', 'checkVoucher']},
        {field: 'supModule', values: ['checkTemp', 'checkVoucher']},
        {field: 'attachStatus', values: ['createVoucher', 'checkVoucher']},
      ]
    },
    {
@@ -113,6 +114,18 @@
      options: modules,
      allowClear: true,
    },
    {
      type: 'radio',
      field: 'attachStatus',
      label: '附件状态',
      initval: wrap.attachStatus || 0,
      tooltip: '添加或修改凭证时,上传附件的状态。',
      required: true,
      options: [
        {value: 0, label: '待审核'},
        {value: 10, label: '已审核'},
      ]
    },
  ]
  return wrapForm
src/menu/components/share/pastecomponent/index.jsx
@@ -181,7 +181,7 @@
        })
      }
      this.props.updateConfig(config)
      this.props.updateConfig(config, type)
      this.setState({visible: false})
      notification.success({
src/menu/components/table/base-table/index.jsx
@@ -385,6 +385,13 @@
    this.updateComponent(config)
  }
  parseComponent = (config, type) => {
    if (type === 'cols') {
      this.updatecolumn(config)
    }
    this.updateComponent(config)
  }
  render() {
    const { card } = this.state
    let options = ['action', 'search', 'form', 'cols']
@@ -397,7 +404,7 @@
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="basetable" card={card}/>
            <PasteComponent config={card} options={options} updateConfig={this.updateComponent} />
            <PasteComponent config={card} options={options} updateConfig={this.parseComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            <SettingComponent config={card} updateConfig={this.updateComponent} />
          </div>
src/tabviews/custom/components/card/data-card/index.jsx
@@ -937,7 +937,7 @@
    }
    let checkAll = ''
    if (config.wrap.selStyle.indexOf('check') > -1) {
    if (config.wrap.selStyle && config.wrap.selStyle.indexOf('check') > -1) {
      if (selectedData.length > 0) {
        checkAll = selectedData.length < data.length ? ' half' : ' whole'
      }
src/tabviews/custom/components/module/voucher/index.jsx
@@ -39,7 +39,8 @@
    title: '',
    orgcode: '',
    orgname: '',
    status: '' // 新建时,empty、change、saved
    status: '', // 新建时,empty、change、saved
    saved: false
  }
  UNSAFE_componentWillMount () {
@@ -433,10 +434,19 @@
  voucherSave = (list, t) => {
    const { type, data, config, charInt, charType, vouDate, book, remark, charName, attachments, title, orgcode, orgname } = this.state
    let err = ''
    if (!book) {
      err = '请选择账套!'
    } else if (!vouDate) {
      err = '请选择日期!'
    } else if (!charName || !charInt) {
      err = '请选择凭证号!'
    }
    if (err) {
      notification.warning({
        top: 92,
        message: '请选择账套!',
        message: err,
        duration: 5
      })
      return
@@ -577,14 +587,16 @@
          remark: '',
          tbdata: [],
          charInt: res.voucher_char_int + 1,
          BID: Utils.getguid()
          BID: Utils.getguid(),
          saved: false
        })
        MKEmitter.emit('cleartable', config.uuid)
      } else {
        this.setState({
          status: 'saved',
          charInt: res.voucher_char_int || charInt,
          data: fromJS(list).toJS()
          data: fromJS(list).toJS(),
          saved: true
        })
      }
    })
@@ -629,6 +641,53 @@
    this.setState({attachments: _val})
  }
  changeVouDate = (val) => {
    const { type, status, saved } = this.state
    this.setState({vouDate: val})
    if (type === 'createVoucher' && val && !saved && (status === 'empty' || status === 'change')) {
      this.updateVoucherChar(val)
    }
  }
  updateVoucherChar = (val) => {
    const {book} = this.state
    if (!book) return
    let param = {
      func: 's_get_fcc_account_data',
      search_type: 'Y',
      fcc_date: book.months ? book.months + '-01' : moment().format('YYYY-MM-DD'),
      account_year_code: book.account_year_code || '',
      months: moment(val).format('YYYY-MM'),
      BID: book.id
    }
    Api.genericInterface(param).then(res => {
      if (!res.status) {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 5
        })
        return
      }
      // let typeOptions = res.char || []
      // let charInt = typeOptions[0] ? typeOptions[0].voucher_char_int + 1 : 1
      // this.setState({
      //   typeOptions: typeOptions,
      //   charType: typeOptions[0] ? typeOptions[0].voucher_class : '',
      //   charName: typeOptions[0] ? typeOptions[0].voucher_char : '',
      //   charInt: charInt,
      //   orgcode: res.orgcode,
      //   orgname: res.orgname,
      // })
    })
  }
  triggermore = () => {
  }
@@ -668,7 +727,7 @@
              <InputNumber precision={0} min={1} value={charInt} autoComplete="off" onChange={(val) => this.setState({charInt: val})}/> 号
            </div>
            <div className="voucher-date">
              日期:<DatePicker value={vouDate} onChange={(val) => this.setState({vouDate: val})}/>
              日期:<DatePicker value={vouDate} onChange={this.changeVouDate}/>
            </div>
            <div className="voucher-text">
              <Input value={title} placeholder="凭证文本" autoComplete="off" onChange={(e) => this.setState({title: e.target.value})}/>
src/templates/comtableconfig/updatetable/index.jsx
@@ -705,21 +705,13 @@
      _resolve()
      if (res.status) {
        notification.success({
          top: 92,
          message: '升级成功',
          duration: 2
        })
        delete urlparam.type
        delete urlparam.MenuType
        let _param = window.btoa(window.encodeURIComponent(JSON.stringify(urlparam)))
        setTimeout(() => {
          window.history.replaceState(null, null, window.location.href.split('#')[0] + `#/tabledesign/${_param}`)
          window.location.reload()
        }, 2000)
        window.history.replaceState(null, null, window.location.href.split('#')[0] + `#/tabledesign/${_param}`)
        window.location.reload()
      } else {
        Modal.warning({
          title: res.message,
src/views/tabledesign/index.jsx
@@ -386,6 +386,20 @@
            style: { backgroundColor: '#ffffff', paddingTop: '16px', paddingBottom: '80px', paddingLeft: '16px', paddingRight: '16px'},
          }
        } else {
          if (config.Template === 'CommonTable' && !config.components) {
            let urlparam = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param)))
            urlparam.type = 'CommonTable'
            if (urlparam.PageParam) {
              urlparam.PageParam.Template = 'CommonTable'
            }
            urlparam = window.btoa(window.encodeURIComponent(JSON.stringify(urlparam)))
            let url = `#/basedesign/${urlparam}`
            window.history.replaceState(null, null, window.location.href.split('#')[0] + url)
            window.location.reload()
            return
          }
          config.uuid = MenuId
          config.MenuID = MenuId
          config.Template = 'BaseTable'