feat:模具组-子模具-添加压网记录

main
黄伟杰 5 days ago
parent 601e22ef86
commit 4ee05ff904

@ -179,6 +179,11 @@ export const MoldBrandApi = {
// 新增压网记录
createPressureNetRecord: async (data: any) => {
return await request.post({ url: `/erp/mold-pressure-net-record/create`, data })
},
// 查询压网记录分页
getPressureNetRecordPage: async (params: any) => {
return await request.get({ url: `/erp/mold-pressure-net-record/page`, params })
}
}

@ -2325,12 +2325,12 @@ export default {
nextMonth: 'next month',
work: 'work',
rest: 'rest',
searchDateStartPlaceholder: '开始日期',
searchDateStartPlaceholder: '<EFBFBD>?,
searchDateEndPlaceholder: '结束日期',
searchTypeLabel: '类型',
searchTypePlaceholder: '请选择类型',
searchRemarkLabel: '备注',
searchRemarkPlaceholder: '请输入备注',
searchRemarkPlaceholder: '<EFBFBD>?,
searchButtonText: '搜索',
resetButtonText: '重置',
addButtonText: '新增',
@ -2666,6 +2666,10 @@ export default {
lastReplace: 'Last Replace',
usedDays: 'Used',
days: 'days',
remark: 'Remark',
pressureNetRecord: 'Pressure Net Record',
pressureNetTime: 'Pressure Net Time',
createTime: 'Create Time',
operate: 'Operate',
edit: 'Edit',
delete: 'Delete',

@ -2173,6 +2173,10 @@ export default {
lastReplace: '上次更换',
usedDays: '已使用',
days: '天',
remark: '备注',
pressureNetRecord: '压网记录',
pressureNetTime: '压网时间',
createTime: '创建时间',
operate: '操作',
edit: '编辑',
delete: '删除',

@ -1,13 +1,26 @@
<template>
<ContentWrap>
<el-form :model="queryParams" ref="queryFormRef" :inline="true" class="-mb-15px">
<el-form-item :label="t('MoldManagement.MoldListPage.code')" prop="code"><el-input v-model="queryParams.code" :placeholder="t('MoldManagement.MoldListPage.placeholderCode')" clearable @keyup.enter="handleQuery" class="!w-200px" /></el-form-item>
<el-form-item :label="t('MoldManagement.MoldListPage.name')" prop="name"><el-input v-model="queryParams.name" :placeholder="t('MoldManagement.MoldListPage.placeholderName')" clearable @keyup.enter="handleQuery" class="!w-200px" /></el-form-item>
<el-form-item :label="t('MoldManagement.MoldListPage.code')" prop="code"><el-input v-model="queryParams.code"
:placeholder="t('MoldManagement.MoldListPage.placeholderCode')" clearable @keyup.enter="handleQuery"
class="!w-200px" /></el-form-item>
<el-form-item :label="t('MoldManagement.MoldListPage.name')" prop="name"><el-input v-model="queryParams.name"
:placeholder="t('MoldManagement.MoldListPage.placeholderName')" clearable @keyup.enter="handleQuery"
class="!w-200px" /></el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.query') }}</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.reset') }}</el-button>
<el-button type="primary" plain @click="openForm('create')" v-hasPermi="['erp:mold-brand:create']"><Icon icon="ep:plus" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.addSubMold') }}</el-button>
<el-button type="success" plain @click="handleExport" :loading="exportLoading" v-hasPermi="['erp:mold-brand:export']"><Icon icon="ep:download" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.export') }}</el-button>
<el-button @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.query') }}
</el-button>
<el-button @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.reset') }}
</el-button>
<el-button type="primary" plain @click="openForm('create')" v-hasPermi="['erp:mold-brand:create']">
<Icon icon="ep:plus" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.addSubMold') }}
</el-button>
<el-button type="success" plain @click="handleExport" :loading="exportLoading"
v-hasPermi="['erp:mold-brand:export']">
<Icon icon="ep:download" class="mr-5px" /> {{ t('MoldManagement.MoldListPage.export') }}
</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
@ -20,7 +33,8 @@
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.installLocation')" min-width="140">
<template #default="scope">
{{ scope.row.installLocation || scope.row.installPosition || scope.row.currentPosition || scope.row.machineName || '-' }}
{{ scope.row.installLocation || scope.row.installPosition || scope.row.currentPosition ||
scope.row.machineName || '-' }}
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.material')" min-width="120">
@ -35,25 +49,54 @@
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.pressureNetInfo')" min-width="180">
<template #default="scope">
<div>{{ t('MoldManagement.MoldListPage.lastReplace') }}{{ scope.row.pressureNetTime }}</div>
<div>{{ t('MoldManagement.MoldListPage.usedDays') }}{{ scope.row.pressureNetDays }}{{ t('MoldManagement.MoldListPage.days') }}</div>
<div>{{ t('MoldManagement.MoldListPage.lastReplace') }}{{ scope.row.pressureNetTime }}</div>
<div>{{ t('MoldManagement.MoldListPage.usedDays') }}{{ scope.row.pressureNetDays }}{{
t('MoldManagement.MoldListPage.days') }}</div>
<div v-if="scope.row.remark">{{ t('MoldManagement.MoldListPage.remark') }}{{ scope.row.remark }}</div>
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.operate')" fixed="right" width="160">
<el-table-column :label="t('MoldManagement.MoldListPage.operate')" fixed="right" width="220">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)">{{ t('MoldManagement.MoldListPage.edit') }}</el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)">{{ t('MoldManagement.MoldListPage.delete') }}</el-button>
<el-button link type="primary" @click="openForm('update', scope.row.id)">{{
t('MoldManagement.MoldListPage.edit') }}</el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)">{{ t('MoldManagement.MoldListPage.delete')
}}</el-button>
<el-button link type="warning" @click="openPressureNetRecord(scope.row.id)">{{
t('MoldManagement.MoldListPage.pressureNetRecord') }}</el-button>
</template>
</el-table-column>
</el-table>
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize" @pagination="getList" />
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getList" />
</ContentWrap>
<MoldForm ref="formRef" @success="getList" />
<!-- 压网记录弹框 -->
<Dialog v-model="pressureNetDialogVisible" :title="t('MoldManagement.MoldListPage.pressureNetRecord')" width="700px">
<div class="pressure-net-dialog-content">
<el-table v-loading="pressureNetLoading" :data="pressureNetRecordList" :stripe="true"
:show-overflow-tooltip="true">
<el-table-column :label="t('MoldManagement.MoldListPage.subMoldName')" prop="moldName" min-width="120" />
<el-table-column :label="t('MoldManagement.MoldListPage.pressureNetTime')" prop="pressureNetTime"
min-width="160" :formatter="dateFormatter" />
<el-table-column :label="t('MoldManagement.MoldListPage.createTime')" prop="createTime" min-width="160"
:formatter="dateFormatter" />
<el-table-column :label="t('MoldManagement.MoldListPage.remark')" prop="remark" min-width="160">
<template #default="scope">
{{ scope.row.remark || '-' }}
</template>
</el-table-column>
</el-table>
<Pagination :total="pressureNetTotal" v-model:page="pressureNetPageParams.pageNo"
v-model:limit="pressureNetPageParams.pageSize" @pagination="getPressureNetRecordList" />
</div>
</Dialog>
<MoldRecordForm ref="recordFormRef" @success="getList" />
</template>
<script setup lang="ts">
import { defineAsyncComponent, nextTick } from 'vue'
import download from '@/utils/download'
import { dateFormatter } from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict'
import { MoldBrandApi } from '@/api/erp/mold'
@ -172,4 +215,40 @@ const openRecordForm = (type: string, id?: number, brandId?: number) => {
recordFormRef.value.open(type, id, brandId)
}
/** 压网记录弹框 */
const pressureNetDialogVisible = ref(false)
const pressureNetLoading = ref(false)
const pressureNetRecordList = ref<any[]>([])
const pressureNetTotal = ref(0)
const pressureNetPageParams = reactive({
pageNo: 1,
pageSize: 10,
moldId: undefined as number | undefined
})
const openPressureNetRecord = (moldId: number) => {
pressureNetPageParams.moldId = moldId
pressureNetPageParams.pageNo = 1
pressureNetDialogVisible.value = true
getPressureNetRecordList()
}
const getPressureNetRecordList = async () => {
pressureNetLoading.value = true
try {
const data = await MoldBrandApi.getPressureNetRecordPage(pressureNetPageParams)
pressureNetRecordList.value = data.list ?? []
pressureNetTotal.value = data.total ?? 0
} finally {
pressureNetLoading.value = false
}
}
</script>
<style lang="scss" scoped>
.pressure-net-dialog-content {
max-height: 500px;
overflow-y: auto;
padding: 10px;
}
</style>

Loading…
Cancel
Save