<template>
	<gui-page :custom-header="true" :header-class="['gui-theme-background-color']">
		<template #gHeader>
			<view style="height:44px;" class="gui-flex gui-nowrap gui-rows gui-align-items-center">
				<!-- 使用组件实现返回按钮及返回首页按钮 -->
				<text style="font-size:44rpx;" class="gui-header-leader-btns gui-color-white font-icons"
					@tap="goBack">&#xe6c5;</text>
				<!-- 导航文本此处也可以是其他自定义内容 -->
				<text
					class="gui-h4 gui-blod gui-flex1 gui-text-center gui-ellipsis gui-color-white gui-primary-text">备料明细</text>
				<!-- 此处加一个右侧展位元素与左侧同宽，实现标题居中 -->
				<!-- 实际宽度请根据自己情况设置 -->
				<view style="width:40px;" />
				<!-- 如果右侧有其他内容可以利用条件编译和定位来实现-->
			</view>
		</template>
		<template #gBody>
			<view class="list-content">
				<view class="scan">
					<view class="scan-card">
						<uni-easyinput ref="easyinput" v-model="scanBatchNumber" :input-border="false"
							:clearable="false" type="text" focus @focus="handleInputFocus" placeholder="请扫描物料二维码"
							@confirm="confirmMaterial" />
						<text class="font-icons" @click="handleScanMaterial">&#xe6b7;</text>
					</view>
				</view>
				<view class="tabs">
					<div class="tabs-list">
						<text :class="!isBefore?'tabs-item-active':'tabs-item'" @click="handleCheckTabs(1)">备料需求</text>
						<text :class="isBefore?'tabs-item-active':'tabs-item'" @click="handleCheckTabs(0)">已备物料</text>
					</div>
				</view>
				<view v-if="!isBefore" class="custom-table flex-box">
					<div class="header-box">
						<uni-table border stripe empty-text="暂无更多数据">
							<!-- 表头行 -->
							<uni-tr class="custom-table-head">
								<uni-th align="center" width="180px">物料</uni-th>
								<uni-th align="center" width="80px">仓位</uni-th>
								<uni-th align="center" width="100px">需求数</uni-th>
								<uni-th align="center" width="100px">已备数</uni-th>
								<uni-th align="center" width="100px">已发数</uni-th>
							</uni-tr>
							<!-- 表格数据行 -->
							<uni-tr v-for="(item, key) in tableData" :key="key" @click="handleShowDetailsList(item)">
								<uni-td align="center">{{ item.materialNo }}({{ item.materialName }})</uni-td>
								<uni-td align="center">{{ item.location }}</uni-td>
								<uni-td align="center">{{ item.needQty }}</uni-td>
								<uni-td align="center"
									:style="['color: orange;', 'font-weight: bold;']">{{ item.preparedQty }}</uni-td>
								<uni-td align="center">{{ item.pickedQty }}</uni-td>
							</uni-tr>
						</uni-table>
					</div>
					<div class="footer-box">
						<uni-table border stripe empty-text="暂无更多数据">
							<!-- 表头行 -->
							<uni-tr class="custom-table-head">
								<uni-th align="center" width="180px">物料</uni-th>
								<uni-th align="center" width="80px">仓位</uni-th>
								<uni-th align="center" width="100px">需求数</uni-th>
								<uni-th align="center" width="100px">已备数</uni-th>
								<uni-th align="center" width="100px">已发数</uni-th>
							</uni-tr>
							<!-- 表格数据行 -->
							<uni-tr v-for="(item, key) in backFlushTableData" :key="key"
								@click="handleShowDetailsList(item)">
								<uni-td align="center">{{ item.materialNo }}({{ item.materialName }})</uni-td>
								<uni-td align="center">{{ item.location }}</uni-td>
								<uni-td align="center">{{ item.needQty }}</uni-td>
								<uni-td align="center"
									:style="['color: orange;', 'font-weight: bold;']">{{ item.preparedQty }}</uni-td>
								<uni-td align="center">{{ item.pickedQty }}</uni-td>
							</uni-tr>
						</uni-table>
					</div>
				</view>
				<view v-else class="custom-table">
					<uni-table border stripe empty-text="暂无更多数据">
						<!-- 表头行 -->
						<uni-tr class="custom-table-head">
							<uni-th align="center" width="180px">物料</uni-th>
							<uni-th align="center" width="80px">仓位</uni-th>
							<uni-th align="center" width="100px">需求数</uni-th>
							<uni-th align="center" width="100px">已备数</uni-th>
							<uni-th align="center" width="100px">已发数</uni-th>
						</uni-tr>
						<!-- 表格数据行 -->
						<uni-tr v-for="(item, key) in beforeTableData" :key="key" @click="handleShowDetailsList(item)">
							<uni-td align="center">{{ item.materialNo }}({{ item.materialName }})</uni-td>
							<uni-td align="center">{{ item.location }}</uni-td>
							<uni-td align="center">{{ item.needQty }}</uni-td>
							<uni-td align="center"
								style="color: orange;font-weight: bold;">{{ item.preparedQty }}</uni-td>
							<uni-td align="center">{{ item.pickedQty }}</uni-td>
						</uni-tr>
					</uni-table>
				</view>
				<view class="panel-row"
					style="margin: 12px 0;display: grid;grid-template-columns: 1fr;grid-template-rows: 1fr;">
					<!-- <button type="default" style="width: calc(100% - 8px);margin: 0 4px;">取消</button> -->
					<button type="primary" :disabled="disabled" style="width: calc(100% - 8px);margin: 0 4px;"
						@click="handleToNavigate">生成发料单</button>
				</view>
			</view>
			<uni-popup ref="popupMaterialList" background-color="#fff">
				<view class="popup-content">
					<view class="list-title" style="margin-bottom: 8px;">
						<span class="font-icons"
							style="font-size: 20px;color: #00a0e9;width: 40px;text-align: center;">&#xe6a3;</span>
						<span>请选择物料</span>
					</view>
					<view>
						<view class="grid-box">
							<view v-for="(item, key) in materialList" :key="key" class="box"
								@click="handleClickMaterials(item)">
								<text>{{ item.materialName }}</text>
								<text>{{ item.needQty }}</text>
								<text>{{ item.itemErpId }}</text>
							</view>
						</view>
					</view>
				</view>
			</uni-popup>
			<uni-popup ref="popup" background-color="#fff">
				<view class="popup-content">
					<view class="list-title" style="margin-bottom: 8px;">
						<span class="font-icons"
							style="font-size: 20px;color: #00a0e9;width: 40px;text-align: center;">&#xe6a3;</span>
						<span>已备明细</span>
					</view>
					<view class="list-panel">
						<view v-for="item in demandDetailsList" :key="item.id" class="panel">
							<uni-swipe-action>
								<!-- 基础用法 -->
								<uni-swipe-action-item :right-options="option" @click="handleRemoveRecord(item)">
									<view class="panel-row">
										<text>批号</text>
										<text>{{ item.batchNumber }}</text>
									</view>
									<view class="panel-row">
										<text>物料编码</text>
										<text>{{ item.materialNo }}</text>
									</view>
									<view class="panel-row">
										<text>物料名称</text>
										<text>{{ item.materialName }}</text>
									</view>
									<view class="panel-row">
										<text>物料数量</text>
										<text style="color: orange;font-weight: bold;">{{ item.receiptQty }}</text>
									</view>
									<view class="panel-row">
										<text>货位</text>
										<text>{{ item.wmsStoreName }}</text>
									</view>
								</uni-swipe-action-item>
							</uni-swipe-action>
						</view>
					</view>
				</view>
			</uni-popup>
			<gui-modal ref="modalForm" :custom-class="['gui-bg-white', 'gui-dark-bg-level-3', 'gui-border-radius']"
				title="提示">
				<template #content>
					<view class="gui-padding gui-bg-gray gui-dark-bg-level-2">
						<text class="gui-block gui-text-center gui-text gui-color-gray"
							style="line-height:100rpx; padding:10rpx;">备料超出，是否拆分？</text>
					</view>
				</template>

				<!-- 利用 flex 布局 可以放置多个自定义按钮哦  -->
				<template #btns>
					<view class="gui-flex gui-row gui-space-between operation-flex">
						<view hover-class="gui-tap" class="modal-btns gui-flex1" @tap="modalForm.close()">
							<text class="modal-btns gui-color-gray">取消</text>
						</view>
						<view class="line" />
						<view hover-class="gui-tap" class="modal-btns gui-flex1" @tap="handleSplitMaterial">
							<text class="modal-btns gui-primary-color">确认</text>
						</view>
					</view>
				</template>
			</gui-modal>
			<uni-popup ref="errorTip" type="dialog">
				<uni-popup-dialog type="error" cancel-text="关闭" confirm-text="确认" title="提示" :content="errorTipMessage"
					@confirm="handleCloseErrorTipsModal" @close="handleCloseErrorTipsModal" />
			</uni-popup>
		</template>
	</gui-page>
</template>

<script>
	import {
		onReachBottom
	} from '@dcloudio/uni-app'
	import {
		ref,
		onMounted,
		defineComponent,
		onBeforeMount
	} from 'vue'
	export default defineComponent({
		setup(options) {
			const popup = ref()
			const popupMaterialList = ref()
			const materialList = ref([])
			const modalForm = ref()
			const errorTip = ref()
			const errorState = ref(0)
			const easyinput = ref()
			// 错误弹窗提示信息
			const errorTipMessage = ref()
			const parentRow = uni.getStorageSync('workOrderId') ?? {}
			// 是否可生成发料单
			const disabled = ref(false)
			const isBefore = ref(false)
			const workId = ref('')
			const detailId = ref('')
			const scanMaterialObject = ref()
			const materialDetail = ref({})
			const scanBatchNumber = ref('')
			const tableData = ref([])
			// 倒冲发料列表
			const backFlushTableData = ref([])
			const beforeTableData = ref([])
			const demandDetailsList = ref([])

			onBeforeMount(() => {
				workId.value = JSON.parse(parentRow)?.id
			})

			const search = function() {
				uni.$reqGet('getPreparationMaterialList', {
						pageNo: 1,
						pageSize: 100,
						workOrderId: workId.value
					})
					.then(({
						code,
						data,
						msg
					}) => {
						if (code === 0) {
							uni.setStorageSync('ids', JSON.stringify(data?.list[0]))
							tableData.value.length = 0
							backFlushTableData.value.length = 0
							beforeTableData.value.length = 0
							data?.list?.forEach(item => {
								// 已备数 + 已发数 => 需求数
								if ((item.preparedQty + item.pickedQty) >= item.needQty) {
									beforeTableData.value.push(item)
								} else if (item?.sendType * 1 === 0) {
									tableData.value.push(item)
								} else {
									backFlushTableData.value.push(item)
								}
							})
						} else {
							disabled.value = true
							uni.showToast({
								title: msg,
								icon: 'none',
								duration: 2000
							})
						}
					})
			}

			onMounted(() => {
				search()
			})

			const goBack = function() {
				if (uni.getStorageSync('ids')) {
					uni.removeStorageSync('ids')
				}
				uni.$goBack('/pages/workbranch/warehouse/production/prepareMaterials')
			}

			const setInputFocus = function() {
				scanBatchNumber.value = ''
				easyinput.value.onBlur()
				easyinput.value.onFocus()
			}

			const handleScanMaterial = function() {
				// #ifdef APP-PLUS
				const mpaasScanModule = uni.requireNativePlugin('Mpaas-Scan-Module')
				mpaasScanModule.mpaasScan({
						// 扫码识别类型，参数可多选，qrCode、barCode，不设置，默认识别所有
						'scanType': ['qrCode', 'barCode'],
						// 是否隐藏相册，默认false不隐藏
						'hideAlbum': false
					},
					(ret) => {
						if (ret.resp_code === 1000) {
							uni.$reqGet('scanPrepareMaterial', {
									qrCode: ret.resp_result
								})
								.then(async ({
									code,
									data,
									msg
								}) => {
									if (code === 0) {
										scanBatchNumber.value = ret.resp_result
										scanMaterialObject.value = data
										if (Object.prototype.toString.call(data) ===
											'[object Array]') {
											materialList.value.length = 0
											tableData.value.forEach(item => {
												if (item?.materialNo === data[0]
													?.materialNo) {
													materialList.value.push(item)
												}
											})
											backFlushTableData.value.forEach(item => {
												if (item?.materialNo === data[0]
													?.materialNo) {
													materialList.value.push(item)
												}
											})
											if (materialList.value.length > 1) {
												if (popupMaterialList.value?.showPopup === false) {
													popupMaterialList.value.open('bottom')
												}
											} else if (materialList.value.length === -1) {
												// #ifdef APP-PLUS
												plus.device.beep(2)
												// #endif
												errorTipMessage.value = '请扫描所需物料的物料条码'
												errorTip.value.open()
												errorState.value = 0
											} else {
												uni.$reqPost('savePrepareMaterial', {
														id: materialList.value[0]?.id,
														split: 0,
														materials: data
													})
													.then(res => {
														if (res?.code === 0) {
															if (res?.data === 1) {
																detailId.value = materialList
																	.value[0]?.id
																materialDetail.value = data
																modalForm.value.open()
															} else {
																search()
															}
														} else {
															// #ifdef APP-PLUS
															plus.device.beep(2)
															// #endif
															errorTipMessage.value = res?.msg
															errorTip.value.open()
															errorState.value = 0
														}
													})
											}
										}
										await setInputFocus()
									} else {
										// #ifdef APP-PLUS
										plus.device.beep(2)
										// #endif
										errorTipMessage.value = msg
										errorTip.value.open()
										errorState.value = 0
									}
								})
						}
					})
				// #endif
			}

			// 物料二维码输入框回车事件
			const confirmMaterial = function(e) {
				uni.$reqGet('scanPrepareMaterial', {
						qrCode: e
					})
					.then(async ({
						code,
						data,
						msg
					}) => {
						if (code === 0) {
							scanBatchNumber.value = e
							scanMaterialObject.value = data
							if (Object.prototype.toString.call(data) ===
								'[object Array]') {
								materialList.value.length = 0
								tableData.value.forEach(item => {
									if (item?.materialNo === data[0]?.materialNo) {
										materialList.value.push(item)
									}
								})
								backFlushTableData.value.forEach(item => {
									if (item?.materialNo === data[0]?.materialNo) {
										materialList.value.push(item)
									}
								})
								if (materialList.value.length > 1) {
									if (popupMaterialList.value?.showPopup === false) {
										popupMaterialList.value.open('bottom')
									}
								} else if (materialList.value.length === -1) {
									// #ifdef APP-PLUS
									plus.device.beep(2)
									// #endif
									errorTipMessage.value = '请扫描所需物料的物料条码'
									errorTip.value.open()
									errorState.value = 0
								} else {
									uni.$reqPost('savePrepareMaterial', {
											id: materialList.value[0]?.id,
											split: 0,
											materials: data
										})
										.then(async (res) => {
											if (res?.code === 0) {
												if (res?.data === 1) {
													detailId.value = materialList.value[0]?.id
													materialDetail.value = data
													modalForm.value.open()
												} else {
													// 上料成功
													await search()
												}
											} else {
												// #ifdef APP-PLUS
												plus.device.beep(2)
												// #endif
												errorTipMessage.value = res?.msg
												errorTip.value.open()
												errorState.value = 0
											}
										})
								}
							}
							await setInputFocus()
						} else {
							// #ifdef APP-PLUS
							plus.device.beep(2)
							// #endif
							errorTipMessage.value = msg
							errorTip.value.open()
							errorState.value = 0
						}
					})
			}

			// 存在多个物料，选择单个物料触发事件
			const handleClickMaterials = function(ret) {
				popupMaterialList.value.close()
				uni.$reqPost('savePrepareMaterial', {
						id: ret?.id,
						split: 0,
						materials: scanMaterialObject.value
					})
					.then(async (res) => {
						if (res?.code === 0) {
							if (res?.data === 1) {
								detailId.value = ret?.id
								materialDetail.value = ret
								modalForm.value.open()
							} else {
								await search()
							}
						} else {
							// #ifdef APP-PLUS
							plus.device.beep(2)
							// #endif
							errorTipMessage.value = res?.msg
							errorTip.value.open()
							errorState.value = 0
						}
						await setInputFocus()
					})
			}

			// 物料拆分
			const handleSplitMaterial = function() {
				modalForm.value.close()
				search()
				uni.$reqPost('savePrepareMaterial', {
						id: detailId.value,
						split: 1,
						materials: materialDetail.value
					})
					.then(res => {
						if (res.code === 0) {
							// 调取打印机拆分物料后打印标签
							uni.showToast({
								title: '拆分完毕',
								icon: 'none',
								duration: 2000
							})
						} else {
							// #ifdef APP-PLUS
							plus.device.beep(2)
							// #endif
							errorTipMessage.value = res?.msg
							errorTip.value.open()
							errorState.value = 0
						}
					})
			}

			const handleShowDetailsList = function(row) {
				uni.$reqGet('getPrepareMaterialList', {
						wmsProductionWorkOrderBomDetailId: row?.id
					})
					.then(({
						code,
						data,
						msg
					}) => {
						if (code === 0) {
							if (popup.value?.showPopup === false) {
								popup.value.open('bottom')
							}
							demandDetailsList.value = data ?? []
						} else {
							// #ifdef APP-PLUS
							plus.device.beep(2)
							// #endif
							errorTipMessage.value = msg
							errorTip.value.open()
							errorState.value = 0
						}
					})
			}

			const handleToNavigate = function() {
				uni.navigateTo({
					url: '/pages/workbranch/warehouse/production/materialIssuance'
				})
			}

			const handleRemoveRecord = function(row) {
				uni.$reqDelete('deletePrepareMaterial', {
						id: row?.id
					})
					.then(({
						code,
						data,
						msg
					}) => {
						if (code === 0) {
							uni.showToast({
								title: '删除成功',
								icon: 'none',
								duration: 2000
							})
							popup.value.close()
							search()
						} else {
							// #ifdef APP-PLUS
							plus.device.beep(2)
							// #endif
							errorTipMessage.value = msg
							errorTip.value.open()
							errorState.value = 0
						}
					})
			}

			// tabs切换事件
			const handleCheckTabs = function(state) {
				if (!state) {
					this.isBefore = true
				} else {
					this.isBefore = false
				}
				setInputFocus()
			}

			// 关闭错误信息弹窗
			const handleCloseErrorTipsModal = async function() {
				errorTip.value.close()
				if (errorState.value === 0) {
					await setInputFocus()
				}
			}


			// 禁用软键盘
			const handleInputFocus = function() {
				setTimeout(() => {
					uni.hideKeyboard()
				}, 100)
			}
			return {
				option: [{
					text: '删除',
					style: {
						backgroundColor: '#dd524d'
					}
				}],
				goBack,
				popup,
				tableData,
				backFlushTableData,
				modalForm,
				easyinput,
				errorTip,
				disabled,
				isBefore,
				handleCheckTabs,
				errorTipMessage,
				materialList,
				beforeTableData,
				scanBatchNumber,
				demandDetailsList,
				handleScanMaterial,
				handleShowDetailsList,
				handleInputFocus,
				handleToNavigate,
				confirmMaterial,
				popupMaterialList,
				handleRemoveRecord,
				handleSplitMaterial,
				handleClickMaterials,
				handleCloseErrorTipsModal
			}
		}
	})
</script>

<style lang="scss" scoped>
	.gui-header-leader-btns {
		color: black;
		font-size: 24px !important;
		margin-left: 24rpx;
	}

	.list-content {
		margin-top: 80px;
		background-color: #edeeee;
	}

	.card-list-flexbox {
		display: flex;
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		margin: 3px 2px;

		.panel-row {
			width: 750rpx;
			height: 40px;
			margin: 2rpx 0;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
			background-color: #fff;

			uni-text {
				font-size: 14px;
				height: 50rpx;
				text-align: left;
				padding: 0 12px;
				display: flex;
				flex-direction: row;
				align-items: center;
			}

			.text-1 {
				flex: 1;
				height: 40px;
				justify-content: flex-start;
			}

			.text-2 {
				flex: 3;
				height: 40px;
				justify-content: flex-end;
				margin-right: 4px;
				padding: 2px 6px;
			}
		}

	}

	.card-list-flexbox:nth-of-type(2) {
		margin-top: 48px;
	}

	.fixedTop {
		bottom: 0 !important;
		top: 3.25rem !important;
	}

	.popup-content {
		height: 75vh;
		overflow-y: scroll;
		background-color: #edeeee;

		.grid-box {
			display: grid;
			grid-template-columns: 1fr 1fr;

			.box {
				height: 95px;
				padding: 8px 10px;
				border: 1px solid rgb(250, 250, 251);
				box-sizing: border-box;
				margin: 24px;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				font-size: 14px;
				font-weight: bold;
				border-radius: 6px;
				color: white;
				background-color: rgb(0, 160, 233);

				text:nth-of-type(2) {
					margin-top: 4px;
				}
			}
		}
	}

	.font-icons {
		width: 40px;
		font-size: 20px;
	}

	.scan {
		height: 45px;
		width: calc(100% - 48px);
		margin: 12px;
		padding: 0 12px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-radius: 6px;
		background-color: white;

		.scan-card {
			width: 100%;
			display: grid;
			grid-template-rows: 1fr;
			grid-template-columns: 7fr 2fr;
			align-items: center;

			input {
				height: 35px;
				line-height: 35px;
			}

			text {
				width: 100%;
				text-align: right;
			}
		}
	}

	.list-title {
		position: fixed;
		top: 0;
		left: 0;
		z-index: 99999;
		height: 40px;
		line-height: 40px;
		width: calc(100% - 16px);
		padding: 0 8px;
		display: flex;
		align-items: center;
		font-size: 16px;
		font-weight: bold;
		background-color: white;
		border-top-left-radius: 16px;
		border-top-right-radius: 16px;

		.block {
			width: 4px;
			height: 22px;
			margin-right: 4px;
			display: inline-block;
			background-color: skyblue;
			line-height: 40px;
		}
	}

	.custom-table {
		height: calc(100vh - 265px);
		min-height: 230px;
		// min-height: 600px;
		overflow-y: hidden;
	}

	.flex-box {
		display: flex;
		flex-direction: column;

		.header-box {
			height: 64%;
			overflow-y: scroll;
		}

		.footer-box {
			height: 36%;
			overflow-y: scroll;
		}
	}

	.modal-btns {
		height: 100rpx;
		line-height: 100rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.tabs {
		width: 100%;
		height: 45px;
		display: flex;
		align-items: flex-end;
		padding: 0 2px;
		background-color: white;

		.tabs-list {
			border-radius: 3px;
			overflow: hidden;
		}

		.tabs-item {
			display: inline-block;
			width: 72px;
			height: 30px;
			line-height: 30px;
			padding: 0 8px;
			font-size: 14px;
			font-weight: bold;
			text-align: center;
			color: black;
			border-bottom: 1.5px dashed #00a0e9;
			transition: all .5s ease-in-out;
		}

		.tabs-item-active {
			position: relative;
			display: inline-block;
			width: 72px;
			height: 30px;
			line-height: 30px;
			padding: 0 8px;
			font-size: 14px;
			font-weight: bold;
			text-align: center;
			color: white;
			border-left: 1px solid #00a0e9;
			border-top: 1px solid #00a0e9;
			border-right: 1px solid #00a0e9;
			border-bottom: 1.5px solid #00a0e9;
			border-radius: 5px 5px 0 0;
			animation: .3s linear show;
			background-color: #00a0e9;
		}

		.tabs-item-active::before {
			content: '';
			position: absolute;
			left: -10px;
			bottom: 0;
			width: 10px;
			height: 10px;
			background: radial-gradient(circle at 0% 25%, transparent 10px, #00a0e9 0)
		}

		.tabs-item-active::after {
			content: '';
			position: absolute;
			right: -10px;
			bottom: 0;
			width: 10px;
			height: 10px;
			background: radial-gradient(circle at 100% 25%, transparent 10px, #00a0e9 0)
		}
	}

	@keyframes show {
		from {
			transform: translateY(5%);
		}

		to {
			transform: translateY(0%);
		}
	}

	.list-panel {
		// height: calc(100vh - 225px);
		// min-height: 230px;
		padding: 5px 8px;
		margin-top: 50px;
		overflow-y: scroll;

		.panel {
			margin-bottom: 6px;
			border-radius: 4px;
			background-color: white;

			.panel-row {
				height: 32px;
				line-height: 32px;
				padding: 0 12px;
				display: flex;
				justify-content: space-between;
				background-color: #fbfbfb;
			}

			.panel-row:nth-of-type(1) {
				color: rgba(0, 160, 233, 1);
				font-weight: bold;
				border-top-left-radius: 4px;
				border-top-right-radius: 4px;
				border-bottom: 2px solid rgba(237, 238, 238, 1);
				background-color: white;
			}
		}
	}
</style>