大宝管理后台代码
dcc
2024-05-14 793cefdfcaabc838d2a55aa98f18d00b308e364d
src/views/allsetting/paysetting.vue
@@ -18,7 +18,7 @@
                    icon="search"
                    style="margin-left: 8px"
                    @click=";(queryParam.pageNum = 1), getlist()"
                    >查询</a-button
                  >查询</a-button
                  >
                  <a-button
                    type="primary"
@@ -96,22 +96,12 @@
                v-decorator="['assetsType', { rules: [{ required: true, message: '请选择' }] }]"
              >
                <a-select-option value="US">美国</a-select-option>
                <a-select-option value="MAS">马来西亚</a-select-option>
                <!--                <a-select-option value="MAS">马来西亚</a-select-option>-->
                <!--                <a-select-option value="HK">香港</a-select-option>-->
                <a-select-option value="IN">印度</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <!-- <a-col :md="12" :lg="12" :sm="12">
            <a-form-item label="通道类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-select
                placeholder="请选择通道类型"
                v-decorator="['ctype', { rules: [{ required: true, message: '请选择通道类型' }] }]"
              >
                <a-select-option :value="0">支付宝</a-select-option>
                <a-select-option :value="1">公户转账</a-select-option>
                <a-select-option :value="2">其他</a-select-option>
              </a-select>
            </a-form-item>
          </a-col> -->
        </a-row>
        <a-row :gutter="48">
          <a-col :md="12" :lg="12" :sm="12">
@@ -165,10 +155,10 @@
            </a-form-item>
          </a-col>
          <a-col :md="12" :lg="12" :sm="12">
            <a-form-item label="收款账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
            <a-form-item label="IFSC" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input
                placeholder="请输入收款账号"
                v-decorator="['channelAccount', { rules: [{ required: true, message: '请输入收款账号' }] }]"
                placeholder="请输入IFSC"
                v-decorator="['channelAccount', { rules: [{ required: true, message: '请输入IFSC' }] }]"
              />
            </a-form-item>
          </a-col>
@@ -234,50 +224,50 @@
import pick from 'lodash.pick'
export default {
  name: 'Basecurrency',
  data() {
  data () {
    return {
      columns: [
        {
          title: '通道类型',
          dataIndex: 'channelType',
          align: 'center',
          align: 'center'
        },
        {
          title: '图片',
          dataIndex: 'channelImg',
          align: 'center',
          scopedSlots: { customRender: 'channelImg' },
          scopedSlots: { customRender: 'channelImg' }
        },
        {
          title: '通道名字',
          dataIndex: 'channelName',
          align: 'center',
          align: 'center'
        },
        {
          title: '账号',
          title: 'IFSC',
          dataIndex: 'channelAccount',
          align: 'center',
          align: 'center'
        },
        {
          title: '描述',
          dataIndex: 'channelDesc',
          align: 'center',
          align: 'center'
        },
        {
          title: '最小充值金额',
          dataIndex: 'channelMinLimit',
          align: 'center',
          align: 'center'
        },
        {
          title: '最大充值金额',
          dataIndex: 'channelMaxLimit',
          align: 'center',
          align: 'center'
        },
        {
          title: '是否显示',
          dataIndex: 'isShow',
          align: 'center',
          scopedSlots: { customRender: 'isShow' },
          scopedSlots: { customRender: 'isShow' }
        },
        {
          title: '操作',
@@ -285,8 +275,8 @@
          align: 'center',
          fixed: 'right',
          width: 200,
          scopedSlots: { customRender: 'action' },
        },
          scopedSlots: { customRender: 'action' }
        }
      ],
      // 表头
      pagination: {
@@ -296,13 +286,13 @@
        pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
        onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
        onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
        showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
        showTotal: (total) => `共有 ${total} 条数据` // 分页中显示总的数据
      },
      loading: false,
      queryParam: {
        pageNum: 1,
        pageSize: 10,
        channelType: '',
        channelType: ''
      },
      datalist: [],
@@ -311,11 +301,11 @@
      addUserform: this.$form.createForm(this),
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
        sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
        sm: { span: 18 }
      },
      fields: [
        'channelType',
@@ -330,25 +320,25 @@
        'assetsType',
        'channelImg',
        'code',
        'formUrl',
        'formUrl'
      ],
      currentDetails: '',
      channelImg: '',
      imgloading: false,
      imgloading: false
    }
  },
  created() {
  created () {
    this.getlist()
  },
  methods: {
    deletebaseCurrency(val) {
    deletebaseCurrency (val) {
      var that = this
      this.$confirm({
        title: '提示',
        content: '确认删除该支付渠道?此操作不可恢复',
        onOk() {
        onOk () {
          var data = {
            cId: val,
            cId: val
          }
          paydel(data).then((res) => {
            if (res.status == 0) {
@@ -359,12 +349,12 @@
            }
          })
        },
        onCancel() {
        onCancel () {
          console.log('Cancel')
        },
        }
      })
    },
    customRequest(data) {
    customRequest (data) {
      this.imgloading = true
      var formData = new FormData()
      formData.append('upload_file', data.file)
@@ -372,7 +362,7 @@
        if (res.status == 0) {
          this.channelImg = res.data.url
          this.addUserform.setFieldsValue({
            channelImg: res.data.url,
            channelImg: res.data.url
          })
        } else {
          this.$message.error({ content: '上传失败请检查图片类型!' })
@@ -380,20 +370,20 @@
        this.imgloading = false
      })
    },
    geteditbaseCurrency(val) {
    geteditbaseCurrency (val) {
      this.currentDetails = val
      this.channelImg = val.channelImg
      this.addUserdialog = true
      this.fields.forEach((v) => this.addUserform.getFieldDecorator(v))
      this.addUserform.setFieldsValue(pick(val, this.fields))
    },
    CanceladdUserdialog() {
    CanceladdUserdialog () {
      this.addUserdialog = false
      const form = this.$refs.addUserform.form
      form.resetFields()
      this.channelImg = ''
    },
    OkaddUserdialog() {
    OkaddUserdialog () {
      const form = this.$refs.addUserform.form
      form.validateFields((errors, values) => {
        if (!errors) {
@@ -431,14 +421,14 @@
        }
      })
    },
    getqueryParam() {
    getqueryParam () {
      this.queryParam = {
        pageNum: 1,
        pageSize: 10,
        channelType: '',
        channelType: ''
      }
    },
    getlist() {
    getlist () {
      this.loading = true
      paylist(this.queryParam).then((res) => {
        this.datalist = res.data.list
@@ -446,16 +436,16 @@
        this.loading = false
      })
    },
    onPageChange(page, pageSize) {
    onPageChange (page, pageSize) {
      this.queryParam.pageNum = page
      this.getlist()
    },
    onSizeChange(current, pageSize) {
    onSizeChange (current, pageSize) {
      this.queryParam.pageNum = current
      this.queryParam.pageSize = pageSize
      this.getlist()
    },
  },
    }
  }
}
</script>
<style scoped>