Browse Source

商配编辑新增检测是否修改车辆和司机, 在库列表新增深拷贝

dev-xx
qb 1 year ago
parent
commit
6021d1aedc
  1. 19
      src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue
  2. 40
      src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue
  3. 4
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  4. 4
      src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue
  5. 4
      src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue
  6. 4
      src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue
  7. 303
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  8. 8
      vite.config.js

19
src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue

@ -48,9 +48,6 @@
<el-button type="primary" icon="Check" @click="handleEditBillladingStatus(1)">
开始提货
</el-button>
<el-button type="primary" icon="el-icon-close" @click="handleEditBillladingStatus(6)">
取消提货
</el-button>
<el-button type="primary" icon="el-icon-check" @click="handleEditBillladingStatus(2)">
提货完成
</el-button>
@ -63,6 +60,9 @@
<el-button type="primary" icon="el-icon-close" @click="handleEditBillladingStatus(5)">
取消结算
</el-button>
<el-button type="primary" icon="el-icon-close" @click="handleEditBillladingStatus(6)">
取消提货
</el-button>
<!-- <el-button type="danger" icon="el-icon-download" @click="handleExportInfo" plain
>导出
</el-button> -->
@ -1195,7 +1195,18 @@ export default {
if (this.selectionList.length > 1) return this.$message.error('暂时只支持单条数据操作');
this.$confirm('确定将选择数据提货完成?', {
let content = '';
const contentObj = {
1: '确认开始提货',
2: '确认提货完成',
3: '确认取消完成提货',
4: '确认结算',
5: '确认取消结算',
6: '确认取消提货',
};
this.$confirm(contentObj[type], {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',

40
src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue

@ -259,7 +259,7 @@ export default {
return {
columnList: [
{
prop: 'reservationCode',
prop: '',
label: '序号',
type: 12,
values: '',
@ -269,7 +269,7 @@ export default {
head: false,
},
{
prop: 'reservationCode',
prop: 'billadingCode',
label: '提货批次',
type: 2,
values: '',
@ -280,7 +280,7 @@ export default {
head: false,
},
{
prop: 'trainNumber',
prop: 'waybillNo',
label: '运单号',
type: 13,
values: '',
@ -291,7 +291,7 @@ export default {
head: false,
},
{
prop: 'mallName',
prop: 'createTime',
label: '开单日期',
type: 4,
values: '',
@ -302,7 +302,7 @@ export default {
head: false,
},
{
prop: 'consignee',
prop: 'goodsName',
label: '货物名称',
type: 2,
values: '',
@ -312,7 +312,7 @@ export default {
sortable: true,
},
{
prop: 'deliveryPhone',
prop: 'realNum',
label: '提货件数',
type: 10,
values: '',
@ -323,7 +323,7 @@ export default {
isshowSummary: true,
},
{
prop: 'deliveryAddress',
prop: 'realWeight',
label: '提货重量',
type: 10,
values: '',
@ -334,7 +334,7 @@ export default {
isshowSummary: true,
},
{
prop: 'receivingUnit',
prop: 'realVolume',
label: '提货体积',
type: 10,
values: '',
@ -501,16 +501,19 @@ export default {
data: [],
};
},
watch: {
'$route.data': {
handler(newVal, oldVal) {
console.log(newVal, oldVal);
this.onLoad(this.page);
},
deep: true,
immediate: true,
},
},
// watch: {
// '$route.data': {
// handler(newVal, oldVal) {
// // if ($route.fullpath.indexOf('/delivery/delivery') > -1
// console.log('this.$route :>> ', this.$route);
// console.log(newVal, oldVal);
// this.onLoad(this.page);
// },
// deep: true,
// immediate: true,
// },
// },
mounted() {
var bodyContent = document.querySelectorAll('.maboxhi');
bodyContent.forEach(val => {
@ -519,6 +522,7 @@ export default {
});
},
created() {
this.onLoad(this.page);
// //
// this.queryDictionary();
},

4
src/views/distribution/inventory/delivery/distributionStockArticle.vue

@ -441,6 +441,8 @@ import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { downloadXls } from '@/utils/util';
import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone } from '@/utils/util.js';
const _newCol = deepClone(columnList);
export default {
data() {
@ -472,7 +474,7 @@ export default {
},
],
},
columnList,
columnList: _newCol,
// columnList: [
// {
// prop: '',

4
src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue

@ -392,11 +392,13 @@ import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { downloadXls } from '@/utils/util';
import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone } from '@/utils/util.js';
const _newCol = deepClone(columnList);
export default {
data() {
return {
columnList,
columnList: _newCol,
columnListedit: [],
drawerShow: false,
height: 0,

4
src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue

@ -419,11 +419,13 @@ import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { downloadXls } from '@/utils/util';
import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone } from '@/utils/util.js';
const _newCol = deepClone(columnList);
export default {
data() {
return {
columnList,
columnList:_newCol,
columnListedit: [],
drawerShow: false,
height: 0,

4
src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue

@ -526,11 +526,13 @@ import dayjs from 'dayjs';
import { getListMaterial } from '@/api/basic/basicMaterial';
import { downloadXls } from '@/utils/util';
import { columnList } from '@/option/distribution/distributionStockArticleSelf';
import { deepClone } from '@/utils/util.js';
const _newCol = deepClone(columnList);
export default {
data() {
return {
columnList,
columnList: _newCol,
columnListedit: [],
drawerShow: false,

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

@ -327,7 +327,7 @@
? 'static-class'
: ''
"
>{{ props.row[item.prop]!=null ? props.row[item.prop] : '/' }}</span
>{{ props.row[item.prop] != null ? props.row[item.prop] : '/' }}</span
>
</template>
</el-table-column>
@ -404,15 +404,21 @@
</el-table>
<div class="el-Cart-button-btn">
<div class="el_tool">
已选择:{{dataInfo.length}}
已选择:{{ dataInfo.length }}
<div>
<span>合计:</span>
<span>订单总件数: <span style="color: #67c23a;">{{Totalnumberoforders}} </span> </span>
<span style=" margin: 0 4px;"></span>
<span>在库总件数: <span style="color: #67c23a;"> {{Totalnumberofitemsinstock}}</span></span>
</div>
</div>
<span
>订单总件数:
<span style="color: #67c23a">{{ Totalnumberoforders }} </span>
</span>
<span style="margin: 0 4px"></span>
<span
>在库总件数:
<span style="color: #67c23a"> {{ Totalnumberofitemsinstock }}</span></span
>
</div>
</div>
<el-button type="primary" @click="SubmitCommercial"
><el-icon><Select /></el-icon>()</el-button
>
@ -630,6 +636,15 @@
</el-table>
<!-- 表格翻页功能 -->
<div class="demo-pagination-block TCdemo-pagination-block">
<div style="display: flex" v-if="!wrapLoading">
<div>
订单总件数: <span>{{ orderTotalNum }}</span>
</div>
<div>
在库件数: <span>{{ orderStockNum }}</span>
</div>
</div>
<el-pagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
@ -857,8 +872,8 @@ const numTab = ref([
},
]);
const num = ref(null); //
const Totalnumberoforders=ref(0);//
const Totalnumberofitemsinstock =ref(0);//
const Totalnumberoforders = ref(0); //
const Totalnumberofitemsinstock = ref(0); //
const kind = ref(true); //
const currentPage = ref(1); //
const pageSize = ref(20); //
@ -919,6 +934,20 @@ const soInpuState = ref(false); //搜索框状态表示当前没有搜索
const statisticsList = ref([]); //
const inputValue = ref('number'); //
const dataInfoID = ref(); //ID
/** 编辑时, 初始化司机信息 */
const chooseDriverIds = ref([]);
/** 编辑时, 初始化车辆信息 */
const chooseCarIds = ref([]);
const orderTotalNum = computed(() => {
console.log('dataTmp.value :>> ', dataTmp.value);
console.log('dataInfo.value :>> ', dataInfo.value);
const _arr = [...new Set(dataTmp.value), ...dataInfo.value];
return _arr.reduce((sum, item) => sum + item.totalNumber, 0);
});
const orderStockNum = computed(() => {
const _arr = [...new Set(dataTmp.value), ...dataInfo.value];
return _arr.reduce((sum, item) => sum + item.handQuantity, 0);
});
//
//
//
@ -1237,7 +1266,7 @@ const menuData = ref([
statistics: true, //
},
{
prop: 'handQuantity',
prop: 'handQuantity',
label: '在库件数',
type: 1,
values: '',
@ -1248,6 +1277,17 @@ const menuData = ref([
head: true,
statistics: true, //
},
{
prop: 'warehouseEntryTime',
label: '入库时间',
type: 1,
values: '',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'consigneePerson',
label: '运单收货人',
@ -1380,17 +1420,6 @@ const menuData = ref([
sortable: true,
head: true,
},
{
prop: 'warehouseEntryTime',
label: '入库时间',
type: 1,
values: '',
width: '160',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'storeTime',
label: '在库时间',
@ -1710,17 +1739,19 @@ onMounted(() => {
numTab.value[0].name = '0'; //
numTab.value[1].name = '1';
kind.value = true;
res.data.data.deliverySelfVO.forEach(item => {
res.data.data.deliverySelfVO.forEach((item, index) => {
console.log(item, '司机配置信息');
DriverTemporaryStorage.value.push({
driverId: item.driverId, //ID
driverName: item.driverName, //
driverPhone: item.driverPhone, //
}),
VehicleTemporaryStorage.value.push({
vehicleId: item.vehicleId, //ID
vehicleNub: item.vehicleNub, //
});
});
chooseDriverIds.value.push(item.driverId);
VehicleTemporaryStorage.value.push({
vehicleId: item.vehicleId, //ID
vehicleNub: item.vehicleNub, //
});
chooseCarIds.value.push(item.vehicleId);
//
StockInfo.value.Sj.push(item.driverId);
//
@ -1730,6 +1761,9 @@ onMounted(() => {
DataSubmit.value.masterVehicleNub = item.vehicleNub; //
}
});
console.log('chooseDriverIds :>> ', chooseDriverIds);
console.log('chooseCarIds :>> ', chooseCarIds);
}
wrapDataInfo.value = res.data.data.stockArticleList; //
dataInfo.value = res.data.data.stockArticleList; //
@ -1747,7 +1781,7 @@ onMounted(() => {
DataSubmit.value.stockup.stockupDate = res.data.data.stockupInfo.stockupDate; //
DataSubmit.value.taskTime = res.data.data.taskTime; //
editLoading.value = false; //
tooSUM()
tooSUM();
});
}
});
@ -1883,14 +1917,14 @@ const selectChange = (selection, row) => {
}
}
};
function tooSUM(){
Totalnumberoforders.value=0
Totalnumberofitemsinstock.value=0
dataInfo.value.forEach(item=>{
Totalnumberoforders.value+= item.totalNumber,
Totalnumberofitemsinstock.value+=item.handQuantity
})
};
function tooSUM() {
Totalnumberoforders.value = 0;
Totalnumberofitemsinstock.value = 0;
dataInfo.value.forEach(item => {
(Totalnumberoforders.value += item.totalNumber),
(Totalnumberofitemsinstock.value += item.handQuantity);
});
}
//
const submit = () => {
//
@ -1932,7 +1966,7 @@ const submit = () => {
//
dataInfo.value = removeDuplicates(dataInfo.value);
//
tooSUM()
tooSUM();
//
dataTmp.value = removeDuplicates(dataTmp.value);
AddLalog.value = false; //
@ -1990,59 +2024,12 @@ const SearchFu = () => {
}
return;
if (multifunctional.value) {
document.getElementById(multifunctional.value).scrollIntoView();
}
return;
console.log(soInpuState.value, '当前搜索状态');
if (!multifunctional.value && !dataInfoTemp.value.length) {
soInpuState.value = false; //
ElMessage({
showClose: true,
message: '请输入搜索内容',
type: 'warning',
});
return;
}
if (!multifunctional.value && dataInfoTemp.value.length) {
//
soInpuState.value = false; //
dataInfo.value = JSON.parse(JSON.stringify(dataInfoTemp.value));
dataInfoTemp.value = [];
}
if (soInpuState.value) {
ElMessage({
showClose: true,
message: '请先重置数据',
type: 'warning',
});
return;
} else {
//
console.log('多功能搜索功能');
console.log(dataInfo.value, '当前订单');
dataInfoTemp.value = dataInfo.value; //
let temp = dataInfo.value.filter(item => {
return Object.values(item).some(val => {
if (typeof val === 'string') {
return val.includes(multifunctional.value);
}
return false;
});
});
console.log(temp, '搜索结果');
console.log(dataInfoTemp.value, '临时存储的值');
dataInfo.value = temp; //
soInpuState.value = false; //
}
// console.log(dataInfo.value, '');
};
//
const DeleteEvent = val => {
if (route.query.id) {
//
let data = {
@ -2101,7 +2088,7 @@ const DeleteEvent = val => {
});
}
}
tooSUM()
tooSUM();
};
//
const EditEvent = val => {
@ -2207,7 +2194,7 @@ const PackageFn = () => {
//
const ViewEvent = val => {
wrapData.value=[]
wrapData.value = [];
loading.value = true; //
PackageFrom.value = {}; //
parameter.value = {}; //
@ -2220,66 +2207,6 @@ const ViewEvent = val => {
//
PackageFn();
return;
if (RouteId.value) {
console.log(wrapLoading.value, '当前为编辑状态');
$_getPackageListByDeliveryIdAndOrderId({
waybillNumber: '', //
orderPackageCode: '', //
current: 1,
size: 100,
deliveryId: RouteId.value,
id: val.id,
}).then(res => {
console.log(res, '订单包件信息');
if (res.data.code == 200) {
wrapData.value = res.data.data.data.packageList;
let IdTmp = []; //ID
dataInfo.value[dataId.value].packageListInfo = wrapTemp.value[dataId.value];
//,,,使API
if (dataInfo.value[dataId.value].packageListInfo) {
dataInfo.value[dataId.value].packageListInfo.forEach(item => {
IdTmp.push(item.id);
});
}
toggleSelection({
val: false,
data: IdTmp.length ? IdTmp : res.data.data.data.packageListIds.split(','),
index: kind.value ? 0 : 1,
}); //
}
// AddLalog.value = false; //
console.log(wrapData.value, '包件表格信息');
console.log(res);
});
} else {
//
//
$_getPackageListByStockArticleId({
waybillNumber: '', //
orderPackageCode: '', //
id: val.id,
current: 1,
size: 100,
}).then(res => {
wrapData.value = res.data.data.records;
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, '查看包件事件');
//
console.log(dataId.value, 'dataId.value下标');
console.log(wrapDataInfo.value[dataId.value], '当前订单下面的包件信息');
console.log(wrapDataInfo, '订单');
}
editLoading.value = false; //
};
//
@ -2617,6 +2544,7 @@ const merge = (val, kindS) => {
message: '未选择司机配置!',
type: 'warning',
});
state.value = false; //
return;
}
//
@ -2625,6 +2553,7 @@ const merge = (val, kindS) => {
message: '司机配置未选择完整!',
type: 'warning',
});
state.value = false; //
return;
}
//
@ -2633,6 +2562,7 @@ const merge = (val, kindS) => {
message: '未选择主司机!',
type: 'warning',
});
state.value = false; //
return;
}
//
@ -2641,6 +2571,7 @@ const merge = (val, kindS) => {
message: '未选择主车辆!',
type: 'warning',
});
state.value = false; //
return;
}
if (!DataSubmit.value.taskTime) {
@ -2648,6 +2579,7 @@ const merge = (val, kindS) => {
message: '请填写配送日期',
type: 'warning',
});
state.value = false; //
return;
}
//
@ -2729,26 +2661,65 @@ const SubmitCommercial = () => {
if (!kind.value) {
delete DataSubmit.value.allocationInfo; //
}
console.log('DriverTemporaryStorage :>> ', DriverTemporaryStorage);
console.log('VehicleTemporaryStorage :>> ', VehicleTemporaryStorage);
let DataSubmitRenamed = Object.assign({}, DataSubmit.value); //
//
DataSubmitRenamed.isDeliveryDriverUpdate = 0;
if (
DriverTemporaryStorage.value.length !== chooseDriverIds.value.length ||
VehicleTemporaryStorage.value.length !== chooseCarIds.value.length
)
DataSubmitRenamed.isDeliveryDriverUpdate = 1;
else {
console.log('111 :>> ', 111);
// ,
for (const iterator of DriverTemporaryStorage.value) {
if (chooseDriverIds.value.indexOf(iterator.driverId) === -1) {
DataSubmitRenamed.isDeliveryDriverUpdate = 1;
break;
}
}
// ,
if (DataSubmitRenamed.isDeliveryDriverUpdate === 0) {
for (const iterator of VehicleTemporaryStorage.value) {
if (chooseCarIds.value.indexOf(iterator.vehicleId) === -1) {
DataSubmitRenamed.isDeliveryDriverUpdate = 1;
break;
}
}
}
}
delete DataSubmitRenamed.stockup; //
DataSubmitRenamed.stockupInfo = DataSubmit.value.stockup; //,
DataSubmitRenamed.id = RouteId.value; //ID
updateDeliveryList(DataSubmitRenamed).then(res => {
editLoading.value = false; //
console.log(res, '修改之后提交的返回值');
$store.commit('DEL_TAG_CURRENT'); //
router.push('/distribution/inventory/distrilbutionBillLadingList');
});
updateDeliveryList(DataSubmitRenamed)
.then(res => {
console.log(res, '修改之后提交的返回值');
$store.commit('DEL_TAG_CURRENT'); //
router.push('/distribution/inventory/distrilbutionBillLadingList');
})
.finally(() => {
editLoading.value = false; //
});
} else {
//
deliveryBusinessTask(DataSubmit.value).then(res => {
console.log(res, '新增之后的返回值');
//
editLoading.value = false; //
$store.commit('DEL_TAG_CURRENT'); //
router.push('/distribution/inventory/distrilbutionBillLadingList');
});
deliveryBusinessTask(DataSubmit.value)
.then(res => {
console.log(res, '新增之后的返回值');
//
$store.commit('DEL_TAG_CURRENT'); //
router.push('/distribution/inventory/distrilbutionBillLadingList');
})
.finally(() => {
editLoading.value = false; //
});
}
console.log(DataSubmit.value, '准备提交的信息');
@ -3315,11 +3286,11 @@ const SubmitCommercial = () => {
justify-content: flex-start !important;
}
}
.el_tool{
display: flex;
justify-content: space-between;
align-items: center;
min-width: 300px;
font-size: 14px;
.el_tool {
display: flex;
justify-content: space-between;
align-items: center;
min-width: 300px;
font-size: 14px;
}
</style>

8
vite.config.js

@ -14,7 +14,7 @@ export default ({ mode, command }) => {
'/api': {
// target: 'http://192.168.10.126:8889',
// hy
target: 'http://192.168.10.48:13000',
// target: 'http://192.168.10.48:13000',
// lmy
// target: 'http://192.168.10.123:8889',
// target: 'http://192.168.10.101:8888',
@ -23,10 +23,10 @@ export default ({ mode, command }) => {
// 新zyc
// target: 'http://192.168.6.116:8777',
// target: 'http://192.168.6.122:8777',
// target: 'http://192.168.10.25:13000',
target: 'http://192.168.10.25:13000',
// target: 'http://192.168.10.25:2888',
// target: 'http://192.168.6.162:9777',//CYZ
// target: 'http://192.168.10.57:13000',
// target: 'http://192.168.6.162:9777',//CYZ
// target: 'http://192.168.10.57:13000',
// target: 'http://192.168.10.200:13000',
// target: 'http://192.168.10.29:13000',
// target: 'http://h5uapi.huitongys.com',

Loading…
Cancel
Save