فهرست منبع

回收物流接口对接

haveyou 1 سال پیش
والد
کامیت
6368daee7c

BIN
src/assets/avatar.jpg


BIN
src/assets/logo-cover.png


+ 2 - 0
src/components/CommonPage/CommonTable.vue

@@ -144,6 +144,8 @@
         .then((res) => {
           if (res.data.code === 200) {
             EleMessage.success('操作成功,请前往导出记录下载');
+          }else{
+            EleMessage.error(res.data.msg);
           }
           loading.close();
         })

+ 1 - 1
src/store/modules/user.js

@@ -5,7 +5,7 @@ import { defineStore } from 'pinia';
 import { mapTree, isExternalLink } from 'ele-admin-plus/es';
 import { getUserInfo, getUserMenu } from '@/api/layout';
 import { API_BASE_URL } from '@/config/setting';
-import defaultAvatarUrl from '@/assets/avatar.jpg';
+import defaultAvatarUrl from '@/assets/logo.png';
 
 export const useUserStore = defineStore('user', {
   state: () => ({

+ 14 - 3
src/views/login/index.vue

@@ -2,8 +2,16 @@
   <div class="login-wrapper">
     <ele-card shadow="always" class="login-card">
       <div class="login-cover">
-        <h1 class="login-title">RuoYi EleAdmin</h1>
-        <h4 class="login-subtitle">界面美观组件丰富的中后台前端解决方案</h4>
+        <img
+          :src="logoCover"
+          class="login-cover-img"
+          alt="cover"
+          style="width: 100px; height: 100px"
+        />
+        <div class="login-cover-right" style="margin-top:10px">
+          <h1 class="login-title">书嗨</h1>
+          <h4 class="login-subtitle">不辜负每一个爱书的人</h4>
+        </div>
       </div>
       <div class="login-body">
         <ele-text type="heading" style="font-size: 24px; margin-bottom: 18px">
@@ -111,6 +119,7 @@
   import { getToken } from '@/utils/token-util';
   import { usePageTab } from '@/utils/use-page-tab';
   import { login, getCaptcha } from '@/api/login';
+  import logoCover from '@/assets/logo-cover.png';
 
   const { currentRoute } = useRouter();
   const { goHomeRoute, cleanPageTabs } = usePageTab();
@@ -270,7 +279,9 @@
     background-repeat: no-repeat;
     background-position: bottom;
     background-size: contain;
-    text-align: center;
+    display: flex;
+    justify-content: center;
+    padding-top:20px
   }
 
   .login-body {

+ 37 - 43
src/views/recycleLogistics/arrivalSign/components/arrivalSign-search.vue

@@ -1,58 +1,52 @@
 <!-- 搜索表单 -->
 <template>
-  <ele-card :body-style="{ paddingBottom: '8px' }">
-    <ProSearch
-      :items="formItems"
-      ref="searchRef"
-      @search="search"
-      :initKeys="initKeys"
-    ></ProSearch>
-  </ele-card>
+    <ele-card :body-style="{ paddingBottom: '8px' }">
+        <ProSearch :items="formItems" ref="searchRef" @search="search" :initKeys="initKeys"></ProSearch>
+    </ele-card>
 </template>
 
 <script setup>
-  import { reactive, ref, defineEmits } from 'vue';
-  import ProSearch from '@/components/CommonPage/ProSearch2.vue';
+import { reactive, ref, defineEmits } from 'vue';
+import ProSearch from '@/components/CommonPage/ProSearch2.vue';
 
-  let { proxy } = getCurrentInstance();
-  const emit = defineEmits(['search']);
+let { proxy } = getCurrentInstance();
+const emit = defineEmits(['search']);
 
-  const formItems = reactive([
-    { type: 'input', label: '签收者', prop: 'contactsName' },
-    { type: 'input', label: '物流单号', prop: 'phoneNum' },
-    { type: 'input', label: '物流CODE', prop: 'code' },
+const formItems = reactive([
+    { type: 'input', label: '签收者', prop: 'signUserName' },
+    { type: 'input', label: '物流单号', prop: 'deliveryCode' },
+    { type: 'input', label: '物流CODE', prop: 'finalExpress' },
     {
-      type: 'date',
-      label: '签收时间(开始时间)',
-      prop: 'beginTime',
-      props: {
-        format: 'YYYY-MM-DD',
-        valueFormat: 'YYYY-MM-DD'
-      }
+        type: 'datetime',
+        label: '签收时间(开始时间)',
+        prop: 'createTimeStart',
+        props: {
+            format: 'YYYY-MM-DD HH:mm:ss',
+            valueFormat: 'YYYY-MM-DD HH:mm:ss'
+        }
     },
     {
-      type: 'date',
-      label: '签收时间(结束时间)',
-      prop: 'endTime',
-      props: {
-        format: 'YYYY-MM-DD',
-        valueFormat: 'YYYY-MM-DD'
-      }
+        type: 'datetime',
+        label: '签收时间(结束时间)',
+        prop: 'createTimeEnd',
+        props: {
+            format: 'YYYY-MM-DD HH:mm:ss',
+            valueFormat: 'YYYY-MM-DD HH:mm:ss'
+        }
     }
-  ]);
+]);
 
-  const initKeys = reactive({
-    schoolName: '',
-    provinceId: '',
-    cityId: '',
-    schoolLevel: '',
-    departmentName: '',
-    shcoolTag: ''
-  });
+const initKeys = reactive({
+    signUserName: '',
+    deliveryCode: '',
+    createTimeStart: '',
+    createTimeEnd: '',
+    finalExpress: ''
+});
 
-  const searchRef = ref(null);
-  /** 搜索 */
-  const search = (data) => {
+const searchRef = ref(null);
+/** 搜索 */
+const search = (data) => {
     emit('search', { ...data });
-  };
+};
 </script>

+ 41 - 84
src/views/recycleLogistics/arrivalSign/index.vue

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

+ 7 - 7
src/views/recycleLogistics/expressCheck/index.vue

@@ -34,13 +34,13 @@
   const columns = ref([
     {
       label: '签收者',
-      prop: 'godownName',
+      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: 'expressNumber', align: 'center' },
+    { label: '物流CODE', prop: 'finalExpressName', align: 'center' },
+    { label: '包裹号', prop: 'packageCode', align: 'center' },
+    { label: '仓库', prop: 'godownName', align: 'center' },
     { label: '签收时间', prop: 'createTime', align: 'center' }
   ]);
 
@@ -48,8 +48,8 @@
   const pageRef = ref(null);
 
   const pageConfig = reactive({
-    pageUrl: '/system/info/pagelist',
-    exportUrl: '/system/info/export',
+    pageUrl: '/order/ordersign/expressSign',
+    exportUrl: '/order/ordersign/expressSignExport',
     fileName: '快递验收',
     cacheKey: 'expressCheckTable',
   });

+ 16 - 17
src/views/recycleLogistics/transferSign/components/page-search.vue

@@ -18,36 +18,35 @@
   const emit = defineEmits(['search']);
 
   const formItems = reactive([
-    { type: 'input', label: '签收者', prop: 'contactsName' },
-    { type: 'input', label: '物流单号', prop: 'phoneNum' },
-    { type: 'input', label: '物流CODE', prop: 'code' },
+    { type: 'input', label: '签收者', prop: 'signUserName' },
+    { type: 'input', label: '物流单号', prop: 'deliveryCode' },
+    { type: 'input', label: '物流CODE', prop: 'finalExpress' },
     {
-      type: 'date',
+      type: 'datetime',
       label: '签收时间(开始时间)',
-      prop: 'beginTime',
+      prop: 'createTimeStart',
       props: {
-        format: 'YYYY-MM-DD',
-        valueFormat: 'YYYY-MM-DD'
+        format: 'YYYY-MM-DD HH:mm:ss',
+        valueFormat: 'YYYY-MM-DD HH:mm:ss'
       }
     },
     {
-      type: 'date',
+      type: 'datetime',
       label: '签收时间(结束时间)',
-      prop: 'endTime',
+      prop: 'createTimeEnd',
       props: {
-        format: 'YYYY-MM-DD',
-        valueFormat: 'YYYY-MM-DD'
+        format: 'YYYY-MM-DD HH:mm:ss',
+        valueFormat: 'YYYY-MM-DD HH:mm:ss'
       }
     }
   ]);
 
   const initKeys = reactive({
-    schoolName: '',
-    provinceId: '',
-    cityId: '',
-    schoolLevel: '',
-    departmentName: '',
-    shcoolTag: ''
+    signUserName: '',
+    deliveryCode: '',
+    createTimeStart: '',
+    createTimeEnd: '',
+    finalExpress: ''
   });
 
   const searchRef = ref(null);

+ 7 - 7
src/views/recycleLogistics/transferSign/index.vue

@@ -34,13 +34,13 @@
   const columns = ref([
     {
       label: '签收者',
-      prop: 'godownName',
+      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: 'expressNumber', align: 'center' },
+    { label: '物流CODE', prop: 'finalExpressName', align: 'center' },
+    { label: '包裹号', prop: 'packageCode', align: 'center' },
+    { label: '仓库', prop: 'godownName', align: 'center' },
     { label: '签收时间', prop: 'createTime', align: 'center' }
   ]);
 
@@ -48,8 +48,8 @@
   const pageRef = ref(null);
 
   const pageConfig = reactive({
-    pageUrl: '/system/info/pagelist',
-    exportUrl: '/system/info/export',
+    pageUrl: '/order/ordersign/getTransferSign',
+    exportUrl: '/order/ordersign/transferSignExport',
     fileName: '中转签收',
     cacheKey: 'transferSignTable',
   });

+ 6 - 4
src/views/recycleLogistics/warehouse/components/warehouse-edit.vue

@@ -46,7 +46,7 @@
         props: { code: 'use_status' },
         required: true
       },
-    //   { type: 'citySelect', label: '省市区', prop: 'contactsPhone' },
+      //   { type: 'citySelect', label: '省市区', prop: 'contactsPhone' },
       {
         type: 'select',
         label: '省份',
@@ -124,12 +124,14 @@
     add: '/baseinfo/godown/add',
     update: '/baseinfo/godown/update'
   });
-  const formData = ref({
+
+  const initParams = {
     useStatus: '1',
     abnormalSign: '1',
     checkTips: '1',
     bindChecker: '1'
-  });
+  };
+  const formData = ref({});
 
   const editRef = ref(null);
   const type = ref('');
@@ -140,7 +142,7 @@
     } else {
       title.value = data && data.id ? '编辑仓库' : '新增仓库';
     }
-    formData.value = Object.assign(formData.value, data || {});
+    formData.value = data.id ? data : { ...initParams };
     getProviceList().then((res) => {
       provinceList.value = res.data.data;
     });

+ 7 - 7
src/views/recycleLogistics/warehouse/index.vue

@@ -6,7 +6,7 @@
       <template #toolbar>
         <el-radio-group @change="handleStatusChange" v-model="useStatus">
           <el-radio-button label="启用" value="1" />
-          <el-radio-button label="禁用" value="2" />
+          <el-radio-button label="禁用" value="0" />
         </el-radio-group>
 
         <el-button
@@ -25,8 +25,8 @@
         <el-switch
           v-model="row.checkTips"
           style="--el-switch-on-color: #13ce66"
-          :active-value="1"
-          :inactive-value="0"
+          active-value="1"
+          inactive-value="0"
           @change="statusSwitchChange($event, row, 'checkTips')"
         />
         <el-text style="margin-left: 5px">{{
@@ -37,8 +37,8 @@
         <el-switch
           v-model="row.bindChecker"
           style="--el-switch-on-color: #13ce66"
-          :active-value="1"
-          :inactive-value="0"
+          active-value="1"
+          inactive-value="0"
           @change="statusSwitchChange($event, row, 'bindChecker')"
         />
         <el-text style="margin-left: 5px">{{
@@ -49,8 +49,8 @@
         <el-switch
           v-model="row.abnormalSign"
           style="--el-switch-on-color: #13ce66"
-          :active-value="1"
-          :inactive-value="0"
+          active-value="1"
+          inactive-value="0"
           @change="statusSwitchChange($event, row, 'abnormalSign')"
         />
         <el-text style="margin-left: 5px">{{