Alex 10 ماه پیش
والد
کامیت
454dd19c26

+ 0 - 1
src/views/data/universities/components/universities-edit.vue

@@ -64,7 +64,6 @@
         type: 'input',
         label: '主管部门',
         prop: 'departmentName',
-        required: true
       },
       {
         type: 'dictSelect',

+ 2 - 2
src/views/data/universities/components/universities-search.vue

@@ -13,7 +13,7 @@
 <script setup>
   import { reactive, ref, defineEmits } from 'vue';
   import ProSearch from '@/components/CommonPage/ProSearch2.vue';
-  
+
   let { proxy } = getCurrentInstance();
   const emit = defineEmits(['search']);
   const provinceList = ref([]);
@@ -61,7 +61,7 @@
       {
         type: 'dictSelect',
         label: '标记',
-        prop: 'shcoolTag',
+        prop: 'schoolTag',
         props: {
           code: 'school_tag'
         }

+ 19 - 3
src/views/marketing/partner/components/partner-poster.vue

@@ -41,9 +41,9 @@
       <template #image="{ row }">
         <el-image
           :src="row.background"
-          :preview-src-list="[row.background]"
           fit="contain"
           style="width: 80px; height: 80px"
+          :z-index="9999"
         />
       </template>
 
@@ -126,6 +126,12 @@
     tableRef.value?.reload({ name: searchKeyword.value });
   };
 
+  // 重置
+  const reset = () => {
+    searchKeyword.value = '';
+    handleSearch();
+  };
+
   // 删除海报
   const handleDelete = (row) => {
     const rows = row ? [row] : selectedRows.value;
@@ -150,7 +156,10 @@
 
   // 修改状态
   const statusSwitchChange = (value, row) => {
-    let message = value == 2 ? '确认停用?' : '确认开启?';
+    // 保存原始状态值,用于取消时恢复
+    const originalStatus = value === '1' ? '2' : '1';
+
+    let message = value == '2' ? '确认停用?' : '确认开启?';
     ElMessageBox.confirm(message, '提示', {
       confirmButtonText: '确定',
       cancelButtonText: '关闭',
@@ -166,11 +175,18 @@
             handleSearch();
           } else {
             ElMessage.error(res.data.msg);
+            // 如果API调用失败,恢复原始状态
+            row.status = originalStatus;
           }
+        }).catch(() => {
+          // API调用异常时,恢复原始状态
+          row.status = originalStatus;
+          ElMessage.error('操作失败');
         });
       })
       .catch(() => {
-        row.status = value == 1 ? 2 : 1;
+        // 用户点击"关闭"按钮,恢复原始状态
+        row.status = originalStatus;
       });
   };
 

+ 1 - 0
src/views/marketing/partner/components/partner-rule.vue

@@ -102,6 +102,7 @@
       background: url('@/assets/mobile.png') no-repeat center center;
       background-size: 100% 100%;
       width: 545px;
+      min-width: 545px;
       height: 900px;
       border-radius: 20px;
       overflow: hidden;

+ 5 - 1
src/views/recycle/orderSetting/components/restore-order-settings.vue

@@ -7,7 +7,11 @@
             <ele-input v-model="form.totalLimit" placeholder="请输入" suffixStr="次" clearable />
         </el-form-item>
         <el-form-item label="预留手机号:" prop="mobile">
-            <ele-input v-model="form.mobile" placeholder="请输入" clearable />
+            <el-input v-model="form.mobile" placeholder="请输入" clearable style="width: 190px" />
+            <el-button type="primary" style="margin-left: 10px" @click="sendCode">发送验证码</el-button>
+        </el-form-item>
+        <el-form-item label="验证码:" prop="code">
+            <el-input v-model="form.code" placeholder="请输入" clearable style="width: 190px" />
         </el-form-item>
         <el-form-item>
             <el-button type="success" style="width:100px" plain @click="onSubmit" v-permission="'recycle:orderSetting:restoreOrderSettings'">保存</el-button>

+ 59 - 4
src/views/recycleLogistics/abnormalSetting/index.vue

@@ -15,6 +15,18 @@
                 <el-form-item label="预留手机号" prop="mobile">
                     <el-input v-model="form.mobile" :maxlength="11" />
                 </el-form-item>
+                <el-form-item label="手机验证码" prop="code">
+                    <div style="display: flex;">
+                        <el-input v-model="form.code" placeholder="请输入验证码" style="flex: 1;" />
+                        <el-button
+                            type="primary"
+                            :disabled="countdown > 0"
+                            style="margin-left: 10px; width: 120px;"
+                            @click="sendVerificationCode">
+                            {{ countdown > 0 ? `${countdown}秒后重发` : '发送验证码' }}
+                        </el-button>
+                    </div>
+                </el-form-item>
                 <el-form-item>
                     <el-button style="min-width: 100px" type="primary" @click="submitForm(formRef)"
                         v-permission="'recycleLogistics:abnormalSetting:update'">
@@ -28,20 +40,26 @@
 
 <script setup>
 import { ElMessage } from 'element-plus';
-import { getCurrentInstance } from 'vue'
+import { getCurrentInstance, ref, reactive, onMounted } from 'vue'
 const { proxy } = getCurrentInstance();
 
 const formRef = ref(null);
+const countdown = ref(0);
 const form = reactive({
     maxSignPerNum: '',
     maxSignDayNum: '',
-    mobile: ''
+    mobile: '',
+    code: ''
 });
 
 // 表单验证规则
 const rules = {
     mobile: [
         { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: 'blur' }
+    ],
+    code: [
+        { required: true, message: '请输入验证码', trigger: 'blur' },
+        { pattern: /^\d{6}$/, message: '验证码格式不正确', trigger: 'blur' }
     ]
 };
 
@@ -58,6 +76,42 @@ const getSettings = async () => {
     }
 };
 
+// 发送验证码
+const sendVerificationCode = async () => {
+    if (!form.mobile) {
+        ElMessage.warning('请先输入手机号');
+        return;
+    }
+
+    if (!/^1[3-9]\d{9}$/.test(form.mobile)) {
+        ElMessage.warning('请输入正确的手机号格式');
+        return;
+    }
+
+    try {
+        const res = await proxy.$http.post('/order/ordersign/routeExceptionSign/getCode', {
+            mobile: form.mobile
+        });
+
+        if (res.data?.code === 200) {
+            ElMessage.success('验证码发送成功');
+            // 开始倒计时
+            countdown.value = 60;
+            const timer = setInterval(() => {
+                countdown.value--;
+                if (countdown.value <= 0) {
+                    clearInterval(timer);
+                }
+            }, 1000);
+        } else {
+            ElMessage.error(res.data?.msg || '验证码发送失败');
+        }
+    } catch (error) {
+        console.error('发送验证码失败:', error);
+        ElMessage.error('验证码发送失败,请稍后重试');
+    }
+};
+
 // 提交表单
 const submitForm = async (formEl) => {
     if (!formEl) return;
@@ -66,12 +120,13 @@ const submitForm = async (formEl) => {
             const res = await proxy.$http.post('/order/ordersign/routeExceptionSign', {
                 maxSignPerNum: form.maxSignPerNum,
                 maxSignDayNum: form.maxSignDayNum,
-                mobile: form.mobile
+                mobile: form.mobile,
+                code: form.code
             });
             if (res.data?.code === 200) {
                 ElMessage.success('设置保存成功');
             } else {
-                ElMessage.error(res.data.msg)
+                ElMessage.error(res.data?.msg || '保存失败')
             }
         } else {
             console.log('error submit!', fields);

+ 1 - 1
src/views/recycleLogistics/arrivalSign/components/arrivalSign-search.vue

@@ -15,7 +15,7 @@ const emit = defineEmits(['search']);
 const formItems = reactive([
     { type: 'input', label: '签收者', prop: 'signUserName' },
     { type: 'input', label: '物流单号', prop: 'deliveryCode' },
-    { type: 'input', label: '物流CODE', prop: 'finalExpress' },
+    { type: 'input', label: '物流CODE', prop: 'expressCode' },
     {
         type: 'datetime',
         label: '签收时间(开始时间)',

+ 42 - 13
src/views/recycleLogistics/arrivalSign/index.vue

@@ -2,7 +2,11 @@
   <ele-page flex-table>
     <arrivalSign-search @search="reload"></arrivalSign-search>
 
-    <common-table ref="pageRef" :pageConfig="usePageConfig" :columns="columns">
+    <common-table
+      ref="pageRef"
+      :pageConfig="usePageConfig"
+      :columns="useStatus == 1 ? columns1 : columns"
+    >
       <template #toolbar>
         <el-radio-group @change="handleStatusChange" v-model="useStatus">
           <el-radio-button label="全部到仓签收" value="1" />
@@ -34,20 +38,34 @@
         </div>
       </template>
     </common-table>
+
+    <!-- 图片预览组件 -->
+    <div v-if="showViewer">
+      <el-image-viewer
+        v-if="previewImages.length"
+        :url-list="previewImages"
+        :initial-index="0"
+        :z-index="3000"
+        @close="showViewer = false"
+      />
+    </div>
   </ele-page>
 </template>
 
 <script setup>
-  import { ref, reactive } from 'vue';
+  import { ref, reactive, nextTick } from 'vue';
   import { EleMessage } from 'ele-admin-plus/es';
   import { DownloadOutlined } from '@/components/icons';
   import CommonTable from '@/components/CommonPage/CommonTable.vue';
   import arrivalSignSearch from '@/views/recycleLogistics/arrivalSign/components/arrivalSign-search.vue';
+  import { ElImageViewer } from 'element-plus';
 
   defineOptions({ name: 'arrivalSign' });
 
   /** 页面组件实例 */
   const pageRef = ref(null);
+  const previewImages = ref([]);
+  const showViewer = ref(false);
 
   const pageConfig = reactive({
     pageUrl: '/order/ordersign/toGodownSign',
@@ -76,13 +94,6 @@
 
   /** 表格列配置 */
   const columns = ref([
-    {
-      type: 'selection',
-      columnKey: 'selection',
-      width: 50,
-      align: 'center',
-      fixed: 'left'
-    },
     {
       label: '签收者',
       prop: 'signUserName',
@@ -104,6 +115,20 @@
     }
   ]);
 
+  const columns1 = ref([
+    {
+      label: '签收者',
+      prop: 'signUserName',
+      align: 'center'
+    },
+    { label: '物流单号', prop: 'expressNumber', align: 'center' },
+    { label: '物流CODE', prop: 'finalExpressName', align: 'center' },
+    { label: '包裹号', prop: 'packageCode', align: 'center' },
+    { label: '计费重量(kg)', prop: 'chargingWeight', align: 'center' },
+    { label: '仓库', prop: 'godownName', align: 'center' },
+    { label: '签收时间', prop: 'createTime', align: 'center', width: 170 }
+  ]);
+
   //重量问题包裹接口
 
   //刷新表格
@@ -116,10 +141,14 @@
     pageRef.value?.exportData('到仓签收');
   }
 
-  //查看图片
-  const editRef = ref(null);
+  //查看图片 - 使用ElImageViewer组件
   function handleViewImg(row) {
-    if (!row.imgList) return EleMessage.warning('暂无图片');
-    editRef.value?.handleOpen(row);
+    if (!row.imgList || row.imgList.length === 0) {
+      return EleMessage.warning('暂无图片');
+    }
+
+    // 设置预览图片列表并显示查看器
+    previewImages.value = row.imgList;
+    showViewer.value = true;
   }
 </script>

+ 58 - 0
src/views/recycleLogistics/expressCheck/components/page-search.vue

@@ -0,0 +1,58 @@
+<!-- 搜索表单 -->
+<template>
+  <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';
+
+  let { proxy } = getCurrentInstance();
+  const emit = defineEmits(['search']);
+
+  const formItems = reactive([
+    { type: 'input', label: '签收者', prop: 'signUserName' },
+    { type: 'input', label: '物流单号', prop: 'deliveryCode' },
+    { type: 'input', label: '物流CODE', prop: 'expressCode' },
+    { type: 'input', label: '批次号', prop: 'batchNum' },
+    {
+      type: 'datetime',
+      label: '签收时间(开始时间)',
+      prop: 'createTimeStart',
+      props: {
+        format: 'YYYY-MM-DD HH:mm:ss',
+        valueFormat: 'YYYY-MM-DD HH:mm:ss'
+      }
+    },
+    {
+      type: 'datetime',
+      label: '签收时间(结束时间)',
+      prop: 'createTimeEnd',
+      props: {
+        format: 'YYYY-MM-DD HH:mm:ss',
+        valueFormat: 'YYYY-MM-DD HH:mm:ss'
+      }
+    }
+  ]);
+
+  const initKeys = reactive({
+    signUserName: '',
+    deliveryCode: '',
+    createTimeStart: '',
+    createTimeEnd: '',
+    finalExpress: ''
+  });
+
+  const searchRef = ref(null);
+  /** 搜索 */
+  const search = (data) => {
+    emit('search', { ...data });
+  };
+</script>

+ 2 - 5
src/views/recycleLogistics/expressCheck/index.vue

@@ -20,13 +20,9 @@
 
 <script setup>
   import { ref, reactive } from 'vue';
-  import { ElMessageBox } from 'element-plus/es';
-  import { EleMessage } from 'ele-admin-plus/es';
   import { DownloadOutlined } from '@/components/icons';
   import CommonTable from '@/components/CommonPage/CommonTable.vue';
-  import pageSearch from '../transferSign/components/page-search.vue';
-  import { useDictData } from '@/utils/use-dict-data';
-  import request from '@/utils/request';
+  import pageSearch from './components/page-search.vue';
 
   defineOptions({ name: 'expressCheck' });
 
@@ -37,6 +33,7 @@
       prop: 'signUserName',
       align: 'center'
     },
+    { label: '批次号', prop: 'batchNum', align: 'center' },
     { label: '物流单号', prop: 'expressNumber', align: 'center' },
     { label: '物流CODE', prop: 'finalExpressName', align: 'center' },
     { label: '包裹号', prop: 'packageCode', align: 'center' },

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

@@ -20,7 +20,7 @@
   const formItems = reactive([
     { type: 'input', label: '签收者', prop: 'signUserName' },
     { type: 'input', label: '物流单号', prop: 'deliveryCode' },
-    { type: 'input', label: '物流CODE', prop: 'finalExpress' },
+    { type: 'input', label: '物流CODE', prop: 'expressCode' },
     {
       type: 'datetime',
       label: '签收时间(开始时间)',

+ 10 - 6
src/views/recycleLogistics/warehouse/components/area-setting.vue

@@ -25,7 +25,7 @@
             style="margin-right: 5px"
             :true-value="1"
             :false-value="0"
-            :indeterminate="isIndeterCityShow(item,'otherSelected')"
+            :indeterminate="isIndeterCityShow(item, 'otherSelected')"
             v-if="item.otherSelected == 1"
             disabled
           ></el-checkbox>
@@ -36,7 +36,7 @@
             style="margin-right: 5px"
             :true-value="1"
             :false-value="0"
-            :indeterminate="isIndeterCityShow(item,'mySelected')"
+            :indeterminate="isIndeterCityShow(item, 'mySelected')"
             v-else
           ></el-checkbox>
           <ele-popover
@@ -139,11 +139,13 @@
   const handleOpen = (row) => {
     visible.value = true;
     nextTick(() => {
-      title.value = row.godownName
-        ? `${row.godownName}区域设置`
-        : `仓库区域设置`;
+      if (row && row.id) {
+        title.value = row.godownName
+          ? `${row.godownName}区域设置`
+          : `仓库区域设置`;
 
-      row && getAreaInfo(row.id);
+        row && getAreaInfo(row.id);
+      }
     });
   };
 
@@ -179,6 +181,8 @@
             item.children = res.data.data[item.code];
             areaList.value.push(item);
           });
+
+          console.log(areaList.value, 'areaList.value');
         }
       })
       .finally(() => (loading.value = false));

+ 23 - 0
src/views/recycleLogistics/warehouse/components/warehouse-edit.vue

@@ -32,6 +32,7 @@
   //获取省市
   const provinceList = ref([]);
   const cityList = ref([]);
+  const countyList = ref([]);
   const title = ref('新增仓库');
   const emit = defineEmits(['success']);
 
@@ -72,6 +73,23 @@
         options: cityList.value.map((d) => {
           return { label: d.district, value: d.id };
         }),
+        props: {
+          filterable: true,
+          onChange: (val) => {
+            getProviceList(val).then((res) => {
+              countyList.value = res.data.data;
+            });
+          }
+        }
+      },
+      {
+        type: 'select',
+        label: '所在区',
+        prop: 'countyId',
+        required: true,
+        options: countyList.value.map((d) => {
+          return { label: d.district, value: d.id };
+        }),
         props: {
           filterable: true
         }
@@ -160,6 +178,11 @@
         cityList.value = res.data.data;
       });
     }
+    if (data && data.cityId) {
+      getProviceList(data.cityId).then((res) => {
+        countyList.value = res.data.data;
+      });
+    }
     editRef.value?.handleOpen(formData.value);
   }