Browse Source

Merge branch 'master' into dev0.3

asd26269546 1 year ago
parent
commit
397e4b13a5

+ 1 - 1
src/components/byTable/index.vue

@@ -128,7 +128,7 @@
           type="primary"
           style="margin-left: 10px"
           size="default"
-          @click="searchFn"
+          v-no-double-click="searchFn"
           >{{ $t("common.search") }}</el-button
         >
         <div

+ 2 - 2
src/components/process/Contract.vue

@@ -1745,7 +1745,7 @@ const acquireSelectList = () => {
 onMounted(() => {
   if (!route.query.processType || route.query.processType == 30) {
     proxy
-      .post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 })
+      .post("/customer/privateSeaPage", { pageNum: 1, pageSize: 9999 })
       .then((res) => {
         customerList.value = res.rows.map((item) => {
           return {
@@ -1756,7 +1756,7 @@ onMounted(() => {
         });
       });
   } else {
-    proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    proxy.post("/customer/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
       customerList.value = res.rows.map((item) => {
         return {
           ...item,

+ 1 - 1
src/components/process/ContractAlteration.vue

@@ -930,7 +930,7 @@ const getDict = () => {
       };
     });
   });
-  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
+  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 9999 }).then((res) => {
     customerList.value = res.rows.map((item) => {
       return {
         ...item,

+ 2 - 0
src/directive/index.js

@@ -2,10 +2,12 @@ import hasRole from './permission/hasRole'
 import hasPermi from './permission/hasPermi'
 import copyText from './common/copyText'
 import mousewheel from './permission/mousewheel'
+import noDoubleClick from './permission/noDoubleClick'
 
 export default function directive(app){
   app.directive('hasRole', hasRole)
   app.directive('hasPermi', hasPermi)
   app.directive('copyText', copyText)
   app.directive('mousewheel', mousewheel)
+  app.directive('noDoubleClick', noDoubleClick)
 }

+ 51 - 0
src/directive/permission/noDoubleClick.js

@@ -0,0 +1,51 @@
+// 自定义指令定义  
+{/* demo <div v-no-double-click="myMethod">Click me</div>   */ }
+
+export default {
+    mounted(el, binding, vnode) {
+        // 记录上一次点击的时间  
+        let lastClickTime = 0;
+
+        // 监听元素的点击事件  
+        el.addEventListener('click', function (event) {
+            console.log(lastClickTime)
+            if(lastClickTime == 0){
+                binding.value(event);
+                lastClickTime = Date.now();
+            }else{
+                // 获取当前时间戳  
+                let currentTime = Date.now();
+                // 定义禁止连续点击的时间间隔(以毫秒为单位)  
+                const doubleClickInterval = 500;
+                // 检查是否在禁止的时间间隔内进行了连续点击  
+                if (currentTime - lastClickTime > doubleClickInterval) {
+                    // 阻止默认行为  
+                    event.preventDefault();
+                    binding.value(event);
+                    // 更新上一次点击的时间戳
+                    lastClickTime = currentTime;
+                }
+            }
+            
+        });
+        // let clickTimer;
+        // console.log(el, binding, vnode)
+        // console.log('v-no-double-click mounted')
+        // el.addEventListener('click', function (event) {
+        //     if (clickTimer) {
+        //         // 如果上一次点击的计时器还存在,则取消计时器并阻止连续点击  
+        //         clearTimeout(clickTimer);
+        //     }
+
+        //     // 创建一个延迟执行的函数,以防止连续点击  
+        //     clickTimer = setTimeout(() => {
+        //         binding.value(event)
+        //     }, 200); // 设置延迟时间(毫秒)  
+        // });
+    },
+    // 在元素被插入到 DOM 中时被调用  
+    inserted: function (el, binding, vnode) {
+        
+    }
+
+} 

+ 1 - 0
src/store/modules/tagsView.js

@@ -34,6 +34,7 @@ const useTagsViewStore = defineStore(
             title: title
           })
         )
+        console.log(this.visitedViews)
       },
       addCachedView(view) {
         if (this.cachedViews.includes(view.name)) return

+ 1 - 0
src/views/salesMange/salesMange/performance/index.vue

@@ -81,6 +81,7 @@
               prop="contractArrival"
               width="120"
             />
+            <el-table-column label="退税" prop="taxReturnAmount" width="120" />
             <el-table-column label="其他收入" prop="otherIncome" width="120" />
           </el-table-column>
           <el-table-column label="采购合同金额">

+ 1 - 0
src/views/salesMange/salesMange/profitSettlement/index.vue

@@ -673,6 +673,7 @@ const clickSettlement = (row) => {
     grossRofitMargin: row.grossProfitMargin,
     contractCurrency: row.currency,
     purchaseCurrency: "CNY",
+    taxReturnAmount: row.taxReturnMoney,
     settlementStatus: 1,
   };
   proxy.post("/saleStatement/settlement", data).then(() => {

+ 50 - 79
src/views/salesMange/shipmentMange/document/index.vue

@@ -1196,8 +1196,8 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button type="primary" @click="clickDownload()" size="large"
-          >下载PDF </el-button
-        >
+          >下载PDF
+        </el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
       </template>
     </el-dialog>
@@ -2171,7 +2171,7 @@
       width="1000"
     >
       <div id="pdfDomOne" style="font-family: 'msyh'">
-        <div id="mandate" style="padding: 30px">
+        <div id="mandate" style="padding: 30px; font-size: 13px">
           <div class="title">代 理 报 关 委 托 书</div>
           <div style="text-align: right">
             <span>编号:</span>
@@ -2201,36 +2201,32 @@
           </div>
           <div>
             <span style="padding-left: 2em">我单位现</span>
-            <span v-if="textShowOne">{{
-              mandateData.type ? "长期" : "逐票"
-            }}</span>
-            <span class="select_height">
+            <span v-if="textShowOne">
+              {{ mandateData.type }}
+            </span>
+            <span>
               <el-select
                 v-model="mandateData.type"
-                class="m-2"
                 placeholder="请选择"
                 v-if="!textShowOne"
+                style="width: 150px; margin: 0 5px"
               >
-                <el-option label="逐票" value="0" />
-                <el-option label="长期" value="1" />
+                <el-option label="A" value="A" />
+                <el-option label="B" value="B" />
               </el-select>
             </span>
-            委托贵公司代理
+            (A 逐票、B 长期) 委托贵公司代理
             <span v-if="textShowOne">
-              (<span
-                v-for="(item, index) in mandateData.agentList"
-                :key="index"
-              >
-                {{ showLabelData(item) }}
+              <span v-for="(item, index) in mandateData.agentList" :key="index">
+                {{ item }}
                 <span v-if="index < mandateData.agentList.length - 1">,</span>
               </span>
-              )
             </span>
             <el-select
               v-model="mandateData.agentList"
               multiple
               placeholder="请选择"
-              style="width: 240px"
+              style="width: 240px; margin: 0 5px"
               v-if="!textShowOne"
             >
               <el-option
@@ -2240,7 +2236,10 @@
                 :value="item.value"
               />
             </el-select>
-            等通关事宜。详见《委托报关协议》
+            等通关事宜。〔A、填单申报 B、申请、联系 和配合实施检验检疫
+            C、辅助查验 D、代缴税款
+            E、设立手册(账册)F、核销手册(账册)G、领取海 关相关单证
+            H、其他〕详见《委托报关协议》
           </div>
           <div style="text-indent: 2em">
             我单位保证遵守海关有关法律、法规、规章,保证所提供的情况真实、完整、单货相符,无侵犯他
@@ -2257,6 +2256,7 @@
               size="default"
               value-format="YYYY-MM-DD"
               v-if="!textShowOne"
+              style="width: 150px; margin: 0 5px"
             />止。
           </div>
           <div style="text-align: right; padding-right: 150px">
@@ -2276,6 +2276,7 @@
               size="default"
               value-format="YYYY-MM-DD"
               v-if="!textShowOne"
+              style="width: 150px; margin: 0 5px"
             />
           </div>
           <div class="title" style="margin-bottom: 10px">委 托 报 关 协 议</div>
@@ -2291,13 +2292,13 @@
                     <span v-if="textShowOne">{{
                       dictValueLabel(mandateData.companyId, companyData)
                     }}</span>
-                    <span class="select_height">
+                    <span>
                       <el-select
                         v-model="mandateData.companyId"
-                        class="m-2"
                         placeholder="请选择"
                         v-if="!textShowOne"
-                        style="height: 26px"
+                        style="height: 26px; width: 100%"
+                        class="m-2 select_height"
                       >
                         <el-option
                           v-for="item in companyData"
@@ -2329,7 +2330,7 @@
                       size="default"
                       value-format="YYYY-MM-DD"
                       v-if="!textShowOne"
-                      style="height: 26px"
+                      style="height: 26px; width: 100%"
                     />
                   </td>
                 </tr>
@@ -2380,7 +2381,10 @@
                   <td>{{ mandateData.transport_method }}</td>
                 </tr>
                 <tr>
-                  <td colspan="2" style="text-align: left; height: auto">
+                  <td
+                    colspan="2"
+                    style="text-align: left; height: 120px; vertical-align: top"
+                  >
                     <span> 其他要求:</span>
                     <span v-if="textShowOne">{{ mandateData.otherAsk }}</span>
                     <el-input
@@ -2390,7 +2394,7 @@
                       v-if="!textShowOne"
                       v-model="mandateData.otherAsk"
                       size="small"
-                      :rows="3"
+                      :rows="5"
                       style="width: 82%"
                     />
                   </td>
@@ -2405,7 +2409,7 @@
                   <td colspan="2" style="text-align: left">
                     <div style="display: flex">
                       <div>委托方签章:</div>
-                      <div style="height: 200px"></div>
+                      <div style="height: 100px"></div>
                     </div>
                     <div style="text-align: left">经办人签字:</div>
                     <div style="display: flex; justify-content: space-between">
@@ -2445,7 +2449,11 @@
                 <tr>
                   <td
                     colspan="2"
-                    style="text-align: left; height: 108px; vertical-align: top"
+                    style="
+                      text-align: left;
+                      height: 77.5px;
+                      vertical-align: top;
+                    "
                   >
                     其他
                     <!-- <el-input
@@ -2468,7 +2476,10 @@
                   </td>
                 </tr>
                 <tr>
-                  <td colspan="3" style="text-align: left; height: auto">
+                  <td
+                    colspan="3"
+                    style="text-align: left; height: 120px; vertical-align: top"
+                  >
                     承诺说明: <span v-if="textShowOne"></span>
                   </td>
                 </tr>
@@ -2482,7 +2493,7 @@
                   <td colspan="3" style="text-align: left">
                     <div style="display: flex">
                       <div>被委托方签章:</div>
-                      <div style="height: 200px"></div>
+                      <div style="height: 100px"></div>
                     </div>
                     <div style="text-align: left">报关人员签名:</div>
                     <div style="display: flex; justify-content: space-between">
@@ -3071,71 +3082,38 @@ const mandateData = ref({
 const selectData = ref([
   {
     label: "A",
-    value: "0",
+    value: "A",
   },
   {
     label: "B",
-    value: "1",
+    value: "B",
   },
   {
     label: "C",
-    value: "2",
+    value: "C",
   },
   {
     label: "D",
-    value: "3",
+    value: "D",
   },
   {
     label: "E",
-    value: "4",
+    value: "E",
   },
   {
     label: "F",
-    value: "5",
+    value: "F",
   },
   {
     label: "G",
-    value: "6",
+    value: "G",
   },
   {
     label: "H",
-    value: "7",
-  },
-]);
-const selectDataOne = ref([
-  {
-    label: "填单申报",
-    value: "0",
-  },
-  {
-    label: "申请、联系和配合实施检验检疫",
-    value: "1",
-  },
-  {
-    label: "辅助查验",
-    value: "2",
-  },
-  {
-    label: "代缴税款",
-    value: "3",
-  },
-  {
-    label: "设立手册(账册)",
-    value: "4",
-  },
-  {
-    label: "核销手册(账册)",
-    value: "5",
-  },
-  {
-    label: "领取海关相关单证",
-    value: "6",
-  },
-  {
-    label: "其他",
-    value: "7",
+    value: "H",
   },
 ]);
+
 const clickPrint = (status) => {
   // printDetails.value = {
   //   packDetailGoodsList: [],
@@ -3334,12 +3312,6 @@ const getChineseDate = (date) => {
     return year + "年" + month + "月" + day + "日 ";
   }
 };
-const showLabelData = (val) => {
-  const current = selectDataOne.value.find((x) => x.value === val);
-  if (current && current.label) {
-    return current.label;
-  }
-};
 </script>
 
 <style lang="scss" scoped>
@@ -3446,7 +3418,7 @@ const showLabelData = (val) => {
   // display: none;
 }
 :deep(#mandate .select_height .el-input__wrapper) {
-  // height: 26px;
+  height: 26px;
 }
 
 :deep(#mandate .el-textarea) {
@@ -3478,7 +3450,6 @@ const showLabelData = (val) => {
   td {
     text-align: center;
     padding: 4px 8px;
-    height: 36px;
   }
 }
 </style>

+ 28 - 10
src/views/system/user2/index.vue

@@ -303,16 +303,32 @@ const formConfig = computed(() => {
   ];
 });
 const newPassword = () => {
-  formData.data.password = generatePassword();
+  console.log(generatePassword1());
+  formData.data.password = generatePassword1();
 };
-const generatePassword = () => {
-  var length = 12,
-    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
-    password = "";
-  for (var i = 0, n = charset.length; i < length; ++i) {
-    password += charset.charAt(Math.floor(Math.random() * n));
+const generatePassword1 = () => {
+  //随机生成一个密码,必须包含大小写和数字,且不能有连续三个相同的字符
+  const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';  
+  const passwordLength = 10; // 密码长度,你可以根据需要调整  
+  var password1 = '';  
+  
+  for (let i = 0; i < passwordLength; i++) {  
+    // 随机选择一个字符  
+    const randomChar = chars.charAt(Math.floor(Math.random() * chars.length));  
+  
+    // 如果前两个字符是相同的,并且当前字符不是大写,那么我们就选择一个大写字符  
+    if (i < 2 && password1.length < 2 && randomChar === password1[password1.length - 1]) {  
+      continue;  
+    }  
+  
+    // 如果前三个字符是相同的,并且当前字符是大写,那么我们就选择一个小写字符  
+    if (i < 3 && password1.length < 3 && randomChar === password1[password1.length - 1] && randomChar === password1[password1.length - 2] && randomChar.toUpperCase() === password1[password1.length - 2]) {  
+      continue;  
+    }  
+  
+    password1 += randomChar;  
   }
-  return password;
+  return password1;
 };
 
 const getTreeList = () => {
@@ -428,9 +444,11 @@ const getDept = () => {
 };
 
 const submitPassword = (password1) => {
-  if (!password1) {
+  //正则判断密码构成 必须有大写小写数字,而且不能有连续三个相同的字符
+  const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*([a-zA-Z0-9])\1{2}).{8,16}$/;
+  if (!reg.test(password1)) {
     ElMessage({
-      message: "请输入新密码",
+      message: "密码必须有大写小写数字,而且不能有连续三个相同的字符",
       type: "warning",
     });
     return;

+ 27 - 13
src/views/systemTenant/tenant/userTenant/index.vue

@@ -346,31 +346,45 @@ const getDtl = (row) => {
   });
 };
 const newPassword = () => {
-  formData.data.password = generatePassword();
+  formData.data.password = generatePassword1();
 };
-const generatePassword = () => {
-  var length = 12,
-    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
-    password = "";
-  for (var i = 0, n = charset.length; i < length; ++i) {
-    password += charset.charAt(Math.floor(Math.random() * n));
+const generatePassword1 = () => {
+  //随机生成一个密码,必须包含大小写和数字,且不能有连续三个相同的字符
+  const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';  
+  const passwordLength = 10; // 密码长度,你可以根据需要调整  
+  var password1 = '';  
+  
+  for (let i = 0; i < passwordLength; i++) {  
+    // 随机选择一个字符  
+    const randomChar = chars.charAt(Math.floor(Math.random() * chars.length));  
+  
+    // 如果前两个字符是相同的,并且当前字符不是大写,那么我们就选择一个大写字符  
+    if (i < 2 && password1.length < 2 && randomChar === password1[password1.length - 1]) {  
+      continue;  
+    }  
+  
+    // 如果前三个字符是相同的,并且当前字符是大写,那么我们就选择一个小写字符  
+    if (i < 3 && password1.length < 3 && randomChar === password1[password1.length - 1] && randomChar === password1[password1.length - 2] && randomChar.toUpperCase() === password1[password1.length - 2]) {  
+      continue;  
+    }  
+  
+    password1 += randomChar;  
   }
-  return password;
+  return password1;
 };
 const userId = ref("");
 const password = ref("");
 const roomDialogVisible = ref(false);
 const submitPassword = (password1) => {
-  if (!password1) {
+  //正则判断密码构成 必须有大写小写数字,而且不能有连续三个相同的字符
+  const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*([a-zA-Z0-9])\1{2}).{8,16}$/;
+  if (!reg.test(password1)) {
     ElMessage({
-      message: "请输入新密码",
+      message: "密码必须有大写小写数字,而且不能有连续三个相同的字符",
       type: "warning",
     });
     return;
   }
-  if (password1.length < 5) {
-    return ElMessage("密码长度不得低于五位");
-  }
   proxy
     .post(
       "/tenantUser/resetPwd",