Browse Source

修复配送页面重复请求问题

dev-xx
qb 1 year ago
parent
commit
07615f4185
  1. 16
      src/api/distribution/VehicleArrivalManagement.js
  2. 2
      src/views/distribution/artery/TripartiteTransfer.vue
  3. 34
      src/views/distribution/artery/VehicleArrivalManagement.vue
  4. 52
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

16
src/api/distribution/VehicleArrivalManagement.js

@ -41,3 +41,19 @@ export const postloadCancelArriveCarByLoadId = (page, params) => {
},
});
};
/**
* 取消到车
*/
export const postUnloadByLoadId = (page, params) => {
return request({
url: '/api/logpm-trunkline/carsLoad/unloadByLoadId',
method: 'post',
data: {
...page,
...params,
},
});
};
// /logpm-trunkline/carsLoad/unloadByLoadId

2
src/views/distribution/artery/TripartiteTransfer.vue

@ -777,7 +777,7 @@ const handleConfirmStartCar = () => {
type: 'warning',
});
}
ElMessageBox.confirm('确认发车吗?', 'Warning', {
ElMessageBox.confirm('确认发车吗?', '', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',

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

@ -94,7 +94,7 @@
<el-button type="primary" icon="el-icon-printer" @click="handleCloseArrive"
>取消到达</el-button
>
<el-button type="primary" icon="el-icon-delete" @click="searchReset()">
<el-button type="primary" icon="el-icon-delete" @click="handleUnloadByLoadId(1)">
中途到达卸车
</el-button>
<el-button
@ -104,7 +104,7 @@
>
对比报表
</el-button>
<el-button type="primary" icon="el-icon-document" @click="searchReset()">
<el-button type="primary" icon="el-icon-document" @click="handleUnloadByLoadId(2)">
终点到达卸车
</el-button>
<el-button type="primary" icon="el-icon-document" @click="searchReset()">
@ -368,6 +368,7 @@ import {
postloadArriveCarsPageList,
postloadArriveCarByLoadId,
postloadCancelArriveCarByLoadId,
postUnloadByLoadId,
} from '@/api/distribution/VehicleArrivalManagement';
import {
postStartCarByLoadId,
@ -932,6 +933,35 @@ const packageInputsc = (value, row) => {
details.packageRenderData = _data;
};
/** 卸车确认 */
const handleUnloadByLoadId = (type: 1 | 2) => {
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要卸车的数据');
if (details.selectionList.length > 1) return ElMessage.warning('只支持单条数据操作');
ElMessageBox.confirm('确认卸车吗?', '', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const submitData = {
loadId: details.selectionList.map(val => val.id).join(','),
unloadType: type,
};
const res = await postUnloadByLoadId(submitData);
const { code } = res.data;
if (code !== 200) {
return;
}
ElMessage({
type: 'success',
message: '卸车成功',
});
onLoad();
});
};
</script>
<style scoped lang="scss">

52
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -243,7 +243,7 @@
<!-- <div class="avue-crud__pagination" style="width: 100%"> -->
<!-- 分页模块 -->
<el-pagination
<!-- <el-pagination
align="right"
background
@size-change="psizeChange"
@ -254,34 +254,7 @@
layout="total, sizes, prev, pager, next, jumper"
:total="packpage.total"
>
</el-pagination>
<!--
v-model:current-page="currentPage4"
v-model:page-size="pageSize4"
:page-sizes="[100, 200, 300, 400]"
:small="small"
:disabled="disabled"
:background="background"
layout="total, sizes, prev, pager, next, jumper"
:total="400"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
-->
<!-- <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="page.total"
>
</el-pagination> -->
<!-- </div> -->
</el-tab-pane>
<el-tab-pane label="库 存 品 列 表" name="tab4">
@ -3850,30 +3823,11 @@ export default {
});
},
cancelReservationInventoryPackage(row) {
console.log('row', row);
console.log('deliveryId', this.deliveryId);
console.log('reservationId', this.wid);
this.$message.warning('功能维护中...');
return;
console.log('row', row);
console.log('deliveryId', this.deliveryId);
console.log('reservationId', this.wid);
let data = {
deliveryId: this.deliveryId,
reservationId: this.wid,
type: 2,
inventoryPackageIds: row.id,
};
console.log("data------->",data);
cancelReservationPackage(data).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.getReservationInventoryPackageListInfo(this.page);
}
});
// let data = {
// deliveryId:this.deliveryId,
@ -4283,7 +4237,7 @@ export default {
if (res.data.data) {
const data = res.data.data;
this.packdata = data;
this.packpage.total = data.total;
// this.packpage.total = data.length;
}
}
);
@ -4601,10 +4555,12 @@ export default {
this.getWrapdetails(this.wpage);
},
pcurrentChange(currentPage) {
console.log('123 :>> ', 123);
this.packpage.currentPage = currentPage;
this.handlePackage(this.packpage);
},
psizeChange(pageSize) {
console.log('321 :>> ', 321);
this.packpage.pageSize = pageSize;
this.handlePackage(this.packpage);
},

Loading…
Cancel
Save