<!-- 开发时报表预览 -->
<template>
	<div>
		<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList()">
			<el-form-item v-for="(col, index) in dataForm.reportSearchData">
				<el-input
					v-if="col.searchMode == 10 && !col.dictCode && col.searchHidden!=1"
					v-model="state.queryForm[col.columnJavaName]"
					clearable
					:placeholder="col.columnLabel"
				/>
				<fast-select
					v-if="col.searchMode == 10 && col.dictCode && col.searchHidden!=1"
					v-model="state.queryForm[col.columnJavaName]"
					:dict-type="col.dictCode"
					clearable
					:placeholder="col.columnLabel"
				></fast-select>

				<fast-select
					v-if="col.searchMode == 30 && col.dictCode && col.searchHidden!=1"
					v-model="state.queryForm[col.columnJavaName]"
					:dict-type="col.dictCode"
					clearable
					:multiple="true"
					:placeholder="col.columnLabel"
				></fast-select>
				<el-date-picker
					v-if="col.searchMode == 20 && col.searchHidden!=1"
					v-model="state.queryForm[col.columnJavaName]"
					type="daterange"
					:title="col.columnLabel"
					range-separator="至"
					:start-placeholder="col.columnLabel + '开始'"
					:end-placeholder="col.columnLabel + '结束'"
					format="YYYY-MM-DD"
					value-format="YYYY-MM-DD"
				>
				</el-date-picker>
			</el-form-item>
			<el-form-item>
				<el-button @click="getDataList()">查询</el-button>
			</el-form-item>
			<el-form-item v-for="item in dataForm.fastFormBtnList">
				<el-button v-if="getRowShow(item, {})" v-auth="getBtnAuth(item)" type="primary" @click="showBtnForm(item, null, null)">{{ item.btnLabel }}</el-button>
			</el-form-item>
			<el-form-item v-if="dataForm.btnGroupName != ''">
				<el-dropdown>
					<el-button type="primary">
						{{ dataForm.btnGroupName }}<el-icon class="el-icon--right"><arrow-down /></el-icon>
					</el-button>
					<template #dropdown>
						<el-dropdown-menu v-for="item in dataForm.fastManyBtnModelList">
							<el-dropdown-item v-if="getRowShow(item, {})" v-auth="getBtnAuth(item)" @click="showBtnForm(item, null, null)">{{ item.btnLabel }}</el-dropdown-item>
						</el-dropdown-menu>
					</template>
				</el-dropdown>
			</el-form-item>
		</el-form>
		<el-table
			class="flex-content-1"
			ref="reportTableRef"
			v-loading="state.dataListLoading"
			show-overflow-tooltip
			:data="state.dataList"
			border
			stripe
			style="width: 100%"
			row-key="id"
			height="100%"
			@selection-change="selectionChangeHandle"
		>
			<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
			<el-table-column
				v-for="col in dataForm.reportColumnData"
				:key="col.columnJavaName"
				:label="col.columnLabel"
				:width="col.columnWidth ? col.columnWidth : 120"
				:prop="col.columnJavaName"
				:sortable="col.isOrder == 1"
			>
				<template v-if="col.dictCode" #default="scope">
					<span v-html="getDictLabelList(col.dictCode, scope.row[col.columnJavaName])"></span>
				</template>
			</el-table-column>

			<el-table-column v-if="dataForm.isShowRowCz" fixed="right" label="操作" width="230">
				<template #default="scope">
					<template v-for="(item, index) in dataForm.fastFormBtnRowList">
						<el-button v-if="getRowShow(item, scope.row)" v-auth="getBtnAuth(item)" type="text" @click="showBtnForm(item, scope.row, scope.$index)">{{
							item.btnLabel
						}}</el-button>
					</template>
					<el-dropdown v-if="dataForm.btnRowGroupName != '' && !scope.row.btnRowGroupNameShow" class="tableRowDropdown">
						<span class="el-dropdown-link">
							{{ dataForm.btnRowGroupName }}
							<el-icon class="el-icon--right">
								<arrow-down />
							</el-icon>
						</span>
						<template #dropdown>
							<el-dropdown-menu v-for="item in dataForm.fastRowManyBtnModelList">
								<el-dropdown-item v-if="getRowShowGroupName(item, scope.row)" v-auth="getBtnAuth(item)" type="text" @click="showBtnForm(item, scope.row, scope.$index)">{{
									item.btnLabel
								}}</el-dropdown-item>
							</el-dropdown-menu>
						</template>
					</el-dropdown>
				</template>
			</el-table-column>
		</el-table>
		<el-pagination
				:current-page="state.page"
				:page-sizes="state.pageSizes"
				:page-size="state.limit"
				:total="state.total"
				layout="total, sizes, prev, pager, next, jumper"
				@size-change="sizeChangeHandle"
				@current-change="currentChangeHandle"
			>
		</el-pagination>
		<form-dev-review-drawer ref="formDrawerRef" @refresh-data-list="getDataList"></form-dev-review-drawer>

		<form-dev-review-dialog ref="formDialogRef" @refresh-data-list="getDataList"></form-dev-review-dialog>
		<base-upload ref="baseUploadDialogRef" @refresh-data-list="getDataList"></base-upload>
    <report-dev-review-dialog ref="reportDialogRef" @close="closeReportDialog" @confirmAddRow="reportDialogAddData"></report-dev-review-dialog>
	</div>
</template>

<script setup lang="ts" name="EboFastReportReportDevReview3833531d8e66cc5c01fac07d3a1a6e55">
import { ArrowDown } from '@element-plus/icons-vue'
import { onMounted, reactive, ref, watchEffect } from 'vue'
import { useCrud } from '@/hooks'
import { useRouter,useRoute } from 'vue-router'
import { IHooksOptions } from '@/hooks/interface'
import { getReportConfig } from '@/views/ebo/fast/api/report'
import { getDictLabelList } from '@/utils/tool'
import FormDevReviewDrawer from '@/views/ebo/fast/form/formDevReviewDrawer.vue'

import FormDevReviewDialog from '@/views/ebo/fast/form/formDevReviewDialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { btnServerUrl, defaultBtnServer, delInfo } from '@/views/ebo/fast/api/formDevReview'
import { useTabsStore } from '@/store/modules/tabs'
import baseUpload from '@/views/ebo/fast/report/baseUpload.vue'
import ReportDevReviewDialog from "@/views/ebo/fast/report/reportDevReviewDialog.vue";

import { useUserStore } from '@/store/modules/user'
const useUser = useUserStore()
const router = useRouter()
const route = useRoute()
const reportTableRef = ref()
const tabsStore = useTabsStore()
const baseUploadDialogRef = ref()

let reportId = router.currentRoute.value.params.reportId
if (!reportId) {
	reportId = router.currentRoute.value.meta.reportId
}

const getBtnAuth = (item:any)=>{
  return item.btnCode;
}

const formDrawerRef = ref()
const formDialogRef = ref()
const reportDialogRef = ref()
const printStock = ref()
const isPrintConnect = ref(0)
const dataForm = reactive({
	showDrawer: false,
	showDrawerData: {},
	showDialog: false,
	showDialogData: {},
	isTree: 0,
	showEdit: false,
	formShowFlag: false,
	showResetPassword: false,
	loading: false,
	editId: null,
	pagination: {
		total: 0,
		size: 20,
		current: 1
	},
	reportCode: '',
	condition: {
		whereMap: {}
	},

	condition2: {},
	tableData: [],
	reportColumnData: [],
	reportSearchData: [],
	reportSearchData2: [],
	fastFormBtnModelList: [],
	fastManyBtnModelList: [],
	fastRowManyBtnModelList: [],
	fastFormBtnList: [],
	fastFormBtnRowList: [],
	btnGroupName: '',
	btnRowGroupName: '',
	isShowRowCz: false
})

onMounted(async () => {
	await getReport(reportId);
	// 打开弹窗
	if(route.query.id) {
		const row = dataForm.fastFormBtnRowList.find((i:any) => i.btnLabel === '详情');
		console.log('==================',row)
		if(row) {
			showBtnForm(row,{
				id: route.query.id
			},null)
		}
	}
})

const state: IHooksOptions = reactive({
	dataListUrl: '/fast/report/getReportPage',
	deleteUrl: '/fast/report',
	createdIsNeed: false,
	queryMethod: 'post',
	limit: 20,
	queryForm: {
		fastReportCode: ''
	}
})

/**
 *
 * @param btnData
 * @param row
 */
const getRowShowGroupName = (btnData: any, row: any) => {
	var rowbl = getRowShow(btnData, row)
	//如果按钮不显示
	if (rowbl == false) {
		//计算行中的更多操作是否需要显示
		var c = 0
		for (var i = 0; i < dataForm.fastRowManyBtnModelList.length; i++) {
			if (row['btn_' + btnData.btnCode] == false) {
				c++
			}
		}
		//更多操作所有按钮都不显示
		if (c == dataForm.fastRowManyBtnModelList.length) {
			//设置更多操作也不显示
			row.btnRowGroupNameShow = true
		}
	}
	return rowbl
}
/**
 *
 * @param btnData
 * @param row
 */
const getRowShow = (btnData: any, row: any) => {
	var bl = true
	if (btnData.btnShowEnhance && btnData.btnShowEnhance != '') {
		var enhance = decodeURIComponent(btnData.btnShowEnhance)
		console.log(row)

		eval(enhance)
		console.log(bl)
	}
	row['btn_' + btnData.btnCode] = bl
	return bl
}

const closeReportDialog = (isSearch: any) => {

}
const reportDialogAddData = (selectedData: any) => {

}

const showBtnForm = (btnData: any, rowData: any, rowIndex: any) => {
	//导出
	if (btnData.serviceType == 40) {
		state.queryForm.btnCode = btnData.btnCode
		downloadHandle('/fast/report/getReportExport', state.queryForm, 'POST')
		return
	} else if (btnData.serviceType == 50) {
		//导入
		baseUploadDialogRef.value.init(btnData)
		return
	}
	if (btnData.serviceType != 55) {
		var rows = []
		if (rowData != null) {
			rows.push(rowData)
		} else {
			rows = reportTableRef.value.getSelectionRows()
		}
		var vv = btnClickBeforeEnhance(btnData, rows,{})
		if (!vv) {
			return
		}
	}
	var id = ''
	if (rowData && rowData.id) {
		id = rowData.id
	}
	if (btnData.serviceType == 30 && id != '') {
		ElMessageBox.confirm('请确定要执行此操作吗？', '提示', {
			confirmButtonText: '确定',
			cancelButtonText: '取消',
			type: 'warning'
		}).then(() => {
			var obj = { devFormCode: btnData.btnLinkForm, btnCode: btnData.btnCode, btnFormData: { id: id } }
			delInfo(obj).then(res => {
				ElMessage.success('删除成功')

				//请求后增强
				btnClickAfterEnhance(btnData, res, obj, [])
				getDataList()
			})
		})
	} else if ((btnData.serviceType == 10 || btnData.serviceType == 20 || btnData.serviceType == 25) && btnData.btnLinkType == 10) {

    //跳表单
		//弹框方式
		if (btnData.btnLinkFormShow == 10) {
			//抽屉方式打开
			dataForm.showDrawer = true

			if (rowData && rowData.id) {
				rowData.devFormCode = btnData.btnLinkForm
				dataForm.showDialogData = rowData
			} else {
				dataForm.showDialogData = { devFormCode: btnData.btnLinkForm, id: '' }
			}
			let isLook = 0
			if (btnData.serviceType == 25) {
				isLook = 1
			}

			dataForm.showDialogData.reportToFormData = { listIds: state.dataListSelections }
      //自定义后台
      var v = btnClickBeforeEnhance(btnData, reportTableRef.value.getSelectionRows(),	dataForm.showDialogData.reportToFormData )
      if (!v) {
        return
      }
			formDialogRef.value.init(btnData.btnLinkForm, dataForm.showDialogData, isLook, btnData.btnCode, btnData)
		} else if (btnData.btnLinkFormShow == 20) {
			//抽屉方式打开
			dataForm.showDrawer = true

			if (rowData && rowData.id) {
				rowData.devFormCode = btnData.btnLinkForm
				dataForm.showDrawerData = rowData
			} else {
				dataForm.showDrawerData = { devFormCode: btnData.btnLinkForm, id: '' }
			}
			let isLook = 0
			if (btnData.serviceType == 25) {
				isLook = 1
			}
			dataForm.showDrawerData.reportToFormData = { listIds: state.dataListSelections }

      //自定义后台
      var v = btnClickBeforeEnhance(btnData, reportTableRef.value.getSelectionRows(),dataForm.showDrawerData.reportToFormData)
      if (!v) {
        return
      }
			formDrawerRef.value.init(btnData.btnLinkForm, dataForm.showDrawerData, isLook, btnData.btnCode, btnData)
		} else {
			router.push({ path: '/ebo/fast/form/formDevReview/' + btnData.btnLinkForm + '/' + id })
		}
	}else if ((btnData.serviceType == 10 || btnData.serviceType == 20 || btnData.serviceType == 25) && btnData.btnLinkType == 30) {
    //跳表单
    //弹框方式
    if (btnData.btnLinkFormShow == 10) {

    } else if (btnData.btnLinkFormShow == 20) {
      //弹框方式打开
      dataForm.showDrawer = true

      if (rowData && rowData.id) {
        rowData.devFormCode = btnData.btnLinkForm
      }
      let isLook = 0
      if (btnData.serviceType == 25) {
        isLook = 1
      }

      dataForm.showDialogData.reportToFormData = { listIds: state.dataListSelections }
      var rows = []
      if (rowData != null) {
        rows.push(rowData)
      } else {
        rows = reportTableRef.value.getSelectionRows()
      }
      var clickForm = {}
      //自定义后台
      var v = btnClickBeforeEnhance(btnData, rows,clickForm)
      if (!v) {
        return
      }
      var toData = ref(clickForm)
      reportDialogRef.value.initCode(btnData.btnLinkForm, toData.value, isLook, btnData.btnCode, btnData)
    }
  } else if (btnData.serviceType == 55) {
    var btnFormData = {}
		var v = btnClickBeforeEnhance(btnData, reportTableRef.value.getSelectionRows(),btnFormData)
		if (!v) {
			return
		}
		//无逻辑请求
		var confirmContent = '请确定要执行此操作吗？'
		if (btnData.btnConfirmContent && btnData.btnConfirmContent != '') {
			confirmContent = btnData.btnConfirmContent
		}
		ElMessageBox.confirm(confirmContent, '提示', {
			confirmButtonText: '确定',
			cancelButtonText: '取消',
			type: 'warning'
		}).then(() => {
			var obj = { devFormCode: btnData.btnLinkForm, btnCode: btnData.btnCode, btnFormData:btnFormData }
			if (btnData.btnShowType == '20') {
				obj.btnFormData.ids = state.dataListSelections
			} else {
				obj.btnFormData.id = id
			}
			defaultBtnServer(obj).then(res => {
				//请求后增强
				btnClickAfterEnhance(btnData, res, obj, reportTableRef.value.getSelectionRows())
				ElMessage.success('操作成功')
				getDataList()
			})
		})
	} else if (btnData.serviceType == 60) {

    var btnFormData = {}
		//自定义后台
		var v = btnClickBeforeEnhance(btnData, reportTableRef.value.getSelectionRows(),btnFormData)
		if (!v) {
			return
		}
		//无逻辑请求
		var confirmContent = '请确定要执行此操作吗？'
		if (btnData.btnConfirmContent && btnData.btnConfirmContent != '') {
			confirmContent = btnData.btnConfirmContent
		}
		ElMessageBox.confirm(confirmContent, '提示', {
			confirmButtonText: '确定',
			cancelButtonText: '取消',
			type: 'warning'
		}).then(() => {
			var obj = { devFormCode: btnData.btnLinkForm, btnCode: btnData.btnCode, btnFormData: btnFormData }
			if (btnData.btnShowType == '20') {
				obj.btnFormData.ids = state.dataListSelections
			} else {
				obj.btnFormData.id = id
			}
			btnServerUrl(btnData.btnServerUrl, obj).then(res => {
				if (btnData.btnLinkType == 10 && btnData.btnLinkForm && btnData.btnLinkForm != '') {
					//弹框方式
					if (btnData.btnLinkFormShow == 10) {
						//抽屉方式打开
						dataForm.showDrawer = true

						if (rowData && rowData.id) {
							rowData.devFormCode = btnData.btnLinkForm
							dataForm.showDialogData = rowData
						} else {
							dataForm.showDialogData = { devFormCode: btnData.btnLinkForm, id: '' }
						}
						let isLook = 0
						if (btnData.serviceType == 25) {
							isLook = 1
						}
						var cobj = { listIds: state.dataListSelections }
						Object.assign(cobj, res.data)
						dataForm.showDialogData.reportToFormData = cobj
						formDialogRef.value.init(btnData.btnLinkForm, dataForm.showDialogData, isLook, btnData.btnCode, btnData)
					} else if (btnData.btnLinkFormShow == 20) {
						//抽屉方式打开
						dataForm.showDrawer = true

						if (rowData && rowData.id) {
							rowData.devFormCode = btnData.btnLinkForm
							dataForm.showDrawerData = rowData
						} else {
							dataForm.showDrawerData = { devFormCode: btnData.btnLinkForm, id: '' }
						}
						let isLook = 0
						if (btnData.serviceType == 25) {
							isLook = 1
						}

						var cobj = { listIds: state.dataListSelections }
						Object.assign(cobj, res.data)
						dataForm.showDrawerData.reportToFormData = cobj
						formDrawerRef.value.init(btnData.btnLinkForm, dataForm.showDrawerData, isLook, btnData.btnCode, btnData)
					}
				} else {
					ElMessage.success('操作成功')
					//请求后增强
					btnClickAfterEnhance(btnData, res, obj, reportTableRef.value.getSelectionRows())
					getDataList()
				}
			})
		})
	}
}

/**
 * 按钮请求后增强
 * @param btnData
 * @param res
 */
const btnClickAfterEnhance = (btnData: any, res: any, reqData: any, rows: any) => {
	if (btnData.btnClickAfterEnhance && btnData.btnClickAfterEnhance != '') {
		console.log(res)
		console.log(reqData)
		console.log(rows)
		var enhance = decodeURIComponent(btnData.btnClickAfterEnhance)
		eval(enhance)
	}
}
/**
 * 按钮点击前增强
 * @param btnData
 * @param rows
 * @param clickForm
 */
const btnClickBeforeEnhance = (btnData: any, rows: any, clickForm: any) => {
	var bl = true
	if (btnData.btnClickBeforeEnhance && btnData.btnClickBeforeEnhance != '') {
    var EboUserInfo = useUser.user;
		var printIsConnect = isPrintConnect.value
		console.log(printIsConnect)
		var enhance = decodeURIComponent(btnData.btnClickBeforeEnhance)
		eval(enhance)
    console.log(EboUserInfo)
		console.log(rows)
		console.log(bl)
    console.log(clickForm)
	}
	return bl
}

const getReport = async (id: string) => {
	var data = { id: id }
	const reponse = await getReportConfig(data);
	document.title = reponse.data.reportName
	dataForm.isTree = reponse.data.isTree
	if (dataForm.isTree == 1) {
		state.limit = 10000
	}
	state.queryForm.fastReportCode = reponse.data.reportCode
	var data = reponse.data.fastReportItemList
	if (reponse.data.fastFormBtnModelList) {
		dataForm.fastFormBtnModelList = reponse.data.fastFormBtnModelList
		var isNeedPrintConnect = 0 //是否需要连接打印机
		dataForm.fastFormBtnModelList.forEach(item => {
			if (item.btnLabel.indexOf('打印') >= 0) {
				isNeedPrintConnect = 1
			}
			if (item.btnShowType == 10) {
				dataForm.isShowRowCz = true
				if (item.btnGroupName && item.btnGroupName != '') {
					dataForm.fastRowManyBtnModelList.push(item)
					dataForm.btnRowGroupName = item.btnGroupName
				} else {
					dataForm.fastFormBtnRowList.push(item)
				}
			} else {
				if (item.btnGroupName && item.btnGroupName != '') {
					dataForm.fastManyBtnModelList.push(item)
					dataForm.btnGroupName = item.btnGroupName
				} else {
					dataForm.fastFormBtnList.push(item)
				}
			}
		})
		if (isNeedPrintConnect == 1) {
			doConnect()
		}
	}
	for (var i = 0; i < data.length; i++) {
		if (data[i].isShow == 1) {
			dataForm.reportColumnData.push(data[i])
		}
		if (data[i].isSearch == 1) {
			dataForm.reportSearchData.push(data[i])
			if (data[i].searchDefaultValue && data[i].searchDefaultValue != '') {
				state.queryForm[data[i].columnJavaName] = data[i].searchDefaultValue
			}
			dataForm.reportSearchData2.push(data[i].columnJavaName)
		}
	}
	var data2 = reponse.data.fastReportSeachList
	for (var i = 0; i < data2.length; i++) {
		if (data2[i].isSearch == 1) {
			dataForm.reportSearchData.push(data2[i])
			if (data2[i].searchDefaultValue && data2[i].searchDefaultValue != '') {
				state.queryForm[data2[i].columnJavaName] = data2[i].searchDefaultValue
			}
			dataForm.reportSearchData2.push(data2[i].columnJavaName)
		}
	}
	if (reponse.data.isUrl == '1') {
		state.dataListUrl = reponse.data.reportUrl
	}

	getDataList()
}

const { getDataList, selectionChangeHandle, sizeChangeHandle, currentChangeHandle, deleteBatchHandle, downloadHandle } = useCrud(state)

const startPrintData = (contents: any, isprint: any) => {
	if (contents == null) {
		return
	}
	var documents = []
	var o = {
		documentID: getUUID(8, 10),
		contents: contents
	}
	documents.push(o)
	doPrint(documents, isprint)
}
startPrintData(null, null)

const doConnect = () => {
	printStock.value = new WebSocket('ws://localhost:13528')
	// 打开Socket
	printStock.value.onopen = function (event: any) {
		console.log('打印机准备就绪')
		isPrintConnect.value = 1
		var request = getRequestObject('getPrinters')
		printStock.value.send(JSON.stringify(request))
	}
	// 监听消息
	printStock.value.onmessage = function (event: any) {
		var response = JSON.parse(event.data)
		if (response.cmd == 'print') {
			console.log('Client received a message', JSON.stringify(response))
			if (response.previewURL && response.previewURL != '') {
				window.open(response.previewURL)
			}
		}
	}
	printStock.value.onerror = function (event: any) {
		console.log('Client notified socket has onerror', event)
		isPrintConnect.value = 0
		//window.open('https://page.cainiao.com/waybill/cloud_printing/home.html')
	}
	// 监听Socket的关闭
	printStock.value.onclose = function (event: any) {
		isPrintConnect.value = 0
		console.log('Client notified socket has closed', event)
	}
}
/***
 *
 * 获取请求的UUID，指定长度和进制,如
 * getUUID(8, 2)   //"01001010" 8 character (base=2)
 * getUUID(8, 10) // "47473046" 8 character ID (base=10)
 * getUUID(8, 16) // "098F4D35"。 8 character ID (base=16)
 *
 */
const getUUID = (len: any, radix: any) => {
	var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
	var uuid = [],
		i
	radix = radix || chars.length
	if (len) {
		for (i = 0; i < len; i++) {
			uuid[i] = chars[0 | (Math.random() * radix)]
		}
	} else {
		var r
		uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'
		uuid[14] = '4'
		for (i = 0; i < 36; i++) {
			if (!uuid[i]) {
				r = 0 | (Math.random() * 16)
				uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]
			}
		}
	}
	return uuid.join('')
}

/***
 * 构造request对象
 */
const getRequestObject = (cmd: any) => {
	var request = new Object()
	request.requestID = getUUID(8, 16)
	request.version = '1.0'
	request.cmd = cmd
	return request
}

/**
 * 打印电子面单
 * printer 指定要使用那台打印机
 * waybillArray 要打印的电子面单的数组
 */
const doPrint = (documents: any, isprint: any) => {
	var request = getRequestObject('print')
	request.task = new Object()
	request.task.taskID = getUUID(8, 10)
	if (isprint == 1) {
		request.task.preview = false
	} else {
		request.task.preview = true
	}
	request.task.previewType = 'pdf'
	request.task.printer = ''
	request.task.documents = documents
	request.task.notifyMode = 'allInOne'
	console.log('打印内容：' + JSON.stringify(request))
	/***
	request = {
		cmd: 'print',
		requestID: '123458976',
		version: '1.0',
		task: {
			taskID: '7293667',
			preview: true,
			printer: '',
			notifyMode: 'allInOne',
			previewType: 'pdf',
			documents: [
				{
					documentID: '0123456789',
					contents: [
						{
							encryptedData:
								'AES:rU904rj6UH2oqfSUb43+Z+XlOkZaULeerkScS5xbmfjZC78uvsMTa3g6l33hRAz/srsk0TObjJaJI5n4tAPV1uv7szIPQGPDhwD6MK+zvTVIfuQCMC8p+cUB5S4FmqDhNE45LRVAlaoaI5YK8QmWK1WorhwnPxOFH4Ws/ApobtzDLDJaW6uu1AMEdAejEhRTWL3B1fRhhcDxc3gX+DZF9jJUB++fb9JZqmocWRu0Fvi/b1BokQx7Xt/N+FpJVRI0//NNUQ9b/W4tqGFIbf2IM/Ez1S5hBru5gKGdFzs99ZgCKqtWa0DnOzrZDXroU1mhurtlulE8QbipInu63fkIwn3h9ZSK0sMyV5Jrk5x3MIJDHeW9pc/Tw4TnKTAU134jl+GbbpYysa0+jBARWRjombeKIFSVfp/zgp15jClClUU1Nz4alTi22LimY2qteQRG6G/rCHiYxPoBRdrtqZZxNSdnKG5yjSdtA2CEL1DJNg1QkFVSSsOuqcHLdrKl6oMR+aUN6wM3GQikmKSU/CH4hWCCXxFaJXvBYoSxZ63GrM/d+l6D4+9+rCxHJoEVsa2E1TMHLUOnN6CweSM+45lcBK19bbCUJDyky6nb1NbxrZGYhmfkrNzE2GN+Cz4iTAgxJlQxd1gVvS4v5nB7qNfb0Uhy9NTopdumxOS7NXFFg3RFdBfAJ0nLGnxECUvUihBC3pwsLGimrUnIF4174m6J6Ga6cQE+Pp1LXgtKf5zWJdWHkm2vQhazcAsQC8JJZFb1ESp1vIAvpy0d0YmGrLLzxWNciHlOa7vguFCVF3UbTFe8r1Mxyym9rqNrZDXWRtBija9yeliMERVFuOTRjlc0PVAzveexQmuD4ESTzMZPtbO0jos1EITKhHcV35Na7E4I7bEe3L2u5yuFuzDA5cc8OA8v761+xOI70bGXUwvFO2kCCiUFEzI9ksLIDTtydBTA94lf4MYH6m0ziRmAhAgcwm5QJFd2G4JzpFIK4+dLuEZamrYUcnHmWzDIg+HYIXh6g3S2maFU7dUtwYoerptOTiVg8FxRlUTx30NDTgjm7ll8vEJXHj7yd/gAO3Vm9P54OSMv8w+pzX3gtCkvthrkjlToT1jMRNJyuJAeSBf5jruzYLS68inlSE/ehT10zhaiBvaCqojZZ2Ux0JQGhbR/nQ==',
							signature:
								'19d6f7759487e556ddcdd3d499af087080403277b7deed1a951cc3d9a93c42a7e22ccba94ff609976c5d3ceb069b641f541bc9906098438d362cae002dfd823a8654b2b4f655e96317d7f60eef1372bb983a4e3174cc8d321668c49068071eaea873071ed683dd24810e51afc0bc925b7a2445fdbc2034cdffb12cb4719ca6b7',
							templateURL: 'http://cloudprint.cainiao.com/template/standard/101/123',
							ver: 'waybill_print_secret_version_1',
							addData: {
								sender: {
									address: {
										detail: '蒋村街道西溪诚园小区2-1-101'
									}
								}
							}
						}
					]
				}
			]
		}
	}***/
	printStock.value.send(JSON.stringify(request))
}
</script>

<style scoped>
.tableRowDropdown {
	padding-left: 12px;
	vertical-align: middle;
	height: 21px;
	color: var(--el-color-primary);
}
</style>
