| | |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'ask')" |
| | | v-if="active==1&&isAskOnlyRead"></el-input> |
| | | v-if="active==1&&isAskOnlyRead&&/[0-9]/.test(scope.row.ask)"></el-input> |
| | | <span v-else> |
| | | <!-- <template v-if="(scope.row.ask.indexOf('D')>-1 |
| | | ||scope.row.ask.indexOf('W')>-1 |
| | |
| | | if (this.tableData.length === 0 && this.page.current > 1) { |
| | | this.selectList('lastPage') |
| | | } |
| | | if (this.isColumnWidth) { |
| | | this.tableHead.forEach(item => { |
| | | if (item.value.length === 4) { |
| | | item.width = 120 |
| | | } else if (item.value.length === 3){ |
| | | item.width = item.label.includes('Hours') ? 50 : 100 |
| | | } else if (item.value.length === 5){ |
| | | item.width = 130 |
| | | } else if (item.value.length === 7){ |
| | | item.width = 160 |
| | | } else if (item.value.length === 6){ |
| | | item.width = 150 |
| | | } else if (item.value.length === 2){ |
| | | item.width = item.label.includes('Hours') ? 52 : 86 |
| | | } else { |
| | | item.width = item.label.includes('Hours') ? 46 : 86 |
| | | } |
| | | }) |
| | | } |
| | | // if (this.isColumnWidth) { |
| | | // this.tableHead.forEach(item => { |
| | | // if(!item.width){ |
| | | // if (item.value.length === 4) { |
| | | // item.width = 120 |
| | | // } else if (item.value.length === 3){ |
| | | // item.width = item.label.includes('Hours') ? 50 : 100 |
| | | // } else if (item.value.length === 5){ |
| | | // item.width = 130 |
| | | // } else if (item.value.length === 7){ |
| | | // item.width = 160 |
| | | // } else if (item.value.length === 6){ |
| | | // item.width = 150 |
| | | // } else if (item.value.length === 2){ |
| | | // item.width = item.label.includes('Hours') ? 52 : 86 |
| | | // } else { |
| | | // item.width = item.label.includes('Hours') ? 46 : 86 |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData)) |
| | | for (var a in this.data.selectField) { |
| | |
| | | <Add :active="activeFace" :currentId="currentId"/> |
| | | </div> |
| | | <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :state="state"/> |
| | | </div> |
| | | <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="80%"> |
| | | <div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible"> |
| | | <ValueTable ref="ValueTableDataLook" :url="$api.insOrder.selectSampleAndProductByOrderId" |
| | | :componentData="componentDataDataLook"/> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | getYearAndMonthAndDays |
| | | } from '../../util/date' |
| | | import Add from '../do/b1-ins-order/add.vue' |
| | | import { CellGroup } from 'iview' |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | |
| | | tabList: [], |
| | | active: 1, |
| | | tabIndex: 0, |
| | | componentDataDataLook: { |
| | | entity: { |
| | | id: 0, |
| | | orderBy: { |
| | | field: 'sampleCode', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: false, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [], |
| | | tagField: { |
| | | insState: { |
| | | select: [] |
| | | }, |
| | | insResult: { |
| | | select: [{ |
| | | value: 1, |
| | | label: '合格', |
| | | type: 'success' |
| | | },{ |
| | | value: 0, |
| | | label: '不合格', |
| | | type: 'danger' |
| | | }] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | spanConfig:{ |
| | | rows:[ |
| | | { |
| | | name:'sampleCode', |
| | | index:0 |
| | | }, |
| | | { |
| | | name:'sample', |
| | | index:1 |
| | | }, |
| | | { |
| | | name:'model', |
| | | index:5 |
| | | } |
| | | ] |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | dataDialogVisible: false, |
| | | componentData: { |
| | | entity: { |
| | | sonLaboratory: null, |
| | |
| | | init: false, |
| | | needSort: ['createTime', 'sendTime', 'type', 'appointed', 'insState'], |
| | | do: [{ |
| | | id: '', |
| | | font: '数据查看', |
| | | type: 'text', |
| | | method: 'handleDataLook', |
| | | disabFun: (row, index) => { |
| | | const user = JSON.parse(localStorage.getItem('user')) |
| | | let currentUserName = '' |
| | | if(user){ |
| | | currentUserName = user.name |
| | | } |
| | | return row.userName!=currentUserName || row.checkName!=currentUserName |
| | | } |
| | | },{ |
| | | id: '', |
| | | font: '检验', |
| | | type: 'text', |
| | |
| | | this.getPower() |
| | | }, |
| | | methods: { |
| | | // 数据查看 |
| | | handleDataLook(row) { |
| | | this.componentDataDataLook.entity.id = row.id |
| | | this.dataDialogVisible = true; |
| | | }, |
| | | // 权限分配 |
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |