king
2023-04-24 295b93984fd94a11d0337637f76ff91b5a618215
2023-04-24
15个文件已修改
325 ■■■■ 已修改文件
src/menu/components/module/voucher/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/voucher/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/voucher/options.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/controller.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/index.jsx 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/index.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/voucherTable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/main/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/popview/index.jsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/popview/index.jsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/voucher/index.jsx
@@ -158,8 +158,8 @@
                模板类型:
                <div>日常支出<DownOutlined/></div>
              </div>
              <Button className="out-background header-btn">关闭</Button>
              <Button className="add-background header-btn">保存</Button>
              <Button className="close-temp header-btn">关闭</Button>
              <Button className="save-temp header-btn">保存</Button>
            </div> : null}
            <VoucherTable config={card}/>
            {card.wrap.type === 'createVoucher' || card.wrap.type === 'checkVoucher' ? <div className="user">制单人:</div> : null}
src/menu/components/module/voucher/index.scss
@@ -134,6 +134,16 @@
    border-color: rgb(50, 197, 210);
    color: #ffffff;
  }
  .save-temp {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #ffffff;
  }
  .close-temp {
    background-color: #ffffff;
    border-color: #f5222d;
    color: #f5222d;
  }
  .system-background {
    background: #1890ff;
src/menu/components/module/voucher/options.jsx
@@ -18,6 +18,17 @@
    }
  })
  let menulist = sessionStorage.getItem('fstMenuList')
  if (menulist) {
    try {
      menulist = JSON.parse(menulist)
    } catch (e) {
      menulist = []
    }
  } else {
    menulist = []
  }
  modules = modules.filter(item => !bookids.includes(item.value))
  const wrapForm = [
@@ -134,6 +145,15 @@
      tooltip: '表格主体部分两端的空白距离,表格在编辑时两端会有添加和删除图标。',
      required: false
    },
    {
      type: 'cascader',
      field: 'linkmenu',
      label: '刷新菜单',
      initval: wrap.linkmenu || [],
      tooltip: '点击关闭时需要刷新的菜单。',
      required: false,
      options: menulist
    }
  ]
  return wrapForm
src/menu/modalconfig/controller.jsx
@@ -35,6 +35,8 @@
      config: fromJS(config).toJS(),
      btn: fromJS(btn).toJS()
    })
    window.GLOB.formId = ''
  }
  handleBack = () => {
src/tabviews/custom/components/module/account/index.jsx
@@ -171,7 +171,7 @@
    return (
      <div className="menu-account-wrap" style={config.style}>
        {config.wrap.MenuID ? <Select value={activeItem ? activeItem.id : ''} placeholder="请选择账套" onChange={this.changeBook} dropdownRender={menu => (
        {config.wrap.MenuID ? <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} placeholder="请选择账套" onChange={this.changeBook} dropdownRender={menu => (
          <div>
            {menu}
            <Divider style={{ margin: '4px 0' }} />
@@ -181,11 +181,11 @@
          </div>
        )}>
          {books.map(item => (
            <Option disabled={!item.months} key={item.id}>{item.account_name}</Option>
            <Option key={item.id}>{item.account_name}</Option>
          ))}
        </Select> : <Select value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="请选择账套" onChange={this.changeBook}>
        </Select> : <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="请选择账套" onChange={this.changeBook}>
          {books.map(item => (
            <Option disabled={!item.months} key={item.id}>{item.account_name}</Option>
            <Option key={item.id}>{item.account_name}</Option>
          ))}
        </Select>}
        {activeItem ? <span className="date">{activeItem.date}</span> : null}
src/tabviews/custom/components/module/voucher/index.jsx
@@ -208,6 +208,8 @@
      let employee = []
      let cash_flow = []
      let others = []
      let logistics = []
      let lessor = []
      res.sup && res.sup.forEach(item => {
        names[item.sup_type_code] = item.sup_type_name
@@ -215,6 +217,14 @@
      res.supplier && res.supplier.forEach(item => {
        supplier.push({value: item.suppliercode, label: item.suppliername})
      })
      res.logistics && res.logistics.forEach(item => {
        logistics.push({value: item.suppliercode, label: item.suppliername})
      })
      res.lessor && res.lessor.forEach(item => {
        lessor.push({value: item.suppliercode, label: item.suppliername})
      })
      res.customer && res.customer.forEach(item => {
@@ -249,6 +259,8 @@
        subjects: res.subjects || [],
        names: names,
        supplier: supplier,
        logistics: logistics,
        lessor: lessor,
        customer: customer,
        department: department,
        project: project,
@@ -406,6 +418,14 @@
      } else if (line.sup_accounting && line.supAccounts) {
        line.supAccounts.forEach(item => {
          if (item.sup_acc_type === 'supplier') {
            if (!item.suppliercode || !item.suppliername) {
              err = `第${_index}行,请选择辅助核算。`
            }
          } else if (item.sup_acc_type === 'logistics') {
            if (!item.suppliercode || !item.suppliername) {
              err = `第${_index}行,请选择辅助核算。`
            }
          } else if (item.sup_acc_type === 'lessor') {
            if (!item.suppliercode || !item.suppliername) {
              err = `第${_index}行,请选择辅助核算。`
            }
@@ -700,6 +720,14 @@
      } else if (line.sup_accounting && line.supAccounts) {
        line.supAccounts.forEach(item => {
          if (item.sup_acc_type === 'supplier') {
            if (!item.suppliercode || !item.suppliername) {
              err = `第${_index}行,请选择辅助核算。`
            }
          } else if (item.sup_acc_type === 'logistics') {
            if (!item.suppliercode || !item.suppliername) {
              err = `第${_index}行,请选择辅助核算。`
            }
          } else if (item.sup_acc_type === 'lessor') {
            if (!item.suppliercode || !item.suppliername) {
              err = `第${_index}行,请选择辅助核算。`
            }
@@ -1020,16 +1048,27 @@
  triggerclose = () => {
    const { config, status } = this.state
    let tabId = ''
    if (config.wrap.linkmenu && config.wrap.linkmenu.length > 0) {
      tabId = config.wrap.linkmenu[config.wrap.linkmenu.length - 1]
    }
    if (status === 'change') {
      confirm({
        content: '内容已变更,确定要关闭吗?',
        onOk() {
          MKEmitter.emit('closeTabView', config.$pageId)
          if (tabId) {
            MKEmitter.emit('reloadMenuView', tabId, 'table')
          }
        },
        onCancel() {}
      })
    } else {
      MKEmitter.emit('closeTabView', config.$pageId)
      if (tabId) {
        MKEmitter.emit('reloadMenuView', tabId, 'table')
      }
    }
  }
@@ -1150,8 +1189,8 @@
              </Select>
            </div>
            <div className="temp-action">
              <Button className="add-background header-btn" onClick={() => this.triggerTempsave()}>保存</Button>
              <Button className="out-background header-btn" onClick={this.triggerclose}>关闭</Button>
              <Button className="save-temp header-btn" onClick={() => this.triggerTempsave()}>保存</Button>
              <Button className="close-temp header-btn" onClick={this.triggerclose}>关闭</Button>
            </div>
          </div> : null}
          <VoucherTable config={config} loading={loading} data={data} onChange={this.dataChange}/>
src/tabviews/custom/components/module/voucher/index.scss
@@ -111,6 +111,17 @@
    color: #ffffff;
  }
  .save-temp {
    background-color: var(--mk-sys-color);
    border-color: var(--mk-sys-color);
    color: #ffffff;
  }
  .close-temp {
    background-color: #ffffff;
    border-color: #f5222d;
    color: #f5222d;
  }
  .system-background {
    background: var(--mk-sys-color);
    border-color: var(--mk-sys-color);
src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
@@ -108,7 +108,7 @@
      let account = {}
      subAccounts.forEach(item => {
        if (item.field === 'supplier') {
        if (item.field === 'supplier' || item.field === 'logistics' || item.field === 'lessor') {
          account[item.field] = {suppliercode: item.value, suppliername: item.name}
        } else if (item.field === 'customer') {
          account[item.field] = {customercode: item.value, customername: item.name}
@@ -762,7 +762,7 @@
            if (record.sup_accounting && record.supAccounts) {
              record.supAccounts.forEach(item => {
                if (item.sup_acc_type === 'supplier') {
                if (item.sup_acc_type === 'supplier' || item.sup_acc_type === 'logistics' || item.sup_acc_type === 'lessor') {
                  val += item.suppliercode ? '_' + item.suppliercode + ' ' + item.suppliername : ''
                } else if (item.sup_acc_type === 'customer') {
                  val += item.customercode ? '_' + item.customercode + ' ' + item.customername : ''
src/views/main/index.jsx
@@ -17,7 +17,15 @@
const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
class Main extends Component {
  state = {}
  state = {
    userId: sessionStorage.getItem('UserID')
  }
  UNSAFE_componentWillMount() {
    if (!this.state.userId) {
      this.props.history.replace('/login')
    }
  }
  componentDidMount () {
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
@@ -50,7 +58,9 @@
  render () {
    const navBar = window.GLOB.navBar
    if (!this.state.userId) return null
    return (
      <div className="mk-main-view">
        <ConfigProvider locale={_locale}>
src/views/menudesign/index.jsx
@@ -805,8 +805,14 @@
    })
    setTimeout(() => {
      if (config.enabled && this.verifyConfig()) {
      let _pass = this.verifyConfig(config)
      if (config.enabled && !_pass) {
        config.enabled = false
        config.force = true
      } else if (!config.enabled && config.force && _pass) {
        config.enabled = true
        delete config.force
      }
      if (config.cacheUseful !== 'true') {
@@ -1030,17 +1036,23 @@
  onEnabledChange = () => {
    const { config } = this.state
    if (!config || (!config.enabled && this.verifyConfig(true))) {
      return
    }
    let _config = {...config, enabled: !config.enabled}
    this.setState({
      config: {...config, enabled: !config.enabled}
    })
    delete _config.force
    if (!_config.enabled) {
      this.setState({
        config: _config
      })
    } else if (this.verifyConfig(_config)) {
      this.setState({
        config: _config
      })
    }
  }
  verifyConfig = (show) => {
    const { config, MenuType } = this.state
  verifyConfig = (config) => {
    const { MenuType } = this.state
    let error = ''
    let check = (components) => {
@@ -1068,7 +1080,7 @@
    check(config.components)
    if (show && error) {
    if (config.enabled && error) {
      notification.warning({
        top: 92,
        message: error,
@@ -1102,7 +1114,7 @@
        }
      })
      if (show && error) {
      if (config.enabled && error) {
        notification.warning({
          top: 92,
          message: error,
@@ -1111,7 +1123,7 @@
      }
    }
    return error
    return error === ''
  }
  // 更新配置信息
@@ -1226,7 +1238,7 @@
                    <PictureController/>
                    <StyleCombControlButton menu={config} />
                    <PasteController insert={this.insert} />
                    <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} />
                    {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                    <Button type="primary" id="save-config" className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} loading={menuloading}>保存</Button>
                    <Button type="default" onClick={this.closeView}>关闭</Button>
                  </div>
src/views/menudesign/popview/index.jsx
@@ -130,8 +130,14 @@
      return
    }
    if (config.enabled && this.verifyConfig()) {
    let _pass = this.verifyConfig(config)
    if (config.enabled && !_pass) {
      config.enabled = false
      config.force = true
    } else if (!config.enabled && config.force && _pass) {
      config.enabled = true
      delete config.force
    }
    this.getMenuMessage(config)
@@ -149,17 +155,22 @@
  onEnabledChange = () => {
    const { config } = this.state
    if (!config.enabled && this.verifyConfig(true)) {
      return
    }
    let _config = {...config, enabled: !config.enabled}
    this.setState({
      config: {...config, enabled: !config.enabled}
    })
    delete _config.force
    if (!_config.enabled) {
      this.setState({
        config: _config
      })
    } else if (this.verifyConfig(_config)) {
      this.setState({
        config: _config
      })
    }
  }
  verifyConfig = (show) => {
    const { config } = this.state
  verifyConfig = (config) => {
    let error = ''
    let check = (components) => {
@@ -186,7 +197,7 @@
    check(config.components)
    if (show && error) {
    if (config.enabled && error) {
      notification.warning({
        top: 92,
        message: error,
@@ -194,7 +205,7 @@
      })
    }
    return error
    return error === ''
  }
  // 更新配置信息
src/views/mobdesign/index.jsx
@@ -1384,8 +1384,14 @@
    })
    setTimeout(() => {
      if (config.enabled && this.verifyConfig()) {
      let _pass = this.verifyConfig(config)
      if (config.enabled && !_pass) {
        config.enabled = false
        config.force = true
      } else if (!config.enabled && config.force && _pass) {
        config.enabled = true
        delete config.force
      }
      if (config.cacheUseful !== 'true') {
@@ -1713,17 +1719,22 @@
  onEnabledChange = () => {
    const { config } = this.state
    if (!config || (!config.enabled && this.verifyConfig(true))) {
      return
    }
    let _config = {...config, enabled: !config.enabled}
    this.setState({
      config: {...config, enabled: !config.enabled}
    })
    delete _config.force
    if (!_config.enabled) {
      this.setState({
        config: _config
      })
    } else if (this.verifyConfig(_config)) {
      this.setState({
        config: _config
      })
    }
  }
  verifyConfig = (show) => {
    const { config } = this.state
  verifyConfig = (config) => {
    let error = ''
    let searchSum = 0
    let swipes = []
@@ -1790,7 +1801,7 @@
      }
    }
    if (show && error) {
    if (config.enabled && error) {
      notification.warning({
        top: 92,
        message: error,
@@ -1798,7 +1809,7 @@
      })
    }
    return error
    return error === ''
  }
  // 更新配置信息
@@ -2091,7 +2102,7 @@
              </div>
              <div className="wrap">
                <Button type="primary" className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} id="save-config" loading={menuloading}>保存</Button>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} />
                {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/>
                <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button>
                <CreateView resetmenu={this.getAppMenus} />
src/views/mobdesign/popview/index.jsx
@@ -132,8 +132,14 @@
      return
    }
    if (config.enabled && this.verifyConfig()) {
    let _pass = this.verifyConfig(config)
    if (config.enabled && !_pass) {
      config.enabled = false
      config.force = true
    } else if (!config.enabled && config.force && _pass) {
      config.enabled = true
      delete config.force
    }
    this.getMenuMessage(config)
@@ -151,17 +157,22 @@
  onEnabledChange = () => {
    const { config } = this.state
    if (!config.enabled && this.verifyConfig(true)) {
      return
    }
    let _config = {...config, enabled: !config.enabled}
    this.setState({
      config: {...config, enabled: !config.enabled}
    })
    delete _config.force
    if (!_config.enabled) {
      this.setState({
        config: _config
      })
    } else if (this.verifyConfig(_config)) {
      this.setState({
        config: _config
      })
    }
  }
  verifyConfig = (show) => {
    const { config } = this.state
  verifyConfig = (config) => {
    let error = ''
    let check = (components) => {
@@ -188,7 +199,7 @@
    check(config.components)
    if (show && error) {
    if (config.enabled && error) {
      notification.warning({
        top: 92,
        message: error,
@@ -196,7 +207,7 @@
      })
    }
    return error
    return error === ''
  }
  // 更新配置信息
src/views/pcdesign/index.jsx
@@ -1125,8 +1125,14 @@
    })
    setTimeout(() => {
      if (config.enabled && this.verifyConfig()) {
      let _pass = this.verifyConfig(config)
      if (config.enabled && !_pass) {
        config.enabled = false
        config.force = true
      } else if (!config.enabled && config.force && _pass) {
        config.enabled = true
        delete config.force
      }
      if (config.cacheUseful !== 'true') {
@@ -1435,17 +1441,22 @@
  onEnabledChange = () => {
    const { config } = this.state
    if (!config || (!config.enabled && this.verifyConfig(true))) {
      return
    }
    let _config = {...config, enabled: !config.enabled}
    this.setState({
      config: {...config, enabled: !config.enabled}
    })
    delete _config.force
    if (!_config.enabled) {
      this.setState({
        config: _config
      })
    } else if (this.verifyConfig(_config)) {
      this.setState({
        config: _config
      })
    }
  }
  verifyConfig = (show) => {
    const { config } = this.state
  verifyConfig = (config) => {
    let error = ''
    let check = (components) => {
@@ -1472,7 +1483,7 @@
    check(config.components)
    if (show && error) {
    if (config.enabled && error) {
      notification.warning({
        top: 92,
        message: error,
@@ -1480,7 +1491,7 @@
      })
    }
    return error
    return error === ''
  }
  // 更新配置信息
@@ -1707,7 +1718,7 @@
              </div>
              <div className="wrap">
                <Button type="primary" className={needUpdate ? 'update-tip' : ''} id="save-config" onClick={this.submitConfig} loading={menuloading}>保存</Button>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} />
                {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/>
                <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button>
                <CreateView resetmenu={this.getAppMenus} />
src/views/tabledesign/index.jsx
@@ -518,8 +518,14 @@
    })
    setTimeout(() => {
      if (config.enabled && this.verifyConfig()) {
      let _pass = this.verifyConfig(config)
      if (config.enabled && !_pass) {
        config.enabled = false
        config.force = true
      } else if (!config.enabled && config.force && _pass) {
        config.enabled = true
        delete config.force
      }
      let tbs = []
@@ -681,17 +687,22 @@
  onEnabledChange = () => {
    const { config } = this.state
    if (!config || (!config.enabled && this.verifyConfig(true))) {
      return
    }
    let _config = {...config, enabled: !config.enabled}
    this.setState({
      config: {...config, enabled: !config.enabled}
    })
    delete _config.force
    if (!_config.enabled) {
      this.setState({
        config: _config
      })
    } else if (this.verifyConfig(_config)) {
      this.setState({
        config: _config
      })
    }
  }
  verifyConfig = (show) => {
    const { config } = this.state
  verifyConfig = (config) => {
    let error = ''
    config.components.forEach(item => {
@@ -725,7 +736,7 @@
      }
    }
    if (show && error) {
    if (config.enabled && error) {
      notification.warning({
        top: 92,
        message: error,
@@ -733,7 +744,7 @@
      })
    }
    return error
    return error === ''
  }
  // 更新配置信息
@@ -843,7 +854,7 @@
                    <TableNodes config={config} />
                    <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                    <PasteBaseTable type="page" insert={this.insert}/>
                    <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} />
                    {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                    <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>保存</Button>
                    <Button type="default" onClick={this.closeView}>关闭</Button>
                  </div>