基础资料优化处理

main
GaoF 2024-08-08 09:18:36 +08:00
parent f31d914790
commit df6a6b0a99
4 changed files with 39 additions and 18 deletions

View File

@ -5,7 +5,7 @@
</template> </template>
</a-page-header> </a-page-header>
<a-card :bordered="false" title="品牌"> <a-card :bordered="false" title="人员基本信息">
<DynamicForm <DynamicForm
:allDisabled="route.query.type === 'SEARCH'" :allDisabled="route.query.type === 'SEARCH'"
:formItems="baseFormItems" :formItems="baseFormItems"

View File

@ -1,7 +1,7 @@
<template> <template>
<a-page-header style="padding: 10px; font-size: 20px" @back="handleBack('/basicData/unit')"> <a-page-header style="padding: 10px; font-size: 20px" @back="handleBack('/basicData/unit')">
<template #extra> <template #extra>
<a-button key="1" type="primary" @click="onSubmitForm"></a-button> <a-button v-if="route.query.type === 'ADD' " type="primary" @click="onSubmitForm"></a-button>
</template> </template>
</a-page-header> </a-page-header>
<a-card :bordered="false" title="任务单信息"> <a-card :bordered="false" title="任务单信息">
@ -13,7 +13,7 @@
ref="formRef1" ref="formRef1"
> >
<template #materialNameSlot="{ model, item }"> <template #materialNameSlot="{ model, item }">
<a-input readonly v-bind="{ ...item.attrs }" v-model:value="model[item.name]" @click="openMateriel"></a-input> <a-input :disabled="route.query.type === 'SEARCH'" readonly v-bind="{ ...item.attrs }" v-model:value="model[item.name]" @click="openMateriel"></a-input>
</template> </template>
<template #produceUnitNameSlot="{ model, item }"> <template #produceUnitNameSlot="{ model, item }">
<a-select v-bind="{ ...item.attrs }" v-model:value="model[item.name]" :options="unitList"></a-select> <a-select v-bind="{ ...item.attrs }" v-model:value="model[item.name]" :options="unitList"></a-select>
@ -60,6 +60,7 @@
:min="0.01" :min="0.01"
@change="amountChange($event, record)" @change="amountChange($event, record)"
:precision="2" :precision="2"
:disabled="route.query.type === 'SEARCH'"
/> />
</template> </template>
@ -100,7 +101,6 @@
<script setup name="personnelReportDetail"> <script setup name="personnelReportDetail">
import employeeApi from '@/api/base/employee/employeeApi' import employeeApi from '@/api/base/employee/employeeApi'
import employeeCategoryApi from '@/api/base/employee/employeeCategoryApi' import employeeCategoryApi from '@/api/base/employee/employeeCategoryApi'
import manualTaskApi from '@/api/base/manual-task/manualTaskApi' import manualTaskApi from '@/api/base/manual-task/manualTaskApi'
import MaterielSelectorPlus from '@/components/Selector/materielSelectorPlus.vue' import MaterielSelectorPlus from '@/components/Selector/materielSelectorPlus.vue'
@ -152,7 +152,7 @@
type: 'a-input', type: 'a-input',
attrs: { attrs: {
disabled: true, disabled: true,
placeholder: '请输入物料' placeholder: '请输入基本单位'
} }
}, },
{ {
@ -162,7 +162,8 @@
slotName: 'productionLineNameSlot', slotName: 'productionLineNameSlot',
attrs: { attrs: {
placeholder: '请选择生产线', placeholder: '请选择生产线',
allowClear: true allowClear: true,
disabled: route.query.type === 'SEARCH'
} }
}, },
{ {
@ -198,7 +199,11 @@
onMounted(async () => { onMounted(async () => {
fetchData(route.query.type).then(async (res) => { fetchData(route.query.type).then(async (res) => {
if (res) { if (res) {
console.log(res) manualTaskApi.manualTaskDetailPage({
manualTaskId: res.id
}).then(detailPage => {
dataSource.value = detailPage.records
})
} }
}) })
}) })

View File

@ -89,7 +89,7 @@
</a> </a>
</a-tooltip> </a-tooltip>
<a-divider type="vertical" v-if="hasPerm(['customerEdit', 'customerDelete'], 'and')" /> <!-- <a-divider type="vertical" v-if="hasPerm(['customerEdit', 'customerDelete'], 'and')" />
<a-tooltip title="查看"> <a-tooltip title="查看">
<a <a
@click=" @click="
@ -101,7 +101,7 @@
v-if="hasPerm('customerEdit')" v-if="hasPerm('customerEdit')"
> >
<FormOutlined /> <FormOutlined />
<!-- 编辑--> &lt;!&ndash; 编辑&ndash;&gt;
</a> </a>
</a-tooltip> </a-tooltip>
@ -109,9 +109,9 @@
<a-popconfirm title="确定要删除吗?" @confirm="deleteRecord(record)"> <a-popconfirm title="确定要删除吗?" @confirm="deleteRecord(record)">
<a-button type="link" danger size="small" v-if="hasPerm('customerDelete')"> <a-button type="link" danger size="small" v-if="hasPerm('customerDelete')">
<DeleteOutlined /> <DeleteOutlined />
<!-- 删除--> &lt;!&ndash; 删除&ndash;&gt;
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>-->
</a-space> </a-space>
</template> </template>
</template> </template>
@ -135,19 +135,35 @@
ellipsis: true ellipsis: true
}, },
{ {
title: '名称', title: '任务单名称',
dataIndex: 'name', dataIndex: 'materialName',
align: 'center', align: 'center',
resizable: true, resizable: true,
width: 300, width: 300,
ellipsis: true ellipsis: true
}, },
{ {
title: '可用状态', title: '任务单名称',
dataIndex: 'enabledState', dataIndex: 'productionLineName',
align: 'center', align: 'center',
resizable: true, resizable: true,
width: 100, width: 300,
ellipsis: true
},
{
title: '总人数',
dataIndex: 'totalEmployee',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '总金额',
dataIndex: 'totalMoney',
align: 'center',
resizable: true,
width: 300,
ellipsis: true ellipsis: true
}, },
{ {

View File

@ -72,7 +72,7 @@
<a-tooltip title="查看"> <a-tooltip title="查看">
<a <a
@click=" @click="
navigateTo('/basicData/publicAccount/detail', { navigateTo('/task/detail', {
type: 'SEARCH', type: 'SEARCH',
id: record.id id: record.id
}) })
@ -88,7 +88,7 @@
<a-tooltip title="查看"> <a-tooltip title="查看">
<a <a
@click=" @click="
navigateTo('/basicData/publicAccount/detail', { navigateTo('/task/detail', {
type: 'EDIT', type: 'EDIT',
id: record.id id: record.id
}) })