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

4
src/utils/print.js

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

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

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

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

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

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

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

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

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

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

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

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

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

10
src/views/waybill/CreateZeroOrder.vue

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

Loading…
Cancel
Save