trade.blade.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. @extends('layouts.base')
  2. @section('content')
  3. <link rel="stylesheet" href="{{static_url('css/public-number.css')}}">
  4. <style>
  5. .content{
  6. background: #eff3f6;
  7. padding: 10px!important;
  8. }
  9. .con{
  10. padding-bottom:40px;
  11. position:relative;
  12. border-radius: 8px;
  13. min-height:100vh;
  14. }
  15. .con .setting .block{
  16. padding:10px;
  17. background-color:#fff;
  18. border-radius: 8px;
  19. }
  20. .con .setting .block .title{
  21. font-size:18px;
  22. margin-bottom:15px;
  23. display:flex;
  24. align-items:center;
  25. }
  26. .con .confirm-btn{
  27. width: calc(100% - 266px);
  28. position:fixed;
  29. bottom:0;
  30. right:0;
  31. margin-right:10px;
  32. line-height:63px;
  33. background-color: #ffffff;
  34. box-shadow: 0px 8px 23px 1px
  35. rgba(51, 51, 51, 0.3);
  36. background-color:#fff;
  37. text-align:center;
  38. }
  39. b{
  40. font-size:14px;
  41. }
  42. .el-checkbox__inner{
  43. border:solid 1px #56be69!important;
  44. }
  45. </style>
  46. <div id='re_content' >
  47. <div class="con">
  48. <div class="setting">
  49. <el-form ref="form" :model="form" label-width="18%">
  50. <div class="block">
  51. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>自动关闭未付款订单</b></div>
  52. <el-form-item label="自动关闭未付款订单时间">
  53. <el-input v-model="form.close_order_days" style="width:70%;"></el-input>
  54. <el-select v-model="form.close_order_time_type" placeholder="请选择">
  55. <el-option
  56. v-for="item in order_time_opt"
  57. :key="item.value"
  58. :label="item.label"
  59. :value="item.value"
  60. >
  61. </el-option>
  62. </el-select>
  63. <div style="padding:5px;background-color: #f6f7f9;width:60%;margin-top:5px;">
  64. <div style="line-height:20px!important;font-size: 12px;" v-if="form.close_order_time_type==1">1.订单下单未付款,n分钟后自动关闭,0/空为不自动关闭</div>
  65. <div style="line-height:20px!important;font-size: 12px;" v-else>1.订单下单未付款,n天后自动关闭,0/空为不自动关闭</div>
  66. <div style="line-height:20px!important;font-size: 12px;">2.退换货处理中的订单不能自动关闭</div>
  67. </div>
  68. </el-form-item>
  69. {{--<el-form-item label="自动关闭未付款订单执行间隔时间">--}}
  70. {{--<el-input v-model="form.close_order_time" style="width:70%;"></el-input>--}}
  71. {{--<span style="margin-left:10px;">分钟</span>--}}
  72. {{--<div style="font-size: 12px;">执行自动关闭未付款订单操作的间隔时间,如果为空默认为 5分钟 执行一次关闭到期未付款订单</div>--}}
  73. {{--</el-form-item>--}}
  74. </div>
  75. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  76. <div class="block">
  77. <div class="title">
  78. <span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span>
  79. <b>自动发货</b>
  80. </div>
  81. <el-form-item label="自动发货时间">
  82. <el-input v-model="form.send" style="width:70%;"></el-input>
  83. <span style="margin-left:10px;">分钟</span>
  84. <div style="padding:5px;background-color: #f6f7f9;width:70%;margin-top:5px;">
  85. <div style="line-height:20px!important;font-size: 12px;">1.订单付款后,N分钟后订单状态自动变更为待收货 0/空为不自动发货</div>
  86. <div style="line-height:20px!important;font-size: 12px;">2.退换货处理中的订单不能自动发货</div>
  87. <div style="line-height:20px!important;font-size: 12px;">3.自动发货只会改变订单状态,不会自动填写物流单号,支持平台自营订单、供应商商品</div>
  88. </div>
  89. </el-form-item>
  90. </div>
  91. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  92. <div class="block">
  93. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>自动收货</b></div>
  94. <el-form-item label="自动收货时间">
  95. <el-input v-model="form.receive" style="width:70%;"></el-input>
  96. <el-select v-model="form.receive_time_type" placeholder="请选择">
  97. <el-option
  98. v-for="item in order_time_opt"
  99. :key="item.value"
  100. :label="item.label"
  101. :value="item.value"
  102. >
  103. </el-option>
  104. </el-select>
  105. <div style="padding:5px;background-color: #f6f7f9;width:60%;margin-top:5px;">
  106. <div style="line-height:20px!important;font-size: 12px;">1.订单发货后,用户收货的时间,如果在期间未确认收货,系统自动完成收货, 0/空为不自动收货</div>
  107. <div style="line-height:20px!important;font-size: 12px;">2.退换货处理中的订单不能自动收货</div>
  108. <div style="line-height:20px!important;font-size: 12px;">3.配送方式为自提,酒店入住,配送站送货,司机配送,自提点的配送类型不支持自动收货</div>
  109. </div>
  110. </el-form-item>
  111. {{--<el-form-item label="自动收货执行间隔时间">--}}
  112. {{--<el-input v-model="form.receive_time" style="width:70%;"></el-input>--}}
  113. {{--<span style="margin-left:10px;">分钟</span>--}}
  114. {{--<div style="font-size: 12px;">执行自动收货操作的间隔时间,如果为空默认为 5分钟 执行一次自动收货</div>--}}
  115. {{--</el-form-item>--}}
  116. </div>
  117. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  118. <div class="block">
  119. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>交易设置</b></div>
  120. <el-form-item label="退款">
  121. <template>
  122. <el-switch
  123. v-model="form.refund_status"
  124. active-value="1"
  125. inactive-value="0"
  126. >
  127. </el-switch>
  128. </template>
  129. <div style="font-size: 12px;">全局控制,关闭后前端所有订单都不行显示申请售后按钮</div>
  130. </el-form-item>
  131. <el-form-item label="发货后禁止退款">
  132. <template>
  133. <el-switch v-model="form.send_refund_status" active-value="1" inactive-value="0"></el-switch>
  134. </template>
  135. <div style="font-size: 12px;">开启后订单在待收货状态前端不能申请售后</div>
  136. </el-form-item>
  137. <el-form-item label="发货后禁止退款时间">
  138. <el-input v-model="form.send_refund_time" style="width:70%;">
  139. <template slot="append">分钟</template>
  140. </el-input>
  141. <div style="font-size: 12px;">设置0/空为发货后禁止退款</div>
  142. </el-form-item>
  143. <el-form-item label="前端合并支付">
  144. <template>
  145. <el-switch
  146. v-model="form.consolidated_payment"
  147. active-value="1"
  148. inactive-value="0"
  149. >
  150. </el-switch>
  151. </template>
  152. <div style="font-size: 12px;">默认开启</div>
  153. </el-form-item>
  154. <!-- <el-form-item label="快递配送">
  155. <template>
  156. <el-switch
  157. v-model="form.is_dispatch"
  158. active-value="0"
  159. inactive-value="1"
  160. >
  161. </el-switch>
  162. </template>
  163. </el-form-item> -->
  164. <el-form-item label="完成订单多少天内可申请退款">
  165. <el-input v-model="form.refund_days" style="width:70%;"></el-input>
  166. <div style="font-size: 12px;">订单完成后 ,用户在x天内可以发起退款申请,设置0或为空不允许完成订单退款</div>
  167. </el-form-item>
  168. <el-form-item label="公众号支付后跳转链接">
  169. <el-input v-model="form.redirect_url" style="width:70%;"></el-input><el-button @click="show=true" style="margin-left:10px;">选择链接</el-button>
  170. <div style="font-size: 12px;">当用户下单支付后,跳转到指定的页面,默认跳转到商城首页</div>
  171. </el-form-item>
  172. <el-form-item label="小程序支付后跳转链接">
  173. <el-input v-model="form.min_redirect_url" style="width:70%;"></el-input><el-button @click="pro=true" style="margin-left:10px;">选择小程序链接</el-button>
  174. <div style="font-size: 12px;">当用户下单支付后,跳转到指定的页面</div>
  175. </el-form-item>
  176. </div>
  177. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  178. <div class="block">
  179. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>发票设置</b></div>
  180. <el-form-item label="支持发票类型">
  181. <template>
  182. <el-checkbox label="纸质发票" v-model="form.invoice.papery" :false-label="0" :true-label="1"></el-checkbox>
  183. <el-checkbox label="电子发票" v-model="form.invoice.electron" :false-label="0" :true-label="1"></el-checkbox>
  184. </template>
  185. <div>当商品支持开发票时,买家可以选择以上勾选的类型</div>
  186. </el-form-item>
  187. </div>
  188. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  189. <div class="block">
  190. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>收货地址</b></div>
  191. <el-form-item label="是否开启乡镇及街道地址选择">
  192. <template>
  193. <el-switch
  194. v-model="form.is_street"
  195. active-value="1"
  196. inactive-value="0"
  197. >
  198. </el-switch>
  199. </template>
  200. </el-form-item>
  201. <el-form-item label="地址是否需要区域">
  202. <template>
  203. <el-switch
  204. v-model="form.is_region"
  205. active-value="0"
  206. inactive-value="1"
  207. >
  208. </el-switch>
  209. </template>
  210. </el-form-item>
  211. <el-form-item label="区域是否隐藏" v-show="form.is_region == 1">
  212. <template>
  213. <el-switch
  214. v-model="form.region_hide"
  215. active-value="1"
  216. inactive-value="0"
  217. >
  218. </el-switch>
  219. </template>
  220. <div>当地址选择不需要区域时,才可选择隐藏,不然保存地址会报错</div>
  221. </el-form-item>
  222. <el-form-item label="下单是否需要配送时间">
  223. <template>
  224. <el-switch
  225. v-model="form.delivery_time"
  226. active-value="1"
  227. inactive-value="0"
  228. >
  229. </el-switch>
  230. </template>
  231. <div>开启后下单会显示配送日期和时间的填写框</div>
  232. </el-form-item>
  233. </div>
  234. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  235. <div class="block">
  236. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>支付日志</b></div>
  237. <el-form-item label="支付回调日志">
  238. <template>
  239. <el-switch
  240. v-model="form.pay_log"
  241. active-value="1"
  242. inactive-value="0"
  243. >
  244. </el-switch>
  245. </template>
  246. <div>支付回调日志,如果出现手机付款而后台显示待付款状态,请开启日志,查错误日志路径为 addon/yun_shop/data/paylog/[公众号ID]</div>
  247. </el-form-item>
  248. </div>
  249. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  250. <div class="block">
  251. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>提现绑定手机号</b></div>
  252. <el-form-item label="是否开启">
  253. <template>
  254. <el-switch
  255. v-model="form.is_bind"
  256. active-value="1"
  257. inactive-value="0"
  258. >
  259. </el-switch>
  260. </template>
  261. </el-form-item>
  262. </div>
  263. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  264. <div class="block">
  265. <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>支付协议开启</b></div>
  266. <el-form-item label="是否开启">
  267. <template>
  268. <el-switch
  269. v-model="form.share_chain_pay_open"
  270. active-value="1"
  271. inactive-value="0"
  272. >
  273. </el-switch>
  274. </template>
  275. </el-form-item>
  276. <el-form-item label="支付协议">
  277. <tinymceee v-model="form.pay_content" style="width:70%;"></tinymceee>
  278. </el-form-item>
  279. </div>
  280. </div>
  281. <pop :show="show" @replace="changeProp" @add="parHref"></pop>
  282. <program :pro="pro" @replacepro="changeprogram" @addpro="parpro"></program>
  283. </el-form>
  284. <div class="confirm-btn">
  285. <el-button type="primary" @click="submit">提交</el-button>
  286. </div>
  287. </div>
  288. </div>
  289. @include('public.admin.pop')
  290. @include('public.admin.program')
  291. <script src="{{resource_get('static/yunshop/tinymce4.7.5/tinymce.min.js')}}"></script>
  292. @include('public.admin.tinymceee')
  293. <script>
  294. var vm = new Vue({
  295. el: "#re_content",
  296. delimiters: ['[[', ']]'],
  297. data() {
  298. return {
  299. activeName: 'one',
  300. show:false,//是否开启公众号弹窗
  301. pro:false ,//是否开启小程序弹窗
  302. form:{
  303. refund_status:'0',
  304. consolidated_payment: '1',
  305. // is_dispatch:'1',
  306. redirect_url:'',
  307. min_redirect_url:'',
  308. refund_days:'',
  309. is_street:'0',
  310. is_region:'0',
  311. pay_log:'0',
  312. is_bind:'0',
  313. close_order_days:'',
  314. close_order_time:'',
  315. send:'',
  316. receive:'',
  317. receive_time:'',
  318. share_chain_pay_open:'0',
  319. send_refund_status:'0',
  320. send_refund_time:'0',
  321. close_order_time_type:0,
  322. receive_time_type:0,
  323. pay_content:'',
  324. invoice:{
  325. electron: 0,
  326. papery : 0
  327. },
  328. },
  329. order_time_opt:[
  330. {
  331. label:'天',
  332. value:0,
  333. },
  334. {
  335. label:'分钟',
  336. value:1,
  337. }
  338. ],
  339. }
  340. },
  341. mounted () {
  342. this.getData();
  343. },
  344. methods: {
  345. //弹窗显示与隐藏的控制
  346. changeProp(item){
  347. this.show=item;
  348. },
  349. //当前链接的增加
  350. parHref(child,confirm){
  351. this.show=confirm;
  352. this.form.redirect_url=child;
  353. },
  354. changeprogram(item){
  355. this.pro=item;
  356. },
  357. parpro(child,confirm){
  358. this.pro=confirm;
  359. this.form.min_redirect_url=child;
  360. },
  361. getData(){
  362. this.$http.post('{!! yzWebFullUrl('setting.shop.trade') !!}').then(function (response){
  363. if (response.data.result) {
  364. if(response.data.data.set){
  365. for(let i in response.data.data.set){
  366. this.form[i]=response.data.data.set[i]
  367. }
  368. if(!this.form.invoice){
  369. this.form.invoice={
  370. electron:0,
  371. papery:1
  372. }
  373. }
  374. }
  375. }else {
  376. this.$message({message: response.data.msg,type: 'error'});
  377. }
  378. },function (response) {
  379. this.$message({message: response.data.msg,type: 'error'});
  380. })
  381. },
  382. submit() {
  383. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  384. this.$http.post('{!! yzWebFullUrl('setting.shop.trade') !!}',{'trade':this.form}).then(function (response){
  385. if (response.data.result) {
  386. this.$message({message: response.data.msg,type: 'success'});
  387. }else {
  388. this.$message({message: response.data.msg,type: 'error'});
  389. }
  390. loading.close();
  391. location.reload();
  392. },function (response) {
  393. this.$message({message: response.data.msg,type: 'error'});
  394. })
  395. },
  396. },
  397. });
  398. </script>
  399. @endsection