Browse Source

1、月计划工厂编码选择

master_hella_20240701
bjang03 8 months ago
parent
commit
12e91fcaa3
  1. 2
      .env.development
  2. 9
      src/api/mes/workstation/index.ts
  3. 2
      src/views/mes/ordermonthplan/index.vue
  4. 21
      src/views/mes/workstation/index.vue

2
.env.development

@ -4,7 +4,7 @@ NODE_ENV=development
VITE_DEV=false VITE_DEV=false
# 请求路径 # 请求路径
VITE_BASE_URL='http://192.168.0.113:12080' VITE_BASE_URL='http://localhost:12080'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='http://192.168.0.113:12080/admin-api/infra/file/upload' VITE_UPLOAD_URL='http://192.168.0.113:12080/admin-api/infra/file/upload'

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

@ -72,7 +72,6 @@ export const createEquipmentRelation = async (equipmentCodes:string[]) => {
// 删除设备关联 // 删除设备关联
export const deleteEquipmentRelation = async (equipmentCodes:string[]) => { export const deleteEquipmentRelation = async (equipmentCodes:string[]) => {
debugger
const data = { const data = {
workstationCode : goalParams.workstationCode, workstationCode : goalParams.workstationCode,
equipmentCodes : equipmentCodes equipmentCodes : equipmentCodes
@ -139,19 +138,19 @@ export const checkOperstepsPageList = async (params) => {
} }
} }
// 添加操作步骤关联 // 添加操作步骤关联
export const createOperstepsRelation = async (processCodes:string[]) => { export const createOperstepsRelation = async (codes:string[]) => {
const data = { const data = {
workstationCode : goalParams.workstationCode, workstationCode : goalParams.workstationCode,
processCodes : processCodes operstepsCodes : codes
} }
return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data }) return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data })
} }
// 删除操作步骤关联 // 删除操作步骤关联
export const deleteOperstepsRelation = async (processCodes:string[]) => { export const deleteOperstepsRelation = async (codes:string[]) => {
const data = { const data = {
workstationCode : goalParams.workstationCode, workstationCode : goalParams.workstationCode,
processCodes : processCodes operstepsCodes : codes
} }
return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data }) return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data })
} }

2
src/views/mes/ordermonthplan/index.vue

@ -44,8 +44,6 @@
@success="formsSuccess" @success="formsSuccess"
:rules="MesOrderMonthMainRules" :rules="MesOrderMonthMainRules"
:formAllSchemas="MesOrderMonthMain.allSchemas" :formAllSchemas="MesOrderMonthMain.allSchemas"
:apiUpdate="updateMesOrderMonthMain"
:apiCreate="createMesOrderMonthMain"
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain" :apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"

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

@ -67,6 +67,7 @@
:detailButtonIsShowDelete="true" :detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false" :detailButtonIsShowEdit="false"
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
@searchTableSuccessDetail="searchTableSuccess"
/> />
<BasicForm <BasicForm
ref="tmpPopListRef" ref="tmpPopListRef"
@ -78,19 +79,19 @@
<script setup lang="ts"> <script setup lang="ts">
import { import {
Equipment, Equipment,
equipmentPopList,
Opersteps, Opersteps,
stepPopList,
TabsList, TabsList,
Workstation, Workstation,
WorkstationRules,equipmentPopList,stepPopList WorkstationRules
} from './workstation.data' } from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation' import * as WorkstationApi from '@/api/mes/workstation'
import {goalParams} from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons' 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 {
goalParams,
} from "@/api/mes/workstation";
import Detail from './components/Detail.vue' import Detail from './components/Detail.vue'
defineOptions({ name: 'Workstation' }) defineOptions({ name: 'Workstation' })
let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
let tabsCreateApi = WorkstationApi.createEquipmentRelation let tabsCreateApi = WorkstationApi.createEquipmentRelation
@ -103,10 +104,18 @@ const tableColumns = ref(Workstation.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { console.log(formField)
console.log(searchField)
console.log(val)
console.log(formRef)
nextTick(async () => {
debugger
if (formRef) {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} else {
}
}) })
} }

Loading…
Cancel
Save