qb 1 year ago
parent
commit
e350af0620
  1. 9
      src/api/aftersales/aftersalesWorkOrder.js
  2. 6
      src/option/aftersales/vueTvemp.js
  3. 253
      src/views/aftersales/aftersalesWorkOrder.vue

9
src/api/aftersales/aftersalesWorkOrder.js

@ -389,4 +389,13 @@ export const $_updateManagerConfirmed = (data) => {
method: 'put', method: 'put',
data data
}) })
}
// 申诉回显
export const $_AppealDetails = (params) => {
return request({
url: '/api/logpm-aftersales/aftersalesAppeal/detail',
method: 'get',
params
})
} }

6
src/option/aftersales/vueTvemp.js

@ -404,7 +404,7 @@ export const Claimsfield = [
}, },
{ {
prop: 'workOrderNumber', prop: 'workOrderNumber',
label: '工单号', label: '异常工单号',
type: 2, type: 2,
values: '', values: '',
width: '130', width: '130',
@ -679,7 +679,7 @@ export const AppealList = [
{ {
prop: 'workOrderNumber', prop: 'workOrderNumber',
label: '工单号', label: '异常工单号',
type: 2, type: 2,
values: '', values: '',
width: '130', width: '130',
@ -777,7 +777,7 @@ export const timeoutList = [
{ {
prop: 'workOrderNumber', prop: 'workOrderNumber',
label: '工单号', label: '异常工单号',
type: 2, type: 2,
values: '', values: '',
width: '130', width: '130',

253
src/views/aftersales/aftersalesWorkOrder.vue

@ -125,6 +125,7 @@
<el-button v-if="ButtonPermissions.appeal" type="primary" @click="appeal" <el-button v-if="ButtonPermissions.appeal" type="primary" @click="appeal"
>申诉</el-button >申诉</el-button
> >
<!-- v-if="details.query.workOrderStatus == 30" --> <!-- v-if="details.query.workOrderStatus == 30" -->
<!-- <el-button type="primary" @click="ProcessingParty"> 处理方信息</el-button> --> <!-- <el-button type="primary" @click="ProcessingParty"> 处理方信息</el-button> -->
</div> </div>
@ -148,6 +149,7 @@
:columnList="publicColumnList" :columnList="publicColumnList"
:tableData="data" :tableData="data"
:loading="loadingObj.list" :loading="loadingObj.list"
:checkselect="selectList"
@inputTxt="inputsc" @inputTxt="inputsc"
@timeCheck="timesc" @timeCheck="timesc"
@btnCheck="btnsc" @btnCheck="btnsc"
@ -170,7 +172,7 @@
<div> <div>
<!-- <el-button @click="addingRecord(slotProps.scope)">新增记录</el-button> --> <!-- <el-button @click="addingRecord(slotProps.scope)">新增记录</el-button> -->
<el-button <el-button
v-if="TabPermissions != '4' || !AppealStatusT" v-if="TabPermissions != '4' && !AppealStatusT"
@click="view(slotProps.scope)" @click="view(slotProps.scope)"
>查看</el-button >查看</el-button
> >
@ -183,17 +185,19 @@
<el-button <el-button
v-if="TabPermissions == '6' && !AppealStatusT" v-if="TabPermissions == '6' && !AppealStatusT"
@click="appeal" @click="appeal(slotProps.scope, false)"
>申诉</el-button >申诉</el-button
> >
<el-button v-if="AppealStatusT" @click="appeal(slotProps.scope, 'edit')"
>编辑</el-button
>
<el-button <el-button
v-if="AppealStatusT" v-if="AppealStatusT"
@click="DetermineStorage(slotProps.scope)" >取消申诉</el-button
>取消</el-button
> >
<!-- AppealStatusT申诉列表状态 --> <!-- AppealStatusT申诉列表状态 -->
<!-- <el-button v-if="AppealStatusT" @click="Appealeditor">编辑</el-button> --> <!-- <el-button v-if="AppealStatusT" @click="Appealeditor">编辑</el-button> -->
<!-- <el-button @click="ViewEvent(slotProps.scope)">编辑</el-button> --> <!-- <el-button @click="ViewEvent(slotProps.scope)">编辑</el-button> -->
@ -368,33 +372,28 @@
</div> </div>
<div class="sk_input" v-if="item.state == 0"> <div class="sk_input" v-if="item.state == 0">
<el-select v-model="item.warehouseId" filterable placeholder="请选择仓库"> <el-select v-model="item.warehouseId" filterable placeholder="请选择仓库">
<el-option <el-option
v-for="item in warehouseData" v-for="item in warehouseData"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</div> </div>
<div class="sk_input" v-if="item.state == 0">
<el-input
v-model="item.personResponsibleName"
placeholder="请填写责任人"
clearable
:rows="2"
/>
</div>
<div class="sk_input" v-if="item.state == 0">
<el-input
v-model="item.personResponsibleName"
placeholder="请填写责任人"
clearable
:rows="2"
/>
</div>
<div class="sk_input" v-if="item.state == 1"> <div class="sk_input" v-if="item.state == 1"></div>
</div>
<div class="sk_input" v-if="item.state == 1"> <div class="sk_input" v-if="item.state == 1"></div>
</div>
<el-button type="danger" round @click="payremove(item.state, index)" <el-button type="danger" round @click="payremove(item.state, index)"
>移除</el-button >移除</el-button
> >
@ -445,20 +444,22 @@
<!-- 申诉弹窗 --> <!-- 申诉弹窗 -->
<el-dialog v-model="dialogappeal" title="工单申诉" width="30%"> <el-dialog v-model="dialogappeal" title="工单申诉" width="30%">
<div class="el_appeal" v-loading="loadingappeal" element-loading-text="Loading..."> <div class="el_appeal" v-loading="loadingappeal" element-loading-text="Loading...">
<el-select <el-form-item label="选择实际责任方">
v-model="Appealselection" <el-select
clearable v-model="Appealselection"
filterable clearable
multiple filterable
placeholder="请选择实际责任方" multiple
> placeholder="请选择实际责任方"
<el-option >
v-for="item in warehouseData" <el-option
:key="item.value" v-for="item in warehouseData"
:label="item.label" :key="item.value"
:value="item.value" :label="item.label"
/> :value="item.value"
</el-select> />
</el-select>
</el-form-item>
<el-input <el-input
v-model="Reasonforappeal" v-model="Reasonforappeal"
:rows="4" :rows="4"
@ -586,6 +587,7 @@ import {
$_updateWorkList, $_updateWorkList,
$_updateManagerConfirmed, $_updateManagerConfirmed,
$_updateWorkOrderStatus, $_updateWorkOrderStatus,
$_AppealDetails,
} from '@/api/aftersales/aftersalesWorkOrder'; } from '@/api/aftersales/aftersalesWorkOrder';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import { getDictionaryBiz } from '@/api/system/dict'; // import { getDictionaryBiz } from '@/api/system/dict'; //
@ -654,6 +656,7 @@ const publicColumnList = ref([]); //公共列表参数
const scrollContainer = ref(null); // const scrollContainer = ref(null); //
const workOrderStatus = ref(null); // const workOrderStatus = ref(null); //
const BatchFrom = ref({}); // const BatchFrom = ref({}); //
const selectList=ref([]);//
const currentPage = ref(1); // const currentPage = ref(1); //
const TransportlossList = ref([ const TransportlossList = ref([
// //
@ -686,6 +689,7 @@ const loadingappeal = ref(false); //工单申诉状态
const SelectType = ref(null); // const SelectType = ref(null); //
const ListRow = ref(); // const ListRow = ref(); //
const appealList = ref(); // const appealList = ref(); //
const appealData = ref(); //
const StateType = ref(true); // const StateType = ref(true); //
const dialogassign = ref(false); // const dialogassign = ref(false); //
const AssignLoad = ref(false); // const AssignLoad = ref(false); //
@ -719,6 +723,7 @@ const AppealStatus = ref(false); //申诉列表状态
const dialogModifyAmount = ref(false); // const dialogModifyAmount = ref(false); //
const UserPermissions = ref('仓库客服'); // const UserPermissions = ref('仓库客服'); //
const TabPermissions = ref(0); // const TabPermissions = ref(0); //
const AppealeditorState = ref(false); //()
const AppealStatusT = ref(false); // const AppealStatusT = ref(false); //
const TabList = ref([ const TabList = ref([
{ name: 0, label: '全部', state: true }, { name: 0, label: '全部', state: true },
@ -734,8 +739,8 @@ const TabList = ref([
const DeliveryDriver = ref([]); const DeliveryDriver = ref([]);
const CompensationParty = ref([ const CompensationParty = ref([
{ name: '', state: 0, num: null, reason: '', cld: 1 ,warehouseId:'',personResponsibleName:''}, // { name: '', state: 0, num: null, reason: '', cld: 1, warehouseId: '', personResponsibleName: '' }, //
{ name: '', state: 1, num: null, reason: '', cld: 1 ,warehouseId:'',personResponsibleName:''}, // { name: '', state: 1, num: null, reason: '', cld: 1, warehouseId: '', personResponsibleName: '' }, //
]); /// ]); ///
const details = reactive({ const details = reactive({
@ -1076,17 +1081,16 @@ const IndexTable = val => {
item => item.dictValue == JSON.parse(localStorage.getItem('TWMS-userInfo')).content.role_name item => item.dictValue == JSON.parse(localStorage.getItem('TWMS-userInfo')).content.role_name
); );
if (matchingItem) { if (matchingItem) {
console.log(TabList.value,'导航'); console.log(TabList.value, '导航');
UserPermissions.value = matchingItem.dictValue; UserPermissions.value = matchingItem.dictValue;
console.log(matchingItem.dictValue,'角色'); console.log(matchingItem.dictValue, '角色');
if(matchingItem.dictValue!='仓库客服'){ if (matchingItem.dictValue != '仓库客服') {
TabList.value[2].state=false TabList.value[2].state = false;
}else{ } else {
TabList.value[2].state=true TabList.value[2].state = true;
} }
} else { } else {
TabList.value[2].state=true TabList.value[2].state = true;
UserPermissions.value = '仓库客服'; UserPermissions.value = '仓库客服';
} }
console.log(UserPermissions.value, '当前角色权限'); console.log(UserPermissions.value, '当前角色权限');
@ -1342,14 +1346,13 @@ const view = val => {
businessId: val.row.businessId, businessId: val.row.businessId,
ProcessType: TabPermissions.value == 2 ? '2' : TabPermissions.value == 3 ? '1' : '', // 1 2 ProcessType: TabPermissions.value == 2 ? '2' : TabPermissions.value == 3 ? '1' : '', // 1 2
RouteIndexs: TabPermissions.value, // RouteIndexs: TabPermissions.value, //
}, },
}); });
}; };
// //
const Appealeditor = (val) => { const Appealeditor = val => {
// //
$router.push({ $router.push({
path: '/aftersales/aftersalesWorkOrdermodify', path: '/aftersales/aftersalesWorkOrdermodify',
query: { query: {
@ -1359,12 +1362,11 @@ const Appealeditor = (val) => {
warehouseId: val.row.warehouseId, warehouseId: val.row.warehouseId,
workOrderNumber: val.row.workOrderNumber, workOrderNumber: val.row.workOrderNumber,
RouterState: 'Kfend', RouterState: 'Kfend',
Appealeditor: 'appeal',// Appealeditor: 'appeal', //
}, },
}); });
}; };
// //
const ViewDelete = val => { const ViewDelete = val => {
ElMessageBox.confirm(`是否删除该条数据?`) ElMessageBox.confirm(`是否删除该条数据?`)
@ -1455,26 +1457,65 @@ const AppealAttachmentImgSuccess = val => {
console.log(val, '申诉图片上传成功'); console.log(val, '申诉图片上传成功');
}; };
// //
const appeal = val => { const appeal = (val, state) => {
console.log(details.selectionList, 'details.selectionList'); console.log(state);
if (!details.selectionList.length) { console.log(val.row, '申诉当前点击的按钮');
ElMessage({ if (state == 'edit') {
message: '请选择要申诉的数据', //
type: 'warning',
}); details.selectionList.push(val.row);
AppealeditorState.value = true; //
if(val.row) {
selectList.value.push(val.row)
}
let data={
id:val.row.id,
}
$_AppealDetails(data).then(res=>{
console.log(res,'申诉编辑回显');
Reasonforappeal.value = res.data.data.reason;//
setTimeout(()=>{
console.log(res.data.data.peopleEntityList.map(item=>item.actualPersonId));
console.log(warehouseData.value,'仓库数据');
// Appealselection.value=
dialogappeal.value = true; //
},0)
})
return; return;
} }
if (details.selectionList.length > 1) {
ElMessage({ if (!state) {
message: '只能单条申诉', //
type: 'warning', AppealeditorState.value = false; //
}); if(val.row){
return; details.selectionList.push(val.row);
}
dialogappeal.value = true; //
} else {
//
console.log(details.selectionList, 'details.selectionList');
if (!details.selectionList.length) {
ElMessage({
message: '请选择要申诉的数据',
type: 'warning',
});
return;
}
if (details.selectionList.length > 1) {
ElMessage({
message: '只能单条申诉',
type: 'warning',
});
return;
}
dialogappeal.value = true; //
} }
dialogappeal.value = true; //
}; };
// //
const Appealbutton = () => { const Appealbutton = state => {
if (AppealAttachment.value.length > 1) { if (AppealAttachment.value.length > 1) {
ElMessage({ ElMessage({
message: '只能上传一张图片', message: '只能上传一张图片',
@ -1482,6 +1523,7 @@ const Appealbutton = () => {
}); });
return; return;
} }
// appealData.value
console.log(details.selectionList, '当前申诉的东西'); console.log(details.selectionList, '当前申诉的东西');
loadingappeal.value = true; // loadingappeal.value = true; //
console.log(Appealselection.value, '当前选择的责任人'); console.log(Appealselection.value, '当前选择的责任人');
@ -1490,34 +1532,40 @@ const Appealbutton = () => {
peopleEntityList: [], // peopleEntityList: [], //
imagePath: '', // imagePath: '', //
}; };
data.workOrderId = details.selectionList[0].lawoId; data.workOrderId = details.selectionList[0].id;
data.reason = Reasonforappeal.value; data.reason = Reasonforappeal.value;
data.appealPeopleName = warehouseData.value data.appealPeopleName = warehouseData.value
.filter(item => Appealselection.value.includes(item.value)) .filter(item => Appealselection.value.includes(item.value))
.map(item => item.label) .map(item => item.label)
.join(','); // .join(','); //
//ID
console.log(AppealeditorState.value,'申诉状态');
if (AppealeditorState.value) {
data.id = details.selectionList[0].id;
}
console.log(details.selectionList,'准备处理的数据');
details.selectionList.forEach(item => { details.selectionList.forEach(item => {
console.log(item.id);
console.log(item, '已经选择的列表'); console.log(item, '已经选择的列表');
data['peopleEntityList'].push({ data['peopleEntityList'].push({
workOrderId: item.id, //ID workOrderId: item.id, //ID
warehouseId: item.warehouseId == '/' ? '' : item.warehouseId, warehouseId: item.warehouseId == '/' ? '' : item.warehouseId,
reason: Reasonforappeal.value, // reason: Reasonforappeal.value, //
claimant: userInfo.value.content.user_name, // claimant: userInfo.value.content.user_name, //
claimantUserId: userInfo.value.content.user_id, //ID actualPersonId: warehouseData.value
.filter(item => Appealselection.value.includes(item.value))
.map(item => item.value)
.join(','), //ID
actualPersonName: warehouseData.value actualPersonName: warehouseData.value
.filter(item => Appealselection.value.includes(item.value)) .filter(item => Appealselection.value.includes(item.value))
.map(item => item.label) .map(item => item.label)
.join(','), // .join(','), //
}); });
}); });
if(AppealAttachment.value.length){ if (AppealAttachment.value.length) {
data.imagePath = AppealAttachment.value[0].response.data.link; // data.imagePath = AppealAttachment.value[0].response.data.link; //
} }
console.log(data, '处理好的值');
console.log(data, '处理好的值');
$_appealSubmit(data).then(res => { $_appealSubmit(data).then(res => {
dialogappeal.value = false; // dialogappeal.value = false; //
loadingappeal.value = false; // loadingappeal.value = false; //
@ -1527,6 +1575,8 @@ const Appealbutton = () => {
details.query.workOrderStatus = 30; details.query.workOrderStatus = 30;
ArbitrationStatus.value = false; // ArbitrationStatus.value = false; //
tabValue.value = 2; tabValue.value = 2;
AppealeditorState.value = false; //
appealData.value = {}; //
empty(); // empty(); //
IndexTable({ workOrderStatus: 30 }); IndexTable({ workOrderStatus: 30 });
if (res.data.code == 200) { if (res.data.code == 200) {
@ -1538,8 +1588,6 @@ const Appealbutton = () => {
}); });
}; };
// //
const abnormalChange = val => { const abnormalChange = val => {
console.log(val); console.log(val);
@ -1872,20 +1920,18 @@ const appealFn = val => {
$_listAppeal(data).then(res => { $_listAppeal(data).then(res => {
details.loadingObj.list = false; // details.loadingObj.list = false; //
console.log(res, '申诉列表返回值'); console.log(res, '申诉列表返回值');
if(res.data.data.records.length){ if (res.data.data.records.length) {
details.data = res.data.data.records; details.data = res.data.data.records;
}else{ } else {
details.data=[{}] details.data = [{}];
} }
page.value.total = res.data.data.total; page.value.total = res.data.data.total;
}); });
}; };
// //
const AppealTab = val => { const AppealTab = val => {
if (val == 0) { if (val == 0) {
AppealStatusT.value = false; // AppealStatusT.value = false; //
Tableheaderswitching(columnList); // Tableheaderswitching(columnList); //
@ -2049,12 +2095,12 @@ const tabChenge = val => {
} else if (val == 8) { } else if (val == 8) {
// //
console.log('待回复'); console.log('待回复');
if(UserPermissions.value=='仓库客服'){ if (UserPermissions.value == '仓库客服') {
data.workOrderStatus = ''; data.workOrderStatus = '';
details.query.workOrderStatus = ''; details.query.workOrderStatus = '';
Tableheaderswitching(columnList); Tableheaderswitching(columnList);
empty(); empty();
ProcessingPartyFun(data); ProcessingPartyFun(data);
} }
} }
}; };
@ -2271,7 +2317,7 @@ const DetermineStorage = val => {
let ID = {}; let ID = {};
ID = val.row.id; ID = val.row.id;
data['assignList'].push(ID); data['assignList'].push(ID);
if(TabPermissions.value=='6'){ if (TabPermissions.value == '6') {
$_updateManagerConfirmed(data).then(res => { $_updateManagerConfirmed(data).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
ElMessage({ ElMessage({
@ -2284,7 +2330,7 @@ const DetermineStorage = val => {
// //
console.log(data, '处理好的值'); console.log(data, '处理好的值');
} }
if(TabPermissions.value=='2'){ if (TabPermissions.value == '2') {
console.log(data, '处理好的数据'); console.log(data, '处理好的数据');
$_updateWorkOrderStatus(data).then(res => { $_updateWorkOrderStatus(data).then(res => {
console.log(res, '确定提交存储'); console.log(res, '确定提交存储');
@ -2492,7 +2538,15 @@ const AddCompensation = () => {
som++; som++;
} }
}); });
CompensationParty.value.push({ name: '', state: 0, num: 0, reason: '', cld: som ,warehouseId:'',personResponsibleName:''}); CompensationParty.value.push({
name: '',
state: 0,
num: 0,
reason: '',
cld: som,
warehouseId: '',
personResponsibleName: '',
});
}; };
// //
const AddPayee = () => { const AddPayee = () => {
@ -2566,7 +2620,6 @@ const Batchcompletion = () => {
// //
const CompletedSubmission = () => { const CompletedSubmission = () => {
PLloading.value = true; // PLloading.value = true; //
console.log(CompensationParty.value); console.log(CompensationParty.value);
let pay = CompensationParty.value.find(item => item.cld == 1); let pay = CompensationParty.value.find(item => item.cld == 1);
@ -2606,8 +2659,8 @@ const CompletedSubmission = () => {
money: Number(party.num), money: Number(party.num),
reasonArbitration: Reasonarbitration.value, reasonArbitration: Reasonarbitration.value,
// workOrderId: selection.id, // workOrderId: selection.id,
warehouseId: party.warehouseId,// warehouseId: party.warehouseId, //
personResponsibleName:party.personResponsibleName personResponsibleName: party.personResponsibleName,
}; };
// completionRecordEntities // completionRecordEntities
data[index].completionRecordEntities.push(record); data[index].completionRecordEntities.push(record);

Loading…
Cancel
Save