Browse Source

Merge branch 'master_hella' into intex

syhx
陈薪名 2 months ago
parent
commit
f9beacec98
  1. 4
      src/api/qms/inspectionQ2/index.ts
  2. 3
      src/api/wms/business/inputBlur.ts
  3. 11
      src/api/wms/deliverRecordDetail/index.ts
  4. 10
      src/api/wms/productionreturnRecordMain/index.ts
  5. 44
      src/api/wms/productreceiptRecordMain/index.ts
  6. 12
      src/api/wms/purchaseDetail/index.ts
  7. 11
      src/api/wms/purchasereturnRecordDetail/index.ts
  8. 11
      src/api/wms/purchasereturnRecordMain/index.ts
  9. 18
      src/api/wms/purchasereturnRequestDetail/index.ts
  10. 25
      src/api/wms/purchasereturnRequestMain/index.ts
  11. 5
      src/api/wms/supplierdeliverRequestMain/index.ts
  12. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  13. 14
      src/components/BasicForm/src/BasicFormWmsCount.vue
  14. 45
      src/components/Detail/src/Detail.vue
  15. 3
      src/locales/en-US.ts
  16. 3
      src/locales/zh-CN.ts
  17. 3
      src/permission.ts
  18. 10
      src/router/modules/remaining.ts
  19. 1
      src/utils/dict.ts
  20. 23
      src/utils/disposition/defaultButtons.ts
  21. 13
      src/utils/validator.ts
  22. 4
      src/views/qms/inspectionJob/addForm.vue
  23. 4
      src/views/qms/inspectionJob/detail.vue
  24. 20
      src/views/qms/inspectionJob/index.vue
  25. 2
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  26. 42
      src/views/qms/inspectionQ2/index.vue
  27. 2
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  28. 16
      src/views/qms/inspectionRecord/index.vue
  29. 2
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  30. 2
      src/views/qms/inspectionRecord/inspectionRecordPurchase.vue
  31. 18
      src/views/qms/inspectionRequest/index.vue
  32. 2
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  33. 4
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  34. 4
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue
  35. 16
      src/views/wms/basicDataManage/subject/subjectAccount/index.vue
  36. 3
      src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts
  37. 199
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  38. 33
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  39. 2
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue
  40. 2
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  41. 6
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue
  42. 8
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue
  43. 20
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  44. 16
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  45. 2
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  46. 4
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  47. 7
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts
  48. 36
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  49. 18
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  50. 8
      src/views/wms/issueManage/productionreturn/productionreturnRecordMainHold/productionreturnRecordMainHold.data.ts
  51. 141
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  52. 528
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  53. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  54. 1527
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMain.data.ts
  55. 9
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue
  56. 10
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue
  57. 4
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts
  58. 1
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  59. 54
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts
  60. 64
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts
  61. 16
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordMainNew.data.ts
  62. 64
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/inventorymoveRecordMainOKHOLD.data.ts
  63. 66
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  64. 3
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue
  65. 84
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/inventorymoveRequestMain.data.ts
  66. 66
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts
  67. 66
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts
  68. 12
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  69. 93
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue
  70. 15
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts
  71. 15
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  72. 3
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  73. 203
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/index.vue
  74. 994
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts
  75. 1140
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue
  76. 1711
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts
  77. 1891
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts
  78. 597
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts
  79. 7
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts
  80. 10
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  81. 42
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierResume/index.vue
  82. 464
      src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/index.vue
  83. 1863
      src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts
  84. 4
      src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts

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

@ -81,3 +81,7 @@ export const finishQ2 = async (id: number) => {
export const getEmail = () => { export const getEmail = () => {
return request.get({ url: `/qms/inspectionQ2/getEmail`}) return request.get({ url: `/qms/inspectionQ2/getEmail`})
} }
export const sendQ2 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ2/send?id=` + id })
}

3
src/api/wms/business/inputBlur.ts

@ -573,6 +573,9 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
} }
} }
await tableFormSchemaObj.verificationPage(params.value).then(async (res) => { await tableFormSchemaObj.verificationPage(params.value).then(async (res) => {
if(!Array.isArray(res)&&res.list&&Array.isArray(res.list)){
res = res.list
}
list.value = res ? res : [] list.value = res ? res : []
if (arr1.length != res.length) { if (arr1.length != res.length) {
const arr2 = res.map((item) => item[headerItem.tableForm.searchField]) const arr2 = res.map((item) => item[headerItem.tableForm.searchField])

11
src/api/wms/deliverRecordDetail/index.ts

@ -33,7 +33,16 @@ export interface DeliverRecordDetailVO {
interfaceType: string interfaceType: string
jobDetailId: string jobDetailId: string
} }
// 查询发货记录子列表
export const getDeliverRecordDetailPageCustomerreturn = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-record-detail/seniorCustomerreturn', data })
} else {
return await request.get({ url: `/wms/deliver-record-detail/pageCustomerreturn`, params })
}
}
// 查询发货记录子列表 // 查询发货记录子列表
export const getDeliverRecordDetailPage = async (params) => { export const getDeliverRecordDetailPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {

10
src/api/wms/productionreturnRecordMain/index.ts

@ -71,18 +71,18 @@ export const exportProductionreturnRecordMain = async (params) => {
export const exportProductionreturnRecordMainStore = async (params) => { export const exportProductionreturnRecordMainStore = async (params) => {
if (params.isSearch){ if (params.isSearch){
const data = {...params} const data = {...params}
return await request.downloadPost({ url: `/wms/productionreturn-job-detail-store/export-excel-senior`, data }) return await request.downloadPost({ url: `/wms/productionreturn-record-detail-store/export-excel-senior`, data })
}else { }else {
return await request.download({ url: `/wms/productionreturn-job-detail-store/export-excel`, params }) return await request.download({ url: `/wms/productionreturn-record-detail-store/export-excel`, params })
} }
} }
// 导出隔离退料记录主 Excel -hold // 导出隔离退料记录主 Excel -hold
export const exportProductionreturnRecordMainHold = async (params) => { export const exportProductionreturnRecordMainHold = async (params) => {
if (params.isSearch){ if (params.isSearch){
const data = {...params} const data = {...params}
return await request.downloadPost({ url: `/wms/productionreturn-job-detail-hold/export-excel-senior`, data }) return await request.downloadPost({ url: `/wms/productionreturn-record-detail-hold/export-excel-senior`, data })
}else { }else {
return await request.download({ url: `/wms/productionreturn-job-detail-hold/export-excel`, params }) return await request.download({ url: `/wms/productionreturn-record-detail-hold/export-excel`, params })
} }
} }
@ -100,4 +100,4 @@ export const receive = (id) => {
// 拒收隔离收货 // 拒收隔离收货
export const refuse = (id) => { export const refuse = (id) => {
return request.put({ url: '/wms/productionreturn-record-main/refuse?id=' + id }) return request.put({ url: '/wms/productionreturn-record-main/refuse?id=' + id })
} }

44
src/api/wms/productreceiptRecordMain/index.ts

@ -86,14 +86,14 @@ export const deleteProductreceiptRecordMain = async (id: number) => {
// 导出制品收货记录主 Excel // 导出制品收货记录主 Excel
export const exportProductreceiptRecordMain = async (params) => { export const exportProductreceiptRecordMain = async (params) => {
params.type = 'predict' // params.type = 'predict'
if (params.isSearch) { if (params.isSearch) {
const cmd = { // const cmd = {
'column':'type', // 'column':'type',
'action':'==', // 'action':'==',
'value':'predict' // 'value':'predict'
} // }
params.filters.push(cmd) // params.filters.push(cmd)
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data })
@ -102,6 +102,26 @@ export const exportProductreceiptRecordMain = async (params) => {
} }
} }
// 导出制品收货记录主 Excel
export const exportProductreceiptRecordScapMain = async (params) => {
// params.type = 'predict'
if (params.isSearch) {
// const cmd = {
// 'column':'type',
// 'action':'==',
// 'value':'predict'
// }
// params.filters.push(cmd)
delete params.isSearch
const data = {...params}
return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior-scrap', data })
} else {
return await request.download({ url: `/wms/productreceipt-record-main/export-excel-scrap`, params })
}
}
// 导出装配收货记录主 Excel // 导出装配收货记录主 Excel
export const exportProductreceiptRecordAssembleMain = async (params) => { export const exportProductreceiptRecordAssembleMain = async (params) => {
params.type = 'assemble' params.type = 'assemble'
@ -138,3 +158,13 @@ export const createInspectRequest = async (number:string) => {
export const handleRecoveryProductreceiptRecord = async (data: ProductreceiptRecordMainVO) => { export const handleRecoveryProductreceiptRecord = async (data: ProductreceiptRecordMainVO) => {
return await request.put({ url: `/wms/productreceipt-record-main/handleRecovery`, data }) return await request.put({ url: `/wms/productreceipt-record-main/handleRecovery`, data })
} }
// 接收隔离收货
export const receive = (id) => {
return request.put({ url: '/wms/productreceipt-record-main/receive?id=' + id })
}
// 拒收隔离收货
export const refuse = (id) => {
return request.put({ url: '/wms/productreceipt-record-main/refuse?id=' + id })
}

12
src/api/wms/purchaseDetail/index.ts

@ -55,6 +55,18 @@ export const getPurchaseDetailPageWMS = async (params) => {
} }
} }
// 查询M类型的采购订单子列表
export const getPurchaseDetailPageWMSMOrderType = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchase-detail/seniorWMS-MOrderType', data })
} else {
return await request.get({ url: `/wms/purchase-detail/pageWMS-MOrderType`, params })
}
}
export const getPurchaseDetailPageWMSTypeM = async (params) => { export const getPurchaseDetailPageWMSTypeM = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch

11
src/api/wms/purchasereturnRecordDetail/index.ts

@ -60,6 +60,17 @@ export const getPurchasereturnRecordDetailPageSpare = async (params) => {
} }
} }
export const getPurchasereturnRecordDetailPageMorderType = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereturn-record-detail/seniorMorderType', data })
} else {
return await request.get({ url: `/wms/purchasereturn-record-detail/pageMorderType`, params })
}
}
export const getPurchasereturnRecordDetailPageSCP = async (params) => { export const getPurchasereturnRecordDetailPageSCP = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch

11
src/api/wms/purchasereturnRecordMain/index.ts

@ -75,6 +75,17 @@ export const exportPurchasereturnRecordMain = async (params) => {
} }
} }
// 导出采购退货记录主 Excel
export const exportPurchasereturnRecordMainMorderType = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereturn-record-main/export-excel-senior-mordertype`, data })
} else {
return await request.download({url: `/wms/purchasereturn-record-main/export-excel-mordertype`, params})
}
}
// 导出维修备件退货记录主 Excel // 导出维修备件退货记录主 Excel
export const exportPurchasereturnRecordMainSpare = async (params) => { export const exportPurchasereturnRecordMainSpare = async (params) => {
if (params.isSearch) { if (params.isSearch) {

18
src/api/wms/purchasereturnRequestDetail/index.ts

@ -42,6 +42,12 @@ export const getPurchasereturnRequestDetailPage = async (params) => {
export const getPurchasereturnRequestDetailEditData = async (params) => { export const getPurchasereturnRequestDetailEditData = async (params) => {
return await request.get({ url: `/wms/purchasereturn-request-main/editReturnNew`, params }) return await request.get({ url: `/wms/purchasereturn-request-main/editReturnNew`, params })
} }
// 查询M类型采购退货申请子列表
export const getPurchasereturnRequestDetailEditDataMOrderType = async (params) => {
return await request.get({ url: `/wms/purchasereturn-request-main/editReturnNewMtype`, params })
}
// 物料供应商查询 // 物料供应商查询
export const getPurchasereturnSupplierByCode = async (params) => { export const getPurchasereturnSupplierByCode = async (params) => {
return await request.get({ url: `/wms/supplieritem/querySupplierByCode`, params }) return await request.get({ url: `/wms/supplieritem/querySupplierByCode`, params })
@ -66,6 +72,18 @@ export const getPurchasereturnRequestDetailPageSpare = async (params) => {
} }
} }
// 查询采购退货申请子列表--M类型退货
export const getPurchasereturnRequestDetailPageMorderType = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereturn-request-detail/seniorMorderType', data })
} else {
return await request.get({ url: `/wms/purchasereturn-request-detail/pageMorderType`, params })
}
}
// 查询采购退货申请子详情 // 查询采购退货申请子详情
export const getPurchasereturnRequestDetail = async (id: number) => { export const getPurchasereturnRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/purchasereturn-request-detail/get?id=` + id }) return await request.get({ url: `/wms/purchasereturn-request-detail/get?id=` + id })

25
src/api/wms/purchasereturnRequestMain/index.ts

@ -57,6 +57,11 @@ export const createPurchasereturnRequestMainNew = async (data: PurchasereturnReq
return await request.post({ url: `/wms/purchasereturn-request-main/createReturnNew`, data }) return await request.post({ url: `/wms/purchasereturn-request-main/createReturnNew`, data })
} }
// 新增采购退货申请主 --M类型采购退货
export const createPurchasereturnRequestMainMType = async (data: PurchasereturnRequestMainVO) => {
return await request.post({ url: `/wms/purchasereturn-request-main/createReturnNewMtype`, data })
}
// 修改采购退货申请主 // 修改采购退货申请主
export const updatePurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => { export const updatePurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => {
return await request.put({ url: `/wms/purchasereturn-request-main/update`, data }) return await request.put({ url: `/wms/purchasereturn-request-main/update`, data })
@ -66,6 +71,11 @@ export const updatePurchasereturnRequestMainNew = async (data: PurchasereturnReq
return await request.post({ url: `/wms/purchasereturn-request-main/updateReturnNew`, data }) return await request.post({ url: `/wms/purchasereturn-request-main/updateReturnNew`, data })
} }
// 修改M类型采购收货申请主
export const updatePurchasereturnRequestMainNewMType = async (data: PurchasereturnRequestMainVO) => {
return await request.post({ url: `/wms/purchasereturn-request-main/updateReturnNewMtype`, data })
}
// 删除采购退货申请主 // 删除采购退货申请主
export const deletePurchasereturnRequestMain = async (id: number) => { export const deletePurchasereturnRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchasereturn-request-main/delete?id=` + id }) return await request.delete({ url: `/wms/purchasereturn-request-main/delete?id=` + id })
@ -81,6 +91,16 @@ export const exportPurchasereturnRequestMain = async (params) => {
} }
} }
// 导出采购退货申请主 Excel
export const exportPurchasereturnRequestMainMorderType = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereturn-request-main/export-excel-senior-mordertype`, data })
} else {
return await request.download({url: `/wms/purchasereturn-request-main/export-excel-mordertype`, params})
}
}
// 导出采购退货申请主 Excel // 导出采购退货申请主 Excel
export const exportPurchasereturnRequestMainSpare = async (params) => { export const exportPurchasereturnRequestMainSpare = async (params) => {
if (params.isSearch) { if (params.isSearch) {
@ -106,6 +126,11 @@ export const importTemplateNew = () => {
return request.download({ url: '/wms/purchasereturn-request-main/get-import-template-new' }) return request.download({ url: '/wms/purchasereturn-request-main/get-import-template-new' })
} }
// 下载用户导入模板(新)
export const importTemplateMorderType = () => {
return request.download({ url: '/wms/purchasereturn-request-main/get-import-template-mordertype' })
}
// 关闭采购退货申请主 Excel // 关闭采购退货申请主 Excel
export const closePurchasereturnRequestMain = async (id) => { export const closePurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/close?id=` + id }) return await request.put({ url: `/wms/purchasereturn-request-main/close?id=` + id })

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

@ -124,4 +124,9 @@ export const importTemplate = () => {
// 删除之前的包装和标签 // 删除之前的包装和标签
export const deleteOldLabels = async (id) => { export const deleteOldLabels = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/deleteOldLabels?id=` + id }) return await request.post({ url: `/wms/supplierdeliver-request-main/deleteOldLabels?id=` + id })
}
// 查看履历表
export const querySupplierResume = (asnNumber:string) => {
return request.get({ url: `/wms/supplierdeliver-request-main/querySupplierResume?asnNumber=` + asnNumber })
} }

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

@ -151,4 +151,9 @@ export const getLoginUserRoleList = async () => {
export const getTaxAmount = async ({id,taxRate}) => { export const getTaxAmount = async ({id,taxRate}) => {
return await request.get({ url: `/wms/supplierinvoice-request-main/computeById?id=${id}&taxRate=${taxRate}`}) return await request.get({ url: `/wms/supplierinvoice-request-main/computeById?id=${id}&taxRate=${taxRate}`})
}
// 采购离散订单查看-点击未读按钮
export const getDiscreteIsRead = async ({id}) => {
return await request.get({ url: `/wms/supplierinvoice-record-main/discreteIsRead?id=${id}`})
} }

14
src/components/BasicForm/src/BasicFormWmsCount.vue

@ -789,16 +789,16 @@ const submitForm = async () => {
if (!valid) return if (!valid) return
// //
if (props.isBusiness) { if (props.isBusiness) {
formLoading.value = true // formLoading.value = true
if (formType.value == 'create') { if (formType.value == 'create') {
const validateForm = await tableFormRef.value.validateForm() const validateForm = await tableFormRef.value.validateForm()
if (!validateForm && props.tableFormDataLength) { if (!validateForm && props.tableFormDataLength) {
if (props.tableData.length == 0) { if (props.tableData.length == 0) {
message.warning('请填写明细信息!') message.warning('请填写明细信息!')
formLoading.value = false // formLoading.value = false
return return
} }
formLoading.value = false // formLoading.value = false
return return
} }
// //
@ -807,7 +807,7 @@ const submitForm = async () => {
const data1 = unref(formRef1)?.formModel const data1 = unref(formRef1)?.formModel
emit('submitForm', formType.value, { ...data, ...data1 }) emit('submitForm', formType.value, { ...data, ...data1 })
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} else { } else {
// //
@ -816,17 +816,17 @@ const submitForm = async () => {
const data1 = unref(formRef1)?.formModel const data1 = unref(formRef1)?.formModel
emit('submitForm', formType.value, { ...data }) emit('submitForm', formType.value, { ...data })
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} }
} else { } else {
// //
formLoading.value = true // formLoading.value = true
try { try {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('success', formType.value, data) emit('success', formType.value, data)
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} }
} }

45
src/components/Detail/src/Detail.vue

@ -78,6 +78,9 @@
v-model:currentPage="tableObjectRef.currentPage" v-model:currentPage="tableObjectRef.currentPage"
v-model:sort="tableObjectRef.sort" v-model:sort="tableObjectRef.sort"
> >
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{ row }">
<slot :name="name" :row="row"></slot>
</template>
<template #photos="{ row }"> <template #photos="{ row }">
<div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div> <div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div>
</template> </template>
@ -821,7 +824,15 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
} }
} }
const updateList = ()=>{ const updateList = ()=>{
getList()
//
if (tableObjectRef.value.params.filters && tableObjectRef.value.params.filters.length > 0) {
searchFormClick({
filters: tableObjectRef.value.params.filters
})
} else {
getList()
}
} }
// //
@ -1005,7 +1016,7 @@ const submitForm = async (formType, data) => {
emit('handleMainFefresh') emit('handleMainFefresh')
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
// //
await getList() updateList()
updateKey.value += 1 updateKey.value += 1
} }
} finally { } finally {
@ -1016,7 +1027,7 @@ const submitForm = async (formType, data) => {
const submitUpdateList = async ()=>{ const submitUpdateList = async ()=>{
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
// //
await getList() updateList()
updateKey.value += 1 updateKey.value += 1
} }
@ -1064,29 +1075,35 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
emit('handleMainFefresh') emit('handleMainFefresh')
// //
await getList() await updateList()
updateKey.value += 1 updateKey.value += 1
} catch { } catch {
tableObject.loading = false tableObject.loading = false
getList() updateList()
} }
} }
// //
const searchFormClick = async (searchData) => { const searchFormClick = async (searchData) => {
const { tableObject, tableMethods } = useTable({ tableObjectRef.value.params = {
getListApi: props.apiPage //
})
tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
? searchData.filters ? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
} }
detailAllSchemasRef.value = props.detailAllSchemas // const { tableObject, tableMethods } = useTable({
tableObjectRef.value = tableObject // getListApi: props.apiPage //
tableMethodsRef.value = tableMethods // })
tableObjectRef.value.tableList = [] // tableObject.params = {
const { getList } = tableMethods // isSearch: true,
// filters: searchData.filters
// ? searchData.filters
// : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
// }
// detailAllSchemasRef.value = props.detailAllSchemas
// tableObjectRef.value = tableObject
// tableMethodsRef.value = tableMethods
// tableObjectRef.value.tableList = []
// const { getList } = tableMethods
await getList() await getList()
updateKey.value += 1 updateKey.value += 1
// tableObjectRef.value.params = { // tableObjectRef.value.params = {

3
src/locales/en-US.ts

@ -757,6 +757,7 @@ export default {
2:'Material Description2', 2:'Material Description2',
:'Item Code', :'Item Code',
:'Quality inspection details', :'Quality inspection details',
:'Details of your resume',
:'Add Attachment', :'Add Attachment',
:'Change Record', :'Change Record',
:'Add Detail', :'Add Detail',
@ -1147,6 +1148,8 @@ export default {
'确 认':'Confirm', '确 认':'Confirm',
:'Please enter the reason for rejection', :'Please enter the reason for rejection',
:'View details', :'View details',
:'unread',
:'read',
:'All read', :'All read',
'申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped', '申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped',
:'Oversend is not allowed', :'Oversend is not allowed',

3
src/locales/zh-CN.ts

@ -759,6 +759,7 @@ export default {
2:'物料描述2', 2:'物料描述2',
:'项目代码', :'项目代码',
:'质检明细', :'质检明细',
:'履历表明细',
:'添加附件', :'添加附件',
:'变更记录', :'变更记录',
:'添加明细', :'添加明细',
@ -1150,6 +1151,8 @@ export default {
'确 认':'确 认', '确 认':'确 认',
:'请输入拒收原因', :'请输入拒收原因',
:'查看明细', :'查看明细',
:'未读',
:'已读',
:'全部已读', :'全部已读',
'申请发货数量不能大于 计划数量 - 已发货数量':'申请发货数量不能大于 计划数量 - 已发货数量', '申请发货数量不能大于 计划数量 - 已发货数量':'申请发货数量不能大于 计划数量 - 已发货数量',
:'不允许超发', :'不允许超发',

3
src/permission.ts

@ -23,7 +23,8 @@ const whiteList = [
'/bind', '/bind',
'/register', '/register',
'/oauthLogin/gitee', '/oauthLogin/gitee',
'/purchasereceiptReport' '/purchasereceiptReport',
'/supplierResume'
] ]
// 路由加载前 // 路由加载前

10
src/router/modules/remaining.ts

@ -265,6 +265,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
noTagsView: true noTagsView: true
} }
}, },
{
path: '/supplierResume',
component: () => import('@/views/wms/purchasereceiptManage/supplierdeliver/supplierResume/index.vue'),
name: 'supplierResume',
meta: {
hidden: true,
title: t('ts.查看履历表'),
noTagsView: true
}
},
{ {
path: '/bpm', path: '/bpm',
component: Layout, component: Layout,

1
src/utils/dict.ts

@ -359,6 +359,7 @@ export enum DICT_TYPE {
INTERFACE_STATUS = 'interfaceStatus', // 接口调用信息 接口状态 INTERFACE_STATUS = 'interfaceStatus', // 接口调用信息 接口状态
SYSTEM_DAY = 'system_day', // 系统天数 SYSTEM_DAY = 'system_day', // 系统天数
PURCHASE_INVOICE_ORDER_TYPE = 'purchase_invoice_order_type', // 发票采购订单类型 PURCHASE_INVOICE_ORDER_TYPE = 'purchase_invoice_order_type', // 发票采购订单类型
DISCRETE_SUPPLIERINVOICE_READ = 'discrete_supplierinvoice_read', // 采购离散订单查看
// ========== eam - 业务 - ========== // ========== eam - 业务 - ==========
DEVICE_TYPE = 'device_type', // 设备分类 DEVICE_TYPE = 'device_type', // 设备分类

23
src/utils/disposition/defaultButtons.ts

@ -452,6 +452,18 @@ export function mainListFinishBtn(option: any) {
}) })
} }
export function mainListSendBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发送邮件`).replace('ts.', ''),
name: 'send',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-作废按钮 // 主列表-作废按钮
export function mainListCancelBtn(option: any) { export function mainListCancelBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {
@ -772,6 +784,17 @@ export function mainListPlanCheckQualityReportBtn(option: any) {
hasPermi: '' hasPermi: ''
}) })
} }
export function mainListSupplierResumeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.查看履历表`).replace('ts.', ''),
name: 'mainSupplierResume',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-提交审批按钮 // 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option: any) { export function mainListPlanSubBtn(option: any) {

13
src/utils/validator.ts

@ -776,6 +776,19 @@ export function validateYS(rule, value, callback) {
callback() callback()
} }
} }
//校验只可输入大小写字母、数字、空格
export function validateYSK(rule, value, callback) {
if (value) {
const regs = /^[a-zA-Z0-9-_. ]+$/
if (regs.test(value)) {
callback()
} else {
callback(new Error('只能输入大小写字母、数字及空格'))
}
} else {
callback()
}
}
// 校验百分比 // 校验百分比
export function validatePercent(rule, value, callback){ export function validatePercent(rule, value, callback){
if (!value) { if (!value) {

4
src/views/qms/inspectionJob/addForm.vue

@ -184,7 +184,7 @@
</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.samplePieceSize" prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
@ -199,7 +199,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="是否允许修改特征值"

4
src/views/qms/inspectionJob/detail.vue

@ -93,7 +93,7 @@
</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="inspectionJobCharacteristicsRespVO.samplePieceSize" prop="inspectionJobCharacteristicsRespVO.samplePieceSize"
@ -106,7 +106,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="是否允许修改特征值"

20
src/views/qms/inspectionJob/index.vue

@ -78,7 +78,7 @@
/> />
<el-dialog <el-dialog
v-model="showQualityReport" v-model="showQualityReport"
:title="t('质检明细')" :title="reportTitle"
:append-to-body="false" :append-to-body="false"
destroy-on-close destroy-on-close
fullscreen fullscreen
@ -285,7 +285,10 @@ const butttondata = (row) => {
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({ defaultButtons.mainListPlanCheckQualityReportBtn({
hide: isShowMainButton3(row) hide: isShowMainButton3(row)
}) // }), //
defaultButtons.mainListSupplierResumeBtn({
hide: isShowMainButton3(row)
}) //
] ]
} }
const listTableRef = ref() const listTableRef = ref()
@ -313,6 +316,9 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanCheckQualityReport') { } else if (val == 'mainPlanCheckQualityReport') {
// //
checkQualityReport(row) checkQualityReport(row)
} else if (val == 'mainSupplierResume') {
//
checkSupplierResume(row)
} else if (val == 'mainJobAcc') { } else if (val == 'mainJobAcc') {
// //
handleAccept(row.id) handleAccept(row.id)
@ -323,11 +329,19 @@ const buttonTableClick = async (val, row) => {
const reportHeight = ref(window.innerHeight - 120) const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false) const showQualityReport = ref(false)
const qualityReport = ref('') const qualityReport = ref('')
const reportTitle = ref('')
const checkQualityReport = async (row) => { const checkQualityReport = async (row) => {
reportTitle.value = t('ts.质检明细')
showQualityReport.value = true showQualityReport.value = true
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
} }
//
const checkSupplierResume = async (row) => {
reportTitle.value = t('ts.履历表明细')
showQualityReport.value = true
qualityReport.value = getReportUrl() + '/supplierResume?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */ /** 添加/修改操作 */
// const formRef = ref() // const formRef = ref()
// const openForm = async (type : string, row ?: number) => { // const openForm = async (type : string, row ?: number) => {

2
src/views/qms/inspectionJob/inspectionJobMain.data.ts

@ -686,7 +686,7 @@ export const InspectionJobMain = useCrudSchemas(
isForm: false, isForm: false,
isDetail: false, isDetail: false,
table: { table: {
width: 300, width: 390,
fixed: 'right' fixed: 'right'
} }
} }

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

@ -651,7 +651,10 @@ const butttondata = (row) => {
defaultButtons.mainListFinishBtn({ defaultButtons.mainListFinishBtn({
hide: isShowMainButton(row, ['0']), hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q2:finish' hasPermi: 'qms:Q2:finish'
}) // }), //
defaultButtons.mainListSendBtn({
hide: isShowMainButton(row, ['0']),
}) //
] ]
} }
@ -667,6 +670,9 @@ const buttonTableClick = async (val, row) => {
// //
handleFinish(row.id) handleFinish(row.id)
} }
else if (val == 'send') {
handleSend(row.id)
}
} }
const handleFinish = async (id: number) => { const handleFinish = async (id: number) => {
@ -678,22 +684,52 @@ const handleFinish = async (id: number) => {
} catch {} } catch {}
} }
const handleSend = async (id: number) => {
try {
//
await message.confirm('确认发送邮件吗?')
//
await Q2Api.sendQ2(id)
message.success(t('邮件发送成功'))
// message.success(t('common.success'))
//
// await getList()
} catch {}
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
if (row && row.claimAddress?.trim()) { if (row && row.claimAddress?.trim()) {
row.filePathList = row.claimAddress.split(',') row.filePathList = row.claimAddress.split(',')
} }
if (row && row.claimAddressName?.trim()) {
row.claimAddressNameList = row.claimAddressName.split(',');
}
if (row && row.filePathList && row.filePathList.length > 0) { if (row && row.filePathList && row.filePathList.length > 0) {
row.filePathListView = row.filePathList.map((item) => { row.filePathListView = row.filePathList.map((item, index) => {
return { return {
name: item, name: row.claimAddressNameList ? row.claimAddressNameList[index] || item : item,
url: item url: item
} }
}) })
} }
// if (row && row.claimAddress?.trim()) {
// row.filePathList = row.claimAddress.split(',')
// }
//
// if (row && row.filePathList && row.filePathList.length > 0) {
// row.filePathListView = row.filePathList.map((item) => {
// return {
// name: item,
// url: item
// }
// })
// }
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
if (!row || !row.claimAmount) { if (!row || !row.claimAmount) {
nextTick(() => { nextTick(() => {

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

@ -868,7 +868,7 @@ export const Q2 = useCrudSchemas(
isForm: false, isForm: false,
isDetail: false, isDetail: false,
table: { table: {
width: 150, width: 230,
fixed: 'right' fixed: 'right'
} }
} }

16
src/views/qms/inspectionRecord/index.vue

@ -85,7 +85,7 @@
/> />
<el-dialog <el-dialog
v-model="showQualityReport" v-model="showQualityReport"
:title="t('质检明细')" :title="reportTitle"
:append-to-body="false" :append-to-body="false"
destroy-on-close destroy-on-close
fullscreen fullscreen
@ -257,7 +257,8 @@ const butttondata = (row) => {
// hasPermi: 'qms:inspection-recode-main:execute', // hasPermi: 'qms:inspection-recode-main:execute',
// }), // // }), //
defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), // defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) // defaultButtons.mainListPlanCheckQualityReportBtn({}), //
defaultButtons.mainListSupplierResumeBtn({}) //
] ]
} }
@ -306,6 +307,9 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanCheckQualityReport') { } else if (val == 'mainPlanCheckQualityReport') {
// //
checkQualityReport(row) checkQualityReport(row)
} else if (val == 'mainSupplierResume') {
//
checkSupplierResume(row)
} else if (val == 'edit') { } else if (val == 'edit') {
// //
// //
@ -317,10 +321,18 @@ const buttonTableClick = async (val, row) => {
const reportHeight = ref(window.innerHeight - 120) const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false) const showQualityReport = ref(false)
const qualityReport = ref('') const qualityReport = ref('')
const reportTitle = ref('')
const checkQualityReport = async (row) => { const checkQualityReport = async (row) => {
reportTitle.value = t('ts.质检明细')
showQualityReport.value = true showQualityReport.value = true
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
} }
//
const checkSupplierResume = async (row) => {
reportTitle.value = t('ts.履历表明细')
showQualityReport.value = true
qualityReport.value = getReportUrl() + '/supplierResume?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
// const openForm = async (type : string, row ?: number) => { // const openForm = async (type : string, row ?: number) => {

2
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -603,7 +603,7 @@ export const InspectionRecordMain = useCrudSchemas(
isForm: false, isForm: false,
isDetail: false, isDetail: false,
table: { table: {
width: 340, width: 430,
fixed: 'right' fixed: 'right'
} }
} }

2
src/views/qms/inspectionRecord/inspectionRecordPurchase.vue

@ -5,7 +5,7 @@
<script setup lang="ts"> <script setup lang="ts">
import index from './index.vue' import index from './index.vue'
// //
defineOptions({ name: 'inspectionRecordPurchase' }) defineOptions({ name: 'inspectionRecordPurchase' })
const indesRef = ref() const indesRef = ref()
onActivated(() => { onActivated(() => {

18
src/views/qms/inspectionRequest/index.vue

@ -89,7 +89,7 @@
<el-dialog <el-dialog
v-model="showQualityReport" v-model="showQualityReport"
:title="t('质检明细')" :title="reportTitle"
:append-to-body="false" :append-to-body="false"
destroy-on-close destroy-on-close
fullscreen fullscreen
@ -118,6 +118,7 @@ import { getReportUrl } from '@/utils/systemParam'
// import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data' // import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'inspectionMain' }) defineOptions({ name: 'inspectionMain' })
const message = useMessage() // const message = useMessage() //
@ -238,7 +239,9 @@ const butttondata = (row) => {
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-request-main:edit' hasPermi: 'qms:inspection-request-main:edit'
}),// }),//
defaultButtons.mainListPlanCheckQualityReportBtn({}) // defaultButtons.mainListPlanCheckQualityReportBtn({}), //
defaultButtons.mainListSupplierResumeBtn({}) //
] ]
} }
const listTableRef = ref() const listTableRef = ref()
@ -278,6 +281,9 @@ const buttonTableClick = async (val, row) => {
}else if (val == 'mainPlanCheckQualityReport') { }else if (val == 'mainPlanCheckQualityReport') {
// //
checkQualityReport(row) checkQualityReport(row)
}else if (val == 'mainSupplierResume') {
//
checkSupplierResume(row)
} }
} }
@ -369,10 +375,18 @@ const handleSubmit = async (id: number) => {
const reportHeight = ref(window.innerHeight - 120) const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false) const showQualityReport = ref(false)
const qualityReport = ref('') const qualityReport = ref('')
const reportTitle = ref('')
const checkQualityReport = async (row) => { const checkQualityReport = async (row) => {
reportTitle.value = t('ts.质检明细')
showQualityReport.value = true showQualityReport.value = true
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
} }
//
const checkSupplierResume = async (row) => {
reportTitle.value = t('ts.履历表明细')
showQualityReport.value = true
qualityReport.value = getReportUrl() + '/supplierResume?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()

2
src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

@ -576,7 +576,7 @@ export const InspectionMain = useCrudSchemas(
isForm: false, isForm: false,
isDetail: false, isDetail: false,
table: { table: {
width: 300, width: 390,
fixed: 'right' fixed: 'right'
} }
} }

4
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -13,7 +13,7 @@ import * as confgiApi from '@/api/infra/config'
import * as WorkstationApi from '@/api/wms/workstation' import * as WorkstationApi from '@/api/wms/workstation'
import { validateYS } from '@/utils/validator' import {validateYS, validateYSK} from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -355,7 +355,7 @@ export const WorkstationRules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' }, { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'} { validator:validateYSK, message: '请输入正确的代码', trigger: 'blur'}
], ],
name: [ name: [
{ required: true, message: '请输入名称', trigger: 'change' }, { required: true, message: '请输入名称', trigger: 'change' },

4
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue

@ -163,7 +163,7 @@ const handleExport = async () => {
// //
loadStart() loadStart()
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain( const data = await RuleApi.exportRule(
queryParams queryParams
) )
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
@ -182,7 +182,7 @@ const handleImport = () => {
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), // defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), // defaultButtons.defaultExportBtn( null), //
] ]
// //

16
src/views/wms/basicDataManage/subject/subjectAccount/index.vue

@ -68,6 +68,7 @@ import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'SubjectAccount' }) defineOptions({ name: 'SubjectAccount' })
const message = useMessage() // const message = useMessage() //
@ -91,7 +92,20 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
setV['projectId'] = val[0]['projectId'] setV['projectId'] = val[0]['projectId']
setV['projectCode'] = val[0]['projectCode'] setV['projectCode'] = val[0]['projectCode']
} }
setV[formField] = val[0][searchField] if( formField === 'costDefault'){
//使
let costDefaults = []
val.forEach(item=>{
costDefaults.push(item[searchField])
})
setV[formField] = costDefaults.join(',')
}else{
setV[formField] = val[0][searchField]
}
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

3
src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts

@ -248,7 +248,7 @@ export const SubjectAccount = useCrudSchemas(
} }
}, },
{ {
label: '成本中心默认值', label: '成本中心限制使用范围',
field: 'costDefault', field: 'costDefault',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
@ -260,6 +260,7 @@ export const SubjectAccount = useCrudSchemas(
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
multiple: true,
enterSearch: true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本

199
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -108,8 +108,17 @@ export const CustomerreturnRequestMain = useCrudSchemas(
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'available',
action: '==',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false,
isSearch: true
},
{
key: 'type',
action: '!=',
value: 'PROVISIONAL_ESTIMATE',
isMainValue: false,
isSearch: true,
} }
], ],
verificationParams: [ verificationParams: [
@ -143,7 +152,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(
isConcatDetailSchemas: true, // 是否主子表合并 isConcatDetailSchemas: true, // 是否主子表合并
searchAllSchemas: DeliverRecordMain.allSchemas, // 查询弹窗所需类 searchAllSchemas: DeliverRecordMain.allSchemas, // 查询弹窗所需类
searchDetailSchemas: DeliverRecordDetail.allSchemas, // 查询弹窗所需类 searchDetailSchemas: DeliverRecordDetail.allSchemas, // 查询弹窗所需类
searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage, // 查询弹窗所需分页方法 searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPageCustomerreturn, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'available',
@ -517,6 +526,75 @@ export const CustomerreturnRequestMain = useCrudSchemas(
}, },
isTable: false isTable: false
}, },
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '到库位代码', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'businessType',
value: 'CustomerReject',
isMainValue: false
},
{
key: 'isIn',
value: 'in',
isMainValue: false
}
],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
// tableForm: {
// enterSearch:true,
// isRepeat: true,
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'toLocationCode',
// searchTitle: '到库位代码',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'businessType',
// value: 'CustomerReject',
// isMainValue: false
// },
// {
// key: 'isIn',
// value: 'in',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// },
},
{ {
label: '自动提交', label: '自动提交',
field: 'autoCommit', field: 'autoCommit',
@ -691,6 +769,9 @@ export const CustomerreturnRequestMain = useCrudSchemas(
//表单校验 //表单校验
export const CustomerreturnRequestMainRules = reactive({ export const CustomerreturnRequestMainRules = reactive({
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' }
],
// deliverRecordNumber: [ // deliverRecordNumber: [
// { required: true, message: '请选择发货记录单号', trigger: 'change' } // { required: true, message: '请选择发货记录单号', trigger: 'change' }
// ], // ],
@ -1031,43 +1112,43 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
} }
} }
}, },
{ // { 拿到主表
label: '到库位代码', // label: '到库位代码',
field: 'toLocationCode', // field: 'toLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isSearch: true, // isSearch: true,
tableForm: { // tableForm: {
enterSearch:true, // enterSearch:true,
isRepeat: true, // isRepeat: true,
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // searchListPlaceholder: '请选择到库位代码',
searchField: 'toLocationCode', // searchField: 'toLocationCode',
searchTitle: '到库位代码', // searchTitle: '到库位代码',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 // searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'businessType', // key: 'businessType',
value: 'CustomerReject', // value: 'CustomerReject',
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'isIn', // key: 'isIn',
value: 'in', // value: 'in',
isMainValue: false // isMainValue: false
}], // }],
verificationParams: [{ // verificationParams: [{
key: 'code', // key: 'code',
action: '==', // action: '==',
value: '', // value: '',
isMainValue: false, // isMainValue: false,
isSearch: true, // isSearch: true,
isFormModel: true, // isFormModel: true,
}], // 失去焦点校验参数 // }], // 失去焦点校验参数
}, // },
}, // },
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
@ -1122,23 +1203,23 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable:false, // isTable:false,
tableForm: { // tableForm: {
disabled: false // disabled: false
}, // },
form: { // form: {
componentProps: { // componentProps: {
disabled: true // disabled: true
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -1234,9 +1315,9 @@ export const CustomerreturnRequestDetailRules = reactive({
itemCode: [ itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' } { required: true, message: '请选择物料代码', trigger: 'change' }
], ],
toLocationCode: [ // toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' } // { required: true, message: '请选择到库位代码', trigger: 'blur' }
], // ],
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],

33
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -58,7 +58,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@onEnter="onEnter" @onEnter="onEnter"
@inputNumberChange="inputNumberChange"
/> />
<!-- 添加明细采购收货记录单号 --> <!-- 添加明细采购收货记录单号 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" /> <SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
@ -142,7 +142,7 @@ const onEnter = async (field,value)=>{
const dateTime = new Date().getTime() const dateTime = new Date().getTime()
if(field=='customerCode'){ if(field=='customerCode'){
//--- //---
formRef.value.opensearchTable('deliverRecordNumber', 'number', '发货记录信息', DeliverRecordMain.allSchemas, DeliverRecordDetailApi.getDeliverRecordDetailPage,[{ formRef.value.opensearchTable('deliverRecordNumber', 'number', '发货记录信息', DeliverRecordMain.allSchemas, DeliverRecordDetailApi.getDeliverRecordDetailPageCustomerreturn,[{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -168,6 +168,7 @@ const onEnter = async (field,value)=>{
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => { CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => {
if(item.field == 'deliverRecordNumber') { if(item.field == 'deliverRecordNumber') {
if(customerCode.value != null){ if(customerCode.value != null){
@ -195,9 +196,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}else if(formField == 'packUnit'){ }else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
}else if(formField == 'toLocationCode') {
//
row['toLocationCode'] = val[0]['code']
} else { } else {
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
@ -215,7 +213,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['customerDockCode'] = val[0]['customerDockCode'] setV['customerDockCode'] = val[0]['customerDockCode']
// //
DeliverRecordDetailApi.getDeliverRecordDetailPage({pageSize:999,masterId:val[0]['masterId']}).then(res => { DeliverRecordDetailApi.getDeliverRecordDetailPageCustomerreturn({pageSize:999,masterId:val[0]['masterId']}).then(res => {
res.list.forEach(obj => { res.list.forEach(obj => {
let value = null let value = null
@ -729,14 +727,30 @@ const tableSelectionDelete = (selection) => {
} }
//true0 //true0
const flag = ref(false) const inputNumberChange = (field, val,row, index) => {
if(field=='qty'){
if(row['subReturnedQty']!=null&&row['qty']>row['subReturnedQty']){
message.error(`物料${row['itemCode']}最大数量为${row['subReturnedQty']}`)
}
}
console.log('inputNumberChange',field, val,row, index)
}
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
let data = {...submitData} let data = {...submitData}
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
let flag = true
tableData.value.forEach(item=>{
if(item['subReturnedQty']!=null&&item['qty']>item['subReturnedQty']){
flag = false
message.error(`物料${item['itemCode']}最大数量为${item['subReturnedQty']}`)
}
})
if(!flag){
return
}
data.subList = tableData.value // data.subList = tableData.value //
data.subList.forEach(obj => { data.subList.forEach(obj => {
if(obj.qty == 0){ if(obj.qty == 0){
@ -751,6 +765,9 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = true formRef.value.formLoading = true
try { try {
if (formType === 'create') { if (formType === 'create') {
data.subList.forEach(item=>{
item['toLocationCode'] = data['toLocationCode']
})
await CustomerreturnRequestMainApi.createCustomerreturnRequestMain(data) await CustomerreturnRequestMainApi.createCustomerreturnRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {

2
src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue

@ -153,7 +153,7 @@ const butttondata = (row, $index) => {
return [ return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), //
defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-request:abort',hide:(row.revokeFlag=='TRUE'||row.relateRecordNumber != null ) }), // defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-record:abort',hide:(row.revokeFlag=='TRUE') }), //
] ]
} }

2
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue

@ -259,7 +259,7 @@ const butttondata = (row,$index) => {
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventoryinit-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:inventoryinit-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:inventoryinit-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:inventoryinit-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventoryinit-request-main:submit'}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventoryinit-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventoryinit-request-main:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventoryinit-request-main:refused'}), //

6
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue

@ -160,10 +160,12 @@ const handlePoint = async (row) => {
// //
if (labelType.value == 'cg') { if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) // const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/view/998431235767558144?token=' + getAccessToken())
window.open(src.value+'&asn_number='+resLable) window.open(src.value+'&asn_number='+resLable)
} else { } else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) // const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/view/998438158579556352?token=' + getAccessToken())
window.open(src.value+'&asn_number='+resLable) window.open(src.value+'&asn_number='+resLable)
} }
}) })

8
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue

@ -111,10 +111,14 @@ const handlePoint = async (row) => {
// //
if (labelType.value == 'cg') { if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/view/998431235767558144?token=' + getAccessToken())
window.open(src.value+'&asn_number='+resLable) window.open(src.value+'&asn_number='+resLable)
} else { } else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) // const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/view/998438158579556352?token=' + getAccessToken())
window.open(src.value+'&asn_number='+resLable) window.open(src.value+'&asn_number='+resLable)
} }
}) })

20
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

@ -400,14 +400,14 @@ export const ScrapJobMain = useCrudSchemas(
width: 150 width: 150
} }
}, },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
} // }
}, // },
{ {
label: '通知单描述', label: '通知单描述',
field: 'noticeRemark', field: 'noticeRemark',
@ -642,7 +642,7 @@ export const ScrapJobMain = useCrudSchemas(
}, },
{ {
label: '承接人', label: '承接人',
field: 'acceptUserId', field: 'acceptUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -670,7 +670,7 @@ export const ScrapJobMain = useCrudSchemas(
}, },
{ {
label: '完成人', label: '完成人',
field: 'completeUserId', field: 'completeUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

16
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -381,14 +381,14 @@ export const ScrapRecordMain = useCrudSchemas(
width: 150 width: 150
} }
}, },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
} // }
}, // },
// { // {
// label: '接口类型', // label: '接口类型',
// field: 'interfaceType', // field: 'interfaceType',

2
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -1312,6 +1312,6 @@ export const ScrapRequestDetailRules = reactive({
], ],
reason: [ reason: [
{ required: true, message: '请输入报废原因', trigger: 'change' }, { required: true, message: '请输入报废原因', trigger: 'change' },
{ max: 200, message: '不得超过200个字符', trigger: 'blur' } { max: 24, message: '不得超过24个字符', trigger: 'blur' }
], ],
}) })

4
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -151,6 +151,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField === 'reasonCodeRequisition'){ if(formField === 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code'] setV['reasonCodeRequisition'] = val[0]['code']
setV['reasonDescRequisition'] = val[0]['accountingName'] setV['reasonDescRequisition'] = val[0]['accountingName']
//
if(UnplannedissueRequestMainRules['projectCode']){
UnplannedissueRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE'
}
} }
if(formField === 'projectCode'){ if(formField === 'projectCode'){
setV['projectCode'] = val[0]['projectCode'] setV['projectCode'] = val[0]['projectCode']

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

@ -541,7 +541,7 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'Switch', component: 'Switch',
value: requestsettingData.directCreateRecord, value: 'FALSE',//HL-6130原来走的接口配置,和喜婷确认不走接口了,只是页面写死默认值为关闭
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' activeValue: 'TRUE'
@ -660,7 +660,7 @@ export const UnplannedissueRequestMainRules = reactive({
], ],
remarkMain: [ remarkMain: [
{ required: true, message: '请输入单据备注', trigger: 'blur' }, { required: true, message: '请输入单据备注', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 24, message: '不得超过24个字符', trigger: 'blur' }
], ],
usageDescription:[ usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' } { required: true, message: '请选择领用描述', trigger: 'blur' }
@ -674,6 +674,9 @@ export const UnplannedissueRequestMainRules = reactive({
reasonCodeRequisition: [ reasonCodeRequisition: [
{ required: true, message: '请输入领用原因代码', trigger: 'blur' } { required: true, message: '请输入领用原因代码', trigger: 'blur' }
], ],
projectCode: [
{ required: false, message: '请输入项目代码', trigger: 'blur' }
],
}) })
/** /**

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

@ -247,22 +247,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
if(formField === 'reasonCodeRequisition'){ if(formField === 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code'] setV['reasonCodeRequisition'] = val[0]['code']
let accountRes = await SubjectAccountApi.getSubjectAccountPage({ // let accountRes = await SubjectAccountApi.getSubjectAccountPage({
pageSize: 20, // pageSize: 20,
pageNo: 1, // pageNo: 1,
code: val[0]['code'], // code: val[0]['code'],
costcentreType: formRef.formModel['costCenterType'], // costcentreType: formRef.formModel['costCenterType'],
sort: '', // sort: '',
by: 'ASC' // by: 'ASC'
}) // })
console.log('UnplannedreceiptRequestMainRules',UnplannedreceiptRequestMainRules) // console.log('UnplannedreceiptRequestMainRules',UnplannedreceiptRequestMainRules)
if( UnplannedreceiptRequestMainRules['projectCode']){ // if( UnplannedreceiptRequestMainRules['projectCode']){
UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = false // UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = false
if(accountRes&&accountRes.list&&accountRes.list.length>0){ // if(accountRes&&accountRes.list&&accountRes.list.length>0){
if(accountRes.list[0]['isProject']=='TRUE'){ // if(accountRes.list[0]['isProject']=='TRUE'){
UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = true // UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = true
} // }
} // }
// }
//
if(UnplannedreceiptRequestMainRules['projectCode']){
UnplannedreceiptRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE'
} }
} }
if(formField === 'projectCode'){ if(formField === 'projectCode'){

18
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -852,12 +852,18 @@ export const IssueRequestDetail = useCrudSchemas(
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}, },
// ,{ {
// key:'productionLineCode', key:'workshopCode',
// value:'productionLineCode', value:'workshopCode',
// message: '请填写生产线代码!', message: '请填写车间代码!',
// isMainValue: true isMainValue: true
// }, },
{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
},
{ {
key: 'businessTypeCode', key: 'businessTypeCode',
value: 'Issue', value: 'Issue',

8
src/views/wms/issueManage/productionreturn/productionreturnRecordMainHold/productionreturnRecordMainHold.data.ts

@ -452,6 +452,14 @@ export const ProductionreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150 width: 150
}, },
}, },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '物料名称', label: '物料名称',
field: 'itemName', field: 'itemName',

141
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -43,7 +43,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="workStationCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductionreturnRequestMainRules" :rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas" :formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -59,6 +59,7 @@
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@clearSearchInput="clearSearchInput"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -88,7 +89,7 @@
:isShowButton="false" :isShowButton="false"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccessLabel"
@submitForm="submitFormLabel" @submitForm="submitFormLabel"
/> />
@ -183,34 +184,77 @@ const isItemType = async (itemCode, labelTypeParams) => {
if (!isType) labelType.value = labelTypeOld if (!isType) labelType.value = labelTypeOld
return isType return isType
} }
const clearSearchInput = (formField) => {
if(formField=='workshopCode'){
//
formRef.value.formRef.setValues({
productionLineCode:'',//线
workStationCode:'',//
fromLocationCode:'',//
})
tableData.value = []
}else if(formField=='productionLineCode'){
//线
formRef.value.formRef.setValues({
workStationCode:'',//
fromLocationCode:'',//
})
tableData.value = []
}
}
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
if(formField == 'itemCode') { if(formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ // if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`) // message.warning(`${val[0]['itemCode']}`)
return // return
// }
let enableBuy = val[0]['enableBuy']
if(tableData.value.length>0){
enableBuy = tableData.value[0]['enableBuy']
} }
//
const isType = await isItemType(val[0]['itemCode'], labelType.value) let noList = val.filter(item=>item['enableBuy']!=enableBuy)
if(!isType){ if(noList&&noList.length>0){
message.warning('当前物料可制造与其他数据不一致,请重新选择!') let itemCodes = noList.map(item=>item['itemCode'])
} else { console.log(itemCodes)
row['itemCode'] = val[0]['itemCode'] message.warning(`${itemCodes.join(',')}与其他数据制造类型不一致,被过滤!`)
row['uom'] = val[0]['uom'] }
row['inventoryStatus'] = val[0]['inventoryStatus'] val = val.filter(item=>item['enableBuy']==enableBuy)
row['qty'] = val[0]['qty']
let messageItemCodes = []
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['itemCode']
newRow['enableBuy'] = item['enableBuy']
newRow['uom'] = item['uom']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['qty'] = item['qty']
// 000000 // 000000
if (val[0]['batch'] !== '') { if (item['batch'] !== '') {
row['batch'] = val[0]['batch'] newRow['batch'] = item['batch']
} else { } else {
row['batch'] = '000000' newRow['batch'] = '000000'
}
newRow['packUnit'] = item['packUnit']
newRow['packQty'] = item['packQty']
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){
messageItemCodes.push(item['itemCode'])
}else{
tableData.value.push(newRow)
} }
row['packUnit'] = val[0]['packUnit'] })
row['packQty'] = val[0]['packQty'] if(messageItemCodes.length>0){
message.warning(`物料${messageItemCodes.join(',')}已经存在`)
}
// HL-4885 @ @ // HL-4885 @ @
// tableform // tableform
// TODO: tableFormColumns 10 20 20 // TODO: tableFormColumns 10 20 20
@ -219,16 +263,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
// } // }
// }) // })
} // }
} else if(formField == 'workStationCode') { }
// // else if(formField == 'workStationCode') {
val.forEach(item=>{ // //
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) // val.forEach(item=>{
newRow['workStationCode'] = item['code'] // const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromLocationCode'] = item['rawLocationCode'] // newRow['workStationCode'] = item['code']
tableData.value.push(newRow) // newRow['fromLocationCode'] = item['rawLocationCode']
}) // tableData.value.push(newRow)
} // })
// }
// else if(formField == 'packUnit') { // else if(formField == 'packUnit') {
// row['packUnit'] = val[0]['packUnit'] // row['packUnit'] = val[0]['packUnit']
// row['packQty'] = val[0]['packQty'] // row['packQty'] = val[0]['packQty']
@ -239,7 +284,39 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
tableData.value = [] // if(formField=='workshopCode'){
//
setV['productionLineCode'] = ''//线
setV['workStationCode'] = ''//
setV['fromLocationCode'] = ''//
tableData.value = []
}else if(formField=='productionLineCode'){
//线
setV['workStationCode'] = ''//
setV['fromLocationCode'] = ''//
tableData.value = []
}
if(formField == 'workStationCode') {
//
setV['workStationCode'] = val[0]['code']
setV['fromLocationCode'] = val[0]['rawLocationCode']
tableData.value = [] //
}
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row ) => {
console.log('searchTableSuccessLabel',formField, searchField, val, formRef, type, row)
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
@ -654,6 +731,10 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
tableData.value.forEach((item:any)=>{
item['workStationCode'] = data.workStationCode
item['fromLocationCode'] = data.fromLocationCode
})
data.subList = tableData.value // data.subList = tableData.value //
let isZC = true // let isZC = true //
data.subList.forEach(item => { data.subList.forEach(item => {

528
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -24,7 +24,8 @@ import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import * as LocationApi from '@/api/wms/location' import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { Warehouse } from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -116,7 +117,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
}, },
}, },
{ {
label: '生产线代码', label: '生产线',
field: 'productionLineCode', field: 'productionLineCode',
sort: 'custom', sort: 'custom',
table: { table: {
@ -171,6 +172,155 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
}] }]
}, },
}, },
{
label: '工位',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
isForm: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!',
isMainValue: true
},{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{
multiple:true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!',
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
},
{
key: 'productionLineCode', // 查询列表中字段
value: 'productionLineCode', // 指查询具体值
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:false, // 前置添加必有,和isFormModel结合使用
},
],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
isRepeat: true,//是否可以重复添加该条数据
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
},
{
label: '来源库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
},
isDetail:false,
isTable:true,
isTableForm: true,
isForm: true,
},
{
label: '到仓库',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150,
},
isForm:true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择仓库代码',
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{ {
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
@ -524,6 +674,12 @@ export const ProductionreturnRequestMainRules = reactive({
// productionLineCode: [ // productionLineCode: [
// { required: true, message: '请选择生产线代码', trigger: 'change' } // { required: true, message: '请选择生产线代码', trigger: 'change' }
// ], // ],
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
toWarehouseCode: [
{ required: true, message: '请选择到仓库', trigger: 'change' }
],
}) })
/** /**
@ -579,161 +735,161 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}] }]
}, },
}, },
{ // {
label: '工位代码', // label: '工位代码',
field: 'workStationCode', // field: 'workStationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 // searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题 // searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{ // searchCondition:[{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'workshopCode', // key: 'workshopCode',
value: 'workshopCode', // value: 'workshopCode',
message: '请选择车间信息!', // message: '请选择车间信息!',
isMainValue: true // isMainValue: true
},{ // },{
key: 'productionLineCode', // key: 'productionLineCode',
value: 'productionLineCode', // value: 'productionLineCode',
message: '请选择生产线信息!', // message: '请选择生产线信息!',
isMainValue: true // isMainValue: true
}], // }],
} // }
}, // },
tableForm:{ // tableForm:{
multiple:true, // multiple:true,
disabled:true, // disabled:true,
// isInpuFocusShow: true, // // isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 // searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题 // searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [ // searchCondition: [
{ // {
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
action: '==', // 查询拼接条件 // action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'workshopCode', // key: 'workshopCode',
value: 'workshopCode', // value: 'workshopCode',
message: '请选择车间信息!', // message: '请选择车间信息!',
action: '==', // 查询拼接条件 // action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel // isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用 // required:true, // 前置添加必有,和isFormModel结合使用
}, // },
{ // {
key: 'productionLineCode', // 查询列表中字段 // key: 'productionLineCode', // 查询列表中字段
value: 'productionLineCode', // 指查询具体值 // value: 'productionLineCode', // 指查询具体值
action: '==', // 查询拼接条件 // action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel // isFormModel:true, // filters中添加筛选的数据--取于formModel
required:false, // 前置添加必有,和isFormModel结合使用 // required:false, // 前置添加必有,和isFormModel结合使用
}, // },
], // ],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 // verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true, // isShowTableFormSearch: true,
isRepeat: true,//是否可以重复添加该条数据 // isRepeat: true,//是否可以重复添加该条数据
verificationParams: [{ // verificationParams: [{
key: 'code', // key: 'code',
action: '==', // action: '==',
value: '', // value: '',
isMainValue: false, // isMainValue: false,
isSearch: true, // isSearch: true,
isFormModel: true, // isFormModel: true,
}], // 失去焦点校验参数 // }], // 失去焦点校验参数
}, // },
}, // },
{ // {
label: '来源库位', // label: '来源库位',
field: 'fromLocationCode', // field: 'fromLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
disabled: true // disabled: true
}, // },
form: { // form: {
componentProps: { // componentProps: {
disabled: true // disabled: true
} // }
}, // },
isDetail:false, // isDetail:false,
isTable:true, // isTable:true,
isTableForm: true, // isTableForm: true,
isForm: false, // isForm: false,
}, // },
{ // {
label: '目标库位', // label: '目标库位',
field: 'toLocationCode', // field: 'toLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
multiple: true,//多选 // multiple: true,//多选
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本 // searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题 // searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 // searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'businessType', // key: 'businessType',
value: 'ReturnToStore', // 生产退料 // value: 'ReturnToStore', // 生产退料
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'isIn', // key: 'isIn',
value: 'in', // value: 'in',
isMainValue: false // isMainValue: false
} // }
] // ]
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
multiple: true,//多选 // multiple: true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本 // searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题 // searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 // searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'businessType', // key: 'businessType',
value: 'ReturnToStore', // 生产退料 // value: 'ReturnToStore', // 生产退料
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'isIn', // key: 'isIn',
value: 'in', // value: 'in',
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
@ -754,9 +910,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
{ {
key: 'locationCode', key: 'locationCode',
value: 'fromLocationCode', value: 'fromLocationCode',
message: '请填写原料库位!', message: '请填写来源库位!',
isMainValue: true isMainValue: true
}, },
// {
// key: 'warehouseCode',
// value: 'toWarehouseCode',
// message: '请填写到仓库!',
// isMainValue: true
// },
{ {
key: 'inventoryStatus', key: 'inventoryStatus',
value: 'OK', value: 'OK',
@ -765,7 +927,9 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
} }
}, },
tableForm:{ tableForm:{
isInpuFocusShow: true, multiple: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
@ -775,9 +939,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
{ {
key: 'locationCode', key: 'locationCode',
value: 'fromLocationCode', value: 'fromLocationCode',
message: '请填写原料库位!', message: '请填写来源库位!',
isMainValue: true isMainValue: true
}, },
// {
// key: 'warehouseCode',
// value: 'toWarehouseCode',
// message: '请填写到仓库!',
// isMainValue: true
// },
{ {
key: 'inventoryStatus', key: 'inventoryStatus',
value: 'OK', value: 'OK',
@ -786,7 +956,17 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
key: 'businessType', key: 'businessType',
value: 'ReturnToStore', // 合格退料 value: 'ReturnToStore', // 合格退料
isMainValue: false isMainValue: false
}] }],
verificationPage: BalanceApi.getBalancePage, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}, },
}, },
// { // {
@ -978,15 +1158,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
} }
} }
}, },
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
{ {
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
@ -1102,7 +1274,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
} }
} }
}, },
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
{ {
label: '包装号', label: '包装号',
field: 'packingNumber', field: 'packingNumber',
@ -1180,12 +1360,10 @@ const validateQty = (rule: any, value: any, callback: any,a,b) => {
//表单校验 //表单校验
export const ProductionreturnRequestDetailRules = reactive({ export const ProductionreturnRequestDetailRules = reactive({
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' } // toLocationCode: [
], // { required: true, message: '请选择目标库位', trigger: 'change' }
toLocationCode: [ // ],
{ required: true, message: '请选择目标库位', trigger: 'change' }
],
productionLineCode: [ productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' } { required: true, message: '请选择生产线代码', trigger: 'change' }
], ],

2
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -101,7 +101,7 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules } from '../productionreturnRequestMain/productionreturnRequestMain.data' import { ProductionreturnRequestMain,ProductionreturnRequestMainRules } from './productionreturnRequestMain.data'
import { ProductionreturnRequestDetail,ProductionreturnRequestDetailRules, ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules,SupplierdeliverRequestPackage } from './productionreturnRequestMainNo.data' import { ProductionreturnRequestDetail,ProductionreturnRequestDetailRules, ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules,SupplierdeliverRequestPackage } from './productionreturnRequestMainNo.data'
import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo' import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo'

1527
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMain.data.ts

File diff suppressed because it is too large

9
src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue

@ -28,6 +28,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #qty="{row}">
<span>{{ Number(row.qty).toFixed(2) }}</span>
</template>
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
@ -58,7 +61,11 @@
:detailAllSchemas="ProductionscrapRecordDetail.allSchemas" :detailAllSchemas="ProductionscrapRecordDetail.allSchemas"
:detailAllSchemasRules="ProductionscrapRecordDetailRules" :detailAllSchemasRules="ProductionscrapRecordDetailRules"
:apiPage="ProductionscrapRecordDetailApi.getProductionscrapRecordDetailPage" :apiPage="ProductionscrapRecordDetailApi.getProductionscrapRecordDetailPage"
/> >
<template #qty="{row}">
<span>{{ Number(row.qty).toFixed(2) }}</span>
</template>
</Detail>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

10
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue

@ -28,6 +28,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #qty="{row}">
<span>{{ Number(row.qty).toFixed(2) }}</span>
</template>
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
@ -79,7 +82,12 @@
:detailValidate="detailValidate" :detailValidate="detailValidate"
@detailBasicFormOnChange="qtyOnChange" @detailBasicFormOnChange="qtyOnChange"
/> >
<template #qty="{row}">
<span>{{ Number(row.qty).toFixed(2) }}</span>
</template>
</Detail>
<!-- 创建标签 --> <!-- 创建标签 -->
<BasicForm <BasicForm

4
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts

@ -1404,13 +1404,13 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 0, min: 0,
precision: 6 precision: 2
} }
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 0, min: 0,
precision: 6 precision: 2
} }
}, },
{ {

1
src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts

@ -566,7 +566,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
multiple:true, multiple:true,
disabled:true, disabled:true,
isShowTableFormSearch: true,
// isInpuFocusShow: true, // isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段

54
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts

@ -224,15 +224,15 @@ export const InventorymoveJobMain = useCrudSchemas(reactive<CrudSchema[]>([
// }, // },
// isTable: false, // isTable: false,
// }, // },
// { {
// label: '备注', label: '备注',
// field: 'remark', field: 'remark',
// sort: 'custom', sort: 'custom',
// table: { table: {
// width: 150 width: 150
// }, },
// isTable: false, isTable: true,
// }, },
// { // {
// label: '自动完成', // label: '自动完成',
// field: 'autoComplete', // field: 'autoComplete',
@ -780,24 +780,24 @@ export const InventorymoveJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150 // width: 150
// }, // },
// }, // },
{ // {
label: '从货主代码', // label: '从货主代码',
field: 'fromOwnerCode', // field: 'fromOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
hiddenInMain:true // hiddenInMain:true
}, // },
{ // {
label: '到货主代码', // label: '到货主代码',
field: 'toOwnerCode', // field: 'toOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
hiddenInMain:true // hiddenInMain:true
}, // },
// { // {
// label: '项目代码', // label: '项目代码',
// field: 'projectCode', // field: 'projectCode',

64
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts

@ -240,14 +240,14 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150 // width: 150
// }, // },
// }, // },
// { {
// label: '备注', label: '备注',
// field: 'remark', field: 'remark',
// sort: 'custom', sort: 'custom',
// table: { table: {
// width: 150 width: 150
// }, },
// }, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -605,30 +605,30 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '项目代码', // label: '项目代码',
field: 'projectCode', // field: 'projectCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '从货主代码', // label: '从货主代码',
field: 'fromOwnerCode', // field: 'fromOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '到货主代码', // label: '到货主代码',
field: 'toOwnerCode', // field: 'toOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '接口类型', label: '接口类型',
field: 'interfaceType', field: 'interfaceType',

16
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordMainNew.data.ts

@ -246,14 +246,14 @@ export const InventorymoveRecordMainNew = useCrudSchemas(reactive<CrudSchema[]>(
// width: 150 // width: 150
// }, // },
// }, // },
// { {
// label: '备注', label: '备注',
// field: 'remark', field: 'remark',
// sort: 'custom', sort: 'custom',
// table: { table: {
// width: 150 width: 150
// }, },
// }, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

64
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainOKHOLD/inventorymoveRecordMainOKHOLD.data.ts

@ -242,14 +242,14 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150 // width: 150
// }, // },
// }, // },
// { {
// label: '备注', label: '备注',
// field: 'remark', field: 'remark',
// sort: 'custom', sort: 'custom',
// table: { table: {
// width: 150 width: 150
// }, },
// }, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -619,30 +619,30 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '项目代码', // label: '项目代码',
field: 'projectCode', // field: 'projectCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '从货主代码', // label: '从货主代码',
field: 'fromOwnerCode', // field: 'fromOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '到货主代码', // label: '到货主代码',
field: 'toOwnerCode', // field: 'toOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '接口类型', label: '接口类型',
field: 'interfaceType', field: 'interfaceType',

66
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -801,39 +801,39 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
} }
}, },
{ // {
label: '从货主代码', // label: '从货主代码',
field: 'fromOwnerCode', // field: 'fromOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '到货主代码', // label: '到货主代码',
field: 'toOwnerCode', // field: 'toOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '项目代码', // label: '项目代码',
field: 'projectCode', // field: 'projectCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
// { // {
// label: '备注', // label: '备注',
// field: 'remark', // field: 'remark',

3
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue

@ -330,6 +330,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
const setV = {} const setV = {}
if (formField == 'fromWarehouseCode') { if (formField == 'fromWarehouseCode') {
tableData.value = []
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({ InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({
key: 'warehouseCode', key: 'warehouseCode',
@ -391,7 +392,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:inventorymove-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-request-main:import'}), // //defaultButtons.defaultImportBtn({hasPermi:'wms:inventorymove-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-request-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:inventorymove-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //

84
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/inventorymoveRequestMain.data.ts

@ -256,15 +256,15 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
// } // }
// } // }
// }, // },
// { {
// label: '备注', label: '备注',
// field: 'remark', field: 'remark',
// sort: 'custom', sort: 'custom',
// table: { table: {
// width: 150 width: 150
// }, },
// isTable: false, isTable: true,
// }, },
// { // {
// label: '自动提交', // label: '自动提交',
// field: 'autoCommit', // field: 'autoCommit',
@ -801,39 +801,39 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
} }
}, },
{ // {
label: '从货主代码', // label: '从货主代码',
field: 'fromOwnerCode', // field: 'fromOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '到货主代码', // label: '到货主代码',
field: 'toOwnerCode', // field: 'toOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '项目代码', // label: '项目代码',
field: 'projectCode', // field: 'projectCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
// { // {
// label: '备注', // label: '备注',
// field: 'remark', // field: 'remark',

66
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/inventorymoveRequestMain.data.ts

@ -802,39 +802,39 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
} }
}, },
{ // {
label: '从货主代码', // label: '从货主代码',
field: 'fromOwnerCode', // field: 'fromOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '到货主代码', // label: '到货主代码',
field: 'toOwnerCode', // field: 'toOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '项目代码', // label: '项目代码',
field: 'projectCode', // field: 'projectCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
// { // {
// label: '备注', // label: '备注',
// field: 'remark', // field: 'remark',

66
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

@ -1352,39 +1352,39 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
} }
}, },
{ // {
label: '从货主代码', // label: '从货主代码',
field: 'fromOwnerCode', // field: 'fromOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '到货主代码', // label: '到货主代码',
field: 'toOwnerCode', // field: 'toOwnerCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
{ // {
label: '项目代码', // label: '项目代码',
field: 'projectCode', // field: 'projectCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
hiddenInMain: true, // hiddenInMain: true,
}, // },
// { // {
// label: '备注', // label: '备注',
// field: 'remark', // field: 'remark',

12
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -339,6 +339,18 @@ const handleExport = async () => {
// //
loadStart() loadStart()
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
tableObject.params.type = 'predict'
if (tableObject.params.isSearch){
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
if (!Array.isArray(tableObject.params.filters)) {
tableObject.params.filters = [];
}
tableObject.params.filters.push(cmd)
}
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {

93
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue

@ -171,18 +171,95 @@ const buttonBaseClick = (val, item) => {
} }
} }
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.receiveStatus) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){ if(findIndex>-1&&findIndex<$index){
return [] return []
} }
return [] return [
{
label: '拒收',
name: 'mainJobRefusal',
hide: isShowMainButton(row, ['0']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
},
{
label: '接收',
name: 'mainJobRecept',
hide: isShowMainButton(row, ['0']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
}
]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if(val == 'mainJobRefusal'){
//
handleRefusal(row)
}else if(val == 'mainJobRecept'){
//
handleRecept(row)
}
}
//
const handleRefusal = async (row) => {
try {
loadStart()
//
ProductreceiptRecordMainApi.refuse(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} catch {
} finally {
loadDone()
}
}
//
const handleRecept = async (row) => {
try {
loadStart()
//
ProductreceiptRecordMainApi.receive(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} catch {
} finally {
loadDone()
}
} }
// //
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
@ -201,7 +278,19 @@ const handleExport = async () => {
// //
loadStart() loadStart()
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) tableObject.params.type = 'scrap'
if (tableObject.params.isSearch){
const cmd = {
'column':'type',
'action':'==',
'value':'scrap'
}
if (!Array.isArray(tableObject.params.filters)) {
tableObject.params.filters = [];
}
tableObject.params.filters.push(cmd)
}
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordScapMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {

15
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts

@ -19,6 +19,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '申请单号', label: '申请单号',
field: 'requestNumber', field: 'requestNumber',
sort: 'custom', sort: 'custom',
sortTableDefault:996,
table: { table: {
width: 180 width: 180
}, },
@ -28,6 +29,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '任务单号', label: '任务单号',
field: 'jobNumber', field: 'jobNumber',
sort: 'custom', sort: 'custom',
sortTableDefault:997,
table: { table: {
width: 180 width: 180
}, },
@ -395,6 +397,18 @@ export const ProductreceiptRecordMainRules = reactive({
* @returns {Array} * @returns {Array}
*/ */
export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '接收状态',
field: 'receiveStatus',
sort: 'custom',
dictType: DICT_TYPE.RECEIVE_STATUS,
dictClass: 'string',
sortTableDefault:998,
isTable: true,
table: {
width: 150
},
},
{ {
label: '生产线代码', label: '生产线代码',
field: 'productionlineCode', field: 'productionlineCode',
@ -730,7 +744,6 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
hiddenInMain:true,
isTableForm:false, isTableForm:false,
} }
])) ]))

15
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -259,6 +259,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
} }
} else { } else {
const setV = {} const setV = {}
if('workshopCode'==formField){
setV['productionLineCode'] = ''
tableData.value = []
}else if('productionLineCode'==formField){
tableData.value = []
}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }
@ -695,6 +701,15 @@ const submitFormLabel = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
let messageList = []
detatableData.tableList.forEach(item=>{
if(item['packUnit'] == item['secondPackUnit']){
messageList.push(item['itemCode'])
}
})
if(messageList.length>0){
message.error(`物料${messageList.join(',')}包装规格1和包装规格2不能相同`)
}
try { try {
detatableData.tableList.forEach(async (item) => { detatableData.tableList.forEach(async (item) => {
// //

3
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -2074,6 +2074,9 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
//表单校验 //表单校验
export const ProductreceiptRequestLabelRules = reactive({ export const ProductreceiptRequestLabelRules = reactive({
secondPackUnit: [
{ required: true, message: '请选择包装规格2', trigger: 'change' }
],
supplierItemCode: [ supplierItemCode: [
{ required: true, message: '请选择供应商', trigger: 'change' } { required: true, message: '请选择供应商', trigger: 'change' }
], ],

203
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/index.vue

@ -0,0 +1,203 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...PurchasereturnRecordMOrderTypeMain.allSchemas.searchSchema,...PurchasereturnRecordMOrderTypeDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PurchasereturnRecordMOrderTypeMain.allSchemas"
:detailAllSchemas="PurchasereturnRecordMOrderTypeDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
: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 #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="PurchasereturnRecordMOrderTypeMainRules"
:formAllSchemas="PurchasereturnRecordMOrderTypeMain.allSchemas"
:tableAllSchemas="PurchasereturnRecordMOrderTypeDetail.allSchemas"
:tableFormRules="PurchasereturnRecordMOrderTypeDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="PurchasereturnRecordMOrderTypeMain.allSchemas"
:detailAllSchemas="PurchasereturnRecordMOrderTypeDetail.allSchemas"
:detailAllSchemasRules="PurchasereturnRecordMOrderTypeDetailRules"
:apiPage="routeName.includes('SCP')?PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageSCP:PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageMorderType"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PurchasereturnRecordMOrderTypeMain,PurchasereturnRecordMOrderTypeMainRules,PurchasereturnRecordMOrderTypeDetail,PurchasereturnRecordMOrderTypeDetailRules } from './purchasereturnRecordMOrderTypeMain.data'
import * as PurchasereturnRecordMainApi from '@/api/wms/purchasereturnRecordMain'
import * as PurchasereturnRecordDetailApi from '@/api/wms/purchasereturnRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getAccessToken } from '@/utils/auth'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading()
// 退
defineOptions({ name: 'PurchasereturnRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...PurchasereturnRecordMOrderTypeMain.allSchemas.tableColumns,...PurchasereturnRecordMOrderTypeDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: routeName.value.includes('SCP')?PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageSCP:PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageMorderType //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereturn-record-main: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 == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [defaultButtons.mainListDocumentPrintBtn(null)]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'documentPrint') {
//
handleDocumentPrint(row.requestNumber,row.itemCode)
}
}
//
const BASE_URL = getJmreportBaseUrl()
const documentSrc = ref(BASE_URL + '/jmreport/view/920874172025987072?token=' + getAccessToken())
const handleDocumentPrint = async (requestNumber,itemCode) => {
window.open(documentSrc.value + '&requestNumber=' + requestNumber +'&itemCode=' + itemCode)
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'recordPurchasereturnMain')
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
if(routeName.value.includes('SCP')){
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}else{
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainMorderType(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}
} catch {
} finally {
loadDone()
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
onActivated(() => {
getList()
})
</script>

994
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMOrderTypeMain/purchasereturnRecordMOrderTypeMain.data.ts

@ -0,0 +1,994 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
/**
* @returns {Array} 退
*/
export const PurchasereturnRecordMOrderTypeMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
sortTableDefault: 1012,
sortSearchDefault: 1,
isSearch: true
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 180
},
sortTableDefault: 1
},
{
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
isTable:false,
table: {
width: 180
},
sortTableDefault: 1
},
{
label: '采购收货记录单号',
field: 'purchaseReceiptRecordNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: false,
isTable:false,
sortTableDefault: 3,
sortSearchDefault: 5
},
{
label: 'qad采购退货记录单号',
field: 'qadPurchaseReturnRecordCode',
sort: 'custom',
table: {
width: 180
},
sortSearchDefault: 3,
sortTableDefault: 4,
isTable: true
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 180
},
sortSearchDefault: 3,
isSearch: false,
isTable:false,
sortTableDefault: 2
},
{
label: '要货计划单号',
field: 'ppNumber',
sort: 'custom',
table: {
width: 180
},
isTable: false
},
{
label: 'Q2通知单号',
field: 'q2Number',
sort: 'custom',
isSearch: false,
isDetail: false,
isTable:false,
sortTableDefault: 4,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q2通知单号', // 查询弹窗标题
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1,
sortSearchDefault: 2,
isSearch: true
},
{
label: '从月台代码',
field: 'fromDockCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '承运商',
field: 'carrierCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '运输方式',
field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '车牌号',
field: 'vehiclePlateNumber',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '生效日期',
field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x'
}
}
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
},
// {
// label: '原因',
// field: 'available',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: true,
// },
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
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')]
},
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTable:false,
}
])
)
//表单校验
export const PurchasereturnRecordMOrderTypeMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }
],
fromWarehouseCode: [
{ required: true, message: '请选择从仓库代码', trigger: 'change' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
outTransaction: [
{ required: true, message: '请输入出库事务类型', trigger: 'blur' }
],
inTransaction: [
{ required: true, message: '请输入入库事务类型', trigger: 'blur' }
],
executeTime: [
{ required: true, message: '请输入执行时间', trigger: 'change' }
],
activeDate: [
{ required: true, message: '请输入生效日期', trigger: 'change' }
],
available: [
{ required: true, message: '请输入是否可用', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
createTime: [
{ required: true, message: '请选择创建时间', trigger: 'change' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
/**
* @returns {Array} 退
*/
export const PurchasereturnRecordMOrderTypeDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: false,
isTable:false,
sortTableDefault: 1001,
sortSearchDefault: 1001,
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: false,
isTable:false,
hiddenInMain: true,
sortSearchDefault: 1002,
sortTableDefault: 1001,
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1004,
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
isTable:false,
table: {
width: 150
},
sortTableDefault: 1004,
form: {
component: 'InputNumber',
}
},
{
label: '退货数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled:false
}
},
sortTableDefault: 1004,
hiddenInMain:false,
isForm:false,
tableForm:{
type:'InputNumber',
min:0,
precision: 6,
disabled:false
}
},
// {
// label: '从器具号',
// field: 'fromContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable:false,
// hiddenInMain: true
// },
// {
// label: '到器具号',
// field: 'toContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable:false,
// hiddenInMain: true
// },
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
sortTableDefault: 1000,
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
table: {
width: 150
},
isSearch: false,
sortTableDefault: 1000,
hiddenInMain: true
},
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable:false,
// hiddenInMain: true
// },
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1009,
hiddenInMain: true
},
// {
// label: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault: 1009,
// hiddenInMain: true
// },
{
label: '从库位组代码',
field: 'fromLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1010,
hiddenInMain: true
},
// {
// label: '到库位组代码',
// field: 'toLocationGroupCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault: 1010,
// hiddenInMain: true
// },
{
label: '从库区代码',
field: 'fromAreaCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1010,
hiddenInMain: true
},
// {
// label: '到库区代码',
// field: 'toAreaCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault: 1010,
// hiddenInMain: true
// },
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1010,
hiddenInMain: true
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1010,
hiddenInMain: true
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1008,
hiddenInMain: true
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 4,
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 5,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
},
sortTableDefault: 1013,
hiddenInMain: true,
isSearch: false
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
sortSearchDefault: 6,
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isTable:false,
table: {
width: 150
},
sortSearchDefault: 6,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
sortSearchDefault: 7,
hiddenInMain: true
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
sortSearchDefault: 7,
hiddenInMain: true
},
// {
// label: '数量',
// field: 'qty',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable:true,
// sortTableDefault: 1005,
// form: {
// component: 'InputNumber',
// }
// },
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sortTableDefault: 1006,
sort: 'custom',
table: {
width: 150
},
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortTableDefault: 1006,
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortTableDefault: 1006,
form: {
component: 'InputNumber',
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1011,
hiddenInMain: true
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true
},
// {
// label: '任务明细ID',
// field: 'jobDetailId',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '退货原因',
field: 'reasonType',
dictType: DICT_TYPE.RETURN_REASON_TYPE,
dictClass: 'string',
// isSearch: true,
isTable: false,
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'Select',
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '退货原因描述',
field: 'reason',
sort: 'custom',
isTable:false,
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1007,
hiddenInMain: true
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
hiddenInMain: false,
sortTableDefault: 1014,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1014,
hiddenInMain: false,
},
]))
//表单校验
export const PurchasereturnRecordMOrderTypeDetailRules = reactive({
fromPackingNumber: [
{ required: true, message: '请选择从包装号', trigger: 'change' }
],
toPackingNumber: [
{ required: true, message: '请选择到包装号', trigger: 'change' }
],
fromBatch: [
{ required: true, message: '请输入从批次', trigger: 'blur' }
],
toBatch: [
{ required: true, message: '请输入到批次', trigger: 'blur' }
],
reason: [
{ required: true, message: '请选择原因', trigger: 'change' }
],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' }
],
fromLocationGroupCode: [
{ required: true, message: '请选择从库位组代码', trigger: 'change' }
],
fromAreaCode: [
{ required: true, message: '请选择从库区代码', trigger: 'change' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
poNumber: [
{ required: true, message: '请选择订单号', trigger: 'change' }
],
poline: [
{ required: true, message: '请选择订单行', trigger: 'change' }
],
})

1140
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue

File diff suppressed because it is too large

1711
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts

File diff suppressed because it is too large

1891
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMain.data.ts

File diff suppressed because it is too large

597
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMainNew.data.ts

@ -0,0 +1,597 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import {
PurchasereceiptRecordDetail,
PurchasereceiptRecordMain
} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as SupplierApi from '@/api/wms/supplier'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
let locationList = await LocationApi.selectBusinessTypeOutLocationAll({
businessType:'PurchaseReturn',
isIn:'out'
})
locationList = locationList.list.map(item=>({
label :item.code,
value :item.code
}))
console.log('locationList',locationList)
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept]
/**
* @returns {Array} 退
*/
export const PurchasereturnRequestMainNew = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table:{
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true
}], // 失去焦点校验参数
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '供应商',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Select',
componentProps: {
options: [],
optionsAlias: {
labelField: 'supplierCode',
valueField: 'supplierCode'
},
filterable: true,
}
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
table: {
width: 180,
},
isForm: true,
form: {
componentProps:{
disabled:true
}
}
},
{
label: ' ',
field: 'hahaha',
table: {
width: 180
},
isTable:false,
isDetail:false,
form: {
componentProps: {
type: 'slot',
}
},
},
{
label: ' ',
field: 'hehehe',
table: {
width: 180
},
isTable:false,
isDetail:false,
form: {
componentProps: {
type: 'slot',
}
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '收货单号',
field: 'receiptNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
isForm: false,
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '退货库位',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Select',
value:locationList[0]['value'],
componentProps: {
options: locationList
}
}
},
{
label: 'Q2通知单号',
field: 'q2Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q2通知单号', // 查询弹窗标题
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
},
{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
}
}
])
)
//表单校验
export const PurchasereturnRequestMainRulesNew = reactive({
itemCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
poNumber: [
{ required: true, message: '请选择采购订单号', trigger: 'blur' }
],
poLine: [
{ required: true, message: '请选择订单行', trigger: 'blur' }
],
locationCode: [
{ required: true, message: '请选择收货单明细', trigger: 'blur' }
]
})
export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '收货日期',
field: 'currentDeliveryDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '收货单号',
field: 'receiptNumber',
sort: 'custom',
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
}
])
)
/**
* @returns {Array} 退
*/
export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'Select',
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '隔离库存数量',
field: 'inventoryBalance',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 6
}
},
tableForm:{
disabled:true,
hidden:false,//控制列是否展示
type:'InputNumber',
min:0,
precision: 6
},
hiddenInMain: true,
isTable: false,
isDetail: false,
},
{
label: '退货数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled:false
}
},
isTable:false,
isTableForm:true,
tableForm:{
type:'InputNumber',
min:0,
precision: 6
}
},
{
label: '退货原因',
field: 'reasonType',
dictType: DICT_TYPE.RETURN_REASON_TYPE,
dictClass: 'string',
// isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'Select',
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '退货原因描述',
field: 'reason',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '操作',
hiddenInMain:true,
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
]))
//表单校验
export const PurchasereturnRequestDetailRulesNew = reactive({
})

7
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts

@ -84,6 +84,13 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
action: '==', // 查询拼接条件 action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
},
{
key: 'poLineType', // 查询列表中字段
value: '', // 指查询具体值
action: 'isNull', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}], }],
verificationParams: [{ verificationParams: [{
key: 'number', key: 'number',

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

@ -68,6 +68,16 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '行类型',
field: 'poLineType',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',

42
src/views/wms/purchasereceiptManage/supplierdeliver/supplierResume/index.vue

@ -0,0 +1,42 @@
<template>
<div style="height:100%;overflow-y: auto;">
<ContentWrap >
<Annex
:annexData="reportAnnex"
:showDownload = "true"
:showPreview="true"
:hiddenDelete = "true"
:upData="{
tableId:30,
tableName:'SupplierdeliverInspectionDetail'
}"
:key="99"
:showAddBtn="false"
/>
</ContentWrap>
</div>
</template>
<script lang="ts" setup>
// supplierResume
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import Annex from '@/components/Annex/src/Annex.vue'
defineOptions({ name: 'supplierResume' })
const route = useRoute() //
const reportAnnex = reactive({
annexList: []
})
onMounted(() => {
getAnnexList()
})
const getAnnexList = async () => {
let res = await SupplierdeliverRequestMainApi.querySupplierResume(route.query.asnNumber as string)
reportAnnex.annexList = res.fileList
}
</script>
<style lang="scss" scoped></style>

464
src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/index.vue

@ -0,0 +1,464 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRecordMain.allSchemas.searchSchema" @search="searchList" @reset="searchList" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRecordMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table ref="tableRef"
:selection="true"
v-clientTable
: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"
@getSelectionRows="getSelectionRows"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, t('ts.单据号'), row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗发票回转 -->
<!--
:apiUpdate="BasicEamProductionlineApi.updateBasicEamProductionline"
:apiCreate="BasicEamProductionlineApi.createBasicEamProductionline"
@searchTableSuccess="searchTableSuccess" -->
<BasicForm
ref="basicFormRef"
@success="submitForm"
:rules="SupplierinvoiceRecordMainTransferRules"
:formAllSchemas="SupplierinvoiceRecordMainTransfer.allSchemas"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:annexTable="[{
label: t('ts.合同附件'),
prop: 'Annex',
tableName:'contract',
showDownload:true,
showPreview: true,
hiddenDelete:true,
hiddenUpload:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
},{
label: t('ts.发票附件'),
prop: 'Annex',
tableName:'invoice',
showDownload:true,
showPreview: true,
hiddenDelete:true,
hiddenUpload:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
},{
label: t('ts.货运单附件'),
prop: 'Annex',
tableName:'waybill',
showDownload:true,
hiddenDelete:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
},{
label: t('ts.其他附件'),
prop: 'Annex',
tableName:'invoiceOther',
showDownload:true,
hiddenDelete:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
}]"
:annexAlias="{
hidden:true,
label:t('ts.其他附件'),
showDownload:true,
hiddenDelete:true
}"
:otherHeadButttonData="[{
label: t('ts.打印明细'),
name: 'printing',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
},{
label: t('ts.导出明细'),
name: 'export-detail',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
}]"
:isBasic="false"
direction="horizontal"
:column="3"
:allSchemas="SupplierinvoiceRecordDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules"
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage"
@buttonBaseClick="detailButtonBaseClick"
>
<!-- 价税合计尾差 -->
<template #Descriptions_totalTaxDiffAmount="{ row }">
<span>{{row['totalTaxDiffAmount']}}<span class="red-text"> (含返利合计:{{ row['rebateTotal'] }})</span></span>
</template>
<!-- 未税尾差 -->
<template #Descriptions_beforeTaxDiffAmount="{ row }">
<span>{{row['beforeTaxDiffAmount']}}<span class="red-text"> (含返利未税:{{ row['discountAmount1'] }})</span></span>
</template>
<!-- 税额尾差 -->
<template #Descriptions_taxAmountDiff="{ row }">
<span>{{row['taxAmountDiff']}}<span class="red-text"> (含返利税额:{{ row['rebateTax'] }})</span></span>
</template>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
</template>
</Detail>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SupplierinvoiceRecordMain,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules,SupplierinvoiceRecordDetailMain,SupplierinvoiceRecordMainTransfer,SupplierinvoiceRecordMainTransferRules } from './purchaseDiscreteOrderMain.data'
import * as SupplierinvoiceRecordMainApi from '@/api/wms/supplierinvoiceRecordMain'
import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as PackageApi from "@/api/wms/package";
import {getAccessToken} from "@/utils/auth";
import {getJmreportBaseUrl} from "@/utils/systemParam";
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import dayjs from 'dayjs'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'purchaseDiscreteOrderMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierinvoiceRecordMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SupplierinvoiceRecordMainApi.getSupplierinvoiceRecordMainPage //
})
tableObject.params.isLS = 1
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-record-main:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
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 == 'export') { //
handleExport()
}else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
tableObject.params.isLS = 1
getList()
}
} else if (val == 'filtrate') { //
}else { //
console.log('其他按钮', item)
}
}
const BASE_URL = getJmreportBaseUrl()
const srcPoint = ref(BASE_URL + '/jmreport/view/970966724605804544?token=' + getAccessToken())
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
})
if(rows.length==0){
message.warning('至少选择一条数据!')
return
}
console.log('批量打印',rows.join(','))
window.open(srcPoint.value+'&ids='+rows.join(','))
}
// -
const butttondata = (row,$index) => {
return [
{
label: t('ts.未读'),
name: 'unread',
type: 'primary',
icon: '',
color: '',
hasPermi: '',
hide: row.isRead==1,
link: true, //
},
{
label: t('ts.已读'),
name: 'read',
type: 'info',
icon: '',
color: '',
hasPermi: '',
hide: row.isRead!=1,
link: true, //
},
{
label: t('ts.查看明细'),
name: 'open_detail',
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}
]
}
/** 添加/修改操作 */
const basicFormRef = ref()
// -
const buttonTableClick = async (val, row) => {
if (val == 'open_detail') { //
openDetail(row, '单据号', row.number)
}else if(val == 'unread'){
//
await SupplierinvoiceRequestMainApi.getDiscreteIsRead({id:row.id})
getList()
}else if(val == 'read'){
//
}
}
//
const submitForm = async (formType, data) => {
data.reverseInvoiceJournal = 'APINVCOR'
data.adjustmentJournal = 'APADJ'
console.log('发票回转',formType, data)
loadStart()
try{
await SupplierinvoiceRecordMainApi.reverseSupplierinvoiceRecordMain(data)
message.success(t('ts.发票回转成功'))
basicFormRef.value.dialogVisible = false
buttonBaseClick('refresh', null)
} finally {
loadDone()
}
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const clicKRowId = ref();
const openDetail = async (row: any, titleName: any, titleValue: any) => {
console.log('openDetail',row)
clicKRowId.value = row.id
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
//masterId
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({
getListApi: SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage //
})
const { getList:requestGetList } = requestTableMethods
requestTableObject.params.number = row.requestNumber
await requestGetList()
if(requestTableObject.tableList.length>0){
row.annexMasterId = requestTableObject.tableList[0].masterId
}
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,"recordSupplierinvoiceMain")
}
const searchList = (model)=>{
if(model.postingDate&&model.postingDate.length>1){
model.postingDate[1] = model.postingDate[1].replace('00:00:00','23:59:59')
}
selectionRows.value = []
let model1 = {
...model,
statuss: model.status.join(',')?model.status.join(','):''
}
model1.isLS = 1
delete model1.status
setSearchParams(model1)
}
const selectionRows = ref<any>([])
const tableRef = ref()
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
/** 导出按钮操作 */
const handleExport = async () => {
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
if (!tableObject.params.createTime || tableObject.params.createTime && tableObject.params. createTime.length == 0) {
delete tableObject.params.createTime
}
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordMain({...tableObject.params,checkNums:rows})
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
const detailButtonBaseClick = (val, item) => {
console.log("点击的按钮",val)
if(val == 'printing'){
//
handleDocumentPrint(clicKRowId.value)
}else if(val === 'export-detail'){
console.log("导出明细:",clicKRowId.value)
handleDetailExport(clicKRowId.value)
}
}
//
const documentSrc = ref(BASE_URL + '/jmreport/view/972639553789239296?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
/** 导出明细按钮操作 */
const exportLoadingDetail = ref(false) //
const handleDetailExport = async (masterId) => {
try {
//
await message.exportConfirm()
//
exportLoadingDetail.value = true
let params = {
masterId: masterId
}
const excelTitle = ref(route.meta.title)
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordDetail(params)
download.excel(data, `${excelTitle.value}明细】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoadingDetail.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: [...searchData.filters,{
action : "==",
column: "isLS",
value: 1,
}]
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>
<style lang="scss" scoped>
.is-red{
border-radius:var(--el-border-radius-base);
border:1px solid var(--el-color-danger);
box-shadow: 0 0 0 1px var(--el-color-danger) inset;
}
.red-text{
color:var(--el-color-danger);
font-weight:700;
}
</style>

1863
src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts

File diff suppressed because it is too large

4
src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts

@ -44,8 +44,8 @@ export const SupplierApbalanceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'ttGltype', field: 'ttGltype',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.TT_GLTYPE, // dictType: DICT_TYPE.TT_GLTYPE,
dictClass: 'string', // dictClass: 'string',
}, },
{ {
label: '类型固定值', label: '类型固定值',

Loading…
Cancel
Save