生产计划 打印页面 首页数据加载

生产计划 打印页面 首页数据加载
pull/4/head
siontion 8 months ago
parent cb0540b9ab
commit 32e9fe8135

@ -89,7 +89,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="2">是否要工艺:</td> <td colspan="2">是否要工艺:</td>
<td>{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, planData.property) }}</td> <td>{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, planData.hasCraft) }}</td>
<td>开始日期</td> <td>开始日期</td>
<td>{{ formatDate(new Date(planData.craftStartDate), 'YYYY-MM-DD') }}</td> <td>{{ formatDate(new Date(planData.craftStartDate), 'YYYY-MM-DD') }}</td>
<td>结束日期</td> <td>结束日期</td>
@ -120,23 +120,23 @@
<div style="display: flex; flex-direction: column; justify-content: space-between"> <div style="display: flex; flex-direction: column; justify-content: space-between">
<span style="border-bottom: 1px solid #666"> {{item.name}} </span> <span style="border-bottom: 1px solid #666"> {{item.name}} </span>
<span v-if="!item.projectSubShortName">&nbsp;</span> <span v-if="!item.projectSubShortName">&nbsp;</span>
<span v-else>{{item.projectSubShortName}}</span> <span v-else>{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>
</div> </div>
</td> </td>
<td>{{item.compositionName}} </td> <td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>
<td>{{item.amount}} </td> <td>{{item.amount}} </td>
<td>{{ `H13` }} </td> <td>{{ item.compositionName }} </td>
<td> {{ `2024/1/15` }} </td> <td> {{ formatDate(new Date(item.blankDate), 'YYYY-MM-DD') }} </td>
<td style="padding: 0 0"> <td style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between"> <div style="display: flex; flex-direction: column; justify-content: space-between">
<span style="border-bottom: 1px solid #666"> {{ `2024/1/15` }} </span> <span style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.twoDimDate), 'YYYY-MM-DD') }} </span>
<span>{{ `name` }}</span> <span>{{ userInit.find((user) => user.id == item.twoDimOwner)?.nickname }}</span>
</div> </div>
</td> </td>
<td style="padding: 0 0"> <td style="padding: 0 0">
<div style="display: flex; flex-direction: column; justify-content: space-between"> <div style="display: flex; flex-direction: column; justify-content: space-between">
<span style="border-bottom: 1px solid #666"> {{ `2024/1/15` }} </span> <span style="border-bottom: 1px solid #666"> {{ formatDate(new Date(item.threeDimDate), 'YYYY-MM-DD') }} </span>
<span>{{ `name` }}</span> <span>{{ userInit.find((user) => user.id == item.threeDimOwner)?.nickname }}</span>
</div> </div>
</td> </td>
</tr> </tr>
@ -170,7 +170,7 @@
<td colspan="2"> {{formatDate(new Date(its.startDate), 'YYYY-MM-DD')}}</td> <td colspan="2"> {{formatDate(new Date(its.startDate), 'YYYY-MM-DD')}}</td>
<td colspan="2">{{formatDate(new Date(its.endDate), 'YYYY-MM-DD')}} </td> <td colspan="2">{{formatDate(new Date(its.endDate), 'YYYY-MM-DD')}} </td>
<td>{{its.owner}} </td> <td>{{userInit.find((user) => user.id == its.owner)?.nickname}} </td>
<td colspan="2"> {{its.description}}</td> <td colspan="2"> {{its.description}}</td>
</tr> </tr>
</tbody> </tbody>
@ -203,9 +203,9 @@
<td colspan="3">{{formData.approveUserName}}</td> <td colspan="3">{{formData.approveUserName}}</td>
</tr> </tr>
<tr> <tr>
<td colspan="4">{{formatDate(new Date(formData.createTime), 'YYYY-MM-DD')}}</td> <td colspan="4">{{formatDate(new Date(planData.editorDate), 'YYYY-MM-DD')}}</td>
<td colspan="3">{{formatDate(new Date(formData.auditTime), 'YYYY-MM-DD')}}</td> <td colspan="3">{{formatDate(new Date(planData.auditDate), 'YYYY-MM-DD')}}</td>
<td colspan="3">{{formatDate(new Date(formData.approveTime), 'YYYY-MM-DD')}}</td> <td colspan="3">{{formatDate(new Date(planData.approveDate), 'YYYY-MM-DD')}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -358,6 +358,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
// import { ref, reactive } from 'vue' // import { ref, reactive } from 'vue'
import * as EquipApi from '@/api/heli/equip'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import * as PlanApi from '@/api/heli/plan' import * as PlanApi from '@/api/heli/plan'
import * as PlanSubApi from '@/api/heli/plansub' import * as PlanSubApi from '@/api/heli/plansub'
@ -537,8 +538,11 @@ const planData = ref({
craftContent: undefined craftContent: undefined
}) })
const userInit = ref() const userInit = ref()
const equipInit = ref()
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (id: number) => { const open = async (id: number) => {
//
equipInit.value = await EquipApi.getSimpList()
// //
userInit.value = await UserApi.getSimpleUserList() userInit.value = await UserApi.getSimpleUserList()
// //
@ -559,16 +563,17 @@ const open = async (id: number) => {
resetForm() resetForm()
// //
planData.value = await PlanApi.getPlan(id) planData.value = await PlanApi.getPlan(id)
//
await handleInitPlanSub(id)
//
await handleCraftInfo()
formData.value = await ProjectOrderApi.getProjectOrder(planData.value.projectId) formData.value = await ProjectOrderApi.getProjectOrder(planData.value.projectId)
// //
formData.value.projectOrderSubs = await ProjectOrderApi.getProjectOrderSubListByProjectOrderId( formData.value.projectOrderSubs = await ProjectOrderApi.getProjectOrderSubListByProjectOrderId(
planData.value.projectId planData.value.projectId
) )
//
await handleInitPlanSub(id)
//
await handleCraftInfo()
formData.value.customer = await getCustomer(formData.value.customerId) formData.value.customer = await getCustomer(formData.value.customerId)
// / // /
let logParams = { let logParams = {

Loading…
Cancel
Save