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