|
|
|
|
@ -643,7 +643,7 @@
|
|
|
|
|
<el-dialog
|
|
|
|
|
v-model="beijianDialogVisible"
|
|
|
|
|
:title="t('EquipmentManagement.EquipmentLedger.bjTitle')"
|
|
|
|
|
width="860px"
|
|
|
|
|
width="1000px"
|
|
|
|
|
class="device-ledger-transfer-dialog"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
@ -669,7 +669,7 @@
|
|
|
|
|
v-model="bjQueryParams.barCode"
|
|
|
|
|
:placeholder="t('SparePartsManagement.SpareInfo.placeholderCode')"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
@keyup.enter="bjHandleQuery"
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -997,6 +997,7 @@ const criticalComponentOptions = ref<SelectionOption[]>([])
|
|
|
|
|
const beijianOptions = ref<SelectionOption[]>([])
|
|
|
|
|
const savedCriticalComponentOptions = ref<SelectionOption[]>([])
|
|
|
|
|
const savedBeijianOptions = ref<SelectionOption[]>([])
|
|
|
|
|
const SPARE_PART_CATEGORY_TYPE = 3
|
|
|
|
|
const buildCriticalComponentOptions = (items: any[] = []): SelectionOption[] =>
|
|
|
|
|
(items ?? [])
|
|
|
|
|
.map((item: any) => {
|
|
|
|
|
@ -1262,12 +1263,12 @@ const ensureOptionsLoaded = async () => {
|
|
|
|
|
DeviceTypeApi.getDeviceTypeTree({ pageNo: 1, pageSize: 10 }),
|
|
|
|
|
getSimpleUserList(),
|
|
|
|
|
CriticalComponentApi.getCriticalComponentList(),
|
|
|
|
|
ProductApi.getComponentSimpleList()
|
|
|
|
|
ProductApi.getProductPage({ pageNo: 1, pageSize: 10, categoryType: SPARE_PART_CATEGORY_TYPE })
|
|
|
|
|
])
|
|
|
|
|
deviceTypeTree.value = deviceTypeRes
|
|
|
|
|
users.value = userRes ?? []
|
|
|
|
|
criticalComponentOptions.value = buildCriticalComponentOptions(criticalRes ?? [])
|
|
|
|
|
beijianOptions.value = buildBeijianOptions(beijianRes ?? [])
|
|
|
|
|
beijianOptions.value = buildBeijianOptions(beijianRes?.list ?? [])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 鎵撳紑寮圭獥 */
|
|
|
|
|
@ -1340,8 +1341,9 @@ const queryParams = reactive({
|
|
|
|
|
const bjQueryParams = reactive({
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
barCode: undefined,
|
|
|
|
|
name: undefined,
|
|
|
|
|
categoryId: undefined
|
|
|
|
|
categoryType: SPARE_PART_CATEGORY_TYPE
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const iotDeviceQueryParams = reactive({
|
|
|
|
|
@ -1483,10 +1485,11 @@ const getList = async () => {
|
|
|
|
|
const bjGetList = async () => {
|
|
|
|
|
loading.value = true
|
|
|
|
|
try {
|
|
|
|
|
bjQueryParams.categoryId = 5
|
|
|
|
|
bjQueryParams.categoryType = SPARE_PART_CATEGORY_TYPE
|
|
|
|
|
const data = await ProductApi.getProductPage(bjQueryParams)
|
|
|
|
|
bjList.value = data.list
|
|
|
|
|
bjTotal.value = data.total
|
|
|
|
|
beijianOptions.value = mergeSelectionOptions(beijianOptions.value, buildBeijianOptions(bjList.value))
|
|
|
|
|
// 鏁版嵁鍔犺浇鍚庯紝閲嶆柊璁剧疆閫変腑鐘舵€?
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
bjToggleSelection()
|
|
|
|
|
|