| 
					
				 | 
			
			
				@@ -1,41 +1,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script setup lang="ts"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { ElMessage } from 'element-plus' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import InStorageSn from './InStorageSn.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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_StockIn_Add, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  Storehouse_Product_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  Storehouse_ProductClass_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  Storehouse_Product_Model_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  Storehouse_Product_Name_List, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  Storehouse_Contract_Product_List 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} from '@/api/storehouse/index' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import Drawer from '@/components/Drawer/index.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import InStorageProduct from './InStorageProduct.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import type { FormInstance, FormRules } from 'element-plus' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { default as vElTableInfiniteScroll } from 'el-table-infinite-scroll' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import InStorageSn from './InStorageSn.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const isNew = ref(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const selectTable = 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 InStorageSn> | null>(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const drawerProductRef = ref<InstanceType<typeof Drawer> | null>(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Delete, CirclePlus } from '@element-plus/icons-vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Storehouse_StockIn_Add, Storehouse_ProductClass_List } from '@/api/storehouse/index' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-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 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,6 +17,16 @@ interface FormType { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   T_date: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   T_remark: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const tableData = ref<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 InStorageSn> | null>(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const drawerProductRef = ref<InstanceType<typeof InStorageProduct> | null>(null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const classOptions = ref<any[]>([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const form = reactive<FormType>({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   T_number: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   T_depot_id: '', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -68,7 +51,6 @@ const rules = reactive<FormRules>({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   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' }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -82,73 +64,66 @@ const columns = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   { 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}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!item.count && item.T_relation_sn !== 1) return undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return `${item.Id},${item.count}|` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const getDeviceSnToProduct = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const DeviceSnData: any = drawerSnRef.value?.getDeviceSn() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  // if (!DeviceSnData.size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //   const index = tableData.value.findIndex((item: any) => item.T_relation_sn === 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //   if (index !== -1) return [null] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //   else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //     return tableData.value.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //       if (!item.count) return undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //       return `${item.Id},${item.count}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  //   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (!DeviceSnData.size) return [null] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (!tableData.value.every((item: any) => item.count)) return [undefined] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const isEmpty = determineSNorCount(DeviceSnData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (isEmpty && isEmpty === 'count') return [undefined] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (isEmpty && isEmpty === 'sn') return [null] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   return tableData.value.map((item: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let product: any = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    DeviceSnData?.forEach((value: any, key: number) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // T_relation_sn === 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if (item.Id === key) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (item.T_relation_sn === 1 && value.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (item.T_relation_sn === 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      DeviceSnData?.forEach((value: any, key: number) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (item.Id === key) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           let str = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          value.forEach((snObj: any) => (str += snObj.sn + ',')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          value.forEach( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            (snObj: any, index: number, arr: any[]) => (str += `${snObj.sn}${index === arr.length - 1 ? '' : ','}`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           product = `${item.Id}-${item.count}-${str}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          product = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (item.count) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          product = `${item.Id}-${item.count}-` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          product = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      product = `${item.Id}-${item.count}-` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return product + '|' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 判断sn or 数量是否为空 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const determineSNorCount = (DeviceSnData: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  for (const item of tableData.value) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!item.count && item.T_relation_sn !== 1) return 'count' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (item.T_relation_sn === 1 && !DeviceSnData.get(item.Id) && !DeviceSnData.size) return 'sn' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const AddInStorage = (formEl: FormInstance | undefined) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (!formEl) return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   form.T_product = getDeviceSnToProduct() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   formEl.validate(async valid => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const res = await Storehouse_StockIn_Add({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const res: any = await Storehouse_StockIn_Add({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         User_tokey: globalStore.GET_User_tokey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ...form, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        T_product: form.T_product.toString() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        T_product: form.T_product.join('') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      console.log(res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (res.Code === 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ElMessage.success('入库成功!') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        drawerProductRef.value?.clearSelection() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          emit('onUpdateList') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          resetForm(ruleFormRef.value) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          drawerRef.value?.closeDrawer() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -157,150 +132,60 @@ const deleteProduct = (row: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   tableData.value = tableData.value.filter(item => item.Id !== row.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // 设置产品的选中 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  selectTable.value?.toggleRowSelection(row, false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  drawerProductRef.value?.selectTableChange(row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // 删除设备得sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   drawerSnRef.value?.deleteDeviceSn(row.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const callbackDrawer = (done: Fn) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   resetForm(ruleFormRef.value) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  isNew.value = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   done() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-const callbackProductDrawer = (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 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (!res.Data.Data) return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  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 index = tableData.value.findIndex((item: any) => item.Id === row.Id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (index === -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    row.count = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tableData.value.push(row) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tableData.value.splice(index, 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 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 添加sn 号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const addDeviceSn = (id: number) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   drawerSnRef.value?.addDeviceSn(id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 自动计算 count 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const autoGetCount = (length: number, id: number) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   tableData.value.forEach((item: any) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (item.Id === id) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -308,16 +193,23 @@ const autoGetCount = (length: number, id: number) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 注册事件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const emit = defineEmits<{ (event: 'onUpdateList'): void }>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 接受props 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 interface ItemType { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   T_name: string 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  T_State: number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Id: number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 interface PropsType { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   options?: ItemType[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const props = defineProps<PropsType>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 入库调用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const openDrawer = () => drawerRef.value?.openDrawer() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 defineExpose({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   openDrawer 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -327,7 +219,7 @@ defineExpose({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div class="inStorage-form"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <Drawer ref="drawerRef" :handleClose="callbackDrawer" size="80%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <template #header="{ params }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <h4 :id="params.titleId" :class="params.titleClass">{{ isNew ? '入库' : '详情' }}</h4> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <h4 :id="params.titleId" :class="params.titleClass">入库</h4> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form ref="ruleFormRef" :model="form" :rules="rules"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-divider border-style="dashed" /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -336,7 +228,7 @@ defineExpose({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </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-option v-for="item in props.options" :key="item.Id" :label="item.T_name" :value="item.Id" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-form-item label="入库日期:" :label-width="formLabelWidth" prop="T_date"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -413,7 +305,7 @@ defineExpose({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-form-item label="入库仓库:" :label-width="formLabelWidth" prop="T_number"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form-item label="入库仓库:" :label-width="formLabelWidth" prop="T_remark"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             v-model="form.T_remark" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             :autosize="{ minRows: 4, maxRows: 6 }" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -424,98 +316,10 @@ defineExpose({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class="btn"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-button>取消</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-button v-if="isNew" color="#626aef" @click="AddInStorage(ruleFormRef)">提交</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-button color="#626aef" @click="AddInStorage(ruleFormRef)">提交</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> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <InStorageProduct ref="drawerProductRef" @ontableData="ProductselectionChange" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <InStorageSn ref="drawerSnRef" @onCount="autoGetCount" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </Drawer> 
			 |