|
@@ -14,7 +14,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template #extra>
|
|
<template #extra>
|
|
- <el-button type="primary">手动入库</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :disabled="tableCheckedKeys.length <= 0" @click="manualStorageClick">手动入库</el-button>
|
|
</template>
|
|
</template>
|
|
<hc-table
|
|
<hc-table
|
|
:column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }"
|
|
:column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }"
|
|
@@ -30,7 +30,7 @@
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { getErtractInfo } from '~api/other'
|
|
import { getErtractInfo } from '~api/other'
|
|
-import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
|
|
|
+import { arrToId, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
import mainApi from '~api/tentative/material/testSample'
|
|
import mainApi from '~api/tentative/material/testSample'
|
|
|
|
|
|
//参数
|
|
//参数
|
|
@@ -151,4 +151,19 @@ const tableCheckedKeys = ref([])
|
|
const tableSelection = (rows) => {
|
|
const tableSelection = (rows) => {
|
|
tableCheckedKeys.value = rows
|
|
tableCheckedKeys.value = rows
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//手动入库
|
|
|
|
+const manualStorageClick = async () => {
|
|
|
|
+ const rows = tableCheckedKeys.value
|
|
|
|
+ //判断是否满足条件
|
|
|
|
+ const result = rows.every(({ rfId }) => {
|
|
|
|
+ return !isNullES(rfId)
|
|
|
|
+ })
|
|
|
|
+ if (!result) {
|
|
|
|
+ window.$message?.warning('存在材料未使用RFID,无法手动入库')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const ids = arrToId(rows)
|
|
|
|
+ console.log(ids)
|
|
|
|
+}
|
|
</script>
|
|
</script>
|