pay.blade.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. @extends('layouts.base')
  2. @section('title', '中台支付顺序设置')
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}" />
  5. <link rel="stylesheet" href="{{resource_get('plugins/yz-supply/assent/css/album1.css?time='.time())}}">
  6. <div class="all">
  7. <div id="app" v-cloak>
  8. <div class="vue-head">
  9. <div class="top-title">
  10. <span :class="item.class" v-for="(item,index) in albumTopTitle" @click="skipUrl(item)" :key="index">[[item.name]]</span>
  11. </div>
  12. </div>
  13. <div class="vue-main">
  14. <div class="vue-main-title">
  15. <div class="vue-main-title-left"></div>
  16. <div class="vue-main-title-content">中台支付顺序设置</div>
  17. </div>
  18. <div class="vue-main-form">
  19. <el-row style="margin-left: 15%;margin-bottom:15px; ">
  20. <el-select v-model="middleground_configuration_index" placeholder="请选择供应链" clearable >
  21. <el-option v-for="item,index in middleground_configuration" :key="index" :label="item.title" :value="index"></el-option>
  22. </el-select>
  23. <el-button type="primary" icon="el-icon-search" @click="inquire()">查询</el-button>
  24. </el-row>
  25. <el-form ref="form" label-width="15%" v-for="(item,index) in payData">
  26. <el-form-item :label="item.name">
  27. <el-input v-model="item.sort" placeholder="顺序">
  28. </el-input>
  29. </el-form-item>
  30. </el-form>
  31. </div>
  32. </div>
  33. <!-- 分页 -->
  34. <div class="vue-page">
  35. <div class="vue-center">
  36. <el-button type="primary" @click="saveSet">保存设置</el-button>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <script>
  42. const GetAccountSetUrl = "{!! yzWebFullUrl('plugin.kart.Backend.Account.Controllers.set.index') !!}";
  43. const SaveAccountSetUrl = "{!! yzWebFullUrl('plugin.kart.Backend.Account.Controllers.set.update') !!}";
  44. </script>
  45. <script>
  46. const mixin = {
  47. data() {
  48. return {
  49. albumTopTitle: [
  50. {
  51. id: 1,
  52. name: "基础设置",
  53. class:"album-name-against",
  54. url:"{!! yzWebFullUrl('plugin.yz-supply.admin.set.index') !!}"
  55. },
  56. {
  57. id: 2,
  58. name: "中台配置列表",
  59. class:"album-name-against",
  60. url:"{!! yzWebFullUrl('plugin.yz-supply.admin.middleground-configuration.index') !!}"
  61. },
  62. {
  63. id: 3,
  64. name: "支付设置",
  65. class:"album-name",
  66. url:"{!! yzWebFullUrl('plugin.yz-supply.admin.set.pay') !!}"
  67. },
  68. {
  69. id: 4,
  70. name: "快递匹配",
  71. class:"album-name-against",
  72. url:"{!! yzWebFullUrl('plugin.yz-supply.admin.express-matching.index') !!}"
  73. },
  74. {
  75. id: 5,
  76. name: "导入分类",
  77. class:"album-name-against",
  78. url:"{!! yzWebFullUrl('plugin.yz-supply.admin.import-categorys.index') !!}"
  79. },
  80. ],
  81. middleground_configuration_index:0,
  82. middleground_configuration_id:0,
  83. middleground_configuration:{},
  84. payData:[],
  85. speechSynthesisAppId:11
  86. };
  87. },
  88. mounted() {
  89. this.getMiddlegroundConfiguration();
  90. },
  91. methods: {
  92. skipUrl(item){
  93. window.location.href = item.url
  94. },
  95. inquire(){
  96. this.middleground_configuration_id = this.middleground_configuration[this.middleground_configuration_index].id;
  97. this.getSetData();
  98. },
  99. getMiddlegroundConfiguration(){
  100. this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.middleground-configuration.get-middleground-configurations') !!}').then(function (response) {
  101. if (response.data.result) {
  102. this.middleground_configuration = response.data.data;
  103. this.middleground_configuration_id = this.middleground_configuration[this.middleground_configuration_index].id;
  104. this.getSetData(0);
  105. } else {
  106. this.$message({message: response.data.msg, type: 'error'});
  107. }
  108. }, function (response) {
  109. this.$message({message: response.data.msg, type: 'error'});
  110. })
  111. },
  112. getSetData() {
  113. let loading = this.$loading({
  114. target: document.querySelector(".content"),
  115. background: 'rgba(0, 0, 0, 0)'
  116. });
  117. this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.set.pay-list') !!}', {middleground_configuration_id:this.middleground_configuration_id}).then(function (response) {
  118. if (response.data.result) {
  119. this.payData = response.data.data;
  120. // this.$message({message: response.data.msg, type: 'success'});
  121. } else {
  122. this.payData = [];
  123. this.$message({message: response.data.msg, type: 'error'});
  124. }
  125. loading.close();
  126. }, function (response) {
  127. this.$message({message: response.data.msg, type: 'error'});
  128. })
  129. },
  130. saveSet(){
  131. let loading = this.$loading({
  132. target: document.querySelector(".content"),
  133. background: 'rgba(0, 0, 0, 0)'
  134. });
  135. this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.set.set-pay') !!}', {data:this.payData,middleground_configuration_id:this.middleground_configuration_id}).then(function (response) {
  136. if (response.data.result) {
  137. this.$message({message: response.data.msg, type: 'success'});
  138. this.getSetData()
  139. } else {
  140. this.$message({message: response.data.msg, type: 'error'});
  141. }
  142. loading.close();
  143. // location.reload();
  144. }, function (response) {
  145. this.$message({message: response.data.msg, type: 'error'});
  146. })
  147. }
  148. },
  149. };
  150. //* 实例化,提供基础服务
  151. new Vue({
  152. el: "#app",
  153. delimiters: ["[[", "]]"],
  154. mixins: [mixin],
  155. data() {
  156. return {
  157. };
  158. },
  159. methods: {
  160. },
  161. });
  162. </script>
  163. @endsection