Compare commits

...

2 Commits

Author SHA1 Message Date
kkk-ops 438bb9c8d1 Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web 2 weeks ago
kkk-ops 8cda4ce13a bug 2 weeks ago

@ -453,5 +453,13 @@ export default {
btn_zoom_in: 'Zoom in',
btn_zoom_out: 'Zoom out',
preview: 'Preivew'
}
},
basedata: {
product: {
category:{
name:'name',
}
},
},
}

@ -449,5 +449,13 @@ export default {
btn_zoom_out: '缩小',
preview: '预览'
},
'OAuth 2.0': 'OAuth 2.0' // 避免菜单名是 OAuth 2.0 时,一直 warn 报错
'OAuth 2.0': 'OAuth 2.0',// 避免菜单名是 OAuth 2.0 时,一直 warn 报错
basedata: {
product: {
category:{
name:'分类名称',
}
},
},
}

@ -10,7 +10,7 @@
:inline="true"
label-width="68px"
>
<el-form-item label="分类名称" prop="name">
<el-form-item :label="t('basedata.product.category.name')" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入分类名称"

@ -47,13 +47,20 @@
<!-- 列表 -->
<ContentWrap>
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="产品" name="2" />
<!-- 使用 v-for 动态生成 el-tab-pane -->
<el-tab-pane
v-for="item in parentList"
:key="item.id"
:label="item.name"
:name="item.id.toString()"
/>
<!-- <el-tab-pane label="产品" name="2" />
<el-tab-pane label="原料" name="1" />
<el-tab-pane label="备件" name="5" />
<el-tab-pane label="工具" name="3" />
<el-tab-pane label="耗材" name="4" />
<el-tab-pane label="办公室用品" name="6" />
<el-tab-pane label="其他" name="0" />
<el-tab-pane label="其他" name="0" /> -->
</el-tabs>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="编码" align="center" prop="barCode" />
@ -126,7 +133,6 @@ import { ProductCategoryApi, ProductCategoryVO } from '@/api/erp/product/categor
import ProductForm from './ProductForm.vue'
import { DICT_TYPE } from '@/utils/dict'
import { defaultProps, handleTree } from '@/utils/tree'
import { erpPriceTableColumnFormatter } from '@/utils'
import BomForm from "@/views/mes/bom/BomForm.vue";
/** ERP 产品列表 */
@ -147,6 +153,7 @@ const queryParams = reactive({
const queryFormRef = ref() //
const exportLoading = ref(false) //
const categoryList = ref<ProductCategoryVO[]>([]) //
const parentList = ref<ProductCategoryVO[]>([])
/** 查询列表 */
const getList = async () => {
@ -213,6 +220,15 @@ onMounted(async () => {
//
const categoryData = await ProductCategoryApi.getProductCategorySimpleList()
categoryList.value = handleTree(categoryData, 'id', 'parentId')
//
for (let i = 0; i < categoryData.length; i++) {
if (categoryData[i].parentId === 0) {
parentList.value.push(categoryData[i]);
}
}
//
parentList.value.sort((a, b) => a.sort - b.sort);
console.log(parentList.value)
})
/** tab 切换 */

@ -203,7 +203,7 @@ const resetForm = () => {
code: undefined,
name: undefined,
parentId: undefined,
sort: undefined,
sort: 0,
workerUserId: undefined,
machineId: undefined,
phone: undefined,
@ -220,7 +220,7 @@ const resetForm = () => {
const getOrganizationTree = async () => {
organizationTree.value = []
const data = await OrganizationApi.getOrganizationList()
const root: Tree = { id: 0, name: '顶级产线工位', children: [] }
const root: Tree = { id: 0, name: '顶级组织', children: [] }
root.children = handleTree(data, 'id', 'parentId')
organizationTree.value.push(root)
}

@ -293,7 +293,7 @@ onMounted(async () => {
/** 获得产线工位树 */
organizationTree.value = []
const data = await OrganizationApi.getOrganizationList()
const root: Tree = { id: 0, name: '顶级产线工位', children: [] }
const root: Tree = { id: 0, name: '顶级组织', children: [] }
root.children = handleTree(data, 'id', 'parentId')
organizationTree.value.push(root)
})

@ -41,9 +41,25 @@
/>
</el-select>
</el-form-item>
<el-form-item label="计划编码" prop="code">
<el-input v-model="formData.code" placeholder="请输入计划编码" />
</el-form-item>
<el-form-item prop="code">
<template #label>
<span>
计划编码
<el-tooltip content="生产计划编码" placement="top">
<Icon icon="ep:question-filled" />
</el-tooltip>
</span>
</template>
<div style="display: flex; align-items: center; gap: 10px">
<el-input
:disabled="formData.isCode == true || formType === 'update'"
v-model="formData.code"
placeholder="编码保存后自动生成"
style="min-width: 600px"
/>
<el-switch v-model="formData.isCode" :disabled="formType === 'update'"/>
</div>
</el-form-item>
<el-form-item label="生产线" prop="feedingPipeline">
<el-tree-select
v-model="formData.feedingPipeline"
@ -189,7 +205,8 @@ const formData = ref({
isEnable: undefined,
feedingPipeline: undefined,
workerId: undefined,
isPreProduction: undefined
isPreProduction: undefined,
isCode: undefined
})
const formRules = reactive({
taskDetailId: [{ required: true, message: '明细项不能为空', trigger: 'blur' }],
@ -296,6 +313,7 @@ const resetForm = () => {
groupType: undefined,
isEnable: undefined,
isPreProduction: 0,
isCode: true
}
formRef.value?.resetFields()
}

@ -18,12 +18,12 @@
</template>
<div style="display: flex; align-items: center; gap: 10px">
<el-input
:disabled="formData.isCode == true"
:disabled="formData.isCode == true || formType === 'update'"
v-model="formData.code"
placeholder="编码保存后自动生成"
style="min-width: 600px"
/>
<el-switch v-model="formData.isCode"/>
<el-switch v-model="formData.isCode" :disabled="formType === 'update'"/>
</div>
</el-form-item>
<el-form-item label="交货日期" prop="deliveryDate">

@ -228,6 +228,7 @@ const onChangeProduct = (productId) => {
const product = productList.value.find((item) => item.id === productId)
if (product) {
formData.value.unitName = product.unitName
formData.value.unitId = product.unitId
}
}

@ -121,6 +121,8 @@ watch(
() => props.taskId,
(val: number) => {
if (!val) {
list.value = []
total.value = 0
return
}
queryParams.taskId = val

@ -288,9 +288,11 @@ const openItemNeed = (taskCode:string, taskId: number) => {
}
/** tab 切换 */
let activeName = 'taskDetail'
let activeName = ''
const handleTabClick = (tab: TabsPaneContext) => {
queryParams.status = tab.paneName
currentRow.value = {}
console.log(currentRow.value)
handleQuery()
}
/** 送审/审核 */
@ -308,7 +310,5 @@ const changeStatus = async (type:string, status: number, id: number) => {
/** tab 切换 */
let activeListName = 'taskDetail'
const handleListTabClick = (tab: TabsPaneContext) => {
}
</script>

@ -77,6 +77,7 @@ watch(
() => props.taskId,
(val: number) => {
if (!val) {
list.value = []
return
}
queryParams.taskId = val

@ -248,6 +248,7 @@ const openTaskPlanForm = (taskId: number, taskCode:string) => {
let activeName = ''
const handleTabClick = (tab: TabsPaneContext) => {
queryParams.status = tab.paneName
currentRow.value = {}
handleQuery()
}
</script>

Loading…
Cancel
Save