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 5 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. 91
      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) => {
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 ) => {
return await request.put({ url: `/qms/inspection-record-main/publish`, data })
}
//查询检验申请列表
//查询包装列表
export const getInspectionRecordPackageList = async (id: number) => {
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 = () => {
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 { validatePercent } from '@/utils/validator'
export interface SamplingProcessVO {
id: number
@ -7,10 +8,15 @@ export interface SamplingProcessVO {
sampleType: string
evaluationMode: string
sampleSize: number
sampleProgCode: number
sampleProgCode: String
available: string
}
const rules = ref({
sampleSize:[
{validator:validatePercent,message:'百分比范围 0 ~ 100', trigger:'blur'}
]
})
// 查询采样过程列表
export const getSamplingProcessPage = async (params) => {
if (params.isSearch) {

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

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

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

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

4
src/utils/dict.ts

@ -312,6 +312,10 @@ export enum DICT_TYPE {
REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成
REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件
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_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) {
return __defaultBtnOption(option,{

14
src/utils/validator.ts

@ -748,6 +748,17 @@ export function validateYS(rule, value, 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 {
validateCode,
@ -780,5 +791,6 @@ export default {
validateName,
validateChargeperson,
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 * as ItembasicApi from "@/api/wms/itembasic";
// 表单校验
// 表单校验
export const DismantlingMainRules = reactive({
productionCode: [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"
>
<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>
</el-button>
</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" />
@ -59,8 +73,9 @@
<script setup lang="ts">
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 DismantlingDetailApi from '@/api/mes/dismantlingDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.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) => {
tableColumns.value = val

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

@ -65,6 +65,29 @@
:detailButtonIsShowEdit="true"
:detailButtonIsShowAdd="true"
@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"
@ -83,7 +106,7 @@ import {
MesOrderMonthSubRules
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data";
import * as OrderDayApi from "@/api/mes/orderDay";
import {MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
import {breakdown, MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
defineOptions({ name: 'MesOrderMonthMain' })
@ -188,7 +211,9 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
let mainPlanId
const openDetail = (row: any, titleName: any, titleValue: any) => {
mainPlanId = row.id
detailRef.value.openDetail(row, titleName, titleValue, 'basicMesOrderMonthMain')
}
@ -287,4 +312,21 @@ const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName
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>

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: '入库仓库编码',
field: 'inStoreCode',
sort: 'custom',
isSearch: true,
table: {
width: 140,
fixed: 'left'
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
@ -108,20 +164,36 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
table: {
width: 120,
fixed: 'left'
width: 120
},
},
{
label: '状态',
field: 'status',
label: '实际开工日期',
field: 'realStart',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 100,
fixed: 'left'
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: '是否回冲',
@ -130,8 +202,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isForm: false,
table: {
width: 120,
fixed: 'left'
width: 120
},
},
{
@ -198,78 +269,6 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
},
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: '备注',
field: 'remark',
@ -281,7 +280,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 160,
fixed: 'right'
}
}

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

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

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

@ -30,7 +30,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
table: {
width: 150
width: 150,
fixed: 'left'
}
},
{
@ -276,34 +277,6 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
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: '计划开始时间',
field: 'planStartTime',
@ -539,6 +512,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -548,6 +524,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -557,6 +536,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -570,6 +552,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -579,6 +564,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -586,6 +574,9 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
table:{
width:150
}
},
]))
//表单校验

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

@ -37,25 +37,12 @@
</div>
</template>
<script setup lang="ts">
<script setup lang="ts">44
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { SearchTable } from '@/components/SearchTable'
import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data'
// 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'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
const { proxy } = getCurrentInstance()
@ -145,7 +132,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type
if (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=>{
item.qualifiedAmount =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() // 国际化
/**
* @returns {Array}
* @returns {Array}
*/
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
@ -16,7 +16,8 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isForm:false,
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[]>([
{
@ -573,6 +574,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -582,6 +586,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -595,6 +602,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -604,6 +614,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -613,6 +626,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -622,6 +638,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -631,6 +650,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -640,6 +662,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
@ -649,6 +674,9 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm:{
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({
available: [required],
// available: [required],
description: [required],
})
@ -21,6 +21,9 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm:false,
table: {
fixed: 'left'
}
},
{
label: '描述',
@ -37,16 +40,16 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
field: 'operationGuidance',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// form: {
// component: 'SelectV2'
// },
// },
{
label: '文件',
field: 'videoAddress',

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

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

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

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

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

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

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

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

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

@ -55,7 +55,31 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
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: '送达日期',
@ -315,6 +339,9 @@ export const PurchasePlanMainRules = reactive({
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
poNumber: [
{ required: true, message: '请选择采购订单号', trigger: 'change' }
],
deliveryDate: [
{ required: true, message: '请选择送达时间', trigger: 'change' }
],
@ -350,62 +377,62 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 180
},
tableForm: {
isInpuFocusShow: 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
}
]
},
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: '订单号',
// field: 'poNumber',
// sort: 'custom',
// table: {
// width: 180
// },
// tableForm: {
// isInpuFocusShow: 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
// }
// ]
// },
// 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: '订单行',
field: 'poLine',
@ -530,7 +557,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm: {
type: 'Select',
disabled:false,
disabled:true,
}
},
{
@ -617,9 +644,6 @@ export const PurchasePlanDetailRules = reactive({
// available: [
// { required: true, message: '请选择是否可用', trigger: 'change' }
// ],
poNumber: [
{ required: true, message: '请选择采购订单号', trigger: 'change' }
],
shippedQty: [
{ required: true, message: '请输入已发货数量', trigger: 'blur' }
],

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

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

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

@ -224,20 +224,20 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
form: {
value: 'SupplierDeliver',
componentProps: {
disabled: true,
}
}
},
// {
// label: '业务类型',
// field: 'businessType',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// value: 'SupplierDeliver',
// componentProps: {
// disabled: true,
// }
// }
// },
{
label: '备注',
field: 'remark',
@ -322,29 +322,29 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
},
form: {
value: userDept.id,
component: 'Select',
api: () => userDeptArray,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
}
}
},
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// table: {
// width: 150
// },
// formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
// return userDeptArray.find((account) => account.id == cellValue)?.name
// },
// form: {
// value: userDept.id,
// component: 'Select',
// api: () => userDeptArray,
// componentProps: {
// disabled: true,
// optionsAlias: {
// labelField: 'name',
// valueField: 'id'
// }
// }
// }
// },
{
label: '状态',
field: 'status',
@ -528,9 +528,9 @@ export const SupplierdeliverRequestMainRules = reactive({
planArriveTime: [
{ required: true, message: '请输入计划到货时间', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
// departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' }
// ],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
@ -586,19 +586,19 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
tableForm: {
disabled: true
disabled: false
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '到货日期',
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({
// packingNumber: [
@ -1022,6 +1035,7 @@ export const SupplierdeliverRequestDetailRules = reactive({
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateBatch, trigger: 'change' }
],
produceDate: [
{ required: true, message: '请输入生产日期', trigger: 'blur' }
@ -1089,19 +1103,19 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
valueFormat: 'x',
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm:{
disabled:true
}
},
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false,
// tableForm:{
// disabled:true
// }
// },
{
label: '到货日期',
field: 'arriveDate',
@ -1561,4 +1575,66 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
isTableForm: 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