Browse Source

仓库新增司机选项

fix_bug_pro20231227
13208366016 1 year ago
parent
commit
20f2befc4e
  1. 4
      src/axios.js
  2. 47
      src/views/basicdata/driverArtery/basicdataDriverArtery.vue
  3. 522
      src/views/distribution/signfor/distributionSignforedt.vue
  4. 0
      src/views/distribution/signfor/distributionSignforedtTD.vue
  5. 1
      src/views/distribution/signfor/distributionSignfortreat.vue

4
src/axios.js

@ -83,6 +83,10 @@ axios.interceptors.response.use(
//如果是401则跳转到登录页面
if (status === 401) store.dispatch('FedLogOut').then(() => router.push({ path: '/login' }));
// 如果请求为非200否者默认统一处理
// TOKEN过期
if (status === 401) {
console.log('当前无权限');
}
if (status !== 200) {
ElMessage({
message: message,

47
src/views/basicdata/driverArtery/basicdataDriverArtery.vue

@ -51,6 +51,7 @@ import {
} from '@/api/basicdata/basicdataDriverArtery';
import { getList as getUserList, getUser } from '@/api/system/user';
import { getVehicle } from '@/api/basicdata/basicdataVehicle';
import { getMyWarehouseList } from '@/api/work/work.js';
import option from '@/option/basicdata/basicdataDriverArtery';
import { mapGetters } from 'vuex';
import { exportBlob } from '@/api/common';
@ -274,7 +275,7 @@ export default {
align: 'center',
span: 11,
multiple: true,
// dicData: [],
// dicData: [],
dicUrl: '/api/logpm-basicdata/vehicle/dictionary',
props: {
label: 'vehicleNub',
@ -285,6 +286,7 @@ export default {
// viewDisplay: false,
// hide: true,
},
{
label: '合同开始时间',
prop: 'contractStartTime',
@ -330,6 +332,21 @@ export default {
value: 'dictKey',
},
},
{
label: '仓库',
prop: 'warehouseId',
type: 'select',
labelWidth: '150',
width: '100px',
align: 'center',
multiple: true,
span: 11,
dicUrl: '/logpm-basicdata/warehouse/getMyWarehouseList',
props: {
label: 'name',
value: 'id',
},
},
{
label: '居住地址',
prop: 'residentialAddress',
@ -617,12 +634,12 @@ export default {
methods: {
rowSave(row, done, loading) {
console.log(row, 'row信息');
if (Array.isArray(row.bindVehicles)) {
row.bindVehicles = row.bindVehicles.join(",");
row.bindVehicles = row.bindVehicles.join(',');
console.log(row.bindVehicles);
}
row.warehouseId = row.warehouseId.join(',');//
console.log(row.warehouseId);
add(row).then(
() => {
this.onLoad(this.page);
@ -639,9 +656,8 @@ export default {
);
},
rowUpdate(row, index, done, loading) {
if (Array.isArray(row.bindVehicles)) {
row.bindVehicles = row.bindVehicles.join(",");
row.bindVehicles = row.bindVehicles.join(',');
console.log(row.bindVehicles);
}
update(row).then(
@ -774,9 +790,11 @@ export default {
this.loading = false;
// console.log("this.option.column>>>>>>>",this.option.column);
this.option.column[15].dicData = [];
this.option.column[20].dicData = [];
this.option.column[9].dicData = [];
//
this.getVehiclede();
// this.getWarehouseList();
//
//this.getpeople();
// getVehicle().then(res => {
@ -801,7 +819,7 @@ export default {
//
getVehiclede() {
getVehicle().then(res => {
console.log('res.data.data>>>>>>>', res.data.data);
console.log('车辆信息', res.data.data);
res.data.data.map(v => {
let value = {
label: v.vehicleNub,
@ -811,6 +829,21 @@ export default {
});
});
},
// getWarehouseList() {
// getMyWarehouseList().then(res => {
// console.log('', res.data.data);
// res.data.data.map(v => {
// let value = {
// label: v.name,
// value: v.id,
// };
// this.option.column[16].dicData.push(value);
// console.log(this.option.column[16].dicData,'1123123');
// });
// });
// },
//
// getpeople() {
// getUserList(1, 100000, null, '').then(res => {

522
src/views/distribution/signfor/distributionSignforedt.vue

@ -276,38 +276,40 @@
</div>
</div>
<!-- 签收信息 -->
<el-divider content-position="left">商品信息</el-divider>
<el-tabs
v-loading="editLoading"
element-loading-text="数据正在更新中..."
type="border-card"
@tab-click="tabClick"
>
<template v-for="item in Tabs" :key="item.name">
<el-tab-pane :label="item.label" :name="item.name">
<div class="el-Cart">
<!-- 表格列开始 -->
<el-table
:data="data"
row-key="name"
border
height="500"
style="width: 100%"
ref="tableRef"
@select-all="selectAll"
@select="selectChange"
>
<el-table-column type="selection" width="55" fixed />
<el-table-column
type="index"
fixed
width="50"
height="100"
label="#"
align="center"
/>
<!--
<el-collapse v-model="activeNames" style="margin-top: 10px">
<el-collapse-item title="商品信息" name="1">
<el-tabs
v-loading="editLoading"
element-loading-text="数据正在更新中..."
type="border-card"
@tab-click="tabClick"
>
<template v-for="item in Tabs" :key="item.name">
<el-tab-pane :label="item.label" :name="item.name">
<div class="el-Cart">
<!-- 表格列开始 -->
<el-table
:data="data"
row-key="name"
border
height="500"
style="width: 100%"
ref="tableRef"
@select-all="selectAll"
@select="selectChange"
>
<el-table-column type="selection" width="55" fixed />
<el-table-column
type="index"
fixed
width="50"
height="100"
label="#"
align="center"
/>
<!--
Type ===1 普通文本
Type ===2 图片显示
Type ===3 操作功能
@ -315,18 +317,18 @@
width: 宽度
prop: 数据字段
-->
<el-table-column
:prop="item.prop"
:label="item.label"
:width="item.width"
:fixed="item.fixed"
align="center"
v-for="(item, index) in menuData"
:key="item.label"
>
<template #default="props">
<img :src="props.row[item.prop]" class="el-Img" v-if="item.type === 2" />
<!-- <div :class="ElBtnClass" v-if="item.type === 3">
<el-table-column
:prop="item.prop"
:label="item.label"
:width="item.width"
:fixed="item.fixed"
align="center"
v-for="(item, index) in menuData"
:key="item.label"
>
<template #default="props">
<img :src="props.row[item.prop]" class="el-Img" v-if="item.type === 2" />
<!-- <div :class="ElBtnClass" v-if="item.type === 3">
<el-button
:link="ElButtonS[0].link"
:class="ElButtonS[0].class"
@ -355,26 +357,26 @@
>查看</el-button
>
</div> -->
<span v-else>{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span>
</template>
</el-table-column>
<span v-else>{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span>
</template>
</el-table-column>
<template>
<el-table-column
v-if="item.head"
fixed="right"
label="操作"
width="280"
align="center "
>
<!-- <template #default="scope">
<template>
<el-table-column
v-if="item.head"
fixed="right"
label="操作"
width="280"
align="center "
>
<!-- <template #default="scope">
</template> -->
</el-table-column>
</template>
</el-table>
<!-- 表格翻页功能 -->
<!-- <div class="demo-pagination-block">
</el-table-column>
</template>
</el-table>
<!-- 表格翻页功能 -->
<!-- <div class="demo-pagination-block">
<el-pagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
@ -387,51 +389,60 @@
@current-change="SizeChange"
/>
</div> -->
</div>
</el-tab-pane>
</template>
</el-tabs>
<!-- 增值服务信息 -->
<el-divider content-position="left">增值服务信息</el-divider>
<el-tabs
v-loading="editLoading"
element-loading-text="数据正在更新中..."
type="border-card"
@tab-click="tabClickB"
>
<template v-for="(item, indexS) in TabB" :key="item.name">
<el-tab-pane :label="item.label" :name="item.name">
<template v-for="(itemT, index) in TabTitle" :key="index">
<div v-if="index == TabIndex" class="tab-title">
<span v-for="item in itemT" :key="item.name">
<el-icon><component :is="item.icon" /></el-icon> {{ item.name }} {{ item.value }}
{{ item.tap }}
</span>
</div>
</div>
</el-tab-pane>
</template>
<div class="el-Cart">
<!-- 表格列开始 -->
<el-table
:data="dataAdded"
row-key="name"
border
height="500"
style="width: 100%"
ref="tableRef"
@select-all="selectAll"
@select="selectChange"
>
<el-table-column type="selection" width="55" fixed />
<el-table-column
type="index"
fixed
width="50"
height="100"
label="#"
align="center"
/>
</el-tabs>
</el-collapse-item>
</el-collapse>
<!-- 增值服务信息 -->
<el-collapse @change="ServiceChange" style="margin-top: 10px">
<el-collapse-item title="增值服务信息" name="2">
<el-tabs
v-loading="editLoading"
element-loading-text="数据正在更新中..."
type="border-card"
@tab-click="tabClickB"
>
<template v-for="item in TabB" :key="item.name">
<el-tab-pane :label="item.label" :name="item.name">
<div class="tab-title">
<div class="BatchDelete">
<el-button type="primary" @click="newlyAdded(item.name)"> 新增 </el-button>
<el-button type="primary" @click="BatchDelete(item.name)"> 批量删除 </el-button>
</div>
<!--
<template v-for="(item, index) in TabTitle" :key="index">
<span>
<el-icon><component :is="item.icon" /></el-icon> {{ item.name }}
{{ item.value }}
{{ item.tap }}
</span>
</template>
</div>
<div class="el-Cart">
<!-- 表格列开始 -->
<el-table
:data="dataAdded"
row-key="name"
border
height="500"
style="width: 100%"
ref="tableRef"
@select-all="selectAll"
@select="selectChange"
>
<el-table-column type="selection" width="55" fixed />
<el-table-column
type="index"
fixed
width="50"
height="100"
label="#"
align="center"
/>
<!--
Type ===1 普通文本
Type ===2 图片显示
Type ===3 操作功能
@ -439,19 +450,19 @@
width: 宽度
prop: 数据字段
-->
<el-table-column
:prop="item.prop"
:label="item.label"
:width="item.width"
:fixed="item.fixed"
align="center"
v-for="(item, index) in menuDataB"
:key="item.label"
>
<template #default="props">
<img :src="props.row[item.prop]" class="el-Img" v-if="item.type === 2" />
<!-- <div :class="ElBtnClass" v-if="item.type === 3">
<el-button
<el-table-column
:prop="item.prop"
:label="item.label"
:width="item.width"
:fixed="item.fixed"
align="center"
v-for="(item, index) in menuDataB"
:key="item.label"
>
<template #default="props">
<img :src="props.row[item.prop]" class="el-Img" v-if="item.type === 2" />
<div :class="ElBtnClass" v-if="item.type === 3">
<!-- <el-button
:link="ElButtonS[0].link"
:class="ElButtonS[0].class"
:auto-insert-space="ElButtonS[0].space"
@ -459,46 +470,24 @@
:icon="ElButtonS[0].icon"
@click="DeleteEvent(scope.row)"
>删除</el-button
>
<el-button
:link="ElButtonS[1].link"
:class="ElButtonS[1].class"
:auto-insert-space="ElButtonS[1].space"
:size="ElButtonS[1].size"
:icon="ElButtonS[1].icon"
@click="EditEvent(scope.row)"
>编辑</el-button
>
<el-button
:link="ElButtonS[2].link"
:class="ElButtonS[2].class"
:auto-insert-space="ElButtonS[2].space"
:size="ElButtonS[2].size"
:icon="ElButtonS[2].icon"
@click="ViewEvent(scope.row)"
>查看</el-button
>
</div> -->
<span v-else>{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span>
</template>
</el-table-column>
> -->
</div>
<span v-if="item.type == 6">{{
props.row[item.prop] == 1
? '定制品'
: props.row[item.prop] == 2
? '库存品'
: props.row[item.prop] == 3
? '零担'
: '/'
}}</span>
<span v-else>{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span>
</template>
</el-table-column>
</el-table>
<template>
<el-table-column
v-if="item.head"
fixed="right"
label="操作"
width="280"
align="center "
>
<!-- <template #default="scope">
</template> -->
</el-table-column>
</template>
</el-table>
<!-- 表格翻页功能 -->
<!-- <div class="demo-pagination-block">
<!-- 表格翻页功能 -->
<!-- <div class="demo-pagination-block">
<el-pagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
@ -511,10 +500,79 @@
@current-change="SizeChange"
/>
</div> -->
</div>
</el-tab-pane>
</div>
</el-tab-pane>
</template>
</el-tabs>
</el-collapse-item>
</el-collapse>
<!-- 弹窗信息 -->
<el-dialog v-model="dialogBatchDelete" title="标题" width="60%" :before-close="handleClose">
<!-- 表格列开始 -->
<el-table
:data="dataAdded"
row-key="name"
border
height="500"
style="width: 100%"
ref="tableRef"
@select-all="selectAll"
@select="selectChange"
>
<el-table-column type="selection" width="55" fixed />
<el-table-column type="index" fixed width="50" height="100" label="#" align="center" />
<!--
Type ===1 普通文本
Type ===2 图片显示
Type ===3 操作功能
label: 标题
width: 宽度
prop: 数据字段
-->
<el-table-column
:prop="item.prop"
:label="item.label"
:width="item.width"
:fixed="item.fixed"
align="center"
v-for="(item, index) in menuDataB"
:key="item.label"
>
<template #default="props">
<img :src="props.row[item.prop]" class="el-Img" v-if="item.type === 2" />
<div :class="ElBtnClass" v-if="item.type === 3">
<!-- <el-button
:link="ElButtonS[0].link"
:class="ElButtonS[0].class"
:auto-insert-space="ElButtonS[0].space"
:size="ElButtonS[0].size"
:icon="ElButtonS[0].icon"
@click="DeleteEvent(scope.row)"
>删除</el-button
> -->
</div>
<span v-if="item.type == 6">{{
props.row[item.prop] == 1
? '定制品'
: props.row[item.prop] == 2
? '库存品'
: props.row[item.prop] == 3
? '零担'
: '/'
}}</span>
<span v-else>{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogBatchDelete = false">取消</el-button>
<el-button type="primary" @click="dialogVisible = false"> 提交 </el-button>
</span>
</template>
</el-tabs>
</el-dialog>
</el-card>
</template>
@ -530,6 +588,7 @@ import {
import { getToken } from '@/utils/auth';
const form = ref({}); //
const RouterId = ref('1721707916601487362'); //ID
const RouterReservationId = ref('1721707896171032578'); //
const DoorstepPhoto = ref([]); //
const StackingPhoto = ref([]); //
const FragilePhotos = ref([]); //
@ -556,11 +615,14 @@ const dialogVisibleB = ref(false);
const dialogVisibleC = ref(false);
const dialogVisibleD = ref(false);
const dialogVisibleE = ref(false);
const activeNames = ref(['1']);
const active = ref(1); //
const route = useRoute();
const router = useRouter(); //ID
const dataAdded = ref([]); //
const TcDataAdded = ref([]); //
const TabIndex = ref(0); //
const dialogBatchDelete = ref(false);
const enlargeImage = (dialogImageUrl, dialogVisible) => {
return uploadFile => {
console.log(uploadFile, '点击放大的内容');
@ -617,45 +679,10 @@ const TabB = ref([
},
]);
const TabTitle = ref([
//
[
{ name: '操作人:', value: '汤建军', tap: null, icon: 'Avatar' },
{ name: '楼层:', value: 5, tap: '层', icon: 'School' },
{ name: '件数:', value: 13, tap: '件', icon: 'Box' },
{ name: '费用:', value: 999.9, tap: '¥', icon: 'Coin' },
//
],
[
{ name: '操作人:', value: '曹遇宗', tap: null, icon: 'Avatar' },
{ name: '公里数:', value: 15, tap: '公里', icon: 'Van' },
{ name: '件数:', value: 13, tap: '件', icon: 'Box' },
{ name: '费用:', value: 888.9, tap: '¥', icon: 'Coin' },
],
//
[
{ name: '公里数:', value: 15, tap: '公里', icon: 'Van' },
{ name: '件数:', value: 13, tap: '件', icon: 'Box' },
{ name: '费用:', value: 888.9, tap: '¥', icon: 'Coin' },
],
//
[
{ name: '操作人:', value: '漆标', tap: null, icon: 'Avatar' },
{ name: '件数:', value: 15, tap: '', icon: 'Box' },
{ name: '费用:', value: 13, tap: '¥', icon: 'Coin' },
{ name: '班组:', value: 888.9, tap: null, icon: 'ScaleToOriginal' },
],
//
[
{ name: '操作人:', value: '小马', tap: null, icon: 'Avatar' },
{ name: '件数:', value: 15, tap: '公里', icon: 'Box' },
{ name: '费用:', value: 13, tap: '¥', icon: 'Coin' },
],
//
[
{ name: '操作人:', value: '小东', tap: null, icon: 'Avatar' },
{ name: '件数:', value: 15, tap: '公里', icon: 'Box' },
{ name: '费用:', value: 13, tap: '¥', icon: 'Coin' },
],
{ name: '公里数:', value: '暂无数据', tap: '公里', icon: 'Van', btn: '新增' },
{ name: '费用:', value: '暂无数据', tap: '¥', icon: 'Coin', btn: '新增' },
{ name: '楼层:', value: '暂无数据', tap: '层', icon: 'School', btn: '新增' },
{ name: '件数:', value: '暂无数据', tap: '件', icon: 'Box', btn: '新增' },
]);
//
const menuData1 = ref([
@ -1275,7 +1302,6 @@ const ElButtonS = ref([
// 3.size ('large'| 'default'| 'small')
// 4.icon
// 5.table
{
class: 'el-btn-view',
space: true,
@ -1324,10 +1350,43 @@ const menuDataB1 = ref([
sortable: true,
head: true,
},
{
prop: 'firsts',
label: '一级品',
type: 4,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'second',
label: '二级品',
type: 4,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'thirdProduct',
label: '二级品',
type: 4,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'orderPackageCode',
label: '包条码',
type: 4,
type: 5,
values: '',
width: '200',
checkarr: [],
@ -1349,7 +1408,7 @@ const menuDataB1 = ref([
{
prop: 'conditions',
label: '包条类型',
type: 4,
type: 6,
values: '',
width: '200',
checkarr: [],
@ -1374,6 +1433,15 @@ const headers = computed(() => {
const doubledCount = computed(() => {
return '/api/blade-resource/oss/endpoint/put-file';
});
//
const newlyAdded = val => {
dialogBatchDelete.value = true;
console.log(val, '触发了新增按钮');
};
//
const BatchDelete = val => {
console.log(val);
};
//
editLoading.value = true; //
getDetail(RouterId.value).then(res => {
@ -1412,7 +1480,9 @@ getDetail(RouterId.value).then(res => {
});
}
});
const handleRemove = () => {
console.log('图片移除事件');
};
//
function PackageList() {
editLoading.value = true; //
@ -1454,22 +1524,62 @@ const tabClick = val => {
break;
}
};
//
const goUpstairs = () => {
//
const valueAddedServices = val => {
addvalueInfoList({
addvalueId: 1,
addvalueId: val,
signforId: RouterId.value,
reservationId: RouterReservationId.value,
}).then(res => {
dataAdded.value = res.data.data.packageEntityList;
editLoading.value = false; //
console.log(res, '增值服务上楼的返回值');
if (!res.data.data) {
dataAdded.value = [];
TabTitle.value[0].value = '暂无数据'; //
TabTitle.value[1].value = '暂无数据'; //
TabTitle.value[2].value = '暂无数据'; //
TabTitle.value[3].value = '暂无数据'; //
} else {
dataAdded.value = res.data.data.packageEntityList;
TabTitle.value[0].value = res.data.data.distance ? res.data.data.distance : '暂无数据'; //
TabTitle.value[1].value = res.data.data.fee ? res.data.data.fee : '暂无数据'; //
TabTitle.value[2].value = res.data.data.floolNum ? res.data.data.floolNum : '暂无数据'; //
TabTitle.value[3].value = res.data.data.num ? res.data.data.num : '暂无数据'; //
}
});
};
const ServiceChange = val => {
console.log(val, '增值服务点击');
};
// tab
const tabClickB = val => {
console.log(val, 'val当前信息');
editLoading.value = true; //
TabIndex.value = val.props.name;
if (val.props.name == 0) {
menuDataB.value = menuDataB1.value;
goUpstairs();
valueAddedServices(1);
}
if (val.props.name == 1) {
menuDataB.value = menuDataB1.value;
valueAddedServices(2);
}
if (val.props.name == 2) {
menuDataB.value = menuDataB1.value;
valueAddedServices(3);
}
if (val.props.name == 3) {
menuDataB.value = menuDataB1.value;
valueAddedServices(4);
}
if (val.props.name == 4) {
menuDataB.value = menuDataB1.value;
valueAddedServices(5);
}
if (val.props.name == 5) {
menuDataB.value = menuDataB1.value;
valueAddedServices(6);
}
};
//

0
src/views/distribution/signfor/distributionSignforedtDT.vue → src/views/distribution/signfor/distributionSignforedtTD.vue

1
src/views/distribution/signfor/distributionSignfortreat.vue

@ -1716,6 +1716,7 @@ export default {
path: '/distribution/signfor/distributionSignforedt',
query: {
id: row.id,
reservationId:row.reservationId,
name: '待签收查看',
},
});

Loading…
Cancel
Save