Browse Source

修复打印和新增配载详情缓存和优化开单和录单提交

dev-xx
qb 5 months ago
parent
commit
2b4f098954
  1. 2
      src/router/views/index.js
  2. 4
      src/utils/print.js
  3. 1
      src/views/distribution/artery/TripartiteTransfer.vue
  4. 8
      src/views/distribution/artery/TripartiteTransferDetails.vue
  5. 1
      src/views/distribution/artery/VehicleArrivalManagement.vue
  6. 2
      src/views/distribution/artery/VehicleStowage.vue
  7. 29
      src/views/distribution/artery/VehicleStowageDetails.vue
  8. 5
      src/views/distribution/inventory/CreateOrder.vue
  9. 10
      src/views/waybill/CreateZeroOrder.vue

2
src/router/views/index.js

@ -251,6 +251,7 @@ export default [
name: '中转详情',
meta: {
i18n: 'data',
keepAlive: true,
},
component: () =>
import(
@ -262,6 +263,7 @@ export default [
name: '配载详情',
meta: {
i18n: 'data',
keepAlive: true,
},
component: () =>
import(

4
src/utils/print.js

@ -25,7 +25,7 @@ const handleDeliveryPrint = (LODOP, templateData) => {
// LODOP.SET_PRINT_STYLE('FontColor', '#000000');
// // 设置打印整宽且不变形
LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '100%');
LODOP.SET_PRINT_PAGESIZE(1, 2160, 1396.5, '');
LODOP.SET_PRINT_PAGESIZE(1, '216.0mm', '139.7mm', '');
// LODOP.SET_PRINT_PAGESIZE(1, 240 + 'mm', 139.7 + 'mm', '');
// // 设置打印后自动关闭
LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1);
@ -56,7 +56,7 @@ const print = (nodeList, type = 'deliveryPrint') => {
if (type === 'titlePrint') handleTitlePrint(LODOP, templateData);
else handleDeliveryPrint(LODOP, templateData);
// LODOP.NewPage()
// LODOP.NewPage();
LODOP.PRINT(); //直接打印
// LODOP.PRINT_DESIGN();
});

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

@ -1231,6 +1231,7 @@ const handleCancelStartCar = () => {
/** 查看详情 */
const handleGoDetils = ({ row }) => {
$store.commit('DEL_ONCE_TAG', '/distribution/artery/TripartiteTransferDetails');
$router.push({
path: '/distribution/artery/TripartiteTransferDetails',
query: {

8
src/views/distribution/artery/TripartiteTransferDetails.vue

@ -825,10 +825,10 @@ const handleGoWayBillDetail = ({ row }) => {
});
};
watch($route, () => {
if ($route.path !== '/distribution/artery/TripartiteTransferDetails') return;
onLoad();
});
// watch($route, () => {
// if ($route.path !== '/distribution/artery/TripartiteTransferDetails') return;
// });
onLoad();
</script>
<style scoped lang="scss">
.fo-fl {

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

@ -1222,6 +1222,7 @@ const handleEditStowage = ({ row }) => {
/** 前往配载详情 */
const handleGoWaybill = ({ row }) => {
console.log('row :>> ', row);
$store.commit('DEL_ONCE_TAG', '/distribution/artery/VehicleStowageDetails');
$router.push({
path: '/distribution/artery/VehicleStowageDetails',
query: {

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

@ -1209,6 +1209,8 @@ const handleDirectGoMarketDetails = ({ row }) => {
/** 前往配载详情 */
const handleGoWaybill = ({ row }) => {
console.log('row :>> ', row);
$store.commit('DEL_ONCE_TAG', '/distribution/artery/VehicleStowageDetails');
$router.push({
path: '/distribution/artery/VehicleStowageDetails',
query: {

29
src/views/distribution/artery/VehicleStowageDetails.vue

@ -429,6 +429,12 @@
</edittablehead>
</template>
<script lang="ts">
export default {
name: '/distribution/artery/VehicleStowageDetails',
};
</script>
<script setup lang="ts">
import {
ref,
@ -1149,17 +1155,18 @@ const handleExport = () => {
exportExcelByDom(exportColumnListNode.value.$el, `${details.form.carsNo} - ${dateNow()}.xlsx`);
};
watch(
() => $route.query,
() => {
console.log('1231 :>> ', 1231);
if ($route.path !== '/distribution/artery/VehicleStowageDetails') return;
onLoad();
},
{
immediate: true,
}
);
// watch(
// () => $route.query,
// () => {
// console.log('1231 :>> ', 1231);
// if ($route.path !== '/distribution/artery/VehicleStowageDetails') return;
// onLoad();
// },
// {
// immediate: true,
// }
// );
onLoad();
</script>
<style scoped lang="scss">

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

@ -3648,10 +3648,11 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return;
formEl.validate(async valid => {
if (!valid) return false;
try {
// loading
details.loadingObj.submitLoadingBtn = true;
const timer = setTimeout(async () => {
try {
//
const _flag = details.goodsList.every(val => {
if (!val.goodsName || !isNumber(val.num) || val.num === 0) return false;
@ -3865,9 +3866,11 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
} catch (error) {
console.log('error :>> ', error);
} finally {
clearTimeout(timer);
$store.commit('EDIT_REFRESHITEM', { title: 'TemporaryStorageList', status: true });
details.loadingObj.submitLoadingBtn = false;
}
}, 500);
});
};

10
src/views/waybill/CreateZeroOrder.vue

@ -2857,11 +2857,12 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
await nextTick();
if (!formEl) return;
formEl.validate(async valid => {
formEl.validate(valid => {
if (valid) {
try {
details.loadingObj.submitLoadingBtn = true;
const timer = setTimeout(async () => {
try {
let _arr = [];
for (let i = 0; i < details.goodsList.length; i++) {
@ -2870,7 +2871,8 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
if (!val.goodsName || !isNumber(val.num) || val.num === 0)
return ElMessage.warning('请填写正确的货物名称和件数');
if (_arr.includes(val.goodsName)) return ElMessage.warning('存在重复的货物名称,请移除');
if (_arr.includes(val.goodsName))
return ElMessage.warning('存在重复的货物名称,请移除');
}
// if (!(details.query.totalFreight > 0)) return ElMessage.warning('');
@ -3033,9 +3035,11 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
} catch (error) {
console.log('error :>> ', error);
} finally {
clearTimeout(timer);
// laoding
details.loadingObj.submitLoadingBtn = false;
}
}, 500);
} else {
console.log('error submit!');
return false;

Loading…
Cancel
Save