9.4
This commit is contained in:
parent
ab4488c16f
commit
6f65725ca1
@ -15,6 +15,15 @@ export function getID(id) {
|
||||
|
||||
})
|
||||
}
|
||||
//修改
|
||||
export function updateActivePrice(data) {
|
||||
return request({
|
||||
url: '/business/activePrice/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
// 查询oil油号列表
|
||||
export function getoilList(query) {
|
||||
return request({
|
||||
@ -31,3 +40,11 @@ export function postaddList(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除分时优惠
|
||||
export function deleteList(id) {
|
||||
return request({
|
||||
url: '/business/activePrice/del/'+id,
|
||||
method: 'delete',
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -68,7 +68,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="createBy"
|
||||
prop="createName"
|
||||
label="创建人"
|
||||
>
|
||||
</el-table-column>
|
||||
@ -407,7 +407,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getoilList, getRequestList, postaddList, getID} from "./api/separate";
|
||||
import {getoilList, getRequestList, postaddList, getID,updateActivePrice} from "./api/separate";
|
||||
import {oilNumberList1} from "@/api/order/oilnumgun";
|
||||
|
||||
export default {
|
||||
@ -450,6 +450,19 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 分时优惠制空
|
||||
Blank(){
|
||||
this.ruleForm ={
|
||||
activeType: 1,
|
||||
title: '',
|
||||
name: '',
|
||||
region: '',
|
||||
category: '',
|
||||
disValue: '',
|
||||
type: [],
|
||||
oilList: []
|
||||
}
|
||||
},
|
||||
// 修改
|
||||
modifySeparateList(id) {
|
||||
getID(id).then(res => {
|
||||
@ -460,19 +473,35 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
// 新增/修改
|
||||
addSeparateList() {
|
||||
|
||||
this.centerDialogVisible = false
|
||||
postaddList(this.ruleForm).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
if(this.ruleForm.id){
|
||||
updateActivePrice(this.ruleForm).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}else{
|
||||
postaddList(this.ruleForm).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
//列表查询
|
||||
getList() {
|
||||
@ -483,6 +512,7 @@ export default {
|
||||
},
|
||||
// 新增分时
|
||||
Timeshare() {
|
||||
this.Blank()
|
||||
oilNumberList1().then(res => {
|
||||
this.ruleForm.oilList = res.data.records
|
||||
for (let i = 0; i < this.ruleForm.oilList.length; i++) {
|
||||
|
@ -100,8 +100,8 @@ public class ActivePriceController extends BaseController {
|
||||
* @author PQZ
|
||||
* @date 11:30 2024/9/2
|
||||
**/
|
||||
@DeleteMapping("del")
|
||||
public ResponseObject del(@RequestParam("id") Integer id) {
|
||||
@DeleteMapping("del/{id}")
|
||||
public ResponseObject del(@PathVariable Integer id) {
|
||||
activePriceService.removeByActId(id);
|
||||
return getSuccessResult("删除成功", null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user