|
|
@@ -66,6 +66,8 @@
|
|
|
:pagination="true"
|
|
|
:total="total"
|
|
|
:index="true"
|
|
|
+ :border="true"
|
|
|
+ table-layout="fixed"
|
|
|
v-model:current-page="currentPage"
|
|
|
v-model:page-size="pageSize"
|
|
|
@current-change="handlePageChange"
|
|
|
@@ -231,7 +233,7 @@
|
|
|
<el-input v-model="formData.vehicleNo" placeholder="请输入车牌号" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="计划号" prop="planNo">
|
|
|
- <el-input v-model="formData.planNo" placeholder="请输入计划号" />
|
|
|
+ <el-input v-model="formData.planNo" placeholder="请输入计划号" :readonly="isPlanNoReadonly" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remarks">
|
|
|
<el-input v-model="formData.remarks" type="textarea" :rows="3" />
|
|
|
@@ -311,7 +313,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
- import { ref, reactive, onMounted } from 'vue'
|
|
|
+ import { ref, reactive, computed, onMounted } from 'vue'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { Plus, Document, Search, Edit, Delete, View } from '@element-plus/icons-vue'
|
|
|
import { inventoryApi, type InventoryRecord, type InventoryCreate } from '@/api/inventoryApi'
|
|
|
@@ -357,6 +359,8 @@
|
|
|
remarks: '',
|
|
|
purchasePlanId: purchasePlanIdFromRoute
|
|
|
})
|
|
|
+ // 路由带入计划号时,在新增场景保持只读,避免误改
|
|
|
+ const isPlanNoReadonly = computed(() => !!route.query.planNo && !editingRecord.value)
|
|
|
|
|
|
const formRules = {
|
|
|
date: [{ required: true, message: '请选择日期', trigger: 'change' }],
|
|
|
@@ -695,7 +699,6 @@
|
|
|
|
|
|
:deep(.el-table) {
|
|
|
width: 100% !important;
|
|
|
- table-layout: auto;
|
|
|
}
|
|
|
|
|
|
// 确保固定列正常工作
|