Browse Source

修复部分bug

dev-xx
qb 7 months ago
parent
commit
9bae053163
  1. 82
      src/views/basicdata/vehicle/basicdataVehicleAddForm.vue
  2. 8
      src/views/basicdata/vehicle/basicdataVehicleInfo.vue
  3. 43
      src/views/distribution/artery/truckLoadingDetails.vue
  4. 127
      src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue
  5. 7
      src/views/waybill/CreateZeroOrder.vue

82
src/views/basicdata/vehicle/basicdataVehicleAddForm.vue

@ -216,19 +216,26 @@ const details = reactive({
prop: 'vehicleModel',
type: 3,
checkarr: [],
change(value) {
console.log('value :>> ', value);
console.log('this :>> ', this);
const { vehicleCommander, vehicleHeight, approvedVolume, vehicleQuality, curbWeight } =
this.checkarr.find(val => val.value === value) || {};
details.form.vehicleCommander = isNumber(vehicleCommander) ? Number(vehicleCommander) : 0;
details.form.vehicleHeight = isNumber(vehicleHeight) ? Number(vehicleHeight) : 0;
details.form.approvedVolume = isNumber(approvedVolume) ? Number(approvedVolume) : 0;
details.form.vehicleQuality = isNumber(vehicleQuality) ? Number(vehicleQuality) : 0;
details.form.curbWeight = isNumber(curbWeight) ? Number(curbWeight) : 0;
},
},
change(value) {},
},
// {
// label: '',
// prop: 'vehicleModel',
// type: 3,
// checkarr: [],
// change(value) {
// console.log('value :>> ', value);
// console.log('this :>> ', this);
// const { vehicleCommander, vehicleHeight, approvedVolume, vehicleQuality, curbWeight } =
// this.checkarr.find(val => val.value === value) || {};
// details.form.vehicleCommander = isNumber(vehicleCommander) ? Number(vehicleCommander) : 0;
// details.form.vehicleHeight = isNumber(vehicleHeight) ? Number(vehicleHeight) : 0;
// details.form.approvedVolume = isNumber(approvedVolume) ? Number(approvedVolume) : 0;
// details.form.vehicleQuality = isNumber(vehicleQuality) ? Number(vehicleQuality) : 0;
// details.form.curbWeight = isNumber(curbWeight) ? Number(curbWeight) : 0;
// },
// },
{
label: '车厢类型',
prop: 'carType',
@ -241,7 +248,6 @@ const details = reactive({
type: 2,
checkarr: [],
precision: 2,
disabled: true,
},
{
label: '外廓高(M)',
@ -249,7 +255,6 @@ const details = reactive({
type: 2,
checkarr: [],
precision: 2,
disabled: true,
},
{
label: '付款方式',
@ -263,7 +268,6 @@ const details = reactive({
type: 2,
checkarr: [],
precision: 2,
disabled: true,
},
{
label: '车牌颜色',
@ -313,7 +317,6 @@ const details = reactive({
type: 2,
checkarr: [],
precision: 2,
disabled: true,
},
{
label: '整备质量(T)',
@ -321,7 +324,6 @@ const details = reactive({
type: 2,
checkarr: [],
precision: 2,
disabled: true,
},
{
label: '载荷质量(T)',
@ -464,6 +466,13 @@ const details = reactive({
type: 1,
checkarr: [],
},
{
label: '结算类型',
prop: 'vehicleModelId',
type: 3,
checkarr: [],
change(value) {},
},
{
label: '备注',
prop: 'notes',
@ -529,39 +538,30 @@ const initData = async () => {
//
const handleCarModel = async () => {
const [res1, res2] = await Promise.all([getList(), getDictionaryBiz('basic_vehicle_model')]);
const res = await getList();
const { code: code1, data: data1 } = res1.data;
const { code: code2, data: data2 } = res2.data;
const { code, data } = res.data;
if (
code1 !== 200 ||
code2 !== 200 ||
getObjType(data1) !== 'array' ||
getObjType(data2) !== 'array'
)
return;
if (code !== 200 || getObjType(data) !== 'array') return;
//
for (let i = 0; i < data1.length; i++) {
const value = data1[i];
const _arr = [];
for (let j = 0; j < data2.length; j++) {
const item = data2[j];
//
for (let i = 0; i < data.length; i++) {
const value = data[i];
if (value.vehicleModel !== item.dictKey) continue;
value.label = item.dictValue;
value.value = item.dictKey;
break;
}
_arr.push({
value: value.id,
label: value.vehicleModel,
});
}
//
for (let i = 0; i < details.carBasicForm.length; i++) {
const value = details.carBasicForm[i];
if (value.label !== '车辆类型') continue;
value.checkarr = data1;
if (value.label !== '结算类型') continue;
value.checkarr = _arr;
break;
}
};
@ -574,6 +574,8 @@ const initData = async () => {
getDictionaryBiz('yes_no').then(res => handleData('是否车头', res)),
//
getDictionaryBiz('basic_trailer_type').then(res => handleData('挂车类型', res)),
//
getDictionaryBiz('basic_vehicle_model').then(res => handleData('车辆类型', res)),
//
getDictionaryBiz('basic_car_type').then(res => handleData('车厢类型', res)),
//

8
src/views/basicdata/vehicle/basicdataVehicleInfo.vue

@ -58,7 +58,11 @@
<el-form :model="details.form" ref="formRef" label-width="120px">
<!-- 车辆类型 -->
<el-form-item v-for="item in details.formOption" :key="item.prop" :label="item.label">
<template v-if="item.type === 2">
<template v-if="item.type === 1">
<el-input class="flex1" v-model="details.form[item.prop]" />
</template>
<template v-else-if="item.type === 2">
<el-input-number
class="flex1 inputNumber"
v-model="details.form[item.prop]"
@ -211,7 +215,7 @@ const details = reactive<any>({
{
prop: 'vehicleModel',
label: '车辆类型',
type: 3,
type: 1,
values: '',
},
{

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

@ -135,16 +135,21 @@
<template v-if="Number(slotProps.scope.row.type) === 2">
<el-text
type="text"
@click="() => handleZeroUnLoad(slotProps.scope)"
@click="() => handleZeroUnLoad(slotProps.scope, 'unload')"
v-if="
permissionObj.truckLoadingDetails_zeroUnload &&
details.pageInfo.type !== 'VehicleStowage' &&
Number(slotProps.scope.row.unloadCheck) === 0
Number(slotProps.scope.row.unloadCheck) === 0 &&
Number(slotProps.scope.row.scanStatus) !== 3
"
>
零担卸车
</el-text>
<el-text type="text" @click="() => handleZeroUnLoad(slotProps.scope, 'view')">
零担详情
</el-text>
<!-- 零担二维码 -->
<el-text @click="() => printOrderByZero(slotProps.scope)">零担二维码</el-text>
</template>
@ -192,9 +197,9 @@
</div>
</basic-container>
<!-- 配置装车目的地 -->
<!-- 零担卸车 -->
<el-dialog
title="零担卸车"
:title="details.zeroItem.type === 'unload' ? '零担卸车' : '零担详情'"
v-model="details.popUpShow.transferVisited"
width="40%"
append-to-body
@ -253,17 +258,19 @@
</div>
</div>
<el-input-number
class="inputNum mt10 w100"
v-model="item.enterNum"
controls-position="right"
:precision="0"
:min="0"
:max="item.stockNum"
:step="1"
:value-on-clear="0"
:controls="false"
/>
<template v-if="details.zeroItem.type === 'unload'">
<el-input-number
class="inputNum mt10 w100"
v-model="item.enterNum"
controls-position="right"
:precision="0"
:min="0"
:max="item.stockNum"
:step="1"
:value-on-clear="0"
:controls="false"
/>
</template>
</div>
</div>
@ -279,7 +286,7 @@
</el-form-item> -->
<!-- 表单按钮 -->
<div class="flex-c-c">
<div class="flex-c-c" v-if="details.zeroItem.type === 'unload'">
<el-button icon="Close" @click="details.popUpShow.transferVisited = false"> </el-button>
<el-button type="primary" icon="Position" @click="handleZeroUnLoadSubmit"> </el-button>
</div>
@ -1192,7 +1199,7 @@ const handleOrderUnLoad = async ({ row }) => {
};
/** 卸车 -- 零担 */
const handleZeroUnLoad = async ({ row }) => {
const handleZeroUnLoad = async ({ row }, type) => {
if (!ChecksWhetherTheWarehouseIsSelected())
return ElMessage.warning('多仓权限无法操作,请选择仓库');
@ -1208,7 +1215,7 @@ const handleZeroUnLoad = async ({ row }) => {
return ElMessage.warning('未在目的仓, 无法卸车');
}
details.zeroItem = { ...row };
details.zeroItem = { ...row, type };
details.zeroItem.enterNum = !details.zeroItem.unloadNum ? row.num : details.zeroItem.unloadNum;
try {

127
src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue

@ -147,9 +147,8 @@
</el-form-item>
</el-col>
<el-col :span="24">
<!-- <el-col :span="24">
<el-form-item label="服务类型" prop="serviceType">
<!-- <el-input v-model="form.serviceType" placeholder="请输入服务类型"/>-->
<el-radio-group
v-model="form.serviceType"
class="ml-4"
@ -160,7 +159,7 @@
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-col> -->
</el-form>
</el-row>
<el-row>
@ -322,7 +321,7 @@
v-model="box"
width="50%"
:before-close="beforeClose"
:show-close='false'
:show-close="false"
append-to-body
>
<el-form
@ -459,7 +458,7 @@ import { getListMaterial } from '@/api/basic/basicMaterial';
import { getDetailWarehouse, getListCopy } from '@/api/basicdata/basicdataWarehouse';
import { getListIdsName } from '@/api/basicdata/basicdataStoreBrand';
import { getListName } from '@/api/basicdata/basicdataStoreBusiness';
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus';
export default {
name: 'warehouseWarehouseingAddReceipt',
data() {
@ -497,7 +496,7 @@ export default {
},
//
form: {
serviceType: null,
// serviceType: null,
},
formDetail: {},
//
@ -543,7 +542,7 @@ export default {
licensePlate: [{ required: true, message: '请填写入库车牌', trigger: 'change' }],
warehouseId: [{ required: true, message: '请选择所在仓库', trigger: 'blur' }],
orderNumber: [{ required: true, message: '请输入订单自编号', trigger: 'blur' }],
serviceType: [{ required: true, message: '请选择服务类型', trigger: 'blur' }],
// serviceType: [{ required: true, message: '', trigger: 'blur' }],
customerCode: [{ required: true, message: '请选择客户编码', trigger: 'blur' }],
},
buttonLoadingList: {
@ -816,7 +815,7 @@ export default {
];
this.form.clientId = obj.value;
}
this.form.serviceType = null;
// this.form.serviceType = null;
let aa = '';
this.options.some(i => {
// console.log(">><><><<>",i);
@ -832,9 +831,9 @@ export default {
typeService: '3',
});
// console.log("bububu",bu.data.data.records);
if (bu.data.data?.records.length > 0) {
this.form.serviceType = bu.data.data.records[0].mold;
}
// if (bu.data.data?.records.length > 0) {
// this.form.serviceType = bu.data.data.records[0].mold;
// }
let cl = await getListClient(this.page.currentPage, this.page.pageSize, { pid: row });
// console.log(">>>>",cl.data.data.records);
this.shop = [];
@ -941,67 +940,61 @@ export default {
handleDetail() {
this.$refs.formDetail.validate(valid => {
if (valid) {
ElMessageBox.confirm(
`是否确认入库${this.formDetail.createInventory}`,
'提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
console.log(this.formDetail);
this.stuff.some(i => {
console.log(i);
if (i.id == this.formDetail.productName) {
this.formDetail.productName = i.name;
}
if (i.id == this.formDetail.productCode) {
this.formDetail.productCode = i.productCode;
}
});
this.distributionUnit.some(p => {
if (p.dictKey == this.formDetail.productUnit) {
this.formDetail.productUnit = p.dictValue;
return;
}
});
if (this.data.length > 0) {
console.log(
'当前在这里=-================================================================'
);
if (!!this.formDetail.createInventory) {
let s = false;
this.data.some(i => {
if (i.productCode === this.formDetail.productCode) {
s = true;
if (this.title != '编辑') {
i.createInventory =
parseInt(i.createInventory) + parseInt(this.formDetail.createInventory);
i.actualReceipt = 0;
}
ElMessageBox.confirm(`是否确认入库${this.formDetail.createInventory}`, '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
console.log(this.formDetail);
this.stuff.some(i => {
console.log(i);
if (i.id == this.formDetail.productName) {
this.formDetail.productName = i.name;
}
if (i.id == this.formDetail.productCode) {
this.formDetail.productCode = i.productCode;
}
});
this.distributionUnit.some(p => {
if (p.dictKey == this.formDetail.productUnit) {
this.formDetail.productUnit = p.dictValue;
return;
}
});
if (!s) {
if (this.data.length > 0) {
console.log(
'当前在这里=-================================================================'
);
if (!!this.formDetail.createInventory) {
let s = false;
this.data.some(i => {
if (i.productCode === this.formDetail.productCode) {
s = true;
if (this.title != '编辑') {
i.createInventory =
parseInt(i.createInventory) + parseInt(this.formDetail.createInventory);
i.actualReceipt = 0;
}
}
});
if (!s) {
this.formDetail.actualReceipt = 0;
this.data.push(this.formDetail);
}
} else {
this.$message.warning('请填写入库数量');
}
} else {
this.formDetail.actualReceipt = 0;
this.data.push(this.formDetail);
}
} else {
this.$message.warning('请填写入库数量');
}
} else {
this.formDetail.actualReceipt = 0;
this.data.push(this.formDetail);
}
this.box = false;
this.formDetail = {};
})
.catch(() => {
this.formDetail.createInventory=0
})
this.box = false;
this.formDetail = {};
})
.catch(() => {
this.formDetail.createInventory = 0;
});
}
});
},

7
src/views/waybill/CreateZeroOrder.vue

@ -1717,8 +1717,8 @@ const initPageInfo = async () => {
: 0;
details.query.transportType = details.query.transportType ? details.query.transportType : '1';
details.query.deliveryWay = '1';
details.query.urgency = '1';
details.query.deliveryWay = details.query.deliveryWay ? details.query.deliveryWay : '1';
details.query.urgency = details.query.urgency ? details.query.urgency : '1';
details.query.receipt = data.warehouseWaybill.receipt
? data.warehouseWaybill.receipt.split(',')
: [];
@ -2116,6 +2116,9 @@ const handleChooseConsigner = (column, prop, order) => {
if (_destination.length > 0) details.query.destination = _destination;
//
column.brandId && (details.query.brandId = column.brandId);
handleFindClientInfo('consignee');
handleFindClientInfo('consigneeName');
handleFindClientInfo('consigneeMobile');

Loading…
Cancel
Save