| | |
| | | padding: 15px; |
| | | background-color: white; |
| | | height: calc(100vh - 15vh); |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .order_num{ |
| | | border-radius: 1rem; |
| | | width: 35px; |
| | | height: 25px; |
| | | text-align: center; |
| | | margin-right: 8px; |
| | | } |
| | | </style> |
| | | <style> |
| | |
| | | |
| | | .plan .cell { |
| | | color: #333; |
| | | display: flex; |
| | | } |
| | | </style> |
| | | |
| | |
| | | <el-table-column type="index" width="50" label="序号"> |
| | | </el-table-column> |
| | | <el-table-column prop="date" label="申请单号"> |
| | | <template slot-scope="scope"> |
| | | <div style="display: flex;"> |
| | | <div v-if="scope.row.code=='01'" style="color: #3caaff;background-color: #eff5ff;" class="order_num">01</div> |
| | | <div v-else-if="scope.row.code=='02'" style="color: #57c981;background-color: #f1fbf4;" class="order_num">02</div> |
| | | <div v-else-if="scope.row.code=='03'" style="color: #dfa8fb;background-color: #faf2ff;" class="order_num">03</div> |
| | | <div>{{scope.row.date}}</div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="检验结果"> |
| | | </el-table-column> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="primary" v-if="isIfReport(scope.row)">上报</el-button> |
| | | <el-button size="mini" type="warning" @click="openUpDia(scope.row)" |
| | | v-else-if="scope.row.insId==undefined&&scope.row.address==null">分配</el-button> |
| | | v-else-if="scope.row.code=='03'&&scope.row.insId==undefined&&scope.row.address==null">分配</el-button> |
| | | <el-button size="mini" type="success" @click="openUpInsDia(scope.row)" |
| | | v-else-if="scope.row.insId==undefined&&scope.row.name==null">检验</el-button> |
| | | v-else-if="scope.row.code=='03'&&scope.row.insId==undefined&&scope.row.name==null">检验</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | id: 34, |
| | | date: '2016-05-01', |
| | | name: null, |
| | | res: '[{"number": 1,"res": "不合格"},{"number": 2}]', |
| | | res: '[{"number": 1,"res": "不合格"},{"number": 3,"res": "不合格"}]', |
| | | address: '上海市普陀区金沙江路 1519 弄', |
| | | children: [{ |
| | | id: 35, |
| | | date: 'hhh', |
| | | name: null, |
| | | res: '[{"number": 1},{"number": 2}]', |
| | | address: '上海市普陀区金沙江路 1519 弄' |
| | | }] |
| | | }] |
| | | }, { |
| | | id: 2, |
| | |
| | | methods: { |
| | | selectDataList() { |
| | | this.tableData.forEach(a => { |
| | | a.code = '[1]' |
| | | a.code = '01' |
| | | if (a.children != undefined) { |
| | | a.children.forEach(b => { |
| | | b.code = '[2]' |
| | | b.res = JSON.parse(b.res) |
| | | b.code = '02' |
| | | if (b.children != undefined) { |
| | | b.children.forEach(c => { |
| | | c.code = '03' |
| | | c.res = JSON.parse(c.res) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |