<template>
	<view class="djTaskDetail">
		<uni-card>
			<!-- 代煎作业质控标题 -->
			<uni-section title="代煎作业质控" type="line" class="djTaskDetail_title">
				<template v-slot:right>
					<view class="right_title">不合格数<view class="right_text">1</view></view>
				</template>
			</uni-section>
			<!-- 代煎数 -->
			<view class="djNum">
				<view class="djNum_title">代煎7贴：<view class="djNum_text">1/10</view></view>
				<view class="djNum_title">代煎14贴：<view class="djNum_text">2/10</view></view>
			</view>
			<!-- 代煎表格 -->
			<view>
				<uni-table class="djDetail_table">
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center" width="155rpx">处方编号</uni-th>
						<uni-th align="center" width="150rpx">贴数(贴)</uni-th>
						<uni-th align="center" width="150rpx">检查项</uni-th>
						<uni-th align="center" width="155rpx">不合格项</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr v-for="(item, index) in pageData.djTaskList" :key="index">
						<uni-td align="center">{{item.cfbh}}</uni-td>
						<uni-td align="center">{{item.ts}}</uni-td>
						<uni-td align="center">{{item.jcx}}</uni-td>
						<uni-td align="center">{{item.bhgx}}
							<uni-icons type="right" @click="toDetail(item)"></uni-icons>
						</uni-td>
					</uni-tr>
				</uni-table>
			</view>
		</uni-card>
	</view>
</template>

<script setup>
import { reactive } from "vue";
import {onLoad,onShow,onUnload,onPullDownRefresh} from "@dcloudio/uni-app";
const pageData=reactive({
	djTaskList:[
		{
			cfbh:'111111',
			ts:'1',
			jcx:'1',
			bhgx:'1'
		},
		{
			cfbh:'222222',
			ts:'2',
			jcx:'2',
			bhgx:'2'
		}
	]
})

// 跳转详情界面
const toDetail=(e)=>{
	console.log(e)
	uni.navigateTo({
		url:"/pages/ypczk/zkTask/djTask?status=get"
	})
}

// 获取代煎质控任务详情
const getDjData=()=>{
	// http.get("getTaskDjDetailById")
}

onShow(()=>{
	getDjData()
})
</script>

<style lang="scss" scoped>
@import './index.scss'
</style>
