Browse Source

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

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
ec6c176ba2
  1. 2
      src/api/mes/ordermonthplan/index.ts
  2. 60
      src/api/qms/aql/index.ts
  3. 52
      src/views/mes/ordermonthplan/index.vue
  4. 61
      src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts
  5. 60
      src/views/qms/aql/aql.data.ts
  6. 38
      src/views/qms/inspectionMethod/index.vue
  7. 6
      src/views/qms/inspectionMethod/inspectionMethod.data.ts

2
src/api/mes/ordermonthplan/index.ts

@ -63,7 +63,9 @@ export interface MesOrderMonthSubVO {
status: string status: string
remark: string remark: string
productCode: string productCode: string
productName: string
bomCode: string bomCode: string
bomVersion: string
inStoreCode: string inStoreCode: string
planBegin: Date planBegin: Date
planEnd: Date planEnd: Date

60
src/api/qms/aql/index.ts

@ -6,36 +6,36 @@ export interface AqlVO {
inspectionQualification: string inspectionQualification: string
sampleCharacterCode: string sampleCharacterCode: string
sampleSize: number sampleSize: number
a0Separator010: number a0separator010: number
r0Separator010: number r0separator010: number
a0Separator015: number a0separator015: number
r0Separator015: number r0separator015: number
a0Separator025: number a0separator025: number
r0Separator025: number r0separator025: number
a0Separator040: number a0separator040: number
r0Separator040: number r0separator040: number
a0Separator065: number a0separator065: number
r0Separator065: number r0separator065: number
a0Separator10: number a0separator10: number
r0Separator10: number r0separator10: number
a0Separator15: number a0separator15: number
r0Separator15: number r0separator15: number
a0Separator25: number a0separator25: number
r0Separator25: number r0separator25: number
a0Separator40: number a0separator40: number
r0Separator40: number r0separator40: number
a0Separator65: number a0separator65: number
r0Separator65: number r0separator65: number
a1Separator0: number a1separator0: number
r1Separator0: number r1separator0: number
a1Separator5: number a1separator5: number
r1Separator5: number r1separator5: number
a2Separator5: number a2separator5: number
r2Separator5: number r2separator5: number
a4Separator0: number a4separator0: number
r4Separator0: number r4separator0: number
a6Separator5: number a6separator5: number
r6Separator5: number r6separator5: number
a10: number a10: number
r10: number r10: number
a15: number a15: number

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

@ -57,13 +57,14 @@
:detailAllSchemas="detailAllSchemas" :detailAllSchemas="detailAllSchemas"
:detailAllSchemasRules="MesOrderMonthSubRules" :detailAllSchemasRules="MesOrderMonthSubRules"
:apiPage="MesOrderMonthApi.getMesOrderMonthSubPage" :apiPage="MesOrderMonthApi.getMesOrderMonthSubPage"
:apiCreate="MesOrderMonthApi.createMesOrderMonthSub" :apiCreate="createMesOrderMonthSub"
:apiUpdate="MesOrderMonthApi.updateMesOrderMonthSub" :apiUpdate="updateMesOrderMonthSub"
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthSub" :apiDelete="MesOrderMonthApi.deleteMesOrderMonthSub"
:tabs="TabsList" :tabs="TabsList"
:detailButtonIsShowDelete="true" :detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="true" :detailButtonIsShowEdit="true"
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
@searchTableSuccessDetail="searchTableSuccess"
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import" <ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import"
@ -81,6 +82,8 @@ import {
MesOrderMonthSub, MesOrderMonthSub,
MesOrderMonthSubRules MesOrderMonthSubRules
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data"; } from "@/views/mes/ordermonthplan/mesOrderMonthSub.data";
import * as OrderDayApi from "@/api/mes/orderDay";
import {MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
defineOptions({ name: 'MesOrderMonthMain' }) defineOptions({ name: 'MesOrderMonthMain' })
@ -91,14 +94,6 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(MesOrderMonthMain.allSchemas.tableColumns) const tableColumns = ref(MesOrderMonthMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -111,6 +106,7 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi: 'mes:ordermonthplan:create'}), // defaultButtons.defaultAddBtn({hasPermi: 'mes:ordermonthplan:create'}), //
@ -255,4 +251,40 @@ onMounted(async () => {
importTemplateData.templateUrl = await MesOrderMonthApi.importTemplate() importTemplateData.templateUrl = await MesOrderMonthApi.importTemplate()
}) })
const detailAllSchemas = ref(MesOrderMonthSub.allSchemas) const detailAllSchemas = ref(MesOrderMonthSub.allSchemas)
//
let productName
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if(formField=='productCode'){
//formRef.setValues({standardBom:'bomddd'})
// getProcessroutes(val[0][searchField])
productName = val[0].name
getBoms(val[0][searchField])
}
// if(formField=='workroomCode'){
// getProductlines(val[0][searchField])
// }
})
}
const bomOptions=ref([])
const getBoms = async (code: String) => {
bomOptions.value = await OrderDayApi.getBoms(code)
MesOrderMonthSub.allSchemas.formSchema.forEach(item => {
if (item.field == 'bomCode') {
item.componentProps.options = bomOptions.value
}
})
}
const createMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName
return await MesOrderMonthApi.createMesOrderMonthSub(data)
}
const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName
return await MesOrderMonthApi.updateMesOrderMonthSub(data)
}
</script> </script>

61
src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts

@ -1,6 +1,9 @@
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 {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WorehouseApi from "@/api/wms/warehouse";
// 表单校验 // 表单校验
export const MesOrderMonthSubRules = reactive({ export const MesOrderMonthSubRules = reactive({
productCode: [required], productCode: [required],
@ -19,7 +22,33 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'productCode', field: 'productCode',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
isSearch: true isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '产品编码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '产品信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
isHideFilterButton:true,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
value: 'CCP,BCP',//,SEMI]
isMainValue: false
},
]
}
}
}, },
{ {
label: '产品名称', label: '产品名称',
@ -33,13 +62,37 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'bomCode', field: 'bomCode',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
isSearch: true isSearch: true,
form: {
component:'Select',
componentProps: {
options: [{lablel:'bom',value:'bom'}]
}
}
}, },
{ {
label: '入库仓库编码', label: '入库仓库编码',
field: 'inStoreCode', field: 'inStoreCode',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库编码', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WorehouseApi.getWarehousePage, // 查询弹窗所需分页方法
isHideFilterButton:true,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
}, },
{ {
label: '计划数量', label: '计划数量',

60
src/views/qms/aql/aql.data.ts

@ -48,152 +48,152 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: 'A0_010', label: 'A0_010',
field: 'a0Separator010', field: 'a0separator010',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_010', label: 'R0_010',
field: 'r0Separator010', field: 'r0separator010',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_015', label: 'A0_015',
field: 'a0Separator015', field: 'a0separator015',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_015', label: 'R0_015',
field: 'r0Separator015', field: 'r0separator015',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_025', label: 'A0_025',
field: 'a0Separator025', field: 'a0separator025',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_025', label: 'R0_025',
field: 'r0Separator025', field: 'r0separator025',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_040', label: 'A0_040',
field: 'a0Separator040', field: 'a0separator040',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_040', label: 'R0_040',
field: 'r0Separator040', field: 'r0separator040',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_065', label: 'A0_065',
field: 'a0Separator065', field: 'a0separator065',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_065', label: 'R0_065',
field: 'r0Separator065', field: 'r0separator065',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_10', label: 'A0_10',
field: 'a0Separator10', field: 'a0separator10',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_10', label: 'R0_10',
field: 'r0Separator10', field: 'r0separator10',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_15', label: 'A0_15',
field: 'a0Separator15', field: 'a0separator15',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_15', label: 'R0_15',
field: 'r0Separator15', field: 'r0separator15',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_25', label: 'A0_25',
field: 'a0Separator25', field: 'a0separator25',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_25', label: 'R0_25',
field: 'r0Separator25', field: 'r0separator25',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_40', label: 'A0_40',
field: 'a0Separator40', field: 'a0separator40',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_40', label: 'R0_40',
field: 'r0Separator40', field: 'r0separator40',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A0_65', label: 'A0_65',
field: 'a0Separator65', field: 'a0separator65',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R0_65', label: 'R0_65',
field: 'r0Separator65', field: 'r0separator65',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A1_0', label: 'A1_0',
field: 'a1Separator0', field: 'a1separator0',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R1_0', label: 'R1_0',
field: 'r1Separator0', field: 'r1separator0',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A1_5', label: 'A1_5',
field: 'a1Separator5', field: 'a1separator5',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R1_5', label: 'R1_5',
field: 'r1Separator5', field: 'r1separator5',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A2_5', label: 'A2_5',
field: 'a2Separator5', field: 'a2separator5',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R2_5', label: 'R2_5',
field: 'r2Separator5', field: 'r2separator5',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A4_0', label: 'A4_0',
field: 'a4Separator0', field: 'a4separator0',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R4_0', label: 'R4_0',
field: 'r4Separator0', field: 'r4separator0',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'A6_5', label: 'A6_5',
field: 'a6Separator5', field: 'a6separator5',
sort: 'custom', sort: 'custom',
}, },
{ {
label: 'R6_5', label: 'R6_5',
field: 'r6Separator5', field: 'r6separator5',
sort: 'custom', sort: 'custom',
}, },
{ {

38
src/views/qms/inspectionMethod/index.vue

@ -191,44 +191,6 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
// data.filePathList = []
// data.tmp = []
console.log(data)
// for (let i = 0; i < data.filePathListView.length; i++) {
// data.filePathList.push(data.filePathListView[i].url)
// }
// data.filePathList = []
// for (let i = 0; i < data.filePathListView.length; i++) {
// data.filePathList.push(data.filePathListView[i].url)
// }
// if(data.filePathList.length>0){
// data.videoAddress = data.filePathList.join(',')
// }
// debugger
// if(data.filePathListView instanceof Array){
// for(let i=0; i<data.filePathListView.length; i++){
// data.tmp.push(data.filePathListView[i].url)
// }
// data.videoAddress = data.tmp.join(',')
// }else{
// data.videoAddress = data.filePathListView
// data.filePathListView = data.filePathListView.split(',').map(url=>{return {url}})
// }
// for (let i = 0; i < data.filePathListView.length; i++) {
// data.filePathList.push(data.filePathListView[i])
// }
// console.log(1111,data)
// var isHave =InspectionMethod.allSchemas.formSchema.some(function (item) {
// return item.field === 'activeTime' || item.field === 'expireTime';
// });
// if(isHave){
// if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
// message.error('')
// return;
// }
// }
// if(data.activeTime==0)data.activeTime = null;
// if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') { if (formType === 'create') {
delete data['uploadFile'] delete data['uploadFile']

6
src/views/qms/inspectionMethod/inspectionMethod.data.ts

@ -5,6 +5,7 @@ import { dateFormatter } from '@/utils/formatTime'
export const InspectionMethodRules = reactive({ export const InspectionMethodRules = reactive({
code: [required], code: [required],
available: [required], available: [required],
description: [required],
}) })
export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
@ -36,11 +37,6 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
field: 'operationGuidance', field: 'operationGuidance',
sort: 'custom', sort: 'custom',
}, },
// {
// label: '视频地址',
// field: 'videoAddress',
// sort: 'custom',
// },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

Loading…
Cancel
Save