Browse Source

Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

fix_bug_pro20231227
pref_mail@163.com 1 year ago
parent
commit
cb6de1cd97
  1. 2
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  2. 358
      src/views/distribution/turndelivery/devtmp.vue
  3. 4
      vite.config.js

2
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -1017,7 +1017,7 @@ export default {
handleEdit(scope) {
const { row } = scope;
this.$router.push({
path: '/distribution/turndelivery/devtmp',
path: '/distribution/turndelivery/deliveryDiscuss',
query: {
id: row.id,
name: row.trainNumber + '-编辑配送',

358
src/views/distribution/turndelivery/devtmp.vue

@ -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;

4
vite.config.js

@ -22,8 +22,8 @@ export default ({ mode, command }) => {
// cyz
// target: 'http://192.168.10.75:8777',
// tjj
// target: 'http://192.168.10.29:13000',
target: 'http://test.api.huitongys.com',
target: 'http://192.168.10.29:13000',
// target: 'http://test.api.huitongys.com',
// target: 'http://h5uapi.huitongys.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),

Loading…
Cancel
Save