From 84138b3f42b218ecc2efaa54ec31a1c1be29e326 Mon Sep 17 00:00:00 2001
From: liuying <1427574514@qq.com>
Date: 周一, 25 11月 2024 19:30:59 +0800
Subject: [PATCH] 前端页面

---
 LA24030_LuLiPackageLine_Web/src/views/main/WmsBase/wmsSubstituteGood/index.vue |  470 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 250 insertions(+), 220 deletions(-)

diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsBase/wmsSubstituteGood/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsBase/wmsSubstituteGood/index.vue
index 2a322d8..5d3e34b 100644
--- a/LA24030_LuLiPackageLine_Web/src/views/main/WmsBase/wmsSubstituteGood/index.vue
+++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsBase/wmsSubstituteGood/index.vue
@@ -1,240 +1,252 @@
 锘�<template>
-  <div class="wmsSubstituteGood-container">
-    <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> 
-      <el-form :model="queryParams" ref="queryForm" labelWidth="100">
-        <el-row>
-          <el-col :xs="24" :sm="12" :md="12" :lg="10" :xl="4" class="mb10">
-            <el-form-item label="鍏抽敭瀛�">
-              <el-input v-model="queryParams.searchKey" clearable="" placeholder="鐗╂枡缂栧彿,鐗╂枡鍚嶇О,鏇夸唬鍝佺墿鏂欑紪鍙�,鏇夸唬鍝佺墿鏂欏悕绉�"/>
-              
-            </el-form-item>
-          </el-col>
-          <!-- <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
-            <el-form-item label="鐗╂枡缂栧彿">
-              <el-select clearable="" v-model="queryParams.materialCode" placeholder="璇烽�夋嫨鐗╂枡缂栧彿">
-                <el-option v-for="(item,index) in dl('')" :key="index" :value="item.code" :label="`[${item.code}] ${item.value}`" />
-                
-              </el-select>
-              
-            </el-form-item>
-          </el-col> -->
-          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
-            <el-form-item label="鐗╂枡缂栧彿">
-              <el-input v-model="queryParams.materialCode" clearable="" placeholder="璇疯緭鍏ョ墿鏂欑紪鍙�"/>
-              
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
-            <el-form-item label="鐗╂枡鍚嶇О">
-              <el-input v-model="queryParams.materialName" clearable="" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�"/>
-              
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
-            <el-form-item label="鏇夸唬鍝佺墿鏂欑紪鍙�">
-              <el-input v-model="queryParams.substituteMaterialCode" clearable="" placeholder="璇疯緭鍏ユ浛浠e搧鐗╂枡缂栧彿"/>
-              
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
-            <el-form-item label="鏇夸唬鍝佺墿鏂欏悕绉�">
-              <el-input v-model="queryParams.substituteMaterialName" clearable="" placeholder="璇疯緭鍏ユ浛浠e搧鐗╂枡鍚嶇О"/>
-              
-            </el-form-item>
-          </el-col>
-		  <!-- <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
-		  		  		    <el-form-item label="鏄惁绂佺敤">
-		  		  		      <el-select clearable="" v-model="queryParams.isDisabled" placeholder="璇烽�夋嫨鏄惁绂佺敤">
-		  		  		        <el-option v-for="(item,index) in getIsDisabledData" :key="index" :value="item.value" :label="`${item.text}`" />
-		  		  		        
-		  		  		      </el-select>
-		  		  		      
-		  		  		    </el-form-item>
-		  		  		  </el-col> -->
-          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
-          </el-col>
-          <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
-            <el-form-item>
-              <el-button-group style="display: flex; align-items: center;">
-                <el-button type="primary"  icon="ele-Search" @click="handleQuery" v-auth="'wmsSubstituteGood:page'"> 鏌ヨ </el-button>
-                      <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 閲嶇疆 </el-button>
+	<div class="wmsSubstituteGood-container">
+		<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
+			<el-form :model="queryParams" ref="queryForm" labelWidth="100">
+				<el-row>
+					<el-col :xs="24" :sm="12" :md="12" :lg="10" :xl="4" class="mb10">
+						<el-form-item label="鐗╂枡鐮�">
+							<el-input v-model="queryParams.searchKey" clearable="" placeholder="璇风墿鏂欑爜" />
+						</el-form-item>
+					</el-col>
+
+					<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
+						<el-form-item>
+							<el-button-group style="display: flex; align-items: center">
+								<el-button type="primary" icon="ele-Search" @click="handleQuery"> 鏌ヨ </el-button>
+								<!-- <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 閲嶇疆 </el-button>
                         <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 楂樼骇鏌ヨ </el-button>
-                        <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 闅愯棌 </el-button>
-                <!-- <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWmsSubstituteGood" v-auth="'wmsSubstituteGood:add'"> 鏂板 </el-button> -->
-                
-              </el-button-group>
-            </el-form-item>
-            
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-card>
-    <el-card class="full-table" shadow="hover" style="margin-top: 5px">
-      <el-table
-				:data="tableData"
-				style="width: 100%"
-				v-loading="loading"
-				tooltip-effect="light"
-                				row-key="id"
-                @sort-change="sortChange"
-				border="">
-        <el-table-column type="index" label="搴忓彿" width="55" align="center"/>
-        <el-table-column prop="substituteCode" label="鏇夸唬缂栧彿" min-width="120px" show-overflow-tooltip="" />
-          <el-table-column prop="materialCode" label="鐗╂枡缂栧彿" min-width="120px" show-overflow-tooltip="" >
-            <template #default="scope">
-              {{ scope.row.materialCode }}
-              <!-- <el-tag :type="di('', )?.tagType"> {{di("", scope.row.materialCode)?.value}} </el-tag> -->
-            </template>
-          </el-table-column>
-        <el-table-column prop="materialName" label="鐗╂枡鍚嶇О" min-width="120px"  show-overflow-tooltip="" />
-        <el-table-column prop="substituteMaterialCode" min-width="130px" label="鏇夸唬鍝佺墿鏂欑紪鍙�"  show-overflow-tooltip="" />
-        <el-table-column prop="substituteMaterialName" min-width="130px" label="鏇夸唬鍝佺墿鏂欏悕绉�"  show-overflow-tooltip="" />
-        <el-table-column prop="substituteIndex" label="鏇夸唬娆″簭"  show-overflow-tooltip="" />
-        <!-- <el-table-column prop="versionNO" label="鐗堟湰鍙�"  show-overflow-tooltip="" />
-        <el-table-column prop="isDisabled" label="鏄惁绂佺敤"  show-overflow-tooltip="">
-          <template #default="scope">
-            <el-tag v-if="scope.row.isDisabled"> 鏄� </el-tag>
-            <el-tag type="danger" v-else> 鍚� </el-tag>
-            
-          </template>
-          
-        </el-table-column> -->
-        <el-table-column prop="createTime" label="鍒涘缓鏃堕棿"  show-overflow-tooltip=""  width="130px" />
-        <el-table-column prop="updateTime" label="淇敼鏃堕棿"  show-overflow-tooltip=""  width="130px" />
-        <el-table-column prop="createUserName" label="鍒涘缓浜�"  show-overflow-tooltip=""/>
-        <el-table-column prop="updateUserName" label="淇敼浜�"  show-overflow-tooltip="" />
-        <!-- <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wmsSubstituteGood:update') || auth('wmsSubstituteGood:delete')">
-          <template #default="scope">
-            <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWmsSubstituteGood(scope.row)" v-auth="'wmsSubstituteGood:update'"> 缂栬緫 </el-button>
-            <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWmsSubstituteGood(scope.row)" v-auth="'wmsSubstituteGood:delete'"> 鍒犻櫎 </el-button>
-          </template>
-        </el-table-column> -->
-      </el-table>
-      <el-pagination
-				v-model:currentPage="tableParams.page"
-				v-model:page-size="tableParams.pageSize"
-				:total="tableParams.total"
-				:page-sizes="[10, 20, 50, 100, 200, 500]"
-				small=""
-				background=""
-				@size-change="handleSizeChange"
-				@current-change="handleCurrentChange"
-				layout="total, sizes, prev, pager, next, jumper"
-	/>
-      <printDialog
-        ref="printDialogRef"
-        :title="printWmsSubstituteGoodTitle"
-        @reloadTable="handleQuery" />
-      <editDialog
-        ref="editDialogRef"
-        :title="editWmsSubstituteGoodTitle"
-        @reloadTable="handleQuery"
-      />
-    </el-card>
-  </div>
+                        <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 闅愯棌 </el-button> -->
+								<!-- <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWmsSubstituteGood" v-auth="'wmsSubstituteGood:add'"> 鏂板 </el-button> -->
+							</el-button-group>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+		</el-card>
+		<el-card class="full-table" shadow="hover" style="margin-top: 5px">
+			<div class="detailBox">
+				<ul>
+					<!-- <li v-for="(item,index) in sourceEnum" :key="index"> 
+          {{ titleP[index] }} :  {{ warehousOrderDetails[item] }} 
+        </li> -->
+					<li>
+						<span class="text_left">鐗╂枡缂栧彿:</span>
+						<span class="text_rt">{{ tableData.Info16 }}</span>
+					</li>
+					<li>
+						<span class="text_left">榻愬寘:</span>
+						<span class="text_rt">{{ tableData.planNo }}</span>
+					</li>
+					<li>
+						<span class="text_left">榻愬:</span>
+						<span class="text_rt">{{ tableData.planNo }}</span>
+					</li>
+					<li>
+						<span class="text_left">鎵规鍙�:</span>
+						<span class="text_rt">{{ tableData.planNo }}</span>
+					</li>
+					<li>
+						<span class="text_left">璁㈠崟鍙�:</span>
+						<span class="text_rt">{{ tableData.OrderId }}</span>
+					</li>
+					<li>
+						<span class="text_left">閮ㄤ欢鏉$爜:</span>
+						<span class="text_rt">{{ tableData.upi }}</span>
+					</li>
+
+					<li>
+						<span class="text_left">閮ㄤ欢鍚嶇О:</span>
+						<span class="text_rt">{{ tableData.DetailName }}</span>
+					</li>
+					<li>
+						<span class="text_left">瀹㈡埛鍚嶇О:</span>
+						<span class="text_rt">{{ tableData.Info10 }}</span>
+					</li>
+
+					<li>
+						<span class="text_left">闀�:</span>
+						<span class="text_rt">{{ ruleForm.length }}</span>
+					</li>
+					<li>
+						<span class="text_left">瀹�:</span>
+						<span class="text_rt">{{ ruleForm.width }}</span>
+					</li>
+					<li>
+						<span class="text_left">鍘�:</span>
+						<span class="text_rt">{{ ruleForm.thk }}</span>
+					</li>
+					<li>
+						<span class="text_left">閮ㄤ欢绾圭悊:</span>
+						<span class="text_rt">{{ ruleForm.matgrid }}</span>
+					</li>
+					<li>
+						<span class="text_left">鏄惁灏佽竟:</span>
+						<span class="text_rt">{{ ruleForm.isEB }}</span>
+					</li>
+					<li>
+						<span class="text_left">鎵撳瓟璁惧缂栧彿:</span>
+						<span class="text_rt">{{ ruleForm.dRNum }}</span>
+					</li>
+				</ul>
+			</div>
+			<!-- 鐢熸垚form 榻愬 榻愬寘 璁剧疆ng鍖� -->
+			<!-- 鐢熸垚form 榻愬 榻愬寘 璁剧疆ng鍖� -->
+			<!-- <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules">
+      <el-row :gutter="35">
+        <el-form-item v-show="false">
+          <el-input v-model="ruleForm.id" />
+        </el-form-item>
+
+        <el-form-item label="榻愬" prop="completeSet">
+          <el-select v-model="ruleForm.completeSet" placeholder="璇烽�夋嫨榻愬">
+            <el-option label="閫夐」1" value="option1"></el-option>
+            <el-option label="閫夐」2" value="option2"></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="榻愬寘" prop="packageSetup">
+          <el-input v-model="ruleForm.packageSetup" placeholder="璇疯緭鍏ラ綈鍖呰缃�"></el-input>
+        </el-form-item>
+
+        <el-form-item label="ng鍖�" prop="ngPackage">
+          <el-input v-model="ruleForm.ngPackage" placeholder="璇疯緭鍏g鍖�"></el-input>
+        </el-form-item>
+        
+      </el-row>
+    </el-form> -->
+		</el-card>
+	</div>
 </template>
 
 <script lang="ts" setup="" name="wmsSubstituteGood">
-  import { ref } from "vue";
-  import { ElMessageBox, ElMessage } from "element-plus";
-  import { auth } from '/@/utils/authFunction';
-  import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
-  import { formatDate } from '/@/utils/formatTime';
+import { ref } from 'vue';
+import { ElMessageBox, ElMessage } from 'element-plus';
+import { auth } from '/@/utils/authFunction';
+import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
+import { formatDate } from '/@/utils/formatTime';
+import { listMes_BatchOrderUPI_New, deleteMes_BatchOrderUPI_New, importExcelMes_BatchOrderUPI_New, downloadExcelTemplateMes_BatchOrderUPI_New } from '/@/api/main/WmsOrder/mes_BatchOrderUPI_New';
+import printDialog from '/@/views/system/print/component/hiprint/preview.vue';
+import editDialog from '/@/views/main/WmsBase/wmsSubstituteGood/component/editDialog.vue';
+import { pageWmsSubstituteGood, deleteWmsSubstituteGood } from '/@/api/main/WmsBase/wmsSubstituteGood';
 
+const showAdvanceQueryUI = ref(false);
+const printDialogRef = ref();
+const editDialogRef = ref();
+const loading = ref(false);
+const tableData = ref<any>([]);
+const queryParams = ref<any>({});
+const tableParams = ref({
+	page: 1,
+	pageSize: 10,
+	total: 0,
+});
+const getIsDisabledData = [
+	{
+		value: true,
+		text: '鏄�',
+	},
+	{
+		value: false,
+		text: '鍚�',
+	},
+];
+const printWmsSubstituteGoodTitle = ref('');
+const editWmsSubstituteGoodTitle = ref('');
 
-  import printDialog from '/@/views/system/print/component/hiprint/preview.vue'
-  import editDialog from '/@/views/main/WmsBase/wmsSubstituteGood/component/editDialog.vue'
-  import { pageWmsSubstituteGood, deleteWmsSubstituteGood } from '/@/api/main/WmsBase/wmsSubstituteGood';
+// 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬�
+const changeAdvanceQueryUI = () => {
+	showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
+};
 
+// 鏌ヨ鎿嶄綔 888888888
+const handleQuery = async () => {
+  console.log("鏌ヨ");
+	loading.value = true;
+	var res = await listMes_BatchOrderUPI_New(Object.assign(queryParams.value, tableParams.value));
+	if (res.data.result.length != 1) {
+		ElMessage.warning('娌℃湁鏌ヨ鍒版暟鎹�');
+    tableData.value =  []
+    return;
+	}
+	tableData.value = res.data.result[0] ?? [];
+	loading.value = false;
+};
 
-  const showAdvanceQueryUI = ref(false);
-  const printDialogRef = ref();
-  const editDialogRef = ref();
-  const loading = ref(false);
-  const tableData = ref<any>([]);
-  const queryParams = ref<any>({});
-  const tableParams = ref({
-    page: 1,
-    pageSize: 10,
-    total: 0,
-  });
-  const getIsDisabledData = [{
-	  "value":true,"text":"鏄�"
-  },{
-	  "value":false,"text":"鍚�"
-  }]
-  const printWmsSubstituteGoodTitle = ref("");
-  const editWmsSubstituteGoodTitle = ref("");
-
-  // 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬�
-  const changeAdvanceQueryUI = () => {
-    showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
-  }
-  
-
-  // 鏌ヨ鎿嶄綔
-  const handleQuery = async () => {
-    loading.value = true;
-    var res = await pageWmsSubstituteGood(Object.assign(queryParams.value, tableParams.value));
-    tableData.value = res.data.result?.items ?? [];
-    tableParams.value.total = res.data.result?.total;
-    loading.value = false;
-  };
-
-  // 鍒楁帓搴�
-  const sortChange = async (column: any) => {
+// 鍒楁帓搴�
+const sortChange = async (column: any) => {
 	queryParams.value.field = column.prop;
 	queryParams.value.order = column.order;
 	await handleQuery();
-  };
+};
 
-  // 鎵撳紑鏂板椤甸潰
-  const openAddWmsSubstituteGood = () => {
-    editWmsSubstituteGoodTitle.value = '娣诲姞鏇夸唬鍝佺鐞�';
-    editDialogRef.value.openDialog({});
-  };
+// 鎵撳紑鏂板椤甸潰
+const openAddWmsSubstituteGood = () => {
+	editWmsSubstituteGoodTitle.value = '娣诲姞鏇夸唬鍝佺鐞�';
+	editDialogRef.value.openDialog({});
+};
 
-  // 鎵撳紑鎵撳嵃椤甸潰
-  const openPrintWmsSubstituteGood = async (row: any) => {
-    printWmsSubstituteGoodTitle.value = '鎵撳嵃鏇夸唬鍝佺鐞�';
-  }
-  
-  // 鎵撳紑缂栬緫椤甸潰
-  const openEditWmsSubstituteGood = (row: any) => {
-    editWmsSubstituteGoodTitle.value = '缂栬緫鏇夸唬鍝佺鐞�';
-    editDialogRef.value.openDialog(row);
-  };
+// 鎵撳紑鎵撳嵃椤甸潰
+const openPrintWmsSubstituteGood = async (row: any) => {
+	printWmsSubstituteGoodTitle.value = '鎵撳嵃鏇夸唬鍝佺鐞�';
+};
 
-  // 鍒犻櫎
-  const delWmsSubstituteGood = (row: any) => {
-    ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, "鎻愮ず", {
-    confirmButtonText: "纭畾",
-    cancelButtonText: "鍙栨秷",
-    type: "warning",
-  })
-  .then(async () => {
-    var  ret =  await deleteWmsSubstituteGood(row);
-    if(ret.data.type=="success"){
-      handleQuery();
-      ElMessage.success("鍒犻櫎鎴愬姛");
-    }
-  })
-  .catch(() => {});
-  };
+// 鎵撳紑缂栬緫椤甸潰
+const openEditWmsSubstituteGood = (row: any) => {
+	editWmsSubstituteGoodTitle.value = '缂栬緫鏇夸唬鍝佺鐞�';
+	editDialogRef.value.openDialog(row);
+};
 
-  // 鏀瑰彉椤甸潰瀹归噺
-  const handleSizeChange = (val: number) => {
-    tableParams.value.pageSize = val;
-    handleQuery();
-  };
+// 鍒犻櫎
+const delWmsSubstituteGood = (row: any) => {
+	ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, '鎻愮ず', {
+		confirmButtonText: '纭畾',
+		cancelButtonText: '鍙栨秷',
+		type: 'warning',
+	})
+		.then(async () => {
+			var ret = await deleteWmsSubstituteGood(row);
+			if (ret.data.type == 'success') {
+				handleQuery();
+				ElMessage.success('鍒犻櫎鎴愬姛');
+			}
+		})
+		.catch(() => {});
+};
 
-  // 鏀瑰彉椤电爜搴忓彿
-  const handleCurrentChange = (val: number) => {
-    tableParams.value.page = val;
-    handleQuery();
-  };
+// 鏀瑰彉椤甸潰瀹归噺
+const handleSizeChange = (val: number) => {
+	tableParams.value.pageSize = val;
+	handleQuery();
+};
 
-  handleQuery();
+// 鏀瑰彉椤电爜搴忓彿
+const handleCurrentChange = (val: number) => {
+	tableParams.value.page = val;
+	handleQuery();
+};
+
+// handleQuery();
+
+const rules = {
+	// 杩欓噷瀹氫箟琛ㄥ崟楠岃瘉瑙勫垯
+	completeSet: [{ required: true, message: '璇烽�夋嫨榻愬', trigger: 'change' }],
+	packageSetup: [{ required: true, message: '璇疯緭鍏ラ綈鍖呰缃�', trigger: 'blur' }],
+	ngPackage: [{ required: true, message: '璇疯緭鍏g鍖�', trigger: 'blur' }],
+};
+
+const ruleForm = ref({
+	id: '',
+	completeSet: '',
+	packageSetup: '',
+	ngPackage: '',
+});
+
+const sourceEnum: any = ref([
+	{
+		value: 'id',
+		text: 'ID',
+	},
+]);
 </script>
 <style scoped>
 :deep(.el-input),
@@ -242,5 +254,23 @@
 :deep(.el-input-number) {
 	width: 100%;
 }
-</style>
 
+.detailBox {
+	width: 90%;
+	margin: 0 auto;
+	display: block;
+	padding-bottom: 10px;
+	ul {
+		margin: 0;
+		padding: 0;
+		li {
+			display: block;
+			line-height: 30px;
+			text-align: left;
+			list-style-type: none;
+			width: 25%;
+			word-wrap: break-word;
+		}
+	}
+}
+</style>

--
Gitblit v1.9.3