mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-24 04:18:34 +08:00
# v1.3 更新列表
1. 【新增】砍价
2. 【新增】拼团
3. 【新增】一号通
4. 【修复】商品sku 编辑时出现商品属性对应错误的问题
5. 【修复】商品推广海报生成二维码可能会出错的问题【小程序调试中】
6. 【修复】微信公众号和小程序头像可能获取不到的问题
7. 【修复】下单时可能会出错的问题
8. 【修复】pc管理端用户访问量
9. 【修复】微信退款
10. 【修复】管理端订单状态可能出现不正确的情况
11. 【修复】WEB管理端-菜单色调,短信API更新,首页用户访问量,系统设置tab是自动选择下一及表单
12. 【修复】系统设置出现更新不正确的问题
192 lines
4.8 KiB
Vue
192 lines
4.8 KiB
Vue
<template>
|
|
<div class="divBox">
|
|
<el-card class="box-card">
|
|
<div slot="header" class="clearfix">
|
|
<div class="container">
|
|
<el-form ref="form" inline :model="form">
|
|
<el-form-item label="模板名称:">
|
|
<el-input v-model="form.keywords" placeholder="请输入模板名称" class="selWidth" size="small" clearable>
|
|
<el-button slot="append" icon="el-icon-search" @click="handleSearch" />
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
<el-button type="primary" size="mini" @click="handleSubmit()">添加运费模板</el-button>
|
|
</div>
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="tableData.list"
|
|
style="width: 100%"
|
|
size="mini"
|
|
>
|
|
<el-table-column
|
|
prop="id"
|
|
label="ID"
|
|
min-width="60"
|
|
/>
|
|
<el-table-column
|
|
label="模板名称"
|
|
min-width="180"
|
|
prop="name"
|
|
/>
|
|
<el-table-column
|
|
min-width="100"
|
|
label="计费方式"
|
|
prop="type"
|
|
>
|
|
<template slot-scope="{row}">
|
|
<p>{{ row.type | typeFilter }}</p>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
min-width="100"
|
|
label="指定包邮"
|
|
prop="appoint"
|
|
>
|
|
<template slot-scope="{row}">
|
|
<p>{{ row.appoint | statusFilter }}</p>
|
|
</template>
|
|
</el-table-column>
|
|
<!--<el-table-column-->
|
|
<!--min-width="120"-->
|
|
<!--label="指定区域不配送"-->
|
|
<!--prop="type"-->
|
|
<!--/>-->
|
|
<el-table-column
|
|
label="排序"
|
|
min-width="100"
|
|
prop="sort"
|
|
/>
|
|
<el-table-column
|
|
label="添加时间"
|
|
min-width="150"
|
|
prop="createTime"
|
|
/>
|
|
<el-table-column
|
|
prop="address"
|
|
fixed="right"
|
|
width="120"
|
|
label="操作"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-button type="text" size="small" @click="bindEdit(scope.row)">修改</el-button>
|
|
<el-button type="text" size="small" @click="bindDelete(scope.row)">删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<div class="block-pagination">
|
|
<el-pagination
|
|
:page-sizes="[20, 40, 60, 80]"
|
|
:page-size="tableData.limit"
|
|
:current-page="tableData.page"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:total="tableData.total"
|
|
@current-change="pageChange"
|
|
@size-change="handleSizeChange"
|
|
/>
|
|
</div>
|
|
</el-card>
|
|
<CreatTemplates ref="addTemplates" @getList="getList" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import CreatTemplates from './creatTemplates'
|
|
import * as logistics from '@/api/logistics.js'
|
|
export default {
|
|
name: 'ShippingTemplates',
|
|
filters: {
|
|
statusFilter(status) {
|
|
const statusMap = {
|
|
true: '开启',
|
|
false: '关闭'
|
|
}
|
|
return statusMap[status]
|
|
},
|
|
typeFilter(status) {
|
|
const statusMap = {
|
|
1: '按件数',
|
|
2: '按重量',
|
|
3: '按体积'
|
|
}
|
|
return statusMap[status]
|
|
}
|
|
},
|
|
components: { CreatTemplates },
|
|
data() {
|
|
return {
|
|
dialogVisible: false,
|
|
form: {
|
|
keywords: ''
|
|
},
|
|
tableData: '',
|
|
page: 1,
|
|
limit: 20,
|
|
loading: false
|
|
}
|
|
},
|
|
created() {
|
|
this.getDataList()
|
|
},
|
|
methods: {
|
|
// 添加
|
|
handleSubmit() {
|
|
this.$refs.addTemplates.dialogVisible = true
|
|
this.$refs.addTemplates.getCityList()
|
|
this.$refs.addTemplates.changType(0, this.te)
|
|
},
|
|
handleSearch() {
|
|
this.page = 1
|
|
this.getDataList()
|
|
},
|
|
// 分页
|
|
pageChange(e) {
|
|
this.page = e
|
|
this.getDataList()
|
|
},
|
|
handleSizeChange(e) {
|
|
this.limit = e
|
|
this.getDataList()
|
|
},
|
|
// 数据列表
|
|
getDataList() {
|
|
this.loading = true
|
|
logistics.shippingTemplatesList({
|
|
keywords: this.form.keywords,
|
|
page: this.page,
|
|
limit: this.limit
|
|
}).then(res => {
|
|
this.loading = false
|
|
this.tableData = res
|
|
})
|
|
},
|
|
// 编辑
|
|
bindEdit(item) {
|
|
// this.$refs.addTemplates.dialogVisible = true
|
|
this.$refs.addTemplates.getCityList()
|
|
this.$refs.addTemplates.getInfo(item.id, item.appoint)
|
|
this.$refs.addTemplates.changType(1)
|
|
},
|
|
// 删除
|
|
bindDelete(item) {
|
|
this.$modalSure().then(() => {
|
|
logistics.shippingDetete({ id: item.id }).then(res => {
|
|
this.$message.success('删除成功')
|
|
this.getDataList()
|
|
})
|
|
})
|
|
// logistics.shippingDetete()
|
|
},
|
|
getList() {
|
|
this.getDataList()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.selWidth{
|
|
width: 350px;
|
|
}
|
|
</style>
|