Browse Source

修复干线部分bug

dev-xx
qb 1 year ago
parent
commit
1cee9e61f6
  1. 9
      src/views/distribution/artery/TripartiteTransfer.vue
  2. 26
      src/views/distribution/artery/truckLoadingDetails.vue
  3. 2
      src/views/distribution/inventory/BookingNote.vue
  4. 9
      src/views/warehouse/warehouseWaybill.vue
  5. 70
      src/views/waybill/FreezeOrder.vue
  6. 77
      src/views/waybill/TemporaryStorageList.vue

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

@ -419,7 +419,13 @@ import dayjs from 'dayjs';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
/** 获取字典 */ /** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, deepClone, setNodeHeight, debounce } from '@/utils/util'; import {
downloadXls,
deepClone,
setNodeHeight,
debounce,
handleClearTableQuery,
} from '@/utils/util';
import { columnList, detailsColumnList } from '@/option/distribution/TripartiteTransfer'; import { columnList, detailsColumnList } from '@/option/distribution/TripartiteTransfer';
import { packageColumnList } from '@/option/distribution/VehicleStowage'; import { packageColumnList } from '@/option/distribution/VehicleStowage';
import { import {
@ -755,6 +761,7 @@ const searchReset = () => {
details.query = {}; details.query = {};
details.stockupDate = []; details.stockupDate = [];
details.page.pageNum = 1; details.page.pageNum = 1;
handleClearTableQuery(details.columnList);
onLoad(); onLoad();
}; };

26
src/views/distribution/artery/truckLoadingDetails.vue

@ -2,9 +2,9 @@
<basic-container> <basic-container>
<div class="avue-crud" v-loading="details.loadingObj.pageLoading"> <div class="avue-crud" v-loading="details.loadingObj.pageLoading">
<!-- 搜索模块 --> <!-- 搜索模块 -->
<el-row v-if="!search"> <div v-h5uShow="!search">
<!-- 查询模块 --> <!-- 查询模块 -->
<el-form :inline="true" :model="query" class="el-fr-d"> <el-form :inline="true" :model="query" class="header_search">
<el-form-item label="扫码时间:" class="el-times"> <el-form-item label="扫码时间:" class="el-times">
<el-date-picker <el-date-picker
v-model="stockupDate" v-model="stockupDate"
@ -37,7 +37,7 @@
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button> <el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </div>
<!-- 控件模块 --> <!-- 控件模块 -->
<div class="avue-crud__header"> <div class="avue-crud__header">
@ -216,7 +216,7 @@ import {
import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails'; import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails';
/** 获取字典 */ /** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, getHtmls, debounce } from '@/utils/util'; import { downloadXls, getHtmls, debounce, setNodeHeight } from '@/utils/util';
import { detailsColumnList } from '@/option/distribution/TripartiteTransfer'; import { detailsColumnList } from '@/option/distribution/TripartiteTransfer';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import print from '@/utils/print'; import print from '@/utils/print';
@ -524,23 +524,9 @@ const showdrawer = (_flag?: boolean, _type?: string) => {
/** 是否开启搜索区 */ /** 是否开启搜索区 */
const searchHide = () => { const searchHide = () => {
function getWinHight() {
var windowHight = 0;
if (document.body.clientHeight && document.documentElement.clientHeight) {
windowHight =
document.body.clientHeight < document.documentElement.clientHeight
? document.body.clientHeight
: document.documentElement.clientHeight;
} else {
}
return document.documentElement.clientHeight;
}
details.search = !details.search; details.search = !details.search;
const timer = setTimeout(() => {
details.listNode.style.height = setNodeHeight(tableNodeRef.value.$el, '', true);
getWinHight() - details.listNode.getBoundingClientRect().top - 70 + 'px';
clearTimeout(timer);
}, 10);
}; };
/** 表格表头输入框搜索 */ /** 表格表头输入框搜索 */

2
src/views/distribution/inventory/BookingNote.vue

@ -1543,7 +1543,7 @@ const onLoad = async () => {
const handleFindInfo = async type => { const handleFindInfo = async type => {
try { try {
details.loadingObj.pageLaoding = true; details.loadingObj.pageLaoding = true;
details.data = [];
const submitData = { const submitData = {
waybillId: $route.query.id, waybillId: $route.query.id,
infoType: type, infoType: type,

9
src/views/warehouse/warehouseWaybill.vue

@ -346,7 +346,7 @@
<el-input-number <el-input-number
class="w100" class="w100"
:min="0" :min="0"
:max="itemlimit.splitNum + rowobj.handleNum - totalNum" :max="rowobj.handleNum"
:value-on-clear="0" :value-on-clear="0"
v-model="itemlimit.splitNum" v-model="itemlimit.splitNum"
:controls="false" :controls="false"
@ -1157,7 +1157,8 @@ export default {
}); });
}, },
showcd({ row }) { showcd({ row }) {
if (row.handleNum === 0) return this.$message.warning('可用数量为0,暂无法拆单'); if (row.handleNum === 0 || !row.handleNum)
return this.$message.warning('可用数量为0,暂无法拆单');
this.dialogTableVisible = true; this.dialogTableVisible = true;
this.rowobj = row; this.rowobj = row;
@ -1206,6 +1207,7 @@ export default {
this.loadingObj.pageLoading = true; this.loadingObj.pageLoading = true;
let _arr = []; let _arr = [];
let totalNum = 0;
for (let index = 0; index < this.orderlist.length; index++) { for (let index = 0; index < this.orderlist.length; index++) {
const value = this.orderlist[index]; const value = this.orderlist[index];
@ -1216,6 +1218,7 @@ export default {
console.log('item :>> ', item); console.log('item :>> ', item);
if (isNumber(item.splitNum) && item.splitNum > 0) _flag = true; if (isNumber(item.splitNum) && item.splitNum > 0) _flag = true;
totalNum += item.splitNum;
} }
if (!_flag) continue; if (!_flag) continue;
@ -1232,7 +1235,7 @@ export default {
console.log('_arr :>> ', _arr); console.log('_arr :>> ', _arr);
if (_arr.length === 0) return this.$message.error('请选择需要拆单的数据'); if (_arr.length === 0) return this.$message.error('请选择需要拆单的数据');
if (totalNum > this.rowobj.handleNum) return this.$message.error('总数大于可用数量');
this.dialogTableVisible = false; this.dialogTableVisible = false;
const res = await splitOrder(_arr); const res = await splitOrder(_arr);

70
src/views/waybill/FreezeOrder.vue

@ -1,5 +1,5 @@
<template> <template>
<basic-container> <basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud"> <div class="avue-crud">
<!-- 搜索模块 --> <!-- 搜索模块 -->
<el-row v-if="!search"> <el-row v-if="!search">
@ -90,33 +90,13 @@
> >
<template #default="slotProps"> <template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'"> <template v-if="slotProps.scope.column.label === '操作'">
<el-text @click="handleShowPackageOrderList(slotProps.scope)"> 包明细 </el-text> <!-- <el-text @click="handleShowPackageOrderList(slotProps.scope)"> 包明细 </el-text> -->
</template> </template>
</template> </template>
</tablecmt> </tablecmt>
</div> </div>
</div> </div>
<!-- 表格 -->
<!-- <tablecmt
:columnList="details.columnList"
:tableData="data"
:loading="loadingObj.list"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)">
包明细
</el-button>
</template>
</template>
</tablecmt> -->
<!-- 分页模块 --> <!-- 分页模块 -->
<el-row class="el-fy"> <el-row class="el-fy">
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div class="avue-crud__pagination flex-c-sb" style="width: 100%">
@ -164,7 +144,7 @@ import { downloadXls, setNodeHeight, getHtmls } from '@/utils/util';
import { columnList, packageListColumnList } from '@/option/waybill/FreezeOrder'; import { columnList, packageListColumnList } from '@/option/waybill/FreezeOrder';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import print from '@/utils/print'; import print from '@/utils/print';
import { ElMessage } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
// //
const $router = useRouter(); const $router = useRouter();
@ -223,6 +203,7 @@ const details = reactive<any>({
/** 列表加载loading */ /** 列表加载loading */
list: false, list: false,
packageListLoading: false, packageListLoading: false,
pageLoading: false,
}, },
/** 列表复选框选中的数据 */ /** 列表复选框选中的数据 */
selectionList: [], selectionList: [],
@ -447,7 +428,13 @@ const beforeClose = done => {
/** 查看包明细 */ /** 查看包明细 */
const handleShowPackageOrderList = ({ row }) => { const handleShowPackageOrderList = ({ row }) => {
$router.push('/waybill/orderPackageList'); $router.push({
path: '/waybill/orderPackageListDetails?name=包明细',
query: {
id: row.id,
name: `订单 -- ${row.orderCode} 包明细`,
},
});
}; };
/** 修改客户信息 */ /** 修改客户信息 */
@ -483,17 +470,30 @@ const handleRefresh = () => {
}); });
} }
const ids = details.selectionList.map(item => item.id); ElMessageBox.confirm('是否确认恢复选中的数据项?', '警告', {
confirmButtonText: '确定',
postOpenOrderFreezeByAdvanceIds({ advanceIds: ids, freezeStatus: '0' }).then(res => { cancelButtonText: '取消',
const { code } = res.data; type: 'warning',
if (code !== 200) return; }).then(async () => {
ElMessage({ try {
type: 'success', details.loadingObj.pageLoading = true;
message: '操作成功',
}); const ids = details.selectionList.map(item => item.id);
details.page.pageNum = 1;
initOnLoad(); const res = await postOpenOrderFreezeByAdvanceIds({ advanceIds: ids, freezeStatus: '0' });
const { code } = res.data;
if (code !== 200) return;
ElMessage({
type: 'success',
message: '操作成功',
});
details.page.pageNum = 1;
initOnLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}); });
}; };

77
src/views/waybill/TemporaryStorageList.vue

@ -1,5 +1,5 @@
<template> <template>
<basic-container> <basic-container v-loading="loadingObj.pageLoading">
<div class="avue-crud"> <div class="avue-crud">
<!-- 搜索模块 --> <!-- 搜索模块 -->
<div v-h5uShow="!search"> <div v-h5uShow="!search">
@ -554,6 +554,7 @@ const details = reactive<any>({
addTagLoading: false, addTagLoading: false,
/** 上传 */ /** 上传 */
UploadLoadong: false, UploadLoadong: false,
pageLoading: false,
}, },
/** 列表复选框选中的数据 */ /** 列表复选框选中的数据 */
selectionList: [], selectionList: [],
@ -874,21 +875,19 @@ const onLoad = async (params = {} as any, isRefresh?: boolean) => {
details.query.freezeStatus = '0'; details.query.freezeStatus = '0';
params.hasPackage = status === 'haveData' ? 1 : 0; params.hasPackage = status === 'haveData' ? 1 : 0;
console.log('details.selectionList :>> ', details.selectionList.length);
// //
const res = await getopenOrderAdvancePageList(details.page, { ...details.query, ...params }); const res = await getopenOrderAdvancePageList(details.page, { ...details.query, ...params });
console.log('details.selectionList :>> ', details.selectionList.length);
console.log('res :>> ', res); console.log('res :>> ', res);
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
const _arr = [...details.selectionList];
if (status === 'haveData') details.haveDataData = data.records; if (status === 'haveData') details.haveDataData = data.records;
else details.notHaveDataData = data.records; else details.notHaveDataData = data.records;
details.page.total = data.total; details.page.total = data.total;
if (!isRefresh) return; if (isRefresh) return;
const _arr = [...details.selectionList];
for (const item of data.records) { for (const item of data.records) {
for (let index = 0; index < _arr.length; index++) { for (let index = 0; index < _arr.length; index++) {
@ -901,6 +900,7 @@ const onLoad = async (params = {} as any, isRefresh?: boolean) => {
} }
} }
console.log('_arr :>> ', _arr);
await nextTick(); await nextTick();
tableNodeRef.value.handleCheckSelect(_arr); tableNodeRef.value.handleCheckSelect(_arr);
@ -914,10 +914,10 @@ const onLoad = async (params = {} as any, isRefresh?: boolean) => {
} }
}; };
const initOnLoad = (params = {}) => { const initOnLoad = (params = {}, isRefresh = false) => {
details.page.pageNum = 1; details.page.pageNum = 1;
details.page.total = 0; details.page.total = 0;
onLoad(params); onLoad(params, isRefresh);
}; };
initOnLoad(); initOnLoad();
@ -1113,10 +1113,13 @@ const handleDelete = () => {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { }).then(async () => {
const ids = details.selectionList.map(item => item.id); try {
details.loadingObj.pageLoading = true;
postOpenOrderDeletedAdvance({ advanceIds: ids, freezeStatus: '1' }).then(res => { const ids = details.selectionList.map(item => item.id);
const res = await postOpenOrderDeletedAdvance({ advanceIds: ids, freezeStatus: '1' });
const { code } = res.data; const { code } = res.data;
if (code !== 200) return; if (code !== 200) return;
ElMessage({ ElMessage({
@ -1124,21 +1127,15 @@ const handleDelete = () => {
message: '操作成功', message: '操作成功',
}); });
details.page.pageNum = 1; details.page.pageNum = 1;
initOnLoad(); initOnLoad({}, true);
}); } catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}); });
}; };
/** 批量发车 */
const handleDepart = () => {
if (details.selectionList.length === 0) {
return ElMessage({
type: 'warning',
message: '最少选择一条数据',
});
}
};
/** 批量冻结 */ /** 批量冻结 */
const handleFreeze = () => { const handleFreeze = () => {
if (details.selectionList.length === 0) { if (details.selectionList.length === 0) {
@ -1149,16 +1146,28 @@ const handleFreeze = () => {
} }
const ids = details.selectionList.map(item => item.id); const ids = details.selectionList.map(item => item.id);
ElMessageBox.confirm('确认冻结数据吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
postOpenOrderFreezeByAdvanceIds({ advanceIds: ids, freezeStatus: '1' }).then(res => { const res = await postOpenOrderFreezeByAdvanceIds({ advanceIds: ids, freezeStatus: '1' });
const { code } = res.data; const { code } = res.data;
if (code !== 200) return; if (code !== 200) return;
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '操作成功', message: '操作成功',
}); });
details.page.pageNum = 1; details.page.pageNum = 1;
initOnLoad(); initOnLoad({}, true);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}); });
}; };
@ -1217,7 +1226,7 @@ const handleSuccess = res => {
details.loadingObj.UploadLoadong = false; details.loadingObj.UploadLoadong = false;
if (res.code !== 200) return ElMessage.warning('上传失败'); if (res.code !== 200) return ElMessage.warning('上传失败');
ElMessage.success('上传成功'); ElMessage.success('上传成功');
initOnLoad(); initOnLoad({}, true);
}; };
/** 上传失败 */ /** 上传失败 */
@ -1249,7 +1258,7 @@ const handleSubmitAddTag = async (formEl: FormInstance | undefined) => {
if (code !== 200) return; if (code !== 200) return;
ElMessage.success('添加成功'); ElMessage.success('添加成功');
details.popUpShow.addTagVisited = false; details.popUpShow.addTagVisited = false;
initOnLoad(); initOnLoad({}, true);
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {

Loading…
Cancel
Save