|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never" v-loading="loading">
|
|
|
- <work-search @search="reload"> </work-search>
|
|
|
+ <work-search @search="reload"></work-search>
|
|
|
<!-- 数据表格 -->
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
@@ -11,15 +11,13 @@
|
|
|
:pageSize="20"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-slot:toolbar> </template>
|
|
|
+ <template v-slot:toolbar></template>
|
|
|
<template v-slot:code="{ row }">
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@click="declarationForm(row, 'view')"
|
|
|
- >
|
|
|
- {{ row.code }}
|
|
|
- </el-link>
|
|
|
+ >{{ row.code }}</el-link>
|
|
|
</template>
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
|
@@ -28,17 +26,13 @@
|
|
|
:underline="false"
|
|
|
@click="declarationForm(row, 'edit')"
|
|
|
v-if="row.orderStatus == 1||row.orderStatus == 6"
|
|
|
- >
|
|
|
- 修改
|
|
|
- </el-link>
|
|
|
+ >修改</el-link>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@click="declarationForm(row, 'report')"
|
|
|
v-if="row.orderStatus == 1||row.orderStatus == 6"
|
|
|
- >
|
|
|
- 报工
|
|
|
- </el-link>
|
|
|
+ >报工</el-link>
|
|
|
|
|
|
<!-- <el-popconfirm class="ele-action" title="确认删除这条记录吗?" @confirm="cancel(row)">
|
|
|
<template v-slot:reference>
|
|
|
@@ -46,38 +40,30 @@
|
|
|
删除
|
|
|
</el-link>
|
|
|
</template>
|
|
|
- </el-popconfirm> -->
|
|
|
+ </el-popconfirm>-->
|
|
|
<el-dropdown
|
|
|
@command="(command) => handleCommand(command, row)"
|
|
|
v-if="row.orderStatus != 5"
|
|
|
>
|
|
|
<span class="el-dropdown-link">
|
|
|
- 操作菜单<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ 操作菜单
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item
|
|
|
- command="handleReceive"
|
|
|
- v-if="row.orderStatus == 0"
|
|
|
- >接收
|
|
|
- </el-dropdown-item>
|
|
|
+ <el-dropdown-item command="handleReceive" v-if="row.orderStatus == 0">接收</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
command="toRedeploy"
|
|
|
v-if="row.orderStatus == 0 || row.orderStatus == 1"
|
|
|
- >转派
|
|
|
- </el-dropdown-item>
|
|
|
+ >转派</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
command="addSpareItems"
|
|
|
v-if="row.orderStatus == 1 || row.orderStatus == 2"
|
|
|
- >申请配件
|
|
|
- </el-dropdown-item>
|
|
|
+ >申请配件</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
command="checkAndAccept"
|
|
|
v-if="row.orderStatus == 3||row.orderStatus == 6"
|
|
|
- >验收
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item command="evaluate" v-if="row.orderStatus == 4"
|
|
|
- >评价
|
|
|
- </el-dropdown-item>
|
|
|
+ >验收</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="evaluate" v-if="row.orderStatus == 4">评价</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
|
@@ -88,10 +74,7 @@
|
|
|
<!-- 备品备件 -->
|
|
|
<applyForSpare @reload="reload" ref="edit" />
|
|
|
<!-- 报工 -->
|
|
|
- <declarationDialog
|
|
|
- ref="declarationDialogRef"
|
|
|
- @reload="reload"
|
|
|
- ></declarationDialog>
|
|
|
+ <declarationDialog ref="declarationDialogRef" @reload="reload"></declarationDialog>
|
|
|
<!-- 转派 -->
|
|
|
<redeployOther ref="redeployOtherRef" @reload="reload" />
|
|
|
<ele-modal
|
|
|
@@ -104,19 +87,9 @@
|
|
|
:maxable="true"
|
|
|
>
|
|
|
<div>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="form"
|
|
|
- :rules="rules"
|
|
|
- label-width="100px"
|
|
|
- class="create-form"
|
|
|
- >
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px" class="create-form">
|
|
|
<el-form-item label="验收人" prop="accepterUserId">
|
|
|
- <el-select
|
|
|
- v-model="form.accepterUserId"
|
|
|
- size="small"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-select v-model="form.accepterUserId" size="small" style="width: 100%">
|
|
|
<el-option
|
|
|
:value="item.id"
|
|
|
:label="item.contactName"
|
|
|
@@ -127,12 +100,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="验收意见" prop="accepterRemark">
|
|
|
- <el-input
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="form.accepterRemark"
|
|
|
- type="textarea"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ <el-input placeholder="请输入内容" v-model="form.accepterRemark" type="textarea"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -147,297 +115,301 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import workSearch from './components/work-search.vue';
|
|
|
- import detailDialog from './components/detailDialog.vue';
|
|
|
- import applyForSpare from '../components/applyForSpare.vue';
|
|
|
- import declarationDialog from './components/declarationDialog.vue';
|
|
|
- import redeployOther from './components/redeployOther2.vue';
|
|
|
- import addDialog from '@/views/salesServiceManagement/evaluate/components/addDialog.vue';
|
|
|
+import workSearch from './components/work-search.vue';
|
|
|
+import detailDialog from './components/detailDialog.vue';
|
|
|
+import applyForSpare from '../components/applyForSpare.vue';
|
|
|
+import declarationDialog from './components/declarationDialog.vue';
|
|
|
+import redeployOther from './components/redeployOther2.vue';
|
|
|
+import addDialog from '@/views/salesServiceManagement/evaluate/components/addDialog.vue';
|
|
|
|
|
|
- import {
|
|
|
- getSalesWorkOrder,
|
|
|
- deleteSalesWorkOrder,
|
|
|
- receiveSalesWorkOrder,
|
|
|
- checkAndAccept,
|
|
|
- getSalesWorkOrderById
|
|
|
- } from '@/api/salesServiceManagement/index';
|
|
|
+import {
|
|
|
+ getSalesWorkOrder,
|
|
|
+ deleteSalesWorkOrder,
|
|
|
+ receiveSalesWorkOrder,
|
|
|
+ checkAndAccept,
|
|
|
+ getSalesWorkOrderById
|
|
|
+} from '@/api/salesServiceManagement/index';
|
|
|
|
|
|
- import dictMixins from '@/mixins/dictMixins';
|
|
|
- export default {
|
|
|
- mixins: [dictMixins],
|
|
|
- components: {
|
|
|
- workSearch,
|
|
|
- detailDialog,
|
|
|
- applyForSpare,
|
|
|
- declarationDialog,
|
|
|
- redeployOther,
|
|
|
- addDialog
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- visibleCheckAndAccept: false,
|
|
|
- form: {
|
|
|
- accepterUserId: '',
|
|
|
- accepterUserName: '',
|
|
|
- accepterRemark: ''
|
|
|
+import dictMixins from '@/mixins/dictMixins';
|
|
|
+export default {
|
|
|
+ mixins: [dictMixins],
|
|
|
+ components: {
|
|
|
+ workSearch,
|
|
|
+ detailDialog,
|
|
|
+ applyForSpare,
|
|
|
+ declarationDialog,
|
|
|
+ redeployOther,
|
|
|
+ addDialog
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visibleCheckAndAccept: false,
|
|
|
+ form: {
|
|
|
+ accepterUserId: '',
|
|
|
+ accepterUserName: '',
|
|
|
+ accepterRemark: ''
|
|
|
+ },
|
|
|
+ contactInfoVOS: [],
|
|
|
+ workOrderStatus: [
|
|
|
+ { code: 0, label: '待接收' },
|
|
|
+ { code: 1, label: '已接收' },
|
|
|
+ { code: 2, label: '执行中' },
|
|
|
+ { code: 3, label: '待验收' },
|
|
|
+ { code: 4, label: '待评价' },
|
|
|
+ { code: 5, label: '已完成' },
|
|
|
+ { code: 6, label: '验收不通过' }
|
|
|
+ ],
|
|
|
+ resultStatus: [
|
|
|
+ { code: 5, label: '未修复' },
|
|
|
+ { code: 4, label: '已修复' }
|
|
|
+ ],
|
|
|
+ // 表格列配置
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ slot: 'code',
|
|
|
+ label: '工单编号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planCode',
|
|
|
+ label: '计划单号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planName',
|
|
|
+ label: '计划名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'executeUserName',
|
|
|
+ label: '报工人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'accepterUserName',
|
|
|
+ label: '验收人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'accepterTime',
|
|
|
+ label: '验收时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
- contactInfoVOS: [],
|
|
|
- workOrderStatus: [
|
|
|
- { code: 0, label: '待接收' },
|
|
|
- { code: 1, label: '已接收' },
|
|
|
- { code: 2, label: '执行中' },
|
|
|
- { code: 3, label: '待验收' },
|
|
|
- { code: 4, label: '待评价' },
|
|
|
- { code: 5, label: '已完成' },
|
|
|
- { code: 6, label: '验收不通过' },
|
|
|
- ],
|
|
|
- resultStatus: [
|
|
|
- { code: 5, label: '未修复' },
|
|
|
- { code: 4, label: '已修复' }
|
|
|
- ],
|
|
|
- // 表格列配置
|
|
|
- columns: [
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'code',
|
|
|
- slot: 'code',
|
|
|
- label: '工单编号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 150
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'planCode',
|
|
|
- label: '计划单号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'planName',
|
|
|
- label: '计划名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'executeUserName',
|
|
|
- label: '报工人',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'accepterUserName',
|
|
|
- label: '验收人',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'accepterTime',
|
|
|
- label: '验收时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
|
|
|
- // {
|
|
|
- // prop: 'assistsName',
|
|
|
- // label: '辅助人',
|
|
|
- // align: 'center',
|
|
|
- // showOverflowTooltip: true,
|
|
|
- // minWidth: 110
|
|
|
- // },
|
|
|
+ // {
|
|
|
+ // prop: 'assistsName',
|
|
|
+ // label: '辅助人',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // minWidth: 110
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
- prop: 'acceptTime',
|
|
|
- label: '开始时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'finishTime',
|
|
|
- label: '结束时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'planFinishTime',
|
|
|
- label: '计划完成时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'inFactDuration',
|
|
|
- label: '实际售后时长(分钟)',
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 120,
|
|
|
- formatter: (row) => {
|
|
|
- if (row.finishTime && row.acceptTime) {
|
|
|
- return parseInt(
|
|
|
- (new Date(row.finishTime).getTime() -
|
|
|
- new Date(row.acceptTime).getTime()) /
|
|
|
- 60000
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'orderStatus',
|
|
|
- label: '状态',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row) => {
|
|
|
- return this.workOrderStatus.find(
|
|
|
- (item) => item.code == row.orderStatus
|
|
|
- )?.label;
|
|
|
+ {
|
|
|
+ prop: 'acceptTime',
|
|
|
+ label: '开始时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'finishTime',
|
|
|
+ label: '结束时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planFinishTime',
|
|
|
+ label: '计划完成时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'inFactDuration',
|
|
|
+ label: '实际售后时长(小时)',
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 120,
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.inFactDuration || row.inFactDuration == 0) {
|
|
|
+ let str = ((row.inFactDuration - 0) / 60).toFixed(1);
|
|
|
+ return str + ' 小时'
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 240,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true
|
|
|
+ // if (row.finishTime && row.acceptTime) {
|
|
|
+ // return parseInt(
|
|
|
+ // (new Date(row.finishTime).getTime() -
|
|
|
+ // new Date(row.acceptTime).getTime()) /
|
|
|
+ // 60000
|
|
|
+ // );
|
|
|
+ // }
|
|
|
}
|
|
|
- ],
|
|
|
- // 加载状态
|
|
|
- loading: false,
|
|
|
- row: {}
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {},
|
|
|
- created() {},
|
|
|
- methods: {
|
|
|
- /* 表格数据源 */
|
|
|
- datasource({ page, limit, where, order }) {
|
|
|
- return getSalesWorkOrder({ pageNum: page, size: limit, ...where });
|
|
|
- },
|
|
|
- /* 刷新表格 */
|
|
|
- reload(where) {
|
|
|
- this.$refs.table.reload({ page: 1, where });
|
|
|
- },
|
|
|
- async cancel(row) {
|
|
|
- const res = await deleteSalesWorkOrder([row.id]);
|
|
|
- if (res) {
|
|
|
- this.$message.success('删除成功');
|
|
|
- this.reload();
|
|
|
- }
|
|
|
- },
|
|
|
- async addSpareItems(row) {
|
|
|
- let data = await getSalesWorkOrderById(row.id);
|
|
|
- this.$refs.edit.open(
|
|
|
- {
|
|
|
- receivingDeptName: data.executeGroupName,
|
|
|
- receivingDeptId: data.executeGroupId,
|
|
|
- recipientName: data.executeUserName,
|
|
|
- recipientId: data.executeUserId,
|
|
|
- name: data.name,
|
|
|
- id: data.id,
|
|
|
- details: data.costListVOS.filter((item) => {
|
|
|
- if (item.typeId == 2 && item.isApply != 1) {
|
|
|
- item.totalPrice = item.settlementPrice;
|
|
|
- item.categoryCode = item.code;
|
|
|
- item.categoryName = item.name;
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'orderStatus',
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row) => {
|
|
|
+ return this.workOrderStatus.find(
|
|
|
+ (item) => item.code == row.orderStatus
|
|
|
+ )?.label;
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- return item;
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- 'work'
|
|
|
- );
|
|
|
- },
|
|
|
- //接收
|
|
|
- async handleReceive(row) {
|
|
|
- const res = await receiveSalesWorkOrder(row);
|
|
|
- if (!res) return;
|
|
|
- this.$message.success('操作成功');
|
|
|
- this.reload();
|
|
|
- },
|
|
|
- //验收
|
|
|
- async checkAndAccept(accepterStatus) {
|
|
|
- if (!this.form.accepterUserId) {
|
|
|
- this.$message.warning('请选择验收人!');
|
|
|
- return;
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 240,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
}
|
|
|
- const res = await checkAndAccept({
|
|
|
- id: this.row.id,
|
|
|
- ...this.form,
|
|
|
- accepterStatus
|
|
|
- });
|
|
|
- if (!res) return;
|
|
|
- this.$message.success('操作成功');
|
|
|
- this.visibleCheckAndAccept = false;
|
|
|
+ ],
|
|
|
+ // 加载状态
|
|
|
+ loading: false,
|
|
|
+ row: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ /* 表格数据源 */
|
|
|
+ datasource({ page, limit, where, order }) {
|
|
|
+ return getSalesWorkOrder({ pageNum: page, size: limit, ...where });
|
|
|
+ },
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload(where) {
|
|
|
+ this.$refs.table.reload({ page: 1, where });
|
|
|
+ },
|
|
|
+ async cancel(row) {
|
|
|
+ const res = await deleteSalesWorkOrder([row.id]);
|
|
|
+ if (res) {
|
|
|
+ this.$message.success('删除成功');
|
|
|
this.reload();
|
|
|
- },
|
|
|
- accepterUserChange(item) {
|
|
|
- this.form.accepterUserName = item.contactName;
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async addSpareItems(row) {
|
|
|
+ let data = await getSalesWorkOrderById(row.id);
|
|
|
+ this.$refs.edit.open(
|
|
|
+ {
|
|
|
+ receivingDeptName: data.executeGroupName,
|
|
|
+ receivingDeptId: data.executeGroupId,
|
|
|
+ recipientName: data.executeUserName,
|
|
|
+ recipientId: data.executeUserId,
|
|
|
+ name: data.name,
|
|
|
+ id: data.id,
|
|
|
+ details: data.costListVOS.filter((item) => {
|
|
|
+ if (item.typeId == 2 && item.isApply != 1) {
|
|
|
+ item.totalPrice = item.settlementPrice;
|
|
|
+ item.categoryCode = item.code;
|
|
|
+ item.categoryName = item.name;
|
|
|
|
|
|
- // 转派
|
|
|
- toRedeploy(row) {
|
|
|
- this.$refs.redeployOtherRef.open(row, 'transfer');
|
|
|
- },
|
|
|
- //报工
|
|
|
- declarationForm(row, type) {
|
|
|
- this.$refs.declarationDialogRef.open(row, type);
|
|
|
- },
|
|
|
- goDetail(row) {
|
|
|
- this.$refs.declarationDialogRef.open(row, 'view');
|
|
|
- },
|
|
|
- async handleCommand(command, row) {
|
|
|
- if (command === 'addSpareItems') {
|
|
|
- this.addSpareItems(row);
|
|
|
- }
|
|
|
- if (command === 'handleReceive') {
|
|
|
- this.handleReceive(row);
|
|
|
- }
|
|
|
- if (command === 'toRedeploy') {
|
|
|
- this.toRedeploy(row);
|
|
|
- }
|
|
|
- if (command == 'evaluate') {
|
|
|
- this.$refs.addDialogRef.open(row, 'add');
|
|
|
- }
|
|
|
- if (command == 'checkAndAccept') {
|
|
|
- this.visibleCheckAndAccept = true;
|
|
|
- this.form = {
|
|
|
- accepterUserId: '',
|
|
|
- accepterUserName: '',
|
|
|
- accepterRemark: ''
|
|
|
- };
|
|
|
- const { afterSalesDemandVO } = await getSalesWorkOrderById(row.id);
|
|
|
- this.contactInfoVOS = afterSalesDemandVO.contactInfoVOS || [];
|
|
|
- this.row = row;
|
|
|
- }
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ 'work'
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //接收
|
|
|
+ async handleReceive(row) {
|
|
|
+ const res = await receiveSalesWorkOrder(row);
|
|
|
+ if (!res) return;
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.reload();
|
|
|
+ },
|
|
|
+ //验收
|
|
|
+ async checkAndAccept(accepterStatus) {
|
|
|
+ if (!this.form.accepterUserId) {
|
|
|
+ this.$message.warning('请选择验收人!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const res = await checkAndAccept({
|
|
|
+ id: this.row.id,
|
|
|
+ ...this.form,
|
|
|
+ accepterStatus
|
|
|
+ });
|
|
|
+ if (!res) return;
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.visibleCheckAndAccept = false;
|
|
|
+ this.reload();
|
|
|
+ },
|
|
|
+ accepterUserChange(item) {
|
|
|
+ this.form.accepterUserName = item.contactName;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 转派
|
|
|
+ toRedeploy(row) {
|
|
|
+ this.$refs.redeployOtherRef.open(row, 'transfer');
|
|
|
+ },
|
|
|
+ //报工
|
|
|
+ declarationForm(row, type) {
|
|
|
+ this.$refs.declarationDialogRef.open(row, type);
|
|
|
+ },
|
|
|
+ goDetail(row) {
|
|
|
+ this.$refs.declarationDialogRef.open(row, 'view');
|
|
|
+ },
|
|
|
+ async handleCommand(command, row) {
|
|
|
+ if (command === 'addSpareItems') {
|
|
|
+ this.addSpareItems(row);
|
|
|
+ }
|
|
|
+ if (command === 'handleReceive') {
|
|
|
+ this.handleReceive(row);
|
|
|
+ }
|
|
|
+ if (command === 'toRedeploy') {
|
|
|
+ this.toRedeploy(row);
|
|
|
+ }
|
|
|
+ if (command == 'evaluate') {
|
|
|
+ this.$refs.addDialogRef.open(row, 'add');
|
|
|
+ }
|
|
|
+ if (command == 'checkAndAccept') {
|
|
|
+ this.visibleCheckAndAccept = true;
|
|
|
+ this.form = {
|
|
|
+ accepterUserId: '',
|
|
|
+ accepterUserName: '',
|
|
|
+ accepterRemark: ''
|
|
|
+ };
|
|
|
+ const { afterSalesDemandVO } = await getSalesWorkOrderById(row.id);
|
|
|
+ this.contactInfoVOS = afterSalesDemandVO.contactInfoVOS || [];
|
|
|
+ this.row = row;
|
|
|
}
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .el-dropdown-link {
|
|
|
- cursor: pointer;
|
|
|
- color: var(--color-primary-5);
|
|
|
- }
|
|
|
+.el-dropdown-link {
|
|
|
+ cursor: pointer;
|
|
|
+ color: var(--color-primary-5);
|
|
|
+}
|
|
|
|
|
|
- .el-icon-arrow-down {
|
|
|
- font-size: 12px;
|
|
|
- }
|
|
|
+.el-icon-arrow-down {
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
</style>
|