|
|
|
@ -274,7 +274,7 @@
|
|
|
|
|
<!-- 表格列开始 --> |
|
|
|
|
<el-table |
|
|
|
|
:data="dataInfo" |
|
|
|
|
row-key="name" |
|
|
|
|
:row-key="name" |
|
|
|
|
border |
|
|
|
|
:height="TabHeight + 'px'" |
|
|
|
|
style="width: 100%" |
|
|
|
@ -383,11 +383,100 @@
|
|
|
|
|
<el-dialog v-model="AddLalog" :title="wrapLoading ? '包件信息' : '在库订单信息'"> |
|
|
|
|
<!-- 表格列开始 --> |
|
|
|
|
<!-- data 订单信息 wrapData包件信息 --> |
|
|
|
|
<div class="SoInput" v-show="searchSo" ref="SoHeight"> |
|
|
|
|
<el-form label-width="100px" :model="parameter"> |
|
|
|
|
<el-form-item label="商场名称:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.mallName" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入商场名称" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货物名称:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.descriptionGoods" |
|
|
|
|
placeholder="请输入货物名称" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="运单号:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.waybillNumber" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入运单号" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="订单自编号:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.orderCode" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入订单自编号" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="服务号:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.serviceNumber" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入服务号" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="顾客姓名:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.customerName" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入顾客姓名" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="顾客电话:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.customerTelephone" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入顾客电话" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="顾客地址:"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="parameter.customerAddress" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入顾客地址" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- <div class="SoBtn"> |
|
|
|
|
搜索菜单预留按钮 |
|
|
|
|
</div> --> |
|
|
|
|
</div> |
|
|
|
|
<!-- 顶部开始 --> |
|
|
|
|
<div class="el-Cart-button"> |
|
|
|
|
<!-- 表格顶部左侧按钮 --> |
|
|
|
|
<div class="el-Cart-button-left"> |
|
|
|
|
<el-button type="primary" @click="SoInput" |
|
|
|
|
><el-icon><Search /></el-icon>搜索</el-button |
|
|
|
|
> |
|
|
|
|
<el-button class="SoEmpty" type="primary" @click="SoEmpty"> |
|
|
|
|
<el-icon><Delete /></el-icon> 清空 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- 表格顶部右侧按钮 --> |
|
|
|
|
<div class="el-Cart-button-right"> |
|
|
|
|
<!-- 刷新按钮 --> |
|
|
|
|
<button @click="refresh"> |
|
|
|
|
<el-icon color="#ccc"><Refresh /></el-icon> |
|
|
|
|
</button> |
|
|
|
|
<!-- 功能按钮 实验性功能 --> |
|
|
|
|
<!-- <button @click="menu = true"> |
|
|
|
|
<el-icon color="#ccc"><Operation /></el-icon> |
|
|
|
|
</button> --> |
|
|
|
|
<!-- 搜索按钮 --> |
|
|
|
|
<button @click="search"> |
|
|
|
|
<el-icon color="#ccc"><Search /></el-icon> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 顶部结束 --> |
|
|
|
|
<el-table |
|
|
|
|
:data="wrapLoading ? wrapData : data" |
|
|
|
|
row-key="name" |
|
|
|
|
border |
|
|
|
|
height="600px" |
|
|
|
|
:height="searchSo ? 512 : 600 + 'px'" |
|
|
|
|
style="width: 100%" |
|
|
|
|
ref="tableRefs" |
|
|
|
|
@select-all="selectAll" |
|
|
|
@ -484,7 +573,7 @@
|
|
|
|
|
:total="total" |
|
|
|
|
@size-change="PageSizeChange" |
|
|
|
|
@current-change="SizeChange" |
|
|
|
|
v-if="wrapLoadin" |
|
|
|
|
v-if="!wrapLoading" |
|
|
|
|
/> |
|
|
|
|
<!-- 弹窗底部提交按钮 --> |
|
|
|
|
<div></div> |
|
|
|
@ -608,7 +697,7 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import { ref, reactive, onMounted, computed, watch } from 'vue'; |
|
|
|
|
import { ref, reactive, onMounted, computed, watch, watchEffect } from 'vue'; |
|
|
|
|
import { useRoute, useRouter } from 'vue-router'; |
|
|
|
|
import { |
|
|
|
|
$_selectStockArticleInfoList, |
|
|
|
@ -628,7 +717,6 @@ import {
|
|
|
|
|
} from '@/api/distribution/distributionDeliveryList'; //数据回显 |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; //外协来源 |
|
|
|
|
import type { FormProps } from 'element-plus'; |
|
|
|
|
// import { getToken } from '@/utils/auth'; |
|
|
|
|
const route = useRoute(); |
|
|
|
|
const router = useRouter(); |
|
|
|
|
// 选项卡 |
|
|
|
@ -654,6 +742,7 @@ const wrapLoading = ref(false); //包件表格弹窗
|
|
|
|
|
const dataInfo = ref([]); //表格展示信息 |
|
|
|
|
const dataTmp = ref([]); //暂存数据 |
|
|
|
|
const TabHeight = ref(230); //动态获取表格高度 |
|
|
|
|
const TCTabHeight = ref(600); //动态获取弹窗表格高度 |
|
|
|
|
const AddLalog = ref(false); //提交弹窗 |
|
|
|
|
const AddForm = ref({}); //表单所有信息 |
|
|
|
|
const AddData = ref({}); //获取数据列表 |
|
|
|
@ -684,6 +773,8 @@ const dataId = ref(null); //包件对应ID,用于存储包件下面的ID
|
|
|
|
|
const wrapDataInfo = ref([]); //订单包件回显 |
|
|
|
|
const RouteId = ref(null); //编辑页面的ID参数 |
|
|
|
|
const labelPosition = ref<FormProps['labelPosition']>('right'); |
|
|
|
|
const SoInfoData = ref(); //搜索框 |
|
|
|
|
const parameter = ref({}); //搜索框参数 |
|
|
|
|
// 司机选择信息 |
|
|
|
|
// 车辆选项 |
|
|
|
|
// 备货人员 |
|
|
|
@ -1434,22 +1525,25 @@ onMounted(() => {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// 点击新增获在库订单信息 |
|
|
|
|
async function dataTabInfo() { |
|
|
|
|
|
|
|
|
|
// 订单新增选中 |
|
|
|
|
async function OrderSelection(id, DataParameter) { |
|
|
|
|
loading.value = true; //开启加载效果 |
|
|
|
|
await $_selectStockArticleInfoList({ |
|
|
|
|
typeService: StockInfo.value.radio, //类型商配(固定) |
|
|
|
|
genre: 1, //固定参数 |
|
|
|
|
current: currentPage.value, //页码 |
|
|
|
|
size: pageSize.value, //每一页条数 |
|
|
|
|
...DataParameter, |
|
|
|
|
}).then(res => { |
|
|
|
|
loading.value = false; //关闭加载效果 |
|
|
|
|
data.value = res.data.data.records; |
|
|
|
|
// 根据选择的已经有的去匹配已经选择的数据勾选 |
|
|
|
|
console.log(kind.value, 'kind.value'); |
|
|
|
|
|
|
|
|
|
let setIn = setTimeout(() => { |
|
|
|
|
let id = []; |
|
|
|
|
dataInfo.value.forEach(val => { |
|
|
|
|
tableRefs.value[0].toggleRowSelection( |
|
|
|
|
tableRefs.value[id].toggleRowSelection( |
|
|
|
|
data.value[data.value.findIndex(item => item.id === val.id)], |
|
|
|
|
true |
|
|
|
|
); |
|
|
|
@ -1465,9 +1559,19 @@ async function dataTabInfo() {
|
|
|
|
|
total.value = res.data.data.total; //总页数 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 点击新增获在库订单信息 |
|
|
|
|
function dataTabInfo() { |
|
|
|
|
// 根据当前是自配还是外协来选择订单里面选中状态 |
|
|
|
|
if (kind.value) { |
|
|
|
|
OrderSelection(0); |
|
|
|
|
} else { |
|
|
|
|
OrderSelection(1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 点击新增获取在库订单信息 |
|
|
|
|
const AddInfo = () => { |
|
|
|
|
dataTmp.value = []; //清空暂存数据 |
|
|
|
|
// dataTmp.value = []; //清空暂存数据 |
|
|
|
|
AddLalog.value = true; //展开表单弹窗 |
|
|
|
|
wrapLoading.value = false; //关闭包件弹窗信息 |
|
|
|
|
dataTabInfo(); //请求数据 |
|
|
|
@ -1483,49 +1587,6 @@ const SizeChange = val => {
|
|
|
|
|
dataTabInfo(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 表单信息展示 |
|
|
|
|
const submit = () => { |
|
|
|
|
dataInfo.value = dataTmp.value; |
|
|
|
|
console.log(dataTmp.value, '选择好的信息'); |
|
|
|
|
console.log(dataInfo.value, '展示成功'); |
|
|
|
|
AddLalog.value = false; //关闭弹窗 |
|
|
|
|
}; |
|
|
|
|
// 最后提交订单 |
|
|
|
|
const SubmitCommercial = () => { |
|
|
|
|
// kind为假就说明目前是在外协页面 |
|
|
|
|
console.log(kind.value); |
|
|
|
|
if (kind.value) { |
|
|
|
|
merge('submit', 'TJ'); |
|
|
|
|
} else { |
|
|
|
|
merge('submit', 'WX'); |
|
|
|
|
} |
|
|
|
|
// 不符合判断条件不能提交 |
|
|
|
|
if (!state.value) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
DataSubmit.value.stockArticle = dataInfo.value; //订单列表 |
|
|
|
|
// 提交 |
|
|
|
|
// 编辑修改 |
|
|
|
|
if (RouteId.value) { |
|
|
|
|
let DataSubmitRenamed = Object.assign({}, DataSubmit.value); //浅拷贝需要提交的参数 |
|
|
|
|
delete DataSubmitRenamed.stockup; //删除不需要的参数 |
|
|
|
|
DataSubmitRenamed.stockupInfo = DataSubmit.value.stockup; //把原来的参数赋值给新对象名字,这里用于修改对象名字 |
|
|
|
|
DataSubmitRenamed.id = RouteId.value; //修改提交的时候带上参数ID |
|
|
|
|
updateDeliveryList(DataSubmitRenamed).then(res => { |
|
|
|
|
console.log(res); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
// 新增信息 |
|
|
|
|
deliveryBusinessTask(DataSubmit.value).then(res => { |
|
|
|
|
console.log(res); |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
router.push('/distribution/deliverylist/distributionDeliveryListdis'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(DataSubmit.value, '准备提交的信息'); |
|
|
|
|
}; |
|
|
|
|
// 菜单触发功能 |
|
|
|
|
// Type ===1 隐藏列 |
|
|
|
|
// Type ===2 冻结列 |
|
|
|
@ -1547,29 +1608,38 @@ const selectChange = (selection, row) => {
|
|
|
|
|
// 1.selection 选中的数组 |
|
|
|
|
// 2.row 选中的当前行 |
|
|
|
|
// 数据编辑包件信息操作 |
|
|
|
|
selection.forEach(item => { |
|
|
|
|
dataTmp.value.push(item); |
|
|
|
|
dataTmp.value = [...new Set(dataTmp.value)]; |
|
|
|
|
}); |
|
|
|
|
console.log(dataTmp.value, '存储好的值'); |
|
|
|
|
if (RouteId.value) { |
|
|
|
|
console.log(selection, 'selection信息'); |
|
|
|
|
// dataTmp.value = selection; |
|
|
|
|
return; |
|
|
|
|
let tmp = selection; |
|
|
|
|
tmp = dataTmp.value; |
|
|
|
|
dataTmp.value = tmp; |
|
|
|
|
console.log(dataTmp.value, '存储好的值'); |
|
|
|
|
|
|
|
|
|
if (wrapLoading.value) { |
|
|
|
|
let packageListInfo = []; |
|
|
|
|
packageListInfo = dataTmp.value; |
|
|
|
|
console.log(dataId.value, 'dataId.value'); |
|
|
|
|
console.log(dataInfo.value[dataId.value], 'dataInfo.value[dataId.value]'); |
|
|
|
|
dataInfo.value[dataId.value].packageListInfo = dataTmp.value; |
|
|
|
|
console.log(dataInfo.value, '包件信息选中'); |
|
|
|
|
dataTmp.value = dataInfo.value; |
|
|
|
|
} else { |
|
|
|
|
console.log('在库订单信息'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// wrapLoading为真表示此时弹窗内容是包件信息 |
|
|
|
|
// 新增包件信息修改 |
|
|
|
|
|
|
|
|
|
if (wrapLoading.value) { |
|
|
|
|
let packageListInfo = []; |
|
|
|
|
packageListInfo = dataTmp.value; |
|
|
|
|
console.log(dataId.value, 'dataId.value'); |
|
|
|
|
console.log(dataInfo.value[dataId.value], 'dataInfo.value[dataId.value]'); |
|
|
|
|
dataInfo.value[dataId.value].packageListInfo = dataTmp.value; |
|
|
|
|
console.log(dataInfo.value, '包件信息选中'); |
|
|
|
|
dataTmp.value = dataInfo.value; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(dataTmp.value, '暂存数据'); |
|
|
|
|
console.log(selection, '当前选中的信息'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 删除触发事件 |
|
|
|
|
const DeleteEvent = val => { |
|
|
|
|
// 接收点击删除当前行数据 |
|
|
|
@ -1584,22 +1654,41 @@ const EditEvent = val => {
|
|
|
|
|
console.log('触发了编辑事件', val); |
|
|
|
|
}; |
|
|
|
|
// 表格自动全选 |
|
|
|
|
const toggleSelection = (val = true, data, dataInfo = wrapData.value) => { |
|
|
|
|
//对表单进行循环把所有表格进行全部选中,或者通过IF对条件满足进行选中 |
|
|
|
|
// const toggleSelection = (val = true, data, dataInfo = wrapData.value,index=0) => { |
|
|
|
|
// //对表单进行循环把所有表格进行全部选中,或者通过IF对条件满足进行选中 |
|
|
|
|
// const setIn = setTimeout(() => { |
|
|
|
|
// if (val) { |
|
|
|
|
// // tableRefs.value[0]弹窗表格 |
|
|
|
|
// dataInfo.forEach((row, i) => { |
|
|
|
|
// tableRefs.value[index].toggleRowSelection(dataInfo[i], true); |
|
|
|
|
// }); |
|
|
|
|
// } else { |
|
|
|
|
// dataInfo.forEach((row, i) => { |
|
|
|
|
// if (row.id == data[i]) { |
|
|
|
|
// tableRefs.value[index].toggleRowSelection(dataInfo[i], true); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// clearTimeout(setIn); //清除定时器 |
|
|
|
|
// }, 0); |
|
|
|
|
// }; |
|
|
|
|
|
|
|
|
|
const toggleSelection = options => { |
|
|
|
|
const { val = true, data, dataInfo = wrapData.value, index = 0 } = options; |
|
|
|
|
|
|
|
|
|
const setIn = setTimeout(() => { |
|
|
|
|
if (val) { |
|
|
|
|
// tableRefs.value[0]弹窗表格 |
|
|
|
|
dataInfo.forEach((row, i) => { |
|
|
|
|
tableRefs.value[0].toggleRowSelection(dataInfo[i], true); |
|
|
|
|
tableRefs.value[index].toggleRowSelection(dataInfo[i], true); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
dataInfo.forEach((row, i) => { |
|
|
|
|
if (row.id == data[i]) { |
|
|
|
|
tableRefs.value[0].toggleRowSelection(dataInfo[i], true); |
|
|
|
|
tableRefs.value[index].toggleRowSelection(dataInfo[i], true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
clearTimeout(setIn); //清除定时器 |
|
|
|
|
clearTimeout(setIn); |
|
|
|
|
}, 0); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -1618,6 +1707,7 @@ const ViewEvent = val => {
|
|
|
|
|
wrapLoading.value = true; //查看包件弹窗 |
|
|
|
|
AddLalog.value = true; //开启弹窗 |
|
|
|
|
editLoading.value = true; //开启加载效果 |
|
|
|
|
dataId.value = findIndexById(val.id); |
|
|
|
|
//接收点击查看当前行数据; |
|
|
|
|
// 编辑信息弹窗状态 |
|
|
|
|
if (RouteId.value) { |
|
|
|
@ -1631,9 +1721,23 @@ const ViewEvent = val => {
|
|
|
|
|
console.log(res, '订单包件信息'); |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
wrapData.value = res.data.data.data.packageList; |
|
|
|
|
|
|
|
|
|
console.log(res, 'res,修改下的包件信息'); |
|
|
|
|
console.log(res.data.data.data, 'res.data.data.data.packageList'); |
|
|
|
|
if (res.data.data.data.packageListIds) { |
|
|
|
|
toggleSelection(false, res.data.data.data.packageListIds.split(',')); //编辑的时候选中已有的数据 |
|
|
|
|
if (kind.value) { |
|
|
|
|
toggleSelection({ |
|
|
|
|
val: false, |
|
|
|
|
data: res.data.data.data.packageListIds.split(','), |
|
|
|
|
index: 0, |
|
|
|
|
}); //编辑的时候选中已有的数据 |
|
|
|
|
} else { |
|
|
|
|
toggleSelection({ |
|
|
|
|
val: false, |
|
|
|
|
data: res.data.data.data.packageListIds.split(','), |
|
|
|
|
index: 1, |
|
|
|
|
}); //编辑的时候选中已有的数据 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// AddLalog.value = false; //关闭弹窗 |
|
|
|
@ -1648,14 +1752,21 @@ const ViewEvent = val => {
|
|
|
|
|
size: 100, |
|
|
|
|
}).then(res => { |
|
|
|
|
wrapData.value = res.data.data.records; |
|
|
|
|
toggleSelection(); //第一次查看包件默认全选 |
|
|
|
|
console.log(res, '订单包件'); |
|
|
|
|
if (kind.value) { |
|
|
|
|
toggleSelection({ index: 0 }); //自主配送下面包件全选 |
|
|
|
|
} else { |
|
|
|
|
toggleSelection({ index: 1 }); //外协下面包件全选 |
|
|
|
|
} |
|
|
|
|
console.log(tableRefs, 'tableRefs'); |
|
|
|
|
|
|
|
|
|
console.log(res.data.data.records, '查看下面的包件'); |
|
|
|
|
}); |
|
|
|
|
// 新增 查看订单流程 |
|
|
|
|
console.log('当前为新增状态'); |
|
|
|
|
console.log(val, val.id, '查看包件事件'); |
|
|
|
|
//临时存储下标用于查询包件对应的下标 |
|
|
|
|
dataId.value = findIndexById(val.id); |
|
|
|
|
|
|
|
|
|
console.log(dataId.value, 'dataId.value下标'); |
|
|
|
|
console.log(wrapDataInfo.value[dataId.value], '当前订单下面的包件信息'); |
|
|
|
|
console.log(wrapDataInfo, '订单'); |
|
|
|
@ -1670,26 +1781,23 @@ const refresh = () => {
|
|
|
|
|
// 搜索展开功能 |
|
|
|
|
const search = () => { |
|
|
|
|
searchSo.value = !searchSo.value; |
|
|
|
|
if (searchSo.value) { |
|
|
|
|
// 展开 |
|
|
|
|
setTimeout(() => { |
|
|
|
|
console.log(SoHeight.value.offsetHeight); |
|
|
|
|
console.log(TabHeight.value.offsetHeight); |
|
|
|
|
TabHeight.value = TabHeight.value.offsetHeight - SoHeight.value.offsetHeight - 91; //表格高度 |
|
|
|
|
}, 0); |
|
|
|
|
} else { |
|
|
|
|
// 关闭 |
|
|
|
|
TabHeight.value = TabHeight.value.offsetHeight - 91; //表格高度 |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 顶部搜索功能 |
|
|
|
|
const SoInput = () => { |
|
|
|
|
onLoad(); |
|
|
|
|
if (kind.value) { |
|
|
|
|
OrderSelection(0, parameter.value); |
|
|
|
|
} else { |
|
|
|
|
OrderSelection(1, parameter.value); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 顶部清空搜索 |
|
|
|
|
const SoEmpty = () => { |
|
|
|
|
AddData.value.inventoryNo = ''; |
|
|
|
|
onLoad(); |
|
|
|
|
parameter.value = {}; |
|
|
|
|
if (kind.value) { |
|
|
|
|
OrderSelection(0); |
|
|
|
|
} else { |
|
|
|
|
OrderSelection(1); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 去重函数 接收一个数字通过ID匹配去掉重复项 |
|
|
|
@ -1926,7 +2034,65 @@ const moveUpVehictle = row => {
|
|
|
|
|
DataSubmit.value.masterDriverName = DvInfoData.value[0].driverName; //主司机 |
|
|
|
|
DataSubmit.value.masterVehicleNub = DvInfoData.value[0].vehicleNub; //主车牌 |
|
|
|
|
}; |
|
|
|
|
// 弹窗确认表单信息展示 |
|
|
|
|
const submit = () => { |
|
|
|
|
// 当前为编辑状态 |
|
|
|
|
if (RouteId.value) { |
|
|
|
|
if (!wrapLoading.value) { |
|
|
|
|
dataInfo.value = dataTmp.value; //选中好的订单提交到要展示的表格 |
|
|
|
|
console.log(data.value, '准备好的值'); |
|
|
|
|
} else { |
|
|
|
|
// 编辑的时候需要带上这个参数存放订单下面的包件信息 |
|
|
|
|
let packageListInfo = []; |
|
|
|
|
dataInfo.value[dataId.value].packageListInfo = wrapData.value; |
|
|
|
|
|
|
|
|
|
console.log(dataInfo.value[dataId.value].packageListInfo, '被添加到当前订单下面'); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 新增订单 |
|
|
|
|
dataInfo.value = dataTmp.value; //选中好的订单提交到要展示的表格 |
|
|
|
|
} |
|
|
|
|
AddLalog.value = false; //关闭弹窗 |
|
|
|
|
}; |
|
|
|
|
// 最后提交订单 |
|
|
|
|
const SubmitCommercial = () => { |
|
|
|
|
// kind为假就说明目前是在外协页面 |
|
|
|
|
console.log(kind.value); |
|
|
|
|
if (kind.value) { |
|
|
|
|
merge('submit', 'TJ'); |
|
|
|
|
} else { |
|
|
|
|
merge('submit', 'WX'); |
|
|
|
|
} |
|
|
|
|
// 不符合判断条件不能提交 |
|
|
|
|
if (!state.value) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
DataSubmit.value.stockArticle = dataInfo.value; //订单列表 |
|
|
|
|
// 提交 |
|
|
|
|
// 编辑修改 |
|
|
|
|
if (RouteId.value) { |
|
|
|
|
if (!kind.value) { |
|
|
|
|
delete DataSubmit.value.allocationInfo; //如果为外协删掉此参数 |
|
|
|
|
} |
|
|
|
|
let DataSubmitRenamed = Object.assign({}, DataSubmit.value); //浅拷贝需要提交的参数 |
|
|
|
|
delete DataSubmitRenamed.stockup; //删除不需要的参数 |
|
|
|
|
DataSubmitRenamed.stockupInfo = DataSubmit.value.stockup; //把原来的参数赋值给新对象名字,这里用于修改对象名字 |
|
|
|
|
DataSubmitRenamed.id = RouteId.value; //修改提交的时候带上参数ID |
|
|
|
|
updateDeliveryList(DataSubmitRenamed).then(res => { |
|
|
|
|
console.log(res, '修改之后提交的返回值'); |
|
|
|
|
router.push('/distribution/deliverylist/distributionDeliveryListdis'); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
// 新增信息 |
|
|
|
|
deliveryBusinessTask(DataSubmit.value).then(res => { |
|
|
|
|
console.log(res, '新增之后的返回值'); |
|
|
|
|
// 提交之后进行跳转 |
|
|
|
|
router.push('/distribution/deliverylist/distributionDeliveryListdis'); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(DataSubmit.value, '准备提交的信息'); |
|
|
|
|
}; |
|
|
|
|
// 备货区域 |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
@ -2164,6 +2330,7 @@ const moveUpVehictle = row => {
|
|
|
|
|
top: 24px; |
|
|
|
|
} |
|
|
|
|
.el-dialog__body { |
|
|
|
|
padding: 8px; |
|
|
|
|
.el-form { |
|
|
|
|
width: 100%; |
|
|
|
|
display: flex; |
|
|
|
@ -2172,12 +2339,13 @@ const moveUpVehictle = row => {
|
|
|
|
|
} |
|
|
|
|
.el-form-item { |
|
|
|
|
width: 276px; |
|
|
|
|
flex-direction: row; |
|
|
|
|
.el-form-item__label { |
|
|
|
|
font-family: '黑体'; |
|
|
|
|
justify-content: flex-start; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* 去掉第三个、第六个、第九个div的右外边距 */ |
|
|
|
|
.el-form-item:nth-child(3n) { |
|
|
|
|
.el-form-item:nth-child(2n) { |
|
|
|
|
margin-right: 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -2393,12 +2561,12 @@ const moveUpVehictle = row => {
|
|
|
|
|
transition: all 0.5s; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
|
|
|
|
flex-direction: column; |
|
|
|
|
.el-form { |
|
|
|
|
display: flex; |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
.el-form-item { |
|
|
|
|
width: auto; |
|
|
|
|
width: 360px; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-items: center; |
|
|
|
@ -2416,6 +2584,8 @@ const moveUpVehictle = row => {
|
|
|
|
|
// 右侧搜索清空按钮样式 |
|
|
|
|
.SoBtn { |
|
|
|
|
display: flex; |
|
|
|
|
margin-left: auto; |
|
|
|
|
margin-bottom: 8px; |
|
|
|
|
.SoEmpty { |
|
|
|
|
background-color: transparent; |
|
|
|
|
color: #000; |
|
|
|
|