king
2020-09-26 ab60d53b67f802878662aaa5a5b52580cca421b8
src/templates/zshare/verifycard/index.jsx
@@ -1166,7 +1166,7 @@
  }
  uniqueChange = (values) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let verify = fromJS(this.state.verify).toJS()
    if (values.uuid) {
      verify.uniques = verify.uniques.map(item => {
@@ -1187,7 +1187,7 @@
  }
  contrastChange = (values) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let verify = fromJS(this.state.verify).toJS()
    if (values.uuid) {
      verify.contrasts = verify.contrasts.map(item => {
@@ -1208,7 +1208,7 @@
  }
  customChange = (values) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let verify = fromJS(this.state.verify).toJS()
    if (values.uuid) {
      verify.customverifys = verify.customverifys.map(item => {
@@ -1229,7 +1229,7 @@
  }
  scriptsChange = (values) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let verify = fromJS(this.state.verify).toJS()
    if (values.uuid) {
      verify.scripts = verify.scripts.map(item => {
@@ -1250,7 +1250,7 @@
  }
  orderChange = (values) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let verify = fromJS(this.state.verify).toJS()
    if (values.uuid) {
      verify.billcodes = verify.billcodes.map(item => {
@@ -1327,7 +1327,7 @@
  }
  handleStatus = (record, type) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let verify = fromJS(this.state.verify).toJS()
    record.status = record.status === 'false' ? 'true' : 'false'
    if (type === 'customverify') {
@@ -1378,7 +1378,7 @@
  }
  handleUpDown = (record, type, direction) => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    let verify = fromJS(this.state.verify).toJS()
    let index = 0
    if (type === 'customverify') {
@@ -1526,11 +1526,12 @@
  }
  handleConfirm = () => {
    let verify = JSON.parse(JSON.stringify(this.state.verify))
    const { card } = this.props
    let verify = fromJS(this.state.verify).toJS()
    
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
      if (verify.default === 'false' && verify.scripts.length === 0) {
      if (card.sqlType !== 'custom' && verify.default === 'false' && verify.scripts.length === 0) {
        notification.warning({
          top: 92,
          message: '不执行默认sql时,必须设置自定义脚本!',