Browse Source

配送商配,预约适配任务,最大数据限制修改

pre-production
马远东 1 year ago
parent
commit
7fbab842f9
  1. 16
      src/api/basicdata/basicdataWarehouse.js
  2. 459
      src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue
  3. 56
      src/views/distribution/reservation/reservationAddFrom.vue
  4. 287
      src/views/distribution/turndelivery/deliveryDiscuss.vue

16
src/api/basicdata/basicdataWarehouse.js

@ -154,4 +154,20 @@ export const $_addsave = (data) => {
method: 'post',
data
})
}
// 删除
export const $_dataremove = (params) => {
return request({
url: '/api/logpm-basicdata/warehouse/remove',
method: 'post',
params
})
}
// 查看
export const $_getDetail = (params) => {
return request({
url: '/api/logpm-basicdata/warehouse/detail',
method: 'get',
params
})
}

459
src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue

@ -11,7 +11,9 @@
<div class="el_top_btn">
<div>
<el-button type="primary" @click="newlyadd" icon="el-icon-plus"> </el-button>
<el-button type="primary" icon="el-icon-delete">删除</el-button>
<el-button type="primary" icon="el-icon-delete" @click="DeleteInformationAll"
>批量删除</el-button
>
</div>
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChangeS" circle></el-button>
@ -38,7 +40,7 @@
<div class="ElBtnClass">
<el-button @click="view(slotProps.scope)">查看</el-button>
<el-button @click="view(slotProps.scope)">编辑</el-button>
<el-button @click="view(slotProps.scope)">删除</el-button>
<el-button @click="DeleteInformation(slotProps.scope)">删除</el-button>
</div>
</template>
</template>
@ -64,7 +66,7 @@
</div>
</el-row>
<!-- 新增弹窗 -->
<el-dialog v-model="newlyaddload" title="新增" width="800">
<el-dialog destroy-on-close v-model="newlyaddload" title="新增" width="800">
<el-form class="add_form" inline="true" :model="Addform">
<el-form-item label="仓库名称">
<el-input v-model="Addform.name" placeholder="请输入仓库名称" />
@ -86,7 +88,7 @@
<el-form-item label="管理区域">
<el-cascader
:props="props"
:props="props"
v-model="Addform.administrativeAreas"
:options="areaoptions"
placeholder="省/市/区"
@ -253,10 +255,16 @@
/>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="Addform.remarks" placeholder="请输入日期范围" />
<el-input v-model="Addform.remarks" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="收款码">
<el-upload :action="doubledCount" :headers="headers" v-model:file-list="Addform.paymentCodeUrl" list-type="picture-card" :auto-upload="true">
<el-upload
:action="doubledCount"
:headers="headers"
v-model:file-list="Addform.paymentCodeUrlS"
list-type="picture-card"
:auto-upload="true"
>
<el-icon><Plus /></el-icon>
<template #file="{ file }">
@ -300,6 +308,249 @@
</div>
</template>
</el-dialog>
<!-- 查看详情弹窗 -->
<el-dialog v-model="dialogDetail" title="查看详情" width="50%">
<el-form class="add_form" inline="true" :model="Addform">
<el-form-item label="仓库名称">
<el-input v-model="Addform.name" placeholder="请输入仓库名称" />
</el-form-item>
<el-form-item label="仓库编码">
<el-input v-model="Addform.warehouseCode" placeholder="请输入仓库编码" />
</el-form-item>
<el-form-item label="仓库简称">
<el-input v-model="Addform.abbreviation" placeholder="请输入仓库简称" />
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="Addform.linkman" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="Addform.contactNumber" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="管理区域">
<el-cascader
:props="props"
v-model="Addform.administrativeAreas"
:options="areaoptions"
placeholder="省/市/区"
/>
</el-form-item>
<el-form-item label="职能类型">
<el-select v-model="Addform.functionType" clearable placeholder="请选择职能类型">
<el-option
v-for="item in options"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="仓库地区">
<el-cascader
v-model="Addform.addressInfo"
:options="areaoptions"
placeholder="省/市/区"
/>
</el-form-item>
<el-form-item label="仓库地址">
<avue-input-map
:params="warehouseAddress"
placeholder="请选择地图"
v-model="Addform.address"
></avue-input-map>
</el-form-item>
<el-form-item label="所属部门">
<el-tree-select
v-model="Addform.department"
:data="AssessmentDepartment"
check-strictly
:render-after-expand="false"
style="width: 240px"
@node-click="BelongsearcheNodeClick"
clearable
@change="Belongingdepartment"
/>
</el-form-item>
<el-form-item label="仓库类型">
<el-select v-model="Addform.warehouseType" clearable placeholder="请选择仓库类型">
<el-option
v-for="item in WarehouseType"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="消防等级">
<el-select v-model="Addform.fireGrade" clearable placeholder="请选择消防等级">
<el-option
v-for="item in FireProtection"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="是否具有消防等级">
<el-select v-model="Addform.fireRatingNot" clearable placeholder="请选择是否具有消防等级">
<el-option
v-for="item in Isprotection"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="仓库结构">
<el-select v-model="Addform.warehouseStructure" clearable placeholder="请选择仓库结构">
<el-option
v-for="item in WarehouseStructureList"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="是否高架">
<el-select v-model="Addform.elevatedNot" clearable placeholder="请选择是否高架">
<el-option
v-for="item in Iselevated"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="仓库层高">
<el-input v-model="Addform.storeyHeight" placeholder="请输入仓库层高" />
</el-form-item>
<el-form-item label="电力类型">
<el-select v-model="Addform.powerCondition" clearable placeholder="请选择电力类型">
<el-option
v-for="item in powerConditionList"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="租金单价">
<el-input v-model="Addform.unitPrice" placeholder="请输入租金单价" />
</el-form-item>
<el-form-item label="面积">
<el-input v-model="Addform.acreage" placeholder="请输入面积" />
</el-form-item>
<el-form-item label="租金类型">
<el-select v-model="Addform.rentType" clearable placeholder="请选择租金类型">
<el-option
v-for="item in rentTypeList"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="仓库等级">
<el-select v-model="Addform.grade" clearable placeholder="请选择仓库等级">
<el-option
v-for="item in gradeList"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="管理费">
<el-input v-model="Addform.administrativeFee" placeholder="请输入管理费" />
</el-form-item>
<el-form-item label="库位数">
<el-input v-model="Addform.seating" placeholder="请输入库位数" />
</el-form-item>
<el-form-item label="日期范围">
<el-date-picker
v-model="Addform.daterange"
type="datetimerange"
start-placeholder="租赁开始日期"
end-placeholder="租赁结束日期"
format="YYYY-MM-DD"
date-format="YYYY/MM/DD"
time-format="A hh:mm:ss"
/>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="Addform.remarks" placeholder="请输入日期范围" />
</el-form-item>
<el-form-item label="收款码">
<el-upload
:action="doubledCount"
:headers="headers"
v-model:file-list="Addform.paymentCodeUrlS"
list-type="picture-card"
:auto-upload="true"
>
<el-icon><Plus /></el-icon>
<template #file="{ file }">
<div>
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<el-icon><zoom-in /></el-icon>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<el-icon><Download /></el-icon>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<el-icon><Delete /></el-icon>
</span>
</span>
</div>
</template>
</el-upload>
<el-dialog v-model="dialogVisible">
<img w-full :src="dialogImageUrl" alt="Preview Image" />
</el-dialog>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogDetail = false">关闭</el-button>
</div>
</template>
</el-dialog>
</basic-container>
<!-- 列表配置显示 -->
<edittablehead
@ -322,29 +573,29 @@ import {
getCurrentInstance,
} from 'vue';
import { columnList } from '@/option/basicdata/basicdataWarehouseTemp.js';
import { $_getList, $_ObtainRegion, $_parentId ,$_addsave} from '@/api/basicdata/basicdataWarehouse';
import {
$_getList,
$_ObtainRegion,
$_parentId,
$_addsave,
$_dataremove,
$_getDetail,
} from '@/api/basicdata/basicdataWarehouse';
import { getDictionaryBiz } from '@/api/system/dict'; //
import { getToken } from '@/utils/auth';
import { ElMessage } from 'element-plus';
import dayjs from 'dayjs';
import { Delete, Download, Plus, ZoomIn } from '@element-plus/icons-vue';
const props = { multiple: true }
import { ElMessage, ElMessageBox } from 'element-plus';
const props = { multiple: true };
const options = ref([]); //
const selectAll = ref([]);
const search = ref(false); //
const imgs = ref([
'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg',
]);
const imgs1 = ref([
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
]);
const dialogDetail = ref(false); //
const dialogImageUrl = ref('');
const dialogVisible = ref(false);
const disabled = ref(false);
const dialogTitle = ref('新增');
const handleRemove = file => {
console.log(file);
};
@ -362,19 +613,18 @@ const query = ref({}); //顶部搜索参数
const newlyaddload = ref(false); //
const AssessmentDepartment = ref([]); //
const department = ref();
const Addform = ref({
}); //
const Addform = ref({}); //
const WarehouseType = ref([]); //
const FireProtection = ref([]); //
const Isprotection = ref([
{
dictValue:'是',
dictKey:'1'
},
{
dictValue:'否',
dictKey:'0'
}
dictValue: '是',
dictKey: '1',
},
{
dictValue: '否',
dictKey: '0',
},
]); //
const WarehouseStructureList = ref([]); //
const Iselevated = ref([]); //
@ -450,6 +700,8 @@ const BelongsearcheNodeClick = data => {
if (data.hasChildren) {
classification(data.id, data.value);
}
console.log(department.value, '存储的部门');
};
//
@ -639,26 +891,149 @@ const currentChange = val => {
};
//
const newlyadd = () => {
Addform.value = {};
dialogDetail.value = true; //
Addform.value.warehouseAddress = [];
Addform.value.address = [];
newlyaddload.value = true; //
};
//
const DeleteInformationAll = () => {
if (!selectAll.value.length) {
ElMessage({
message: '请勾选要删除的数据',
type: 'warning',
});
return;
}
ElMessageBox.confirm('是否批量删除数据?确定此操作不可撤销!', 'Warning', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
let data = {
ids: [],
};
selectAll.value.forEach(item => {
data['ids'].push(item.id);
});
data['ids'] = data['ids'].join(',');
details.loadingObj.list = true; //
$_dataremove(data)
.then(res => {
console.log(res, '删除成功后返回值');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
onLoad();
}
})
.catch(() => {})
.finally(() => {
details.loadingObj.list = false; //
});
})
.catch(() => {});
};
const selectionChange = val => {
selectAll.value = val;
console.log(selectAll.value, '勾选数据');
};
//
const view = val => {
let data = {
id: val.row.id,
};
$_getDetail(data).then(res => {
console.log(res, '查看详情');
Addform.value = res.data.data;
Addform.value['address'] = [];
Addform.value['addressInfo'] = [];
console.log(Addform.value);
dialogDetail.value = true; //
console.log(options.value, '职能类型');
Addform.value.functionType = String(Addform.value.functionType); //
Addform.value.address[0] = Addform.value.longitude; //
Addform.value.address[1] = Addform.value.latitude; //
Addform.value.address[2] = Addform.value.warehouseAddress; //
Addform.value['addressInfo'][0] = Addform.value.provinceCode; //-
Addform.value['addressInfo'][1] = Addform.value.cityCode; //-
Addform.value['addressInfo'][2] = Addform.value.code; //-
});
};
//
const DeleteInformation = val => {
ElMessageBox.confirm('是否删除该条数据?确定此操作后不可撤销!', '删除提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
console.log(val, '删除');
let data = {
ids: val.row.id,
};
details.loadingObj.list = true; //
$_dataremove(data)
.then(res => {
console.log(res, '删除成功后返回值');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
onLoad();
}
})
.catch(() => {})
.finally(() => {
details.loadingObj.list = false; //
});
})
.catch(() => {});
};
//
const newlyaddSubmit = () => {
console.log(Addform.value);
Addform.value.warehouseAddress = Addform.value.address[2];//
Addform.value.departmentName = AssessmentDepartment.value.find(res=>res.id == Addform.value.department).label;//
Addform.value.daterange[0] = dayjs(Addform.value.daterange[0] ).format('YYYY-MM-DD');
Addform.value.daterange[1] = dayjs(Addform.value.daterange[1] ).format('YYYY-MM-DD');
Addform.value.paymentCodeUrl=Addform.value.paymentCodeUrl[0].response.data.link
Addform.value.administrativeAreas = Addform.value.administrativeAreas.join(',')
console.log(Addform.value);
let data={
...Addform.value
Addform.value.warehouseAddress = Addform.value.address[2]; //
Addform.value.longitude = Addform.value.address[0]; //
Addform.value.latitude = Addform.value.address[1]; //
console.log(AssessmentDepartment.value, '部门');
Addform.value.departmentName = department.value.label; //
Addform.value.startDate = dayjs(Addform.value.daterange[0]).format('YYYY-MM-DD'); //
Addform.value.endDate = dayjs(Addform.value.daterange[1]).format('YYYY-MM-DD'); //
if (Addform.value.paymentCodeUrlS) {
if (Addform.value.paymentCodeUrlS.length) {
Addform.value.paymentCodeUrl = Addform.value.paymentCodeUrlS[0].response.data.link; //
}
}
console.log(data,'准备提交的参数');
$_addsave(data).then(res=>{
console.log(res,'新增之后返回值');
})
Addform.value.administrativeAreas = Addform.value.administrativeAreas.join(',');
Addform.value.provinceCode = Addform.value.addressInfo[0]; //
Addform.value.cityCode = Addform.value.addressInfo[0]; //
Addform.value.code = Addform.value.addressInfo[0]; //
console.log(Addform.value);
let data = {
...Addform.value,
};
console.log(data, '准备提交的参数');
$_addsave(data).then(res => {
console.log(res, '新增之后返回值');
if (res.data.code == 200) {
newlyaddload.value = false; //
Addform.value = {};
ElMessage({
message: res.data.msg,
type: 'success',
});
onLoad();
}
});
};
//
const AffiliationList = ref({

56
src/views/distribution/reservation/reservationAddFrom.vue

@ -147,14 +147,14 @@
@click="viewStockArticlePackage(slotProps.scope.row)"
>查看包件
</el-text>
<el-text
<!-- <el-text
v-if="slotProps.scope.row.resource === '零担' || slotProps.scope.row.isZero === '1'"
type="primary"
link
icon="el-icon-view"
@click="entryNum(slotProps.scope.row)"
>在库录入
</el-text>
</el-text> -->
<el-text
v-if="slotProps.scope.row.resource === '零担' || slotProps.scope.row.isZero === '1'"
type="primary"
@ -298,44 +298,51 @@
<template v-if="zeroOrderData != null">
<div v-for="(item, index) in zeroOrderData" :key="index">
<el-row :gutter="24" class="rows">
<el-col :xl="4" :lg="7" :md="8" :sm="24">
<el-col :xl="2" :lg="4" :md="4" :sm="12">
<span>名称{{ item.firsts }}</span>
</el-col>
<el-col :xl="4" :lg="7" :md="8" :sm="24">
<!-- <el-col :xl="4" :lg="7" :md="8" :sm="24">
<span>总数量{{ item.quantity }} </span>
</el-col>
<el-col :xl="4" :lg="7" :md="8" :sm="24">
</el-col> -->
<!-- <el-col :xl="4" :lg="7" :md="8" :sm="24">
<span>在库数量{{ item.handQuantity }} </span>
</el-col>
<el-col :xl="4" :lg="7" :md="8" :sm="24">
</el-col> -->
<el-col :xl="2" :lg="4" :md="8" :sm="24">
<span>冻结数量{{ item.deliveryQuantity }} </span>
</el-col>
<el-col :xl="4" :lg="7" :md="8" :sm="24">
<span>出库数量{{ item.outboundQuantity }} </span>
</el-col>
<el-col :xl="4" :lg="7" :md="8" :sm="24">
<!-- <el-col :xl="4" :lg="7" :md="8" :sm="24">
<span
>可用数量{{
item.handQuantity - item.deliveryQuantity - item.outboundQuantity
}}</span
>
<!-- <span>可用数量{{(item.quantity)}}</span>-->
</el-col>
</el-row>
<el-input-number
<span>可用数量{{(item.quantity)}}</span>
</el-col> -->
<el-col :xl="5" :lg="4" :md="4" :sm="12">
<div class="el_sumS">
<span>操作数量</span>
<el-input-number
v-if="this.isrReservationEntry"
v-model="item.reservationNum"
min="0"
:max="item.zeroOrderMax"
:max="maxSum"
placeholder="请输入预约数量"
></el-input-number>
<el-input-number
v-else
v-model="item.number"
min="0"
:max="item.quantity"
:max="maxSum"
placeholder="请输入预约数量"
></el-input-number>
</div>
</el-col>
</el-row>
<!-- <el-input-number v-model="item.reservationNum" min="0" :max="item.quantity - item.deliveryQuantity -item.outboundQuantity " placeholder="请输入预约数量"></el-input-number>-->
</div>
</template>
@ -2011,7 +2018,18 @@ export default {
});
return ids.join(',');
},
//
maxSum(){
let max=0
this.zeroOrderData.forEach(item=>{
console.log(item);
max+=item.deliveryQuantity;//
})
let maxs = this.obj.handQuantity -max
return maxs
}
},
methods: {
/** 设置表格高度 */
async setTableHeight() {
@ -3406,4 +3424,12 @@ input[type='number'] {
.footer-container {
height: 60px;
}
.el_sumS{
span{
width: 100px;
}
display: flex;
height: 20px;
width: 200px;
}
</style>

287
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -292,7 +292,7 @@
>
<template #default="slotProps">
<el-text
v-if="slotProps.scope.row.isZero != '1'"
v-if="slotProps.scope.row.isZero != '1'"
:link="ElButtonS[0].link"
:class="ElButtonS[0].class"
:auto-insert-space="ElButtonS[0].space"
@ -301,7 +301,7 @@
@click="ViewEvent(slotProps.scope.row)"
>查看包件</el-text
>
<el-text
<!-- <el-text
v-if="slotProps.scope.row.isZero == '1'"
:link="ElButtonS[1].link"
:class="ElButtonS[1].class"
@ -310,7 +310,7 @@
:icon="ElButtonS[1].icon"
@click="Entering(slotProps.scope.row)"
>在库录入</el-text
>
> -->
<el-text
v-if="slotProps.scope.row.isZero == '1'"
:link="ElButtonS[2].link"
@ -548,10 +548,7 @@
:isselectfun="ProhibitSelection"
:searchInput="multifunctional"
>
<template #default="slotProps">
</template>
<template #default="slotProps"> </template>
</tablecmt>
<!-- 表格翻页功能 -->
<div class="flex-c-sb">
@ -599,19 +596,19 @@
>
<el-table :data="isZeroTable" border style="width: 100%">
<el-table-column fixed prop="firsts" label="名称" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="handQuantity" label="在库数量" />
<!-- <el-table-column prop="quantity" label="数量" /> -->
<!-- <el-table-column prop="handQuantity" label="在库数量" /> -->
<el-table-column prop="deliveryQuantity" label="冻结数量" />
<el-table-column prop="outboundQuantity" label="出库数量" />
<el-table-column label="可用数量">
<template #default="props">
<!-- <el-table-column label="可用数量">
<template #default="props">
<span>
{{
props.row.handQuantity - props.row.deliveryQuantity - props.row.outboundQuantity
}}</span
>
</template>
</el-table-column>
</el-table-column> -->
<!-- 在库=冻结-出库 -->
<el-table-column fixed="right" label="数量操作">
@ -625,7 +622,8 @@
<el-input-number
v-else
size="small"
:max="scope.row.handQuantity - scope.row.deliveryQuantity - scope.row.outboundQuantity"
:max="MaxSUM"
:min="0"
v-model="scope.row.reservationNum"
@change="isZeroNumber(scope.row)"
/>
@ -1575,7 +1573,6 @@ const wrap = ref([
head: false,
},
{
prop: 'quantity',
label: '数量',
@ -1789,7 +1786,7 @@ const selectAll = val => {
//
const TCselectAll = val => {
dataTmp.value = val;
console.log(dataTmp.value,'勾选中的数据');
console.log(dataTmp.value, '勾选中的数据');
};
/** 表格表头输入框搜索 */
@ -1860,35 +1857,28 @@ function tooSUM() {
//
const submit = () => {
console.log('dataTmp.value :>> ', dataTmp.value);
//
if (RouteId.value) {
if(!dataTmp.value.length){
ElMessageBox.confirm(
'当前没有勾选包件,是否移除当前订单?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
console.log(dataInfo.value,'当前所有订单');
console.log(dataId.value,'删除订单');
dataInfo.value.splice(dataId.value, 1);
ElMessage({
type: 'success',
message: '移除成功',
if (!dataTmp.value.length) {
ElMessageBox.confirm('当前没有勾选包件,是否移除当前订单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
AddLalog.value = false; //
})
.catch(() => {
})
return
.then(() => {
console.log(dataInfo.value, '当前所有订单');
console.log(dataId.value, '删除订单');
dataInfo.value.splice(dataId.value, 1);
ElMessage({
type: 'success',
message: '移除成功',
});
AddLalog.value = false; //
})
.catch(() => {});
return;
}
if (!wrapLoading.value) {
dataInfo.value = dataTmp.value;
@ -1900,7 +1890,7 @@ const submit = () => {
let packageListInfo = [];
console.log('触发2');
dataInfo.value[dataId.value].packageListInfo = dataTmp.value; //
// dataInfo.value[dataId.value].packageListInfo = wrapData.value;
// dataInfo.value[dataId.value].packageListInfo = wrapData.value;
wrapTemp.value[dataId.value] = dataTmp.value;
console.log('wrapTemp.value[dataId.value] :>> ', wrapTemp.value[dataId.value]);
console.log(wrapTemp.value, '包件订单被缓存');
@ -1908,43 +1898,36 @@ const submit = () => {
console.log(dataInfo.value, '所有订单信息');
}
} else {
if(!dataTmp.value.length){
ElMessageBox.confirm(
'当前没有勾选包件,是否移除当前订单?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
console.log(dataInfo.value,'当前所有订单');
console.log(dataId.value,'删除订单');
dataInfo.value.splice(dataId.value, 1);
ElMessage({
type: 'success',
message: '移除成功',
if (!dataTmp.value.length) {
ElMessageBox.confirm('当前没有勾选包件,是否移除当前订单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
AddLalog.value = false; //
})
.catch(() => {
})
return
.then(() => {
console.log(dataInfo.value, '当前所有订单');
console.log(dataId.value, '删除订单');
dataInfo.value.splice(dataId.value, 1);
ElMessage({
type: 'success',
message: '移除成功',
});
AddLalog.value = false; //
})
.catch(() => {});
return;
}
//
//
if (wrapLoading.value) {
console.log(dataInfo.value,'订单');
console.log(dataId.value,'当前下标');
console.log(dataInfo.value[dataId.value],'当前下班的订单');
console.log(dataTmp.value,'勾选的数据');
console.log(dataInfo.value, '订单');
console.log(dataId.value, '当前下标');
console.log(dataInfo.value[dataId.value], '当前下班的订单');
console.log(dataTmp.value, '勾选的数据');
dataInfo.value[dataId.value].packageListInfo = dataTmp.value; //
console.log(wrapTemp.value, '包件订单被缓存222');
console.log(dataInfo.value,'处理好的订单');
console.log(dataInfo.value, '处理好的订单');
//
} else {
dataInfo.value = dataTmp.value;
@ -1954,8 +1937,6 @@ const submit = () => {
console.log('提交后的临时存储', dataTmp.value);
}
//
dataInfo.value = removeDuplicates(dataInfo.value);
//
@ -2007,8 +1988,8 @@ function scrollToElementWithinTableRow(partialIdString) {
}
//
const SearchFu = () => {
console.log(multifunctional.value,'搜索的参数值');
console.log(multifunctional.value, '搜索的参数值');
if (multifunctional.value) {
scrollToElementWithinTableRow(multifunctional.value);
} else {
@ -2090,7 +2071,16 @@ const EditEvent = val => {
//
console.log('触发了编辑事件', val);
};
const MaxSUM = computed(() => {
let sum = 0;
isZeroTable.value.forEach(item => {
sum += item.deliveryQuantity;
});
let max = dataInfo.value[dataId.value].handQuantity - sum;
console.log(dataInfo.value, ' dataInfo.value[');
return max;
});
const toggleSelection = options => {
const { val = true, data, dataInfo = wrapData.value, index = 0 } = options;
const setIn = setTimeout(() => {
@ -2108,17 +2098,16 @@ const toggleSelection = options => {
clearTimeout(setIn);
}, 0);
};
function ProhibitSelection(val,index){
if(wrapLoading.value){
if(val.orderPackageLoadingStatus == 20 || val.orderPackageStockupStatus == 70){
return false
}else{
return true
}
}else{
function ProhibitSelection(val, index) {
if (wrapLoading.value) {
if (val.orderPackageLoadingStatus == 20 || val.orderPackageStockupStatus == 70) {
return false;
} else {
return true;
}
} else {
return true;
}
}
// .
const findIndexById = id => {
@ -2226,8 +2215,8 @@ const PackageFn = async () => {
};
//
function ViewEvent (val,index) {
console.log(index,'下标')
function ViewEvent(val, index) {
console.log(index, '下标');
wrapData.value = [];
loading.value = true; //
PackageFrom.value = {}; //
@ -2239,12 +2228,12 @@ function ViewEvent (val,index) {
editLoading.value = true; //
dataId.value = findIndexById(val.id);
console.log(val.id);
//;
//
PackageFn();
return;
};
}
//
//
@ -2264,6 +2253,8 @@ const Entering = val => {
//
const QuantityEntry = val => {
console.log(dataInfo.value, 'dataInfo.value');
dataId.value = findIndexById(val.id); //
comprehensive.value = true; //
QuantityEntryStatus.value = true; //
@ -2324,45 +2315,64 @@ const ModifyLCL = () => {
const SubmitLoad = () => {
//
// QuantityEntryStatus
if (QuantityEntryStatus.value) {
if (RouteId.value) {
for (let item of isZeroTable.value) {
if (
item.reservationNum >
item.handQuantity - item.deliveryQuantity - item.outboundQuantity
) {
ElMessage({
message: item.firsts + item.reservationNum + ':最大值:不能超过(可用数量)',
type: 'warning',
});
return;
}
}
}
console.log(dataInfo.value[dataId.value], '当前零担信息');
let sum = 0; //
let Numberoperations = 0;
isZeroTable.value.forEach(item => {
sum += item.deliveryQuantity;
Numberoperations += item.reservationNum;
});
let max = dataInfo.value[dataId.value].handQuantity - sum;
console.log(dataInfo.value, ' dataInfo.value[');
if (Numberoperations > max) {
ElMessage({
message: '操作数量总和不能大于冻结数量总和',
type: 'warning',
});
return;
}
if (QuantityEntryStatus.value) {
// if (RouteId.value) {
// for (let item of isZeroTable.value) {
// if (
// item.reservationNum >
// item.handQuantity - item.deliveryQuantity - item.outboundQuantity
// ) {
// ElMessage({
// message: item.firsts + item.reservationNum + '::',
// type: 'warning',
// });
// return;
// }
// }
// }
// console.log(dataInfo.value[dataId.value], '');
} else {
// +
for (const item of isZeroTable.value) {
if (item.number < item.deliveryQuantity + item.outboundQuantity) {
ElMessage({
message: item.firsts + ':最小值:不能低于(冻结数量+在库数量)',
type: 'warning',
});
return;
}
}
// for (const item of isZeroTable.value) {
// if (item.number < item.deliveryQuantity + item.outboundQuantity) {
// ElMessage({
// message: item.firsts + '::+',
// type: 'warning',
// });
// return;
// }
// }
//
for (const item of isZeroTable.value) {
if (item.handQuantity + item.number > item.quantity) {
ElMessage({
message: item.firsts + ':最大值:不能超过(在库数量+输入的数量)>数量',
type: 'warning',
});
return;
}
}
// for (const item of isZeroTable.value) {
// if (item.handQuantity + item.number > item.quantity) {
// ElMessage({
// message: item.firsts + '::(+)>',
// type: 'warning',
// });
// return;
// }
// }
entryNum(isZeroTable.value).then(res => {
console.log(res, '提交零担');
console.log(isZeroTable.value, '提交零担的值');
@ -2385,10 +2395,10 @@ const isZeroNumber = val => {
};
//
const refresh = () => {
if(!wrapLoading.value){
AddInfo()
}else{
ViewEvent(Packageow.value)
if (!wrapLoading.value) {
AddInfo();
} else {
ViewEvent(Packageow.value);
}
};
//
@ -2574,8 +2584,6 @@ const CLchangeSelect = val => {
//
const merge = (val, kindS) => {
if (kindS == 'WX') {
//
console.log('当前是外协');
@ -2587,29 +2595,29 @@ const merge = (val, kindS) => {
return;
}
if(!DataSubmit.value.tripartite.driverName){
if (!DataSubmit.value.tripartite.driverName) {
ElMessage({
message: '请选填写司机名称',
type: 'warning',
});
return
return;
}
const phoneRegExp = /^[0-9]{11}$/;
if (!phoneRegExp.test(DataSubmit.value.tripartite.driverPhone)) {
ElMessage({
message: '请输入正确的11位司机电话号码',
type: 'warning',
});
return;
ElMessage({
message: '请输入正确的11位司机电话号码',
type: 'warning',
});
return;
}
if(!DataSubmit.value.tripartite.vehicleNum){
if (!DataSubmit.value.tripartite.vehicleNum) {
ElMessage({
message: '请选填车辆车牌',
type: 'warning',
});
return
return;
}
if (!DataSubmit.value.taskTime) {
@ -2786,7 +2794,7 @@ const SubmitCommercial = async () => {
code = res.data.code;
} else {
//
console.log(DataSubmit.value, '准备提交的信息');
const res = await deliveryBusinessTask(DataSubmit.value);
code = res.data.code;
@ -3388,5 +3396,4 @@ const SubmitCommercial = async () => {
min-width: 300px;
font-size: 14px;
}
</style>

Loading…
Cancel
Save