Commit 99e2b8b4 authored by dragondean@qq.com's avatar dragondean@qq.com

优惠投放状态和路线批量加价

parent 51239613
...@@ -79,3 +79,12 @@ export function updateEndtime(data){ ...@@ -79,3 +79,12 @@ export function updateEndtime(data){
data data
}) })
} }
// 更新投放状态
export function updatePutonStatus(data){
return request({
url: '/product/coupon/update/putonStatus',
method: 'put',
data
})
}
...@@ -116,3 +116,12 @@ export function updateOrderInquiry(data) { ...@@ -116,3 +116,12 @@ export function updateOrderInquiry(data) {
data: data data: data
}) })
} }
// 批量加价
export function batchAddPrice(data) {
return request({
url: '/ecw/product-price/batchAddPrice',
method: 'put',
data
})
}
<template> <template>
<div> <div>
<div class="filters mb-10"> <div class="filters mb-10" v-if="showFilter">
{{$t('运输方式')}} {{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" /> <dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" />
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</template> </template>
</div> </div>
<div class="mb-10 flex-row"> <div class="mb-10 flex-row" v-if="showFilter">
<el-radio-group v-model="checkAll"> <el-radio-group v-model="checkAll">
<el-radio :label="true">{{$t('全选')}}</el-radio> <el-radio :label="true">{{$t('全选')}}</el-radio>
<el-radio :label="false">{{$t('全不选')}}</el-radio> <el-radio :label="false">{{$t('全不选')}}</el-radio>
...@@ -88,7 +88,11 @@ export default { ...@@ -88,7 +88,11 @@ export default {
}, },
option: Object, option: Object,
// 类型,sea海运,air空运 // 类型,sea海运,air空运
type: String type: String,
showFilter:{
type: Boolean,
default: true
}
}, },
data(){ data(){
return { return {
......
...@@ -90,10 +90,21 @@ ...@@ -90,10 +90,21 @@
<dict-tag :type="DICT_TYPE.ECW_IS_DRAFT" :value="row.status" /> <dict-tag :type="DICT_TYPE.ECW_IS_DRAFT" :value="row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('投放状态')" align="center" prop="putonStatus" width="180">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_COUPON_PUTON_STATUS" :value="row.putonStatus" />
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row, true)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row, true)"
v-hasPermi="['ecw:coupon:show']">{{ $t('查看') }}</el-button> v-hasPermi="['ecw:coupon:show']">{{ $t('查看') }}</el-button>
<el-button v-if="scope.row.putonStatus == 1" size="mini" type="text" icon="el-icon-edit" @click="setPutonStatus(scope.row, -1)"
v-hasPermi="['ecw:coupon:show']">{{ $t('取消投放') }}</el-button>
<el-button v-else size="mini" type="text" icon="el-icon-edit" @click="setPutonStatus(scope.row, 1)"
v-hasPermi="['ecw:coupon:show']">{{ $t('投放') }}</el-button>
<el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:coupon:update']">{{ $t('编辑') }}</el-button> v-hasPermi="['ecw:coupon:update']">{{ $t('编辑') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)"
...@@ -133,11 +144,22 @@ ...@@ -133,11 +144,22 @@
</template> </template>
<script> <script>
import { createCoupon, updateCoupon, deleteCoupon, getCoupon, getCouponPage, exportCouponExcel, updateEndtime } from "@/api/ecw/coupon"; import {
createCoupon,
updateCoupon,
deleteCoupon,
getCoupon,
getCouponPage,
exportCouponExcel,
updateEndtime,
updatePutonStatus
} from "@/api/ecw/coupon";
import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "EcwCouponIndex", name: "EcwCouponIndex",
components: { components: {
Template
}, },
data() { data() {
return { return {
...@@ -292,6 +314,16 @@ export default { ...@@ -292,6 +314,16 @@ export default {
this.$message.success(this.$t('操作成功')) this.$message.success(this.$t('操作成功'))
}) })
}, },
// 投放,取消投放就
setPutonStatus(row, status){
updatePutonStatus({
couponId: row.couponId,
putonStatus: status
}).then(res => {
this.$message.success(this.$t('操作成功'))
this.getList()
})
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment