Browse Source

1、月计划工厂编码选择

master_hella_20240701
bjang03 8 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_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'
@ -34,4 +34,4 @@ VITE_OUT_DIR=dist
VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html' 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[]) => { 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"

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

@ -52,21 +52,22 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" <Detail ref="detailRef"
:isBasic="false" :isBasic="false"
:isOpenSearchTable="true" :isOpenSearchTable="true"
:apiCreate="tabsCreateApi" :apiCreate="tabsCreateApi"
:apiDelete="tabsDeleteApi" :apiDelete="tabsDeleteApi"
:allSchemas="Workstation.allSchemas" :allSchemas="Workstation.allSchemas"
:detailAllSchemas="detailAllSchemas" :detailAllSchemas="detailAllSchemas"
:searchTableSchema="tmpPopList" :searchTableSchema="tmpPopList"
:detailAllSchemasRules="WorkstationRules" :detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage" :apiPage="apiPage"
:tabs="TabsList" :tabs="TabsList"
@changeTabs="changeTabs" @changeTabs="changeTabs"
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
: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)
const setV = {} console.log(searchField)
setV[formField] = val[0][searchField] console.log(val)
formRef.setValues(setV) console.log(formRef)
nextTick(async () => {
debugger
if (formRef) {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
} else {
}
}) })
} }

Loading…
Cancel
Save