From 7fb0a8f0ab16c149484bf043754cd10cfa94de2f Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 19 一月 2026 14:48:05 +0800
Subject: [PATCH] 增加了业务员,保管员和验收员的对应的显示

---
 src/views/component/HSourceReportHtml/index.vue |  231 +++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 141 insertions(+), 90 deletions(-)

diff --git a/src/views/component/HSourceReportHtml/index.vue b/src/views/component/HSourceReportHtml/index.vue
index b65379e..9471658 100644
--- a/src/views/component/HSourceReportHtml/index.vue
+++ b/src/views/component/HSourceReportHtml/index.vue
@@ -2,13 +2,19 @@
     <div style="padding: 10px; position: relative;">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="78px" class="searchBox">
             <el-form-item label="鍗曟嵁鍙�" prop="HBillNo" style="margin-left: 100px">
-                <el-input v-model="queryParams.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" @keyup.enter.native="handleQuery" />
+                <el-input v-model="queryParams.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" style="width: 150px" />
             </el-form-item>
-            <el-form-item label="閮ㄩ棬">
+            <el-form-item label="閮ㄩ棬" label-width="48px">
                 <el-select v-model="queryParams.HDeptName" placeholder="璇烽�夋嫨" style="width: 150px">
                     <el-option v-for="(item, index) in HDeptList" :key="index" :label="item.HName"
-                        :value="item.HName" />
+                        :value="item.HItemID" />
                 </el-select>
+            </el-form-item>
+            <el-form-item label="娴佽浆鍗″彿" prop="HProcExchBillNo" v-if="HSouceBillType == '鐢熶骇鍏ュ簱鍗�'">
+                <el-input v-model="queryParams.HProcExchBillNo" placeholder="璇疯緭鍏ユ祦杞崱鍙�" style="width: 150px" />
+            </el-form-item>
+            <el-form-item label="鐗╂枡缂栫爜" prop="PartNumber">
+                <el-input v-model="queryParams.PartNumber" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" style="width: 150px" />
             </el-form-item>
             <el-form-item label-width="78px">
                 <el-button type="primary" icon="el-icon-search" @click="handleQuery">
@@ -18,21 +24,33 @@
             <el-collapse v-model="activeSeach">
                 <el-collapse-item title="鏇村" name="1">
                     <el-card class="box-card">
-                        <el-form-item label="閮ㄩ棬鍚嶇О" prop="HDepartName">
-                            <el-input v-model="queryParams.HDepartName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�"
-                                @keyup.enter.native="HDepartName" />
+                        <el-form-item label="鐗╂枡鍚嶇О" prop="PartName">
+                            <el-input v-model="queryParams.PartName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" />
                         </el-form-item>
-                        <el-form-item label="鐗╂枡浠g爜" prop="HMaterNumber">
-                            <el-input v-model="queryParams.HMaterNumber" placeholder="璇疯緭鍏ョ墿鏂欎唬鐮�"
-                                @keyup.enter.native="handleQuery" />
+                        <el-form-item label="鐘舵��" prop="HBillStatus">
+                            <el-select v-model="queryParams.HBillStatus" placeholder="璇烽�夋嫨">
+                                <el-option label="璁″垝" value="璁″垝" />
+                                <el-option label="璁″垝纭" value="璁″垝纭" />
+                                <el-option label="涓嬭揪" value="涓嬭揪" />
+                                <el-option label="寮�宸�" value="寮�宸�" />
+                                <el-option label="瀹屽伐" value="瀹屽伐" />
+                                <el-option label="缁撴" value="缁撴" />
+                                <el-option label="缁撴" value="缁撶畻" />
+                            </el-select>
                         </el-form-item>
-                        <el-form-item label="鐗╂枡鍚嶇О" prop="HMaterName">
-                            <el-input v-model="queryParams.HMaterName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�"
-                                @keyup.enter.native="handleQuery" />
+                        <el-form-item label="棰嗘枡鐘舵��" prop="HSPickMtrlStatus" v-if="HSouceBillType == '鐢熶骇璁㈠崟'">
+                            <el-select v-model="queryParams.HSPickMtrlStatus" placeholder="璇烽�夋嫨">
+                                <el-option label="鏈鏂�" value="鏈鏂�" />
+                                <el-option label="閮ㄥ垎棰嗘枡" value="閮ㄥ垎棰嗘枡" />
+                                <el-option label="鍏ㄩ儴棰嗘枡" value="鍏ㄩ儴棰嗘枡" />
+                                <el-option label="瓒呴棰嗘枡" value="瓒呴棰嗘枡" />
+                            </el-select>
                         </el-form-item>
-                        <el-form-item label="浠撳簱" prop="HWHID">
-                            <el-input v-model="queryParams.HWHID" placeholder="璇疯緭鍏ヤ粨搴�"
-                                @keyup.enter.native="handleQuery" />
+                        <el-form-item label="鏄惁鎺掍骇" prop="HIsScheduling" v-if="HSouceBillType == '鐢熶骇璁㈠崟'">
+                            <el-select v-model="queryParams.HIsScheduling" placeholder="璇烽�夋嫨">
+                                <el-option label="宸叉帓浜�" value="宸叉帓浜�" />
+                                <el-option label="鏈帓浜�" value="鏈帓浜�" />
+                            </el-select>
                         </el-form-item>
                         <div slot="header" class="clearfix"><span>杩囨护</span></div>
                         <div>
@@ -54,8 +72,7 @@
                                             </el-select>
                                         </el-col>
                                         <el-col :span="11">
-                                            <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
-                                                @keyup.enter.native="handleQuery" />
+                                            <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable />
                                         </el-col>
                                     </el-row>
                                 </el-form-item>
@@ -166,10 +183,12 @@
             queryParams: {
                 HBillNo: "",
                 HDeptName: '',
-                HDepartName: "",
-                HWHID: null,
-                HMaterNumber: "",
-                HMaterName: "",
+                HProcExchBillNo: "",
+                PartNumber: "",
+                PartName: "",
+                HBillStatus: '寮�宸�',
+                HSPickMtrlStatus: "",
+                HIsScheduling: "",
                 ColName1: "",
                 ColName2: "",
                 ColName: "",
@@ -247,7 +266,7 @@
             this.getList();
         },
         getDeptList() {
-            axios.get(this.baseURL + "/Sc_ICMOBill/GetHDeptList", {
+            axios.get(this.$baseUrl + "/Sc_ICMOBill/GetHDeptList", {
                 params: {
                     HOrgID: this.HOrgID
                 },
@@ -266,8 +285,19 @@
             if (this.pageSize == 0) {
                 this.pageSize = 50;
             }
+            if (this.queryParams.HBillStatus && this.HSouceBillType == '鐢熶骇璁㈠崟') {
+                this.sWhere += " and 鐘舵�� = '" + this.queryParams.HBillStatus + "'";
+            }
+            if (this.HSouceBillType == '鐢熶骇璁㈠崟') {
+                this.queryParams.HIsScheduling = '宸叉帓浜�'
+                if (sessionStorage["Organization"] == "涔濊彵鐢垫満") {
+                    if (this.queryParams.HIsScheduling) {
+                        this.sWhere += this.queryParams.HIsScheduling == "鏈帓浜�" ? "and 鏄惁鎺掍骇 = ''" : " and 鏄惁鎺掍骇 = '" + this.queryParams.HIsScheduling + "'"
+                    }
+                }
+            }
             // 鍒楄〃
-            axios.get(this.baseURL + "/Sc_BarCode/ReportFromBillList", {
+            axios.get(this.$baseUrl + "/Sc_BarCode/ReportFromBillList_New", {
                 params: {
                     sWhere: this.sWhere,
                     HSouceBillType: this.HSouceBillType,
@@ -276,66 +306,75 @@
                     limit: this.pageSize,
                 },
             }).then((response) => {
+                console.log(response)
                 this.tyResList = response.data.data; //鎬绘暟鎹�
                 let data1 = response.data;
+
                 let option = [];
-                if (data1.code == 1) {
-                    this.btResList = data1.list; //鎺ュ彛琛ㄥご鏁版嵁
-                    this.total = data1.count;
-                    var data = []; //鍒楀瓧娈垫暟鎹�
-                    var col = [];
-                    var totalArray = ["浠舵暟"];
-                    //缁欑┖鐨勬暟缁勮祴鍊�
-                    for (var key in data1.list) {
-                        //寰簭閬嶅巻鏁扮粍
-                        data.push({
-                            id: data1.list[key].ColmCols,
-                            name: data1.list[key].ColmCols,
-                            Type: data1.list[key].ColmType,
-                        }); //浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+                // if (data1.code == 1) {
+                this.btResList = data1.list; //鎺ュ彛琛ㄥご鏁版嵁
+                this.total = data1.count;
+                var data = []; //鍒楀瓧娈垫暟鎹�
+                var col = [];
+                var totalArray = ["浠舵暟"];
+                //缁欑┖鐨勬暟缁勮祴鍊�
+                for (var key in data1.list) {
+                    //寰簭閬嶅巻鏁扮粍
+                    data.push({
+                        id: data1.list[key].ColmCols,
+                        name: data1.list[key].ColmCols,
+                        Type: data1.list[key].ColmType,
+                    }); //浠庢瘡涓璞′腑鎻愬彇鏁版嵁
+                    var patrn = new RegExp(/^h/i);
+                    if (patrn.test(data1.list[key].ColmCols)) {
+                        this.titleData[key] = data1.list[key].ColmCols;
                     }
-                    //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
-                    col.push({ type: "checkbox", fixed: "left", totalRowText: "鍚堣" });
-                    for (var i = 0; i < data.length; i++) {
-                        //閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
-                        if (this.titleData.indexOf(data[i].name) > -1) {
-                            //妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑  //璁$畻鍒�
-                            col.push({
-                                field: data[i].id,
-                                title: data[i].name,
-                                align: "center",
-                                hide: true,
-                            }); //闅愯棌id鍒�
-                        } else if (
-                            totalArray.indexOf(data[i].name) > -1 ||
-                            data[i].Type == "Decimal" ||
-                            data[i].Type == "Int32"
-                        ) {
-                            //璁$畻鍒�
-                            col.push({
-                                field: data[i].id,
-                                title: data[i].name,
-                                align: "center",
-                                sort: true,
-                                totalRow: true,
-                                width: 120,
-                            });
-                        } else {
-                            col.push({
-                                field: data[i].id,
-                                title: data[i].name,
-                                align: "center",
-                                sort: true,
-                                width: 200,
-                            });
-                        }
+                }
+                //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                col.push({ type: "checkbox", fixed: "left", totalRowText: "鍚堣" });
+                for (var i = 0; i < data.length; i++) {
+                    //閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
+                    if (this.titleData.indexOf(data[i].name) > -1) {
+                        //妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑  //璁$畻鍒�
+                        col.push({
+                            field: data[i].id,
+                            title: data[i].name,
+                            align: "center",
+                            hide: true,
+                        }); //闅愯棌id鍒�
+                    } else if (
+                        totalArray.indexOf(data[i].name) > -1 ||
+                        data[i].Type == "Decimal" ||
+                        data[i].Type == "Int32"
+                    ) {
+                        //璁$畻鍒�
+                        col.push({
+                            field: data[i].id,
+                            title: data[i].name,
+                            align: "center",
+                            sort: true,
+                            totalRow: true,
+                            width: 120,
+                        });
+                    } else {
+                        col.push({
+                            field: data[i].id,
+                            title: data[i].name,
+                            align: "center",
+                            sort: true,
+                            width: 200,
+                        });
                     }
-                    option.cols = [col];
-                    this.dataList = option;
-                    option.data = data1.data;
-                    var result = data1.data;
-                    option.data = result;
-                     switch (this.HSouceBillType) {
+                }
+                option.cols = [col];
+                this.dataList = option;
+                if (data1.code == 0) {
+                    data1.data = []
+                }
+                option.data = data1.data;
+                var result = data1.data;
+                option.data = result;
+                switch (this.HSouceBillType) {
                     case '鐢熶骇璁㈠崟':
                         this.HModName = "Sc_ICMOBill_3710";
                         break;
@@ -374,16 +413,17 @@
                         this.HModName = "MateOutBill_1204";
                         break;
                 }
-                    this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
-                }
+                this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
+                // }
             }).catch((error) => {
+                console.log(error)
                 this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
             });
         },
         DisPlay_HideColumn(HModName, user, option, dataOption) {
             this.totalNameList = [];
             axios
-                .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
+                .get(this.$baseUrl + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
                     params: {
                         HModName: HModName,
                         user: user,
@@ -640,17 +680,28 @@
             if (this.queryParams.HBillNo) {
                 this.sWhere += " and 鍗曟嵁鍙� like '%" + this.queryParams.HBillNo + "%'";
             }
-            if (this.queryParams.HDepartName) {
-                this.sWhere += " and 閮ㄩ棬鍚嶇О like '%" + this.queryParams.HDepartName + "%'";
+            if (this.queryParams.HProcExchBillNo && this.HSouceBillType == '鐢熶骇鍏ュ簱鍗�') {
+                this.sWhere += " and 娴佽浆鍗″彿 like '%" + this.queryParams.HProcExchBillNo + "%'";
             }
-            if (this.queryParams.HWHID) {
-                this.sWhere += " and 浠撳簱 like '%" + this.queryParams.HWHID + "%'";
+            if (this.queryParams.HDeptName) {
+                this.sWhere += " and HDeptID = '" + this.queryParams.HDeptName + "'";
             }
-            if (this.queryParams.HMaterNumber) {
-                this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.HMaterNumber + "%'";
+            if (this.queryParams.PartNumber) {
+                this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.PartNumber + "%'";
             }
-            if (this.queryParams.HMaterName) {
-                this.sWhere += " and 鐗╂枡鍚嶇О like '%" + this.queryParams.HMaterName + "%'";
+            if (this.queryParams.PartName) {
+                this.sWhere += " and 鐗╂枡鍚嶇О like '%" + this.queryParams.PartName + "%'";
+            }
+            if (this.queryParams.HBillStatus && this.HSouceBillType == '鐢熶骇璁㈠崟') {
+                this.sWhere += " and 鐘舵�� like '%" + this.queryParams.HBillStatus + "%'";
+            }
+            if (sessionStorage["Organization"] == "涔濊彵鐢垫満" && this.HSouceBillType == '鐢熶骇璁㈠崟') {
+                if (this.queryParams.HIsScheduling) {
+                    this.sWhere += " and 棰嗘枡鐘舵�� like '%" + this.queryParams.HIsScheduling + "%'";
+                }
+                if (this.queryParams.HIsScheduling) {
+                    this.sWhere += this.queryParams.HIsScheduling == "鏈帓浜�" ? "and 鏄惁鎺掍骇 = ''" : " and 鏄惁鎺掍骇 = '" + this.queryParams.HIsScheduling + "'"
+                }
             }
             this.getList();
         },
@@ -708,7 +759,7 @@
         /** 鍒犻櫎鎸夐挳鎿嶄綔 */
         handleDelete() {
             this.$modal.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠").then(() => {
-                axios.get(this.baseURL + "/Kf_StockOutRequestBill/DeltetKf_StockOutRequestBill", {
+                axios.get(this.$baseUrl + "/Kf_StockOutRequestBill/DeltetKf_StockOutRequestBill", {
                     params: {
                         HInterID: this.rowForm.HSubID.toString(),
                         user: sessionStorage["HUserName"],

--
Gitblit v1.9.1