Browse Source

修复部分bug

dev
qb 12 hours ago
parent
commit
84e0c506c2
  1. 8
      src/api/distribution/SeparateTheList.js
  2. 14
      src/api/distribution/VehicleArrivalManagement.js
  3. 6
      src/option/distribution/SeparateTheList.js
  4. 1
      src/option/distribution/directMerchantSign.js
  5. 86
      src/views/distribution/artery/VehicleArrivalManagement.vue
  6. 2
      src/views/distribution/inventory/delivery/SeparateTheList.vue
  7. 2
      src/views/waybill/WaybillOrderList.vue

8
src/api/distribution/SeparateTheList.js

@ -9,11 +9,11 @@ export const $_alltasklist = params => {
};
// 完成总任务
export const $_finishalltask = params => {
export const $_finishalltask = data => {
return request({
url: '/api/logpm-distribution/split-order-task/finish-all-task',
method: 'post',
params,
data,
});
};
// 子任务列表
@ -43,10 +43,10 @@ export const $_gettaskdetail = params => {
});
};
// 撤销总任务
export const $_cancelalltask = params => {
export const $_cancelalltask = data => {
return request({
url: '/api/logpm-distribution/split-order-task/cancel-all-task',
method: 'post',
params,
data,
});
};

14
src/api/distribution/VehicleArrivalManagement.js

@ -56,4 +56,18 @@ export const postUnloadByLoadId = (page, params) => {
});
};
/**
* 检测是否存在直发商家未卸车数据
*/
export const postUnloadByLoadIdBefore = (page, params) => {
return request({
url: '/api/logpm-trunkline/carsLoad/unloadByLoadIdBefore',
method: 'post',
data: {
...page,
...params,
},
});
};
// /logpm-trunkline/carsLoad/unloadByLoadId

6
src/option/distribution/SeparateTheList.js

@ -69,15 +69,15 @@ export const columnList = [
checkarr: [
{
label: '未完成',
value: 0,
value: 1,
},
{
label: '已完成',
value: 1,
value: 2,
},
{
label: '已撤销',
value: 2,
value: 3,
},
],
},

1
src/option/distribution/directMerchantSign.js

@ -137,6 +137,7 @@ export const columnList = [
{ label: '未签收', value: '0' },
{ label: '部分签收', value: '10' },
{ label: '已签收', value: '20' },
{ label: '已上传图片', value: '30' },
],
fixed: false,
sortable: true,

86
src/views/distribution/artery/VehicleArrivalManagement.vue

@ -602,6 +602,7 @@ import {
postloadArriveCarByLoadId,
postloadCancelArriveCarByLoadId,
postUnloadByLoadId,
postUnloadByLoadIdBefore,
} from '@/api/distribution/VehicleArrivalManagement';
import {
postStartCarByLoadId,
@ -1348,47 +1349,62 @@ const packageInputsc = (value, row) => {
};
/** 卸车确认 */
const handleUnloadByLoadId = (type: 1 | 2) => {
if (!ChecksWhetherTheWarehouseIsSelected())
return ElMessage.warning('多仓权限无法操作,请选择仓库');
const handleUnloadByLoadId = async (type: 1 | 2) => {
try {
if (!ChecksWhetherTheWarehouseIsSelected())
return ElMessage.warning('多仓权限无法操作,请选择仓库');
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要卸车的数据');
if (details.selectionList.length > 1) return ElMessage.warning('只支持单条数据操作');
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要卸车的数据');
if (details.selectionList.length > 1) return ElMessage.warning('只支持单条数据操作');
details.loadingObj.pageLoading = true;
ElMessageBox.confirm(
'请确认卸车数据是否完成,未卸车数据将进入异常列表。',
type === 1 ? '中途卸车确认' : '终点卸车确认',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}
).then(async () => {
try {
details.loadingObj.pageLoading = true;
const item = details.selectionList[0];
const res = await postUnloadByLoadIdBefore({ loadId: item.id });
const { code, data } = res.data;
const submitData = {
loadId: details.selectionList.map(val => val.id).join(','),
unloadType: type,
};
if (code !== 200) return;
const res = await postUnloadByLoadId(submitData);
const { code } = res.data;
if (code !== 200) {
return;
ElMessageBox.confirm(
'请确认卸车数据是否完成,未卸车数据将进入异常列表。',
type === 1 ? '中途卸车确认' : '终点卸车确认',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}
ElMessage({
type: 'success',
message: '卸车成功',
});
)
.then(async () => {
try {
details.loadingObj.pageLoading = true;
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
const submitData = {
loadId: item.id,
unloadType: type,
};
const res = await postUnloadByLoadId(submitData);
const { code } = res.data;
if (code !== 200) {
return;
}
ElMessage({
type: 'success',
message: '卸车成功',
});
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
.catch(() => {});
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
/** 显示装载清单 */

2
src/views/distribution/inventory/delivery/SeparateTheList.vue

@ -378,7 +378,7 @@ const handleDelete = row => {
})
.then(() => {
let data = {
taskId: row.id,
allTaskId: row.id,
};
details.loadingObj.list = true;
$_cancelalltask(data)

2
src/views/waybill/WaybillOrderList.vue

@ -468,7 +468,7 @@ const onLoad = async (page?: any, params = {}) => {
delete submitData.createTime;
delete submitData.documentMakingTime;
//
//
const res = await postWarehouseWaybillPageWaybillList(submitData);
console.log('res :>> ', res);
const { code, data } = res.data;

Loading…
Cancel
Save