Merge remote-tracking branch 'origin/main'

main^2
liutao 2 days ago
commit e3001c67ba

@ -13,6 +13,11 @@ export interface ProductCategoryVO {
// ERP 产品分类 API
export const ProductCategoryApi = {
// 查询产品分类分组树
getProductCategoryGroupTree: async () => {
return await request.get({ url: `/erp/product-category/group-tree` })
},
// 查询产品分类列表
getProductCategoryList: async (type?: number) => {
return await request.get({ url: `/erp/product-category/list`, params: { type } })

@ -38,7 +38,7 @@ export const StockInApi = {
// 更新其它入库单的状态
updateStockInStatus: async (id: number, status: number) => {
return await request.put({
url: `/erp/stock-in/update-status`,
url: `/erp/stock-in/update-mold-status`,
params: {
id,
status

@ -38,7 +38,7 @@ export const StockOutApi = {
// 更新其它出库单的状态
updateStockOutStatus: async (id: number, status: number) => {
return await request.put({
url: `/erp/stock-out/update-status`,
url: `/erp/stock-out/update-mold-status`,
params: {
id,
status

@ -2062,7 +2062,10 @@ export default {
validatorCategoryRequired: 'Product category id can not be empty',
validatorCategoryTypeRequired: 'Type can not be empty',
validatorUnitRequired: 'Unit id can not be empty',
validatorStatusRequired: 'Product status can not be empty'
validatorStatusRequired: 'Product status can not be empty',
categoryTree: 'Category Tree',
addCategory: 'Add Category',
refreshTree: 'Refresh'
},
AutocodeRule: {
moduleName: 'Code Rules',
@ -2689,8 +2692,8 @@ export default {
MoldReturn: {
moduleName: 'Mold Stock In',
no: 'Stock In No',
mold: 'Mold',
moldInfo: 'Mold Info',
mold: 'Mold Group',
moldInfo: 'Mold Group',
inTime: 'Stock In Time',
warehouse: 'Warehouse',
creator: 'Creator',
@ -2724,7 +2727,7 @@ export default {
sumLabel: 'Total',
exportFilename: 'MoldStockIn.xls',
placeholderNo: 'Please input stock in no',
placeholderMold: 'Please select mold',
placeholderMold: 'Please select mold group',
placeholderInTimeStart: 'Start Date',
placeholderInTimeEnd: 'End Date',
placeholderWarehouse: 'Please select warehouse',
@ -2743,13 +2746,16 @@ export default {
approveConfirm: 'Confirm approve this stock in order?',
unapproveConfirm: 'Confirm unapprove this stock in order?',
approveSuccess: 'Approve successful',
unapproveSuccess: 'Unapprove successful'
unapproveSuccess: 'Unapprove successful',
subMoldList: 'Sub Mold List',
moldGroupList: 'Mold Group & Sub Mold List',
moldGroupListTitle: 'Stock In Mold Group List'
},
MoldGet: {
moduleName: 'Mold Stock Out',
no: 'Mold Order No',
mold: 'Mold',
mold: 'Mold Group',
outTime: 'Stock Out Time',
warehouse: 'Warehouse',
creator: 'Creator',
@ -2783,7 +2789,7 @@ export default {
sumLabel: 'Total',
exportFilename: 'MoldStockOut.xls',
placeholderNo: 'Please input mold order no',
placeholderMold: 'Please select mold',
placeholderMold: 'Please select mold group',
placeholderOutTimeStart: 'Start Date',
placeholderOutTimeEnd: 'End Date',
placeholderWarehouse: 'Please select warehouse',
@ -2798,7 +2804,8 @@ export default {
validatorItemOutIdRequired: 'Stock out id can not be empty',
validatorItemWarehouseRequired: 'Warehouse can not be empty',
validatorItemMoldRequired: 'Mold can not be empty',
validatorItemCountRequired: 'Quantity can not be empty'
validatorItemCountRequired: 'Quantity can not be empty',
moldGroupListTitle: 'Stock Out Mold Group List'
},
MoldInspectionItems: {
@ -3070,6 +3077,8 @@ export default {
validatorProductionLineRequired: 'Production line can not be empty',
validatorMoldRequired: 'Mold can not be empty',
validatorLowerMoldRequired: 'Lower mold can not be empty',
validatorOperateTimeRequired: 'Operation time can not be empty',
validatorOperatorRequired: 'Operator can not be empty',
alertNeedRemoveMoldFirst: 'Please remove the mold from this device first!',
alertNoMoldOnDevice: 'No mold is installed on this device!'
},

@ -2196,8 +2196,8 @@ export default {
MoldReturn: {
moduleName: '模具入库',
no: '入库单号',
mold: '模具',
moldInfo: '模具信息',
mold: '模具',
moldInfo: '模具',
inTime: '入库时间',
warehouse: '仓库',
creator: '创建人',
@ -2231,7 +2231,7 @@ export default {
sumLabel: '合计',
exportFilename: '模具入库单.xls',
placeholderNo: '请输入入库单号',
placeholderMold: '请选择模具',
placeholderMold: '请选择模具',
placeholderInTimeStart: '开始日期',
placeholderInTimeEnd: '结束日期',
placeholderWarehouse: '请选择仓库',
@ -2250,13 +2250,16 @@ export default {
approveConfirm: '确定审批该入库单吗?',
unapproveConfirm: '确定反审批该入库单吗?',
approveSuccess: '审批成功',
unapproveSuccess: '反审批成功'
unapproveSuccess: '反审批成功',
subMoldList: '子模具列表',
moldGroupList: '模具组及子模具列表',
moldGroupListTitle: '入库模具组清单'
},
MoldGet: {
moduleName: '模具出库',
no: '领模单号',
mold: '模具',
mold: '模具',
outTime: '出库时间',
warehouse: '仓库',
creator: '创建人',
@ -2290,7 +2293,7 @@ export default {
sumLabel: '合计',
exportFilename: '模具出库单.xls',
placeholderNo: '请输入领模单号',
placeholderMold: '请选择模具',
placeholderMold: '请选择模具',
placeholderOutTimeStart: '开始日期',
placeholderOutTimeEnd: '结束日期',
placeholderWarehouse: '请选择仓库',
@ -2305,7 +2308,8 @@ export default {
validatorItemOutIdRequired: '出库编号不能为空',
validatorItemWarehouseRequired: '仓库不能为空',
validatorItemMoldRequired: '模具不能为空',
validatorItemCountRequired: '数量不能为空'
validatorItemCountRequired: '数量不能为空',
moldGroupListTitle: '出库模具组清单'
},
MoldInspectionItems: {
@ -2577,6 +2581,8 @@ export default {
validatorProductionLineRequired: '产线不能为空',
validatorMoldRequired: '关联模具不能为空',
validatorLowerMoldRequired: '下模模具不能为空',
validatorOperateTimeRequired: '操作时间不能为空',
validatorOperatorRequired: '操作人不能为空',
alertNeedRemoveMoldFirst: '请先将该设备上的模具换下!',
alertNoMoldOnDevice: '该设备没有安装模具!'
},
@ -3209,7 +3215,10 @@ export default {
validatorCategoryRequired: '产品分类编号不能为空',
validatorCategoryTypeRequired: '类型不能为空',
validatorUnitRequired: '单位编号不能为空',
validatorStatusRequired: '产品状态不能为空'
validatorStatusRequired: '产品状态不能为空',
categoryTree: '产品分类树',
addCategory: '新增分类',
refreshTree: '刷新'
},
AutocodeRule: {
moduleName: '编码规则',

@ -1,6 +1,11 @@
<template>
<ContentWrap>
<div v-loading="detailLoading" class="mold-brand-detail">
<div class="mold-brand-detail__header">
<el-button @click="goBack">
<Icon icon="ep:arrow-left" class="mr-5px" /> {{ t('MoldManagement.MoldBrandDetail.back') }}
</el-button>
</div>
<div class="mold-brand-detail__hero">
<div class="mold-brand-detail__left">
<div class="mold-brand-detail__image-card">
@ -22,18 +27,10 @@
<div class="mold-brand-detail__main">
<div class="mold-brand-detail__topbar">
<div>
<div class="mold-brand-detail__title-row">
<span class="mold-brand-detail__title">{{ detailData?.name || '-' }}<span v-if="detailData?.version">{{
detailData.version }}</span></span>
<dict-tag :type="DICT_TYPE.ERP_MOLD_STATUS" :value="detailData?.status" />
</div>
</div>
<div class="mold-brand-detail__actions">
<el-button @click="goBack"><Icon icon="ep:arrow-left" class="mr-5px" /> {{ t('MoldManagement.MoldBrandDetail.back') }}</el-button>
<el-button type="primary" @click="goOperate(1)" v-if="detailData?.status === 1">{{ t('MoldManagement.MoldBrandDetail.moldUp') }}</el-button>
<el-button type="success" @click="goOperate(2)" v-if="detailData?.status === 0">{{ t('MoldManagement.MoldBrandDetail.moldDown') }}</el-button>
<el-button type="warning" @click="handleReservedAction(t('MoldManagement.MoldBrandDetail.repair'))">{{ t('MoldManagement.MoldBrandDetail.repair') }}</el-button>
<div class="mold-brand-detail__title-row">
<span class="mold-brand-detail__title">{{ detailData?.name || '-' }}<span v-if="detailData?.version">{{
detailData.version }}</span></span>
<dict-tag :type="DICT_TYPE.ERP_MOLD_STATUS" :value="detailData?.status" />
</div>
</div>
@ -722,6 +719,13 @@ onMounted(() => {
</script>
<style scoped>
.mold-brand-detail__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.mold-brand-detail__crumb {
margin-bottom: 16px;
color: var(--el-text-color-secondary);

@ -12,8 +12,8 @@
<el-form ref="queryFormRef" :model="queryParams" :inline="true" class="-mb-15px mt-16px">
<el-form-item prop="keyword">
<el-input v-model="queryParams.keyword" :placeholder="t('MoldManagement.MoldBrandPage.placeholderKeyword')"
clearable class="!w-240px" @keyup.enter="handleQuery" />
<el-input v-model="inputKeyword" :placeholder="t('MoldManagement.MoldBrandPage.placeholderKeyword')"
clearable class="!w-240px" @keyup.enter="handleQuery" @clear="onKeywordClear" />
</el-form-item>
<el-form-item prop="status">
<el-select v-model="queryParams.status" :placeholder="t('MoldManagement.MoldBrandPage.placeholderStatus')"
@ -183,10 +183,7 @@ const queryParams = reactive({
pageNo: 1,
pageSize: 10,
keyword: undefined as string | undefined,
code: undefined as string | undefined,
name: undefined as string | undefined,
productIds: [] as number[],
productName: undefined as string | undefined,
status: undefined as number | undefined,
currentDevice: undefined as string | undefined,
currentPosition: undefined as string | undefined
@ -207,6 +204,15 @@ const moldOperateViewRef = ref()
const maintainFormVisible = ref(false)
const moldMaintainViewRef = ref()
const inputKeyword = ref('')
watch(inputKeyword, (val) => {
queryParams.keyword = val?.trim() || undefined
})
const onKeywordClear = () => {
inputKeyword.value = ''
}
const statusCards = computed(() => [
{ key: 'all', label: t('MoldManagement.MoldBrandPage.all'), value: counters.allCount, status: undefined },
{ key: 'onMachine', label: t('MoldManagement.MoldBrandPage.onMachine'), value: counters.onMachineCount, status: 1 },
@ -215,12 +221,6 @@ const statusCards = computed(() => [
{ key: 'scrapped', label: t('MoldManagement.MoldBrandPage.scrapped'), value: counters.scrappedCount, status: 3 }
])
const parseKeyword = () => {
const keyword = queryParams.keyword?.trim()
queryParams.code = keyword || undefined
queryParams.name = keyword || undefined
}
const getImageList = (images?: string) => {
if (!images) return []
return String(images)
@ -243,9 +243,10 @@ const normalizePageResult = (data: any) => {
const getList = async () => {
loading.value = true
try {
parseKeyword()
const selected = productOptions.value.filter((item) => (queryParams.productIds || []).includes(item.id))
queryParams.productName = selected.map((p) => p.name).join(',')
if (selected.length > 0) {
queryParams.productName = selected.map((p) => p.name).join(',')
}
const data = await MoldBrandApi.getMoldBrandPage({
...queryParams,
currentDevice: queryParams.currentDevice
@ -263,6 +264,7 @@ const handleQuery = () => {
const resetQuery = () => {
queryFormRef.value?.resetFields()
inputKeyword.value = ''
currentStatusKey.value = 'all'
queryParams.status = undefined
queryParams.productIds = []
@ -331,14 +333,19 @@ const openDetail = (id: number) => {
}
//
const openOperateForm = async (type: number, row: MoldBrandVO) => {
const openOperateForm = (type: number, row: MoldBrandVO) => {
operateType.value = type
currentMold.value = row
operateFormVisible.value = true
await nextTick()
moldOperateViewRef.value?.open()
}
// operateFormVisible + moldOperateViewRef open
watch([operateFormVisible, moldOperateViewRef], ([visible, ref]) => {
if (visible && ref) {
ref.open()
}
})
const closeOperateForm = () => {
operateFormVisible.value = false
currentMold.value = null
@ -349,13 +356,18 @@ const onOperateSuccess = () => {
}
//
const openMaintainForm = async (row: MoldBrandVO) => {
const openMaintainForm = (row: MoldBrandVO) => {
currentMold.value = row
maintainFormVisible.value = true
await nextTick()
moldMaintainViewRef.value?.open()
}
// maintainFormVisible + moldMaintainViewRef open
watch([maintainFormVisible, moldMaintainViewRef], ([visible, ref]) => {
if (visible && ref) {
ref.open()
}
})
const closeMaintainForm = () => {
maintainFormVisible.value = false
currentMold.value = null

@ -92,12 +92,17 @@ const formRef = ref() // 表单 Ref
const productCategoryTree = ref() //
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
const open = async (type: string, id?: number, defaultData?: any) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
if (!id) {
//
if (defaultData) {
if (defaultData.type !== undefined) formData.value.type = defaultData.type
if (defaultData.parentId !== undefined) formData.value.parentId = defaultData.parentId
}
if (!id && !defaultData) {
const typeOptions = getIntDictOptions(DICT_TYPE.MATERIAL_CLASSIFICATION_TYPE)
if (typeOptions.length > 0) {
formData.value.type = typeOptions[0].value

@ -32,52 +32,96 @@
</el-form>
</ContentWrap>
<ContentWrap>
<el-tabs v-model="activeName" @tab-change="handleTabChange">
<el-tab-pane
v-for="dict in getIntDictOptions(DICT_TYPE.MATERIAL_CLASSIFICATION_TYPE)"
:key="dict.value"
:label="dict.label"
:name="String(dict.value)"
/>
</el-tabs>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column :label="t('FactoryModeling.ProductInformation.tableBarCodeColumn')" align="center" prop="barCode"
sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableNameColumn')" align="left" prop="name"
width="220px" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableStandardColumn')" align="center"
prop="standard" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableCategoryColumn')" align="center"
prop="subCategoryName" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableUnitColumn')" align="center" prop="unitName"
sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableStatusColumn')" align="center" prop="status"
sortable>
<template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column :label="t('FactoryModeling.ProductInformation.tableCreateTimeColumn')" align="center"
prop="createTime" :formatter="dateFormatter" width="180px" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableOperateColumn')" align="center" width="150px">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)" v-hasPermi="['erp:product:update']">
{{ t('FactoryModeling.ProductInformation.tableEditAction') }}
<div class="product-page-layout">
<!-- 左侧分类树 -->
<ContentWrap class="product-page-left">
<div class="tree-header">
<span class="tree-title">{{ t('FactoryModeling.ProductInformation.categoryTree') }}</span>
<div class="tree-header-actions">
<el-button link type="primary" size="small" @click="fetchGroupTree">
<Icon icon="ep:refresh" /> {{ t('FactoryModeling.ProductInformation.refreshTree') }}
</el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['erp:product:delete']">
{{ t('FactoryModeling.ProductInformation.tableDeleteAction') }}
<el-button link type="primary" size="small" @click="openCategoryForm('create')" v-hasPermi="['erp:product-category:create']">
<Icon icon="ep:plus" /> {{ t('FactoryModeling.ProductInformation.addCategory') }}
</el-button>
</div>
</div>
<el-tree
ref="treeRef"
:data="treeData"
:props="{ children: 'children', label: 'name' }"
node-key="nodeKey"
highlight-current
default-expand-all
@node-click="handleTreeNodeClick"
>
<template #default="{ data }">
<span class="custom-tree-node">
<span class="tree-node-label">{{ data.name }}</span>
<span class="tree-node-actions">
<el-button link type="primary" size="small" @click.stop="openCategoryForm('create', data.isType ? { type: data.type } : { type: data.type, parentId: data.id })"
v-hasPermi="['erp:product-category:create']">
<Icon icon="ep:plus" />
</el-button>
<template v-if="!data.isType">
<el-button link type="primary" size="small" @click.stop="openCategoryForm('update', data)"
v-hasPermi="['erp:product-category:update']">
<Icon icon="ep:edit" />
</el-button>
<el-button link type="danger" size="small" @click.stop="handleCategoryDelete(data)"
v-hasPermi="['erp:product-category:delete']">
<Icon icon="ep:delete" />
</el-button>
</template>
</span>
</span>
</template>
</el-table-column>
</el-table>
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getList" />
</ContentWrap>
</el-tree>
</ContentWrap>
<!-- 右侧产品表格 -->
<ContentWrap class="product-page-right">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column :label="t('FactoryModeling.ProductInformation.tableBarCodeColumn')" align="center" prop="barCode"
sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableNameColumn')" align="left" prop="name"
width="220px" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableStandardColumn')" align="center"
prop="standard" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableCategoryColumn')" align="center"
prop="subCategoryName" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableUnitColumn')" align="center" prop="unitName"
sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableStatusColumn')" align="center" prop="status"
sortable>
<template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column :label="t('FactoryModeling.ProductInformation.tableCreateTimeColumn')" align="center"
prop="createTime" :formatter="dateFormatter" width="180px" sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.tableOperateColumn')" align="center" width="150px">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)" v-hasPermi="['erp:product:update']">
{{ t('FactoryModeling.ProductInformation.tableEditAction') }}
</el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['erp:product:delete']">
{{ t('FactoryModeling.ProductInformation.tableDeleteAction') }}
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getList" />
</ContentWrap>
</div>
</template>
<ProductForm v-else-if="formType === 'product'" ref="formRef" @success="getList" @closed="handleFormClosed" />
<BomForm v-else-if="formType === 'bom'" ref="bomFormRef" @success="getList" @closed="handleFormClosed" />
<!-- 分类表单弹窗 -->
<ProductCategoryForm ref="categoryFormRef" @success="handleCategorySuccess" />
</div>
</template>
@ -85,7 +129,9 @@
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ProductApi, ProductVO } from '@/api/erp/product/product'
import { ProductCategoryApi } from '@/api/erp/product/category'
import ProductForm from './ProductForm.vue'
import ProductCategoryForm from '../category/ProductCategoryForm.vue'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import BomForm from "@/views/mes/bom/BomForm.vue";
@ -111,6 +157,69 @@ const exportLoading = ref(false)
const formVisible = ref(false)
const formType = ref('')
/** 分类树数据 */
const groupTreeData = ref<any[]>([])
const treeRef = ref()
const typeDict = computed(() => getIntDictOptions(DICT_TYPE.MATERIAL_CLASSIFICATION_TYPE))
const treeData = computed(() => {
return (groupTreeData.value || []).map((group: any) => {
const dictItem = typeDict.value.find((d: any) => d.value === group.type)
const name = dictItem?.label || String(group.type)
return {
nodeKey: `type_${group.type}`,
name,
type: group.type,
isType: true,
children: (group.children || []).map((child: any) => ({
...child,
nodeKey: `cat_${child.id}`,
isType: false
}))
}
})
})
const fetchGroupTree = async () => {
const res = await ProductCategoryApi.getProductCategoryGroupTree()
groupTreeData.value = res
}
/** 树节点点击 - 筛选产品 */
const handleTreeNodeClick = (data: any) => {
if (data.isType) {
queryParams.categoryType = data.type
queryParams.categoryId = undefined
} else {
queryParams.categoryType = data.type
queryParams.categoryId = data.id
}
handleQuery()
}
/** 分类增删改 */
const categoryFormRef = ref()
const openCategoryForm = (type: string, data?: any) => {
const treeData = type === 'update' ? data : undefined
const defaultData = data && !treeData ? { ...data } : undefined
nextTick(() => {
categoryFormRef.value.open(type, treeData?.id, defaultData)
})
}
const handleCategoryDelete = async (data: any) => {
try {
await message.delConfirm()
await ProductCategoryApi.deleteProductCategory(data.id)
message.success(t('common.delSuccess'))
await fetchGroupTree()
} catch {}
}
const handleCategorySuccess = () => {
fetchGroupTree()
}
const getList = async () => {
loading.value = true
try {
@ -163,20 +272,14 @@ const handleExport = async () => {
}
onMounted(async () => {
await fetchGroupTree()
const typeOptions = getIntDictOptions(DICT_TYPE.MATERIAL_CLASSIFICATION_TYPE)
if (typeOptions.length > 0) {
activeName = String(typeOptions[0].value)
queryParams.categoryType = typeOptions[0].value
}
await getList()
})
let activeName = ''
const handleTabChange = (name: string) => {
queryParams.categoryType = name ? Number(name) : undefined
handleQuery()
}
const bomFormRef = ref()
const openBomForm = (type: string, id?: number) => {
formVisible.value = true
@ -191,3 +294,66 @@ const handleFormClosed = () => {
formType.value = ''
}
</script>
<style lang="scss" scoped>
.product-page-layout {
display: flex;
gap: 12px;
}
.product-page-left {
width: 260px;
flex: 0 0 auto;
}
.product-page-right {
flex: 1;
min-width: 0;
}
.tree-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
border-bottom: 1px solid var(--el-border-color-lighter);
margin-bottom: 4px;
.tree-title {
font-size: 14px;
font-weight: 600;
color: var(--el-text-color-primary);
}
.tree-header-actions {
display: flex;
align-items: center;
gap: 8px;
}
}
.custom-tree-node {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
padding-right: 8px;
.tree-node-label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tree-node-actions {
display: none;
flex-shrink: 0;
margin-left: 8px;
}
&:hover .tree-node-actions {
display: flex;
}
}
</style>

@ -89,11 +89,46 @@
</el-col>
</el-row>
</el-form>
<!-- 子表的表单 -->
<!-- 模具组及子模具列表 -->
<ContentWrap>
<el-tabs v-model="subTabsName" class="-mt-15px -mb-10px">
<el-tab-pane :label="t('MoldManagement.MoldGet.itemListTitle')" name="item">
<StockOutItemForm ref="itemFormRef" :items="formData.items" :disabled="disabled" />
<el-tab-pane :label="t('MoldManagement.MoldGet.moldGroupListTitle')" name="item">
<el-table :data="formData.items || []" :stripe="true" :show-overflow-tooltip="true" row-key="id">
<el-table-column type="expand" width="48">
<template #default="{ row: itemRow }">
<div class="p-12px">
<el-table :data="itemRow.moldList || []" :stripe="true" :show-overflow-tooltip="true" row-key="id">
<el-table-column :label="t('MoldManagement.MoldListPage.code')" prop="code" min-width="150" />
<el-table-column :label="t('MoldManagement.MoldListPage.subMoldName')" prop="name" min-width="160" />
<el-table-column :label="t('MoldManagement.MoldListPage.type')" min-width="120">
<template #default="{ row: moldRow }">
<dict-tag :type="DICT_TYPE.SUBMOLD_TYPE" :value="moldRow.type" />
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.installLocation')" min-width="140">
<template #default="{ row: moldRow }">
{{ moldRow.installLocation || moldRow.machineName || '-' }}
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.material')" min-width="120">
<template #default="{ row: moldRow }">
{{ moldRow.material || '-' }}
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.quantity')" width="90" align="center">
<template #default="{ row: moldRow }">
{{ moldRow.quantity || 1 }}
</template>
</el-table-column>
</el-table>
</div>
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldGet.itemMoldName')" prop="moldSetName" min-width="160" />
<el-table-column :label="t('MoldManagement.MoldGet.itemMoldCode')" prop="productBarCode" min-width="150" />
<el-table-column :label="t('MoldManagement.MoldGet.itemCount')" prop="count" width="100" align="center" />
<el-table-column :label="t('MoldManagement.MoldGet.itemRemark')" prop="remark" min-width="120" />
</el-table>
</el-tab-pane>
</el-tabs>
</ContentWrap>
@ -109,9 +144,8 @@
</template>
<script setup lang="ts">
import { StockOutApi, StockOutVO } from '@/api/erp/stock/out'
import StockOutItemForm from './components/StockOutItemForm.vue'
import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer'
import {DICT_TYPE, getBoolDictOptions, getStrDictOptions} from "@/utils/dict";
import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer'
import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse'
/** ERP 其它出库单表单 */
@ -156,7 +190,6 @@ const options = [
]
/** 子表的表单 */
const subTabsName = ref('item')
const itemFormRef = ref()
const ensureWarehouseId = () => {
if (formData.value.warehouseId !== undefined && formData.value.warehouseId !== null) return
@ -201,41 +234,9 @@ const emit = defineEmits(['success', 'closed']) // 定义 success 和 closed 事
const submitForm = async () => {
//
await formRef.value.validate()
await itemFormRef.value.validate()
//
formLoading.value = true
try {
const existingByProductId = new Map<number, any>(
(formData.value.items ?? [])
.filter((it: any) => it && (it.productId ?? it.id) !== undefined && (it.productId ?? it.id) !== null)
.map((it: any) => [Number(it.productId ?? it.id), it])
)
const selectedRows = (itemFormRef.value.selectedRows ?? [])
formData.value.items = selectedRows
.filter((it: any) => it && it.productId !== undefined && it.productId !== null)
.map((row: any) => {
const productId = Number(row.productId)
const existing = existingByProductId.get(productId)
if (existing) {
return {
id: row.id,
warehouseId: formData.value.warehouseId,
productId,
productPrice: existing.productPrice ?? 0,
count: existing.count ?? 1,
remark: existing.remark ?? null
}
}
return {
id: row.id,
warehouseId: formData.value.warehouseId,
productId,
productPrice: 0,
count: 1
}
})
const data = formData.value as unknown as StockOutVO
if (formType.value === 'create') {
await StockOutApi.createStockOut(data)

@ -171,6 +171,8 @@ const formRules = reactive({
deviceId: [{ required: true, message: t('MoldManagement.MoldOperate.validatorDeviceRequired'), trigger: 'change' }],
lineId: [{ required: true, message: t('MoldManagement.MoldOperate.validatorProductionLineRequired'), trigger: 'change' }],
moldId: [{ required: true, validator: validateMoldId, trigger: 'change' }],
operateTime: [{ required: true, message: t('MoldManagement.MoldOperate.validatorOperateTimeRequired'), trigger: 'blur' }],
operatorId: [{ required: true, message: t('MoldManagement.MoldOperate.validatorOperatorRequired'), trigger: 'change' }],
})
const formRef = ref() // Ref

@ -89,7 +89,7 @@
<!-- <el-table-column label="操作类型" align="center" prop="operateType" sortable /> -->
<el-table-column :label="t('MoldManagement.MoldOperate.moldName')" align="center" prop="moldName" width="500px" sortable />
<el-table-column :label="t('MoldManagement.MoldOperate.deviceName')" align="center" prop="deviceName" sortable />
<el-table-column :label="t('MoldManagement.MoldOperate.productionLine')" align="center" prop="lineId" sortable />
<el-table-column :label="t('MoldManagement.MoldOperate.productionLine')" align="center" prop="lineName" sortable />
<el-table-column :label="t('MoldManagement.MoldOperate.creatorName')" align="center" prop="creatorName" sortable />
<el-table-column :label="t('MoldManagement.MoldOperate.remark')" align="center" prop="remark" />
<el-table-column

@ -89,11 +89,46 @@
</el-col>
</el-row>
</el-form>
<!-- 子表的表单 -->
<!-- 模具组及子模具列表 -->
<ContentWrap>
<el-tabs v-model="subTabsName" class="-mt-15px -mb-10px">
<el-tab-pane :label="t('MoldManagement.MoldReturn.itemListTitle')" name="item">
<StockInItemForm ref="itemFormRef" :items="formData.items" :disabled="disabled" />
<el-tab-pane :label="t('MoldManagement.MoldReturn.moldGroupListTitle')" name="item">
<el-table :data="formData.items || []" :stripe="true" :show-overflow-tooltip="true" row-key="id">
<el-table-column type="expand" width="48">
<template #default="{ row: itemRow }">
<div class="p-12px">
<el-table :data="itemRow.moldList || []" :stripe="true" :show-overflow-tooltip="true" row-key="id">
<el-table-column :label="t('MoldManagement.MoldListPage.code')" prop="code" min-width="150" />
<el-table-column :label="t('MoldManagement.MoldListPage.subMoldName')" prop="name" min-width="160" />
<el-table-column :label="t('MoldManagement.MoldListPage.type')" min-width="120">
<template #default="{ row: moldRow }">
<dict-tag :type="DICT_TYPE.SUBMOLD_TYPE" :value="moldRow.type" />
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.installLocation')" min-width="140">
<template #default="{ row: moldRow }">
{{ moldRow.installLocation || moldRow.machineName || '-' }}
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.material')" min-width="120">
<template #default="{ row: moldRow }">
{{ moldRow.material || '-' }}
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldListPage.quantity')" width="90" align="center">
<template #default="{ row: moldRow }">
{{ moldRow.quantity || 1 }}
</template>
</el-table-column>
</el-table>
</div>
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldReturn.itemMoldName')" prop="moldSetName" min-width="160" />
<el-table-column :label="t('MoldManagement.MoldReturn.itemMoldCode')" prop="productBarCode" min-width="150" />
<el-table-column :label="t('MoldManagement.MoldReturn.itemCount')" prop="count" width="100" align="center" />
<el-table-column :label="t('MoldManagement.MoldReturn.itemRemark')" prop="remark" min-width="120" />
</el-table>
</el-tab-pane>
</el-tabs>
</ContentWrap>
@ -109,7 +144,7 @@
</template>
<script setup lang="ts">
import { StockInApi, StockInVO } from '@/api/erp/stock/in'
import StockInItemForm from './components/StockInItemForm.vue'
import { DICT_TYPE } from '@/utils/dict'
import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer'
import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse'
@ -155,7 +190,6 @@ const options = [
]
/** 子表的表单 */
const subTabsName = ref('item')
const itemFormRef = ref()
const ensureWarehouseId = () => {
if (formData.value.warehouseId !== undefined && formData.value.warehouseId !== null) return
@ -200,41 +234,9 @@ const emit = defineEmits(['success', 'closed']) // 定义 success 和 closed 事
const submitForm = async () => {
//
await formRef.value.validate()
await itemFormRef.value.validate()
//
formLoading.value = true
try {
const existingByProductId = new Map<number, any>(
(formData.value.items ?? [])
.filter((it: any) => it && (it.productId ?? it.id) !== undefined && (it.productId ?? it.id) !== null)
.map((it: any) => [Number(it.productId ?? it.id), it])
)
const selectedRows = (itemFormRef.value.selectedRows ?? [])
formData.value.items = selectedRows
.filter((it: any) => it && it.productId !== undefined && it.productId !== null)
.map((row: any) => {
const productId = Number(row.productId)
const existing = existingByProductId.get(productId)
if (existing) {
return {
id: row.id,
warehouseId: formData.value.warehouseId,
productId,
productPrice: existing.productPrice ?? 0,
count: existing.count ?? 1,
remark: existing.remark ?? null
}
}
return {
id: row.id,
warehouseId: formData.value.warehouseId,
productId,
productPrice: 0,
count: 1
}
})
const data = formData.value as unknown as StockInVO
if (formType.value === 'create') {
await StockInApi.createStockIn(data)

@ -3,51 +3,25 @@
<div class="mold-return-page">
<template v-if="!formVisible">
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
min-label-width="68px"
>
<el-form-item :label="t('MoldManagement.MoldReturn.no')" prop="no">
<el-input
v-model="queryParams.no"
:placeholder="t('MoldManagement.MoldReturn.placeholderNo')"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.mold')" prop="productId">
<el-select
v-model="queryParams.productId"
clearable
filterable
:placeholder="t('MoldManagement.MoldReturn.placeholderMold')"
class="!w-240px"
>
<el-option
v-for="item in moldList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.inTime')" prop="outTime">
<el-date-picker
v-model="queryParams.outTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
:start-placeholder="t('MoldManagement.MoldReturn.placeholderInTimeStart')"
:end-placeholder="t('MoldManagement.MoldReturn.placeholderInTimeEnd')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<!-- <el-form-item label="客户" prop="customerId">
<!-- 搜索工作栏 -->
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" min-label-width="68px">
<el-form-item :label="t('MoldManagement.MoldReturn.no')" prop="no">
<el-input v-model="queryParams.no" :placeholder="t('MoldManagement.MoldReturn.placeholderNo')" clearable
@keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.mold')" prop="productId">
<el-select v-model="queryParams.productId" clearable filterable
:placeholder="t('MoldManagement.MoldReturn.placeholderMold')" class="!w-240px">
<el-option v-for="item in moldList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.inTime')" prop="outTime">
<el-date-picker v-model="queryParams.outTime" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
:start-placeholder="t('MoldManagement.MoldReturn.placeholderInTimeStart')"
:end-placeholder="t('MoldManagement.MoldReturn.placeholderInTimeEnd')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" class="!w-240px" />
</el-form-item>
<!-- <el-form-item label="客户" prop="customerId">
<el-select
v-model="queryParams.customerId"
clearable
@ -63,177 +37,112 @@
/>
</el-select>
</el-form-item> -->
<el-form-item :label="t('MoldManagement.MoldReturn.warehouse')" prop="warehouseId" v-show="showAllFilters">
<el-select
v-model="queryParams.warehouseId"
clearable
filterable
:placeholder="t('MoldManagement.MoldReturn.placeholderWarehouse')"
class="!w-240px"
>
<el-option
v-for="item in warehouseList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.creator')" prop="creator" v-show="showAllFilters">
<el-select
v-model="queryParams.creator"
clearable
filterable
:placeholder="t('MoldManagement.MoldReturn.placeholderCreator')"
class="!w-240px"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.status')" prop="status" v-show="showAllFilters">
<el-select
v-model="queryParams.status"
:placeholder="t('MoldManagement.MoldReturn.placeholderStatus')"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ERP_AUDIT_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.remark')" prop="remark" v-show="showAllFilters">
<el-input
v-model="queryParams.remark"
:placeholder="t('MoldManagement.MoldReturn.placeholderRemark')"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item v-if="filterCount > 3">
<el-button type="text" class="text-primary" @click="toggleFilters">
<Icon :icon="showAllFilters ? 'ep:arrow-up' : 'ep:arrow-down'" class="mr-5px" />
{{ showAllFilters ? t('FactoryModeling.FactoryStructure.collapseText') : t('FactoryModeling.FactoryStructure.expandText') }}
</el-button>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> {{ t('common.query') }}</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> {{ t('common.reset') }}</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['erp:stock-out:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> {{ t('MoldManagement.MoldReturn.add') }}
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['erp:stock-out:export']"
>
<Icon icon="ep:download" class="mr-5px" /> {{ t('MoldManagement.MoldReturn.export') }}
</el-button>
<el-button
type="danger"
plain
@click="handleDelete(selectionList.map((item) => item.id))"
v-hasPermi="['erp:stock-out:delete']"
:disabled="selectionList.length === 0"
>
<Icon icon="ep:delete" class="mr-5px" /> {{ t('MoldManagement.MoldReturn.delete') }}
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<el-form-item :label="t('MoldManagement.MoldReturn.warehouse')" prop="warehouseId" v-show="showAllFilters">
<el-select v-model="queryParams.warehouseId" clearable filterable
:placeholder="t('MoldManagement.MoldReturn.placeholderWarehouse')" class="!w-240px">
<el-option v-for="item in warehouseList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.creator')" prop="creator" v-show="showAllFilters">
<el-select v-model="queryParams.creator" clearable filterable
:placeholder="t('MoldManagement.MoldReturn.placeholderCreator')" class="!w-240px">
<el-option v-for="item in userList" :key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.status')" prop="status" v-show="showAllFilters">
<el-select v-model="queryParams.status" :placeholder="t('MoldManagement.MoldReturn.placeholderStatus')"
clearable class="!w-240px">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.ERP_AUDIT_STATUS)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item :label="t('MoldManagement.MoldReturn.remark')" prop="remark" v-show="showAllFilters">
<el-input v-model="queryParams.remark" :placeholder="t('MoldManagement.MoldReturn.placeholderRemark')"
clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item v-if="filterCount > 3">
<el-button type="text" class="text-primary" @click="toggleFilters">
<Icon :icon="showAllFilters ? 'ep:arrow-up' : 'ep:arrow-down'" class="mr-5px" />
{{ showAllFilters ? t('FactoryModeling.FactoryStructure.collapseText') :
t('FactoryModeling.FactoryStructure.expandText') }}
</el-button>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> {{ t('common.query') }}
</el-button>
<el-button @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> {{ t('common.reset') }}
</el-button>
<el-button type="primary" plain @click="openForm('create')" v-hasPermi="['erp:stock-out:create']">
<Icon icon="ep:plus" class="mr-5px" /> {{ t('MoldManagement.MoldReturn.add') }}
</el-button>
<el-button type="success" plain @click="handleExport" :loading="exportLoading"
v-hasPermi="['erp:stock-out:export']">
<Icon icon="ep:download" class="mr-5px" /> {{ t('MoldManagement.MoldReturn.export') }}
</el-button>
<el-button type="danger" plain @click="handleDelete(selectionList.map((item) => item.id))"
v-hasPermi="['erp:stock-out:delete']" :disabled="selectionList.length === 0">
<Icon icon="ep:delete" class="mr-5px" /> {{ t('MoldManagement.MoldReturn.delete') }}
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<!-- <el-tabs v-model="activeName" @tab-click="handleTabClick"> -->
<!-- <el-tab-pane label="产品出库" name="产品出库" />
<!-- 列表 -->
<ContentWrap>
<!-- <el-tabs v-model="activeName" @tab-click="handleTabClick"> -->
<!-- <el-tab-pane label="产品出库" name="产品出库" />
<el-tab-pane label="原料出库" name="原料出库" />
<el-tab-pane label="备件出库" name="备件出库" />
<el-tab-pane label="其他出库" name="其他出库" />
<el-tab-pane label="领模出库" name="领料出库" />
</el-tabs> -->
<el-table
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
@selection-change="handleSelectionChange"
>
<el-table-column width="30" :label="t('MoldManagement.MoldReturn.select')" type="selection" />
<el-table-column min-width="180" :label="t('MoldManagement.MoldReturn.no')" align="center" prop="no" sortable />
<el-table-column :label="t('MoldManagement.MoldReturn.moldInfo')" align="left" sortable prop="productNames" min-width="150" />
<!-- <el-table-column label="客户" align="center" prop="customerName" sortable /> -->
<el-table-column
:label="t('MoldManagement.MoldReturn.inTime')"
align="center"
sortable
prop="outTime"
:formatter="dateFormatter2"
width="120px"
/>
<el-table-column :label="t('MoldManagement.MoldReturn.creator')" align="center" prop="creatorName" sortable />
<!-- <el-table-column
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column width="30" :label="t('MoldManagement.MoldReturn.select')" type="selection" />
<el-table-column min-width="180" :label="t('MoldManagement.MoldReturn.no')" align="center" prop="no"
sortable />
<el-table-column :label="t('MoldManagement.MoldReturn.moldInfo')" align="left" sortable prop="productNames"
min-width="150" />
<!-- <el-table-column label="客户" align="center" prop="customerName" sortable /> -->
<el-table-column :label="t('MoldManagement.MoldReturn.inTime')" align="center" sortable prop="outTime"
:formatter="dateFormatter2" width="120px" />
<el-table-column :label="t('MoldManagement.MoldReturn.creator')" align="center" prop="creatorName" sortable />
<!-- <el-table-column
label="数量"
align="right"
sortable
prop="totalCount"
:formatter="erpCountTableColumnFormatter"
/> -->
<!-- <el-table-column
<!-- <el-table-column
label="金额"
align="right"
sortable
prop="totalPrice"
:formatter="erpPriceTableColumnFormatter"
/> -->
<el-table-column :label="t('MoldManagement.MoldReturn.status')" align="center" fixed="right" width="90" prop="status" sortable>
<template #default="scope">
<dict-tag :type="DICT_TYPE.ERP_AUDIT_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldReturn.operate')" align="center" fixed="right" width="220">
<template #default="scope">
<el-button
link
@click="openForm('detail', scope.row.id)"
v-hasPermi="['erp:stock-out:query']"
>
{{ t('MoldManagement.MoldReturn.detail') }}
</el-button>
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['erp:stock-out:update']"
:disabled="scope.row.status === 20"
>
{{ t('MoldManagement.MoldReturn.edit') }}
</el-button>
<el-button
link
type="primary"
@click="handleUpdateStatus(scope.row.id, 20)"
v-hasPermi="['erp:stock-out:update-status']"
v-if="scope.row.status === 10"
>
{{ t('MoldManagement.MoldReturn.approve') }}
</el-button>
<!-- <el-button
<el-table-column :label="t('MoldManagement.MoldReturn.status')" align="center" fixed="right" width="90"
prop="status" sortable>
<template #default="scope">
<dict-tag :type="DICT_TYPE.ERP_AUDIT_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column :label="t('MoldManagement.MoldReturn.operate')" align="center" fixed="right" width="220">
<template #default="scope">
<el-button link @click="openForm('detail', scope.row.id)" v-hasPermi="['erp:stock-out:query']">
{{ t('MoldManagement.MoldReturn.detail') }}
</el-button>
<el-button link type="primary" @click="openForm('update', scope.row.id)"
v-hasPermi="['erp:stock-out:update']" :disabled="scope.row.status === 20">
{{ t('MoldManagement.MoldReturn.edit') }}
</el-button>
<el-button link type="primary" @click="handleUpdateStatus(scope.row.id, 20)"
v-hasPermi="['erp:stock-out:update-status']" v-if="scope.row.status === 10">
{{ t('MoldManagement.MoldReturn.approve') }}
</el-button>
<!-- <el-button
link
type="danger"
@click="handleUpdateStatus(scope.row.id, 10)"
@ -241,25 +150,16 @@
>
{{ t('MoldManagement.MoldReturn.unapprove') }}
</el-button> -->
<el-button
link
type="danger"
@click="handleDelete([scope.row.id])"
v-hasPermi="['erp:stock-out:delete']"
>
{{ t('MoldManagement.MoldReturn.delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<el-button link type="danger" @click="handleDelete([scope.row.id])" v-hasPermi="['erp:stock-out:delete']">
{{ t('MoldManagement.MoldReturn.delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getList" />
</ContentWrap>
</template>
<!-- 表单添加/修改 -->
@ -359,7 +259,7 @@ const handleDelete = async (ids: number[]) => {
//
await getList()
selectionList.value = selectionList.value.filter((item) => !ids.includes(item.id))
} catch {}
} catch { }
}
/** 审批/反审批操作 */
@ -372,7 +272,7 @@ const handleUpdateStatus = async (id: number, status: number) => {
message.success(successText)
//
await getList()
} catch {}
} catch { }
}
/** 导出按钮操作 */
@ -401,7 +301,7 @@ const query = reactive({
})
/** 初始化 **/
onMounted(async () => {
queryParams.inType ='模具入库'
queryParams.inType = '模具入库'
await getList()
//
// productList.value = await ProductApi.getProductSimpleList()

Loading…
Cancel
Save