| 
					
				 | 
			
			
				@@ -1,6 +1,527 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<script setup lang="ts"></script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<script setup lang="ts"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { ref, reactive, nextTick } from 'vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import Drawer from '@/components/Drawer/index.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Delete, CirclePlus } from '@element-plus/icons-vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { GlobalStore } from '@/stores/index' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { ElMessage } from 'element-plus' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Storehouse_Product_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Storehouse_ProductClass_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Storehouse_Product_Model_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Storehouse_Product_Name_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Storehouse_Contract_Product_List 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} from '@/api/storehouse/index' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import type { FormInstance, FormRules } from 'element-plus' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { default as vElTableInfiniteScroll } from 'el-table-infinite-scroll' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const isNew = ref(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const selectTable = ref() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const snTable = ref() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let selectProductData: any[] = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const globalStore = GlobalStore() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const formLabelWidth = ref('120px') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const ruleFormRef = ref<FormInstance>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const drawerRef = ref<InstanceType<typeof Drawer> | null>(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const drawerSnRef = ref<InstanceType<typeof Drawer> | null>(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const drawerProductRef = ref<InstanceType<typeof Drawer> | null>(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const classOptions = ref<any[]>([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const modelOptions = ref<any[]>([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const initParam = reactive({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  User_tokey: globalStore.GET_User_tokey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_name: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_model: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_class: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  page: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  page_z: 20 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+type Fn = () => void 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+interface FormType { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_number: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_depot_id: any 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_product: any 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_date: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_remark: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const form = reactive<FormType>({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_number: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_depot_id: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_product: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_date: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_remark: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const rules = reactive<FormRules>({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // T_product: [{ validator: validate_T_product, trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_depot_id: [{ required: true, message: '请选择仓库', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_date: [{ required: true, message: '请选择入库日期', trigger: 'blur' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const tableData = ref<any[]>([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const columns = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { type: 'index', label: '序号', width: 80, align: 'center ' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '产品图片', prop: 'T_img', align: 'center ', name: 'T_img' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '产品名称', prop: 'T_name', align: 'center ' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '产品分类', prop: 'T_class_name', align: 'center ' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '产品型号', prop: 'T_model', align: 'center ' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '产品规格', prop: 'T_spec', align: 'center ' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '是否关联SN', prop: 'T_relation_sn', align: 'center ', width: 120, name: 'T_relation_sn' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '*数量', prop: 'count', align: 'center ', name: 'count' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: '*关联设备', prop: 'sn', align: 'center ', name: 'sn' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'operation', label: '操作', width: 80, fixed: 'right' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const productColumns = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { type: 'selection', width: 80 }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'T_img', label: '产品图片', name: 'T_img' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'T_name', label: '产品名称' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'T_class_name', label: '产品分类' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'T_model', label: '产品型号', ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'T_spec', label: '产品规格' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'T_relation_sn', label: '关联SN', name: 'T_relation_sn' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'T_remark', label: '备注', ellipsis: true } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const countBlurHandle = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  form.T_product = tableData.value.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!item.count) return undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return `${item.Id},${item.count}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// const snBlurHandle = ()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   form.T_product = tableData.value.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     if (!item.sn) return undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     return `${item.Id},${item.count}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const deleteProduct = (row: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  tableData.value = tableData.value.filter(item => item.Id !== row.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // 设置产品的选中 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // selectTable.value?.toggleRowSelection(row, false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const callbackDrawer = (done: Fn) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  resetForm(ruleFormRef.value) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  isNew.value = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  done() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const callbackProductDrawer = (done: Fn) => done() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const callbackSnDrawer = (done: Fn) => done() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const resetForm = (formEl: FormInstance | undefined) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (!formEl) return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  tableData.value = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  formEl.resetFields() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 获取产品分类 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const getProductClassList = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const res: any = await Storehouse_ProductClass_List({ page: 1, page_z: 999 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  classOptions.value = res.Data.Data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const AddProductionDetailed = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  !classOptions.value.length && getProductClassList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  drawerProductRef.value?.openDrawer() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const openDrawer = (type: string, row?: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  isNew.value = type === 'new' ? true : false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (!isNew.value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      editDataEcho(row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  drawerRef.value?.openDrawer() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const editDataEcho = async (row: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  form.T_date = row.T_date 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  form.T_remark = row.T_remark 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  form.T_number = row.T_number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const res: any = await Storehouse_Contract_Product_List({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    User_tokey: globalStore.GET_User_tokey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    T_number: row.T_number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (res.Code === 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    res.Data && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      (tableData.value = res.Data.map((item: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.Id = item.T_product_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.T_img = item.T_product_img 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.T_name = item.T_product_name 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.T_class_name = item.T_product_class_name 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.T_model = item.T_product_model 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.T_spec = item.T_product_spec 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.T_relation_sn = item.T_product_relation_sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.count = item.T_product_total 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return item 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      })) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    selectProductData = tableData.value 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 自动搜索 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const autoSelect = ref('') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let timeout: NodeJS.Timeout 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const querySearchAsync = async (queryString: string, cb: (arg: any) => void) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  clearTimeout(timeout) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  timeout = setTimeout(async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const results = await getNameAsync(queryString) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    console.log(autoSelect, queryString) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    cb(results) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 2000) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const getNameAsync = async (str: string): Promise<any> => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const res: any = await Storehouse_Product_Name_List({ T_name: str, T_class: initParam.T_class }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (!res.Data) return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  return res.Data.map((item: any, index: number) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      value: item, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      index: index 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const getProductModelList = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const res: any = await Storehouse_Product_Model_List({ T_name: autoSelect.value }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  modelOptions.value = res.Data.map((item: any, index: number) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      value: item, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      index: index 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const handleSelect = (item: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // initParam.T_name = item.value 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  getProductModelList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 加载第二个抽屉数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const load = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (initParam.page && total === tableProductData.value.length) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ElMessage.warning('没有更多数据了!!') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  initParam.page++ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  getProductList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let total = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const tableProductData = ref<any[]>([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const getProductList = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const res: any = await Storehouse_Product_List({ ...initParam, T_name: autoSelect.value }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  tableProductData.value.push(...res.Data.Data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  total = res.Data.Num 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (!isNew.value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 设置产品的选中 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tableProductData.value.forEach((row: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const matchedIndex = selectProductData.findIndex((item: any) => item.Id == row.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      selectTable.value?.toggleRowSelection(row, matchedIndex != -1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const ProductselectionChange = (row: any[]) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const newProduct = row.find((product: any) => tableData.value.findIndex((item: any) => item.Id === product.Id) === -1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  newProduct && tableData.value.push({ ...newProduct }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 搜索模型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const searchModelHandle = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  total = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  initParam.page = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  tableProductData.value = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  getProductList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 保存选中的数据id,row-key就是要指定一个key标识这一行的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const getRowKey = (row: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  return row.Id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 添加sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const addDeviceSn = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  drawerSnRef.value?.openDrawer() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const tableSnData: any[] = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const snColumns = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { type: 'index', label: '序号', width: 80, align: 'center ' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { label: 'SN', prop: 'sn', align: 'center ' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  { prop: 'operation', label: '操作', width: 80, fixed: 'right' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 接受props 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+interface ItemType { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_name: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  T_State: number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+interface PropsType { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  options?: ItemType[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const props = defineProps<PropsType>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+defineExpose({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  openDrawer 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  <div class="inStorage-form"></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <div class="inStorage-form"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <Drawer ref="drawerRef" :handleClose="callbackDrawer" size="80%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <template #header="{ params }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <h4 :id="params.titleId" :class="params.titleClass">{{ isNew ? '入库' : '详情' }}</h4> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-form ref="ruleFormRef" :model="form" :rules="rules"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-divider border-style="dashed" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form-item label="入库单号:" :label-width="formLabelWidth" prop="T_number"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-input v-model="form.T_number" type="text" :disabled="true" placeholder="请输入入库单号" class="w-50" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form-item label="入库仓库:" :label-width="formLabelWidth" prop="T_depot_id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-select v-model="form.T_depot_id" class="w-50" clearable placeholder="请选择入库仓库~"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-option v-for="item in props.options" :key="item.T_State" :label="item.T_name" :value="item.T_State" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form-item label="入库日期:" :label-width="formLabelWidth" prop="T_date"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-date-picker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            class="my-date-picker" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            style="width: 21.5rem" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            v-model="form.T_date" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            type="date" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            placeholder="选择日期" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            format="YYYY-MM-DD" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            value-format="YYYY-MM-DD" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form-item label="入库明细:" :label-width="formLabelWidth" prop="T_product"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-table 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :data="tableData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            style="width: 100%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            border 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            stripe 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :header-cell-style="{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              background: '#dedfe0', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              height: '50px' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <template v-for="item in columns" :key="item.prop"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-table-column v-bind="item" v-if="item.fixed !== 'right'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <template #header v-if="item.prop === 'count' || item.prop === 'sn'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span style="color: red">{{ item.label }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <template #default="{ row }" v-if="item.prop === item.name"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    v-if="item.prop === 'count'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    v-model.number="row.count" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    type="text" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    autocomplete="off" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    @blur="countBlurHandle" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    v-if="item.prop === 'sn'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    link 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    type="primary" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    :icon="CirclePlus" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    @click="addDeviceSn" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    >添加</el-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <span v-if="item.prop === 'T_relation_sn'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-tag v-if="row.T_relation_sn === 1" effect="dark">是</el-tag> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-tag v-else type="success" effect="dark">否</el-tag> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-image v-if="item.prop === 'T_img'" style="height: 50px" :src="row.T_img" fit="cover" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-table-column v-bind="item" v-if="item.fixed === 'right'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <template #default="{ row }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-button link type="danger" size="small" :icon="Delete" @click="deleteProduct(row)">删除</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <template #append> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-button type="primary" @click="AddProductionDetailed"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-icon><Plus /></el-icon><span style="margin-left: 6px">添加产品</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form-item label="入库仓库:" :label-width="formLabelWidth" prop="T_number"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            class="w-50" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            v-model="form.T_remark" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :autosize="{ minRows: 4, maxRows: 6 }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            type="textarea" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            placeholder="请输入备注信息" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="btn"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-button>取消</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-button v-if="isNew" color="#626aef">提交</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <Drawer ref="drawerProductRef" :handleClose="callbackProductDrawer" size="70%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <template #header="{ params }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <h4 :id="params.titleId" :class="params.titleClass">选择产品</h4> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-card class="box-card" shadow="never"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <template #header> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div class="input-suffix"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-row :gutter="20" style="margin-bottom: 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-col :xl="5" :lg="8" :md="10" class="d-flex"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <span class="inline-flex items-center">产品分类:</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-select v-model="initParam.T_class" clearable placeholder="请选择分类~"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      <el-option v-for="item in classOptions" :key="item.Id" :label="item.T_name" :value="item.Id" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-col :xl="7" :lg="8" :md="10" class="d-flex"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <span class="inline-flex items-center">产品名称:</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-autocomplete 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      v-model="autoSelect" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      :fetch-suggestions="querySearchAsync" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      placeholder="按产品名称搜索" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      :debounce="2000" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      :trigger-on-focus="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      @select="handleSelect" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-col :xl="7" :lg="8" :md="12" class="d-flex"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <span class="inline-flex items-center">产品型号:</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-select v-model="initParam.T_model" clearable placeholder="请选择型号~"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        v-for="item in modelOptions" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        :key="item.index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        :label="item.value" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        :value="item.value" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-button type="primary" @click="searchModelHandle">搜索</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-table 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              ref="selectTable" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :row-key="getRowKey" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :data="tableProductData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              style="width: 100%; height: 99%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :header-cell-style="{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                background: '#dedfe0', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                height: '50px' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-el-table-infinite-scroll="load" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              @selection-change="ProductselectionChange" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <template v-for="item in productColumns" :key="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-if="item.type === 'index' || item.type === 'selection'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  align="center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-bind="item" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-table-column v-if="!item.ellipsis && item.prop" v-bind="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <template #default="{ row }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <span v-if="item.prop === 'T_relation_sn'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      <el-tag v-if="row.T_relation_sn === 1" effect="dark">是</el-tag> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      <el-tag v-else type="success" effect="dark">否</el-tag> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-image v-if="item.prop === 'T_img'" style="height: 50px" :src="row.T_img" fit="cover" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-table-column v-if="item.ellipsis && item.prop === 'T_model'" align="center" v-bind="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <template #default="{ row }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-tooltip effect="dark" :content="row.T_model" placement="bottom"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      {{ row.T_model }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </el-tooltip> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-table-column v-if="item.ellipsis && item.prop === 'T_remark'" align="center" v-bind="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <template #default="{ row }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-tooltip effect="customized" placement="left"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      <template #content> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <div class="tooltip-content">{{ row.T_remark }}</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      {{ row.T_remark }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </el-tooltip> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </Drawer> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <Drawer ref="drawerSnRef" :handleClose="callbackSnDrawer" size="50%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-card class="box-card" shadow="never"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <template #header> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div class="sn-header"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-form ref="ruleFormRef" :model="form" :rules="rules"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <el-form-item label="SN:" :label-width="formLabelWidth" prop="T_number"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-input v-model="form.T_number" type="text" placeholder="请输入SN" class="w-50" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-button type="primary">添加</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-table 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              ref="snTable" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :data="tableSnData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              style="width: 100%; height: 99%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :header-cell-style="{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                background: '#dedfe0', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                height: '50px' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <template v-for="item in snColumns" :key="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-table-column v-if="item.type === 'index'" v-bind="item" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-table-column v-if="item.prop" align="center" v-bind="item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  <template #default="{ row }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <el-button v-if="item.prop === 'operation'" link type="danger" size="small" :icon="Delete" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                      >删除</el-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </el-table-column> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </Drawer> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </Drawer> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<style scoped></style> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<style scoped lang="scss"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+.tooltip-content { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  max-width: 500px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  overflow-y: auto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+.inStorage-form { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  :deep(.el-drawer__header) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    margin-bottom: 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .box-card { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    height: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    :deep(.el-card__body) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      height: calc(100% - 70px); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .sn-header { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      display: flex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      justify-content: end; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .btn { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    margin-top: 32px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    display: flex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    justify-content: center; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .el-button { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      padding: 0 32px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .w-50 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    width: 21.5rem; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .input-suffix { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    width: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .inline-flex { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      white-space: nowrap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .d-flex { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      display: flex; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</style> 
			 |