|
|
@@ -2,7 +2,7 @@
|
|
|
<ele-page flex-table>
|
|
|
<arrivalSign-search @search="reload"></arrivalSign-search>
|
|
|
|
|
|
- <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
|
|
|
+ <common-table ref="pageRef" :pageConfig="usePageConfig" :columns="columns">
|
|
|
<template #toolbar>
|
|
|
<el-radio-group @change="handleStatusChange" v-model="useStatus">
|
|
|
<el-radio-button label="全部到仓签收" value="1" />
|
|
|
@@ -27,7 +27,7 @@
|
|
|
type="success"
|
|
|
link
|
|
|
v-permission="'recycleLogistics:arrivalSign:viewImage'"
|
|
|
- @click="handleUpdate(row)"
|
|
|
+ @click="handleViewImg(row)"
|
|
|
>
|
|
|
[查看图片]
|
|
|
</el-button>
|
|
|
@@ -39,25 +39,39 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, reactive } from 'vue';
|
|
|
- import { ElMessageBox } from 'element-plus/es';
|
|
|
import { EleMessage } from 'ele-admin-plus/es';
|
|
|
- import {
|
|
|
- PlusOutlined,
|
|
|
- DeleteOutlined,
|
|
|
- DownloadOutlined
|
|
|
- } from '@/components/icons';
|
|
|
+ import { DownloadOutlined } from '@/components/icons';
|
|
|
import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
|
import arrivalSignSearch from '@/views/recycleLogistics/arrivalSign/components/arrivalSign-search.vue';
|
|
|
- import { useDictData } from '@/utils/use-dict-data';
|
|
|
- import { useRouter } from 'vue-router';
|
|
|
- import request from '@/utils/request';
|
|
|
|
|
|
defineOptions({ name: 'arrivalSign' });
|
|
|
- const [useStatusDicts] = useDictData(['use_status']);
|
|
|
+
|
|
|
+ /** 页面组件实例 */
|
|
|
+ const pageRef = ref(null);
|
|
|
+
|
|
|
+ const pageConfig = reactive({
|
|
|
+ pageUrl: '/order/ordersign/toGodownSign',
|
|
|
+ exportUrl: '/order/ordersign/toGodownSignExport',
|
|
|
+ fileName: '到仓签收',
|
|
|
+ cacheKey: 'arrivalSignTable'
|
|
|
+ });
|
|
|
+ let pageConfig2 = reactive({
|
|
|
+ pageUrl: '/order/ordersign/weightChangeSign',
|
|
|
+ exportUrl: '/order/ordersign/changeWeightExport',
|
|
|
+ fileName: '重量问题包裹',
|
|
|
+ cacheKey: 'weightChangeSignTable'
|
|
|
+ });
|
|
|
+ const usePageConfig = ref(pageConfig);
|
|
|
|
|
|
const useStatus = ref('1');
|
|
|
- function handleStatusChange() {
|
|
|
- pageRef.value.reload({ useStatus: useStatus.value });
|
|
|
+ function handleStatusChange(value) {
|
|
|
+ useStatus.value = value;
|
|
|
+ if (value == 1) {
|
|
|
+ usePageConfig.value = pageConfig;
|
|
|
+ } else {
|
|
|
+ usePageConfig.value = pageConfig2;
|
|
|
+ }
|
|
|
+ nextTick(() => pageRef.value?.reload());
|
|
|
}
|
|
|
|
|
|
/** 表格列配置 */
|
|
|
@@ -71,16 +85,16 @@
|
|
|
},
|
|
|
{
|
|
|
label: '签收者',
|
|
|
- prop: 'godownName',
|
|
|
- align: 'center',
|
|
|
+ prop: 'signUserName',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
- { label: '物流单号', prop: 'contactsName', align: 'center' },
|
|
|
- { label: '物流CODE', prop: 'phoneNum', align: 'center'},
|
|
|
- { label: '包裹号', prop: 'addressDetail', align: 'center' },
|
|
|
- { label: '重量', prop: 'addressDetail', align: 'center' },
|
|
|
- { label: '重量单位', prop: 'addressDetail', align: 'center' },
|
|
|
- { label: '仓库', prop: 'addressDetail', align: 'center' },
|
|
|
- { label: '签收时间', prop: 'createTime', align: 'center',width: 170 },
|
|
|
+ { label: '物流单号', prop: 'expressNumber', align: 'center' },
|
|
|
+ { label: '物流CODE', prop: 'finalExpressName', align: 'center' },
|
|
|
+ { label: '包裹号', prop: 'packageCode', align: 'center' },
|
|
|
+ { label: '实际重量(kg)', prop: 'actualWeight', align: 'center' },
|
|
|
+ { label: '计费重量(kg)', prop: 'chargingWeight', align: 'center' },
|
|
|
+ { label: '仓库', prop: 'godownName', align: 'center' },
|
|
|
+ { label: '签收时间', prop: 'createTime', align: 'center', width: 170 },
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
label: '操作',
|
|
|
@@ -90,79 +104,22 @@
|
|
|
}
|
|
|
]);
|
|
|
|
|
|
- let router = useRouter();
|
|
|
- /** 页面组件实例 */
|
|
|
- const pageRef = ref(null);
|
|
|
-
|
|
|
- const pageConfig = reactive({
|
|
|
- pageUrl: '/system/info/pagelist',
|
|
|
- exportUrl: '/system/info/export',
|
|
|
- fileName: '仓库管理',
|
|
|
- cacheKey: 'arrivalSignTable',
|
|
|
- params: { useStatus: 1 }
|
|
|
- });
|
|
|
+ //重量问题包裹接口
|
|
|
|
|
|
//刷新表格
|
|
|
function reload(where) {
|
|
|
pageRef.value?.reload(where);
|
|
|
}
|
|
|
|
|
|
- //修改状态
|
|
|
- const statusSwitchChange = (value, row, key) => {
|
|
|
- let data = JSON.parse(JSON.stringify(row));
|
|
|
- let message = value == 0 ? '确认关闭?' : '确认开启?';
|
|
|
- ElMessageBox.confirm(message, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '关闭',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- data[key] = value;
|
|
|
- request.post('/system/info/update', data).then((res) => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- EleMessage.success('操作成功');
|
|
|
- reload();
|
|
|
- } else {
|
|
|
- EleMessage.error(res.data.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- row[key] = value == 1 ? 0 : 1;
|
|
|
- });
|
|
|
- };
|
|
|
-
|
|
|
- //批量删除
|
|
|
- function handleBatchDelete(row) {
|
|
|
- let selections = row ? [row] : pageRef.value?.getSelections();
|
|
|
- let ids = selections.map((item) => item.id).join(',');
|
|
|
- let url = `/system/info/delete/${ids}`;
|
|
|
- pageRef.value?.operatBatch({
|
|
|
- title: '确认删除?',
|
|
|
- method: 'delete',
|
|
|
- url,
|
|
|
- row
|
|
|
- });
|
|
|
- }
|
|
|
//导出excel
|
|
|
function handleExportExcel() {
|
|
|
pageRef.value?.exportData('到仓签收');
|
|
|
}
|
|
|
|
|
|
- //禁用/启用
|
|
|
- function handleChangeStatus(row) {
|
|
|
- let message = row.useStatus == 1 ? '确认禁用?' : '确认启用?';
|
|
|
- let data = JSON.parse(JSON.stringify(row));
|
|
|
- data.useStatus = row.useStatus == 1 ? 0 : 1;
|
|
|
- pageRef.value?.messageBoxConfirm({
|
|
|
- message,
|
|
|
- fetch: () => request.post('/system/info/update', data)
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- //编辑页面
|
|
|
+ //查看图片
|
|
|
const editRef = ref(null);
|
|
|
- function handleUpdate(row) {
|
|
|
+ function handleViewImg(row) {
|
|
|
+ if (!row.imgList) return EleMessage.warning('暂无图片');
|
|
|
editRef.value?.handleOpen(row);
|
|
|
}
|
|
|
</script>
|