Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
| | |
| | | method: 'post', |
| | | params: obj |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export function downloadReport(data) { |
| | | return request({ |
| | | url: '/mes/qualityFinishedInspect/downloadReport', |
| | | method: 'post', |
| | | data: data, |
| | | responseType: 'blob', |
| | | }) |
| | | } |
| | |
| | | value="title" |
| | | disabled |
| | | > |
| | | <span v-for="(col, j) in columns" :key="col.prop">{{ col.label }}</span> |
| | | <span v-for="(col, j) in columns" :key="col.prop"><span>{{ col.label }}</span></span> |
| | | </el-option> |
| | | <el-option |
| | | class="lmes-select-body" |
| | |
| | | :label="formatter(item)" |
| | | :value="item[valueColumn]" |
| | | > |
| | | <span v-for="(col, j) in columns" :key="col.prop + i">{{ |
| | | col.formatter |
| | | ? col.formatter(item[col.prop]) |
| | | : item[col.prop] |
| | | ? item[col.prop] |
| | | : '--' |
| | | }}</span> |
| | | <span v-for="(col, j) in columns" :key="col.prop + i"> |
| | | <el-tooltip :content="col.formatter |
| | | ? col.formatter(item[col.prop]) |
| | | : item[col.prop] |
| | | ? item[col.prop] |
| | | : '--'"> |
| | | <span style="overflow: hidden;"> |
| | | {{ |
| | | col.formatter |
| | | ? col.formatter(item[col.prop]) |
| | | : item[col.prop] |
| | | ? item[col.prop] |
| | | : '--' |
| | | }} |
| | | </span> |
| | | </el-tooltip> |
| | | </span> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | text-align: center; |
| | | font-size: 13px; |
| | | line-height: 44px; |
| | | |
| | | } |
| | | |
| | | .lmes-select-head span, |
| | |
| | | padding: 0 10px !important; |
| | | } |
| | | |
| | | |
| | | |
| | | .lmes-select-head, |
| | | .lmes-select-body, |
| | | .lmes-select-nodata { |
| | |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | </el-col>changePart |
| | | <el-col |
| | | :span="10" |
| | | :offset="1" |
| | |
| | | selectLoading: false, |
| | | systemNo: null, |
| | | selectedProductSystemNo: null, |
| | | valueColumn: 'systemNo', |
| | | valueColumn: 'customerOrderId', |
| | | partColumn: [ |
| | | { |
| | | prop: 'batchNo', |
| | | label: '批次号' |
| | | prop: 'customerOrderNo', |
| | | label: '销售订单号' |
| | | }, |
| | | { |
| | | prop: 'systemNo', |
| | | label: '系统号' |
| | | prop: 'entityName', |
| | | label: '项目名称' |
| | | }, |
| | | { |
| | | prop: 'partNo', |
| | | label: '产品编号' |
| | | }, |
| | | { |
| | | prop: 'productName', |
| | | label: '产品名称' |
| | | }, |
| | | { |
| | | prop: 'partName', |
| | | label: '零件名称' |
| | | prop: 'specs', |
| | | label: '产品型号' |
| | | }, |
| | | { |
| | | prop: 'productType', |
| | | label: '产品类型' |
| | | } |
| | | ], |
| | | partList: [], |
| | |
| | | const part = this.partList.find((item) => ele.systemNo === item.systemNo) |
| | | if (part !== undefined) { |
| | | partLabel = |
| | | '系统号:' + |
| | | part.systemNo + |
| | | '销售订单号:' + |
| | | part.customerOrderNo + |
| | | ' ' + |
| | | '零件名称:' + |
| | | part.partName + |
| | | '产品名称:' + |
| | | part.productName + |
| | | ' ' + |
| | | '批次号:' + |
| | | part.batchNo |
| | | '产品编号:' + |
| | | part.partNo |
| | | } |
| | | return partLabel |
| | | }, |
| | |
| | | <div class="content-main"> |
| | | <div class="rawPage"> |
| | | <basic-container> |
| | | <ttable |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :prelang="prelang" |
| | |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import finishedProductInspectionAdd from './finishedProduct-form' |
| | | import { page,deletePro,exportExaminationProducts,queryById } from '@/api/quality/finishedProduct' |
| | | import { page,deletePro,exportExaminationProducts,queryById,downloadReport } from '@/api/quality/finishedProduct' |
| | | import { transform } from '@/util/fileTransform' |
| | | import { mapGetters } from 'vuex' |
| | | import printTemplate from './finishedProducter-print.vue' |
| | | import PrintJS from 'print-js' |
| | | import { transformZip } from '@/util/fileTransform' |
| | | export default { |
| | | components: { |
| | | finishedProductInspectionAdd, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | multipleSelection: [], |
| | | printFormData: null, |
| | | printDialogVisible: false, |
| | | result:[{label:'全部',value: ''},{label:'合格',value: '1'},{label:'不合格',value: '0'}], |
| | |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | created() { |
| | | if(this.permissions.quality_finishedProductInspection_download){ |
| | | this.table.toolbar.push({ |
| | | text: '下载检验报告', |
| | |
| | | }, |
| | | methods: { |
| | | downloadProReport(){ |
| | | let selection = this.multipleSelection |
| | | if(!selection || selection.length < 1){ |
| | | this.$message.error("请先选择检验数据") |
| | | return |
| | | }else{ |
| | | let arr = selection.filter(s=>{ |
| | | return s.result==null || s.result=='' |
| | | }) |
| | | if(arr.length > 0){ |
| | | this.$message.error("只能选择已检测的数据") |
| | | return |
| | | } |
| | | let ids = [] |
| | | selection.forEach(ele=>{ |
| | | ids.push(ele.id) |
| | | }) |
| | | downloadReport({ids : ids}).then(res=>{ |
| | | transformZip(res) |
| | | }).catch(error=>{ |
| | | console.log(error) |
| | | }) |
| | | } |
| | | }, |
| | | //打印按钮 |
| | | printFun() { |
| | |
| | | } |
| | | this.$router.push({ |
| | | name: 'finishedProductForm', |
| | | query: { |
| | | query: { |
| | | id: row == null ? null : row.id, |
| | | }, |
| | | params: { |
| | | resultVal: row == null ? null : row.result |
| | | resultVal: row == null ? null : row.result |
| | | } |
| | | }) |
| | | }, |
| | |
| | | formatDateTime(row, column, cellValue) { |
| | | return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd') : '' |
| | | }, |
| | | handleSelectionChange(){ }, |
| | | handleSelectionChange(val){ |
| | | this.multipleSelection = val |
| | | }, |
| | | getData() { |
| | | this.$refs.finishedProduct.getDataList() |
| | | }, |
| | |
| | | flex: 1; |
| | | overflow-y: scroll; |
| | | } */ |
| | | </style> |
| | | </style> |
| | |
| | | fun: this.Submitreview, |
| | | show: { |
| | | key: 'state', |
| | | val: ['0'] |
| | | val: [0] |
| | | } |
| | | }) |
| | | } |
| | |
| | | formatJudgeState(row, column, cellValue){ |
| | | if(cellValue != undefined && cellValue != null && cellValue != ''){ |
| | | if(cellValue == 0){ |
| | | console.log(cellValue); |
| | | return "<span style='color:#E84738;'>不合格</span>" |
| | | } |
| | | return "<span style='color:#34BD66;'>合格</span>" |
| | |
| | | for(var i=0;i<row.testValueList.length;i++){ |
| | | let val = row.testValueList[i] |
| | | let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/ |
| | | if(!reg.test(val) && !['是','否'].includes(val)){ |
| | | row.testValueList[i] = null |
| | | this.$message.error("请输入6位数字或选择是否") |
| | | isTrue = false |
| | | if(val.slice(-1)!='.'){ |
| | | if(!reg.test(val) && !['是','否'].includes(val)){ |
| | | row.testValueList[i] = null |
| | | this.$message.error("请输入6位数字或选择是否") |
| | | isTrue = false |
| | | } |
| | | } |
| | | } |
| | | if(!isTrue){ |