Browse Source

提交选择集时解决冲突

master_hella_20240701
ljlong_2630 8 months ago
parent
commit
13204ef8c2
  1. 55
      src/api/mes/dismantlingMain/index.ts
  2. 2
      src/api/mes/ordermonthplan/index.ts
  3. 60
      src/api/qms/aql/index.ts
  4. 26
      src/api/qms/inspectionJob/inspectionJobDetail/index.ts
  5. 6
      src/api/qms/inspectionJob/inspectionJobPackage/index.ts
  6. 1
      src/api/qms/inspectionMethod/index.ts
  7. 48
      src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts
  8. 20
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  9. 75
      src/api/wms/supplierinvoiceInvoiced/index.ts
  10. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  11. 4
      src/components/UploadFile/src/UploadFile.vue
  12. 28
      src/components/Verifition/src/Verify/VerifyPoints.vue
  13. 35
      src/components/Verifition/src/Verify/VerifySlide.vue
  14. 33
      src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue
  15. 8
      src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js
  16. 25
      src/components/iFrame/src/IFrame.vue
  17. 3
      src/components/listTable/index.ts
  18. 40
      src/components/listTable/src/ListTable.vue
  19. 13
      src/layout/components/Logo/src/Logo.vue
  20. 14
      src/layout/components/Message/src/Message.vue
  21. 13
      src/layout/components/TabMenu/src/TabMenu.vue
  22. 4
      src/locales/en-US.ts
  23. 4
      src/locales/zh-CN.ts
  24. 5
      src/utils/dict.ts
  25. 25
      src/utils/disposition/defaultButtons.ts
  26. 14
      src/views/bpm/model/editor/index.vue
  27. 2
      src/views/login/components/LoginForm.vue
  28. 23
      src/views/login/components/MobileForm.vue
  29. 177
      src/views/mes/dismantlingMain/dismantlingMain.data.ts
  30. 244
      src/views/mes/dismantlingMain/index.vue
  31. 52
      src/views/mes/ordermonthplan/index.vue
  32. 61
      src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts
  33. 97
      src/views/mes/pattern/pattern.data.ts
  34. 60
      src/views/qms/aql/aql.data.ts
  35. 18
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  36. 116
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  37. 478
      src/views/qms/inspection/inspectionJob/addForm.vue
  38. 310
      src/views/qms/inspection/inspectionJob/detail.vue
  39. 63
      src/views/qms/inspection/inspectionJob/index.vue
  40. 138
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  41. 310
      src/views/qms/inspection/inspectionRecord/detail.vue
  42. 67
      src/views/qms/inspection/inspectionRecord/index.vue
  43. 35
      src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
  44. 51
      src/views/qms/inspectionMethod/index.vue
  45. 28
      src/views/qms/inspectionMethod/inspectionMethod.data.ts
  46. 1
      src/views/qms/samplingProcess/samplingProcess.data.ts
  47. 2
      src/views/qms/samplingScheme/samplingScheme.data.ts
  48. 9
      src/views/system/systemInstallPackage/index.vue
  49. 13
      src/views/system/systemInstallPackage/systemInstallPackage.data.ts
  50. 6
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts
  51. 6
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts
  52. 32
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  53. 84
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  54. 3
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
  55. 5
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  56. 3
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  57. 38
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  58. 310
      src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue
  59. 168
      src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts

55
src/api/mes/dismantlingMain/index.ts

@ -0,0 +1,55 @@
import request from '@/config/axios'
export interface DismantlingMainVO {
deleteTime: Date
id: number
status: string
concurrencyStamp: number
remark: string
deleter: string
siteId: number
dismantlingBillno: string
productionCode: string
workbillType: string
}
// 查询报废拆解登记主列表
export const getDismantlingMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/dismantling-main/senior', data })
} else {
return await request.get({ url: `/mes/dismantling-main/page`, params })
}
}
// 查询报废拆解登记主详情
export const getDismantlingMain = async (id: number) => {
return await request.get({ url: `/mes/dismantling-main/get?id=` + id })
}
// 新增报废拆解登记主
export const createDismantlingMain = async (data: DismantlingMainVO) => {
return await request.post({ url: `/mes/dismantling-main/create`, data })
}
// 修改报废拆解登记主
export const updateDismantlingMain = async (data: DismantlingMainVO) => {
return await request.put({ url: `/mes/dismantling-main/update`, data })
}
// 删除报废拆解登记主
export const deleteDismantlingMain = async (id: number) => {
return await request.delete({ url: `/mes/dismantling-main/delete?id=` + id })
}
// 导出报废拆解登记主 Excel
export const exportDismantlingMain = async (params) => {
return await request.download({ url: `/mes/dismantling-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/dismantling-main/get-import-template' })
}

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

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

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

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

26
src/api/qms/inspectionJob/inspectionJobDetail/index.ts

@ -1,27 +1,5 @@
import request from '@/config/axios' import request from '@/config/axios'
export interface InspectionJobDetailVO {
number: string
applicationDate: localdate
applicationTime: Date
requestStartTime: Date
requestEndTime: Date
finishTime: Date
supplierCode: string
materialCode: string
batch: string
requestInspectionNum: number
referenceOrderCode: string
referenceOrderRow: number
referenceCertificateCode: string
referenceCertificateRow: number
inspectionSchemeCode: string
inspectionStageCode: string
applicationPackageCode: string
inspectionLevel: string
aqlValue: number
available: string
}
// 查询检验申请列表 // 查询检验申请列表
export const getInspectionJobDetailPage = async (params) => { export const getInspectionJobDetailPage = async (params) => {
@ -44,12 +22,12 @@ export const getInspectionJobDetail = async (id: number) => {
} }
// 新增检验申请 // 新增检验申请
export const createInspectionJobDetail = async (data: InspectionJobDetailVO) => { export const createInspectionJobDetail = async (data) => {
return await request.post({ url: `/qms/inspection-job-detail/create`, data }) return await request.post({ url: `/qms/inspection-job-detail/create`, data })
} }
// 修改检验申请 // 修改检验申请
export const updateInspectionJobDetail = async (data: InspectionJobDetailVO) => { export const updateInspectionJobDetail = async (data) => {
return await request.put({ url: `/qms/inspection-job-detail/update`, data }) return await request.put({ url: `/qms/inspection-job-detail/update`, data })
} }

6
src/api/qms/inspectionJob/inspectionJobPackage/index.ts

@ -0,0 +1,6 @@
import request from '@/config/axios'
//查询检验申请列表
export const getInspectionJobPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id })
}

1
src/api/qms/inspectionMethod/index.ts

@ -33,6 +33,7 @@ export const createInspectionMethod = async (data: InspectionMethodVO) => {
// 修改检验方法 // 修改检验方法
export const updateInspectionMethod = async (data: InspectionMethodVO) => { export const updateInspectionMethod = async (data: InspectionMethodVO) => {
// debugger
return await request.put({ url: `/qms/inspection-method/update`, data }) return await request.put({ url: `/qms/inspection-method/update`, data })
} }

48
src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts

@ -1,65 +1,47 @@
import request from '@/config/axios' import request from '@/config/axios'
export interface InspectionRecordDetailVO {
number: string
applicationDate: localdate
applicationTime: Date
requestStartTime: Date
requestEndTime: Date
finishTime: Date
supplierCode: string
materialCode: string
batch: string
requestInspectionNum: number
referenceOrderCode: string
referenceOrderRow: number
referenceCertificateCode: string
referenceCertificateRow: number
inspectionSchemeCode: string
inspectionStageCode: string
applicationPackageCode: string
inspectionLevel: string
aqlValue: number
available: string
}
// 查询检验申请列表 // 查询检验申请列表
export const getInspectionRecordDetailPage = async (params) => { export const getInspectionRecordDetailPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/inspection/inspection-recordord-detail/senior', data }) return await request.post({ url: '/qms/inspection-record-detail/senior', data })
} else { } else {
return await request.get({ url: `/inspection/inspectirecordrecord-detail/page`, params }) return await request.get({ url: `/qms/inspection-record-detail/page`, params })
} }
} }
// 查询检验申请列表
export const getInspectionRecordDetailList = async (id: number) => {
return await request.get({ url: `/qms/inspection-record-detail/list?masterId=` + id })
}
// 查询检验申请详情 // 查询检验申请详情
export const getInspectionRecordDetail = async (id: number) => { export const getInspectionRecordDetail = async (id: number) => {
return await request.get({ url: `/inspection/insperecordon-record-detail/get?id=` + id }) return await request.get({ url: `/qms/inspection-record-detail/get?id=` + id })
} }
// 新增检验申请 // 新增检验申请
export const createInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { export const createInspectionRecordDetail = async (data) => {
return await request.post({ url: `/inspection/inrecordction-record-detail/create`, data }) return await request.post({ url: `/qms/inspection-record-detail/create`, data })
} }
// 修改检验申请 // 修改检验申请
export const updateInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { export const updateInspectionRecordDetail = async (data) => {
return await request.put({ url: `/inspectionrecordspection-record-detail/update`, data }) return await request.put({ url: `/qms/inspection-record-detail/update`, data })
} }
// 删除检验申请 // 删除检验申请
export const deleteInspectionRecordDetail = async (id: number) => { export const deleteInspectionRecordDetail = async (id: number) => {
return await request.delete({ url: `/inspectrecord/inspection-record-detail/delete?id=` + id }) return await request.delete({ url: `/qms/inspection-record-detail/delete?id=` + id })
} }
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionRecordDetail = async (params) => { export const exportInspectionRecordDetail = async (params) => {
return await request.download({ url: `/insprecordion/inspection-record-detail/export-excel`, params }) return await request.download({ url: `/qms/inspection-record-detail/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/irecordection/inspection-record-detail/get-import-template' }) return request.download({ url: '/qms/inspection-record-detail/get-import-template' })
} }

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

@ -28,38 +28,42 @@ export const getInspectionRecordMainPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/inspection/inspection-record-main/senior', data }) return await request.post({ url: '/qms/inspection-record-main/senior', data })
} else { } else {
return await request.get({ url: `/inspection/inspection-record-main/page`, params }) return await request.get({ url: `/qms/inspection-record-main/page`, params })
} }
} }
// 查询检验申请详情 // 查询检验申请详情
export const getInspectionRecordMain = async (id: number) => { export const getInspectionRecordMain = async (id: number) => {
return await request.get({ url: `/inspection/inspection-record-main/get?id=` + id }) return await request.get({ url: `/qms/inspection-record-main/get?id=` + id })
} }
// 新增检验申请 // 新增检验申请
export const createInspectionRecordMain = async (data: InspectionRecordMainVO) => { export const createInspectionRecordMain = async (data: InspectionRecordMainVO) => {
return await request.post({ url: `/inspection/inspection-record-main/create`, data }) return await request.post({ url: `/qms/inspection-record-main/create`, data })
} }
// 修改检验申请 // 修改检验申请
export const updateInspectionRecordMain = async (data: InspectionRecordMainVO) => { export const updateInspectionRecordMain = async (data: InspectionRecordMainVO) => {
return await request.put({ url: `/inspection/inspection-record-main/update`, data }) return await request.put({ url: `/qms/inspection-record-main/update`, data })
} }
// 删除检验申请 // 删除检验申请
export const deleteInspectionRecordMain = async (id: number) => { export const deleteInspectionRecordMain = async (id: number) => {
return await request.delete({ url: `/inspection/inspection-record-main/delete?id=` + id }) return await request.delete({ url: `/qms/inspection-record-main/delete?id=` + id })
} }
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionRecordMain = async (params) => { export const exportInspectionRecordMain = async (params) => {
return await request.download({ url: `/inspection/inspection-record-main/export-excel`, params }) return await request.download({ url: `/qms/inspection-record-main/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/inspection/inspection-record-main/get-import-template' }) return request.download({ url: '/qms/inspection-record-main/get-import-template' })
}
// 发布
export const publishInspectionRecordMain = async (data ) => {
return await request.put({ url: `/qms/inspection-record-main/publish`, data })
} }

75
src/api/wms/supplierinvoiceInvoiced/index.ts

@ -0,0 +1,75 @@
import request from '@/config/axios'
export interface SupplierinvoiceInvoicedVO {
id: number
tax: number
projectCode: string
billType: string
recvBillNum: string
asnBillNum: string
supplierCode: string
poNumber: string
poLine: string
purchasePrice: number
invoicableQuantity: number
itemCode: string
uom: string
currency: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询待开票列表
export const getSupplierinvoiceInvoicedPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/supplierinvoice-invoiced/senior', data })
} else {
return await request.get({ url: `/wms/supplierinvoice-invoiced/page`, params })
}
}
// 查询待开票详情
export const getSupplierinvoiceInvoiced = async (id: number) => {
return await request.get({ url: `/wms/supplierinvoice-invoiced/get?id=` + id })
}
// 新增待开票
export const createSupplierinvoiceInvoiced = async (data: SupplierinvoiceInvoicedVO) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/create`, data })
}
// 修改待开票
export const updateSupplierinvoiceInvoiced = async (data: SupplierinvoiceInvoicedVO) => {
return await request.put({ url: `/wms/supplierinvoice-invoiced/update`, data })
}
// 删除待开票
export const deleteSupplierinvoiceInvoiced = async (id: number) => {
return await request.delete({ url: `/wms/supplierinvoice-invoiced/delete?id=` + id })
}
// 导出待开票 Excel
export const exportSupplierinvoiceInvoiced = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-invoiced/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-invoiced/get-import-template' })
}
// 审批通过待开票
export const agreeSupplierinvoiceInvoiced = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/agree?id=` + id })
}
// 审批拒绝待开票
export const refuseSupplierinvoiceInvoiced = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/refuse?id=` + id })
}

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

@ -77,6 +77,11 @@ export const rejSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id }) return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id })
} }
// 供应商--发票寄出
export const invoiceSentOutSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/invoiceSentOut?id=` + id })
}
// 财务--审批通过供应商发货申请主 // 财务--审批通过供应商发货申请主
export const financeappSupplierinvoiceRequestMain = async (id: number) => { export const financeappSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp?id=` + id }) return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp?id=` + id })

4
src/components/UploadFile/src/UploadFile.vue

@ -56,7 +56,7 @@ const props = defineProps({
title: propTypes.string.def('文件上传'), title: propTypes.string.def('文件上传'),
updateUrl: propTypes.string.def(import.meta.env.VITE_UPLOAD_URL), updateUrl: propTypes.string.def(import.meta.env.VITE_UPLOAD_URL),
upData: propTypes.object.def(), upData: propTypes.object.def(),
fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf', 'pdf','png', 'jpg', 'jpeg']), // , ['png', 'jpg', 'jpeg'] fileType: propTypes.array.def(['apk','doc', 'xls', 'ppt', 'txt', 'pdf', 'pdf','png', 'jpg', 'jpeg']), // , ['png', 'jpg', 'jpeg']
fileSize: propTypes.number.def(5), // (MB) fileSize: propTypes.number.def(5), // (MB)
limit: propTypes.number.def(5), // limit: propTypes.number.def(5), //
autoUpload: propTypes.bool.def(true), // autoUpload: propTypes.bool.def(true), //
@ -137,6 +137,7 @@ const handleRemove = (file) => {
} }
const handlePreview: UploadProps['onPreview'] = (uploadFile) => { const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
console.log(uploadFile) console.log(uploadFile)
window.open(uploadFile.url)
} }
// //
const listToString = (list: UploadUserFile[], separator?: string) => { const listToString = (list: UploadUserFile[], separator?: string) => {
@ -147,6 +148,7 @@ const listToString = (list: UploadUserFile[], separator?: string) => {
} }
return strs != '' ? strs.substr(0, strs.length - 1) : '' return strs != '' ? strs.substr(0, strs.length - 1) : ''
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.upload-file-uploader { .upload-file-uploader {

28
src/components/Verifition/src/Verify/VerifyPoints.vue

@ -148,6 +148,8 @@ onMounted(() => {
} }
}) })
const canvas = ref(null) const canvas = ref(null)
const timer1 = ref<NodeJS.Timeout | number>(0)
const timer2 = ref<NodeJS.Timeout | number>(0)
const canvasClick = (e) => { const canvasClick = (e) => {
checkPosArr.push(getMousePos(canvas, e)) checkPosArr.push(getMousePos(canvas, e))
if (num.value == checkNum.value) { if (num.value == checkNum.value) {
@ -157,7 +159,7 @@ const canvasClick = (e) => {
checkPosArr.length = 0 checkPosArr.length = 0
checkPosArr.push(...arr) checkPosArr.push(...arr)
// //
setTimeout(() => { timer1.value = setTimeout(() => {
// var flag = this.comparePos(this.fontPos, this.checkPosArr); // var flag = this.comparePos(this.fontPos, this.checkPosArr);
// //
var captchaVerification = secretKey.value var captchaVerification = secretKey.value
@ -177,9 +179,13 @@ const canvasClick = (e) => {
text.value = t('captcha.success') text.value = t('captcha.success')
bindingClick.value = false bindingClick.value = false
if (mode.value == 'pop') { if (mode.value == 'pop') {
setTimeout(() => { timer2.value = setTimeout(() => {
proxy.$parent.clickShow = false proxy.$parent.clickShow = false
refresh() refresh()
if(timer2.value){
clearTimeout(timer2.value)
timer2.value = 0
}
}, 1500) }, 1500)
} }
proxy.$parent.$emit('success', { captchaVerification }) proxy.$parent.$emit('success', { captchaVerification })
@ -188,17 +194,33 @@ const canvasClick = (e) => {
barAreaColor.value = '#d9534f' barAreaColor.value = '#d9534f'
barAreaBorderColor.value = '#d9534f' barAreaBorderColor.value = '#d9534f'
text.value = t('captcha.fail') text.value = t('captcha.fail')
setTimeout(() => { timer2.value = setTimeout(() => {
refresh() refresh()
if(timer2.value){
clearTimeout(timer2.value)
timer2.value = 0
}
}, 700) }, 700)
} }
}) })
if(timer1.value){
clearTimeout(timer1.value)
timer1.value = 0
}
}, 400) }, 400)
} }
if (num.value < checkNum.value) { if (num.value < checkNum.value) {
num.value = createPoint(getMousePos(canvas, e)) num.value = createPoint(getMousePos(canvas, e))
} }
} }
onBeforeUnmount(() => {
if(timer1.value){
clearTimeout(timer1.value)
}
if(timer2.value){
clearTimeout(timer2.value)
}
})
// //
const getMousePos = function (obj, e) { const getMousePos = function (obj, e) {
var x = e.offsetX var x = e.offsetX

35
src/components/Verifition/src/Verify/VerifySlide.vue

@ -295,9 +295,14 @@ const end = () => {
showRefresh.value = false showRefresh.value = false
isEnd.value = true isEnd.value = true
if (mode.value == 'pop') { if (mode.value == 'pop') {
setTimeout(() => { let timer
timer = setTimeout(() => {
proxy.$parent.clickShow = false proxy.$parent.clickShow = false
refresh() refresh()
if(timer){
clearTimeout(timer)
timer = null
}
}, 1500) }, 1500)
} }
passFlag.value = true passFlag.value = true
@ -309,10 +314,15 @@ const end = () => {
secretKey.value secretKey.value
) )
: backToken.value + '---' + JSON.stringify({ x: moveLeftDistance, y: 5.0 }) : backToken.value + '---' + JSON.stringify({ x: moveLeftDistance, y: 5.0 })
setTimeout(() => { let timer
timer = setTimeout(() => {
tipWords.value = '' tipWords.value = ''
proxy.$parent.closeBox() proxy.$parent.closeBox()
proxy.$parent.$emit('success', { captchaVerification }) proxy.$parent.$emit('success', { captchaVerification })
if(timer){
clearTimeout(timer)
timer = null
}
}, 1000) }, 1000)
} else { } else {
moveBlockBackgroundColor.value = '#d9534f' moveBlockBackgroundColor.value = '#d9534f'
@ -320,13 +330,23 @@ const end = () => {
iconColor.value = '#fff' iconColor.value = '#fff'
iconClass.value = 'icon-close' iconClass.value = 'icon-close'
passFlag.value = false passFlag.value = false
setTimeout(function () { let timer
timer = setTimeout(()=>{
refresh() refresh()
if(timer){
clearTimeout(timer)
timer = null
}
}, 1000) }, 1000)
proxy.$parent.$emit('error', proxy) proxy.$parent.$emit('error', proxy)
tipWords.value = t('captcha.fail') tipWords.value = t('captcha.fail')
setTimeout(() => { let timer1
timer1 = setTimeout(() => {
tipWords.value = '' tipWords.value = ''
if(timer1){
clearTimeout(timer1)
timer1 = null
}
}, 1000) }, 1000)
} }
}) })
@ -351,10 +371,15 @@ const refresh = async () => {
isEnd.value = false isEnd.value = false
await getPictrue() await getPictrue()
setTimeout(() => { let timer
timer = setTimeout(() => {
transitionWidth.value = '' transitionWidth.value = ''
transitionLeft.value = '' transitionLeft.value = ''
text.value = explain.value text.value = explain.value
if(timer){
clearTimeout(timer)
timer = null
}
}, 300) }, 300)
} }

33
src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue

@ -76,6 +76,9 @@ const resetBaseInfo = () => {
// elementBaseInfo.value = JSON.parse(JSON.stringify(bpmnElement.value.businessObject)) // elementBaseInfo.value = JSON.parse(JSON.stringify(bpmnElement.value.businessObject))
console.log(elementBaseInfo.value, 'elementBaseInfo22222222222') console.log(elementBaseInfo.value, 'elementBaseInfo22222222222')
} }
const timer1 = ref<NodeJS.Timeout | number>()
const timer2 = ref<NodeJS.Timeout | number>()
const timer3 = ref<NodeJS.Timeout | number>()
const handleKeyUpdate = (value) => { const handleKeyUpdate = (value) => {
// value XML NCName // value XML NCName
if (!value) { if (!value) {
@ -90,8 +93,12 @@ const handleKeyUpdate = (value) => {
// BPMN XML key id // BPMN XML key id
elementBaseInfo.value['id'] = value elementBaseInfo.value['id'] = value
setTimeout(() => { timer1.value = setTimeout(() => {
updateBaseInfo('id') updateBaseInfo('id')
if(timer1.value){
clearTimeout(timer1.value)
timer1.value = 0
}
}, 100) }, 100)
} }
const handleNameUpdate = (value) => { const handleNameUpdate = (value) => {
@ -101,8 +108,12 @@ const handleNameUpdate = (value) => {
} }
elementBaseInfo.value['name'] = value elementBaseInfo.value['name'] = value
setTimeout(() => { timer2.value = setTimeout(() => {
updateBaseInfo('name') updateBaseInfo('name')
if(timer2.value){
clearTimeout(timer2.value)
timer2.value = 0
}
}, 100) }, 100)
} }
// const handleDescriptionUpdate=(value)=> { // const handleDescriptionUpdate=(value)=> {
@ -140,10 +151,14 @@ const updateBaseInfo = (key) => {
} }
onMounted(() => { onMounted(() => {
// bpmn 1 key name // bpmn 1 key name
setTimeout(() => { timer3.value = setTimeout(() => {
console.log(props.model, 'props.model') console.log(props.model, 'props.model')
handleKeyUpdate(props.model.key) handleKeyUpdate(props.model.key)
handleNameUpdate(props.model.name) handleNameUpdate(props.model.name)
if(timer3.value){
clearTimeout(timer3.value)
timer3.value = 0
}
console.log(props, 'propsssssssssssssssssssss') console.log(props, 'propsssssssssssssssssssss')
}, 1000) }, 1000)
}) })
@ -180,5 +195,17 @@ watch(
// } // }
onBeforeUnmount(() => { onBeforeUnmount(() => {
bpmnElement.value = null bpmnElement.value = null
if(timer1.value){
clearTimeout(timer1.value)
timer1.value = 0
}
if(timer2.value){
clearTimeout(timer2.value)
timer2.value = 0
}
if(timer3.value){
clearTimeout(timer3.value)
timer3.value = 0
}
}) })
</script> </script>

8
src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js

@ -22,9 +22,13 @@ export default {
methodName: binding.expression, methodName: binding.expression,
bindingFn: binding.value bindingFn: binding.value
} }
let timer
setTimeout(() => { timer = setTimeout(() => {
document.addEventListener('touchstart', documentHandler) // 为document绑定事件 document.addEventListener('touchstart', documentHandler) // 为document绑定事件
if(timer){
clearTimeout(timer)
timer = null
}
}) })
}, },
update(el, binding) { update(el, binding) {

25
src/components/iFrame/src/IFrame.vue

@ -14,6 +14,8 @@ const init = () => {
height.value = document.documentElement.clientHeight - 94.5 + 'px' height.value = document.documentElement.clientHeight - 94.5 + 'px'
loading.value = false loading.value = false
} }
const timer1 = ref<NodeJS.Timeout | number>()
const timer2 = ref<NodeJS.Timeout | number>()
console.log(props.src); console.log(props.src);
function populateIframe(iframe, headers) { function populateIframe(iframe, headers) {
@ -37,14 +39,33 @@ function populateIframe(iframe, headers) {
onMounted(() => { onMounted(() => {
setTimeout(() => { timer1.value = setTimeout(() => {
var iframe = document.querySelector("#iframe"); var iframe = document.querySelector("#iframe");
populateIframe(iframe, [["Authorization", 'Bearer ' + getAccessToken()], ["tenant-id", getTenantId()]]); populateIframe(iframe, [["Authorization", 'Bearer ' + getAccessToken()], ["tenant-id", getTenantId()]]);
if(timer1.value){
clearTimeout(timer1.value)
timer1.value = 0
}
}, 300); }, 300);
setTimeout(() => { timer2.value = setTimeout(() => {
init() init()
if(timer2.value){
clearTimeout(timer2.value)
timer2.value = 0
}
}, 300) }, 300)
}) })
onBeforeUnmount(() => {
if(timer1.value){
clearTimeout(timer1.value)
timer1.value = 0
}
if(timer2.value){
clearTimeout(timer2.value)
timer2.value = 0
}
})
</script> </script>
<template> <template>
<div v-loading="loading" :style="'height:' + height"> <div v-loading="loading" :style="'height:' + height">

3
src/components/listTable/index.ts

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

40
src/components/listTable/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>

13
src/layout/components/Logo/src/Logo.vue

@ -18,6 +18,7 @@ const title = computed(() => appStore.getTitle)
const layout = computed(() => appStore.getLayout) const layout = computed(() => appStore.getLayout)
const collapse = computed(() => appStore.getCollapse) const collapse = computed(() => appStore.getCollapse)
const timer = ref<NodeJS.Timeout | number>()
onMounted(() => { onMounted(() => {
if (unref(collapse)) show.value = false if (unref(collapse)) show.value = false
@ -31,14 +32,24 @@ watch(
return return
} }
if (!collapse) { if (!collapse) {
setTimeout(() => { timer.value = setTimeout(() => {
show.value = !collapse show.value = !collapse
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
}, 400) }, 400)
} else { } else {
show.value = !collapse show.value = !collapse
} }
} }
) )
onBeforeUnmount(() => {
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
})
watch( watch(
() => layout.value, () => layout.value,

14
src/layout/components/Message/src/Message.vue

@ -8,7 +8,7 @@ const { push } = useRouter()
const activeName = ref('notice') const activeName = ref('notice')
const unreadCount = ref(0) // const unreadCount = ref(0) //
const list = ref<any[]>([]) // const list = ref<any[]>([]) //
const interval = ref<NodeJS.Timeout | number>()
// //
const getList = async () => { const getList = async () => {
list.value = await NotifyMessageApi.getUnreadNotifyMessageList() list.value = await NotifyMessageApi.getUnreadNotifyMessageList()
@ -35,13 +35,23 @@ onMounted(() => {
// //
getUnreadCount() getUnreadCount()
// //
setInterval( interval.value = setInterval(
() => { () => {
getUnreadCount() getUnreadCount()
if(interval.value){
clearInterval(interval.value)
interval.value = 0
}
}, },
1000 * 60 * 2 1000 * 60 * 2
) )
}) })
onBeforeUnmount(() => {
if(interval.value){
clearInterval(interval.value)
interval.value = 0
}
})
</script> </script>
<template> <template>
<div class="message"> <div class="message">

13
src/layout/components/TabMenu/src/TabMenu.vue

@ -37,6 +37,7 @@ export default defineComponent({
const setCollapse = () => { const setCollapse = () => {
appStore.setCollapse(!unref(collapse)) appStore.setCollapse(!unref(collapse))
} }
const timer = ref<NodeJS.Timeout | number>()
onMounted(() => { onMounted(() => {
if (unref(fixedMenu)) { if (unref(fixedMenu)) {
@ -77,14 +78,24 @@ export default defineComponent({
() => collapse.value, () => collapse.value,
(collapse: boolean) => { (collapse: boolean) => {
if (!collapse) { if (!collapse) {
setTimeout(() => { timer.value = setTimeout(() => {
showTitle.value = !collapse showTitle.value = !collapse
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
}, 200) }, 200)
} else { } else {
showTitle.value = !collapse showTitle.value = !collapse
} }
} }
) )
onBeforeUnmount(() => {
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
})
// //
const showMenu = ref(unref(fixedMenu) ? true : false) const showMenu = ref(unref(fixedMenu) ? true : false)

4
src/locales/en-US.ts

@ -296,6 +296,7 @@ export default {
delete: 'Delete', delete: 'Delete',
edit: 'Edit', edit: 'Edit',
update: 'Update', update: 'Update',
execute: 'Execute',
preview: 'Preview', preview: 'Preview',
more: 'More', more: 'More',
sync: 'Sync', sync: 'Sync',
@ -312,7 +313,8 @@ export default {
dataUpdate: 'Dict Data Eidt', dataUpdate: 'Dict Data Eidt',
fileUpload: 'File Upload', fileUpload: 'File Upload',
createLabel: 'create label', createLabel: 'create label',
viewDetail:'Detailed list' viewDetail:'Detailed list',
updataRecode:'Updata recode'
}, },
dialog: { dialog: {
dialog: 'Dialog', dialog: 'Dialog',

4
src/locales/zh-CN.ts

@ -297,6 +297,7 @@ export default {
edit: '编辑', edit: '编辑',
update: '编辑', update: '编辑',
preview: '预览', preview: '预览',
execute: '执行',
more: '更多', more: '更多',
sync: '同步', sync: '同步',
save: '保存', save: '保存',
@ -311,7 +312,8 @@ export default {
dataCreate: '字典数据新增', dataCreate: '字典数据新增',
dataUpdate: '字典数据编辑', dataUpdate: '字典数据编辑',
createLabel: '创建标签', createLabel: '创建标签',
viewDetail:'明细列表' viewDetail:'明细列表',
updataRecode:'更新记录'
}, },
dialog: { dialog: {
dialog: '弹窗', dialog: '弹窗',

5
src/utils/dict.ts

@ -200,6 +200,7 @@ export enum DICT_TYPE {
OWNER_TYPE = 'owner_type', // 货主类型 OWNER_TYPE = 'owner_type', // 货主类型
CARRIER_TYPE = 'carrier_type', // 承运商类型 CARRIER_TYPE = 'carrier_type', // 承运商类型
INSPECT_TYPE = 'inspect_type', // 检验类型 INSPECT_TYPE = 'inspect_type', // 检验类型
INSPECTION_TYPE = 'inspection_type', // 质量管理检验类型
NEXT_ACTION = 'next_action', // 下一步检验动作 NEXT_ACTION = 'next_action', // 下一步检验动作
SAMPLE_METHOD = 'sample_method', // 抽检方式 SAMPLE_METHOD = 'sample_method', // 抽检方式
WAREHOUSE_TYPE = 'warehouse_type', // 仓库类型 WAREHOUSE_TYPE = 'warehouse_type', // 仓库类型
@ -300,6 +301,7 @@ export enum DICT_TYPE {
DEFECT_LEVEL = "defect_level", // 缺陷级别 DEFECT_LEVEL = "defect_level", // 缺陷级别
DICTIONARY_CLASS = "dictionary_class", // 字典分类 DICTIONARY_CLASS = "dictionary_class", // 字典分类
USAGE_DECISION = "usage_decision", // 使用决策 USAGE_DECISION = "usage_decision", // 使用决策
INSPECTION_BATCH_SOURCE = "inspection_batch_source", // 检验批来源
// ========== 业务 - mes -gaojs ========== // ========== 业务 - mes -gaojs ==========
QUALIFY_STATUS = 'qualify_status',//质检状态 QUALIFY_STATUS = 'qualify_status',//质检状态
QUALIFY_ITEM_DATA_TYPE='qualify_item_data_type',//质检项目数据类型 QUALIFY_ITEM_DATA_TYPE='qualify_item_data_type',//质检项目数据类型
@ -309,6 +311,7 @@ export enum DICT_TYPE {
REWORK_TYPE='rework_type',//工作类型:返工登记、返修登记 REWORK_TYPE='rework_type',//工作类型:返工登记、返修登记
REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成 REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成
REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件 REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件
DISMANTLING_BILL_TYPE = 'dismantling_bill_type',//工单类型
SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态 SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态
SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态
} }

25
src/utils/disposition/defaultButtons.ts

@ -691,6 +691,18 @@ export function mainListJobExeBtn(option:any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-包装按钮
export function mainListPackageBtn(option:any) {
return __defaultBtnOption(option,{
label: '包装',
name: 'mainPackage',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-打印 // 主列表-打印
export function mainListPointBtn(option:any) { export function mainListPointBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
@ -799,7 +811,18 @@ export function mainThawRequesttBtn(option:any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-更新检验记录
export function mainUpdataRecodeBtn(option:any) {
return __defaultBtnOption(option,{
label: '更新检验记录',
name: 'updataRecode',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则 // 默认按钮规则
function __defaultBtnOption(option:any,specific:any){ function __defaultBtnOption(option:any,specific:any){
return { return {

14
src/views/bpm/model/editor/index.vue

@ -49,14 +49,26 @@ const controlForm = ref({
additionalModel: [CustomContentPadProvider, CustomPaletteProvider] additionalModel: [CustomContentPadProvider, CustomPaletteProvider]
}) })
const model = ref<ModelApi.ModelVO>() // const model = ref<ModelApi.ModelVO>() //
const timer = ref<NodeJS.Timeout | number>()
/** 初始化 modeler */ /** 初始化 modeler */
const initModeler = (item) => { const initModeler = (item) => {
setTimeout(() => { timer.value = setTimeout(() => {
modeler.value = item modeler.value = item
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
}, 10) }, 10)
} }
onBeforeUnmount(() => {
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
})
/** 添加/修改模型 */ /** 添加/修改模型 */
const save = async (bpmnXml) => { const save = async (bpmnXml) => {
const data = { const data = {

2
src/views/login/components/LoginForm.vue

@ -224,7 +224,7 @@ const handleLogin = async (params) => {
console.log('登录-224') console.log('登录-224')
getCode() getCode()
loginLoading.value = false loginLoading.value = false
loading.value.close() loading?.value?.close()
} }
} }

23
src/views/login/components/MobileForm.vue

@ -148,6 +148,8 @@ const smsVO = reactive({
} }
}) })
const mobileCodeTimer = ref(0) const mobileCodeTimer = ref(0)
const msgTimer = ref<NodeJS.Timeout | number>()
const timer = ref<NodeJS.Timeout | number>()
const redirect = ref<string>('') const redirect = ref<string>('')
const getSmsCode = async () => { const getSmsCode = async () => {
await getTenantId() await getTenantId()
@ -156,14 +158,25 @@ const getSmsCode = async () => {
message.success(t('login.SmsSendMsg')) message.success(t('login.SmsSendMsg'))
// //
mobileCodeTimer.value = 60 mobileCodeTimer.value = 60
let msgTimer = setInterval(() => { msgTimer.value = setInterval(() => {
mobileCodeTimer.value = mobileCodeTimer.value - 1 mobileCodeTimer.value = mobileCodeTimer.value - 1
if (mobileCodeTimer.value <= 0) { if (mobileCodeTimer.value <= 0) {
clearInterval(msgTimer) clearInterval(msgTimer.value)
msgTimer.value = 0
} }
}, 1000) }, 1000)
}) })
} }
onBeforeUnmount(() => {
if(msgTimer.value){
clearInterval(msgTimer.value)
msgTimer.value = 0
}
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
})
watch( watch(
() => currentRoute.value, () => currentRoute.value,
(route: RouteLocationNormalizedLoaded) => { (route: RouteLocationNormalizedLoaded) => {
@ -204,9 +217,13 @@ const signIn = async () => {
.catch(() => {}) .catch(() => {})
.finally(() => { .finally(() => {
loginLoading.value = false loginLoading.value = false
setTimeout(() => { timer.value = setTimeout(() => {
const loadingInstance = ElLoading.service() const loadingInstance = ElLoading.service()
loadingInstance.close() loadingInstance.close()
if(timer.value){
clearTimeout(timer.value)
timer.value = 0
}
}, 400) }, 400)
}) })
} }

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

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

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

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="DismantlingMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="DismantlingMain.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 #dismantlingBillno="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.dismantlingBillno)">
<span>{{ row.dismantlingBillno }}</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="DismantlingMainRules"
:formAllSchemas="DismantlingMain.allSchemas"
:apiUpdate="DismantlingMainApi.updateDismantlingMain"
:apiCreate="DismantlingMainApi.createDismantlingMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="DismantlingMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/dismantling-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { DismantlingMain,DismantlingMainRules } from './dismantlingMain.data'
import * as DismantlingMainApi from '@/api/mes/dismantlingMain'
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: 'MesDismantlingMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(DismantlingMain.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: DismantlingMainApi.getDismantlingMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:dismantlingMain:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'mes:dismantlingMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:dismantlingMain: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:'mes:dismantlingMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:dismantlingMain: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 =DismantlingMain.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 DismantlingMainApi.createDismantlingMain(data)
message.success(t('common.createSuccess'))
} else {
await DismantlingMainApi.updateDismantlingMain(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, 'basicDismantlingMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await DismantlingMainApi.deleteDismantlingMain(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 DismantlingMainApi.exportDismantlingMain(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 DismantlingMainApi.importTemplate()
})
</script>

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

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

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

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

97
src/views/mes/pattern/pattern.data.ts

@ -1,9 +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 {PatternType} from "@/views/mes/patternType/patternType.data";
import * as PatternTypeApi from "@/api/mes/patternType";
import {validateInteger} from '@/utils/validator'
// 表单校验 // 表单校验
export const PatternRules = reactive({ export const PatternRules = reactive({
concurrencyStamp: [required], code: [required],
name: [required],
partternName: [required],
}) })
export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
@ -112,6 +117,23 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'partternName', field: 'partternName',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '模具类型', // 查询弹窗标题
searchAllSchemas: PatternType.allSchemas, // 查询弹窗所需类
searchField: 'name', // 查询弹窗赋值字段
searchPage: PatternTypeApi.getPatternTypePage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'status',
value: '1',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
}, },
{ {
label: '产品编码', label: '产品编码',
@ -124,12 +146,47 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'dateUseStart', field: 'dateUseStart',
sort: 'custom', sort: 'custom',
isSearch: true, 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')]
}
},
formatter: dateFormatter,
isForm: true,
form: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'datetime',
valueFormat: 'x'
}
},
}, },
{ {
label: '停用时间', label: '停用时间',
field: 'dateUseStop', field: 'dateUseStop',
sort: 'custom', sort: 'custom',
isSearch: true, 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')]
}
},
formatter: dateFormatter,
isForm: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
}, },
{ {
label: '模具来源', label: '模具来源',
@ -148,18 +205,56 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'initCout', field: 'initCout',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'InputNumber',
componentProps: {
min: 1
}
},
}, },
{ {
label: '有效期开始时间', label: '有效期开始时间',
field: 'effectStart', field: 'effectStart',
sort: 'custom', sort: 'custom',
isSearch: true, 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')]
}
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
}, },
{ {
label: '有效期结束时间', label: '有效期结束时间',
field: 'effectEnd', field: 'effectEnd',
sort: 'custom', sort: 'custom',
isSearch: true, 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')]
}
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
}, },
{ {
label: '所属单位编码', label: '所属单位编码',

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

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

18
src/views/qms/basicDataManage/inspectionPlan/addForm.vue

@ -47,9 +47,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检验类型编码" prop="testTypeCode"> <el-form-item label="检验类型" prop="testTypeCode">
<div style="display: flex; width: 100%"> <!-- <div style="display: flex; width: 100%">
<el-input v-model="data.testTypeName" disabled placeholder="请选择检验类型编码" /> <el-input v-model="data.testTypeName" disabled placeholder="请选择检验类型" />
<el-button <el-button
type="info" type="info"
plain plain
@ -69,7 +69,15 @@
" "
><Icon icon="ep:search" /> ><Icon icon="ep:search" />
</el-button> </el-button>
</div> </div> -->
<el-select v-model="data.testTypeCode" placeholder="请选择检验类型">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -878,8 +886,6 @@ const validateForm = (formRef) => {
const submitForm = async () => { const submitForm = async () => {
try { try {
const validateForm1 = await validateForm(formProcessRef.value) const validateForm1 = await validateForm(formProcessRef.value)
console.log(validateForm1)
console.log(data.value)
await formMainRef.value.validate() await formMainRef.value.validate()
if (!data.value.process || data.value.process.length == 0) { if (!data.value.process || data.value.process.length == 0) {
message.error(`请添加工序`) message.error(`请添加工序`)

116
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -25,6 +25,45 @@
<el-input v-model="data.version" placeholder="请填写版本" /> <el-input v-model="data.version" placeholder="请填写版本" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="data.dynamicUpdateName"
disabled
placeholder="请选择动态修改规则编码"
/>
<el-button
type="info"
plain
style="width: 40px"
@click="
opensearchTable(
'dynamicUpdateCode',
null,
'动态修改规则编码',
DynamicRule.allSchemas,
DynamicRuleApi.getDynamicRulePage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
data
)
"
><Icon icon="ep:search"
/></el-button>
</div>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-tabs <el-tabs
@ -85,6 +124,7 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="small-title">检验特性</div> <div class="small-title">检验特性</div>
@ -146,11 +186,11 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="采样过程编码" label="采样过程编码"
prop="inspectionCharacteristicsBaseVO.inspectionMethod" prop="inspectionCharacteristicsBaseVO.samplingProcessCode"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionName" v-model="item.inspectionCharacteristicsBaseVO.samplingProcessName"
disabled disabled
placeholder="请选择采样过程编码" placeholder="请选择采样过程编码"
/> />
@ -160,7 +200,7 @@
style="width: 40px" style="width: 40px"
@click=" @click="
opensearchTable( opensearchTable(
'inspectionMethod', 'samplingProcessCode',
null, null,
'采样过程编码', '采样过程编码',
SamplingProcess.allSchemas, SamplingProcess.allSchemas,
@ -182,45 +222,7 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionCharacteristicsBaseVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.dynamicUpdateName"
disabled
placeholder="请选择动态修改规则编码"
/>
<el-button
type="info"
plain
style="width: 40px"
@click="
opensearchTable(
'dynamicUpdateCode',
null,
'动态修改规则编码',
DynamicRule.allSchemas,
DynamicRuleApi.getDynamicRulePage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
'features',
item
)
"
><Icon icon="ep:search"
/></el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="是否允许修改特征值" label="是否允许修改特征值"
@ -353,7 +355,7 @@
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName"
disabled disabled
placeholder="请选择选择集编码" placeholder="请选择选择集编码"
/> />
@ -376,7 +378,7 @@
} }
], ],
false, false,
null, 'features',
item item
) )
" "
@ -474,6 +476,7 @@ const data = ref({
code: '', code: '',
description: '', description: '',
version: '', version: '',
dynamicUpdateCode:'',
process: [] process: []
}) })
@ -499,12 +502,12 @@ const rules = ref({
'inspectionCharacteristicsBaseVO.inspectionMethodCode': [ 'inspectionCharacteristicsBaseVO.inspectionMethodCode': [
{ required: true, message: '请选择检验方法编码', trigger: 'blur' } { required: true, message: '请选择检验方法编码', trigger: 'blur' }
], ],
'inspectionCharacteristicsBaseVO.dynamicUpdateCode': [ dynamicUpdateCode: [
{ required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] }
],
'inspectionCharacteristicsBaseVO.inspectionMethod': [
{ required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } { required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] }
], ],
'inspectionCharacteristicsBaseVO.samplingProcessCode': [
{ required: true, message: '请选择采样过程', trigger: ['blur', 'change'] }
],
'inspectionCharacteristicsBaseVO.resultEntryMethod': [ 'inspectionCharacteristicsBaseVO.resultEntryMethod': [
{ required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } { required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] }
], ],
@ -617,13 +620,13 @@ const buttonBaseClick1 = (val) => {
description: nameForm.value.name, description: nameForm.value.name,
name: newTabName, name: newTabName,
inspectionCode: '', inspectionCode: '',
dynamicUpdateCode:'',
sequenceCode: '', sequenceCode: '',
inspectionCharCode: '', inspectionCharCode: '',
inspectionCharacteristicsBaseVO: { inspectionCharacteristicsBaseVO: {
describe: '', describe: '',
inspectionMethodCode: '', inspectionMethodCode: '',
dynamicUpdateCode: '', samplingProcessCode: '',
inspectionMethod: '',
isCanUpdate: '', isCanUpdate: '',
isDestructionInspection: '', isDestructionInspection: '',
resultEntryMethod: '', resultEntryMethod: '',
@ -821,10 +824,15 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
row.inspectionCharacteristicsBaseVO[formField] = val[0].code row.inspectionCharacteristicsBaseVO[formField] = val[0].code
if(formField == 'inspectionMethodCode'){ if(formField == 'inspectionMethodCode'){
row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description
}else if(formField == 'dynamicUpdateCode'){ }else if(formField == 'samplingProcessCode'){
row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description row.inspectionCharacteristicsBaseVO.samplingProcessName = val[0].description
}else if(formField == 'inspectionMethod'){ }else if(formField == 'quantifyQuantifyCode'){
row.inspectionCharacteristicsBaseVO.inspectionName = val[0].description row.inspectionCharacteristicsBaseVO.quantifyQuantifyName = val[0].description
}
}else{
if(formField == 'dynamicUpdateCode'){
data.value[formField] = val[0].code
data.value.dynamicUpdateName = val[0].description
} }
} }

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

@ -20,7 +20,6 @@
/> />
<el-tabs <el-tabs
v-model="editableTabsValue" v-model="editableTabsValue"
editable
class="demo-tabs" class="demo-tabs"
@edit="handleTabsEdit" @edit="handleTabsEdit"
type="border-card" type="border-card"
@ -38,7 +37,11 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="编码" prop="processCode"> <el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> <el-input
v-model="item.processCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -52,12 +55,12 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="描述" prop="processDescribe"> <el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" /> <el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode"> <el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" /> <el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -84,39 +87,45 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description"> <el-form-item
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" /> label="描述"
prop="inspectionJobCharacteristicsUpdateReqVO.description"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.description"
:disabled="true"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="检验方法" label="检验方法"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName"
disabled disabled
placeholder="请选择检验方法" placeholder="请选择检验方法"
/> />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="采样过程编码" label="采样过程编码"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName" v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName"
disabled disabled
placeholder="请选择采样过程编码" placeholder="请选择采样过程编码"
/> />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item <el-form-item
label="动态修改规则编码" label="动态修改规则编码"
prop="inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode" prop="inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode"
@ -129,7 +138,7 @@
/> />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="是否允许修改特征值" label="是否允许修改特征值"
@ -149,7 +158,7 @@
<el-select <el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式" placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)" @change="resultEntryMethodChange($event, item)"
disabled disabled
> >
<el-option <el-option
@ -164,14 +173,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> <el-form-item
label="特征类型"
prop="inspectionJobCharacteristicsUpdateReqVO.featureType"
>
<el-select <el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType"
placeholder="请选择特征类型" placeholder="请选择特征类型"
@change="changeFeatureType" @change="changeFeatureType"
disabled disabled
> >
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" <el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -179,17 +194,65 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="border: 1px solid #dedede ;border-radius: 4px ;padding-top: 16px;margin-bottom: 10px" v-for="(cur,key) in item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="key"> <el-col :span="12">
<el-form-item
label="开始时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结束时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<el-col
:span="24"
style="
border: 1px solid #dedede;
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
.recordInspectionQuantifyList"
:key="i"
>
<el-row> <el-row>
<!-- 汇总录入的时候显示 --> <!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> <el-col
<el-form-item label="合格数量" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> :span="12"
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量"/> v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> <el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="不合格数量"> <el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" placeholder="请输入不合格数量"/> <el-input
v-model="cur.unqualifiedQuantity"
placeholder="请输入不合格数量"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 手动评估的时候显示 --> <!-- 手动评估的时候显示 -->
@ -198,43 +261,54 @@
<el-select <el-select
v-model="cur.estimateCode" v-model="cur.estimateCode"
placeholder="请选择评估代码" placeholder="请选择评估代码"
@change="changeFeatureType"> @change="changeFeatureType"
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.EVALUATION_CODE  )" >
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value"/> :value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"> <el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item label="检验值" prop="inspectionValue"> <el-form-item label="检验值" prop="inspectionValue">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值"/> <el-input v-model="cur.inspectionValue" placeholder="请输入检验值" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1"> <el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1"
>
<el-form-item label="选定集" prop="qualitativeCode"> <el-form-item label="选定集" prop="qualitativeCode">
<el-select <el-select
v-model="cur.qualitativeCode" v-model="cur.qualitativeCode"
placeholder="请选择选定集" placeholder="请选择选定集"
@change="changeQualitativeCode($event,item,cur)"> @change="changeQualitativeCode($event, item, cur)"
<el-option v-for="dict in item.selectedProjectRespVOList" >
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue" :key="dict.dictionaryValue"
:label="dict.dictionaryLabel" :label="dict.dictionaryLabel"
:value="dict.dictionaryValue"/> :value="dict.dictionaryValue"
/>
</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.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="缺陷级别"> <el-form-item label="缺陷级别">
<el-select <el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
v-model="cur.defectLevel" <el-option
placeholder="请选择缺陷级别" v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value"/> :value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -292,6 +366,8 @@ import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule
import * as SelectedSetApi from '@/api/qms/selectedSet' // import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' // import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
const { proxy } = getCurrentInstance()
const message = useMessage() // const message = useMessage() //
const props = defineProps({ const props = defineProps({
@ -330,12 +406,12 @@ const props = defineProps({
required: true, required: true,
default: null default: null
}, },
// rules // rules
rules: { rules: {
type: Object, type: Object,
required: true, required: true,
default: null default: null
}, }
}) })
const { t } = useI18n() // const { t } = useI18n() //
@ -376,7 +452,7 @@ if (props.basicFormWidth) {
} }
const rules = ref({ const rules = ref({
...props.rules, ...props.rules,
'inspectionJobCharacteristicsUpdateReqVO.description': [ 'inspectionJobCharacteristicsUpdateReqVO.description': [
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } { required: true, message: '请填写描述', trigger: ['blur', 'change'] }
], ],
'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [
@ -410,63 +486,20 @@ const rules = ref({
{ required: true, message: '请输入小数位', trigger: 'blur' } { required: true, message: '请输入小数位', trigger: 'blur' }
], ],
'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [ 'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [
{ required: true, message: '请输入选择集编码', trigger: 'blur' } { required: true, message: '请输入选择集编码', trigger: 'change' }
] ],
'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [
{ required: true, message: '请输入选择开始时间', trigger: 'change' }
],
'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [
{ required: true, message: '请输入选择结束时间', trigger: 'blur' }
],
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }]
}) })
// const rules = ref({
// itemCode: [{ required: true, message: '', trigger: 'blur' }],
// version: [{ required: true, message: '', trigger: 'blur' }],
// testTypeCode: [{ required: true, message: '', trigger: ['blur', 'change'] }],
// programmeTemplateCode: [
// { required: true, message: '', trigger: ['blur', 'change'] }
// ],
// splitRule: [{ required: true, message: '', trigger: ['blur', 'change'] }],
// aql: [{ required: true, message: 'aql', trigger: ['blur', 'change'] }],
// inspectionLevel: [{ required: true, message: '', trigger: ['blur', 'change'] }],
// effectiveDate: [{ required: true, message: '', trigger: ['blur', 'change'] }],
// expirationDate: [{ required: true, message: '', trigger: ['blur', 'change'] }],
// 'inspectionJobCharacteristicsUpdateReqVO.description': [
// { required: true, message: '', trigger: ['blur', 'change'] }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [
// { required: true, message: '', trigger: 'blur' }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode': [
// { required: true, message: '', trigger: ['blur', 'change'] }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethod': [
// { required: true, message: '', trigger: ['blur', 'change'] }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod': [
// { required: true, message: '', trigger: ['blur', 'change'] }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.featureType': [
// { required: true, message: '', trigger: ['blur', 'change'] }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyTarget': [
// { required: true, message: '', trigger: 'blur' }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyCapping': [
// { required: true, message: '', trigger: 'blur' }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit': [
// { required: true, message: '', trigger: 'blur' }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyUom': [
// { required: true, message: '', trigger: 'blur' }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyDecimal': [
// { required: true, message: '', trigger: 'blur' }
// ],
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [
// { required: true, message: '', trigger: 'blur' }
// ]
// })
/** 打开弹窗 */ /** 打开弹窗 */
let tabIndex = 1 let tabIndex = 1
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
dialogVisible.value = true
if (titleName) { if (titleName) {
dialogTitle.value = t('action.' + titleName) dialogTitle.value = t('action.' + titleName)
} else { } else {
@ -482,31 +515,33 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
editableTabsValue.value = index + 1 editableTabsValue.value = index + 1
item.name = index + 1 item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[] // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) { // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for(let i=0;i<data.value.sampleTotalAmount;i++){ for (let i = 0; i < parseInt(data.value.sampleTotalAmount); i++) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue:'',// inspectionValue: '', //
qualitativeCode:'',// qualitativeCode: '', //
estimateCode:'',// estimateCode: '', //
defectLevel:'',// defectLevel: '', //
qualifiedQuantity:'',// qualifiedQuantity: '', //
unqualifiedQuantity:'',// unqualifiedQuantity: '' //
}) })
} }
} else { } else {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
inspectionValue:'',// // item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
qualitativeCode:'',// // inspectionValue: '', //
estimateCode:'',// // qualitativeCode: '', //
defectLevel:'',// // estimateCode: '', //
qualifiedQuantity:'',// // defectLevel: '', //
unqualifiedQuantity:'',// // qualifiedQuantity: '', //
}] // unqualifiedQuantity: '' //
} // }
// )
}
// //
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
@ -525,7 +560,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
} }
}) })
data.value.subList = list data.value.subList = list
formMainRef.value.setValues(row)
dialogVisible.value = true
nextTick(() => {
formMainRef.value.setValues(row)
})
} else { } else {
data.value = { data.value = {
code: '', code: '',
@ -542,7 +581,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
subList: [] subList: []
} }
} }
dialogVisible.value = true
tabIndex = data.value.subList.length + 1 tabIndex = data.value.subList.length + 1
} }
defineExpose({ open, dialogVisible, formLoading }) // open defineExpose({ open, dialogVisible, formLoading }) // open
@ -647,32 +686,74 @@ const validateForm = (formRef) => {
const submitForm = async () => { const submitForm = async () => {
try { try {
const validateForm1 = await validateForm(formProcessRef.value) console.log(data.value.subList)
// console.log(validateForm1) // const validateForm1 = await validateForm(formMainRef.value)
// await formMainRef.value.validate() const elForm = unref(formMainRef)?.getElFormRef()
// if (!data.value.process || data.value.process.length == 0) { //
// message.error(``) if (!elForm) return
// return const valid = await elForm.validate()
// } if (!valid) return
// const bol1 = await validateForm(formProcessRef.value) // const bol1 = await validateForm(formProcessRef.value)
// const bol2 = await validateForm(formFeaturesRef.value) const bol2 = await validateForm(formFeaturesRef.value)
// if (!bol1 || !bol2) { if (!bol2) {
// message.error(``) message.error(`模板中有检验工序和检验特性未填写完全`)
// return return
// } }
// const arr = data.value.process.filter( //
// (item) => let arrBol = []
// !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && let isOutweigh = []//
// !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && data.value.subList.forEach((item, index) => {
// !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
// item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 arrBol.push(
// ) item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
// console.log(arr) (cur, key) => {
// if (arr && arr.length > 0) { return !cur.qualifiedQuantity || !cur.unqualifiedQuantity
// const str = arr.map((item) => item.description).join(',') }
// message.error(`${str}线,,`) )
// return )
// } }
if (item.samplingProcessRespVO.evaluationMode == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.estimateCode || !cur.defectLevel
}
)
)
}
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.inspectionValue
}
)
)
}
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.qualitativeCode
}
)
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
})
let isEmpty1 = arrBol.some(item=>item == true)
if(isEmpty1){
message.error('检验工序和检验特性有字段未填写完全')
return;
}
if(isOutweigh.length>0){
message.error('检验特性中有开始时间大于结束时间')
return;
}
return;
if (formType.value == 'create') { if (formType.value == 'create') {
// //
emit('submitForm', formType.value, data.value) emit('submitForm', formType.value, data.value)
@ -781,22 +862,22 @@ const opensearchTable = (
// //
// val row // val row
const searchTableSuccess = async (formField, searchField, val, type, row) => { const searchTableSuccess = async (formField, searchField, val, type, row) => {
if(type == 'features'){ if (type == 'features') {
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code
if(formField == 'inspectionMethodCode'){ if (formField == 'inspectionMethodCode') {
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description
}else if(formField == 'dynamicUpdateCode'){ } else if (formField == 'dynamicUpdateCode') {
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description
}else if(formField == 'inspectionMethod'){ } else if (formField == 'inspectionMethod') {
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description
} }
} else if(type == 'main'){ } else if (type == 'main') {
data.value[formField] = val[0].code data.value[formField] = val[0].code
if(formField == 'itemCode'){ if (formField == 'itemCode') {
data.value.itemName = val[0].name data.value.itemName = val[0].name
}else if(formField == 'testTypeCode'){ } else if (formField == 'testTypeCode') {
data.value.testTypeName = val[0].description data.value.testTypeName = val[0].description
}else if(formField == 'programmeTemplateCode'){ } else if (formField == 'programmeTemplateCode') {
data.value.programmeTemplateName = val[0].description data.value.programmeTemplateName = val[0].description
} }
if (formField == 'programmeTemplateCode') { if (formField == 'programmeTemplateCode') {
@ -813,7 +894,8 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true
} else { } else {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required =
false
} }
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true
@ -828,36 +910,38 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) // emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
} }
// //
const resultEntryMethodChange = (e,item) => { const resultEntryMethodChange = (e, item) => {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList =[] item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
if (e==0) { if (e == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
for(let i=0;i<data.value.sampleTotalAmount;i++){ for (let i = 0; i < data.value.sampleTotalAmount; i++) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue:'',// inspectionValue: '', //
qualitativeCode:'',// qualitativeCode: '', //
estimateCode:'',// estimateCode: '', //
defectLevel:'',// defectLevel: '', //
qualifiedQuantity:'',// qualifiedQuantity: '', //
unqualifiedQuantity:'',// unqualifiedQuantity: '' //
}) })
} }
} else { } else {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [
inspectionValue:'',// {
qualitativeCode:'',// inspectionValue: '', //
estimateCode:'',// qualitativeCode: '', //
defectLevel:'',// estimateCode: '', //
qualifiedQuantity:'',// defectLevel: '', //
unqualifiedQuantity:'',// qualifiedQuantity: '', //
}] unqualifiedQuantity: '' //
}
]
} }
console.log(222,item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
} }
// //
const changeQualitativeCode= (e,item,cur)=>{ const changeQualitativeCode = (e, item, cur) => {
let obj = item.selectedProjectRespVOList.find(cur=>cur.dictionaryValue==e) let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
console.log(obj) console.log(obj)
cur.defectLevel = obj.defectLevel cur.defectLevel = obj.defectLevel
} }

310
src/views/qms/inspection/inspectionJob/detail.vue

@ -0,0 +1,310 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="data"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<ContentWrap>
<el-tabs
v-model="editableTabsValue"
class="demo-tabs"
type="border-card"
tab-position="left"
:stretch="false"
>
<el-tab-pane
v-for="item in data.subList"
:key="item.name"
:label="item.processCode"
:name="item.name"
>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方案模板编码">
<el-input
v-model="item.inspectionCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编码">
<el-input
v-model="item.inspectionCharCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.description" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName"
disabled
placeholder="请选择检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程编码"
prop="inspectionJobCharacteristicsRespVO.inspectionMethod"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.inspectionName"
disabled
placeholder="请选择采样过程编码"
/>
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionJobCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请选择动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionJobCharacteristicsRespVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionJobCharacteristicsRespVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionJobCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionJobCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsRespVO.inspectionEndTime">
<el-date-picker
v-model="item.inspectionJobCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</ContentWrap>
</el-drawer>
</div>
</template>
<script lang="ts" setup>
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'Detail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
})
data.value.subList = list
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

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

@ -27,48 +27,43 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<!-- <BasicForm ref="formRef" @success="getList" :rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas" :tableAllSchemas="InspectionJobDetail.allSchemas"
:tableFormRules="InspectionJobDetailRules" :tableData="tableData"
:apiUpdate="InspectionJobMainApi.updateInspectionJobMain" :apiCreate="InspectionJobMainApi.createInspectionJobMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> -->
<AddForm <AddForm
ref="basicFormRef" ref="basicFormRef"
basicFormWidth="80" basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas" :formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas" :formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas" :formAllSchemasMain="InspectionTemplateMain.allSchemas"
:rules="InspectionTemplateRules" :rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas" :formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm" @submitForm="submitForm"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas" <Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules" :detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail" :apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail" :apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage" :apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true" /> :isShowAddBtn="false" :detailButtonIsShow="true"
/>
<!-- 导入 --> <!-- 包装信息 -->
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData" <listTable ref="listTableRef" titleName="包装信息"/>
@success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules } from './inspectionJobMain.data' import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data'
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 InspectionJobPackageApi from '@/api/qms/inspectionJob/inspectionJobPackage'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
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 AddForm from './addForm.vue' import AddForm from './addForm.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan' import Detail from './detail.vue'
// //
defineOptions({ name: 'InspectionJobMain' }) defineOptions({ name: 'InspectionJobMain' })
@ -130,19 +125,9 @@
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
] ]
// //
@ -177,13 +162,17 @@
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'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListPackageBtn({hide:isShowMainButton(row,['2'])}), //
] ]
} }
const listTableRef = ref()
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') { //
execute('execute', row) execute('execute', row)
}else if (val == 'mainPackage') { //
const list = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
} }
else if (val == 'mainJobClo') { // else if (val == 'mainJobClo') { //
handleDelete(row.id) handleDelete(row.id)
@ -230,7 +219,7 @@
// //
exportLoading.value = true exportLoading.value = true
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params) const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
download.excel(data, '备件申领记录主.xlsx') download.excel(data, '检验任务.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -246,14 +235,6 @@
}) })
const tableData = ref([]) const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
@ -281,16 +262,6 @@
importFormRef.value.open() importFormRef.value.open()
} }
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购订单主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {

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

@ -3,6 +3,16 @@ import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator' import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)
const featureTypeList = getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )
const isCanUpdateList = [{
label:'是',
value:true
},{
label:'否',
value:false
}]
/** /**
* @returns {Array} * @returns {Array}
@ -166,6 +176,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionType', field: 'inspectionType',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
form: { form: {
component: 'Select', component: 'Select',
componentProps:{ componentProps:{
@ -178,6 +190,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionBatchSource', field: 'inspectionBatchSource',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
dictType: DICT_TYPE.INSPECTION_BATCH_SOURCE,
dictClass: 'string',
form:{ form:{
componentProps:{ componentProps:{
disabled:true disabled:true
@ -202,6 +216,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionStringency', field: 'inspectionStringency',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
dictType: DICT_TYPE.INSPECTION_SEVERITY,
dictClass: 'string',
form:{ form:{
componentProps:{ componentProps:{
disabled:true disabled:true
@ -281,6 +297,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionLevel', field: 'inspectionLevel',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
form:{ form:{
componentProps:{ componentProps:{
disabled:true disabled:true
@ -292,33 +310,44 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'aqlValue', field: 'aqlValue',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
form:{ form:{
componentProps:{ componentProps:{
disabled:true disabled:true
} }
} }
}, },
{ // {
label: '使用决策', // label: '使用决策',
field: 'usageDecision', // field: 'usageDecision',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION, // dictType: DICT_TYPE.USAGE_DECISION,
form:{ // form:{
componentProps:{ // componentProps:{
} // }
} // }
}, // },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
isSearch: false, table: {
form:{ width: 150
componentProps:{ },
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled:true disabled:true
} }
} },
}, },
{ {
label: '操作', label: '操作',
@ -334,28 +363,11 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const InspectionJobMainRules = reactive({ export const InspectionJobMainRules = reactive({
number: [required], // usageDecision: [required],
inspectionCode: [required],
supplierCode: [required],
materialCode: [required],
materialBatch: [required],
orderCode: [required],
certificateRow: [required],
inspectionSchemeCode: [required],
inspectionSchemeJson: [required],
inspectionBatch: [required],
inspectionBatchAmount: [required],
sampleTatalAmount: [required],
inspectionType: [required],
inspectionBatchSource: [required],
inspectionStage: [required],
inspectionStringency: [required],
inspectionLevel: [required],
available: [required],
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
@ -407,24 +419,35 @@ export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
},{ },{
label: '采样过程编码', label: '采样过程编码',
field: 'inspectionMethod', field: 'inspectionJobCharacteristicsRespVO.inspectionMethod',
sort: 'custom', sort: 'custom',
},{ },{
label: '动态修改规则编码', label: '动态修改规则编码',
field: 'dynamicUpdateCode', field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode',
sort: 'custom', sort: 'custom',
},{ },{
label: '是否允许修改特征值', label: '是否允许修改特征值',
field: 'inspectionJobCharacteristicsRespVO.isCanUpdate', field: 'inspectionJobCharacteristicsRespVO.isCanUpdate',
sort: 'custom', sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return isCanUpdateList.find((account) => account.value == cellValue)?.label
},
},{ },{
label: '结果录入方式', label: '结果录入方式',
field: 'resultEntryMethod', field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod',
sort: 'custom', sort: 'custom',
// dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY,
// dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return resultEntryMethodList.find((account) => account.value == cellValue)?.label
},
},{ },{
label: '特征类型', label: '特征类型',
field: 'featureType', field: 'inspectionJobCharacteristicsRespVO.featureType',
sort: 'custom', sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return featureTypeList.find((account) => account.value == cellValue)?.label
},
} }
])) ]))
@ -435,3 +458,42 @@ export const InspectionJobDetailRules = reactive({
sequenceCode: [required], sequenceCode: [required],
available: [required], available: [required],
}) })
/**
* @returns {Array}
*/
export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
},
]))

310
src/views/qms/inspection/inspectionRecord/detail.vue

@ -0,0 +1,310 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="data"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<ContentWrap>
<el-tabs
v-model="editableTabsValue"
class="demo-tabs"
type="border-card"
tab-position="left"
:stretch="false"
>
<el-tab-pane
v-for="item in data.subList"
:key="item.name"
:label="item.processCode"
:name="item.name"
>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方案模板编码">
<el-input
v-model="item.inspectionCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编码">
<el-input
v-model="item.inspectionCharCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.description" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName"
disabled
placeholder="请选择检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程编码"
prop="inspectionJobCharacteristicsRespVO.inspectionMethod"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.inspectionName"
disabled
placeholder="请选择采样过程编码"
/>
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionJobCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请选择动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionJobCharacteristicsRespVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionJobCharacteristicsRespVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionJobCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionJobCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsRespVO.inspectionEndTime">
<el-date-picker
v-model="item.inspectionJobCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</ContentWrap>
</el-drawer>
</div>
</template>
<script lang="ts" setup>
import * as InspectionRecordDetailPageApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'InspectionRecordDetail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
})
data.value.subList = list
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

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

@ -35,27 +35,37 @@
@handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas" <!-- <Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordDetail.allSchemas" :detailAllSchemasRules="InspectionRecordDetailRules" :detailAllSchemas="InspectionRecordDetail.allSchemas" :detailAllSchemasRules="InspectionRecordDetailRules"
:apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail" :apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail"
:apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail" :apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail"
:apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage" :apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage"
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" :apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" :isShowAddBtn="false" :detailButtonIsShow="true" /> @searchTableSuccessDetail="searchTableSuccessDetail" :isShowAddBtn="false" :detailButtonIsShow="true" /> -->
<Detail
<!-- 导入 --> ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas"
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData" :detailAllSchemas="InspectionRecordDetail.allSchemas" :detailAllSchemasRules="InspectionRecordDetailRules"
@success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> :apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail"
:apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail"
:apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage"
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true"
/>
<!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules } from './inspectionRecordMain.data' import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules } from './inspectionRecordMain.data'
import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
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 * as InspectionJobPackageApi from '@/api/qms/inspectionJob/inspectionJobPackage'
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 Detail from './detail.vue'
// //
defineOptions({ name: 'InspectionRecordMain' }) defineOptions({ name: 'InspectionRecordMain' })
@ -161,18 +171,38 @@
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(null), //
// defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn(null), //
] ]
} }
const listTableRef = ref()
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
// 1使
if(row.estimateCode == 1){
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) =>{
if(itemColumn.field == "useDecision"){
itemColumn.componentProps.options=itemColumn.componentProps.options?.filter(item=>item.value==1)
}
})
}else if(row.estimateCode == 2){
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) =>{
if(itemColumn.field == "useDecision"){
itemColumn.componentProps.options=itemColumn.componentProps.options?.filter(item=>item.value!=1)
}
})
}
openForm('update', row) openForm('update', row)
} }else if (val == 'mainPackage') { //
else if (val == 'delete') { // const list = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
}else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'mainOrderPub') { //
handleOrderPub(row)
} }
} }
@ -201,6 +231,20 @@
await getList() await getList()
} catch { } } catch { }
} }
/** 发布按钮操作 */
const handleOrderPub = async (row : object) => {
try {
//
await message.confirm('是否发布所选数据')
//
await InspectionRecordMainApi.publishInspectionRecordMain(row)
message.success('发布成功')
//
await getList()
} catch { }
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
@ -243,7 +287,7 @@
if (formType === 'create') { if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data) await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { }else {
await InspectionRecordMainApi.updateInspectionRecordMain(data) await InspectionRecordMainApi.updateInspectionRecordMain(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
@ -284,6 +328,5 @@
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await InspectionRecordMainApi.importTemplate()
}) })
</script> </script>

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

@ -13,72 +13,84 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false
}, },
{ {
label: '申请编码', label: '申请编码',
field: 'applicationCode', field: 'applicationCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false
}, },
{ {
label: '任务编码', label: '任务编码',
field: 'taskCode', field: 'taskCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '供应商编码', label: '供应商编码',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '物料编码', label: '物料编码',
field: 'materialCode', field: 'materialCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验方案编码', label: '检验方案编码',
field: 'inspectionSchemeCode', field: 'inspectionSchemeCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验方案Json', label: '检验方案Json',
field: 'inspectionSchemeJson', field: 'inspectionSchemeJson',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验批次', label: '检验批次',
field: 'inspectionBatch', field: 'inspectionBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验批数量', label: '检验批数量',
field: 'inspectionBatchAmount', field: 'inspectionBatchAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '采样总数量', label: '采样总数量',
field: 'sampleTatalAmount', field: 'sampleTatalAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验类型', label: '检验类型',
field: 'inspectionType', field: 'inspectionType',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'Select' component: 'Select'
}, },
@ -88,18 +100,21 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionBatchSource', field: 'inspectionBatchSource',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '订单号', label: '订单号',
field: 'orderCode', field: 'orderCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '订单行', label: '订单行',
field: 'orderRow', field: 'orderRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -110,12 +125,14 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'certificateCode', field: 'certificateCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '凭证行', label: '凭证行',
field: 'certificateRow', field: 'certificateRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -126,6 +143,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionStage', field: 'inspectionStage',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -136,12 +154,14 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionStringency', field: 'inspectionStringency',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
}, },
{ {
label: '使用决策', label: '使用决策',
field: 'useDecision', field: 'useDecision',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '计划开始时间', label: '计划开始时间',
@ -149,6 +169,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -171,6 +192,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -193,6 +215,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -215,6 +238,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -236,18 +260,29 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionLevel', field: 'inspectionLevel',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
}, },
{ {
label: 'AQL值', label: 'AQL值',
field: 'aqlValue', field: 'aqlValue',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
}, },
{ {
label: '创建时间', label: '创建时间',

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

@ -42,6 +42,13 @@
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="formsSuccess" @success="formsSuccess"
:sumFormDataByForm ="(formRef,formModel)=>{
console.log(formModel)
const {videoAddress} = formModel
formRef.value.setValues({
installPackageUrl:videoAddress
})
}"
:rules="InspectionMethodRules" :rules="InspectionMethodRules"
:formAllSchemas="InspectionMethod.allSchemas" :formAllSchemas="InspectionMethod.allSchemas"
:apiUpdate="InspectionMethodApi.updateInspectionMethod" :apiUpdate="InspectionMethodApi.updateInspectionMethod"
@ -149,26 +156,48 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
// debugger
console.log(row)
if(row && row.videoAddress.trim()){
row.filePathList = row.videoAddress.split(',')
}
if (row && row.filePathList && row.filePathList.length > 0) {
row.filePathListView = row.filePathList.map((item) => {
return {
name: item,
url: item
}
})
}
if(type=='create'){
const currentTime = new Date().getTime()
const fileId = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='fileId')
const uploadFile = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='videoAddress')
if(fileId){
fileId['value'] = currentTime
}
if(uploadFile){
uploadFile['componentProps']['upData']['tableId'] = currentTime
uploadFile['componentProps']['modelValue']= []
}
}else if(type=='update'){
const uploadFile = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='videoAddress')
uploadFile['componentProps']['modelValue']= row.filePathListView
}
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
var isHave =InspectionMethod.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') { if (formType === 'create') {
delete data['uploadFile']
await InspectionMethodApi.createInspectionMethod(data) await InspectionMethodApi.createInspectionMethod(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
// debugger
await InspectionMethodApi.updateInspectionMethod(data) await InspectionMethodApi.updateInspectionMethod(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }

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

@ -5,6 +5,7 @@ import { dateFormatter } from '@/utils/formatTime'
export const InspectionMethodRules = reactive({ export const InspectionMethodRules = reactive({
code: [required], code: [required],
available: [required], available: [required],
description: [required],
}) })
export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
@ -36,11 +37,6 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
field: 'operationGuidance', field: 'operationGuidance',
sort: 'custom', sort: 'custom',
}, },
{
label: '视频地址',
field: 'videoAddress',
sort: 'custom',
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
@ -51,6 +47,26 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
component: 'SelectV2' component: 'SelectV2'
}, },
}, },
{
label: '文件',
field: 'videoAddress',
sort: 'custom',
isTable: false,
table: {
},
form: {
component: 'UploadFile',
componentProps: {
upData:{
tableName:'basicInspectionMethod',
tableId:'',
},
fileType:['doc', 'xls', 'ppt', 'txt'],
modelValue:[]
},
}
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -66,5 +82,5 @@ export const InspectionMethod = useCrudSchemas(reactive<CrudSchema[]>([
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} }
} },
])) ]))

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

@ -7,6 +7,7 @@ export const SamplingProcessRules = reactive({
sampleType: [required], sampleType: [required],
evaluationMode: [required], evaluationMode: [required],
available: [required], available: [required],
description: [required],
}) })
export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([ export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([

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

@ -4,8 +4,8 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const SamplingSchemeRules = reactive({ export const SamplingSchemeRules = reactive({
code: [required], code: [required],
// status: [required],
available: [required], available: [required],
description: [required],
}) })
export const SamplingScheme = useCrudSchemas(reactive<CrudSchema[]>([ export const SamplingScheme = useCrudSchemas(reactive<CrudSchema[]>([

9
src/views/system/systemInstallPackage/index.vue

@ -141,9 +141,14 @@ const openForm = (type: string, row?: any) => {
if('create'==type){ if('create'==type){
const currentTime = new Date().getTime() const currentTime = new Date().getTime()
const fileId = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='fileId') const fileId = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='fileId')
fileId['value'] = currentTime
const uploadFile = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='uploadFile') const uploadFile = SystemInstallPackage.allSchemas.formSchema.find(item=>item.field=='uploadFile')
uploadFile['componentProps']['upData']['tableId'] = currentTime if(fileId){
fileId['value'] = currentTime
}
if(uploadFile){
uploadFile['componentProps']['upData']['tableId'] = currentTime
}
} }
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

13
src/views/system/systemInstallPackage/systemInstallPackage.data.ts

@ -14,6 +14,7 @@ export const SystemInstallPackage = useCrudSchemas(reactive<CrudSchema[]>([
label: 'id', label: 'id',
field: 'id', field: 'id',
sort: 'custom', sort: 'custom',
isForm:false,
}, },
{ {
label: '安装包名称', label: '安装包名称',
@ -25,6 +26,13 @@ export const SystemInstallPackage = useCrudSchemas(reactive<CrudSchema[]>([
label: '安装包版本', label: '安装包版本',
field: 'installPackageVersion', field: 'installPackageVersion',
sort: 'custom', sort: 'custom',
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
}, },
{ {
label: '安装路径', label: '安装路径',
@ -64,6 +72,7 @@ export const SystemInstallPackage = useCrudSchemas(reactive<CrudSchema[]>([
label: '附件id', label: '附件id',
field: 'fileId', field: 'fileId',
sort: 'custom', sort: 'custom',
isForm:false,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true
@ -87,7 +96,9 @@ export const SystemInstallPackage = useCrudSchemas(reactive<CrudSchema[]>([
tableId: '', tableId: '',
tableName: '' tableName: ''
}, },
limit:1 limit:1,
fileType:['apk'],
fileSize:35
} }
}, },
}, },

6
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

@ -341,6 +341,12 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const UnplannedissueRequestMainRules = reactive({ export const UnplannedissueRequestMainRules = reactive({
requestTime: [
{ required: true, message: '请输入申请时间', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请输入截止时间', trigger: 'blur' }
],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],

6
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts

@ -341,6 +341,12 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const UnplannedissueRequestMainRules = reactive({ export const UnplannedissueRequestMainRules = reactive({
requestTime: [
{ required: true, message: '请输入申请时间', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请输入截止时间', trigger: 'blur' }
],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],

32
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -113,6 +113,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from "@/api/wms/itembasic"; import * as ItembasicApi from "@/api/wms/itembasic";
import * as PackageApi from "@/api/wms/package"; import * as PackageApi from "@/api/wms/package";
import { formatTime } from '@/utils/index' import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
// //
defineOptions({ name: 'UnplannedreceiptRequestMain' }) defineOptions({ name: 'UnplannedreceiptRequestMain' })
@ -284,16 +285,17 @@ const butttondata = (row) => {
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedreceipt-request-main:handle'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedreceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:update'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), //
{ {
label: '创建标签', label: '创建标签',
name: 'cjbq', name: 'cjbq',
hide: isShowMainButton(row,['3']), hide: isShowMainButton(row,['3']),
type: 'primary', type: 'primary',
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // link: true, //
}, },
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), //
] ]
} }
@ -322,6 +324,9 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'point') {
//
labelPrint(row)
} else if( val == 'cjbq'){// } else if( val == 'cjbq'){//
// //
let isCreateLabel = false let isCreateLabel = false
@ -643,6 +648,13 @@ const tableFormSelectOnBlur = (field, val, row, index) => {
} }
} }
//
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/936912164754612224?token=' + getAccessToken())
const labelPrint = async (row) => {
window.open(src.value + '&request_number=' + row.number)
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

84
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -1027,6 +1027,90 @@ export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
} }
}, },
{
label: '到货日期',
field: 'arriveDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
disabled:true
}
},
tableForm: {
type: 'FormDate',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
disabled:true
}
},
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
disabled:true
}
},
tableForm: {
type: 'FormDate',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
disabled:true
}
},
{
label: '过期日期',
field: 'expireDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
disabled:true
}
},
tableForm: {
type: 'FormDate',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
disabled:true
}
},
{ {
label: '来源生产线代码', label: '来源生产线代码',
field: 'productionLineCode', field: 'productionLineCode',

3
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts

@ -430,7 +430,8 @@ export const DemandforecastingDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select' type: 'Select',
disabled: true
} }
}, },
{ {

5
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -450,13 +450,10 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: true,
isTable: true, isTable: true,
isTableForm:false,
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled:true,
type: 'Select'
}
}, },
{ {
label: '订单数量', label: '订单数量',

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

@ -520,7 +520,8 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select' type: 'Select',
disabled:false,
} }
}, },
{ {

38
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -251,10 +251,10 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['1',, '2','4']) }), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
{ {
label: '采购审批通过', label: '采购通过',
name: 'purchase_mainPlanSub', name: 'purchase_mainPlanSub',
hide: isShowMainButton(row, ['2','7']), hide: isShowMainButton(row, ['2','7']),
type: 'primary', type: 'primary',
@ -272,7 +272,16 @@
hasPermi: '' hasPermi: ''
}, },
{ {
label: '财务审批通过', label: '供应商确认',
name: 'invoice_sent_out',
hide: isShowMainButton(row, ['8']),
type: 'danger',
color: '',
link: true, //
hasPermi: ''
},
{
label: '财务通过',
name: 'finance_mainPlanSub', name: 'finance_mainPlanSub',
hide: isShowMainButton(row, ['4']), hide: isShowMainButton(row, ['4']),
type: 'primary', type: 'primary',
@ -291,8 +300,8 @@
}, },
// defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // // defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
//defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // //defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','6'])}), // defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','8'])}), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2','4']) }), // defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1','8']) }), //
// //
// { // {
// label: '', // label: '',
@ -326,6 +335,8 @@ const handleImport = () => {
handleApp(row.id) handleApp(row.id)
} else if (val == 'purchase_mainPlanTur') { // } else if (val == 'purchase_mainPlanTur') { //
handleTur(row.id) handleTur(row.id)
} else if (val == 'invoice_sent_out') { //
handleInvoiceSentOut(row.id)
} else if(val == 'finance_mainPlanSub'){ // } else if(val == 'finance_mainPlanSub'){ //
handleFinanceApp(row.id) handleFinanceApp(row.id)
} else if(val == 'finance_mainPlanTur'){ // } else if(val == 'finance_mainPlanTur'){ //
@ -478,6 +489,23 @@ const handleImport = () => {
} }
} }
/** 发票寄出确认按钮操作 */
const handleInvoiceSentOut = async (id : number) => {
try {
//
await message.confirm('是否确认发票寄出选中数据?')
tableObject.loading = true
//
await SupplierinvoiceRequestMainApi.invoiceSentOutSupplierinvoiceRequestMain(id)
message.success(t('发票寄出成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 驳回按钮操作 */ /** 驳回按钮操作 */
const handleFinaceTur = async (id : number) => { const handleFinaceTur = async (id : number) => {
try { try {

310
src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue

@ -0,0 +1,310 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceInvoiced.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceInvoiced.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(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="SupplierinvoiceInvoicedRules"
:formAllSchemas="SupplierinvoiceInvoiced.allSchemas"
:apiUpdate="SupplierinvoiceInvoicedApi.updateSupplierinvoiceInvoiced"
:apiCreate="SupplierinvoiceInvoicedApi.createSupplierinvoiceInvoiced"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="SupplierinvoiceInvoiced.allSchemas" />
<!-- 导入 -->
<!-- <ImportForm ref="importFormRef" url="/wms/supplierinvoice-invoiced/import" :importTemplateData="importTemplateData" @success="importSuccess" /> -->
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SupplierinvoiceInvoiced,SupplierinvoiceInvoicedRules } from './supplierinvoiceInvoiced.data'
import * as SupplierinvoiceInvoicedApi from '@/api/wms/supplierinvoiceInvoiced'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'SupplierinvoiceInvoiced' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierinvoiceInvoiced.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: SupplierinvoiceInvoicedApi.getSupplierinvoiceInvoicedPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:supplierinvoice-invoiced:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:supplierinvoice-invoiced:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-invoiced: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 = (row) =>{
return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}),
{
label: '审核通过',
name: 'agree',
hide: isShowMainButton(row, ['1']),
type: 'primary',
color: '',
link: true, //
hasPermi: ''
},
{
label: '审核拒绝',
name: 'refuse',
hide: isShowMainButton(row, ['1']),
type: 'danger',
color: '',
link: true, //
hasPermi: ''
}
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if(val == 'agree'){
handleAgree(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =SupplierinvoiceInvoiced.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 SupplierinvoiceInvoicedApi.createSupplierinvoiceInvoiced(data)
message.success(t('common.createSuccess'))
} else {
await SupplierinvoiceInvoicedApi.updateSupplierinvoiceInvoiced(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, 'basicSupplierinvoiceInvoiced')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SupplierinvoiceInvoicedApi.deleteSupplierinvoiceInvoiced(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
tableObject.loading = true
//
await SupplierinvoiceInvoicedApi.agreeSupplierinvoiceInvoiced(id)
message.success(t('审批通过成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 审批通过按钮操作 */
const handleRefuse = async (id : number) => {
try {
//
await message.confirm('是否审批拒绝所选中数据?')
tableObject.loading = true
//
await SupplierinvoiceInvoicedApi.refuseSupplierinvoiceInvoiced(id)
message.success(t('审批成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoiced(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 SupplierinvoiceInvoicedApi.importTemplate()
})
</script>

168
src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts

@ -0,0 +1,168 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const SupplierinvoiceInvoicedRules = reactive({
supplierCode: [required],
poNumber: [required],
currency: [required],
concurrencyStamp: [required],
})
export const SupplierinvoiceInvoiced = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '项目编码',
field: 'projectCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '单据类型',
field: 'billType',
sort: 'custom',
form: {
component: 'SelectV2'
},
table: {
width: 150
},
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.SUPPLIERINVOICE_STATUS,
dictClass: 'string',
isTable: true,
isForm:false,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '单据号',
field: 'recvBillNum',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '发货单号',
field: 'asnBillNum',
sort: 'custom',
table: {
width: 150
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
},
{
label: '采购价格',
field: 'purchasePrice',
sort: 'custom',
table: {
width: 150
},
},
{
label: '可开票数量',
field: 'invoicableQuantity',
sort: 'custom',
table: {
width: 150
},
},
{
label: '零件号',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
table: {
width: 150
},
},
{
label: '货币',
field: 'currency',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
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')]
}
},
table: {
width: 150
},
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 200,
fixed: 'right'
}
}
]))
Loading…
Cancel
Save