king
2024-04-22 fc8c8d714687a22f711d642d192bd4149f3b7e88
2024-04-22
20个文件已修改
683 ■■■■ 已修改文件
src/menu/components/module/invoice/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-X6/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/invoice/index.jsx 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/invoice/index.scss 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/invoice/invoiceTable/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/invoice/invoiceTable/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/invoice/subTable/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/automatic/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/flowFloat/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/settingcomponent/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/tablenodes/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customscript/index.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/invoice/index.jsx
@@ -98,7 +98,9 @@
        ['单价', 'unitprice', 'Decimal(18,10)'],
        ['税务分类编码', 'tax_classify_code'],
        ['税务分类名称', 'tax_classify_name'],
        ['税率', 'tax_rate'],
        // ['税率', 'tax_rate', 'Decimal(18,2)'],
        ['一般纳税人税率', 'general_tax_rate', 'Decimal(18,2)'],
        ['小规模纳税人征收率', 'small_tax_rate', 'Decimal(18,2)'],
      ]
      details.forEach((cell, index) => {
src/menu/datasource/verifycard/index.jsx
@@ -989,7 +989,7 @@
    insert into #${setting.tableName || 'tb'}
    (${n.join(',')})
    select ${n.join(',')}
    from ${setting.dataresource ? `(${setting.dataresource}) tb` : setting.tableName || 'tb'}
    from ${setting.dataresource ? `(${setting.dataresource.replace(/\n/g, ' ')}) tb` : setting.tableName || 'tb'}
    order by @orderBy@
    
    declare @mk_total int
@@ -1003,7 +1003,9 @@
        delete #${setting.tableName || 'tb'} where sort_id > @pageIndex@*@pageSize@ 
      
      if @pageIndex_top > 0
        delete #${setting.tableName || 'tb'} where sort_id <= @pageIndex_top`
        delete #${setting.tableName || 'tb'} where sort_id <= @pageIndex_top
    drop table #${setting.tableName || 'tb'}`
    document.body.appendChild(oInput)
    oInput.select()
src/menu/debug/index.jsx
@@ -1294,13 +1294,16 @@
        } else {
          _sql += `
            /* 工作流默认sql */
            update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
            insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid)
            select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@
            update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
            if @check_userids@ != ''
            begin
                  delete s_my_works_flow_role where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
                  insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid)
                  select @ID@,@works_flow_code@,ID,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@ from dbo.SplitComma(@check_userids@)
                  insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
@@ -1308,7 +1311,8 @@
            end
            if @notice_userids@ != ''
            begin
                  delete n
                  update n
                  set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
                  from (select * from s_my_works_flow_notice where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0) n
                  inner join (select ID from dbo.SplitComma(@notice_userids@)) s
                  on n.userid = s.id
src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -388,7 +388,8 @@
    status: 0,
    flowname: '',
    flowcode: '',
    orgs: []
    orgs: [],
    empty: true
  }
  selectNode = null
@@ -526,6 +527,7 @@
                    worker_id: work.worker_id || '',
                    workercode: work.workercode || '',
                    workername: work.workername || '',
                    job_type: job.job_type || '',
                    parentIds: [com.OrgCode, dep.co_pro_code, job.jobcode],
                    parentNames: [com.OrgName, dep.co_pro_name, job.jobname]
                  }
@@ -553,6 +555,7 @@
                    worker_id: work.worker_id || '',
                    workercode: work.workercode || '',
                    workername: work.workername || '',
                    job_type: job.job_type || '',
                    parentIds: [com.OrgCode, dep.co_pro_code, job.jobcode, group.work_group],
                    parentNames: [com.OrgName, dep.co_pro_name, job.jobname, group.work_group]
                  }
@@ -590,8 +593,8 @@
    const { BID } = this.state
    if (!BID) {
      this.cells = []
      if (!is(fromJS(this.data), fromJS([]))) {
        this.cells = []
        this.handleData()
      }
      this.setState({empty: true})
@@ -624,7 +627,8 @@
        status: item.status || 0,
        flowname: item.works_flow_name || '',
        flowcode: item.works_flow_code || '',
        loading: false
        loading: false,
        empty: cells.length === 0
      })
      if (result.message) {
@@ -1003,8 +1007,19 @@
      if (!isNew) return
      let target = edge.getTargetCell()
      let source = edge.getSourceCell()
      if (!target) return
      if (!target || !source) return
      if (source.prop('mknode') === 'end') {
        notification.warning({
          top: 92,
          message: '结束节点不可添加分支!',
          duration: 2
        })
        graph.removeCells([edge])
        return
      }
      let mkdata = target.prop('mkdata')
@@ -1012,6 +1027,8 @@
        edge.prop('mknode', 'endEdge')
      } else if (target.prop('mknode') === 'start') {
        edge.prop('mknode', 'startEdge')
      } else if (source.prop('mknode') === 'start') {
        edge.prop('mknode', 'firstEdge')
      }
      if (mkdata) {
        edge.prop('mkdata', {status: mkdata.status, statusName: mkdata.statusName})
@@ -2224,12 +2241,12 @@
  }
  render() {
    const { loading, config, node, orgs, status, flowname } = this.state
    const { loading, config, node, orgs, status, flowname, empty } = this.state
    let style = {...config.style}
    if (config.plot.function === 'show') {
      if (config.plot.empty === 'hidden' && this.cells.length === 0) {
      if (config.plot.empty === 'hidden' && empty) {
        style.position = 'absolute'
        style.width = '100%'
        style.zIndex = -1
src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx
@@ -496,10 +496,12 @@
        </Form>
        <Modal
          title={mknode && mknode.shape === 'edge' ? '连线编辑' : '节点编辑'}
          wrapClassName="mk-x6-modal"
          visible={visible}
          closable={false}
          maskClosable={false}
          width={1050}
          centered={true}
          onOk={this.confirm}
          onCancel={() => this.setState({visible: false})}
          destroyOnClose
src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss
@@ -110,6 +110,7 @@
}
.normal-node-form {
  padding: 0 24px;
  >.ant-row >.ant-col-24 {
    .ant-form-item-label {
      width: 16%;
@@ -117,6 +118,12 @@
    .ant-form-item-control-wrapper {
      width: 84%;
    }
  }
  .mk-split {
    color: var(--mk-sys-color);
    border-bottom: 1px solid #e8e8e8;
    padding-left: 15px;
    padding-bottom: 5px;
  }
  .member-input {
    display: inline-block;
@@ -179,7 +186,26 @@
    }
  }
}
.mk-x6-modal {
  .ant-modal-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
  }
  .ant-modal-body::-webkit-scrollbar {
    width: 7px;
  }
  .ant-modal-body::-webkit-scrollbar-thumb {
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
    background: rgba(0, 0, 0, 0.13);
  }
  .ant-modal-body::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(0, 0, 0, 0);
  }
}
.member-modal {
  .ant-modal {
    top: 50px;
src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Tooltip, InputNumber, Switch } from 'antd'
import { Form, Row, Col, Input, Radio, Tooltip, InputNumber, Switch, notification } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import MemberForm from './memberform'
@@ -15,14 +15,57 @@
  }
  state = {
    flowType: this.props.data.flowType || 'approval',
    execCondition: this.props.data.execCondition === 'open',
    flowType: 'approval',
    execCondition: false,
    approvalMethod: 'orsign',
    readOnly: false,
    options: []
  }
  UNSAFE_componentWillMount() {
    const { node, data } = this.props
    let options = []
    let readOnly = false
    if (node.mknode === 'start') {
      readOnly = true
    } else if (node.mknode === 'end') {
    } else if (node.mknode === 'endEdge') {
      options = ['approvalMethod']
    } else if (node.mknode === 'startEdge') {
      readOnly = true
    } else if (node.mknode === 'firstEdge') {
      options = ['approver', 'members', 'copys']
    } else if (node.shape !== 'edge') { // node
      options = ['sign']
    } else {
      options = ['flowType', 'approvalMethod', 'approver', 'members', 'copys', 'execCondition']
    }
    this.setState({
      flowType: data.flowType || 'approval',
      execCondition: options.includes('execCondition') && data.execCondition === 'open',
      approvalMethod: data.approvalMethod || 'orsign',
      options,
      readOnly
    })
  }
  handleConfirm = () => {
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          if (values.approvalMethod === 'countersign' && values.members.length > 5) {
            notification.warning({
              top: 92,
              message: '会签时审批人不可超过5人!',
              duration: 10
            })
            return
          }
          if (values.execCondition === true) {
            values.execCondition = 'open'
          } else if (values.execCondition === false) {
@@ -41,9 +84,9 @@
  }
  render() {
    const { node, orgs } = this.props
    const { orgs } = this.props
    const { getFieldDecorator } = this.props.form
    const { flowType, execCondition } = this.state
    const { flowType, execCondition, approvalMethod, readOnly, options } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -55,32 +98,22 @@
      }
    }
    let data = this.props.data || {}
    let nodetype = node.shape !== 'edge' ? 'node' : 'edge'
    if (node.mknode === 'start') {
      nodetype = 'start'
    } else if (node.mknode === 'end') {
      nodetype = 'end'
    // } else if (node.mknode === 'endEdge') {
    //   nodetype = 'endEdge'
    } else if (node.mknode === 'startEdge') {
      nodetype = 'startEdge'
    }
    return (
      <Form {...formItemLayout} className="normal-node-form">
        <Row gutter={24}>
          {options.includes('approver') ? <Col span={24}>
            <p className="mk-split">按钮执行命令</p>
          </Col> : null}
          <Col span={12}>
            <Form.Item label="状态值">
              {getFieldDecorator('status', {
                initialValue: data.status,
                rules: [
                  {
                    required: true,
                    message: '请输入状态值!'
                  }
                  { required: true, message: '请输入状态值!' }
                ]
              })(
                <InputNumber readOnly={nodetype === 'start' || nodetype === 'startEdge'} precision={0} onPressEnter={() => this.props.handleSubmit()}/>
                <InputNumber readOnly={readOnly} precision={0} onPressEnter={() => this.props.handleSubmit()}/>
              )}
            </Form.Item>
          </Col>
@@ -93,7 +126,7 @@
              )}
            </Form.Item>
          </Col>
          {nodetype === 'node' ? <Col span={12}>
          {options.includes('sign') ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="标记将作为节点ID">
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -107,7 +140,7 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' ? <Col span={12}>
          {options.includes('flowType') ? <Col span={12}>
            <Form.Item label="操作类型">
              {getFieldDecorator('flowType', {
                initialValue: flowType
@@ -119,7 +152,48 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' ? <Col span={12}>
          {options.includes('approvalMethod') && flowType !== 'reject' ? <Col span={12}>
            <Form.Item label="审批方式">
              {getFieldDecorator('approvalMethod', {
                initialValue: approvalMethod
              })(
                <Radio.Group onChange={(e) => this.setState({approvalMethod: e.target.value})}>
                  <Radio value="orsign">或签</Radio>
                  <Radio value="countersign">会签</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {options.includes('approvalMethod') && flowType !== 'reject' && approvalMethod === 'countersign' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="示例:“财务经理张总已审核”,其中“已审核”为会签标记。">
                <QuestionCircleOutlined className="mk-form-tip" />
                会签标记
              </Tooltip>
            }>
              {getFieldDecorator('mark', {
                initialValue: data.mark || '已审核',
                rules: [
                  { required: true, message: '请输入会签标记!' }
                ]
              })(
                <Input autoComplete="off" onPressEnter={() => this.props.handleSubmit()}/>
              )}
            </Form.Item>
          </Col> : null}
          <Col span={24}>
            <Form.Item label="备注">
              {getFieldDecorator('remark', {
                initialValue: data.remark || ''
              })(
                <TextArea rows={2}/>
              )}
            </Form.Item>
          </Col>
          {options.includes('approver') ? <Col span={24}>
            <p className="mk-split">下一步审批权限</p>
          </Col> : null}
          {options.includes('approver') ? <Col span={12}>
            <Form.Item label="设置审批人">
              {getFieldDecorator('approver', {
                initialValue: data.approver || 'member'
@@ -132,32 +206,19 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' ? <Col span={12}>
            <Form.Item label="审批方式">
              {getFieldDecorator('approvalMethod', {
                initialValue: data.approvalMethod || 'orsign'
              })(
                <Radio.Group>
                  <Radio value="countersign">会签</Radio>
                  <Radio value="orsign">或签</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' ? <Col span={12}>
          {options.includes('members') ? <Col span={12}>
            <Form.Item label="审批人">
              {getFieldDecorator('members', {
                initialValue: data.members || [],
                rules: [{
                  required: true,
                  message: '请添加审批人!'
                }]
                rules: [
                  { required: true, message: '请添加审批人!' }
                ]
              })(
                <MemberForm orgs={orgs} title="审批人"/>
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' ? <Col span={12}>
          {options.includes('copys') ? <Col span={12}>
            <Form.Item label="抄送人">
              {getFieldDecorator('copys', {
                initialValue: data.copys || []
@@ -166,7 +227,10 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' ? <Col span={12}>
          {options.includes('execCondition') && flowType !== 'reject' ? <Col span={24}>
            <p className="mk-split">分支执行条件</p>
          </Col> : null}
          {options.includes('execCondition') && flowType !== 'reject' ? <Col span={12}>
            <Form.Item label="执行条件">
              {getFieldDecorator('execCondition', {
                valuePropName: 'checked',
@@ -176,7 +240,7 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' && execCondition ? <Col span={12}>
          {flowType !== 'reject' && execCondition ? <Col span={12}>
            <Form.Item label="对比方式">
              {getFieldDecorator('match', {
                initialValue: data.match || '='
@@ -192,7 +256,7 @@
              )}
            </Form.Item>
          </Col> : null}
          {nodetype === 'edge' && flowType !== 'reject' && execCondition ? <Col span={12}>
          {flowType !== 'reject' && execCondition ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="对比值中不可包含制表符、空格、换行符等。">
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -206,15 +270,6 @@
              )}
            </Form.Item>
          </Col> : null}
          <Col span={24}>
            <Form.Item label="备注">
              {getFieldDecorator('remark', {
                initialValue: data.remark || ''
              })(
                <TextArea rows={2}/>
              )}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
src/tabviews/custom/components/module/account/index.jsx
@@ -81,6 +81,9 @@
        map.set(item.id, true)
        if (item.selected === 'true' && !activeItem) {
          if (res.invoice_type) {
            item.invoice_type = res.invoice_type.map(cell => ({value: cell.invoice_type_code, label: cell.invoice_type_name}))
          }
          activeItem = item
        }
        if (item.months) {
src/tabviews/custom/components/module/invoice/index.jsx
@@ -1,11 +1,12 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Select, Form, Input, Button, Modal } from 'antd'
import { Select, Form, Input, Button, Modal, Spin } from 'antd'
import { EllipsisOutlined } from '@ant-design/icons'
import moment from 'moment'
// import Api from '@/api'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
// import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import InvoiceTable from './invoiceTable'
@@ -48,7 +49,10 @@
    payee: '',
    reviewer: '',
    drawer: '',
    details: []
    details: [],
    book: null,
    loading: false,
    tax_type: ''
  }
  UNSAFE_componentWillMount () {
@@ -74,15 +78,35 @@
    _config.buyer = this.formatSetting(_config.buyer, 'buyer')
    _config.detail = this.formatSetting(_config.detail, 'detail')
    let book = null
    let pas = {}
    if (config.wrap.supBook) {
      book = window.GLOB.CacheData.get(config.wrap.supBook) || null
      if (book) {
        pas = this.resetParam(book)
      }
    }
    this.setState({
      BID: BID || '',
      config: _config
      config: _config,
      book,
      ...pas
    })
  }
  componentDidMount () {
    this.loadData()
    const { config } = this.props
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    if (config.wrap.datatype === 'dynamic' && config.setting.onload === 'true') {
      setTimeout(() => {
        this.loadData()
      }, config.setting.delay || 0)
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -97,6 +121,7 @@
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
  }
  formatSetting = (item, type) => {
@@ -114,13 +139,18 @@
      })
    } else {
      item.columns = item.columns.map(cell => {
        if (['Description', 'id'].includes(cell.field)) {
        if (cell.field === 'general_tax_rate') {
          cell.field = 'tax_rate'
          cell.label = '税率'
        }
        if (['Description', 'id', 'small_tax_rate'].includes(cell.field)) {
          cell.Hide = 'true'
        } else if (['spec'].includes(cell.field)) {
          cell.Width = 150
        } else if (['unit', 'unitprice', 'tax_rate'].includes(cell.field)) {
          cell.Width = 80
        }
        return cell
      })
    }
@@ -191,59 +221,77 @@
    return item
  }
  reloadData = (menuId) => {
    // const { config } = this.props
    // const { activeItem } = this.state
    // if (config.uuid !== menuId) return
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
    // if (activeItem) {
    //   MKEmitter.emit('resetSelectLine', config.uuid, activeItem.id, activeItem)
    // } else {
    //   this.loadData()
    // }
    if (config.wrap.supBook === MenuID) {
      let pas = this.resetParam(data)
      this.setState({ book: data, ...pas }, () => {
        this.loadData()
      })
      return
    }
    if (!config.wrap.supModule || config.wrap.supModule !== MenuID) return
    if (id !== this.state.BID || id !== '') {
      this.setState({ BID: id }, () => {
        this.loadData()
      })
    }
  }
  loadData = () => {
    // let param = {
    //   func: 's_get_fcc_book_data',
    //   dataM: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '',
    //   mk_organization: sessionStorage.getItem('organization') || ''
    // }
  resetParam = (book) => {
    return {
      invTypes: book.invoice_type || [],
      orgname: book.orgname || '',
      tax_no: book.tax_no || '',
      addr: book.addr || '',
      tel: book.tel || '',
      bank_name: book.bank_name || '',
      account_no: book.account_no || '',
      payee: book.payee || '',
      reviewer: book.reviewer || '',
      drawer: book.drawer || '',
      tax_type: book.tax_type || ''
    }
  }
    // Api.genericInterface(param).then(res => {
    //   if (!res.status) {
    //     notification.warning({
    //       top: 92,
    //       message: res.message,
    //       duration: 5
    //     })
    //     return
    //   }
  reloadData = (menuId) => {
    const { config } = this.state
    if (config.uuid !== menuId) return
    //   let books = res.book || []
    //   let activeItem = null
    //   let map = new Map()
    //   books = books.filter(item => {
    //     if (!item.id) return false
    //     if (map.has(item.id)) return false
    //     map.set(item.id, true)
    this.loadData()
  }
    //     if (item.selected === 'true' && !activeItem) {
    //       activeItem = item
    //     }
    //     if (item.months) {
    //       item.date = item.months.replace('-', '年') + '月'
    //     }
    //     return true
    //   })
  async loadData() {
    const { config, BID } = this.state
    //   this.setState({books, activeItem})
    if (config.wrap.datatype !== 'dynamic') return
    //   if (activeItem) {
    //     MKEmitter.emit('resetSelectLine', this.props.config.uuid, activeItem.id, activeItem)
    //   }
    // })
    let param = UtilsDM.getQueryDataParams(config.setting, [], config.setting.order, 1, 1, BID)
    this.setState({
      loading: true
    })
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.setState({
        loading: false
      })
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      this.timer && this.timer.stop()
      UtilsDM.queryFail(result)
    }
  }
  changeType = (val) => {
@@ -266,10 +314,25 @@
  }
  render() {
    const { config, invTypes, date, from_to_name, from_to_tax_no, from_to_addr, from_to_tel, from_to_bank_name, from_to_account_no, from_to_mob, from_to_email, orgname, tax_no, addr, tel, bank_name, account_no, remark, reviewer, drawer, payee, details, visible } = this.state
    const { config, book, loading, invTypes, date, from_to_name, from_to_tax_no, from_to_addr, from_to_tel, from_to_bank_name, from_to_account_no, from_to_mob, from_to_email, orgname, tax_no, addr, tel, bank_name, account_no, remark, reviewer, drawer, payee, details, visible, tax_type } = this.state
    if (!book || (config.wrap.datatype === 'dynamic' && !tax_no)) {
      return <div className="menu-invoice-wrap" style={config.style}>
        <div className="loading-mask">
          <div className="ant-spin-blur"></div>
          <Spin />
        </div>
      </div>
    }
    return (
      <div className="menu-invoice-wrap" style={config.style}>
        {loading ?
          <div className="loading-mask">
            <div className="ant-spin-blur"></div>
            <Spin />
          </div> : null
        }
        <div className="inv-action">
          <Button className="mk-bill">保存单据</Button>
          <Button className="mk-submit">提交开票</Button>
@@ -316,7 +379,7 @@
            </div>
          </div>
          <div className="inv-details">
            <InvoiceTable data={details} config={config.detail} onChange={(details) => this.setState({details})}/>
            <InvoiceTable data={details} config={config.detail} tax_type={tax_type} onChange={(details) => this.setState({details})}/>
          </div>
          <div className="inv-main-content">
            <div className="inv-buyer">
src/tabviews/custom/components/module/invoice/index.scss
@@ -6,6 +6,7 @@
  background-repeat: no-repeat;
  background-size: cover;
  color: #000000;
  min-height: 500px;
  --inv-color: #13509c;
  .inv-action {
@@ -50,6 +51,9 @@
        .ant-select-selection__placeholder {
          text-align: center;
          font-family: kaiti;
          height: 30px;
          line-height: 30px;
          margin-top: -12px;
        }
      }
    }
@@ -91,6 +95,7 @@
  }
  .ant-input.ant-input-disabled {
    cursor: text;
    color: rgba(0, 0, 0, 0.85);
    background: transparent!important;
  }
@@ -219,6 +224,27 @@
      }
    }
  }
  .loading-mask {
    position: absolute;
    left: 0px;
    top: 0;
    right: 0px;
    bottom: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: justify;
    z-index: 1;
    .ant-spin-blur {
      position: absolute;
      width: 100%;
      height: 100%;
      opacity: 0.5;
      background: #ffffff;
    }
  }
}
.inv-table {
  .ant-table .ant-table-tbody tr:hover td {
src/tabviews/custom/components/module/invoice/invoiceTable/index.jsx
@@ -52,6 +52,13 @@
          }
        }
      }
      if (line.amount_line) {
        line.tax_amount = line.amount_line - line.amount_line / (line.tax_rate + 1)
        line.tax_amount = Math.round(line.tax_amount * 100) / 100
      } else {
        line.tax_amount = 0
      }
    } else {
      line[key] = value
    }
@@ -88,8 +95,8 @@
      <div className="mk-td">
        <InputNumber value={amount_line} onChange={(val) => this.setState({amount_line: val})} onBlur={(e) => this.onChange(e.target.value, 'amount_line')}/>
      </div>
      <div className="mk-td">{line.tax_name}</div>
      <div className="mk-td mk-right">{line.tax_amount} <span className="del-line" onClick={() => delLine(line.uuid)}></span> </div>
      <div className="mk-td mk-right">{line.tax_name}</div>
      <div className="mk-td mk-right">{line.tax_amount.toFixed(2)} <span className="del-line" onClick={() => delLine(line.uuid)}></span> </div>
    </div>
  }
}
@@ -230,7 +237,7 @@
      tax += item.tax_amount
    })
    this.setState({total: {price, tax, sum: price + tax, sumName: this.changeMoneyToChinese(price + tax)}})
    this.setState({total: {price, tax, sum: price, sumName: this.changeMoneyToChinese(price)}})
  }
  resetDetails = (data) => {
@@ -304,8 +311,8 @@
        item.spec = prod.spec
        item.unit = prod.unit
        item.unitprice = prod.unitprice
        item.tax_rate = prod.tax_rate
        item.tax_name = prod.tax_rate
        item.tax_rate = prod.tax_rate || 0
        item.tax_name = prod.tax_rate * 100 + '%'
        item.productcode = prod.productcode
        item.Description = prod.Description
@@ -315,7 +322,12 @@
        if (item.bill_count && item.unitprice) {
          item.amount_line = Math.round(item.unitprice * item.bill_count * 100) / 100
        }
        // item.tax_amount = prod.productname
        if (item.amount_line) {
          item.tax_amount = item.amount_line - item.amount_line / (item.tax_rate + 1)
          item.tax_amount = Math.round(item.tax_amount * 100) / 100
        } else {
          item.tax_amount = 0
        }
      }
      return item
@@ -329,7 +341,7 @@
  }
  render() {
    const { config } = this.props
    const { config, tax_type } = this.props
    const { editKey, data, total, visible } = this.state
    return (
@@ -358,7 +370,7 @@
            <div className="mk-td mk-right">{item.unitprice || ''}</div>
            <div className="mk-td mk-right">{item.amount_line || ''}</div>
            <div className="mk-td mk-right">{item.tax_name}</div>
            <div className="mk-td mk-right">{item.tax_amount}</div>
            <div className="mk-td mk-right">{item.tax_amount.toFixed(2)}</div>
          </div>
        })}
        <div className="mk-total">
@@ -384,7 +396,7 @@
          onCancel={() => { this.setState({ visible: false }) }}
          footer={null}
        >
          <SubTable config={config} onChange={this.changeDetail}/>
          <SubTable config={config} tax_type={tax_type} onChange={this.changeDetail}/>
        </Modal>
      </div>
    )
src/tabviews/custom/components/module/invoice/invoiceTable/index.scss
@@ -59,7 +59,7 @@
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0 3px;
      padding: 0 5px;
    }
    .mk-td:not(:last-child) {
      border-right: var(--inv-color, #13509c) 1px solid;
src/tabviews/custom/components/module/invoice/subTable/index.jsx
@@ -138,7 +138,7 @@
   * @description 数据加载
   */
  async loadData () {
    const { config } = this.props
    const { config, tax_type } = this.props
    const { search, pageIndex, pageSize } = this.state
    this.setState({
@@ -167,6 +167,11 @@
        item.key = index
        item.$Index = start + index + ''
        if (tax_type) {
          item.tax_rate = tax_type === 'special_invoice' ? item.general_tax_rate : item.small_tax_rate
          item.tax_rate = isNaN(item.tax_rate) ? 0 : +item.tax_rate
        }
        return item
      })
src/tabviews/zshare/automatic/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button, message } from 'antd'
import { Button, message, Tooltip } from 'antd'
import MKEmitter from '@/utils/events.js'
// import './index.scss'
@@ -224,7 +224,9 @@
    return (
      <div className="tool-wrap">
        <Button icon={running ? 'pause' : 'forward'} shape="circle" onClick={this.trigger}/>
        <Tooltip placement="left" title="无人值守">
          <Button icon={running ? 'pause' : 'forward'} shape="circle" onClick={this.trigger}/>
        </Tooltip>
      </div>
    )
  }
src/tabviews/zshare/flowFloat/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button, Modal, notification, Spin, Empty } from 'antd'
import { Button, Modal, notification, Spin, Empty, Tooltip } from 'antd'
import { BranchesOutlined } from '@ant-design/icons'
import Api from '@/api'
@@ -191,7 +191,9 @@
    return (
      <div className="tool-wrap">
        <Button shape="circle" onClick={this.trigger}><BranchesOutlined /></Button>
        <Tooltip placement="left" title="工作流">
          <Button shape="circle" onClick={this.trigger}><BranchesOutlined /></Button>
        </Tooltip>
        <Modal
          wrapClassName="flow-setting-modal"
          title="工作流"
src/tabviews/zshare/settingcomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button, Modal, notification, Spin, Empty } from 'antd'
import { Button, Modal, notification, Spin, Empty, Tooltip } from 'antd'
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
@@ -522,10 +522,12 @@
    return (
      <div className="tool-wrap">
        <Button icon="setting" shape="circle" onClick={this.trigger}/>
        <Tooltip placement="left" title="自定义设置">
          <Button icon="setting" shape="circle" onClick={this.trigger}/>
        </Tooltip>
        <Modal
          wrapClassName="custom-setting-modal"
          title={'自定义设置'}
          title="自定义设置"
          maskClosable={false}
          width={950}
          visible={visible}
src/tabviews/zshare/tablenodes/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Button, notification, Spin, Input, Typography, message } from 'antd'
import { Modal, Button, notification, Spin, Input, Typography, message, Tooltip } from 'antd'
import Api from '@/api'
import G6 from "@antv/g6"
@@ -477,7 +477,9 @@
    return (
      <div className="tool-wrap">
        <Button icon="fork" shape="circle" onClick={this.trigger}/>
        <Tooltip placement="left" title="表关系图">
          <Button icon="fork" shape="circle" onClick={this.trigger}/>
        </Tooltip>
        <Modal
          title=""
          wrapClassName="view-table-modal"
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -716,9 +716,17 @@
        if (!err) {
          let _verify = {...verify, ...values}
          if (_verify.excelHandle !== 'true') {
          if (_verify.excelHandle !== 'true') {
            delete _verify.excel_func
          }
          if (_verify.default === 'false' && _verify.scripts.length === 0) {
            notification.warning({
              top: 92,
              message: '不执行默认sql时,必须设置自定义脚本!',
              duration: 5
            })
            return
          }
          let cols = _verify.columns.map(col => col.Column.toLowerCase())
          cols = Array.from(new Set(cols))
src/templates/zshare/verifycard/customscript/index.jsx
@@ -150,13 +150,16 @@
          } else {
            sql += `
              /* 工作流默认sql */
              update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
              update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
              where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
              insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid)
              select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@
              update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
              where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
              if @check_userids@ != ''
              begin
                    delete s_my_works_flow_role where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
                    insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid)
                    select @ID@,@works_flow_code@,ID,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@ from dbo.SplitComma(@check_userids@)
                    insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
@@ -164,7 +167,8 @@
              end
              if @notice_userids@ != ''
              begin
                    delete n
                    update n
                    set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
                    from (select * from s_my_works_flow_notice where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0) n
                    inner join (select ID from dbo.SplitComma(@notice_userids@)) s
                    on n.userid = s.id
@@ -281,13 +285,16 @@
        insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
        select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@`
      } else {
        value = `update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
        value = `update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
        where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
        insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid)
        select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@
        update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
        where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
        if @check_userids@ != ''
        begin
              delete s_my_works_flow_role where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
              insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid)
              select @ID@,@works_flow_code@,ID,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@ from dbo.SplitComma(@check_userids@)
              insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
@@ -295,7 +302,8 @@
        end
        if @notice_userids@ != ''
        begin
              delete n
              update n
              set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
              from (select * from s_my_works_flow_notice where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0) n
              inner join (select ID from dbo.SplitComma(@notice_userids@)) s
              on n.userid = s.id
src/utils/utils.js
@@ -2135,6 +2135,7 @@
    let statusName = ''
    let detailId = ''
    let error = ''
    let userid = sessionStorage.getItem('UserID') || ''
    if (verify.flowType === 'start') {
      target = flow.cells.filter(cell => cell.mknode === 'start')[0]
@@ -2263,7 +2264,15 @@
      error = '行信息中无工作流参数'
    }
    if (verify.flowSql === 'true' && target) {
    if (error) {
      status = 0
      statusName = '异常'
      _sql += `
      /* 工作流异常sql */
      select @ErrorCode='E',@retmsg='${error}' goto aaa
      `
    } else if (verify.flowSql === 'true' && target) {
      if (verify.flowType === 'start') {
        _sql += `
      /* 工作流默认sql */
@@ -2274,16 +2283,124 @@
      insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
      select @ID@,@works_flow_code@,@works_flow_detail_id@,@userid@,@start_type@,@userid@,@UserName,@FullName,@time_id@
      `
      } else if (line && line.approvalMethod === 'countersign' && (!node.checkIds || !node.checkIds.includes(userid))) {
        status = 0
        statusName = '异常'
        _sql += `
        /* 工作流异常sql */
        select @ErrorCode='E',@retmsg='当前用户不在审批人列表中' goto aaa
        `
      } else if (line && line.approvalMethod === 'countersign' && node.checkIds.length > 1) {
        let label = ''
        let field = ''
        let mark = line.mark || '已审核'
        let _declare = []
        let _select = []
        let _select2 = []
        let _where = []
        let fields = ['statuscharone', 'statuschartwo', 'statuscharthree', 'statuscharfour', 'statuscharfive']
        node.checkUsers.forEach((user, index) => {
          if (user.worker_id === userid) {
            field = fields[index]
            label = `'${user.parentNames[2] || ''}${user.workername || ''}${mark}'`
          } else {
            _declare.push(`@works_flow_${fields[index]} nvarchar(50)`)
            _select.push(`@works_flow_${fields[index]}=''`)
            _select2.push(`@works_flow_${fields[index]}=${fields[index]}`)
            _where.push(`@works_flow_${fields[index]}!=''`)
          }
        })
        _declare = _declare.join(',')
        _select = _select.join(',')
        _select2 = _select2.join(',')
        _where = _where.join(' and ')
        _sql += `
      /* 工作流默认sql */
      declare ${_declare},@works_flow_key_id nvarchar(50),@works_flow_key_status nvarchar(20),@s_my_works_flow_log_param  nvarchar(max),@s_my_works_flow_log_status int,@s_my_works_flow_log_statusname nvarchar(50),@s_my_works_flow_log_detail_id  nvarchar(50)
      select ${_select},@works_flow_key_id='',@works_flow_key_status ='',@s_my_works_flow_log_param='',@s_my_works_flow_log_status=0,@s_my_works_flow_log_statusname='',@s_my_works_flow_log_detail_id=''
      select ${_select2},@works_flow_key_id=id,@s_my_works_flow_log_param=works_flow_param,@s_my_works_flow_log_status=status,@s_my_works_flow_log_statusname=statusname,@s_my_works_flow_log_detail_id=works_flow_detail_id
      from s_my_works_flow where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
      if ${_where}
      begin
          set @works_flow_key_status='Y'
      end
      if @works_flow_key_status='Y'
      begin
            update s_my_works_flow set ${field}=${label},status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            where id=@works_flow_key_id
            insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid,${field})
            select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@,${label}
            update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
            if @check_userids@ != ''
            begin
                  insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid)
                  select @ID@,@works_flow_code@,ID,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@ from dbo.SplitComma(@check_userids@)
                  insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
                  select @ID@,@works_flow_code@,@works_flow_detail_id@,ID,@check_type@,@userid@,@UserName,@FullName,@time_id@ from dbo.SplitComma(@check_userids@)
            end
            if @notice_userids@ != ''
            begin
                  update n
                  set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
                  from (select * from s_my_works_flow_notice where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0) n
                  inner join (select ID from dbo.SplitComma(@notice_userids@)) s
                  on n.userid = s.id
                  insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
                  select @ID@,@works_flow_code@,@works_flow_detail_id@,ID,@notice_type@,@userid@,@UserName,@FullName,@time_id@ from dbo.SplitComma(@notice_userids@)
            end
      end
      else
      begin
            update s_my_works_flow set ${field}=${label},modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            where id =@works_flow_key_id
            insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid,${field})
            select @ID@,@works_flow_code@,@works_flow_name@ ,@s_my_works_flow_log_param,@s_my_works_flow_log_status,@s_my_works_flow_log_statusname,@s_my_works_flow_log_detail_id,@work_group@,@work_grade@,@time_id@,${label}
            update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 and userid =@userid@
      end
      `
      } else {
        _sql += `
      /* 工作流默认sql */
      update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
      set @retmsg =''
      select @retmsg='X' from s_my_works_flow_role where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0 and userid =@userid@
      if @retmsg =''
      begin
          select @retmsg='X' from s_my_works_flow_role where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and userid=@userid@
          if @retmsg !=''
          begin
              select @ErrorCode='E', @retmsg='当前单据已审核,请刷新后重试'
            goto aaa
          end
          select @retmsg='页面数据已更新,或没有当前单据的审批权限'
            goto aaa
      end
      set @retmsg=''
      update s_my_works_flow set status=@status@,statusname=@statusname@,works_flow_param=@works_flow_param@,works_flow_detail_id=@works_flow_detail_id@,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
      where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
      insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade,upid)
      select @ID@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@,@time_id@
      update s_my_works_flow_role set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
      where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
      if @check_userids@ != ''
      begin
            delete s_my_works_flow_role where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0
            insert into s_my_works_flow_role (works_flow_id,works_flow_code,userid,works_flow_detail_id,createuserid,CreateUser,CreateStaff,upid)
            select @ID@,@works_flow_code@,ID,@works_flow_detail_id@,@userid@,@UserName,@FullName,@time_id@ from dbo.SplitComma(@check_userids@)
            insert into s_my_works_flow_notice (works_flow_id,works_flow_code,works_flow_detail_id,userid,notice_type,createuserid,CreateUser,CreateStaff,upid)
@@ -2291,7 +2408,8 @@
      end
      if @notice_userids@ != ''
      begin
            delete n
            update n
            set deleted=10,modifydate=getdate(),upid=@time_id@,modifyuserid=@userid@,modifyuser=@username,modifystaff=@fullname
            from (select * from s_my_works_flow_notice where works_flow_id=@ID@ and works_flow_code=@works_flow_code@ and deleted=0) n
            inner join (select ID from dbo.SplitComma(@notice_userids@)) s
            on n.userid = s.id
@@ -2310,12 +2428,27 @@
      `
    }
    let checkIds = []
    let checkUsers = []
    let work_grade = sessionStorage.getItem('work_grade') || 0
    if (verify.flowType !== 'start') {
      if (line) {
        let checkIds = []
        let noticeIds = []
        line.mkdata.members && line.mkdata.members.forEach(item => {
          checkIds.push(item.worker_id)
          if (line.mkdata.approver === 'departmentManager') {
            if (item.job_type === 'manage' && departmentcode === item.parentIds[1]) {
              checkIds.push(item.worker_id)
              checkUsers.push(item)
            }
          } else if (line.mkdata.approver === 'directManager') {
            if (departmentcode === item.parentIds[1] && item.work_grade > work_grade) {
              checkIds.push(item.worker_id)
              checkUsers.push(item)
            }
          } else {
            checkIds.push(item.worker_id)
            checkUsers.push(item)
          }
        })
        line.mkdata.copys && line.mkdata.copys.forEach(item => {
          noticeIds.push(item.worker_id)
@@ -2337,9 +2470,10 @@
    _sql = _sql.replace(/@works_flow_code@/ig, `'${flow.flow_code}'`)
    _sql = _sql.replace(/@works_flow_name@/ig, `'${flow.flow_name}'`)
    if (target) {
      let label = target.attrs && target.attrs.text && target.attrs.text.text ? target.attrs.text.text : ''
      let msg = {...target.mkdata, label: label, id: target.id}
      let msg = {...target.mkdata, label: label, id: target.id, checkIds, checkUsers}
      _sql = _sql.replace(/@works_flow_param@/ig, `'${window.btoa(window.encodeURIComponent(JSON.stringify(msg)))}'`)
    } else {
      _sql = _sql.replace(/@works_flow_param@/ig, `''`)
@@ -2348,7 +2482,7 @@
    _sql = _sql.replace(/@status@/ig, `'${status}'`)
    _sql = _sql.replace(/@statusname@/ig, `'${statusName}'`)
    _sql = _sql.replace(/@work_group@/ig, `'${sessionStorage.getItem('work_group') || ''}'`)
    _sql = _sql.replace(/@work_grade@/ig, `'${sessionStorage.getItem('work_grade') || 0}'`)
    _sql = _sql.replace(/@work_grade@/ig, `'${work_grade}'`)
  }
  if (_backCustomScript) {