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

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

parent 51239613
......@@ -78,4 +78,13 @@ export function updateEndtime(data){
method: 'put',
data
})
}
\ No newline at end of file
}
// 更新投放状态
export function updatePutonStatus(data){
return request({
url: '/product/coupon/update/putonStatus',
method: 'put',
data
})
}
......@@ -116,3 +116,12 @@ export function updateOrderInquiry(data) {
data: data
})
}
// 批量加价
export function batchAddPrice(data) {
return request({
url: '/ecw/product-price/batchAddPrice',
method: 'put',
data
})
}
<template>
<div>
<div class="filters mb-10">
<div class="filters mb-10" v-if="showFilter">
{{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" />
......@@ -22,7 +22,7 @@
</template>
</div>
<div class="mb-10 flex-row">
<div class="mb-10 flex-row" v-if="showFilter">
<el-radio-group v-model="checkAll">
<el-radio :label="true">{{$t('全选')}}</el-radio>
<el-radio :label="false">{{$t('全不选')}}</el-radio>
......@@ -88,7 +88,11 @@ export default {
},
option: Object,
// 类型,sea海运,air空运
type: String
type: String,
showFilter:{
type: Boolean,
default: true
}
},
data(){
return {
......
......@@ -90,10 +90,21 @@
<dict-tag :type="DICT_TYPE.ECW_IS_DRAFT" :value="row.status" />
</template>
</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">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row, true)"
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)"
v-hasPermi="['ecw:coupon:update']">{{ $t('编辑') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)"
......@@ -133,11 +144,22 @@
</template>
<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 {
name: "EcwCouponIndex",
components: {
Template
},
data() {
return {
......@@ -292,6 +314,16 @@ export default {
this.$message.success(this.$t('操作成功'))
})
},
// 投放,取消投放就
setPutonStatus(row, status){
updatePutonStatus({
couponId: row.couponId,
putonStatus: status
}).then(res => {
this.$message.success(this.$t('操作成功'))
this.getList()
})
},
/** 导出按钮操作 */
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