Compare commits

...

18 Commits
dev ... master

Author SHA1 Message Date
xiaofajia
34e37194a6 仓库可以输入配件规格 2024-11-07 11:57:15 +08:00
xiaofajia
77462a2267 补正 2024-11-07 11:09:55 +08:00
xiaofajia
5574d972c3 根据预约记录修改业务类型 2024-11-06 12:03:37 +08:00
xiaofajia
cd7cc4ebc5 修改接车图片不必传 2024-11-06 09:33:02 +08:00
xiaofajia
496a527ec1 维修进度图例 2024-11-05 18:08:51 +08:00
xiaofajia
320b51067d 新增维修进度查看 2024-11-05 17:10:50 +08:00
xiaofajia
04881395b4 修改按钮权限和展示 2024-11-05 16:37:37 +08:00
xiaofajia
091f3f7665 修改按钮权限和展示 2024-11-05 14:58:55 +08:00
xiaofajia
3115710fcb 修改重新派工逻辑 2024-11-05 11:18:36 +08:00
xiaofajia
500b41f844 已行里程to表显里程,维修记录加岗位+姓名 2024-11-04 17:29:47 +08:00
xiaofajia
c50da665e9 去掉维修工的配件型号 2024-11-04 17:01:26 +08:00
xiaofajia
233e58ed2f 计算并显示合计金额 2024-11-04 16:40:55 +08:00
xiaofajia
1bbc06f822 修改结算按钮的显示控制 2024-11-04 16:20:26 +08:00
xiaofajia
e00de3a897 服务顾问选择短信或是直接拨打电话 2024-11-04 16:08:13 +08:00
xiaofajia
916bb23ff2 修改员工领料、退料 2024-11-04 15:26:12 +08:00
xiaofajia
8cc46e3a28 接单上传图片 2024-11-04 15:04:44 +08:00
xiaofajia
b1e6a559b9 接车上传图片 2024-11-04 14:31:55 +08:00
xiaofajia
e26e530757 维修工单删除和作废 2024-11-04 11:24:19 +08:00
19 changed files with 527 additions and 181 deletions

View File

@ -38,17 +38,17 @@ export function getRepairSoById(id){
}
// 员工确认领料
export function confirmGet(id){
export function confirmGet(id, image){
return request({
url: preUrl + "/confirmGet?id=" + id,
url: preUrl + "/confirmGet?id=" + id + "&image=" + image,
method: 'get'
})
}
// 员工确认退料
export function confirmBack(id){
export function confirmBack(id, image){
return request({
url: preUrl + "/confirmBack?id=" + id,
url: preUrl + "/confirmBack?id=" + id + "&image=" + image,
method: 'get'
})
}

View File

@ -82,9 +82,9 @@ export function getUserRole(){
}
// 接单
export function updateTake(id){
export function updateTake(id, image){
return request({
url: preUrl + "/take?id=" + id,
url: preUrl + "/take?id=" + id + "&image=" + image,
method: "get",
})
}

View File

@ -43,3 +43,11 @@ export function removeItemById(id){
method: 'delete'
})
}
// 查某工单维修项目进度
export function getProjList(ticketId){
return request({
url: preUrl + "/getProjList?ticketId=" + ticketId,
method: 'get'
})
}

View File

@ -107,7 +107,13 @@
</template>
</el-table-column>
<el-table-column label="商品名称" align="center" prop="name" width="200"/>
<el-table-column label="规格" align="center" width="180" prop="model"/>
<el-table-column label="规格" align="center" width="180" prop="model">
<div class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.model"
placeholder="请输入规格"></el-input>
<span class="item__txt">{{ scope.row.model }}</span>
</div>
</el-table-column>
<el-table-column label="商品编码" align="center" width="180" prop="code">
<div class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.code"
@ -211,7 +217,7 @@ export default {
// cell
clickCellMap: {},
//
editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount'],
editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount', 'model'],
remark: null,
tableKey: 0,
}

View File

@ -91,9 +91,13 @@
</div>
</el-table-column>
<el-table-column v-if="!exportColumn.includes('itemStatus')" align="center" label="状态" width="180" prop="itemStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.REPAIR_ITEM_STATUS" v-model="scope.row.itemStatus"/>
</template>
<div v-if="scope.row.id" class="item" slot-scope="scope">
<el-select v-model="scope.row.itemStatus" class="item__input" @blur="save(scope.row)">
<el-option v-for="item in getDict(DICT_TYPE.REPAIR_ITEM_STATUS)" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
<dict-tag class="item__txt" :type="DICT_TYPE.REPAIR_ITEM_STATUS" v-model="scope.row.itemStatus"/>
</div>
</el-table-column>
<el-table-column align="center" label="备注" width="180" prop="remark">
<div v-if="scope.row.id" class="item" slot-scope="scope">
@ -180,7 +184,7 @@ export default {
}
}],
//
editProp: ["goods", 'count', 'price', 'discount', 'repair', 'sale', 'remark', 'type', 'accountType', 'coupon'],
editProp: ["itemStatus", "goods", 'count', 'price', 'discount', 'repair', 'sale', 'remark', 'type', 'accountType', 'coupon'],
// cell
clickCellMap: {},
selectRepair: {},

View File

@ -1,6 +1,8 @@
<template>
<div>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"
:summary-method="getSummaries"
show-summary
>
<el-table-column label="序号" align="center">
<template scope="scope">
@ -22,12 +24,12 @@
{{ scope.row[listType]?.code }}
</template>
</el-table-column>
<el-table-column align="center" label="数量" width="180" prop="itemCount"/>
<el-table-column align="center" label="单位" width="180" prop="unit">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.REPAIR_UNIT" v-model="scope.row[listType].unit"/>
</template>
</el-table-column>
<el-table-column align="center" label="数量" width="180" prop="itemCount"/>
<el-table-column align="center" label="单价" width="180" prop="itemPrice"/>
<el-table-column align="center" label="折扣" width="180" prop="itemDiscount">
<template slot-scope="scope">
@ -88,6 +90,16 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-col :span="12">
<el-form-item label="状态" prop="itemStatus">
<el-select v-model="item.itemStatus">
<el-option v-for="x in getDictDatas(DICT_TYPE.REPAIR_ITEM_STATUS)" :key="x.value" :label="x.label"
:value="x.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button>
@ -131,7 +143,9 @@ export default {
itemCount: [{required: true, message: '数量不能为空', trigger: 'blur'}],
itemDiscount: [{required: true, message: "折扣不能为空", trigger: 'blur'}]
},
formLoading: false
formLoading: false,
//
includeColumn: ['itemMoney', 'itemCount']
}
},
computed: {
@ -167,6 +181,29 @@ export default {
this.$modal.msgSuccess("修改成功")
this.$emit('success', this.item.ticketId)
}catch{}
},
getSummaries(param){
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (this.includeColumn.includes(column.property)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index];
}
});
return sums;
}
}
}

View File

@ -41,72 +41,64 @@
<el-table-column label="手机号" align="center" prop="userMobile" width="180"/>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<!-- 都有 -->
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看
</el-button>
<el-button v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">
编辑工单
</el-button>
<el-button v-hasPermi="['repair:tkm:remove']" size="mini" type="text" icon="el-icon-remove" @click="handleRemove(scope.row)">
删除
</el-button>
<el-button v-if="userRole === 'service_advisor' && isFinish" size="mini" type="text" icon="el-icon-refresh" @click="handleEditRecord(scope.row)">
维修记录设置
</el-button>
<!-- 维修工才有 -->
<el-button
v-if="(scope.row.ticketsWorkStatus === '01' && userRole === 'repair_staff') && nowUser.id === scope.row.nowRepairId"
size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)">
接单
</el-button>
<el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini" type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
<!-- 服务顾问才有 -->
<el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini"
type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
通知施工
</el-button>
<el-button size="mini"
v-if="scope.row.ticketsWorkStatus !== '01' &&userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'kssg')">
开始施工
</el-button>
<el-button size="mini"
v-if=" scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgz')">
过程记录
</el-button>
<el-button size="mini"
v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
施工完成
</el-button>
<!-- <el-button @click="handleRecord(scope.row, 'zj')" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'general_inspection' && scope.row.ticketsWorkStatus === '05'">-->
<!-- 终检-->
<!-- </el-button>-->
<el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
v-if="(userRole === 'repair_staff' ? (leader ? !isFinish : false) : false) && !(scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish)">
重新指派
</el-button>
<el-button v-if="userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus === '01' && !(nowUser.id === scope.row.nowRepairId)" @click="handleGet(scope.row)" size="mini" type="text" icon="el-icon-document-add">
申请配件
<!-- 服务顾问总检班组长才有 -->
<el-button v-if="(userRole !== 'repair_staff' && scope.row.ticketsWorkStatus !== '01') || (userRole === 'repair_staff' && leader && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '04')" @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
>{{ userRole === 'general_inspection' ? "内返派工" : "修改派工" }}
</el-button>
<el-dropdown
v-if="(scope.row.ticketsWorkStatus !== '01' && ((userRole === 'service_advisor' || userRole === 'general_inspection') && !isFinish)) || (userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01')"
@command="(command) => handleCommand(command, scope.$index, scope.row)">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'" command="handleGet" size="mini" type="text" icon="el-icon-document-add"
>申请配件
<!-- 权限控制 -->
<el-dropdown-item command="handleRemove" size="mini" type="text" icon="el-icon-remove" v-hasPermi="['repair:tkm:remove']">
删除
</el-dropdown-item>
<!-- <el-dropdown-item v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'" command="handleBack" size="mini" type="text" icon="el-icon-document-delete"-->
<!-- >申请退料-->
<!-- </el-dropdown-item>-->
<!-- 还要判断是不是员工 -->
<el-dropdown-item
v-if="userRole !== 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01'"
command="handleReTake" size="mini" type="text" icon="el-icon-refresh"
>重新指派
<!-- 权限控制 -->
<el-dropdown-item command="handleVoid" v-hasPermi="['repair:tkm:void']" size="mini" type="text" icon="el-icon-delete">
作废
</el-dropdown-item>
<el-dropdown-item
v-if="userRole === 'service_advisor' && !isFinish && scope.row.ticketsWorkStatus !== '01'"
command="handleEditRecord" size="mini" type="text" icon="el-icon-refresh"
>维修记录设置
<!-- 权限控制 -->
<el-dropdown-item command="handleEditTicket" v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting">
编辑工单
</el-dropdown-item>
<!-- 权限控制 -->
<el-dropdown-item command="handleEditRecord" size="mini" type="text" icon="el-icon-refresh" v-hasPermi="['repair:tkm:editRecord']">
维修记录设置
</el-dropdown-item>
<!-- 权限控制 -->
<el-dropdown-item command="handleProgress" size="mini" type="text" icon="el-icon-s-operation" v-hasPermi="['repair:tkm:progress']">
维修项目进度
</el-dropdown-item>
<!-- 维修工才有 -->
<el-dropdown-item command="handleGet" size="mini" type="text" icon="el-icon-document-add" v-if="userRole === 'repair_staff'">
申请配件
</el-dropdown-item>
<!-- 维修工才有 -->
<el-dropdown-item command="handleRecordOne" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '01'">
开始施工
</el-dropdown-item>
<!-- 维修工才有 -->
<el-dropdown-item command="handleRecordTwo" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '01'">
过程记录
</el-dropdown-item>
<!-- 维修工才有 -->
<el-dropdown-item command="handleRecordThree" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '01'">
施工完成
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -118,7 +110,7 @@
@pagination="listTickets"
/>
<TicketsShow ref="ticketsShow" :user-role="userRole"/>
<UpdateRepair ref="updateRepair" @success="listTickets"/>
<UpdateRepair :user-role="userRole" ref="updateRepair" @success="listTickets"/>
<TWOperate ref="twOperate" @success="listTickets"/>
<UpdateRecord ref="updateRecord" @success="listTickets"/>
@ -158,11 +150,33 @@
<RecordSetting ref="recordSet"/>
<EditTickets ref="editTickets" @success="listTickets"/>
<el-dialog title="诊断维修单和车辆维修前照片" :visible.sync="beginDialog" width="60%" v-dialogDrag append-to-body>
<el-form v-model="beginData" :inline="true" label-width="15rem">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="附件" prop="image">
<ImageUpload v-model="beginData.image"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doTake">
确定
</el-button>
<el-button @click="beginDialog = false">
取消
</el-button>
</div>
</el-dialog>
<TicketProgress ref="ticketProgress" />
</div>
</template>
<script>
import {getPageType, updateTake, getTicketsById, removeTicketById} from "@/api/repair/tickets/Tickets";
import {getPageType, updateTake, getTicketsById, removeTicketById, setTicketsVoid} from "@/api/repair/tickets/Tickets";
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue";
import TWOperate from "@/views/repair/tickets/form/TWOperate.vue";
@ -173,14 +187,12 @@ import UpdateRecord from "@/views/repair/tickets/form/UpdateRecord.vue";
import {getUserProfile} from "@/api/system/user";
import RecordSetting from "@/views/repair/tickets/form/RecordSetting.vue";
import EditTickets from "@/views/repair/tickets/form/EditTickets.vue";
import TicketProgress from "@/views/repair/tickets/Components/TicketProgress.vue";
export default {
name: "TicketManagerItem",
components: {EditTickets, RecordSetting, UpdateRecord, TWOperate, UpdateRepair, TicketsShow},
components: {TicketProgress, EditTickets, RecordSetting, UpdateRecord, TWOperate, UpdateRepair, TicketsShow},
props: {
isFinish: {
type: Boolean,
},
userRole: {
type: String,
default: '',
@ -197,7 +209,7 @@ export default {
pageSize: 10,
ticketNo: null,
searchTimeArray: [],
isFinish: this.isFinish ? "1" : "0",
selectType: this.isType
},
showSearch: true,
loading: false,
@ -215,6 +227,11 @@ export default {
remark: null,
leader: false,
nowUser: null,
beginDialog: false,
beginData: {
id: null,
image: null,
},
}
},
mounted() {
@ -267,11 +284,29 @@ export default {
},
//
async handleTake(row) {
this.beginData.id = row.id
this.beginDialog = true
},
async doTake(){
try {
if (!this.beginData.image){
this.$modal.msgError("附件不能为空")
return
}
this.loading = true
await this.$modal.confirm("确认接单吗?")
await updateTake(row.id)
if (this.beginData.image){
const data = this.beginData.image.split(",")
this.beginData.image = data.map(item => {
return item.replace(process.env.VUE_APP_FILE_API, "")
}).join(",")
}
await updateTake(this.beginData.id, this.beginData.image)
this.beginDialog = false
this.$modal.msgSuccess("接单成功")
this.beginData = {
id: null,
image: null
}
await this.listTickets()
} finally {
this.loading = false
@ -307,17 +342,32 @@ export default {
//
handleCommand(command, index, row) {
switch (command) {
case 'handleReTake':
this.handleReTake(row)
case 'handleRemove':
this.handleRemove(row)
break
case 'handleVoid':
this.handleVoid(row)
break
case 'handleEditTicket':
this.handleEditTicket(row)
break
case 'handleEditRecord':
this.handleEditRecord(row)
break
case 'handleGet':
this.handleGet(row)
break
case 'handleBack':
this.handleBack(row)
case 'handleRecordOne':
this.handleRecord(row, 'kssg')
break
case 'handleEditRecord':
this.handleEditRecord(row)
case 'handleRecordTwo':
this.handleRecord(row, 'sgz')
break
case 'handleRecordThree':
this.handleRecord(row, 'sgwczj')
break
case 'handleProgress':
this.handleProgress(row)
break
default:
break
@ -421,7 +471,33 @@ export default {
await this.listTickets()
this.$modal.msgSuccess("删除成功")
}
}catch{}
} catch {
}
},
async handleVoid(row) {
this.$prompt('作废备注', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({value}) => {
const data = {
id: row.id,
remark: value,
ticketsStatus: "03"
}
this.doVoid(data)
}).catch(() => {
})
},
async doVoid(data) {
try {
await setTicketsVoid(data)
this.$modal.msgSuccess("作废成功")
await this.listTickets()
} catch {
}
},
handleProgress(row){
this.$refs.ticketProgress.open(row.id)
}
}
}

View File

@ -0,0 +1,102 @@
<template>
<div>
<el-dialog title="维修项目进度" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
<el-row :gutter="1">
<el-col :span="24">
<div style="display: flex;justify-content: center;margin-bottom: 1rem;">
<span style="margin: 0 1rem 0 1rem; display: inline-flex; align-items: center;">
<span style="font-size: 20px">- </span>
<span>待维修</span>
</span>
<span style="color: #ffd51c; display: inline-flex; align-items: center;">
<span style="font-size: 20px; margin-bottom: -10px;">° </span>
<span>维修中</span>
</span>
<span style="color: #3aff70;margin: 0 1rem 0 1rem;display: inline-flex; align-items: center;">
<span style="font-size: 20px"></span>
<span>已完成</span>
</span>
</div>
</el-col>
</el-row>
<el-table :data="list" v-loading="tableLoading" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" align="center">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="维修项目" align="center" prop="itemName"/>
<el-table-column label="维修状态" align="center">
<el-table-column label="待维修" align="center">
<template slot-scope="scope">
<span
style="font-size: 20px">{{
scope.row.itemStatus === "01" ? getStatus(scope.row.itemStatus) : ""
}}</span>
</template>
</el-table-column>
<el-table-column label="维修中" align="center">
<template slot-scope="scope">
<span
style="font-size: 20px;color: #ffd51c;">{{
scope.row.itemStatus === "02" ? getStatus(scope.row.itemStatus) : ""
}}</span>
</template>
</el-table-column>
<el-table-column label="已完成" align="center">
<template slot-scope="scope">
<span
style="font-size: 20px;color: #3aff70">{{
scope.row.itemStatus === "03" ? getStatus(scope.row.itemStatus) : ""
}}</span>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import {getProjectList} from "@/api/repair/tickets/TicketsItem";
import ScrollPane from "@/layout/components/TagsView/ScrollPane.vue";
export default {
name: "TicketProgress",
components: {ScrollPane},
data() {
return {
dialogVisible: false,
list: [],
tableLoading: false
}
},
methods: {
async open(id) {
try {
this.dialogVisible = true
this.tableLoading = true
const res = await getProjectList(id)
this.list = res.data
} finally {
this.tableLoading = false
}
},
getStatus(data) {
switch (data) {
case '01':
return '-'
case '02':
return '°'
case '03':
return '√'
}
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -104,15 +104,15 @@
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看
</el-button>
<el-button v-if="scope.row.isFinish === '1'" v-hasPermi="['repair:tk:paid']" size="mini" type="text" icon="el-icon-finished"
@click="handlePaid(scope.row)"
<el-button v-hasPermi="['repair:tk:paid']" size="mini" type="text" icon="el-icon-finished"
@click="handlePaid(scope.row)" v-if="TicketType === 'tu'"
>结算
</el-button>
<!-- <el-button v-if="TicketType === 'tp'" size="mini" type="text" icon="el-icon-refresh-right"-->
<!-- >返结-->
<!-- </el-button>-->
<el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-delete"
@click="handleVoid(scope.row)"
@click="handleVoid(scope.row)" v-hasPermi="['repair:tk:void']"
>作废
</el-button>
<el-button size="mini" type="text" icon="el-icon-printer"

View File

@ -60,7 +60,7 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
已行里程
表显里程
</template>
{{ info.mileageTraveled }}
</el-descriptions-item>

View File

@ -84,7 +84,7 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
已行里程
表显里程
</template>
<el-input v-model="formData.mileageTraveled" />
</el-descriptions-item>
@ -128,7 +128,7 @@
<template slot="label">
预约订单选择
</template>
<el-select v-model="formData.bookingId" size="small">
<el-select v-model="formData.bookingId" size="small" @change="updateBooking">
<el-option v-for="item in bookingList" :key="item.id" :value="item.id"
:label="item.bookingTime"/>
</el-select>
@ -139,6 +139,12 @@
</template>
<StaffChoose v-model="selectStaff" :is-get="'true'"/>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
接车图片
</template>
<ImageUpload v-model="formData.image" />
</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
@ -397,6 +403,7 @@ export default {
rescueMoney: 0,
threePackMoney: 0,
confirmFaultMoney: 0,
image: null
},
selectUser: {},
selectCar: {},
@ -485,6 +492,12 @@ export default {
if (count > 0){
return
}
if (this.formData.image){
const data = this.formData.image.split(",")
this.formData.image = data.map(item => {
return item.replace(process.env.VUE_APP_FILE_API, "")
}).join(",")
}
await createTickets(this.formData)
this.$modal.msgSuccess("新增成功")
this.init()
@ -539,6 +552,7 @@ export default {
rescueMoney: 0,
threePackMoney: 0,
confirmFaultMoney: 0,
image: null
}
this.selectUser = {}
this.selectCar = {}
@ -737,11 +751,17 @@ export default {
...carRes.data,
brandAndModel: car.data.carInfo.brandAndModel
}
}
},
// //
// handleSelectionChange(val){
//
// }
updateBooking(){
const data = this.bookingList.filter(item => item.id === this.formData.bookingId)
if (data && data.length > 0){
this.formData.repairType = data[0].repairType
}
},
}
}
</script>

View File

@ -1,11 +1,14 @@
<template>
<div class="app-container">
<el-tabs v-model="activeTab">
<el-tab-pane label="待完成工单" name="unFinish">
<TicketManagerItem :is-finish="false" :user-role="userRole"/>
<el-tab-pane label="全部工单" name="finish">
<TicketManagerItem :is-type="'all'" :user-role="userRole"/>
</el-tab-pane>
<el-tab-pane label="已完成工单" name="finish">
<TicketManagerItem :is-finish="true" :user-role="userRole"/>
<el-tab-pane label="待处理工单" name="unFinish" v-if="userRole === 'repair_staff'">
<TicketManagerItem :is-type="'waiting'" :user-role="userRole"/>
</el-tab-pane>
<el-tab-pane label="待处理工单" name="unInspection" v-if="userRole !== 'repair_staff'">
<TicketFinishManager :user-role="userRole" />
</el-tab-pane>
<el-tab-pane label="配件申请单" name="getApply" v-if="userRole !== 'repair_staff'">
<TicketWares :type="true" :user-role="userRole"/>
@ -16,12 +19,6 @@
<el-tab-pane label="退料确认" name="finishBackWares" v-if="userRole === 'repair_staff'">
<GetAndBackWares :type="false" />
</el-tab-pane>
<el-tab-pane :label="userRole === 'service_advisor' ? '可交车工单' : '待总检工单'" name="unInspection" v-if="userRole !== 'repair_staff'">
<TicketFinishManager :user-role="userRole" />
</el-tab-pane>
<!-- <el-tab-pane label="退料申请单" name="backApply">-->
<!-- <TicketWares :type="false" :user-role="userRole"/>-->
<!-- </el-tab-pane>-->
</el-tabs>
</div>
</template>
@ -38,7 +35,7 @@ export default {
components: {TicketFinishManager, GetAndBackWares, TicketWares, TicketManagerItem},
data() {
return {
activeTab: 'unFinish',
activeTab: 'finish',
userRole: "",
exportRole:[3, 4]
}

View File

@ -59,7 +59,7 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
已行里程
表显里程
</template>
{{ info.mileageTraveled }}
</el-descriptions-item>
@ -239,7 +239,7 @@
<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-form-item label="表显里程" prop="mileageTraveled">
<el-input v-model="infoFormData.mileageTraveled" />
</el-form-item>
</el-col>

View File

@ -49,6 +49,15 @@
<el-table-column label="规格" align="center" prop="repairWares.model" />
<el-table-column label="数量" align="center" prop="goodsCount" />
</el-table>
<el-form style="margin-top: 1rem" :inline="true">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="图片" prop="image">
<ImageUpload v-model="image" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleConfirm">
确认
@ -88,7 +97,8 @@ export default {
dialogVisible: false,
items: [],
dialogLoading: false,
formData:{}
formData:{},
image: null
}
},
mounted() {
@ -131,15 +141,21 @@ export default {
}
},
async handleConfirm(){
if (this.image){
const data = this.image.split(",")
this.image = data.map(item => {
return item.replace(process.env.VUE_APP_FILE_API, "")
}).join(",")
}
if (this.type){
try {
await confirmGet(this.formData.id)
await confirmGet(this.formData.id, this.image)
this.dialogVisible = false
this.$modal.msgSuccess("操作成功")
await this.getList()
}catch{}
}else {
await confirmBack(this.formData.id)
await confirmBack(this.formData.id, this.image)
this.dialogVisible = false
this.$modal.msgSuccess("操作成功")
await this.getList()

View File

@ -23,6 +23,11 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" align="center" prop="dealUserName">
<template slot-scope="scope">
<span>{{scope.row?.roleName + ' ' + scope.row.dealUserName}}</span>
</template>
</el-table-column>
<el-table-column label="记录类型" align="center" prop="type" width="180">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.REPAIR_RECORDS_TYPE" :value="scope.row.type" />

View File

@ -145,7 +145,7 @@
</template>
</el-table-column>
<el-table-column label="商品名称" prop="name" align="center"/>
<el-table-column label="规格" prop="model" align="center"/>
<!-- <el-table-column label="规格" prop="model" align="center"/>-->
<el-table-column label="数量" prop="count" align="center">
<div v-if="scope.row.id" class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count"/>
@ -193,7 +193,7 @@
<el-table ref="multipleTable" @selection-change="handleSelectionChange" v-loading="loading" :data="partList" :stripe="true" :show-overflow-tooltip="true">
<el-table-column type="selection" align="center" />
<el-table-column label="商品名称" prop="name" align="center"/>
<el-table-column label="规格" prop="model" align="center"/>
<!-- <el-table-column label="规格" prop="model" align="center"/>-->
</el-table>
<pagination @pagination="getWaresList" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
/>
@ -211,18 +211,6 @@
<el-input v-model="waresFormData.name" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="规格" prop="model">
<el-input v-model="waresFormData.model" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="价格" prop="price">
<el-input-number v-model="waresFormData.price" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属分类" prop="type">
<TreeSelect
@ -308,8 +296,6 @@ export default {
},
waresRules:{
name: [{required: true, message: '名称不能为空', trigger: 'blur'}],
model: [{required: true, message: '规格不能为空', trigger: 'blur'}],
price: [{required: true, message: '价格不能为空', trigger: 'blur'}],
type: [{required: true, message: '所属分类不能为空', trigger: 'blur'}],
unit: [{required: true, message: '计量单位不能为空', trigger: 'blur'}],
},

View File

@ -41,24 +41,36 @@
<el-table-column label="手机号" align="center" prop="userMobile" width="180"/>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<!-- 都有 -->
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看
</el-button>
<el-button @click="handleEdit(scope.row)" v-if="userRole === 'service_advisor'" size="mini" type="text" icon="el-icon-setting">
编辑工单
</el-button>
<el-button v-if="userRole === 'service_advisor'" size="mini" type="text" icon="el-icon-refresh" @click="handleEditRecord(scope.row)">
维修记录设置
</el-button>
<el-button v-if="!(userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03')" size="mini" type="text" icon="el-icon-edit-outline" @click="handleDispose(scope.row)">
<!-- 能查到数据就能处理 -->
<el-button v-if="scope.row.ticketsWorkStatus !== '03'" size="mini" type="text" icon="el-icon-edit-outline" @click="handleDispose(scope.row)">
处理
</el-button>
<el-button size="mini" type="text" icon="el-icon-refresh" v-if="scope.row.ticketsWorkStatus !== '03'" @click="handleReTake(scope.row)">
重新指派
</el-button>
<el-button size="mini" @click="noticeCus(scope.row)" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
<el-dropdown
@command="(command) => handleCommand(command, scope.$index, scope.row)">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<!-- 能查到就可以操作 -->
<el-dropdown-item command="handleReTake" size="mini" type="text" icon="el-icon-refresh">
{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}
</el-dropdown-item>
<!-- 权限控制 -->
<el-dropdown-item command="handleEdit" size="mini" type="text" icon="el-icon-setting" v-hasPermi="['repair:tkm:edit']">
编辑工单
</el-dropdown-item>
<!-- 权限控制 -->
<el-dropdown-item command="handleEditRecord" size="mini" type="text" icon="el-icon-refresh" v-hasPermi="['repair:tkm:editRecord']">
维修记录设置
</el-dropdown-item>
<!-- 服务顾问才有 -->
<el-dropdown-item command="noticeCus" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
通知客户取车
</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
@ -102,19 +114,19 @@
<el-form :model="noticeData" ref="noticeRef" :rules="noticeRules" v-loading="noticeLoading" :inline="true" label-width="20rem">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="联系人" prop="name">
<el-input v-model="noticeData.name" style="width: 20rem"/>
<el-form-item :label="isNoticeChoose ? '客户姓名' : '联系人'" prop="name">
<el-input :disabled="isNoticeChoose" v-model="noticeData.name" style="width: 20rem"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="联系电话" prop="mobile">
<el-input v-model="noticeData.mobile" style="width: 20rem"/>
<el-input :disabled="isNoticeChoose" v-model="noticeData.mobile" style="width: 20rem"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-row :gutter="1" v-if="!isNoticeChoose">
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" style="width: 35rem" :autosize="{ minRows: 2, maxRows: 4}" v-model="noticeData.remark" />
@ -123,12 +135,12 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doNotice">确定</el-button>
<el-button type="primary" @click="doNotice" v-if="!isNoticeChoose">确定</el-button>
<el-button @click="noticeDialog = false">取消</el-button>
</div>
</el-dialog>
<UpdateRepair ref="updateRepair" @success="getList"/>
<UpdateRepair ref="updateRepair" @success="getList" :user-role="userRole"/>
<EditTickets ref="editTickets" @success="getList"/>
<RecordSetting ref="recordSet" />
</div>
@ -179,6 +191,7 @@ export default {
},
noticeLoading: false,
noticeDialog: false,
isNoticeChoose: false
}
},
mounted() {
@ -247,6 +260,12 @@ export default {
this.$refs.updateRepair.open(row)
},
async noticeCus(row){
this.$confirm('请选择使用什么方式通知客户?', '选择', {
confirmButtonText: '短信通知',
cancelButtonText: '拨打电话',
type: 'info'
}).then(async () => {
this.isNoticeChoose = false
this.noticeData = {
time: [],
name: null,
@ -264,6 +283,13 @@ export default {
} finally {
this.noticeLoading = false
}
}).catch(() => {
this.isNoticeChoose = true
this.noticeDialog = true
this.noticeData.name = row.userName
this.noticeData.mobile = row.userMobile
})
},
async doNotice(){
try {
@ -282,6 +308,22 @@ export default {
handleEditRecord(row){
this.$refs.recordSet.open(row.id)
},
handleCommand(command, index, row){
switch (command){
case 'handleReTake':
this.handleReTake(row)
break
case 'handleEdit':
this.handleEdit(row)
break
case 'handleEditRecord':
this.handleEditRecord(row)
break
case 'noticeCus':
this.noticeCus(row)
break
}
}
}
}
</script>

View File

@ -115,6 +115,35 @@
</el-descriptions>
</div>
</el-card>
<el-card class="box-card" v-if="userRole === 'general_inspection'">
<!-- 卡片头 -->
<div slot="header" class="clearfix">
<i class="el-icon-plus"/>
<span>内返信息</span>
</div>
<!-- 卡片内容 -->
<div>
<el-form :inline="true" label-width="30rem" v-model="formData" ref="formRef">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="图片">
<ImageUpload v-model="formData.image"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="原因">
<el-input style="width: 30rem" type="textarea" v-model="formData.remark"
:autosize="{ minRows: 4, maxRows: 8}"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</el-card>
<el-card class="box-card">
<!-- 卡片头 -->
<div slot="header" class="clearfix">
@ -164,6 +193,9 @@ import {updateRepair} from "@/api/repair/tickets/Tickets";
export default {
name: "UpdateRepair",
props:{
userRole: String
},
data() {
return {
dialogVisible: false,
@ -176,11 +208,20 @@ export default {
id: null,
nowRepairId: null,
nowRepairName: null,
}
image: null,
remark: null
},
}
},
methods: {
async open(row) {
this.formData = {
id: null,
nowRepairId: null,
nowRepairName: null,
image: null,
remark: null
}
this.dialogVisible = true
if (row) {
try {
@ -204,6 +245,12 @@ export default {
this.$modal.msgError("没有指派员工")
return
}
if (this.formData.image){
const data = this.formData.image.split(",")
this.formData.image = data.map(item => {
return item.replace(process.env.VUE_APP_FILE_API, "")
}).join(",")
}
this.initFormData()
await updateRepair(this.formData)
this.$modal.msgSuccess("指派成功")

View File

@ -138,7 +138,7 @@
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="注册日期" prop="carInfo.carRegisterDate" label-width="auto">
<el-form-item label="注册日期" prop="carInfo.carRegisterDate">
<el-date-picker clearable v-model="formData.carInfo.carRegisterDate" type="date" value-format="timestamp"
placeholder="选择车辆注册日期"/>
</el-form-item>