打印工单

This commit is contained in:
xiaofajia 2024-10-30 11:26:49 +08:00
parent fcbc03396b
commit 5071dfff93
5 changed files with 148 additions and 13 deletions

View File

@ -158,3 +158,12 @@ export function addItems(data){
data data
}) })
} }
// 修改工单主表,只是主表
export function updateTicket(data){
return request({
url: preUrl + '/updateTicket',
method: 'post',
data
})
}

View File

@ -206,7 +206,7 @@ export default {
formData: { formData: {
id: null, id: null,
ticketsStatus: null, ticketsStatus: null,
remark: null, billingRemark: null,
payType: null payType: null
}, },
formRules:{ formRules:{
@ -226,7 +226,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
}).then(({value}) => { }).then(({value}) => {
this.formData.id = row.id this.formData.id = row.id
this.formData.remark = value this.formData['remark'] = value
this.formData.ticketsStatus = "03" this.formData.ticketsStatus = "03"
this.doVoid() this.doVoid()
}).catch(() => { }).catch(() => {
@ -260,7 +260,7 @@ export default {
this.formData = { this.formData = {
id: null, id: null,
ticketsStatus: null, ticketsStatus: null,
remark: null, billingRemark: null,
payType: null payType: null
} }
this.formData['id'] = row.id this.formData['id'] = row.id

View File

@ -58,6 +58,48 @@
</template> </template>
{{ parseTime(info.createTime, '{y}-{m}-{d}') }} {{ parseTime(info.createTime, '{y}-{m}-{d}') }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item>
<template slot="label">
已行里程
</template>
{{ info.mileageTraveled }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
三包单位
</template>
{{ info.threePackUnits }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
保险名称
</template>
{{ info.insuranceName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
管理费
</template>
{{ info.managerMoney }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
救援费
</template>
{{ info.rescueMoney }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
三包费
</template>
{{ info.threePackMoney }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
定损费
</template>
{{ info.confirmFaultMoney }}
</el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
预计完工 预计完工

View File

@ -393,10 +393,10 @@ export default {
mileageTraveled: null, mileageTraveled: null,
threePackUnits: null, threePackUnits: null,
insuranceName: null, insuranceName: null,
managerMoney: null, managerMoney: 0,
rescueMoney: null, rescueMoney: 0,
threePackMoney: null, threePackMoney: 0,
confirmFaultMoney: null, confirmFaultMoney: 0,
}, },
selectUser: {}, selectUser: {},
selectCar: {}, selectCar: {},
@ -535,10 +535,10 @@ export default {
mileageTraveled: null, mileageTraveled: null,
threePackUnits: null, threePackUnits: null,
insuranceName: null, insuranceName: null,
managerMoney: null, managerMoney: 0,
rescueMoney: null, rescueMoney: 0,
threePackMoney: null, threePackMoney: 0,
confirmFaultMoney: null, confirmFaultMoney: 0,
} }
this.selectUser = {} this.selectUser = {}
this.selectCar = {} this.selectCar = {}

View File

@ -234,11 +234,63 @@
<el-button @click="addDialog = false"> </el-button> <el-button @click="addDialog = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="信息修改" :visible.sync="infoDialog" width="60%" v-dialogDrag append-to-body ref="infoDialog">
<el-form :model="infoFormData" :inline="true" ref="infoForm" label-width="10rem">
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="已行里程" prop="mileageTraveled">
<el-input v-model="infoFormData.mileageTraveled" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="三包单位" prop="threePackUnits">
<el-input v-model="infoFormData.threePackUnits" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="保险名称" prop="insuranceName">
<el-input v-model="infoFormData.insuranceName" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="管理费" prop="managerMoney">
<el-input v-model="infoFormData.managerMoney" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="救援费" prop="rescueMoney">
<el-input v-model="infoFormData.rescueMoney" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="三包费" prop="threePackMoney">
<el-input v-model="infoFormData.threePackMoney" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="定损费" prop="confirmFaultMoney">
<el-input v-model="infoFormData.confirmFaultMoney" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleUpdate"> </el-button>
<el-button @click="infoDialog = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getTicketsById, updateShow, addItems} from "@/api/repair/tickets/Tickets"; import {getTicketsById, updateShow, addItems, updateTicket} from "@/api/repair/tickets/Tickets";
import {removeItemById} from "@/api/repair/tickets/TicketsItem"; import {removeItemById} from "@/api/repair/tickets/TicketsItem";
import TicketItemShow from "@/views/repair/tickets/Components/TicketItemShow.vue"; import TicketItemShow from "@/views/repair/tickets/Components/TicketItemShow.vue";
import other from "@/views/repair/other/index.vue"; import other from "@/views/repair/other/index.vue";
@ -270,6 +322,17 @@ export default {
projectList: [], projectList: [],
waresList: [], waresList: [],
otherList: [], otherList: [],
infoDialog: false,
infoFormData: {
id: null,
mileageTraveled: null,
threePackUnits: null,
insuranceName: null,
managerMoney: 0,
rescueMoney: 0,
threePackMoney: 0,
confirmFaultMoney: 0,
},
} }
}, },
methods: { methods: {
@ -395,7 +458,28 @@ export default {
this.dialogVisible = false this.dialogVisible = false
}, },
handleEditInfo(){ handleEditInfo(){
// todo this.infoFormData = {
id: this.info.id,
mileageTraveled: this.info.mileageTraveled,
threePackUnits: this.info.threePackUnits,
insuranceName: this.info.insuranceName,
managerMoney: this.info.managerMoney | 0,
rescueMoney: this.info.rescueMoney | 0,
threePackMoney: this.info.threePackMoney | 0,
confirmFaultMoney: this.info.confirmFaultMoney | 0,
}
this.infoDialog = true
},
async handleUpdate(){
try{
this.loadingInstance.$loading({
target: this.$refs.infoDialog.$el
})
await updateTicket(this.infoFormData)
this.infoDialog = false
this.$modal.msgSuccess("修改成功")
await this.open(this.infoFormData.id)
}catch{}
} }
} }
} }