Browse Source

商配列表新增移除判断

dev-xx
马远东 1 year ago
parent
commit
4a15d9b7d8
  1. 11
      src/api/distribution/distributionDeliveryList.js
  2. 88
      src/views/aftersales/aftersalesWorkOrder.vue
  3. 25
      src/views/aftersales/aftersalesWorkOrderAdd.vue
  4. 394
      src/views/distribution/turndelivery/deliveryDiscuss.vue

11
src/api/distribution/distributionDeliveryList.js

@ -273,4 +273,15 @@ export const $_getDetail = (params) => {
method: 'get',
params
})
}
export const $_judgmentOrderRemove = (params) => {
return request({
url: '/api/logpm-distribution/deliveryList/judgmentOrderRemove',
method: 'get',
params
})
}

88
src/views/aftersales/aftersalesWorkOrder.vue

@ -90,41 +90,22 @@
<!-- v-if="ButtonPermissions.batchReject" -->
<!-- v-if="PermissionButton.batch_return" -->
<el-button
type="primary"
@click="BatchReturn"
>批量打回</el-button
>
<el-button type="primary" @click="BatchReturn">批量打回</el-button>
<!-- v-if="ButtonPermissions.assignment" -->
<!-- v-if="PermissionButton.assign" -->
<el-button type="primary" @click="assign"
>工单指派</el-button
>
<el-button type="primary" @click="assign">工单指派</el-button>
<!-- v-if="ButtonPermissions.applyArbitration" -->
<!-- v-if="PermissionButton.apply_arbitration" -->
<el-button
type="primary"
@click="arbitrate"
>申请仲裁</el-button
>
<el-button type="primary" @click="arbitrate">申请仲裁</el-button>
<!-- v-if="ButtonPermissions.batchFinish" -->
<!-- v-if="PermissionButton.batch_completion" -->
<el-button
type="primary"
@click="Batchcompletion"
>批量完结</el-button
>
<el-button type="primary" @click="Batchcompletion">批量完结</el-button>
<!-- v-if="ButtonPermissions.appeal" -->
<!-- v-if="PermissionButton.representations" -->
<el-button type="primary" @click="appeal"
>申诉</el-button
>
<el-button type="primary" @click="appeal">申诉</el-button>
<!-- v-if="details.query.workOrderStatus == 30" -->
<!-- <el-button type="primary" @click="ProcessingParty"> 处理方信息</el-button> -->
</div>
@ -159,27 +140,15 @@
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '异常工单号'">
<el-text class="el_textBtn" @click="InformationViewing(slotProps.scope)">
{{
slotProps.scope.column.label === '异常工单号'? slotProps.scope.row.workOrderNumber: ''
}}
</el-text>
</template>
<template v-if="slotProps.scope.column.label === '异常工单号'">
<el-text class="el_textBtn" @click="InformationViewing(slotProps.scope)">
{{
slotProps.scope.column.label === '异常工单号'
? slotProps.scope.row.workOrderNumber
: ''
}}
</el-text>
</template>
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
@ -230,7 +199,6 @@
<!-- 新增弹窗 -->
<!-- 完结弹窗 -->
<!-- 批量打回弹窗 -->
<el-dialog v-model="dialogReturn" title="批量打回" width="40%" draggable class="plAllret">
<el-form
@ -414,7 +382,7 @@
clearable
filterable
multiple
placeholder="请选择责任方"
placeholder="请选择实际责任方"
>
<el-option
v-for="item in warehouseData"
@ -429,7 +397,20 @@
type="textarea"
placeholder="请输入申诉原因"
/>
<el-upload
v-model:file-list="AppealAttachment"
list-type="picture-card"
:on-preview="pictureList"
:on-remove="ImgListRemove"
:action="doubledCount"
:on-success="ImgSuccess"
:before-upload="beforeAvatarUpload"
:headers="headers"
multiple
drag
>
<el-icon><Plus /></el-icon>
</el-upload>
<span class="el_sdialog-footer">
<el-button @click="dialogappeal = false">取消</el-button>
<el-button type="primary" @click="Appealbutton"> 确定 </el-button>
@ -517,7 +498,7 @@ import {
AppealList,
timeoutList,
} from '@/option/aftersales/vueTvemp.js';
import { processRowProperty, isNumer, computeNumber} from '@/utils/util';
import { processRowProperty, isNumer, computeNumber } from '@/utils/util';
import { useRouter } from 'vue-router';
import dayjs from 'dayjs';
const $router = useRouter();
@ -567,6 +548,7 @@ const TransportlossList = ref([
//
]);
const pageSize = ref(30); //
const AppealAttachment=ref('');//
const total = ref(0); //
const KFinput = ref(''); //
const Appealselection = ref([]); //
@ -1058,8 +1040,8 @@ const IndexTable = val => {
}
});
details.data = res.data.data.records;
}else{
details.data = res.data.data.records
} else {
details.data = res.data.data.records;
}
}
loading.value = false; //
@ -1067,7 +1049,7 @@ const IndexTable = val => {
};
//
const Tableheaderswitching = (val) => {
const Tableheaderswitching = val => {
publicColumnList.value = val; //
details.columnList = val;
};
@ -2972,7 +2954,7 @@ const CompletedSubmission = () => {
display: flex;
justify-content: space-between;
}
.el_textBtn{
.el_textBtn {
color: #9bb40d;
}
</style>

25
src/views/aftersales/aftersalesWorkOrderAdd.vue

@ -401,6 +401,7 @@
</el-select>
<el-input v-else v-model="item.personResponsibleName" placeholder="请输入责任人" />
</div>
<div class="maxBox el_zb">
<span class="title">占比:</span>
@ -413,7 +414,11 @@
/>
<span>%</span>
</div>
<div class="maxBox ">
<span class="title">三方责任人:</span>
<el-input v-model="item.tripartite" placeholder="请输入三方责任人" />
</div>
<div class="maxBox">
<span class="title">说明:</span>
<el-input
@ -604,7 +609,7 @@ const PackageInfo = ref([
]);
//
const FangAddList = ref([
{ businessName: '', personResponsibleName: '', responsibilityRatio: '', description: '' },
{ businessName: '', personResponsibleName: '', responsibilityRatio: '', description: '',tripartite:'' },
]);
//
const responsible = ref([
@ -786,6 +791,7 @@ const responsibleParty = () => {
FangAddList.value.push({
businessName: '',
personResponsibleName: '',
tripartite:'',
responsibilityRatio: '',
description: '',
});
@ -961,6 +967,7 @@ const ConfirmForm = () => {
personResponsibleList.value.find(obj => obj.id == item.personResponsibleName)?.name ||
null, //
responsibilityRatio: item.responsibilityRatio, //
tripartite:item.tripartite,//
});
});
}
@ -976,6 +983,7 @@ const ConfirmForm = () => {
personResponsibleId: '',
personResponsibleName: item.personResponsibleName, //
responsibilityRatio: item.responsibilityRatio, //
tripartite:item.tripartite,//
});
});
}
@ -1149,7 +1157,11 @@ const ChangePackageInfo = (val, index) => {
PackageInfo.value[index].waybillNumber = ''; //
PackageInfo.value[index].orderId = ''; //
PackageInfo.value[index].brandName = ''; //
// PackageInfo.value[index].firsts = ''; //
// PackageInfo.value[index].second = ''; //
// PackageInfo.value[index].mallName = ''; //
// PackageInfo.value[index].mallId = ''; //ID
Statistics(); //
let data = {
packageCode: val,
@ -1164,6 +1176,11 @@ const ChangePackageInfo = (val, index) => {
PackageInfo.value[index].orderId = packageData.orderId; //
PackageInfo.value[index].brandName = packageData.brandName; //
PackageInfo.value[index].state = false; //
Indexform.value.first=packageData.first;//
Indexform.value.secondary=packageData.secondary;//
console.log(packageData,'处理的包件参数');
console.log(Indexform.value.firsts,'一级品');
console.log(Indexform.value.second,'二 级品');
res.data.data.find(item => {
if (item.workOrderId && item.workOrderNumber) {
HistoricalPackageList.value = res.data.data;
@ -1379,7 +1396,7 @@ const ViewPackageDetails = val => {
width: 30%;
margin-right: 16px;
.title {
width: 80px;
width: 120px;
font-size: 14px;
color: #606266;
}

394
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -272,7 +272,7 @@
v-model="multifunctional"
placeholder="请输入要搜索的值,多条件用英文逗号拼接"
clearable
@clear='soclear'
@clear="soclear"
/>
<el-button type="primary" @click="SearchFu"
><el-icon><Plus /></el-icon></el-button
@ -320,9 +320,15 @@
align="center"
>
<template #default="props">
<span :id="props.row[item.prop]" :class="(props.row[item.prop] == multifunctional && props.row[item.prop]) ? 'static-class' : ''">{{
props.row[item.prop] ? props.row[item.prop] : '/'
}}</span>
<span
:id="props.row[item.prop]"
:class="
props.row[item.prop] == multifunctional && props.row[item.prop]
? 'static-class'
: ''
"
>{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span
>
</template>
</el-table-column>
</template>
@ -799,6 +805,7 @@ import {
getDeliveryList,
$_getPackageListByDeliveryIdAndOrderId,
updateDeliveryList,
$_judgmentOrderRemove,
} from '@/api/distribution/distributionDeliveryList'; //
import { getDictionaryBiz } from '@/api/system/dict'; //
import type { FormProps } from 'element-plus';
@ -1140,7 +1147,7 @@ const menuData = ref([
label: '服务号',
type: 1,
values: '',
width: '260',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1151,7 +1158,7 @@ const menuData = ref([
label: '运单号',
type: 1,
values: '',
width: '265',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1162,18 +1169,65 @@ const menuData = ref([
label: '订单自编号',
type: 1,
values: '',
width: '260',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'mallName',
label: '商场名称',
prop: 'consigneeUnit',
label: '运单收货单位',
type: 1,
values: '',
width: '260',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'totalNumber',
label: '订单总件数',
type: 1,
values: '',
width: '80',
checkarr: [],
fixed: false,
sortable: true,
head: true,
statistics: true, //
},
{
prop: 'handQuantity',
label: '在库件数',
type: 1,
values: '',
width: '80',
checkarr: [],
fixed: false,
sortable: true,
head: true,
statistics: true, //
},
{
prop: 'consigneePerson',
label: '运单收货人',
type: 1,
values: '',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'consigneeMobile',
label: '运单收货人电话',
type: 1,
values: '',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1195,7 +1249,7 @@ const menuData = ref([
label: '商场编号',
type: 1,
values: '',
width: '260',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1206,7 +1260,7 @@ const menuData = ref([
label: '经销商编码',
type: 1,
values: '',
width: '260',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1239,7 +1293,7 @@ const menuData = ref([
label: '订单状态',
type: 1,
values: '',
width: '280',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1250,7 +1304,7 @@ const menuData = ref([
label: '冻结状态',
type: 1,
values: '',
width: '280',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1261,7 +1315,7 @@ const menuData = ref([
label: '预约状态',
type: 1,
values: '',
width: '280',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1272,7 +1326,7 @@ const menuData = ref([
label: '货物名称',
type: 1,
values: '',
width: '280',
width: '80',
checkarr: [],
fixed: false,
sortable: true,
@ -1283,7 +1337,7 @@ const menuData = ref([
label: '仓库',
type: 1,
values: '',
width: '280',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
@ -1294,7 +1348,7 @@ const menuData = ref([
label: '入库时间',
type: 1,
values: '',
width: '280',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1305,42 +1359,19 @@ const menuData = ref([
label: '在库时间',
type: 1,
values: '',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'totalNumber',
label: '订单总件数',
type: 1,
values: '',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
statistics: true, //
},
{
prop: 'handQuantity',
label: '在库件数',
type: 1,
values: '',
width: '280',
width: '80',
checkarr: [],
fixed: false,
sortable: true,
head: true,
statistics: true, //
},
{
prop: 'completeSetName',
label: '是否齐套',
type: 1,
values: '',
width: '280',
width: '60',
checkarr: [],
fixed: false,
sortable: true,
@ -1351,7 +1382,7 @@ const menuData = ref([
label: '品牌',
type: 1,
values: '',
width: '280',
width: '60',
checkarr: [],
fixed: false,
sortable: true,
@ -1362,40 +1393,19 @@ const menuData = ref([
label: '服务类型',
type: 1,
values: '',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'consigneePerson',
label: '运单收货人',
type: 1,
values: '',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'consigneeMobile',
label: '运单收货人电话',
type: 1,
values: '',
width: '280',
width: '60',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'consigneeUnit',
label: '运单收货单位',
prop: 'mallName',
label: '商场名称',
type: 1,
values: '',
width: '280',
width: '260',
checkarr: [],
fixed: false,
sortable: true,
@ -1406,7 +1416,7 @@ const menuData = ref([
label: '顾客名字',
type: 1,
values: '',
width: '280',
width: '60',
checkarr: [],
fixed: false,
sortable: true,
@ -1417,7 +1427,7 @@ const menuData = ref([
label: '顾客电话',
type: 1,
values: '',
width: '280',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1439,7 +1449,7 @@ const menuData = ref([
label: '库位信息',
type: 1,
values: '',
width: '280',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
@ -1450,7 +1460,7 @@ const menuData = ref([
label: '托盘信息',
type: 1,
values: '',
width: '280',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
@ -1475,59 +1485,59 @@ const wrap = ref([
label: '运单号',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'warehouse',
label: '仓库',
prop: 'orderPackageCode',
label: '包条码',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'trainNumber',
label: '车次号',
prop: 'orderPackageStockupStatusName',
label: '备货状态',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'firsts',
label: '一级品',
prop: 'orderPackageReservationStatusName',
label: '预约状态',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'second',
label: '二级品',
prop: 'goodsAllocation',
label: '货位信息',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'thirdProduct',
label: '三级品',
prop: 'pallet',
label: '所在托盘',
type: 1,
values: '',
width: '260',
@ -1537,85 +1547,89 @@ const wrap = ref([
head: true,
},
{
prop: 'materialName',
label: '物料',
prop: 'warehouse',
label: '仓库',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'orderPackageFreezeStatusName',
label: '冻结状态',
prop: 'firsts',
label: '一级品',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'orderPackageStockupStatusName',
label: '备货状态',
prop: 'second',
label: '二级品',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'orderPackageReservationStatusName',
label: '预约状态',
prop: 'thirdProduct',
label: '三级品',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'orderPackageCode',
label: '包条码',
prop: 'materialName',
label: '物料',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'goodsAllocation',
label: '货位信息',
prop: 'orderPackageFreezeStatusName',
label: '冻结状态',
type: 1,
values: '',
width: '260',
width: '100',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'pallet',
label: '所在托盘',
prop: 'quantity',
label: '数量',
type: 1,
values: '',
width: '260',
width: '40',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'quantity',
label: '数量',
prop: 'trainNumber',
label: '客户车次号',
type: 1,
values: '',
width: '260',
@ -1882,10 +1896,9 @@ function removeDuplicates(arr) {
const ids = arr.map(obj => obj.id);
return arr.filter((item, index) => ids.indexOf(item.id) === index);
}
const soclear=()=>{
SearchFu()
}
const soclear = () => {
SearchFu();
};
// function scrollToElementWithPartialId(partialId) {
// //
@ -1907,52 +1920,52 @@ const soclear=()=>{
// }
// }
function scrollToElementWithinTableRow(partialIdString) {
//
const tableRows = document.querySelectorAll('tr');
tableRows.forEach(function(row) {
const cells = row.querySelectorAll('[id]');
cells.forEach(function(cell) {
cell.style.backgroundColor = ''; //
cell.style.color = ''; //
});
//
const tableRows = document.querySelectorAll('tr');
tableRows.forEach(function (row) {
const cells = row.querySelectorAll('[id]');
cells.forEach(function (cell) {
cell.style.backgroundColor = ''; //
cell.style.color = ''; //
});
});
//
const partialIds = partialIdString.split(',').map(id => id.trim());
// partialId
for (let row of tableRows) {
// partialIds
if (partialIds.every(partialId => row.querySelector(`[id*="${partialId}"]`))) {
//
const cells = row.querySelectorAll('[id]');
cells.forEach(function(cell) {
cell.style.backgroundColor = '#ff0000'; //
cell.style.color = '#fff'; //
});
//
const partialIds = partialIdString.split(',').map(id => id.trim());
// partialId
for (let row of tableRows) {
// partialIds
if (partialIds.every(partialId => row.querySelector(`[id*="${partialId}"]`))) {
//
const cells = row.querySelectorAll('[id]');
cells.forEach(function (cell) {
cell.style.backgroundColor = '#ff0000'; //
cell.style.color = '#fff'; //
});
//
row.scrollIntoView();
break; //
}
//
row.scrollIntoView();
break; //
}
}
}
//
const SearchFu = () => {
if(multifunctional.value){
scrollToElementWithinTableRow(multifunctional.value)
}else{
document.querySelectorAll('[id]').forEach(function(el) {
el.style.backgroundColor = ''; //
el.style.color =''; //
if (multifunctional.value) {
scrollToElementWithinTableRow(multifunctional.value);
} else {
document.querySelectorAll('[id]').forEach(function (el) {
el.style.backgroundColor = ''; //
el.style.color = ''; //
});
}
return
if(multifunctional.value){
document.getElementById(multifunctional.value).scrollIntoView()
return;
if (multifunctional.value) {
document.getElementById(multifunctional.value).scrollIntoView();
}
return
return;
console.log(soInpuState.value, '当前搜索状态');
if (!multifunctional.value && !dataInfoTemp.value.length) {
soInpuState.value = false; //
@ -1990,11 +2003,10 @@ return
});
});
console.log(temp, '搜索结果');
console.log(dataInfoTemp.value,'临时存储的值');
dataInfo.value = temp; //
soInpuState.value = false; //
console.log(temp, '搜索结果');
console.log(dataInfoTemp.value, '临时存储的值');
dataInfo.value = temp; //
soInpuState.value = false; //
}
// console.log(dataInfo.value, '');
@ -2002,20 +2014,63 @@ return
//
const DeleteEvent = val => {
dataInfoID.value = val; //
if (dataInfoTemp.value.length) {
//
const index = dataInfoTemp.value.findIndex(item => item.id === val.id);
if (index !== -1) {
dataInfoTemp.value.splice(index, 1);
if (route.query.id) {
//
let data = {
deliveryId: route.query.id,
orderId: val.id,
};
console.log(data, '删除处理值');
$_judgmentOrderRemove(data).then(res => {
console.log(res, '删除返回值');
if (res.data.code == 200) {
if (!res.data.data) {
ElMessage({
message: '不能移除当前订单,存在装车数据,联系司机滞留',
type: 'warning',
});
return;
}
dataInfoID.value = val; //
if (dataInfoTemp.value.length) {
//
const index = dataInfoTemp.value.findIndex(item => item.id === val.id);
if (index !== -1) {
dataInfoTemp.value.splice(index, 1);
}
}
console.log(dataInfoID.value, '当前删除的数据');
//
const index = dataInfo.value.findIndex(item => item.id === val.id);
if (index !== -1) {
dataInfo.value.splice(index, 1);
ElMessage({
message: '移除成功',
type: 'success',
});
}
}
});
} else {
dataInfoID.value = val; //
if (dataInfoTemp.value.length) {
//
const index = dataInfoTemp.value.findIndex(item => item.id === val.id);
if (index !== -1) {
dataInfoTemp.value.splice(index, 1);
}
}
}
console.log(dataInfoID.value, '当前删除的数据');
//
const index = dataInfo.value.findIndex(item => item.id === val.id);
if (index !== -1) {
dataInfo.value.splice(index, 1);
console.log(dataInfoID.value, '当前删除的数据');
//
const index = dataInfo.value.findIndex(item => item.id === val.id);
if (index !== -1) {
dataInfo.value.splice(index, 1);
ElMessage({
message: '移除成功',
type: 'success',
});
}
}
};
//
@ -3117,5 +3172,4 @@ const SubmitCommercial = () => {
background-color: #ff0000;
color: #fff;
}
</style>

Loading…
Cancel
Save