overallManagerTwo.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="">
  3. <!-- <h2>参数设置</h2> -->
  4. <div class="m-core">
  5. <!-- 列表 -->
  6. <el-form :inline="true" :model="form" ref="form">
  7. <el-alert
  8. style="margin: 10px 0"
  9. title="收费分润设置"
  10. :closable="false"
  11. type="info"
  12. >
  13. </el-alert>
  14. <el-row>
  15. <el-form-item prop="68">
  16. 默认收款渠道(双乾: YQPAY 汇付: ADAPAY):
  17. <el-input
  18. style="width: 180px"
  19. class="marginLR5"
  20. v-model="form['68']"
  21. placeholder="请输入渠道"
  22. >
  23. </el-input>
  24. </el-form-item>
  25. </el-row>
  26. <el-row>
  27. <el-form-item prop="69">
  28. 是否用收费配置(1:使用 0:不使用):
  29. <el-input
  30. style="width: 180px"
  31. class="marginLR5"
  32. v-model="form['69']"
  33. placeholder="请输入渠道"
  34. >
  35. </el-input>
  36. </el-form-item>
  37. </el-row>
  38. <el-row>
  39. <el-form-item prop="90">
  40. 延迟分账开始执行时间:
  41. <el-date-picker
  42. class="marginLR5"
  43. v-model="form['90']"
  44. type="datetime"
  45. format="yyyy-MM-dd HH:mm:ss"
  46. value-format="yyyy-MM-dd HH:mm:ss"
  47. placeholder="选择始执行时间"
  48. >
  49. </el-date-picker>
  50. </el-form-item>
  51. </el-row>
  52. </el-form>
  53. </div>
  54. <el-button type="primary" @click="save" class="saveBtn"
  55. v-permission="'sysConfig/batchUpdate/overallManagerTwo'"
  56. >保存</el-button
  57. >
  58. </div>
  59. </template>
  60. <script>
  61. import pagination from "@/components/Pagination/index";
  62. import { sysConfigList, sysConfigUpdate } from "@/api/generalSettings";
  63. export default {
  64. components: { pagination },
  65. name: "overallManagerTwo",
  66. data() {
  67. return {
  68. configList: [],
  69. input: [],
  70. form: {},
  71. };
  72. },
  73. mounted() {
  74. this.__init();
  75. },
  76. methods: {
  77. __init() {
  78. sysConfigList({ group: "DEFAULT" }).then((res) => {
  79. if (res.code == 200 && res.data.length > 0) {
  80. res.data.forEach((item) => {
  81. // this.form[item.paramName] = item.paranValue
  82. this.$set(this.form, item.id, item.paranValue);
  83. });
  84. // this.$forceUpdate()
  85. console.log(this.form);
  86. }
  87. });
  88. },
  89. // onSave(row, index) {
  90. // let params = {
  91. // id: row.id,
  92. // paranValue: this.input[index],
  93. // paramName: row.paramName,
  94. // description: row.description.join("{}"),
  95. // };
  96. // sysConfigUpdate(params).then((res) => {
  97. // if (res.code == 200) {
  98. // this.$message.success("修改成功");
  99. // }
  100. // });
  101. // },
  102. async save() {
  103. this.$refs.form.validate(async (valid) => {
  104. if (valid) {
  105. let param = [];
  106. for (let i in this.form) {
  107. param.push({
  108. id: i,
  109. paranValue: this.form[i],
  110. });
  111. }
  112. try {
  113. const res = await sysConfigUpdate(param);
  114. this.$message.success("保存成功");
  115. this.__init();
  116. } catch (e) {
  117. console.log(e);
  118. }
  119. }
  120. });
  121. },
  122. },
  123. };
  124. </script>
  125. <style lang="scss" scoped>
  126. @import "~@scss/views/courseRulersManager/index.scss";
  127. </style>