|
|
@ -104,8 +104,7 @@
|
|
|
|
<el-input v-model="form.transferInfoId" placeholder="请输入主键ID" />
|
|
|
|
<el-input v-model="form.transferInfoId" placeholder="请输入主键ID" />
|
|
|
|
</el-form-item>-->
|
|
|
|
</el-form-item>-->
|
|
|
|
<el-form-item label="设备" prop="machineId">
|
|
|
|
<el-form-item label="设备" prop="machineId">
|
|
|
|
<!-- <el-input v-model="form.machineId" placeholder="请输入设备" />-->
|
|
|
|
<el-select v-model="form.machineId" placeholder="请选择设备" clearable filterable @change="handleMachineChange">
|
|
|
|
<el-select v-model="form.machineId" placeholder="请选择设备" clearable filterable>
|
|
|
|
|
|
|
|
<el-option v-for="item in machineOptions"
|
|
|
|
<el-option v-for="item in machineOptions"
|
|
|
|
:key="item.machineId"
|
|
|
|
:key="item.machineId"
|
|
|
|
:label="item.machineName"
|
|
|
|
:label="item.machineName"
|
|
|
@ -113,7 +112,7 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备原位置" prop="devicePosition">
|
|
|
|
<el-form-item label="设备原位置" prop="devicePosition">
|
|
|
|
<el-input v-model="form.devicePosition" placeholder="请输入设备原位置" />
|
|
|
|
<el-input v-model="form.devicePosition" placeholder="请输入设备原位置" :disabled="true" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备转移位置" prop="devicePositionNew">
|
|
|
|
<el-form-item label="设备转移位置" prop="devicePositionNew">
|
|
|
|
<el-input v-model="form.devicePositionNew" placeholder="请输入设备转移位置" />
|
|
|
|
<el-input v-model="form.devicePositionNew" placeholder="请输入设备转移位置" />
|
|
|
@ -289,6 +288,7 @@ const handleSelectionChange = (selection: DmsBaseTransferInfoVO[]) => {
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
const handleAdd = () => {
|
|
|
|
const handleAdd = () => {
|
|
|
|
reset();
|
|
|
|
reset();
|
|
|
|
|
|
|
|
getMachineOptions();
|
|
|
|
dialog.visible = true;
|
|
|
|
dialog.visible = true;
|
|
|
|
dialog.title = "添加设备转移信息";
|
|
|
|
dialog.title = "添加设备转移信息";
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -296,6 +296,7 @@ const handleAdd = () => {
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
const handleUpdate = async (row?: DmsBaseTransferInfoVO) => {
|
|
|
|
const handleUpdate = async (row?: DmsBaseTransferInfoVO) => {
|
|
|
|
reset();
|
|
|
|
reset();
|
|
|
|
|
|
|
|
getMachineOptions();
|
|
|
|
const _transferInfoId = row?.transferInfoId || ids.value[0]
|
|
|
|
const _transferInfoId = row?.transferInfoId || ids.value[0]
|
|
|
|
const res = await getDmsBaseTransferInfo(_transferInfoId);
|
|
|
|
const res = await getDmsBaseTransferInfo(_transferInfoId);
|
|
|
|
Object.assign(form.value, res.data);
|
|
|
|
Object.assign(form.value, res.data);
|
|
|
@ -337,14 +338,25 @@ const handleExport = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取设备下拉框数据
|
|
|
|
// 获取设备下拉框数据
|
|
|
|
let machineOptions = ref<any[]>([]);
|
|
|
|
let machineOptions = ref([]);
|
|
|
|
const getMachineOptions = async () => {
|
|
|
|
const getMachineOptions = async () => {
|
|
|
|
const res = await getDmsBaseMachineInfoList(null);
|
|
|
|
const res = await getDmsBaseMachineInfoList(null);
|
|
|
|
machineOptions.value = res.data;
|
|
|
|
machineOptions.value = res.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设备选择变更处理 */
|
|
|
|
|
|
|
|
const handleMachineChange = (machineId) => {
|
|
|
|
|
|
|
|
if (machineId) {
|
|
|
|
|
|
|
|
const selectedMachine = machineOptions.value.find(m => m.machineId === machineId);
|
|
|
|
|
|
|
|
if (selectedMachine) {
|
|
|
|
|
|
|
|
form.value.devicePosition = selectedMachine.machineLocation || '';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
form.value.devicePosition = '';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
getMachineOptions();
|
|
|
|
|
|
|
|
getList();
|
|
|
|
getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|