Browse Source

商配新增取消配送功能,取消客服获取记录限制

dev-xx
马远东 1 year ago
parent
commit
11c7853fd1
  1. 14
      src/api/aftersales/aftersalesWorkOrder.js
  2. 9
      src/api/distribution/distributionDeliveryList.js
  3. 61
      src/option/aftersales/vueTvemp.js
  4. 129
      src/views/aftersales/aftersalesWorkOrder.vue
  5. 127
      src/views/aftersales/aftersalesWorkOrderInfo.vue
  6. 167
      src/views/aftersales/aftersalesWorkOrderend.vue
  7. 34
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  8. 5
      src/views/distribution/inventory/distributionStockListDetails.vue

14
src/api/aftersales/aftersalesWorkOrder.js

@ -458,9 +458,6 @@ export const $_updateArbitrateStatu = (data) => {
}
// 导出报表
export const $_exportAftersalesWorkOrder = (params) => {
return request({
url: '/api/logpm-aftersales/aftersalesWorkOrder/export-aftersalesWorkOrder',
@ -469,3 +466,14 @@ export const $_exportAftersalesWorkOrder = (params) => {
responseType: 'blob',
})
}
// 查询仓库客服指派信息
export const $_aftersalesCustomerMall = (params) => {
return request({
url: '/api/logpm-aftersales/aftersalesCustomerMall/list',
method: 'get',
params,
})
}

9
src/api/distribution/distributionDeliveryList.js

@ -338,3 +338,12 @@ export const $_isSignt = params => {
params,
});
};
// 商配取消配送
export const $_cancelDelivery = data => {
return request({
url: '/api/logpm-distribution/deliveryList/cancelDelivery',
method: 'post',
data: data,
});
};

61
src/option/aftersales/vueTvemp.js

@ -902,3 +902,64 @@ export const timeoutList = [
sortable: false,
},
]
export const CustomerColumnList = [
{
prop: '',
label: '序号',
type: 12,
values: '',
width: 55,
fixed: true,
},
{
prop: 'customerServiceName',
label: '客服名称',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'clientName',
label: '仓库名称',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'createTime',
label: '创建时间',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: '',
label: '操作',
type: 6,
values: '',
width: '120',
checkarr: [],
fixed: 'right',
sortable: false,
},
]

129
src/views/aftersales/aftersalesWorkOrder.vue

@ -90,7 +90,10 @@
<el-button type="primary" @click="exportReport">
<el-icon><Plus /></el-icon></el-button
>
<el-button type="primary" @click="defaultAssignments">
<el-icon><Plus /></el-icon></el-button
>
<!-- <el-button type="primary" @click="BatchDelete">
<el-icon><Delete /></el-icon></el-button
@ -192,7 +195,7 @@
@selection="selectionChange"
:tableRowClassName="
(row, index) => {
if (row.customerServiceName) return 'Abnormal';
if ((row.departStatus !=null && row.departStatus)) return 'Abnormal';
else return '';
}
"
@ -699,6 +702,87 @@
</span>
</template>
</el-dialog>
<el-dialog
v-model="CustomerServicea"
title="客服指派"
width="50%"
class="el_Customer"
>
<div>
<el-row>
<!-- 列表模块 -->
<tablecmt
:columnList="CustomerColumnList"
:tableData="CustomerData"
:loading="CustomerLoad"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
<el-button @click="view(slotProps.scope)">解绑</el-button>
<el-button @click="view(slotProps.scope)">设为默认</el-button>
</div>
</template>
</template>
</tablecmt>
</el-row>
<!-- 分页模块 -->
<el-row class="el_FyCustomer">
<div></div>
<el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="CustomerTotal"
>
</el-pagination>
</el-row>
</div>
<div>
<el-form-item label="仓库选择">
<el-select
v-model="BatchFrom.businessDepartment"
multiple
filterable
default-first-option
:reserve-keyword="false"
placeholder="请选择仓库"
>
<el-option
v-for="item in warehouseData"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="dialogVisible = false">
确定
</el-button>
</span>
</template>
</el-dialog>
</basic-container>
</div>
</el-tabs>
@ -745,6 +829,7 @@ import {
$_settlementUpdate,
$_updateArbitrateStatu,
$_exportAftersalesWorkOrder,
$_aftersalesCustomerMall,
} from '@/api/aftersales/aftersalesWorkOrder';
import { getToken } from '@/utils/auth';
import NProgress from 'nprogress';
@ -768,6 +853,7 @@ import {
Claimsfield,
AppealList,
timeoutList,
CustomerColumnList,
} from '@/option/aftersales/vueTvemp.js';
import { processRowProperty, isNumer, computeNumber } from '@/utils/util';
import { useRouter } from 'vue-router';
@ -826,6 +912,7 @@ const PermissionButton = computed(() => {
information_editing: accessControl.information_editing, //
};
});
const CustomerServicea = ref(false);//
const dialogCustomer=ref(false);//
const CustomerServiceForm=ref({});//
const DingTalkfilling = ref({}); //
@ -836,6 +923,7 @@ const scrollContainer = ref(null); //客服实例
const workOrderStatus = ref(null); //
const BatchFrom = ref({}); //
const selectList = ref([]); //
const CustomerLoad = ref(false);//
const currentPage = ref(1); //
const TransportlossList = ref([
//
@ -845,6 +933,7 @@ const AppealAttachment = ref([]); //申诉附件
const total = ref(0); //
const KFinput = ref(''); //
const Appealselection = ref([]); //
const CustomerTotal= ref(0);//
const KFfeel = ref(''); //
const pageList = ref([5, 10, 50, 100, 200]); //
const background = ref(true); //
@ -883,6 +972,7 @@ const screenHeight = ref(0); // 屏幕高度
const eightyPercentHeight = ref(0); // 80%
const list = ref([]);
const options = ref([]);
const CustomerData= ref([]);//
const repulse = ref(false);
const dialogBatchcompletion = ref(false); //
const PLloading = ref(false);
@ -911,8 +1001,8 @@ const TabList = ref([
{ name: 8, label: '待回复', state: false },
{ name: 1, label: '处理中', state: true },
{ name: 2, label: '处理完毕', state: true },
{ name: 6, label: '完结', state: true },
{ name: 5, label: '仲裁中', state: true },
{ name: 6, label: '仲裁中', state: true },
{ name: 5, label: '客服介入', state: true },
{ name: 4, label: '理赔金额未出', state: true },
{ name: 7, label: '超时未处理', state: true },
]); //
@ -3416,8 +3506,6 @@ const Assignbutton = () => {
});
};
//
const arbitrate=()=>{
if (!details.selectionList.length) {
console.log('当前没有数据');
@ -3427,7 +3515,7 @@ const arbitrate=()=>{
});
return;
}
let resultState = details.selectionList.every(item => item.workOrderStatus != '30'); //
let resultState = details.selectionList.every(item => item.workOrderStatus == '10' && item.workOrderStatus =='20'); //
if (!resultState) {
ElMessage({
message: '勾选数据不符合(待处理或处理中才可以申请仲裁)',
@ -3757,6 +3845,24 @@ console.log('导出报表');
// console.log(res,'');
// })
}
//
const defaultAssignments=()=>{
CustomerServicea.value = true;//
let data={
current: details.page.currentPage,
size: details.page.pageSize,
}
CustomerLoad.value=true;//
$_aftersalesCustomerMall(data).then(res=>{
console.log(res,'');
CustomerData.value = res.data.data.records
CustomerTotal.value = res.data.data.total
}).catch(res=>{
}).finally(res=>{
CustomerLoad.value=false;//
})
}
</script>
<style scoped lang="scss">
@ -4321,4 +4427,13 @@ console.log('导出报表');
}
}
}
.el_Customer{
#bodys{
height: 300px !important;
}
}
.el_FyCustomer{
margin-top: 3px;
justify-content: space-between;
}
</style>

127
src/views/aftersales/aftersalesWorkOrderInfo.vue

@ -1069,10 +1069,7 @@ const PermissionButton = computed(() => {
const Chathistory = res => {
Msgloading.value = true;
let filetype = ''; //
if (UserPermissions.value != '仓库客服') {
console.log(UserPermissions.value, '当前不是仓库客服');
$_getTrackRecord({
$_getSurveyRecord({
id: $route.query.id,
})
.then(res => {
@ -1101,52 +1098,88 @@ const Chathistory = res => {
Msgloading.value = false; //
})
.catch(res => {
console.log(res,'错误信息');
Msgloading.value = false; //
});
} else {
$_getSurveyRecord({
id: $route.query.id,
})
.then(res => {
MessageContent.value = []; //
console.log(res, '聊天返回值');
//
if (res.data.data.processorVOList) {
if (res.data.data.processorVOList.length) {
msgState.value = res.data.data.processorVOList[0].processingStatus; //
}
}
res.data.data.surveyRecordEntities.forEach(item => {
if (item.pictureUrl) {
filetype = Fileidentifier(item.pictureUrl);
}
MessageContent.value.push({
time: item.createTime, //
content: item.content, //
name: item.addDepartment, //
username: item.addPeople, //
img: filetype == 'png' ? item.pictureUrl : '',
file: filetype == 'docx' ? item.pictureUrl : '',
mp4: filetype == 'mp4' ? item.pictureUrl : '',
imgList: [filetype == 'png' ? item.pictureUrl : ''],
difference: item.difference,
identifying: true, //
});
});
setTimeout(() => {
const container = scrollContainer.value;
if (container) {
container.scrollTop = container.scrollHeight;
}
}, 0);
console.log(res, '聊天记录');
Msgloading.value = false; //
})
.catch(res => {
Msgloading.value = false; //
});
}
// if (UserPermissions.value != '') {
// console.log(UserPermissions.value, '');
// $_getSurveyRecord({
// id: $route.query.id,
// })
// .then(res => {
// MessageContent.value = []; //
// res.data.data.surveyRecordEntities.forEach(item => {
// MessageContent.value.unshift({
// time: item.createTime, //
// content: item.processingResults, //
// name: item.addDepartment, //
// username: item.addPeople, //
// img: filetype == 'png' ? item.pictureUrl : '',
// file: filetype == 'docx' ? item.pictureUrl : '',
// mp4: filetype == 'mp4' ? item.pictureUrl : '',
// imgList: filetype == 'png' ? item.pictureUrl : '',
// difference: item.difference,
// identifying: false, //
// });
// });
// setTimeout(() => {
// const container = scrollContainer.value;
// if (container) {
// container.scrollTop = container.scrollHeight;
// }
// }, 0);
// console.log(res, '');
// Msgloading.value = false; //
// })
// .catch(res => {
// Msgloading.value = false; //
// });
// } else {
// $_getSurveyRecord({
// id: $route.query.id,
// })
// .then(res => {
// MessageContent.value = []; //
// console.log(res, '');
// //
// if (res.data.data.processorVOList) {
// if (res.data.data.processorVOList.length) {
// msgState.value = res.data.data.processorVOList[0].processingStatus; //
// }
// }
// res.data.data.surveyRecordEntities.forEach(item => {
// if (item.pictureUrl) {
// filetype = Fileidentifier(item.pictureUrl);
// }
// MessageContent.value.push({
// time: item.createTime, //
// content: item.content, //
// name: item.addDepartment, //
// username: item.addPeople, //
// img: filetype == 'png' ? item.pictureUrl : '',
// file: filetype == 'docx' ? item.pictureUrl : '',
// mp4: filetype == 'mp4' ? item.pictureUrl : '',
// imgList: [filetype == 'png' ? item.pictureUrl : ''],
// difference: item.difference,
// identifying: true, //
// });
// });
// setTimeout(() => {
// const container = scrollContainer.value;
// if (container) {
// container.scrollTop = container.scrollHeight;
// }
// }, 0);
// console.log(res, '');
// Msgloading.value = false; //
// })
// .catch(res => {
// Msgloading.value = false; //
// });
// }
};
const DeliveryDriver = ref([]);

167
src/views/aftersales/aftersalesWorkOrderend.vue

@ -386,12 +386,24 @@
</div>
<div class="el_pkLi">
<div class="sk_input">
<!-- <div class="sk_input">
<el-input
v-model="item.name"
:placeholder="item.state == 0 ? '请填写赔款方' : '请填写受款方'"
/>
</div> -->
<!-- 赔款方是那个仓库的 -->
<div class="sk_input">
<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">
<el-input v-model="item.reason" placeholder="请填写原因" />
</div>
@ -403,17 +415,7 @@
placeholder="金额"
/>
</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
@ -1535,7 +1537,19 @@ const AddCompensation = () => {
som++;
}
});
CompensationParty.value.push({
let lastIndex = -1;
for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
if (CompensationParty.value[i].state == 0) {
lastIndex = i;
break; //
}
}
if (lastIndex !== -1) {
CompensationParty.value.splice(lastIndex + 1, 0, {
name: '',
state: 0,
num: 0,
@ -1544,6 +1558,26 @@ const AddCompensation = () => {
compensationPersonnel: '',
warehouseId: '',
});
// CompensationParty.value.push({
// name: '',
// state: 0,
// num: 0,
// reason: '',
// cld: som,
// compensationPersonnel: '',
// warehouseId: '',
// });
} else {
console.log(`在数组中未找到 ${elementToFind}`);
}
// explains: ''
};
//
@ -1554,7 +1588,18 @@ const AddPayee = () => {
som++;
}
});
CompensationParty.value.push({
let lastIndex = -1;
for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
if (CompensationParty.value[i].state == 0) {
lastIndex = i;
break; //
}
}
if (lastIndex !== -1) {
CompensationParty.value.splice(lastIndex + 1, 0, {
name: '',
state: 1,
num: 0,
@ -1563,6 +1608,21 @@ const AddPayee = () => {
compensationPersonnel: '',
warehouseId: '',
});
}
// CompensationParty.value.push({
// name: '',
// state: 1,
// num: 0,
// reason: '',
// cld: som,
// compensationPersonnel: '',
// warehouseId: '',
// });
// explains: ''
};
//
@ -1576,22 +1636,24 @@ const TotalChange = () => {
//
const payremove = (state, val) => {
//
let som = 0;
if (state == 0) {
CompensationParty.value.forEach(item => {
if (item.state == 0) {
som++;
}
});
if (som == 1) {
if(CompensationParty.value.map(res=>res.state == 0).length ==1){
ElMessage({
message: '赔款必填最少一条',
type: 'warning',
});
return;
}
}
CompensationParty.value.splice(val, 1);
for (let i = val; i < CompensationParty.value.length; i++) {
CompensationParty.value[i].cld = CompensationParty.value[i-1].cld + 1; // id
}
console.log('CompensationParty :>> ', CompensationParty);
amountMoney();
};
@ -1819,6 +1881,16 @@ const submit = async(val) => {
//
//
if (routerState.value == 'end') {
ElMessageBox.confirm(
'是否提交完结信息?',
'完结',
{
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
type: 'warning',
}
)
.then(() => {
console.log(CompensationParty.value);
let pay = CompensationParty.value.find(item => item.cld == 1);
@ -1849,7 +1921,7 @@ const submit = async(val) => {
if (item.state == 0) {
//
data[0]['completionRecordEntities'].push({
indemnitor: item.name, //
// indemnitor: item.name, //
reason: item.reason, //
money: Number(item.num), //
reasonArbitration: endFrom.value.arbitrate, //
@ -1861,7 +1933,7 @@ const submit = async(val) => {
} else {
//
data[0]['completionRecipientEntities'].push({
recipient: item.name, //
// recipient: item.name, //
reasonReceivingPayment: item.reason, //
money: Number(item.num), //
responsibleParty: FangAddList.value
@ -1872,6 +1944,7 @@ const submit = async(val) => {
.join(',')
)
.join(','),
warehouseId: item.warehouseId, //ID
workOrderNumber: info.workOrderNumber, //
workOrderId: info.id, //
});
@ -1898,7 +1971,16 @@ const submit = async(val) => {
Pageloading.value = false;//
console.log(res, '提交失败');
});
})
.catch(() => {
})
} else {
//
console.log(ProcessingList.value,'处理结果');
@ -1936,7 +2018,17 @@ if (!result) {
}
}
//
ElMessageBox.confirm(
'是否进行处理结果操作?',
'处理结果',
{
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
type: 'warning',
}
)
.then( async() => {
//
console.log($route.query.id, '异常ID');
console.log(ProcessingList.value, 'ProcessingList12312');
let info = JSON.parse(JSON.stringify(endFrom.value)); //
@ -1982,18 +2074,11 @@ if (!result) {
sum = computeNumber(sum, '+', ProcessingList.value[i].input).result;
}
data.aftersalesProcessingResultsDTO.money = sum; //
// data.resultDescription=endFrom.value.resultDescription;//
data.aftersalesProcessingResultsDTO.resultDescription = endFrom.value.resultDescription; //
// data['compensationMethod'] = Paymentmethod.value.filter(
// item => item.dictKey == endFrom.value.compensationMethod
// )[0].dictValue; //
// data['compensationMethod'] = endFrom.value.compensationMethod.join(','); //
// console.log(data['compensationMethod']);
console.log(Paymentmethod.value, 'Paymentmethod.value');
// data.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value
// .map(item => item.text)
// .join(',');
if(ProcessingList.value.every(res=>res.text)){
data.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value
@ -2082,6 +2167,18 @@ if (!result) {
.catch(res => {
Pageloading.value = false;//
});
})
.catch(() => {
ElMessage({
type: 'info',
message: 'Delete canceled',
})
})
}
};
//

34
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -223,6 +223,7 @@
<el-text size="small" @click="printOrder(slotProps.scope.row)"> </el-text>
<el-text size="small" @click="editsolt(slotProps.scope)"> </el-text>
<el-text size="small" @click="editmap(slotProps.scope)"> </el-text>
<el-text size="small" v-if="slotProps.scope.row.deliveryStatus != 3" @click="CancelDelivery(slotProps.scope)">取消配送</el-text>
<el-text
size="small"
v-if="
@ -406,6 +407,7 @@ import {
getstatistics,
printBatch,
getDeliveryListExport,
$_cancelDelivery,
} from '@/api/distribution/distributionDeliveryList';
import option from '@/option/distribution/distributionDeliveryList';
import { mapGetters } from 'vuex';
@ -416,7 +418,7 @@ import { getDriverList } from '@/api/basicdata/basicdataDriverArtery';
import print from '@/utils/print';
import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading';
import { downloadXls } from '@/utils/util';
import { ElMessage, ElMessageBox } from 'element-plus'
export default {
data() {
return {
@ -952,6 +954,36 @@ export default {
},
});
},
//
CancelDelivery(scope){
console.log(scope,'scope');
let data = {
deliveryId: scope.row.id,
}
ElMessageBox.confirm(
'是否取消配送?',
'Warning',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.loading = true;///
$_cancelDelivery(data).then(res=>{
console.log(res,'取消带配送');
this.onLoad(this.page);
this.loading = false;///
})
})
.catch(() => {
}).finally(()=>{
this.loading = false;///
})
},
textbox(e, index, a) {
if (a === 6) {
this.feeList[index + 1] = e;

5
src/views/distribution/inventory/distributionStockListDetails.vue

@ -613,7 +613,7 @@ export default {
};
},
mounted() {
this.init();
// this.init();
},
watch: {
'$route.query.id': {
@ -931,13 +931,16 @@ export default {
let a = await getList(page.currentPage, page.pageSize, Object.assign(params, this.query));
console.log('aaaa', a.data.data.records);
this.queryOwn = a.data.data.records[0] || {};
console.log(this.queryOwn ,'参数');
if (!this.queryOwn.pid) {
console.log('11111111111');
//
console.log('执行了1');
await this.getOnKu(page, (params = {}));
} else {
//
console.log('2222222222');
console.log('执行了2');
await this.getOnKu(page, (params = { pid: this.queryOwn.pid }));
}
},

Loading…
Cancel
Save