Browse Source

新增车辆配载和到车的目的仓查询

dev-xx
qb 6 months ago
parent
commit
fc8e077c5a
  1. 2
      src/option/distribution/VehicleStowage.js
  2. 25
      src/views/distribution/artery/AddVehicleStowage.vue
  3. 51
      src/views/distribution/artery/VehicleArrivalManagement.vue
  4. 75
      src/views/distribution/artery/VehicleStowage.vue

2
src/option/distribution/VehicleStowage.js

@ -28,7 +28,7 @@ export const columnList = [
{
prop: 'carsLineName',
label: '路线',
type: 13,
type: 6,
values: '',
width: '250',
checkarr: [],

25
src/views/distribution/artery/AddVehicleStowage.vue

@ -386,7 +386,7 @@
ref="oldColumnListNode"
class="columnList"
:columnList="details.columnList"
:tableData="details.data"
:tableData="tableData"
@inputTxt="inputsc"
:loading="loadingObj.oldListLoading"
@selection="selectionChange"
@ -715,7 +715,17 @@ export default {
</script>
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick, onActivated, watch } from 'vue';
import {
ref,
reactive,
toRefs,
computed,
onMounted,
nextTick,
onActivated,
watch,
shallowRef,
} from 'vue';
import functions from '@/utils/functions';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
@ -952,6 +962,9 @@ const details = reactive<any>({
warehouseName: '',
});
/** 始发仓数据 */
const tableData = shallowRef([]);
const btnLoadingObj = reactive({
/** 提交按钮 */
submitBtn: false,
@ -1046,7 +1059,7 @@ const initOriginWarehouseOrder = debounce(async (params = {}) => {
const res = await postFindAllOrderList(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.data = data.records;
tableData.value = data.records;
details.page.total = data.total;
} catch (error) {
console.log('error :>> ', error);
@ -1617,7 +1630,7 @@ const handleAddNode = async (index: number) => {
// details.nodeInfoData.push();
details.nodeInfoData = handleEditForbidden(details.nodeInfoData);
// ,
if (details.data.length === 0) initOriginWarehouseOrder();
if (tableData.value.length === 0) initOriginWarehouseOrder();
setTabelHeight();
handleComputedNum();
@ -1751,7 +1764,7 @@ const handleRemoveWaybill = async (index: number) => {
/** 查询司机信息 */
const remoteMethodDriver = async val => {
// if (!val) return;
details.driverListByName = []
details.driverListByName = [];
const res = await postFindDriverListByName({ driverName: val, jobType: 1 });
const { code, data } = res.data;
if (code !== 200) return;
@ -1769,7 +1782,7 @@ const remoteMethodCar = async val => {
const { code, data } = res.data;
if (code !== 200) return;
details.carListByName = data;
console.log(' details.carListByName :>> ', details.carListByName);
console.log(' details.carListByName :>> ', details.carListByName);
};
remoteMethodCar('');

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

@ -5,6 +5,40 @@
<div v-h5uShow="search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search">
<el-form-item label="始发仓:">
<el-select
v-model="details.query.warehouseId"
class="w100"
clearable
placeholder="请选择始发仓"
filterable
>
<el-option
v-for="value in details.warehouseOption"
:key="value.dictKey"
:label="value.dictValue"
:value="value.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="目的仓:">
<el-select
v-model="details.query.endWarehouseId"
class="w100"
clearable
placeholder="请选择始发仓"
filterable
>
<el-option
v-for="value in details.warehouseOption"
:key="value.dictKey"
:label="value.dictValue"
:value="value.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="实际发车:" class="el-times">
<el-date-picker
v-model="details.query.startArr"
@ -612,6 +646,7 @@ import {
postFindLoadingListData,
postFindWarehouseUnloadReport,
} from '@/api/distribution/VehicleStowage';
import { getListName } from '@/api/basicdata/basicdataVehicle';
import { useRouter, useRoute } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
import print from '@/utils/print';
@ -630,7 +665,7 @@ const details = reactive({
/** 是否开启搜索 */
search: false,
/** 表格搜索条件 */
query: {},
query: {} as any,
/** 时间快捷选择设置 */
shortcuts: [
{
@ -745,6 +780,8 @@ const details = reactive({
listOfLoadedWagonsData: {},
/** 卸车报告信息 */
unloadReportInfo: {},
/** 仓库信息 */
warehouseOption: [] as [{ dictKey: string; dictValue: string }] | [],
});
const tableNode = ref();
@ -867,6 +904,18 @@ const onLoad = debounce(async (params = {}) => {
onLoad();
/** 初始化请求仓库数据 */
getListName({ name: '' }).then(res => {
const { code, data } = res.data;
if (code !== 200 || getObjType(data) !== 'array') return;
details.warehouseOption = data.map(val => {
return {
dictKey: val.id,
dictValue: val.name,
};
});
});
/** 搜索 */
const searchChange = () => {
onLoad();

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

@ -2,14 +2,48 @@
<basic-container>
<div class="avue-crud" v-loading="details.loadingObj.pageLoading">
<!-- 搜索模块 -->
<div v-h5uShow="!search">
<div v-h5uShow="search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search">
<!-- <el-form-item label="车次号:">
<el-input v-model="query.serviceNumber" placeholder="请输入车次号" clearable></el-input>
</el-form-item> -->
<el-form-item label="实际发车:" class="el-times">
<el-form-item label="始发仓:">
<el-select
v-model="details.query.warehouseId"
class="w100"
clearable
placeholder="请选择始发仓"
filterable
>
<el-option
v-for="value in details.warehouseOption"
:key="value.dictKey"
:label="value.dictValue"
:value="value.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="目的仓:">
<el-select
v-model="details.query.endWarehouseId"
class="w100"
clearable
placeholder="请选择始发仓"
filterable
>
<el-option
v-for="value in details.warehouseOption"
:key="value.dictKey"
:label="value.dictValue"
:value="value.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="实际发车:">
<el-date-picker
v-model="details.query.startArr"
type="daterange"
@ -23,7 +57,7 @@
/>
</el-form-item>
<el-form-item label="到车时间:" class="el-times">
<el-form-item label="到车时间:">
<el-date-picker
v-model="details.query.arriveTimeArr"
type="daterange"
@ -37,7 +71,7 @@
/>
</el-form-item>
<el-form-item label="创建时间:" class="el-times">
<el-form-item label="创建时间:">
<el-date-picker
v-model="details.query.createTimeArr"
type="daterange"
@ -50,8 +84,9 @@
clearable
/>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item class="el-btn">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset"> </el-button>
</el-form-item>
@ -584,6 +619,7 @@ import {
postManualLoadingloadId,
postFindLoadingListData,
} from '@/api/distribution/VehicleStowage';
import { getListName } from '@/api/basicdata/basicdataVehicle';
import { useStore } from 'vuex';
import { useRouter, useRoute } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
@ -593,8 +629,10 @@ import print from '@/utils/print';
const $router = useRouter();
const $route = useRoute();
// vuex
const $store = useStore();
/** 用户信息 */
const Mydata = ref<any>({});
Mydata.value = JSON.parse(localStorage.getItem('my_data')); //
@ -698,6 +736,8 @@ const details = reactive<any>({
packageQuery: {},
/** 配载清单数据 */
listOfLoadedWagonsData: {},
/** 仓库信息 */
warehouseOption: [] as [{ dictKey: string; dictValue: string }] | [],
});
const loadStatus = reactive([
@ -709,10 +749,6 @@ const loadStatus = reactive([
const { search, query, shortcuts, data, loadingObj, selectionList, drawerShow, page, popUpShow } =
toRefs(details);
/** vuex */
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission);
/** 权限按钮 */
const permissionObj = reactive({
/** 新增配载 */
@ -832,12 +868,25 @@ const onLoad = debounce(async (params = {}) => {
const initOnload = () => {
details.page.pageNum = 1;
onLoad();
return onLoad();
};
/** 初始化请求仓库数据 */
getListName({ name: '' }).then(res => {
const { code, data } = res.data;
if (code !== 200 || getObjType(data) !== 'array') return;
details.warehouseOption = data.map(val => {
return {
dictKey: val.id,
dictValue: val.name,
};
});
});
initOnload();
/** 初始化请求数据 */
const init = async item => {
/** 初始化请求节点数据 */
const initNextNode = async item => {
const res = await postFindNextNodeList({ loadId: item.id });
//
@ -1143,7 +1192,7 @@ const handleStartCar = async () => {
//
const _item = details.selectionList[0];
init(_item);
initNextNode(_item);
await nextTick();
const _node = document.querySelector('.truckLoadingDetailPopUpTable');

Loading…
Cancel
Save