From bb40eba5dd2ec75a6fa2cd2c8eb41d769c092fca Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期五, 05 十二月 2025 09:33:40 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI

---
 src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue       |   53 
 src/views/scMould/warehouse/Sc_MouldProdMoveBillList.vue         |  143 +
 src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue |  157 +
 src/views/system/user/GyDriver.vue                               | 1676 +++++++++++++++++++++++++
 src/views/component/material/index.vue                           |    3 
 src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue         |  111 +
 src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit.vue |   23 
 src/store/modules/permission.js                                  |   12 
 src/router/index.js                                              |   19 
 src/views/scMould/warehouse/Sc_MouldProdMoveBillEdit.vue         |  766 ++++++++---
 src/views/system/user/GyDriverEdit.vue                           |  734 +++++++++++
 src/views/GyCustomer/index.vue                                   |   13 
 src/views/ICMO/ScICMOBillList.vue                                |    5 
 src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue        |   51 
 src/views/scMould/warehouse/Sc_MouldOutRequestBillEdit.vue       |    4 
 src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue          |  115 +
 16 files changed, 3,435 insertions(+), 450 deletions(-)

diff --git a/src/router/index.js b/src/router/index.js
index f7e84b1..8648c4a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -210,6 +210,25 @@
       },
     ],
   },
+  //鐢ㄦ埛鍒楄〃
+  {
+    path: "/system/user/GyDriver",
+    component: Layout,
+    hidden: true,
+    redirect: "noredirect",
+    meta: {
+      breadcrumb: false, // 濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず
+      activeMenu: "/system/user", // 褰撹矾鐢辫缃簡璇ュ睘鎬э紝鍒欎細楂樹寒鐩稿搴旂殑渚ц竟鏍忋��
+    },
+    children: [
+      {
+        path: "/system/user/GyDriver",
+        component: () => import("@/views/system/user/GyDriver.vue"),
+        name: "gyDriver",
+        meta: { title: "椹鹃┒鍛樺垪琛�", activeMenu: "system/user" },
+      },
+    ],
+  },
   //閲囪喘鍏ュ簱鍗�
   {
     path: "/purchase/POStockInBill/POStockInBillList",
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index b90c1a8..0e846f5 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -1311,6 +1311,18 @@
                       icon: "build",
                       link: null,
                       noCache: false,
+                      title: "椹鹃┒鍛樺垪琛�",
+                    },
+                    component: () =>import("@/views/system/user/GyDriver.vue"),
+                    hidden: false,
+                    name: "gyDriver",
+                    path: "GyDriver",
+                  },
+                  {
+                    meta: {
+                      icon: "build",
+                      link: null,
+                      noCache: false,
                       title: "鏉冮檺鏌ヨ",
                     },
                     component: () =>
diff --git a/src/views/GyCustomer/index.vue b/src/views/GyCustomer/index.vue
index e14f775..da1288c 100644
--- a/src/views/GyCustomer/index.vue
+++ b/src/views/GyCustomer/index.vue
@@ -351,7 +351,7 @@
         title: "瀵煎叆",
         isUploading: false,
         updateSupport: 0,
-        url: "http://47.96.97.237/API/Gy_Customer/Gy_Customer_Excel",
+        url: "",
       },
       uploadData: [],
       uploadTableLoading: false,
@@ -366,14 +366,19 @@
     }
   },
   created() {
+    this.upload.url = this.baseURL + "Gy_Customer/Gy_Customer_Excel";
     this.fetchData();
   },
   methods: {
     fetchData() {
       axios
-        .get(
-          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
-        )
+        .get(this.baseURL + "Web/GetUser", {
+          params: {
+            UserName: sessionStorage.getItem("UserName") || "admin",
+            PassWord: "123456",
+            HOrgName: sessionStorage.getItem("OrganizationID") || "100038"
+          }
+        })
         .then((response) => {
           let data = response.data.data[0];
           this.user = data.Czymc;
diff --git a/src/views/ICMO/ScICMOBillList.vue b/src/views/ICMO/ScICMOBillList.vue
index 63d0566..6ec0c9d 100644
--- a/src/views/ICMO/ScICMOBillList.vue
+++ b/src/views/ICMO/ScICMOBillList.vue
@@ -883,8 +883,7 @@
         updateSupport: 0,
         // 璁剧疆涓婁紶鐨勮姹傚ご閮�
         // headers: { Authorization: "Bearer " + getToken() },
-        // 涓婁紶鐨勫湴鍧�
-        url: "http://47.96.97.237/API/Gy_Source/Gy_Source_Excel",
+        url: "",
       },
       uploadData: [],
       alluploadList: [],
@@ -901,6 +900,8 @@
     };
   },
   created() {
+    // set upload URL from configured baseURL
+    this.upload.url = this.baseURL + "Gy_Source/Gy_Source_Excel";
     this.riqiChange();
     this.get_HProjectList();
     this.get_HDeptNameList();
diff --git a/src/views/component/material/index.vue b/src/views/component/material/index.vue
index 30493fd..a15c0c9 100644
--- a/src/views/component/material/index.vue
+++ b/src/views/component/material/index.vue
@@ -26,7 +26,8 @@
       subDisabled: false,//缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
       OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
       HInterID: null,
-      baseURL: 'http://47.96.97.237/API',
+      //baseURL: 'http://47.96.97.237/API',
+        baseURL: process.env.VUE_APP_BASE_API,
       user: 'admin',
       currentRow: [],
       lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
diff --git a/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue b/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
index 3253ada..3e4dbd2 100644
--- a/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
@@ -46,12 +46,13 @@
             <el-form-item label="寰�鏉ュ崟浣�" prop="HSupName">
               <el-input v-model="queryParams.HSupName" placeholder="璇疯緭鍏ュ線鏉ュ崟浣�" @keyup.enter.native="handleQuery" />
             </el-form-item>
-            <div slot="header" class="clearfix"><span>杩囨护</span></div>
+            <div slot="header" class="clearfix"><span>鍏朵粬鏉′欢</span></div>
             <div>
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -64,7 +65,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -74,7 +75,8 @@
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -87,7 +89,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -96,7 +98,8 @@
               </el-row>
               <el-form-item label-width="0">
                 <el-row>
-                  <el-col :span="7">
+                  <el-col :span="2"><span>杩囨护</span></el-col>
+                  <el-col :span="6">
                     <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
                       <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
                         :value="item.field"></el-option>
@@ -108,7 +111,7 @@
                         :value="item.value"></el-option>
                     </el-select>
                   </el-col>
-                  <el-col :span="11">
+                  <el-col :span="10">
                     <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
                       @keyup.enter.native="handleQuery" />
                   </el-col>
@@ -393,7 +396,8 @@
           "sWhere": this.sWhere,
           "user": sessionStorage["HUserName"],
           "page": this.page,
-          "size": this.pageSize
+          "size": this.pageSize,
+          "Type": '3851'
         },
       }).then(response => {
         this.tyResList = response.data.data//鎬绘暟鎹�
@@ -589,7 +593,7 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 2
-      this.handleEdit()
+      this.handleEdit(row)
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
@@ -667,6 +671,22 @@
         }
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
+      if (this.queryParams.HStatus) {
+          switch (this.queryParams.HStatus) {
+              case '-1':   //鍏ㄩ儴
+                  this.sWhere += "";
+                  break;
+              case '0':    //鏈鏍�
+                  this.sWhere += " and 瀹℃牳浜�=''";
+                  break;
+              case '1':    //宸插鏍�
+                  this.sWhere += " and 瀹℃牳浜�<>''";
+                  break;
+              case '2':    //宸插叧闂�
+                  this.sWhere += " and 鍏抽棴浜�<>''";
+              default:
+          }
+      }
       if (this.sTime) {
           this.sTime = moment(this.sTime).format('YYYY-MM-DD')
           this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
@@ -687,6 +707,7 @@
       if (this.queryParams.HSupName) {
           this.sWhere += " and 寰�鏉ュ崟浣� like '%" + this.queryParams.HSupName + "%'";
       }
+      this.clearData()
       this.getList()
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -712,6 +733,7 @@
       }
       this.riqiChange()
       this.resetForm("queryForm")
+      this.clearData()
       this.getList()
     },
 
@@ -721,6 +743,7 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow = false
+      this.clearData()
       this.getList()
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
@@ -740,7 +763,16 @@
       this.open = val
       this.editShow = false
       this.openEdit = val
+      this.clearData()
       this.getList()
+    },
+    //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
+    clearData(){
+      this.ids = []
+      this.multiple = true
+      this.single = true
+      this.OperationType = 0
+      this.copyType = 0
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
@@ -769,6 +801,7 @@
         let result = response.data
         if (result.count == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.clearData()
           this.getList();
         }
         else {
diff --git a/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit.vue b/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit.vue
index b98806c..b6c4171 100644
--- a/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit.vue
+++ b/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit.vue
@@ -3,7 +3,7 @@
     <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
       <!-- <el-button type="primary" @click="handleAdd(OperationType = 1)" v-if="addBtnShow">鏂板</el-button> -->
       <el-button type="primary" @click="submitForm" :disabled="subDisabled">淇� 瀛�</el-button>
-      <!-- <el-button type="primary" @click="set_CheckBill(1, form)">瀹� 鏍�</el-button> -->
+      <el-button type="primary" @click="set_CheckBill(1, form)">瀹� 鏍�</el-button>
       <el-button type="primary" @click="close">閫� 鍑�</el-button>
       <!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
     </div>
@@ -334,7 +334,7 @@
   name: 'Sc_MouldMoveStockRequestBillEdit',
   components: { Dept, Warehouse, RowSettings, GyEmployee,GySupplier,GyCustomer,GyMould,GyStockPlace },
   props: {
-    OperationType: { type: Number, },
+    OperationType: { type: Number, },//鎿嶄綔绫诲瀷锛�1鏂板銆�2缂栬緫銆�3澶嶅埗銆�4涓嬫帹锛�
     linterid: { type: Number, },
     HSouceBillType: { type: String, },
     propsData: { type: String, },
@@ -862,6 +862,12 @@
           , "HSCSPID": "0"
           , "HSCSPNumber": ""
           , "HSCSPName": ""
+          , "HSourceInterID": "0"
+          , "HSourceEntryID": "0"
+          , "HSourceBillType": ""
+          , "HSourceBillNo": ""
+          , "HRelationQty": "0"
+          , "HRelationMoney": "0"
           , "HRemark": ""
           , "HPropertyID": "0"
           , "HSecUnitID": "0"
@@ -882,11 +888,11 @@
           , "HICMOInterID": "0"
           , "HICMOEntryID": "0"
           , "HICMOBillNo": ""
-          , "HSTOCKORGID": "0"
-          , "HOWNERID": "0"
+          , "HSTOCKORGID": this.form.HStockOutOrgID
+          , "HOWNERID": this.form.HStockOutOrgID
           , "HOWNERTYPEID": ""
-          , "HSTOCKORGINID": "0"
-          , "HOWNERINID": "0"
+          , "HSTOCKORGINID": this.form.HStockInOrgID
+          , "HOWNERINID": this.form.HStockInOrgID
           , "HOWNERTYPEINID": ""
           , "HBASEUNITID": "0"
           , "HEXTAUXUNITID": "0"
@@ -1021,12 +1027,13 @@
     set_CheckBill(num, form) {
       var InterID = form.hmainid || form.HInterID
       //閫昏緫瀹℃牳鏂规硶
-      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/AuditMouldProdMoveBill", {
-        params: { "HInterID": InterID, "flag": num, "user": sessionStorage["HUserName"] }
+      axios.get(this.baseURL + "/Sc_MouldMoveStockRequestBillController/GetSc_MouldMoveStockRequestBill_Check_Json", {
+        params: { "HInterID": InterID, "Type": num, "HMaker": sessionStorage["HUserName"] }
       }).then(response => {
         let result = response.data
         if (result.code == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.close()
         }
         else {
           this.$modal.msgError("閿欒:" + result.code + result.Message,);
diff --git a/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue b/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue
index 57240f3..6a3b616 100644
--- a/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue
@@ -1,5 +1,5 @@
 <template>
-  <div style="padding: 10px;">
+  <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="寮�濮嬫棩鏈�" style="margin-left: 100px;">
         <el-date-picker v-model="sTime" type="date" placeholder="寮�濮嬫棩鏈�" style="width: 150px;">
@@ -46,12 +46,13 @@
             <el-form-item label="寰�鏉ュ崟浣�" prop="HSupName">
               <el-input v-model="queryParams.HSupName" placeholder="璇疯緭鍏ュ線鏉ュ崟浣�" @keyup.enter.native="handleQuery" />
             </el-form-item>
-            <div slot="header" class="clearfix"><span>杩囨护</span></div>
+            <div slot="header" class="clearfix"><span>鍏朵粬鏉′欢</span></div>
             <div>
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -64,7 +65,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -74,7 +75,8 @@
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -87,7 +89,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -96,7 +98,8 @@
               </el-row>
               <el-form-item label-width="0">
                 <el-row>
-                  <el-col :span="7">
+                  <el-col :span="2"><span>杩囨护</span></el-col>
+                  <el-col :span="6">
                     <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
                       <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
                         :value="item.field"></el-option>
@@ -108,7 +111,7 @@
                         :value="item.value"></el-option>
                     </el-select>
                   </el-col>
-                  <el-col :span="11">
+                  <el-col :span="10">
                     <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
                       @keyup.enter.native="handleQuery" />
                   </el-col>
@@ -131,6 +134,10 @@
       <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
           @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-tickets" size="mini" :disabled="single"
+          @click="handleMove(row = rowForm, OperationType = 4)">涓嬫帹锛堝櫒鍏风洿鎺ヨ皟鎷ㄥ崟锛�</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
@@ -169,9 +176,7 @@
               <div :style="item.style">
                 <span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
                 <el-button type="text" @click="handleEdit(row, OperationType = 2)"
-                  v-else-if="column.property == '鍗曟嵁鍙�'">{{
-                    row.鍗曟嵁鍙�
-                  }}</el-button>
+                  v-else-if="column.property == '鍗曟嵁鍙�'">{{row.鍗曟嵁鍙穧}</el-button>
                 <span v-else>{{ row[column.label] }}</span>
               </div>
             </template>
@@ -188,6 +193,11 @@
         <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
           :copyType="copyType" @editClose="editClose" v-if="editShow" />
       </el-dialog>
+      <!-- 涓嬫帹 -->
+      <el-dialog title="涓嬫帹鍣ㄥ叿鐩存帴璋冩嫧鍗�" :visible.sync="openMove" width="1480px" append-to-body class="xsckdBox" @close="close">
+        <move :OperationType='4' :propsData='moveData' :HSouceBillType=BillType
+         @editClose="moveClose" v-if="moveShow" />
+      </el-dialog>
       <el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
         <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName'
           :HModName='HModName' @rowEditClose="rowSetClose" v-if="printListShow" />
@@ -201,18 +211,27 @@
 import axios from 'axios'
 import RowSettings from '@/views/component/rowSettings'
 import Edit from '@/views/scMould/warehouse/Sc_MouldMoveStockRequestBillEdit'
+import Move from '@/views/scMould/warehouse/Sc_MouldProdMoveBillEdit'
 import PrintList from '@/views/component/printList'
 import moment from 'moment';
 
 export default {
   name: 'Sc_MouldMoveStockRequestBillList',
-  components: { RowSettings, Edit, PrintList },
+  components: { RowSettings, Edit, Move,PrintList },
+  props: {
+    openPage: { type: String, },
+    HOrgID: { type: String, },
+  },
   data() {
     return {
       HModName: "Sc_MouldMoveStockRequestBillList",
+      rowList:[],
       activeSeach: '',
       editShow: false,
       openEdit: false,
+      moveShow: false,
+      openMove: false,
+      moveData:'',
       totalNameList: [],
       tableShow: true,
       openPrintList: false,
@@ -301,10 +320,14 @@
       page: 1,
       pageSize: 0,
       total: 0,
+      BillType:'3850',
     };
   },
   created() {
     // this.fetchData()
+    if(this.openPage && this.HOrgID){
+      this.queryParams.HStockOutOrgID = this.HOrgID
+    }
     this.riqiChange()
     this.getList();
   },
@@ -379,13 +402,14 @@
       if (this.pageSize == 0) {
         this.pageSize = 50
       }
-      // 閿�鍞嚭搴撳崟鍒楄〃
+      // 鍒楄〃
       axios.get(this.baseURL + '/Sc_MouldMoveStockRequestBillController/page', {
         params: {
           "sWhere": this.sWhere,
           "user": sessionStorage["HUserName"],
           "page": this.page,
-          "size": this.pageSize
+          "size": this.pageSize,
+          "Type": this.BillType,
         },
       }).then(response => {
         this.tyResList = response.data.data//鎬绘暟鎹�
@@ -571,22 +595,26 @@
       this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
       this.lastSelectedRowIndex = this.tableData.indexOf(row);
       this.$refs.tableData.toggleRowSelection(row);
+      if (this.openPage) {
+        this.$emit('deptEmit', this.rowList, this.BillType)
+      }
     },
     //閫変腑琛岄珮浜牱寮�
     rowStyle({ row, rowIndex }) {
-      if (this.ids.includes(row.hmainid)) {
+      if (this.ids.includes(row.sorderid)) {
         return { "background": "#ecf5ff" }
       }
     },
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 2
-      this.handleEdit()
+      this.handleEdit(row);
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
       // this.rowForm = {}
-      this.ids = selection.map(item => item.hmainid)
+      this.rowList=selection
+      this.ids = selection.map(item => item.sorderid)
       this.single = selection.length != 1
       this.multiple = !selection.length
       if (!this.single) {
@@ -659,6 +687,22 @@
         }
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
+      if (this.queryParams.HStatus) {
+          switch (this.queryParams.HStatus) {
+              case '-1':   //鍏ㄩ儴
+                  this.sWhere += "";
+                  break;
+              case '0':    //鏈鏍�
+                  this.sWhere += " and 瀹℃牳浜�=''";
+                  break;
+              case '1':    //宸插鏍�
+                  this.sWhere += " and 瀹℃牳浜�<>''";
+                  break;
+              case '2':    //宸插叧闂�
+                  this.sWhere += " and 鍏抽棴浜�<>''";
+              default:
+          }
+      }
       if (this.sTime) {
           this.sTime = moment(this.sTime).format('YYYY-MM-DD')
           this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
@@ -674,11 +718,12 @@
           this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDept + "%'";
       }
       if (this.queryParams.HModelNumber) {
-          this.sWhere += " and 妯″叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
+          this.sWhere += " and 鍣ㄥ叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
       }
       if (this.queryParams.HSupName) {
           this.sWhere += " and 寰�鏉ュ崟浣� like '%" + this.queryParams.HSupName + "%'";
       }
+      this.clearData()
       this.getList()
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -702,6 +747,7 @@
         ColContent2: '',
         ColContent: '',
       }
+      this.clearData()
       this.riqiChange()
       this.resetForm("queryForm")
       this.getList()
@@ -713,6 +759,7 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow = false
+      this.clearData()
       this.getList()
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
@@ -727,12 +774,69 @@
       this.editShow = true
       this.openEdit = true
     },
+    //鎵撳紑涓嬫帹缁勪欢寮圭獥
+    handleMove() {
+      if (this.rowList.length > 0) {
+        var dataArray = [];
+        var HSupTypeID_Temp = this.rowList[0].HSupTypeID
+        var HStockInOrgID_Temp = this.rowList[0].HSTOCKORGINID
+        for (var i = 0; i < this.rowList.length; i++) {
+            if (this.rowList[i].鍗曟嵁鐘舵�� != "宸插鏍�") {
+                this.$modal.msgSuccess("涓嬫帹澶辫触锛佹墍閫夊崟鎹��" + this.rowList[i].鍗曟嵁鍙� + "銆戜笉涓哄凡瀹℃牳鐘舵��,涓嶅厑璁镐笅鎺紒")
+                return;
+            }
+            if (this.rowList[i].HQtyMust <= 0) {
+                this.$modal.msgSuccess("涓嬫帹澶辫触锛佹墍閫夊崟鎹��" + this.rowList[i].鍗曟嵁鍙� + "銆戝搴斿彲涓嬫帹鏁伴噺蹇呴』澶т簬 0 锛�")
+                return;
+            }
+            if (this.rowList[i].HSupTypeID != HSupTypeID_Temp) {
+                this.$modal.msgSuccess("涓嬫帹澶辫触锛佹墍閫夊崟鎹搴斿線鏉ョ被鍨嬪繀椤讳竴鑷达紒")
+                return;
+            }
+            if (this.rowList[i].HSTOCKORGINID != HStockInOrgID_Temp) {
+                this.$modal.msgSuccess("涓嬫帹澶辫触锛佹墍閫夊崟鎹搴旇皟鍏ョ粍缁囧繀椤讳竴鑷达紒")
+                return;
+            }
+            var temp = {
+                "hmainid": this.rowList[i].hmainid
+                , "hsubid": this.rowList[i].hsubid
+                , "HBillType": this.rowList[i].HBillType
+            }
+            dataArray.push(temp);
+        }
+        var datajson = {
+            "data": dataArray
+        };
+        this.moveData = JSON.stringify(datajson)
+        this.moveShow = true
+        this.openMove = true
+      } else {
+          layer.msg('璇烽�夋嫨鏁版嵁涓嬫帹锛�');
+      }
+    },
     //鍏抽棴缂栬緫椤甸潰
     editClose(val) {
       this.open = val
       this.editShow = false
       this.openEdit = val
+      this.clearData()
       this.getList()
+    },
+    //鍏抽棴涓嬫帹椤甸潰
+    moveClose(val) {
+      this.open = val
+      this.editShow = false
+      this.openEdit = val
+      this.clearData()
+      this.getList()
+    },
+    //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
+    clearData(){
+      this.ids = []
+      this.multiple = true
+      this.single = true
+      this.OperationType = 0
+      this.copyType = 0
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
@@ -761,6 +865,7 @@
         let result = response.data
         if (result.count == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.clearData()
           this.getList();
         }
         else {
@@ -802,22 +907,6 @@
 
       }
       //  var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes']
-    },
-
-    //#region 鑾峰彇鍏徃鍚嶏紝鏍规嵁鍏徃杩涜瀹氬埗鍖栧紑鍙�
-    defaintOperationByCompanyName() {
-      var result = false;
-      axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => {
-        var data1 = response.data
-        if (data1.count == 1) {
-          if (data1.data == "姘村姟") {
-            result = true;
-          }
-        }
-      }).catch(error => {
-        this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-      });
-      return result;
     },
   }
 };
diff --git a/src/views/scMould/warehouse/Sc_MouldOutRequestBillEdit.vue b/src/views/scMould/warehouse/Sc_MouldOutRequestBillEdit.vue
index 000d1b8..c0154ae 100644
--- a/src/views/scMould/warehouse/Sc_MouldOutRequestBillEdit.vue
+++ b/src/views/scMould/warehouse/Sc_MouldOutRequestBillEdit.vue
@@ -96,14 +96,14 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="婧愬崟绫诲瀷" prop="HSourceBillType">
-                <el-select v-model="form.HSourceBillType" placeholder="璇烽�夋嫨寰�鏉ョ被鍨�">
+                <el-select v-model="form.HSourceBillType" placeholder="璇烽�夋嫨">
                   <el-option v-for="(item, index) in HSourceBillTypes" :key="index" :label="item.HSourceBillTypeName" :value="item.HSourceBillType">
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="婧愬崟鍗曞彿" prop="HRemark">
+              <el-form-item label="婧愬崟鍗曞彿" prop="HSourceBillNo">
                 <el-input placeholder="璇烽�夋嫨婧愬崟鍗曞彿" disabled>
                   <el-button slot="append" icon="el-icon-search" @click="get_checkMainSource()"></el-button>
                 </el-input>
diff --git a/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue b/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
index a326bae..f84ab8f 100644
--- a/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
@@ -46,12 +46,13 @@
             <el-form-item label="寰�鏉ュ崟浣�" prop="HSupName">
               <el-input v-model="queryParams.HSupName" placeholder="璇疯緭鍏ュ線鏉ュ崟浣�" @keyup.enter.native="handleQuery" />
             </el-form-item>
-            <div slot="header" class="clearfix"><span>杩囨护</span></div>
+            <div slot="header" class="clearfix"><span>鍏朵粬鏉′欢</span></div>
             <div>
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -64,7 +65,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -74,7 +75,8 @@
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -87,7 +89,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -96,7 +98,8 @@
               </el-row>
               <el-form-item label-width="0">
                 <el-row>
-                  <el-col :span="7">
+                  <el-col :span="2"><span>杩囨护</span></el-col>
+                  <el-col :span="6">
                     <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
                       <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
                         :value="item.field"></el-option>
@@ -108,7 +111,7 @@
                         :value="item.value"></el-option>
                     </el-select>
                   </el-col>
-                  <el-col :span="11">
+                  <el-col :span="10">
                     <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
                       @keyup.enter.native="handleQuery" />
                   </el-col>
@@ -393,7 +396,8 @@
           "sWhere": this.sWhere,
           "user": sessionStorage["HUserName"],
           "page": this.page,
-          "size": this.pageSize
+          "size": this.pageSize,
+          "Type":"3849",
         },
       }).then(response => {
         this.tyResList = response.data.data//鎬绘暟鎹�
@@ -589,7 +593,7 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 2
-      this.handleEdit()
+      this.handleEdit(row)
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
@@ -667,6 +671,22 @@
         }
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
+      if (this.queryParams.HStatus) {
+          switch (this.queryParams.HStatus) {
+              case '-1':   //鍏ㄩ儴
+                  this.sWhere += "";
+                  break;
+              case '0':    //鏈鏍�
+                  this.sWhere += " and 瀹℃牳浜�=''";
+                  break;
+              case '1':    //宸插鏍�
+                  this.sWhere += " and 瀹℃牳浜�<>''";
+                  break;
+              case '2':    //宸插叧闂�
+                  this.sWhere += " and 鍏抽棴浜�<>''";
+              default:
+          }
+      }
       if (this.sTime) {
         this.sTime = moment(this.sTime).format('YYYY-MM-DD')
         this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
@@ -682,11 +702,12 @@
         this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDept + "%'";
       }
       if (this.queryParams.HModelNumber) {
-        this.sWhere += " and 妯″叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
+        this.sWhere += " and 鍣ㄥ叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
       }
       if (this.queryParams.HSupName) {
         this.sWhere += " and 寰�鏉ュ崟浣� like '%" + this.queryParams.HSupName + "%'";
       }
+      this.clearData()
       this.getList()
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -712,6 +733,7 @@
       }
       this.riqiChange()
       this.resetForm("queryForm")
+      this.clearData()
       this.getList()
     },
 
@@ -721,6 +743,7 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow = false
+      this.clearData()
       this.getList()
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
@@ -740,7 +763,16 @@
       this.open = val
       this.editShow = false
       this.openEdit = val
+      this.clearData()
       this.getList()
+    },
+    //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
+    clearData(){
+      this.ids = []
+      this.multiple = true
+      this.single = true
+      this.OperationType = 0
+      this.copyType = 0
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
@@ -769,6 +801,7 @@
         let result = response.data
         if (result.count == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.clearData()
           this.getList();
         }
         else {
diff --git a/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue b/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
index 3694c0e..c1b4540 100644
--- a/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
@@ -25,36 +25,34 @@
       <el-collapse v-model="activeSeach">
         <el-collapse-item title="鏇村" name="1">
           <el-card class="box-card">
-            <el-form-item label="缁勭粐鍚嶇О" prop="HStockOrgName">
-              <el-input v-model="queryParams.HStockOrgName" placeholder="璇疯緭鍏ョ粍缁囧悕绉�" @keyup.enter.native="handleQuery" />
+            <el-form-item label="鐘舵��" prop="HStatus">
+              <el-select v-model="queryParams.HStatus" placeholder="璇烽�夋嫨鐘舵��">
+                <el-option v-for="(item, index) in HStatusList" :key="index" :label="item.name" :value="item.value">
+                </el-option>
+              </el-select>
             </el-form-item>
-            <!-- <el-form-item label="缁勭粐">
-              <el-select v-model="queryParams.HOrgID" placeholder="璇烽�夋嫨">
+            <el-form-item label="缁勭粐">
+              <el-select v-model="queryParams.HStockOrgID" placeholder="璇烽�夋嫨">
                 <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
                 </el-option>
               </el-select>
-            </el-form-item> -->
+            </el-form-item>
             <el-form-item label="閮ㄩ棬淇℃伅" prop="HDept">
               <el-input v-model="queryParams.HDept" 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="鍣ㄥ叿浠g爜" prop="HModelNumber">
               <el-input v-model="queryParams.HModelNumber" placeholder="璇疯緭鍏ュ櫒鍏蜂唬鐮�" @keyup.enter.native="handleQuery" />
             </el-form-item>
-            <el-form-item label="浠撳簱" prop="HWhName">
-              <el-input v-model="queryParams.HWhName" 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>
-            <div slot="header" class="clearfix"><span>杩囨护</span></div>
+            <div slot="header" class="clearfix"><span>鍏朵粬鏉′欢</span></div>
             <div>
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -67,7 +65,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -77,7 +75,8 @@
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -90,7 +89,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -99,7 +98,8 @@
               </el-row>
               <el-form-item label-width="0">
                 <el-row>
-                  <el-col :span="7">
+                  <el-col :span="2"><span>杩囨护</span></el-col>
+                  <el-col :span="6">
                     <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
                       <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
                         :value="item.field"></el-option>
@@ -111,7 +111,7 @@
                         :value="item.value"></el-option>
                     </el-select>
                   </el-col>
-                  <el-col :span="11">
+                  <el-col :span="10">
                     <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
                       @keyup.enter.native="handleQuery" />
                   </el-col>
@@ -253,7 +253,7 @@
         { label: '杩戜竴骞�', value: 365 },
       ],
       organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
-      hPriceTypeList: ['鎴愭湰浠�', '缁撶畻浠�'],
+      HStatusList: [{name:'鍏ㄩ儴',value:'-1'},{name:'鏈鏍�',value:'0'},{name:'宸插鏍�',value:'1'},{name:'宸插叧闂�',value:'2'}],
       addBtnShow: false,
       dialogTitle: '',
       OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
@@ -271,11 +271,10 @@
       queryParams: {
         HBillNo: '',
         HInitTimeCycle: 29,
-        HStockOrgName: '',
+        HStockOrgID: sessionStorage["OrganizationID"] - 0,
+        HStatus:'-1',
         HDept:'',
-        HMaterNumber: '',
         HModelNumber:'',
-        HWhName:'',
         HSupName:'',
         ColName1: '',
         ColName2: '',
@@ -374,20 +373,24 @@
       this.tableShow = false
       this.loading = true
       if (this.sTime && !this.sWhere) {
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'"
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'"
+        this.sTime = moment(this.sTime).format('YYYY-MM-DD')
+        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
+        this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
+        this.sWhere += " and 鏃ユ湡 <= '" + this.eTime + "'";
       }
+      this.sWhere += " and HSTOCKORGID=" + this.queryParams.HStockOrgID
       if (this.pageSize == 0) {
         this.pageSize = 50
       }
       // 閿�鍞嚭搴撳崟鍒楄〃
-      axios.get(this.baseURL + '/Sc_MouldProdBackBill/list_byPage', {
+      axios.get(this.baseURL + '/Sc_MouldProdBackBillController/page', {
         params: {
           "sWhere": this.sWhere,
           "user": sessionStorage["HUserName"],
           "Organization": sessionStorage["Organization"],
           "page": this.page,
-          "size": this.pageSize
+          "size": this.pageSize,
+          "Type": '3803'
         },
       }).then(response => {
         this.tyResList = response.data.data//鎬绘暟鎹�
@@ -583,7 +586,7 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 3
-      this.handleEdit()
+      this.handleEdit(row)
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
@@ -661,34 +664,43 @@
         }
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
+      if (this.queryParams.HStatus) {
+          switch (this.queryParams.HStatus) {
+              case '-1':   //鍏ㄩ儴
+                  this.sWhere += "";
+                  break;
+              case '0':    //鏈鏍�
+                  this.sWhere += " and 瀹℃牳浜�=''";
+                  break;
+              case '1':    //宸插鏍�
+                  this.sWhere += " and 瀹℃牳浜�<>''";
+                  break;
+              case '2':    //宸插叧闂�
+                  this.sWhere += " and 鍏抽棴浜�<>''";
+              default:
+          }
+      }
       if (this.sTime) {
         this.sTime = moment(this.sTime).format('YYYY-MM-DD')
-        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
-        console.log(this.sTime, this.eTime)
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'" + " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'";
+        this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
       }
-      
+      if (this.eTime) {
+        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
+        this.sWhere += " and 鏃ユ湡 <= '" + this.eTime + "'";
+      }
       if (this.queryParams.HBillNo) {
         this.sWhere += " and 鍗曟嵁鍙� like '%" + this.queryParams.HBillNo + "%'";
-      }
-      if (this.queryParams.HStockOrgName) {
-        this.sWhere += " and 缁勭粐鍚嶇О like '%" + this.queryParams.HStockOrgName + "%'";
       }
       if (this.queryParams.HDept) {
           this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDept + "%'";
       }
-      if (this.queryParams.HMaterNumber) {
-          this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.HMaterNumber + "%'";
-      }
       if (this.queryParams.HModelNumber) {
-          this.sWhere += " and 妯″叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
-      }
-      if (this.queryParams.HWhName) {
-          this.sWhere += " and 浠撳簱 like '%" + this.queryParams.HWhName + "%'";
+          this.sWhere += " and 鍣ㄥ叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
       }
       if (this.queryParams.HSupName) {
           this.sWhere += " and 寰�鏉ュ崟浣� like '%" + this.queryParams.HSupName + "%'";
       }
+      this.clearData()
       this.getList()
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -697,11 +709,10 @@
       this.queryParams = {
         HBillNo: '',
         HInitTimeCycle: 29,
-        HStockOrgName: '',
+        HStockOrgID: sessionStorage["OrganizationID"] - 0,
+        HStatus:'-1',
         HDept:'',
-        HMaterNumber: '',
         HModelNumber:'',
-        HWhName:'',
         HSupName:'',
         ColName1: '',
         ColName2: '',
@@ -715,6 +726,7 @@
       }
       this.riqiChange()
       this.resetForm("queryForm")
+      this.clearData()
       this.getList()
     },
 
@@ -724,6 +736,7 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow = false
+      this.clearData()
       this.getList()
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
@@ -743,7 +756,16 @@
       this.open = val
       this.editShow = false
       this.openEdit = val
+      this.clearData()
       this.getList()
+    },
+    //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
+    clearData(){
+      this.ids = []
+      this.multiple = true
+      this.single = true      
+      this.OperationType = 0
+      this.copyType = 0
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
@@ -772,6 +794,7 @@
         let result = response.data
         if (result.count == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.clearData()
           this.getList();
         }
         else {
diff --git a/src/views/scMould/warehouse/Sc_MouldProdMoveBillEdit.vue b/src/views/scMould/warehouse/Sc_MouldProdMoveBillEdit.vue
index 2f35de3..372db09 100644
--- a/src/views/scMould/warehouse/Sc_MouldProdMoveBillEdit.vue
+++ b/src/views/scMould/warehouse/Sc_MouldProdMoveBillEdit.vue
@@ -23,59 +23,112 @@
                 </el-date-picker>
               </el-form-item>
             </el-col>
+            <el-col :span="12">
+              <el-form-item label="璋冨叆缁勭粐" prop="HStockInOrgID">
+                <el-select v-model="form.HStockInOrgID" placeholder="璇烽�夋嫨缁勭粐" :disabled="ifOrganizationEdit">
+                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="6">
-              <el-form-item label="鍐呴儴鍗曟嵁鍙�" prop="HInnerBillNo">
-                <el-input v-model="form.HInnerBillNo" placeholder="璇疯緭鍏ュ唴閮ㄥ崟鎹彿" />
+              <el-form-item label="寰�鏉ョ被鍨�" prop="HSupTypeID">
+                <el-select v-model="form.HSupTypeID" placeholder="璇烽�夋嫨寰�鏉ョ被鍨�">
+                  <el-option v-for="(item, index) in hSupTypeList" :key="index" :label="item.name" :value="item.id">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="鍣ㄥ叿浠撳簱" prop="HWHName">
-                <el-input v-model="form.HWHName" placeholder="璇烽�夋嫨鍣ㄥ叿浠撳簱" disabled>
+              <el-form-item label="寰�鏉ュ崟浣�" prop="HSupName">
+                <el-input v-model="form.HSupName" placeholder="璇烽�夋嫨寰�鏉ュ崟浣�" disabled>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialogChoose()"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="璋冨嚭缁勭粐" prop="HStockOutOrgID">
+                <el-select v-model="form.HStockOutOrgID" placeholder="璇烽�夋嫨缁勭粐" :disabled="ifOrganizationEdit">
+                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="閮ㄩ棬" prop="HDeptName">
+                <el-input v-model="form.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" disabled>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(1,deptType=1)"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="璋冨叆浠撳簱" prop="HWHName">
+                <el-input v-model="form.HWHName" placeholder="璇烽�夋嫨璋冨叆浠撳簱" disabled>
                   <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2,eHWHType=1)"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="璋冨嚭浠撳簱" prop="HSCWHName">
+                <el-input v-model="form.HSCWHName" placeholder="璇烽�夋嫨璋冨嚭浠撳簱" disabled>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2,eHWHType=2)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="6">
-              <el-form-item label="棰嗘枡浜�" prop="HSecManagerName">
-                <el-input v-model="form.HSecManagerName" placeholder="璇烽�夋嫨棰嗘枡浜�" disabled>
+              <el-form-item label="涓氬姟鍛�" prop="HEmpName">
+                <el-input v-model="form.HEmpName" placeholder="璇烽�夋嫨" disabled>
                   <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=1)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="鍙戞枡浜�" prop="HKeeperName">
-                <el-input v-model="form.HKeeperName" placeholder="璇烽�夋嫨鍙戞枡浜�" disabled>
+              <el-form-item label="璐熻矗浜�" prop="HMangerName">
+                <el-input v-model="form.HMangerName" placeholder="璇烽�夋嫨" disabled>
                   <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=2)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="閮ㄩ棬" prop="HDeptName">
-                <el-input v-model="form.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(1)"></el-button>
+              <el-form-item label="楠屾敹鍛�" prop="HSecManagerName">
+                <el-input v-model="form.HSecManagerName" placeholder="璇烽�夋嫨" disabled>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=3)"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="淇濈鍛�" prop="HKeeperName">
+                <el-input v-model="form.HKeeperName" placeholder="璇烽�夋嫨" disabled>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4,empType=4)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="6">
-              <el-form-item label="璋冩嫧绫诲瀷" prop="HStockStyle">
-                <el-select v-model="form.HStockStyle" placeholder="璇烽�夋嫨">
-                  <el-option label="鍚岀粍缁囪皟鎷�" value="鍚岀粍缁囪皟鎷�" />
-                  <el-option label="璺ㄧ粍缁囪皟鎷�" value="璺ㄧ粍缁囪皟鎷�" />
+              <el-form-item label="婧愬崟绫诲瀷" prop="HSourceBillType">
+                <el-select v-model="form.HSourceBillType" placeholder="璇烽�夋嫨">
+                  <el-option v-for="(item, index) in HSourceBillTypes" :key="index" :label="item.HSourceBillTypeName" :value="item.HSourceBillType">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="6">
-              <el-form-item label="缁勭粐" prop="HOrgID">
-                <el-select v-model="form.HOrgID" placeholder="璇烽�夋嫨缁勭粐" :disabled="zzSelDis">
-                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
-                  </el-option>
-                </el-select>
+              <el-form-item label="婧愬崟鍗曞彿" prop="HSourceBillNo">
+                <el-input placeholder="璇烽�夋嫨婧愬崟鍗曞彿" disabled>
+                  <el-button slot="append" icon="el-icon-search" @click="get_checkMainSource()"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="鍐呴儴鍗曟嵁鍙�" prop="HInnerBillNo">
+                <el-input v-model="form.HInnerBillNo" placeholder="璇疯緭鍏�" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -177,7 +230,7 @@
             <el-table-column align="center" label="搴忓彿" type="index" width="80" />
             <el-table-column align="center" label="鍣ㄥ叿浠g爜" width="120">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.HMaterCode" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(8, scope.row)"
+                <el-input v-model="scope.row.HMaterNumber" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(8, scope.row)"
                   @dblclick.native="openDataDialog(8, scope.row)" />
               </template>
             </el-table-column>
@@ -188,37 +241,17 @@
             </el-table-column>
             <el-table-column align="center" label="瑙勬牸鍨嬪彿" width="120">
               <template slot-scope="scope">
-                <span>{{ scope.row.HMaterSpec }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="鎵规" width="120">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.HBatchNo" placeholder="璇疯緭鍏�" />
+                <span>{{ scope.row.HMaterModel }}</span>
               </template>
             </el-table-column>
             <el-table-column align="center" label="璁¢噺鍗曚綅浠g爜" width="120">
               <template slot-scope="scope">
-                <span>{{ scope.row.HUnitCode }}</span>
+                <span>{{ scope.row.HUnitNumber }}</span>
               </template>
             </el-table-column>
             <el-table-column align="center" label="璁¢噺鍗曚綅" width="120">
               <template slot-scope="scope">
                 <span>{{ scope.row.HUnitName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="璁捐瀵垮懡" width="120">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.HDesignLife" placeholder="璇疯緭鍏�" />
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="鍓╀綑瀵垮懡" width="120">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.HLeaveLife" placeholder="璇疯緭鍏�" />
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="绱浣跨敤瀵垮懡" width="120">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.HUseLife" placeholder="璇疯緭鍏�" />
               </template>
             </el-table-column>
             <el-table-column align="center" label="搴斿彂鏁伴噺" width="120">
@@ -232,34 +265,10 @@
                   controls-position="right"></el-input-number>
               </template>
             </el-table-column>
-            <el-table-column align="center" label="鍗曚环" width="120">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.HPrice" placeholder="璇疯緭鍏�" />
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="閲戦" width="120">
-              <template slot-scope="scope">
-                <el-input v-model="scope.row.HMoney" placeholder="璇疯緭鍏�" />
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="璋冨叆缁勭粐浠g爜" width="120">
-              <template slot-scope="scope">
-                <!-- <el-select v-model="scope.row.HStockOrgCode" placeholder="璇烽�夋嫨缁勭粐" @change="HStockOrgChange(zbIndex = scope.row.index - 1)">
-                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID"></el-option>>
-                  </el-option>
-                </el-select> -->
-                <span>{{ scope.row.HStockOrgCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="璋冨叆缁勭粐" width="120">
-              <template slot-scope="scope">
-                <span>{{ scope.row.HStockOrgName }}</span>
-              </template>
-            </el-table-column>
             <el-table-column align="center" label="璋冨叆浠撳簱浠g爜" width="120">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.HWHCode" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=2)"
-                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=2)" />
+                <el-input v-model="scope.row.HWHNumber" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=3)"
+                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=3)" />
               </template>
             </el-table-column>
             <el-table-column align="center" label="璋冨叆浠撳簱" width="120">
@@ -269,7 +278,7 @@
             </el-table-column>
             <el-table-column align="center" label="璋冨叆浠撲綅浠g爜" width="120">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.HSPCode" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=1)"
+                <el-input v-model="scope.row.HSPNumber" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=1)"
                   @dblclick.native="openDataDialog(9, scope.row,HSPType=1)" />
               </template>
             </el-table-column>
@@ -280,8 +289,8 @@
             </el-table-column>
             <el-table-column align="center" label="璋冨嚭浠撳簱浠g爜" width="120">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.HSCWHCode" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=3)"
-                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=3)" />
+                <el-input v-model="scope.row.HSCWHNumber" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(2, scope.row ,eHWHType=4)"
+                  @dblclick.native="openDataDialog(2, scope.row ,eHWHType=4)" />
               </template>
             </el-table-column>
             <el-table-column align="center" label="璋冨嚭浠撳簱" width="120">
@@ -291,7 +300,7 @@
             </el-table-column>
             <el-table-column align="center" label="璋冨嚭浠撲綅浠g爜" width="120">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.HSCSPCode" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=2)"
+                <el-input v-model="scope.row.HSCSPNumber" placeholder="璇疯緭鍏�" @keyup.native.f7="openDataDialog(9, scope.row,HSPType=2)"
                   @dblclick.native="openDataDialog(9, scope.row,HSPType=2)" />
               </template>
             </el-table-column>
@@ -377,6 +386,7 @@
       <GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" />
       <GyMould @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyMouldShow" />
       <GyStockPlace @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyStockPlaceShow" />
+      <ScMouldMove @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :HOrgID="form.HStockOutOrgID" v-if="scMouldMoveShow" />
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
         <el-button @click="deptClose">鍙� 娑�</el-button>
@@ -398,13 +408,14 @@
 import GyCustomer from '@/views/GyCustomer'
 import GyMould from '@/views/scMould/basicModeling/Gy_MouldFileList.vue'
 import GyStockPlace from '@/views/basic/gyStockPlace/gyStockPlace.vue'
+import ScMouldMove from '@/views/scMould/warehouse/Sc_MouldMoveStockRequestBillList.vue'
 import moment from 'moment';
 
 export default {
   name: 'Sc_MouldProdMoveBillEdit',
-  components: { Dept, Warehouse, RowSettings, GyEmployee,GySupplier,GyCustomer,GyMould,GyStockPlace },
+  components: { Dept, Warehouse, RowSettings, GyEmployee,GySupplier,GyCustomer,GyMould,GyStockPlace,ScMouldMove },
   props: {
-    OperationType: { type: Number, },
+    OperationType: { type: Number, },//锛�1鏂板銆�2缂栬緫銆�3澶嶅埗銆�4涓嬫帹锛�
     linterid: { type: Number, },
     HSouceBillType: { type: String, },
     propsData: { type: String, },
@@ -419,6 +430,8 @@
       zzSelDis: false,
       rowHideShow: false,
       openRowHide: false,
+      hSupTypeList: [{name:'渚涘簲鍟�',id:1,},{name:'瀹㈡埛',id:2},{name:'杞﹂棿閮ㄩ棬',id:3}],
+      HSourceBillTypes:[],
       addBtnShow: false,
       zbIndex: null,
       zbSelForm: {},//瀛愯〃閫変腑鏁版嵁
@@ -430,15 +443,18 @@
       gyCustomerShow: false,//瀹㈡埛鏁版嵁缁勪欢
       gyMouldShow: false,//鍣ㄥ叿鏁版嵁缁勪欢
       gyStockPlaceShow: false,//浠撲綅鏁版嵁缁勪欢
+      scMouldMoveShow:false,//婧愬崟缁勪欢
       eHWHType:1,//浠撳簱寮圭獥鍖哄垎鏍囧織
       empType:1,//鑱屽憳寮圭獥鍖哄垎鏍囧織
       HSPType:1,//浠撲綅寮圭獥鍖哄垎鏍囧織
+      deptType:1,//閮ㄩ棬寮圭獥鍖哄垎鏍囧織
       deptform: {},//寮圭獥閫変腑鏁版嵁
       openData: false,//鏁版嵁寮圭獥
       dialogTitle: '',
       organizationList: [],//缁勭粐鍒楄〃
+      ifOrganizationEdit: false,
       subDisabled: false,//缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
-      // OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+      // OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛�1鏂板銆�2缂栬緫銆�3澶嶅埗銆�4涓嬫帹锛�
       HInterID: 0,
       baseURL: process.env.VUE_APP_BASE_API,
       checkedSysZb: [],
@@ -486,26 +502,30 @@
       form: {},
       // 琛ㄥ崟鏍¢獙
       rules: {
+        HBillNo: [
+          { required: true, message: "鍗曟嵁鍙蜂笉鑳戒负绌�", trigger: "blur" }
+        ],
         HDate: [
           { required: true, message: "鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
         ],
-        HWHName: [
-          { required: true, message: "鍣ㄥ叿浠撳簱涓嶈兘涓虹┖", trigger: "blur" }
+        HStockInOrgID: [
+          { required: true, message: "璋冨叆缁勭粐涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        HStockOutOrgID: [
+          { required: true, message: "璋冨嚭缁勭粐涓嶈兘涓虹┖", trigger: "blur" }
         ],
         HSecManagerName: [
-          { required: true, message: "棰嗘枡浜轰笉鑳戒负绌�", trigger: "blur" }
+          { required: true, message: "楠屾敹鍛樹笉鑳戒负绌�", trigger: "blur" }
         ],
         HKeeperName: [
-          { required: true, message: "鍙戞枡浜轰笉鑳戒负绌�", trigger: "blur" }
-        ],
-        HDeptName: [
-          { required: true, message: "閮ㄩ棬涓嶈兘涓虹┖", trigger: "blur" }
+          { required: true, message: "淇濈鍛樹笉鑳戒负绌�", trigger: "blur" }
         ]
       }
     };
   },
   created() {
     this.fetchData()
+    this.SourceBillType()
     this.getdata()
   },
   methods: {
@@ -519,14 +539,29 @@
         this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
       });
     },
+    SourceBillType(){
+      axios.get(this.baseURL + "/Web/GetHSourceBillType", {
+        params: { "HName": '鍣ㄥ叿璋冩嫧鍗�', "Num": 2 }//0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
+      }).then(response => {
+        if (response.data.count == 1) {
+          this.HSourceBillTypes = response.data.data
+          this.form.HSourceBillType = this.HSourceBillTypes[0].HSourceBillType
+          this.form.HSourceBillTypeName = this.HSourceBillTypes[0].HSourceBillTypeName
+        }
+      }).catch(error => {
+        this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+      });
+    },
     getdata() {
       console.log(this.copyType, this.OperationType)
       this.formShow = false
       this.formLoading = true
       if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
         this.handleAdd()
-      } else if (this.OperationType == 3 || this.copyType == 1) {
+      } else if (this.OperationType == 2 || this.copyType == 1) {
         this.handleUpdate()
+      } else if (this.OperationType == 4) {
+        this.handleMove()
       }
     },
     // 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
@@ -553,70 +588,235 @@
       // let options=undefined
       //  this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
     },
+    //鑾峰彇婧愬崟鏁版嵁
+    GetSourceBillList(HSourceInterID, HSourceEntryID, HSourceBillType) {
+        var res = "none"
+        axios.get(this.baseURL + "/Sc_MouldProdMoveBillController/GetSourceBill_MouldProdMove_Json", {
+          params: { "HInterID": HSourceInterID, "HEntryID": HSourceEntryID, "HBillType": HSourceBillType }
+        }).then(response => {
+          if (response.data.count == 1) {
+            res = response.data.data[0]
+          }else {
+            res = "none";
+          }
+        }).catch(error => {
+          this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+        });
+        return res;
+    },
+    //鍐欏叆婧愬崟鏁版嵁
+    setInitBySourceBill(dataArray){
+      var data = dataArray[0]
+      this.form.HSupTypeID = data.HSupTypeID
+      this.form.HSupID = data.HSupID
+      this.form.HSupName = data.HSupName
+      this.form.HDeptID = data.HDeptID
+      this.form.HDeptName = data.HDeptName
+      this.form.HStockInOrgID = data.HStockInOrgID
+      this.form.HStockOutOrgID = data.HStockOutOrgID
+      this.form.HStockOrgID = data.HStockOutOrgID
+      this.form.HStockInOrgID = data.HStockInOrgID == null ? 0 : data.HStockInOrgID
+      this.form.HStockOutOrgID = data.HStockOutOrgID == null ? 0 : data.HStockOutOrgID
+      this.ifOrganizationEdit = true
+      //瀛愯〃  璧嬪��
+      var rowdata = [];
+      for (let i = 0; i < dataArray.length; i++) {
+          rowdata.push(
+              {
+                  "HMaterID": dataArray[i].HMaterID == null ? 0 : dataArray[i].HMaterID
+                  , "HMaterNumber": dataArray[i].HMaterNumber == null ? "" : dataArray[i].HMaterNumber
+                  , "HMaterName": dataArray[i].HMaterName == null ? "" : dataArray[i].HMaterName
+                  , "HMaterModel": dataArray[i].HMaterModel == null ? "" : dataArray[i].HMaterModel
+                  , "HUnitID": dataArray[i].HUnitID == null ? 0 : dataArray[i].HUnitID
+                  , "HUnitNumber": dataArray[i].HUnitNumber == null ? "" : dataArray[i].HUnitNumber
+                  , "HUnitName": dataArray[i].HUnitName == null ? "" : dataArray[i].HUnitName
+                  , "HBatchNo": ""
+                  , "HQty": dataArray[i].HQty == null ? 0 : dataArray[i].HQty
+                  , "HWHID": dataArray[i].HWHID == null ? 0 : dataArray[i].HWHID
+                  , "HWHNumber": dataArray[i].HWHNumber == null ? "" : dataArray[i].HWHNumber
+                  , "HWHName": dataArray[i].HWHName == null ? "" : dataArray[i].HWHName
+                  , "HSPID": "0"
+                  , "HSPNumber": ""
+                  , "HSPName": ""
+                  , "HSCWHID": dataArray[i].HSCWHID == null ? 0 : dataArray[i].HSCWHID
+                  , "HSCWHNumber": dataArray[i].HSCWHNumber == null ? "" : dataArray[i].HSCWHNumber
+                  , "HSCWHName": dataArray[i].HSCWHName == null ? "" : dataArray[i].HSCWHName
+                  , "HSCSPID": "0"
+                  , "HSCSPNumber": ""
+                  , "HSCSPName": ""
+                  , "HSourceInterID": dataArray[i].HInterID == null ? 0 : dataArray[i].HInterID
+                  , "HSourceEntryID": dataArray[i].HEntryID == null ? 0 : dataArray[i].HEntryID
+                  , "HSourceBillType": dataArray[i].HBillType == null ? "" : dataArray[i].HBillType
+                  , "HSourceBillNo": dataArray[i].HBillNo == null ? "" : dataArray[i].HBillNo
+                  , "HRelationQty": "0"
+                  , "HRelationMoney": "0"
+                  , "HRemark": ""
+                  , "HPropertyID": "0"
+                  , "HSecUnitID": "0"
+                  , "HSecUnitRate": "0"
+                  , "HQtyMust": dataArray[i].HQty == null ? 0 : dataArray[i].HQty
+                  , "HPrice": "0"
+                  , "HMoney": "0"
+                  , "HDesignLife": "0"
+                  , "HLeaveLife": "0"
+                  , "HPOOrderInterID": "0"
+                  , "HPOOrderEntryID": "0"
+                  , "HPOOrderBillNo": ""
+                  , "HSeOrderInterID": "0"
+                  , "HSeOrderEntryID": "0"
+                  , "HSeOrderBillNo": ""
+                  , "HSTOCKORGID": dataArray[i].HStockOutOrgID == null ? 0 : dataArray[i].HStockOutOrgID
+                  , "HOtherOrgID": dataArray[i].HStockInOrgID == null ? 0 : dataArray[i].HStockInOrgID
+                  , "HOWNERID": dataArray[i].HStockOutOrgID == null ? 0 : dataArray[i].HStockOutOrgID
+                  , "HOWNERTYPEID": ""
+                  , "HUseLife": "0"
+                  , "HUseLifeQty": "0"
+                  , "HNewLifeQty": "0"
+                  , "HQtyRel": "0"
+                  , "HSPGroupID": "0"
+                  , "HNewModel": ""
+                  , "HWallThickness": ""
+                  , "HHardness": ""
+                  , "HLastProdModel": ""
+                  , "HDiameter": ""
+                  , "HBackFlag": ""
+                  , "HBarCode": ""
+                  , "HMouldType": "0"
+                  , "HInitModel": ""
+                  , "HInitDesignLife": "0"
+                  , "HLifeUnitID": "0"
+                  , "HNowModel": ""
+                  , "HNowLife": "0"
+                  , "HCorrespondentTypeID": "0"
+                  , "HCorrespondentID": "0"
+              }
+          )
+      }
+      this.editData = rowdata
+    },
     //寮圭獥璧嬪��
     dbEmitData(deptRow, num) {
       // num=1閮ㄩ棬 num=2浠撳簱
-      console.log(deptRow)
-      if (deptRow.HItemID || deptRow.hmainid) {
-        if (num == 1) {
-          this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О
-          this.form.HDeptID = deptRow.HItemID
-          this.deptShow = false
-          this.openData = false
-        } else if (num == 2) {
-          if(this.eHWHType == 1){
-            this.form.HWHName = deptRow.浠撳簱鍚嶇О
-            this.form.HWHID = deptRow.HItemID
-            this.form.HWHNumber = deptRow.浠撳簱浠g爜
-          }else if(this.eHWHType == 2){
-            this.editData[this.zbIndex].HWHID = deptRow.HItemID
-            this.editData[this.zbIndex].HWHCode = deptRow.浠撳簱浠g爜
-            this.editData[this.zbIndex].HWHName = deptRow.浠撳簱鍚嶇О
-          }else if(this.eHWHType == 3){
-            this.editData[this.zbIndex].HSCWHID = deptRow.HItemID
-            this.editData[this.zbIndex].HSCWHCode = deptRow.浠撳簱浠g爜
-            this.editData[this.zbIndex].HSCWHName = deptRow.浠撳簱鍚嶇О
+      console.log(33,deptRow)
+      if(num == 3850){
+        if (deptRow.length > 0) {
+          var HSupTypeID_Temp = deptRow[0].HSupTypeID
+          var HStockInOrgID_Temp = deptRow[0].HStockInOrgID
+          for (var i = 0; i < deptRow.length; i++) {
+            if (deptRow[i].HSupTypeID != HSupTypeID_Temp) {
+              this.$modal.msgError("鎵�閫夊崟鎹搴斿線鏉ョ被鍨嬪繀椤讳竴鑷达紒");
+            }
+            if (deptRow[i].HStockInOrgID != HStockInOrgID_Temp) {
+              this.$modal.msgError("鎵�閫夊崟鎹搴旇皟鍏ョ粍缁囧繀椤讳竴鑷达紒");
+            }
           }
-          this.warehouseShow = false
-          this.openData = false
-        } else if (num == 4) {
-          if(this.empType == 1){
-            this.form.HSecManagerName = deptRow.鑱屽憳鍚嶇О
-            this.form.HSecManagerID = deptRow.HItemID
-          }else{
-            this.form.HKeeperName = deptRow.鑱屽憳鍚嶇О
-            this.form.HKeeperID = deptRow.HItemID
-          }
-          this.gyEmployeeShow = false
-          this.openData = false
-        } else if (num == 8){
-          this.editData[this.zbIndex].HMaterID = deptRow.hmainid
-          this.editData[this.zbIndex].HMaterCode = deptRow.妯″叿缂栧彿
-          this.editData[this.zbIndex].HMaterName = deptRow.妯″叿鍚嶇О
-          this.editData[this.zbIndex].HMaterSpec = deptRow.妯″叿鍨嬪彿
-          this.editData[this.zbIndex].HUnitID = deptRow.HUnitID
-          this.editData[this.zbIndex].HUnitCode = deptRow.璁¢噺鍗曚綅浠g爜
-          this.editData[this.zbIndex].HUnitName = deptRow.璁¢噺鍗曚綅
-          this.editData[this.zbIndex].HQty = 1
-          this.gyMouldShow = false
-          this.openData = false
-        } else if (num == 9){
-          if(this.HSPType == 1){
-            this.editData[this.zbIndex].HSPID = deptRow.HMainID
-            this.editData[this.zbIndex].HSPCode = deptRow.浠撲綅浠g爜
-            this.editData[this.zbIndex].HSPName = deptRow.浠撲綅鍚嶇О
-          }else{
-            this.editData[this.zbIndex].HSCSPID = deptRow.HMainID
-            this.editData[this.zbIndex].HSCSPCode = deptRow.浠撲綅浠g爜
-            this.editData[this.zbIndex].HSCSPName = deptRow.浠撲綅鍚嶇О
-          }
-          this.gyStockPlaceShow = false
-          this.openData = false
-        }
-      } else {
-        this.$modal.msgError("璇烽�夋嫨鍗曟潯鏁版嵁!");
-      }
 
+          var dataArray = [];
+          for (var i = 0; i < deptRow.length; i++) {
+              var temp = this.GetSourceBillList(deptRow[i].hmainid, deptRow[i].hsubid, deptRow[i].HBillType)
+              console.log(718,temp)
+              if (temp != "none") {
+                  dataArray.push(temp);
+              } else {
+                this.$modal.msgError("鏈煡璇㈠埌婧愬崟淇℃伅锛岃鍒锋柊婧愬崟鍒楄〃鍚庨噸鏂伴�夋嫨瀵瑰簲婧愬崟锛�");
+              }
+          }
+          this.setInitBySourceBill(dataArray)
+
+          this.scMouldMoveShow = false
+          this.openData = false
+        } else {
+          this.$modal.msgError("璇烽�夋嫨鏁版嵁!");
+        }
+      }else{
+        if (deptRow.HItemID || deptRow.hmainid) {
+          if (num == 1) {
+            if(this.deptType == 1){
+              this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О
+              this.form.HDeptID = deptRow.HItemID
+            }else{
+              this.form.HSupName = deptRow.閮ㄩ棬鍚嶇О
+              this.form.HSupID = deptRow.HItemID
+            }
+            this.deptShow = false
+            this.openData = false
+          } else if (num == 2) {
+            if(this.eHWHType == 1){
+              this.form.HWHName = deptRow.浠撳簱鍚嶇О
+              this.form.HWHID = deptRow.HItemID
+              this.form.HWHNumber = deptRow.浠撳簱浠g爜
+            }else if(this.eHWHType == 2){
+              this.form.HSCWHName = deptRow.浠撳簱鍚嶇О
+              this.form.HSCWHID = deptRow.HItemID
+              this.form.HSCWHNumber = deptRow.浠撳簱浠g爜
+            }else if(this.eHWHType == 3){
+              this.editData[this.zbIndex].HWHID = deptRow.HItemID
+              this.editData[this.zbIndex].HWHNumber = deptRow.浠撳簱浠g爜
+              this.editData[this.zbIndex].HWHName = deptRow.浠撳簱鍚嶇О
+            }else if(this.eHWHType == 4){
+              this.editData[this.zbIndex].HSCWHID = deptRow.HItemID
+              this.editData[this.zbIndex].HSCWHNumber = deptRow.浠撳簱浠g爜
+              this.editData[this.zbIndex].HSCWHName = deptRow.浠撳簱鍚嶇О
+            }
+            this.warehouseShow = false
+            this.openData = false
+          } else if (num == 4) {
+            if(this.empType == 1){
+              this.form.HEmpName = deptRow.鑱屽憳鍚嶇О
+              this.form.HEmpID = deptRow.HItemID
+            }else if(this.empType == 2){
+              this.form.HMangerName = deptRow.鑱屽憳鍚嶇О
+              this.form.HMangerID = deptRow.HItemID
+            }else if(this.empType == 3){
+              this.form.HSecManagerName = deptRow.鑱屽憳鍚嶇О
+              this.form.HSecManagerID = deptRow.HItemID
+            }else if(this.empType == 4){
+              this.form.HKeeperName = deptRow.鑱屽憳鍚嶇О
+              this.form.HKeeperID = deptRow.HItemID
+            }else
+            this.gyEmployeeShow = false
+            this.openData = false
+          } else if (num == 6) {
+            this.form.HSupName = deptRow.渚涘簲鍟嗗悕绉�
+            this.form.HSupID = deptRow.HItemID
+            this.gySupplierShow = false
+            this.openData = false
+          } else if (num == 7) {
+            this.form.HSupName = deptRow.瀹㈡埛鍚嶇О
+            this.form.HSupID = deptRow.HItemID
+            this.gyCustomerShow = false
+            this.openData = false
+          } else if (num == 8){
+            this.editData[this.zbIndex].HMaterID = deptRow.hmainid
+            this.editData[this.zbIndex].HMaterNumber = deptRow.妯″叿缂栧彿
+            this.editData[this.zbIndex].HMaterName = deptRow.妯″叿鍚嶇О
+            this.editData[this.zbIndex].HMaterModel = deptRow.妯″叿鍨嬪彿
+            this.editData[this.zbIndex].HUnitID = deptRow.HUnitID
+            this.editData[this.zbIndex].HUnitNumber = deptRow.璁¢噺鍗曚綅浠g爜
+            this.editData[this.zbIndex].HUnitName = deptRow.璁¢噺鍗曚綅
+            this.editData[this.zbIndex].HQty = 1
+            this.editData[this.zbIndex].HDesignLife = 0
+            this.editData[this.zbIndex].HLeaveLife = 0
+            this.editData[this.zbIndex].HMoney = 0
+            this.gyMouldShow = false
+            this.openData = false
+          } else if (num == 9){
+            if(this.HSPType == 1){
+              this.editData[this.zbIndex].HSPID = deptRow.HMainID
+              this.editData[this.zbIndex].HSPCode = deptRow.浠撲綅浠g爜
+              this.editData[this.zbIndex].HSPName = deptRow.浠撲綅鍚嶇О
+            }else{
+              this.editData[this.zbIndex].HSCSPID = deptRow.HMainID
+              this.editData[this.zbIndex].HSCSPCode = deptRow.浠撲綅浠g爜
+              this.editData[this.zbIndex].HSCSPName = deptRow.浠撲綅鍚嶇О
+            }
+            this.gyStockPlaceShow = false
+            this.openData = false
+          }
+        } else {
+          this.$modal.msgError("璇烽�夋嫨鍗曟潯鏁版嵁!");
+        }
+      }
     },
     emitData(deptRow, num) {
       this.dialogTypeNum = num
@@ -744,69 +944,98 @@
         this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
       });
     },
+    /** 涓嬫帹鎵撳紑 */
+    handleMove() {
+      this.reset()
+      //鏂板鑾峰彇鍗曟嵁鍙�
+      this.getHBillNo()
+      let date = new Date()
+      this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss')
+
+      //璁剧疆婧愬崟绫诲瀷
+      this.form.HSourceBillType = this.HSouceBillType
+      //鑾峰彇婧愬崟鏁版嵁
+      var data = this.getUrlVars_JSON().data;
+      var dataArray = [];
+      for (var i = 0; i < data.length; i++) {
+          var temp = this.GetSourceBillList(data[i].hmainid, data[i].hsubid, data[i].HBillType)
+          console.log(temp)
+          if (temp != "none") {
+              dataArray.push(temp);
+          } else {
+              this.$modal.msgError("鏈煡璇㈠埌鍗曟嵁鍙笅鎺ㄦ暟鎹紝璇峰埛鏂板崟鎹垪琛ㄥ悗閲嶆柊閫夋嫨鍗曟嵁涓嬫帹锛�");
+              return;
+          }
+      }
+      this.$nextTick(() => {
+        this.setInitBySourceBill(dataArray);
+        this.OperationType = 1;
+        this.formShow = true
+        this.formLoading = false
+      })
+    },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate() {
       this.reset()
       let rowHmainid = this.linterid
       console.log(this.linterid)
       //涓昏〃
-      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/Sc_MouldProdMoveBillListCheckDetai", {
-        params: { 'HID': rowHmainid }
+      axios.get(this.baseURL + "/Sc_MouldStockBillController/GetSc_MouldStockBill_Json", {
+        params: { 'HInterID': rowHmainid,"HMaker": sessionStorage["HUserName"] }
       }).then(response => {
-        if (response.data.code == 1) {
-          var data = response.data.data.h_v_Sc_MouldProdMoveBill_Edit[0]
-          console.log(data)
+        if (response.data.count == 1) {
+          var data = response.data.data[0]
+          // console.log(response.data)
           if (this.copyType == 1) {
             this.getHBillNo()
             let date = new Date()
             this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss')
           } else {
-            this.form = {
-                  "HBillNo": data.鍗曟嵁鍙�
-                , "HDate": data.鏃ユ湡
-                , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
-                , "HWHID": data.HWHID1                    //浠撳簱ID
-                , "HWHName": data.鍣ㄥ叿浠撳簱                   //浠撳簱鍚嶇О
-                , "HSecManagerID": data.hsecmanagerid    //楠屾敹鍛業D
-                , "HSecManagerName": data.棰嗘枡浜�         //楠屾敹鍛樺悕绉�
-                , "HKeeperID": data.hkeeperid            //淇濈鍛業D
-                , "HKeeperName": data.鍙戞枡浜�            //淇濈鍛樺悕绉�
-                , "HDeptID": data.HDeptID                 //閮ㄩ棬ID
-                , "HDeptName": data.閮ㄩ棬                //閮ㄩ棬鍚嶇О
-                , "HSourceBillType": ""                   //婧愬崟绫诲瀷
-                , "XDH": ""                               //閫夊崟鍙�
-                , "HExplanation": data.鎽樿              //鎽樿
-                , "HRemark": data.琛ㄥご澶囨敞                    //澶囨敞
-                , "HStockStyle": data.璋冩嫧绫诲瀷
-                
-                , "HMaker": data.鍒跺崟浜�
-                , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : data.鍒跺崟鏃ユ湡
-                , "HChecker": data.瀹℃牳浜�
-                , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : data.瀹℃牳鏃ユ湡
-                , "HUpDater": data.淇敼浜�
-                , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : data.淇敼鏃ユ湡
-                , "HCloseMan": data.鍏抽棴浜�
-                , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : data.鍏抽棴鏃ユ湡
-                , "HDeleteMan": data.浣滃簾浜�
-                , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : data.浣滃簾鏃ユ湡
+            if (data[0].HSourceInterID != "0") {
+              this.ifOrganizationEdit = true
             }
+            this.form = {
+                "HBillNo": data[0].鍗曟嵁鍙�
+                , "HDate": data[0].鏃ユ湡
+                , "HSupTypeID": data[0].HSupTypeID
+                , "HSupID": data[0].HSupID
+                , "HSupName": data[0].寰�鏉ュ崟浣�
+                , "HDeptID": data[0].HDeptID
+                , "HDeptName": data[0].閮ㄩ棬
+                , "HWHID": data[0].HMainWHID
+                , "HWHName": data[0].璋冨叆浠撳簱
+                , "HSCWHID": data[0].HMainSCWHID
+                , "HSCWHName": data[0].璋冨嚭浠撳簱
+                , "HEmpID": data[0].HEmpID
+                , "HEmpName": data[0].涓氬姟鍛�
+                , "HManagerID": data[0].HManagerID
+                , "HManagerName": data[0].璐熻矗浜�
+                , "HSecManagerID": data[0].HSecManagerID
+                , "HSecManagerName": data[0].楠屾敹鍛�
+                , "HKeeperID": data[0].HKeeperID
+                , "HKeeperName": data[0].淇濈鍛�
+                , "HExplanation": data[0].鎽樿
+                , "HRemark": data[0].琛ㄥご澶囨敞
+                , "HInnerBillNo": data[0].鍐呴儴鍗曟嵁鍙�
+                , "HStockInOrgID": data[0].HStockInOrgID
+                , "HStockOutOrgID": data[0].HStockOutOrgID
+                , "HMaker": data[0].鍒跺崟浜�
+                , "HChecker": data[0].瀹℃牳浜�
+                , "HCloseMan": data[0].鍏抽棴浜�
+                , "HUpDater": data[0].淇敼浜�
+                , "HDeleteMan": data[0].浣滃簾浜�
+                , "HMakeDate": data[0].鍒跺崟鏃ユ湡 == null ? "" : data[0].鍒跺崟鏃ユ湡
+                , "HCheckDate": data[0].瀹℃牳鏃ユ湡 == null ? "" : data[0].瀹℃牳鏃ユ湡
+                , "HCloseDate": data[0].鍏抽棴鏃ユ湡 == null ? "" : data[0].鍏抽棴鏃ユ湡
+                , "HUpDateDate": data[0].淇敼鏃ユ湡 == null ? "" : data[0].淇敼鏃ユ湡
+                , "HDeleteDate": data[0].浣滃簾鏃ユ湡 == null ? "" : data[0].浣滃簾鏃ユ湡
+            }
+            this.form.HStockInOrgID = data[0].HStockInOrgID == null ? 0 : data[0].HStockInOrgID;
+            this.form.HStockOutOrgID = data[0].HStockOutOrgID == null ? 0 : data[0].HStockOutOrgID;
+            //瀛愯〃  璧嬪��
+            this.editData = response.data.data[0];
+            this.editData1 = response.data.data[1];
           }
-          this.formShow = true
-          this.formLoading = false
-        }
-      }).catch(error => {
-        console.log(error)
-        this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-      });
-      //瀛愯〃
-      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/Sc_MouldProdMoveBillListProjectDetai", {
-        params: { 'sqlWhere': "and hmainid=" + rowHmainid }
-      }).then(response => {
-        if (response.data.count == 1) {
-          var data = response.data
-          console.log(data)
-          this.editData = data.list[0]
-          this.editData1 = data.list[1]
           this.formShow = true
           this.formLoading = false
         }
@@ -825,38 +1054,72 @@
         this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹紪杈�!");
       } else {
         let obj = {
-          HBatchNo: "",
-          HDesignLife: 0,
-          HLeaveLife: 0,
-          HMaterCode:"",
-          HMaterID:0,
-          HMaterName:"",
-          HMaterSpec:"",
-          HMoney:0,
-          HPrice:0,
-          HQty:0,
-          HQtyMust:0,
-          HSPCode:"",
-          HSPID:0,
-          HSPName:"",
-          HOtherOrgID:sessionStorage["OrganizationID"] - 0,//缁勭粐id
-          HStockOrgID:0,
-          HStockOrgCode:"",
-          HStockOrgName:"",
-          HUnitCode:"",
-          HUnitID:0,
-          HUnitName:"",
-          HUseLife:0,
-          HWHCode:"",
-          HWHID:0,
-          HWHName:"",
-          HSCWHID:0,
-          HSCWHCode:"",
-          HSCWHName:"",
-          HSCSPID:0,
-          HSCSPCode:"",
-          HSCSPName:"",
-          HRemark:"",
+            "HMaterID": "0"
+            , "HMaterNumber": ""
+            , "HMaterName": ""
+            , "HMaterModel": ""
+            , "HUnitID": "0"
+            , "HUnitNumber": ""
+            , "HUnitName": ""
+            , "HBatchNo": ""
+            , "HQty": "0"
+            , "HWHID": "0"
+            , "HWHNumber": ""
+            , "HWHName": ""
+            , "HSPID": "0"
+            , "HSPNumber": ""
+            , "HSPName": ""
+            , "HSCWHID": "0"
+            , "HSCWHNumber": ""
+            , "HSCWHName": ""
+            , "HSCSPID": "0"
+            , "HSCSPNumber": ""
+            , "HSCSPName": ""
+            , "HSourceInterID": "0"
+            , "HSourceEntryID": "0"
+            , "HSourceBillType": ""
+            , "HSourceBillNo": ""
+            , "HRelationQty": "0"
+            , "HRelationMoney": "0"
+            , "HRemark": ""
+            , "HPropertyID": "0"
+            , "HSecUnitID": "0"
+            , "HSecUnitRate": "0"
+            , "HQtyMust": "0"
+            , "HPrice": "0"
+            , "HMoney": "0"
+            , "HDesignLife": "0"
+            , "HLeaveLife": "0"
+            , "HPOOrderInterID": "0"
+            , "HPOOrderEntryID": "0"
+            , "HPOOrderBillNo": ""
+            , "HSeOrderInterID": "0"
+            , "HSeOrderEntryID": "0"
+            , "HSeOrderBillNo": ""
+            , "HSTOCKORGID": sessionStorage["OrganizationID"] - 0
+            , "HOtherOrgID": sessionStorage["OrganizationID"] - 0
+            , "HOWNERID": sessionStorage["OrganizationID"] - 0
+            , "HOWNERTYPEID": ""
+            , "HUseLife": "0"
+            , "HUseLifeQty": "0"
+            , "HNewLifeQty": "0"
+            , "HQtyRel": "0"
+            , "HSPGroupID": "0"
+            , "HNewModel": ""
+            , "HWallThickness": ""
+            , "HHardness": ""
+            , "HLastProdModel": ""
+            , "HDiameter": ""
+            , "HBackFlag": ""
+            , "HBarCode": ""
+            , "HMouldType": "0"
+            , "HInitModel": ""
+            , "HInitDesignLife": "0"
+            , "HLifeUnitID": "0"
+            , "HNowModel": ""
+            , "HNowLife": "0"
+            , "HCorrespondentTypeID": "0"
+            , "HCorrespondentID": "0"
         }
         if (index) {
           this.editData.splice(index, 0, obj);
@@ -931,7 +1194,7 @@
           let fhck = false
           if(this.editData.length == 0){
               fhck = true
-              this.$modal.msgError("娌℃湁鐗╂枡鏄庣粏璁板綍锛�");
+              this.$modal.msgError("娌℃湁鏄庣粏璁板綍锛�");
           }
           this.editData.map((item, index) => {
             if (!item.HMaterID) {
@@ -943,19 +1206,31 @@
             }else if(!item.HSCWHID){
               fhck = true
               this.$modal.msgError("绗�" + (index + 1) + "琛岋細璋冨嚭浠撳簱鏈�夋嫨锛�");
+            }else if(!item.HUnitID){
+              fhck = true
+              this.$modal.msgError("绗�" + (index + 1) + "琛岋細璁¢噺鍗曚綅涓虹┖锛�");
+            }else if(item.HQty == 0){
+              fhck = true
+              this.$modal.msgError("绗�" + (index + 1) + "琛岋細鏁伴噺涓嶈兘涓�0锛�");
             }
           })
           this.$nextTick(() => {
             if (!fhck) {
-              if(this.OperationType == 3){
-                this.form.HInterID = this.linterid
+              var Operation = null
+              if(!this.OperationType){
+                Operation = 1
+              }else{
+                Operation = this.OperationType
+                if(Operation == 2){
+                  this.form.HInterID = this.linterid
+                }
               }
               var sMainStr = JSON.stringify(this.form);
               var sSubStr = JSON.stringify(this.editData);
-              var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
+              var sMainSub = sMainStr + ';' + sSubStr + ';' + Operation + ";" + sessionStorage["HUserName"];
               axios({
                 method: 'post',
-                url: this.baseURL + "/Sc_MouldProdMoveBill/SaveGetMouldProdMoveBillList",
+                url: this.baseURL + "/Sc_MouldProdMoveBillController/GetSc_MouldProdMoveBill_Save_Json",
                 data: {
                   'msg': sMainSub
                 },
@@ -984,12 +1259,13 @@
     set_CheckBill(num, form) {
       var InterID = form.hmainid || form.HInterID
       //閫昏緫瀹℃牳鏂规硶
-      axios.get(this.baseURL + "/Sc_MouldProdMoveBill/AuditMouldProdMoveBill", {
-        params: { "HInterID": InterID, "flag": num, "user": sessionStorage["HUserName"] }
+      axios.get(this.baseURL + "/Sc_MouldProdMoveBillController/GetSc_MouldProdMoveBill_Check_Json", {
+        params: { "HInterID": InterID, "Type": num, "HMaker": sessionStorage["HUserName"] }
       }).then(response => {
         let result = response.data
         if (result.code == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.close()
         }
         else {
           this.$modal.msgError("閿欒:" + result.code + result.Message,);
@@ -1006,6 +1282,7 @@
       this.gyCustomerShow = false
       this.gyMouldShow = false
       this.gyStockPlaceShow = false
+      this.scMouldMoveShow = false
     },
     //  鎵撳紑鏁版嵁鍒楄〃寮圭獥
     openDataDialog(num, row) {
@@ -1046,8 +1323,31 @@
         this.dialogTitle = '浠撲綅鍒楄〃'
         this.gyStockPlaceShow = true
         this.openData = true
+      } else if (num == 3850) {
+        this.dialogTitle = '鍣ㄥ叿璋冩嫧鐢宠鍗曞垪琛�'
+        this.scMouldMoveShow = true
+        this.openData = true
       } 
     },
+    //鏍规嵁寰�鏉ョ被鍨嬪垽鏂線鏉ュ崟浣�
+    openDataDialogChoose(){
+      if(this.form.HSupTypeID == 1){
+        this.openDataDialog(6)
+      }else if(this.form.HSupTypeID == 2){
+        this.openDataDialog(7)
+      }else if(this.form.HSupTypeID == 3){
+        this.deptType = 2
+        this.openDataDialog(1)
+      }
+    },
+    //閫夋嫨婧愬崟
+    get_checkMainSource(){
+      if(this.form.HSourceBillType == "3850"){
+        this.openDataDialog(3850)
+      }else{
+        this.$modal.msgError("鏈煡璇㈠埌鎵�閫夋簮鍗曠被鍨嬬浉鍏冲崟鎹俊鎭�!");
+      }
+    },
   }
 };
 </script>
diff --git a/src/views/scMould/warehouse/Sc_MouldProdMoveBillList.vue b/src/views/scMould/warehouse/Sc_MouldProdMoveBillList.vue
index 2dea67a..cefd064 100644
--- a/src/views/scMould/warehouse/Sc_MouldProdMoveBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldProdMoveBillList.vue
@@ -25,36 +25,34 @@
       <el-collapse v-model="activeSeach">
         <el-collapse-item title="鏇村" name="1">
           <el-card class="box-card">
-            <el-form-item label="缁勭粐鍚嶇О" prop="HStockOrgName">
-              <el-input v-model="queryParams.HStockOrgName" placeholder="璇疯緭鍏ョ粍缁囧悕绉�" @keyup.enter.native="handleQuery" />
-            </el-form-item>
-            <!-- <el-form-item label="缁勭粐">
-              <el-select v-model="queryParams.HOrgID" placeholder="璇烽�夋嫨">
-                <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
-                </el-option>
-              </el-select>
-            </el-form-item> -->
-            <el-form-item label="閮ㄩ棬淇℃伅" prop="HDept">
-              <el-input v-model="queryParams.HDept" 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="鍣ㄥ叿浠g爜" prop="HModelNumber">
-              <el-input v-model="queryParams.HModelNumber" placeholder="璇疯緭鍏ュ櫒鍏蜂唬鐮�" @keyup.enter.native="handleQuery" />
-            </el-form-item>
-            <el-form-item label="浠撳簱" prop="HWhName">
-              <el-input v-model="queryParams.HWhName" 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>
-            <div slot="header" class="clearfix"><span>杩囨护</span></div>
+              <el-form-item label="鐘舵��" prop="HStatus">
+                <el-select v-model="queryParams.HStatus" placeholder="璇烽�夋嫨鐘舵��">
+                  <el-option v-for="(item, index) in HStatusList" :key="index" :label="item.name" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="璋冨嚭缁勭粐">
+                <el-select v-model="queryParams.HStockOutOrgID" placeholder="璇烽�夋嫨">
+                  <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="閮ㄩ棬淇℃伅" prop="HDept">
+                <el-input v-model="queryParams.HDept" placeholder="璇疯緭鍏ラ儴闂ㄤ俊鎭�" @keyup.enter.native="handleQuery" />
+              </el-form-item>
+              <el-form-item label="鍣ㄥ叿浠g爜" prop="HModelNumber">
+                <el-input v-model="queryParams.HModelNumber" 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>
+            <div slot="header" class="clearfix"><span>鍏朵粬鏉′欢</span></div>
             <div>
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -67,7 +65,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -77,7 +75,8 @@
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -90,7 +89,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -99,7 +98,8 @@
               </el-row>
               <el-form-item label-width="0">
                 <el-row>
-                  <el-col :span="7">
+                  <el-col :span="2"><span>杩囨护</span></el-col>
+                  <el-col :span="6">
                     <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
                       <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
                         :value="item.field"></el-option>
@@ -111,7 +111,7 @@
                         :value="item.value"></el-option>
                     </el-select>
                   </el-col>
-                  <el-col :span="11">
+                  <el-col :span="10">
                     <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
                       @keyup.enter.native="handleQuery" />
                   </el-col>
@@ -253,7 +253,7 @@
         { label: '杩戜竴骞�', value: 365 },
       ],
       organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
-      hPriceTypeList: ['鎴愭湰浠�', '缁撶畻浠�'],
+      HStatusList: [{name:'鍏ㄩ儴',value:'-1'},{name:'鏈鏍�',value:'0'},{name:'宸插鏍�',value:'1'},{name:'宸插叧闂�',value:'2'}],
       addBtnShow: false,
       dialogTitle: '',
       OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
@@ -271,11 +271,10 @@
       queryParams: {
         HBillNo: '',
         HInitTimeCycle: 29,
-        HStockOrgName: '',
+        HStockOutOrgID: sessionStorage["OrganizationID"] - 0,
+        HStatus:'-1',
         HDept:'',
-        HMaterNumber: '',
         HModelNumber:'',
-        HWhName:'',
         HSupName:'',
         ColName1: '',
         ColName2: '',
@@ -374,20 +373,23 @@
       this.tableShow = false
       this.loading = true
       if (this.sTime && !this.sWhere) {
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'"
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'"
+        this.sTime = moment(this.sTime).format('YYYY-MM-DD')
+        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
+        this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
+        this.sWhere += " and 鏃ユ湡 <= '" + this.eTime + "'";
       }
+      this.sWhere += " and HSTOCKORGID=" + this.queryParams.HStockOutOrgID;
       if (this.pageSize == 0) {
         this.pageSize = 50
       }
       // 閿�鍞嚭搴撳崟鍒楄〃
-      axios.get(this.baseURL + '/Sc_MouldProdMoveBill/page', {
+      axios.get(this.baseURL + '/Sc_MouldProdMoveBillController/page', {
         params: {
           "sWhere": this.sWhere,
           "user": sessionStorage["HUserName"],
-          "Organization": sessionStorage["Organization"],
           "page": this.page,
-          "size": this.pageSize
+          "size": this.pageSize,
+          "Type": '3814',
         },
       }).then(response => {
         this.tyResList = response.data.data//鎬绘暟鎹�
@@ -583,7 +585,7 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 3
-      this.handleEdit()
+      this.handleEdit(row)
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
@@ -661,34 +663,44 @@
         }
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
-      if (this.sTime) {
-        this.sTime = moment(this.sTime).format('YYYY-MM-DD')
-        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
-        console.log(this.sTime, this.eTime)
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'" + " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'";
+      if (this.queryParams.HStatus) {
+          switch (this.queryParams.HStatus) {
+              case '-1':   //鍏ㄩ儴
+                  this.sWhere += "";
+                  break;
+              case '0':    //鏈鏍�
+                  this.sWhere += " and 瀹℃牳浜�=''";
+                  break;
+              case '1':    //宸插鏍�
+                  this.sWhere += " and 瀹℃牳浜�<>''";
+                  break;
+              case '2':    //宸插叧闂�
+                  this.sWhere += " and 鍏抽棴浜�<>''";
+              default:
+          }
       }
-      
+      if (this.sTime) {
+          this.sTime = moment(this.sTime).format('YYYY-MM-DD')
+          this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
+      }
+      if (this.eTime) {
+          this.eTime = moment(this.eTime).format('YYYY-MM-DD')
+          this.sWhere += " and 鏃ユ湡 <= '" + this.eTime + "'";
+      }
       if (this.queryParams.HBillNo) {
         this.sWhere += " and 鍗曟嵁鍙� like '%" + this.queryParams.HBillNo + "%'";
-      }
-      if (this.queryParams.HStockOrgName) {
-        this.sWhere += " and 缁勭粐鍚嶇О like '%" + this.queryParams.HStockOrgName + "%'";
       }
       if (this.queryParams.HDept) {
           this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDept + "%'";
       }
-      if (this.queryParams.HMaterNumber) {
-          this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.HMaterNumber + "%'";
-      }
       if (this.queryParams.HModelNumber) {
-          this.sWhere += " and 妯″叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
-      }
-      if (this.queryParams.HWhName) {
-          this.sWhere += " and 浠撳簱 like '%" + this.queryParams.HWhName + "%'";
+          this.sWhere += " and 鍣ㄥ叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
       }
       if (this.queryParams.HSupName) {
           this.sWhere += " and 寰�鏉ュ崟浣� like '%" + this.queryParams.HSupName + "%'";
       }
+
+      this.clearData()
       this.getList()
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -697,11 +709,10 @@
       this.queryParams = {
         HBillNo: '',
         HInitTimeCycle: 29,
-        HStockOrgName: '',
+        HStockOutOrgID: sessionStorage["OrganizationID"] - 0,
+        HStatus:'-1',
         HDept:'',
-        HMaterNumber: '',
         HModelNumber:'',
-        HWhName:'',
         HSupName:'',
         ColName1: '',
         ColName2: '',
@@ -715,6 +726,7 @@
       }
       this.riqiChange()
       this.resetForm("queryForm")
+      this.clearData()
       this.getList()
     },
 
@@ -724,6 +736,7 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow = false
+      this.clearData()
       this.getList()
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
@@ -743,7 +756,16 @@
       this.open = val
       this.editShow = false
       this.openEdit = val
+      this.clearData()
       this.getList()
+    },
+    //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
+    clearData(){
+      this.ids = []
+      this.multiple = true
+      this.single = true
+      this.OperationType = 0
+      this.copyType = 0
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
@@ -772,6 +794,7 @@
         let result = response.data
         if (result.count == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.clearData()
           this.getList();
         }
         else {
diff --git a/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue b/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
index 38aa162..577ab4e 100644
--- a/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldProdOutBillList.vue
@@ -25,30 +25,34 @@
       <el-collapse v-model="activeSeach">
         <el-collapse-item title="鏇村" name="1">
           <el-card class="box-card">
-            <el-form-item label="缁勭粐鍚嶇О" prop="HStockOrgName">
-              <el-input v-model="queryParams.HStockOrgName" placeholder="璇疯緭鍏ョ粍缁囧悕绉�" @keyup.enter.native="handleQuery" />
+            <el-form-item label="鐘舵��" prop="HStatus">
+              <el-select v-model="queryParams.HStatus" placeholder="璇烽�夋嫨鐘舵��">
+                <el-option v-for="(item, index) in HStatusList" :key="index" :label="item.name" :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="缁勭粐">
+              <el-select v-model="queryParams.HStockOrgID" placeholder="璇烽�夋嫨">
+                <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID">
+                </el-option>
+              </el-select>
             </el-form-item>
             <el-form-item label="閮ㄩ棬淇℃伅" prop="HDept">
               <el-input v-model="queryParams.HDept" 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="鍣ㄥ叿浠g爜" prop="HModelNumber">
               <el-input v-model="queryParams.HModelNumber" placeholder="璇疯緭鍏ュ櫒鍏蜂唬鐮�" @keyup.enter.native="handleQuery" />
-            </el-form-item>
-            <el-form-item label="浠撳簱" prop="HWhName">
-              <el-input v-model="queryParams.HWhName" 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>
-            <div slot="header" class="clearfix"><span>杩囨护</span></div>
+            <div slot="header" class="clearfix"><span>鍏朵粬鏉′欢</span></div>
             <div>
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName1" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -61,7 +65,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent1" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -71,7 +75,8 @@
               <el-row>
                 <el-form-item label-width="0">
                   <el-row>
-                    <el-col :span="7">
+                    <el-col :span="2"><span>杩囨护</span></el-col>
+                    <el-col :span="6">
                       <el-select v-model="queryParams.ColName2" placeholder="璇烽�夋嫨" @change="riqiChange">
                         <span v-for="(item, index) in btList" :key="index">
                           <el-option :label="item.field" :value="item.field" v-if="!item.hide"></el-option>
@@ -84,7 +89,7 @@
                           :value="item.value"></el-option>
                       </el-select>
                     </el-col>
-                    <el-col :span="11">
+                    <el-col :span="10">
                       <el-input v-model="queryParams.ColContent2" placeholder="璇疯緭鍏�" clearable
                         @keyup.enter.native="handleQuery" />
                     </el-col>
@@ -93,7 +98,8 @@
               </el-row>
               <el-form-item label-width="0">
                 <el-row>
-                  <el-col :span="7">
+                  <el-col :span="2"><span>杩囨护</span></el-col>
+                  <el-col :span="6">
                     <el-select v-model="queryParams.ColName" placeholder="璇烽�夋嫨" @change="riqiChange">
                       <el-option v-for="(item, index) in btList" :key="index" :label="item.field"
                         :value="item.field"></el-option>
@@ -105,7 +111,7 @@
                         :value="item.value"></el-option>
                     </el-select>
                   </el-col>
-                  <el-col :span="11">
+                  <el-col :span="10">
                     <el-input v-model="queryParams.ColContent" placeholder="璇疯緭鍏�" clearable
                       @keyup.enter.native="handleQuery" />
                   </el-col>
@@ -246,7 +252,8 @@
         { label: '杩戝崐骞�', value: 180 },
         { label: '杩戜竴骞�', value: 365 },
       ],
-      hPriceTypeList: ['鎴愭湰浠�', '缁撶畻浠�'],
+      organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
+      HStatusList: [{name:'鍏ㄩ儴',value:'-1'},{name:'鏈鏍�',value:'0'},{name:'宸插鏍�',value:'1'},{name:'宸插叧闂�',value:'2'}],
       addBtnShow: false,
       dialogTitle: '',
       OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
@@ -264,11 +271,10 @@
       queryParams: {
         HBillNo: '',
         HInitTimeCycle: 29,
-        HStockOrgName: '',
+        HStockOrgID: sessionStorage["OrganizationID"] - 0,
+        HStatus:'-1',
         HDept:'',
-        HMaterNumber: '',
         HModelNumber:'',
-        HWhName:'',
         HSupName:'',
         ColName1: '',
         ColName2: '',
@@ -367,20 +373,23 @@
       this.tableShow = false
       this.loading = true
       if (this.sTime && !this.sWhere) {
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'"
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'"
+        this.sTime = moment(this.sTime).format('YYYY-MM-DD')
+        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
+        this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
+        this.sWhere += " and 鏃ユ湡 <= '" + this.eTime + "'";
       }
+      this.sWhere += " and HSTOCKORGID=" + this.queryParams.HStockOrgID
       if (this.pageSize == 0) {
         this.pageSize = 50
       }
-      // 閿�鍞嚭搴撳崟鍒楄〃
-      axios.get(this.baseURL + '/Sc_MouldProdOutBill/list_byPage', {
+      // 鍒嗛〉鏌ヨ
+      axios.get(this.baseURL + '/Sc_MouldProdOutBillController/page', {
         params: {
           "sWhere": this.sWhere,
           "user": sessionStorage["HUserName"],
-          "Organization": sessionStorage["Organization"],
           "page": this.page,
-          "size": this.pageSize
+          "size": this.pageSize,
+          "Type":'3802',
         },
       }).then(response => {
         this.tyResList = response.data.data//鎬绘暟鎹�
@@ -577,7 +586,7 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 3
-      this.handleEdit()
+      this.handleEdit(row)
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
@@ -655,34 +664,43 @@
         }
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
+      if (this.queryParams.HStatus) {
+          switch (this.queryParams.HStatus) {
+              case '-1':   //鍏ㄩ儴
+                  this.sWhere += "";
+                  break;
+              case '0':    //鏈鏍�
+                  this.sWhere += " and 瀹℃牳浜�=''";
+                  break;
+              case '1':    //宸插鏍�
+                  this.sWhere += " and 瀹℃牳浜�<>''";
+                  break;
+              case '2':    //宸插叧闂�
+                  this.sWhere += " and 鍏抽棴浜�<>''";
+              default:
+          }
+      }
       if (this.sTime) {
         this.sTime = moment(this.sTime).format('YYYY-MM-DD')
-        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
-        console.log(this.sTime, this.eTime)
-        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'" + " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'";
+        this.sWhere += " and 鏃ユ湡 >= '" + this.sTime + "'";
       }
-      
+      if (this.eTime) {
+        this.eTime = moment(this.eTime).format('YYYY-MM-DD')
+        this.sWhere += " and 鏃ユ湡 <= '" + this.eTime + "'";
+      }
       if (this.queryParams.HBillNo) {
         this.sWhere += " and 鍗曟嵁鍙� like '%" + this.queryParams.HBillNo + "%'";
-      }
-      if (this.queryParams.HStockOrgName) {
-        this.sWhere += " and 缁勭粐鍚嶇О like '%" + this.queryParams.HStockOrgName + "%'";
       }
       if (this.queryParams.HDept) {
           this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDept + "%'";
       }
-      if (this.queryParams.HMaterNumber) {
-          this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.HMaterNumber + "%'";
-      }
       if (this.queryParams.HModelNumber) {
-          this.sWhere += " and 妯″叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
-      }
-      if (this.queryParams.HWhName) {
-          this.sWhere += " and 浠撳簱 like '%" + this.queryParams.HWhName + "%'";
+          this.sWhere += " and 鍣ㄥ叿浠g爜 like '%" + this.queryParams.HModelNumber + "%'";
       }
       if (this.queryParams.HSupName) {
           this.sWhere += " and 寰�鏉ュ崟浣� like '%" + this.queryParams.HSupName + "%'";
       }
+      this.clearData()
       this.getList()
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -691,11 +709,10 @@
       this.queryParams = {
         HBillNo: '',
         HInitTimeCycle: 29,
-        HStockOrgName: '',
+        HStockOrgID: sessionStorage["OrganizationID"] - 0,
+        HStatus:'-1',
         HDept:'',
-        HMaterNumber: '',
         HModelNumber:'',
-        HWhName:'',
         HSupName:'',
         ColName1: '',
         ColName2: '',
@@ -709,6 +726,7 @@
       }
       this.riqiChange()
       this.resetForm("queryForm")
+      this.clearData()
       this.getList()
     },
 
@@ -718,6 +736,7 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow = false
+      this.clearData()
       this.getList()
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
@@ -737,7 +756,16 @@
       this.open = val
       this.editShow = false
       this.openEdit = val
+      this.clearData()
       this.getList()
+    },
+    //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
+    clearData(){
+      this.ids = []
+      this.multiple = true
+      this.single = true
+      this.OperationType = 0
+      this.copyType = 0
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
@@ -766,6 +794,7 @@
         let result = response.data
         if (result.count == 1) {
           this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+          this.clearData()
           this.getList();
         }
         else {
diff --git a/src/views/system/user/GyDriver.vue b/src/views/system/user/GyDriver.vue
new file mode 100644
index 0000000..897f4a2
--- /dev/null
+++ b/src/views/system/user/GyDriver.vue
@@ -0,0 +1,1676 @@
+<template>
+  <div style="padding: 10px">
+    <el-card class="search-card" style="margin-bottom: 15px">
+            <el-button
+              type="text"
+              @click="toggleAdvancedSearch"
+              style="font-size: 12px; color: #409eff"
+            >
+              {{ showAdvancedSearch ? "鏀惰捣" : "鏇村" }}
+              <i
+                :class="
+                  showAdvancedSearch
+                    ? 'el-icon-arrow-up'
+                    : 'el-icon-arrow-down'
+                "
+              ></i>
+            </el-button>
+      <div style="margin-top: 15px">
+        <el-row :gutter="15">
+          <el-col :span="6">
+            <div style="display: flex; align-items: center">
+              <span style="width: 200px; text-align: right; margin-right: 10px"
+                >椹鹃┒鍛樹唬鐮�:</span
+              >
+              <el-input
+                v-model="queryParams.HNumber"
+                placeholder="璇疯緭鍏ラ┚椹跺憳浠g爜"
+                size="small"
+                @keyup.enter.native="handleQuery"
+                clearable
+              />
+            </div>
+          </el-col>
+          <el-col :span="6">
+            <div style="display: flex; align-items: center">
+              <span style="width: 200px; text-align: right; margin-right: 10px"
+                >椹鹃┒鍛樺悕绉�:</span
+              >
+              <el-input
+                v-model="queryParams.HName"
+                placeholder="璇疯緭鍏ラ┚椹跺憳鍚嶇О"
+                size="small"
+                @keyup.enter.native="handleQuery"
+                clearable
+              />
+            </div>
+          </el-col>
+          <el-col :span="6">
+            <div style="display: flex; align-items: center">
+              <span style="width: 100px; text-align: right; margin-right: 10px"
+                >缁勭粐:</span
+              >
+              <el-select
+                v-model="queryParams.HUSEORGID"
+                placeholder="璇烽�夋嫨缁勭粐"
+                size="small"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="(item, index) in organizationList"
+                  :key="index"
+                  :label="item.Name"
+                  :value="item.ID"
+                >
+                </el-option>
+              </el-select>
+            </div>
+          </el-col>
+          <el-col :span="6">
+            <div style="display: flex; align-items: center">
+              <span style="width: 80px; text-align: right; margin-right: 10px"
+                >閲嶆柊鍚屾:</span
+              >
+              <el-input
+                v-model="queryParams.HSyncNumber"
+                placeholder="璇疯緭鍏ラ┚椹跺憳浠g爜"
+                size="small"
+                @keyup.enter.native="handleSync"
+                clearable
+                style="flex: 1"
+              />
+              <el-button
+                @click="handleSync"
+                size="small"
+                style="margin-left: 5px"
+                >鍚屾</el-button
+              >
+            </div>
+          </el-col>
+        </el-row>
+      <div class="search-header">
+        <div style="display: flex; justify-content: space-between; align-items: center">
+          <div>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="handleQuery"
+              style="margin-right: 10px"
+              >鎼滅储</el-button
+            >
+            <el-button
+              icon="el-icon-refresh"
+              size="mini"
+              @click="resetQuery"
+              style="margin-right: 10px"
+              >閲嶇疆</el-button
+            >
+            <el-button
+              icon="el-icon-refresh"
+              size="mini"
+              @click="getList"
+              style="margin-right: 10px"
+              >鍒锋柊</el-button
+            >
+
+          </div>
+        </div>
+      </div>
+        <el-collapse-transition>
+          <div v-show="showAdvancedSearch">
+            <div style="margin-top: 15px">
+              <el-row :gutter="15">
+                <div style="margin-bottom: 50px">
+                <!-- 绗竴缁勮繃婊ゆ潯浠� -->
+                <el-col :span="24">
+                  <div style="display: flex; align-items: center">
+                    <el-select
+                      v-model="queryParams.ColName"
+                      placeholder="璇烽�夋嫨"
+                      size="small"
+                      style="flex: 1"
+                    >
+                      <el-option label="" value="0"></el-option>
+                      <el-option
+                        v-for="(item, index) in filterColumnList"
+                        :key="index"
+                        :label="item.field"
+                        :value="item.field"
+                        v-if="!item.hide"
+                      ></el-option>
+                    </el-select>
+                    <el-select
+                      v-model="queryParams.Comparator"
+                      placeholder="璇烽�夋嫨"
+                      size="small"
+                      style="width: 100px; margin: 0 10px"
+                    >
+                      <el-option label="" value="0"></el-option>
+                      <el-option
+                        v-for="(item, index) in comparatorList"
+                        :key="index"
+                        :label="item.label"
+                        :value="item.value"
+                      ></el-option>
+                    </el-select>
+                    <el-input
+                      v-model="queryParams.ColContent"
+                      placeholder="璇疯緭鍏�"
+                      size="small"
+                      @keyup.enter.native="handleQuery"
+                      clearable
+                      style="flex: 1"
+                    />
+                  </div>
+                </el-col>
+                </div>
+                <div style="margin-bottom: 100px">
+                <!-- 绗簩缁勮繃婊ゆ潯浠� -->
+                <el-col :span="24">
+                  <div style="display: flex; align-items: center">
+                    
+                    <el-select
+                      v-model="queryParams.ColName1"
+                      placeholder="璇烽�夋嫨"
+                      size="small"
+                      style="flex: 1"
+                    >
+                      <!-- <el-option label="" value="0"></el-option> -->
+                      <el-option
+                        v-for="(item, index) in filterColumnList"
+                        :key="index"
+                        :label="item.field"
+                        :value="item.field"
+                        v-if="!item.hide"
+                      ></el-option>
+                    </el-select>
+                    <el-select
+                      v-model="queryParams.Comparator1"
+                      placeholder="璇烽�夋嫨"
+                      size="small"
+                      style="width: 100px; margin: 0 10px"
+                    >
+                      <!-- <el-option label="" value="0"></el-option> -->
+                      <el-option
+                        v-for="(item, index) in comparatorList"
+                        :key="index"
+                        :label="item.label"
+                        :value="item.value"
+                      ></el-option>
+                    </el-select>
+                    <el-input
+                      v-model="queryParams.ColContent1"
+                      placeholder="璇疯緭鍏�"
+                      size="small"
+                      @keyup.enter.native="handleQuery"
+                      clearable
+                      style="flex: 1"
+                    />
+                  </div>
+                </el-col>
+                </div>
+                <div style="margin-bottom: 50px">
+                <!-- 绗笁缁勮繃婊ゆ潯浠� -->
+                <el-col :span="24">
+                  <div style="display: flex; align-items: center">
+                    <el-select
+                      v-model="queryParams.ColName2"
+                      placeholder="璇烽�夋嫨"
+                      size="small"
+                      style="flex: 1"
+                    >
+                      <!-- <el-option label="" value="0"></el-option> -->
+                      <el-option
+                        v-for="(item, index) in filterColumnList"
+                        :key="index"
+                        :label="item.field"
+                        :value="item.field"
+                        v-if="!item.hide"
+                      ></el-option>
+                    </el-select>
+                    <el-select
+                      v-model="queryParams.Comparator2"
+                      placeholder="璇烽�夋嫨"
+                      size="big"
+                      style="width: 100px; margin: 0 10px"
+                    >
+                      <el-option label="" value="0"></el-option>
+                      <el-option
+                        v-for="(item, index) in comparatorList"
+                        :key="index"
+                        :label="item.label"
+                        :value="item.value"
+                      ></el-option>
+                    </el-select>
+                    <el-input
+                      v-model="queryParams.ColContent2"
+                      placeholder="璇疯緭鍏�"
+                      size="big"
+                      @keyup.enter.native="handleQuery"
+                      clearable
+                      style="flex: 1"
+                    />
+                  </div>
+                </el-col>
+                </div>
+              </el-row>
+            </div>
+
+            <div
+              v-if="currentFilterScheme"
+              style="
+                margin-top: 15px;
+                padding: 10px;
+                background-color: #f0f9ff;
+                border-radius: 4px;
+                border-left: 4px solid #409eff;
+              "
+            >
+              <span style="font-size: 14px; font-weight: bold; color: #fc9393">
+                褰撳墠杩囨护鏂规锛歿{ currentFilterScheme }}
+              </span>
+              <span
+                v-if="currentFilterRemark"
+                style="font-size: 13px; color: #7b90fb; margin-left: 10px"
+              >
+                ({{ currentFilterRemark }})
+              </span>
+              <el-button
+                type="text"
+                @click="handleSaveScheme"
+                size="mini"
+                style="margin-left: 20px"
+                >淇濆瓨鏂规</el-button
+              >
+              <el-button
+                type="text"
+                @click="handleReadScheme"
+                size="mini"
+                >璇诲彇鏂规</el-button
+              >
+              <el-button
+                type="text"
+                @click="clearFilterScheme"
+                size="mini"
+                style="color: #f56c6c"
+                >娓呴櫎鏂规</el-button
+              >
+            </div>
+          </div>
+        </el-collapse-transition>
+      </div>
+    </el-card>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          id="set_SouceExcel"
+          >瀵煎叆</el-button
+        >
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          id="get_export"
+          >瀵煎嚭</el-button
+        >
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAddEdit((OperationType = 1))"
+          id="set_add"
+          >鏂板</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-document-copy"
+          size="mini"
+          :disabled="single"
+          @click="handleCopy"
+          id="set_Copy"
+          >澶嶅埗</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleEdit((row = rowForm), (OperationType = 3))"
+          id="set_show"
+          >缂栬緫</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="single"
+          @click="handleDelete"
+          id="set_delete"
+          >鍒犻櫎</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-check"
+          size="mini"
+          :disabled="single"
+          @click="handleAudit(0)"
+          id="btn_audit"
+          >瀹℃牳</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-close"
+          size="mini"
+          :disabled="single"
+          @click="handleAudit(1)"
+          id="btn_deaudit"
+          >鍙嶅鏍�</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-turn-off"
+          size="mini"
+          :disabled="single"
+          @click="handleStop(0)"
+          id="btn_stop"
+          >绂佺敤</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-open"
+          size="mini"
+          :disabled="single"
+          @click="handleStop(1)"
+          id="btn_destop"
+          >鍙嶇鐢�</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-setting"
+          size="mini"
+          @click="handleRowHide"
+          id="set_hidecolumn"
+          >鍒楄缃�</el-button
+        >
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-s-operation"
+          size="mini"
+          @click="handleBtnHide"
+          id="HideButton"
+          >鎸夐挳璁剧疆</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <div class="tableBox" v-loading="loading">
+      <el-table
+        :data="tableData"
+        ref="tableData"
+        max-height="650"
+        @selection-change="handleSelectionChange"
+        border
+        @row-click="handleRowClick"
+        :row-style="rowStyle"
+        @cell-dblclick="handleDblclick"
+        v-if="tableShow"
+        stripe
+      >
+        <el-table-column
+          type="selection"
+          width="55"
+          align="center"
+          fixed="left"
+        />
+        <template v-for="(item, index) in btList">
+          <el-table-column
+            :align="item.align"
+            :prop="item.field"
+            :label="item.title"
+            :width="item.width"
+            :key="item.field"
+            v-if="!item.hide && item.field !== 'checkbox'"
+            :sortable="item.sort"
+            show-overflow-tooltip
+            :fixed="item.fixed"
+          >
+            <template slot-scope="{ row, column }">
+              <div :style="item.style">
+                <!-- 鏃ユ湡鏍煎紡鍖� -->
+                <span
+                  v-if="
+                    column.property.includes('鏃ユ湡') ||
+                    column.property.includes('Date')
+                  "
+                >
+                  {{ parseTime(row[column.property], "{y}-{m}-{d}") }}
+                </span>
+                <el-button
+                  type="text"
+                  @click="handleDriverCodeClick(row)"
+                  v-else-if="column.property === '椹鹃┒鍛樹唬鐮�'"
+                  style="color: #409eff"
+                  >{{ row[column.property] }}</el-button
+                >
+                <span
+                  v-else-if="column.property === '绂佺敤鏍囪'"
+                  :style="{
+                    color: row[column.property] === 'Y' ? '#f56c6c' : '#67c23a',
+                    fontWeight:
+                      row[column.property] === 'Y' ? 'bold' : 'normal',
+                  }"
+                >
+                  {{ row[column.property] === "Y" ? "宸茬鐢�" : "姝e父" }}
+                </span>
+                <!-- 瀹℃牳鐘舵�佺壒娈婃牱寮� -->
+                <span
+                  v-else-if="column.property === '瀹℃牳浜�'"
+                  :style="{
+                    color: row[column.property] ? '#67c23a' : '#909399',
+                  }"
+                >
+                  {{ row[column.property] || "鏈鏍�" }}
+                </span>
+                <span v-else>{{ row[column.property] }}</span>
+              </div>
+            </template>
+          </el-table-column>
+        </template>
+      </el-table>
+
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="page"
+        :limit.sync="pageSize"
+        :pageSizes="pageSizes"
+        @pagination="getList"
+      />
+
+      <!-- 闅愯棌鍒楄缃脊绐� -->
+      <el-dialog
+        title="闅愯棌鍒楄缃�"
+        :visible.sync="openRowHide"
+        width="816px"
+        append-to-body
+      >
+        <RowSettings
+          :colName="btResList"
+          :HModName="HModName"
+          @rowEditClose="rowSetClose"
+          v-if="rowHideShow"
+        />
+      </el-dialog>
+
+      <!-- 缂栬緫寮圭獥 -->
+      <el-dialog
+        :title="editDialogTitle"
+        :visible.sync="openEdit"
+        width="1480px"
+        append-to-body
+        class="driver-edit-dialog"
+        :before-close="closeEditDialog"
+        :close-on-click-modal="false"
+      >
+        <GyDriverEdit
+          :OperationType="OperationType"
+          :linterid="rowForm.HItemID"
+          :HSouceBillType="''"
+          @editCloseGy="editGyClose"
+          v-if="editShow"
+          ref="editComponent"
+        />
+        <span slot="footer" class="dialog-footer" v-if="OperationType !== 4">
+          <!-- <el-button @click="closeEditDialog">鍙� 娑�</el-button>
+          <el-button type="primary" @click="saveDriverData">淇� 瀛�</el-button> -->
+        </span>
+      </el-dialog>
+
+      <!-- 瀵煎叆寮圭獥 -->
+      <el-dialog
+        :title="upload.title"
+        :visible.sync="upload.open"
+        width="1500px"
+        append-to-body
+      >
+        <div style="margin-top: -20px">
+          <el-button type="primary" @click="set_AddNew">瀵煎叆鏁版嵁</el-button>
+          <el-button type="primary" @click="upload.open = false">閫� 鍑�</el-button>
+          <el-upload
+            ref="upload"
+            :limit="1"
+            accept=".xlsx, .xls"
+            style="display: inline-block; margin-left: 10px"
+            :action="upload.url + '?updateSupport=' + upload.updateSupport"
+            :disabled="upload.isUploading"
+            :on-progress="handleFileUploadProgress"
+            :on-success="handleFileSuccess"
+          >
+            <el-button type="primary">鏂囦欢涓婁紶</el-button>
+          </el-upload>
+        </div>
+        <el-table
+          :data="uploadData"
+          v-loading="uploadTableLoading"
+          :row-class-name="uploadDataIndex"
+          border
+          height="550"
+        >
+          <el-table-column
+            type="index"
+            label="搴忓彿"
+            width="55"
+            align="center"
+          />
+          <el-table-column
+            label="椹鹃┒鍛樹唬鐮�"
+            prop="椹鹃┒鍛樹唬鐮�"
+            align="center"
+            width="120"
+          />
+          <el-table-column
+            label="椹鹃┒鍛樺悕绉�"
+            prop="椹鹃┒鍛樺悕绉�"
+            align="center"
+            width="120"
+          />
+          <el-table-column
+            label="鑱旂郴鐢佃瘽"
+            prop="鑱旂郴鐢佃瘽"
+            align="center"
+            width="120"
+          />
+          <el-table-column
+            label="椹鹃┒璇佸彿"
+            prop="椹鹃┒璇佸彿"
+            align="center"
+            width="120"
+          />
+          <el-table-column label="鎿嶄綔" align="center">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="uploadDataDelete(scope.row)"
+                >鍒犻櫎</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          v-show="uploadTotal > 0"
+          :total="uploadTotal"
+          :page.sync="uploadPage"
+          :limit.sync="uploadPageSize"
+          :pageSizes="uploadPageSizes"
+          @pagination="currentPage"
+        />
+      </el-dialog>
+
+      <!-- 杩囨护鏂规寮圭獥 -->
+      <el-dialog
+        title="杩囨护鏂规鍒楄〃"
+        :visible.sync="openFilterScheme"
+        width="80%"
+        append-to-body
+      >
+        <div style="height: 500px; overflow: auto">
+          <el-table
+            :data="filterSchemeList"
+            border
+            style="width: 100%"
+            @row-click="selectFilterScheme"
+          >
+            <el-table-column
+              prop="鏂规鍚嶇О"
+              label="鏂规鍚嶇О"
+              width="200"
+            ></el-table-column>
+            <el-table-column
+              prop="澶囨敞"
+              label="澶囨敞"
+              width="300"
+            ></el-table-column>
+            <el-table-column prop="鍒涘缓浜�" label="鍒涘缓浜�" width="120"></el-table-column>
+            <el-table-column
+              prop="鍒涘缓鏃ユ湡"
+              label="鍒涘缓鏃ユ湡"
+              width="150"
+            ></el-table-column>
+            <el-table-column label="鎿嶄綔" width="150" align="center">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="applyFilterScheme(scope.row)"
+                  >搴旂敤</el-button
+                >
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="deleteFilterScheme(scope.row)"
+                  style="color: #f56c6c"
+                  >鍒犻櫎</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="confirmFilterScheme">纭� 瀹�</el-button>
+          <el-button @click="openFilterScheme = false">鍙� 娑�</el-button>
+          
+        </span>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import axios from "axios";
+import RowSettings from "@/views/component/rowSettings";
+import GyDriverEdit from "@/views/system/user/GyDriverEdit.vue";
+export default {
+  name: "GyDriverListNew",
+  components: { RowSettings, GyDriverEdit },
+  props: {
+    openPage: { type: String },
+  },
+  data() {
+    return {
+      HModName: "gy_driver",
+      HModuleName: "椹鹃┒鍛樿缃�",
+
+      showAdvancedSearch: false,
+
+      currentFilterScheme: "",
+      currentFilterRemark: "",
+      filterSchemeList: [],
+      openFilterScheme: false,
+
+      comparatorList: [
+        { label: "=", value: "=" },
+        { label: ">=", value: ">=" },
+        { label: ">", value: ">" },
+        { label: "<=", value: "<=" },
+        { label: "<", value: "<" },
+        { label: "<>", value: "<>" },
+        { label: "鍖呭惈", value: "7" },
+        { label: "宸﹀寘鍚�", value: "8" },
+        { label: "鍙冲寘鍚�", value: "9" },
+        { label: "涓嶅寘鍚�", value: "10" },
+      ],
+
+      
+      sWhere: "",
+      organizationList: [],
+      filterColumnList: [],
+
+      user: "admin",
+      Organization: "",
+      currentRow: [],
+      rowForm: {},
+      editShow: false,
+      openEdit: false,
+      editDialogTitle: "椹鹃┒鍛樼紪杈�",
+      tableShow: true,
+      openBtnHide: false,
+      btnHideShow: false,
+      rowHideShow: false,
+      openRowHide: false,
+      queryParams: {
+        HUSEORGID: null,
+        HName: null,
+        HNumber: null,
+        HSyncNumber: null,
+        Comparator: "",
+        Comparator1: "",
+        Comparator2: "",
+        ColContent: "",
+        ColContent1: "",
+        ColContent2: "",
+        ColName: "",
+        ColName1: "",
+        ColName2: "",
+      },
+      showSearch: true,
+      ids: [],
+
+      single: true,
+
+      multiple: true,
+
+      loading: true,
+
+      tyResList: [],
+      btList: [],
+      btResList: [],
+      tableData: [],
+      dataList: [],
+      titleData: ["HItemID", "HUSEORGID", "HEmpID", "璐熻矗浜�"],
+
+      pageSizes: [50, 100, 500, 5000, 50000],
+      page: 1,
+      pageSize: 50,
+      total: 0,
+
+      upload: {
+        open: false,
+        title: "瀵煎叆椹鹃┒鍛�",
+        isUploading: false,
+        updateSupport: 0,
+        url: process.env.VUE_APP_BASE_API + "/Gy_Driver/Gy_Driver_Excel",
+      },
+      uploadData: [],
+      alluploadList: [],
+      uploadTableLoading: false,
+      uploadPageSizes: [50, 100, 500, 5000, 50000],
+      uploadPage: 1,
+      uploadPageSize: 50,
+      uploadTotal: 0,
+
+      OperationType: null,
+      copyType: 0,
+
+      baseURL: process.env.VUE_APP_BASE_API,
+    };
+  },
+  created() {
+    this.initData();
+  },
+  methods: {
+    async initData() {
+      try {
+        const userRes = await axios.get(
+          `${this.baseURL}/Web/GetUser?UserName=${
+            sessionStorage.getItem("UserName") || "001"
+          }&PassWord=123456&HOrgName=100038`
+        );
+        if (userRes.data.data && userRes.data.data[0]) {
+          const userData = userRes.data.data[0];
+          this.user = userData.Czymc || "admin";
+          this.Organization = userData.HUSEORGID;
+          this.queryParams.HUSEORGID = userData.HUSEORGID;
+        }
+
+        const orgRes = await axios.get(`${this.baseURL}/Web/GetOrganizations`);
+        if (orgRes.data.count == 1) {
+          this.organizationList = orgRes.data.data;
+        }
+
+        await this.getList();
+      } catch (error) {
+        this.$modal.msgError("鍒濆鍖栨暟鎹け璐�!");
+      }
+    },
+
+    toggleAdvancedSearch() {
+      this.showAdvancedSearch = !this.showAdvancedSearch;
+    },
+
+    async getList() {
+      this.tableShow = false;
+      this.loading = true;
+      console.log("鑾峰彇鍒楄〃鏁版嵁...",this.sWhere );
+      try {
+        const params = {
+          sWhere: this.sWhere || "",
+          user: this.user,
+          Organization: this.Organization,
+          page: this.page,
+          size: this.pageSize,
+        };
+
+        const res = await axios.get(`${this.baseURL}/Gy_DriverController/list`, {
+          params,
+        });
+
+        if (res.data.count == 1) {
+          this.tyResList = res.data.data;
+          this.btResList = res.data.list;
+          this.total = res.data.count;
+
+          this.processTableHeader(res.data.list, res.data.data);
+        } else {
+          this.$modal.msgError(res.data.Message || "鑾峰彇鏁版嵁澶辫触");
+        }
+      } catch (error) {
+        this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    processTableHeader(headerList, data) {
+      const col = [];
+      col.push({ type: "checkbox", fixed: "left", field: "checkbox" });
+
+      headerList.forEach((item) => {
+        if (this.titleData.includes(item.ColmCols)) {
+          col.push({
+            field: item.ColmCols,
+            title: item.ColmCols,
+            align: "center",
+            hide: true,
+          });
+        } else {
+          const column = {
+            field: item.ColmCols,
+            title: item.ColmCols,
+            align: "center",
+            sort: true,
+            width: 200,
+          };
+
+          if (item.ColmType === "DateTime") {
+            column.templet = true; // 鏍囪涓烘棩鏈熺被鍨�
+          }
+
+          col.push(column);
+        }
+      });
+
+      this.btList = col;
+      this.tableData = data;
+      this.tableShow = true;
+
+      this.updateFilterColumns();
+
+      this.DisPlay_HideColumn();
+    },
+
+    updateFilterColumns() {
+      this.filterColumnList = this.btList.filter(
+        (item) => !item.hide && item.field !== "checkbox"
+      );
+    },
+
+    async DisPlay_HideColumn() {
+      try {
+        const res = await axios.get(
+          `${this.baseURL}/Xt_grdAlignment_WMES/grdAlignmentWMESList`,
+          {
+            params: {
+              HModName: this.HModName,
+              user: this.user,
+            },
+          }
+        );
+
+        if (res.data.data.length > 0) {
+          const config = res.data.data[0];
+          const dataCol = config.HGridString.split(",");
+
+          dataCol.forEach((colStr, index) => {
+            if (this.btList[index + 1]) {
+              const colParts = colStr.split("|");
+
+              // 闅愯棌鍒�
+              if (colParts[1] == "1") {
+                this.btList[index + 1].hide = true;
+              }
+
+              // 鍒楀
+              if (colParts[3] > 0) {
+                this.btList[index + 1].width = colParts[3];
+              }
+
+              // 瀛椾綋澶у皬
+              if (config.HFontSize != 0) {
+                this.btList[index + 1].style = `font-size:${config.HFontSize}px;`;
+              }
+
+              // 鏄剧ず鍒�
+              if (
+                colParts[1] == "0" &&
+                !this.titleData.includes(this.btList[index + 1].title)
+              ) {
+                this.btList[index + 1].hide = false;
+              }
+
+              // 瀵归綈鏂瑰紡
+              switch (colParts[2]) {
+                case "L":
+                  this.btList[index + 1].align = "left";
+                  break;
+                case "M":
+                  this.btList[index + 1].align = "center";
+                  break;
+                case "R":
+                  this.btList[index + 1].align = "right";
+                  break;
+              }
+
+              // 鍒楀埆鍚�
+              if (colParts[4]) {
+                this.btList[index + 1].title = colParts[4];
+              }
+            }
+          });
+
+          // 鍐荤粨鍒�
+          if (config.HFixCols > 0) {
+            for (
+              let i = 1;
+              i <= config.HFixCols && i < this.btList.length;
+              i++
+            ) {
+              this.btList[i].fixed = "left";
+            }
+          }
+
+          this.tableShow = false;
+          this.$nextTick(() => {
+            this.tableShow = true;
+          });
+        }
+      } catch (error) {
+        console.error("鍔犺浇鍒楅厤缃け璐�:", error);
+      }
+    },
+
+    handleQuery() {
+      this.sWhere = "";
+      const conditions = [];
+
+      if (this.queryParams.HNumber) {
+        conditions.push(`椹鹃┒鍛樹唬鐮� like '%${this.queryParams.HNumber}%'`);
+      }
+      if (this.queryParams.HName) {
+        conditions.push(`椹鹃┒鍛樺悕绉� like '%${this.queryParams.HName}%'`);
+      }
+      // if (this.queryParams.HUSEORGID) {
+      //   conditions.push(`HUSEORGID = '${this.queryParams.HUSEORGID}'`);
+      // }
+
+      
+      if (this.queryParams.ColName !== "0" && this.queryParams.Comparator !== "0") {
+        const condition = this.buildCondition(
+          this.queryParams.ColName,
+          this.queryParams.Comparator,
+          this.queryParams.ColContent
+        );
+        if (condition) conditions.push(condition);
+      }
+
+     
+      if (
+        this.queryParams.ColName1 !== "0" &&
+        this.queryParams.Comparator1 !== "0"
+      ) {
+        const condition = this.buildCondition(
+          this.queryParams.ColName1,
+          this.queryParams.Comparator1,
+          this.queryParams.ColContent1
+        );
+        if (condition) conditions.push(condition);
+      }
+
+      if (
+        this.queryParams.ColName2 !== "0" &&
+        this.queryParams.Comparator2 !== "0"
+      ) {
+        const condition = this.buildCondition(
+          this.queryParams.ColName2,
+          this.queryParams.Comparator2,
+          this.queryParams.ColContent2
+        );
+        if (condition) conditions.push(condition);
+      }
+
+      
+      if (conditions.length > 0) {
+        this.sWhere ="and "+conditions;
+      }
+      console.log("鏌ヨ鏉′欢:", this.sWhere);
+      //this.sWhere += this.addSWhereByOpenType();
+
+      this.page = 1; 
+      this.getList();
+    },
+
+    buildCondition(colName, comparator, content) {
+      if (!content) return null;
+
+      switch (comparator) {
+        case "7": 
+          return `${colName} like '%${content}%'`;
+        case "8": 
+          return `${colName} like '%${content}'`;
+        case "9": 
+          return `${colName} like '${content}%'`;
+        case "10": 
+          return `${colName} not like '%${content}%'`;
+        default: 
+          return `${colName} ${comparator} '${content}'`;
+      }
+    },
+
+    // 
+    addSWhereByOpenType() {
+      // if (this.openPage) {
+
+      //   return " and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'') <> ''";
+      // }
+      // // 鐩存帴鎵撳紑鐨勬儏鍐�
+      // return " and 绂佺敤鏍囪 = ' '";
+    },
+
+    resetQuery() {
+      this.queryParams = {
+        HUSEORGID: this.Organization,
+        HName: "",
+        HNumber: "",
+        HSyncNumber: "",
+        Comparator: "0",
+        Comparator1: "0",
+        Comparator2: "0",
+        ColContent: "",
+        ColContent1: "",
+        ColContent2: "",
+        ColName: "0",
+        ColName1: "0",
+        ColName2: "0",
+      };
+      this.sWhere = "";
+      this.page = 1;
+      this.getList();
+    },
+
+    async handleSync() {
+      if (!this.queryParams.HSyncNumber) {
+        this.$modal.msgWarning("璇疯緭鍏ヨ鍚屾鐨勯┚椹跺憳浠g爜");
+        return;
+      }
+
+      try {
+        const res = await axios.get(`${this.baseURL}/Gy_Driver/Gy_DriverViewApi`, {
+          params: {
+            Number: this.queryParams.HSyncNumber,
+            Type: "JSY", // 椹鹃┒鍛樼被鍨�
+            HUseOrgID: this.queryParams.HUSEORGID,
+          },
+        });
+
+        if (res.data.count == 1) {
+          this.$modal.msgSuccess("鍚屾鎴愬姛");
+          this.getList();
+        } else {
+          this.$modal.msgError(res.data.Message || "鍚屾澶辫触");
+        }
+      } catch (error) {
+        this.$modal.msgError("鍚屾澶辫触");
+      }
+    },
+
+    // 鐐瑰嚮琛�
+    handleRowClick(row) {
+      this.$refs.tableData.toggleRowSelection(row);
+    },
+
+    // 琛屾牱寮�
+    rowStyle({ row }) {
+      if (this.ids.includes(row.HItemID)) {
+        return { background: "#ecf5ff" };
+      }
+      return {};
+    },
+
+    // 鍙屽嚮琛�
+    handleDblclick(row) {
+      this.rowForm = row;
+      this.OperationType = 3;
+      this.editDialogTitle = "缂栬緫椹鹃┒鍛�";
+      this.openEdit = true;
+      this.editShow = true;
+    },
+
+    handleDriverCodeClick(row) {
+      this.rowForm = row;
+      this.OperationType = 3;
+      this.editDialogTitle = "缂栬緫椹鹃┒鍛�";
+      this.openEdit = true;
+      this.editShow = true;
+    },
+
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.HItemID);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+      if (!this.single) {
+        this.rowForm = selection[0];
+      }
+    },
+
+    // 鏂板
+    handleAddEdit() {
+      this.rowForm = { HItemID: 0 };
+      this.OperationType = 1;
+      this.editDialogTitle = "鏂板椹鹃┒鍛�";
+      this.openEdit = true;
+      this.editShow = true;
+    },
+
+    // 澶嶅埗
+    handleCopy() {
+      if (this.single) {
+        this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹繘琛屽鍒�");
+        return;
+      }
+      this.OperationType = 2;
+      this.editDialogTitle = "澶嶅埗椹鹃┒鍛�";
+      this.openEdit = true;
+      this.editShow = true;
+    },
+
+    // 缂栬緫
+    handleEdit() {
+      if (this.single) {
+        this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹繘琛岀紪杈�");
+        return;
+      }
+      this.OperationType = 3;
+      this.editDialogTitle = "缂栬緫椹鹃┒鍛�";
+      this.openEdit = true;
+      this.editShow = true;
+    },
+
+    // 鍏抽棴缂栬緫寮圭獥
+    closeEditDialog() {
+      this.openEdit = false;
+      this.editShow = false;
+      setTimeout(() => {
+        this.getList();
+      }, 100);
+    },
+
+    // 淇濆瓨
+    async saveDriverData() {
+      if (this.$refs.editComponent) {
+        await this.$refs.editComponent.handleSave();
+
+        this.closeEditDialog();
+      }
+    },
+
+    // 鍏抽棴缂栬緫椤甸潰
+    editGyClose(val) {
+      this.editShow = false;
+      this.openEdit = false;
+      this.getList();
+    },
+
+    // 鍒犻櫎
+    async handleDelete() {
+      if (this.single) {
+        this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹繘琛屽垹闄�");
+        return;
+      }
+
+      if (this.rowForm.瀹℃牳浜�) {
+        this.$modal.msgError("宸插鏍哥殑鏁版嵁涓嶈兘鍒犻櫎");
+        return;
+      }
+
+      try {
+        await this.$modal.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠");
+
+        const res = await axios.get(`${this.baseURL}/DeltetGy_Driver`, {
+          params: {
+            HItemID: this.rowForm.HItemID.toString(),
+            user: this.user,
+          },
+        });
+
+        if (res.data.count == 1) {
+          this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          this.getList();
+        } else {
+          this.$modal.msgError(res.data.Message || "鍒犻櫎澶辫触");
+        }
+      } catch (error) {
+        if (error !== "cancel") {
+          this.$modal.msgError("鍒犻櫎澶辫触");
+        }
+      }
+    },
+
+    // 瀹℃牳/鍙嶅鏍�
+    async handleAudit(isAudit) {
+      if (this.single) {
+        this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
+        return;
+      }
+
+      try {
+        const action = isAudit ? "鍙嶅鏍�" : "瀹℃牳";
+        await this.$modal.confirm(`纭瑕�${action}鍚楋紵`);
+
+        const res = await axios.get(`${this.baseURL}/Gy_Driver/AuditGy_Driver`, {
+          params: {
+            HInterID: this.rowForm.HItemID.toString(),
+            IsAudit: isAudit,
+            CurUserName: this.user,
+          },
+        });
+
+        if (res.data.count == 1) {
+          this.$modal.msgSuccess(`${action}鎴愬姛`);
+          this.getList();
+        } else {
+          this.$modal.msgError(res.data.Message || `${action}澶辫触`);
+        }
+      } catch (error) {
+        if (error !== "cancel") {
+          this.$modal.msgError("鎿嶄綔澶辫触");
+        }
+      }
+    },
+
+    // 绂佺敤/鍙嶇鐢�
+    async handleStop(isStop) {
+      if (this.single) {
+        this.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹�");
+        return;
+      }
+
+      try {
+        const action = isStop ? "鍙嶇鐢�" : "绂佺敤";
+        await this.$modal.confirm(`纭瑕�${action}鍚楋紵`);
+
+        const res = await axios.get(`${this.baseURL}/Gy_Driver/StopGy_Driver`, {
+          params: {
+            HInterID: this.rowForm.HItemID.toString(),
+            IsStop: isStop,
+            CurUserName: this.user,
+          },
+        });
+
+        if (res.data.count == 1) {
+          this.$modal.msgSuccess(`${action}鎴愬姛`);
+          this.getList();
+        } else {
+          this.$modal.msgError(res.data.Message || `${action}澶辫触`);
+        }
+      } catch (error) {
+        if (error !== "cancel") {
+          this.$modal.msgError("鎿嶄綔澶辫触");
+        }
+      }
+    },
+
+    // // 瀵煎嚭
+    // handleExport() {
+    //   import("@/vendor/Export2Excel").then((excel) => {
+    //     const tHeader = this.btList
+    //       .filter((item) => !item.hide && item.field !== "checkbox")
+    //       .map((item) => item.title);
+
+    //     const filterVal = this.btList
+    //       .filter((item) => !item.hide && item.field !== "checkbox")
+    //       .map((item) => item.field);
+
+    //     const data = this.formatJson(filterVal, this.tyResList);
+
+    //     excel.export_json_to_excel({
+    //       header: tHeader,
+    //       data,
+    //       filename: `椹鹃┒鍛樿缃甠${new Date().getTime()}`,
+    //       autoWidth: true,
+    //       bookType: "xlsx",
+    //     });
+    //   });
+    // },
+
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) =>
+        filterVal.map((j) => {
+          if (j.includes("鏃ユ湡") || j.includes("Date")) {
+            return this.parseTime(v[j], "{y}-{m}-{d}");
+          }
+          return v[j];
+        })
+      );
+    },
+
+    
+    parseTime(time, cFormat) {
+      if (arguments.length === 0) {
+        return null;
+      }
+      const format = cFormat || "{y}-{m}-{d} {h}:{i}:{s}";
+      let date;
+      if (typeof time === "object") {
+        date = time;
+      } else {
+        if (typeof time === "string" && /^[0-9]+$/.test(time)) {
+          time = parseInt(time);
+        }
+        if (typeof time === "number" && time.toString().length === 10) {
+          time = time * 1000;
+        }
+        date = new Date(time);
+      }
+      const formatObj = {
+        y: date.getFullYear(),
+        m: date.getMonth() + 1,
+        d: date.getDate(),
+        h: date.getHours(),
+        i: date.getMinutes(),
+        s: date.getSeconds(),
+        a: date.getDay(),
+      };
+      const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
+        const value = formatObj[key];
+        if (key === "a") {
+          return ["鏃�", "涓�", "浜�", "涓�", "鍥�", "浜�", "鍏�"][value];
+        }
+        return value.toString().padStart(2, "0");
+      });
+      return time_str;
+    },
+
+    // 瀵煎叆
+    handleImport() {
+      this.uploadData = [];
+      this.upload.title = "瀵煎叆椹鹃┒鍛�";
+      this.upload.open = true;
+    },
+
+    // 鏂囦欢涓婁紶涓�
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+      this.uploadTableLoading = true;
+    },
+
+    // 鏂囦欢涓婁紶鎴愬姛
+    handleFileSuccess(response, file, fileList) {
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+
+      if (response.code == 1) {
+        this.alluploadList = response.data;
+        this.uploadData = this.getPage(this.uploadPage, this.alluploadList);
+        this.uploadTotal = this.alluploadList.length;
+        this.uploadTableLoading = false;
+      } else {
+        this.$alert(
+          `<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>${response.Message}</div>`,
+          "瀵煎叆缁撴灉",
+          { dangerouslyUseHTMLString: true }
+        );
+      }
+    },
+
+    // 鎵ц瀵煎叆
+    async set_AddNew() {
+      const validData = this.uploadData.filter((item) => item);
+
+      if (validData.length === 0) {
+        this.$modal.msgWarning("娌℃湁鍙鍏ョ殑鏁版嵁");
+        return;
+      }
+
+      try {
+        const sSubStr = JSON.stringify(validData);
+        const sMainSub = sSubStr + "&鍜�" + this.user;
+
+        const res = await axios.post(`${this.baseURL}/Gy_Driver/Gy_Process_Excel`, {
+          sMainSub: sMainSub,
+        });
+
+        this.$alert(
+          `<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>${res.data.Message}</div>`,
+          "瀵煎叆缁撴灉",
+          { dangerouslyUseHTMLString: true }
+        );
+
+        this.upload.open = false;
+        this.getList();
+      } catch (error) {
+        this.$modal.msgError("瀵煎叆澶辫触");
+      }
+    },
+
+    // 鑾峰彇鍒嗛〉鏁版嵁
+    getPage(page, list) {
+      const sindex = (page - 1) * this.uploadPageSize;
+      const eindex = page * this.uploadPageSize;
+      return list.slice(sindex, eindex);
+    },
+
+    // 瀵煎叆鍒嗛〉
+    currentPage(val) {
+      this.uploadPage = val.page;
+      this.uploadData = this.getPage(this.uploadPage, this.alluploadList);
+    },
+
+    // 瀵煎叆鏁版嵁搴忓彿
+    uploadDataIndex({ row, rowIndex }) {
+      row.index = rowIndex + 1 + (this.uploadPage - 1) * this.uploadPageSize;
+    },
+
+    // 鍒犻櫎瀵煎叆鏁版嵁
+    uploadDataDelete(row) {
+      this.$modal.confirm("纭瑕佸垹闄ゅ悧").then(() => {
+        const deleteIndex = row.index - 1 - (this.uploadPage - 1) * this.uploadPageSize;
+        this.uploadData.splice(deleteIndex, 1);
+        this.alluploadList.splice(row.index - 1, 1);
+        this.uploadTotal = this.alluploadList.length;
+
+        // 閲嶆柊璁$畻褰撳墠椤垫暟鎹�
+        this.uploadData = this.getPage(this.uploadPage, this.alluploadList);
+      });
+    },
+
+    // 闅愯棌鍒楄缃�
+    handleRowHide() {
+      this.rowHideShow = true;
+      this.openRowHide = true;
+    },
+
+    // 鍏抽棴鍒楄缃�
+    rowSetClose(val) {
+      this.rowHideShow = false;
+      this.openRowHide = val;
+      this.getList();
+    },
+
+    // 鎸夐挳璁剧疆
+    handleBtnHide() {
+      this.$modal.msgInfo("鎸夐挳璁剧疆鍔熻兘寰呭紑鍙�");
+    },
+
+    // 淇濆瓨鏂规
+    handleSaveScheme() {
+      this.$modal.msgInfo("淇濆瓨鏂规鍔熻兘寰呭紑鍙�");
+    },
+
+    // 璇诲彇鏂规
+    handleReadScheme() {
+      this.loadFilterSchemes();
+      this.openFilterScheme = true;
+    },
+
+    // 鍔犺浇杩囨护鏂规
+    async loadFilterSchemes() {
+      try {
+        const res = await axios.get(`${this.baseURL}/Xt_FastICScheme/list`, {
+          params: {
+            HModuleName: this.HModuleName,
+            user: this.user,
+          },
+        });
+
+        if (res.data.count == 1) {
+          this.filterSchemeList = res.data.data;
+        }
+      } catch (error) {
+        console.error("鍔犺浇杩囨护鏂规澶辫触:", error);
+      }
+    },
+
+    // 閫夋嫨杩囨护鏂规
+    selectFilterScheme(row) {
+      this.selectedFilterScheme = row;
+    },
+
+    // 搴旂敤杩囨护鏂规
+    applyFilterScheme(row) {
+      this.currentFilterScheme = row.鏂规鍚嶇О;
+      this.currentFilterRemark = row.澶囨敞;
+      
+      // 杩欓噷搴旇鏍规嵁鏂规鍐呭璁剧疆鏌ヨ鏉′欢
+      // 鐢变簬鏂规鏁版嵁缁撴瀯澶嶆潅锛岃繖閲屽彧鍋氱畝鍗曟紨绀�
+      this.$modal.msgSuccess(`宸插簲鐢ㄦ柟妗堬細${row.鏂规鍚嶇О}`);
+      this.openFilterScheme = false;
+    },
+
+    // 鍒犻櫎杩囨护鏂规
+    async deleteFilterScheme(row) {
+      try {
+        await this.$modal.confirm(`纭瑕佸垹闄ゆ柟妗�"${row.鏂规鍚嶇О}"鍚楋紵`);
+        
+        const res = await axios.post(`${this.baseURL}/Xt_FastICScheme/delete`, {
+          HInterID: row.hmainid,
+        });
+
+        if (res.data.count == 1) {
+          this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          this.loadFilterSchemes();
+        } else {
+          this.$modal.msgError("鍒犻櫎澶辫触");
+        }
+      } catch (error) {
+        if (error !== "cancel") {
+          this.$modal.msgError("鍒犻櫎澶辫触");
+        }
+      }
+    },
+
+    // 纭杩囨护鏂规
+    confirmFilterScheme() {
+      if (this.selectedFilterScheme) {
+        this.applyFilterScheme(this.selectedFilterScheme);
+      } else {
+        this.$modal.msgWarning("璇烽�夋嫨涓�涓繃婊ゆ柟妗�");
+      }
+    },
+
+    // 娓呴櫎杩囨护鏂规
+    clearFilterScheme() {
+      this.currentFilterScheme = "";
+      this.currentFilterRemark = "";
+      this.resetQuery();
+      this.$modal.msgSuccess("宸叉竻闄よ繃婊ゆ柟妗�");
+    },
+  },
+};
+</script>
+
+<style scoped>
+.search-card {
+  border-radius: 4px;
+  border: 1px solid #ebeef5;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.search-header {
+  border-bottom: 1px solid #ebeef5;
+  padding-bottom: 8px;
+  margin-bottom: 8px;
+}
+
+.mb8 {
+  margin-bottom: 15px;
+}
+
+.tableBox {
+  margin-top: 10px;
+  border: 1px solid #ebeef5;
+  border-radius: 4px;
+  padding: 15px;
+  background-color: #fff;
+}
+
+.driver-edit-dialog ::v-deep .el-dialog__body {
+  padding: 20px;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 1200px) {
+  .el-col {
+    margin-bottom: 10px;
+  }
+}
+
+/* 琛ㄦ牸琛屾牱寮忎紭鍖� */
+::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
+  background-color: #fafafa;
+}
+
+::v-deep .el-table th {
+  background-color: #f5f7fa;
+  color: #909399;
+  font-weight: bold;
+}
+
+/* 鎸夐挳缁勬牱寮� */
+::v-deep .el-button-group .el-button {
+  margin-right: 0;
+}
+
+/* 鎶樺彔杩囨浮鏁堟灉 */
+.el-collapse-transition-enter-active,
+.el-collapse-transition-leave-active {
+  transition: all 0.3s ease;
+}
+
+.el-collapse-transition-enter,
+.el-collapse-transition-leave-to {
+  opacity: 0;
+  transform: translateY(-10px);
+}
+</style>
\ No newline at end of file
diff --git a/src/views/system/user/GyDriverEdit.vue b/src/views/system/user/GyDriverEdit.vue
new file mode 100644
index 0000000..7f15f13
--- /dev/null
+++ b/src/views/system/user/GyDriverEdit.vue
@@ -0,0 +1,734 @@
+<template>
+  <div class="gy-driver-edit">
+    <div class="operation-buttons">
+      <el-button
+        type="primary"
+        icon="el-icon-check"
+        @click="handleSave"
+        :disabled="saveDisabled"
+        id="set_SaveBill"
+        >淇濆瓨</el-button
+      >
+      <el-button
+        type="primary"
+        icon="el-icon-check"
+        @click="handleAudit"
+        :disabled="!canAudit"
+        id="set_CheckBill"
+        >瀹℃牳</el-button
+      >
+      <el-button
+        type="primary"
+        icon="el-icon-close"
+        @click="handleCancel"
+        id="Cancel"
+        >閫�鍑�</el-button
+      >
+    </div>
+    <el-form
+      ref="formRef"
+      :model="formData"
+      :rules="formRules"
+      label-width="120px"
+      class="edit-form"
+    >
+      <el-tabs v-model="activeTab" type="card">
+        <el-tab-pane label="鍩烘湰淇℃伅" name="basic">
+          <div class="form-row">
+            <el-form-item label="椹鹃┒鍛樹唬鐮�" prop="HNumber">
+              <el-input
+                v-model="formData.HNumber"
+                placeholder="璇疯緭鍏ラ┚椹跺憳浠g爜"
+                clearable
+                :disabled="isViewMode"
+              />
+              <el-input
+                type="hidden"
+                v-model="formData.HCREATEORGID"
+                style="display: none"
+              />
+            </el-form-item>
+
+            <el-form-item label="椹鹃┒鍛樺悕绉�" prop="HName">
+              <el-input
+                v-model="formData.HName"
+                placeholder="璇疯緭鍏ラ┚椹跺憳鍚嶇О"
+                clearable
+                :disabled="isViewMode"
+              />
+            </el-form-item>
+
+            <el-form-item label="鍔╄鐮�">
+              <el-input
+                v-model="formData.HHelpCode"
+                placeholder="璇疯緭鍏ュ姪璁扮爜"
+                clearable
+                :disabled="isViewMode"
+              />
+            </el-form-item>
+
+            <el-form-item label="鎵�灞炲叕鍙�" prop="HDeptID">
+              <div class="dept-select">
+                <el-input
+                  v-model="formData.HDeptName"
+                  placeholder="璇烽�夋嫨鎵�灞炲叕鍙�"
+                  readonly
+                  clearable
+                  :disabled="isViewMode" 
+                />
+                <el-input
+                  type="hidden"
+                  v-model="formData.HDeptID"
+                  style="display: none"
+                />
+                <el-button
+                  type="primary"
+                  icon="el-icon-search"
+                  @click="openDeptDialog"
+                  :disabled="isViewMode"
+                  style="margin-left: 10px"
+                >
+                </el-button>
+              </div>
+            </el-form-item>
+          </div>
+
+          <div class="form-row">
+            <el-form-item label="绂佺敤鏍囪">
+              <el-checkbox
+                v-model="formData.checkboxHStopflag"
+                :true-label="1"
+                :false-label="0"
+                :disabled="!canEditStopFlag"
+                @change="handleStopFlagChange"
+              >
+                鏄惁绂佺敤
+              </el-checkbox>
+              <el-input
+                type="hidden"
+                v-model="formData.HStopflag"
+                style="display: none"
+              />
+            </el-form-item>
+          </div>
+
+          <div class="form-row">
+            <el-form-item label="澶囨敞">
+              <el-input
+                v-model="formData.HRemark"
+                placeholder="璇疯緭鍏ュ娉�"
+                type="textarea"
+                :rows="3"
+                style="width: 75%"
+                :disabled="isViewMode"
+              />
+            </el-form-item>
+          </div>
+
+          <div class="form-row">
+            <el-form-item label="缁勭粐" prop="Organization">
+              <el-select
+                v-model="formData.Organization"
+                placeholder="璇烽�夋嫨缁勭粐"
+                style="width: 717px"
+                :disabled="isViewMode || orgDisabled"
+              >
+                <el-option
+                  v-for="org in organizationList"
+                  :key="org.ID"
+                  :label="org.Name"
+                  :value="org.ID"
+                  style="color: blue"
+                />
+              </el-select>
+            </el-form-item>
+          </div>
+        </el-tab-pane>
+
+        <el-tab-pane label="鍏朵粬淇℃伅" name="other">
+          <div class="form-row">
+            <el-form-item label="韬唤璇佸彿鐮�">
+              <el-input
+                v-model="formData.identityID"
+                placeholder="璇疯緭鍏ヨ韩浠借瘉鍙风爜"
+                clearable
+                :disabled="isViewMode"
+                style="width: 150px; background-color: #f5f7fa"
+              />
+            </el-form-item>
+
+            <el-form-item label="鎵嬫満鍙风爜">
+              <el-input
+                v-model="formData.Telephone"
+                placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�"
+                clearable
+                :disabled="isViewMode"
+              />
+            </el-form-item>
+
+            <el-form-item label="椹剧収绫诲瀷">
+              <el-select
+                v-model="formData.LicenseType"
+                placeholder="璇烽�夋嫨椹剧収绫诲瀷"
+                :disabled="isViewMode"
+              >
+                <el-option label="A1" value="A1" />
+                <el-option label="A2" value="A2" />
+                <el-option label="A3" value="A3" />
+                <el-option label="B1" value="B1" />
+                <el-option label="B2" value="B2" />
+              </el-select>
+            </el-form-item>
+
+            <el-form-item label="鍙告満绫诲瀷">
+              <el-select
+                v-model="formData.DriverType"
+                placeholder="璇烽�夋嫨鍙告満绫诲瀷"
+                :disabled="isViewMode"
+              >
+                <el-option label="鍥哄畾" value="鍥哄畾" />
+                <el-option label="涓存椂" value="涓存椂" />
+              </el-select>
+            </el-form-item>
+          </div>
+        </el-tab-pane>
+
+        <el-tab-pane label="鍒跺崟淇℃伅" name="record">
+          <div class="form-row">
+            <el-form-item label="鍒跺崟浜�">
+              <el-input
+                v-model="formData.HMakeEmp"
+                readonly
+                style="width: 200px; background-color: #f5f7fa"
+              />
+            </el-form-item>
+
+            <el-form-item label="瀹℃牳浜�">
+              <el-input
+                v-model="formData.HCheckEmp"
+                readonly
+                style="width: 200px; background-color: #f5f7fa"
+              />
+            </el-form-item>
+
+            <el-form-item label="绂佺敤浜�">
+              <el-input
+                v-model="formData.HStopEmp"
+                readonly
+                style="width: 200px; background-color: #f5f7fa"
+              />
+            </el-form-item>
+          </div>
+
+          <div class="form-row">
+            <el-form-item label="鍒跺崟鏃ユ湡">
+              <el-input
+                v-model="formData.HMakeDate"
+                readonly
+                style="width: 200px; background-color: #f5f7fa"
+              />
+            </el-form-item>
+
+            <el-form-item label="瀹℃牳鏃ユ湡">
+              <el-input
+                v-model="formData.HCheckDate"
+                readonly
+                style="width: 200px; background-color: #f5f7fa"
+              />
+            </el-form-item>
+
+            <el-form-item label="绂佺敤鏃ユ湡">
+              <el-input
+                v-model="formData.HStopDate"
+                readonly
+                style="width: 200px; background-color: #f5f7fa"
+              />
+            </el-form-item>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+
+      <el-input type="hidden" v-model="formData.HItemID" />
+    </el-form>
+
+    <!-- 閮ㄩ棬閫夋嫨寮圭獥 -->
+    <el-dialog
+      title="dialogTitle"
+      :visible.sync="openData"
+      width="90%"
+      top="5vh"
+      append-to-body
+    >
+    <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
+      
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
+        <el-button @click="closeDeptDialog">鍙� 娑�</el-button>
+
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import axios from "axios";
+import Dept from "@/views/component/dept";
+export default {
+  name: "GyDriverEdit",
+  components: { Dept},
+  props: {
+    OperationType: {
+      type: Number,
+      default: 1, // 1:鏂板, 2:澶嶅埗, 3:缂栬緫, 4:娴忚
+    },
+
+    linterid: {
+      type: String,
+      type: Number,
+      default: "0",
+    },
+    HSouceBillType: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      baseURL: process.env.VUE_APP_BASE_API,
+      activeTab: "basic",
+      
+      // 閮ㄩ棬閫夋嫨寮圭獥
+      deptDialogVisible: false,
+      deptDialogUrl: "",
+      dialogTitle: "",
+      deptShow: false,
+      openData: false,
+      deptform: {}, //寮圭獥閫変腑鏁版嵁
+      // 缁勭粐鍒楄〃
+      organizationList: [],
+      
+      // 琛ㄥ崟鏁版嵁
+      formData: {
+        HItemID: "0",
+        HNumber: "",
+        HName: "",
+        HHelpCode: "",
+        HDeptName: "",
+        HDeptID: "0",
+        HDepNumber: "",
+        identityID: "",
+        Telephone: "",
+        LicenseType: "A1",
+        DriverType: "鍥哄畾",
+        HStopflag: "0",
+        checkboxHStopflag: 0,
+        HRemark: "",
+        HUSEORGID: "",
+        HCREATEORGID: "0",
+        HMakeEmp: "",
+        HMakeDate: "",
+        HCheckEmp: "",
+        HCheckDate: "",
+        HStopEmp: "",
+        HStopDate: "",
+        Organization: "",
+      },
+      
+      // 琛ㄥ崟楠岃瘉瑙勫垯
+      formRules: {
+        HNumber: [
+          { required: true, message: "璇疯緭鍏ラ┚椹跺憳浠g爜", trigger: "blur" },
+        ],
+        HName: [
+          { required: true, message: "璇疯緭鍏ラ┚椹跺憳鍚嶇О", trigger: "blur" },
+        ],
+        HUSEORGID: [
+          { required: true, message: "璇烽�夋嫨缁勭粐", trigger: "change" },
+        ],
+        HDeptID: [
+          { required: true, message: "璇烽�夋嫨鎵�灞炲叕鍙�", trigger: "change" },
+        ],
+      },
+      saveDisabled: false,
+      orgDisabled: false,
+      isViewMode: false,
+      canEditStopFlag: true,
+    };
+  },
+  computed: {
+    canAudit() {
+      return (
+        this.OperationType === 3 &&
+        this.formData.HItemID !== "0" &&
+        !this.formData.HCheckEmp
+      );
+    },
+    
+    // 鏍煎紡鍖栧綋鍓嶆棩鏈�
+    currentDate() {
+      const now = new Date();
+      const year = now.getFullYear();
+      const month = String(now.getMonth() + 1).padStart(2, "0");
+      const day = String(now.getDate()).padStart(2, "0");
+      return `${year}-${month}-${day}`;
+    },
+  },
+  created() {
+    this.initData();
+  },
+  methods: {
+
+    async initData() {
+      try {
+        
+        await this.getOrganizationList();
+        await this.initByOperationType();
+      } catch (error) {
+        this.$modal.msgError("鍒濆鍖栧け璐�");
+        console.error("鍒濆鍖栭敊璇�:", error);
+      }
+    },
+
+    emitData(row) {
+        this.deptform = row; // 瀛樺偍閫変腑鐨勯儴闂ㄦ暟鎹�
+    },
+    dbEmitData(deptRow){
+        this.formData.HDeptName = deptRow.閮ㄩ棬鍚嶇О;
+        this.formData.HDeptID = deptRow.HItemID;
+        this.openData = false;
+    },
+    deptClickSub() {
+      if (this.deptform && this.deptform.HItemID) {
+      this.formData.HDeptName = this.deptform.閮ㄩ棬鍚嶇О;
+      this.formData.HDeptID = this.deptform.HItemID;
+      this.openData = false;
+      this.deptShow = false;
+    } else {
+      this.$modal.msgWarning("璇峰厛閫夋嫨涓�涓儴闂�");
+    }
+    },
+    deptDialogVisible() {
+      this.deptform = {};
+      this.openData = false;
+    },
+    // 鑾峰彇缁勭粐鍒楄〃
+    async getOrganizationList() {
+      try {
+        const res = await axios.get(`${this.baseURL}/Web/GetOrganizations`);
+        if (res.data.count === 1) {
+          this.organizationList = res.data.data;
+          const orgId = sessionStorage.getItem("Organization");
+          this.formData.HUSEORGID = sessionStorage.getItem("OrganizationID") || "";
+          this.formData.Organization = orgId;
+          this.formData.HCREATEORGID = sessionStorage.getItem("OrganizationID")|| "0";
+        }
+      } catch (error) {
+        console.error("鑾峰彇缁勭粐鍒楄〃澶辫触:", error);
+      }
+    },
+    
+
+    async initByOperationType() {
+      const { OperationType, linterid } = this;
+      this.formData.HMakeEmp = sessionStorage.getItem("HUserName") || "";
+      this.formData.HMakeDate = this.currentDate;
+      
+      switch (OperationType) {
+        case 1: // 鏂板
+          this.orgDisabled = true;
+          this.formData.HItemID = "0";
+          break;
+          
+        case 2: // 澶嶅埗
+          await this.loadDriverData(linterid);
+          this.formData.HItemID = "0";
+          this.formData.HNumber = "";
+          this.formData.HName = "";
+          this.formData.HMakeEmp = sessionStorage.getItem("HUserName") || "";
+          this.formData.HMakeDate = this.currentDate;
+          this.formData.HCheckEmp = "";
+          this.formData.HCheckDate = "";
+          this.formData.HStopEmp = "";
+          this.formData.HStopDate = "";
+          break;
+          
+        case 3: // 缂栬緫
+          this.orgDisabled = true;
+          this.formData.HItemID = linterid;
+          await this.loadDriverData(linterid);
+          break;
+          
+        case 4: // 娴忚
+          this.isViewMode = true;
+          this.saveDisabled = true;
+          this.canEditStopFlag = false;
+          this.formData.HItemID = linterid;
+          await this.loadDriverData(linterid);
+          break;
+          
+        default:
+          this.$modal.msgError("鏈煡鎿嶄綔绫诲瀷");
+          break;
+      }
+    },
+    
+    async loadDriverData(linterid) {
+      try {
+        const res = await axios.get(`${this.baseURL}/Gy_Driver/cx`, {
+          params: { HInterID: linterid },
+        });
+        console.log("椹鹃┒鍛樻暟鎹姞杞藉搷搴�:", linterid,this.baseURL);
+        console.log("鍔犺浇椹鹃┒鍛樻暟鎹�:", res.data.data);
+        if (res.data.data[0]) {
+          const data = res.data.data[0];
+          console.log("鍔犺浇椹鹃┒鍛樻暟鎹�:", data);
+          this.mapDataToForm(data);
+        } else {
+          this.$modal.msgError(res.data.msg || "鍔犺浇鏁版嵁澶辫触");
+        }
+      } catch (error) {
+        console.error("鍔犺浇椹鹃┒鍛樻暟鎹け璐�:", error);
+        this.$modal.msgError("鍔犺浇鏁版嵁澶辫触");
+      }
+    },
+    
+    mapDataToForm(data) {
+      const mapping = {
+        HNumber: "椹鹃┒鍛樹唬鐮�",
+        HName: "椹鹃┒鍛樺悕绉�",
+        HHelpCode: "鐭唬鐮�",
+        HDeptName: "鎵�灞炲叕鍙稿悕绉�",
+        HDepNumber: "鎵�灞炲叕鍙镐唬鐮�",
+        HDeptID: "鎵�灞炲叕鍙窱D",
+        identityID: "韬唤璇佸彿鐮�",
+        Telephone: "鎵嬫満鍙风爜",
+        HStopflag: "绂佺敤鏍囪",
+        HRemark: "澶囨敞",
+        HUSEORGID: "HUSEORGID",
+        LicenseType: "椹剧収绫诲瀷",
+        DriverType: "鍙告満绫诲瀷",
+        HMakeEmp: "鍒涘缓浜�",
+        HMakeDate: "鍒涘缓鏃ユ湡",
+        HCheckEmp: "瀹℃牳浜�",
+        HCheckDate: "瀹℃牳鏃ユ湡",
+        HStopEmp: "绂佺敤浜�",
+        HStopDate: "绂佺敤鏃ユ湡",
+      };
+      
+      Object.entries(mapping).forEach(([formKey, dataKey]) => {
+        if (data[dataKey] !== undefined) {
+          if (dataKey.includes("鏃ユ湡")) {
+            this.formData[formKey] = this.formatDate(data[dataKey]);
+          } else {
+            this.formData[formKey] = data[dataKey];
+          }
+        }
+      });
+      
+      if (data.绂佺敤鏍囪) {
+        this.formData.checkboxHStopflag = 1;
+        this.formData.HStopflag = "1";
+      } else {
+        this.formData.checkboxHStopflag = 0;
+        this.formData.HStopflag = "0";
+      }
+    },
+    
+    formatDate(dateStr) {
+      if (!dateStr) return "";
+      try {
+        const date = new Date(dateStr);
+        const year = date.getFullYear();
+        const month = String(date.getMonth() + 1).padStart(2, "0");
+        const day = String(date.getDate()).padStart(2, "0");
+        return `${year}-${month}-${day}`;
+      } catch (error) {
+        return dateStr;
+      }
+    },
+    
+    async handleSave() {
+      try {
+        await this.$refs.formRef.validate();
+        
+        if (!this.formData.HNumber) {
+          this.$modal.msgWarning("璇疯緭鍏ラ┚椹跺憳浠g爜锛�");
+          return;
+        }
+        
+        if (!this.formData.HName) {
+          this.$modal.msgWarning("璇疯緭鍏ラ┚椹跺憳鍚嶇О锛�");
+          return;
+        }
+        
+        const saveData = {
+          ...this.formData,
+          HItemID: this.formData.HItemID,
+          HStopflag: this.formData.HStopflag,
+        };
+        console.log("淇濆瓨鏁版嵁:", saveData);
+
+        const sMainStr = JSON.stringify(saveData);
+        const res = await axios.post(`${this.baseURL}/Gy_Driver/AddBill1`, {
+          oMain: `${sMainStr};${sessionStorage.getItem("HUserName")};${
+            sessionStorage.getItem("OrganizationID") || 100038
+          }`,
+        });
+        
+        if (res.data.count === 1) {
+          this.$modal.msgSuccess("淇濆瓨鎴愬姛");
+          this.saveDisabled = true;
+          
+          if (this.OperationType === 1 || this.OperationType === 2) {
+            this.isViewMode = true;
+          }
+        } else {
+          this.$modal.msgError(res.data.Message || "淇濆瓨澶辫触");
+        }
+      } catch (error) {
+        if (error.name !== "Error") {
+          this.$modal.msgError("淇濆瓨澶辫触");
+          console.error("淇濆瓨閿欒:", error);
+        }
+      }
+    },
+    
+    async handleAudit() {
+      try {
+        await this.$modal.confirm("纭瑕佸鏍稿悧?");
+        
+        const res = await axios.get(`${this.baseURL}/Gy_Driver/AuditGy_Driver`, {
+          params: {
+            HInterID: this.formData.HItemID,
+            IsAudit: 0,
+            CurUserName: sessionStorage.getItem("HUserName") || "",
+          },
+        });
+        
+        if (res.data.count === 1) {
+          this.$modal.msgSuccess("瀹℃牳鎴愬姛");
+          
+  
+          if (this.formData.HItemID !== "0") {
+            await this.loadDriverData(this.formData.HItemID);
+          }
+        } else {
+          this.$modal.msgError(res.data.Message || "瀹℃牳澶辫触");
+        }
+      } catch (error) {
+        if (error !== "cancel") {
+          this.$modal.msgError("瀹℃牳澶辫触");
+        }
+      }
+    },
+    
+
+    handleCancel() {
+      this.$emit("editCloseGy", false);
+    },
+    
+
+    handleStopFlagChange(value) {
+      this.formData.HStopflag = value ? "1" : "0";
+    },
+    
+  
+    openDeptDialog() {
+        this.deptShow = false;
+       this.dialogTitle = "閮ㄩ棬鍒楄〃";
+        this.deptShow = true;
+        this.openData = true;
+    },
+    
+    
+
+    clearDept() {
+      this.formData.HDeptName = "";
+      this.formData.HDeptID = "0";
+      this.formData.HDepNumber = "";
+    },
+    
+    handleMessage(event) {
+
+      if (event.data && event.data.type === "deptSelected") {
+        const dept = event.data.data;
+        if (dept) {
+          this.formData.HDeptName = dept.閮ㄩ棬鍚嶇О;
+          this.formData.HDeptID = dept.HItemID;
+          this.formData.HDepNumber = dept.閮ㄩ棬浠g爜;
+          this.deptDialogVisible = false;
+        }
+      }
+    },
+  },
+};
+</script>
+
+<style scoped>
+.gy-driver-edit {
+  padding: 15px;
+  height: 100%;
+  box-sizing: border-box;
+}
+
+.operation-buttons {
+  margin-bottom: 20px;
+}
+
+.operation-buttons .el-button {
+  margin-right: 10px;
+}
+
+.edit-form {
+  height: calc(100% - 60px);
+  overflow-y: auto;
+}
+
+.form-row {
+  display: flex;
+  flex-wrap: wrap;
+  margin-bottom: 15px;
+}
+
+.form-row .el-form-item {
+  flex: 1 1 300px;
+  margin-right: 20px;
+  margin-bottom: 0;
+  min-width: 300px;
+}
+
+.form-row .el-form-item:last-child {
+  margin-right: 0;
+}
+
+.dept-select {
+  display: flex;
+  align-items: center;
+}
+
+.dept-select .el-input {
+  flex: 1;
+}
+
+/* 璋冩暣鏍囩椤垫牱寮� */
+::v-deep .el-tabs__header {
+  margin-bottom: 20px;
+}
+
+::v-deep .el-tabs__content {
+  padding: 0 20px;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 1200px) {
+  .form-row .el-form-item {
+    flex: 1 1 100%;
+    margin-right: 0;
+  }
+}
+
+/* 闅愯棌瀛楁鏍峰紡 */
+input[type="hidden"] {
+  display: none;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.1