公司模块second

master
niuniuniu 2023-12-05 20:07:30 +08:00
parent f21fa23252
commit 2544a33651
2 changed files with 19 additions and 35 deletions

View File

@ -2,47 +2,33 @@ import request from '@/utils/request'
export function getFirmList(form) {
return request({
url: '/firm/company/firm/firmInfoList',
url: '/company/company/firm/firmInfoList',
method: 'post',
data:form
})
}
export function delCar(firmId) {
export function delFirm(firmId) {
return request({
url: '/firm?firmId='+firmId,
url: '/company/company/firm?firmId='+firmId,
method: 'post'
})
}
export function updateCar(carForm) {
export function updateFirm(firmForm) {
return request({
url: '/history/car/updateCar',
url: '/company/company/firm/update',
method: 'post',
data:carForm
data:firmForm
})
}
export function insertCar(carInsert) {
export function insertFirm(firmInsert) {
return request({
url: '/history/car/insertCar',
url: '/company/company/firm/',
method: 'post',
data:carInsert
data:firmInsert
})
}
export function getList() {
return request({
url: '/history/listHistoricalTrack',
method: 'get'
})
}
export function deleteRecord(recordId) {
return request({
url: '/history/delHistoricalTrack?recordId='+recordId,
method: 'post',
data:recordId
})
}

View File

@ -133,7 +133,7 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary" @click="updateFirmList(scope.row)"></el-button>
<el-button type="primary" @click="delCar(scope.row.carVin)"></el-button>
<el-button type="primary" @click="delfirm(scope.row.firmId)"></el-button>
</template>
</el-table-column>
</el-table>
@ -205,7 +205,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="updateCar"></el-button>
<el-button type="primary" @click="updatefirm"></el-button>
</span>
</el-dialog>
<el-button type="primary" @click="tapInsert"></el-button>
@ -279,7 +279,7 @@
</template>
<script>
import {getFirmList} from "@/api/firmtable";
import { delFirm, getFirmList, insertFirm, updateFirm } from '@/api/firmtable'
export default {
data() {
return {
@ -386,28 +386,26 @@ export default {
this.form.pageNum=val
this.getList()
},
/*车辆列表*/
/*企业列表*/
getList(){
getFirmList(this.form).then(response => {
console.log(response)
this.firmList = response.data.list
this.total = response.data.total
}).catch(err=>{
this.$message.error(err.message)
console.log(err);
this.rows=response.data.rows
})
},
delCar(carVin){
this.carVin = carVin
delCar(this.carVin).then(res=>{
delfirm(firmId){
this.firmId = firmId
delFirm(this.firmId).then(res=>{
if(res.code === 200){
this.$message.success("删除成功!")
location.reload()
}
})
},
updateCar(){
updateCar(this.carForm).then(res=>{
updatefirm(){
updateFirm(this.firmForm).then(res=>{
if(res.code === 200){
this.$message.success("修改成功!")
location.reload()