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