优化
This commit is contained in:
@ -273,19 +273,19 @@ const handleSelectionChange = (selection: ConstructionValueVO[]) => {
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = async () => {
|
||||
reset();
|
||||
const res = await getProjectSquare(currentProject.value?.id);
|
||||
if (res.data.length === 0) return proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
const isFangzhen = res.data.some((item) => item.children && item.children.length);
|
||||
console.log('🚀 ~ handleAdd ~ isFangzhen:', isFangzhen);
|
||||
// const res = await getProjectSquare(currentProject.value?.id);
|
||||
// if (res.data.length === 0) return proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
// const isFangzhen = res.data.some((item) => item.children && item.children.length);
|
||||
// console.log('🚀 ~ handleAdd ~ isFangzhen:', isFangzhen);
|
||||
|
||||
if (!isFangzhen) return proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
let matrixList = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
matrixId: item?.projectId
|
||||
};
|
||||
});
|
||||
matrixOptions.value = matrixList;
|
||||
// if (!isFangzhen) return proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
// let matrixList = res.data.map((item) => {
|
||||
// return {
|
||||
// ...item,
|
||||
// matrixId: item?.projectId
|
||||
// };
|
||||
// });
|
||||
// matrixOptions.value = matrixList;
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加施工产值';
|
||||
};
|
||||
|
@ -34,7 +34,7 @@
|
||||
:file-type="['xls', 'xlsx']"
|
||||
:on-upload-success="handleSuccess"
|
||||
>
|
||||
<el-button type="primary" plain icon="Compass">导入</el-button>
|
||||
<el-button type="primary" plain icon="upload">导入</el-button>
|
||||
</file-upload>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -249,6 +249,7 @@ const initFormData: ProgressCategoryForm = {
|
||||
status: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
const labelTitle = ref('测试方阵');
|
||||
|
||||
const data = reactive<PageData<ProgressCategoryForm, ProgressCategoryQuery>>({
|
||||
form: { ...initFormData },
|
||||
@ -323,7 +324,8 @@ const getList = async () => {
|
||||
if (data) {
|
||||
progressCategoryList.value = data;
|
||||
progressCategoryOptions.value = [];
|
||||
const datas: ProgressCategoryOption = { id: 0, name: '顶级节点', children: [...data] };
|
||||
const datas: ProgressCategoryOption = { id: 0, name: '顶级节点', children: [{ id: id, children: [...data], name: labelTitle.value }] };
|
||||
// form.value.parentId = id;
|
||||
progressCategoryOptions.value.push(datas);
|
||||
console.log('🚀 ~ getList ~ progressCategoryOptions.value:', progressCategoryOptions.value);
|
||||
loading.value = false;
|
||||
@ -336,6 +338,7 @@ const getList = async () => {
|
||||
const handleSuccess = () => {
|
||||
console.log(111);
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 查询分项工程单价下拉树结构 */
|
||||
@ -355,6 +358,8 @@ const cancel = () => {
|
||||
};
|
||||
|
||||
const handleTabClick = (tab: any) => {
|
||||
console.log(tab);
|
||||
labelTitle.value = tab.props.label;
|
||||
const id = tab.props.name; // 实际上就是 item.id
|
||||
const current = tabList.value.find((item) => item.id === id);
|
||||
if (current.matrixStructureList && current.matrixStructureList.length > 0) {
|
||||
|
@ -106,7 +106,7 @@
|
||||
<el-input v-model="form.name" placeholder="请输入类别名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联数据" prop="workType">
|
||||
<el-select v-model="form.workType" placeholder="请选择关联数据">
|
||||
<el-select v-model="form.workType" clearable filterable placeholder="请选择关联数据">
|
||||
<el-option v-for="dict in progress_work_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -347,10 +347,10 @@ const getList = async () => {
|
||||
/** 查询近两周考勤列表 */
|
||||
const getListTwoWeek = async () => {
|
||||
loading.value = true;
|
||||
const res = await listAttendanceTwoWeek(queryParams.value);
|
||||
attendanceTwoWeekList.value = res.data;
|
||||
echartsOption.value = { ...option(attendanceTwoWeekList.value) };
|
||||
commandstatsIntance.value.setOption(echartsOption.value);
|
||||
// const res = await listAttendanceTwoWeek(queryParams.value);
|
||||
// attendanceTwoWeekList.value = res.data;
|
||||
// echartsOption.value = { ...option(attendanceTwoWeekList.value) };
|
||||
// commandstatsIntance.value.setOption(echartsOption.value);
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
|
@ -16,7 +16,7 @@
|
||||
<!-- 表单区域 -->
|
||||
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
|
||||
<div class="p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100">
|
||||
<h3 class="text-lg font-semibold text-gray-800">专项方案信息</h3>
|
||||
<h3 class="text-lg font-semibold text-gray-800">供应商入库</h3>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<el-form ref="leaveFormRef" v-loading="loading" disabled :model="form" :rules="rules" label-width="150px" class="space-y-4">
|
||||
@ -333,6 +333,17 @@ const getInfo = () => {
|
||||
nextTick(async () => {
|
||||
const res = await getSupplierInput(routeParams.value.id);
|
||||
Object.assign(form.value, res.data);
|
||||
form.value.registeredNumber = form.value.registeredNumber?.split(',');
|
||||
form.value.build1 = form.value.registeredNumber[0] || '';
|
||||
form.value.build2 = form.value.registeredNumber[1] || '';
|
||||
form.value.build3 = form.value.registeredNumber[2] || '';
|
||||
form.value.build4 = form.value.registeredNumber[3] || '';
|
||||
form.value.personnelNumber = form.value.personnelNumber?.split(',');
|
||||
form.value.personnelNumber1 = form.value.personnelNumber[0] || '';
|
||||
form.value.personnelNumber2 = form.value.personnelNumber[1] || '';
|
||||
form.value.personnelNumber3 = form.value.personnelNumber[2] || '';
|
||||
form.value.personnelNumber4 = form.value.personnelNumber[3] || '';
|
||||
|
||||
loading.value = false;
|
||||
buttonLoading.value = false;
|
||||
});
|
||||
@ -437,7 +448,9 @@ onMounted(() => {
|
||||
.el-input__inner,
|
||||
.el-select .el-input__inner {
|
||||
border-radius: 4px;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
transition:
|
||||
border-color 0.2s,
|
||||
box-shadow 0.2s;
|
||||
|
||||
&:focus {
|
||||
border-color: var(--primary-light);
|
||||
@ -447,7 +460,9 @@ onMounted(() => {
|
||||
|
||||
.el-textarea__inner {
|
||||
border-radius: 4px;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
transition:
|
||||
border-color 0.2s,
|
||||
box-shadow 0.2s;
|
||||
|
||||
&:focus {
|
||||
border-color: var(--primary-light);
|
||||
|
Reference in New Issue
Block a user