| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- @extends('layouts.base')
- @section('title', '基础设置')
- @section('content')
- <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}" />
- <link rel="stylesheet" href="{{resource_get('plugins/yz-supply/assent/css/album1.css?time='.time())}}">
- <div class="all">
- <div id="app" v-cloak>
- <div class="vue-head">
- <div class="top-title">
- <span :class="item.class" v-for="(item,index) in albumTopTitle" @click="skipUrl(item)" :key="index">[[item.name]]</span>
- </div>
- </div>
- <div class="vue-main">
- <div class="vue-main-form" style="margin-bottom: 130px;">
- <el-form ref="form" :model="form" label-width="15%">
- <div class="block">
- <div class="vue-main-title" style="margin-bottom:20px">
- <div class="vue-main-title-left"></div>
- <div class="vue-main-title-content">基础设置</div>
- <div class="vue-main-title-button">
- </div>
- </div>
- <el-form-item label="商城链接" >
- <el-input v-model="form.yz_shop_url" placeholder="商城链接" style="width:70%;"></el-input>
- <span style="" class='help-block'>
- 如果不填写,假如商品上传图片为本地,使用推送全部商品及批量更新一键更新等操作时会造成商品图片在中台系统不显示,会自动填写默认值,如果不需要修改点击确定即可
- </span>
- </el-form-item>
- <el-form-item label="自动下架云仓商品">
- <template>
- <el-switch
- v-model="form.auto_off_shelf_goods"
- active-value="0"
- inactive-value="1"
- >
- </el-switch>
- </template>
- <div>商品下架时自动下架云仓商品</div>
- </el-form-item>
- <el-form-item label="推送成功自动申请上架">
- <template>
- <el-switch
- v-model="form.auto_on_shelf_goods"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- </el-form-item>
- <div style="height: 50px;"></div>
- </div>
- </div>
- <div class="vue-page">
- <div class="vue-center">
- <el-button type="primary" @click="submit">保存设置</el-button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- var vm = new Vue({
- el: "#app",
- delimiters: ['[[', ']]'],
- data() {
- return {
- albumTopTitle: [
- {
- id: 1,
- name: "基础设置",
- class:"album-name",
- url:"{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-set.index') !!}"
- },
- {
- id: 2,
- name: "分类匹配",
- class:"album-name-against",
- url:"{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-category.index') !!}"
- },
- {
- id: 3,
- name: "运费模板",
- class:"album-name-against",
- url:"{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-dispatch.index') !!}"
- },
- ],
- form:{
- yz_shop_url:"",
- market_price_method:0,
- market_price_radio:100,
- price_radio:100,
- cost_price_radio:100,
- guide_price_method:0,
- market_price_radio_guide:100,
- price_radio_guide:100,
- cost_price_radio_guide:100,
- settle_price_method:0,
- market_price_radio_settle:100,
- price_radio_settle:100,
- cost_price_radio_settle:100,
- auto_off_shelf_goods:0,
- auto_on_shelf_goods:0,
- },
- }
- },
- mounted() {
- this.getData();
- },
- methods: {
- skipUrl(item){
- window.location.href = item.url
- },
- getData(){
- this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-set.index') !!}').then(function (response){
- if(response.data.data != null){
- this.form = response.data.data;
- }
- if(this.form.yz_shop_url == ""){
- this.form.yz_shop_url = window.location.origin;
- }
- },function (response) {
- this.$message({message: response.data.msg,type: 'error'});
- })
- },
- submit() {
- let loading = this.$loading({
- target: document.querySelector(".content"),
- background: 'rgba(0, 0, 0, 0)'
- });
- this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-set.save') !!}', {'set': this.form}).then(function (response) {
- if (response.data.result) {
- this.$message({message: response.data.msg, type: 'success'});
- } else {
- this.$message({message: response.data.msg, type: 'error'});
- }
- loading.close();
- location.reload();
- }, function (response) {
- this.$message({message: response.data.msg, type: 'error'});
- })
- },
- },
- });
- </script>
- @endsection
|