liuhairui 1 year ago
parent
commit
d7abdb0f3e

+ 2 - 2
src/view/performance/06-packingDocuments/index.vue

@@ -22,7 +22,7 @@
 							</el-form-item>
 						</el-form>
 						<!-- 数据展示 -->
-						<el-table ref="table" style="width: 100%" :data="tableData" row-key="ID" highlight-current-row
+						<el-table ref="table" style="width: 100%;height: 62vh;" :data="tableData" row-key="ID" highlight-current-row
 							border show-overflow-tooltip :row-style="{ height: '20px' }"
 							:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 							:header-cell-style="{ padding: '0px' }" @row-dblclick="handleShowDetail"
@@ -431,7 +431,7 @@ const SelectClickBz = (row, column, event) => {
 
 	const total = ref(0)
 	const page = ref(1)
-	const limit = ref(10)
+	const limit = ref(50)
 
 	const type = ref('')
 	const searchInfo = ref('')

+ 12 - 5
src/view/yunyin/shengchanguanli/components/print.vue

@@ -1,6 +1,6 @@
 <template>
   <!--工单打印【弹窗】-->
-  <el-dialog v-model="visibie" title="生产工单打印" style="width: 40%">
+  <el-dialog v-model="visibie" title="生产工单打印" style="width: 37%">
     <el-row>
       <el-form-item label="工单编号:" prop="currentProcess" class="mab">
         <el-input v-model="form['gdbh']"  @keydown="cp_print_ProductValue" style="width: 200px" />
@@ -28,17 +28,17 @@
     </el-row>
     <el-row>
       <el-form-item label="印件名称:" prop="currentProcess" class="mab" >
-        <el-input v-model="form['yjmc']" placeholder="" style="width: 500px;" />
+        <el-input v-model="form['yjmc']" placeholder="" style="width: 480px;" />
       </el-form-item>
     </el-row>
     <el-row>
       <el-form-item label="制单:" prop="currentProcess" class="mab" label-width="70">
-        <el-input v-model="form['zd']" placeholder="" style="width: 500px;" />
+        <el-input v-model="form['zd']" placeholder="" style="width: 480px;" />
       </el-form-item>
     </el-row>
     <el-row>
       <el-form-item label="审核:" prop="currentProcess" class="mab" label-width="70">
-        <el-input v-model="form['sh']" placeholder="" style="width: 500px;"/>
+        <el-input v-model="form['sh']" placeholder="" style="width: 480px;"/>
       </el-form-item>
     </el-row>
     <div class="dialog-footer" style="text-align: right; margin-top: 30px;">
@@ -100,7 +100,14 @@ const _PrintCodeList = async () => {
     form['yjno'] = PrintCodeList_list.data[0].印件号;
     form['yjmc'] = PrintCodeList_list.data[0].印件名称;
     const res = await ProcessCodeList({workOrder:workOrder, yjno: form['yjno']});
-    form['gxh'] = res.data[0]['工序号']
+	// 获取最大的工序号
+	const maxProcessCode = res.data.reduce((max, item) => {
+	  const currentValue = parseInt(item["工序号"], 10); // 将工序号转为数字
+	  return currentValue > max ? currentValue : max; // 比较大小并返回较大的值
+	}, 0); // 初始值为 0
+	
+	console.log("最大的工序号:", maxProcessCode);
+    form['gxh'] = maxProcessCode
     gxlist.value = res.data
   }
 }

+ 54 - 27
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -166,34 +166,34 @@
             </div>
             <div slot="footer" class="dialog-footer" style="text-align: right;margin-left: 25%">
               <el-button @click="yycpzlhandleCancel">放弃</el-button>
-              <el-button type="primary" @click="yycpzlhandleConfirm">执行</el-button>
+              <el-button type="primary" @click="yycpzlhandleConfirm" :disabled="!clickedlist">执行</el-button>
             </div>
             <el-table ref="multipleTable"
-                                            :show-overflow-tooltip="true"
-                                            :row-style="{ height: '0px' }"
-                                            :cell-style="{ padding: '0px' }"
-                                            :header-row-style="{ height: '0px' }"
-                                            :header-cell-style="{ padding: '0px' }"
-                                            @row-click="yyzltableRowClick"
-                                            highlight-current-row="true"
-                                            style="width: 100%;height: 30vh;" border tooltip-effect="dark"
-                                            :data="yyzltableData" row-key="ID">
-                            <el-table-column align="left" label="工单编号" width="100">
-                              <template v-slot="{ row }"><span>{{ row.工单编号 }}</span></template>
-                            </el-table-column>
-                            <el-table-column align="left" label="客户编号" width="100">
-                              <template v-slot="{ row }"><span>{{ row.客户编号 }}</span></template>
-                            </el-table-column>
-                            <el-table-column align="left" label="客户名称" width="120">
-                              <template v-slot="{ row }"><span>{{ row.客户名称 }}</span></template>
-                            </el-table-column>
-                            <el-table-column align="left" label="产品编号" width="100">
-                              <template v-slot="{ row }"><span>{{ row.产品编号 }}</span></template>
-                            </el-table-column>
-                            <el-table-column align="left" label="产品名称">
-                              <template v-slot="{ row }"><span>{{ row.产品名称 }}</span></template>
-                            </el-table-column>
-                          </el-table>
+					:show-overflow-tooltip="true"
+					:row-style="{ height: '0px' }"
+					:cell-style="{ padding: '0px' }"
+					:header-row-style="{ height: '0px' }"
+					:header-cell-style="{ padding: '0px' }"
+					@row-click="yyzltableRowClick"
+					highlight-current-row="true"
+					style="width: 100%;height: 30vh;" border tooltip-effect="dark"
+					:data="yyzltableData" row-key="ID">
+				<el-table-column align="left" label="工单编号" width="100">
+				  <template v-slot="{ row }"><span>{{ row.工单编号 }}</span></template>
+				</el-table-column>
+				<el-table-column align="left" label="客户编号" width="100">
+				  <template v-slot="{ row }"><span>{{ row.客户编号 }}</span></template>
+				</el-table-column>
+				<el-table-column align="left" label="客户名称" width="120">
+				  <template v-slot="{ row }"><span>{{ row.客户名称 }}</span></template>
+				</el-table-column>
+				<el-table-column align="left" label="产品编号" width="100">
+				  <template v-slot="{ row }"><span>{{ row.产品编号 }}</span></template>
+				</el-table-column>
+				<el-table-column align="left" label="产品名称">
+				  <template v-slot="{ row }"><span>{{ row.产品名称 }}</span></template>
+				</el-table-column>
+			  </el-table>
           </el-dialog>
 
 
@@ -3105,8 +3105,35 @@ const fanganKeyDown = () => {
     })
   }
 }
-//引用产品资料【执行】按钮
+
+
+
+/*
+	引用产品资料执行按钮
+*/
+
+//默认启用按钮可点击
+const clickedlist = ref(true);
+//存储定时器时间
+let clickTimer = null;
+
 const yycpzlhandleConfirm = async () => {
+	//防止重复点击
+	  if (!clickedlist.value) {
+	  // 如果按钮已经被禁用,则不执行任何操作
+	  return;
+	}
+	clickedlist.value = false;
+	// 清除之前的定时器(如果有的话),以避免重复设置
+	if (clickTimer) {
+	  clearTimeout(clickTimer);
+	}
+	//设置定时器,在3秒后重新启用按钮
+	clickTimer = setTimeout(() => {
+	  clickedlist.value = true;
+	  clickTimer = null;
+	}, 3000);
+	
   _ProductInformationEdit();
 };
 //引用产品资料->获取产品资料