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_MouldMoveStockRequestBillList.vue |  157 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 123 insertions(+), 34 deletions(-)

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;
     },
   }
 };

--
Gitblit v1.9.1