Browse Source

修复运单详情显示,新增配载司机带出车辆

dev-xx
qb 6 months ago
parent
commit
0581409baf
  1. 155
      src/views/distribution/artery/AddVehicleStowage.vue
  2. 2
      src/views/distribution/artery/addTripartiteTransfer.vue
  3. 24
      src/views/distribution/inventory/BookingNote.vue

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

@ -99,11 +99,8 @@
<el-select
v-model="form.carNumber"
filterable
remote
placeholder="请输入并选择车牌号"
@change="handleCarChange"
:remote-method="remoteMethodCar"
:loading="details.loadingObj.loading"
>
<el-option
v-for="(val, index) in details.carListByName"
@ -203,10 +200,6 @@
</el-radio-group>
</el-form-item>
</div>
</div>
<!-- 第二排 -->
<div class="form_row">
<!-- 经办人 -->
<div class="form_row_item">
<el-form-item inline label="经办人">
@ -256,13 +249,6 @@
/>
</el-form-item>
</div>
<!-- 预计发车 -->
<!-- <div class="form_row_item">
<el-form-item inline label="预计发车">
<el-input />
</el-form-item>
</div> -->
</div>
<!-- 备注 -->
@ -318,7 +304,7 @@
<!-- 搜索区域 -->
<div v-h5uShow="!search">
<el-form inline label-width="80px" :model="details.oldQuery" class="el-fr-d">
<el-form-item label="关键词" style="width: 100%" class="el-times">
<el-form-item label="关键词">
<el-input
v-model.trim="query.keyWords"
placeholder="请输入运单/发货人/收货人/收货单位"
@ -326,7 +312,15 @@
></el-input>
</el-form-item>
<el-form-item label="目的网点" class="el-times">
<el-form-item label="客户车次">
<el-input
v-model="query.customerTrain"
placeholder="请输入客户车次"
clearable
></el-input>
</el-form-item>
<el-form-item label="目的网点">
<el-select
v-model="details.query.destinationWarehouseIds"
class="w100"
@ -345,7 +339,7 @@
</el-select>
</el-form-item>
<el-form-item label="到站" class="el-times">
<el-form-item label="到站">
<el-input
v-model="query.destination"
placeholder="请输入到站"
@ -353,7 +347,7 @@
></el-input>
</el-form-item>
<el-form-item label="品类名称" class="el-times">
<el-form-item label="品类名称">
<el-input
v-model="query.goodsName"
placeholder="请输入品类名称"
@ -361,11 +355,11 @@
></el-input>
</el-form-item>
<el-form-item label="备注" class="el-times">
<el-form-item label="备注">
<el-input v-model="query.remark" placeholder="请输入备注" clearable></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-form-item label="托盘码">
<el-input
v-model="query.taryName"
placeholder="请输入托盘码"
@ -373,7 +367,7 @@
></el-input>
</el-form-item>
<el-form-item label="开单时间" class="el-times">
<el-form-item label="开单时间">
<el-date-picker
v-model="query.openTime"
type="daterange"
@ -386,7 +380,7 @@
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="入库时间" class="el-times">
<el-form-item label="入库时间">
<el-date-picker
v-model="query.enterTime"
type="daterange"
@ -473,7 +467,7 @@
:model="details.newQuery"
class="el-fr-d"
>
<el-form-item label="关键词" style="width: 100%" class="el-times">
<el-form-item label="关键词">
<el-input
v-model.trim="item.query.keyWords"
placeholder="请输入运单/发货人/收货人/收货单位"
@ -481,7 +475,15 @@
></el-input>
</el-form-item>
<el-form-item label="目的网点" class="el-times">
<el-form-item label="客户车次">
<el-input
v-model="query.customerTrain"
placeholder="请输入客户车次"
clearable
></el-input>
</el-form-item>
<el-form-item label="目的网点">
<el-select
v-model="item.selectQuery.destinationWarehouseName"
class="w100"
@ -500,7 +502,7 @@
</el-select>
</el-form-item>
<el-form-item label="到站" class="el-times">
<el-form-item label="到站">
<el-input
v-model="item.query.destination"
placeholder="请输入到站"
@ -508,7 +510,7 @@
></el-input>
</el-form-item>
<el-form-item label="品类名称" class="el-times">
<el-form-item label="品类名称">
<el-input
v-model="item.query.goodsName"
placeholder="请输入品类名称"
@ -516,7 +518,7 @@
></el-input>
</el-form-item>
<el-form-item label="备注" class="el-times">
<el-form-item label="备注">
<el-input
v-model="item.query.remark"
placeholder="请输入备注"
@ -524,7 +526,7 @@
></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-form-item label="托盘码">
<el-input
v-model="item.query.taryName"
placeholder="请输入托盘码"
@ -532,7 +534,7 @@
></el-input>
</el-form-item>
<el-form-item label="开单时间" class="el-times">
<el-form-item label="开单时间">
<el-date-picker
v-model="item.timeQuery.createTimeArr"
type="daterange"
@ -546,7 +548,7 @@
@change="value => item.itemTimesc(value, { prop: 'createTimeArr' })"
/>
</el-form-item>
<el-form-item label="入库时间" class="el-times">
<el-form-item label="入库时间">
<el-date-picker
v-model="item.timeQuery.warehouseEntryTimeEndArr"
type="daterange"
@ -797,24 +799,12 @@ export default {
</script>
<script setup lang="ts">
import {
ref,
reactive,
toRefs,
computed,
onMounted,
nextTick,
onActivated,
watch,
shallowRef,
} from 'vue';
import functions from '@/utils/functions';
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import {
downloadXls,
setNodeHeight,
computeNumber,
isNumber,
@ -838,17 +828,16 @@ import {
postSelectEditDetailByLoadId,
postEditNodeInfo,
postFindUseOrderList,
postRemoveCarsOrderByCarsOrderId,
postUpdatePlanNumByCarsOrderId,
postAddOrderToFinalNodeId,
postUpdateCarsLoadBasicData,
postUpdateLoadFeeByNodeId,
} from '@/api/distribution/AddVehicleStowage';
import { getVehicleList } from '@/api/basicdata/basicdataVehicle';
import { useRouter, useRoute } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
import { useStore } from 'vuex';
import { getListName } from '@/api/basicdata/basicdataVehicle';
import type { FormInstance, FormRules } from 'element-plus';
import type { FormInstance } from 'element-plus';
// ,
const nodeInfokeys = nodeInfoColumnList.slice(1).map(val => val.prop);
@ -1046,9 +1035,6 @@ const details = reactive<any>({
warehouseOption: [],
});
/** 始发仓数据 */
const tableData = shallowRef([]);
const btnLoadingObj = reactive({
/** 提交按钮 */
submitBtn: false,
@ -1622,16 +1608,33 @@ const beforeClose = done => {
const handleNameChange = (type: number) => {
const findValue = type === 1 ? form.value.driverName : form.value.assistantName;
const _value = details.driverListByName.find(value => value.driverId === findValue);
const _value = details.driverListByName.find(value => value.driverId === findValue) || {};
if (type === 1) {
form.value.driverName = _value.driverName;
form.value.driverId = _value.driverId;
form.value.driverMobile = _value.driverPhone;
form.value.driverType = _value.driverType;
form.value.driverName = _value.driverName || '';
form.value.driverId = _value.driverId || '';
form.value.driverMobile = _value.driverPhone || '';
form.value.driverType = _value.driverType || '';
if (getObjType(_value.carNumberList) === 'array' && _value.carNumberList.length > 0) {
const _carName = _value.carNumberList[0];
for (let i = 0; i < details.carListByName.length; i++) {
const item = details.carListByName[i];
if (item.carNumber !== _carName) continue;
form.value.carNumber = item.carNumber;
form.value.carId = item.carId;
break;
}
} else {
form.value.carNumber = '';
form.value.carId = '';
}
} else {
form.value.assistantName = _value.driverName;
form.value.assistantMobile = _value.driverPhone;
form.value.assistantId = _value.driverId;
form.value.assistantName = _value.driverName || '';
form.value.assistantMobile = _value.driverPhone || '';
form.value.assistantId = _value.driverId || '';
}
};
@ -1644,7 +1647,7 @@ const handleCarChange = (type: number) => {
/** 新增车辆 */
const handleAddCar = () => {
$router.push('/basicdata/vehicle/basicdataVehicle');
$router.push({ path: '/basicdata/vehicle/basicdataVehicleAddForm', query: { type: 'add' } });
};
/** 新增司机 */
@ -1977,16 +1980,37 @@ const remoteMethodDriver = async val => {
remoteMethodDriver('');
/** 查询车辆信息 */
const remoteMethodCar = async val => {
// if (!val) return;
// const remoteMethodCar = async val => {
// // if (!val) return;
// const res = await postFindCarListByName({ carNumber: val });
// const { code, data } = res.data;
// if (code !== 200) return;
// details.carListByName = data;
// console.log(' details.carListByName :>> ', details.carListByName);
// };
// remoteMethodCar('');
const res = await postFindCarListByName({ carNumber: val });
/** 查询车辆信息 */
const handleFindVehicle = async () => {
const res = await getVehicleList();
const { code, data } = res.data;
if (code !== 200) return;
details.carListByName = data;
console.log(' details.carListByName :>> ', details.carListByName);
if (code !== 200 || getObjType(data) !== 'array') return;
const _arr = [];
for (let i = 0; i < data.length; i++) {
const value = data[i];
const _obj = {
carNumber: value.vehicleNub,
carId: value.id,
};
_arr.push(_obj);
}
details.carListByName = _arr;
};
remoteMethodCar('');
handleFindVehicle();
/** 修改计划数 */
const handleEditplanNum = ({ row }, item) => {
@ -2600,6 +2624,7 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
.form_row {
display: flex;
align-items: center;
flex-wrap: wrap;
.form_row_item {
display: flex;

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

@ -1110,7 +1110,7 @@ const handleAddCarrier = () => {
/** 新增车辆 */
const handleAddCar = () => {
$router.push({ path: '/basicdata/vehicle/basicdataVehicle' });
$router.push({ path: '/basicdata/vehicle/basicdataVehicleAddForm', query: { type: 'add' } });
};
/** 新增司机 */

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

@ -1461,18 +1461,18 @@ const onLoad = async () => {
? data.warehouseWaybill.receipt.split(',')
: [];
details.query.xianPay = isNumber(data.warehouseWaybill.xpay)
? Number(data.warehouseWaybill.xpay)
: data.warehouseWaybill.xpay;
details.query.huiPay = isNumber(data.warehouseWaybill.hpay)
? Number(data.warehouseWaybill.hpay)
: data.warehouseWaybill.hpay;
details.query.yuePay = isNumber(data.warehouseWaybill.ypay)
? Number(data.warehouseWaybill.ypay)
: data.warehouseWaybill.ypay;
details.query.daoPay = isNumber(data.warehouseWaybill.dpay)
? Number(data.warehouseWaybill.dpay)
: data.warehouseWaybill.dpay;
details.query.xianPay = isNumber(data.warehouseWaybill.xPay)
? Number(data.warehouseWaybill.xPay)
: data.warehouseWaybill.xPay;
details.query.huiPay = isNumber(data.warehouseWaybill.hPay)
? Number(data.warehouseWaybill.hPay)
: data.warehouseWaybill.hPay;
details.query.yuePay = isNumber(data.warehouseWaybill.yPay)
? Number(data.warehouseWaybill.yPay)
: data.warehouseWaybill.yPay;
details.query.daoPay = isNumber(data.warehouseWaybill.dPay)
? Number(data.warehouseWaybill.dPay)
: data.warehouseWaybill.dPay;
//
console.log('details.query :>> ', details.query);

Loading…
Cancel
Save