| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <?php
- use common\helpers\ComponentHelper;
- // ComponentHelper::loadComponentView('com-dialog-select');
- // ComponentHelper::loadComponentView('com-select-cat');
- // ComponentHelper::loadComponentView('components/user-select', __DIR__);
- ?>
- <div id="app" v-cloak>
- <el-card class="box-card" v-loading="loading" shadow="never" style="border:0;min-width: 1500px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <!-- <el-tabs v-model="tabName" @tab-click="handleChangeTab">
- <el-tab-pane label="基本设置" name="basic"> -->
- <div slot="header">
- <div>
- <span>基础设置</span>
- </div>
- </div>
- <div class="form_box">
- <el-form :model="ruleForm" size="small" ref="ruleForm" label-width="180px">
- <el-card shadow="never">
- <div>
- <el-row>
- <el-col :span="16">
- <el-form-item label="统计方式" style="margin-bottom: 0">
- <div>
- <el-radio-group v-model="ruleForm.settle_type">
- <el-radio :label="1">支付完成</el-radio>
- <el-radio :label="2">订单完成</el-radio>
- </el-radio-group>
- </div>
- <div class="tips-text" style="line-height: 24px;">
- 统计方式只针对前端【推广中心-我的客户】里面的订单数量和消费金额,默认支付完成
- </div>
- </el-form-item>
- <el-form-item label="是否扣除已退款售后数量:" style="margin-bottom: 0">
- <div>
- <el-radio-group v-model="ruleForm.is_sub_refund">
- <el-radio :label="0">否</el-radio>
- <el-radio :label="1">是</el-radio>
- </el-radio-group>
- </div>
- <!-- <div class="tips-text" style="line-height: 24px;">
- 统计方式只针对前端【推广中心-我的客户】里面的订单数量和消费金额,默认支付完成
- </div> -->
- </el-form-item>
-
- </el-col>
- </el-row>
- </div>
- </el-card>
- </el-form>
- <el-button :loading="btnLoading" class="button-item" type="primary" style="margin-top: 24px;"
- @click="submit(ruleForm)" size="small">保存
- </el-button>
- </div>
- <!-- </el-tab-pane>
- </el-tabs> -->
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- loading: false,
- btnLoading: false,
- tabName: 'basic',
- ruleForm: {
- settle_type: 1,
- is_sub_refund:0,
- },
- levels:[],
- listLoading:false,
- show:false,
- }
- },
- mounted: function () {
- this.loadData();
- },
- methods: {
- loadData() {
- this.loading = true;
- request({
- params: {
- r: 'team-data/default/setting',
- },
- method: 'get'
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.ruleForm = { ...this.ruleForm, ...e.data.data.basic }
- this.levels = e.data.data.levels;
- console.log(this.levels);
- }
- }).catch(e => {
- this.loading = false;
- })
- },
- submit(formName) {
- let self = this;
- this.$refs['ruleForm'].validate((valid) => {
- if (valid) {
- this.btnLoading = true;
- request({
- params: {
- r: 'team-data/default/setting',
- },
- method: 'post',
- data: this.ruleForm
- }).then(e => {
- this.btnLoading = false;
- if (e.data.code == 0) {
- this.$message.success(e.data.msg);
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error(e);
- this.btnLoading = false;
- })
- } else {
- this.btnLoading = false;
- console.log('error submit!!');
- return false;
- }
- });
- },
- }
- });
- </script>
- <style>
- .form_box {
- background-color: #f3f3f3;
- padding: 0 0 20px;
- }
- .button-item {
- margin-top: 12px;
- padding: 9px 25px;
- }
- .el-input-group__append {
- background-color: #fff;
- color: #353535;
- }
- .equal-computing {
- display: flex;
- flex-direction: column;
- }
- .equal-computing .el-radio-group{
- margin-top: 10px;
- display: flex;
- border: 1px solid #ebebeb;
- border-radius: 3px;
- padding: 10px;
- position: relative;
- }
- .equal-computing .el-radio-group::before {
- content: "";
- position: absolute;
- top: -5px;
- left: 10px;
- border-right: 1px solid #ebebeb;
- border-top: 1px solid #ebebeb;
- height: 8px;
- width: 8px;
- -webkit-transform: rotate(315deg);
- transform: rotate(315deg);
- border-left: 1px solid transparent;
- border-bottom: 1px solid transparent;
- background-color: #FFF;
- }
- .equal-computing .el-switch {
- height: 32px;
- place-self: flex-start;
- }
- .input-number-box{
- /* margin-left: 10px; */
- display: inline-block;
- }
- .input-number-box .el-input-number{
- margin: 0 8px;
- }
- .input-number-box,.input-number-box span{
- vertical-align: middle;
- }
- </style>
|