Browse Source

新增数据看板,新增暂存单和自提超时预计

dev-xx
qb 3 months ago
parent
commit
4dfe656294
  1. 1
      package.json
  2. 43
      src/api/wel/index.js
  3. 19
      src/option/distribution/distributionStockArticleSelf.js
  4. 19
      src/option/waybill/TemporaryStorageList.js
  5. 2104
      src/views/desk/DataBoard.vue
  6. 66
      src/views/distribution/artery/TripartiteTransfer.vue
  7. 2
      src/views/distribution/artery/VehicleStowageDetails.vue
  8. 6
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  9. 7
      src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue
  10. 7
      src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue
  11. 42
      src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue
  12. 54
      src/views/waybill/TemporaryStorageList.vue
  13. 1798
      src/views/wel/index.vue

1
package.json

@ -18,6 +18,7 @@
"axios": "^0.21.1",
"crypto-js": "^4.1.1",
"dayjs": "^1.10.6",
"echarts": "^5.5.1",
"element-plus": "^2.3.1",
"file-saver": "^2.0.5",
"html2canvas": "^1.4.1",

43
src/api/wel/index.js

@ -18,9 +18,9 @@ export const postAllocationData = data => {
* @param {Object} data
* @returns
*/
export const postOpenOrderDataByWarehouseId = data => {
export const postAllocationDataByWarehouseId = data => {
return request({
url: '/api/logpm-report/warehouseIndex/openOrderDataByWarehouseId',
url: '/api/logpm-report/warehouseIndex/allocationDataByWarehouseId',
method: 'post',
data,
});
@ -39,6 +39,19 @@ export const postHandOrderData = data => {
});
};
/**
* 当前在库数据 -- 对比数据
* @param {Object} data
* @returns
*/
export const postHandOrderDataByWarehouseId = data => {
return request({
url: '/api/logpm-report/warehouseIndex/handOrderDataByWarehouseId',
method: 'post',
data,
});
};
/**
* 开单数据
* @param {Object} data
@ -52,6 +65,19 @@ export const postOpenOrderData = data => {
});
};
/**
* 开单数据 -- 对比数据
* @param {Object} data
* @returns
*/
export const postOpenOrderDataByWarehouseId = data => {
return request({
url: '/api/logpm-report/warehouseIndex/openOrderDataByWarehouseId',
method: 'post',
data,
});
};
/**
* 开单收入数据
* @param {Object} data
@ -78,6 +104,19 @@ export const postTrunklineCarsData = data => {
});
};
/**
* 干线车次数据 -- 对比数据
* @param {Object} data
* @returns
*/
export const postTrunklineCarsDataByWarehouseId = data => {
return request({
url: '/api/logpm-report/warehouseIndex/trunklineCarsDataByWarehouseId',
method: 'post',
data,
});
};
/**
* 干线发运数据
* @param {Object} data

19
src/option/distribution/distributionStockArticleSelf.js

@ -201,6 +201,25 @@ export const columnList = [
fixed: false,
sortable: true,
},
{
prop: 'isTimeOutName',
label: '超时状态',
type: 3,
values: '',
width: '100',
checkarr: [
{
value: '0',
label: '未超时',
},
{
value: '1',
label: '超时',
},
],
fixed: false,
sortable: true,
},
{
prop: 'warehouse',
label: '所在仓库',

19
src/option/waybill/TemporaryStorageList.js

@ -105,6 +105,25 @@ export const columnList = [
fixed: false,
sortable: true,
},
{
prop: 'isTimeOutName',
label: '超时状态',
type: 14,
values: '',
width: '130',
checkarr: [
{
label: '超时',
value: 1,
},
{
label: '未超时',
value: 0,
},
],
fixed: false,
sortable: true,
},
{
prop: 'totalNum',
label: '数量',

2104
src/views/desk/DataBoard.vue

File diff suppressed because it is too large Load Diff

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

@ -164,6 +164,11 @@
>
</el-button>
<!-- 取消配载 -->
<!-- <el-button type="primary" icon="CircleClose" @click="handleCancelCarsLoad">
取消配载
</el-button> -->
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -490,6 +495,7 @@ import {
} from '@/api/distribution/TripartiteTransfer.js';
import {
postFindLoadingListData,
postCancelCarsLoadByLoadId,
postRemoveCarsLoadScan,
postUpdateLoadScanFinalNodeIdById,
} from '@/api/distribution/VehicleStowage';
@ -1258,6 +1264,66 @@ const handleSubmitCloseAnAccount = async () => {
}
};
/** 取消配载 */
const handleCancelCarsLoad = () => {
if (!ChecksWhetherTheWarehouseIsSelected())
return ElMessage.warning('多仓权限无法操作,请选择仓库');
if (details.selectionList.length === 0) {
return ElMessage({
message: '请选择需要取消的数据',
type: 'warning',
});
} else if (details.selectionList.length !== 1) {
return ElMessage({
message: '仅支持单条数据操作',
type: 'warning',
});
}
ElMessageBox.confirm('确认取消配载吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const ids = [];
const _flag = details.selectionList.every(val => {
ids.push(val.id);
console.log('val :>> ', val);
return Number(val.loadStatus) === 0;
});
if (!_flag)
return ElMessage({
message: '车辆已发车, 无法取消配载计划',
type: 'warning',
});
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: ids.join(','),
startCarType: '1',
};
const res = await postCancelCarsLoadByLoadId(submitData);
const { code } = res.data;
if (code !== 200) {
return;
}
ElMessage({
type: 'success',
message: '取消配载成功',
});
initOnload();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
/**
* 是否开启床车明细全屏
* @params(_type) 开启或关闭

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

@ -1061,7 +1061,7 @@ const handleCostApportionments = async () => {
for (let i = 0; i < details.oldData.length; i++) {
const value = details.oldData[i];
if (!value.checkUserName) {
if (Number(value.checkStatus) === 0) {
_flag = true;
break;
}

6
src/views/distribution/inventory/delivery/distributionStockArticle.vue

@ -733,7 +733,13 @@ import { deepClone, setNodeHeight, hanleTextLineFeed } from '@/utils/util.js';
import { ElMessage, ElMessageBox } from 'element-plus';
import MultiConditionSearch from '@/components/MultiConditionSearch/MultiConditionSearch.vue';
const _newCol = deepClone(columnList);
for (let i = 0; i < _newCol.length; i++) {
const val = _newCol[i];
if (val.label !== '超时状态') continue;
_newCol.splice(i, 1);
break;
}
export default {
components: {
MultiConditionSearch,

7
src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue

@ -471,6 +471,13 @@ import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone, hanleTextLineFeed } from '@/utils/util.js';
import { ElMessage, ElMessageBox } from 'element-plus';
const _newCol = deepClone(columnList);
for (let i = 0; i < _newCol.length; i++) {
const val = _newCol[i];
if (val.label !== '超时状态') continue;
_newCol.splice(i, 1);
break;
}
export default {
data() {
return {

7
src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue

@ -464,6 +464,13 @@ import {
handleSelectQuery,
} from '@/utils/util.js';
const _newCol = deepClone(columnList);
for (let i = 0; i < _newCol.length; i++) {
const val = _newCol[i];
if (val.label !== '超时状态') continue;
_newCol.splice(i, 1);
break;
}
export default {
data() {

42
src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue

@ -121,6 +121,7 @@
:columnList="columnList"
:tableData="data"
:loading="loading"
:tableRowClassName="handleSetRowClassName"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@ -783,6 +784,25 @@ export default {
downloadXls(res.data, '自提订单数据.xlsx');
});
},
handleSetRowClassName(row, rowIndex) {
console.log('row.warehouseEntryTime :>> ', row.warehouseEntryTime);
if (!row.warehouseEntryTime) return 'timeOut';
// -- , 24, 2
// -
const time = Date.now() - new Date(row.warehouseEntryTime).getTime();
console.log('time :>> ', time);
//
const WarningTime = 1000 * 60 * 60 * 24 * 2 - 1000 * 60 * 60 * 2;
console.log('WarningTime :>> ', WarningTime);
//
const timeOut = 1000 * 60 * 60 * 24 * 2;
console.log('timeOut :>> ', timeOut);
if (time > timeOut) return 'timeOut';
else if (time > WarningTime && time < timeOut) return 'WarningTime';
},
/*getMethodName(row,num){
console.log("名称选择事件",row);
switch (num) {
@ -1619,6 +1639,7 @@ export default {
item.availableQuantity = nuMap[item.availableQuantity] || item.availableQuantity;
item.notReceived = parseInt(item.totalNumber) - parseInt(item.incomingNum);
item.isZeroName = Number(item.isZero) === 0 ? '否' : '是';
item.isTimeOutName = Number(item.isTimeOut) === 0 ? '未超时' : '超时';
item.completeSetName = Number(item.completeSet) === 2 ? '已齐套' : '未齐套';
}
@ -1825,4 +1846,25 @@ export default {
.el_textBtn {
font-weight: bold;
}
//
:deep(.el-table) {
tr {
&.WarningTime {
color: #e6a23c !important;
.el-text {
color: #e6a23c !important;
}
}
&.timeOut {
color: #f56c6c !important;
.el-text {
color: #f56c6c !important;
}
}
}
}
</style>

54
src/views/waybill/TemporaryStorageList.vue

@ -143,6 +143,7 @@
? loadingObj.haveDataList
: loadingObj.notHaveDataList
"
:tableRowClassName="handleSetRowClassName"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@ -150,7 +151,13 @@
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<template v-if="slotProps.scope.column.label === '超时状态'">
<el-tag :class="Number(slotProps.scope.row.isTimeOut) === 0 ? 'green' : 'red'">
{{ slotProps.scope.row.isTimeOutName }}
</el-tag>
</template>
<template v-else-if="slotProps.scope.column.label === '操作'">
<el-text
v-if="permissionObj.TemporaryStorageList_packageDetail"
@click="handleShowPackageOrderList(slotProps.scope)"
@ -563,6 +570,7 @@ import {
downloadFileBase64,
handleClearTableQuery,
ChecksWhetherTheWarehouseIsSelected,
handleTranslationDataSeclect,
} from '@/utils/util';
import { columnList } from '@/option/waybill/TemporaryStorageList';
import { useRouter } from 'vue-router';
@ -1026,6 +1034,8 @@ const onLoad = async (params = {} as any, isRefresh?: boolean) => {
value.legacyStatusName = Number(value.legacyStatus) ? '是' : '否';
}
handleTranslationDataSeclect(data.records, details.columnList);
if (status === 'haveData') details.haveDataData = data.records;
else details.notHaveDataData = data.records;
details.page.total = data.total;
@ -1508,6 +1518,27 @@ const handleSubmitCreatePackage = async () => {
}
};
const date = new Date();
/** 设置表格行样式 */
const handleSetRowClassName = (row, rowIndex) => {
if (!row.createTime) return 'timeOut';
// -- , 24, 2
// -
const time = Date.now() - new Date(row.createTime).getTime();
//
const WarningTime = 1000 * 60 * 60 * 22;
//
const timeOut = 1000 * 60 * 60 * 24;
if (time > timeOut) return 'timeOut';
else if (time > WarningTime && time < timeOut) return 'WarningTime';
};
onActivated(() => {
console.log('activated');
console.log('this.$store :>> ', $store);
@ -1689,4 +1720,25 @@ onActivated(() => {
text-align: left !important;
}
}
//
:deep(.el-table) {
tr {
&.WarningTime {
color: #e6a23c !important;
.el-text {
color: #e6a23c !important;
}
}
&.timeOut {
color: #f56c6c !important;
.el-text {
color: #f56c6c !important;
}
}
}
}
</style>

1798
src/views/wel/index.vue

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save