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', prop: 'vehicleModel',
type: 3, type: 3,
checkarr: [], checkarr: [],
change(value) { change(value) {},
console.log('value :>> ', value); },
console.log('this :>> ', this); // {
const { vehicleCommander, vehicleHeight, approvedVolume, vehicleQuality, curbWeight } = // label: '',
this.checkarr.find(val => val.value === value) || {}; // prop: 'vehicleModel',
// type: 3,
details.form.vehicleCommander = isNumber(vehicleCommander) ? Number(vehicleCommander) : 0; // checkarr: [],
details.form.vehicleHeight = isNumber(vehicleHeight) ? Number(vehicleHeight) : 0; // change(value) {
details.form.approvedVolume = isNumber(approvedVolume) ? Number(approvedVolume) : 0; // console.log('value :>> ', value);
details.form.vehicleQuality = isNumber(vehicleQuality) ? Number(vehicleQuality) : 0; // console.log('this :>> ', this);
details.form.curbWeight = isNumber(curbWeight) ? Number(curbWeight) : 0; // 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: '车厢类型', label: '车厢类型',
prop: 'carType', prop: 'carType',
@ -241,7 +248,6 @@ const details = reactive({
type: 2, type: 2,
checkarr: [], checkarr: [],
precision: 2, precision: 2,
disabled: true,
}, },
{ {
label: '外廓高(M)', label: '外廓高(M)',
@ -249,7 +255,6 @@ const details = reactive({
type: 2, type: 2,
checkarr: [], checkarr: [],
precision: 2, precision: 2,
disabled: true,
}, },
{ {
label: '付款方式', label: '付款方式',
@ -263,7 +268,6 @@ const details = reactive({
type: 2, type: 2,
checkarr: [], checkarr: [],
precision: 2, precision: 2,
disabled: true,
}, },
{ {
label: '车牌颜色', label: '车牌颜色',
@ -313,7 +317,6 @@ const details = reactive({
type: 2, type: 2,
checkarr: [], checkarr: [],
precision: 2, precision: 2,
disabled: true,
}, },
{ {
label: '整备质量(T)', label: '整备质量(T)',
@ -321,7 +324,6 @@ const details = reactive({
type: 2, type: 2,
checkarr: [], checkarr: [],
precision: 2, precision: 2,
disabled: true,
}, },
{ {
label: '载荷质量(T)', label: '载荷质量(T)',
@ -464,6 +466,13 @@ const details = reactive({
type: 1, type: 1,
checkarr: [], checkarr: [],
}, },
{
label: '结算类型',
prop: 'vehicleModelId',
type: 3,
checkarr: [],
change(value) {},
},
{ {
label: '备注', label: '备注',
prop: 'notes', prop: 'notes',
@ -529,39 +538,30 @@ const initData = async () => {
// //
const handleCarModel = 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, data } = res.data;
const { code: code2, data: data2 } = res2.data;
if ( if (code !== 200 || getObjType(data) !== 'array') return;
code1 !== 200 ||
code2 !== 200 ||
getObjType(data1) !== 'array' ||
getObjType(data2) !== 'array'
)
return;
// const _arr = [];
for (let i = 0; i < data1.length; i++) {
const value = data1[i];
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; _arr.push({
value.label = item.dictValue; value: value.id,
value.value = item.dictKey; label: value.vehicleModel,
break; });
}
} }
// //
for (let i = 0; i < details.carBasicForm.length; i++) { for (let i = 0; i < details.carBasicForm.length; i++) {
const value = details.carBasicForm[i]; const value = details.carBasicForm[i];
if (value.label !== '车辆类型') continue; if (value.label !== '结算类型') continue;
value.checkarr = data1; value.checkarr = _arr;
break; break;
} }
}; };
@ -574,6 +574,8 @@ const initData = async () => {
getDictionaryBiz('yes_no').then(res => handleData('是否车头', res)), getDictionaryBiz('yes_no').then(res => handleData('是否车头', res)),
// //
getDictionaryBiz('basic_trailer_type').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)), 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 :model="details.form" ref="formRef" label-width="120px">
<!-- 车辆类型 --> <!-- 车辆类型 -->
<el-form-item v-for="item in details.formOption" :key="item.prop" :label="item.label"> <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 <el-input-number
class="flex1 inputNumber" class="flex1 inputNumber"
v-model="details.form[item.prop]" v-model="details.form[item.prop]"
@ -211,7 +215,7 @@ const details = reactive<any>({
{ {
prop: 'vehicleModel', prop: 'vehicleModel',
label: '车辆类型', label: '车辆类型',
type: 3, type: 1,
values: '', values: '',
}, },
{ {

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

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

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

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

7
src/views/waybill/CreateZeroOrder.vue

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

Loading…
Cancel
Save