From 41cad2434411b2eac1b9814d47d06e34c291f285 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 29 三月 2024 16:29:40 +0800
Subject: [PATCH] 完成首页等问题修改
---
src/views/quality/rawMaterial/rawMaterial-form.vue | 28 ++++-
src/views/equipment/equipment/index.vue | 2
src/views/plan/manufacturingorder/index.vue | 2
src/api/wel/index.js | 20 ++++
src/views/quality/teststandard/index.vue | 4
src/views/equipment/metering/index.vue | 9 -
src/views/equipment/mould/index.vue | 78 +++++++++++++++
src/page/wel.vue | 95 +++++++++++++++++-
src/views/quality/Packaging_ledger/index.vue | 2
src/views/quality/rawMaterial/index.vue | 10 +
src/views/quality/rawMaterial/rawMaterial-print.vue | 6
11 files changed, 227 insertions(+), 29 deletions(-)
diff --git a/src/api/wel/index.js b/src/api/wel/index.js
new file mode 100644
index 0000000..b76bc54
--- /dev/null
+++ b/src/api/wel/index.js
@@ -0,0 +1,20 @@
+import request from '@/router/axios'
+import qs from 'qs'
+
+// 鏍规嵁鏃ユ湡鑾峰彇鐢熶骇璋冨害寰呭姙浜嬮」
+export function getReportList(query) {
+ return request({
+ url: '/mes/productionSchedul/getReportList',
+ method: 'get',
+ params: query
+ })
+ }
+
+ // 鑾峰彇鐢熶骇璋冨害寰呭姙鎶ヨ〃
+export function getReport(query) {
+ return request({
+ url: '/mes/productionSchedul/getReport',
+ method: 'get',
+ params: query
+ })
+ }
diff --git a/src/page/wel.vue b/src/page/wel.vue
index 4c632dc..c682e79 100644
--- a/src/page/wel.vue
+++ b/src/page/wel.vue
@@ -1,6 +1,6 @@
<template>
<div class="dashboard-main">
- <!-- <div class="body">
+ <div class="body">
<el-row>
<el-col :span="12">
<p class="todo-title"><i class="el-icon-bell"></i><span> 鐢熶骇璋冨害 路 寰呭姙</span></p>
@@ -9,7 +9,10 @@
<el-row>
<el-col :span="6">
<el-card class="box-card todo-card">
- <el-collapse v-model="activeName" accordion class="todo-collapse" style="display:none">
+ <ul class="type-box">
+ <li v-for="(m,i) in tabList" :key="i" :class="{active:current == i}" @click="changeTab(m,i)">{{ m }}</li>
+ </ul>
+ <el-collapse v-model="activeName" accordion class="todo-collapse" style="display: none;">
<el-collapse-item name="1">
<template slot="title">
<span class="title">浠婃棩寰呭姙</span>
@@ -63,33 +66,35 @@
</template>
</el-calendar>
<div class="todo-span"><span>寰呭姙</span></div>
- <div class="todo-info" v-for="(item,index) in 10" :key="index">
+ <div class="todo-info" v-for="(item,index) in todoList" :key="index" v-show="todoList.length>0">
<div class="todo-info-state"></div>
+ <span>{{ item }}</span>
</div>
+ <span class="no-info" v-if="todoList.length==0">鏆傛棤</span>
</el-card>
</el-col>
<el-col :span="6">
<el-card class="box-card todo-total-card">
<div class="todo-total-text">
<span>浠婃棩寰呭姙</span>
- <span v-text="todoByDayList.length"></span>
+ <span v-text="todoInfo.todoByDay"></span>
</div>
<div class="todo-total-text">
<span>鏈懆寰呭姙</span>
- <span v-text="todoByWeekList.length"></span>
+ <span v-text="todoInfo.todoByWeek"></span>
</div>
<div class="todo-total-text">
<span>鏈湀寰呭姙</span>
- <span v-text="todoByMonthList.length"></span>
+ <span v-text="todoInfo.todoByMonth"></span>
</div>
<div class="todo-total-text">
<span>瓒呮湡</span>
- <span v-text="0"></span>
+ <span v-text="todoInfo.outByTime"></span>
</div>
</el-card>
</el-col>
</el-row>
- </div> -->
+ </div>
</div>
</template>
<style scoped="scoped" lang="scss">
@@ -125,6 +130,8 @@
background: #FFFFFF;
border-radius: 8px 8px 8px 8px;
border: 1px solid #E8E8E8;
+ display: flex;
+ align-items: center;
.todo-info-state{
width:12px;
height:64px;
@@ -133,6 +140,18 @@
position: relative;
top:0px;
}
+ span{
+ font-size: 14px;
+ margin: 0 16px;
+ }
+}
+.no-info{
+ font-size: 14px;
+ color: #666;
+ display: inline-block;
+ text-align: center;
+ width: 100%;
+ margin-top: 100px;
}
.todo-total-card{
margin-left: 15px;
@@ -142,6 +161,8 @@
margin-bottom:10px;
height: 40px;
background: linear-gradient( 90deg, #C8C2FF 0%, rgba(200,194,255,0) 100%);
+ display: flex;
+ align-items: center;
span:nth-child(1){
width:50%;
height:40px;
@@ -227,6 +248,24 @@
>>>.el-calendar-table td.is-selected {
background-color: #e3effc;
}
+.type-box{
+ list-style-type: none;
+ display: flex;
+ align-items: center;
+ width: 100%;
+ padding-left: 0;
+ margin-left: 20px;
+ li{
+ padding: 8px 16px;
+ border: 1px solid #E3E1FD;
+ cursor: pointer;
+ font-size: 14px;
+ color: #875A7B;
+ &.active{
+ background: linear-gradient( 180deg, #E3E1FD 0%, #F0EFF9 100%);
+ }
+ }
+}
</style>
<script>
@@ -234,6 +273,7 @@
import ECharts from 'vue-echarts'
import {dateFormat} from '@/util/date'
import {getProductionSchedulReport} from '@/api/plan/productionschedul'
+import { getReportList,getReport } from '@/api/wel/index'
export default {
name: 'Wel',
components: {
@@ -246,18 +286,26 @@
todoByDayList: [],
todoByWeekList: [],
todoByMonthList: [],
+ tabList:['姘村瘑鎺ユ彃浠�','娴峰伐鍣ㄤ欢','瑙傛祴缃�','鍏朵粬'],
+ current:0,
+ type:'姘村瘑鎺ユ彃浠�',
+ todoList:[],
+ todoInfo:{}
}
},
computed: {
...mapGetters(['website'])
},
created() {
- this.getProSchedulReport()
+ // this.getProSchedulReport()
+ this.getReportList();
+ this.getReport();
},
watch:{
calendarValue(newVal){
if(newVal){
console.log(dateFormat(newVal,'yyyy-MM-dd'));
+ this.getReportList()
}
}
},
@@ -272,6 +320,35 @@
}).catch(error=>{
console.error(error)
})
+ },
+ changeTab(m,i){
+ this.type = m;
+ this.current = i;
+ this.getReportList()
+ this.getReport();
+ },
+ getReportList(){
+ getReportList({
+ type:this.type,
+ time:dateFormat(this.calendarValue,'yyyy-MM-dd')
+ }).then(res=>{
+ if(res.status===200){
+ this.todoList = res.data.data
+ }
+ }).catch(error=>{
+ console.error(error)
+ })
+ },
+ getReport(){
+ getReport({
+ type:this.type,
+ }).then(res=>{
+ if(res.status===200){
+ this.todoInfo = res.data.data
+ }
+ }).catch(error=>{
+ console.error(error)
+ })
}
}
}
diff --git a/src/views/equipment/equipment/index.vue b/src/views/equipment/equipment/index.vue
index 418e866..f21c29b 100644
--- a/src/views/equipment/equipment/index.vue
+++ b/src/views/equipment/equipment/index.vue
@@ -311,7 +311,7 @@
style: `@page {
margin:0;
padding: 0;
- size: 360px 170px;
+ size: 360px 170px landscape;
}
html{
zoom:100%;
diff --git a/src/views/equipment/metering/index.vue b/src/views/equipment/metering/index.vue
index ecdc081..8928d33 100644
--- a/src/views/equipment/metering/index.vue
+++ b/src/views/equipment/metering/index.vue
@@ -51,7 +51,7 @@
</el-dialog>
</div>
</template>
-
+
<script>
import { delObj, fetchList,pullEquip } from '@/api/equipment/metering'
import TableForm from './metering-form'
@@ -156,7 +156,7 @@
isSearch: true,
searchInfoType: 'datetime'
},
-
+
{
minWidth: '150',
width: '150',
@@ -342,11 +342,11 @@
printable: 'printMetering',//椤甸潰
type: "html",//鏂囨。绫诲瀷
maxWidth:450,
- targetStyles:['*'],
+ targetStyles:['*'],
style: `@page {
margin:0;
padding: 0;
- size: 360px 170px;
+ size: 360px 170px landscape;
}
html{
zoom:100%;
@@ -425,4 +425,3 @@
}
}
</script>
-
\ No newline at end of file
diff --git a/src/views/equipment/mould/index.vue b/src/views/equipment/mould/index.vue
index 2bfd999..a2ba424 100644
--- a/src/views/equipment/mould/index.vue
+++ b/src/views/equipment/mould/index.vue
@@ -144,6 +144,40 @@
<el-button type="primary" @click="confirmSaveOrUpdateMould">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <el-dialog title="鏍囩鍒楄〃" :visible.sync="diaPrintTab" width="500px" top="5vh">
+ <div style="width:100%;height:400px;overflow-y: auto;">
+ <div class="dia_body" id="printRaw">
+ <el-card class="box-card" v-for="(tem, i) in multipleSelection" :key="i" style="margin-bottom: 10px; font-size: 16px !important;">
+ <!-- <el-row>
+ <el-col :span="8" :offset="1">搴忓彿锛�</el-col>
+ <el-col :span="7" style="font-weight: bold;">{{ tem.id }}</el-col>
+ </el-row> -->
+ <el-row>
+ <el-col :span="6" :offset="1">缂栧彿锛�</el-col>
+ <el-col :span="12" style="font-weight: bold;">{{ tem.code }}</el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6" :offset="1">妯″叿鍚嶇О锛�</el-col>
+ <el-col :span="12" style="font-weight: bold;">{{ tem.name }}</el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6" :offset="1">妯″叿浣嶇疆锛�</el-col>
+ <el-col :span="12" style="font-weight: bold;">{{ tem.workShop }}-{{tem.shelfNo}}</el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6" :offset="1">妯″叿浜岀淮鐮侊細</el-col>
+ <el-col :span="7">
+ <vueQr :text="tem.code" :size="80" :margin="2"></vueQr>
+ </el-col>
+ </el-row>
+ </el-card>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="diaPrintTab = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="printFun">鎵� 鍗�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -153,6 +187,8 @@
import { fetchList,addMould,updateMould,delById } from '@/api/equipment/moulde'
import { mapGetters } from 'vuex'
import { remote } from '@/api/admin/dict'
+import vueQr from 'vue-qr'
+import PrintJS from 'print-js'
export default {
data(){
return {
@@ -372,6 +408,7 @@
},
components: {
ttable,
+ vueQr,
},
watch: {
dialogVisible(newVal){
@@ -397,6 +434,13 @@
type: 'text',
fun: this.deleteHandle
}]
+ }
+ if(this.permissions.equipment_mould_labelprint){
+ this.table.toolbar.push({
+ text: '鏍囩鎵撳嵃',
+ type: 'primary',
+ fun: this.labelPrint
+ })
}
this.table.operator = arr.length>0 ? arr : null
},
@@ -493,6 +537,40 @@
this.$message.error('璇烽�夋嫨妯″叿')
}
},
+ labelPrint(){
+ if(this.multipleSelection.length==0){
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ this.diaPrintTab = true
+ },
+ printFun() {
+ // this.printDialogVisible = false;
+ this.diaPrintTab = false;
+ PrintJS({
+ printable: 'printRaw',//椤甸潰
+ type: "html",//鏂囨。绫诲瀷
+ maxWidth:450,
+ targetStyles:['*'],
+ style: `@page {
+ margin:0;
+ padding: 0;
+ size: 360px 170px landscape;
+ }
+ html{
+ zoom:100%;
+ }
+ @media print{
+ width: 360px;
+ height: 170px;
+ margin:0;
+ padding: 0;
+ }`,
+ onPrintDialogClose: this.erexcel=false,
+ targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕�
+ font_size: '',
+ });
+ },
},
}
</script>
diff --git a/src/views/plan/manufacturingorder/index.vue b/src/views/plan/manufacturingorder/index.vue
index 71a087f..a417123 100644
--- a/src/views/plan/manufacturingorder/index.vue
+++ b/src/views/plan/manufacturingorder/index.vue
@@ -1145,7 +1145,7 @@
targetStyles:['*'],
style: `@page {
margin:0;
- size: 360px 175px;
+ size: 360px 175px landscape;
}
html{
zoom:100%;
diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue
index 7f70b34..4f782fb 100644
--- a/src/views/quality/Packaging_ledger/index.vue
+++ b/src/views/quality/Packaging_ledger/index.vue
@@ -491,7 +491,7 @@
style: `@page {
margin:0;
padding: 0;
- size: 323px 210px;
+ size: 323px 210px landscape;
}
html{
zoom:100%;
diff --git a/src/views/quality/rawMaterial/index.vue b/src/views/quality/rawMaterial/index.vue
index c5af6e0..afa8ac8 100644
--- a/src/views/quality/rawMaterial/index.vue
+++ b/src/views/quality/rawMaterial/index.vue
@@ -238,6 +238,14 @@
return this.StateList
}
},
+ {
+ minWidth: '120',
+ prop: 'remark',
+ label: '澶囨敞',
+ isTrue: true,
+ isSearch: true,
+ searchInfoType: 'text',
+ },
],
toolbar: [],
operator: null,
@@ -383,7 +391,7 @@
type: "html",
// header: "鍘熸潗鏂欐娴嬫姤鍛�",
targetStyles: ["*"],
- style: `@page {margin: 0mm 5mm;size: A4;}
+ style: `@page {margin: 0mm 5mm;size: A4 landscape;}
html {zoom:100%;}
@media print {
html,body{
diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue
index ea50871..b5f81c2 100644
--- a/src/views/quality/rawMaterial/rawMaterial-form.vue
+++ b/src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -94,7 +94,7 @@
<el-col :span="6">
<el-form-item label="鎶ユ鏃ユ湡" prop="startTime">
<el-date-picker
- :disabled="dataForm.id!=null"
+ disabled
v-model="dataForm.startTime"
type="datetime"
format="yyyy-MM-dd HH:mm:ss"
@@ -103,18 +103,23 @@
</el-date-picker>
</el-form-item>
</el-col>
- <el-col :span="6">
- <el-form-item label="鎶ユ浜�" prop="createUser" v-if="dataForm.id!=null">
+ <el-col :span="6" v-if="dataForm.id!=null">
+ <el-form-item label="鎶ユ浜�" prop="createUser" >
<el-input v-model="dataForm.createUser" disabled />
</el-form-item>
</el-col>
- <el-col :span="6">
- <el-form-item prop="projectName" label="椤圭洰鍚嶇О" v-if="dataForm.id!=null">
+ <el-col :span="6" v-if="dataForm.id!=null">
+ <el-form-item prop="projectName" label="椤圭洰鍚嶇О" >
<el-tooltip :disabled="dataForm.projectName==null" :content="dataForm.projectName">
<el-input v-model="dataForm.projectName" disabled ></el-input>
</el-tooltip>
</el-form-item>
</el-col>
+ <el-col :span="6">
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input v-model="dataForm.remark" />
+ </el-form-item>
+ </el-col>
</el-row>
</el-form>
</div>
@@ -188,7 +193,7 @@
ref="testValueInput"
@blur="checkTestValues(scope.row,'blur',$event)"
@select="checkTestValues(scope.row,'select',$event)"
- :disabled="scope.row.deviceId == null || (dataForm.id!=null&&(resultVal!=null && resultVal!=''))"
+ :disabled="scope.row.deviceId == null || (dataForm.id!=null&&(resultVal!=null && resultVal!=''))"
v-model="scope.row.testValueList[index]"
:fetch-suggestions="querySearch"
placeholder="璇疯緭鍏ユ垨閫夋嫨妫�娴嬪��" >
@@ -460,6 +465,7 @@
unit: '',
number: '',
supplier: '',
+ remark:'',
rawInsProducts: [{
deviceId: 0,
father:'',
@@ -481,7 +487,7 @@
}],
dataRule: {
code:[{ required: true, message: '璇锋壂鎻忛�夋嫨闆朵欢', trigger: 'blur' }],
- startTime: [{ required: true, message: '璇烽�夋嫨鎶ユ鏃ユ湡', trigger: 'blur' }]
+ // startTime: [{ required: true, message: '璇烽�夋嫨鎶ユ鏃ユ湡', trigger: 'blur' }]
},
deviceList: [],
}
@@ -620,6 +626,7 @@
this.dataForm.code = param.code
this.dataForm.name = param.name
this.dataForm.formTime = param.formTime
+ this.dataForm.startTime = param.formTime
this.dataForm.unit = param.unit
this.dataForm.specs = param.specs
this.dataForm.supplier = param.supplier
@@ -699,7 +706,9 @@
});
},
addTeatValueColumn(){
- this.empiricalValueAdd = this.empiricalValueAdd + 1;
+ this.$nextTick(()=>{
+ this.empiricalValueAdd = this.empiricalValueAdd + 1;
+ })
},
// 娣诲姞琛�
clickAddLine(row,index) {
@@ -803,6 +812,8 @@
this.dataForm.rawInsNo = data.rawInsNo
this.dataForm.name = data.name
this.dataForm.formTime = data.formTime
+ this.dataForm.startTime = data.startTime
+ this.dataForm.remark = data.remark
this.dataForm.code = data.code
this.dataForm.specs = data.specs
this.dataForm.unit = data.runit
@@ -989,6 +1000,7 @@
this.list.forEach(item=>{
item.children.forEach(c=>{
c.testValue=c.testValueList.join(",")
+ c.required = c.required.replace(',','锛�').replace('(','锛�').replace(')','锛�')
})
})
data.rawInsProducts = this.list
diff --git a/src/views/quality/rawMaterial/rawMaterial-print.vue b/src/views/quality/rawMaterial/rawMaterial-print.vue
index c93f0d2..c730f95 100644
--- a/src/views/quality/rawMaterial/rawMaterial-print.vue
+++ b/src/views/quality/rawMaterial/rawMaterial-print.vue
@@ -420,7 +420,7 @@
obj.testValList.push('')
}
})
- }
+ }
})
}
this.pageDataFun(pageSize,this.tableData)
@@ -519,7 +519,7 @@
}
/* Page Definitions */
@page WordSection1{
- size:595.3pt 841.9pt;
+ size:595.3pt 841.9pt landscape;
margin:72.0pt 2.0cm 2.0cm 2.0cm;
layout-grid:15.6pt;
}
@@ -536,4 +536,4 @@
.procedure {
word-wrap:break-word;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/quality/teststandard/index.vue b/src/views/quality/teststandard/index.vue
index c649472..72deceb 100644
--- a/src/views/quality/teststandard/index.vue
+++ b/src/views/quality/teststandard/index.vue
@@ -866,6 +866,10 @@
dataFormTestStandardParam() {
this.isSubmit = true
if (this.testStandardParams.length > 0) {
+ this.testStandardParams.map(m=>{
+ m.referenceValue = m.referenceValue.replace(',','锛�').replace('(','锛�').replace(')','锛�')
+ return m
+ })
addTestStandardParam(this.testStandardParams)
.then((response) => {
this.$message.success('妫�娴嬫爣鍑嗗弬鏁颁繚瀛樻垚鍔�')
--
Gitblit v1.9.3