瀏覽代碼

Merge branch 'master' of https://git.7in6.com/Minong/mes-admin-backend-ui

Lexie 1 年之前
父節點
當前提交
91eb2adcd1

二進制
public/src/assets/yxlogo.png


+ 1 - 1
src/api/yunyin/yunying.js

@@ -512,7 +512,7 @@ export const ProcessDetailAdd  = (data) => {
     return service({
         url: '/mes_server/work_order/ProcessDetailAdd',
         method: 'post',
-        params
+        data
     })
 }
 //新增工艺资料->印件编号获取

+ 1 - 1
src/view/job/related/related.vue

@@ -533,7 +533,7 @@ const handleNodeClick = (node, check) => {
 				  // 更新表格数据
 				  tableData.splice(0, tableData.length, ...combinedData);
 				  //选中第一条记录
-				  ontable(tableData[0])
+				  // ontable(tableData[0])
 		  }
 	})
   }

+ 5 - 5
src/view/layout/index.vue

@@ -16,13 +16,13 @@
           <img
             alt
             class="w-9 h-9 p-1 bg-white rounded-full"
-            :src="$GIN_VUE_ADMIN.appLogo"
+            :src="`/src/assets/logotx.png`"
           >
           <div
             v-if="isSider"
-            class="inline-flex font-bold text-2xl"
+            class="inline-flex font-bold text-1xl"
             :style="{color:textColor}"
-          >{{ $GIN_VUE_ADMIN.appName }}</div>
+          >翌星Mes生产管理智造系统</div>
         </div>
         <Aside class="aside" />
       </el-aside>
@@ -283,7 +283,7 @@ onMounted(() => {
   }
 })
 
-const userStore = useUserStore() 
+const userStore = useUserStore()
 // console.log(userStore.userInfo.authority.authorityName )
 // console.log(userStore.userInfo.nickName )
 const asideWidth = () => {
@@ -381,4 +381,4 @@ const changeShadow = () => {
   background-color: hsla(0,0%,100%,.9) !important;
 }
 
-</style>
+</style>

+ 64 - 11
src/view/login/index.vue

@@ -1,3 +1,58 @@
+<!--修改登录页面样式-->
+<!--<template>-->
+<!--  <div id="userLayout" class="w-full h-full relative">-->
+
+<!--    &lt;!&ndash;    <div class="rounded-lg  items-center justify-evenly w-full h-full md:w-screen md:h-screen "&ndash;&gt;-->
+<!--    &lt;!&ndash;         style="background-image: url('/src/assets/yxlogo.png');">&ndash;&gt;-->
+
+<!--    <div class="rounded-lg  items-center justify-evenly w-full h-full md:w-screen md:h-screen md:bg-[#194bfb]">-->
+
+<!--      <div class="md:w-3/5 w-10/12 h-full flex items-center justify-evenly">-->
+<!--        &lt;!&ndash; 分割斜块 &ndash;&gt;-->
+<!--        <div class="z-[999] pt-12 pb-10 md:w-96 w-full rounded-lg flex flex-col justify-between box-border" >-->
+<!--          <div>-->
+<!--            &lt;!&ndash;LOGO&ndash;&gt;-->
+<!--            <div class="flex items-center justify-center" >-->
+<!--              <img class="w-48 h-16" :src="`/src/assets/yxlogo.png`" alt />-->
+<!--            </div>-->
+<!--            <div class="mb-9">-->
+<!--              <p class="text-center text-3xl font-bold">-->
+<!--                翌星Mes生产管理智造系统-->
+<!--              </p>-->
+<!--            </div>-->
+
+<!--            <el-form ref="loginForm" :model="loginFormData" :rules="rules"  :validate-on-rule-change="false" @keyup.enter="submitForm" >-->
+<!--              <el-form-item prop="username" class="mb-6">-->
+<!--                <el-input v-model="loginFormData.username" size="large" placeholder="请输入用户名" suffix-icon="user" />-->
+<!--              </el-form-item>-->
+<!--              <el-form-item prop="password" class="mb-6">-->
+<!--                <el-input v-model="loginFormData.password" show-password size="large" type="password" placeholder="请输入密码" />-->
+<!--              </el-form-item>-->
+<!--              <el-form-item v-if="loginFormData.openCaptcha" prop="captcha" class="mb-6" >-->
+<!--                <div class="flex w-full justify-between">-->
+<!--                  <el-input v-model="loginFormData.captcha" placeholder="请输入验证码" size="large" class="flex-1 mr-5" />-->
+<!--                  <div class="w-1/3 h-11 bg-[#c3d4f2] rounded">-->
+<!--                    <img v-if="picPath" class="w-full h-full" :src="picPath" alt="请输入验证码" @click="loginVerify()" />-->
+<!--                  </div>-->
+<!--                </div>-->
+<!--              </el-form-item>-->
+<!--              <el-form-item class="mb-6">-->
+<!--                <el-button class="shadow shadow-blue-600 h-11 w-full" type="primary" size="large" @click="submitForm" >登 录</el-button >-->
+<!--              </el-form-item>-->
+<!--            </el-form>-->
+
+<!--          </div>-->
+<!--        </div>-->
+<!--      </div>-->
+<!--      &lt;!&ndash;      <div class="hidden md:block w-1/2 h-full float-right bg-[#194bfb]">&ndash;&gt;-->
+<!--      &lt;!&ndash;                      <img class="h-full" src="@/assets/login_right_banner.jpg" alt="banner"/>&ndash;&gt;-->
+<!--      &lt;!&ndash;      </div>&ndash;&gt;-->
+<!--    </div>-->
+
+<!--  </div>-->
+<!--</template>-->
+
+
 <template>
   <div id="userLayout" class="w-full h-full relative">
     <div
@@ -12,15 +67,13 @@
           class="z-[999] pt-12 pb-10 md:w-96 w-full rounded-lg flex flex-col justify-between box-border"
         >
           <div>
-            <div class="flex items-center justify-center">
-              <img class="w-24" :src="$GIN_VUE_ADMIN.appLogo" alt />
+            <!--LOGO-->
+            <div class="flex items-center justify-center" >
+              <img class="w-48 h-16" :src="`/src/assets/yxlogo.png`" alt />
             </div>
             <div class="mb-9">
-              <p class="text-center text-4xl font-bold">
-                {{ $GIN_VUE_ADMIN.appName }}
-              </p>
-              <p class="text-center text-sm font-normal text-gray-500 mt-2.5">
-                A management platform using Golang and Vue
+              <p class="text-center text-3xl font-bold">
+                翌星Mes生产管理智造系统
               </p>
             </div>
             <el-form
@@ -244,7 +297,7 @@ const GetAddr = () => {
         }
         result += res.macAddress[i];
       }
-	   
+
     }
   };
   // 打开一个连接
@@ -259,7 +312,7 @@ const GetAddr = () => {
 // const GetMachineMac = async (addr) => {
 // 	const response = await getMachineMac({ addr: '68-ED-A4-26-5F-37' });
 // 	console.log(response)
-// 	if (response.code === 0) {	
+// 	if (response.code === 0) {
 // 		cosole.log(response.data['设备编号'])
 // 		// userStore.LoginIn2({
 // 		//   username: response.data['设备编号'],
@@ -279,8 +332,8 @@ userStore.LoginIn2({
 	   password: "123456",
 	   captcha: "443188",
 	   captchaId: "0FZfnUtAOrdXvTETkJRc",
-	   openCaptcha: false,	   
-	 }); 	
+	   openCaptcha: false,
+	 });
 </script>
 
 

+ 2 - 2
src/view/performance/14-overTimePayVerification/index.vue

@@ -419,7 +419,8 @@ const handleDblclick1 = async(row) => {
   //   tableData2.splice(0, tableData2.length, ...data)
   // }
 }
-const clickybupdate = async(row) => {
+const clickybupdate = async(row) => {
+	if(row.bh == undefined) return
   params.code = row.bh
   const { date, code } = params
   const res = await getDownData({ date, code })
@@ -443,7 +444,6 @@ const clickybupdate = async(row) => {
 
     tableData2.splice(0, tableData2.length, ...data)
   }
-  console.log('22')
 }
 
 // 搜索

+ 32 - 5
src/view/performance/jjgzzhys.vue

@@ -92,23 +92,51 @@ const jgzzhysProductValue = () => {
 };
 
 //考勤年月按钮 继续
+const kqny = ref('')
 const jjgzzhysclick = async () => {
+  // console.log(jjgzzhysformData.date)
+  var date = jjgzzhysformData.date;
+  var year = date.slice(0, 4);
+  var month = date.slice(4);
+
+  if (month < 1 || month > 12) {
+    ElMessage({type: 'warning',message: '月份必须在1到12月之间'})
+    return false;
+  } else {
+    if (month.length === 1) {
+      month = '0' + month;
+    }
+     kqny.value = year+month;
+  }
   // console.log(jjgzzhysformData.start_date)
   function formatDate(dateString) {
     if (dateString === null || dateString === '') {
       return '';
     }
-
     const formattedDate = new Date(dateString);
     const year = formattedDate.getFullYear();
     const month = String(formattedDate.getMonth() + 1).padStart(2, '0');
     const day = String(formattedDate.getDate()).padStart(2, '0');
-
     return `${year}-${month}-${day}`;
   }
+  var dateMonth = kqny.value.slice(-2); //获取月份
+  if (formatDate(jjgzzhysformData.start_date).slice(5, 7) !== dateMonth && formatDate(jjgzzhysformData.end_date).slice(5, 7) !== dateMonth) {
+    ElMessage({type: 'warning',message: '考勤月份和开始日期和结束日期的月份不一致'})
+    return false;
+  }
+  if (jjgzzhysformData.vacation_one_start && formatDate(jjgzzhysformData.vacation_one_start).slice(5, 7) !== dateMonth && jjgzzhysformData.vacation_one_end && formatDate(jjgzzhysformData.vacation_one_end).slice(5, 7) !== dateMonth) {
+    ElMessage({ type: 'warning', message: '考勤月份和法定假日1的月份不一致' });
+    return false;
+  }
+
+  if (jjgzzhysformData.vacation_two_start && formatDate(jjgzzhysformData.vacation_two_start).slice(5, 7) !== dateMonth && jjgzzhysformData.vacation_two_end && formatDate(jjgzzhysformData.vacation_two_end).slice(5, 7) !== dateMonth) {
+    ElMessage({ type: 'warning', message: '考勤月份和开法定假日2的月份不一致' });
+    return false;
+  }
+
   const formattedData = {
     sys_id: _username.value,
-    date: jjgzzhysformData.date,
+    date: kqny.value,
     start_date: formatDate(jjgzzhysformData.start_date),
     end_date: formatDate(jjgzzhysformData.end_date),
     vacation_one_start: formatDate(jjgzzhysformData.vacation_one_start),
@@ -116,8 +144,7 @@ const jjgzzhysclick = async () => {
     vacation_two_start: formatDate(jjgzzhysformData.vacation_two_start),
     vacation_two_end: formatDate(jjgzzhysformData.vacation_two_end)
   };
-  console.log(formattedData)
-  //目前没有接口,先不用调用
+  console.log(formattedData);
   const staffSalaryCount_add = await staffSalaryCount(formattedData);
   if (staffSalaryCount_add.code === 0) {
     ElMessage({type: 'success',message: '更新成功'})

+ 12 - 26
src/view/performance/yuangongrigongzi.vue

@@ -404,8 +404,6 @@ const multipleTable=ref()
 const getTabdata = async () => {
     //接口调用函数
     const response  = await dailygetTab();
-	console.log(response)
-	
 	
 	const transformedData = response.data.map(item => ({
 	      label: `${item.label}`,
@@ -497,7 +495,6 @@ const getTableData = async () => {
 	          // 如果下一个员工姓名与当前不同,插入合计数据
 	          const currentSummary = summaryData.shift();
 	          combinedData.push(currentSummary);
-			  console.log(currentSummary)
 			 
 	        }
 	      });
@@ -574,16 +571,13 @@ function onposition() {
   positioningVisibleshow.value=true
 }
 const enterpositioning = async () => {
- console.log(params.date)
  let parts = params.date.split('-')
  
  // # 截取第一个"-"之前的内容并赋值给新变量1
  let new_variable1 = parts[0]
- console.log(new_variable1)
  
  // # 截取第一个"-"之后到第二个"-"之前的内容并赋值给新变量2
  let new_variable2 = parts[1]
- console.log(new_variable1+new_variable2) 
  Getlocate(new_variable1+new_variable2)
  positioningVisibleshow.value=false
 }
@@ -601,11 +595,8 @@ const Getlocate = async (value) => {
     search:positionvalue.value
   })
   if (response.code === 0) {
-	console.log(params.data+positionvalue.value)
     tableData.splice(0, tableData.length, ...response.data)
   }
-  console.log(response)
-  console.log(params.data+positionvalue.value)
 }
 // 搜索
 function onSearch() {
@@ -719,37 +710,33 @@ const enterDialog = async () => {
 // 单击表格操作
 function ontable(row, column, event) {
   currentRow.value = row
-  console.log(params.date)
   let parts = params.date.split('-')
   
   // # 截取第一个"-"之前的内容并赋值给新变量1
   let new_variable1 = parts[0]
-  console.log(new_variable1)
   
   // # 截取第一个"-"之后到第二个"-"之前的内容并赋值给新变量2
   let new_variable2 = parts[1]
-  console.log(new_variable1+new_variable2) 
-  console.log(new_variable1)
-  console.log(row.bh)
   Getundertable(new_variable1,row.bh)
 }
 //获取下列表
-const Getundertable = async (date,bh) => {
-  const response = await dailygetAllList({date:date,code:bh});
-  if(response.code==0){
-	  console.log(response)
-	   tableData2.splice(0, tableData2.length, ...response.data);
-	// console.log(response.data.num)
-	// const rowIndex = tableData.findIndex(row => row.UniqId === lastCellValue);
-	// console.log(rowIndex)
-	// tableData[rowIndex].sczl_废品率系数 = response.data.num;
-  }
+const Getundertable = (date,bh) => {
+	if(bh == undefined) return
+  dailygetAllList({date:date,code:bh}).then(response=>{
+	  if(response.code==0){
+	  	   tableData2.splice(0, tableData2.length, ...response.data);
+	  	// console.log(response.data.num)
+	  	// const rowIndex = tableData.findIndex(row => row.UniqId === lastCellValue);
+	  	// console.log(rowIndex)
+	  	// tableData[rowIndex].sczl_废品率系数 = response.data.num;
+	  }
+  })
+  
   // console.log(response)
   // const rowIndex = tableData.findIndex(row => row.UniqId === 123);
 }
 // 双击表格操作
 function doubleClick(row, column, event) {
-  console.log(row, column, event);
   // updateCompanyFunc(row);
   type.value = 'update';
   // dialogFormVisible.value = true
@@ -783,7 +770,6 @@ const currentRow = ref()
 const dialogYgjjmx = ref(false)
 function handlePrint() {
   dialogYgjjmx.value = true
-  console.log(currentRow.value);
 }
 
 // 生命周期钩子

+ 11 - 1
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -620,12 +620,20 @@
               <el-table-column   sortable align="left" label="更新日期" prop="Mod_rq" width="160" />
             </el-table>
             <div class="gva-pagination">
+<!--              <el-pagination-->
+<!--                  @size-change="handleSizeChange"-->
+<!--                  @current-change="handleCurrentChange"-->
+<!--                  :current-page="page"-->
+<!--                  :page-sizes="[10, 30, 50, 100]"-->
+<!--                  :page-size="pageSize"-->
+<!--                  layout="total, sizes, prev, pager, next, jumper"-->
+<!--                  :total="total">-->
+<!--              </el-pagination>-->
               <el-pagination
                   @size-change="handleSizeChange"
                   @current-change="handleCurrentChange"
                   :current-page="page"
                   :page-sizes="[10, 30, 50, 100]"
-                  :page-size="30"
                   layout="total, sizes, prev, pager, next, jumper"
                   :total="total">
               </el-pagination>
@@ -2497,6 +2505,7 @@ const _getProduct = async ()=>{
   params.custom_code = _custom_code.value;
   params.limit = pageSize.value;
   params.page = page.value;
+  console.log(params)
   try {
     const WorkListdata = await getProduct(params);
     console.log(WorkListdata.data.data)
@@ -2523,6 +2532,7 @@ const handleCurrentChange = (val) => {
 
 // 修改页面容量 点击多少条/页
 const handleSizeChange = (val) => {
+
   pageSize.value = val;
   _getProduct();
 };

+ 31 - 18
src/view/yunyin/shengchanguanli/components/addGongYi.vue

@@ -95,7 +95,7 @@
       <template #footer>
         <div class="dialog-footer" style="text-align: right;top: auto;">
           <el-button @click="add_gdgycloseDialog">取 消</el-button>
-          <el-button type="primary" disabled @click="add_gdgyenterDialog">确 定</el-button>
+          <el-button type="primary"  @click="add_gdgyenterDialog">确 定</el-button>
         </div>
       </template>
     </el-dialog>
@@ -137,7 +137,7 @@
 
 <script setup>
 import {ref, reactive} from 'vue'
-import {gdzl_MachineList, PrintDetailList, WastageList,getDepartName, capacityList,
+import {gdzl_MachineList, PrintDetailList, WastageList,getDepartName, capacityList,ProcessDetailAdd,
 } from "@/api/yunyin/yunying";
 import { ElMessage } from 'element-plus'
 
@@ -158,7 +158,10 @@ const cjList = ref([
   }
 ])
 const gdzl_MachineList_address = ref()
-
+import { useUserStore } from '@/pinia/modules/user'
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
 //新增工艺资料弹窗 键盘 input框跳转
 const add_gyzlent = async (event,id1,id2,id3) => {
   if (id2==='印件编号' && event.key==='Tab' || id2 === '印件编号' && event.key=== 'Enter') {
@@ -340,33 +343,43 @@ const add_gdgyenterDialog = async () => {
   if(!form['设备编号']){
     ElMessage({ type: 'warning', message: '设备编号不能为空' });return;
   }
-  console.log(form)
+  // console.log(form)
   sbbh.value = form['设备编号'].join(' ');
   const formattedData = {
     Gy0_gdbh: id.value,
+    Gy0_方案: 'A',
     Gy0_yjno: form['yjno'] ? form['yjno'] : "",
     Gy0_gxh: form['工序'] ? form['工序'] : "",
+    Gy0_gxmc:form['工艺名称'] ? form['工艺名称'] : "",
+    Add_gxmc:form['工序名称'] ? form['工序名称'] : "",
     重点工序: form['重点工序'] ? form['重点工序'] : "",
-    备选工序: form['备选工序'] ? form['备选工序'] : "",
+    备选工序: form['备选工序'] ? "1" : "0",
+    Gy0_sbbh: sbbh.value ? sbbh.value : "",
+    Gy0_sbmc: "",
+    Gy0_SITE: form['车间名称'] ? form['车间名称'] : "",
     Gy0_ks: form['开数'] ? form['开数'] : "",
     Gy0_ls: form['联数'] ? form['联数'] : "",
-    车间名称: form['车间名称'] ? form['车间名称'] : "",
-    工艺名称: form['工艺名称'] ? form['工艺名称'] : "",
-    工序名称: form['工序名称'] ? form['工序名称'] : "",
-    计损色数: form['计损色数'] ? form['计损色数'] : "",
-    设备编号: sbbh.value ? sbbh.value : "",
-    工序损耗: form['shdh'] ? form['shdh'] : "",
-    工序损耗名称: form['工序损耗名称'] ? form['工序损耗名称'] : "",
-    装版工时: form['装版工时'] ? form['装版工时'] : "",
-    小时产能: form['小时产能'] ? form['小时产能'] : "",
-    备注: form['备注'] ? form['备注'] : "",
+    Gy0_ms: form['计损色数'] ? form['计损色数'] : 0,
+    Sys_id  : _username.value,
+    工价系数: form['难度系数'] ? form['难度系数'] : 0,
+    损耗系数: form['损耗系数'] ? form['损耗系数'] : 0,
+    Gy0_shdh: form['shdh'] ? form['shdh'] : "",
+    Gy0_Rate1: "",
+    Gy0_辅助工时: form['装版工时'] ? form['装版工时'] : "",
+    Gy0_小时产能: form['小时产能'] ? form['小时产能'] : "",
+    工序备注: form['备注'] ? form['备注'] : "",
     质量要求: form['质量要求'] ? form['质量要求'] : "",
     质量隐患: form['质量隐患'] ? form['质量隐患'] : "",
   };
   console.log(formattedData)
-  // const ProcessDetailAdd_add = await ProcessDetailAdd(formattedData);
-  // console.log(ProcessDetailAdd_add)
-  // add_gdgydialogFormVisible.value = false
+  const ProcessDetailAdd_add = await ProcessDetailAdd(formattedData);
+  console.log(ProcessDetailAdd_add)
+  if (ProcessDetailAdd_add.code === 0) {
+    ElMessage({type: 'success', message: '新增成功'})
+    add_gdgydialogFormVisible.value = false
+  } else {
+    ElMessage({type: 'error',message: '新增失败'})
+  }
 }
 // 新增工艺资料取消
 const add_gdgycloseDialog = () => {

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

@@ -1241,8 +1241,9 @@
                 </div>
               </template>
             </el-dialog>
-		<!-- 技术附件 -->
-          <el-dialog v-model="jsfjdialogFormVisible" :before-close="jsfjcloseDialog" :title="产品技术附件资料" style="margin-top: 40px" height="500px" width="800px" destroy-on-close>
+
+            <!-- 技术附件 -->
+            <el-dialog v-model="jsfjdialogFormVisible" :before-close="jsfjcloseDialog" :title="产品技术附件资料" style="margin-top: 40px" height="500px" width="800px" destroy-on-close>
 			  <el-form :model="jsfjformdata" label-position="right" ref="elFormRef" :rules="rule" label-width="75px">
 				<el-row :gutter="24">
 					<el-col :span="6">
@@ -2905,7 +2906,8 @@ const _ProductInformationEdit = async ()=>{
     return false;
   }
   let params = {}
-  params.workorder = yycpzlformData['gdbh'];
+  // params.workorder = yycpzlformData['gdbh'];
+  params.workorder = _Gd_gdbh.value;
   params.productCode = yycpzlformData['cpdh'];
   params.option = yycpzlformData['fangan'];
   console.log(params)
@@ -2914,9 +2916,10 @@ const _ProductInformationEdit = async ()=>{
     if (ProductInformationEditdata.code === 0) {
       ElMessage({type: 'success', message: '更新成功'})
       onyycpzllist.value = false;
-    } else {
-      ElMessage({type: 'error',message: '更新失败'})
     }
+    // else {
+    //   ElMessage({type: 'error',message: '更新失败'})
+    // }
   } catch (error) {
     console.error(error);
   }
@@ -3002,13 +3005,27 @@ const _cha_WorkList = async (node) => {
     return false;
   }
   const search = searchInfo.value;
+  var regex = /^[a-zA-Z0-9]+$/;
   try {
-    const WorkListdata = await WorkList({ search:search,limit:1,page:1});//接口调用函数
-    if(WorkListdata.data.total === 0){
-      ElMessage({type: 'warning',message: '未搜索具体查询条件'})
+    if (regex.test(search)) {
+      // 符合条件,执行搜索操作
+      console.log('搜索内容为纯数字加字母');
+      const WorkListdata = await WorkList({search:search,limit:1,page:1});//接口调用函数
+      if(WorkListdata.data.total === 0){
+        ElMessage({type: 'warning',message: '未搜索具体查询条件'})
+      }
+      tableData.splice(0,tableData.length,...WorkListdata.data.data);//表格数据
+      total.value = WorkListdata.data.total;//共多少条
+    } else {
+      // 不符合条件,给出提示
+      console.log('搜索内容包含非字母和数字的字符');
+      const WorkListdata = await WorkList({Gd_khdh:'',search:search,limit:100,page:1});//接口调用函数
+      if(WorkListdata.data.total === 0){
+        ElMessage({type: 'warning',message: '未搜索具体查询条件'})
+      }
+      tableData.splice(0,tableData.length,...WorkListdata.data.data);//表格数据
+      total.value = WorkListdata.data.total;//共多少条
     }
-    tableData.splice(0,tableData.length,...WorkListdata.data.data);//表格数据
-    total.value = WorkListdata.data.total;//共多少条
   } catch (error) {
     console.error(error);
   }