From 74feb99b1b4e2eb3706bbb503d07fb087ca39d4a Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期四, 02 四月 2026 15:15:02 +0800
Subject: [PATCH] 出运单增加过滤发货通知单和物流状态

---
 src/views/FbStepFoldOutBillList/fbStepFoldOutBillList.vue |  142 ++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 127 insertions(+), 15 deletions(-)

diff --git a/src/views/FbStepFoldOutBillList/fbStepFoldOutBillList.vue b/src/views/FbStepFoldOutBillList/fbStepFoldOutBillList.vue
index e77308f..4e0e9a1 100644
--- a/src/views/FbStepFoldOutBillList/fbStepFoldOutBillList.vue
+++ b/src/views/FbStepFoldOutBillList/fbStepFoldOutBillList.vue
@@ -8,7 +8,7 @@
 					</el-select>
 				</el-form-item>
 				<el-form-item label="寮�濮嬫棩鏈�">
-					<el-date-picker v-model="query.HBeginDate" type="date" placeholder="寮�濮嬫棩鏈�" style="width:160px" :disabled="timeCycleDisabled" value-formate="yyyy-mm-dd" format="yyyy-mm-dd"/>
+					<el-date-picker v-model="query.HBeginDate" type="date" placeholder="寮�濮嬫棩鏈�" style="width:160px" :disabled="timeCycleDisabled" value-formate="yyyy-MM-dd" format="yyyy-MM-dd"/>
 				</el-form-item>
 				<el-form-item label="缁撴潫鏃ユ湡">
 					<el-date-picker v-model="query.HEndDate" type="date" placeholder="缁撴潫鏃ユ湡" style="width:160px" :disabled="timeCycleDisabled" value-format="yyyy-MM-dd" format="yyyy-MM-dd"/>
@@ -163,6 +163,8 @@
 			<el-row style="margin-bottom:8px">
 				<el-col>
 					<el-button size="mini" type="primary" @click="handleAdd">鏂板</el-button>
+					<el-button size="mini"  @click="set_HTagCount">璐存爣绛炬暟</el-button>
+					<el-button size="mini"  @click="set_PalletChange">鎵樻暟鍙樻洿</el-button>
 					<el-button size="mini" @click="handleEdit">缂栬緫</el-button>
 					<el-button size="mini" type="danger" @click="set_DeleteBill">鍒犻櫎</el-button>
 					<el-button size="mini" @click="set_CheckBill(1)">瀹℃牳</el-button>
@@ -175,6 +177,7 @@
 					<el-button size="mini" @click="get_PrintReport">鎵撳嵃</el-button>
 					<el-button size="mini" @click="get_Refresh">鍒锋柊</el-button>
 					<el-button size="mini" @click="get_BarCodeDetail">鏉$爜鏄庣粏</el-button>
+					<el-button type="primary" icon="el-icon-printer" size="mini" :disabled="single" @click="get_PackStockDetail">鍖呰瀹瑰櫒鍑哄叆搴撴槑缁�</el-button>
 				</el-col>
 			</el-row>
 
@@ -210,7 +213,7 @@
 			:visible.sync="barcodeDetailVisible"
 			ref="barcodeDetail"
 			/>
-
+		<PackStockDetail :visible.sync="packStockDetailShow" ref="packStockDetail"/>
 		
 	</div>
 </template>
@@ -220,23 +223,24 @@
 //import FbStepFoldinBillEdit from './fbStepFoldinBillEdit'
 import FbStepFoldinBillEdit from '@/views/FbStepFoldOutBillList/fbStepFoldOutBillListEdit'
 import BarCodeDetail from '@/views/component/BarCodeDetail'
-
+import dayjs from 'dayjs';
+import PackStockDetail from '@/views/component/PackStockDetail'
 
 export default {
 	name: 'FbStepFoldinBillList',
 		components: {
 			FbStepFoldinBillEdit,
-			BarCodeDetail
+			BarCodeDetail,PackStockDetail
 			
 		},
 	data() {
 		return {
-
+			rowForm: {},
 			editDialogVisible:false,
 			operationType:'1',
 			currentId : '',
       		barcodeDetailVisible: false,// 鏉$爜鏄庣粏寮圭獥鏄剧ず鎺у埗
-
+			packStockDetailShow:false, 
 			query: {
 				HInitTimeCycle: 29,
 				HBeginDate: '',
@@ -283,7 +287,7 @@
 			selectedRows: [],
 			currentFilterName: '',
 			activeCollapse: [],
-			baseURL: process.env.VUE_APP_BASE_URL || "http://47.96.97.237/API/",
+			baseURL: process.env.VUE_APP_BASE_API,               
 		};
 	},
 	created() {
@@ -322,6 +326,7 @@
 			const yyyy = d.getFullYear();
 			const mm = String(d.getMonth() + 1).padStart(2, '0');
 			const dd = String(d.getDate()).padStart(2, '0');
+			
 			return `${yyyy}-${mm}-${dd}`;
 		},
 		onTimeCycleChange() {
@@ -392,8 +397,8 @@
 			if (q.ColName2 && q.Comparator2 && q.Comparator2 !== '0' && q.ColContent2) 
 				sWhereParts.push(buildComparator(q.ColName2, q.Comparator2, q.ColContent2));
 			
-			if (q.HBeginDate) sWhereParts.push(` and CONVERT(varchar(100),鏃ユ湡, 23) >= '${q.HBeginDate}'`);
-			if (q.HEndDate) sWhereParts.push(` and CONVERT(varchar(100),鏃ユ湡, 23) <= '${q.HEndDate}'`);
+			if (q.HBeginDate) sWhereParts.push(` and CONVERT(varchar(100),鏃ユ湡, 23) >= '${dayjs(q.HBeginDate).format("YYYY-MM-DD")}'`);
+			if (q.HEndDate) sWhereParts.push(` and CONVERT(varchar(100),鏃ユ湡, 23) <= '${dayjs(q.HEndDate).format("YYYY-MM-DD")}'`);
 			if (q.HBillNo) sWhereParts.push(` and 鍗曟嵁鍙� like '%${q.HBillNo}%'`);
 			if (q.HDeptID) sWhereParts.push(` and 閮ㄩ棬 like '%${q.HDeptID}%'`);
 			if (q.MaterialCode) sWhereParts.push(` and 鐗╂枡浠g爜 like '%${q.MaterialCode}%'`);
@@ -432,7 +437,7 @@
 				const userName = sessionStorage['HUserName'] || sessionStorage['Czybm'] || 'admin';
 				const orgName = sessionStorage['OrganizationName'] || sessionStorage['Organization'] || '娴欐睙鏅轰簯杩堟��';
 
-				const url = `${this.baseURL}/Kf_StepFoldOutBill/GetStepFoldOutBillList`;
+				const url = `${this.$baseUrl}/Kf_StepFoldOutBill/GetStepFoldOutBillList`;
 				const params = { 
 					sWhere: sWhere || '', 
 					user: userName, 
@@ -499,7 +504,7 @@
 		},
 		async get_DefaultModule() {
 			try {
-				const url = `${this.baseURL}/Xt_FastICScheme/Chooselist`;
+				const url = `${this.$baseUrl}/Xt_FastICScheme/Chooselist`;
 				const params = { 
 					user: sessionStorage['Czybm'] || sessionStorage['HUserName'] || '', 
 					HModuleName: '鍒嗘寮忚皟鍑哄崟缁存姢', 
@@ -519,6 +524,96 @@
 				console.warn('鑾峰彇榛樿杩囨护鏂规澶辫触', err);
 				this.onSearch();
 			}
+		},
+		   set_HTagCount() {
+      if (!this.rowForm || !this.rowForm.hmainid) {
+        this.$modal.msgError('璇峰厛閫夋嫨涓�鏉¤褰曪紒')
+        return
+      }
+      
+      const rowData = this.rowForm // 浣跨敤 rowForm 鑰屼笉鏄� rowList
+      const currentPallet = rowData.璐存爣绛炬暟 || 0
+
+      // 灏�"璇疯緭鍏ユ柊鎵樻暟"浣滀负杈撳叆妗嗙殑placeholder
+      this.$prompt(`褰撳墠璐存爣绛炬暟锛�${currentPallet}`, {
+        confirmButtonText: '淇濆瓨',
+        cancelButtonText: '鍙栨秷',
+        inputValue: currentPallet,
+        inputType: 'number',
+        inputValidator: (value) => {
+          if (!value) return '璇疯緭鍏ヨ创鏍囩鏁帮紒'
+          const num = parseInt(value)
+          if (isNaN(num)) return '璇疯緭鍏ユ湁鏁堢殑鏁板瓧锛�'
+          if (num.toString() !== value) return '璐存爣绛炬暟涓嶈兘涓哄皬鏁帮紒'
+          if (num <0) return '璐存爣绛炬暟蹇呴』澶т簬0锛�'
+          return true
+        }
+      }).then(({ value }) => {
+        const newPallet = parseInt(value)
+        
+        return axios.post(this.$baseUrl + '/Kf_POStockInBill/UpdateHTagCount', {
+          hmainid: rowData.hmainid,
+          newPallet: newPallet,
+          operator: sessionStorage["HUserName"]
+        })
+      }).then(response => {
+        if (response.data && response.data.count == 1) {
+          this.$modal.msgSuccess('璐存爣绛炬暟鍙樻洿鎴愬姛锛�')
+          this.onSearch()
+		  this.rowForm = null
+        } else {
+          this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+        }
+      }).catch(error => {
+        if (error !== 'cancel') {
+          this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+        }
+      })
+    },
+		set_PalletChange() {
+		if (!this.rowForm || !this.rowForm.hmainid) {
+			this.$modal.msgError('璇峰厛閫夋嫨涓�鏉¤褰曪紒')
+			return
+		}
+		
+		const rowData = this.rowForm // 浣跨敤 rowForm 鑰屼笉鏄� rowList
+		const currentPallet = rowData.鎵樻暟 || 0
+
+		// 灏�"璇疯緭鍏ユ柊鎵樻暟"浣滀负杈撳叆妗嗙殑placeholder
+		this.$prompt(`褰撳墠鎵樻暟锛�${currentPallet}`, {
+			confirmButtonText: '淇濆瓨',
+			cancelButtonText: '鍙栨秷',
+			inputValue: currentPallet,
+			inputType: 'number',
+			inputValidator: (value) => {
+			if (!value) return '璇疯緭鍏ユ墭鏁帮紒'
+			const num = parseInt(value)
+			if (isNaN(num)) return '璇疯緭鍏ユ湁鏁堢殑鏁板瓧锛�'
+			if (num.toString() !== value) return '鎵樻暟涓嶈兘涓哄皬鏁帮紒'
+			if (num <0) return '鎵樻暟蹇呴』澶т簬0锛�'
+			return true
+			}
+		}).then(({ value }) => {
+			const newPallet = parseInt(value)
+			
+			return axios.post(this.$baseUrl + '/Kf_POStockInBill/UpdatePallet', {
+			hmainid: rowData.hmainid,
+			newPallet: newPallet,
+			operator: sessionStorage["HUserName"]
+			})
+		}).then(response => {
+			if (response.data && response.data.count == 1) {
+			this.$modal.msgSuccess('鎵樻暟鍙樻洿鎴愬姛锛�')
+			this.onSearch()
+			this.rowForm = null
+			} else {
+			this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+			}
+		}).catch(error => {
+			if (error !== 'cancel') {
+			this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+			}
+		})
 		},
 		set_AddNew() {
 			window.open('./Fb_StepFoldinBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1', '_blank');
@@ -544,7 +639,7 @@
 			
 			try {
 				await this.$confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠', '鍒犻櫎纭');
-				const url = `${this.baseURL}/Fb_StepFoldInBill/DeltetFb_StepFoldInBill`;
+				const url = `${this.$baseUrl}/Fb_StepFoldInBill/DeltetFb_StepFoldInBill`;
 				const params = { HInterID: (row.hmainid || row.HInterID) };
 				const resp = await axios.get(url, { params });
 				
@@ -573,7 +668,7 @@
 			try {
 				await this.$confirm(`纭瑕�${actionName}姝ゅ崟鎹悧锛焋, `${actionName}纭`);
 				
-				const url = `${this.baseURL}/Kf_StepFoldOutBill/AuditKf_StepFoldOutBill`;
+				const url = `${this.$baseUrl}/Kf_StepFoldOutBill/AuditKf_StepFoldOutBill`;
 				const params = { 
 					HInterID: (row.hmainid || row.HInterID), 
 					Type: type, 
@@ -606,7 +701,7 @@
 			try {
 				await this.$confirm(`纭瑕�${actionName}姝ゅ崟鎹悧锛焋, `${actionName}纭`);
 				
-				const url = `${this.baseURL}/Kf_StepFoldOutBill/CloseKf_StepFoldOutBill`;
+				const url = `${this.$baseUrl}/Kf_StepFoldOutBill/CloseKf_StepFoldOutBill`;
 				const params = { 
 					HInterID: (row.hmainid || row.HInterID), 
 					Type: type, 
@@ -639,7 +734,7 @@
 			try {
 				await this.$confirm(`纭瑕�${actionName}姝ゅ崟鎹悧锛焋, `${actionName}纭`);
 				
-				const url = `${this.baseURL}/Kf_StepFoldOutBill/CancellKf_StepFoldOutBill`;
+				const url = `${this.$baseUrl}/Kf_StepFoldOutBill/CancellKf_StepFoldOutBill`;
 				const params = { 
 					HInterID: (row.hmainid || row.HInterID), 
 					Type: type, 
@@ -668,6 +763,10 @@
 		},
 		onSelectionChange(selection) {
 			this.selectedRows = selection;
+			this.ids = selection.map(item => item.hmainid)
+			console.log('閫夋嫨鐨勮:', selection,"閫夋嫨鐨刬ds:",this.ids);
+			if (selection.length > 0)
+			this.rowForm = selection[0]
 		},
 		onBillNoClick(row) {
 			const table = this.$refs.mainTable;
@@ -689,11 +788,24 @@
 			this.$message.warning('璇烽�夋嫨涓�琛屾暟鎹煡鐪嬫潯鐮佹槑缁嗭紒')
 			return
 		}
+		
 		this.barcodeDetailVisible = true
 		this.$nextTick(() => {
 			this.$refs.barcodeDetail.open(this.selectedRows[0])
 		})
 		},
+		 //#region 鍖呰瀹瑰櫒鍑哄叆搴撴槑缁�
+   		 get_PackStockDetail() {
+      // if (this.selectedRow.length !== 1) {
+      //   this.$message.warning('璇烽�夋嫨涓�琛屾暟鎹煡鐪嬫潯鐮佹槑缁嗭紒')
+      //   return
+      // }
+			this.packStockDetailShow = true
+			this.$nextTick(() => {
+				this.$refs.packStockDetail.open(this.rowForm)
+			})
+		},
+    //#endregion
 		get_ViewReport() {
 			if (this.selectedRows.length !== 1) { 
 				this.$message.warning('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒'); 

--
Gitblit v1.9.1