ソースを参照

加入联兑通支付配置

fangq 4 年 前
コミット
3cd5653475

+ 116 - 0
src/views/modules/sys/pset/ldt-config.vue

@@ -0,0 +1,116 @@
+<template>
+  <div class="mod-pay">
+<!--    <miniapp ref="miniapp" />-->
+    <mp ref="mp" />
+<!--    <app ref="app" />-->
+<!--    <pay ref="pay" />-->
+  </div>
+</template>
+<script>
+import miniapp from './wx-ma-config.vue'
+import app from './wx-app-config.vue'
+import mp from './ldt-wx-mp-config.vue'
+import pay from './ldt-wx-pay-config.vue'
+export default {
+  data () {
+    return {
+    }
+  },
+  methods: {
+
+  },
+  components: {
+    miniapp,
+    app,
+    mp,
+    pay
+  }
+}
+</script>
+<style lang="scss">
+/*
+通用样式
+*/
+.mod-pay {
+  .sdp-top {
+    .IsdistributionText {
+      display: inline-block;
+      padding-left: 10px;
+    }
+  }
+  .footer-bar-pagination {
+    width: calc(100% + 30px);
+    background-color: white;
+    bottom: 0px;
+    position: fixed;
+    height: 50px;
+    text-align: center;
+    z-index: 100;
+    left: -30px;
+    line-height: 50px;
+  }
+  #tabs {
+    margin-top: 20px;
+  }
+
+  .tips {
+    color: #9797a1;
+    font-size: 12px;
+  }
+  .title {
+    font-size: 16px;
+    font-weight: 700;
+    display: inline-block;
+    vertical-align: middle;
+    padding-right: 20px;
+  }
+  .gray-box {
+    background: #f2f2f6;
+    padding: 20px 35px;
+    height: 100%;
+  }
+  .border-bottom-gray {
+    border-bottom: 1px solid #dddce2;
+  }
+  .bottom-redius {
+    border-bottom-left-radius: 6px;
+    border-bottom-right-radius: 6px;
+  }
+  .top-redius {
+    border-top-left-radius: 6px;
+    border-top-right-radius: 6px;
+  }
+
+  .set-form {
+    margin-left: 20%;
+    margin: 20px;
+  }
+
+  .valid-input {
+    margin-left: 20px;
+    border-top-left-radius: 0px;
+  }
+
+  /**
+    elenemt
+    **/
+  .el-checkbox__label,
+  .el-radio__label {
+    padding-left: 5px;
+    font-size: 13px;
+  }
+  .el-checkbox__inner,
+  .el-radio__inner {
+    border: 2px solid #b2aebc;
+  }
+  .el-checkbox__inner::after {
+    left: 3px;
+    top: 0px;
+  }
+
+  .el-input__inner {
+    border-radius: 0%;
+  }
+}
+</style>
+

+ 174 - 0
src/views/modules/sys/pset/ldt-wx-mp-config.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="public-微信公众号配置-set gray-box top-redius border-bottom-gray">
+    <div class="title">
+      {{ $t("sysManagement.ldtWeChatOfficialAccountConfiguration") }}
+    </div>
+    <el-form
+      ref="dataForm"
+      label-width="240px"
+      size="mini"
+      class="set-form"
+      label-position="left"
+      @keyup.enter.native="dataFormSubmit()"
+      :rules="dataRule"
+      :model="dataForm"
+    >
+      <el-form-item
+        :label="`${$t('sysManagement.weChatOfficialAccount')}appId:`"
+        style="width: 640px"
+        prop="appId"
+      >
+        <el-input
+          v-model="dataForm.appId"
+          :placeholder="`${$t('sysManagement.weChatOfficialAccount')}appId`"
+          controls-position="right"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        :label="`${$t('sysManagement.ldtWeChatOfficialAccount')}clientId:`"
+        style="width: 640px"
+        prop="clientId"
+      >
+        <el-input
+          v-model="dataForm.clientId"
+          :placeholder="`${$t('sysManagement.ldtWeChatOfficialAccount')}clientId`"
+          controls-position="right"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        :label="`${$t('sysManagement.ldtWeChatOfficialAccount')}clientSecret:`"
+        style="width: 640px"
+        prop="clientSecret"
+      >
+        <el-input
+          v-model="dataForm.clientSecret"
+          :placeholder="`${$t('sysManagement.ldtWeChatOfficialAccount')}clientSecret`"
+          controls-position="right"
+        ></el-input>
+      </el-form-item>
+      <!--<el-form-item
+        :label="`${$t('sysManagement.weChatOfficialAccount')}${$t(
+          'sysManagement.messageEncoding'
+        )} token:`"
+        style="width: 640px"
+        prop="token"
+      >
+        <el-input
+          v-model="dataForm.token"
+          type="textarea"
+          :placeholder="`${$t('sysManagement.weChatOfficialAccount')}${$t(
+            'sysManagement.messageEncoding'
+          )} token`"
+          controls-position="right"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        :label="`${$t('sysManagement.weChatOfficialAccount')}${$t(
+          'sysManagement.messageEncoding'
+        )} aesKey:`"
+        style="width: 640px"
+        prop="aesKey"
+      >
+        <el-input
+          v-model="dataForm.aesKey"
+          type="textarea"
+          :placeholder="`${$t('sysManagement.weChatOfficialAccount')}${$t(
+            'sysManagement.messgaeEncoding'
+          )} aesKey`"
+          controls-position="right"
+        ></el-input>
+      </el-form-item>-->
+      <div class="default-btn" @click="dataFormSubmit()">{{$t('sysManagement.save')}}</div>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <!-- <el-button @click="visible = false">取消</el-button> -->
+    </span>
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      dataForm: {
+        // id: null,
+        // paramKey: 'MP_CONFIG',
+        appId: null,
+        clientId: null,
+        clientSecret: null,
+        token: null,
+        aesKey: null
+        // paramValue: null
+      },
+      dataRule: {
+        appId: [
+          { required: true, message: `${this.$i18n.t('sysManagement.weChatOfficialAccount')} appId ${this.$i18n.t('sysManagement.nullTips')}`, trigger: 'blur' }
+        ],
+        clientId: [
+          { required: true, message: `${this.$i18n.t('sysManagement.ldtWeChatOfficialAccount')} clientId ${this.$i18n.t('sysManagement.nullTips')}`, trigger: 'blur' }
+        ],
+        clientSecret: [
+          { required: true, message: `${this.$i18n.t('sysManagement.ldtWeChatOfficialAccount')} clientSecret ${this.$i18n.t('sysManagement.nullTips')}`, trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  mounted () {
+    this.init()
+  },
+  methods: {
+    init () {
+      // this.$refs['dataForm'].resetFields()
+      this.$nextTick(() => {
+        this.$http({
+          url: this.$http.adornUrl('/sys/pconfig/info/' + 'LDT_MP_CONFIG'),
+          method: 'get',
+          params: this.$http.adornParams({
+            id: this.dataForm.id,
+            key: this.dataForm.paramKey
+          })
+        }).then(({ data }) => {
+          if (data) {
+            this.dataForm = data
+          }
+        })
+        this.$refs['dataForm'].resetFields()
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      let obj = {}
+      obj.appId = this.dataForm.appId
+      obj.secret = this.dataForm.secret
+      obj.token = this.dataForm.token
+      obj.aesKey = this.dataForm.aesKey
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/sys/pconfig/save'),
+            method: 'post',
+            data: this.$http.adornData({
+              'paramKey': 'LDT_MP_CONFIG',
+              'paramValue': JSON.stringify(this.dataForm),
+              'remark': this.$i18n.t('sysManagement.ldtWeChatOfficialAccountConfiguration')
+            })
+          }).then(({ data }) => {
+            if (data) {
+              this.init()
+            }
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    }
+  }
+}
+</script>

+ 107 - 0
src/views/modules/sys/pset/ldt-wx-pay-config.vue

@@ -0,0 +1,107 @@
+<template>
+  <div class="pay-wx-set gray-box top-redius border-bottom-gray">
+    <div class="title">{{$t('sysManagement.wechatPaymentConfiguration')}}</div>
+    <el-form
+      ref="dataForm"
+      label-width="180px"
+      size="mini"
+      class="set-form"
+      label-position="left"
+      @keyup.enter.native="dataFormSubmit()"
+      :rules="dataRule"
+      :model="dataForm"
+    >
+      <el-form-item :label="`${$t('sysManagement.wechatPay')} mchId:`" style="width:640px" prop="mchId">
+        <el-input v-model="dataForm.mchId" :placeholder="`${$t('sysManagement.wechatPay')} mchId`" controls-position="right"></el-input>
+      </el-form-item>
+      <el-form-item :label="`${$t('sysManagement.wechatPay')} mchKey:`" style="width:640px" prop="mchKey">
+        <el-input v-model="dataForm.mchKey" :placeholder="`${$t('sysManagement.wechatPay')} mchKey`" controls-position="right"></el-input>
+      </el-form-item>
+      <el-form-item :label="`${$t('sysManagement.paymentCertificatePath')}:`" style="width:640px" prop="keyPath">
+        <el-input v-model="dataForm.keyPath" :placeholder="`${$t('sysManagement.paymentCertificatePath')}`" controls-position="right"></el-input>
+      </el-form-item>
+      <div class="default-btn" @click="dataFormSubmit()">{{$t('sysManagement.save')}}</div>
+    </el-form>
+    <!-- <span slot="footer" class="dialog-footer">
+      <el-button @click="visible = false">取消</el-button>
+    </span>-->
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      dataForm: {
+        // id: null,
+        // paramKey: 'WXPAY_CONFIG',
+        mchId: null,
+        mchKey: null,
+        keyPath: null,
+        signType: null
+        // paramValue: null
+      },
+      value: [],
+      dataRule: {
+        mchId: [
+          { required: true, message: `${this.$i18n.t('sysManagement.wechatPay')} mchId ${this.$i18n.t('sysManagement.nullTips')}`, trigger: 'blur' }
+        ],
+        mchKey: [
+          { required: true, message: `${this.$i18n.t('sysManagement.wechatPay')} mchKey ${this.$i18n.t('sysManagement.nullTips')}`, trigger: 'blur' }
+        ],
+        keyPath: [
+          { required: true, message: `${this.$i18n.t('sysManagement.paymentCertificatePath')} ${this.$i18n.t('sysManagement.nullTips')}`, trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  mounted () {
+    this.init()
+  },
+  methods: {
+    init () {
+      // this.$refs['dataForm'].resetFields()
+      this.$nextTick(() => {
+        this.$http({
+          url: this.$http.adornUrl('/sys/pconfig/info/' + 'LDT_WXPAY_CONFIG'),
+          method: 'get',
+          params: this.$http.adornParams()
+        }).then(({ data }) => {
+          if (data) {
+            this.dataForm = data
+          }
+        })
+        this.$refs['dataForm'].resetFields()
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        // this.dataForm.signType = JSON.stringify(this.value)
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/sys/pconfig/save'),
+            method: 'post',
+            data: this.$http.adornData({
+              'paramKey': 'LDT_WXPAY_CONFIG',
+              'paramValue': JSON.stringify(this.dataForm),
+              'remark': this.$i18n.t('sysManagement.paymentCertificatePath')
+            })
+          }).then(({ data }) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+