| | |
| | | .el-drawer__header{ |
| | | color: #303133; |
| | | } |
| | | .center{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-wrap: wrap; |
| | | } |
| | | .tables{ |
| | | width: 800px; |
| | | } |
| | | .tables td{ |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | } |
| | | .content{ |
| | | display: flex; |
| | | width: 100%; |
| | | height: 100%; |
| | | align-items: center; |
| | | justify-content: left; |
| | | padding: 2px; |
| | | box-sizing: border-box; |
| | | } |
| | | .content-h-0{ |
| | | justify-content: center; |
| | | } |
| | | .content-h-1{ |
| | | justify-content: start; |
| | | } |
| | | .content-h-2{ |
| | | justify-content: end; |
| | | } |
| | | .content-v-0{ |
| | | align-items: center; |
| | | } |
| | | .content-v-1{ |
| | | align-items: start; |
| | | } |
| | | .content-v-2{ |
| | | align-items: end; |
| | | } |
| | | </style> |
| | | <template> |
| | | <div> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="center"> |
| | | <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index"> |
| | | <tbody> |
| | | <tr v-for="(m,i) in item.arr" :key="i"> |
| | | <td |
| | | v-for="(n,j) in m" |
| | | :key="j" |
| | | :colspan="n.v.mc&&n.v.mc.cs?n.v.mc.cs:1" |
| | | :rowspan="n.v.mc&&n.v.mc.rs?n.v.mc.rs:1" |
| | | :style="`background:${n.v.bg};font-family:${n.v.ff};color:${n.v.fc};font-size:${n.v.fs}px;width:${item.style.columnlen['0']}px;height:${item.style.rowlen[i]}px;font-wight:${n.v.bl?'bold':''};`"> |
| | | <div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`"> |
| | | <span>{{ n.v.v}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <el-drawer |
| | | title="样品切换" |
| | |
| | | typeList:[], |
| | | urgentList:[], |
| | | currentSample:{},//当前样品信息 |
| | | tableList:[], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }) |
| | | this.sampleProduct = res.data.sampleProduct |
| | | this.currentSample = this.sampleProduct[0] |
| | | this.handleTableData() |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | handleChangeSample(row, column, event){ |
| | | this.currentSample = row; |
| | | this.handleTableData() |
| | | this.sampleVisible = false; |
| | | }, |
| | | handleChangeTask(row){ |
| | |
| | | }, |
| | | tableRowClassName({ row, rowIndex }){ |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | handleTableData(){ |
| | | const mySet1 = new Set(); |
| | | this.tableList = JSON.parse(JSON.stringify(this.currentSample.insProduct)).filter(m=>{ |
| | | let num0 = mySet1.size; |
| | | mySet1.add(JSON.stringify({ |
| | | inspectionItem:m.inspectionItem, |
| | | templateId:m.templateId |
| | | })) |
| | | let num1 = mySet1.size; |
| | | if(num1>num0){ |
| | | return m |
| | | } |
| | | }) |
| | | this.tableList.map(item=>{ |
| | | const mySet0 = new Set(); |
| | | let arr = []; |
| | | let arrItem = []; |
| | | item.template.forEach((m,i)=>{ |
| | | let num0 = mySet0.size; |
| | | mySet0.add(m.r) |
| | | let num1 = mySet0.size; |
| | | if(num0<num1){ |
| | | if(arrItem.length>0){ |
| | | arr.push(arrItem) |
| | | arrItem = [] |
| | | } |
| | | if(m.v.mc){ |
| | | if(m.v.mc.rs||m.v.mc.cs){ |
| | | arrItem.push(m) |
| | | } |
| | | }else{ |
| | | arrItem.push(m) |
| | | } |
| | | }else{ |
| | | if(m.v.mc){ |
| | | if(m.v.mc.rs||m.v.mc.cs){ |
| | | arrItem.push(m) |
| | | } |
| | | }else{ |
| | | arrItem.push(m) |
| | | } |
| | | } |
| | | }) |
| | | arr.push(arrItem) |
| | | item.arr = arr; |
| | | return item |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">费用统计</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary">下单</el-button> |
| | | <el-button size="small" type="primary">OA推送</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">时间范围:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="componentData.entity.sample" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">样品名称:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable |
| | |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleWeave', |
| | | font: '在线编制', |
| | | type: 'text', |
| | | method: 'handleWeave', |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 |
| | | } |
| | | }, { |
| | | id: 'download', |
| | | font: '下载', |
| | | type: 'text', |
| | | method: 'download', |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 |
| | | } |
| | | }, { |
| | | id: 'handleUpload', |
| | | font: '上传', |
| | | type: 'text', |
| | | method: 'handleUpload', |
| | | disabFun: (row, index) => { |
| | | return row.state != 0 |
| | | } |
| | | }, { |
| | | id: 'handlRestore', |
| | | font: '还原', |
| | | type: 'text', |
| | | method: 'handleRestore' |
| | | }, { |
| | | id: 'handleIssued', |
| | | font: '审核', |
| | | type: 'text', |
| | | method: 'handleIssued', |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 || row.sendTime != null |
| | | } |
| | | }, { |
| | | id: 'handleApprove', |
| | | font: '批准', |
| | | type: 'text', |
| | | method: 'handleApprove', |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 || row.sendTime != null |
| | | } |
| | | }], |
| | | linkEvent:{ |
| | | entrustCode:{ |
| | | method:'selectAllByOne' |
| | | } |
| | | }, |
| | | do: [], |
| | | linkEvent:{}, |
| | | tagField: { |
| | | type: { |
| | | select: [{ |