Browse Source

新增log记录

dev-xx
qb 1 year ago
parent
commit
dd14f3acce
  1. 32
      src/api/distribution/VehicleStowageDetails.js
  2. 11
      src/api/distribution/truckLoadingDetails.js
  3. 8
      src/styles/common.scss
  4. 49
      src/views/distribution/artery/VehicleStowage.vue
  5. 255
      src/views/distribution/artery/VehicleStowageDetails.vue
  6. 63
      src/views/distribution/artery/truckLoadingDetails.vue
  7. 36
      src/views/distribution/inventory/BookingNote.vue
  8. 54
      src/views/distribution/inventory/CreateOrder.vue
  9. 2
      src/views/waybill/WaybillOrderList.vue

32
src/api/distribution/VehicleStowageDetails.js

@ -22,3 +22,35 @@ export const postCarsLoadDetailInfo = data => {
});
};
/**
* 通过名称查询仓库信息
*/
export const postFindCarsLoadLogs = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/findCarsLoadLogs',
method: 'post',
data,
});
};
/**
* 通过名称查询仓库信息
*/
export const postFindContractList = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/findContractList',
method: 'post',
data,
});
};
/**
* 通过名称查询仓库信息
*/
export const postAddContractByLoadId = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/addContractByLoadId',
method: 'post',
data,
});
};

11
src/api/distribution/truckLoadingDetails.js

@ -65,3 +65,14 @@ export const postRemoveCarsLoadScan = (data = {}) => {
data,
});
};
/**
* 三方中转批量签收
*/
export const postSignLoadScanByIds = (data = {}) => {
return request({
url: '/api/logpm-trunkline/tripartiteTransfer/signLoadScanByIds',
method: 'post',
data,
});
};

8
src/styles/common.scss

@ -131,6 +131,10 @@ a {
bottom: 0;
}
.flex {
display: flex;
}
.flex-c-c {
display: flex;
align-items: center;
@ -185,6 +189,10 @@ a {
flex: 1;
}
.word-break-break-all {
word-break: break-all;
}
// 头部搜索
.search_container {
display: grid;

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

@ -64,9 +64,9 @@
<el-button type="primary" icon="el-icon-printer" @click="handleShowListOfLoadedWagons">
装载清单
</el-button>
<el-button type="primary" icon="el-icon-printer" @click="searchReset"
<!-- <el-button type="primary" icon="el-icon-printer" @click="searchReset"
>装载卸车清单(财务)</el-button
>
> -->
<el-button type="primary" icon="el-icon-van" @click="handleStartCar"> </el-button>
<el-button type="primary" icon="el-icon-delete" @click="handleCancelStartCar"
>取消发车</el-button
@ -958,20 +958,16 @@ const handleGoWaybill = ({ row }) => {
/** 发车 */
const handleStartCar = async () => {
if (details.selectionList.length === 0) {
return ElMessage({
message: '请选择发车数据',
type: 'warning',
});
} else if (details.selectionList.length !== 1) {
return ElMessage({
message: '仅支持单条数据操作',
type: 'warning',
});
}
let message = '';
if (details.selectionList.length === 0) message = '请选择发车数据';
else if (details.selectionList.length !== 1) message = '仅支持单条数据操作';
if (message) return ElMessage.warning({ message });
details.loadingObj.pageLoading = true;
//
const res = await postDetermineHasNoFinalNode({ loadId: details.selectionList[0].id });
details.loadingObj.pageLoading = false;
const { code, data } = res.data;
if (code !== 200) return;
@ -997,6 +993,10 @@ const handleStartCar = async () => {
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.selectionList.map(val => val.id).join(','),
startCarType: '1',
@ -1013,6 +1013,11 @@ const handleStartCar = async () => {
});
initOnload();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
}
};
@ -1126,6 +1131,9 @@ const handleCancelStartCar = () => {
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.selectionList.map(val => val.id).join(','),
startCarType: '1',
@ -1141,6 +1149,11 @@ const handleCancelStartCar = () => {
message: '取消发车成功',
});
initOnload();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
@ -1157,7 +1170,7 @@ const handleCancelCarsLoad = () => {
type: 'warning',
});
}
ElMessageBox.confirm('确认取消车吗?', 'Warning', {
ElMessageBox.confirm('确认取消车吗?', 'Warning', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
@ -1175,6 +1188,9 @@ const handleCancelCarsLoad = () => {
type: 'warning',
});
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: ids.join(','),
startCarType: '1',
@ -1190,6 +1206,11 @@ const handleCancelCarsLoad = () => {
message: '取消配载成功',
});
initOnload();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};

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

@ -1,7 +1,7 @@
<template>
<basic-container>
<basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud">
<el-tabs type="border-card" v-model="details.activeTab">
<el-tabs type="border-card" v-model="details.activeTab" @tab-click="handleCheckTab">
<el-tab-pane label="详 情 信 息" name="tab1">
<!-- 标题 基础信息 -->
<el-divider content-position="left">
@ -188,8 +188,8 @@
<el-tab-pane label="日 志 跟 踪" name="tab2">
<div style="min-height: 300px">
<el-steps direction="vertical" space="80px">
<el-step title="装车" v-for="item in details.logList" :key="item">
<el-steps direction="vertical" space="120px" :active="details.loadLogsList.length">
<el-step :title="item.abstText" v-for="item in details.loadLogsList" :key="item">
<template #description>
<div>
<el-row>
@ -199,44 +199,20 @@
<span>{{ item.updateTime }}</span>
</div>
<div class="flex-c-c mr10">
<el-icon color="#172e60" class="mr10" size="20px"><Location /></el-icon>
<el-icon color="#172e60" size="20px"><Location /></el-icon>
<span>操作网点</span>
<span>{{ item.updateWarehouse }}</span>
<span>{{ item.nodeName }}</span>
</div>
<div class="flex-c-c mr10">
<el-icon color="#172e60" class="mr10" size="20px"><User /></el-icon>
<el-icon color="#172e60" size="20px"><User /></el-icon>
<span>操作人</span>
<span>{{ item.user }}</span>
<span>{{ item.createUserName }}</span>
</div>
</el-row>
<el-row>
<div class="flex-c-c mr10">
<el-icon color="#172e60" class="mr10" size="20px"><Car /></el-icon>
<span>车次号</span>
<span>{{ form.carsNo }}</span>
</div>
<div class="flex-c-c mr10">
<span>车牌号</span>
<span>{{ form.updateWarehouse || '暂无数据' }}</span
>
</div>
<div class="flex-c-c mr10">
<span>司机</span>
<span>{{ form.driverName }}</span
>
<div class="word-break-break-all">
{{ item.content }}
</div>
<div class="flex-c-c mr10">
<span>计划装车数</span>
<span>{{ form.planLoadingNumber || 0 }}</span
>
</div>
<div class="flex-c-c mr10">
<span>实际装车数</span>
<span>{{ form.realLoadingNumber || 0 }}</span
>
</div>
</el-row>
</div>
</template>
<template #icon>
@ -256,7 +232,34 @@
</el-tab-pane>
<el-tab-pane label="运 输 合 同" name="tab5">
<div style="min-height: 300px" class="flex-c-c"> ~</div>
<div style="min-height: 300px">
<!-- <el-form-item label="合同编号:"></el-form-item> -->
<el-button
type="primary"
icon="List"
@click="
() => {
details.updateImgList = [];
details.popUpShow.addImgVisible = true;
}
"
>添加运输合同图片</el-button
>
<div class="mt10">
<el-image
class="mr10 carriageContractList_img"
v-for="(item, index) in details.carriageContractList"
style="width: 100px; height: 100px"
:src="item"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:preview-src-list="details.carriageContractList"
:initial-index="index"
fit="cover"
/>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="回 单 跟 踪" name="tab6">
@ -270,6 +273,30 @@
</div>
</basic-container>
<!-- 打印二维码 -->
<el-dialog
class="el-dialog-QRCode"
title="添加运输合同图片"
:visible.sync="details.popUpShow.addImgVisible"
width="780px"
v-model="details.popUpShow.addImgVisible"
:align-center="true"
>
<el-upload
v-model:file-list="details.updateImgList"
action="/api/blade-resource/oss/endpoint/put-file"
list-type="picture-card"
:headers="details.headers"
:multiple="true"
>
<el-icon><Plus /></el-icon>
</el-upload>
<span slot="footer" class="dialog-footer flex-c-c mt10">
<el-button @click="details.popUpShow.addImgVisible = false"> </el-button>
<el-button type="primary" @click="handleSubmitAddImg"> </el-button>
</span>
</el-dialog>
<edittablehead
@setcolum="setnewcolum"
@closce="showdrawer"
@ -288,6 +315,7 @@ import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, computeNumber, setNodeHeight, debounce } from '@/utils/util';
import { detailsColumnList, nodeInfoColumnList } from '@/option/distribution/addVehicleStowage';
import { getToken } from '@/utils/auth';
import {
postloadFindLoadInitData,
@ -298,9 +326,15 @@ import {
postFindCarrierByName,
postSelectEditDetailByLoadId,
} from '@/api/distribution/AddVehicleStowage';
import { postCarsLoadDetailInfo } from '@/api/distribution/VehicleStowageDetails.js';
import {
postCarsLoadDetailInfo,
postFindCarsLoadLogs,
postFindContractList,
postAddContractByLoadId,
} from '@/api/distribution/VehicleStowageDetails.js';
import { useRouter, useRoute } from 'vue-router';
import { useStore } from 'vuex';
import { ElMessage } from 'element-plus';
/** 被合并的列 */
const mergeColumn = [];
@ -311,9 +345,6 @@ detailsColumnList.map(val => {
console.log('mergeColumn :>> ', mergeColumn);
// ,
const nodeInfokeys = nodeInfoColumnList.slice(1).map(val => val.prop);
// vuex
const $store = useStore();
@ -331,6 +362,7 @@ const oldColumnListNode = ref();
const nodeInfoRef = ref();
const details = reactive<any>({
headers: { 'Blade-Auth': 'Bearer ' + getToken() },
activeTab: 'tab1',
/** 是否开启搜索 */
search: true,
@ -383,6 +415,8 @@ const details = reactive<any>({
/** 列表加载loading */
list: false,
oldListLoading: false,
/** 页面loading */
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
@ -394,6 +428,8 @@ const details = reactive<any>({
truckLoadingDetailVisited: false,
/** 零担补录 */
transferVisited: false,
/** 运输图片添加弹窗 */
addImgVisible: true,
},
/** 列表Dom节点 */
listNode: '',
@ -437,6 +473,20 @@ const details = reactive<any>({
user: 'admin',
},
],
/** 配载日志 */
loadLogsList: [],
/** 运输合同图片List */
carriageContractList: [
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg',
'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg',
],
/** 上传图片list */
updateImgList: [],
});
const {
@ -546,7 +596,7 @@ onMounted(() => {
/** 请求运单数据 */
const initOriginWarehouseOrder = async (params = {}) => {
try {
details.loadingObj.oldListLoading = true;
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.loadId,
...details.query,
@ -588,32 +638,57 @@ const initOriginWarehouseOrder = async (params = {}) => {
} finally {
//
await nextTick();
details.loadingObj.oldListLoading = false;
details.loadingObj.pageLoading = false;
}
};
/** 请求日志跟踪 */
const handleSignLoadScanLogs = async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = { loadId: $route.query.loadId };
const res = await postFindCarsLoadLogs(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.loadLogsList = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
/** 请求运输合同图片列表 */
const handleFindContractList = async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = { loadId: $route.query.loadId };
const res = await postFindContractList(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.carriageContractList = data.map(val => val.url);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
/** 请求页面数据 */
const onLoad = async () => {
console.log('123 :>> ', 123);
details.loadId = $route.query.loadId;
//
initOriginWarehouseOrder();
// //
// postSelectEditDetailByLoadId({ loadId: details.loadId }).then(res => {
// const { code, data } = res.data;
// if (code !== 200) return;
// details.pageInfo.loadType = data.loadType;
// details.pageInfo.chargeType = data.chargeType;
// });
//
setTabelHeight();
};
onLoad();
/** 搜索 */
const searchChange = () => {
initOriginWarehouseOrder();
@ -721,6 +796,7 @@ const setnewcolum = (newarr, headarr, type) => {
}
};
/** 合并行 */
const arraySpanMethod = (row: any) => {
const { column } = row;
if (mergeColumn.indexOf(column.property) !== -1) {
@ -729,17 +805,71 @@ const arraySpanMethod = (row: any) => {
}
};
/** 提交新增 */
const handleSubmitAddImg = async () => {
if (details.updateImgList.length === 0) return ElMessage.warning('请选择需要上传的图片');
details.popUpShow.addImgVisible = false;
details.loadingObj.pageLoading = true;
try {
const urlList = [];
console.log('details.updateImgList :>> ', details.updateImgList);
for (let i = 0; i < details.updateImgList.length; i++) {
const value = details.updateImgList[i];
console.log('value :>> ', value);
if (value.response.data.link) urlList.push(value.response.data.link);
}
const res = await postAddContractByLoadId({
loadId: $route.query.loadId,
url: urlList.join(','),
});
const { code, msg } = res.data;
if (code !== 200) return;
if (msg) ElMessage.success(msg);
handleCheckTab('tab5');
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
const handleCheckTab = e => {
console.log('e :>> ', e);
switch (e.props.name) {
//
case 'tab2':
handleSignLoadScanLogs();
break;
case 'tab5':
handleFindContractList();
break;
default:
break;
}
};
/** 关闭页面 */
const back = () => {
$store.commit('DEL_TAG_CURRENT');
$router.push({ path: '/distribution/artery/TripartiteTransfer' });
};
watch($route, () => {
if ($route.path !== '/distribution/artery/TripartiteTransferDetails') return;
watch(
() => $route.query,
() => {
console.log('1231 :>> ', 1231);
if ($route.path !== '/distribution/artery/VehicleStowageDetails') return;
onLoad();
});
},
{
immediate: true,
}
);
</script>
<style scoped lang="scss">
.fo-fl {
display: flex;
@ -783,11 +913,6 @@ watch($route, () => {
color: var(--el-color-primary);
}
.mr10 {
margin-right: 10px;
height: 40px;
}
//
:deep(.el-form-item__error) {
z-index: 99;
@ -806,4 +931,12 @@ watch($route, () => {
) {
--el-color-danger: #f00;
}
:deep(.el-step__description) {
padding-right: 0;
}
.carriageContractList_img {
border-radius: 5px;
}
</style>

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

@ -53,7 +53,7 @@
<!-- 三方中转 -->
<template v-if="details.pageInfo.type === 'TripartiteTransfer'">
<el-button type="primary" icon="Edit" @click="handleShowTransfer('add')">
<el-button type="primary" icon="Edit" @click="handleBatchSigin">
中转批量签收
</el-button>
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button>
@ -211,6 +211,7 @@ import {
postTransferUnloadZero,
postBatchTransferUnload,
postRemoveCarsLoadScan,
postSignLoadScanByIds,
} from '@/api/distribution/truckLoadingDetails';
import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails';
/** 获取字典 */
@ -814,7 +815,18 @@ const handleBatchUnLoad = async () => {
}
}
if ([..._zeroArr, ..._orderArr].length === 0) return ElMessage.warning('没有符合要求的数据');
if ([..._zeroArr, ..._orderArr].length === 0) return ElMessage.warning('请选择未卸车的数据');
ElMessageBox.confirm('是否卸车', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
center: true,
})
//
.then(async () => {
try {
details.loadingObj.pageLoading = true;
//
const submitData = {
@ -830,6 +842,12 @@ const handleBatchUnLoad = async () => {
ElMessage.success('卸车成功');
onLoad();
return;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
}
} catch (error) {
console.log('error :>> ', error);
@ -1105,6 +1123,47 @@ const handleBatchRemove = async () => {
});
};
/** 三方批量签收 */
const handleBatchSigin = async () => {
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要签收的数据');
const loadScanIds = [];
for (let i = 0; i < details.selectionList.length; i++) {
const value = details.selectionList[i];
//
if (Number(value.scanStatus) === 3) continue;
loadScanIds.push(value.id);
}
if (loadScanIds.length === 0) return ElMessage.warning('请选择未签收的数据');
ElMessageBox.confirm('是否批量签收数据', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
center: true,
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = { loadScanIds };
const response = await postSignLoadScanByIds(submitData);
const { code, msg } = response.data;
if (code !== 200) return;
if (msg) ElMessage.success({ message: msg });
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
watch(
$route,
(newVal, oldVal) => {

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

@ -74,7 +74,7 @@
</div>
<!-- 订单自编号 -->
<div class="table-row">
<div class="table-row" v-if="details.query.orderCode">
<el-form-item label="订单自编号:" class="el-times">
<el-input
readonly
@ -295,7 +295,7 @@
<!-- 合计运费 && 支付方式 -->
<div class="table-row">
<!-- 定制品 -->
<template v-if="Number(query.waybillType) === 1">
<template v-if="Number(query.waybillType) === 1 || details.query.orderCode">
<!-- 合计运费 -->
<div style="margin-right: 10px; width: 60%; flex: none">
<div style="flex: 1">
@ -1152,7 +1152,7 @@
</template>
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import functions from '@/utils/functions';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
@ -1512,6 +1512,9 @@ getLazyTreeAll().then(res => {
/** 请求页面数据 */
const onLoad = async () => {
try {
details.loadingObj.pageLaoding = true;
details.pageInfo = { ...$route.query };
const res = await postFindWaybillDetail({ waybillId: details.pageInfo.id });
@ -1588,13 +1591,16 @@ const onLoad = async () => {
return val;
});
}
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLaoding = false;
}
};
onLoad();
/** 搜索 */
const searchChange = () => {
onLoad(details.page);
onLoad();
};
/** 清空表单 */
@ -1602,7 +1608,7 @@ const arteryDistrilbutionBillLadingList = () => {
details.query = {};
details.stockupDate = [];
details.page.currentPage = 1;
onLoad(details.page);
onLoad();
};
/** 展开列表控件 */
@ -1634,7 +1640,7 @@ const searchHide = () => {
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
onLoad(details.page);
onLoad();
};
/** 表格表头时间选择 */
@ -1647,7 +1653,7 @@ const timesc = (index, row) => {
if (!index) {
delete details.query[row.prop];
}
onLoad(details.page);
onLoad();
};
/** 表格表头输入框搜索 */
@ -1661,7 +1667,7 @@ const selectsc = (index, row) => {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
onLoad(details.page);
onLoad();
};
/** 表格表头复选框选择 */
@ -1672,7 +1678,7 @@ const selectionChange = (list: any) => {
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize;
onLoad(details.page);
onLoad();
};
/** 页码改变执行的回调 */
@ -1784,6 +1790,14 @@ const handleAudit = () => {
}
});
};
watch(
() => $route.query,
() => {
onLoad();
},
{ immediate: true }
);
</script>
<style scoped lang="scss">

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

@ -402,14 +402,7 @@
class="goodsNameRow"
v-for="val in item.goodsListOptions"
:key="val.goodsId"
@click="
() => {
item.goodsName = val.goodsName;
item.goodsId = val.goodsId;
handleFindPrice(item);
handleCloseSelcet();
}
"
@click="handleChooseGoods(item, val)"
>
{{ val.goodsName }}
</div>
@ -866,18 +859,14 @@
</el-tabs>
<div class="overflow">
<el-row>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<!-- <div class="flex-c-sb">
<div class="avue-crud__left"></div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="init" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button>
<el-button icon="Search" @click="searchHide" circle></el-button>
</div>
</div>
</el-row>
</div> -->
<!-- 表格 -->
<!-- 列表模块 -->
<tablecmt
@ -976,7 +965,6 @@ import {
deepClone,
isNumber,
setNodeHeight,
getWinHeight,
debounce,
getObjType,
} from '@/utils/util';
@ -2265,7 +2253,7 @@ const resetForm = (formEl: FormInstance | undefined) => {
const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return;
formEl.validate(async valid => {
if (valid) {
if (!valid) return false;
try {
// loading
details.loadingObj.submitLoadingBtn = true;
@ -2348,7 +2336,11 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
//
if (details.orderStatus === 'haveData') res = await postOpenOrderOpenWaybill(submitData);
else res = await postOpenOrderOpenZeroWaybill(submitData);
else {
submitData.waybillType = 2;
res = await postOpenOrderOpenZeroWaybill(submitData);
}
} else {
submitData.waybillId = details.pageInfo.id;
@ -2428,10 +2420,6 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
$store.commit('EDIT_REFRESHITEM', { title: 'TemporaryStorageList', status: true });
details.loadingObj.submitLoadingBtn = false;
}
} else {
console.log('error submit!');
return false;
}
});
};
@ -2571,6 +2559,30 @@ const handleFindPrice = async (condition?: any) => {
}
};
/** 选择货物 */
const handleChooseGoods = (item, val) => {
// if (item.id)
let message = '';
for (let i = 0; i < details.goodsList.length; i++) {
const value = details.goodsList[i];
if (value.goodsId === val.goodsId) {
message = '该货物已添加';
break;
}
}
if (message) {
item.goodsName = '';
return ElMessage.warning(message);
}
item.goodsName = val.goodsName;
item.goodsId = val.goodsId;
handleFindPrice(item);
handleCloseSelcet();
};
watch(
$route,
async () => {

2
src/views/waybill/WaybillOrderList.vue

@ -593,7 +593,7 @@ const editOrder = () => {
const _item = details.selectionList[0];
console.log('_item :>> ', _item);
if (Number(_item.waybillType) === 1) {
if (Number(_item.waybillType) === 1 || _item.orderNo) {
//
$router.push({

Loading…
Cancel
Save