Browse Source

异常工单

fix_bug_pro20231227
马远东 1 year ago
parent
commit
3f1958437a
  1. 21
      src/api/aftersales/aftersalesWorkOrder.js
  2. 40
      src/router/views/index.js
  3. 2399
      src/views/aftersales/VueTemp.vue
  4. 3343
      src/views/aftersales/aftersalesWorkOrder.vue
  5. 136
      src/views/aftersales/aftersalesWorkOrderAdd.vue
  6. 633
      src/views/aftersales/aftersalesWorkOrderSS.vue
  7. 120
      src/views/aftersales/aftersalesWorkOrderend.vue

21
src/api/aftersales/aftersalesWorkOrder.js

@ -79,7 +79,7 @@ export const update = (row) => {
// 表格初始化
export const $_getList = (params) => {
return request({
url: '/api/logpm-aftersales/aftersalesWorkOrder/list',
url: '/api/logpm-aftersales/aftersalesWorkOrder/list', //listOwn
method: 'get',
params
})
@ -184,3 +184,22 @@ export const $_getCustomerServicePersonnel = (params) => {
params
})
}
// 仲裁申请
export const $_arbitrate = (data) => {
return request({
url: '/api/logpm-aftersales/aftersalesWorkOrder/arbitrate',
method: 'post',
data
})
}
// 工单完结
export const $_addCompletionEnd = (data) => {
return request({
url: '/api/logpm-aftersales/aftersalesWorkOrder/addCompletionEnd',
method: 'post',
data
})
}

40
src/router/views/index.js

@ -1192,39 +1192,39 @@ export default [
],
},
// {
// path: '/aftersales/VueTemp',
// component: Layout,
// redirect: '/aftersales/VueTemp',
// children: [
// {
// path: '/aftersales/VueTemp',
// name: '工单',
// component: () => import('@/views/aftersales/aftersalesWorkOrder.vue'),
// },
// ],
// },
{
path: '/aftersales/VueTemp',
component: Layout,
redirect: '/aftersales/VueTemp',
children: [
{
path: '/aftersales/VueTemp',
name: '工单',
component: () => import('@/views/aftersales/VueTemp.vue'),
},
],
},
{
path: '/aftersales/VueTempAdd',
path: '/aftersales/aftersalesWorkOrderAdd',
component: Layout,
redirect: '/aftersales/VueTempAdd',
redirect: '/aftersales/aftersalesWorkOrderAdd',
children: [
{
path: '/aftersales/VueTempAdd',
path: '/aftersales/aftersalesWorkOrderAdd',
name: '工单新增',
component: () => import('@/views/aftersales/VueTempAdd.vue'),
component: () => import('@/views/aftersales/aftersalesWorkOrderAdd.vue'),
},
],
},
{
path: '/aftersales/VueTempend',
path: '/aftersales/aftersalesWorkOrderend',
component: Layout,
redirect: '/aftersales/VueTempend',
redirect: '/aftersales/aftersalesWorkOrderend',
children: [
{
path: '/aftersales/VueTempend',
path: '/aftersales/aftersalesWorkOrderend',
name: '工单完结',
component: () => import('@/views/aftersales/VueTempend.vue'),
component: () => import('@/views/aftersales/aftersalesWorkOrderend.vue'),
},
],
},

2399
src/views/aftersales/VueTemp.vue

File diff suppressed because it is too large Load Diff

3343
src/views/aftersales/aftersalesWorkOrder.vue

File diff suppressed because it is too large Load Diff

136
src/views/aftersales/VueTempAdd.vue → src/views/aftersales/aftersalesWorkOrderAdd.vue

@ -1,5 +1,7 @@
<template>
<el-divider content-position="left"> <span>工单新增</span> </el-divider>
<el-divider content-position="left">
<span> {{ routerState ? '信息查看' : '工单新增' }}</span>
</el-divider>
<el-form :model="Indexform" label-width="100px" class="IndexFrom" ref="IndexForm">
<el-form-item label="异常类型">
@ -91,8 +93,8 @@
groundlineType == 4 ||
groundlineType == 8 ||
groundlineType == 5 ||
groundlineType == 7 ||
groundlineType==8
groundlineType == 7 ||
groundlineType == 8
"
>
<el-input
@ -118,13 +120,13 @@
/>
</el-form-item>
<el-form-item label="货时间">
<el-form-item label="货时间">
<el-date-picker
v-model="Indexform.deliverGoodsTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择货时间"
placeholder="请选择货时间"
/>
</el-form-item>
@ -137,8 +139,8 @@
groundlineType == 4 ||
groundlineType == 8 ||
groundlineType == 5 ||
groundlineType == 7 ||
groundlineType==8
groundlineType == 7 ||
groundlineType == 8
"
>
<el-date-picker
@ -158,8 +160,8 @@
groundlineType == 4 ||
groundlineType == 8 ||
groundlineType == 5 ||
groundlineType == 7 ||
groundlineType==8
groundlineType == 7 ||
groundlineType == 8
"
>
<el-date-picker
@ -196,8 +198,8 @@
groundlineType == 4 ||
groundlineType == 8 ||
groundlineType == 5 ||
groundlineType == 7 ||
groundlineType==8
groundlineType == 7 ||
groundlineType == 8
"
>
<el-select
@ -228,8 +230,8 @@
groundlineType == 4 ||
groundlineType == 8 ||
groundlineType == 5 ||
groundlineType == 7 ||
groundlineType==8
groundlineType == 7 ||
groundlineType == 8
"
>
<el-input
@ -240,6 +242,7 @@
/>
</el-form-item>
</el-form>
<!-- 必填 -->
<div class="el_clzr">
<el-form-item class="investigate" label="调查经过">
@ -293,6 +296,61 @@
</el-select>
</el-form-item>
</div>
<el-tabs type="border-card">
<el-tab-pane label="责任方选择">
<div class="ResponsibilityBox">
<div class="leftbox">
<div class="maxBox">
<span class="title">责任方:</span>
<el-select
v-model="Indexform.duty"
clearable
filterable
multiple
placeholder="请选择责任方"
>
<el-option
v-for="item in warehouseData"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div class="maxBox">
<span class="title">责任人</span>
<el-select
v-model="Indexform.duty"
clearable
filterable
multiple
placeholder="请选择责任人"
>
<el-option
v-for="item in warehouseData"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div class="maxBox">
<span class="title">占比:</span>
<el-input
v-model="Indexform.investigationPocess"
placeholder="请输入调查经过"
clearable
:rows="2"
/>
</div>
</div>
<div class="el-btn"> <el-button type="primary" @click="ConfirmForm"> 移除 </el-button> </div>
</div>
</el-tab-pane>
</el-tabs>
<div class="Transport_damage_photos" v-if="SelectType == 1 || SelectType == 3 || StateType">
<span class="title">{{
SelectType == 1 ? '运损照片' : SelectType == 3 ? '窜货照片' : '照片'
@ -371,15 +429,15 @@
<script setup>
import { ElMessage } from 'element-plus';
import { ElMessageBox } from 'element-plus';
import { useRouter } from 'vue-router';
import { useRouter, useRoute } from 'vue-router';
import { getDictionaryBiz } from '@/api/system/dict'; //
import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //
import { $_getList, $_submit, $_getDetail, $_remove } from '@/api/aftersales/aftersalesWorkOrder';
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { getToken } from '@/utils/auth';
const $router = useRouter();
const $route = useRoute();
const Indexform = ref({
packList: [
{
@ -406,8 +464,9 @@ const ShortageState = ref(false); //少货件数弹窗状态
const fleeingState = ref(false); //
const ShortageList = ref([]); //
const fleeingList = ref([]); //
const valueStrictly = ref();
const routerID = ref(null); //ID
const routerState = ref(null); //
//
const responsible = ref([
{
@ -503,6 +562,8 @@ const handle = () => {
});
};
const onLoad = () => {
console.log($route.query.id, '页面初始化');
routerState.value = $route.query.RouterState;
updateDictionary(IndexException.value, 'pc_work_order'); //
updateDictionary(DiscoveringNodes.value, 'pc_discovery_node'); //
handle(); //
@ -629,16 +690,16 @@ const ConfirmForm = () => {
delete DataSubmit.processor; //
console.log(DataSubmit, '处理好的数据');
//stringify
// $_submit(DataSubmit).then(res => {
// if (res.data.code == 200) {
// ElMessage({
// message: res.data.msg,
// type: 'success',
// });
// Indexform.value = {}; //
// $router.push('/aftersales/VueTemp'); //
// }
// });
$_submit(DataSubmit).then(res => {
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
Indexform.value = {}; //
$router.push('/aftersales/VueTemp'); //
}
});
};
//
@ -856,4 +917,27 @@ const moneyBtnB = () => {
cursor: pointer;
}
}
.ResponsibilityBox {
width: 100%;
display: flex;
.leftbox {
width: 60%;
display: flex;
justify-content: space-between;
}
.maxBox {
display: flex;
align-items: center;
.title {
width: 100px;
}
.el-select {
width: 100%;
}
}
.el-btn{
margin-left: 5%;
}
}
</style>

633
src/views/aftersales/aftersalesWorkOrderSS.vue

@ -0,0 +1,633 @@
<template>
<basic-container>
<div class="avue-crud">
<el-row :hidden="!search" style="padding:6px 18px">
<!-- 查询模块 -->
<el-form :inline="true" :model="query">
<el-form-item label="异常类型:">
<!-- <el-input v-model="query.workOrderType" placeholder="请输入工单异常类型;货损,少货,窜货,加急,其他"></el-input>-->
<el-select v-model="query.workOrderType" placeholder="请输入工单异常类型;货损,少货,窜货,加急,其他" >
<el-option
v-for="item in this.workOrder"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="发现节点:">
<!-- <el-input v-model="query.discoveryNode" placeholder="请输入发现节点;提货,发货,干线,库内,配送,其他,签收(PC),安装(PC)"></el-input>-->
<el-select v-model="query.discoveryNode" placeholder="请输入发现节点;提货,发货,干线,库内,配送,其他,签收(PC),安装(PC)" >
<el-option
v-for="item in this.discoveryNode"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="异常工单号:">
<el-input v-model="query.workOrderNumber" placeholder="请输入异常工单号"></el-input>
</el-form-item>
<el-form-item label="订单自编号:">
<el-input v-model="query.orderCode" placeholder="请输入订单自编号"></el-input>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</el-form-item>
</el-form>
</el-row>
<el-row>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<!-- <el-button v-if="this.permissionList.addBtn" type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>-->
<!-- <el-button v-if="this.permissionList.delBtn" type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>-->
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleProcessor" plain>处理方信息</el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>
<el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div>
</div>
</el-row>
<el-row>
<!-- 列表模块 -->
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="data"
:height="height"
style="width: 100%"
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<el-table-column v-if="option.index" label="#" type="index" width="50" align="center">
</el-table-column>
<template v-for="(item,index) in option.column">
<!-- table字段 -->
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index">
</el-table-column>
</template>
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #default="{row}">
<!--<el-button v-if="this.permissionList.viewBtn" type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>
<el-button v-if="this.permissionList.editBtn" type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
<el-button v-if="this.permissionList.editBtn" type="primary" text icon="el-icon-edit" @click="handleReply(row)">回复</el-button>
<el-button v-if="this.permissionList.delBtn" type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>-->
<el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
<el-button type="primary" text icon="el-icon-edit" @click="handleReply(row)">回复</el-button>
<el-button type="primary" text icon="el-icon-edit" @click="handleAddExchange(row)">添加回复</el-button>
<el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row>
<div class="avue-crud__pagination" style="width:100%">
<!-- 分页模块 -->
<el-pagination align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[10, 20, 30, 40, 50, 100]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total">
</el-pagination>
</div>
</el-row>
<!-- 表单模块 -->
<el-dialog :title="title"
v-model="box"
width="50%"
:before-close="beforeClose"
append-to-body>
<el-form :disabled="view" ref="form" :model="form" label-width="120px">
<!-- 表单字段 -->
<el-form-item label="异常类型 " prop="workOrderType">
<el-select v-model="form.workOrderType" clearable placeholder="请选择工单异常类型;货损,少货,窜货,加急,其他">
<el-option
v-for="item in workOrder"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="发现节点 " prop="discoveryNode">
<el-select v-model="form.discoveryNode" clearable placeholder="请选择发现节点;提货,发货,干线,库内,配送,其他,签收(PC),安装(PC)">
<el-option
v-for="item in discoveryNode"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="异常工单号" prop="workOrderNumber">
<el-input v-model="form.workOrderNumber" placeholder="请输入异常工单号"/>
</el-form-item>
<el-form-item label="运单号" prop="waybillNumber">
<el-input v-model="form.waybillNumber" placeholder="请输入运单号"/>
</el-form-item>
<el-form-item label="订单自编号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入订单自编号"/>
</el-form-item>
<el-form-item label="车次号 " prop="trainNumber">
<el-input v-model="form.trainNumber" placeholder="请输入车次号 (干线卸车环节)"/>
</el-form-item>
<el-form-item label="一级品类" prop="first">
<el-input v-model="form.first" placeholder="请输入一级品类"/>
</el-form-item>
<el-form-item label="二级品类" prop="secondary">
<el-input v-model="form.secondary" placeholder="请输入二级品类"/>
</el-form-item>
<el-form-item label="车辆路线 " prop="vehicleRoute">
<el-input v-model="form.vehicleRoute" placeholder="请输入车辆路线;车次号、通过车次号自动带出车辆线路"/>
</el-form-item>
<el-form-item label="送货时间" prop="deliverGoodsTime">
<!-- <el-input v-model="form.deliverGoodsTime" placeholder="请输入送货时间"/> -->
<el-date-picker
v-model="form.deliverGoodsTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="发现时间 " prop="discoveryTime">
<!-- <el-input v-model="form.discoveryTime" placeholder="请输入发现时间 (库内作业环节,配送装车环节)"/> -->
<el-date-picker
v-model="form.discoveryTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="入库时间 " prop="warehousingTime">
<!-- <el-input v-model="form.warehousingTime" placeholder="请输入入库时间(库内作业环节)"/> -->
<el-date-picker
v-model="form.warehousingTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="运单商场" prop="waybillMall">
<el-input v-model="form.waybillMall" placeholder="请输入运单商场"/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="处理方 " prop="deliveryTime">
<!-- <el-input v-model="form.processor" placeholder="请输入配送时间(配送装车环节)"/> -->
<el-select v-model="processor" placeholder="请选择">
<el-option
v-for="item in warehouseData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="责任方 " prop="deliveryTime">
<!-- <el-input v-model="form.duty" placeholder="请输入配送时间(配送装车环节)"/> -->
<el-select v-model="duty" placeholder="请选择">
<el-option
v-for="item in warehouseData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="配送时间 " prop="deliveryTime">
<!-- <el-input v-model="form.deliveryTime" placeholder="请输入配送时间(配送装车环节)"/> -->
<el-date-picker
v-model="form.deliveryTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="配送司机 " prop="deliveryDriver">
<el-input v-model="form.deliveryDriver" placeholder="请输入配送司机(配送装车环节)"/>
</el-form-item>
<!-- <el-form-item label="工单状态" prop="workOrderStatus">
<el-input v-model="form.workOrderStatus" placeholder="请输入工单状态"/>
</el-form-item>-->
<!-- <el-form-item label="归属客服名称" prop="customerServiceName">
<el-input v-model="form.customerServiceName" placeholder="请输入归属客服名称"/>
</el-form-item>-->
<!-- <el-form-item label="完结时间" prop="overTime">
<el-input v-model="form.overTime" placeholder="请输入完结时间"/>
<el-date-picker
v-model="value1"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item> -->
<el-form-item label="异常问题描述" prop="problemDescription">
<el-input v-model="form.problemDescription" placeholder="请输入异常问题描述"/>
</el-form-item>
<el-form-item label="责任人" prop="personResponsible">
<el-input v-model="form.personResponsible" placeholder="请输入责任人 (库内作业环节)"/>
</el-form-item>
<!-- <el-form-item label="钉钉流程号" prop="processNumber">
<el-input v-model="form.processNumber" placeholder="请输入钉钉流程号"/>
</el-form-item>
<el-form-item label="审核人" prop="reviewedBy">
<el-input v-model="form.reviewedBy" placeholder="请输入审核人"/>
</el-form-item>
<el-form-item label="审核时间" prop="auditTime">
<el-input v-model="form.auditTime" placeholder="请输入审核时间"/>
</el-form-item>
<el-form-item label="财务入账时间" prop="entryTime">
<el-input v-model="form.entryTime" placeholder="请输入财务入账时间"/>
</el-form-item>-->
</el-form>
<!-- 表单按钮 -->
<template #footer>
<span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit"> </el-button>
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
</span>
</template>
</el-dialog>
</div>
</basic-container>
</template>
<script>
import { getList, getDetail, add, update, remove,getProcessor,addCompletionEnd } from "@/api/aftersales/aftersalesWorkOrder";
import { getExchangeList,add as addExchange } from "@/api/aftersales/aftersalesExchange";
import { add as addProcessingResults } from "@/api/aftersales/aftersalesProcessingResults";
import { add as addReturnRecord } from "@/api/aftersales/aftersalesReturnRecord";
import option from "@/option/aftersales/aftersalesWorkOrder";
import { getDetailWarehouse,getDeptWarehouse } from "@/api/basicdata/basicdataWarehouse";
import { mapGetters } from "vuex";
import { getDictionaryBiz } from '@/api/system/dict';
export default {
data () {
return {
height: 0,
//
title: '',
//
box: false,
//
search: true,
//
loading: true,
//
view: false,
//
query: {},
//
page: {
currentPage: 1,
pageSize: 10,
total: 40
},
//
form: {},
//
selectionList: [],
//
option: option,
//
data: [],
discoveryNode: [], //
workOrder: [],// 0
processor: '',//
duty: '',//
warehouseData: [], //
exchangeList: [], // hui
}
},
mounted() {
this.init();
this.onLoad(this.page);
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.param_add, false),
viewBtn: this.validData(this.permission.param_view, false),
delBtn: this.validData(this.permission.param_delete, false),
editBtn: this.validData(this.permission.param_edit, false),
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
init() {
this.height = this.setPx(document.body.clientHeight - 340);
getDictionaryBiz('pc_work_order').then(res => { //
this.workOrder = res.data.data;
console.log("异常工单字典",this.workOrder);
/*this.$functions.checkcColumnList('typeServerName', this.columnList).checkarr =
res.data.data.map(item => {
item.value = item.dictKey;
item.label = item.dictValue;
return item;
});*/
});
getDictionaryBiz('pc_discovery_node').then(res => { //
this.discoveryNode = res.data.data;
console.log("发起环节字典",this.discoveryNode);
/*this.$functions.checkcColumnList('typeServerName', this.columnList).checkarr =
res.data.data.map(item => {
item.value = item.dictKey;
item.label = item.dictValue;
return item;
});*/
});
this.getWarehouseInfo();
},
//
getWarehouseInfo(){
let ro ={}
getDeptWarehouse(ro).then(res =>{
this.warehouseData = res.data.data;
console.log("仓库信息",res.data.data);
});
},
//
handleAddExchange(row){
console.log("点击的数据》》》》",row);
let ro = {
workOrderId: row.id,
}
//
addExchange(ro).then(res =>{
console.log("查询的回复情况",res.data.data);
this.exchangeList = res.data.data;
})
},
//
handleaAcertainExchange(row){
console.log("点击的数据》》》》",row);
let ro = {
workOrderId: row.id,
}
//
addProcessingResults(ro).then(res =>{
console.log("查询的回复情况",res.data.data);
this.exchangeList = res.data.data;
})
},
//
handleaAddReturnRecord(row){
console.log("点击的数据》》》》",row);
let ro = {
workOrderId: row.id,
}
//
addReturnRecord(ro).then(res =>{
console.log("查询的回复情况",res.data.data);
this.exchangeList = res.data.data;
})
},
//
handleaAddCompletionEnd(row){
console.log("点击的数据》》》》",row);
let ro = {
workOrderId: row.id,
}
//
addCompletionEnd(ro).then(res =>{
console.log("查询的回复情况",res.data.data);
this.exchangeList = res.data.data;
})
},
//
handleReply(row){
console.log("点击的数据》》》》",row);
let ro = {
workOrderId: row.id,
}
getExchangeList(ro).then(res =>{
console.log("查询的回复情况",res.data.data);
this.exchangeList = res.data.data;
})
},
searchHide() {
this.search = !this.search;
},
searchChange() {
this.onLoad(this.page);
},
searchReset() {
this.query = {};
this.page.currentPage = 1;
this.onLoad(this.page);
},
handleSubmit() {
if (!this.form.id) {
let processorEntityList =[];
let row= { //
businessName: this.warehouseData.find(q=> q.id === this.processor).name ,
businessId: this.processor ,
conditions: 1,
typesOf:2
}
processorEntityList.push(row);
let row1= { //
businessName: this.warehouseData.find(q=> q.id === this.duty).name ,
businessId: this.duty ,
conditions: 1,
typesOf:1
}
processorEntityList.push(row1);
console.log("数据????>>",processorEntityList);
this.form.processorEntityList = processorEntityList;
console.log(this.form,'处理好的数据');
// add(this.form).then(() => {
// // this.box = false;
// this.onLoad(this.page);
// this.$message({
// type: "success",
// message: "!"
// });
// });
} else {
// update(this.form).then(() => {
// this.box = false;
// this.onLoad(this.page);
// this.$message({
// type: "success",
// message: "!"
// });
// })
}
},
handleAdd(){
this.title = '新增'
this.form = {}
this.box = true
},
//
handleProcessor() {
console.log(this.query);
const {
workOrderType,
discoveryNode,
workOrderNumber,
orderCode,
} = this.query;
let values = {
workOrderType_: workOrderType,
discoveryNode_: discoveryNode,
workOrderNumber_: workOrderNumber,
orderCode_: orderCode,
};
console.log("查询条件>>>>",values);
getProcessor(this.page.currentPage, this.page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
console.log("处理方数据>>>>",this.data);
});
},
handleEdit(row) {
this.title = '编辑'
this.box = true
getDetail(row.id).then(res => {
this.form = res.data.data;
});
},
handleView(row) {
this.title = '查看'
this.view = true;
this.box = true;
getDetail(row.id).then(res => {
this.form = res.data.data;
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.selectionClear();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
beforeClose (done) {
done()
this.form = {};
this.view = false;
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.table.clearSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.onLoad(this.page);
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
this.onLoad(this.page);
},
onLoad(page, params = {}) {
this.loading = true;
const {
workOrderType,
discoveryNode,
workOrderNumber,
orderCode,
} = this.query;
let values = {
workOrderType_: workOrderType,
discoveryNode_: discoveryNode,
workOrderNumber_: workOrderNumber,
orderCode_: orderCode,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>

120
src/views/aftersales/VueTempend.vue → src/views/aftersales/aftersalesWorkOrderend.vue

@ -56,13 +56,13 @@
/>
</el-form-item>
<el-form-item label="货时间">
<el-form-item label="货时间">
<el-date-picker
v-model="endFrom.warehousingTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择货时间"
placeholder="请选择货时间"
:disabled="FromDisabled"
/>
</el-form-item>
@ -83,6 +83,7 @@
default-first-option
:reserve-keyword="false"
placeholder="请选择处理方"
@change="css"
>
<el-option
v-for="item in warehouseData"
@ -198,12 +199,12 @@
<!-- 备注信息 -->
<div class="notes">
<el-form-item label="备注">
<el-form-item label="异常问题描述">
<el-input
v-model="endFrom.name"
v-model="endFrom.problemDescription"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
placeholder="请输入备注"
placeholder="请输入异常问题描述"
/>
</el-form-item>
</div>
@ -304,20 +305,13 @@
>{{ item.state == 0 ? '赔款方' : '收款方' }}{{ item.cld }}</span
>
<div class="sk_input">
<el-input v-model="item.name" placeholder="请填写赔款方" />
<el-input v-model="item.name" :placeholder="item.state == 0 ? '请填写赔款方' : '请填写收款方'"/>
</div>
<div class="sk_input">
<el-input v-model="item.reason" placeholder="请填写原因" />
</div>
<div class="sk_input">
<el-input-number
@input="amountMoney"
:min="0"
precision="2"
controls-position="right"
v-model="item.num"
placeholder="金额"
/>
<el-input @input="amountMoney" :min="0" v-model="item.num" placeholder="金额" />
</div>
<el-button type="danger" round @click="payremove(item.state, index)">移除</el-button>
</div>
@ -390,7 +384,7 @@ import { ElMessage } from 'element-plus';
import { ElMessageBox } from 'element-plus';
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //
import { $_getInfo, $_addSubmit } from '@/api/aftersales/aftersalesWorkOrder';
import { $_getInfo, $_addSubmit, $_addCompletionEnd } from '@/api/aftersales/aftersalesWorkOrder';
import { columnList, recordList } from '@/option/aftersales/vueTvemp.js';
import { getToken } from '@/utils/auth';
import { useRoute } from 'vue-router';
@ -409,13 +403,17 @@ const endFrom = ref({
//
],
videoUrl: {}, //
result: [],
});
const viodUrl = ref({});
const videoUrl = ref(null); //
const VideoPreviewStatus = ref(false); //
const warehouseData = ref([]); //
const CompensationParty = ref([{ name: '', state: 0, num: 0, reason: '', cld: 1 }]); ///
const CompensationParty = ref([
{ name: '', state: 0, num: null, reason: '', cld: 1 }, //
{ name: '', state: 1, num: null, reason: '', cld: 1 }, //
]); ///
const ProcessingList = ref([]); //
const TransportlossList = ref([
//
@ -569,8 +567,41 @@ const onLoad = () => {
routerState.value = $route.query.RouterState; //
console.log(routerState.value, '当前状态');
$_getInfo({ id: $route.query.id }).then(res => {
console.log(res, '回显返回值参数');
endFrom.value = res.data.data;
console.log(res, '参数');
endFrom.value.sss = 123123;
endFrom.value.result = [];
endFrom.value.processor = [];
//
res.data.data.processingResultsVO.processingMoneyEntityList.forEach(item => {
ProcessingList.value.push({
input: item.money,
min: 0,
max: 9999999999999,
state: item.resultType,
payment: item.compensationMethod,
name: item.resultTypeName,
});
endFrom.value.result.push(item.resultType);
});
res.data.data.processorVOList.forEach(item => {
if (item.typesOf == 2) {
//
endFrom.value.processor.push(String(item.id));
}
});
console.log(ProcessingList.value, '价格');
//
res.data.data.decreaseImageVOList.forEach(res => {
endFrom.value['packageImage'].push({
name: res.imageName,
url: res.imagePath,
});
});
//
console.log(endFrom.value, '当前参数');
});
}
getDictionaryBiz('result_handling').then(res => {
@ -638,7 +669,10 @@ const changeProcessingResults = val => {
}
});
};
//
const css = () => {
console.log(endFrom.value.processor);
};
// TOKEN
const headers = computed(() => {
return { 'Blade-Auth': 'Bearer ' + getToken() };
@ -758,6 +792,8 @@ const amountMoney = () => {
};
//
const PaymentSelection = val => {
console.log(val, '支付');
console.log(Paymentmethod.value);
if (val.payment) {
//
let data = Paymentmethod.value.find(item => item.dictKey == val.payment);
@ -778,7 +814,7 @@ const PaymentConfirmation = val => {
message: '支付方式选择成功',
type: 'success',
});
// console.log(ProcessingList.value,'');
console.log(ProcessingList.value, '选择好的支付列表');
};
//
const submit = () => {
@ -801,8 +837,52 @@ const submit = () => {
});
return;
}
console.log(CompensationParty.value, 'CompensationParty');
let info = JSON.parse(JSON.stringify(endFrom.value)); //
console.log(info, 'info');
let data = [
{
completionRecipientEntities: [], //
completionRecordEntities: [],
...info,
},
];
console.log(endFrom.value.duty, '责任方');
console.log('赔款总计金额', TotalamountCompensation.value);
console.log('收款总计金额', TotalamountReceived.value);
CompensationParty.value.forEach(item => {
if (item.state == 0) {
//
data[0]['completionRecordEntities'].push({
indemnitor: item.name, //
reason: item.reason, //
money: Number(item.num), //
reasonArbitration: endFrom.value.arbitrate, //
workOrderId: info.id, //
warehouseId: info.warehouseId, //ID
});
} else {
//
data[0]['completionRecipientEntities'].push({
recipient: item.name, //
reasonReceivingPayment: item.reason, //
money: Number(item.num), //
responsibleParty: endFrom.value.duty.length ? endFrom.value.duty.join(',') : '', //
workOrderNumber: info.workOrderNumber, //
workOrderId: info.id, //
warehouseId: info.warehouseId, //ID
});
}
});
//
console.log(data, '处理好的值');
$_addCompletionEnd(data).then(res => {
console.log(res, '完结成功返回值');
});
return;
} else {
//
console.log(ProcessingList.value, 'ProcessingList12312');
Loading…
Cancel
Save