Browse Source

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

master_hella_20240701
liuchen864 8 months ago
parent
commit
208410d2b3
  1. 4
      .env.development
  2. 9
      src/api/mes/workstation/index.ts
  3. 56
      src/api/wms/interfaceInfo/index.ts
  4. 5
      src/api/wms/issueRequestMain/index.ts
  5. 62
      src/components/Detail/src/Detail.vue
  6. 2
      src/views/mes/ordermonthplan/index.vue
  7. 57
      src/views/mes/workstation/index.vue
  8. 36
      src/views/qms/inspection/inspectionJob/addForm.vue
  9. 6
      src/views/qms/inspection/inspectionJob/index.vue
  10. 15
      src/views/qms/samplingProcess/index.vue
  11. 4
      src/views/qms/samplingProcess/samplingProcess.data.ts
  12. 244
      src/views/wms/agvManage/interfaceInfo/index.vue
  13. 106
      src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts
  14. 56
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts
  15. 49
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  16. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

4
.env.development

@ -7,7 +7,7 @@ VITE_DEV=false
VITE_BASE_URL='http://localhost:12080' VITE_BASE_URL='http://localhost:12080'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='http://localhost:12080/admin-api/infra/file/upload' VITE_UPLOAD_URL='http://192.168.0.113:12080/admin-api/infra/file/upload'
# 接口前缀 # 接口前缀
VITE_API_BASEPATH=/dev-api VITE_API_BASEPATH=/dev-api
@ -34,4 +34,4 @@ VITE_OUT_DIR=dist
VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html' VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://localhost:12080' VITE_JMREPORT_BASE_URL='http://localhost:12080'

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

@ -72,7 +72,6 @@ export const createEquipmentRelation = async (equipmentCodes:string[]) => {
// 删除设备关联 // 删除设备关联
export const deleteEquipmentRelation = async (equipmentCodes:string[]) => { export const deleteEquipmentRelation = async (equipmentCodes:string[]) => {
debugger
const data = { const data = {
workstationCode : goalParams.workstationCode, workstationCode : goalParams.workstationCode,
equipmentCodes : equipmentCodes equipmentCodes : equipmentCodes
@ -139,19 +138,19 @@ export const checkOperstepsPageList = async (params) => {
} }
} }
// 添加操作步骤关联 // 添加操作步骤关联
export const createOperstepsRelation = async (processCodes:string[]) => { export const createOperstepsRelation = async (codes:string[]) => {
const data = { const data = {
workstationCode : goalParams.workstationCode, workstationCode : goalParams.workstationCode,
processCodes : processCodes operstepsCodes : codes
} }
return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data }) return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data })
} }
// 删除操作步骤关联 // 删除操作步骤关联
export const deleteOperstepsRelation = async (processCodes:string[]) => { export const deleteOperstepsRelation = async (codes:string[]) => {
const data = { const data = {
workstationCode : goalParams.workstationCode, workstationCode : goalParams.workstationCode,
processCodes : processCodes operstepsCodes : codes
} }
return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data }) return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data })
} }

56
src/api/wms/interfaceInfo/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface InterfaceInfoVO {
id: number
interfaceType: string
interfaceName: string
interfaceStatus: string
url: string
reqBody: string
respBody: string
errorMsg: string
remark: string
extraProperties: string
concurrencyStamp: number
}
// 查询接口调用信息列表
export const getInterfaceInfoPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/interface-info/senior', data })
} else {
return await request.get({ url: `/wms/interface-info/page`, params })
}
}
// 查询接口调用信息详情
export const getInterfaceInfo = async (id: number) => {
return await request.get({ url: `/wms/interface-info/get?id=` + id })
}
// 新增接口调用信息
export const createInterfaceInfo = async (data: InterfaceInfoVO) => {
return await request.post({ url: `/wms/interface-info/create`, data })
}
// 修改接口调用信息
export const updateInterfaceInfo = async (data: InterfaceInfoVO) => {
return await request.put({ url: `/wms/interface-info/update`, data })
}
// 删除接口调用信息
export const deleteInterfaceInfo = async (id: number) => {
return await request.delete({ url: `/wms/interface-info/delete?id=` + id })
}
// 导出接口调用信息 Excel
export const exportInterfaceInfo = async (params) => {
return await request.download({ url: `/wms/interface-info/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/interface-info/get-import-template' })
}

5
src/api/wms/issueRequestMain/index.ts

@ -47,6 +47,11 @@ export const createIssueRequestMain = async (data: IssueRequestMainVO) => {
return await request.post({ url: `/wms/issue-request-main/create`, data }) return await request.post({ url: `/wms/issue-request-main/create`, data })
} }
// 新增PDA发料申请主
export const createIssueRequestMainSetInterval = async (data: IssueRequestMainVO) => {
return await request.post({ url: `/wms/issue-request-main/createPDA`, data })
}
// 修改发料申请主 // 修改发料申请主
export const updateIssueRequestMain = async (data: IssueRequestMainVO) => { export const updateIssueRequestMain = async (data: IssueRequestMainVO) => {
return await request.put({ url: `/wms/issue-request-main/update`, data }) return await request.put({ url: `/wms/issue-request-main/update`, data })

62
src/components/Detail/src/Detail.vue

@ -96,16 +96,36 @@
</template> </template>
</DetailTable> </DetailTable>
</ContentWrap> </ContentWrap>
<!-- other附件组件:如质检明细 -->
<div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexTableData.some(item=>item.label==tabsList[current].label)" class="w-[100%]" :style="{height:annexItem.hasSubDetail?'100%':remarkHeight+'px'}">
<ContentWrap class="w-[100%]">
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle"
@deleteAnnexSuccess="updateAnnexTableHandle"
:upData="{...remarksData.data,tableName:annexItem.tableName}"
/>
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]">
<Table
v-if="!isBasic && fromeWhere != 'countPlan'"
:align="annexItem.align?annexItem.align:'center'"
:columns="annexItem.subDetailTableData.tableColumns"
:data="annexItem.subDetailTableData.tableList"
:loading="annexItem.subDetailTableData.loading"
:pagination="{ total: annexItem.subDetailTableData.tableList.length }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
/>
</ContentWrap>
</div>
<!-- 附件/备注/变更记录 --> <!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="annexTableData.some(item=>item.label==tabsList[current].label)||tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}"> <ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 --> <!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> <ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-for="(annexItem ,index) in annexTableData" :key="index" v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle"
@deleteAnnexSuccess="updateAnnexTableHandle"
:upData="{...remarksData.data,tableName:annexItem.tableName}"
/>
<Annex v-show="tabsList[current].label=='附件'" <Annex v-show="tabsList[current].label=='附件'"
:annexData="annexData" :annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess" @handleAnnexSuccess="handleAnnexSuccess"
@ -392,7 +412,7 @@ const remarkHeight = computed(() => {
const annexData = reactive({ const annexData = reactive({
annexList: [] annexList: []
}) })
// // //
const annexTableData = ref<Array<any>>([]) const annexTableData = ref<Array<any>>([])
// //
@ -416,7 +436,8 @@ const getFileList = async () => {
} }
} }
// //
const getAnnexFileList = async () => { const getAnnexFileList = async (row:id) => {
console.log('getAnnexFileList')
props.annexTable?.forEach(async (item) => { props.annexTable?.forEach(async (item) => {
let requstData = {...remarksData.data,tableName: item?.tableName} let requstData = {...remarksData.data,tableName: item?.tableName}
const annexList = await FileApi.getFileList(requstData) const annexList = await FileApi.getFileList(requstData)
@ -425,10 +446,27 @@ const getAnnexFileList = async () => {
annexData.annexList = annexList annexData.annexList = annexList
}else{ }else{
annexTableData.value.push({ annexTableData.value.push({
align:item.align,
label: item.label, label: item.label,
tableName: item?.tableName || '', tableName: item?.tableName || '',
annexList annexList,
hasSubDetail:item.hasSubDetail||false,
subDetailTableData:item.subDetailTableData||{}
}) })
if(item?.subDetailTableData){
const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({
getListApi: item.subDetailTableData.getSubList //
})
const {getList:getSubList} = subTableMethods
subTableObject.params= {}
item.subDetailTableData.queryParams.forEach(queryItem => {
subTableObject.params[queryItem.queryField] = row[queryItem.rowField]
});
await getSubList()
item.subDetailTableData.tableList = subTableObject.tableList
annexItem.subDetailTableData.tableList
console.log('subTableObject',annexTableData.value)
}
} }
}) })
} }
@ -444,7 +482,7 @@ const deleteAnnexSuccess = async () => {
} }
/** 追加的附件 */ /** 追加的附件 */
const updateAnnexTableHandle = () => { const updateAnnexTableHandle = () => {
getAnnexFileList() getAnnexFileList(detailData.value)
getChangeRecordList() getChangeRecordList()
} }
@ -526,7 +564,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
detailData.value = row detailData.value = row
getRemarkList() getRemarkList()
getFileList() getFileList()
getAnnexFileList() getAnnexFileList(row)
getChangeRecordList() getChangeRecordList()
// //
let detailButtonFilter: any = [] let detailButtonFilter: any = []

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

@ -44,8 +44,6 @@
@success="formsSuccess" @success="formsSuccess"
:rules="MesOrderMonthMainRules" :rules="MesOrderMonthMainRules"
:formAllSchemas="MesOrderMonthMain.allSchemas" :formAllSchemas="MesOrderMonthMain.allSchemas"
:apiUpdate="updateMesOrderMonthMain"
:apiCreate="createMesOrderMonthMain"
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain" :apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"

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

@ -52,21 +52,22 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" <Detail ref="detailRef"
:isBasic="false" :isBasic="false"
:isOpenSearchTable="true" :isOpenSearchTable="true"
:apiCreate="tabsCreateApi" :apiCreate="tabsCreateApi"
:apiDelete="tabsDeleteApi" :apiDelete="tabsDeleteApi"
:allSchemas="Workstation.allSchemas" :allSchemas="Workstation.allSchemas"
:detailAllSchemas="detailAllSchemas" :detailAllSchemas="detailAllSchemas"
:searchTableSchema="tmpPopList" :searchTableSchema="tmpPopList"
:detailAllSchemasRules="WorkstationRules" :detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage" :apiPage="apiPage"
:tabs="TabsList" :tabs="TabsList"
@changeTabs="changeTabs" @changeTabs="changeTabs"
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true" :detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false" :detailButtonIsShowEdit="false"
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
@searchTableSuccessDetail="searchTableSuccess"
/> />
<BasicForm <BasicForm
ref="tmpPopListRef" ref="tmpPopListRef"
@ -78,19 +79,19 @@
<script setup lang="ts"> <script setup lang="ts">
import { import {
Equipment, Equipment,
equipmentPopList,
Opersteps, Opersteps,
stepPopList,
TabsList, TabsList,
Workstation, Workstation,
WorkstationRules,equipmentPopList,stepPopList WorkstationRules
} from './workstation.data' } from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation' import * as WorkstationApi from '@/api/mes/workstation'
import {goalParams} from '@/api/mes/workstation'
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 {
goalParams,
} from "@/api/mes/workstation";
import Detail from './components/Detail.vue' import Detail from './components/Detail.vue'
defineOptions({ name: 'Workstation' }) defineOptions({ name: 'Workstation' })
let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
let tabsCreateApi = WorkstationApi.createEquipmentRelation let tabsCreateApi = WorkstationApi.createEquipmentRelation
@ -103,10 +104,18 @@ const tableColumns = ref(Workstation.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { console.log(formField)
const setV = {} console.log(searchField)
setV[formField] = val[0][searchField] console.log(val)
formRef.setValues(setV) console.log(formRef)
nextTick(async () => {
debugger
if (formRef) {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
} else {
}
}) })
} }

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

@ -334,8 +334,8 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type formType.value = type
if (row) { if (row) {
data.value = JSON.parse(JSON.stringify(row)) data.value = JSON.parse(JSON.stringify(row))
console.log(data.value)// // console.log(data.value)//
await InspectionJobMainApi.acceptInspectionJobMain(row.id) // await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = [] let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id) data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
@ -497,7 +497,7 @@ const buttonBaseClick =async(val) => {
} }
// //
else if (val == 'close') { else if (val == 'close') {
await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) // await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
dialogVisible.value = false dialogVisible.value = false
} }
} }
@ -548,6 +548,7 @@ const submitForm = async () => {
let arrBol = [] let arrBol = []
let isOutweigh = []// let isOutweigh = []//
let numberList = []// let numberList = []//
let parseFloatList = []//
data.value.subList.forEach((item, index) => { data.value.subList.forEach((item, index) => {
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
arrBol.push( arrBol.push(
@ -558,15 +559,6 @@ const submitForm = async () => {
) )
) )
} }
// if (item.samplingProcessRespVO.evaluationMode == 1) {
// arrBol.push(
// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
// (cur, key) => {
// return !cur.estimateCode
// }
// )
// )
// }
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) {
arrBol.push( arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
@ -589,12 +581,20 @@ const submitForm = async () => {
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
} }
// //
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
parseFloatList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return String(cur.qualifiedQuantity).indexOf('.')>-1 || String(cur.unqualifiedQuantity).indexOf('.')>-1
}
)
)
//
numberList.push( numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => { (cur, key) => {
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != data.value.sampleTotalAmount return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty)
} }
) )
) )
@ -602,6 +602,7 @@ const submitForm = async () => {
}) })
let isEmpty1 = arrBol.some(item=>item == true) let isEmpty1 = arrBol.some(item=>item == true)
let isEmptyNumberList = numberList.some(item=>item == true) let isEmptyNumberList = numberList.some(item=>item == true)
let isParseFloat = parseFloatList.some(item=>item == true)
if(isEmpty1){ if(isEmpty1){
message.error('检验工序和检验特性有字段未填写完全') message.error('检验工序和检验特性有字段未填写完全')
return; return;
@ -610,9 +611,12 @@ const submitForm = async () => {
message.error('检验特性中有开始时间大于结束时间') message.error('检验特性中有开始时间大于结束时间')
return; return;
} }
console.log(44,numberList) if(isParseFloat){
message.error('合格数量和不合格数量之和不可以是小数')
return;
}
if(isEmptyNumberList){ if(isEmptyNumberList){
message.error('合格数量和不合格数量之和不等于总数量') message.error('合格数量和不合格数量之和不等于检验数')
return; return;
} }
if (formType.value == 'create') { if (formType.value == 'create') {

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

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

15
src/views/qms/samplingProcess/index.vue

@ -66,6 +66,7 @@ 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'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import {validatePercent } from '@/utils/validator'
defineOptions({ name: 'SamplingProcess' }) defineOptions({ name: 'SamplingProcess' })
@ -235,20 +236,34 @@ const updateFormFields = (sampleType, formRef) => {
case '1': case '1':
sampleSizeLabel = '样品量'; sampleSizeLabel = '样品量';
sampleSizeDisabled = true; sampleSizeDisabled = true;
if( SamplingProcessRules.sampleSize.length==3){
SamplingProcessRules.sampleSize.pop()
}
break; break;
case '2': case '2':
sampleSizeLabel = '样品量(%)'; sampleSizeLabel = '样品量(%)';
sampleSizeRequired = true; sampleSizeRequired = true;
if( SamplingProcessRules.sampleSize.length==2){
SamplingProcessRules.sampleSize.push({
validator:validatePercent, message: '百分比范围 0 ~ 100', trigger: 'blur'
})
}
break; break;
case '3': case '3':
sampleSizeLabel = '样品量'; sampleSizeLabel = '样品量';
sampleSizeRequired = true; sampleSizeRequired = true;
if( SamplingProcessRules.sampleSize.length==3){
SamplingProcessRules.sampleSize.pop()
}
break; break;
case '4': case '4':
sampleSizeLabel = '样品量'; sampleSizeLabel = '样品量';
sampleSizeDisabled = true; sampleSizeDisabled = true;
sampleProgCodeDisabled = false; sampleProgCodeDisabled = false;
sampleProgCodeRequired = true; sampleProgCodeRequired = true;
if( SamplingProcessRules.sampleSize.length==3){
SamplingProcessRules.sampleSize.pop()
}
break; break;
default: default:
break; break;

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

@ -1,14 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from "@/api/qms/samplingProcess"; import {getSamplingScheme} from "@/api/qms/samplingProcess";
import { validateInteger } from '@/utils/validator' import { validateInteger ,validateTwoNum} from '@/utils/validator'
// 表单校验 // 表单校验
export const SamplingProcessRules = reactive({ export const SamplingProcessRules = reactive({
sampleType: [required], sampleType: [required],
evaluationMode: [required], evaluationMode: [required],
description: [required], description: [required],
sampleSize:ref([{ required: true, message: '该项为必填项', trigger: 'blur' }]), sampleSize:ref([{ required: true, message: '该项为必填项', trigger: 'blur' },{validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}]),
sampleProgCode:ref([{ required: true, message: '该项为必填项', trigger: 'blur' }]), sampleProgCode:ref([{ required: true, message: '该项为必填项', trigger: 'blur' }]),
inspectionQty: [required, {validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}] inspectionQty: [required, {validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
}) })

244
src/views/wms/agvManage/interfaceInfo/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InterfaceInfo.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InterfaceInfo.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="InterfaceInfoRules"
:formAllSchemas="InterfaceInfo.allSchemas"
:apiUpdate="InterfaceInfoApi.updateInterfaceInfo"
:apiCreate="InterfaceInfoApi.createInterfaceInfo"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="InterfaceInfo.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/interface-info/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InterfaceInfo,InterfaceInfoRules } from './interfaceInfo.data'
import * as InterfaceInfoApi from '@/api/wms/interfaceInfo'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'InterfaceInfo' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InterfaceInfo.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: InterfaceInfoApi.getInterfaceInfoPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:interfaceInfo:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:interfaceInfo:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:interfaceInfo:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:interfaceInfo:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:interfaceInfo:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =InterfaceInfo.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await InterfaceInfoApi.createInterfaceInfo(data)
message.success(t('common.createSuccess'))
} else {
await InterfaceInfoApi.updateInterfaceInfo(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInterfaceInfo')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await InterfaceInfoApi.deleteInterfaceInfo(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InterfaceInfoApi.exportInterfaceInfo(tableObject.params)
download.excel(data, '接口调用信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '接口调用信息导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await InterfaceInfoApi.importTemplate()
})
</script>

106
src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts

@ -0,0 +1,106 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const InterfaceInfoRules = reactive({
concurrencyStamp: [required],
})
export const InterfaceInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '序号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '接口类型',
field: 'interfaceType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '接口名称',
field: 'interfaceName',
sort: 'custom',
isSearch: true,
},
{
label: '状态',
field: 'interfaceStatus',
sort: 'custom',
form: {
component: 'Radio'
},
},
{
label: '请求地址',
field: 'url',
sort: 'custom',
isSearch: true,
},
{
label: '请求参数',
field: 'reqBody',
sort: 'custom',
},
{
label: '返回结果',
field: 'respBody',
sort: 'custom',
},
{
label: '错误信息',
field: 'errorMsg',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
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')]
}
},
isForm: false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isTable:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
isTable:false,
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

56
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts

@ -9,34 +9,66 @@ export const SupplierdeliverInspectionDetailRules = reactive({
}) })
export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '上传质检报告',
field: 'uploadFile',
sort: 'custom',
isTable:false,
isTableForm:false,
form: {
component: 'UploadFile',
componentProps: {
upData:{
tableId: '',
tableName: 'SupplierdeliverInspectionDetail'
},
limit:1,
}
},
},
{ {
label: '代码', label: '代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isForm:false,
isSearch: true, isSearch: true,
}, },
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
isForm:false,
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150
},
tableForm: {
type: 'Select'
}
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isForm:false,
isSearch: true, isSearch: true,
}, },
{ {
label: '计划数量', label: '计划数量',
field: 'planQty', field: 'planQty',
sort: 'custom', sort: 'custom',
isForm:false,
isSearch: true, isSearch: true,
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isForm:false,
isTable: false,
isTableForm: false,
isSearch: true, isSearch: true,
}, },
{ {
@ -53,6 +85,7 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isTableForm: false,
isForm: false, isForm: false,
}, },
{ {
@ -60,27 +93,16 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
field: 'extraProperties', field: 'extraProperties',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, isForm: false,
{ isTable: false,
label: '并发乐观锁', isTableForm: false,
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: true,
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isTable: false,
isTableForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

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

@ -77,7 +77,22 @@
:annexTable="[{ :annexTable="[{
label: '质检明细', label: '质检明细',
prop: 'uploadFile', prop: 'uploadFile',
tableName:'uploadFile' tableName:'SupplierdeliverInspectionDetail',
hasSubDetail:true, //
align:'left',
//
subDetailTableData:{
queryParams:[{
queryField:'masterId',
rowField:'id'
}], //
getSubList:SupplierdeliverInspectionDetailApi.getSupplierdeliverInspectionDetailPage,//
tableColumns:SupplierdeliverInspectionDetail.allSchemas.tableColumns,
tableList:[],//
total:1,
pageSize:10,
currentPage:1,
}
}]" }]"
:isBasic="false" :isBasic="false"
:allSchemas="SupplierdeliverRequestMain.allSchemas" :allSchemas="SupplierdeliverRequestMain.allSchemas"
@ -118,14 +133,18 @@
<BasicForm <BasicForm
ref="ploadQualityReportRef" ref="ploadQualityReportRef"
@success="getList" @success="getList"
:formAllSchemas="UploadQualityReport.allSchemas" :formAllSchemas="SupplierdeliverInspectionDetail.allSchemas"
:tableAllSchemas="UploadQualityReport.allSchemas" :tableAllSchemas="SupplierdeliverInspectionDetail.allSchemas"
:tableData="ploadQualityReportTableData" :tableData="ploadQualityReportTableData"
@handleAddTable="SupplierdeliverInspectionDetailApi.createSupplierdeliverInspectionDetail" @handleAddTable="SupplierdeliverInspectionDetailApi.createSupplierdeliverInspectionDetail"
@handleDeleteTable="SupplierdeliverInspectionDetailApi.deleteSupplierdeliverInspectionDetail" @handleDeleteTable="SupplierdeliverInspectionDetailApi.deleteSupplierdeliverInspectionDetail"
@submitForm="submitFormUploadQualityReport" @submitForm="submitFormUploadQualityReport"
:isShowReduceButton="true" :isShowReduceButton="true"
/> >
<template #SupplierdeliverInspectionDetail>
<span>1111</span>
</template>
</BasicForm>
</template> </template>
@ -139,9 +158,9 @@ import {
SupplierdeliverRequestMainRules, SupplierdeliverRequestMainRules,
SupplierdeliverRequestDetail, SupplierdeliverRequestDetail,
SupplierdeliverRequestDetailRules, SupplierdeliverRequestDetailRules,
SupplierdeliverRequestDetailLabel, SupplierdeliverRequestDetailLabel
UploadQualityReport
} from './supplierdeliverRequestMain.data' } from './supplierdeliverRequestMain.data'
import {   SupplierdeliverInspectionDetail} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.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'
@ -383,7 +402,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.mainListPlanUploadQualityReportBtn({ hide: isShowMainButton(row, ['1','2','3']) }), //
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']) }), //
@ -429,7 +448,7 @@ const buttonTableClick = async (val, row) => {
handleClo(row.id) handleClo(row.id)
} else if (val == 'mainPlanUploadQualityReport') { } else if (val == 'mainPlanUploadQualityReport') {
// //
handleUploadQualityReport(row.id) handleUploadQualityReport(row)
} else if (val == 'mainPlanSub') { } else if (val == 'mainPlanSub') {
// //
handleSub(row.id) handleSub(row.id)
@ -573,18 +592,22 @@ const handleOpe = async (id: number) => {
const ploadQualityReportRef = ref() const ploadQualityReportRef = ref()
const ploadQualityReportTableData = ref([]) const ploadQualityReportTableData = ref([])
/** 上传质量报告 */ /** 上传质量报告 */
const handleUploadQualityReport = async (id: number) => { const handleUploadQualityReport = async (row) => {
console.log('UploadQualityReport',UploadQualityReport.allSchemas) console.log('SupplierdeliverInspectionDetail',SupplierdeliverInspectionDetail.allSchemas)
// ploadQualityReportRef.value.dialogVisible = true const uploadFile = SupplierdeliverInspectionDetail.allSchemas.formSchema.find(item=>item.field=='uploadFile')
ploadQualityReportRef.value.open('create', null, null,'上传质量报告')// createLabel if(uploadFile){
uploadFile['componentProps']['upData']['tableId'] = row.id
}
ploadQualityReportRef.value.open('create', null, {masterId:row.id},'上传质量报告')// createLabel
const tableFormKeys = {} const tableFormKeys = {}
UploadQualityReport.allSchemas.tableFormColumns.forEach((item) => { SupplierdeliverInspectionDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
ploadQualityReportTableData.value = [tableFormKeys] ploadQualityReportTableData.value = [tableFormKeys]
} }
const submitFormUploadQualityReport = async (formType, data) => { const submitFormUploadQualityReport = async (formType, data) => {
delete data.number
data.subList = ploadQualityReportTableData.value // data.subList = ploadQualityReportTableData.value //
if (formType === 'create') { if (formType === 'create') {
await SupplierdeliverInspectionDetailApi.createSupplierdeliverInspectionDetail(data) await SupplierdeliverInspectionDetailApi.createSupplierdeliverInspectionDetail(data)

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

@ -1597,7 +1597,7 @@ export const UploadQualityReport = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
upData:{ upData:{
tableId: '', tableId: '',
tableName: '' tableName: 'UploadQualityReport'
}, },
limit:1, limit:1,
} }
@ -1630,7 +1630,7 @@ export const UploadQualityReport = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '数量', label: '数量',
field: 'orderQty', field: 'planQty',
table: { table: {
width: 150 width: 150
}, },

Loading…
Cancel
Save