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

Loading…
Cancel
Save