合并
This commit is contained in:
@ -61,3 +61,13 @@ export const delMaterialsInventory = (id: string | number | Array<string | numbe
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
//获取新的列表数据
|
||||
export const getLedgerList = (query?: any) => {
|
||||
return request({
|
||||
url: '/materials/materials/listUseDetail',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
//导出
|
||||
|
@ -93,7 +93,7 @@ export const isSubmit = (id): AxiosPromise => {
|
||||
*/
|
||||
export const getMonthInfo = (query): AxiosPromise<MonthPlanVO> => {
|
||||
return request({
|
||||
url: '/out/monthPlan/monthInfo',
|
||||
url: '/out/monthPlan/monthInfo/' + query.id,
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
|
@ -7,6 +7,7 @@
|
||||
<template #title>
|
||||
<span class="menu-title" :title="hasTitle(onlyOneChild.meta.title)">{{ onlyOneChild.meta.title }}</span>
|
||||
<span class="bage" v-if="onlyOneChild.meta?.title == '我的待办' && total > 0">{{ total }}</span>
|
||||
<span class="bage" v-if="onlyOneChild.meta?.title == '我的抄送' && totalChao > 0">{{ totalChao }}</span>
|
||||
</template>
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
@ -36,7 +37,7 @@ import { isExternal } from '@/utils/validate';
|
||||
import AppLink from './Link.vue';
|
||||
import { getNormalPath } from '@/utils/ruoyi';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
import { pageByTaskWait } from '@/api/workflow/task';
|
||||
import { pageByTaskWait, pageByTaskCopy } from '@/api/workflow/task';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useNoticeStore from '@/store/modules/notice';
|
||||
const userStore = useUserStore();
|
||||
@ -56,21 +57,27 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
const total = ref(0);
|
||||
const totalChao = ref(0);
|
||||
onMounted(() => {
|
||||
if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') {
|
||||
console.log(44444444);
|
||||
if (onlyOneChild.value.meta?.title == '我的待办') {
|
||||
getWaitingList();
|
||||
}
|
||||
if (onlyOneChild.value.meta?.title == '我的抄送') {
|
||||
getChaoList();
|
||||
}
|
||||
});
|
||||
// 获取我的待办
|
||||
//分页
|
||||
const getWaitingList = () => {
|
||||
pageByTaskWait({ pageNum: 1, pageSize: 10 }).then((resp) => {
|
||||
console.log(resp);
|
||||
|
||||
total.value = resp.total;
|
||||
});
|
||||
};
|
||||
// 获取我的抄送
|
||||
const getChaoList = () => {
|
||||
pageByTaskCopy({ pageNum: 1, pageSize: 10 }).then((resp) => {
|
||||
totalChao.value = resp.total;
|
||||
});
|
||||
};
|
||||
const onlyOneChild = ref<any>({});
|
||||
|
||||
const hasOneShowingChild = (parent: RouteRecordRaw, children?: RouteRecordRaw[]) => {
|
||||
|
@ -29,7 +29,13 @@
|
||||
<el-table-column prop="plannedBiddingTime" align="center">
|
||||
<template #header> <span style="color: red">*</span>计划招标时间 </template>
|
||||
<template #default="scope">
|
||||
<el-date-picker v-model="scope.row.plannedBiddingTime" type="date" value-format="YYYY-MM-DD" placeholder="选择时间" />
|
||||
<el-date-picker
|
||||
v-model="scope.row.plannedBiddingTime"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择时间"
|
||||
:disabled="scope.row.status == 0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="操作" align="center">
|
||||
@ -143,9 +149,11 @@
|
||||
(scope.row.selectNum ? Number(scope.row.selectNum) : 0) ==
|
||||
0
|
||||
? ''
|
||||
: (scope.row.quantity ? Number(scope.row.quantity) : 0) -
|
||||
(scope.row.selectNum ? Number(scope.row.selectNum) : 0) -
|
||||
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0)
|
||||
: (
|
||||
(scope.row.quantity ? Number(scope.row.quantity) : 0) -
|
||||
(scope.row.selectNum ? Number(scope.row.selectNum) : 0) -
|
||||
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0)
|
||||
).toFixed(2)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -24,7 +24,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contractType">
|
||||
<el-select v-model="form.contractType" placeholder="请选择合同类型">
|
||||
<el-option v-for="item in income_contract_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in income_contract_type" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业主单位" prop="contractOwner">
|
||||
@ -37,17 +38,15 @@
|
||||
<editor v-model="form.contractedContent" :min-height="192" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同金额" prop="amount">
|
||||
<el-input
|
||||
v-model="form.amount"
|
||||
placeholder="请输入合同金额"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
||||
/>
|
||||
<el-input v-model="form.amount" placeholder="请输入合同金额"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<FileUpload :multiple="true" :fileType="['pdf']" :onUploadSuccess="onUploadSuccess" :ref="fileRef" :defaultFileList="tempFileList" />
|
||||
<FileUpload :multiple="true" :fileType="['pdf']" :onUploadSuccess="onUploadSuccess" :ref="fileRef"
|
||||
:defaultFileList="tempFileList" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
@ -61,35 +60,36 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contractType">
|
||||
<el-select v-model="form.contractType" placeholder="请选择合同类型">
|
||||
<el-option v-for="item in expenses_contract_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in expenses_contract_type" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="招标计划" prop="tenderId">
|
||||
<!-- <el-input v-model="form.tenderId" placeholder="请输入招标Id" /> -->
|
||||
<el-input v-model="form.name" placeholder="请选择招标计划" disabled />
|
||||
<el-button type="primary" @click="handleChoose" v-hasPermi="['ctr:expensesContract:tenderList']">选择招标</el-button>
|
||||
<el-button type="primary" @click="handleChoose"
|
||||
v-hasPermi="['ctr:expensesContract:tenderList']">选择招标</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="contractSupplier">
|
||||
<el-input v-model="form.contractSupplier" placeholder="请输入供应商" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="分包内容">
|
||||
<!-- <editor v-model="form.contractedContent" :min-height="192" disabled /> -->
|
||||
<el-input v-model="form.contractedContent" style="width: 300px" :autosize="{ minRows: 2, maxRows: 4 }" type="textarea" disabled />
|
||||
<el-input v-model="form.contractedContent" style="width: 300px" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同金额" prop="amount">
|
||||
<el-input
|
||||
oninput="value=value.replace(/[^0-9.]/g,'').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
|
||||
v-model="form.amount"
|
||||
placeholder="请输入合同金额"
|
||||
disabled
|
||||
/>
|
||||
v-model="form.amount" placeholder="请输入合同金额" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同附件">
|
||||
<FileUpload :multiple="true" :fileType="['pdf']" :onUploadSuccess="onUploadSuccess" :ref="fileRef" :defaultFileList="tempFileList" />
|
||||
<FileUpload :multiple="true" :fileType="['pdf']" :onUploadSuccess="onUploadSuccess" :ref="fileRef"
|
||||
:defaultFileList="tempFileList" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
@ -208,7 +208,7 @@ const payRatioComputed = computed({
|
||||
return total;
|
||||
},
|
||||
// 只读
|
||||
set: () => {}
|
||||
set: () => { }
|
||||
});
|
||||
const checkContractType = (type) => {
|
||||
contract_type.value = type;
|
||||
@ -280,7 +280,6 @@ const resetForm = () => {
|
||||
};
|
||||
fileList.value = [];
|
||||
tempFileList.value = [];
|
||||
contract_type.value = '';
|
||||
setTimeout(() => {
|
||||
localStorage.removeItem('tempContractForm');
|
||||
}, 0);
|
||||
@ -399,6 +398,7 @@ const getInfoByProjectIdList = async () => {
|
||||
form.value.contractOwner = res.data.planDuration;
|
||||
};
|
||||
onMounted(() => {
|
||||
contract_type.value = '';
|
||||
getInfoByProjectIdList();
|
||||
|
||||
const tempForm = localStorage.getItem('tempContractForm');
|
||||
|
@ -93,11 +93,10 @@
|
||||
>审核通知单</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.status != 'draft'"
|
||||
v-if="scope.row.status != 'draft' || scope.row.auditStatus != 'draft'"
|
||||
type="success"
|
||||
link
|
||||
icon="View"
|
||||
v-hasPermi="['design:designChange:query']"
|
||||
@click="handleViewDetail(scope.row)"
|
||||
>查看通知单</el-button
|
||||
>
|
||||
@ -113,8 +112,7 @@
|
||||
type="warning"
|
||||
link
|
||||
icon="View"
|
||||
v-hasPermi="['design:drawingreviewReceipts:list']"
|
||||
v-if="scope.row.status != 'draft'"
|
||||
v-if="scope.row.status != 'draft' || scope.row.auditStatus != 'draft'"
|
||||
@click="handleViewHistory(scope.row)"
|
||||
>查看单据</el-button
|
||||
>
|
||||
|
@ -121,10 +121,10 @@
|
||||
</div> -->
|
||||
|
||||
<div class="info-item">
|
||||
<span class="info-label">更新时间</span>
|
||||
<span class="info-label">上传时间</span>
|
||||
<div class="info-value mt-0.5 flex items-center">
|
||||
<i class="fa fa-calendar-o text-gray-400 dark:text-gray-500 mr-1.5"></i>
|
||||
{{ info.updateTime || '未更新' }}
|
||||
{{ info.createTime || '暂无' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -68,6 +68,7 @@
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeCatalog:listFile']"
|
||||
>查看文件</el-button
|
||||
>
|
||||
<el-badge v-if="scope.row.fileCount" :value="scope.row.fileCount" class="item" type="danger"> </el-badge>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外部意见" align="center">
|
||||
@ -153,8 +154,8 @@
|
||||
<el-form-item v-if="uploadForm.type == '3'" label="蓝图" prop="fileIds">
|
||||
<file-upload :fileType="['pdf']" :isShowTip="false" :fileSize="100" v-model="uploadForm.fileIds"></file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="uploadForm.type == '3'" label="抄送人">
|
||||
<el-select multiple filterable clearable v-model="form.userIds" placeholder="请选择抄送人">
|
||||
<el-form-item v-if="uploadForm.type == '3'" label="通知人">
|
||||
<el-select multiple filterable clearable v-model="form.userIds" placeholder="请选择通知人">
|
||||
<el-option :value="item.userId" v-for="item in userCoryList" :key="item.userId" :label="item.nickName + '-' + item.phonenumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -171,8 +172,8 @@
|
||||
<!-- 查看文件列表 -->
|
||||
<el-dialog draggable title="图纸列表" v-model="viewVisible" width="1000px">
|
||||
<el-tabs type="border-card" v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="蓝图" name="3"
|
||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
<el-tab-pane label="蓝图" name="3">
|
||||
<TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
<template #operation="{ row }">
|
||||
<el-button
|
||||
link
|
||||
@ -195,10 +196,10 @@
|
||||
>查看单据</el-button
|
||||
>
|
||||
</template>
|
||||
</TableContent></el-tab-pane
|
||||
>
|
||||
<el-tab-pane label="过程图纸 " name="1"
|
||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
</TableContent>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="过程图纸 " name="1">
|
||||
<TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
<template #operation="{ row }">
|
||||
<el-button link type="primary" icon="edit" @click="handleAudit(row)" v-if="row.auditStatus == 'draft' || row.auditStatus == 'back'"
|
||||
>审核</el-button
|
||||
@ -216,15 +217,15 @@
|
||||
>查看单据</el-button
|
||||
>
|
||||
</template>
|
||||
</TableContent></el-tab-pane
|
||||
>
|
||||
<el-tab-pane label="作废 " name="4"
|
||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
</TableContent>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="作废 " name="4">
|
||||
<TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
<template #operation="{ row }">
|
||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
||||
</template>
|
||||
</TableContent></el-tab-pane
|
||||
>
|
||||
</TableContent>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template #footer>
|
||||
<span>
|
||||
@ -644,22 +645,29 @@ const getVolumeFileList = async (type) => {
|
||||
}
|
||||
};
|
||||
const exportFile = () => {
|
||||
// 导出模版文件
|
||||
try {
|
||||
// 创建a标签
|
||||
const link = document.createElement('a');
|
||||
// 设置PDF文件路径 - 相对于public目录
|
||||
link.href = '/catalog.xlsx';
|
||||
// 设置下载后的文件名
|
||||
link.download = '设计出图计划导入模版.xlsx';
|
||||
// 触发点击
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
// 清理
|
||||
document.body.removeChild(link);
|
||||
} catch (error) {
|
||||
alert('下载失败,请重试');
|
||||
}
|
||||
proxy?.download(
|
||||
'/design/volumeCatalog/exportExcel',
|
||||
{
|
||||
projectId: currentProject.value?.id
|
||||
},
|
||||
`设计出图计划导入模版.xlsx`
|
||||
);
|
||||
// // 导出模版文件
|
||||
// try {
|
||||
// // 创建a标签
|
||||
// const link = document.createElement('a');
|
||||
// // 设置PDF文件路径 - 相对于public目录
|
||||
// link.href = '/catalog.xlsx';
|
||||
// // 设置下载后的文件名
|
||||
// link.download = '设计出图计划导入模版.xlsx';
|
||||
// // 触发点击
|
||||
// document.body.appendChild(link);
|
||||
// link.click();
|
||||
// // 清理
|
||||
// document.body.removeChild(link);
|
||||
// } catch (error) {
|
||||
// alert('下载失败,请重试');
|
||||
// }
|
||||
};
|
||||
// 切换
|
||||
const handleClick = (val) => {
|
||||
@ -699,6 +707,7 @@ onUnmounted(() => {
|
||||
border-collapse: collapse; //合并为一个单一的边框
|
||||
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
||||
}
|
||||
|
||||
thead {
|
||||
tr {
|
||||
th {
|
||||
@ -708,16 +717,19 @@ onUnmounted(() => {
|
||||
letter-spacing: 5px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: left;
|
||||
height: 35px; //设置单元格最小高度
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.th-bg {
|
||||
background-color: rgba(247, 247, 247, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
tr {
|
||||
td {
|
||||
@ -725,6 +737,7 @@ onUnmounted(() => {
|
||||
height: 40px; //设置单元格最小高度
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
th {
|
||||
height: 35px; //设置单元格最小高度
|
||||
text-align: center;
|
||||
@ -733,6 +746,7 @@ onUnmounted(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-content {
|
||||
box-shadow: 0px 0px 10px #ddd;
|
||||
padding: 20px;
|
||||
|
@ -1,17 +1,63 @@
|
||||
<template>
|
||||
<div class="p5" style="width: 100%; height: calc(100vh - 84px)" v-loading="loading">
|
||||
<!-- 返回按钮区域 -->
|
||||
<div style="position: absolute; top: 20px; left: 20px; z-index: 100; display: flex; gap: 10px">
|
||||
<el-button type="primary" icon="ArrowLeft" @click="handleBack">返回</el-button>
|
||||
<el-button type="success" icon="Play" @click="handleStart">开始</el-button>
|
||||
<el-button type="warning" icon="Pause" @click="handleStop">停止</el-button>
|
||||
</div>
|
||||
<div id="TrajectoryEarth" style="width: 100%; height: 100%"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="equipmentGPS">
|
||||
import { ref, onMounted, onUnmounted } from 'vue';
|
||||
import { ElButton } from 'element-plus';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router'; // 补充导入useRouter
|
||||
import { getFootNote } from '@/api/equipment/index';
|
||||
import { ModelPathMover } from './index.js';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter(); // 初始化router
|
||||
const loading = ref(true);
|
||||
let modelMover = null;
|
||||
|
||||
// 返回上一页
|
||||
const handleBack = () => {
|
||||
router.back();
|
||||
};
|
||||
|
||||
// 开始轨迹运动
|
||||
const handleStart = () => {
|
||||
if (modelMover && typeof modelMover.start === 'function') {
|
||||
try {
|
||||
modelMover.start();
|
||||
ElMessage.success('轨迹已开始播放');
|
||||
} catch (error) {
|
||||
console.error('启动轨迹失败:', error);
|
||||
ElMessage.error('启动轨迹失败');
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('轨迹未初始化,请稍后再试');
|
||||
}
|
||||
};
|
||||
|
||||
// 停止轨迹运动
|
||||
const handleStop = () => {
|
||||
if (modelMover && typeof modelMover.stop === 'function') {
|
||||
try {
|
||||
modelMover.stop();
|
||||
ElMessage.success('轨迹已停止');
|
||||
} catch (error) {
|
||||
console.error('停止轨迹失败:', error);
|
||||
ElMessage.error('停止轨迹失败');
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('轨迹未初始化,请稍后再试');
|
||||
}
|
||||
};
|
||||
|
||||
let earthInstance = null;
|
||||
let data = [
|
||||
{
|
||||
@ -146,34 +192,39 @@ const renderRange = (data) => {
|
||||
}
|
||||
|
||||
try {
|
||||
const positions = data.map((point) => {
|
||||
return Cesium.Cartesian3.fromDegrees(point.locLongitude, point.locLatitude, point.locAltitude || 0);
|
||||
const positions = data.map((item) => {
|
||||
return {
|
||||
lon: item.locLongitude,
|
||||
lat: item.locLatitude,
|
||||
height: item.locAltitude || 0,
|
||||
name: item.name || ''
|
||||
};
|
||||
});
|
||||
|
||||
const entity = earthInstance.viewer.entities.add({
|
||||
polyline: {
|
||||
positions: positions,
|
||||
width: 5,
|
||||
material: Cesium.Color.RED,
|
||||
clampToGround: true
|
||||
}
|
||||
modelMover = new ModelPathMover(window.Earth3.viewer, {
|
||||
// modelUrl: './air.glb', // 模型URL
|
||||
positions: positions,
|
||||
speed: 50, // 移动速度
|
||||
loop: true, // 循环运动
|
||||
iconUrl: '/image/Foot.png', // 模型上方图标
|
||||
baseHeight: 10 // 外部传入的统一高度(米)
|
||||
});
|
||||
|
||||
// 调整视角以适应轨迹
|
||||
earthInstance.viewer.flyTo(entity);
|
||||
window.modelMover = modelMover;
|
||||
} catch (err) {
|
||||
console.error('渲染轨迹失败:', err);
|
||||
ElMessage.error('渲染轨迹失败');
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
onMounted(() => {
|
||||
createEarth();
|
||||
});
|
||||
|
||||
//
|
||||
onUnmounted(() => {
|
||||
if (modelMover) {
|
||||
modelMover.stop(); // 组件卸载时停止轨迹
|
||||
modelMover = null;
|
||||
}
|
||||
if (earthInstance) {
|
||||
earthInstance.destroy();
|
||||
earthInstance = null;
|
||||
|
392
src/views/equipment/index.js
Normal file
392
src/views/equipment/index.js
Normal file
@ -0,0 +1,392 @@
|
||||
export class ModelPathMover {
|
||||
/**
|
||||
* 构造函数
|
||||
* @param {Cesium.Viewer} viewer - Cesium viewer实例
|
||||
* @param {Object} options - 配置选项
|
||||
* @param {Number} [options.baseHeight=0] - 外部传入的统一高度(米),将叠加到所有位置点上
|
||||
*/
|
||||
constructor(viewer, options) {
|
||||
this.viewer = viewer;
|
||||
this.modelUrl = options.modelUrl;
|
||||
this.positions = options.positions || [];
|
||||
this.speed = options.speed || 10; // 米/秒
|
||||
this.loop = options.loop !== undefined ? options.loop : true;
|
||||
this.pathStyle = options.pathStyle || {
|
||||
color: Cesium.Color.YELLOW,
|
||||
width: 3
|
||||
};
|
||||
this.markerStyle = options.markerStyle || {
|
||||
color: Cesium.Color.RED,
|
||||
pixelSize: 10,
|
||||
outlineColor: Cesium.Color.WHITE,
|
||||
outlineWidth: 2
|
||||
};
|
||||
this.iconUrl = options.iconUrl;
|
||||
this.iconSize = options.iconSize || 32;
|
||||
this.iconOffset = options.iconOffset || 0;
|
||||
this.headingOffset = options.headingOffset || 0;
|
||||
// 新增:接收外部传入的统一高度(默认0米)
|
||||
this.baseHeight = options.baseHeight || 0;
|
||||
|
||||
// 内部状态(保持不变)
|
||||
this.modelEntity = null;
|
||||
this.pathEntity = null;
|
||||
this.markerEntities = [];
|
||||
this.iconEntity = null;
|
||||
this.currentIndex = 0;
|
||||
this.isMoving = false;
|
||||
this.lastTime = 0;
|
||||
this.animationFrameId = null;
|
||||
this.currentPosition = null;
|
||||
this.progress = 0;
|
||||
this.modelHeight = 0;
|
||||
|
||||
// 初始化
|
||||
this.init();
|
||||
|
||||
// 调试信息(增加baseHeight打印)
|
||||
console.log('ModelPathMover初始化完成', {
|
||||
positionCount: this.positions.length,
|
||||
speed: this.speed,
|
||||
loop: this.loop,
|
||||
baseHeight: this.baseHeight // 打印传入的统一高度
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化(保持不变)
|
||||
*/
|
||||
init() {
|
||||
if (this.positions.length < 2) {
|
||||
console.warn('至少需要2个位置点才能进行移动');
|
||||
}
|
||||
this.createPath();
|
||||
this.createMarkers();
|
||||
this.createModel();
|
||||
if (this.iconUrl) {
|
||||
this.createIcon();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建模型(修改:叠加baseHeight)
|
||||
*/
|
||||
createModel() {
|
||||
if (this.positions.length === 0) return;
|
||||
|
||||
const firstPos = this.positions[0];
|
||||
// 关键修改:在原始高度基础上叠加baseHeight
|
||||
const finalHeight = (firstPos.height || 0) + this.baseHeight;
|
||||
this.currentPosition = Cesium.Cartesian3.fromDegrees(
|
||||
firstPos.lon,
|
||||
firstPos.lat,
|
||||
finalHeight // 使用叠加后的高度
|
||||
);
|
||||
|
||||
// 初始朝向计算(保持不变)
|
||||
let initialOrientation = Cesium.Transforms.headingPitchRollQuaternion(this.currentPosition, new Cesium.HeadingPitchRoll(0, 0, 0));
|
||||
|
||||
if (this.positions.length > 1) {
|
||||
const nextPos = this.positions[1];
|
||||
// 计算下一个点时同样叠加baseHeight
|
||||
const nextFinalHeight = (nextPos.height || 0) + this.baseHeight;
|
||||
const nextCartesian = Cesium.Cartesian3.fromDegrees(nextPos.lon, nextPos.lat, nextFinalHeight);
|
||||
const heading = this.calculateHeading(this.currentPosition, nextCartesian);
|
||||
initialOrientation = Cesium.Transforms.headingPitchRollQuaternion(this.currentPosition, new Cesium.HeadingPitchRoll(heading, 0, 0));
|
||||
}
|
||||
|
||||
this.modelEntity = this.viewer.entities.add({
|
||||
name: 'Moving Model',
|
||||
position: this.currentPosition,
|
||||
orientation: initialOrientation,
|
||||
model: {
|
||||
uri: this.modelUrl,
|
||||
minimumPixelSize: 64,
|
||||
readyPromise: (model) => {
|
||||
const boundingSphere = model.boundingSphere;
|
||||
if (boundingSphere) {
|
||||
this.modelHeight = boundingSphere.radius * 2;
|
||||
console.log('模型高度检测完成:', this.modelHeight, '米');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建路径(修改:叠加baseHeight)
|
||||
*/
|
||||
createPath() {
|
||||
if (this.positions.length < 2) return;
|
||||
|
||||
// 关键修改:遍历所有点时,给每个点的高度叠加baseHeight
|
||||
const pathPositions = this.positions.map((pos) => {
|
||||
const finalHeight = (pos.height || 0) + this.baseHeight;
|
||||
return Cesium.Cartesian3.fromDegrees(pos.lon, pos.lat, finalHeight);
|
||||
});
|
||||
|
||||
this.pathEntity = this.viewer.entities.add({
|
||||
name: 'Model Path',
|
||||
polyline: {
|
||||
positions: pathPositions,
|
||||
width: this.pathStyle.width,
|
||||
material: this.pathStyle.color,
|
||||
clampToGround: false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建位置标记(修改:叠加baseHeight)
|
||||
*/
|
||||
createMarkers() {
|
||||
this.markerEntities = this.positions.map((pos, index) => {
|
||||
// 关键修改:标记点高度同样叠加baseHeight
|
||||
const finalHeight = (pos.height || 0) + this.baseHeight;
|
||||
const position = Cesium.Cartesian3.fromDegrees(pos.lon, pos.lat, finalHeight);
|
||||
|
||||
const marker = this.viewer.entities.add({
|
||||
name: `Position Marker ${index}`,
|
||||
position: position,
|
||||
point: {
|
||||
color: this.markerStyle.color,
|
||||
pixelSize: this.markerStyle.pixelSize,
|
||||
outlineColor: this.markerStyle.outlineColor,
|
||||
outlineWidth: this.markerStyle.outlineWidth
|
||||
},
|
||||
label: {
|
||||
text: pos.name || `Point ${index + 1}`,
|
||||
font: '14px sans-serif',
|
||||
pixelOffset: new Cesium.Cartesian2(0, -20),
|
||||
fillColor: Cesium.Color.WHITE
|
||||
}
|
||||
});
|
||||
|
||||
return marker;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建模型上方的图标(保持不变)
|
||||
*/
|
||||
createIcon() {
|
||||
this.iconEntity = this.viewer.entities.add({
|
||||
name: 'Model Icon',
|
||||
position: new Cesium.CallbackProperty(() => {
|
||||
return this.adjustCartesianHeight(this.currentPosition, 0.3);
|
||||
}, false),
|
||||
billboard: {
|
||||
image: this.iconUrl,
|
||||
width: this.iconSize,
|
||||
height: this.iconSize,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM
|
||||
},
|
||||
label: {
|
||||
text: 'Model Icon',
|
||||
font: '14px sans-serif',
|
||||
pixelOffset: new Cesium.Cartesian2(0, -40),
|
||||
fillColor: Cesium.Color.WHITE
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 调整笛卡尔坐标的高度(在原有高度基础上叠加指定值)
|
||||
* @param {Cesium.Cartesian3} cartesian - 原始笛卡尔坐标
|
||||
* @param {Number} heightOffset - 要增加的高度值(米,可为负数)
|
||||
* @param {Cesium.Ellipsoid} [ellipsoid=Cesium.Ellipsoid.WGS84] - 参考椭球体
|
||||
* @returns {Cesium.Cartesian3|null} 调整高度后的笛卡尔坐标(失败返回null)
|
||||
*/
|
||||
adjustCartesianHeight(cartesian, heightOffset, ellipsoid = Cesium.Ellipsoid.WGS84) {
|
||||
// 1. 校验输入的笛卡尔坐标是否有效
|
||||
// if (!Cesium.Cartesian3.isValid(cartesian)) {
|
||||
// console.error("无效的笛卡尔坐标,无法调整高度");
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// 2. 笛卡尔坐标 → Cartographic(地理坐标,含弧度经纬度和高度)
|
||||
const cartographic = Cesium.Cartographic.fromCartesian(cartesian, ellipsoid);
|
||||
if (!cartographic) {
|
||||
console.error('笛卡尔坐标转换为Cartographic失败');
|
||||
return null;
|
||||
}
|
||||
|
||||
// 3. 调整高度(在原有高度上叠加offset,可为负数)
|
||||
cartographic.height += heightOffset;
|
||||
// 可选:确保高度不低于0(根据需求决定是否保留)
|
||||
// cartographic.height = Math.max(cartographic.height, 0);
|
||||
|
||||
// 4. Cartographic → 笛卡尔坐标(使用弧度经纬度转换)
|
||||
const adjustedCartesian = Cesium.Cartesian3.fromRadians(
|
||||
cartographic.longitude, // 经度(弧度)
|
||||
cartographic.latitude, // 纬度(弧度)
|
||||
cartographic.height, // 调整后的高度(米)
|
||||
ellipsoid
|
||||
);
|
||||
|
||||
return adjustedCartesian;
|
||||
}
|
||||
/**
|
||||
* 开始移动(保持不变)
|
||||
*/
|
||||
start() {
|
||||
if (this.isMoving) {
|
||||
console.log('模型已经在移动中');
|
||||
return;
|
||||
}
|
||||
if (this.positions.length < 2) {
|
||||
console.error('无法移动:位置点数量不足(至少需要2个)');
|
||||
return;
|
||||
}
|
||||
this.isMoving = true;
|
||||
this.lastTime = performance.now();
|
||||
this.progress = 0;
|
||||
console.log('开始移动,速度:', this.speed, '米/秒');
|
||||
this.animate();
|
||||
}
|
||||
|
||||
/**
|
||||
* 动画循环函数(保持不变)
|
||||
*/
|
||||
animate() {
|
||||
if (!this.isMoving) return;
|
||||
const currentTime = performance.now();
|
||||
const timeDeltaMs = currentTime - this.lastTime;
|
||||
this.lastTime = currentTime;
|
||||
const timeDelta = timeDeltaMs / 1000;
|
||||
this.updatePosition(timeDelta);
|
||||
this.animationFrameId = requestAnimationFrame(() => this.animate());
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止移动(保持不变)
|
||||
*/
|
||||
stop() {
|
||||
if (!this.isMoving) return;
|
||||
this.isMoving = false;
|
||||
console.log('停止移动');
|
||||
if (this.animationFrameId) {
|
||||
cancelAnimationFrame(this.animationFrameId);
|
||||
this.animationFrameId = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新模型位置(修改:叠加baseHeight)
|
||||
*/
|
||||
updatePosition(timeDelta) {
|
||||
if (!this.isMoving) return;
|
||||
const distanceToMove = this.speed * timeDelta;
|
||||
const currentPos = this.positions[this.currentIndex];
|
||||
const nextIndex = (this.currentIndex + 1) % this.positions.length;
|
||||
const nextPos = this.positions[nextIndex];
|
||||
|
||||
// 关键修改:计算当前点和下一点时,均叠加baseHeight
|
||||
const currentFinalHeight = (currentPos.height || 0) + this.baseHeight;
|
||||
const nextFinalHeight = (nextPos.height || 0) + this.baseHeight;
|
||||
|
||||
const currentCartesian = Cesium.Cartesian3.fromDegrees(currentPos.lon, currentPos.lat, currentFinalHeight);
|
||||
const nextCartesian = Cesium.Cartesian3.fromDegrees(nextPos.lon, nextPos.lat, nextFinalHeight);
|
||||
|
||||
// 后续逻辑保持不变
|
||||
const totalDistance = Cesium.Cartesian3.distance(currentCartesian, nextCartesian);
|
||||
if (totalDistance < 0.001) {
|
||||
this.currentIndex = nextIndex;
|
||||
this.progress = 0;
|
||||
this.setModelPosition(nextCartesian, this.getNextPositionCartesian(nextIndex));
|
||||
return;
|
||||
}
|
||||
this.progress += distanceToMove / totalDistance;
|
||||
if (this.progress >= 1.0) {
|
||||
const remainingDistance = (this.progress - 1.0) * totalDistance;
|
||||
this.currentIndex = nextIndex;
|
||||
if (!this.loop && this.currentIndex === this.positions.length - 1) {
|
||||
this.setModelPosition(nextCartesian, null);
|
||||
this.stop();
|
||||
console.log('已到达终点,停止移动');
|
||||
return;
|
||||
}
|
||||
const newTotalDistance = Cesium.Cartesian3.distance(nextCartesian, this.getNextPositionCartesian(this.currentIndex));
|
||||
this.progress = newTotalDistance > 0.001 ? remainingDistance / newTotalDistance : 0;
|
||||
this.setModelPosition(nextCartesian, this.getNextPositionCartesian(this.currentIndex));
|
||||
} else {
|
||||
const newPosition = Cesium.Cartesian3.lerp(currentCartesian, nextCartesian, this.progress, new Cesium.Cartesian3());
|
||||
this.setModelPosition(newPosition, nextCartesian);
|
||||
}
|
||||
this.viewer.scene.requestRender();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下一个位置的笛卡尔坐标(修改:叠加baseHeight)
|
||||
*/
|
||||
getNextPositionCartesian(currentIndex) {
|
||||
const nextIndex = (currentIndex + 1) % this.positions.length;
|
||||
const nextPos = this.positions[nextIndex];
|
||||
// 关键修改:返回下一点时叠加baseHeight
|
||||
const finalHeight = (nextPos.height || 0) + this.baseHeight;
|
||||
return Cesium.Cartesian3.fromDegrees(nextPos.lon, nextPos.lat, finalHeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置模型位置和方向(保持不变)
|
||||
*/
|
||||
setModelPosition(position, targetPosition) {
|
||||
if (!this.modelEntity) return;
|
||||
this.currentPosition = position;
|
||||
this.modelEntity.position.setValue(position);
|
||||
if (targetPosition) {
|
||||
const heading = this.calculateHeading(position, targetPosition);
|
||||
this.modelEntity.orientation.setValue(Cesium.Transforms.headingPitchRollQuaternion(position, new Cesium.HeadingPitchRoll(heading, 0, 0)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算两点之间的朝向(保持不变)
|
||||
*/
|
||||
calculateHeading(from, to) {
|
||||
const fromCartographic = Cesium.Cartographic.fromCartesian(from);
|
||||
const toCartographic = Cesium.Cartographic.fromCartesian(to);
|
||||
const startLat = fromCartographic.latitude;
|
||||
const startLon = fromCartographic.longitude;
|
||||
const endLat = toCartographic.latitude;
|
||||
const endLon = toCartographic.longitude;
|
||||
const dLon = endLon - startLon;
|
||||
const y = Math.sin(dLon) * Math.cos(endLat);
|
||||
const x = Math.cos(startLat) * Math.sin(endLat) - Math.sin(startLat) * Math.cos(endLat) * Math.cos(dLon);
|
||||
let heading = Math.atan2(y, x);
|
||||
heading = (heading + Cesium.Math.TWO_PI) % Cesium.Math.TWO_PI;
|
||||
heading = (heading + this.headingOffset) % Cesium.Math.TWO_PI;
|
||||
return heading;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动设置模型高度(保持不变)
|
||||
*/
|
||||
setModelHeight(height) {
|
||||
this.modelHeight = height;
|
||||
console.log('手动设置模型高度:', height, '米');
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置航向角偏移(保持不变)
|
||||
*/
|
||||
setHeadingOffset(offsetDegrees) {
|
||||
this.headingOffset = Cesium.Math.toRadians(offsetDegrees);
|
||||
console.log('设置航向角偏移:', offsetDegrees, '度');
|
||||
}
|
||||
|
||||
/**
|
||||
* 销毁所有资源(保持不变)
|
||||
*/
|
||||
destroy() {
|
||||
this.stop();
|
||||
if (this.modelEntity) this.viewer.entities.remove(this.modelEntity);
|
||||
if (this.pathEntity) this.viewer.entities.remove(this.pathEntity);
|
||||
this.markerEntities.forEach((marker) => this.viewer.entities.remove(marker));
|
||||
if (this.iconEntity) this.viewer.entities.remove(this.iconEntity);
|
||||
this.modelEntity = null;
|
||||
this.pathEntity = null;
|
||||
this.markerEntities = [];
|
||||
this.iconEntity = null;
|
||||
}
|
||||
}
|
@ -34,13 +34,7 @@
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.8">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="User"
|
||||
:disabled="single"
|
||||
@click="handleBindUser()"
|
||||
v-hasPermi="['gps:equipment:unbindManmachine', 'gps:equipment:bindManmachine']"
|
||||
<el-button type="primary" plain icon="User" :disabled="single" @click="handleBindUser()" v-hasPermi="['gps:equipment:bindManmachine']"
|
||||
>绑定用户</el-button
|
||||
>
|
||||
</el-col>
|
||||
@ -97,11 +91,11 @@
|
||||
type="primary"
|
||||
icon="User"
|
||||
@click="scope.row.type === 1 ? handleUnbindUser(scope.row) : handleBindUser(scope.row)"
|
||||
v-hasPermi="['gps:equipment:unbindManmachine', 'gps:equipment:bindManmachine']"
|
||||
v-hasPermi="scope.row.type === 1 ? ['gps:equipment:unbindManmachine'] : ['gps:equipment:bindManmachine']"
|
||||
>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- 新增:跳转空页面按钮 -->
|
||||
|
||||
<el-tooltip content="足迹" placement="top">
|
||||
<el-button
|
||||
link
|
||||
@ -113,7 +107,14 @@
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="历史记录" placement="top">
|
||||
<el-button link type="primary" icon="Clock" @click="handleOpenHistoryUser(scope.row.clientId, scope.row.userId)"> </el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Clock"
|
||||
@click="handleOpenHistoryUser(scope.row.clientId, scope.row.userId)"
|
||||
v-hasPermi="['gps:equipment:getUserList']"
|
||||
>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -146,9 +147,6 @@
|
||||
<el-option v-for="project in projectList" :key="project.projectId" :label="project.projectName" :value="project.projectId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="bindForm.deviceName" disabled placeholder="设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选择用户" prop="userId" required>
|
||||
<el-select v-model="bindForm.userId" placeholder="请选择用户" clearable>
|
||||
<el-option v-for="user in userList" :key="user.sysUserId" :label="user.userName" :value="user.sysUserId" />
|
||||
@ -175,6 +173,7 @@
|
||||
>
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
<el-table-column label="用户名" align="center" prop="userName" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="状态" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.type === 0 ? 'success' : 'info'" size="small">
|
||||
@ -182,6 +181,19 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="足迹" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Location"
|
||||
v-hasPermi="['gps:equipmentSon:getList']"
|
||||
@click="handleGoToEmptyPage(scope.row.userId, scope.row.projectId, currentHistoryClientId)"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div v-if="!historyUserLoading && historyUserList.length === 0" style="text-align: center; padding: 50px 0">
|
||||
@ -479,6 +491,8 @@ const handleViewAll = () => {
|
||||
};
|
||||
|
||||
const handleGoToEmptyPage = (userId: any, projectId: any, clientId: any) => {
|
||||
console.log('userId:', userId, 'projectId:', projectId, 'clientId:', clientId);
|
||||
|
||||
router.push({
|
||||
path: './equipmentGPS',
|
||||
query: {
|
||||
@ -578,41 +592,53 @@ const handleDelete = async (row?: ExtendedEquipmentVO) => {
|
||||
};
|
||||
|
||||
/** 绑定用户按钮操作 */
|
||||
const handleBindUser = async (row?: EquipmentVO) => {
|
||||
Object.assign(bindForm, {
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
userId: undefined,
|
||||
clientId: row?.clientId,
|
||||
deviceName: undefined
|
||||
});
|
||||
bindUserFormRef.value?.resetFields();
|
||||
userList.value = [];
|
||||
|
||||
const _id = row?.id || ids.value[0];
|
||||
const handleBindUser = async (row: ExtendedEquipmentVO) => {
|
||||
try {
|
||||
const res = await getEquipment(_id);
|
||||
const equipmentData = res.data;
|
||||
bindForm.id = equipmentData.id;
|
||||
bindForm.deviceName = equipmentData.deviceName;
|
||||
bindForm.clientId = row?.clientId || equipmentData.clientId;
|
||||
if (!row) {
|
||||
proxy?.$modal.msgWarning('未获取到设备信息');
|
||||
return;
|
||||
}
|
||||
|
||||
if (row.id === undefined || row.id === null || row.id === '') {
|
||||
proxy?.$modal.msgWarning('设备ID不能为空');
|
||||
return;
|
||||
}
|
||||
const deviceId = Number(row.id);
|
||||
if (isNaN(deviceId) || deviceId <= 0) {
|
||||
proxy?.$modal.msgWarning(`设备ID格式错误,必须是正整数,当前值: ${row.id}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!row.clientId || typeof row.clientId !== 'string' || row.clientId.trim() === '') {
|
||||
proxy?.$modal.msgWarning(`设备标识clientId格式错误,必须是非空字符串,当前值: ${row.clientId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// 初始化表单
|
||||
Object.assign(bindForm, {
|
||||
id: deviceId,
|
||||
projectId: undefined,
|
||||
userId: undefined,
|
||||
clientId: row.clientId,
|
||||
deviceName: row.deviceName || '未知设备'
|
||||
});
|
||||
bindUserFormRef.value?.resetFields();
|
||||
userList.value = [];
|
||||
|
||||
// 加载项目和用户数据
|
||||
if (projectList.value.length === 0) {
|
||||
await getProjects();
|
||||
}
|
||||
|
||||
if (equipmentData.projectId) {
|
||||
bindForm.projectId = equipmentData.projectId;
|
||||
await getUsersByProjectId(equipmentData.projectId);
|
||||
} else if (currentProject.value?.id) {
|
||||
if (currentProject.value?.id) {
|
||||
bindForm.projectId = currentProject.value.id;
|
||||
await getUsersByProjectId(currentProject.value.id);
|
||||
}
|
||||
|
||||
bindDialogVisible.value = true;
|
||||
} catch (error) {
|
||||
console.error('获取绑定用户信息失败:', error);
|
||||
proxy?.$modal.msgError('获取数据失败,请重试');
|
||||
console.error('打开绑定用户对话框失败:', error);
|
||||
proxy?.$modal.msgError('操作失败,请重试');
|
||||
}
|
||||
};
|
||||
|
||||
@ -628,17 +654,9 @@ const submitBindUser = () => {
|
||||
|
||||
bindButtonLoading.value = true;
|
||||
try {
|
||||
const bindData = {
|
||||
id: bindForm.id,
|
||||
projectId: bindForm.projectId,
|
||||
userId: bindForm.userId,
|
||||
clientId: bindForm.clientId,
|
||||
deviceName: bindForm.deviceName
|
||||
};
|
||||
|
||||
console.log('提交绑定用户参数:', bindData);
|
||||
|
||||
await bindUser(bindData);
|
||||
// 直接使用bindForm数据调用bindUser接口
|
||||
console.log('提交绑定用户参数:', bindForm);
|
||||
await bindUser(bindForm);
|
||||
proxy?.$modal.msgSuccess('用户绑定成功');
|
||||
bindDialogVisible.value = false;
|
||||
await getList();
|
||||
@ -718,6 +736,8 @@ const handleOpenHistoryUser = async (clientId: string | number | undefined, curr
|
||||
historyUserDialogVisible.value = true;
|
||||
historyUserLoading.value = true;
|
||||
historyUserList.value = [];
|
||||
// 保存当前clientId用于足迹操作
|
||||
currentHistoryClientId.value = clientId;
|
||||
|
||||
try {
|
||||
const res = await gethistroyUser({
|
||||
@ -742,6 +762,27 @@ const handleOpenHistoryUser = async (clientId: string | number | undefined, curr
|
||||
}
|
||||
};
|
||||
|
||||
/** 历史弹窗中的足迹操作 */
|
||||
const handleFootprintOperation = () => {
|
||||
if (!historyUserList.value || historyUserList.value.length === 0) {
|
||||
proxy?.$modal.msgWarning('暂无用户数据,无法查看足迹');
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取第一个用户的数据(通常是当前绑定用户)
|
||||
const firstUser = historyUserList.value[0];
|
||||
if (!firstUser.sysUserId) {
|
||||
proxy?.$modal.msgWarning('用户ID不存在,无法查看足迹');
|
||||
return;
|
||||
}
|
||||
|
||||
// 跳转到足迹页面
|
||||
handleGoToEmptyPage(firstUser.sysUserId, firstUser.projectId || currentProject.value?.id, currentHistoryClientId.value);
|
||||
};
|
||||
|
||||
// 当前历史弹窗的clientId
|
||||
const currentHistoryClientId = ref('');
|
||||
|
||||
/** 页面挂载时初始化 */
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
@ -1,6 +1,7 @@
|
||||
<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" label-width="100px">
|
||||
@ -11,25 +12,15 @@
|
||||
<el-input v-model="queryParams.formalitiesId" placeholder="请输入手续办理清单模板id" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="计划开始时间" prop="planTheStartTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.planTheStartTime"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择计划开始时间"
|
||||
/>
|
||||
<el-date-picker clearable v-model="queryParams.planTheStartTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择计划开始时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="head">
|
||||
<el-input v-model="queryParams.head" placeholder="请输入负责人" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际完成时间" prop="actualCompletionTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.actualCompletionTime"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择实际完成时间"
|
||||
/>
|
||||
<el-date-picker clearable v-model="queryParams.actualCompletionTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择实际完成时间" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="手续材料" prop="formalitiesUrl">
|
||||
<el-input v-model="queryParams.formalitiesUrl" placeholder="请输入手续材料" clearable @keyup.enter="handleQuery" />
|
||||
@ -47,19 +38,21 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['formalities:formalitiesAreConsolidated:getTree']"
|
||||
>新增</el-button
|
||||
>
|
||||
<span style="margin-left: 10px"
|
||||
><el-tooltip class="box-item" effect="dark" content="从原有模板列表选择新增" placement="top">
|
||||
<el-icon color="#409efc"><WarningFilled /></el-icon> </el-tooltip
|
||||
></span>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd()"
|
||||
v-hasPermi="['formalities:formalitiesAreConsolidated:getTree']">新增</el-button>
|
||||
<span style="margin-left: 10px"><el-tooltip class="box-item" effect="dark" content="从原有模板列表选择新增"
|
||||
placement="top">
|
||||
<el-icon color="#409efc">
|
||||
<WarningFilled />
|
||||
</el-icon> </el-tooltip></span>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-hasPermi="['formalities:listOfFormalities:list']">
|
||||
<el-button type="primary" plain icon="Plus" @click="addTemplate()">新增数据</el-button>
|
||||
<span style="margin-left: 10px">
|
||||
<el-tooltip class="box-item" effect="dark" content="创建新模板并添加数据" placement="top">
|
||||
<el-icon color="#409efc"><WarningFilled /></el-icon>
|
||||
<el-icon color="#409efc">
|
||||
<WarningFilled />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</el-col>
|
||||
@ -78,7 +71,8 @@
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="formalitiesAreConsolidatedList" @selection-change="handleSelectionChange" row-key="id" default-expand-all>
|
||||
<el-table v-loading="loading" :data="formalitiesAreConsolidatedList" @selection-change="handleSelectionChange"
|
||||
row-key="id" default-expand-all>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="手续办理清单模板父级" align="center" prop="formalitiesPname" /> -->
|
||||
<el-table-column label="手续办理清单" align="left" prop="formalitiesName" />
|
||||
@ -101,51 +95,52 @@
|
||||
<el-table-column label="办理状态" align="center" prop="processingStatus" />
|
||||
<el-table-column label="手续材料" align="center" prop="formalitiesUrl" width="180">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" :underline="false" @click="handlePreview(scope.row)" target="_blank" v-if="scope.row.formalitiesPid"
|
||||
>查看</el-link
|
||||
>
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
|
||||
|
||||
<div>
|
||||
<el-link type="primary" :underline="false" @click="handlePreview(scope.row)" target="_blank"
|
||||
v-if="scope.row.formalitiesPid">查看</el-link>
|
||||
</div>
|
||||
<div>
|
||||
<el-badge v-if="scope.row.fileCount" :value="scope.row.fileCount" class="item" type="danger">
|
||||
</el-badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.formalitiesPid">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
v-if="scope.row.processingStatus != '已完成'"
|
||||
<el-button link type="primary" icon="Edit" v-if="scope.row.processingStatus != '已完成'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Upload" v-if="scope.row.processingStatus != '已完成'" @click="handleUpload(scope.row)"
|
||||
>上传</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="EditPen"
|
||||
@click="handleUpdateStatus(scope.row)"
|
||||
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']"
|
||||
>修改状态</el-button
|
||||
>
|
||||
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Upload" v-if="scope.row.processingStatus != '已完成'"
|
||||
@click="handleUpload(scope.row)">上传</el-button>
|
||||
<el-button link type="primary" icon="EditPen" @click="handleUpdateStatus(scope.row)"
|
||||
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']">修改状态</el-button>
|
||||
</div>
|
||||
</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 :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="formalitiesAreConsolidatedFormRef" :model="form" :rules="rules" label-width="160px">
|
||||
<el-form-item label="计划开始时间" prop="planTheStartTime">
|
||||
<el-date-picker clearable v-model="form.planTheStartTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择计划开始时间">
|
||||
<el-date-picker clearable v-model="form.planTheStartTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择计划开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划完成时间" prop="planTheStartTime">
|
||||
<el-date-picker clearable v-model="form.planTheEndTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择计划完成时间">
|
||||
<el-date-picker clearable v-model="form.planTheEndTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择计划完成时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="head">
|
||||
@ -167,24 +162,20 @@
|
||||
<el-table :data="fileList" style="width: 100%" border v-loading="fileLoading">
|
||||
<el-table-column prop="fileName" label="文件" align="center">
|
||||
<template #default="scope">
|
||||
<el-link :key="scope.row.annexUrl" :href="scope.row.annexUrl" target="_blank" type="primary" :underline="false">
|
||||
<el-link :key="scope.row.annexUrl" :href="scope.row.annexUrl" target="_blank" type="primary"
|
||||
:underline="false">
|
||||
{{ scope.row.fileName || '查看文件' }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="90" align="center" v-if="fileStatus != '1'">
|
||||
<el-table-column label="操作" align="center" v-if="fileStatus != '1'">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" link icon="Delete" @click="handleDeleteFile(scope.row)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="fileTotal > 0"
|
||||
:total="fileTotal"
|
||||
v-model:page="fileParams.pageNum"
|
||||
v-model:limit="fileParams.pageSize"
|
||||
@pagination="getFileList"
|
||||
/>
|
||||
<pagination v-show="fileTotal > 0" :total="fileTotal" v-model:page="fileParams.pageNum"
|
||||
v-model:limit="fileParams.pageSize" @pagination="getFileList" />
|
||||
<template #footer>
|
||||
<span>
|
||||
<el-button type="primary" @click="viewVisible = false">关闭</el-button>
|
||||
@ -194,18 +185,9 @@
|
||||
<!-- 上传文件对话框 -->
|
||||
<el-dialog draggable title="上传文件" v-model="fileVisible" width="450">
|
||||
<el-form-item label="上传文件" prop="processingStatus">
|
||||
<file-upload
|
||||
v-model="file"
|
||||
ref="uploadRef"
|
||||
uploadUrl="/formalities/formalitiesAnnex"
|
||||
v-hasPermi="['formalities:formalitiesAnnex:add']"
|
||||
:data="{ formalitiesId: form.id }"
|
||||
:fileType="['pdf']"
|
||||
:auto-upload="false"
|
||||
showFileList
|
||||
method="put"
|
||||
:onUploadSuccess="handleUploadSuccess"
|
||||
/>
|
||||
<file-upload v-model="file" ref="uploadRef" uploadUrl="/formalities/formalitiesAnnex"
|
||||
v-hasPermi="['formalities:formalitiesAnnex:add']" :data="{ formalitiesId: form.id }" :fileType="['pdf']"
|
||||
:auto-upload="false" showFileList method="put" :onUploadSuccess="handleUploadSuccess" />
|
||||
</el-form-item>
|
||||
<template #footer>
|
||||
<span>
|
||||
@ -233,21 +215,19 @@
|
||||
</el-dialog>
|
||||
<el-dialog title="新增合规性手续合账" v-model="templateVisbile" width="450">
|
||||
<el-form-item label="合规性手续模板">
|
||||
<el-cascader
|
||||
v-model="tempValue"
|
||||
:options="tempTreeList"
|
||||
:props="{
|
||||
multiple: true,
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
disabled: (node: any) => {
|
||||
return (node.pid == 0 && !node.children.length) || node.status == 1; // 有 parent 的是二级,没有 parent 的是一级,禁用一级
|
||||
}
|
||||
}"
|
||||
/>
|
||||
<el-cascader v-model="tempValue" :options="tempTreeList" :props="{
|
||||
multiple: true,
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
disabled: (node: any) => {
|
||||
return (node.pid == 0 && !node.children.length) || node.status == 1; // 有 parent 的是二级,没有 parent 的是一级,禁用一级
|
||||
}
|
||||
}" />
|
||||
<div style="margin-left: 10px; display: flex; justify-content: center; align-items: center">
|
||||
<el-tooltip class="box-item" effect="dark" content="列表上已选择得模版不可再选" placement="top">
|
||||
<el-icon><WarningFilled /></el-icon>
|
||||
<el-icon>
|
||||
<WarningFilled />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -268,7 +248,8 @@
|
||||
<el-option v-for="item in listOfFormalitiesList" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="formalitiesName" :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
|
||||
<el-form-item label="名称" prop="formalitiesName"
|
||||
:rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
|
||||
<el-input v-model="formTemplate.formalitiesName" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<formalitiesAreConsolidated ref="formalitiesAreConsolidatedRef" class="overlay" v-if="showFormalitiesAreConsolidated" />
|
||||
<formalitiesAreConsolidated ref="formalitiesAreConsolidatedRef" class="overlay"
|
||||
v-if="showFormalitiesAreConsolidated" />
|
||||
<div class="p-2" v-else>
|
||||
<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">
|
||||
@ -21,23 +23,31 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['formalities:listOfFormalities:add']">新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['formalities:listOfFormalities:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" :disabled="multiple" plain icon="Plus" @click="handleOk" v-hasPermi="['formalities:listOfFormalities:add']"
|
||||
>确认</el-button
|
||||
>
|
||||
<el-button type="primary" :disabled="multiple" plain icon="Plus" @click="handleOk"
|
||||
v-hasPermi="['formalities:listOfFormalities:add']">确认</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="listOfFormalitiesList" @selection-change="handleSelectionChange" row-key="id" default-expand-all>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="listOfFormalitiesList"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="id"
|
||||
default-expand-all
|
||||
style="height: calc(100vh - 300px); overflow-y: auto"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="名称" prop="name" />
|
||||
</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 :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="listOfFormalitiesFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
|
@ -1,22 +1,20 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<div class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="材料名称" prop="materialsName">
|
||||
<el-input v-model="queryParams.materialsName" placeholder="请输入材料名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" v-hasPermi="['materials:materialsInventory:list']" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
|
||||
<el-button icon="Refresh" v-hasPermi="['materials:materialsInventory:list']" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -25,275 +23,179 @@
|
||||
导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getTableList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="materialsInventoryList" @expand-change="handleExpandChange">
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<div style="margin-left: 60px">
|
||||
<el-table :data="materialsUseRecordList" border v-loading="loadingChild">
|
||||
<el-table-column label="序号" align="center" type="index" width="60" />
|
||||
<el-table-column label="使用数量" align="center" prop="useNumber" />
|
||||
<el-table-column label="剩余量" align="center" prop="residueNumber" />
|
||||
<el-table-column label="使用部位" align="center" prop="usePart" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="totalChild > 0"
|
||||
:total="totalChild"
|
||||
v-model:page="queryParamsChild.pageNum"
|
||||
v-model:limit="queryParamsChild.pageSize"
|
||||
@pagination="getListChild"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<el-table :data="tableData" row-key="id" border default-expand-all class="custom-table">
|
||||
<el-table-column prop="materialsName" label="物资名称" align="left" class-name="inventory-register" />
|
||||
<el-table-column prop="quantityCount" label="计划数量" align="center" class-name="inventory-register" />
|
||||
<el-table-column label="入库登记" align="center" class-name="inventory-register">
|
||||
<el-table-column prop="supplier" label="供货单位" align="center" class-name="inventory-register" />
|
||||
<el-table-column prop="number" label="数量" align="center" class-name="inventory-register" />
|
||||
<el-table-column prop="operator" label="签收人" align="center" class-name="inventory-register" />
|
||||
<el-table-column prop="enterTime" label="日期" align="center" class-name="inventory-register" />
|
||||
</el-table-column>
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
<el-table-column label="物资名称" align="center" prop="materialsName" />
|
||||
<el-table-column label="计划数量" align="center" prop="quantityCount" />
|
||||
<el-table-column label="入库登记" align="center">
|
||||
<el-table-column label="数量" align="center" prop="number">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.outPut === '0'">{{ scope.row.number }}</span>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签收人" align="center" prop="operator">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.outPut === '0'">{{ scope.row.operator }}</span>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="日期" align="center" prop="outPutTime" width="160">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.outPut === '0'">{{ parseTime(scope.row.outPutTime, '{y}年{m}月{d}日') }}</span>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库登记" align="center" class-name="out-register">
|
||||
<el-table-column prop="recipient" label="接受单位" align="center" class-name="out-register" />
|
||||
<el-table-column prop="outNumber" label="数量" align="center" class-name="out-register" />
|
||||
<el-table-column prop="outOperator" label="出库人" align="center" class-name="out-register" />
|
||||
<el-table-column prop="shipper" label="领用人" align="center" class-name="out-register" />
|
||||
<el-table-column prop="createTime" label="领用日期" align="center" class-name="out-register" />
|
||||
</el-table-column>
|
||||
<el-table-column label="出库登记" align="center">
|
||||
<el-table-column label="交接单位" align="center" prop="recipient" />
|
||||
<el-table-column label="使用部位" align="center" prop="usePart" />
|
||||
<el-table-column label="数量" align="center" prop="number">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.outPut === '1'">{{ scope.row.number }}</span>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库人" align="center" prop="operator">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.outPut === '1'">{{ scope.row.operator }}</span>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用人" align="center" prop="shipper" />
|
||||
<el-table-column label="日期" align="center" prop="outPutTime" width="160">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.outPut === '1'">{{ parseTime(scope.row.outPutTime, '{y}年{m}月{d}日') }}</span>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货剩余登记" align="center" class-name="out-register">
|
||||
<el-table-column prop="residue" label="剩余量" align="center" class-name="out-register" />
|
||||
<el-table-column prop="disposition" label="处理方式" align="center" class-name="out-register" />
|
||||
</el-table-column>
|
||||
<el-table-column label="剩余处理" align="center">
|
||||
<el-table-column label="剩余量" align="center" prop="residue" />
|
||||
<el-table-column label="处理方式" align="center" prop="disposition" />
|
||||
<el-table-column label="使用登记" align="center" class-name="use-register">
|
||||
<el-table-column prop="usePart" label="使用部位" align="center" class-name="use-register" />
|
||||
<el-table-column prop="useNumber" label="使用数量" align="center" class-name="use-register" />
|
||||
<el-table-column prop="useTime" label="使用日期" align="center" class-name="use-register" />
|
||||
<el-table-column prop="residueNumber" label="剩余量" align="center" class-name="use-register" />
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialsInventory:edit']">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['materials:materialsInventory:remove']">
|
||||
删除
|
||||
</el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="备注" align="center" prop="remark" class-name="use-register" />
|
||||
</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="getTableList"
|
||||
/>
|
||||
</el-card>
|
||||
<!-- 添加或修改材料出/入库对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="materialsInventoryFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="出入库状态" prop="outPut">
|
||||
<el-select v-model="form.outPut" clearable placeholder="请输入出入库状态">
|
||||
<el-option v-for="item in out_put_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出/入库的数量" prop="number">
|
||||
<el-input v-model="form.number" placeholder="请输入出/入库的数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出/入库操作时间" prop="outPutTime">
|
||||
<el-date-picker clearable v-model="form.outPutTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择出/入库操作时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="剩余库存数量" prop="residue">
|
||||
<el-input v-model="form.residue" placeholder="请输入剩余库存数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="operator">
|
||||
<el-input v-model="form.operator" placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料出入证明" prop="path">
|
||||
<el-input v-model="form.path" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处理方式" prop="disposition">
|
||||
<el-input v-model="form.disposition" placeholder="请输入处理方式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="交接单位" prop="recipient">
|
||||
<el-input v-model="form.recipient" placeholder="请输入交接单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="领用人" prop="shipper">
|
||||
<el-input v-model="form.shipper" placeholder="请输入领用人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MaterialsInventory" lang="ts">
|
||||
import {
|
||||
addMaterialsInventory,
|
||||
delMaterialsInventory,
|
||||
getMaterialsInventory,
|
||||
listMaterialsInventory,
|
||||
updateMaterialsInventory
|
||||
} from '@/api/materials/materialsInventory';
|
||||
import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
import { listMaterialsUseRecord } from '@/api/materials/materialsUseRecord';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { out_put_type } = toRefs<any>(proxy?.useDict('out_put_type'));
|
||||
<script setup lang="ts">
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { getLedgerList } from '@/api/materials/materialsInventory';
|
||||
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
const userStore = useUserStore();
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const materialsInventoryList = ref<MaterialsInventoryVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const queryFormRef = ref();
|
||||
const queryParams = ref({
|
||||
materialsName: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
});
|
||||
const total = ref(0);
|
||||
const loadingChild = ref(true);
|
||||
const totalChild = ref(0);
|
||||
const materialsUseRecordList = ref<any[]>([]);
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const materialsInventoryFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: MaterialsInventoryForm = {
|
||||
id: undefined,
|
||||
materialsId: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
outPut: undefined,
|
||||
number: undefined,
|
||||
outPutTime: undefined,
|
||||
residue: undefined,
|
||||
operator: undefined,
|
||||
path: undefined,
|
||||
disposition: undefined,
|
||||
recipient: undefined,
|
||||
shipper: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
const data = reactive({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
materialsId: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
outPut: undefined,
|
||||
number: undefined,
|
||||
outPutTime: undefined,
|
||||
residue: undefined,
|
||||
operator: undefined,
|
||||
path: undefined,
|
||||
disposition: undefined,
|
||||
recipient: undefined,
|
||||
shipper: undefined,
|
||||
params: {}
|
||||
},
|
||||
queryParamsChild: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
inventoryId: undefined,
|
||||
usePart: undefined,
|
||||
useNumber: undefined,
|
||||
residueNumber: undefined
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键id不能为空', trigger: 'blur' }],
|
||||
materialsId: [{ required: true, message: '材料id不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules, queryParamsChild } = toRefs(data);
|
||||
const materialsOptions = ref([]);
|
||||
/** 处理外层表格展开/折叠:记录当前展开行的inventoryId */
|
||||
const handleExpandChange = (row: any) => {
|
||||
queryParamsChild.value.inventoryId = row.id;
|
||||
getListChild();
|
||||
};
|
||||
/** 查询材料子级登记列表(内层列表) */
|
||||
const getListChild = async () => {
|
||||
loadingChild.value = true;
|
||||
try {
|
||||
const res = await listMaterialsUseRecord(queryParamsChild.value);
|
||||
materialsUseRecordList.value = res.rows;
|
||||
totalChild.value = res.total;
|
||||
} finally {
|
||||
loadingChild.value = false;
|
||||
const tableRef = ref();
|
||||
const showSearch = ref(true);
|
||||
const loading = ref(false);
|
||||
const tableData = ref([]);
|
||||
//获取列表
|
||||
const getTableList = async () => {
|
||||
const parmas = {
|
||||
...queryParams.value,
|
||||
projectId: currentProject.value.id
|
||||
};
|
||||
const res = await getLedgerList(parmas);
|
||||
if (res.code === 200) {
|
||||
const data = restructureData(res.rows);
|
||||
tableData.value = data;
|
||||
total.value = res.total;
|
||||
}
|
||||
};
|
||||
|
||||
/** 查询材料出/入库列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMaterialsInventory(queryParams.value);
|
||||
materialsInventoryList.value = res.rows;
|
||||
total.value = res.total;
|
||||
const materialsMap = new Map();
|
||||
materialsOptions.value = Array.from(materialsMap.values());
|
||||
loading.value = false;
|
||||
};
|
||||
// 重组数据结构的函数
|
||||
const restructureData = (data) => {
|
||||
return data.map((item) => {
|
||||
const newItem: any = {
|
||||
id: item.id,
|
||||
materialsName: item.materialsName,
|
||||
quantityCount: item.quantityCount,
|
||||
supplier: item.supplier,
|
||||
number: item.number,
|
||||
operator: item.operator,
|
||||
enterTime: item.enterTime,
|
||||
children: []
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
if (item.outList && item.outList.length > 0) {
|
||||
// 处理第一个outList项目
|
||||
const firstOut = item.outList[0];
|
||||
newItem.recipient = firstOut.recipient;
|
||||
newItem.outNumber = firstOut.number;
|
||||
newItem.outOperator = firstOut.operator;
|
||||
newItem.shipper = firstOut.shipper;
|
||||
newItem.createTime = firstOut.createTime;
|
||||
newItem.residue = firstOut.residue;
|
||||
newItem.disposition = firstOut.disposition;
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
materialsInventoryFormRef.value?.resetFields();
|
||||
};
|
||||
// 处理第一个outList中的useList
|
||||
if (firstOut.useList && firstOut.useList.length > 0) {
|
||||
const firstUse = firstOut.useList[0];
|
||||
newItem.usePart = firstUse.usePart;
|
||||
newItem.useNumber = firstUse.useNumber;
|
||||
newItem.useTime = firstUse.createTime;
|
||||
newItem.residueNumber = firstUse.residueNumber;
|
||||
newItem.remark = firstUse.remark;
|
||||
|
||||
// 将剩余的useList项目添加到children
|
||||
for (let i = 1; i < firstOut.useList.length; i++) {
|
||||
const useItem = firstOut.useList[i];
|
||||
newItem.children.push({
|
||||
id: useItem.id,
|
||||
usePart: useItem.usePart,
|
||||
useNumber: useItem.useNumber,
|
||||
useTime: useItem.createTime,
|
||||
residueNumber: useItem.residueNumber,
|
||||
remark: useItem.remark,
|
||||
type: 'use'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 处理剩余的outList项目
|
||||
for (let i = 1; i < item.outList.length; i++) {
|
||||
const outItem = item.outList[i];
|
||||
const outNode: any = {
|
||||
id: outItem.id,
|
||||
recipient: outItem.recipient,
|
||||
outNumber: outItem.number,
|
||||
outOperator: outItem.operator,
|
||||
shipper: outItem.shipper,
|
||||
createTime: outItem.createTime,
|
||||
residue: outItem.residue,
|
||||
disposition: outItem.disposition,
|
||||
type: 'out',
|
||||
children: []
|
||||
};
|
||||
|
||||
// 处理当前outList项目中的useList
|
||||
if (outItem.useList && outItem.useList.length > 0) {
|
||||
const firstUse = outItem.useList[0];
|
||||
outNode.usePart = firstUse.usePart;
|
||||
outNode.useNumber = firstUse.useNumber;
|
||||
outNode.useTime = firstUse.createTime;
|
||||
outNode.residueNumber = firstUse.residueNumber;
|
||||
outNode.remark = firstUse.remark;
|
||||
|
||||
// 将剩余的useList项目添加到children
|
||||
for (let j = 1; j < outItem.useList.length; j++) {
|
||||
const useItem = outItem.useList[j];
|
||||
outNode.children.push({
|
||||
id: useItem.id,
|
||||
usePart: useItem.usePart,
|
||||
useNumber: useItem.useNumber,
|
||||
useTime: useItem.createTime,
|
||||
residueNumber: useItem.residueNumber,
|
||||
remark: useItem.remark,
|
||||
type: 'use'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
newItem.children.push(outNode);
|
||||
}
|
||||
}
|
||||
return newItem;
|
||||
});
|
||||
};
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
getTableList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
@ -302,75 +204,46 @@ const resetQuery = () => {
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: MaterialsInventoryVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: MaterialsInventoryVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getMaterialsInventory(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改材料出/入库';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
materialsInventoryFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
form.value.projectId = currentProject.value?.id;
|
||||
if (form.value.id) {
|
||||
await updateMaterialsInventory(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addMaterialsInventory(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: MaterialsInventoryVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除材料出/入库编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delMaterialsInventory(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
//导出
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'materials/materialsInventory/export',
|
||||
'/materials/materials/export',
|
||||
{
|
||||
...queryParams.value
|
||||
projectId: currentProject.value?.id
|
||||
},
|
||||
`materialsInventory_${new Date().getTime()}.xlsx`
|
||||
`物资跟踪管理台账.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getTableList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 关键样式 - 确保选择器有足够优先级 */
|
||||
.custom-table .el-table__body .inventory-register,
|
||||
.custom-table .el-table__header .inventory-register {
|
||||
background-color: #f0f9ff !important;
|
||||
}
|
||||
|
||||
.custom-table .el-table__body .out-register,
|
||||
.custom-table .el-table__header .out-register {
|
||||
background-color: #f0fff3 !important;
|
||||
}
|
||||
|
||||
.custom-table .el-table__body .use-register,
|
||||
.custom-table .el-table__header .use-register {
|
||||
background-color: #fffaf0 !important;
|
||||
}
|
||||
|
||||
/* 表头样式增强 */
|
||||
.el-table__header th {
|
||||
background-color: #eef1f6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* 操作按钮样式 */
|
||||
.operation-buttons {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="4">
|
||||
<el-col :span="5">
|
||||
<el-card shadow="never">
|
||||
<el-tree style="max-width: 600px" :data="TreeData" :props="defaultProps" @node-click="handleNodeClick" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="20">
|
||||
<el-col :span="19">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> </transition>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
|
@ -37,136 +37,63 @@
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<el-table v-loading="loading" :data="supplierInputList" @selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="index" label="序号" align="center" width="60" />
|
||||
<el-table-column label="企业登记注册类型" align="center" prop="supplierType" width="140" />
|
||||
<el-table-column label="企业名称" align="center" prop="supplierName" width="180" />
|
||||
<el-table-column label="法定代表人" align="center" prop="supplierPerson" width="120" />
|
||||
<el-table-column label="统一社会信用代码" align="center" prop="supplierCode" width="180" />
|
||||
<el-table-column label="负责人" align="center" prop="personName" width="100" />
|
||||
<el-table-column label="负责人电话" align="center" prop="personPhone" width="120" />
|
||||
<el-table-column label="纳税规模" align="center" prop="taxScale" width="120" />
|
||||
<el-table-column label="资质等级" align="center" prop="supplierLivel" width="120" />
|
||||
<el-table-column label="流程状态" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wf_business_status" :value="scope.row.state" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库资料" align="center" prop="inputFile" width="120">
|
||||
<template #default="scope">
|
||||
<el-link v-if="scope.row.inputFile" :href="scope.row.inputFile" target="_blank" :style="{ textDecoration: 'none', color: '#409eff' }">
|
||||
查看文件
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="240">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['supplierInput:supplierInput:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="edit" @click="handleAudit(scope.row)" v-if="scope.row.state == 'draft' || scope.row.state == 'back'"
|
||||
>审核</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="View" v-if="scope.row.state != '2' && scope.row.state != 'draft'" @click="handleAuditView(scope.row)"
|
||||
>查看流程</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['supplierInput:supplierInput: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" />
|
||||
</el-card>
|
||||
<!-- 新增/修改对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="950px" append-to-body>
|
||||
<el-form ref="supplierInputFormRef" :model="form" :rules="rules" label-width="200px">
|
||||
<!-- 第一行:基础信息(2列布局) -->
|
||||
<el-row :gutter="20" class="mb-4">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业登记注册类型" prop="supplierType">
|
||||
<el-select v-model="form.supplierType" placeholder="请选择供应商类型" @change="handleTypeChange">
|
||||
<el-option label="劳务" value="劳务"></el-option>
|
||||
<el-option label="技术服务" value="技术服务"></el-option>
|
||||
<el-option label="物资设备" value="物资设备"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业名称" prop="supplierName">
|
||||
<el-input v-model="form.supplierName" placeholder="请输入企业名称" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 第二行:企业信息 -->
|
||||
<el-row :gutter="20" class="mb-4">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业法定代表人" prop="supplierPerson">
|
||||
<el-input v-model="form.supplierPerson" placeholder="请输入法定代表人" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="统一社会信用代码" prop="supplierCode">
|
||||
<el-input v-model="form.supplierCode" placeholder="请输入统一社会信用代码" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 本地数据懒加载表格 -->
|
||||
<el-table
|
||||
:data="state.tableData"
|
||||
v-loading="state.loading.list"
|
||||
ref="tableRef"
|
||||
stripe
|
||||
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 230px)"
|
||||
row-key="id"
|
||||
border
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
:lazy="true"
|
||||
:load="loadLocalChildNodes"
|
||||
@expand-change="handleExpandChange"
|
||||
>
|
||||
<el-table-column align="center" prop="num" label="编号" />
|
||||
<el-table-column prop="name" label="工程或费用名称" width="180" />
|
||||
<el-table-column prop="unit" label="单位" />
|
||||
<el-table-column prop="specification" label="规格型号" width="80" />
|
||||
<el-table-column prop="quantity" label="数量" width="100" />
|
||||
<el-table-column prop="batchNumber" label="批次号" width="200" />
|
||||
|
||||
<!-- 第三行:地址与联系人 -->
|
||||
<el-row :gutter="20" class="mb-4">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业注册地址" prop="supplierAddres">
|
||||
<el-input v-model="form.supplierAddres" placeholder="请输入注册地址" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人姓名" prop="personName">
|
||||
<el-input v-model="form.personName" placeholder="请输入负责人姓名" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 优化的输入框列 -->
|
||||
<el-table-column prop="brand" label="品牌">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
v-model.lazy="row.brand"
|
||||
:disabled="state.masterData.status != 'draft'"
|
||||
v-if="!row.hasChildren"
|
||||
placeholder=""
|
||||
clearable
|
||||
:key="`brand-${row.id}`"
|
||||
@change="handleInputChange(row, 'brand')"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 第四行:联系电话与纳税规模 -->
|
||||
<el-row :gutter="20" class="mb-4">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人联系电话" prop="personPhone">
|
||||
<el-input v-model="form.personPhone" placeholder="请输入联系电话" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="纳税规模" prop="taxScale">
|
||||
<el-select v-model="form.taxScale" placeholder="请选择纳税规模">
|
||||
<el-option label="一般纳税人" value="一般纳税人"></el-option>
|
||||
<el-option label="小规模纳税人" value="小规模纳税人"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table-column prop="texture" label="材质">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
v-model.lazy="row.texture"
|
||||
:disabled="state.masterData.status != 'draft'"
|
||||
v-if="!row.hasChildren"
|
||||
placeholder=""
|
||||
clearable
|
||||
:key="`texture-${row.id}`"
|
||||
@change="handleInputChange(row, 'texture')"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 第五行:银行信息 -->
|
||||
<el-row :gutter="20" class="mb-4">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行户名" prop="bankPersonName">
|
||||
<el-input v-model="form.bankPersonName" placeholder="请输入开户行户名" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户银行" prop="bankName">
|
||||
<el-input v-model="form.bankName" placeholder="请输入开户银行" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 第六行:银行账号与经营范围 -->
|
||||
<el-row :gutter="20" class="mb-4">
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="visible" title="修改物料信息" :width="800" :close-on-click-modal="false" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="120px" class="space-y-4">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行账号" prop="bankAccount">
|
||||
<el-input v-model="form.bankAccount" placeholder="请输入开户行账号" clearable />
|
||||
|
@ -133,7 +133,7 @@
|
||||
></el-col>
|
||||
<el-col :span="12" :offset="0"
|
||||
><el-form-item label="供应商" prop="supplier">
|
||||
<el-select v-model="form.supplierId" value-key="id" placeholder="请选择供应商" clearable filterable @change="">
|
||||
<el-select v-model="form.supplierId" value-key="id" placeholder="请选择供应商" clearable filterable @change="getPlanList">
|
||||
<el-option v-for="item in supplierOptions" :key="item.id" :label="item.supplierName" :value="item.id"> </el-option>
|
||||
</el-select> </el-form-item
|
||||
></el-col>
|
||||
@ -145,7 +145,14 @@
|
||||
></el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求计划" prop="planId">
|
||||
<el-select v-model="form.planId" value-key="id" placeholder="请选择需求计划" multiple filterable :disabled="!form.mrpBaseId">
|
||||
<el-select
|
||||
v-model="form.planId"
|
||||
value-key="id"
|
||||
placeholder="请选择需求计划"
|
||||
multiple
|
||||
filterable
|
||||
:disabled="!form.mrpBaseId && !form.supplierId"
|
||||
>
|
||||
<el-option v-for="item in planList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||
</el-select> </el-form-item
|
||||
></el-col>
|
||||
@ -190,18 +197,17 @@
|
||||
></el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="selectPlanList" v-if="form.id">
|
||||
<el-table v-loading="loading" :data="selectPlanList">
|
||||
<el-table-column label="物资名称" align="center" prop="name" />
|
||||
|
||||
<el-table-column label="质量标准" align="center" prop="qs" />
|
||||
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||
<el-table-column label="计量单位" align="center" prop="unit" width="80" />
|
||||
<el-table-column label="需求数量" align="center" prop="demandQuantity" v-if="form.docType == 2">
|
||||
<el-table-column label="需求数量" align="center" prop="demandQuantity">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.demandQuantity" placeholder="请输入" type="number" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="需求数量" align="center" prop="demandQuantity" v-else />
|
||||
<!-- <el-table-column label="需求数量" align="center" prop="demandQuantity" v-else /> -->
|
||||
<!-- <el-table-column label="需求到货时间" align="center" prop="arrivalTime" width="250" /> -->
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
@ -357,6 +363,7 @@ const data = reactive({
|
||||
docCode: [{ required: true, message: '采购单编号不能为空', trigger: 'blur' }],
|
||||
planId: [{ required: true, message: '需求计划不能为空', trigger: 'blur' }],
|
||||
mrpBaseId: [{ required: true, message: '需求批次号不能为空', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
|
||||
// 电话号码验证
|
||||
technicalDirectorTel: [
|
||||
{ required: true, message: '请输入电话', trigger: 'blur' },
|
||||
@ -461,9 +468,16 @@ const handleUpdate = async (row?: PurchaseDocVO) => {
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getPurchaseDoc(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
getPlanList();
|
||||
form.value.planId = form.value.associationList?.map((item: any) => item.planId);
|
||||
await getPlanList();
|
||||
|
||||
form.value.planId = form.value.associationList?.map((item: any) => item.planId);
|
||||
planList.value.forEach((item) => {
|
||||
form.value.associationList.forEach((items: any) => {
|
||||
if (item.id == items.planId) {
|
||||
item.demandQuantity = items.demandQuantity;
|
||||
}
|
||||
});
|
||||
});
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改物资-采购联系单';
|
||||
};
|
||||
@ -471,6 +485,7 @@ const handleUpdate = async (row?: PurchaseDocVO) => {
|
||||
const selectPlanList = computed(() => {
|
||||
if (!form.value.planId) return [];
|
||||
const result = planList.value.filter((item) => form.value.planId.includes(item.id));
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
@ -479,11 +494,12 @@ const submitForm = () => {
|
||||
purchaseDocFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
form.value.associationList = form.value.planId?.map((item: any) => ({
|
||||
planId: item
|
||||
}));
|
||||
form.value.associationList = selectPlanList.value;
|
||||
form.value.associationList.forEach((item: any) => {
|
||||
item.planId = item.id;
|
||||
delete item.id;
|
||||
});
|
||||
form.value.supplier = supplierOptions.value.find((item) => item.id == form.value.supplierId)?.supplierName;
|
||||
|
||||
if (form.value.id) {
|
||||
await updatePurchaseDoc(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
@ -498,13 +514,16 @@ const submitForm = () => {
|
||||
|
||||
const getPlanList = async () => {
|
||||
form.value.planId = '';
|
||||
const res = await getBatch({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value?.id,
|
||||
mrpBaseId: form.value.mrpBaseId
|
||||
});
|
||||
planList.value = res.rows;
|
||||
if (form.value.mrpBaseId && form.value.supplierId) {
|
||||
const res = await getBatch({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value?.id,
|
||||
mrpBaseId: form.value.mrpBaseId,
|
||||
supplierId: form.value.supplierId
|
||||
});
|
||||
planList.value = res.rows;
|
||||
}
|
||||
};
|
||||
|
||||
const getBatchList = async () => {
|
||||
|
@ -113,13 +113,7 @@ import { useUserStoreHook } from '@/store/modules/user';
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const month = computed(() => {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0'); // getMonth() 从0开始
|
||||
const currentMonth = `${year}-${month}`;
|
||||
return currentMonth;
|
||||
});
|
||||
const month = '';
|
||||
const monthPlanList = ref<MonthPlanVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
@ -246,7 +240,6 @@ const submitForm = () => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
form.value.isDesign = true;
|
||||
|
||||
if (form.value.id) {
|
||||
await updateMonthPlan(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
@ -270,8 +263,10 @@ const handleDelete = async (row?: MonthPlanVO) => {
|
||||
|
||||
/** 审核按钮操作 */
|
||||
const handleAudit = async (row?: MonthPlanVO) => {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy?.$tab.openPage('/approval/monthPlan/indexEdit', '审核月度产值计划', {
|
||||
planMonth: row?.planMonth,
|
||||
id: row?.id,
|
||||
type: 'update'
|
||||
});
|
||||
};
|
||||
|
@ -104,6 +104,7 @@ import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
import { getMonthInfo, isSubmit } from '@/api/out/monthPlan';
|
||||
import { id } from 'element-plus/es/locale/index.mjs';
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
@ -169,14 +170,12 @@ const getInfo = () => {
|
||||
loading.value = true;
|
||||
buttonLoading.value = false;
|
||||
nextTick(async () => {
|
||||
console.log('🚀 ~ routeParams.value:', routeParams.value.businessId);
|
||||
const projectId = routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : currentProject.value?.id;
|
||||
const res = await getMonthInfo({ projectId: projectId, planMonth: routeParams.value.planMonth });
|
||||
console.log(routeParams.value);
|
||||
// routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : routeParams.value.id;
|
||||
const res = await getMonthInfo({ id: routeParams.value.id.split('_')[0] });
|
||||
form.value = res.data as any;
|
||||
|
||||
console.log('🚀 ~ getInfo ~ form.value:', form.value[0].projectId);
|
||||
form.value[0].mid = form.value[0].id;
|
||||
form.value[0].id = form.value[0].projectId + '_' + form.value[0].planMonth;
|
||||
form.value[0].id = form.value[0].id + '_plan';
|
||||
loading.value = false;
|
||||
buttonLoading.value = false;
|
||||
});
|
||||
@ -196,7 +195,7 @@ const submitFlow = async () => {
|
||||
const handleStartWorkFlow = async (data: LeaveForm) => {
|
||||
try {
|
||||
submitFormData.value.flowCode = flowCode.value;
|
||||
submitFormData.value.businessId = currentProject.value?.id + '_' + form.value[0]?.planMonth;
|
||||
submitFormData.value.businessId = routeParams.value.id + '_plan';
|
||||
|
||||
//流程变量
|
||||
taskVariables.value = {
|
||||
@ -215,8 +214,6 @@ const handleStartWorkFlow = async (data: LeaveForm) => {
|
||||
};
|
||||
//审批记录
|
||||
const handleApprovalRecord = () => {
|
||||
console.log(form.value[0]?.id);
|
||||
|
||||
approvalRecordRef.value.init(form.value[0]?.id);
|
||||
};
|
||||
//提交回调
|
||||
@ -231,20 +228,12 @@ const approvalVerifyOpen = async () => {
|
||||
// 图纸上传成功之后 开始提交
|
||||
const submit = async (status, data) => {
|
||||
form.value = data;
|
||||
console.log(form.value);
|
||||
|
||||
if (status === 'draft') {
|
||||
buttonLoading.value = false;
|
||||
proxy?.$modal.msgSuccess('暂存成功');
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.go(-1);
|
||||
} else {
|
||||
const res = await isSubmit(data[0]?.mid);
|
||||
|
||||
if (!res.data) {
|
||||
proxy?.$modal.msgError('三种计划产值必须填写');
|
||||
return;
|
||||
}
|
||||
if ((form.value[0]?.planAuditStatus === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
||||
flowCode.value = flowCodeOptions[0].value;
|
||||
dialogVisible.visible = true;
|
||||
@ -261,12 +250,9 @@ const submit = async (status, data) => {
|
||||
onMounted(() => {
|
||||
nextTick(async () => {
|
||||
routeParams.value = proxy.$route.query;
|
||||
console.log('🚀 ~ proxy.$route.query:', proxy.$route.query);
|
||||
reset();
|
||||
loading.value = false;
|
||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
||||
console.log('🚀 ~ routeParams.value:', routeParams.value);
|
||||
|
||||
getInfo();
|
||||
}
|
||||
});
|
||||
|
@ -10,7 +10,7 @@
|
||||
<el-form-item label="地块名称" prop="landName">
|
||||
<el-input v-model="queryParams.landName" placeholder="请输入地块名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属村委会" prop="villageCommittee">
|
||||
<!-- <el-form-item label="所属村委会" prop="villageCommittee">
|
||||
<el-input v-model="queryParams.villageCommittee" placeholder="请输入所属村委会" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计面积(亩)" prop="designArea">
|
||||
@ -21,7 +21,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="农户数(户)" prop="farmerCount">
|
||||
<el-input v-model="queryParams.farmerCount" type="number" placeholder="请输入农户数" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
|
@ -667,16 +667,20 @@ const data = reactive<PageData<LandTransferLedgerForm, LandTransferLedgerQuery>>
|
||||
},
|
||||
rules: {
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
landBlockId: [{ required: true, message: '请选择对应地块', trigger: 'change' }],
|
||||
landType: [{ required: true, message: '土地类型不能为空', trigger: 'change' }],
|
||||
transferStatus: [{ required: true, message: '请选择流转台账状态', trigger: 'change' }],
|
||||
designArea: [{ required: true, message: '请输入设计面积', trigger: 'blur' }],
|
||||
responsiblePerson: [{ required: true, message: '请输责任人', trigger: 'blur' }],
|
||||
expectedFinishDate: [{ required: true, message: '请选择预计完成时间', trigger: 'change' }],
|
||||
transferRatio: [
|
||||
// 动态校验:仅已流转状态下必填
|
||||
{
|
||||
required: true,
|
||||
message: '流转比例不能为空',
|
||||
trigger: ['blur', 'change'],
|
||||
validator: (rule, value, callback) => {
|
||||
if (data.form.transferStatus !== '1') {
|
||||
callback(); // 非已流转状态跳过校验
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
if (value === undefined || value === null || value === '') {
|
||||
@ -686,7 +690,6 @@ const data = reactive<PageData<LandTransferLedgerForm, LandTransferLedgerQuery>>
|
||||
}
|
||||
}
|
||||
},
|
||||
// 比例范围校验(0-100)
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value < 0 || value > 100) {
|
||||
@ -746,6 +749,7 @@ const sonSummaryInfo = computed(() => {
|
||||
const lastSelectedParent = ref<LandTransferLedgerVO | null>(null);
|
||||
const sonRules = {
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
parentId: [{ required: true, message: '父级ID不能为空', trigger: 'blur' }],
|
||||
landType: [{ required: true, message: '土地类型不能为空', trigger: 'change' }],
|
||||
transferRatio: [
|
||||
{
|
||||
|
@ -77,7 +77,7 @@
|
||||
</el-form>
|
||||
<div class="box_submit">
|
||||
<el-button size="large" @click="cancel()">取 消</el-button>
|
||||
<el-button size="large" type="primary" @click="submitForm">确 定</el-button>
|
||||
<!-- <el-button size="large" type="primary" @click="submitForm">确 定</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -219,7 +219,7 @@ const removeProject = (projectId: number | string) => {
|
||||
// 提交表单
|
||||
const submitForm = async () => {
|
||||
// 整理项目角色数据
|
||||
if (form.value.projectRoles.length == 0) {
|
||||
if (selectedProjects.value.length == 0) {
|
||||
proxy?.$modal.msgWarning('请选择项目角色');
|
||||
return;
|
||||
}
|
||||
|
@ -59,8 +59,8 @@
|
||||
</transition>
|
||||
<el-card shadow="never" class="mb8">
|
||||
<el-table ref="tableAllRef" v-loading="loading" :data="tableData" row-key="id" border lazy :expand-row-keys="expandRowKeys">
|
||||
<el-table-column prop="num" label="编号" />
|
||||
<el-table-column prop="name" label="工程或费用名称" />
|
||||
<el-table-column prop="num" label="编号" align="center" />
|
||||
<el-table-column prop="name" label="工程或费用名称" align="center" />
|
||||
<el-table-column prop="unit" label="单位" align="center" />
|
||||
|
||||
<el-table-column prop="specification" label="规格" align="center" />
|
||||
@ -92,7 +92,7 @@
|
||||
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxRate" label="税率" width="100">
|
||||
<el-table-column prop="taxRate" label="税率" width="100" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.taxRate !== false ? scope.row.taxRate : '' }}
|
||||
</template>
|
||||
|
@ -198,9 +198,11 @@
|
||||
? activeTab == 2
|
||||
? 0
|
||||
: ''
|
||||
: (scope.row.quantity ? Number(scope.row.quantity) : 0) -
|
||||
(scope.row.selectNum ? Number(scope.row.selectNum) : 0) -
|
||||
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0)
|
||||
: (
|
||||
(scope.row.quantity ? Number(scope.row.quantity) : 0) -
|
||||
(scope.row.selectNum ? Number(scope.row.selectNum) : 0) -
|
||||
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0)
|
||||
).toFixed(2)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -34,15 +34,13 @@
|
||||
<el-table-column :show-overflow-tooltip="true" prop="flowName" align="center" label="流程定义名称"></el-table-column>
|
||||
<el-table-column align="center" prop="flowCode" label="流程定义编码"></el-table-column>
|
||||
<el-table-column align="center" prop="categoryName" label="流程分类"></el-table-column>
|
||||
<el-table-column align="center" prop="version" label="版本号" width="90">
|
||||
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="nodeName" label="任务名称"></el-table-column>
|
||||
<el-table-column align="center" label="流程状态" min-width="70">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="updateTime" label="更新时间" width="150"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="small" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
|
Reference in New Issue
Block a user