diff --git a/src/api/mes/orderDay/index.ts b/src/api/mes/orderDay/index.ts
index 0b88e4782..852c8f0e3 100644
--- a/src/api/mes/orderDay/index.ts
+++ b/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 })
diff --git a/src/api/mes/processroute/index.ts b/src/api/mes/processroute/index.ts
index be6648c4f..f80f4aab1 100644
--- a/src/api/mes/processroute/index.ts
+++ b/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"}]}
}
// 获取工作人员信息--参数为工序编码
diff --git a/src/views/mes/orderDay/components/orderDetail.vue b/src/views/mes/orderDay/components/orderDetail.vue
index 9f7d56984..b2901483c 100644
--- a/src/views/mes/orderDay/components/orderDetail.vue
+++ b/src/views/mes/orderDay/components/orderDetail.vue
@@ -80,12 +80,13 @@
:data="bomInfoSchemaData"
style="width: 100%"
>
-
-
-
-
-
-
+
+
+
+
+
+
@@ -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
}
diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue
index be797d612..b32596eb5 100644
--- a/src/views/mes/orderDay/components/schedule.vue
+++ b/src/views/mes/orderDay/components/schedule.vue
@@ -50,28 +50,32 @@
>
-
+
+
-
+
- {{ scope.row.name }}[{{ scope.row.code }}]
+
-
+
- {{ scope.row.name }}[{{ scope.row.code }}]
+
@@ -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)=>{
diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue
index d258dbcbd..a241bf85b 100644
--- a/src/views/mes/orderDay/index.vue
+++ b/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()
}
diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts
index a110b4bae..e7d0f5653 100644
--- a/src/views/mes/orderDay/orderDay.data.ts
+++ b/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([
}
},
},
+ {
+ label: '产品批次码',
+ field: 'batchCode',
+ sort: 'custom',
+ isSearch: true,
+ required: true,
+ },
{
label: '月计划单号',
field: 'planNoMonth',
diff --git a/src/views/mes/processroute/components/configDialog.vue b/src/views/mes/processroute/components/configDialog.vue
index 931ac8f1b..8502fbcbf 100644
--- a/src/views/mes/processroute/components/configDialog.vue
+++ b/src/views/mes/processroute/components/configDialog.vue
@@ -26,22 +26,29 @@
-
-
- 查询
+
+
+
+
+
+
+
+
+
+ 移除
-
-
-
-
-
- {{ scope.row.name }}[{{ scope.row.code }}]
-
-
-
-
+
+
+
@@ -123,6 +130,7 @@
+
@@ -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(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()
const openDetail = async (rowData: any) => {
diff --git a/src/views/mes/processroute/index.vue b/src/views/mes/processroute/index.vue
index 234a7c32b..bd258515b 100644
--- a/src/views/mes/processroute/index.vue
+++ b/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' })
diff --git a/src/views/mes/processroute/processroute.data.ts b/src/views/mes/processroute/processroute.data.ts
index 7eeefaeab..36a782b64 100644
--- a/src/views/mes/processroute/processroute.data.ts
+++ b/src/views/mes/processroute/processroute.data.ts
@@ -80,7 +80,7 @@ export const Processroute = useCrudSchemas(reactive([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择物料代码', // 输入框占位文本
+ searchListPlaceholder: '产成品代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '产品信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
@@ -89,7 +89,15 @@ export const Processroute = useCrudSchemas(reactive([
key: 'available',
value: 'TRUE',
isMainValue: false
- }]
+ },
+ {
+ key: 'type',
+ action: 'in', // 查询拼接条件
+ isSearch: true, // 使用自定义拼接条件
+ value: 'CCP,BCP',//,SEMI]
+ isMainValue: false
+ },
+ ]
}
}
},
diff --git a/src/views/mes/orderDay/components/processSearch.data.ts b/src/views/mes/publicUtil/processSearch.data.ts
similarity index 100%
rename from src/views/mes/orderDay/components/processSearch.data.ts
rename to src/views/mes/publicUtil/processSearch.data.ts
diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue
index 86f69f56c..15ff6b114 100644
--- a/src/views/qms/inspection/inspectionJob/addForm.vue
+++ b/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: '', //定性字典项值