Compare commits

..

12 Commits
master ... dev

Author SHA1 Message Date
许允枞
a82d5b6277 更新 2024-11-15 17:45:02 +08:00
许允枞
da0b468fae 新增工单时增加引车员 2024-11-14 09:41:43 +08:00
许允枞
fe21a5802d 检测项目排序 2024-11-14 09:11:07 +08:00
许允枞
d769a595fe 新增检测项目可以排序 2024-11-12 17:43:55 +08:00
许允枞
a88664df4e 更新修改检测项目提成 2024-11-11 16:43:31 +08:00
许允枞
c44da68d9c 员工提成 2024-11-08 13:30:13 +08:00
许允枞
83b8aa1b75 更新 2024-11-07 18:05:00 +08:00
许允枞
70fe5aebc9 新增检测项目子表操作,修改检测工单表格显示顺序 2024-11-07 14:50:34 +08:00
许允枞
7881c6022b 解决检测系统商品管理页面不显示的问题 2024-11-07 09:20:25 +08:00
许允枞
ba90e8c90d 更新检测相关功能 2024-11-05 18:02:58 +08:00
许允枞
b96157f2c5 Merge remote-tracking branch 'origin/dev' into dev 2024-11-04 11:35:53 +08:00
许允枞
bf3a148e06 更新检测相关功能 2024-11-04 11:35:33 +08:00
27 changed files with 1672 additions and 1107 deletions

View File

@ -0,0 +1,18 @@
import request from '@/utils/request'
// 分页查询节点提成
export function getRoyaltyList(params) {
return request({
url: '/system/info/getRoyaltyList',
method: 'get',
params: params
})
}
// 分页查询节点提成总和
export function getRoyaltySum(params) {
return request({
url: '/system/info/getRoyaltySum',
method: 'get',
params: params
})
}

View File

@ -18,6 +18,15 @@ export function updateDlInspectionProject(data) {
})
}
// 更新检测项目排序
export function updateSort(data) {
return request({
url: '/inspection/dl-inspection-project/updateSort',
method: 'put',
data: data
})
}
// 删除检测项目
export function deleteDlInspectionProject(id) {
return request({
@ -61,3 +70,15 @@ export function getRole(params) {
},
})
}
// 获取商品 Excel
export function getGoods(params) {
return request({
url: 'system/inspectionGoods/listPartnerGoods',
method: 'get',
params: {
pageNum: 1,
pageSize: 10000
},
})
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,414 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="员工名称" prop="dealUserName">
<el-input
v-model="queryParams.dealUserName"
placeholder="请输入员工名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="月份" prop="rescueStartMonth">
<el-date-picker
v-model="queryParams.rescueStartMonth"
value-format="yyyy-MM"
type="month"
placeholder="选择月份"
>
</el-date-picker>
</el-form-item>
<el-form-item label="检测时间" prop="maintenanceTime">
<el-date-picker
v-model="time1"
type="daterange"
value-format="yyyy-MM-dd"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div style="display: flex;justify-content:right;font-weight: bold;font-size: 16px">
<!-- <span>-->
<!-- 施救总金额{{ moneyManagementData.allMoney }} -->
<!-- </span>-->
<!-- <span style="margin-left: 3%">-->
<!-- 出车次数{{ moneyManagementData.allNum }} -->
<!-- </span>-->
<!-- <span style="margin-left: 3%">-->
<!-- 提成总金额{{ moneyManagementData.tcAll }} -->
<!-- </span>-->
<span style="margin-left: 3%">
提成总金额{{ moneyManagementData.royaltyAmountSum }}
</span>
</div>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<!-- <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="projectName" />
<el-table-column label="员工" align="center" prop="handlerName" />
<el-table-column label="提成" align="center" prop="royaltyAmount" />
<el-table-column label="项目完成时间" align="center" prop="node_create_time" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.node_create_time, '{y}-{m}-{d} {h}:{m}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { moneyManagement, moneyManagementData, exportManagement } from '@/api/rescue/info'
import { getmap } from '@/api/Map/map'
import {getRoyaltyList, getRoyaltySum} from "@/api/inspection/cw";
// import Map from '../../components/Map/index'
export default {
name: 'Info',
dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no', 'jy_status', 'jy_order_status'],
data() {
return {
//
exportLoading: false,
pickerOptions: null,
chooseDriverId: '',
rescueInfoId: '',
//
loading: true,
ztlist: [],
//
ids: [],
time1: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
infoList: [],
//
title: '',
//
open: false,
opens: false,
designateFlag: false,
zong: '',
repaymentForm: {},
repaymentOpen: false,
moneyManagementData: {},
//
queryParams: {
pageNo: 1,
pageSize: 10,
connectionName: null,
isAppointment: null,
rescueType: null,
feeType: null,
carBrand: null,
destinationInfo: null,
rescueStatus: null,
rescueAmount: null,
rescueStart: null
},
//
form: {},
driverList: [],
//
rules: {
connectionName: [
{ required: true, message: '联系人名称不能为空', trigger: 'blur' }
],
connectionPhone: [
{ required: true, message: '联系人手机号不能为空', trigger: 'blur' }
],
licenseNum: [
{ required: true, message: '车牌号不能为空', trigger: 'blur' }
],
isAppointment: [
{ required: true, message: '是否为预约单不能为空', trigger: 'change' }
],
rescueType: [
{ required: true, message: '救援类型 1拖车2送油3搭电4换台5扣车不能为空', trigger: 'change' }
],
carType: [
{ required: true, message: '车辆类型 大中小不能为空', trigger: 'change' }
],
rescuePosition: [
{ required: true, message: '救援地点 详细描述不能为空', trigger: 'blur' }
],
feeType: [
{ required: true, message: '收费类型不能为空', trigger: 'change' }
]
}
}
},
components: {
Map
},
created() {
this.getList()
},
methods: {
cancelRepayment() {
this.repaymentForm = {}
this.repaymentOpen = false
},
repaymentSubmit() {
this.$refs['repaymentForm'].validate(valid => {
if (valid) {
returnOrder(this.repaymentForm).then(res => {
this.$modal.msgSuccess('还款成功')
this.repaymentOpen = false
this.repaymentForm = {}
this.getList()
})
}
})
},
repayment(data) {
this.repaymentOpen = true
this.repaymentForm.rescueOrderId = data.rescueOrderId
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
driverOk() {
this.designateFlag = false
designateDriver(this.rescueInfoId, this.chooseDriverId).then(res => {
this.$message.success('指派成功')
this.getList()
})
},
/** 查询道路救援模块列表 */
getList() {
this.loading = true
getRoyaltyList(this.queryParams).then(response => {
console.log("响应",response)
this.infoList = response.data.records
this.total = response.data.total
this.loading = false
})
getRoyaltySum(this.queryParams).then(response => {
this.moneyManagementData = response.data
})
},
getDriverList() {
getDriver().then(response => {
this.driverList = response.rows
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
connectionName: null,
connectionPhone: null,
licenseNum: null,
isAppointment: null,
rescueTime: null,
rescueType: null,
carType: null,
rescuePosition: null,
rescueLongitude: null,
rescueLatitude: null,
feeType: null,
carBrand: null,
destinationInfo: null,
destinationLongitude: null,
destinationLatitude: null,
rescueStatus: null,
driverId: null,
rescueAmount: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
if (this.time1 && this.time1.length > 0) {
this.queryParams.rescueStart = this.time1[0]
this.queryParams.rescueEnd = this.time1[1]
}
this.queryParams.pageNo = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.time1 = []
this.resetForm('queryForm')
this.queryParams = {}
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加道路救援模块'
},
pickDriver(row) {
},
designateDriver(row) {
this.designateFlag = true
this.rescueInfoId = row.id
this.getDriverList()
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data
this.open = true
this.title = '修改道路救援模块'
})
},
handleMap(row) {
this.rescueInfoId = row.id
routeInfo(row.id).then(res => {
this.ztlist = res.data
this.none(res.data)
})
getmap(row.id).then(res => {
let datas = []
res.data.forEach(it => {
let temp = [it.longitude, it.latitude]
datas.push(temp)
})
this.$refs.mapComponent.initMap(datas)
})
this.opens = true
},
none(arr) {
let sum = 0
for (var i = 0; i < arr.length; i++) {
sum += arr[i].distanceMeter
}
this.zong = sum
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInfo(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addInfo(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() {
return delInfo(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
async handleExport() {
try {
this.exportLoading = true
this.queryParams.pageNo = 1
this.queryParams.pageSize = 500
this.$modal.msgError("系统故障,联系管理员")
// const data = await exportManagement(this.queryParams)
// this.$download.excel(data, `_${new Date().getTime()}.xlsx`)
} catch {
} finally {
this.exportLoading = false
}
}
}
}
</script>
<style scoped>
.lang-for {
width: 100%;
margin: 10px auto;
}
</style>

View File

@ -19,6 +19,20 @@
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注"/>
</el-form-item>
<!-- <el-form-item label="排序" prop="remark">-->
<!-- <el-input v-model="formData.sort" placeholder="请输入排序"/>-->
<!-- </el-form-item>-->
<el-form-item label="提成价格">
<el-table :data="tableData" style="width: 100%" height="250">
<el-table-column fixed prop="title" label="商品名称">
</el-table-column>
<el-table-column label="提成价格">
<template #default="scope">
<el-input v-model="scope.row.royaltyAmount" placeholder="输入价格"></el-input>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button>
@ -30,11 +44,12 @@
<script>
import * as DlInspectionProjectApi from '@/api/inspection/project';
import {getRole} from "@/api/inspection/project";
import {getGoods, getRole} from "@/api/inspection/project";
import ElementBaseInfo from "@/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue";
export default {
name: "DlInspectionProjectForm",
components: {},
components: {ElementBaseInfo},
data() {
return {
//
@ -59,12 +74,14 @@ export default {
]
},
roleList: [],
tableData: []
};
},
methods: {
/** 打开弹窗 */
async open(id) {
this.getRole()
this.dialogVisible = true;
this.reset();
//
@ -73,10 +90,16 @@ export default {
try {
const res = await DlInspectionProjectApi.getDlInspectionProject(id);
this.formData = res.data;
if (res.data.projectRoyaltyList.length > 0){
this.tableData = res.data.projectRoyaltyList
console.log('tableData', this.tableData)
}
this.title = "修改检测项目";
} finally {
this.formLoading = false;
}
}else {
this.getGoods()
}
this.title = "新增检测项目";
},
@ -87,14 +110,28 @@ export default {
this.formLoading = true;
try {
const data = this.formData;
this.tableData.map(item => {
item.goodsId = item.id
/*如果royaltyAmount 为空则设置为0*/
if (!item.royaltyAmount) {
item.royaltyAmount = 0
}else {
/*将royaltyAmount的单位转为分*/
item.royaltyAmount = item.royaltyAmount * 100
}
delete item.id
})
data.projectRoyaltyList = this.tableData
//
if (data.id) {
console.log('商品及提成', this.tableData)
await DlInspectionProjectApi.updateDlInspectionProject(data);
this.$modal.msgSuccess("修改成功");
this.dialogVisible = false;
this.$emit('success');
return;
}
console.log('商品及提成', this.tableData)
//
await DlInspectionProjectApi.createDlInspectionProject(data);
this.$modal.msgSuccess("新增成功");
@ -116,9 +153,13 @@ export default {
/** 获取角色下拉框数据 */
async getRole() {
const res = await getRole();
console.log("角色的集合", res.data)
this.roleList = res.data
},
/** 获取角色下拉框数据 */
async getGoods() {
const res = await getGoods();
this.tableData = res.data.records
},
}
};
</script>

View File

@ -16,12 +16,12 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="创建时间" prop="createTime">-->
<!-- <el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- type="daterange"-->
<!-- range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"-->
<!-- :default-time="['00:00:00', '23:59:59']"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建时间" prop="createTime">-->
<!-- <el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- type="daterange"-->
<!-- range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"-->
<!-- :default-time="['00:00:00', '23:59:59']"/>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
@ -32,7 +32,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
v-hasPermi="['inspection:dl-inspection-project:create']">新增
>新增
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
@ -50,6 +50,17 @@
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="排序" align="center" prop="sort">
<template slot-scope="scope">
<el-input
v-model="scope.row.sort"
type="number"
style="width: 80px"
@blur="handleSortChange(scope.row)"
/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
@ -58,10 +69,10 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
v-hasPermi="['inspection:dl-inspection-project:update']">修改
>修改
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['inspection:dl-inspection-project:delete']">删除
>删除
</el-button>
</template>
</el-table-column>
@ -77,7 +88,7 @@
<script>
import * as DlInspectionProjectApi from '@/api/inspection/project';
import DlInspectionProjectForm from './DlInspectionProjectForm.vue';
import {getRole} from "@/api/inspection/project";
import {getRole, updateSort} from "@/api/inspection/project";
export default {
name: "DlInspectionProject",
@ -147,7 +158,8 @@ export default {
/** 删除按钮操作 */
async handleDelete(row) {
const id = row.id;
await this.$modal.confirm('是否确认删除检测项目编号为"' + id + '"的数据项?')
const name = row.projectName;
await this.$modal.confirm('是否确认删除检测项目名称为"' + name + '"的数据项?')
try {
await DlInspectionProjectApi.deleteDlInspectionProject(id);
await this.getList();
@ -176,6 +188,19 @@ export default {
getRoleName(id) {
const role = this.roleList.find(item => item.id === id);
return role ? role.name : '';
},
/** 排序值变化处理函数*/
async handleSortChange(row) {
console.log('本行信息:', row)
//
console.log('排序值变化:', row.sort);
//
let data = {
id: row.id,
sort: row.sort
}
let res = await DlInspectionProjectApi.updateSort(data);
this.getList()
}
}
};

View File

@ -136,3 +136,27 @@ export function delWorkInfo(id) {
method: 'post'
})
}
export function detail(params) {
return request({
url: '/partnerOwn/partner/inspectionDetail',
method: 'get',
params: params
})
}
export function getINspectionProject(params) {
return request({
url: '/inspection/dl-inspection-project/page',
method: 'get',
params: {
pageNo:1,
pageSize:10000
}
})
}
export function getWeorkNodesById(params) {
return request({
url: '/system/info/getWeorkNodesById',
method: 'get',
params: params
})
}

View File

@ -449,7 +449,8 @@
getList() {
this.loading = true;
listInspectionGoods(this.queryParams).then(response => {
this.inspectionGoodsList = response.rows;
console.log('resp',response)
this.inspectionGoodsList = response.data.records;
this.inspectionGoodsList.price=this.inspectionGoodsList.price / 100
this.total = response.total;
this.loading = false;

File diff suppressed because it is too large Load Diff

View File

@ -107,13 +107,7 @@
</template>
</el-table-column>
<el-table-column label="商品名称" align="center" prop="name" width="200"/>
<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="model"/>
<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"
@ -217,7 +211,7 @@ export default {
// cell
clickCellMap: {},
//
editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount', 'model'],
editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount'],
remark: null,
tableKey: 0,
}

View File

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

View File

@ -1,8 +1,6 @@
<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">
@ -24,12 +22,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">
@ -90,16 +88,6 @@
</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>
@ -143,9 +131,7 @@ export default {
itemCount: [{required: true, message: '数量不能为空', trigger: 'blur'}],
itemDiscount: [{required: true, message: "折扣不能为空", trigger: 'blur'}]
},
formLoading: false,
//
includeColumn: ['itemMoney', 'itemCount']
formLoading: false
}
},
computed: {
@ -181,29 +167,6 @@ 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,64 +41,72 @@
<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 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 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>
<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 command="handleRemove" size="mini" type="text" icon="el-icon-remove" v-hasPermi="['repair:tkm:remove']">
删除
<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>
<!-- 权限控制 -->
<el-dropdown-item command="handleVoid" v-hasPermi="['repair:tkm:void']" size="mini" type="text" icon="el-icon-delete">
作废
<!-- <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>
<!-- 权限控制 -->
<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
v-if="userRole === 'service_advisor' && !isFinish && scope.row.ticketsWorkStatus !== '01'"
command="handleEditRecord" size="mini" type="text" icon="el-icon-refresh"
>维修记录设置
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -110,9 +118,9 @@
@pagination="listTickets"
/>
<TicketsShow ref="ticketsShow" :user-role="userRole"/>
<UpdateRepair :user-role="userRole" ref="updateRepair" @success="listTickets"/>
<UpdateRepair ref="updateRepair" @success="listTickets"/>
<TWOperate ref="twOperate" @success="listTickets"/>
<UpdateRecord ref="updateRecord" @success="listTickets"/>
<UpdateRecord ref="updateRecord" @success="listTickets" />
<el-dialog title="退料申请" :visible.sync="backVisible" width="60%" v-dialogDrag append-to-body>
<el-table v-loading="backLoading" :data="partList" :stripe="true" :show-overflow-tooltip="true"
@ -121,7 +129,7 @@
@cell-click="handleCellClick"
@selection-change="rowSelect"
>
<el-table-column type="selection" align="center"/>
<el-table-column type="selection" align="center" />
<el-table-column label="商品名称" prop="itemName" align="center"/>
<el-table-column label="规格" prop="ware.model" align="center"/>
<el-table-column label="数量" prop="itemCount" align="center">
@ -139,7 +147,7 @@
</el-table>
<el-row :gutter="1" style="margin-top: 1rem">
<el-col :span="24">
<el-input v-model="remark" placeholder="备注"/>
<el-input v-model="remark" placeholder="备注" />
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
@ -148,35 +156,13 @@
</div>
</el-dialog>
<RecordSetting ref="recordSet"/>
<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, setTicketsVoid} from "@/api/repair/tickets/Tickets";
import {getPageType, updateTake, getTicketsById, removeTicketById} 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";
@ -187,18 +173,20 @@ 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: {TicketProgress, EditTickets, RecordSetting, UpdateRecord, TWOperate, UpdateRepair, TicketsShow},
components: {EditTickets, RecordSetting, UpdateRecord, TWOperate, UpdateRepair, TicketsShow},
props: {
isFinish: {
type: Boolean,
},
userRole: {
type: String,
default: '',
required: true
},
isType: {
isType:{
type: String,
}
},
@ -209,7 +197,7 @@ export default {
pageSize: 10,
ticketNo: null,
searchTimeArray: [],
selectType: this.isType
isFinish: this.isFinish ? "1" : "0",
},
showSearch: true,
loading: false,
@ -227,11 +215,6 @@ export default {
remark: null,
leader: false,
nowUser: null,
beginDialog: false,
beginData: {
id: null,
image: null,
},
}
},
mounted() {
@ -240,13 +223,13 @@ export default {
this.getNowUser()
},
methods: {
async getNowUser() {
async getNowUser(){
const res = await getUserProfile()
this.nowUser = res.data
},
async isLeader() {
const res = await getIfLeader()
this.leader = res.data
async isLeader(){
const res = await getIfLeader()
this.leader = res.data
},
async listTickets() {
try {
@ -284,36 +267,18 @@ 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
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
await this.$modal.confirm("确认接单吗?")
await updateTake(row.id)
this.$modal.msgSuccess("接单成功")
this.beginData = {
id: null,
image: null
}
await this.listTickets()
} finally {
}finally {
this.loading = false
}
},
// 退
async handleBack(row) {
async handleBack(row){
this.formData = {}
this.formData = row
this.remark = null
@ -322,12 +287,12 @@ export default {
this.backLoading = true
const res = await getTicketsById(row.id)
this.partList = res.data.wares
} finally {
}finally {
this.backLoading = false
}
},
//
handleReTake(row) {
handleReTake(row){
row = {
...row,
//
@ -336,38 +301,23 @@ export default {
this.$refs.updateRepair.open(row)
},
//
handleNotify(row) {
handleNotify(row){
this.$refs.updateRepair.open(row)
},
//
handleCommand(command, index, row) {
switch (command) {
case 'handleRemove':
this.handleRemove(row)
break
case 'handleVoid':
this.handleVoid(row)
break
case 'handleEditTicket':
this.handleEditTicket(row)
break
case 'handleEditRecord':
this.handleEditRecord(row)
handleCommand(command, index, row){
switch (command){
case 'handleReTake':
this.handleReTake(row)
break
case 'handleGet':
this.handleGet(row)
break
case 'handleRecordOne':
this.handleRecord(row, 'kssg')
case 'handleBack':
this.handleBack(row)
break
case 'handleRecordTwo':
this.handleRecord(row, 'sgz')
break
case 'handleRecordThree':
this.handleRecord(row, 'sgwczj')
break
case 'handleProgress':
this.handleProgress(row)
case 'handleEditRecord':
this.handleEditRecord(row)
break
default:
break
@ -425,10 +375,10 @@ export default {
})
this.clickCellMap[id] = []
},
rowSelect(val) {
rowSelect(val){
this.selections = val
},
async doBack(flag) {
async doBack(flag){
const data = {
no: createUniqueCodeByHead("TLSQ"),
ticketId: this.formData.id,
@ -438,9 +388,9 @@ export default {
adviserId: this.formData.adviserId,
adviserName: this.formData.adviserName
}
if (flag) {
if (flag){
data.items = this.partList
} else {
}else {
data.items = this.selections
}
await updateTicketWares(data)
@ -448,7 +398,7 @@ export default {
this.$modal.msgSuccess("申请成功");
await this.listTickets()
},
handleRecord(row, type) {
handleRecord(row, type){
row = {
...row,
clickType: type
@ -456,48 +406,22 @@ export default {
this.$refs.updateRecord.open(row)
},
//
handleEditRecord(row) {
handleEditRecord(row){
this.$refs.recordSet.open(row.id)
},
handleEditTicket(row) {
handleEditTicket(row){
this.$refs.editTickets.open(row)
},
async handleRemove(row) {
async handleRemove(row){
try {
const id = row.id
if (id) {
if (id){
await this.$modal.confirm("确认删除工单" + row.ticketNo + "吗?")
await removeTicketById(id)
await this.listTickets()
this.$modal.msgSuccess("删除成功")
}
} 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)
}catch{}
}
}
}

View File

@ -1,102 +0,0 @@
<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-hasPermi="['repair:tk:paid']" size="mini" type="text" icon="el-icon-finished"
@click="handlePaid(scope.row)" v-if="TicketType === 'tu'"
<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>
<!-- <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)" v-hasPermi="['repair:tk:void']"
@click="handleVoid(scope.row)"
>作废
</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" @change="updateBooking">
<el-select v-model="formData.bookingId" size="small">
<el-option v-for="item in bookingList" :key="item.id" :value="item.id"
:label="item.bookingTime"/>
</el-select>
@ -139,12 +139,6 @@
</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>
@ -403,7 +397,6 @@ export default {
rescueMoney: 0,
threePackMoney: 0,
confirmFaultMoney: 0,
image: null
},
selectUser: {},
selectCar: {},
@ -492,12 +485,6 @@ 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()
@ -552,7 +539,6 @@ export default {
rescueMoney: 0,
threePackMoney: 0,
confirmFaultMoney: 0,
image: null
}
this.selectUser = {}
this.selectCar = {}
@ -751,17 +737,11 @@ 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,14 +1,11 @@
<template>
<div class="app-container">
<el-tabs v-model="activeTab">
<el-tab-pane label="全部工单" name="finish">
<TicketManagerItem :is-type="'all'" :user-role="userRole"/>
<el-tab-pane label="待完成工单" name="unFinish">
<TicketManagerItem :is-finish="false" :user-role="userRole"/>
</el-tab-pane>
<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 label="已完成工单" name="finish">
<TicketManagerItem :is-finish="true" :user-role="userRole"/>
</el-tab-pane>
<el-tab-pane label="配件申请单" name="getApply" v-if="userRole !== 'repair_staff'">
<TicketWares :type="true" :user-role="userRole"/>
@ -19,6 +16,12 @@
<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>
@ -35,7 +38,7 @@ export default {
components: {TicketFinishManager, GetAndBackWares, TicketWares, TicketManagerItem},
data() {
return {
activeTab: 'finish',
activeTab: 'unFinish',
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,15 +49,6 @@
<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">
确认
@ -97,8 +88,7 @@ export default {
dialogVisible: false,
items: [],
dialogLoading: false,
formData:{},
image: null
formData:{}
}
},
mounted() {
@ -141,21 +131,15 @@ 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, this.image)
await confirmGet(this.formData.id)
this.dialogVisible = false
this.$modal.msgSuccess("操作成功")
await this.getList()
}catch{}
}else {
await confirmBack(this.formData.id, this.image)
await confirmBack(this.formData.id)
this.dialogVisible = false
this.$modal.msgSuccess("操作成功")
await this.getList()

View File

@ -23,11 +23,6 @@
<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,6 +211,18 @@
<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
@ -296,6 +308,8 @@ 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,36 +41,24 @@
<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-if="scope.row.ticketsWorkStatus !== '03'" size="mini" type="text" icon="el-icon-edit-outline" @click="handleDispose(scope.row)">
<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>
<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-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<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-button>
</template>
</el-table-column>
</el-table>
@ -114,19 +102,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="isNoticeChoose ? '客户姓名' : '联系人'" prop="name">
<el-input :disabled="isNoticeChoose" v-model="noticeData.name" style="width: 20rem"/>
<el-form-item label="联系人" prop="name">
<el-input 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 :disabled="isNoticeChoose" v-model="noticeData.mobile" style="width: 20rem"/>
<el-input v-model="noticeData.mobile" style="width: 20rem"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1" v-if="!isNoticeChoose">
<el-row :gutter="1">
<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" />
@ -135,12 +123,12 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doNotice" v-if="!isNoticeChoose">确定</el-button>
<el-button type="primary" @click="doNotice">确定</el-button>
<el-button @click="noticeDialog = false">取消</el-button>
</div>
</el-dialog>
<UpdateRepair ref="updateRepair" @success="getList" :user-role="userRole"/>
<UpdateRepair ref="updateRepair" @success="getList"/>
<EditTickets ref="editTickets" @success="getList"/>
<RecordSetting ref="recordSet" />
</div>
@ -191,7 +179,6 @@ export default {
},
noticeLoading: false,
noticeDialog: false,
isNoticeChoose: false
}
},
mounted() {
@ -260,36 +247,23 @@ 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,
mobile: null,
id: null,
remark: null,
}
this.noticeDialog = true
this.noticeData.id = row.id
try {
this.noticeLoading = true
const res = await getUserProfile()
this.noticeData.name = res.data.nickname
this.noticeData.mobile = res.data.mobile
} finally {
this.noticeLoading = false
}
}).catch(() => {
this.isNoticeChoose = true
this.noticeDialog = true
this.noticeData.name = row.userName
this.noticeData.mobile = row.userMobile
})
this.noticeData = {
time: [],
name: null,
mobile: null,
id: null,
remark: null,
}
this.noticeDialog = true
this.noticeData.id = row.id
try {
this.noticeLoading = true
const res = await getUserProfile()
this.noticeData.name = res.data.nickname
this.noticeData.mobile = res.data.mobile
}finally {
this.noticeLoading = false
}
},
async doNotice(){
try {
@ -308,22 +282,6 @@ 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,35 +115,6 @@
</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">
@ -193,9 +164,6 @@ import {updateRepair} from "@/api/repair/tickets/Tickets";
export default {
name: "UpdateRepair",
props:{
userRole: String
},
data() {
return {
dialogVisible: false,
@ -208,20 +176,11 @@ 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 {
@ -245,12 +204,6 @@ 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">
<el-form-item label="注册日期" prop="carInfo.carRegisterDate" label-width="auto">
<el-date-picker clearable v-model="formData.carInfo.carRegisterDate" type="date" value-format="timestamp"
placeholder="选择车辆注册日期"/>
</el-form-item>