Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
liuchen864 8 months ago
parent
commit
0c851ab0ef
  1. 5
      src/api/mes/orderDay/index.ts
  2. 1
      src/api/mes/processroute/index.ts
  3. 32
      src/views/mes/orderDay/components/orderDetail.vue
  4. 102
      src/views/mes/orderDay/components/schedule.vue
  5. 29
      src/views/mes/orderDay/index.vue
  6. 9
      src/views/mes/orderDay/orderDay.data.ts
  7. 78
      src/views/mes/processroute/components/configDialog.vue
  8. 2
      src/views/mes/processroute/index.vue
  9. 12
      src/views/mes/processroute/processroute.data.ts
  10. 0
      src/views/mes/publicUtil/processSearch.data.ts
  11. 2
      src/views/qms/inspection/inspectionJob/addForm.vue

5
src/api/mes/orderDay/index.ts

@ -83,6 +83,11 @@ export const getProcessroutesDetail = async (code) => {
export const getPlanBom = async (params) => {
return await request.get({ url: `/mes/orderday/getBomInfo`,params })
}
// 根据获取计划BOM信息
export const getBomInfoTree = async (params) => {
return await request.get({ url: `/mes/orderday/getBomInfoTree`,params })
}
// 根据计划的车间、产线、计划时间 查询已经配置的人员
export const getPlanWorks = async (params) => {
return await request.get({ url: `/mes/orderday/getWorkGroup`,params })

1
src/api/mes/processroute/index.ts

@ -75,6 +75,7 @@ export const getProductInfo =async (code:String) => {
// 获取设备列表-参数为工序编码
export const getDeviceList =async (code:String) => {
//return request.get({ url: `/wms/itembasic/getProduct?code=`+code})
return request.get({ url: `/wms/itembasic/getProduct?code=`+code})
return {code:0,data:[{name:"冲压设备1",code:"CY0001"},{name:"冲压设备2",code:"CY0002"}]}
}
// 获取工作人员信息--参数为工序编码

32
src/views/mes/orderDay/components/orderDetail.vue

@ -80,12 +80,13 @@
:data="bomInfoSchemaData"
style="width: 100%"
>
<el-table-column prop="productItemCode" label="父物料代码" align="center" />
<el-table-column prop="componentItemCode" label="子物料代码" align="center" />
<el-table-column prop="componentUom" label="子物料计量单位" align="center" />
<el-table-column prop="componentQty" label="子物料数量" align="center"/>
<el-table-column prop="version" label="版本" align="center" />
</el-table> </div
<el-table-column prop="id" label="序号" align="center" />
<el-table-column prop="srcMaterialCode" label="物料代码" align="center" />
<el-table-column prop="srcMaterialModel" label="计量单位" align="center" />
<el-table-column prop="srcMaterialCounts" label="数量" align="center"/>
<el-table-column prop="processCode" label="工序编码" align="center" />
</el-table>
</div
></el-tab-pane>
</el-tabs>
</el-drawer>
@ -111,11 +112,10 @@ const props = defineProps({
})
const detailData = ref(props.allSchemas)
const bomInfoSchemaData = ref( [{productItemCode:'----',
componentItemCode:'----',
componentUom:'----',
componentQty:'----',
version:'----'}])
const bomInfoSchemaData = ref( [{srcMaterialCode:'----',
srcMaterialModel:'----',
srcMaterialCounts:'----',
processCode:'----',id:0}])
const processRouteInfoSchema = ref({
processrouteInfo: { processrouteCode: '', processName: '', routeVersion: '' },
@ -158,6 +158,12 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
processRouteInfoSchema.value={ processrouteInfo: { processrouteCode: '', processName: '', routeVersion: '' }, processrouteNodeDetailList: [] }
bomInfoSchemaData.value = [{srcMaterialCode:'',
srcMaterialModel:'',
srcMaterialCounts:'',
processCode:'',id:0}]
if (row) {
detailLoading.value = true
try {
@ -171,9 +177,11 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
defineExpose({ openDetail, formRef }) // open
const getDetailData = async (row: any) => {
processRouteInfoSchema.value = await OrderDayApi.getProcessroutesDetail(row.processrouteCode)
let pam={code:row.standardBom.slice(0,row.standardBom.lastIndexOf('-')),version:row.standardBom.slice(row.standardBom.lastIndexOf('-')+1)}
let pam={planDayCode:row.planNoDay,productCode:row.productCode,planBatchCode:row.batchCode}
//console.log(pam)
bomInfoSchemaData.value = await OrderDayApi.getPlanBom(pam)
nodeData.value = processRouteInfoSchema.value.processrouteNodeDetailList
}

102
src/views/mes/orderDay/components/schedule.vue

@ -50,28 +50,32 @@
></el-main>
<el-aside width="500px">
<el-tabs v-model="activeName">
<el-tab-pane label="人员配置" name="process">
<el-tab-pane label="工序工位" name="workstation">
<!-- <el-button>调整人员</el-button>
<el-button>调整设备</el-button> -->
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
<el-table-column prop="name" label="人员">
<el-table-column prop="name" label="工作位置">
<template #default="scope">
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%"
<el-button size="mini" text style="width: 100%"
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button
>
</template>
</el-table-column>
<el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-table>
</el-tab-pane>
<el-tab-pane label="工作位置配置" name="ddddd">
<el-tab-pane label="工序物料" name="materials">
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
<el-table-column prop="name" label="工作位置">
<template #default="scope">
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%"
<el-button size="mini" text style="width: 100%"
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button
>
</template>
</el-table-column>
<el-table-column prop="code" label="工序编码" width="180" v-if="false" />
<el-table-column prop="code" label="替换物料" width="180" v-if="false" />
</el-table>
</el-tab-pane>
</el-tabs>
@ -97,7 +101,7 @@ import {
getNewNode
} from '@/views/mes/processroute/components/graphbase.data'
import * as ProcessrouteApi from '@/api/mes/processroute'
import {ProcessSearch} from './processSearch.data'
import {ProcessSearch} from '../../publicUtil/processSearch.data'
import * as ProcessApi from '@/api/wms/process'
import { SearchTable } from '@/components/SearchTable'
import { Graph } from '@antv/x6'
@ -143,86 +147,6 @@ const dialogWidth = ref()
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
let graphJson = {
cells: [
{
position: {
x: 40,
y: 40
},
size: {
width: 100,
height: 40
},
attrs: {
text: {
text: 'Hello'
},
body: {
stroke: '#8f8f8f',
strokeWidth: 1,
fill: '#fff',
rx: 6,
ry: 6
}
},
visible: true,
shape: 'rect',
id: 'adbc20c6-96e4-4792-9e5b-42df6066cff0',
zIndex: 1
},
{
position: {
x: 240,
y: 180
},
size: {
width: 100,
height: 40
},
attrs: {
text: {
text: 'World'
},
body: {
stroke: '#8f8f8f',
strokeWidth: 1,
fill: '#fff',
rx: 6,
ry: 6
}
},
visible: true,
shape: 'ellipse',
id: '9b1f1e94-a01f-4902-bfae-4e6e81029261',
zIndex: 2
},
{
shape: 'edge',
attrs: {
line: {
stroke: '#8f8f8f',
strokeWidth: 1
}
},
id: '8fd50f13-22ba-41ff-b54a-eb6d8553c3d7',
source: {
cell: 'adbc20c6-96e4-4792-9e5b-42df6066cff0'
},
target: {
cell: '9b1f1e94-a01f-4902-bfae-4e6e81029261'
},
labels: [
{
attrs: {
label: {
text: 'X6'
}
}
}
],
zIndex: 3
}
]
}
/** 打开弹窗 */
const open = async (type: string, row?: any, titleName?: any) => {
@ -230,7 +154,7 @@ const open = async (type: string, row?: any, titleName?: any) => {
detailData.value = row
dialogWidth.value = props.basicFormWidth + '%'
//
getProcessroute('001')
await ProcessrouteApi.getProcessroute(row.processrouteCode)
if (titleName) {
dialogTitle.value = t('action.' + titleName)
} else {
@ -280,7 +204,7 @@ const searchTableRef = ref()
const opensearchTable = (
) => {
console.log("opensearchTable")
//console.log("opensearchTable")
const _searchCondition = {}
const _searchTableTitle = "工序查询"
const _searchTableAllSchemas = ProcessSearch.allSchemas
@ -310,8 +234,6 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
processData.value.push({code:item.code,name:item.name})}
})
}
//emit('searchTableSuccess', formField, searchField, val, undefined, type, row)
}
const deleteNode=(row)=>{

29
src/views/mes/orderDay/index.vue

@ -81,7 +81,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import orderDetail from './components/orderDetail.vue'
import scheduleDetail from './components/schedule.vue'
import { disabledTimeListsProps } from 'node_modules/element-plus/es/components/time-picker/src/props/shared'
import { Loading } from 'node_modules/element-plus/es/components/loading/src/service'
import { loadavg } from 'os'
defineOptions({ name: 'MesOrderDay' })
const message = useMessage() //
@ -93,14 +94,14 @@ routeName.value = route.name
const tableColumns = ref(OrderDay.allSchemas.tableColumns)
const lineOptions=ref([])
const processRouteOptions=ref([])
const bomOptions=ref([])
//** */
const getProcessroutes = async (code: String) => {
processRouteOptions.value = await OrderDayApi.getProcessroutes(code)
OrderDay.allSchemas.formSchema.forEach(item => {
if (item.field == 'processrouteCode') {
console.log('processrouteCode',item.field)
//console.log('processrouteCode',item.field)
item.componentProps.options = processRouteOptions.value
}
})
@ -114,14 +115,15 @@ const getProductlines = async (code: String) => {
}
})
}
const getBoms = async (code: String) => {
bomOptions.value = await OrderDayApi.getBoms(code)
OrderDay.allSchemas.formSchema.forEach(item => {
if (item.field == 'standardBom') {
item.componentProps.options = bomOptions.value
}
})
}
//BOM
// const getBoms = async (code: String) => {
// bomOptions.value = await OrderDayApi.getBoms(code)
// OrderDay.allSchemas.formSchema.forEach(item => {
// if (item.field == 'standardBom') {
// item.componentProps.options = bomOptions.value
// }
// })
// }
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -131,7 +133,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if(formField=='productCode'){
//formRef.setValues({standardBom:'bomddd'})
getProcessroutes(val[0][searchField])
getBoms(val[0][searchField])
//getBoms(val[0][searchField])
}
if(formField=='workroomCode'){
getProductlines(val[0][searchField])
@ -253,6 +255,7 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType,data) => {
var isHave =OrderDay.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
@ -264,6 +267,7 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await OrderDayApi.createOrderDay(data)
message.success(t('common.createSuccess'))
@ -271,6 +275,7 @@ const formsSuccess = async (formType,data) => {
await OrderDayApi.updateOrderDay(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}

9
src/views/mes/orderDay/orderDay.data.ts

@ -8,7 +8,7 @@ import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/w
// 表单校验
export const OrderDayRules = reactive({
// planNoDay: [
// batchCode: [
// { required: false, message: '请输入一个日计划编号', trigger: 'blur' }
// ],
planNoMonth: [
@ -85,6 +85,13 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '产品批次码',
field: 'batchCode',
sort: 'custom',
isSearch: true,
required: true,
},
{
label: '月计划单号',
field: 'planNoMonth',

78
src/views/mes/processroute/components/configDialog.vue

@ -26,22 +26,29 @@
<el-row :gutter="10" style="height: 65%">
<el-col :span="6">
<el-input v-model="processListParmas.name" placeholder="工序名称">
<template #append>
<el-button @click="getProcessList" >查询</el-button>
<el-card>
<template #header>
<div class="card-header">
<span>工序列表</span>
<el-button
type="primary"
@click="opensearchTable"
style="float: right; padding: 3px 0"
>添加工序</el-button>
</div>
</template>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%;border: 1px;" @cell-dblclick="userAddNode">
<el-table-column prop="code" label="工序编码" />
<el-table-column prop="name" label="工序名称" />
<el-table-column prop="oper" label="操作" width="60">
<template #default="scope">
<el-button size="mini" type="text" @click="deleteNode(scope.row)"
>移除</el-button
>
</template>
</el-input>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 90%">
<el-table-column prop="name" label="工序名称">
<template #default="scope">
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 90%"
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button
>
</template>
</el-table-column>
<el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-table>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="12"><div ref="graphContainer" style="width: 90%; height: 90%"></div>
@ -123,6 +130,7 @@
</el-card></el-col
>
</el-row>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</el-drawer>
</div>
</template>
@ -130,9 +138,11 @@
import Annex from '@/components/Annex/src/Annex.vue'
import Remarks from '@/components/Remarks/src/Remarks.vue'
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue'
import * as ProcessApi from '@/api/wms/process'
import * as RemarkApi from '@/api/wms/remark'
import * as FileApi from '@/api/wms/file'
import { start_node, end_node, createGraph, registerNodes, getNewNode } from './graphbase.data'
import { start_node, end_node, createGraph, getNewNode } from './graphbase.data'
import {ProcessSearch} from '../../publicUtil/processSearch.data'
import * as ProcessrouteApi from '@/api/mes/processroute'
import { Graph } from '@antv/x6'
const graphContainer = ref<HTMLElement | null>(null)
@ -167,6 +177,42 @@ const remarksData = reactive({
data: {}
})
const routeVersion=ref()
///
const searchTableRef = ref()
const opensearchTable = (
) => {
//console.log("opensearchTable")
const _searchCondition = {}
const _searchTableTitle = "工序查询"
const _searchTableAllSchemas = ProcessSearch.allSchemas
const _searchTablePage = ProcessApi.getProcessPage
searchTableRef.value.open(
_searchTableTitle,
_searchTableAllSchemas,
_searchTablePage,
undefined,
undefined,
true,
undefined,
undefined,
_searchCondition,
false,
true
)
}
//
const searchTableSuccess = (formField, searchField, val, type, row) => {
if(val.length>0){
val.forEach(item=>{
if(processData.value.find(obj=>obj.code==item.code)==undefined){
processData.value.push({code:item.code,name:item.name})}
})
}
}
const deleteNode=(row)=>{
processData.value.splice(processData.value.indexOf(row),1)
graph.value.removeNode(row.code)
}
//
const graph = ref<Graph>()
const openDetail = async (rowData: any) => {

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

@ -66,7 +66,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
import ProcessRouteConfig from './components/configDialog.vue'
import { async } from '@antv/x6/lib/registry/marker/async'
defineOptions({ name: 'Processroute' })

12
src/views/mes/processroute/processroute.data.ts

@ -80,7 +80,7 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchListPlaceholder: '产成品代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '产品信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
@ -89,7 +89,15 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
{
key: 'type',
action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
value: 'CCP,BCP',//,SEMI]
isMainValue: false
},
]
}
}
},

0
src/views/mes/orderDay/components/processSearch.data.ts → src/views/mes/publicUtil/processSearch.data.ts

2
src/views/qms/inspection/inspectionJob/addForm.vue

@ -550,7 +550,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for (let i = 0; i < parseInt(data.value.sampleTotalAmount); i++) {
for (let i = 0; i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty); i++) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //

Loading…
Cancel
Save