合并
This commit is contained in:
@ -6,13 +6,13 @@ VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
# 李陈杰 209
|
||||
VITE_APP_BASE_API = 'http://192.168.110.149:8899'
|
||||
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
|
||||
# 曾涛
|
||||
# VITE_APP_BASE_API = 'http://192.168.110.180:8899'
|
||||
# 罗成
|
||||
# VITE_APP_BASE_API = 'http://192.168.110.188:8899'
|
||||
# 朱银
|
||||
# VITE_APP_BASE_API = 'http://192.168.110.149:8899'
|
||||
VITE_APP_BASE_API = 'http://192.168.110.149:8899'
|
||||
#曾涛
|
||||
# VITE_APP_BASE_API = 'http://192.168.110.171:8899'
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
<div class="p-4">
|
||||
<p class="text-gray-600 mb-4">请选择要启动的流程:</p>
|
||||
<el-select v-model="flowCode" placeholder="请选择流程" style="width: 100%">
|
||||
<el-option v-for="item in flowCodeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in [flowCodeOptions[optionIndex]]" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<template #footer>
|
||||
@ -98,6 +98,7 @@ const flowCodeOptions = ref([
|
||||
label: '资金设计变更审批'
|
||||
}
|
||||
]);
|
||||
const optionIndex = ref<number>(0);
|
||||
|
||||
const flowCode = ref<string>('');
|
||||
const status = ref<string>('');
|
||||
@ -272,12 +273,12 @@ const submit = async (status, data) => {
|
||||
} else {
|
||||
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
||||
if (form.value.costEstimation == '0') {
|
||||
flowCodeOptions.value = [flowCodeOptions.value[0]];
|
||||
optionIndex.value = 0;
|
||||
} else {
|
||||
console.log('🚀 ~ submit ~ flowCodeOptions.value:', flowCodeOptions.value[1]);
|
||||
flowCodeOptions.value = [flowCodeOptions.value[1]];
|
||||
optionIndex.value = 1;
|
||||
}
|
||||
flowCode.value = flowCodeOptions.value[0].value;
|
||||
flowCode.value = flowCodeOptions.value[optionIndex.value].value;
|
||||
dialogVisible.visible = true;
|
||||
return;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@ -73,7 +73,7 @@
|
||||
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
@ -1,14 +1,13 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="表单编号" prop="formCode">
|
||||
<el-input v-model="queryParams.formCode" placeholder="请输入表单编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料来源" prop="materialSource">
|
||||
<el-form-item label="材料来源" prop="materialSource">
|
||||
<el-select v-model="queryParams.materialSource" filterable placeholder="请选择材料来源">
|
||||
<el-option label="全部" value="0"></el-option>
|
||||
<el-option label="甲供材料" value="1"></el-option>
|
||||
@ -16,8 +15,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="材料名称" prop="materialName">
|
||||
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订货单位" prop="orderingUnit">
|
||||
<el-input v-model="queryParams.orderingUnit" placeholder="请输入订货单位" clearable @keyup.enter="handleQuery" />
|
||||
@ -38,8 +36,7 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['materials:materialReceive:add']">新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:materialReceive:add']">新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -50,8 +47,9 @@
|
||||
<el-table-column label="表单编号" align="center" prop="formCode" />
|
||||
<el-table-column label="材料来源" align="center" prop="projectName">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.materialSource == '1' ? 'success' : 'warning'">{{ scope.row.materialSource == '1' ?
|
||||
'甲供材料' : '乙供材料' }}</el-tag>
|
||||
<el-tag :type="scope.row.materialSource == '1' ? 'success' : 'warning'">{{
|
||||
scope.row.materialSource == '1' ? '甲供材料' : '乙供材料'
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备材料名称" align="center" prop="materialName" />
|
||||
@ -77,20 +75,28 @@
|
||||
<!-- <el-button link type="primary" icon="edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialReceive:edit']"
|
||||
>修改</el-button
|
||||
> -->
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)"
|
||||
v-hasPermi="['materials:materialReceive:query']">查看</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['materials:materialReceive:remove']">删除</el-button>
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['materials:materialReceive:query']"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['materials:materialReceive:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<!-- 添加或修改物料接收单对话框 -->
|
||||
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" draggable :title="dialog.title"
|
||||
v-model="dialog.visible" width="800px" append-to-body>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
draggable
|
||||
:title="dialog.title"
|
||||
v-model="dialog.visible"
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="materialReceiveFormRef" :model="form" :rules="rules" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@ -108,10 +114,8 @@
|
||||
</el-col>
|
||||
<el-col v-if="form.materialSource == '2'" :span="12">
|
||||
<el-form-item label="采购单编号" prop="docId">
|
||||
<el-select @change="handleSelect" v-model="form.docId" filterable placeholder="请选择采购单"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in purchaseDocList" :key="item.id" :label="item.docCode"
|
||||
:value="item.id"></el-option>
|
||||
<el-select @change="handleSelect" v-model="form.docId" filterable placeholder="请选择采购单" style="width: 100%">
|
||||
<el-option v-for="item in purchaseDocList" :key="item.id" :label="item.docCode" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -130,11 +134,20 @@
|
||||
<el-input disabled v-model="form.projectName" placeholder="请输入工程名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0"
|
||||
><el-form-item label="材料名称" prop="materialName">
|
||||
<el-input v-model="form.materialName" placeholder="请输入设备材料名称" clearable /> </el-form-item
|
||||
></el-col>
|
||||
|
||||
<el-col :span="12" v-if="form.materialSource == '2'">
|
||||
<el-form-item label="合同编号" prop="contractName">
|
||||
<el-select v-model="form.contractName" filterable placeholder="请选择合同" style="width: 100%">
|
||||
<el-option v-for="item in contractNameList" :key="item.contractCode" :label="item.contractCode"
|
||||
:value="item.contractCode"></el-option>
|
||||
<el-option
|
||||
v-for="item in contractNameList"
|
||||
:key="item.contractCode"
|
||||
:label="item.contractCode"
|
||||
:value="item.contractCode"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -149,48 +162,59 @@
|
||||
<div class="detail">
|
||||
<div class="detail-header">
|
||||
<span>数量验收</span>
|
||||
<el-button type="primary" v-if="form.materialSource == '1'" link @click="addItem"
|
||||
icon="Plus">添加数量验收</el-button>
|
||||
<el-button type="primary" v-if="form.materialSource == '1'" link @click="addItem" icon="Plus">添加数量验收</el-button>
|
||||
</div>
|
||||
<div v-for="(item, index) in form.itemList" :key="item.id" class="detail-item">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" :prop="`itemList.${index}.name`"
|
||||
:rules="{ required: true, message: '名称不能为空', trigger: 'blur' }">
|
||||
<el-form-item label="名称" :prop="`itemList.${index}.name`" :rules="{ required: true, message: '名称不能为空', trigger: 'blur' }">
|
||||
<el-input :disabled="form.materialSource == '2'" v-model="item.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格" :prop="`itemList.${index}.specification`"
|
||||
:rules="{ required: true, message: '规格不能为空', trigger: 'blur' }">
|
||||
<el-input :disabled="form.materialSource == '2'" v-model="item.specification"
|
||||
placeholder="请输入规格" />
|
||||
<el-form-item
|
||||
label="规格"
|
||||
:prop="`itemList.${index}.specification`"
|
||||
:rules="{ required: true, message: '规格不能为空', trigger: 'blur' }"
|
||||
>
|
||||
<el-input :disabled="form.materialSource == '2'" v-model="item.specification" placeholder="请输入规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位" :prop="`itemList.${index}.unit`"
|
||||
:rules="{ required: true, message: '单位不能为空', trigger: 'blur' }">
|
||||
<el-form-item label="单位" :prop="`itemList.${index}.unit`" :rules="{ required: true, message: '单位不能为空', trigger: 'blur' }">
|
||||
<el-input :disabled="form.materialSource == '2'" v-model="item.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" :prop="`itemList.${index}.quantity`" :rules="rules.quantityRule"
|
||||
ref="quantityFormItemRefs[index]">
|
||||
<el-input :disabled="form.materialSource == '2'" type="number" v-model.number="item.quantity"
|
||||
placeholder="请输入数量" min="0" @input="handleQuantityInput(index)"
|
||||
@blur="handleQuantityBlur(index)" />
|
||||
<el-form-item label="数量" :prop="`itemList.${index}.quantity`" :rules="rules.quantityRule" ref="quantityFormItemRefs[index]">
|
||||
<el-input
|
||||
:disabled="form.materialSource == '2'"
|
||||
type="number"
|
||||
v-model.number="item.quantity"
|
||||
placeholder="请输入数量"
|
||||
min="0"
|
||||
@input="handleQuantityInput(index)"
|
||||
@blur="handleQuantityBlur(index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收" :prop="`itemList.${index}.acceptedQuantity`"
|
||||
:rules="rules.acceptedQuantityRule">
|
||||
<el-input type="number" v-model.number="item.acceptedQuantity" placeholder="请输入验收" min="0"
|
||||
@input="handleAcceptedInput(index)" />
|
||||
<el-form-item label="验收" :prop="`itemList.${index}.acceptedQuantity`" :rules="rules.acceptedQuantityRule">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model.number="item.acceptedQuantity"
|
||||
placeholder="请输入验收"
|
||||
min="0"
|
||||
@input="handleAcceptedInput(index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="缺件" :prop="`itemList.${index}.shortageQuantity`"
|
||||
:rules="{ required: true, message: '缺件数量不能为空', trigger: 'blur' }">
|
||||
<el-form-item
|
||||
label="缺件"
|
||||
:prop="`itemList.${index}.shortageQuantity`"
|
||||
:rules="{ required: true, message: '缺件数量不能为空', trigger: 'blur' }"
|
||||
>
|
||||
<el-input type="number" min="0" v-model="item.shortageQuantity" placeholder="自动计算" readonly />
|
||||
<span class="tips">*自动计算(数量-验收数量)</span>
|
||||
</el-form-item>
|
||||
@ -212,26 +236,22 @@
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合格证文件" prop="certCountFileId">
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']"
|
||||
v-model="form.certCountFileId" />
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']" v-model="form.certCountFileId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出厂报告文件" prop="reportCountFileId">
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']"
|
||||
v-model="form.reportCountFileId" />
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']" v-model="form.reportCountFileId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="技术资料文件" prop="techDocCountFileId">
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']"
|
||||
v-model="form.techDocCountFileId" />
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']" v-model="form.techDocCountFileId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厂家资质文件" prop="licenseCountFileId">
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']"
|
||||
v-model="form.licenseCountFileId" />
|
||||
<file-upload :isShowTip="false" :fileType="['pdf', 'png', 'jpg', 'jpeg']" v-model="form.licenseCountFileId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@ -412,7 +432,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
if(queryParams.value.materialSource=='0'){
|
||||
if (queryParams.value.materialSource == '0') {
|
||||
delete queryParams.value.materialSource;
|
||||
}
|
||||
const res = await listMaterialReceive(queryParams.value);
|
||||
@ -506,9 +526,9 @@ const handleUpdate = async (row?: MaterialReceiveVO) => {
|
||||
watchItemChanges(index);
|
||||
// 手动触发当前条目的数量、验收数量、缺件数量验证
|
||||
if (materialReceiveFormRef.value) {
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => { });
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => { });
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => { });
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => {});
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => {});
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => {});
|
||||
}
|
||||
});
|
||||
|
||||
@ -619,9 +639,9 @@ const handleAcceptedInput = (index: number) => {
|
||||
// 手动验证数量和验收数量字段
|
||||
const validateQuantityField = (index: number) => {
|
||||
if (materialReceiveFormRef.value) {
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => { });
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => { });
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => { });
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => {});
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => {});
|
||||
materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => {});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -86,13 +86,14 @@ const handleTabChange = (tab) => {
|
||||
activeTab.value = tab;
|
||||
data.queryParams.valueType = '1';
|
||||
// data.queryParams.month = '';
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 查询项目总产值分配列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
|
||||
const res = await listOutTable(queryParams.value);
|
||||
const res = await listOutTable({ ...queryParams.value, type: activeTab.value });
|
||||
valueAllocationList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
|
@ -298,6 +298,11 @@ const getList = async () => {
|
||||
const res = await getProjectSquare(currentProject.value?.id);
|
||||
if (res.data.length === 0) {
|
||||
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
matrixOptions.value = [];
|
||||
queryParams.value.projectId = '';
|
||||
form.value.projectId = '';
|
||||
tabList.value = [];
|
||||
activeTab.value = '';
|
||||
} else {
|
||||
let matrixList = res.data.map((item) => {
|
||||
return {
|
||||
@ -472,6 +477,7 @@ const matrixValue = ref<number | undefined>(matrixOptions.value.length > 0 ? mat
|
||||
const resetMatrix = () => {
|
||||
matrixValue.value = undefined;
|
||||
queryParams.value.matrixId = undefined;
|
||||
queryParams.value.projectId = undefined;
|
||||
matrixOptions.value = [];
|
||||
};
|
||||
|
||||
@ -491,8 +497,6 @@ onMounted(() => {
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
resetMatrix();
|
||||
getList();
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ const showSearch = ref(true);
|
||||
const uploadRef = ref<any>(null);
|
||||
|
||||
// 方阵表单模型(核心修复:使用reactive并显式声明结构)
|
||||
const formM = reactive<MatrixForm>({
|
||||
const formM = ref<MatrixForm>({
|
||||
landId: undefined,
|
||||
unitBoList: [{ unitProjectArea: '', unitProjectStatus: '', unitProjectId: [] }]
|
||||
});
|
||||
@ -424,11 +424,11 @@ const getfangzhenList = async () => {
|
||||
/** 关联方阵 */
|
||||
const handleView = async (row: LandBlockVO) => {
|
||||
if (!row?.id) return proxy?.$modal.msgWarning('请选择有效的地块');
|
||||
|
||||
console.log('🚀 ~ handleView ~ row:', row);
|
||||
// 重置方阵表单
|
||||
resetMatrix();
|
||||
// 绑定当前地块ID
|
||||
formM.landId = row.id;
|
||||
formM.value.landId = row.id;
|
||||
// 打开弹窗
|
||||
dialogMatrix.visible = true;
|
||||
|
||||
@ -437,7 +437,7 @@ const handleView = async (row: LandBlockVO) => {
|
||||
|
||||
/** 新增方阵表单项 */
|
||||
const addUnitBoItem = () => {
|
||||
formM.unitBoList.push({
|
||||
formM.value.unitBoList.push({
|
||||
unitProjectArea: '',
|
||||
unitProjectStatus: '',
|
||||
unitProjectId: []
|
||||
@ -448,10 +448,10 @@ const addUnitBoItem = () => {
|
||||
|
||||
/** 删除方阵表单项 */
|
||||
const removeUnitBoItem = (index: number) => {
|
||||
if (formM.unitBoList.length <= 1) {
|
||||
if (formM.value.unitBoList.length <= 1) {
|
||||
return proxy?.$modal.msgWarning('至少保留一项方阵配置');
|
||||
}
|
||||
formM.unitBoList.splice(index, 1);
|
||||
formM.value.unitBoList.splice(index, 1);
|
||||
landBlockFormMatrixRef.value?.clearValidate();
|
||||
};
|
||||
|
||||
@ -459,11 +459,11 @@ const removeUnitBoItem = (index: number) => {
|
||||
const submitFormMatrix = () => {
|
||||
landBlockFormMatrixRef.value?.validate(async (valid: boolean) => {
|
||||
if (!valid) return;
|
||||
if (!formM.landId) return proxy?.$modal.msgWarning('地块ID异常,请重新选择地块');
|
||||
if (!formM.value.landId) return proxy?.$modal.msgWarning('地块ID异常,请重新选择地块');
|
||||
|
||||
try {
|
||||
// 处理方阵数据(修复ID拆分逻辑)
|
||||
const unitBoListParams = formM.unitBoList.map((item) => {
|
||||
const unitBoListParams = formM.value.unitBoList.map((item) => {
|
||||
// 取级联选择的最后一层值
|
||||
const lastLevelValue = item.unitProjectId[item.unitProjectId.length - 1];
|
||||
if (!lastLevelValue) throw new Error('请选择完整的方阵');
|
||||
@ -482,7 +482,7 @@ const submitFormMatrix = () => {
|
||||
|
||||
// 调用关联接口
|
||||
const res = await LandUnit({
|
||||
landId: formM.landId,
|
||||
landId: formM.value.landId,
|
||||
unitBoList: unitBoListParams
|
||||
});
|
||||
|
||||
@ -507,12 +507,12 @@ const cancelMatrix = () => {
|
||||
|
||||
/** 方阵表单重置 */
|
||||
const resetMatrix = () => {
|
||||
formM.landId = undefined;
|
||||
formM.unitBoList = [{ unitProjectArea: '', unitProjectStatus: '', unitProjectId: [] }];
|
||||
if (landBlockFormMatrixRef.value) {
|
||||
landBlockFormMatrixRef.value.resetFields();
|
||||
landBlockFormMatrixRef.value.clearValidate();
|
||||
}
|
||||
formM.value.landId = undefined;
|
||||
formM.value.unitBoList = [{ unitProjectArea: '', unitProjectStatus: '', unitProjectId: [] }];
|
||||
};
|
||||
|
||||
/** 监听项目变化,刷新数据 */
|
||||
|
@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="toggleExpandAll">{{ isExpandAll ? '一键收起' : '一键展开' }}</el-button>
|
||||
<el-button type="primary" @click="handleToggleExpandAll">{{ isExpandAll ? '一键收起' : '一键展开' }}</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
|
Reference in New Issue
Block a user