Browse Source

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

master_hella_20240701
chenfang 8 months ago
parent
commit
a26f052b77
  1. 5
      src/api/mes/orderDay/index.ts
  2. 1
      src/api/mes/processroute/index.ts
  3. 10
      src/api/mes/workstation/index.ts
  4. 32
      src/views/mes/orderDay/components/orderDetail.vue
  5. 102
      src/views/mes/orderDay/components/schedule.vue
  6. 29
      src/views/mes/orderDay/index.vue
  7. 9
      src/views/mes/orderDay/orderDay.data.ts
  8. 22
      src/views/mes/ordermonthplan/index.vue
  9. 37
      src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts
  10. 85
      src/views/mes/processroute/components/configDialog.vue
  11. 9
      src/views/mes/processroute/index.vue
  12. 12
      src/views/mes/processroute/processroute.data.ts
  13. 0
      src/views/mes/publicUtil/processSearch.data.ts
  14. 63
      src/views/mes/workstation/index.vue
  15. 58
      src/views/mes/workstation/workstation.data.ts
  16. 11
      src/views/qms/basicDataManage/dynamicRule/index.vue
  17. 14
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  18. 9
      src/views/qms/basicDataManage/selectedSet/index.vue
  19. 15
      src/views/qms/inspection/inspectionJob/addForm.vue
  20. 58
      src/views/qms/inspection/inspectionJob/detail.vue
  21. 6
      src/views/qms/inspection/inspectionJob/index.vue
  22. 8
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  23. 18
      src/views/qms/inspection/inspectionRecord/index.vue
  24. 30
      src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
  25. 12
      src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
  26. 5
      src/views/qms/sampleCode/index.vue
  27. 23
      src/views/qms/samplingProcess/samplingProcess.data.ts
  28. 9
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

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

@ -83,6 +83,11 @@ export const getProcessroutesDetail = async (code) => {
export const getPlanBom = async (params) => { export const getPlanBom = async (params) => {
return await request.get({ url: `/mes/orderday/getBomInfo`,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) => { export const getPlanWorks = async (params) => {
return await request.get({ url: `/mes/orderday/getWorkGroup`,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) => { 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 request.get({ url: `/wms/itembasic/getProduct?code=`+code})
return {code:0,data:[{name:"冲压设备1",code:"CY0001"},{name:"冲压设备2",code:"CY0002"}]} return {code:0,data:[{name:"冲压设备1",code:"CY0001"},{name:"冲压设备2",code:"CY0002"}]}
} }
// 获取工作人员信息--参数为工序编码 // 获取工作人员信息--参数为工序编码

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

@ -40,16 +40,6 @@ export const deleteWorkstation = async (id: number) => {
return await request.delete({ url: `/mes/workstation/delete?id=` + id }) return await request.delete({ url: `/mes/workstation/delete?id=` + id })
} }
// 导出工位 Excel
export const exportWorkstation = async (params) => {
return await request.download({ url: `/mes/workstation/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/workstation/get-import-template' })
}
export const getEquipmentPage = async (params) => { export const getEquipmentPage = async (params) => {
params.workstationCode = goalParams.workstationCode params.workstationCode = goalParams.workstationCode
if (params.isSearch) { if (params.isSearch) {

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

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

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

@ -50,28 +50,32 @@
></el-main> ></el-main>
<el-aside width="500px"> <el-aside width="500px">
<el-tabs v-model="activeName"> <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 :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
<el-table-column prop="name" label="人员"> <el-table-column prop="name" label="工作位置">
<template #default="scope"> <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 >{{ scope.row.name }}[{{ scope.row.code }}]</el-button
> >
</template> </template>
</el-table-column> </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-table>
</el-tab-pane> </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 :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
<el-table-column prop="name" label="工作位置"> <el-table-column prop="name" label="工作位置">
<template #default="scope"> <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 >{{ scope.row.name }}[{{ scope.row.code }}]</el-button
> >
</template> </template>
</el-table-column> </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-column prop="code" label="替换物料" width="180" v-if="false" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -97,7 +101,7 @@ import {
getNewNode getNewNode
} from '@/views/mes/processroute/components/graphbase.data' } from '@/views/mes/processroute/components/graphbase.data'
import * as ProcessrouteApi from '@/api/mes/processroute' 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 * as ProcessApi from '@/api/wms/process'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import { Graph } from '@antv/x6' import { Graph } from '@antv/x6'
@ -143,86 +147,6 @@ const dialogWidth = ref()
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const dialogTitle = ref('') // const dialogTitle = ref('') //
let graphJson = { 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) => { 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 detailData.value = row
dialogWidth.value = props.basicFormWidth + '%' dialogWidth.value = props.basicFormWidth + '%'
// //
getProcessroute('001') await ProcessrouteApi.getProcessroute(row.processrouteCode)
if (titleName) { if (titleName) {
dialogTitle.value = t('action.' + titleName) dialogTitle.value = t('action.' + titleName)
} else { } else {
@ -280,7 +204,7 @@ const searchTableRef = ref()
const opensearchTable = ( const opensearchTable = (
) => { ) => {
console.log("opensearchTable") //console.log("opensearchTable")
const _searchCondition = {} const _searchCondition = {}
const _searchTableTitle = "工序查询" const _searchTableTitle = "工序查询"
const _searchTableAllSchemas = ProcessSearch.allSchemas const _searchTableAllSchemas = ProcessSearch.allSchemas
@ -310,8 +234,6 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
processData.value.push({code:item.code,name:item.name})} processData.value.push({code:item.code,name:item.name})}
}) })
} }
//emit('searchTableSuccess', formField, searchField, val, undefined, type, row) //emit('searchTableSuccess', formField, searchField, val, undefined, type, row)
} }
const deleteNode=(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 ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import orderDetail from './components/orderDetail.vue' import orderDetail from './components/orderDetail.vue'
import scheduleDetail from './components/schedule.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' }) defineOptions({ name: 'MesOrderDay' })
const message = useMessage() // const message = useMessage() //
@ -93,14 +94,14 @@ routeName.value = route.name
const tableColumns = ref(OrderDay.allSchemas.tableColumns) const tableColumns = ref(OrderDay.allSchemas.tableColumns)
const lineOptions=ref([]) const lineOptions=ref([])
const processRouteOptions=ref([]) const processRouteOptions=ref([])
const bomOptions=ref([])
//** */ //** */
const getProcessroutes = async (code: String) => { const getProcessroutes = async (code: String) => {
processRouteOptions.value = await OrderDayApi.getProcessroutes(code) processRouteOptions.value = await OrderDayApi.getProcessroutes(code)
OrderDay.allSchemas.formSchema.forEach(item => { OrderDay.allSchemas.formSchema.forEach(item => {
if (item.field == 'processrouteCode') { if (item.field == 'processrouteCode') {
console.log('processrouteCode',item.field) //console.log('processrouteCode',item.field)
item.componentProps.options = processRouteOptions.value item.componentProps.options = processRouteOptions.value
} }
}) })
@ -114,14 +115,15 @@ const getProductlines = async (code: String) => {
} }
}) })
} }
const getBoms = async (code: String) => { //BOM
bomOptions.value = await OrderDayApi.getBoms(code) // const getBoms = async (code: String) => {
OrderDay.allSchemas.formSchema.forEach(item => { // bomOptions.value = await OrderDayApi.getBoms(code)
if (item.field == 'standardBom') { // OrderDay.allSchemas.formSchema.forEach(item => {
item.componentProps.options = bomOptions.value // if (item.field == 'standardBom') {
} // item.componentProps.options = bomOptions.value
}) // }
} // })
// }
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -131,7 +133,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if(formField=='productCode'){ if(formField=='productCode'){
//formRef.setValues({standardBom:'bomddd'}) //formRef.setValues({standardBom:'bomddd'})
getProcessroutes(val[0][searchField]) getProcessroutes(val[0][searchField])
getBoms(val[0][searchField]) //getBoms(val[0][searchField])
} }
if(formField=='workroomCode'){ if(formField=='workroomCode'){
getProductlines(val[0][searchField]) getProductlines(val[0][searchField])
@ -253,6 +255,7 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
var isHave =OrderDay.allSchemas.formSchema.some(function (item) { var isHave =OrderDay.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime'; 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.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null; if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') { if (formType === 'create') {
await OrderDayApi.createOrderDay(data) await OrderDayApi.createOrderDay(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -271,6 +275,7 @@ const formsSuccess = async (formType,data) => {
await OrderDayApi.updateOrderDay(data) await OrderDayApi.updateOrderDay(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() 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({ export const OrderDayRules = reactive({
// planNoDay: [ // batchCode: [
// { required: false, message: '请输入一个日计划编号', trigger: 'blur' } // { required: false, message: '请输入一个日计划编号', trigger: 'blur' }
// ], // ],
planNoMonth: [ planNoMonth: [
@ -85,6 +85,13 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '产品批次码',
field: 'batchCode',
sort: 'custom',
isSearch: true,
required: true,
},
{ {
label: '月计划单号', label: '月计划单号',
field: 'planNoMonth', field: 'planNoMonth',

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

@ -44,9 +44,10 @@
@success="formsSuccess" @success="formsSuccess"
:rules="MesOrderMonthMainRules" :rules="MesOrderMonthMainRules"
:formAllSchemas="MesOrderMonthMain.allSchemas" :formAllSchemas="MesOrderMonthMain.allSchemas"
:apiUpdate="MesOrderMonthApi.updateMesOrderMonthMain" :apiUpdate="updateMesOrderMonthMain"
:apiCreate="MesOrderMonthApi.createMesOrderMonthMain" :apiCreate="createMesOrderMonthMain"
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain" :apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
/> />
@ -106,7 +107,11 @@ import {
MesOrderMonthSubRules MesOrderMonthSubRules
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data"; } from "@/views/mes/ordermonthplan/mesOrderMonthSub.data";
import * as OrderDayApi from "@/api/mes/orderDay"; import * as OrderDayApi from "@/api/mes/orderDay";
import {breakdown, MesOrderMonthSubVO} from "@/api/mes/ordermonthplan"; import {
breakdown,
MesOrderMonthMainVO,
MesOrderMonthSubVO
} from "@/api/mes/ordermonthplan";
defineOptions({ name: 'MesOrderMonthMain' }) defineOptions({ name: 'MesOrderMonthMain' })
@ -198,6 +203,7 @@ const formsSuccess = async (formType,data) => {
} }
if(data.activeTime==0)data.activeTime = null; if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null; if(data.expireTime==0)data.expireTime = null;
data.factoryName = factoryName
if (formType === 'create') { if (formType === 'create') {
await MesOrderMonthApi.createMesOrderMonthMain(data) await MesOrderMonthApi.createMesOrderMonthMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -208,7 +214,6 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() getList()
} }
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
let mainPlanId let mainPlanId
@ -278,8 +283,10 @@ onMounted(async () => {
const detailAllSchemas = ref(MesOrderMonthSub.allSchemas) const detailAllSchemas = ref(MesOrderMonthSub.allSchemas)
// //
let productName let productName
let factoryName
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
@ -289,6 +296,10 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
productName = val[0].name productName = val[0].name
getBoms(val[0][searchField]) getBoms(val[0][searchField])
} }
if(formField=='factoryCode'){
factoryName = val[0].name
formRef.setValues({factoryCode:val[0]['id']})
}
// if(formField=='workroomCode'){ // if(formField=='workroomCode'){
// getProductlines(val[0][searchField]) // getProductlines(val[0][searchField])
// } // }
@ -304,6 +315,8 @@ const getBoms = async (code: String) => {
} }
}) })
} }
const createMesOrderMonthSub = async (data: MesOrderMonthSubVO) => { const createMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName data.productName = productName
return await MesOrderMonthApi.createMesOrderMonthSub(data) return await MesOrderMonthApi.createMesOrderMonthSub(data)
@ -314,7 +327,6 @@ const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
} }
// -- // --
const detailButtonBaseClick = async (val, item) => { const detailButtonBaseClick = async (val, item) => {
debugger
try { try {
// //
await message.confirm('确定要拆解成日计划吗?') await message.confirm('确定要拆解成日计划吗?')

37
src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts

@ -1,5 +1,6 @@
import type {CrudSchema} from '@/hooks/web/useCrudSchemas' import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime' import {dateFormatter} from '@/utils/formatTime'
import * as TenantApi from '@/api/system/tenant'
// 表单校验 // 表单校验
export const MesOrderMonthMainRules = reactive({ export const MesOrderMonthMainRules = reactive({
@ -35,24 +36,24 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'factoryCode', field: 'factoryCode',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
// form: { form: {
// // labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
// componentProps: { componentProps: {
// isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择工厂', // 输入框占位文本 searchListPlaceholder: '请选择工厂', // 输入框占位文本
// searchField: 'id', // 查询弹窗赋值字段 searchField: 'factoryCode', // 查询弹窗赋值字段
// searchTitle: '请选择工厂', // 查询弹窗标题 searchTitle: '请选择工厂', // 查询弹窗标题
// searchAllSchemas: FactoryList.allSchemas, // 查询弹窗所需类 searchAllSchemas: FactoryList.allSchemas, // 查询弹窗所需类
// searchPage: TenantApi.getTenantPage, // 查询弹窗所需分页方法 searchPage: TenantApi.getTenantPage, // 查询弹窗所需分页方法
// isHideFilterButton: true, isHideFilterButton: true,
// searchCondition: [{ searchCondition: [{
// key: 'available', key: 'available',
// value: 'TRUE', value: 'TRUE',
// isMainValue: false isMainValue: false
// } }
// ] ]
// } }
// } }
}, },
{ {
label: '工厂名称', label: '工厂名称',

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

@ -26,22 +26,29 @@
<el-row :gutter="10" style="height: 65%"> <el-row :gutter="10" style="height: 65%">
<el-col :span="6"> <el-col :span="6">
<el-input v-model="processListParmas.name" placeholder="工序名称"> <el-card>
<template #append> <template #header>
<el-button @click="getProcessList" >查询</el-button> <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> </template>
</el-input> </el-table-column>
</el-table>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 90%"> </el-card>
<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-col> </el-col>
<el-col :span="12"><div ref="graphContainer" style="width: 90%; height: 90%"></div> <el-col :span="12"><div ref="graphContainer" style="width: 90%; height: 90%"></div>
@ -123,6 +130,7 @@
</el-card></el-col </el-card></el-col
> >
</el-row> </el-row>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
@ -130,11 +138,14 @@
import Annex from '@/components/Annex/src/Annex.vue' import Annex from '@/components/Annex/src/Annex.vue'
import Remarks from '@/components/Remarks/src/Remarks.vue' import Remarks from '@/components/Remarks/src/Remarks.vue'
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.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 RemarkApi from '@/api/wms/remark'
import * as FileApi from '@/api/wms/file' 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 * as ProcessrouteApi from '@/api/mes/processroute'
import { Graph } from '@antv/x6' import { Graph } from '@antv/x6'
import { get } from 'http'
const graphContainer = ref<HTMLElement | null>(null) const graphContainer = ref<HTMLElement | null>(null)
defineOptions({ name: 'ProcessRouteConfig' }) defineOptions({ name: 'ProcessRouteConfig' })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
@ -167,10 +178,47 @@ const remarksData = reactive({
data: {} data: {}
}) })
const routeVersion=ref() 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 graph = ref<Graph>()
const openDetail = async (rowData: any) => { const openDetail = (rowData: any) => {
rowData.value = rowData rowData.value = rowData
console.log('rowData',rowData.value)
titleNameRef.value = rowData.value.processrouteCode titleNameRef.value = rowData.value.processrouteCode
titleValueRef.value = rowData.value.processName titleValueRef.value = rowData.value.processName
processRouteId.value = rowData.value.id processRouteId.value = rowData.value.id
@ -305,7 +353,7 @@ const saveResult = async () => {
return return
} }
if (graph.value.getNodes().length < 3) { if (graph.value.getNodes().length < 3) {
message.info('除了开始结束节点外至少需要设置一个节点!') message.info('工艺至少配置一道工序!')
return return
} }
let gdata = { let gdata = {
@ -372,6 +420,7 @@ const deleteAnnexSuccess = async () => {
// //
onUnmounted(() => {}) onUnmounted(() => {})
const emit = defineEmits(['close']) const emit = defineEmits(['close'])
</script> </script>
<style lang="scss"> <style lang="scss">
.el-drawer__body { .el-drawer__body {

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

@ -51,7 +51,7 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<ProcessRouteConfig ref="configDialogRef" @close="getList" /> <ProcessRouteConfig ref="configDialogRef" @close="dailogClose" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/processroute/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/mes/processroute/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -66,7 +66,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue' // import Detail from '@/components/Detail/src/Detail.vue'
import ProcessRouteConfig from './components/configDialog.vue' import ProcessRouteConfig from './components/configDialog.vue'
import { async } from '@antv/x6/lib/registry/marker/async'
defineOptions({ name: 'Processroute' }) defineOptions({ name: 'Processroute' })
@ -157,7 +157,10 @@ const buttonTableClick = async (val, row) => {
openDetail(row) openDetail(row)
} }
} }
const dailogClose=() => {
console.log('close');
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {

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

@ -80,7 +80,7 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '产成品代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '产品信息', // 查询弹窗标题 searchTitle: '产品信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
@ -89,7 +89,15 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false 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

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

@ -69,24 +69,19 @@
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
/> />
<BasicForm <BasicForm
ref="teamListRef" ref="tmpPopListRef"
:formAllSchemas="tmpPopList" :formAllSchemas="tmpPopList"
:isBusiness="false" :isBusiness="false"
/> />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download'
import { import {
Equipment, Equipment,
Process,
Opersteps, Opersteps,
TabsList, TabsList,
Team,
Workstation, Workstation,
WorkstationRules,equipmentPopList,processPopList,stepPopList WorkstationRules,equipmentPopList,stepPopList
} from './workstation.data' } from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation' import * as WorkstationApi from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -130,8 +125,8 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:workstation:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:workstation:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:workstation:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'wms:workstation:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:workstation:export'}), // // defaultButtons.defaultExportBtn({hasPermi:'wms:workstation:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -148,11 +143,7 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { // }else if (val == 'refresh') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList() getList()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else { // } else { //
@ -218,37 +209,6 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await WorkstationApi.exportWorkstation(tableObject.params)
download.excel(data, '工位.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工位导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -261,7 +221,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await WorkstationApi.importTemplate()
}) })
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
@ -270,7 +229,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation')
} }
// //
const detailAllSchemas = ref(Team.allSchemas) const detailAllSchemas = ref(Equipment.allSchemas)
const apiPage = ref(WorkstationApi.getEquipmentPage) const apiPage = ref(WorkstationApi.getEquipmentPage)
const tableKey = ref("Team"); const tableKey = ref("Team");
let tmpPopList = equipmentPopList.allSchemas let tmpPopList = equipmentPopList.allSchemas
@ -283,12 +242,6 @@ const changeTabs = (data) =>{
tabsDeleteApi = WorkstationApi.deleteEquipmentRelation tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
tabsCreateApi = WorkstationApi.createEquipmentRelation tabsCreateApi = WorkstationApi.createEquipmentRelation
tmpPopList = equipmentPopList.allSchemas tmpPopList = equipmentPopList.allSchemas
}else if(data.prop == 'Process'){
apiPage.value = WorkstationApi.getProcessPage
detailAllSchemas.value = Process.allSchemas
tabsDeleteApi = WorkstationApi.deleteProcessRelation
tabsCreateApi = WorkstationApi.createProcessRelation
tmpPopList = processPopList.allSchemas
}else if(data.prop == 'Opersteps'){ }else if(data.prop == 'Opersteps'){
apiPage.value = WorkstationApi.getOperstepsPage apiPage.value = WorkstationApi.getOperstepsPage
detailAllSchemas.value = Opersteps.allSchemas detailAllSchemas.value = Opersteps.allSchemas
@ -297,9 +250,9 @@ const changeTabs = (data) =>{
tmpPopList = stepPopList.allSchemas tmpPopList = stepPopList.allSchemas
} }
} }
const teamListRef = ref() const tmpPopListRef = ref()
const detailOpenForm = async (type, params) => { const detailOpenForm = async (type, params) => {
teamListRef.value.open('create', null, null, 'viewDetail')// tmpPopListRef.value.open('create', null, null, 'viewDetail')//
} }
</script> </script>

58
src/views/mes/workstation/workstation.data.ts

@ -19,10 +19,6 @@ export const TabsList = [{
label: "设备", label: "设备",
prop: 'Equipment', prop: 'Equipment',
}, },
{
label: "工序",
prop: 'Process',
},
{ {
label: "操作步骤", label: "操作步骤",
prop: 'Opersteps', prop: 'Opersteps',
@ -95,13 +91,6 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
isSearch: true,
isForm: false
},
{ {
label: '生效时间', label: '生效时间',
field: 'activeTime', field: 'activeTime',
@ -161,13 +150,14 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isTable: true,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} }
} }
])) ]))
export const Team = useCrudSchemas(reactive<CrudSchema[]>([ export const select = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '代码', label: '代码',
field: 'code', field: 'code',
@ -181,17 +171,6 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
} }
])) ]))
@ -222,33 +201,6 @@ export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm:true isTableForm:true
} }
])) ]))
export const Process = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))
export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([ export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '代码', label: '代码',
@ -291,7 +243,7 @@ export const equipmentPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '选择设备', // 输入框占位文本 searchListPlaceholder: '选择设备', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择设备', // 查询弹窗标题 searchTitle: '选择设备', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类 searchAllSchemas: select.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkEquipmentPageList, // 查询弹窗所需分页方法 searchPage: WorkstationApi.checkEquipmentPageList, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
@ -316,7 +268,7 @@ export const processPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '选择工序', // 输入框占位文本 searchListPlaceholder: '选择工序', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择工序', // 查询弹窗标题 searchTitle: '选择工序', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类 searchAllSchemas: select.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkProcessPageList, // 查询弹窗所需分页方法 searchPage: WorkstationApi.checkProcessPageList, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
@ -341,7 +293,7 @@ export const stepPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '选择操作步骤', // 输入框占位文本 searchListPlaceholder: '选择操作步骤', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择操作步骤', // 查询弹窗标题 searchTitle: '选择操作步骤', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类 searchAllSchemas: select.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkOperstepsPageList, // 查询弹窗所需分页方法 searchPage: WorkstationApi.checkOperstepsPageList, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',

11
src/views/qms/basicDataManage/dynamicRule/index.vue

@ -172,7 +172,7 @@ const butttondata = [
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) editForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} }
@ -184,7 +184,14 @@ const openForm = async (type: string, row?: any) => {
tableData.value = [] tableData.value = []
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
const editForm = async (type: string, row?: any) => {
tableData.value = []
detailMasterId.value = row.id
InspectionStageApi.getInspectionStageNoPage({masterId:row.id}).then(res=>{
tableData.value = res
})
basicFormRef.value.open(type, row)
}
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
var isHave =DynamicRule.allSchemas.formSchema.some(function (item) { var isHave =DynamicRule.allSchemas.formSchema.some(function (item) {

14
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -276,7 +276,19 @@
prop="inspectionCharacteristicsBaseVO.quantifyUom" prop="inspectionCharacteristicsBaseVO.quantifyUom"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" /> <el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom"
placeholder="请选择结果录入方式"
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.UOM
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">

9
src/views/qms/basicDataManage/selectedSet/index.vue

@ -177,7 +177,7 @@ const butttondata = [
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) editForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} }
@ -189,6 +189,13 @@ const openForm = (type: string, row?: any) => {
tableData.value = [] tableData.value = []
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
const editForm = async (type: string, row?: any) => {
tableData.value = []
SelectedProjectApi.getSelectedProjectNoPage({masterId:row.id}).then(res=>{
tableData.value = res
})
basicFormRef.value.open(type, row)
}
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {

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

@ -296,7 +296,7 @@
</el-col> </el-col>
<el-col <el-col
:span="12" :span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'"
> >
<el-form-item label="选定集" required> <el-form-item label="选定集" required>
<el-select <el-select
@ -537,7 +537,8 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type formType.value = type
if (row) { if (row) {
data.value = JSON.parse(JSON.stringify(row)) data.value = JSON.parse(JSON.stringify(row))
console.log(data.value) console.log(data.value)//
await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = [] let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id) data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
@ -549,7 +550,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] 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({ item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', // inspectionValue: '', //
qualitativeCode: '', // qualitativeCode: '', //
@ -644,7 +645,7 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' |
} }
} }
/** 修改名称时间 */ /** 修改名称时间 */
const buttonBaseClick1 = (val) => { const buttonBaseClick1 =async (val) => {
// //
if (val == 'save') { if (val == 'save') {
if (!nameRef.value) return if (!nameRef.value) return
@ -692,13 +693,14 @@ const buttonBaseClick1 = (val) => {
dialogVisibleName.value = false dialogVisibleName.value = false
} }
} }
const buttonBaseClick = (val) => { const buttonBaseClick =async(val) => {
// //
if (val == 'save') { if (val == 'save') {
submitForm() submitForm()
} }
// //
else if (val == 'close') { else if (val == 'close') {
await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
dialogVisible.value = false dialogVisible.value = false
} }
} }
@ -1004,6 +1006,7 @@ const changeQualitativeCode = (e, item, cur) => {
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e) let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
console.log(obj) console.log(obj)
cur.defectLevel = obj.defectLevel cur.defectLevel = obj.defectLevel
cur.estimateCode = obj.estimateCode
} }
</script> </script>
<style scoped> <style scoped>
@ -1022,4 +1025,4 @@ const changeQualitativeCode = (e, item, cur) => {
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left { .el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important; min-width: 120px !important;
} }
</style> </style>

58
src/views/qms/inspection/inspectionJob/detail.vue

@ -46,18 +46,9 @@
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> <el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="检验方案模板编码">
<el-input
v-model="item.inspectionCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="描述" prop="processDescribe"> <el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" /> <el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -65,15 +56,6 @@
<el-input v-model="item.sequenceCode" :disabled="true" /> <el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="检验特性编码">
<el-input
v-model="item.inspectionCharCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="small-title">检验特性</div> <div class="small-title">检验特性</div>
@ -121,20 +103,6 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionJobCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请选择动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="是否允许修改特征值" label="是否允许修改特征值"
@ -184,30 +152,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionJobCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsRespVO.inspectionEndTime">
<el-date-picker
v-model="item.inspectionJobCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>

6
src/views/qms/inspection/inspectionJob/index.vue

@ -161,10 +161,10 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
] ]
} }

8
src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

@ -30,7 +30,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
table: { table: {
width: 150, width: 165,
fixed: 'left' fixed: 'left'
} }
}, },
@ -320,6 +320,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true disabled:true
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -346,6 +349,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true disabled:true
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }

18
src/views/qms/inspection/inspectionRecord/index.vue

@ -112,15 +112,11 @@
} }
// //
const isShowMainButton = (row, val) => { const isShowPublishedButton = (row, val) => {
if(val){ if(row.useDecision) {
if(row.useDecision){ return row.isPublished
return false } else {
}else{ return true
return true
}
}else{
return !row.isPublished
} }
} }
@ -128,9 +124,9 @@
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainApplyDecisionBtn({ hide: isShowMainButton(row, null),hasPermi:'qms:inspection-recode-main:edit'}), // 使 defaultButtons.mainApplyDecisionBtn({ hide: row.isPublished, hasPermi:'qms:inspection-recode-main:edit'}), // 使
// defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row,'pub'),hasPermi:'qms:inspection-recode-main:pub'}), // defaultButtons.mainListOrderPubBtn({ hide: isShowPublishedButton(row,'pub'), hasPermi:'qms:inspection-recode-main:pub'}), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
] ]
} }

30
src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts

@ -16,7 +16,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isForm:false, isForm:false,
table: { table: {
width: 150, width: 165,
fixed: 'left' fixed: 'left'
} }
}, },
@ -254,6 +254,9 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -280,6 +283,9 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -306,6 +312,9 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -332,6 +341,9 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -358,17 +370,6 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
} }
}, },
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// sort: 'custom',
// isSearch: false,
// isForm:false,
// table: {
// width: 150
// }
// },
{ {
label: '使用决策', label: '使用决策',
field: 'useDecision', field: 'useDecision',
@ -395,8 +396,11 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isForm: false, isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 170
} }
}, },

12
src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts

@ -75,6 +75,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -100,6 +103,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -125,6 +131,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }
@ -150,6 +159,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 150 width: 150
} }

5
src/views/qms/sampleCode/index.vue

@ -156,6 +156,11 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
if(data.batchLowLimiting >= data.batchUpperLimiting){
message.alertWarning('批量上限须大于批量下限')
basicFormRef.value.formLoading = false
return
}
var isHave =SampleCode.allSchemas.formSchema.some(function (item) { var isHave =SampleCode.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime'; return item.field === 'activeTime' || item.field === 'expireTime';
}); });

23
src/views/qms/samplingProcess/samplingProcess.data.ts

@ -1,12 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from "@/api/qms/samplingProcess"; import {getSamplingScheme} from "@/api/qms/samplingProcess";
import { validateInteger } from '@/utils/validator'
// 表单校验 // 表单校验
export const SamplingProcessRules = reactive({ export const SamplingProcessRules = reactive({
sampleType: [required], sampleType: [required],
evaluationMode: [required], evaluationMode: [required],
description: [required], description: [required],
inspectionQty: [required, {validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
}) })
const samplingSchemeList = await getSamplingScheme() const samplingSchemeList = await getSamplingScheme()
export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
@ -30,12 +32,12 @@ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
label: '取样类型', label: '取样类型',
field: 'sampleType', field: 'sampleType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.SAMPLING_TYPE, dictType: DICT_TYPE.SAMPLING_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'Select' component: 'Select'
}, },
}, },
{ {
label: '评估模式', label: '评估模式',
@ -43,15 +45,20 @@ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.EVALUATION_MODE, dictType: DICT_TYPE.EVALUATION_MODE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { form: {
component: 'Select' component: 'Select'
}, },
}, },
{ {
label: '样品量', label: '样品量',
field: 'sampleSize', field: 'sampleSize',
sort: 'custom', sort: 'custom',
}, },
{
label: '检验次数',
field: 'inspectionQty',
sort: 'custom',
},
{ {
label: '采样方案编码', label: '采样方案编码',
field: 'sampleProgCode', field: 'sampleProgCode',

9
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

@ -62,6 +62,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
isForm:false,
isTable:false,
isTableForm:false,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -83,6 +86,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '截止时间', label: '截止时间',
field: 'dueTime', field: 'dueTime',
isForm:false,
isTable:false,
isTableForm:false,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -266,6 +272,9 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
isForm:false,
isTable:false,
isTableForm:false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

Loading…
Cancel
Save