Browse Source

1、月计划工厂编码选择

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

4
.env.development

@ -4,7 +4,7 @@ NODE_ENV=development
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'
@ -34,4 +34,4 @@ VITE_OUT_DIR=dist
VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html'
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://localhost:12080'
VITE_JMREPORT_BASE_URL='http://localhost:12080'

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

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

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

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

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

@ -52,21 +52,22 @@
<!-- 详情 -->
<Detail ref="detailRef"
:isBasic="false"
:isOpenSearchTable="true"
:apiCreate="tabsCreateApi"
:apiDelete="tabsDeleteApi"
:allSchemas="Workstation.allSchemas"
:detailAllSchemas="detailAllSchemas"
:searchTableSchema="tmpPopList"
:detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage"
:tabs="TabsList"
@changeTabs="changeTabs"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false"
@detailOpenForm="detailOpenForm"
:isBasic="false"
:isOpenSearchTable="true"
:apiCreate="tabsCreateApi"
:apiDelete="tabsDeleteApi"
:allSchemas="Workstation.allSchemas"
:detailAllSchemas="detailAllSchemas"
:searchTableSchema="tmpPopList"
:detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage"
:tabs="TabsList"
@changeTabs="changeTabs"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false"
@detailOpenForm="detailOpenForm"
@searchTableSuccessDetail="searchTableSuccess"
/>
<BasicForm
ref="tmpPopListRef"
@ -78,19 +79,19 @@
<script setup lang="ts">
import {
Equipment,
equipmentPopList,
Opersteps,
stepPopList,
TabsList,
Workstation,
WorkstationRules,equipmentPopList,stepPopList
WorkstationRules
} from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation'
import {goalParams} from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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'
defineOptions({ name: 'Workstation' })
let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
let tabsCreateApi = WorkstationApi.createEquipmentRelation
@ -103,10 +104,18 @@ const tableColumns = ref(Workstation.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
console.log(formField)
console.log(searchField)
console.log(val)
console.log(formRef)
nextTick(async () => {
debugger
if (formRef) {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
} else {
}
})
}

Loading…
Cancel
Save