licp
2024-03-29 41cad2434411b2eac1b9814d47d06e34c291f285
完成首页等问题修改
已修改10个文件
已添加1个文件
256 ■■■■ 文件已修改
src/api/wel/index.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/wel.vue 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipment/equipment/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipment/metering/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipment/mould/index.vue 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manufacturingorder/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/rawMaterial-form.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/rawMaterial/rawMaterial-print.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/teststandard/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
    })
  }
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)
        })
    }
  }
}
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%;
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>
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>
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%;
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%;
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{
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
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>
</style>
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('检测标准参数保存成功')