zck 11 месяцев назад
Родитель
Сommit
c36d179c0a

+ 9 - 0
src/api/jixiaoguanli/jitairibaobiao.js

@@ -1180,3 +1180,12 @@ export const orderLossData = (params) => {
     params
   })
 }
+
+//拉料工数据导出接口
+export const LazhiGongData = (params) => {
+  return service({
+    url: '/mes_server/facility/LazhiGongData',
+    method: 'get',
+    params
+  })
+}

+ 352 - 0
src/assets/css/print-lock.css

@@ -0,0 +1,352 @@
+@media print {
+  body {
+    margin: 0px;
+    padding: 0px;
+  }
+}
+
+@page {
+  margin: 0;
+}
+
+.hiprint-printPaper * {
+  box-sizing: border-box;
+  -moz-box-sizing: border-box; /* Firefox */
+  -webkit-box-sizing: border-box; /* Safari */
+}
+
+.hiprint-printPaper *:focus {
+  outline: -webkit-focus-ring-color auto 0px;
+}
+
+.hiprint-printPaper {
+  position: relative;
+  padding: 0 0 0 0;
+  page-break-after: always;
+  -webkit-user-select: none; /* Chrome/Safari/Opera */
+  -moz-user-select: none; /* Firefox */
+  user-select: none;
+  overflow-x: hidden;
+  overflow: hidden;
+}
+
+.hiprint-printPaper .hiprint-printPaper-content {
+  position: relative;
+}
+
+/* 火狐浏览器打印 第一页过后 重叠问题 */
+@-moz-document url-prefix() {
+  .hiprint-printPaper .hiprint-printPaper-content {
+    position: relative;
+    margin-top: 20px;
+    top: -20px
+  }
+}
+
+.hiprint-printPaper.design {
+  overflow: visible;
+}
+
+
+.hiprint-printTemplate .hiprint-printPanel {
+  page-break-after: always;
+}
+
+.hiprint-printPaper, hiprint-printPanel {
+  box-sizing: border-box;
+  border: 0px;
+}
+
+.hiprint-printPanel .hiprint-printPaper:last-child {
+  page-break-after: avoid;
+}
+
+.hiprint-printTemplate .hiprint-printPanel:last-child {
+  page-break-after: avoid;
+}
+
+.hiprint-printPaper .hideheaderLinetarget {
+  border-top: 0px dashed rgb(201, 190, 190) !important;
+}
+
+.hiprint-printPaper .hidefooterLinetarget {
+  border-top: 0px dashed rgb(201, 190, 190) !important;
+}
+
+.hiprint-printPaper.design {
+  border: 1px dashed rgba(170, 170, 170, 0.7);
+}
+
+.design .hiprint-printElement-table-content, .design .hiprint-printElement-longText-content {
+  overflow: hidden;
+  box-sizing: border-box;
+}
+
+.design .resize-panel {
+  box-sizing: border-box;
+  border: 1px dotted;
+}
+
+.hiprint-printElement-text {
+  background-color: transparent;
+  background-repeat: repeat;
+  padding: 0 0 0 0;
+  border: 0.75pt none rgb(0, 0, 0);
+  direction: ltr;
+  font-family: 'SimSun';
+  font-size: 9pt;
+  font-style: normal;
+  font-weight: normal;
+  padding-bottom: 0pt;
+  padding-left: 0pt;
+  padding-right: 0pt;
+  padding-top: 0pt;
+  text-align: left;
+  text-decoration: none;
+  line-height: 9.75pt;
+  box-sizing: border-box;
+  word-wrap: break-word;
+  word-break: break-all;
+}
+
+.design .hiprint-printElement-text-content {
+  border: 1px dashed rgb(206, 188, 188);
+  box-sizing: border-box;
+}
+
+.hiprint-printElement-longText {
+  background-color: transparent;
+  background-repeat: repeat;
+  border: 0.75pt none rgb(0, 0, 0);
+  direction: ltr;
+  font-family: 'SimSun';
+  font-size: 9pt;
+  font-style: normal;
+  font-weight: normal;
+  padding-bottom: 0pt;
+  padding-left: 0pt;
+  padding-right: 0pt;
+  padding-top: 0pt;
+  text-align: left;
+  text-decoration: none;
+  line-height: 9.75pt;
+  box-sizing: border-box;
+  word-wrap: break-word;
+  word-break: break-all;
+  /*white-space: pre-wrap*/
+}
+
+
+.hiprint-printElement-table {
+  background-color: transparent;
+  background-repeat: repeat;
+  color: rgb(0, 0, 0);
+  border-color: rgb(0, 0, 0);
+  border-style: none;
+  direction: ltr;
+  font-family: 'SimSun';
+  font-size: 9pt;
+  font-style: normal;
+  font-weight: normal;
+  padding-bottom: 0pt;
+  padding-left: 0pt;
+  padding-right: 0pt;
+  padding-top: 0pt;
+  text-align: left;
+  text-decoration: none;
+  padding: 0 0 0 0;
+  box-sizing: border-box;
+  line-height: 9.75pt;
+}
+
+.hiprint-printElement-table thead {
+  background: #e8e8e8;
+  font-weight: 700;
+}
+
+table.hiprint-printElement-tableTarget {
+  width: 100%;
+}
+
+.hiprint-printElement-tableTarget, .hiprint-printElement-tableTarget tr, .hiprint-printElement-tableTarget td {
+  border-color: rgb(0, 0, 0);
+  /*border-style: none;*/
+  /*border: 1px solid rgb(0, 0, 0);*/
+  font-weight: normal;
+  direction: ltr;
+  padding-bottom: 0pt;
+  padding-left: 4pt;
+  padding-right: 4pt;
+  padding-top: 0pt;
+  text-decoration: none;
+  vertical-align: middle;
+  box-sizing: border-box;
+  word-wrap: break-word;
+  word-break: break-all;
+  /*line-height: 9.75pt;
+  font-size: 9pt;*/
+}
+
+.hiprint-printElement-tableTarget-border-all {
+  border: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-none {
+  border: 0px solid;
+}
+.hiprint-printElement-tableTarget-border-lr {
+  border-left: 1px solid;
+  border-right: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-left {
+  border-left: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-right {
+  border-right: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-tb {
+  border-top: 1px solid;
+  border-bottom: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-top {
+  border-top: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-bottom {
+  border-bottom: 1px solid;
+}
+
+.hiprint-printElement-tableTarget-border-td-none td {
+  border: 0px solid;
+}
+.hiprint-printElement-tableTarget-border-td-all td:not(:nth-last-child(-n+2)) {
+  border-right: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-td-all td:not(last-child) {
+  border-right: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-td-all td:last-child {
+  border-left: 1px solid;
+}
+.hiprint-printElement-tableTarget-border-td-all td:last-child:first-child {
+  border-left: none;
+}
+
+/*.hiprint-printElement-tableTarget tr,*/
+.hiprint-printElement-tableTarget td {
+  height: 18pt;
+}
+
+.hiprint-printPaper .hiprint-paperNumber {
+  font-size: 9pt;
+}
+
+.design .hiprint-printElement-table-handle {
+  position: absolute;
+  height: 21pt;
+  width: 21pt;
+  background: red;
+  z-index: 1;
+}
+
+.hiprint-printPaper .hiprint-paperNumber-disabled {
+  float: right !important;
+  right: 0 !important;
+  color: gainsboro !important;
+}
+
+.hiprint-printElement-vline, .hiprint-printElement-hline {
+  border: 0px none rgb(0, 0, 0);
+
+}
+
+.hiprint-printElement-vline {
+  border-left: 0.75pt solid #000;
+  border-right: 0px none rgb(0, 0, 0) !important;
+  border-bottom: 0px none rgb(0, 0, 0) !important;
+  border-top: 0px none rgb(0, 0, 0) !important;
+}
+
+.hiprint-printElement-hline {
+  border-top: 0.75pt solid #000;
+  border-right: 0px none rgb(0, 0, 0) !important;
+  border-bottom: 0px none rgb(0, 0, 0) !important;
+  border-left: 0px none rgb(0, 0, 0) !important;
+}
+
+.hiprint-printElement-oval, .hiprint-printElement-rect {
+  border: 0.75pt solid #000;
+}
+
+.hiprint-text-content-middle {
+}
+
+.hiprint-text-content-middle > div {
+  display: grid;
+  align-items: center;
+}
+
+.hiprint-text-content-bottom {
+}
+
+.hiprint-text-content-bottom > div {
+  display: grid;
+  align-items: flex-end;
+}
+
+.hiprint-text-content-wrap {
+}
+
+.hiprint-text-content-wrap .hiprint-text-content-wrap-nowrap {
+  white-space: nowrap;
+}
+
+.hiprint-text-content-wrap .hiprint-text-content-wrap-clip {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: clip;
+}
+
+.hiprint-text-content-wrap .hiprint-text-content-wrap-ellipsis {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+/*hi-grid-row */
+.hi-grid-row {
+  position: relative;
+  height: auto;
+  margin-right: 0;
+  margin-left: 0;
+  zoom: 1;
+  display: block;
+  box-sizing: border-box;
+}
+
+.hi-grid-row::after, .hi-grid-row::before {
+  display: table;
+  content: '';
+  box-sizing: border-box;
+}
+
+.hi-grid-col {
+  display: block;
+  box-sizing: border-box;
+  position: relative;
+  float: left;
+  flex: 0 0 auto;
+}
+
+.table-grid-row {
+  margin-left: -0pt;
+  margin-right: -0pt;
+}
+
+.tableGridColumnsGutterRow {
+  padding-left: 0pt;
+  padding-right: 0pt;
+}
+
+.hiprint-gridColumnsFooter {
+  text-align: left;
+  clear: both;
+}

Разница между файлами не показана из-за своего большого размера
+ 5 - 1250
src/view/DecisionSupport/operation/operation.vue


Разница между файлами не показана из-за своего большого размера
+ 4 - 1299
src/view/DecisionSupport/outputsum/index.vue


+ 4 - 4
src/view/performance/chejianbaogong.vue

@@ -2480,7 +2480,7 @@
   
 
 // 成功
-const susscessres = (arr) => {
+const successres = (arr) => {
     ElMessage({
         type: '',
         dangerouslyUseHTMLString: true,
@@ -2889,7 +2889,7 @@ const warningres = (arr) => {
 	if (response.code === 0) {
 	  bzchanliangVisible.value=false
 	  FacilityProduction()
-	  susscessres('成功');
+	  successres('成功');
 	}
   }
   const roww = ref(null)
@@ -2943,7 +2943,7 @@ const warningres = (arr) => {
 	  if (res.code === 0) {
 		  FacilityProduction()
 		//成功
-		  susscessres('切换班组成功');
+		  successres('切换班组成功');
 	  }
   }
   
@@ -3378,7 +3378,7 @@ const warningres = (arr) => {
 	  UniqId:formData.value.huanxingId
 	})
 	if (response.code === 0) {
-	  susscessres('删除成功!')
+	  successres('删除成功!')
 	  huanxingtreeData.value=[]
 	  huanxingselectData.value=[]
 	  huanxingData.value={}

+ 101 - 1
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -21,6 +21,7 @@
 		<el-button type="primary" class="bt" @click="onRCL">日产量批量维护</el-button>
 		<el-button type="primary"  class="bt"   @click="pd_lcdlistonClick" >流程单查询</el-button>
 		<el-button type="primary"  class="bt"   @click="scpconClick" >工单生产批次信息查询</el-button>
+		<el-button type="primary" icon="Download" class="bt"   @click="llexporttoExcel" >拉料导出Excel</el-button>
 		<!-- <el-button type="primary" @click="onClear2" >换型清场</el-button> -->
 	</header>
 	
@@ -2382,6 +2383,26 @@
 			  <el-table-column prop="name" label="" width="560" />	      	 
 		    </el-table>
 		</el-dialog>
+
+		 <!-- 拉料导出弹窗 -->
+ <el-dialog v-model="onllexcel"  title="拉料数据导出" destroy-on-close style="height: 20%;width: 20%;">
+  <el-form-item label="选择年月" label-width="100px">
+    <el-date-picker
+			    v-model="onllexcelrq"
+			    type="month"
+			    placeholder="选择年月"
+			    :default-value="new Date()"
+          		@change="onchange_data"
+			    style="width: 200px;" 
+			  />
+  		</el-form-item>
+        <template #footer>
+		    <div class="dialog-footer" style="text-align: right;">
+		      <el-button @click="rcgdsjcloseDialog">取消</el-button>
+		      <el-button type="primary" @click="rcgdsjonDialog">确定</el-button>
+		    </div>
+		  </template>
+            </el-dialog>
 		  
 		<Shebeizhuangtai
 		  v-if="dialogSbyxgl"
@@ -2464,7 +2485,8 @@ import {
    JPmachineDetail,
    JpChanliangEdit,
    JpUploade,
-   getRejectRate
+   getRejectRate,
+   LazhiGongData
 } from '@/api/jixiaoguanli/jitairibaobiao'
 import{ 
 	AccountingParameter,
@@ -2490,6 +2512,8 @@ import {
 import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
 // 全量引入格式化工具 请按需保留
 import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
+import * as XLSX from 'xlsx'
+import FileSaver from 'file-saver'
 import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { ref, reactive,watch, registerRuntimeCompiler } from 'vue'
@@ -2503,6 +2527,19 @@ defineOptions({
     name: 'Company'
 })
 
+// 获取当前日期
+const today = new Date();
+    const year = today.getFullYear();
+    const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+    const day = String(today.getDate()).padStart(2, '0');
+    const hours = String(today.getHours()).padStart(2, '0');
+    const minutes = String(today.getMinutes()).padStart(2, '0');
+    const seconds = String(today.getSeconds()).padStart(2, '0');
+    const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+    const currentDates = `${year}-${month}-${day}`;
+
+
+
 const printPageRef = ref()
 const DelType = ref(false)
 const AddType = ref(false)
@@ -8304,6 +8341,69 @@ const gxclhcCellClass = ({row, column, rowIndex, columnIndex}) =>{
 }
 
 
+//拉料导出弹窗
+const onllexcel = ref(false)
+const onllexcelrq = ref('')
+const llexporttoExcel = async () => {
+console.log('导出')
+onllexcelrq.value = currentDates.split('-').slice(0, 2).join('-')
+onllexcel.value = true
+}
+
+//选择日期
+const onchange_data = (val) => {
+  if (val) {
+    // 将日期对象转换为本地时间的年月格式
+    const year = val.getFullYear()
+    const month = (val.getMonth() + 1).toString().padStart(2, '0')
+    onllexcelrq.value = `${year}-${month}`
+  } else {
+    onllexcelrq.value = ''
+  }
+}
+
+//导出确认
+const rcgdsjonDialog = async () => {
+  try {
+    //  获取数据
+    const response = await LazhiGongData({ mouth: onllexcelrq.value });
+    const originalData = response.data;
+    
+    // 创建工作表
+    const worksheet = XLSX.utils.json_to_sheet(originalData);
+    //从某列开始转化成数字
+    //设置从C列开始为数字格式
+    const range = XLSX.utils.decode_range(worksheet['!ref']);
+    for (let col = 2; col <= range.e.c; col++) { // 从C列(索引2)开始
+      for (let row = range.s.r + 1; row <= range.e.r; row++) { // 跳过表头行
+        const cellAddress = XLSX.utils.encode_cell({ r: row, c: col });
+        if (worksheet[cellAddress]) {
+          // 尝试转换为数字
+          const cellValue = worksheet[cellAddress].v;
+          const numValue = Number(cellValue);
+          
+          if (!isNaN(numValue)) {
+            worksheet[cellAddress].t = 'n'; // 数字类型
+            worksheet[cellAddress].v = numValue; // 更新值
+            worksheet[cellAddress].z = '0.0'; // 数字格式
+          }
+        }
+      }
+    }
+    
+    // 创建并导出工作簿
+    const workbook = XLSX.utils.book_new();
+    XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
+    XLSX.writeFile(workbook, '拉料人员数据.xlsx');
+    
+  } catch (error) {
+    console.error('导出失败:', error);
+    ElMessage.error('导出数据失败,请重试');
+  }
+};
+const rcgdsjcloseDialog = () => {onllexcel.value = false}
+	
+
 </script>
 
 <style scoped>

Некоторые файлы не были показаны из-за большого количества измененных файлов