Browse Source

feat:更新

钱新宇 1 month ago
parent
commit
4390f67935

+ 3 - 3
traceCodePackages/request/index.js

@@ -2,9 +2,9 @@ import { Request } from "@/service/request/index.js";
 import { Storage } from "@/service/storage";
 const storage = new Storage();
 
-const _baseUrl = import.meta.env.VITE_APP_API_BASEURL5;
-// const subdomain = "/yylm";
-const subdomain = ''
+const _baseUrl = import.meta.env.VITE_APP_API_BASEURL;
+const subdomain = "/yylm";
+// const subdomain = "";
 
 export function downloadFile(url, data = {}) {
   const baseUrl = data.baseUrl || _baseUrl;

+ 1 - 0
traceCodePackages/traceabilityReport/pages/customerScanningRate/detail/index.vue

@@ -228,6 +228,7 @@ export default {
         customerName: this.customerInput?.customerName,
         scanType: this.scanType,
         levelType: this.customerLevel,
+        physicName: this.physicName,
       };
     },
     tableBodyHeight() {

+ 6 - 2
traceCodePackages/traceabilityReport/pages/customerScanningRate/wigets/ScanRateTable.vue

@@ -677,7 +677,11 @@ export default {
         if (this.fetchLoading) return;
         this.fetchLoading = true;
         request(this.api, {
-          physicName: this.product ? this.product?.physicName || "" : "",
+          physicName: this.product
+            ? this.product?.physicName == "全品种"
+              ? ""
+              : this.product?.physicName
+            : "",
           regionCode: this.region ? this.region?.regionCode || "" : "",
           pageNum: this.tablePage,
           pageSize: this.tablePageSize,
@@ -817,7 +821,7 @@ export default {
           "&drugEntBaseInfoId=" +
           (data.druGentBaseInfoId || "") +
           "&physicName=" +
-          encodeURIComponent(data.name || "") +
+          encodeURIComponent(this.product?.physicName || "") +
           "&scanType=" +
           this.scanType +
           (this.params.type ? "&type=" + this.params.type : ""),

+ 13 - 1
traceCodePackages/traceabilityReport/pages/reportExport/index.vue

@@ -398,7 +398,7 @@
               <input
                 class="report-export-dropdown-search-input"
                 v-model="form.otherCustomerCode"
-                placeholder="请填写信用代码(依照其他客户填写顺序用半角逗号隔开)"
+                placeholder="请填写信用代码(依照其他客户填写顺序用半角逗号隔开)"
                 placeholder-class="report-export-dropdown-other-customer-input"
                 :disabled="modalType === 'read'"
                 :style="{ color: '#666', padding: 0, border: 'none' }"
@@ -1570,6 +1570,18 @@ export default {
     onDateChange(val) {
       const arr = Array.isArray(val) ? val : this.dateRange;
       if (!Array.isArray(arr) || arr.length !== 2) return;
+      const startDate = new Date(arr[0].replace(/-/g, "/"));
+      const endDate = new Date(arr[1].replace(/-/g, "/"));
+      const diff = endDate.getTime() - startDate.getTime();
+      const limit = 183 * 24 * 3600 * 1000; // Approx 6 months
+      if (diff > limit) {
+        uni.showToast({
+          title: "时间范围不能超过半年",
+          icon: "none",
+        });
+        this.dateRange = [];
+        return;
+      }
       this.dateRange = [
         this.normalizeDateToYMD(arr[0]),
         this.normalizeDateToYMD(arr[1]),