Browse Source

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

master_hella_20240701
ljlong_2630 7 months ago
parent
commit
0c5999a587
  1. 56
      src/api/mes/dismantlingDetail/index.ts
  2. 8
      src/api/mes/ordermonthplan/index.ts
  3. 2
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  4. 4
      src/api/qms/sampleCode/index.ts
  5. 8
      src/api/qms/samplingProcess/index.ts
  6. 3
      src/components/BasicForm/src/BasicForm.vue
  7. 1
      src/components/Detail/src/Detail.vue
  8. 4
      src/utils/dict.ts
  9. 13
      src/utils/disposition/defaultButtons.ts
  10. 14
      src/utils/validator.ts
  11. 181
      src/views/mes/dismantlingMain/dismantlingMain.data.ts
  12. 30
      src/views/mes/dismantlingMain/index.vue
  13. 44
      src/views/mes/ordermonthplan/index.vue
  14. 165
      src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts
  15. 194
      src/views/qms/aql/aql.data.ts
  16. 49
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  17. 19
      src/views/qms/inspection/inspectionRecord/addForm.vue
  18. 34
      src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
  19. 25
      src/views/qms/inspectionMethod/inspectionMethod.data.ts
  20. 39
      src/views/qms/sampleCode/sampleCode.data.ts
  21. 25
      src/views/qms/samplingProcess/samplingProcess.data.ts
  22. 27
      src/views/qms/samplingScheme/samplingScheme.data.ts
  23. 8
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts
  24. 146
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  25. 87
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  26. 204
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

56
src/api/mes/dismantlingDetail/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface DismantlingDetailVO {
deleteTime: Date
id: number
status: string
concurrencyStamp: number
remark: string
deleter: string
siteId: number
mainBiilno: string
materialCode: string
materialStauts: string
materialProcessstauts: string
}
// 查询报废拆解明细列表
export const getDismantlingDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/dismantling-detail/senior', data })
} else {
return await request.get({ url: `/mes/dismantling-detail/page`, params })
}
}
// 查询报废拆解明细详情
export const getDismantlingDetail = async (id: number) => {
return await request.get({ url: `/mes/dismantling-detail/get?id=` + id })
}
// 新增报废拆解明细
export const createDismantlingDetail = async (data: DismantlingDetailVO) => {
return await request.post({ url: `/mes/dismantling-detail/create`, data })
}
// 修改报废拆解明细
export const updateDismantlingDetail = async (data: DismantlingDetailVO) => {
return await request.put({ url: `/mes/dismantling-detail/update`, data })
}
// 删除报废拆解明细
export const deleteDismantlingDetail = async (id: number) => {
return await request.delete({ url: `/mes/dismantling-detail/delete?id=` + id })
}
// 导出报废拆解明细 Excel
export const exportDismantlingDetail = async (params) => {
return await request.download({ url: `/mes/dismantling-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/dismantling-detail/get-import-template' })
}

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

@ -108,3 +108,11 @@ export const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
export const deleteMesOrderMonthSub = async (id: number) => { export const deleteMesOrderMonthSub = async (id: number) => {
return await request.delete({ url: `/plan/mes-order-month-sub/delete?id=` + id }) return await request.delete({ url: `/plan/mes-order-month-sub/delete?id=` + id })
} }
export interface MesOrderMonthSubBreakdownReqVO{
planMasterId: string
id: number
}
// 拆解为日计划
export const breakdown = async (data: MesOrderMonthSubBreakdownReqVO) => {
return await request.post({ url: `/plan/mes-order-month-sub/breakdown`,data})
}

2
src/api/qms/inspectionRecord/inspectionRecordMain/index.ts

@ -67,7 +67,7 @@ export const importTemplate = () => {
export const publishInspectionRecordMain = async (data ) => { export const publishInspectionRecordMain = async (data ) => {
return await request.put({ url: `/qms/inspection-record-main/publish`, data }) return await request.put({ url: `/qms/inspection-record-main/publish`, data })
} }
//查询检验申请列表 //查询包装列表
export const getInspectionRecordPackageList = async (id: number) => { export const getInspectionRecordPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-record-package/list?masterId=` + id }) return await request.get({ url: `/qms/inspection-record-package/list?masterId=` + id })
} }

4
src/api/qms/sampleCode/index.ts

@ -55,3 +55,7 @@ export const exportSampleCode = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/sample-code/get-import-template' }) return request.download({ url: '/qms/sample-code/get-import-template' })
} }
export const getSamplingScheme = async () => {
return await request.get({ url: `/qms/sampling-scheme/get-available-list`})
}

8
src/api/qms/samplingProcess/index.ts

@ -1,4 +1,5 @@
import request from '@/config/axios' import request from '@/config/axios'
import { validatePercent } from '@/utils/validator'
export interface SamplingProcessVO { export interface SamplingProcessVO {
id: number id: number
@ -7,10 +8,15 @@ export interface SamplingProcessVO {
sampleType: string sampleType: string
evaluationMode: string evaluationMode: string
sampleSize: number sampleSize: number
sampleProgCode: number sampleProgCode: String
available: string available: string
} }
const rules = ref({
sampleSize:[
{validator:validatePercent,message:'百分比范围 0 ~ 100', trigger:'blur'}
]
})
// 查询采样过程列表 // 查询采样过程列表
export const getSamplingProcessPage = async (params) => { export const getSamplingProcessPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {

3
src/components/BasicForm/src/BasicForm.vue

@ -637,6 +637,9 @@ const handleAddTable = () => {
} }
// //
const inpuFocus = (headerItem, row, index) => { const inpuFocus = (headerItem, row, index) => {
emit('inpuFocus', headerItem, row, index)
opensearchTable( opensearchTable(
headerItem.field, headerItem.field,
headerItem.tableForm.searchField, headerItem.tableForm.searchField,

1
src/components/Detail/src/Detail.vue

@ -713,6 +713,7 @@ const opensearchTable = (
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
debugger
if (val == 'edit') { if (val == 'edit') {
// //
if(props.isOpenSearchTable){ if(props.isOpenSearchTable){

4
src/utils/dict.ts

@ -312,6 +312,10 @@ export enum DICT_TYPE {
REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成 REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成
REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件 REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件
DISMANTLING_BILL_TYPE = 'dismantling_bill_type',//工单类型 DISMANTLING_BILL_TYPE = 'dismantling_bill_type',//工单类型
DISMANTLING_MATERIAL_STATUS = 'dismantling_material_status',//报废拆解物料状态
DISMANTLING_MATERIAL_HANDLE_STATUS = 'dismantling_material_handle_status',//报废拆解处理状态
SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态 SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态
SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态 SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态
} }

13
src/utils/disposition/defaultButtons.ts

@ -471,6 +471,19 @@ export function mainListPlanCloBtn(option:any) {
}) })
} }
// 主列表-上传质量报告
export function mainListPlanUploadQualityReportBtn(option:any) {
return __defaultBtnOption(option,{
label: '上传质量报告',
name: 'mainPlanUploadQualityReport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-提交审批按钮 // 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option:any) { export function mainListPlanSubBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

14
src/utils/validator.ts

@ -748,6 +748,17 @@ export function validateYS(rule, value, callback) {
callback() callback()
} }
} }
// 校验百分比
export function validatePercent(rule, value, callback){
if (!value) {
return callback(new Error('百分比不能为空'))
} else {
if(value < 0 || value > 100){
return callback(new Error('百分比范围 0 ~ 100'))
}
callback()
}
}
export default { export default {
validateCode, validateCode,
@ -780,5 +791,6 @@ export default {
validateName, validateName,
validateChargeperson, validateChargeperson,
validateYS, validateYS,
validateMaxNumber5 validateMaxNumber5,
validatePercent
} }

181
src/views/mes/dismantlingMain/dismantlingMain.data.ts

@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic"; import * as ItembasicApi from "@/api/wms/itembasic";
// 表单校验 // 表单校验
export const DismantlingMainRules = reactive({ export const DismantlingMainRules = reactive({
productionCode: [required], productionCode: [required],
workbillType: [required], workbillType: [required],
@ -175,3 +175,182 @@ export const DismantlingMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
])) ]))
export const DismantlingDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '删除时间',
field: 'deleteTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '主键',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Radio'
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
},
{
label: '删除用户名',
field: 'deleter',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '位置ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '单据编码',
field: 'mainBiilno',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'
}
},
{
label: '物料编码',
field: 'materialCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '物料编码', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
value: 'BCP,CCP',//,SEMI]
isMainValue: false
}]
}
}
},
{
label: '物料状态',
field: 'materialStauts',
sort: 'custom',
dictType: DICT_TYPE.DISMANTLING_MATERIAL_STATUS,
dictClass: 'string',
isSearch: true,
},
{
label: '处理状态',
field: 'materialProcessstauts',
dictType: DICT_TYPE.DISMANTLING_MATERIAL_HANDLE_STATUS,
dictClass: 'string',
sort: 'custom',
isSearch: true,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 子表单校验
export const DismantlingDetailRules = reactive({
materialCode: [required],
materialStauts: [required],
materialProcessstauts: [required],
})

30
src/views/mes/dismantlingMain/index.vue

@ -28,7 +28,7 @@
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #dismantlingBillno="{row}"> <template #dismantlingBillno="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.dismantlingBillno)"> <el-button type="primary" link @click="openDetail(row, '单据编号', row.dismantlingBillno)">
<span>{{ row.dismantlingBillno }}</span> <span>{{ row.dismantlingBillno }}</span>
</el-button> </el-button>
</template> </template>
@ -51,7 +51,21 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="DismantlingMain.allSchemas" /> <Detail ref="detailRef"
:isBasic="false"
:allSchemas="DismantlingMain.allSchemas"
:detailAllSchemas="DismantlingDetail.allSchemas"
:detailAllSchemasRules="DismantlingDetailRules"
:apiPage="DismantlingDetailApi.getDismantlingDetailPage"
:apiCreate="DismantlingDetailApi.createDismantlingDetail"
:apiUpdate="DismantlingDetailApi.updateDismantlingDetail"
:apiDelete="DismantlingDetailApi.deleteDismantlingDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowEdit="true"
:detailButtonIsShowDelete="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
:key="count"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/dismantling-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/mes/dismantling-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -59,8 +73,9 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { DismantlingMain,DismantlingMainRules } from './dismantlingMain.data' import { DismantlingMain,DismantlingMainRules,DismantlingDetail,DismantlingDetailRules } from './dismantlingMain.data'
import * as DismantlingMainApi from '@/api/mes/dismantlingMain' import * as DismantlingMainApi from '@/api/mes/dismantlingMain'
import * as DismantlingDetailApi from '@/api/mes/dismantlingDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -85,6 +100,15 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}) })
} }
//
const searchTableSuccessDetail = (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

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

@ -65,6 +65,29 @@
:detailButtonIsShowEdit="true" :detailButtonIsShowEdit="true"
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
@searchTableSuccessDetail="searchTableSuccess" @searchTableSuccessDetail="searchTableSuccess"
:otherHeadButttonData = "[{
label: '全部拆解',
name: 'splitAll',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
}]"
:buttondataTable = "[{
label: '拆解',
name: 'split',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
link: true, //
hasPermi: ''
}]"
@buttonBaseClick="detailButtonBaseClick"
@buttondataTable="detailButtonBaseClick"
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import" <ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import"
@ -83,7 +106,7 @@ 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 {MesOrderMonthSubVO} from "@/api/mes/ordermonthplan"; import {breakdown, MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
defineOptions({ name: 'MesOrderMonthMain' }) defineOptions({ name: 'MesOrderMonthMain' })
@ -188,7 +211,9 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
let mainPlanId
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
mainPlanId = row.id
detailRef.value.openDetail(row, titleName, titleValue, 'basicMesOrderMonthMain') detailRef.value.openDetail(row, titleName, titleValue, 'basicMesOrderMonthMain')
} }
@ -287,4 +312,21 @@ const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName data.productName = productName
return await MesOrderMonthApi.updateMesOrderMonthSub(data) return await MesOrderMonthApi.updateMesOrderMonthSub(data)
} }
// --
const detailButtonBaseClick = async (val, item) => {
debugger
try {
//
await message.confirm('确定要拆解成日计划吗?')
//
await MesOrderMonthApi.breakdown({
id : item.id,
planMasterId: mainPlanId
})
message.success(t('common.delSuccess'))
//
await getList()
} catch {
}
}
</script> </script>

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

@ -74,14 +74,70 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '计划开始日期',
field: 'planBegin',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180,
fixed: 'left'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '计划结束日期',
field: 'planEnd',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180,
fixed: 'left'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 100,
fixed: 'left'
},
},
{ {
label: '入库仓库编码', label: '入库仓库编码',
field: 'inStoreCode', field: 'inStoreCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 140, width: 150
fixed: 'left'
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -108,20 +164,36 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 120, width: 120
fixed: 'left'
}, },
}, },
{ {
label: '状态', label: '实际开工日期',
field: 'status', field: 'realStart',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 100, width: 180
fixed: 'left' }
}, },
{
label: '实际完工日期',
field: 'realFinish',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
}, },
{ {
label: '是否回冲', label: '是否回冲',
@ -130,8 +202,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isForm: false, isForm: false,
table: { table: {
width: 120, width: 120
fixed: 'left'
}, },
}, },
{ {
@ -198,78 +269,6 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false isForm: false
}, },
{
label: '计划开始日期',
field: 'planBegin',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '计划结束日期',
field: 'planEnd',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '实际开工日期',
field: 'realStart',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{
label: '实际完工日期',
field: 'realFinish',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -281,7 +280,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 160,
fixed: 'right' fixed: 'right'
} }
} }

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

@ -7,7 +7,7 @@ export const AqlRules = reactive({
inspectionQualification: [required], inspectionQualification: [required],
sampleCharacterCode: [required], sampleCharacterCode: [required],
sampleSize: [required], sampleSize: [required],
available: [required], // available: [required],
}) })
export const Aql = useCrudSchemas(reactive<CrudSchema[]>([ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
@ -23,6 +23,10 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 175,
fixed: 'left'
}
}, },
{ {
label: '检验严格性', label: '检验严格性',
@ -34,294 +38,462 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'SelectV2' component: 'SelectV2'
}, },
table: {
width: 130
}
}, },
{ {
label: '样本字码', label: '样本字码',
field: 'sampleCharacterCode', field: 'sampleCharacterCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 110
}
}, },
{ {
label: '样本量', label: '样本量',
field: 'sampleSize', field: 'sampleSize',
sort: 'custom', sort: 'custom',
table: {
width: 95
}
}, },
{ {
label: 'A0_010', label: 'A0_010',
field: 'a0separator010', field: 'a0separator010',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_010', label: 'R0_010',
field: 'r0separator010', field: 'r0separator010',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_015', label: 'A0_015',
field: 'a0separator015', field: 'a0separator015',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_015', label: 'R0_015',
field: 'r0separator015', field: 'r0separator015',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_025', label: 'A0_025',
field: 'a0separator025', field: 'a0separator025',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_025', label: 'R0_025',
field: 'r0separator025', field: 'r0separator025',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_040', label: 'A0_040',
field: 'a0separator040', field: 'a0separator040',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_040', label: 'R0_040',
field: 'r0separator040', field: 'r0separator040',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_065', label: 'A0_065',
field: 'a0separator065', field: 'a0separator065',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_065', label: 'R0_065',
field: 'r0separator065', field: 'r0separator065',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_10', label: 'A0_10',
field: 'a0separator10', field: 'a0separator10',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_10', label: 'R0_10',
field: 'r0separator10', field: 'r0separator10',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_15', label: 'A0_15',
field: 'a0separator15', field: 'a0separator15',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_15', label: 'R0_15',
field: 'r0separator15', field: 'r0separator15',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_25', label: 'A0_25',
field: 'a0separator25', field: 'a0separator25',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_25', label: 'R0_25',
field: 'r0separator25', field: 'r0separator25',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_40', label: 'A0_40',
field: 'a0separator40', field: 'a0separator40',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_40', label: 'R0_40',
field: 'r0separator40', field: 'r0separator40',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A0_65', label: 'A0_65',
field: 'a0separator65', field: 'a0separator65',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R0_65', label: 'R0_65',
field: 'r0separator65', field: 'r0separator65',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A1_0', label: 'A1_0',
field: 'a1separator0', field: 'a1separator0',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R1_0', label: 'R1_0',
field: 'r1separator0', field: 'r1separator0',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A1_5', label: 'A1_5',
field: 'a1separator5', field: 'a1separator5',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R1_5', label: 'R1_5',
field: 'r1separator5', field: 'r1separator5',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A2_5', label: 'A2_5',
field: 'a2separator5', field: 'a2separator5',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R2_5', label: 'R2_5',
field: 'r2separator5', field: 'r2separator5',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A4_0', label: 'A4_0',
field: 'a4separator0', field: 'a4separator0',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R4_0', label: 'R4_0',
field: 'r4separator0', field: 'r4separator0',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A6_5', label: 'A6_5',
field: 'a6separator5', field: 'a6separator5',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R6_5', label: 'R6_5',
field: 'r6separator5', field: 'r6separator5',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A10', label: 'A10',
field: 'a10', field: 'a10',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R10', label: 'R10',
field: 'r10', field: 'r10',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A15', label: 'A15',
field: 'a15', field: 'a15',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R15', label: 'R15',
field: 'r15', field: 'r15',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A25', label: 'A25',
field: 'a25', field: 'a25',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R25', label: 'R25',
field: 'r25', field: 'r25',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A40', label: 'A40',
field: 'a40', field: 'a40',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R40', label: 'R40',
field: 'r40', field: 'r40',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A65', label: 'A65',
field: 'a65', field: 'a65',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R65', label: 'R65',
field: 'r65', field: 'r65',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A100', label: 'A100',
field: 'a100', field: 'a100',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R100', label: 'R100',
field: 'r100', field: 'r100',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A150', label: 'A150',
field: 'a150', field: 'a150',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R150', label: 'R150',
field: 'r150', field: 'r150',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A250', label: 'A250',
field: 'a250', field: 'a250',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R250', label: 'R250',
field: 'r250', field: 'r250',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A400', label: 'A400',
field: 'a400', field: 'a400',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R400', label: 'R400',
field: 'r400', field: 'r400',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A650', label: 'A650',
field: 'a650', field: 'a650',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R650', label: 'R650',
field: 'r650', field: 'r650',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'A1000', label: 'A1000',
field: 'a1000', field: 'a1000',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ {
label: 'R1000', label: 'R1000',
field: 'r1000', field: 'r1000',
sort: 'custom', sort: 'custom',
table: {
width: 105
}
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 // dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { // form: {
component: 'SelectV2' // component: 'SelectV2'
}, // },
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
table: {
width: 115
}
}, },
{ {
label: '操作', label: '操作',

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

@ -30,7 +30,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
table: { table: {
width: 150 width: 150,
fixed: 'left'
} }
}, },
{ {
@ -276,34 +277,6 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
} }
}, },
{
label: '检验任务包装列表',
field: 'inspectionTaskPackageCode',
sort: 'custom',
isSearch: false,
form:{
componentProps:{
disabled:true
}
},
table: {
width: 150
}
},
{
label: '检验任务工序列表',
field: 'inspectionTaskProcessCode',
sort: 'custom',
isSearch: false,
form:{
componentProps:{
disabled:true
}
},
table: {
width: 150
}
},
{ {
label: '计划开始时间', label: '计划开始时间',
field: 'planStartTime', field: 'planStartTime',
@ -539,6 +512,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -548,6 +524,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -557,6 +536,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -570,6 +552,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -579,6 +564,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -586,6 +574,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'sampleAmount', field: 'sampleAmount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table:{
width:150
}
}, },
])) ]))
//表单校验 //表单校验

19
src/views/qms/inspection/inspectionRecord/addForm.vue

@ -37,25 +37,12 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">44
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getCurrentInstance } from 'vue' import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data' import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
// import { InspectionTemplateMain } from '@/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data'
// import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate'
// import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// import * as ItemBasicApi from '@/api/wms/itembasic'
import * as SamplingProcessApi from '@/api/qms/samplingProcess' //
import * as InspectionMethodApi from '@/api/qms/inspectionMethod' //
import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' //
import * as DynamicRuleApi from '@/api/qms/dynamicRule' //
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@ -145,7 +132,7 @@ 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))
data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id) data.value.packageList = await InspectionRecordMainApi.getInspectionRecordPackageList(row.id)
data.value.packageList.forEach(item=>{ data.value.packageList.forEach(item=>{
item.qualifiedAmount =0 item.qualifiedAmount =0
item.noQualifiedAmount =0 item.noQualifiedAmount =0

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

@ -6,7 +6,7 @@ import {validateTwoNum } from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
@ -16,7 +16,8 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isForm:false, isForm:false,
table: { table: {
width: 150 width: 150,
fixed: 'left'
} }
}, },
{ {
@ -404,7 +405,7 @@ export const InspectionRecordMainRules = reactive({
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
@ -573,6 +574,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -582,6 +586,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -595,6 +602,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -604,6 +614,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -613,6 +626,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -622,6 +638,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -631,6 +650,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -640,6 +662,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
}, },
{ {
@ -649,6 +674,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm:{ tableForm:{
disabled:true disabled:true
},
table:{
width:150
} }
} }
])) ]))

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

@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const InspectionMethodRules = reactive({ export const InspectionMethodRules = reactive({
available: [required], // available: [required],
description: [required], description: [required],
}) })
@ -21,6 +21,9 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false, isForm:false,
table: {
fixed: 'left'
}
}, },
{ {
label: '描述', label: '描述',
@ -37,16 +40,16 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
field: 'operationGuidance', field: 'operationGuidance',
sort: 'custom', sort: 'custom',
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 // dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { // form: {
component: 'SelectV2' // component: 'SelectV2'
}, // },
}, // },
{ {
label: '文件', label: '文件',
field: 'videoAddress', field: 'videoAddress',

39
src/views/qms/sampleCode/sampleCode.data.ts

@ -1,13 +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/sampleCode/index'
// 表单校验 // 表单校验
export const SampleCodeRules = reactive({ export const SampleCodeRules = reactive({
code: [required], code: [required],
batchUpperLimiting: [required], batchUpperLimiting: [required],
available: [required], // available: [required],
}) })
const samplingSchemeList = await getSamplingScheme()
export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([ export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'id', label: 'id',
@ -21,6 +22,20 @@ export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'Select',
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'description',
valueField: 'code'
},
}
},
table: {
width: 175,
fixed: 'left'
}
}, },
{ {
label: '批量下限', label: '批量下限',
@ -77,16 +92,16 @@ export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([
field: 'g3', field: 'g3',
sort: 'custom', sort: 'custom',
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 // dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { // form: {
component: 'SelectV2' // component: 'Select'
}, // },
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

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

@ -5,7 +5,7 @@ import { dateFormatter } from '@/utils/formatTime'
export const SamplingProcessRules = reactive({ export const SamplingProcessRules = reactive({
sampleType: [required], sampleType: [required],
evaluationMode: [required], evaluationMode: [required],
available: [required], // available: [required],
description: [required], description: [required],
}) })
@ -23,6 +23,9 @@ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
table: {
fixed: 'left'
}
}, },
{ {
label: '描述', label: '描述',
@ -64,16 +67,16 @@ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 // dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { // form: {
component: 'Select' // component: 'Select'
}, // },
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

27
src/views/qms/samplingScheme/samplingScheme.data.ts

@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const SamplingSchemeRules = reactive({ export const SamplingSchemeRules = reactive({
available: [required], // available: [required],
description: [required], description: [required],
}) })
@ -21,6 +21,9 @@ export const SamplingScheme = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
table: {
fixed: 'left'
}
}, },
{ {
label: '描述', label: '描述',
@ -28,17 +31,17 @@ export const SamplingScheme = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 // dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, // isSearch: true,
form: { // form: {
component: 'SelectV2' // component: 'SelectV2'
}, // },
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

8
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

@ -40,6 +40,14 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180 width: 180
}, },
}, },
{
label: 'qad采购退货记录单号',
field: 'qadPurchaseRrturnRecordCode',
sort: 'custom',
table: {
width: 180
},
},
{ {
label: '发货单号', label: '发货单号',
field: 'asnNumber', field: 'asnNumber',

146
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -55,7 +55,31 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isForm: false, form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},{
key: 'status',
value: 2,
isMainValue: false
}]
}
}
}, },
{ {
label: '送达日期', label: '送达日期',
@ -315,6 +339,9 @@ export const PurchasePlanMainRules = reactive({
available: [ available: [
{ required: true, message: '请选择是否可用', trigger: 'change' } { required: true, message: '请选择是否可用', trigger: 'change' }
], ],
poNumber: [
{ required: true, message: '请选择采购订单号', trigger: 'change' }
],
deliveryDate: [ deliveryDate: [
{ required: true, message: '请选择送达时间', trigger: 'change' } { required: true, message: '请选择送达时间', trigger: 'change' }
], ],
@ -350,62 +377,62 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '订单号', // label: '订单号',
field: 'poNumber', // field: 'poNumber',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 180 // width: 180
}, // },
tableForm: { // tableForm: {
isInpuFocusShow: true, // isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号', // searchListPlaceholder: '请选择订单号',
searchField: 'number', // searchField: 'number',
searchTitle: '采购订单信息', // searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas, // searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage, // searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
}, { // }, {
key: 'supplierCode', // key: 'supplierCode',
value: 'supplierCode', // value: 'supplierCode',
message: '请填写供应商代码!', // message: '请填写供应商代码!',
isMainValue: true // isMainValue: true
}, { // }, {
key: 'status', // key: 'status',
value: 2, // value: 2,
isMainValue: false // isMainValue: false
} // }
] // ]
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // isSearchList: true,
searchListPlaceholder: '请选择订单号', // searchListPlaceholder: '请选择订单号',
searchField: 'number', // searchField: 'number',
searchTitle: '采购订单信息', // searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas, // searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage, // searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'supplierCode', // key: 'supplierCode',
value: 'supplierCode', // value: 'supplierCode',
message: '请填写供应商代码!', // message: '请填写供应商代码!',
isMainValue: true // isMainValue: true
},{ // },{
key: 'status', // key: 'status',
value: 2, // value: 2,
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
{ {
label: '订单行', label: '订单行',
field: 'poLine', field: 'poLine',
@ -530,7 +557,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
disabled:false, disabled:true,
} }
}, },
{ {
@ -617,9 +644,6 @@ export const PurchasePlanDetailRules = reactive({
// available: [ // available: [
// { required: true, message: '请选择是否可用', trigger: 'change' } // { required: true, message: '请选择是否可用', trigger: 'change' }
// ], // ],
poNumber: [
{ required: true, message: '请选择采购订单号', trigger: 'change' }
],
shippedQty: [ shippedQty: [
{ required: true, message: '请输入已发货数量', trigger: 'blur' } { required: true, message: '请输入已发货数量', trigger: 'blur' }
], ],

87
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -45,6 +45,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
:indexTableColumn="3"
@success="getList" @success="getList"
:rules="SupplierdeliverRequestMainRules" :rules="SupplierdeliverRequestMainRules"
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" :formAllSchemas="SupplierdeliverRequestMain.allSchemas"
@ -99,6 +101,18 @@
@submitForm="submitFormLabel" @submitForm="submitFormLabel"
:isShowReduceButton="false" :isShowReduceButton="false"
/> />
<!-- 上传质量报告 -->
<BasicForm
ref="ploadQualityReportRef"
@success="getList"
:formAllSchemas="UploadQualityReport.allSchemas"
:tableAllSchemas="UploadQualityReport.allSchemas"
:tableData="ploadQualityReportTableData"
@handleAddTable="handleAddTableUploadQualityReport"
@handleDeleteTable="handleDeleteTableUploadQualityReport"
@submitForm="submitFormUploadQualityReport"
:isShowReduceButton="true"
/>
</template> </template>
@ -112,12 +126,12 @@ import {
SupplierdeliverRequestDetail, SupplierdeliverRequestDetail,
SupplierdeliverRequestDetailRules, SupplierdeliverRequestDetailRules,
SupplierdeliverRequestDetailLabel, SupplierdeliverRequestDetailLabel,
UploadQualityReport
} from './supplierdeliverRequestMain.data' } from './supplierdeliverRequestMain.data'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate,addDay } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as itemBasicApi from '@/api/wms/itembasic'
// //
defineOptions({ name: 'SupplierdeliverRequestMain' }) defineOptions({ name: 'SupplierdeliverRequestMain' })
@ -139,25 +153,28 @@ const planArriveTimeStr = ref()
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
console.log("type:",type)
console.log("formField:",formField) console.log("formField:",formField)
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] // row[formField] = val[0][searchField]
if (formField == 'poNumber') { // if (formField == 'poNumber') {
row['poNumber'] = val[0]['poNumber'] // row['poNumber'] = val[0]['poNumber']
row['itemCode'] = val[0]['itemCode'] // row['itemCode'] = val[0]['itemCode']
row['poLine'] = val[0]['poLine'] // row['poLine'] = val[0]['poLine']
row['orderQty'] = val[0]['orderQty'] // row['orderQty'] = val[0]['orderQty']
row['uom'] = val[0]['uom'] // row['uom'] = val[0]['uom']
itemBasicApi.getItembasicPage({ // }
code: val[0]['itemCode'] val.forEach(item=>{
}).then((res) => { const newRow = {...row}
let cf = addDay(row['produceDate'],res.list[0].validityDays); newRow[formField] = item[searchField]
row['expireDate'] = cf; newRow['poNumber'] = item['poNumber']
}).catch((err) => { newRow['itemCode'] = item['itemCode']
console.log(err) newRow['poLine'] = item['poLine']
newRow['orderQty'] = item['orderQty']
newRow['uom'] = item['uom']
tableData.value.push(newRow)
}) })
}
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
@ -292,6 +309,7 @@ const isShowMainButtonLabel = (row, val) => {
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPlanUploadQualityReportBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
@ -335,6 +353,9 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPurPlanClo') { } else if (val == 'mainPurPlanClo') {
// //
handleClo(row.id) handleClo(row.id)
} else if (val == 'mainPlanUploadQualityReport') {
//
handleUploadQualityReport(row.id)
} else if (val == 'mainPlanSub') { } else if (val == 'mainPlanSub') {
// //
handleSub(row.id) handleSub(row.id)
@ -475,6 +496,38 @@ const handleOpe = async (id: number) => {
tableObject.loading = false tableObject.loading = false
} }
} }
const ploadQualityReportRef = ref()
const ploadQualityReportTableData = ref([])
/** 上传质量报告 */
const handleUploadQualityReport = async (id: number) => {
console.log('UploadQualityReport',UploadQualityReport.allSchemas)
// ploadQualityReportRef.value.dialogVisible = true
ploadQualityReportRef.value.open('create', null, null,'上传质量报告')// createLabel
const tableFormKeys = {}
UploadQualityReport.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
ploadQualityReportTableData.value = [tableFormKeys]
}
const handleAddTableUploadQualityReport = ()=>{
const tableFormKeys = {}
UploadQualityReport.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
ploadQualityReportTableData.value.push(tableFormKeys)
}
const handleDeleteTableUploadQualityReport = (item, index) => {
ploadQualityReportTableData.value.splice(index, 1)
}
const submitFormUploadQualityReport = (formType, data) => {
console.log("formType==",formType)
console.log("data==",data)
ploadQualityReportRef.value.dialogVisible = false
// formLabelRef.value.formLoading = false
// formLabelRef.value.dialogVisible = false
}
/** 提交审批按钮操作 */ /** 提交审批按钮操作 */
const handleSub = async (id: number) => { const handleSub = async (id: number) => {

204
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -224,20 +224,20 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
}, },
{ // {
label: '业务类型', // label: '业务类型',
field: 'businessType', // field: 'businessType',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
value: 'SupplierDeliver', // value: 'SupplierDeliver',
componentProps: { // componentProps: {
disabled: true, // disabled: true,
} // }
} // }
}, // },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -322,29 +322,29 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
isForm: false isForm: false
}, },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { // formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name // return userDeptArray.find((account) => account.id == cellValue)?.name
}, // },
form: { // form: {
value: userDept.id, // value: userDept.id,
component: 'Select', // component: 'Select',
api: () => userDeptArray, // api: () => userDeptArray,
componentProps: { // componentProps: {
disabled: true, // disabled: true,
optionsAlias: { // optionsAlias: {
labelField: 'name', // labelField: 'name',
valueField: 'id' // valueField: 'id'
} // }
} // }
} // }
}, // },
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
@ -528,9 +528,9 @@ export const SupplierdeliverRequestMainRules = reactive({
planArriveTime: [ planArriveTime: [
{ required: true, message: '请输入计划到货时间', trigger: 'blur' } { required: true, message: '请输入计划到货时间', trigger: 'blur' }
], ],
departmentCode: [ // departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } // { required: true, message: '请输入部门', trigger: 'blur' }
], // ],
autoCommit: [ autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' } { required: true, message: '请选择是否自动提交', trigger: 'change' }
], ],
@ -586,19 +586,19 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150 width: 150
}, },
tableForm: { tableForm: {
disabled: true disabled: false
} }
}, },
{ // {
label: '替代批次', // label: '替代批次',
field: 'altBatch', // field: 'altBatch',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false // isForm: false
}, // },
{ {
label: '到货日期', label: '到货日期',
field: 'arriveDate', field: 'arriveDate',
@ -1014,6 +1014,19 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
])) ]))
// 批次校验
const validateBatch = (rule: any, value: any, callback: any) => {
const reg = /^[_a-zA-Z0-9]+$/;
if (value == '' || value == undefined || value == null) {
callback();
} else {
if (!reg.test(value)) {
callback(new Error('英文字母、数字或下划线'));
} else {
callback();
}
}
}
//表单校验 //表单校验
export const SupplierdeliverRequestDetailRules = reactive({ export const SupplierdeliverRequestDetailRules = reactive({
// packingNumber: [ // packingNumber: [
@ -1022,6 +1035,7 @@ export const SupplierdeliverRequestDetailRules = reactive({
batch: [ batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }, { required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateBatch, trigger: 'change' }
], ],
produceDate: [ produceDate: [
{ required: true, message: '请输入生产日期', trigger: 'blur' } { required: true, message: '请输入生产日期', trigger: 'blur' }
@ -1089,19 +1103,19 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
valueFormat: 'x', valueFormat: 'x',
} }
}, },
{ // {
label: '替代批次', // label: '替代批次',
field: 'altBatch', // field: 'altBatch',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
tableForm:{ // tableForm:{
disabled:true // disabled:true
} // }
}, // },
{ {
label: '到货日期', label: '到货日期',
field: 'arriveDate', field: 'arriveDate',
@ -1562,3 +1576,65 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
isForm: false isForm: false
}, },
])) ]))
export const UploadQualityReport = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '上传质检报告',
field: 'uploadFile',
sort: 'custom',
isTable:false,
isTableForm:false,
form: {
component: 'UploadFile',
componentProps: {
upData:{
tableId: '',
tableName: ''
},
limit:1,
}
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isForm:false,
isTableForm:true,
table: {
width: 150,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
isForm:false,
isTableForm:true,
table: {
width: 150,
},
},
{
label: '数量',
field: 'orderQty',
table: {
width: 150
},
isForm:false,
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isForm:false,
table: {
width: 150
},
},
]))
Loading…
Cancel
Save