Browse Source

1、工位管理增加班组、产线搜索及绑定

master_hella_20240701
bjang03 8 months ago
parent
commit
8478371eb9
  1. 2
      src/api/mes/workstation/index.ts
  2. 9
      src/views/mes/workstation/index.vue
  3. 5
      src/views/mes/workstation/workstation.data.ts

2
src/api/mes/workstation/index.ts

@ -46,4 +46,4 @@ export const exportWorkstation = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/mes/workstation/get-import-template' }) return request.download({ url: '/mes/workstation/get-import-template' })
} }

9
src/views/mes/workstation/index.vue

@ -65,7 +65,6 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import {mainBindBtn} from "@/utils/disposition/defaultButtons";
defineOptions({ name: 'Workstation' }) defineOptions({ name: 'Workstation' })
@ -136,7 +135,7 @@ const buttonBaseClick = (val, item) => {
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:workstation:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:workstation:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:workstation:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'wms:workstation:delete'}), //
defaultButtons.mainListBindBtn({hasPermi:'wms:workstation:update'}), // defaultButtons.mainListBindBtn({hasPermi:'wms:workstation:update'}), //
] ]
// - // -
@ -144,9 +143,9 @@ const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) await handleDelete(row.id)
}else if (val == 'bind') { // }else if (val == 'bind') { //
detailRef.value.openDetail(row, row.name, "绑定", 'mesWorkstation') await detailRef.value.openDetail(row, '绑定', row.name, 'mesWorkstation')
} }
} }

5
src/views/mes/workstation/workstation.data.ts

@ -1,12 +1,13 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const WorkstationRules = reactive({ export const WorkstationRules = reactive({
code: [required], code: [required]
name: [required]
}) })
export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '代码', label: '代码',
field: 'code', field: 'code',

Loading…
Cancel
Save