|
@@ -7,8 +7,6 @@
|
|
|
<link th:href="@{/css/base/center.css(v=${version})}" rel="stylesheet" type="text/css">
|
|
|
<link th:href="@{/css/supplier-center/shop/freight.css(v=${version})}" rel="stylesheet" type="text/css">
|
|
|
<!--element ui 样式表-->
|
|
|
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"/>
|
|
|
- <link rel="stylesheet" href="/lib/element-ui/element-ui-min.css"/>
|
|
|
<template th:replace="components/analysis"></template>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -37,13 +35,13 @@
|
|
|
<div class="freight-list-title">
|
|
|
<div class="list-name">{{ freight.name }}</div>
|
|
|
<div class="list-right">
|
|
|
- <span class="none">最后编辑时间:{{ freight.endTime }}</span>
|
|
|
+ <span class="none">最后编辑时间:{{ freight.addTime }}</span>
|
|
|
<span class="copy"><a href="JavaScript:void(0);" @click="handleCopy(freight)">复制模板</a> |</span>
|
|
|
<span><a href="JavaScript:void(0);" @click="handleEdit(freight)">修改</a> | </span>
|
|
|
<span><a href="JavaScript:void(0);" @click="handleDele(freight)">删除</a></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table :data="freight.list"
|
|
|
+ <el-table :data="freight.freightRuleList"
|
|
|
border
|
|
|
:highlight-current-row="false"
|
|
|
:cell-style="tableCellStyle"
|
|
@@ -51,194 +49,35 @@
|
|
|
>
|
|
|
<el-table-column label="配送地区" align="center" prop="areas" >
|
|
|
<template slot-scope="{row}">
|
|
|
- {{ row.areas}}
|
|
|
+ {{ row.areaTax}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="运费" align="center" prop="text" width="350">
|
|
|
<template slot-scope="{row}">
|
|
|
- {{ row.text}}
|
|
|
+ {{ row.ruleTax}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
</div>
|
|
|
- <div class="pagination">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- :small="false"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="listQuery.pageNum"
|
|
|
- :layout="layout"
|
|
|
- :total="total"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="empty" v-else>
|
|
|
<img src="/img/supplier/icon-freight-empty@2x.png">
|
|
|
<div class="msg"><p>暂无任何运费模板</p></div>
|
|
|
</div>
|
|
|
- <!--运费模板弹窗-->
|
|
|
- <el-dialog title="创建运费模板" :visible.sync="dialogFormVisible" :close-on-click-modal="false" :close-on-press-escape="false" width="750px">
|
|
|
- <div class="el-form-content">
|
|
|
- <el-form ref="dataForm" :rules="rules" :model="freightTemp" label-position="right" label-width="0">
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <span style="font-weight: bold;">模板名称:</span>
|
|
|
- </el-row>
|
|
|
- <el-form-item style="margin-left: 0;margin-bottom: 10px;">
|
|
|
- <el-input v-model="freightTemp.name" placeholder="请输入模板名称" maxlength="30"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <span style="font-weight: bold;">设置运费:</span>
|
|
|
- <span style="color: #F94B4B;">(注意:未设置的其他省市默认包邮)</span>
|
|
|
- </el-row>
|
|
|
- <el-form-item style="margin-bottom: 10px;">
|
|
|
- <div class="el-form-list" v-for="(freight,index) in freightTemp.freightRuleList" :key="index">
|
|
|
- <div class="el-form-list-title">
|
|
|
- 运费规则{{index+1}}
|
|
|
- <div class="el-form-close" v-if="index>0" @click="handleDelRole(index)"><i class="el-icon-close"></i></div>
|
|
|
- </div>
|
|
|
- <div class="el-form-list-roles rol3">
|
|
|
- <div class="el-form-role3">
|
|
|
- <template v-if="freight.areaTax">
|
|
|
- <div class="el-form-role3-ns">
|
|
|
- <span style="color: #333333;">{{ freight.areaTax }}</span>
|
|
|
- </div>
|
|
|
- <el-button plain size="mini" @click="changeFreightAreas('edit',freight,index)">修改省市</el-button>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <div class="el-form-role3-ns">
|
|
|
- <span style="color: #9AA5B5;">对应地区</span>
|
|
|
- </div>
|
|
|
- <el-button plain size="mini" @click="sittingFreightAreas('add',freight,index)">选择省市</el-button>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="el-form-list-roles">
|
|
|
- <div class="el-form-role5">
|
|
|
- <template v-if="freight.ruleTax">
|
|
|
- <div class="el-form-role5-ns">
|
|
|
- <span style="color: #333333;">{{ freight.ruleTax }}</span>
|
|
|
- </div>
|
|
|
- <el-button plain size="mini" @click="changeFreightRole(freight,index)">修改规则</el-button>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <div class="el-form-role5-ns">
|
|
|
- <span style="color: #9AA5B5;">对应运费规则</span>
|
|
|
- </div>
|
|
|
- <el-button plain size="mini" @click="sittingFreightRole(freight,index)">设置规则</el-button>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <div class="el-form-add" v-if="freightTemp.freightRuleList.length < 10">
|
|
|
- <el-button type="text" icon="el-icon-circle-plus-outline" @click="handleAddRole" style="padding: 0 0;">添加运费规则</el-button>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="handleCanleFreights">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleConfirmShelf">确定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!--设置省市区弹窗-->
|
|
|
- <el-dialog title="选择省市" :visible.sync="areasFormVisible" :close-on-click-modal="false" :close-on-press-escape="false" width="750px">
|
|
|
- <div class="el-form-content">
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <div class="el-area-wup" v-for="(area,index) in areaData" :key="index">
|
|
|
- <div class="el-area-box">
|
|
|
- <div class="el-area-checkbox">
|
|
|
- <el-checkbox :indeterminate="area.isIndeterminate" v-model="area.checked" :disabled="disabled(area)" @change="handleCheckAllChange(area,$event)"></el-checkbox>
|
|
|
- <div class="el-area-label" :class="disabled(area) ? 'disabled' : ''">{{ area.name }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="el-area-box">
|
|
|
- <div class="el-area-checkbox" v-for="city in area.provinceList" :key="city">
|
|
|
- <el-checkbox :indeterminate="city.isIndeterminate" v-model="city.checked" :disabled="disabled(city)" @change="handleCheckedCitiesChange(city,area,$event)"></el-checkbox>
|
|
|
- <div class="el-area-label" :class="disabled(city) ? 'disabled' : ''" @click="handleUrbanForm(city,area,disabled(city))">
|
|
|
- {{ city.name }}
|
|
|
- ({{ city.checkedCities.length }}/{{ city.cityList.length }})
|
|
|
- <i class="el-icon-arrow-right"></i>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="handleCanleAreas">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleConfirmAreas">确定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!--设置市区弹窗-->
|
|
|
- <el-dialog :title="cityUrbanForm.name" :visible.sync="urbanFormVisible" :close-on-click-modal="false" :close-on-press-escape="false" width="750px" style="margin: 100px auto;">
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <div class="el-area-wup">
|
|
|
- <div class="el-area-box">
|
|
|
- <div class="el-area-checkbox">
|
|
|
- <el-checkbox :indeterminate="cityUrbanForm.isIndeterminate" v-model="cityUrbanForm.checked" :disabled="disabled(cityUrbanForm)" @change="handleUrbanChange">全选</el-checkbox>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="el-area-box">
|
|
|
- <div class="el-area-checkbox" v-for="urban in cityUrbanForm.cityList" :key="urban">
|
|
|
- <el-checkbox :indeterminate="urban.isIndeterminate" v-model="urban.checked" :disabled="disabled(urban)" @change="handleCheckedUrbanChange(urban,$event)">{{ urban.name }}</el-checkbox>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-row>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="urbanFormVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleConfirmUrban">确定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!--运费规则弹窗-->
|
|
|
- <el-dialog title="运费规则" :visible.sync="rulesFormVisible" :close-on-click-modal="false" :close-on-press-escape="false" width="750px" style="margin: 100px auto;">
|
|
|
- <el-form ref="ruleForm" :rules="rules" :model="freightRulesForm" label-position="right" label-width="0">
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <span style="font-weight: bold;">运费方式:</span>
|
|
|
- <span>固定运费</span>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <span style="font-weight: bold;">运费金额:</span>
|
|
|
- </el-row>
|
|
|
- <el-form-item prop="freightAmount" :rules="rules.freightAmount" style="margin-left: 0;">
|
|
|
- <el-input v-model="freightRulesForm.freightAmount">
|
|
|
- <template slot="append">元</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <span>
|
|
|
- <el-checkbox v-model="freightRulesForm.checked" @change="handleFreightFreeType"></el-checkbox>
|
|
|
- 指定条件包邮
|
|
|
- </span>
|
|
|
- </el-row>
|
|
|
- <div class="box-row-col" v-if="freightRulesForm.checked">
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
|
|
|
- <el-radio v-model="freightRulesForm.freeCondition" :label="0">满足件数</el-radio>
|
|
|
- <el-radio v-model="freightRulesForm.freeCondition" :label="1">满足金额</el-radio>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;" v-if="freightRulesForm.freeCondition === 0">
|
|
|
- 满
|
|
|
- <el-input v-model="freightRulesForm.productNum" style="width: 180px">
|
|
|
- <template slot="append">件</template>
|
|
|
- </el-input>
|
|
|
- 可包邮
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;" v-if="freightRulesForm.freeCondition === 1">
|
|
|
- 满
|
|
|
- <el-input v-model="freightRulesForm.allAmount" style="width: 180px">
|
|
|
- <template slot="append">元</template>
|
|
|
- </el-input>
|
|
|
- 可包邮
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="rulesFormVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleConfirmRoles">确定</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <template th:replace="supplier-center/components/freight-dialog"></template>
|
|
|
+ </div>
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ :small="false"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="listQuery.pageNum"
|
|
|
+ :page-size="listQuery.pageSize"
|
|
|
+ :layout="layout"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|