Browse Source

修复按钮权限问题, 新增干线部分功能

dev-xx
qb 1 year ago
parent
commit
fb3aa7c435
  1. 100
      src/api/distribution/directGoMarket.js
  2. 33
      src/api/distribution/truckLoadingDetails.js
  3. 3
      src/components/tablecmt/tablecmt.vue
  4. 2
      src/option/distribution/TripartiteTransfer.js
  5. 306
      src/option/distribution/directGoMarketDetails.js
  6. 20
      src/router/views/index.js
  7. 80
      src/views/authority/role.vue
  8. 100
      src/views/distribution/artery/VehicleStowage.vue
  9. 6
      src/views/distribution/artery/addTripartiteTransfer.vue
  10. 672
      src/views/distribution/artery/directGoMarket.vue
  11. 1023
      src/views/distribution/artery/directGoMarketDetails.vue
  12. 433
      src/views/distribution/artery/truckLoadingDetails.vue
  13. 97
      src/views/waybill/TemporaryStorageList.vue

100
src/api/distribution/directGoMarket.js

@ -0,0 +1,100 @@
import request from '@/axios';
/**
* 查询当前节点添加的订单不包含直发商家列表
*/
export const psotFindWaybillOrderListNoIsToMall = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/findWaybillOrderListNoIsToMall',
method: 'post',
data,
});
};
/**
* 查询当前节点添加的订单包含直发商家列表
*/
export const postFindWaybillOrderListToMall = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/findWaybillOrderListToMall',
method: 'post',
data,
});
};
/**
* 修改运单订单的直发商家
*/
export const getUpdateWaybillOrderIsCustemer = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/updateWaybillOrderIsCustemer',
method: 'post',
data,
});
};
/**
* 查询签收单列表
*/
export const postFindSignOrderList = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/findSignOrderList',
method: 'post',
data,
});
};
/**
* 查询签收单详情列表
*/
export const postFindSignOrderDetailList = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/findSignOrderDetailList',
method: 'post',
data,
});
};
/**
* 批量签收
*/
export const postBatchSign = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/batchSign',
method: 'post',
data,
});
};
/**
* 更新签收单归属仓库
*/
export const postUpdateBelongToWarehouseBySignOrderId = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/updateBelongToWarehouseBySignOrderId',
method: 'post',
data,
});
};
/**
* 零担签收
*/
export const postSignPackage = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/signPackage',
method: 'post',
data,
});
};
/**
* 包件签收
*/
export const postSignZero = data => {
return request({
url: '/api/logpm-trunkline/carsLoad/signZero',
method: 'post',
data,
});
};

33
src/api/distribution/truckLoadingDetails.js

@ -21,3 +21,36 @@ export const postBatchUnload = (data = {}) => {
data,
});
};
/**
* 三方中转包件卸车
*/
export const postTransferUnloadPackage = (data = {}) => {
return request({
url: '/api/logpm-trunkline/api/tripartiteTransfer/transferUnloadPackage',
method: 'post',
data,
});
};
/**
* 三方中转零担卸车
*/
export const postTransferUnloadZero = (data = {}) => {
return request({
url: '/api/logpm-trunkline/api/tripartiteTransfer/transferUnloadZero',
method: 'post',
data,
});
};
/**
* 三方中转批量卸车
*/
export const postBatchTransferUnload = (data = {}) => {
return request({
url: '/api/logpm-trunkline/api/tripartiteTransfer/batchTransferUnload',
method: 'post',
data,
});
};

3
src/components/tablecmt/tablecmt.vue

@ -53,7 +53,6 @@
clearable
:placeholder="`请选择${column.label}`"
@change="selectchange($event, column)"
@clear="selectclear($event, column)"
>
<el-option
v-for="item in column.checkarr"
@ -70,7 +69,6 @@
style="width: auto"
:placeholder="`请选择${column.label}`"
@change="timechange($event, column)"
@clear="timeclear($event, column)"
/>
<el-date-picker
v-model="column.values"
@ -81,7 +79,6 @@
:placeholder="`请选择${column.label}`"
format="YYYY/MM/DD HH:mm:ss"
@change="timechange($event, column)"
@clear="timeclear($event, column)"
/>
</template>

2
src/option/distribution/TripartiteTransfer.js

@ -545,7 +545,7 @@ export const detailsColumnList = [
values: '',
width: '200',
checkarr: [],
fixed: true,
fixed: 'right',
sortable: true,
},
];

306
src/option/distribution/directGoMarketDetails.js

@ -0,0 +1,306 @@
/** 签收列表 */
export const columnList = [
{
prop: '',
label: '复选框',
type: 0,
width: 55,
fixed: true,
},
{
prop: '',
label: '序号',
type: 12,
values: '',
width: 55,
fixed: true,
},
{
prop: 'carsNo',
label: '车次号',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'loadSignCode',
label: '签收号',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'belongToWarehouseName',
label: '归属仓库',
type: 2,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'mallName',
label: '商场名称',
type: 2,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'mallPerson',
label: '商场联系人',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'mallMobile',
label: '商场电话',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'mallAddress',
label: '商场地址',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'planNum',
label: '计划数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'loadingNum',
label: '装车数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'signNum',
label: '签收数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'signStatusName',
label: '签收状态',
type: 3,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'createUserName',
label: '操作',
type: 6,
values: '',
width: '200',
checkarr: [],
fixed: 'right',
sortable: false,
},
];
/** 装车详情列表 */
export const detailsColumnList = [
{
prop: '',
label: '复选框',
type: 0,
width: 55,
fixed: true,
},
{
prop: '',
label: '序号',
type: 12,
values: '',
width: 55,
fixed: true,
},
{
prop: 'carsNo',
label: '车次号',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'orderCode',
label: '订单号',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'waybillNo',
label: '运单号',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'scanCode',
label: '包条码/产品名称',
type: 1,
values: '',
width: '200',
checkarr: [],
fixed: true,
sortable: true,
},
{
prop: 'warehouseName',
label: '仓库',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'mallName',
label: '商场名称',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'mallPerson',
label: '商场联系人',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'mallMobile',
label: '商场电话',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'scanStatusName',
label: '装卸状态',
type: 3,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'typeName',
label: '类型',
type: 3,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'num',
label: '数量',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'unLoadNum',
label: '卸车数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'remark',
label: '备注',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: '',
label: '操作',
type: 6,
values: '',
width: '200',
checkarr: [],
fixed: 'right',
sortable: true,
},
];

20
src/router/views/index.js

@ -245,6 +245,26 @@ export default [
/* webpackChunkName: "views" */ '@/views/distribution/artery/VehicleStowageDetails.vue'
),
},
{
path: 'directGoMarket',
name: '配置直发商家',
meta: {
i18n: 'data',
},
component: () =>
import(/* webpackChunkName: "views" */ '@/views/distribution/artery/directGoMarket.vue'),
},
{
path: 'directGoMarketDetails',
name: '签收详情',
meta: {
i18n: 'data',
},
component: () =>
import(
/* webpackChunkName: "views" */ '@/views/distribution/artery/directGoMarketDetails.vue'
),
},
{
path: 'handleLoadingDestination',
name: '配置装车目的地',

80
src/views/authority/role.vue

@ -265,10 +265,34 @@ export default {
});
},
submit() {
const menuList = this.$refs.treeMenu.getCheckedKeys();
const appMenuList = this.$refs.treeAppMenu.getCheckedKeys();
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
const menuList = [
...new Set([
...this.$refs.treeMenu.getCheckedKeys(),
...this.$refs.treeMenu.getHalfCheckedKeys(),
]),
];
const appMenuList = [
...new Set([
...this.$refs.treeAppMenu.getCheckedKeys(),
...this.$refs.treeAppMenu.getHalfCheckedKeys(),
]),
];
const dataScopeList = [
...new Set([
...this.$refs.treeDataScope.getCheckedKeys(),
...this.$refs.treeDataScope.getHalfCheckedKeys(),
]),
];
const apiScopeList = [
...new Set([
...this.$refs.treeApiScope.getCheckedKeys(),
...this.$refs.treeApiScope.getHalfCheckedKeys(),
]),
];
grant(this.idsArray, menuList, dataScopeList, apiScopeList, appMenuList).then(() => {
this.box = false;
this.$message({
@ -351,6 +375,20 @@ export default {
}
done();
},
// Id
handleRemove(child, checkIdArr) {
for (const iterator of child) {
if (
iterator.children &&
Object.prototype.toString.call(iterator.children) === '[object Array]'
) {
const _index = checkIdArr.indexOf(iterator.id);
if (_index !== -1) checkIdArr.splice(_index, 1);
this.handleRemove(iterator.children, checkIdArr);
}
}
},
handleRole() {
if (this.selectionList.length !== 1) {
this.$message.warning('只能选择一条数据');
@ -367,9 +405,17 @@ export default {
this.apiScopeGrantList = res.data.data.apiScope;
getRole(this.ids).then(res => {
this.menuTreeObj = res.data.data.menu;
this.handleRemove(this.menuGrantList, this.menuTreeObj);
this.appMenuTreeObj = res.data.data.appMenu;
this.handleRemove(this.appMenuGrantList, this.appMenuTreeObj);
this.dataScopeTreeObj = res.data.data.dataScope;
this.handleRemove(this.dataScopeGrantList, this.dataScopeTreeObj);
this.apiScopeTreeObj = res.data.data.apiScope;
this.handleRemove(this.apiScopeGrantList, this.apiScopeTreeObj);
this.box = true;
});
});
@ -417,21 +463,21 @@ export default {
};
</script>
<style scoped lang='scss'>
:deep(.no-print){
margin-left:auto;
.el-button{
margin-right:0
<style scoped lang="scss">
:deep(.no-print) {
margin-left: auto;
.el-button {
margin-right: 0;
}
}
:deep(.avue-form__row){
margin-left:10px;
max-width:300px!important;
:deep(.avue-form__row) {
margin-left: 10px;
max-width: 300px !important;
}
:deep(.avue-form__row){
margin-left:0;
:deep(.avue-form__row) {
margin-left: 0;
}
:deep(.el-form-item__label){
width:auto !important;
:deep(.el-form-item__label) {
width: auto !important;
}
</style>
</style>

100
src/views/distribution/artery/VehicleStowage.vue

@ -161,27 +161,46 @@
</template>
<template v-if="slotProps.scope.column.label === '操作'">
<el-button type="text" @click="handleShowzeroAdditionalRecording(slotProps.scope)">
零担补录
</el-button>
<el-button type="text" @click="handleShowTruckLoadingDetails(slotProps.scope)"
>装车明细</el-button
>
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleEditStowage(slotProps.scope)"
>编辑</el-button
>
<!-- <el-button type="text">数据同步</el-button> -->
<!-- <el-button type="text">批量装车</el-button>
<el-button type="text">手动装车</el-button> -->
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleNodeCost(slotProps.scope)"
>节点费用</el-button
>
<div class="handleControl">
<el-button type="text" @click="handleShowzeroAdditionalRecording(slotProps.scope)">
零担补录
</el-button>
<el-button type="text" @click="handleShowTruckLoadingDetails(slotProps.scope)">
装车明细
</el-button>
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleEditStowage(slotProps.scope)"
>
编辑
</el-button>
<!-- <el-button type="text">数据同步</el-button> -->
<!-- <el-button type="text">批量装车</el-button>
<el-button type="text">手动装车</el-button> -->
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleNodeCost(slotProps.scope)"
>
节点费用
</el-button>
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleDirectGoMarketVesited(slotProps.scope)"
>
配置直发商家
</el-button>
<el-button
type="text"
:disabled="Mydata.id !== slotProps.scope.row.nowWarehouseId"
@click="handleDirectGoMarketDetails(slotProps.scope)"
>
签收详情
</el-button>
</div>
</template>
</template>
</tablecmt>
@ -355,11 +374,12 @@ import {
postRemoveCarsLoadScan,
} from '@/api/distribution/VehicleStowage';
import { useStore } from 'vuex';
import { useRouter } from 'vue-router';
import { useRouter, useRoute } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
//
const $router = useRouter();
const $route = useRoute();
const $store = useStore();
@ -831,6 +851,30 @@ const handleNodeCost = ({ row }) => {
});
};
/** 配置直发商家弹窗显示 */
const handleDirectGoMarketVesited = ({ row }) => {
$router.push({
path: '/distribution/artery/directGoMarket',
query: {
loadId: row.id,
name: row.carsNo + '--' + '配置直发商家',
backPath: $route.fullPath,
},
});
};
/** 直发商家签收详情 */
const handleDirectGoMarketDetails = ({ row }) => {
$router.push({
path: '/distribution/artery/directGoMarketDetails',
query: {
loadId: row.id,
name: row.carsNo + '--' + '签收详情',
backPath: $route.fullPath,
},
});
};
/** 前往配载详情 */
const handleGoWaybill = ({ row }) => {
console.log('row :>> ', row);
@ -905,7 +949,7 @@ const handleStartCar = async () => {
};
/** 开启弹窗 */
const handleOpenConfiguration = (type: 'one' | 'batch', data) => {
const handleOpenConfiguration = (type: 'one' | 'batch', data = {} as any) => {
if (type === 'batch' && details.packageSelectedData.length === 0)
return ElMessage.warning('最少选择一条数据');
details.modifyData = type === 'one' ? [data.row] : details.packageSelectedData;
@ -1148,4 +1192,14 @@ const handleCancelCarsLoad = () => {
.w100 {
width: 100%;
}
.handleControl {
:deep(.el-button) {
font-size: 0.8rem;
}
:deep(.el-button + .el-button) {
margin-left: 5px;
}
}
</style>

6
src/views/distribution/artery/addTripartiteTransfer.vue

@ -935,7 +935,7 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
try {
const submitData = {
...form.value,
carsLoadLineList: [
addCarsLoadLineList: [
{
nodeType: '1',
nodeName: details.pageInfo.startWarehouseInfo.warehouseName,
@ -945,15 +945,17 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
linkMobile: details.pageInfo.startWarehouseInfo.linkMobile,
sort: '1',
lineCarsOrderList: JSON.parse(JSON.stringify(details.newData)).map(value => {
addList: JSON.parse(JSON.stringify(details.newData)).map(value => {
value.nodeId = details.pageInfo.startWarehouseInfo.warehouseId;
value.nodeName = details.pageInfo.startWarehouseInfo.warehouseName;
value.finalNodeId = details.pageInfo.startWarehouseInfo.warehouseId;
value.totalNum = 20;
return value;
}),
removeList: [],
},
],
removeCarsLoadLineList: [],
};
submitData.customerType = submitData.customerType.join(',');

672
src/views/distribution/artery/directGoMarket.vue

@ -0,0 +1,672 @@
<template>
<basic-container v-loading="details.loadingObj.pageLoading">
<div class="avue-crud">
<div class="add_row">
<!-- 列表模块 -->
<div style="width: 49%">
<el-divider content-position="left">未转为直发商家的订单</el-divider>
<div v-if="!search">
<el-form :inline="true" label-width="80px" :model="details.oldQuery" class="el-fr-d">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="onLoad"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
<div style="margin-bottom: 10px" class="flex-c-sb">
<!-- 控件 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="onLoad" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true, 1)" circle></el-button>
<el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div>
<el-button type="text" style="cursor: pointer" @click="handleOrderStatus(1)">
加入
<el-icon><CaretRight /></el-icon>
</el-button>
</div>
<tablecmt
:columnList="details.oldColumnList"
:tableData="details.oldData"
:loading="loadingObj.oldListLoading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
</tablecmt>
<div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<!-- 分页模块 -->
<el-pagination
style="zoom: 0.9"
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="oldPage.pageNum"
:page-sizes="[30, 50, 80, 120]"
:page-size="oldPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="oldPage.total"
>
</el-pagination>
</div>
</div>
<!-- 列表模块 -->
<div style="width: 49%">
<el-divider content-position="left">转为直发商家的订单</el-divider>
<div v-if="!search">
<el-form :inline="true" label-width="80px" :model="details.newQuery" class="el-fr-d">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchReset()"
> </el-button
>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
<div style="margin-bottom: 10px" class="flex-c-sb">
<div>
<el-button type="text" class="pointer" @click="handleOrderStatus(0)">
<el-icon><CaretLeft /></el-icon>
移除
</el-button>
</div>
<!-- 控件 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="handleRefresh" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true, 2)" circle></el-button>
<el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div>
</div>
<tablecmt
:columnList="details.newColumnList"
:tableData="details.newData"
:loading="loadingObj.newListLoading"
@inputTxt="newInputsc"
@timeCheck="newTimesc"
@selectCheck="newSelectsc"
@selection="newSelectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '装车件数'">
<el-input-number
v-model="slotProps.scope.row.loadingNum"
controls-position="right"
:precision="0"
:min="0"
:max="slotProps.scope.row.stockNum"
:step="1"
/>
</template>
</template>
</tablecmt>
<div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<!-- 分页模块 -->
<el-pagination
style="zoom: 0.9"
align="right"
background
@size-change="newSizeChange"
@current-change="newCurrentChange"
:current-page="details.newPage.pageNum"
:page-sizes="[30, 50, 80, 120]"
:page-size="details.newPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="details.newPage.total"
>
</el-pagination>
</div>
</div>
</div>
</div>
</basic-container>
<!-- 提交按钮 -->
<el-button type="primary" class="submitBtn" icon="CircleClose" @click="back"> </el-button>
<!-- 列表配置显示 -->
<edittablehead
@setcolum="setnewcolum"
@closce="showdrawer"
:drawerShow="drawerShow"
:columnList="details.columnList"
></edittablehead>
</template>
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import functions from '@/utils/functions';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import {
psotFindWaybillOrderListNoIsToMall,
postFindWaybillOrderListToMall,
getUpdateWaybillOrderIsCustemer,
} from '@/api/distribution/directGoMarket';
import { downloadXls, deepClone } from '@/utils/util';
import { oldColumnList, newColumnList } from '@/option/distribution/zeroAdditionalRecording';
import { ElMessage } from 'element-plus';
import { useRoute, useRouter } from 'vue-router';
import { useStore } from 'vuex';
import { watch } from 'vue';
//
const $route = useRoute();
const $router = useRouter();
//
const $store = useStore();
const details = reactive<any>({
/** 是否开启搜索 */
search: true,
/** 运单池搜索条件 */
oldQuery: {},
/** 调度池搜索条件 */
newQuery: {},
/** 时间快捷选择设置 */
shortcuts: [
{
text: '最近一周',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
return [start, end];
},
},
{
text: '最近一个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
return [start, end];
},
},
{
text: '最近三个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
return [start, end];
},
},
],
/** 时间选择器数据 */
stockupDate: [],
/** 列表 */
columnList: [],
oldColumnList: deepClone(oldColumnList),
newColumnList: deepClone(newColumnList),
/** 订单池数据 */
oldData: [],
/** 调度池数据 */
newData: [],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
list: false,
oldListLoading: false,
newListLoading: false,
pageLoading: false,
},
/** 订单池列表复选框选中的数据 */
oldSelectionList: [],
/** 调度池复选框选中数据 */
newSelectionList: [],
/** 是否显示设置表格 */
drawerShow: false,
/** 分页参数 */
page: {
pageNum: 1,
pageSize: 30,
total: 0,
},
oldPage: {
pageSize: 30,
pageNum: 1,
total: 0,
},
newPage: {
pageSize: 30,
pageNum: 1,
total: 0,
},
/** 弹出层显示 */
popUpShow: {},
/** 列表Dom节点 */
listNode: '',
form: {},
/** 被选中的零担订单 */
orderCodeList: [],
/** 运单Id */
loadId: '',
/** 页面数据 */
pageInfo: {
/** 运单Id */
loadId: '',
/** 返回路径 */
backPath: '',
},
/** 弹出层 */
showPopUpObj: {
editNodeIdDialogVisible: false,
},
/** 选择的Id */
finalNodeId: '',
/** 确认框的事件类型 add -- 新增 edit -- 修改 */
confirmType: 'add',
});
const { search, loadingObj, drawerShow, oldPage } = toRefs(details);
/** vuex */
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission);
onMounted(() => {
const timer = setTimeout(() => {
details.listNodeList = document.querySelectorAll('.maboxhi');
details.listNodeList.forEach(_node => {
_node.style.transition = 'all .3s ease-out';
});
clearTimeout(timer);
}, 100);
});
const initOldData = async (params = {}) => {
try {
details.loadingObj.oldListLoading = true;
const submitData = {
...details.oldPage,
...details.oldQuery,
loadId: details.pageInfo.loadId,
...params,
};
const res = await psotFindWaybillOrderListNoIsToMall(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.oldData = data.records;
details.oldPage.total = data.total;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.oldListLoading = false;
}
};
const initNewData = async (params = {}) => {
try {
details.loadingObj.newListLoading = true;
const submitData = {
...details.newPage,
...details.oldQuery,
loadId: details.pageInfo.loadId,
...params,
};
const res = await postFindWaybillOrderListToMall(submitData);
const { code, data } = res.data;
if (code !== 200) return;
details.newData = data.records;
details.newPage.total = data.total;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.newListLoading = false;
}
};
/** 请求页面数据 */
const onLoad = () => {
details;
initOldData();
initNewData();
};
/** 清空表单 */
const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.pageNum = 1;
onLoad();
};
/** 展开列表控件 */
const showdrawer = (_flag?: boolean, _type?: number) => {
switch (_type) {
case 1:
details.columnList = oldColumnList;
break;
case 2:
details.columnList = newColumnList;
break;
}
console.log('details.columnList :>> ', details.columnList);
details.drawerShow = _flag;
};
/** 是否开启搜索区 */
const searchHide = () => {
function getWinHight() {
var windowHight = 0;
if (document.body.clientHeight && document.documentElement.clientHeight) {
windowHight =
document.body.clientHeight < document.documentElement.clientHeight
? document.body.clientHeight
: document.documentElement.clientHeight;
} else {
}
return document.documentElement.clientHeight;
}
details.search = !details.search;
const timer = setTimeout(() => {
details.listNodeList.forEach(_node => {
console.log('_node :>> ', _node);
_node.style.height = getWinHight() - _node.getBoundingClientRect().top - 70 + 'px';
});
clearTimeout(timer);
}, 10);
};
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
onLoad();
};
/** 表格表头时间选择 */
const timesc = (index, row) => {
console.log(index, row);
if (!!index) {
index = dayjs(index).format('YYYY-MM-DD');
}
details.query[row.prop] = index;
if (!index) {
delete details.query[row.prop];
}
onLoad();
};
/** 表格表头输入框搜索 */
const btnsc = () => {};
/** 表格表头下拉框选择 */
const selectsc = (index, row) => {
details.query[row.prop] = index;
if (!index) delete details.query[row.prop];
if (row.prop === 'certificateTypeName') {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
onLoad();
};
/** 表格表头复选框选择 */
const selectionChange = (list: any) => {
details.oldSelectionList = list;
};
/** 表格表头输入框搜索 */
const newInputsc = (index, row) => {
details.newQuery[row.prop] = index;
onLoad();
};
/** 表格表头时间选择 */
const newTimesc = (index, row) => {
console.log(index, row);
if (!!index) {
index = dayjs(index).format('YYYY-MM-DD');
}
details.newQuery[row.prop] = index;
if (!index) {
delete details.newQuery[row.prop];
}
onLoad();
};
/** 表格表头输入框搜索 */
const newBtnsc = () => {};
/** 表格表头下拉框选择 */
const newSelectsc = (index, row) => {
details.newQuery[row.prop] = index;
if (!index) delete details.newQuery[row.prop];
if (row.prop === 'certificateTypeName') {
details.newQuery['certificateType'] = index;
if (!index) delete details.newQuery['certificateType'];
}
onLoad();
};
/** 表格表头复选框选择 */
const newSelectionChange = (list: any) => {
details.newSelectionList = list;
};
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.oldPage.pageSize = pageSize;
onLoad();
};
/** 页码改变执行的回调 */
const currentChange = pageNum => {
details.oldPage.pageNum = pageNum;
};
/** 每页数量改变执行的回调 */
const newSizeChange = (pageSize: number) => {
details.newPage.pageSize = pageSize;
onLoad();
};
/** 页码改变执行的回调 */
const newCurrentChange = pageNum => {
details.newPage.pageNum = pageNum;
};
/**
* 设置列表 -- 固定函数
* 弹窗的勾选回调用于更改头部数组
* 固定搭配只需要更换 columnList
* */
const setnewcolum = (newarr, headarr, type) => {
if (type == 1) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'checkList', headarr);
} else if (type == 2) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'flexList', headarr);
} else if (type == 3) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'sortlist', headarr);
}
};
/** 清空调度池 */
const handleRefresh = () => {
details.newData = [];
details.newSelectionList = [];
details.orderCodeList = [];
details.page.pageNum = 1;
onLoad();
};
/** 处理是否为直发商家订单状态 */
const handleOrderStatus = async type => {
try {
details.loadingObj.pageLoading = true;
const submitData = {
carsOrderIds: '',
isCustomer: type,
};
//
if (type === 1) {
if (details.oldSelectionList.length === 0) return ElMessage.warning('最少选择一条订单');
submitData.carsOrderIds = details.oldSelectionList.map(val => val.carsOrderId).join(',');
} else {
console.log('details.newSelectionList :>> ', details.newSelectionList);
//
if (details.newSelectionList.length === 0) return ElMessage.warning('最少选择一条订单');
submitData.carsOrderIds = details.newSelectionList.map(val => val.carsOrderId).join(',');
}
await getUpdateWaybillOrderIsCustemer(submitData);
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
/** 返回上一页 */
const back = () => {
$router.push({
path: details.pageInfo.backPath,
});
$store.commit('DEL_TAG_CURRENT');
};
watch(
() => $route,
() => {
console.log('$route.query :>> ', $route);
if ($route.path !== '/distribution/artery/directGoMarket') return;
details.pageInfo = { ...$route.query };
onLoad();
},
{
immediate: true,
}
);
</script>
<style scoped lang="scss">
.fo-fl {
display: flex;
flex-wrap: wrap;
zoom: 0.9;
}
//
:deep(.el-date-editor.el-input) {
height: 100% !important;
width: 100% !important;
}
:deep(.el-range-editor.el-input__wrapper) {
height: 100% !important;
}
:deep(.el-form--inline .el-form-item) {
margin-right: 0;
}
//
.add_row {
display: flex;
justify-content: space-between;
}
.add_row_title {
text-align: center;
margin-bottom: 10px;
font-size: 18px;
font-weight: bold;
}
//
.statistics_row {
margin: 10px 0;
font-size: 14px;
zoom: 0.9;
display: flex;
> div {
margin-right: 20px;
}
}
//
.crad_container {
display: flex;
.card_container_item {
flex: 1;
// padding: 10px;
border-radius: 5px;
box-shadow: 0 0 5px #ccc;
&:first-child {
margin-right: 20px;
}
.card_container_item_title {
padding: 10px;
border-bottom: 1px solid #ccc;
display: flex;
justify-content: space-between;
align-items: center;
}
.card_container_item_box {
padding: 10px;
}
}
}
.pointer {
cursor: pointer;
}
//
.submitBtn {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
}
//
:deep(.el-input-number__decrease) {
zoom: 0.8;
}
:deep(.el-input-number__increase) {
zoom: 0.8;
}
.el-select {
width: 100%;
}
//
:deep(.el-divider__text.is-left) {
font-size: 20px;
font-weight: bold;
color: var(--el-color-primary);
}
</style>

1023
src/views/distribution/artery/directGoMarketDetails.vue

File diff suppressed because it is too large Load Diff

433
src/views/distribution/artery/truckLoadingDetails.vue

@ -57,7 +57,7 @@
<el-button type="primary" icon="Edit" @click="handleShowTransfer('add')">
中转批量签收
</el-button>
<el-button type="primary" icon="List" @click="searchReset()">删除</el-button>
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button>
</template>
<!-- 到车管理 -->
@ -89,24 +89,32 @@
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
:tableRowClassName="
(row, index) => {
if (row.loadingAbnormal || row.unloadAbnormal) return 'Abnormal';
else return '';
}
"
>
<template #default="slotProps">
<el-text
<el-button
type="text"
@click="handleZeroUnLoad(slotProps.scope)"
v-if="
Number(slotProps.scope.row.scanStatus) === 1 && Number(slotProps.scope.row.type) === 2
"
>
零担卸车
</el-text>
<el-text
</el-button>
<el-button
type="text"
@click="handleOrderUnLoad(slotProps.scope)"
v-if="
Number(slotProps.scope.row.scanStatus) === 1 && Number(slotProps.scope.row.type) === 1
"
>
包件卸车
</el-text>
</el-button>
</template>
</tablecmt>
@ -175,7 +183,13 @@ import { mapGetters } from 'vuex';
import { ElMessage, ElMessageBox } from 'element-plus';
import type { Action } from 'element-plus';
import { getMyCurrentWarehouse } from '@/api/work/work';
import { postLoadingDetail, postBatchUnload } from '@/api/distribution/truckLoadingDetails';
import {
postLoadingDetail,
postBatchUnload,
postTransferUnloadPackage,
postTransferUnloadZero,
postBatchTransferUnload,
} from '@/api/distribution/truckLoadingDetails';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls } from '@/utils/util';
@ -440,7 +454,7 @@ const onLoad = async (params = {}) => {
/** 搜索 */
const searchChange = () => {
onLoad(details.page);
onLoad();
};
/** 清空表单 */
@ -448,7 +462,7 @@ const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.pageNum = 1;
onLoad(details.page);
onLoad();
};
/** 展开列表控件 */
@ -491,7 +505,7 @@ const searchHide = () => {
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
onLoad(details.page);
onLoad();
};
/** 表格表头时间选择 */
@ -504,7 +518,7 @@ const timesc = (index, row) => {
if (!index) {
delete details.query[row.prop];
}
onLoad(details.page);
onLoad();
};
/** 表格表头输入框搜索 */
@ -518,7 +532,7 @@ const selectsc = (index, row) => {
details.query['certificateType'] = index;
if (!index) delete details.query['certificateType'];
}
onLoad(details.page);
onLoad();
};
/** 表格表头复选框选择 */
@ -529,11 +543,14 @@ const selectionChange = (list: any) => {
/** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize;
onLoad(details.page);
onLoad();
};
/** 页码改变执行的回调 */
const currentChange = () => {};
const currentChange = pageNum => {
details.page.pageNum = pageNum;
onLoad();
};
/**
* 设置列表 -- 固定函数
@ -602,52 +619,149 @@ const handleBatchUnLoad = async () => {
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要卸车的数据');
const myWarehouseData = await getMyCurrentWarehouse();
if (details.pageInfo.type !== 'TripartiteTransfer') {
const myWarehouseData = await getMyCurrentWarehouse();
if (!myWarehouseData) return ElMessage.warning('请先选择一个仓库');
if (!myWarehouseData) return ElMessage.warning('请先选择一个仓库');
// Id
const myWarehouseId = myWarehouseData.warehouseId;
//
const _orderArr = [];
//
const _zeroArr = [];
//
let isHaveAbnormalData = false;
for (const iterator of details.selectionList) {
if (Number(iterator.scanStatus) === 1) {
//
if (Number(iterator.type) === 1) {
_orderArr.push({ orderPackageCode: iterator.scanCode });
} else {
_zeroArr.push({
waybillNo: iterator.waybillNo,
enterNum: iterator.num,
orderCode: iterator.orderCode,
});
}
// Id
const myWarehouseId = myWarehouseData.warehouseId;
//
const _orderArr = [];
//
const _zeroArr = [];
//
let isHaveAbnormalData = false;
for (const iterator of details.selectionList) {
if (Number(iterator.scanStatus) === 1) {
//
if (Number(iterator.type) === 1) {
_orderArr.push({ orderPackageCode: iterator.scanCode });
} else {
_zeroArr.push({
waybillNo: iterator.waybillNo,
enterNum: iterator.num,
orderCode: iterator.orderCode,
});
//
if (!isHaveAbnormalData) {
isHaveAbnormalData = iterator.warehouseId === myWarehouseId;
}
}
}
if ([..._zeroArr, ..._orderArr].length === 0) return ElMessage.warning('没有符合要求的数据');
//
if (isHaveAbnormalData) {
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: _orderArr,
unloadZeroList: _zeroArr,
};
//
if (!isHaveAbnormalData) {
isHaveAbnormalData = iterator.warehouseId === myWarehouseId;
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
return;
}
ElMessageBox.confirm('包含已卸车数据或计划不在本节点卸车的数据', '异常提交', {
confirmButtonText: '提交包含不在本节点数据',
cancelButtonText: '仅提交装车数据',
type: 'warning',
center: true,
distinguishCancelAndClose: true,
})
//
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: _orderArr,
unloadZeroList: _zeroArr,
};
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
//
.catch(async (action: Action) => {
if (action !== 'cancel') return;
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: _orderArr.filter(val => val.warehouseId === myWarehouseId),
unloadZeroList: _zeroArr.filter(val => val.warehouseId === myWarehouseId),
};
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
} else {
//
//
const _orderArr = [];
//
const _zeroArr = [];
for (const iterator of details.selectionList) {
if (Number(iterator.scanStatus) === 1) {
//
if (Number(iterator.type) === 1) {
_orderArr.push({ orderPackageCode: iterator.scanCode });
} else {
_zeroArr.push({
waybillNo: iterator.waybillNo,
enterNum: iterator.num,
orderCode: iterator.orderCode,
});
}
}
}
}
if ([..._zeroArr, ..._orderArr].length === 0) return ElMessage.warning('没有符合要求的数据');
if ([..._zeroArr, ..._orderArr].length === 0) return ElMessage.warning('没有符合要求的数据');
//
if (isHaveAbnormalData) {
//
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: _orderArr,
unloadZeroList: _zeroArr,
};
const res = await postBatchUnload(submitData);
const res = await postBatchTransferUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
@ -655,62 +769,6 @@ const handleBatchUnLoad = async () => {
onLoad();
return;
}
ElMessageBox.confirm('包含已卸车数据或计划不在本节点卸车的数据', '异常提交', {
confirmButtonText: '提交包含不在本节点数据',
cancelButtonText: '仅提交装车数据',
type: 'warning',
center: true,
distinguishCancelAndClose: true,
})
//
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: _orderArr,
unloadZeroList: _zeroArr,
};
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
//
.catch(async (action: Action) => {
if (action !== 'cancel') return;
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: _orderArr.filter(val => val.warehouseId === myWarehouseId),
unloadZeroList: _zeroArr.filter(val => val.warehouseId === myWarehouseId),
};
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -723,57 +781,71 @@ const handleOrderUnLoad = async ({ row }) => {
try {
details.loadingObj.pageLoading = true;
const myWarehouseData = await getMyCurrentWarehouse();
if (!myWarehouseData) return ElMessage.warning('请先选择一个仓库');
if (details.pageInfo.type !== 'TripartiteTransfer') {
const myWarehouseData = await getMyCurrentWarehouse();
if (!myWarehouseData) return ElMessage.warning('请先选择一个仓库');
// Id
const myWarehouseId = myWarehouseData.warehouseId;
// Id
const myWarehouseId = myWarehouseData.warehouseId;
if (row.warehouseId !== myWarehouseId)
return (
ElMessageBox.confirm('包含已卸车数据或计划不在本节点卸车的数据', '异常提交', {
confirmButtonText: '提交包含不在本节点数据',
cancelButtonText: '取消',
type: 'warning',
center: true,
})
//
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: [{ orderPackageCode: row.scanCode }],
unloadZeroList: [],
};
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
if (row.warehouseId !== myWarehouseId)
return (
ElMessageBox.confirm('包含已卸车数据或计划不在本节点卸车的数据', '异常提交', {
confirmButtonText: '提交包含不在本节点数据',
cancelButtonText: '取消',
type: 'warning',
center: true,
})
);
//
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: [{ orderPackageCode: row.scanCode }],
unloadZeroList: [],
};
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
);
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: [{ orderPackageCode: row.scanCode }],
unloadZeroList: [],
};
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: [{ orderPackageCode: row.scanCode }],
unloadZeroList: [],
};
const res = await postBatchUnload(submitData);
const { code } = res.data;
const res = await postBatchUnload(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
} else {
//
const submitData = {
loadId: details.pageInfo.loadId,
orderPackageCode: row.scanCode,
};
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
const res = await postTransferUnloadPackage(submitData);
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('卸车成功');
onLoad();
}
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -783,11 +855,13 @@ const handleOrderUnLoad = async ({ row }) => {
/** 卸车 -- 零担 */
const handleZeroUnLoad = async ({ row }) => {
const myWarehouseData = await getMyCurrentWarehouse();
if (!myWarehouseData) return ElMessage.warning('请先选择一个仓库');
if (details.pageInfo.type !== 'TripartiteTransfer') {
const myWarehouseData = await getMyCurrentWarehouse();
if (!myWarehouseData) return ElMessage.warning('请先选择一个仓库');
if (myWarehouseData.warehouseId !== row.warehouseId)
return ElMessage.warning('未在目的仓, 无法卸车');
if (myWarehouseData.warehouseId !== row.warehouseId)
return ElMessage.warning('未在目的仓, 无法卸车');
}
details.zeroItem = { ...row };
details.zeroItem.enterNum = row.num;
@ -800,19 +874,32 @@ const handleZeroUnLoadSubmit = async () => {
details.popUpShow.transferVisited = false;
details.loadingObj.pageLoading = true;
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: [],
unloadZeroList: [
{
waybillNo: details.zeroItem.waybillNo,
enterNum: details.zeroItem.num,
orderCode: details.zeroItem.orderCode,
},
],
};
const res = await postBatchUnload(submitData);
let res = {};
if (details.pageInfo.type !== 'TripartiteTransfer') {
const submitData = {
loadId: details.pageInfo.loadId,
unloadPackageList: [],
unloadZeroList: [
{
waybillNo: details.zeroItem.waybillNo,
enterNum: details.zeroItem.num,
orderCode: details.zeroItem.orderCode,
},
],
};
res = await postBatchUnload(submitData);
} else {
const submitData = {
loadId: details.pageInfo.loadId,
waybillNo: details.zeroItem.waybillNo,
enterNum: details.zeroItem.num,
orderCode: details.zeroItem.orderCode,
};
res = await postTransferUnloadZero(submitData);
}
const { code } = res.data;
if (code !== 200) return;
@ -919,4 +1006,24 @@ watch(
.transferPopUp :deep(.el-textarea) {
width: 500px;
}
:deep(.el-table tr) {
&.Abnormal {
background: #dc2e2e;
.tabculconte,
.el-tooltip,
.el-button--text {
color: #fff !important;
}
}
&.hover-row {
.tabculconte,
.el-tooltip,
.el-button--text {
color: var(--el-color-primary) !important;
}
}
}
</style>

97
src/views/waybill/TemporaryStorageList.vue

@ -113,7 +113,7 @@
<!-- 修改客户信息 -->
<el-dialog
class="el-dialog-QRCode"
title="修改客户信息"
title="家配导入"
:visible.sync="details.popUpShow.editClientInfoVisible"
width="780px"
v-model="details.popUpShow.editClientInfoVisible"
@ -138,8 +138,8 @@
<template #footer>
<div class="flex-c-c dialog-footer">
<el-button icon="Position" type="primary" @click="printTemplate"> </el-button>
<el-button icon="Refresh" type="primary" @click="printTemplate"> </el-button>
<el-button icon="Position" type="primary" @click="handleSubmitClientInfo"> </el-button>
<el-button icon="Refresh" type="primary" @click="handleRefreshClientInfo"> </el-button>
<el-button icon="Close" @click="details.popUpShow.editClientInfoVisible = false">
</el-button>
@ -147,22 +147,42 @@
</template>
</el-dialog>
<!-- 打印二维码 -->
<!-- 导入 -- 家配 -->
<el-dialog
class="el-dialog-QRCode"
title="二维码"
:visible.sync="details.popUpShow.QRCodeVisible"
width="780px"
v-model="details.popUpShow.QRCodeVisible"
class="el-dialog-UploadPackageDelivery"
title="家配导入"
:visible.sync="details.popUpShow.UploadPackageDelivery"
width="70%"
v-model="details.popUpShow.UploadPackageDelivery"
>
<div>
<div v-html="html"></div>
<el-divider content-position="left">数据导入</el-divider>
</div>
<span slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="ddd"> </el-button>-->
<el-button type="primary" @click="printTemplate"> </el-button>
<el-button @click="details.popUpShow.QRCodeVisible = false"> </el-button>
</span>
<P>请确认传入的文件为Excel文件格式</P>
<el-upload
class="upload-demo"
drag
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
multiple
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">Drop file here or <em>click to upload</em></div>
<template #tip>
<div class="el-upload__tip">jpg/png files with a size less than 500kb</div>
</template>
</el-upload>
<template #footer>
<div class="flex-c-c dialog-footer">
<el-button icon="Position" type="primary" @click="handleSubmitClientInfo"> </el-button>
<el-button icon="Refresh" type="primary" @click="handleRefreshClientInfo"> </el-button>
<el-button icon="Close" @click="details.popUpShow.UploadPackageDelivery = false">
</el-button>
</div>
</template>
</el-dialog>
<!-- 列表配置显示 -->
@ -267,10 +287,10 @@ const details = reactive<any>({
popUpShow: {
/** 包件明细 */
packageOrderListlVisited: false,
/** 二维码 */
QRCodeVisible: false,
/** 修改客户信息 */
editClientInfoVisible: false,
/** 导入 -- 家配 */
UploadPackageDelivery: true,
},
/** 列表Dom节点 */
listNode: '',
@ -596,39 +616,11 @@ const handleFullScrean = (_type: 'open' | 'close', _name: string) => {
}
};
/** 单列查看包条码 */
const printOrder = ({ row }) => {
let qr = {
ids: row.id,
};
html.value = '';
showOrderPackgeCode(qr).then(res => {
// this.orderPackageCode = res.data
if (res.data.code !== 200) return;
console.log(res.data);
html.value = getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
};
/** 单列查看包条码 */
const batchPrintOrder = ({ row }) => {
let qr = {
ids: row.id,
};
html.value = '';
showOrderPackgeCode(qr).then(res => {
// this.orderPackageCode = res.data
if (res.data.code !== 200) return;
console.log(res.data);
html.value = getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
};
/** 提交修改客户信息 */
const handleSubmitClientInfo = () => {};
/** 打印包条码 */
const printTemplate = () => {
const orderNodeList = document.querySelectorAll('.el-dialog-QRCode .el-dialog__body>div>div>div');
print(orderNodeList);
};
/** 重置客户信息 */
const handleRefreshClientInfo = () => {};
</script>
<style scoped lang="scss">
@ -700,4 +692,11 @@ const printTemplate = () => {
}
}
}
//
:deep(.el-divider__text.is-left) {
font-size: 20px;
font-weight: bold;
color: var(--el-color-primary);
}
</style>

Loading…
Cancel
Save