Browse Source

新增三方发车检测

dev-xx
qb 7 months ago
parent
commit
642881a00f
  1. 11
      src/api/distribution/TripartiteTransfer.js
  2. 9
      src/components/popupnotification/popupnotification.vue
  3. 3
      src/main.js
  4. 341
      src/views/distribution/artery/TripartiteTransfer.vue
  5. 47
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

11
src/api/distribution/TripartiteTransfer.js

@ -120,3 +120,14 @@ export const postTripartiteTransferUploadSignPhoto = data => {
data, data,
}); });
}; };
/**
* 上传签收图片
*/
export const postTripartiteTransferStartCarsBefore = data => {
return request({
url: '/api/logpm-trunkline/tripartiteTransfer/startCarsBefore',
method: 'post',
data,
});
};

9
src/components/popupnotification/popupnotification.vue

@ -30,8 +30,13 @@
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="onClose">{{ cancelButtonText }}</el-button> <el-button @click="onClose">{{ cancelButtonText }}</el-button>
<el-button @click="onConfirm" class="el_delte_button" type="primary"> <el-button
<el-icon><QuestionFilled /></el-icon>{{ confirmButtonText }} @click="onConfirm"
class="el_delte_button"
icon="QuestionFilled"
type="primary"
>
{{ confirmButtonText }}
</el-button> </el-button>
</div> </div>
</template> </template>

3
src/main.js

@ -32,6 +32,7 @@ import TripartiteTransferPrintTemplate from './components/TripartiteTransferPrin
import ImgList from './components/ImgList/ImgList.vue'; import ImgList from './components/ImgList/ImgList.vue';
import MyPrint from './components/MyPrint/MyPrint.vue'; import MyPrint from './components/MyPrint/MyPrint.vue';
import MyUpload from './components/MyUpload/MyUpload.vue'; import MyUpload from './components/MyUpload/MyUpload.vue';
import DeleteWarningDialog from './components/popupnotification/popupnotification.vue';
import { message } from './utils/resetMessage'; import { message } from './utils/resetMessage';
import FileslicingPlugin from './utils/Fileslicing.js'; import FileslicingPlugin from './utils/Fileslicing.js';
import App from './App.vue'; import App from './App.vue';
@ -69,6 +70,8 @@ app.component('WaybillPrintTemplate', WaybillPrintTemplate);
app.component('ArteryPrintTemplate', ArteryPrintTemplate); app.component('ArteryPrintTemplate', ArteryPrintTemplate);
/** 三方运输打印模版 */ /** 三方运输打印模版 */
app.component('TripartiteTransferPrintTemplate', TripartiteTransferPrintTemplate); app.component('TripartiteTransferPrintTemplate', TripartiteTransferPrintTemplate);
/** 警告提示 */
app.component('DeleteWarningDialog', DeleteWarningDialog);
app.component('ImgList', ImgList); app.component('ImgList', ImgList);
app.config.globalProperties.$dayjs = dayjs; app.config.globalProperties.$dayjs = dayjs;
app.config.globalProperties.$functions = functions; app.config.globalProperties.$functions = functions;

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

@ -136,14 +136,14 @@
</el-button> </el-button>
<!-- 取消发车 --> <!-- 取消发车 -->
<el-button <!-- <el-button
v-if="permissionObj.TripartiteTransfer_cancelStartCar" v-if="permissionObj.TripartiteTransfer_cancelStartCar"
type="primary" type="primary"
icon="CircleClose" icon="CircleClose"
@click="handleCancelStartCar" @click="handleCancelStartCar"
> >
取消发车 取消发车
</el-button> </el-button> -->
<!-- 到达 --> <!-- 到达 -->
<el-button <el-button
@ -368,118 +368,6 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 配置装车目的地 -->
<el-dialog
title="配置装车目的地"
v-model="details.popUpShow.truckLoadingDetailVisited"
width="80%"
:before-close="beforeClose"
append-to-body
:fullscreen="details.fullscreenObj.truckLoadingDetailPopUp"
:show-close="false"
class="truckLoadingDetailPopUp"
v-loading="details.loadingObj.truckLoadingDetailPopUpTable"
>
<!-- 标题 -- 头部控件区 -->
<template #header="{ close, titleId, titleClass }">
<div class="my-header flex-c-sb">
<div class="fwb" :id="titleId" :class="titleClass">配置装车目的地</div>
<div class="flex-c-c">
<!-- 全屏显示按钮 -->
<el-button type="text" v-if="!details.fullscreenObj.truckLoadingDetailPopUp">
<el-icon class="" @click="handleFullScrean('open', 'truckLoadingDetailPopUp')"
><FullScreen
/></el-icon>
</el-button>
<el-button type="text" v-else>
<el-icon class="" @click="handleFullScrean('close', 'truckLoadingDetailPopUp')"
><CopyDocument
/></el-icon>
</el-button>
<!-- 弹窗关闭按钮 -->
<el-button type="text">
<el-icon class="" @click="close"><Close /></el-icon>
</el-button>
</div>
</div>
</template>
<div v-loading="details.loadingObj.truckLoadingDetailPopUpLoading">
<el-button
icon="Edit"
type="primary"
v-if="details.nextNodeData.length > 1"
@click="handleOpenConfiguration('batch')"
>
配置目的地
</el-button>
<tablecmt
class="truckLoadingDetailPopUpTable mt10"
:columnList="details.packageColumnList"
:tableData="details.packageRenderData"
:loading="loadingObj.list"
@inputTxt="packageInputsc"
@selection="list => (details.packageSelectedData = list)"
>
<template #default="slotProps">
<el-text
v-if="details.nextNodeData.length > 1"
@click="handleOpenConfiguration('one', slotProps.scope)"
>配置目的地</el-text
>
<el-text @click="removePackage(slotProps.scope)">移除</el-text>
</template>
</tablecmt>
<div class="dialog-footer">
<el-button
icon="el-icon-circle-close"
@click="details.popUpShow.truckLoadingDetailVisited = false"
> </el-button
>
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit"
> </el-button
>
</div>
</div>
</el-dialog>
<!-- 配置装车目的地 -->
<el-dialog
title="配置装车目的地"
v-model="details.popUpShow.chooseDestinationVisited"
width="30%"
append-to-body
class="truckLoadingDetailPopUp"
>
<el-form-item label="目的地" prop="region">
<el-select v-model="details.chooseNodeId" placeholder="请选择目的地" class="w100">
<el-option
v-for="item in details.nextNodeData"
:key="item"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</el-form-item>
<!-- 表单按钮 -->
<template #footer>
<div class="dialog-footer">
<el-button
icon="el-icon-circle-close"
@click="details.popUpShow.chooseDestinationVisited = false"
> </el-button
>
<el-button type="primary" icon="el-icon-circle-check" @click="handleEditSubmit">
</el-button>
</div>
</template>
</el-dialog>
<!-- 配载清单 --> <!-- 配载清单 -->
<el-dialog <el-dialog
title="配载清单" title="配载清单"
@ -534,6 +422,24 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 发车提示 -->
<DeleteWarningDialog
v-model="details.popUpShow.tipVisted"
:width="'600'"
title="取消计划警告!"
confirmButtonText="确认取消"
@close="details.popUpShow.tipVisted = false"
@confirm="startCar"
>
<template #content>
<el-text class="mx-1" size="large">
<el-icon><StarFilled /></el-icon>
数据存在<strong>已备货</strong>状态,<strong>仔细核验数据</strong>,避免误操作<br />
如果核验无误请继续执行...
</el-text>
</template>
</DeleteWarningDialog>
<!-- 图片预览 --> <!-- 图片预览 -->
<el-dialog <el-dialog
v-model="details.popUpShow.dialogVisible" v-model="details.popUpShow.dialogVisible"
@ -576,7 +482,6 @@ import {
getObjType, getObjType,
} from '@/utils/util'; } from '@/utils/util';
import { columnList, detailsColumnList } from '@/option/distribution/TripartiteTransfer'; import { columnList, detailsColumnList } from '@/option/distribution/TripartiteTransfer';
import { packageColumnList } from '@/option/distribution/VehicleStowage';
import { import {
postArriveCars, postArriveCars,
postTripartiteTransferPageList, postTripartiteTransferPageList,
@ -586,6 +491,7 @@ import {
postSettlementCars, postSettlementCars,
postTripartiteTransferFindSignPhoto, postTripartiteTransferFindSignPhoto,
postTripartiteTransferUploadSignPhoto, postTripartiteTransferUploadSignPhoto,
postTripartiteTransferStartCarsBefore,
} from '@/api/distribution/TripartiteTransfer.js'; } from '@/api/distribution/TripartiteTransfer.js';
import { import {
postFindLoadingListData, postFindLoadingListData,
@ -674,10 +580,6 @@ const details = reactive<any>({
popUpShow: { popUpShow: {
/** 到达确认 */ /** 到达确认 */
confirmArriveVisited: false, confirmArriveVisited: false,
/** 配置目的地 */
truckLoadingDetailVisited: false,
/** 选择目的地弹窗 */
chooseDestinationVisited: false,
/** 结算弹窗 */ /** 结算弹窗 */
closeAnAccountVisited: false, closeAnAccountVisited: false,
/** 装载清单 */ /** 装载清单 */
@ -731,20 +633,6 @@ const details = reactive<any>({
/** 装载清单 */ /** 装载清单 */
listOfLoadedWagonsPopUp: false, listOfLoadedWagonsPopUp: false,
}, },
packageColumnList: deepClone(packageColumnList),
/** 配置装车目的地数据 */
packageData: [],
/** 配置装车目的地数据 -- 渲染数据 */
packageRenderData: [],
/** 后续装车目的地 */
nextNodeData: [],
/** 配置目的地 -- 被选中的数据 */
packageSelectedData: [],
/** 被修改的数据 */
modifyData: [],
/** 被选中的数据 */
chooseNodeId: '',
packageQuery: {},
/** 结算金额表单 */ /** 结算金额表单 */
closeAnAccountForm: { number: 0 }, closeAnAccountForm: { number: 0 },
listOfLoadedWagonsData: {}, listOfLoadedWagonsData: {},
@ -964,7 +852,6 @@ const showdrawer = (_flag?: boolean, _type?: string) => {
console.log('123 :>> ', 123); console.log('123 :>> ', 123);
details.editColumnList = details.columnList; details.editColumnList = details.columnList;
break; break;
// details.
} }
details.drawerShow = _flag; details.drawerShow = _flag;
}; };
@ -982,11 +869,11 @@ const inputsc = (index, row) => {
if (index === '') delete details.query[row.prop]; if (index === '') delete details.query[row.prop];
if (row.prop === 'carsNo') { if (row.prop === 'carsNo') {
details.query.loadCarsNo = index; details.query.loadCarsNo = index;
if (!index && index !== 0) delete details.query[row.prop]; if (!index && index !== 0) delete details.query['loadCarsNo'];
} }
if (row.prop === 'carsLineName') { if (row.prop === 'carsLineName') {
details.query.warehouseName = index; details.query.warehouseName = index;
if (!index && index !== 0) delete details.query[row.prop]; if (!index && index !== 0) delete details.query['carsLineName'];
} }
onLoad(); onLoad();
}; };
@ -1119,7 +1006,11 @@ const submitConfirmArrive = async () => {
type: 'warning', type: 'warning',
}); });
} }
details.popUpShow.confirmArriveVisited = false;
try { try {
details.loadingObj.pageLoading = true;
const submitData = { const submitData = {
loadId: details.selectionList.map(val => val.id).join(','), loadId: details.selectionList.map(val => val.id).join(','),
...details.form, ...details.form,
@ -1135,42 +1026,31 @@ const submitConfirmArrive = async () => {
type: 'success', type: 'success',
message: '到达成功', message: '到达成功',
}); });
details.popUpShow.confirmArriveVisited = false;
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
} }
}; };
/** 发车 */ /** 发车提交 */
const handleConfirmStartCar = () => { const startCar = async () => {
if (details.selectionList.length === 0) { try {
return ElMessage({ details.popUpShow.tipVisted = true;
message: '请选择发车数据', details.loadingObj.pageLoading = true;
type: 'warning',
});
} else if (details.selectionList.length !== 1) {
return ElMessage({
message: '仅支持单条数据操作',
type: 'warning',
});
}
ElMessageBox.confirm('确认发车吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const _arr = [];
for (let index = 0; index < details.selectionList.length; index++) { // const _arr = [];
const item = details.selectionList[index];
if (item.realLoadingNumber === 0) return ElMessage.warning('存在未装车数据'); // for (let index = 0; index < details.selectionList.length; index++) {
// const item = details.selectionList[index];
_arr.push(item.id); // if (item.realLoadingNumber === 0) return ElMessage.warning('');
}
// _arr.push(item.id);
// }
const submitData = { const submitData = {
loadId: _arr.join(','), loadId: details.selectionList[0].id,
}; };
const res = await postStartCars(submitData); const res = await postStartCars(submitData);
@ -1183,99 +1063,62 @@ const handleConfirmStartCar = () => {
message: '发车成功', message: '发车成功',
}); });
onLoad(); onLoad();
});
};
/** 开启弹窗 */
const handleOpenConfiguration = (type: 'one' | 'batch', data = {} as any) => {
if (type === 'batch' && details.packageSelectedData.length === 0)
return ElMessage.warning('最少选择一条数据');
details.modifyData = type === 'one' ? [data.row] : details.packageSelectedData;
details.popUpShow.chooseDestinationVisited = true;
};
/** 配置装车目的地 */
const handleEditSubmit = () => {
const chooseItem = details.nextNodeData.find(val => val.warehouseId === details.chooseNodeId);
for (const iterator of details.modifyData) {
iterator.nodeName = chooseItem.warehouseName;
iterator.nodeId = chooseItem.warehouseId;
}
details.popUpShow.chooseDestinationVisited = false;
};
/** 移除 */
const removePackage = async ({ row }) => {
try {
details.loadingObj.truckLoadingDetailPopUpLoading = true;
const submitData = {
orderCode: row.orderCode,
carsLoadScanIds: row.id,
};
const res = await postRemoveCarsLoadScan(submitData);
if (res.data.code !== 200) return;
ElMessage.success(res.data.msg || '移除成功');
await handleConfirmStartCar();
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
details.loadingObj.truckLoadingDetailPopUpLoading = false; details.loadingObj.pageLoading = false;
} }
}; };
/** 确认配置 */ /** 发车 */
const handleSubmit = async () => { const handleConfirmStartCar = async () => {
details.loadingObj.truckLoadingDetailPopUpLoading = true;
try { try {
const submitData = { details.loadingObj.pageLoading = true;
loadId: details.selectionList[0].id,
loadScanFinalNodeIdList: [],
};
details.packageData.forEach(val => { if (details.selectionList.length === 0) {
if (val.nodeId) return ElMessage({
submitData.loadScanFinalNodeIdList.push({ loadScanId: val.id, finalNodeId: val.nodeId }); message: '请选择发车数据',
type: 'warning',
});
} else if (details.selectionList.length !== 1) {
return ElMessage({
message: '仅支持单条数据操作',
type: 'warning',
}); });
const res = await postUpdateLoadScanFinalNodeIdById(submitData);
if (res.data.code !== 200) return;
details.popUpShow.truckLoadingDetailVisited = false;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.truckLoadingDetailPopUpLoading = false;
} }
};
/** 输入筛选 */ const res = await postTripartiteTransferStartCarsBefore({
const packageInputsc = (value, row) => { loadId: details.selectionList[0].id,
// });
const reg = new RegExp('^' + value);
details.packageQuery[row.prop] = reg; const { code, data } = res.data;
if (value === '') delete details.packageQuery[row.prop]; if (code !== 200 || getObjType(data) !== 'object') return;
if (Object.keys(details.packageQuery).length === 0) if (!data.loadingNum) return ElMessage.warning('未存在装车数据,无法发车');
return (details.packageRenderData = details.packageData); if (!data.unloadNum) return ElMessage.warning('未存在卸车数据,无法发车');
const _data = details.packageData.filter(item => { // ,
let _flag = true; if (data.loadingNum === data.unloadNum) {
for (let key in details.packageQuery) { ElMessageBox.confirm('确认发车吗?', '提示', {
if (!details.packageQuery[key].test(item[key])) _flag = false; confirmButtonText: '确认',
if (!_flag) break; cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
startCar();
});
return;
} }
return _flag; //
}); details.popUpShow.tipVisted = true;
details.packageRenderData = _data; // ElMessage.warning('')
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}; };
/** 取消发车 */ /** 取消发车 */
@ -1296,6 +1139,9 @@ const handleCancelStartCar = () => {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(async () => { }).then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = { const submitData = {
loadId: details.selectionList.map(val => val.id).join(','), loadId: details.selectionList.map(val => val.id).join(','),
}; };
@ -1310,6 +1156,11 @@ const handleCancelStartCar = () => {
message: '取消发车成功', message: '取消发车成功',
}); });
onLoad(); onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}); });
}; };
@ -1331,6 +1182,9 @@ const handleTheClerkSignsForIt = ({ row }) => {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'success', type: 'success',
}).then(async () => { }).then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = { const submitData = {
loadId: row.id, loadId: row.id,
}; };
@ -1345,6 +1199,11 @@ const handleTheClerkSignsForIt = ({ row }) => {
message: '签收成功', message: '签收成功',
}); });
onLoad(); onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
}); });
}; };
@ -1358,6 +1217,9 @@ const handleShowCloseAnAccount = ({ row }) => {
/** 结算提交 */ /** 结算提交 */
const handleSubmitCloseAnAccount = async () => { const handleSubmitCloseAnAccount = async () => {
try { try {
try {
details.loadingObj.pageLoading = true;
const submitData = { const submitData = {
loadId: details.closeAnAccountForm.id, loadId: details.closeAnAccountForm.id,
settlementValue: details.closeAnAccountForm.number, settlementValue: details.closeAnAccountForm.number,
@ -1372,6 +1234,11 @@ const handleSubmitCloseAnAccount = async () => {
initPage(); initPage();
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
} catch (error) {
console.log('error :>> ', error);
} finally { } finally {
} }
}; };

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

@ -966,9 +966,6 @@
</el-dialog> </el-dialog>
<!-- 备货删除提示 --> <!-- 备货删除提示 -->
<DeleteWarningDialog <DeleteWarningDialog
:modelValue="popupnotification" :modelValue="popupnotification"
:width="'600'" :width="'600'"
@ -976,7 +973,6 @@
confirmButtonText="确认取消" confirmButtonText="确认取消"
@close="handleDialogClose" @close="handleDialogClose"
@confirm="handleDialogConfirm" @confirm="handleDialogConfirm"
> >
<template #content> <template #content>
<el-text class="mx-1" size="large"> <el-text class="mx-1" size="large">
@ -986,7 +982,6 @@
</el-text> </el-text>
</template> </template>
</DeleteWarningDialog> </DeleteWarningDialog>
</basic-container> </basic-container>
</template> </template>
@ -1014,10 +1009,10 @@ import {
$_loadingAbnormalPackageListTurnDown, $_loadingAbnormalPackageListTurnDown,
$_retentionScan, $_retentionScan,
} from '@/api/distribution/distributionDeliveryList'; } from '@/api/distribution/distributionDeliveryList';
import{compressImageBlob } from '@/components/IMGcompressor/imgcompressor.js' import { compressImageBlob } from '@/components/IMGcompressor/imgcompressor.js';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle'; import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { exportBlob } from '@/api/common'; import { exportBlob } from '@/api/common';
import DeleteWarningDialog from '@/components/popupnotification/popupnotification.vue' import DeleteWarningDialog from '@/components/popupnotification/popupnotification.vue';
import { downloadXls } from '@/utils/util'; import { downloadXls } from '@/utils/util';
import { dateNow } from '@/utils/date'; import { dateNow } from '@/utils/date';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
@ -1047,10 +1042,10 @@ import { setNodeHeight } from '@/utils/util.js';
import { AbnormalReview } from '@/option/distribution/DeliveryExceptionReview.js'; import { AbnormalReview } from '@/option/distribution/DeliveryExceptionReview.js';
import print from '@/utils/print'; import print from '@/utils/print';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { Delete, Edit, Search, Share, Upload } from '@element-plus/icons-vue' import { Delete, Edit, Search, Share, Upload } from '@element-plus/icons-vue';
export default { export default {
components: { components: {
DeleteWarningDialog DeleteWarningDialog,
}, },
data() { data() {
return { return {
@ -4616,18 +4611,16 @@ export default {
}) })
.catch(error => { .catch(error => {
console.log(error); console.log(error);
})
}).finally(()=>{ .finally(() => {
this.loading = false; this.loading = false;
}); });
}, },
// //
confirmdelete(){ confirmdelete() {},
},
// //
handleDialogClose() { handleDialogClose() {
this.popupnotification=false this.popupnotification = false;
}, },
// //
handleDialogConfirm() { handleDialogConfirm() {
@ -4643,17 +4636,16 @@ export default {
} else { } else {
data.packageIds = this.DataRwo.id; // data.packageIds = this.DataRwo.id; //
} }
this.Cancelstocking(data) this.Cancelstocking(data);
this.popupnotification = false; this.popupnotification = false;
}, },
// //
cancelReservationInventoryPackage(row) { cancelReservationInventoryPackage(row) {
this.DataRwo=row this.DataRwo = row;
console.log(row) console.log(row);
if(row.stockStatus ==20 || row.stockStatusName =="已备货"){ if (row.stockStatus == 20 || row.stockStatusName == '已备货') {
this.popupnotification=true this.popupnotification = true;
return return;
} }
this.$confirm('是否计划取消?') this.$confirm('是否计划取消?')
.then(() => { .then(() => {
@ -4664,7 +4656,7 @@ export default {
type: 2, type: 2,
packageIds: row.id, packageIds: row.id,
}; };
this.Cancelstocking(data) this.Cancelstocking(data);
}) })
.catch(() => {}); .catch(() => {});
}, },
@ -5085,10 +5077,12 @@ export default {
return; return;
} }
// //
let StockupState= this.selectionList.find(item=>item.stockStatus == 20 || item.stockStatusName =="已备货") let StockupState = this.selectionList.find(
item => item.stockStatus == 20 || item.stockStatusName == '已备货'
);
if (StockupState) { if (StockupState) {
this.popupnotification=true this.popupnotification = true;
return return;
} }
this.$confirm('是否进行批量计划取消?') this.$confirm('是否进行批量计划取消?')
@ -5693,7 +5687,6 @@ export default {
}); });
}, },
// //
handleSignone(row) { handleSignone(row) {
if (row.isHaveAbnormalPackage == 2) { if (row.isHaveAbnormalPackage == 2) {

Loading…
Cancel
Save