From 478e4ac9df56ddc6885c3f7c9abce189ecff7924 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 12 十一月 2025 15:08:52 +0800
Subject: [PATCH] 单据优化

---
 src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue |  177 +++++++++++++++++------------------------------------------
 1 files changed, 51 insertions(+), 126 deletions(-)

diff --git a/src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue b/src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue
index b7234d7..aa62e7f 100644
--- a/src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue
+++ b/src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue
@@ -68,6 +68,34 @@
 
       <el-collapse v-model="activeSeach">
         <el-collapse-item title="鏇村" name="1">
+          <el-form-item label="涓氬姟鍛�" prop="HEmpName">
+            <el-input
+              v-model="queryParams.HEmpName"
+              placeholder="璇疯緭鍏ヤ笟鍔″憳"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="鐗╂枡浠g爜" prop="HMaterNumber">
+            <el-input
+              v-model="queryParams.HMaterNumber"
+              placeholder="璇疯緭鍏ョ墿鏂欎唬鐮�"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="鐗╂枡鍚嶇О" prop="HMaterName">
+            <el-input
+              v-model="queryParams.HMaterName"
+              placeholder="璇疯緭鍏ョ墿鏂欏悕绉�"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="渚涘簲鍟�" prop="HSupName">
+            <el-input
+              v-model="queryParams.HSupName"
+              placeholder="璇疯緭鍏ヤ緵搴斿晢"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
           <el-card class="box-card">
             <div slot="header" class="clearfix"><span>杩囨护</span></div>
             <div>
@@ -209,89 +237,6 @@
       </el-collapse>
     </el-form>
 
-    <el-row>
-      <el-form>
-        <el-col :span="4" class="inline">
-          <el-form-item label="鏃ユ湡闂撮殧" class="form-item-inline">
-            <el-select
-              v-model="queryParams.timeSpan"
-              placeholder="璇烽�夋嫨鏃ユ湡闂撮殧"
-              @change="onDateScanOptionChangerHandler"
-            >
-              <el-option
-                v-for="(item, index) in [
-                  {
-                    label: '浠绘剰闂撮殧',
-                    value: -1,
-                  },
-                  {
-                    label: '浠婂ぉ',
-                    value: 0,
-                  },
-                  {
-                    label: '杩戜袱澶�',
-                    value: 1,
-                  },
-                  {
-                    label: '杩戜笁澶�',
-                    value: 2,
-                  },
-                  {
-                    label: '杩戝洓澶�',
-                    value: 3,
-                  },
-                  {
-                    label: '杩戜簲澶�',
-                    value: 4,
-                  },
-                  {
-                    label: '杩戝叚澶�',
-                    value: 5,
-                  },
-                  {
-                    label: '杩戜竷澶�',
-                    value: 6,
-                  },
-                  {
-                    label: '杩�30澶�',
-                    value: 29,
-                  },
-                  {
-                    label: '杩戝崐骞�',
-                    value: 182,
-                  },
-                  {
-                    label: '杩戜竴骞�',
-                    value: 365,
-                  },
-                ]"
-                :key="item.id"
-                :label="item.label"
-                :value="item.value"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="4">
-          <el-form-item label="寮�濮嬫棩鏈�" class="form-item-inline">
-            <el-date-picker
-              v-model="queryParams.HBeginDate"
-              :disabled="disableDataPicker"
-              value-format="yyyy-MM-DD"
-            ></el-date-picker>
-          </el-form-item>
-        </el-col>
-        <el-col :span="4">
-          <el-form-item label="缁撴潫鏃ユ湡" class="form-item-inline">
-            <el-date-picker
-              v-model="queryParams.HEndDate"
-              :disabled="disableDataPicker"
-              value-format="yyyy-MM-DD"
-            ></el-date-picker>
-          </el-form-item>
-        </el-col>
-      </el-form>
-    </el-row>
     <el-row :gutter="10" class="mb8">
       <!-- <el-col :span="1.5">
         <el-button
@@ -727,7 +672,7 @@
       openData: false, //鏁版嵁寮圭獥
       dialogTitle: "",
       zuzhiId: "",
-      organizationList: [], //缁勭粐鍒楄〃
+      organizationList: JSON.parse(sessionStorage.getItem("organizationList")), //缁勭粐鍒楄〃
       subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
       OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
       HInterID: null,
@@ -760,7 +705,7 @@
         ColContent1: "",
         ColContent2: "",
         ColContent: "",
-        timeSpan: 29,
+        HInitTimeCycle: 29,
         HBeginDate: dayjs(new Date()).subtract(29, "d").format("YYYY-MM-DDTHH:mm:ss"),
         HEndDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
       },
@@ -818,7 +763,9 @@
       uploadTotal: 0,
     };
   },
-  mounted() {},
+  mounted() {
+    this.queryParams.HOrgID = sessionStorage["Organization"];
+  },
   created() {
     this.riqiChange();
     this.getList();
@@ -948,35 +895,6 @@
       this.dbEmitData(this.deptform, this.dialogTypeNum);
       this.deptform = {};
     },
-    fetchData() {
-      //鐧诲綍鐢ㄦ埛淇℃伅
-      axios
-        .get(
-          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
-        )
-        .then((response) => {
-          let data = response.data.data[0];
-          this.zuzhiId = data.HUSEORGID; //鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇榛樿鐨勭粍缁嘔D
-          this.queryParams.HOrgID = data.HUSEORGID;
-          this.user = data.Czymc;
-          axios
-            .get(this.baseURL + "/Web/GetOrganizations", {})
-            .then((response) => {
-              if (response.data.count == 1) {
-                this.organizationList = response.data.data; //缁勭粐鍒楄〃
-              }
-
-              this.handleQuery();
-              // this.getList();
-            })
-            .catch((error) => {
-              this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-            });
-        })
-        .catch((error) => {
-          this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-        });
-    },
     getList() {
       this.tableShow = false;
       this.loading = true;
@@ -989,7 +907,6 @@
         this.sWhere +=
           " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.dateRange[1] + "'";
       }
-      // this.queryParams.HOrgID = 100038
       // this.sWhere += ` and CONVERT(varchar(100),鏃ユ湡, 23) >= '2020-01-01' and CONVERT(varchar(100),鏃ユ湡, 23) <= '2030-01-01'`;
       //鐢熶骇璧勬枡鍒楄〃
       axios
@@ -1062,8 +979,8 @@
             var result = data1.data;
             var temp = "";
             for (var i = 0; i < result.length; i++) {
-              if (temp != result[i]["HItemID"]) {
-                temp = result[i]["HItemID"];
+              if (temp != result[i]["hmainid"]) {
+                temp = result[i]["hmainid"];
               } else {
                 result[i].鏃ユ湡 = null;
                 result[i].鍗曟嵁鍙� = "";
@@ -1342,16 +1259,24 @@
         }
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
-      if (this.queryParams.HNumber) {
-        this.sWhere += " and 鐢熶骇璧勬簮浠g爜 like '%" + this.queryParams.HNumber + "%'";
-      }
-      if (this.queryParams.HName) {
-        this.sWhere += " and 鐢熶骇璧勬簮鍚嶇О like '%" + this.queryParams.HName + "%'";
+      if (this.queryParams.HBillNo) {
+        this.sWhere += " and 鍗曟嵁鍙� like '%" + this.queryParams.HBillNo + "%'";
       }
 
-      if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
-        console.log(this.queryParams.HBeginDate, this.queryParams.HEndDate);
-        this.sWhere += `  and CONVERT(varchar(100),鏃ユ湡, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),鏃ユ湡, 23) <= '${this.queryParams.HEndDate}'`;
+      if (this.queryParams.HEmpName) {
+        sWhere += " and 涓氬姟鍛� like '%" + this.queryParams.HEmpName + "%'";
+      }
+
+      if (this.queryParams.HMaterNumber) {
+        sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.HMaterNumber + "%'";
+      }
+
+      if (this.queryParams.HMaterName) {
+        sWhere += " and 鐗╂枡鍚嶇О like '%" + this.queryParams.HMaterName + "%'";
+      }
+
+      if (this.queryParams.HSupName) {
+        sWhere += " and 渚涘簲鍟� like '%" + this.queryParams.HSupName + "%'";
       }
       // if (this.queryParams.HOrgID) {
       //   this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";

--
Gitblit v1.9.1