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 7 months ago
parent
commit
198c8e7860
  1. 37
      src/api/mes/workstation/index.ts
  2. 2
      src/api/qms/counter/index.ts
  3. 25
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  4. 6
      src/api/qms/inspectionStage/index.ts
  5. 6
      src/api/wms/purchasereceiptRecordDetail/index.ts
  6. 2
      src/components/BasicForm/src/BasicForm.vue
  7. 0
      src/components/ListTable/index.ts
  8. 0
      src/components/ListTable/src/ListTable.vue
  9. 3
      src/components/ListTable1/index.ts
  10. 40
      src/components/ListTable1/src/ListTable.vue
  11. 2
      src/components/TableForm/src/TableForm.vue
  12. 5
      src/locales/en-US.ts
  13. 5
      src/locales/zh-CN.ts
  14. 13
      src/utils/disposition/defaultButtons.ts
  15. 18
      src/views/mes/workstation/index.vue
  16. 29
      src/views/mes/workstation/workstation.data.ts
  17. 54
      src/views/qms/aql/aql.data.ts
  18. 42
      src/views/qms/aql/index.vue
  19. 2
      src/views/qms/basicDataManage/counter/counter.data.ts
  20. 37
      src/views/qms/basicDataManage/dynamicRule/index.vue
  21. 4
      src/views/qms/basicDataManage/inspectionScheme/addForm.vue
  22. 37
      src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts
  23. 6
      src/views/qms/basicDataManage/inspectionStage/inspectionStage.data.ts
  24. 4
      src/views/qms/basicDataManage/selectedSet/index.vue
  25. 66
      src/views/qms/inspection/inspectionJob/addForm.vue
  26. 61
      src/views/qms/inspection/inspectionJob/index.vue
  27. 33
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  28. 8
      src/views/qms/inspection/inspectionRecord/index.vue
  29. 6
      src/views/qms/inspection/inspectionRequest/index.vue
  30. 6
      src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
  31. 3
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  32. 8
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue
  33. 81
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  34. 212
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  35. 12
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  36. 24
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -48,45 +48,8 @@ export const exportWorkstation = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/mes/workstation/get-import-template' }) return request.download({ url: '/mes/workstation/get-import-template' })
}// 查询班组列表
export const getTeamPage = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/team/senior', data })
} else {
return await request.get({ url: `/mes/team/pageListByWorkstationCode`, params })
}
}
// 查询选择班组列表
export const checkTeamPageList = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/team/senior', data })
} else {
return await request.get({ url: `/mes/team/pageCheckListByWorkstationCode`, params })
}
}
// 添加班组关联
export const createTeamRelation = async (teamCodes:string[]) => {
const data = {
workstationCode : goalParams.workstationCode,
teamCodes : teamCodes
}
return await request.post({ url: `/mes/team/createRelation`, data })
} }
// 删除班组关联
export const deleteTeamRelation = async (teamCodes:string[]) => {
const data = {
workstationCode : goalParams.workstationCode,
teamCodes : teamCodes
}
return await request.post({ url: `/mes/team/deleteRelation`, data })
}
export const getEquipmentPage = async (params) => { export const getEquipmentPage = async (params) => {
params.workstationCode = goalParams.workstationCode params.workstationCode = goalParams.workstationCode
if (params.isSearch) { if (params.isSearch) {

2
src/api/qms/counter/index.ts

@ -3,7 +3,7 @@ import request from '@/config/axios'
export interface CounterVO { export interface CounterVO {
id: number id: number
itemCode: string itemCode: string
testTypeCode: string inspectionType: string
supplierCode: string supplierCode: string
qualifiedTimes: number qualifiedTimes: number
lastQualifiedBatch: string lastQualifiedBatch: string

25
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -1,7 +1,7 @@
import request from '@/config/axios' import request from '@/config/axios'
// 查询检验申请列表 // 查询检验任务列表
export const getInspectionJobMainPage = async (params) => { export const getInspectionJobMainPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
@ -12,29 +12,40 @@ export const getInspectionJobMainPage = async (params) => {
} }
} }
// 查询检验申请详情 // 查询检验任务详情
export const getInspectionJobMain = async (id: number) => { export const getInspectionJobMain = async (id: number) => {
return await request.get({ url: `/qms/inspection-job-main/get?id=` + id }) return await request.get({ url: `/qms/inspection-job-main/get?id=` + id })
} }
// 新增检验申请 // 新增检验任务
export const createInspectionJobMain = async (data) => { export const createInspectionJobMain = async (data) => {
return await request.post({ url: `/qms/inspection-job-main/create`, data }) return await request.post({ url: `/qms/inspection-job-main/create`, data })
} }
// 修改检验申请 // 修改检验任务
export const updateInspectionJobMain = async (data) => { export const updateInspectionJobMain = async (data) => {
return await request.put({ url: `/qms/inspection-job-main/update`, data }) return await request.put({ url: `/qms/inspection-job-main/update`, data })
} }
// 执行检验申请 // 执行检验任务
export const executeInspectionJobMain = async (data) => { export const executeInspectionJobMain = async (data) => {
return await request.put({ url: `/qms/inspection-job-main/execute`, data }) return await request.put({ url: `/qms/inspection-job-main/execute`, data })
} }
// 删除检验申请 // 删除检验任务
export const deleteInspectionJobMain = async (id: number) => { export const deleteInspectionJobMain = async (id: number) => {
return await request.delete({ url: `/qms/inspection-job-main/delete?id=` + id }) return await request.delete({ url: `/qms/inspection-job-main/delete?id=` + id })
} }
// 承接检验任务
export const acceptInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/accept?id=` + id })
}
// 放弃检验任务
export const abandonInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/abandon?id=` + id })
}
// 关闭检验任务
export const closeInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/close?id=` + id })
}
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionJobMain = async (params) => { export const exportInspectionJobMain = async (params) => {
return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) return await request.download({ url: `/qms/inspection-job-main/export-excel`, params })

6
src/api/qms/inspectionStage/index.ts

@ -60,4 +60,10 @@ export const exportInspectionStage = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-stage/get-import-template' }) return request.download({ url: '/qms/inspection-stage/get-import-template' })
}
// 查询检验阶段列表
export const getInspectionStageNoPage = async (params) => {
return await request.get({ url: `/qms/inspection-stage/noPage`, params })
} }

6
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -76,6 +76,12 @@ export const getPurchasereceiptRecordDetailPageBySupplierCode = async (params) =
export const getPurchasereceiptRecordDetailList = async (params) => { export const getPurchasereceiptRecordDetailList = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/list`, params }) return await request.get({ url: `/wms/purchasereceipt-record-detail/list`, params })
} }
// 查询采购收货记录子列表
export const getPurchasereceiptRecordDetailListToRepeat = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/listToRepeat`, params })
}
// 查询采购收货记录子详情 // 查询采购收货记录子详情
export const getPurchasereceiptRecordDetail = async (id: number) => { export const getPurchasereceiptRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/get?id=` + id }) return await request.get({ url: `/wms/purchasereceipt-record-detail/get?id=` + id })

2
src/components/BasicForm/src/BasicForm.vue

@ -658,7 +658,7 @@ const inpuFocus = (headerItem, row, index) => {
* @param cur 改变后值 * @param cur 改变后值
*/ */
const onChange = (field, cur) => { const onChange = (field, cur) => {
emit('onChange', field, cur) emit('onChange', field, cur, formRef)
} }
/** /**

0
src/components/listTable/index.ts → src/components/ListTable/index.ts

0
src/components/listTable/src/ListTable.vue → src/components/ListTable/src/ListTable.vue

3
src/components/ListTable1/index.ts

@ -0,0 +1,3 @@
import ListTable from './src/ListTable.vue'
export { ListTable }

40
src/components/ListTable1/src/ListTable.vue

@ -0,0 +1,40 @@
<template>
<div>
<Dialog v-model="isPackageShow" :title="dialogTitle" :width="width?width:'900px'" v-loading="packageLoading">
<Table
ref="searchTableRef"
:columns="columns"
:data="allList"
:reserveSelection="true"
row-key="id"
/>
</Dialog>
</div>
</template>
<script lang="ts" setup>
const isPackageShow = ref(false)
const packageLoading = ref(false)
const dialogTitle = ref()
const message = useMessage() //
const columns = ref()
const allList = ref()
//
const props = defineProps({
width: {
type: String,
required: false
},
})
const openPackage = async (row?: any, titleName?: any,tableColumns?: any,list?: any) => {
isPackageShow.value = true
if (titleName) {
dialogTitle.value = titleName
}
columns.value = tableColumns.filter(item => (item.field !== 'action'))
allList.value = list
}
defineExpose({ openPackage }) // open
</script>

2
src/components/TableForm/src/TableForm.vue

@ -46,7 +46,7 @@
:label="headerItem.label" :prop="headerItem.field" :label="headerItem.label" :prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'" :align="headerItem?.tableForm?.align || 'center'"
:sortable="headerItem?.tableForm?.sortable || false" :sortable="headerItem?.tableForm?.sortable || false"
:width="headerItem?.tableForm?.width || '200'" :width="headerItem?.tableForm?.width || '200px'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'"> :min-width="headerItem?.tableForm?.minWidth || 'auto'">
<el-form <el-form
ref="TableBaseForm_Ref" ref="TableBaseForm_Ref"

5
src/locales/en-US.ts

@ -61,12 +61,17 @@ export default {
agreeSuccess: 'Agree Success', agreeSuccess: 'Agree Success',
refusedSuccess: 'Refused Success', refusedSuccess: 'Refused Success',
handleSuccess: 'Handle Success', handleSuccess: 'Handle Success',
acceptSuccess: 'Accept Success',
giveupSuccess: 'Giveup Success',
dealwithSuccess: 'Dealwith Success',
confirmColse: 'Confirm Close?', confirmColse: 'Confirm Close?',
confirmReAdd: 'Confirm ReAdd?', confirmReAdd: 'Confirm ReAdd?',
confirmAgree: 'Confirm Agree?', confirmAgree: 'Confirm Agree?',
confirmRefused: 'Confirm Refused?', confirmRefused: 'Confirm Refused?',
confirmHandle: 'Confirm Handle?', confirmHandle: 'Confirm Handle?',
confirmSubmit: 'Confirm Submit?', confirmSubmit: 'Confirm Submit?',
confirmAccept: 'Confirm Accept',
confirmGiveup: 'Confirm Giveup'
}, },
error: { error: {
noPermission: `Sorry, you don't have permission to access this page.`, noPermission: `Sorry, you don't have permission to access this page.`,

5
src/locales/zh-CN.ts

@ -61,12 +61,17 @@ export default {
agreeSuccess: '审批通过成功', agreeSuccess: '审批通过成功',
refusedSuccess: '审批驳回成功', refusedSuccess: '审批驳回成功',
handleSuccess: '执行成功', handleSuccess: '执行成功',
dealwithSuccess: '处理成功',
acceptSuccess: '承接成功',
giveupSuccess: '放弃成功',
confirmColse: '确认关闭吗?', confirmColse: '确认关闭吗?',
confirmReAdd: '确认重新添加吗?', confirmReAdd: '确认重新添加吗?',
confirmAgree: '确认审批通过吗?', confirmAgree: '确认审批通过吗?',
confirmRefused: '确认审批驳回吗?', confirmRefused: '确认审批驳回吗?',
confirmHandle: '确认处理吗?', confirmHandle: '确认处理吗?',
confirmSubmit: '确认提交吗?', confirmSubmit: '确认提交吗?',
confirmAccept: '确认承接吗?',
confirmGiveup: '确认放弃吗?',
}, },
error: { error: {
noPermission: `抱歉,您无权访问此页面。`, noPermission: `抱歉,您无权访问此页面。`,

13
src/utils/disposition/defaultButtons.ts

@ -704,6 +704,19 @@ export function mainListJobExeBtn(option:any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-任务流程-执行按钮(与执行按钮一致 只是名改叫'收货'而已)
export function mainListJobRecBtn(option:any) {
return __defaultBtnOption(option,{
label: '收货',
name: 'mainJobExe',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-包装按钮 // 主列表-包装按钮
export function mainListPackageBtn(option:any) { export function mainListPackageBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

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

@ -86,7 +86,7 @@ import {
TabsList, TabsList,
Team, Team,
Workstation, Workstation,
WorkstationRules, teamPopList,equipmentPopList,processPopList,stepPopList WorkstationRules,equipmentPopList,processPopList,stepPopList
} from './workstation.data' } from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation' import * as WorkstationApi from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -97,8 +97,8 @@ import {
} from "@/api/mes/workstation"; } 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.deleteTeamRelation let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
let tabsCreateApi = WorkstationApi.createTeamRelation let tabsCreateApi = WorkstationApi.createEquipmentRelation
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
@ -271,19 +271,13 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
} }
// //
const detailAllSchemas = ref(Team.allSchemas) const detailAllSchemas = ref(Team.allSchemas)
const apiPage = ref(WorkstationApi.getTeamPage) const apiPage = ref(WorkstationApi.getEquipmentPage)
const tableKey = ref("Team"); const tableKey = ref("Team");
let tmpPopList = teamPopList.allSchemas let tmpPopList = equipmentPopList.allSchemas
// tabs // tabs
const changeTabs = (data) =>{ const changeTabs = (data) =>{
tableKey.value = data.prop tableKey.value = data.prop
if(data.prop == 'Team'){ if(data.prop == 'Equipment'){
apiPage.value = WorkstationApi.getTeamPage
detailAllSchemas.value = Team.allSchemas
tabsDeleteApi = WorkstationApi.deleteTeamRelation
tabsCreateApi = WorkstationApi.createTeamRelation
tmpPopList = teamPopList.allSchemas
}else if(data.prop == 'Equipment'){
apiPage.value = WorkstationApi.getEquipmentPage apiPage.value = WorkstationApi.getEquipmentPage
detailAllSchemas.value = Equipment.allSchemas detailAllSchemas.value = Equipment.allSchemas
tabsDeleteApi = WorkstationApi.deleteEquipmentRelation tabsDeleteApi = WorkstationApi.deleteEquipmentRelation

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

@ -16,10 +16,6 @@ export const WorkstationRules = reactive({
productionLineCode: [required] productionLineCode: [required]
}) })
export const TabsList = [{ export const TabsList = [{
label: "班组",
prop: 'Team',
},
{
label: "设备", label: "设备",
prop: 'Equipment', prop: 'Equipment',
}, },
@ -280,30 +276,7 @@ export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm:true, isTableForm:true,
} }
])) ]))
export const teamPopList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '选择班组',
field: 'list',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择选择班组', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择班组', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkTeamPageList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}
]))
export const equipmentPopList = useCrudSchemas(reactive<CrudSchema[]>([ export const equipmentPopList = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '选择设备', label: '选择设备',

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

@ -1,6 +1,7 @@
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/aql"; import {getSamplingScheme} from "@/api/qms/aql";
import {validateNum} from "@/utils/validator";
// 表单校验 // 表单校验
export const AqlRules = reactive({ export const AqlRules = reactive({
@ -8,7 +9,58 @@ export const AqlRules = reactive({
inspectionQualification: [required], inspectionQualification: [required],
sampleCharacterCode: [required], sampleCharacterCode: [required],
sampleSize: [required], sampleSize: [required],
// available: [required], a0separator010: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator010: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator015: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator015: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator025: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator025: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator040: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator040: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator065: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator065: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a0separator65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r0separator65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a1separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r1separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a1separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r1separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a2separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r2separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a4separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r4separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a6separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r6separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a100: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r100: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a150: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r150: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a250: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r250: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a400: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r400: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a650: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r650: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
a1000: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
r1000: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}],
}) })
const samplingSchemeList = await getSamplingScheme() const samplingSchemeList = await getSamplingScheme()
export const Aql = useCrudSchemas(reactive<CrudSchema[]>([ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([

42
src/views/qms/aql/index.vue

@ -48,6 +48,7 @@
:apiCreate="AqlApi.createAql" :apiCreate="AqlApi.createAql"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@onChange="onChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -235,6 +236,47 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const onChange = async (field, value, formRef) => {
// "a"
if (field.startsWith("a") || field.startsWith("r")) {
// "a"
const suffix = field.slice(1);
// "r"
const correspondingField = field.startsWith("a") ? "r" + suffix : "a" + suffix ;
console.log(correspondingField)
// "r"
if (value) {
// "r"
Aql.allSchemas.formSchema.forEach(item => {
if (item.field === correspondingField) {
const setV = {};
if(correspondingField.startsWith("r")){
setV[correspondingField] = parseInt(value) + 1;
}else {
setV[correspondingField] = parseInt(value) - 1;
}
item.componentProps.disabled = true;
// 使 Vue nextTick DOM
nextTick(() => {
formRef.value.setValues(setV);
});
}
});
}else{
Aql.allSchemas.formSchema.forEach(item => {
if (item.field === correspondingField || item.field === field) {
item.componentProps.disabled = false;
const setV = {};
setV[correspondingField] = ''
nextTick(() => {
formRef.value.setValues(setV);
});
}
});
}
}
};
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

2
src/views/qms/basicDataManage/counter/counter.data.ts

@ -23,7 +23,7 @@ export const Counter = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '检验类型编码', label: '检验类型编码',
field: 'testTypeCode', field: 'inspectionType',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },

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

@ -105,6 +105,8 @@ const routeName = ref()
const tableData = ref([]) const tableData = ref([])
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(DynamicRule.allSchemas.tableColumns) const tableColumns = ref(DynamicRule.allSchemas.tableColumns)
const detailMasterId = ref()
const detailList = ref([])
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -210,6 +212,10 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailMasterId.value = row.id
InspectionStageApi.getInspectionStageNoPage({masterId:row.id}).then(res=>{
detailList.value = res
})
detailRef.value.openDetail(row, titleName, titleValue, 'basicDynamicRule') detailRef.value.openDetail(row, titleName, titleValue, 'basicDynamicRule')
} }
@ -283,6 +289,11 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
if(!validateNotRepetition(tableData.value)){
message.alertWarning('动态规则阶段不能重复')
basicFormRef.value.formLoading = false
return
}
data.inspectionStageDOList = tableData.value// data.inspectionStageDOList = tableData.value//
console.log(data.subList) console.log(data.subList)
try { try {
@ -303,15 +314,35 @@ const submitForm = async (formType, data) => {
const detailValidate = (data) => { const detailValidate = (data) => {
let tag = true; let tag = true;
if(!validateIfRepeat(data)){
tag = false
message.alertWarning('动态规则阶段不能重复')
}
return tag return tag
} }
const detailOpenForm = (type, row, masterParmas) => { const detailOpenForm = (type, row, masterParmas) => {
if(type='create'){
}
} }
const validateIfRepeat = (data) => {
const mergedArray = [data, ...detailList.value];
const stageSet = new Set(mergedArray.map(item => item.stage));
return stageSet.size === mergedArray.length;
}
const validateNotRepetition = (data) => {
// dictionaryTypeAndCode
const codes = data.map(item => item.stage);
// Set dictionaryTypeAndCode
const uniqueCodes = new Set(codes);
// Set
if (codes.length > uniqueCodes.size) {
return false; // false
}
return true; // true
};
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

4
src/views/qms/basicDataManage/inspectionScheme/addForm.vue

@ -209,11 +209,11 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="是否可用" prop="available"> <el-form-item label="是否可用" prop="available">
<el-switch v-model="data.available" active-value="TRUE" inactive-value="FALSE" /> <el-switch v-model="data.available" active-value="TRUE" inactive-value="FALSE" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
</el-form> </el-form>
<el-tabs <el-tabs

37
src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

@ -173,25 +173,26 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
} }
},{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
}, },
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// },
// },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

6
src/views/qms/basicDataManage/inspectionStage/inspectionStage.data.ts

@ -11,8 +11,10 @@ const trueFalse = [{
// 表单校验 // 表单校验
export const InspectionStageRules = reactive({ export const InspectionStageRules = reactive({
description: [required], description: [
dynamicModifyCode: [required], required,
{ max: 1024, message: '不得超过1024个字符', trigger: 'blur' },
],
okTimes: [required], okTimes: [required],
okTimeStage: [required], okTimeStage: [required],
noOkTimes: [required], noOkTimes: [required],

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

@ -407,8 +407,8 @@ const detailBasiFormOnChange = (field,val,detailFormRef) => {
setV['dictionaryCode'] = dictionaryCode setV['dictionaryCode'] = dictionaryCode
setV['dictionaryValue'] = dictionaryValue setV['dictionaryValue'] = dictionaryValue
nextTick(() => { nextTick(() => {
detailFormRef.setValues(setV) detailFormRef.setValues(setV)
}) })
} }
} }

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

@ -312,7 +312,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1" > <el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1" >
<el-form-item label="缺陷级别" required> <el-form-item label="缺陷级别" required>
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled> <el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-option <el-option
@ -557,16 +557,16 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
} }
} else { } else {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
// inspectionValue: '', // inspectionValue: '', //
// qualitativeCode: '', // qualitativeCode: '', //
// estimateCode: '', // estimateCode: '', //
// defectLevel: '', // defectLevel: '', //
// qualifiedQuantity: '', // qualifiedQuantity: '', //
// unqualifiedQuantity: '' // unqualifiedQuantity: '' //
// } }
// ) )
} }
// //
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) {
@ -718,24 +718,30 @@ const submitForm = async () => {
const valid = await elForm.validate() const valid = await elForm.validate()
if (!valid) return if (!valid) return
// //
const validateForm1 = await tableFormRef.value.validateForm()
console.log(11,data.value.packageList)
if(data.value.packageList?.length>0){
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return if (!validateForm1) return
let number = 0 let number = 0
data.value.packageList.forEach(cur=>{ data.value.packageList.forEach(cur=>{
number += parseFloat(cur.sampleAmount) number += parseFloat(cur.sampleAmount)
}) })
if(number > data.value.sampleTotalAmount){ if(number != data.value.sampleTotalAmount){
message.error(`采样数量之和不可以大于总数量`) message.error(`采样数量之和不等于总数量`)
return return
}
} }
const bol2 = await validateForm(formFeaturesRef.value) const bol2 = await validateForm(formFeaturesRef.value)
if (!bol2) { if (!bol2) {
message.error(`模板中有检验工序和检验特性未填写完全`) message.error(`模板中有检验工序和检验特性未填写完全`)
return return
} }
// //
let arrBol = [] let arrBol = []
let isOutweigh = []// let isOutweigh = []//
let numberList = []//
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(
@ -750,7 +756,7 @@ const submitForm = async () => {
arrBol.push( arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => { (cur, key) => {
return !cur.estimateCode || !cur.defectLevel return !cur.estimateCode
} }
) )
) )
@ -777,16 +783,32 @@ 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) {
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != data.value.sampleTotalAmount
}
)
)
}
}) })
let isEmpty1 = arrBol.some(item=>item == true) let isEmpty1 = arrBol.some(item=>item == true)
let isEmptyNumberList = numberList.some(item=>item == true)
if(isEmpty1){ if(isEmpty1){
message.error('检验工序和检验特性有字段未填写完全') message.error('检验工序和检验特性有字段未填写完全')
return; return;
} }
if(isOutweigh.length>0){ if(isOutweigh?.length>0){
message.error('检验特性中有开始时间大于结束时间') message.error('检验特性中有开始时间大于结束时间')
return; return;
} }
console.log(44,numberList)
if(isEmptyNumberList){
message.error('合格数量和不合格数量之和不等于总数量')
return;
}
if (formType.value == 'create') { if (formType.value == 'create') {
// //
emit('submitForm', formType.value, data.value) emit('submitForm', formType.value, data.value)

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

@ -51,7 +51,7 @@
:isShowAddBtn="false" :detailButtonIsShow="true" :isShowAddBtn="false" :detailButtonIsShow="true"
/> />
<!-- 包装信息 --> <!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/> <ListTable ref="listTableRef" titleName="包装信息"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -62,7 +62,7 @@
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail' import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
@ -161,10 +161,10 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
] ]
} }
@ -176,10 +176,15 @@ const listTableRef = ref()
}else if (val == 'mainPackage') { // }else if (val == 'mainPackage') { //
const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id) const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list) listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
} }else if (val == 'mainJobAba') { //
else if (val == 'mainJobClo') { // console.log('列表-操作按钮事件-放弃')
handleDelete(row.id) handleAbandon(row.id)
} } else if (val == 'mainJobClo') { //
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
handleAccept(row.id)
}
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
@ -200,19 +205,43 @@ const listTableRef = ref()
const execute = async (type : string, row ?: number) => { const execute = async (type : string, row ?: number) => {
formRef.value.open(type, row) formRef.value.open(type, row)
} }
/** 删除按钮操作 */ /** 关闭按钮操作 */
const handleDelete = async (id : number) => { const handleClose = async (id : number) => {
try { try {
// //
await message.delConfirm() await message.confirm(t('common.confirmColse'))
// //
await InspectionJobMainApi.deleteInspectionJobMain(id) await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.delSuccess')) message.success(t('common.closeSuccess'))
// //
await getList() await getList()
} catch { } } catch { }
} }
//
const handleAccept = async (id : number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
//
await getList()
} catch { }
}
//
const handleAbandon = async (id : number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
//
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

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

@ -61,20 +61,47 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
} }
},{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps:{
disabled:true
}
},
}, },
{ {
label: '物料编码', label: '物料编码',
field: 'materialCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
table: {
width: 150
},
form: { form: {
componentProps:{ componentProps:{
disabled:true disabled:true
} }
}, },
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: { table: {
width: 150 width: 150
} },
form: {
componentProps:{
disabled:true
}
},
}, },
{ {
label: '物料批次', label: '物料批次',

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

@ -61,7 +61,7 @@
:isShowAddBtn="false" :detailButtonIsShow="true" :isShowAddBtn="false" :detailButtonIsShow="true"
/> />
<!-- 包装信息 --> <!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/> <ListTable ref="listTableRef" titleName="包装信息"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -71,7 +71,7 @@
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain' import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail' import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
@ -180,9 +180,9 @@
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn({hasPermi:'qms:inspection-recode-main:edit'}), //
// defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn(null), // defaultButtons.mainListOrderPubBtn({hasPermi:'qms:inspection-recode-main:pub'}), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
] ]
} }

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

@ -38,7 +38,7 @@
<ImportForm ref="importFormRef" url="/request/inspection-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/request/inspection-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" /> @success="importSuccess" />
<!-- 包装信息 --> <!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/> <ListTable ref="listTableRef" titleName="包装信息"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -46,7 +46,7 @@
import { InspectionMain, InspectionMainRules,InspectionRequestPackage } from './inspectionMain.data' import { InspectionMain, InspectionMainRules,InspectionRequestPackage } from './inspectionMain.data'
import * as InspectionMainApi from '@/api/qms/inspectionRequest' import * as InspectionMainApi from '@/api/qms/inspectionRequest'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
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'
@ -220,7 +220,7 @@ const listTableRef = ref()
await message.confirm(t('common.confirmHandle')) await message.confirm(t('common.confirmHandle'))
tableObject.loading = true tableObject.loading = true
await InspectionMainApi.handleInspectRequestMain(id) await InspectionMainApi.handleInspectRequestMain(id)
message.success(t('common.handleSuccess')) message.success(t('common.dealwithSuccess'))
await getList() await getList()
}catch{}finally{ }catch{}finally{
tableObject.loading = false tableObject.loading = false

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

@ -368,7 +368,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true disabled:true
}, },
table:{ table:{
width:150 width:200
} }
}, },
{ {
@ -380,7 +380,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true disabled:true
}, },
table:{ table:{
width:150 width:200
} }
}, },
{ {
@ -392,7 +392,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true disabled:true
}, },
table:{ table:{
width:150 width:180
} }
}, },
{ {

3
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -191,7 +191,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
setV['ppNumber'] = val[0]['ppNumber'] setV['ppNumber'] = val[0]['ppNumber']
// getBomDisassemble // getBomDisassemble
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({ // PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({
masterId: val[0]['id'] masterId: val[0]['id']
}).then((res) => { }).then((res) => {
if (res) tableData.value = res if (res) tableData.value = res

8
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue

@ -172,10 +172,10 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:accept'}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:accept'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:abandon'}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-job-main:execute'}), // defaultButtons.mainListJobRecBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:execute'}), //
] ]
} }

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

@ -46,7 +46,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
:indexTableColumn="3" :indexTableColumn="0"
@success="getList" @success="getList"
:rules="SupplierdeliverRequestMainRules" :rules="SupplierdeliverRequestMainRules"
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" :formAllSchemas="SupplierdeliverRequestMain.allSchemas"
@ -61,7 +61,15 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@formFormDateChange="formFormDateChange" @formFormDateChange="formFormDateChange"
/> >
<template v-slot="{row}">
<el-date-picker v-bind:modelValue="row['expireTime']?addDay(row['produceDate'],row['expireTime']).format('YYYY-MM-DD'):'2099-12-31'"
:clearable="true"
style="width: 100%"
:disabled="true"
placeholder="选择日期"/>
</template>
</BasicForm>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
@ -120,6 +128,7 @@
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { formatDate } from '@/utils/formatTime'
import { import {
SupplierdeliverRequestMain, SupplierdeliverRequestMain,
SupplierdeliverRequestMainRules, SupplierdeliverRequestMainRules,
@ -131,7 +140,10 @@ import {
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 } from '@/utils/formatTime' import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
import * as ItembasicApi from '@/api/wms/itembasic'
import { PurchasePlanDetail } from '../purchasePlanMain/purchasePlanMain.data'
import { addDay } from '@/utils/formatTime'
// //
defineOptions({ name: 'SupplierdeliverRequestMain' }) defineOptions({ name: 'SupplierdeliverRequestMain' })
@ -155,6 +167,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
console.log("type:",type) console.log("type:",type)
console.log("formField:",formField) console.log("formField:",formField)
console.log(formField, searchField, val, formRef, type, row)
if (type == 'tableForm') { if (type == 'tableForm') {
// //
// row[formField] = val[0][searchField] // row[formField] = val[0][searchField]
@ -165,7 +178,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
// row['orderQty'] = val[0]['orderQty'] // row['orderQty'] = val[0]['orderQty']
// row['uom'] = val[0]['uom'] // row['uom'] = val[0]['uom']
// } // }
//--
const itemCodes = []
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = {...row} const newRow = {...row}
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['poNumber'] = item['poNumber'] newRow['poNumber'] = item['poNumber']
@ -173,12 +189,29 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
newRow['poLine'] = item['poLine'] newRow['poLine'] = item['poLine']
newRow['orderQty'] = item['orderQty'] newRow['orderQty'] = item['orderQty']
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
itemCodes.push(item['itemCode'])
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
//
ItembasicApi.getItembasicPage({
code:itemCodes.join(',')
}).then((res)=>{
console.log('有效期',res)
tableData.value.forEach((item,index)=>{
tableData.value[index]['expireTime'] = index==0?1:2
})
// res.list.forEach((item,index)=>{
// const findItem = tableData.value.find(item1=>item1['itemCode']==item['code'])
// findItem['expireTime'] = findItem['expireTime']
// })
})
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField == 'ppNumber'){ if(formField == 'ppNumber'){
//--
getSearchTableData(val[0]['number'],formField,searchField)
// //
let beginTime = val[0]['endTime'] let beginTime = val[0]['endTime']
let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD') let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD')
@ -196,6 +229,46 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
} }
}) })
} }
const getSearchTableData = async (number,formField,searchField)=>{
const {tableObject ,tableMethods} = useTable({
defaultParams:{number},
getListApi: PurchasePlanDetailApi.getPurchasePlanDetailPage //
})
//
const { getList:getList1 } = tableMethods
await getList1()
const tableColumns = PurchasePlanDetail.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
tableData.value = []
const itemCodes = []
tableObject.tableList.forEach(row=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
newRow[formField] = row[searchField]
newRow['poNumber'] = row['poNumber']
newRow['itemCode'] = row['itemCode']
newRow['poLine'] = row['poLine']
newRow['orderQty'] = row['orderQty']
newRow['uom'] = row['uom']
tableData.value.push(newRow)
itemCodes.push(row['itemCode'])
})
//
ItembasicApi.getItembasicPage({
code:itemCodes.join(',')
}).then((res)=>{
console.log('有效期',res)
tableData.value.forEach((item,index)=>{
tableData.value[index]['expireTime'] = index==0?1:2
})
// res.list.forEach((item,index)=>{
// const findItem = tableData.value.find(item1=>item1['itemCode']==item['code'])
// findItem['expireTime'] = findItem['expireTime']
// })
})
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -232,6 +305,8 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
}) })
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage // getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage //
}) })

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

@ -553,7 +553,103 @@ export const SupplierdeliverRequestMainRules = reactive({
*/ */
export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '生产日期', label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: false
}
},
{
label: '生产日期1',
field: 'produceDate', field: 'produceDate',
formatter: dateFormatter2, formatter: dateFormatter2,
detail: { detail: {
@ -578,17 +674,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x', valueFormat: 'x',
} }
}, },
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: false
}
},
// { // {
// label: '替代批次', // label: '替代批次',
// field: 'altBatch', // field: 'altBatch',
@ -620,6 +706,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x', valueFormat: 'x',
} }
}, },
isTableForm: false, isTableForm: false,
tableForm: { tableForm: {
type: 'FormDate', type: 'FormDate',
@ -628,7 +715,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
}, },
{ {
label: '过期日期', label: '过期日期3',
field: 'expireDate', field: 'expireDate',
formatter: dateFormatter2, formatter: dateFormatter2,
detail: { detail: {
@ -647,81 +734,17 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x', valueFormat: 'x',
} }
}, },
tableForm: { // tableForm: {
type: 'FormDate', // type: 'FormDate',
dateFormat: 'YYYY-MM-DD', // dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', // valueFormat: 'x',
} // }
}, tableForm:{
{ type: 'slot',
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true disabled: true
} }
}, },
{ {
label: '订单数量', label: '订单数量',
field: 'orderQty', field: 'orderQty',
@ -816,22 +839,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
} }
}, },
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',
@ -1076,7 +1084,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
} }
}, },
{ {
label: '生产日期', label: '生产日期2',
field: 'produceDate', field: 'produceDate',
formatter: dateFormatter2, formatter: dateFormatter2,
detail: { detail: {

12
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -141,6 +141,18 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180 width: 180
}, },
}, },
{
label: '过账日期',
field: 'postingDate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
}
},
{ {
label: '业务类型', label: '业务类型',
field:'businessType', field:'businessType',

24
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -294,7 +294,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
}, },
{ {
label: '发票时间', label: '发票日期',
field: 'invoiceTime', field: 'invoiceTime',
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
@ -314,7 +314,27 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
}, },
{
label: '过账日期',
field: 'postingDate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{ {
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',

Loading…
Cancel
Save