大宝管理后台代码
zzzz
2024-04-26 e624c205c53c0e082dc489e113ae9765b07a5e70
src/views/userlist/components/editCapitaluserdialog.vue
@@ -26,7 +26,7 @@
            <a-select-option value="1">扣款</a-select-option>
            <a-select-option value="0">入款</a-select-option>
            <a-select-option value="2">充值</a-select-option>
            <a-select-option value="3">提币</a-select-option>
            <!-- <a-select-option value="3">提币</a-select-option> -->
          </a-select>
        </a-form-item>
        <a-form-item label="账户" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -111,22 +111,29 @@
    OkeditUserdialog() {
      const form = this.$refs.editUserform.form
      form.validateFields((errors, values) => {
        console.log(values, 'from')
        console.log(values, 'from', !errors)
        const arr = this.activeArr.filter((item) => item.accectType === values.accectType)
        const amt = values.direction == '1' ? 0 - Number(values.amt) : Number(values.amt)
        const amt = values.amt
        console.log(arr)
        if (!errors) {
          this.editUserDialogloading = true
          updateMoney({ id: arr[0].id, amt: amt }).then((res) => {
            if (res.status == 0) {
              this.editUserdialog = false
              this.$message.success(res.msg)
              form.resetFields()
              this.getinit()
            } else {
              this.$message.error({ content: res.msg || '划转成功' })
            }
            this.editUserDialogloading = false
          })
          console.log({ id: arr[0].id, amt: amt, type: this.direction })
          updateMoney({ id: arr[0].id, amt: amt, type: values.direction })
            .then((res) => {
              if (res.status == 0) {
                this.editUserdialog = false
                this.$message.success(res.msg)
                form.resetFields()
                this.getinit()
              } else {
                this.$message.error({ content: res.msg || '划转成功' })
              }
              this.editUserDialogloading = false
            })
            .catch((res) => {
              this.editUserDialogloading = false
            })
        } else {
          console.log(3333)
        }