Browse Source

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

hella_online_20240829
chenfang 4 months ago
parent
commit
e8757eb05f
  1. 6
      src/api/wms/balance/index.ts
  2. 524
      src/api/wms/business/business.ts
  3. 922
      src/api/wms/business/inputBlur.ts
  4. 4
      src/api/wms/location/index.ts
  5. 6
      src/api/wms/supplierinvoiceRecordMain/index.ts
  6. 5
      src/api/wms/unplannedreceiptRequestDetail/index.ts
  7. 240
      src/components/BasicForm/src/BasicForm.vue
  8. 2
      src/components/SearchTable/src/SearchTable.vue
  9. 6
      src/components/TableForm/src/TableForm.vue
  10. 2
      src/locales/en-US.ts
  11. 2
      src/locales/zh-CN.ts
  12. 105
      src/utils/calculate.ts
  13. 2
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  14. 22
      src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts
  15. 28
      src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts
  16. 10
      src/views/wms/basicDataManage/customerManage/project/project.data.ts
  17. 20
      src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts
  18. 22
      src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts
  19. 10
      src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts
  20. 20
      src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts
  21. 32
      src/views/wms/basicDataManage/factoryModeling/location/location.data.ts
  22. 20
      src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts
  23. 20
      src/views/wms/basicDataManage/factoryModeling/process/process.data.ts
  24. 10
      src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts
  25. 40
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  26. 54
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  27. 64
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  28. 40
      src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts
  29. 90
      src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts
  30. 337
      src/views/wms/basicDataManage/orderManage/team/teamForm.vue
  31. 20
      src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts
  32. 20
      src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts
  33. 2
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  34. 2
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue
  35. 160
      src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts
  36. 2
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  37. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  38. 2
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  39. 2
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue
  40. 4
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  41. 2
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  42. 5
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  43. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  44. 4
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  45. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  46. 3
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  47. 18
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  48. 6
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  49. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  50. 2
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  51. 3
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  52. 2
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  53. 5
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  54. 3
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts
  55. 2
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
  56. 2
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
  57. 2
      src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
  58. 85
      src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts
  59. 4
      src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue
  60. 64
      src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts
  61. 2
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  62. 2
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  63. 65
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  64. 2
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  65. 65
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  66. 2
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  67. 62
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  68. 2
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  69. 33
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  70. 2
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  71. 65
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  72. 2
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  73. 67
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  74. 35
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  75. 34
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts
  76. 9
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  77. 193
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  78. 54
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts
  79. 114
      src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts
  80. 66
      src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts
  81. 124
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts
  82. 212
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts
  83. 296
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts
  84. 36
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  85. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  86. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  87. 57
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue
  88. 62
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  89. 325
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/index.vue
  90. 26
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  91. 24
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
  92. 475
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue
  93. 1740
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

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

@ -193,4 +193,8 @@ export const getBalanceByBusinessTypeByItemType = async (params) => {
// 根据code获取数据列表
export const getBalanceItemListByCodes = async (data) => {
  return await request.get({ url: `/wms/balance/listByCodes`,data })
}
}
// 查询bom批次默认数据
export const getBanchBomPage = async (params) => {
return await request.get({ url: `/wms/balance/pageBOM`, params })
}

524
src/api/wms/business/business.ts

@ -1,524 +0,0 @@
// 获取供应商列表
import { getSupplierListByCodes, importTemplate } from '@/api/wms/supplier'
// 获取物料列表
import { getItemListByCodes } from '@/api/wms/itembasic'
// 获取供应商物料列表
import { getSupplierItemListByCodes } from '@/api/wms/supplieritem'
// 获取生产线物料
import { getProductionLineCodelistByCodes } from '@/api/wms/productionlineitem'
// 获取包装规格
import { getPackageunitListByCodes } from '@/api/wms/packageunit'
// 获取物料包装规格
import { getItemPackageunitListByCodes } from '@/api/wms/itempackage'
// 获取客户物料
import { getCustomerItemListByCodes } from '@/api/wms/customeritem'
// 获取库存余额
import { getBalanceItemListByCodes } from '@/api/wms/balance'
import { isString } from 'min-dash'
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
/**
*
* tableFormBlur
* FormBlur
*/
export const tableFormBlurVer = async (headerItem, val, row, index,routeName,formRef,detailData,tableData,callback) => {
if (
headerItem.field == 'fromPackingNumber' ||
headerItem.field == 'packingNumber' ||
headerItem.field == 'itemCode' ||
headerItem.field == 'packUnit' ||
headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'||
headerItem.field == 'toPackUnit'||
headerItem.field == 'supplierItemCode'
) {
let searchField = headerItem.field
let pageApi = ref()
let params = ref()
if (val && isString(val)) {
// const obj = props.tableAllSchemas.tableFormColumns.find((item) => item.field == headerItem.field)
if (val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
row[headerItem.field] = ''
return
}
// 校验
let params = ref({})
let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
params.value[searchCondition1[i].key] = formRef.formModel[
searchCondition1[i].value
]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: row
? row[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
}
}
} else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
params.value[headerItem.field] = val?.trim()
// 判断改包装号是否已经添加
const seen = new Set()
const repeatCode = new Set()
let arr = tableData.map((item) => item[headerItem.field]?.trim())
arr.forEach((item) => {
if (seen.has(item)) {
repeatCode.add(item)
} else {
seen.add(item)
}
})
const arr1 = Array.from(repeatCode)
if (arr1.length > 0) {
message.warning(`${arr1.join(',')}${t('ts.已经存在')}`)
row[headerItem.field] = ''
return
}
if (
headerItem.field == 'fromPackingNumber' ||
headerItem.field == 'packingNumber' ||
headerItem.field == 'itemCode'
) {
// 业务
// 采购退货申请,制品拆解,调拨出库,报废出库申请,合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请,库存修改申请
if (
routeName == 'PurchasereturnRequestMain' ||
routeName == 'ProductdismantleRequestMain' ||
routeName == 'TransferissueRequestMain' ||
routeName == 'ScrapRequestMain' ||
routeName == 'OktoholdRequestMain' ||
routeName == 'HoldtookRequestMain' ||
routeName == 'HoldtoscrapRequestMain' ||
routeName == 'OktoscrapRequestMain' ||
routeName == 'ScraptoholdRequestMain' ||
routeName == 'InventorymoveRequestMain' ||
routeName == 'InventorychangeRequestMain'
) {
// //合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请参数稍有不同
// if (
// routeName == 'OktoholdRequestMain' ||
// routeName == 'HoldtookRequestMain' ||
// routeName == 'HoldtoscrapRequestMain' ||
// routeName == 'OktoscrapRequestMain' ||
// routeName == 'ScraptoholdRequestMain' ||
// routeName == 'InventorymoveRequestMain' ||
// routeName == 'InventorychangeRequestMain'
// ) {
// searchField = 'packingNumber'
// params.value.packingNumber = val?.trim()
// }
// pageApi.value = getBalanceItemListByCodes
} else if (
routeName == 'RepleinshRequestMain' ||
routeName == 'IssueRequestMain' ||
routeName == 'InventoryinitRequestMain'
) {
// 补料申请业务
pageApi.value = getItemListByCodes
searchField = 'code'
params.value.codes = val?.trim()
} else if (
routeName == 'ProductionMainAssemble' ||
routeName == 'ProductionMainASparePart' ||
routeName == 'ProductionMainPredictSparePart' ||
routeName == 'ProductreceiptRequestMain' ||
routeName == 'ProductreceiptRequestMainA' ||
routeName == 'ProductreceiptscrapRequestMain' ||
routeName == 'ProductscrapRequestMain'
) {
// 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
pageApi.value = getProductionLineCodelistByCodes
params.value.productionLineCode=
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode,
params.value.itemCodes=val?.trim()
}
} else if (
headerItem.field == 'packUnit' ||
headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'
) {
searchField = 'packUnit'
//包装规格
// 预生产收货申请,装配收货申请,报修收货申请,客户退货申请,计划外入库,计划外出库,翻包申请
if (
routeName == 'ProductreceiptRequestMain' ||
routeName == 'ProductreceiptRequestMainA' ||
routeName == 'ProductreceiptscrapRequestMain' ||
routeName == 'CustomerreturnRequestMain' ||
routeName == 'UnplannedreceiptRequestMain' ||
routeName == 'UnplannedissueJobMain' ||
routeName == 'PackageoverRequestMain'
) {
params.value.itemCode= row.itemCode
params.value.packUnit= val?.trim()
pageApi.value = getItemPackageunitListByCodes
}
} else if (
headerItem.field == 'supplierItemCode'
) {
// 生产退料申请,隔离退料申请
if (
routeName == 'ProductionreturnRequestMain' ||
routeName == 'ProductionreturnRequestMainNo'
) {
searchField = 'supplierCode'
params.value.itemCodes= row.itemCode
params.value.supplierCode= val?.trim()
pageApi.value = getSupplierItemListByCodes
}
}
const list = ref()
// 调取包装接口
await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : []
// 只查一条数据,多条数据查询默认显示不存在
if (res.length == 1) {
callback(searchField,list.value)
} else {
message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
row[headerItem.field] = ''
return
}
})
}
}
}
export const FormBlur = async (formField, val,routeName,formRef,detailData,formSchema,callback) => {
let pageApi = ref()
let params = ref()
let setV = {}
setV[formField] = ''
if (val && isString(val)) {
if (
formField == 'supplierCode' ||
formField == 'itemCode' ||
formField == 'productItemCode' ||
formField == 'componentItemCode' ||
formField == 'packUnit' ||
formField == 'inPackUnit' ||
formField == 'fromPackingNumber'
) {
let searchField = 'code'
if (formField == 'supplierCode') {
params.value = val?.trim()
pageApi.value = getSupplierListByCodes
} else if (
formField == 'itemCode' ||
formField == 'productItemCode' ||
formField == 'componentItemCode'
) {
// 销售价格单
if (routeName == 'Saleprice') {
params.value = {
customerCode: formRef.formModel.customerCode,
itemCodes: val?.trim()
}
pageApi.value = getCustomerItemListByCodes
searchField = 'itemCode'
}else if (routeName == 'ProductscrapRequestMain') {
// 制品报废申请
params.value = {
productionLineCode:
detailData.productionLine || detailData.productionLineCode,
itemCodes: val?.trim()
}
pageApi.value = getProductionLineCodelistByCodes
searchField = 'itemCode'
}else {
// params.value = val.trim()
searchField = 'code'
params.value={
codes:val?.trim()
}
pageApi.value = getItemListByCodes
}
} else if (formField == 'packUnit') {
if(routeName == 'Itemwarehouse'||routeName == 'Callmaterials'){//物料仓库默认配置,叫料标签
searchField = 'packUnit'
params.value = {
itemCode: formRef.formModel.itemCode,
packUnit: val?.trim()
}
pageApi.value = getItemPackageunitListByCodes
}else{
params.value = val?.trim()
pageApi.value = getPackageunitListByCodes
}
} else if (formField == 'inPackUnit') {
params.value = {
itemCode: formRef.formModel.itemCode,
packUnit: val.trim()
}
pageApi.value = getItemPackageunitListByCodes
}
// else if (formField == 'fromPackingNumber') {
// params.value = {
// packingNumber: val?.trim()
// }
// pageApi.value = getBalanceItemListByCodes
// }
let obj = {}
let searchCondition1 = formSchema.find((item) => item.field == formField).componentProps
.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
obj[searchCondition1[i].key] = formRef.formModel[searchCondition1[i].value]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (obj[searchCondition1[i].key] == '' || obj[searchCondition1[i].key] == undefined) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
}
} else {
obj[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
let obj1 = formSchema.find((item) => item.field == formField)
if (!obj1.componentProps.multiple && val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
formRef.setValues(setV)
return
}
await pageApi.value(params.value).then((res) => {
let arr1 = val.split(',')
let list = ref([])
list.value = res
if (list.value?.length == 0) {
message.alert('暂无数据')
formRef.setValues(setV)
return
}
if (arr1.length != list.value.length) {
let arr2 = list.value.map((item) => item.code)
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
formRef.setValues(setV)
return
}
// emit('searchTableSuccess', formField, searchField, list.value, formRef.value, 'form')
callback(searchField,list.value)
})
}
}
}
// 根据下方输入框失去焦点校验信息
export const getListByBottonInput = async (headerItem, val,row,routeName,formRef,detailData,tableData,callback) => {
let pageApi = ref()
let params = ref({})
let list = ref([])
let field = 'itemCode'
// scp采购订单
if(!val)return;
if (routeName == 'PurchaseMain') {
pageApi.value = getSupplierItemListByCodes
params.value = {
supplierCode: formRef.formModel.supplierCode,
itemCodes: val?.trim(),
available: true
}
} else if (routeName == 'ProductionMain') {
pageApi.value = getProductionLineCodelistByCodes
params.value = {
productionLineCode: formRef.formModel.productionLine,
itemCodes: val?.trim()
}
} else if (
routeName == 'ZZBJDeliverPlanMain' ||
routeName == 'DeliverPlanMain' ||
routeName == 'DeliverRequestMain' ||
routeName == 'ZZBJDeliverRequestMain'
) {
// 自制备件发货计划,发货计划,成品发货申请,自制备件发货申请
pageApi.value = getCustomerItemListByCodes
params.value = {
customerCode: formRef.formModel.customerCode,
itemCodes: val?.trim()
}
}
// else if (routeName == 'UnplannedissueRequestMain') {
// // 计划外出库
// pageApi.value = getBalanceItemListByCodes
// params.value = {
// packingNumber: val?.trim()
// }
// field = 'packingNumber'
// }
else {
params.value.codes = val?.trim()
pageApi.value = getItemListByCodes
}
let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
params.value[searchCondition1[i].key] = formRef.formModel[
searchCondition1[i].value
]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
} else if (searchCondition1[i].isTableRowValue) {
if (searchCondition1[i].required) {
if (row[searchCondition1[i].value] == '' || row[searchCondition1[i].value] == undefined) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
row[searchCondition1[i].value]
//查询当前table表数据的值
params.value[searchCondition1[i].key] = row[searchCondition1[i].value]
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
}else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
} else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : []
let arr1 = val.split(',').map(item=>item.trim())
if (arr1.length != res.length) {
let arr2 = res.map((item) => item[field])
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
return
} else {
let repeatCode = []
if(tableData.length > 0){
tableData.forEach((item) => {
const findIndex = arr1.findIndex(valItem=>valItem==item[field])
if(findIndex > -1){
arr1.splice(findIndex,1)
repeatCode.push(item.itemCode)
}
})
}
if(repeatCode.length>0){
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
return;
}
callback(list.value)
}
})
}

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

@ -0,0 +1,922 @@
// 获取供应商列表
import { getSupplierListByCodes, importTemplate } from '@/api/wms/supplier'
// 获取物料列表
import { getItemListByCodes } from '@/api/wms/itembasic'
// 获取供应商物料列表
import { getSupplierItemListByCodes } from '@/api/wms/supplieritem'
// 获取生产线物料
import { getProductionLineCodelistByCodes } from '@/api/wms/productionlineitem'
// 获取包装规格
import { getPackageunitListByCodes } from '@/api/wms/packageunit'
// 获取物料包装规格
import { getItemPackageunitListByCodes } from '@/api/wms/itempackage'
// 获取客户物料
import { getCustomerItemListByCodes } from '@/api/wms/customeritem'
// 获取库存余额
import { getBalanceItemListByCodes } from '@/api/wms/balance'
import { isString } from 'min-dash'
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
/**
*
* tableFormBlur
* FormBlur
*/
export const tableFormBlurVer = async (headerItem, val, row, index, routeName, formRef, detailData, tableData, callback) => {
if (headerItem.tableForm.searchPage && headerItem.tableForm.verificationParams) {
if (val && isString(val)) {
if (val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
row[headerItem.field] = ''
return
}
// 校验
const params = ref({})
const filters: any[] = []
const searchCondition = headerItem.tableForm.searchCondition //获取data.ts参数信息
const verificationParams = headerItem.tableForm.verificationParams //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition && searchCondition.length > 0) {
for (let i = 0; i < searchCondition.length; i++) {
if (searchCondition[i].isMainValue) {
params.value[searchCondition[i].key] = formRef.formModel[
searchCondition[i].value
]
? formRef.formModel[searchCondition[i].value]
: detailData
? detailData[searchCondition[i].value]
: row
? row[searchCondition[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
params.value[searchCondition[i].key] == '' ||
params.value[searchCondition[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.formModel[searchCondition[i].value]
})
} else if (searchCondition[i].isTableRowValue) {
if (searchCondition[i].required) {
if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
}
//查询当前table表数据的值
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: row[searchCondition[i].value]
})
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//用formModel中的值
if (searchCondition[i].required) {
if (
formRef.formModel[searchCondition[i].value] == '' ||
formRef.formModel[searchCondition[i].value] == undefined
) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.formModel[searchCondition[i].value]
})
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
}
}
}
if (verificationParams && verificationParams.length > 0) {
// 转换筛选条件所需
for (let i = 0; i < verificationParams.length; i++) {
// 扩展 转换为筛选条件进行查询
if (verificationParams[i].isSearch) {
if (verificationParams[i].isFormModel) {
filters.push({
action: verificationParams[i].action,
column: verificationParams[i].key,
value: formRef.formModel[verificationParams[i].value]
? formRef.formModel[verificationParams[i].value]
: val.trim()
})
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
params[verificationParams[i].key] = verificationParams[i].value
}
}
}
// 判断改包装号是否已经添加
const seen = new Set()
const repeatCode = new Set()
const arr = tableData.map((item) => item[headerItem.field]?.trim())
arr.forEach((item) => {
if (item) {
if (seen.has(item)) {
repeatCode.add(item)
} else {
seen.add(item)
}
}
})
const arr1 = Array.from(repeatCode)
if (arr1.length > 0) {
message.warning(`${arr1.join(',')}${t('ts.已经存在')}`)
row[headerItem.field] = ''
return
}
if (filters.length > 0) {
params.value.isSearch = true
params.value.filters = filters
}
const obj = {
by: 'ASC',
pageNo: 1,
pageSize: 20
}
params.value = {
isSearch: params.value.isSearch,
filters: params.value.filters,
...obj
}
const list = ref()
// 调取包装接口
await headerItem.tableForm.searchPage(params.value).then(async (res) => {
list.value = res?.list?.length > 0 ? res.list.slice(0, 1) : []
// 只查一条数据,多条数据查询默认显示不存在
if (list.value?.length == 0) {
message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
row[headerItem.field] = ''
return
}
callback(list.value)
})
}
} else {
if (
headerItem.field == 'fromPackingNumber' ||
headerItem.field == 'packingNumber' ||
headerItem.field == 'itemCode' ||
headerItem.field == 'packUnit' ||
headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'||
headerItem.field == 'toPackUnit'||
headerItem.field == 'supplierItemCode'
) {
let searchField = headerItem.field
let pageApi = ref()
let params = ref()
if (val && isString(val)) {
// const obj = props.tableAllSchemas.tableFormColumns.find((item) => item.field == headerItem.field)
if (val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
row[headerItem.field] = ''
return
}
// 校验
let params = ref({})
let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
params.value[searchCondition1[i].key] = formRef.formModel[
searchCondition1[i].value
]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: row
? row[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
}
}
} else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
params.value[headerItem.field] = val?.trim()
// 判断改包装号是否已经添加
const seen = new Set()
const repeatCode = new Set()
let arr = tableData.map((item) => item[headerItem.field]?.trim())
arr.forEach((item) => {
if (seen.has(item)) {
repeatCode.add(item)
} else {
seen.add(item)
}
})
const arr1 = Array.from(repeatCode)
if (arr1.length > 0) {
message.warning(`${arr1.join(',')}${t('ts.已经存在')}`)
row[headerItem.field] = ''
return
}
if (
headerItem.field == 'fromPackingNumber' ||
headerItem.field == 'packingNumber' ||
headerItem.field == 'itemCode'
) {
// 业务
// 采购退货申请,制品拆解,调拨出库,报废出库申请,合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请,库存修改申请
if (
routeName == 'PurchasereturnRequestMain' ||
routeName == 'ProductdismantleRequestMain' ||
routeName == 'TransferissueRequestMain' ||
routeName == 'ScrapRequestMain' ||
routeName == 'OktoholdRequestMain' ||
routeName == 'HoldtookRequestMain' ||
routeName == 'HoldtoscrapRequestMain' ||
routeName == 'OktoscrapRequestMain' ||
routeName == 'ScraptoholdRequestMain' ||
routeName == 'InventorymoveRequestMain' ||
routeName == 'InventorychangeRequestMain'
) {
// //合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请参数稍有不同
// if (
// routeName == 'OktoholdRequestMain' ||
// routeName == 'HoldtookRequestMain' ||
// routeName == 'HoldtoscrapRequestMain' ||
// routeName == 'OktoscrapRequestMain' ||
// routeName == 'ScraptoholdRequestMain' ||
// routeName == 'InventorymoveRequestMain' ||
// routeName == 'InventorychangeRequestMain'
// ) {
// searchField = 'packingNumber'
// params.value.packingNumber = val?.trim()
// }
// pageApi.value = getBalanceItemListByCodes
} else if (
routeName == 'RepleinshRequestMain' ||
routeName == 'IssueRequestMain' ||
routeName == 'InventoryinitRequestMain'
) {
// 补料申请业务
pageApi.value = getItemListByCodes
searchField = 'code'
params.value.codes = val?.trim()
} else if (
routeName == 'ProductionMainAssemble' ||
routeName == 'ProductionMainASparePart' ||
routeName == 'ProductionMainPredictSparePart' ||
routeName == 'ProductreceiptRequestMain' ||
routeName == 'ProductreceiptRequestMainA' ||
routeName == 'ProductreceiptscrapRequestMain' ||
routeName == 'ProductscrapRequestMain'
) {
// 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
pageApi.value = getProductionLineCodelistByCodes
params.value.productionLineCode=
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode,
params.value.itemCodes=val?.trim()
}
} else if (
headerItem.field == 'packUnit' ||
headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'
) {
searchField = 'packUnit'
//包装规格
// 预生产收货申请,装配收货申请,报修收货申请,客户退货申请,计划外入库,计划外出库,翻包申请
if (
routeName == 'ProductreceiptRequestMain' ||
routeName == 'ProductreceiptRequestMainA' ||
routeName == 'ProductreceiptscrapRequestMain' ||
routeName == 'CustomerreturnRequestMain' ||
routeName == 'UnplannedreceiptRequestMain' ||
routeName == 'UnplannedissueJobMain' ||
routeName == 'PackageoverRequestMain'
) {
params.value.itemCode= row.itemCode
params.value.packUnit= val?.trim()
pageApi.value = getItemPackageunitListByCodes
}
} else if (
headerItem.field == 'supplierItemCode'
) {
// 生产退料申请,隔离退料申请
if (
routeName == 'ProductionreturnRequestMain' ||
routeName == 'ProductionreturnRequestMainNo'
) {
searchField = 'supplierCode'
params.value.itemCodes= row.itemCode
params.value.supplierCode= val?.trim()
pageApi.value = getSupplierItemListByCodes
}
}
const list = ref()
// 调取包装接口
await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : []
// 只查一条数据,多条数据查询默认显示不存在
if (res.length == 1) {
callback(list.value)
} else {
message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
row[headerItem.field] = ''
return
}
})
}
}
}
}
export const FormBlur = async (field, val, routeName, formRef, detailData, formSchema, callback) => {
if (formSchema.searchPage && formSchema.verificationParams) {
//获取data.ts参数信息
const searchCondition = formSchema?.searchCondition || []
//获取失去焦点参数信息
const verificationParams = formSchema?.verificationParams ||
[]
console.log('走新方法啦')
// searchCondition = [...searchCondition, ...verificationParams]
if (val && isString(val)) {
const setV = {}
setV[field] = ''
let params = {}
const _searchCondition = {}
const filters: any[] = []
if (searchCondition && searchCondition.length > 0) {
// 转换筛选条件所需
for (let i = 0; i < searchCondition.length; i++) {
// searchCondition.forEach((item) => {
// 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取
if (searchCondition[i].isMainValue) {
_searchCondition[searchCondition[i].key] = formRef.formModel[
searchCondition[i].value
]
? formRef.formModel[searchCondition[i].value]
: detailData
? detailData[searchCondition[i].value]
: // : row
// ? row[searchCondition[i].value]
''
// 是否含有空参数情况
let isNull = false
if (
_searchCondition[searchCondition[i].key] == '' ||
_searchCondition[searchCondition[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
formRef.setValues(setV)
return
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.formModel[searchCondition[i].value]
})
}
// else if (searchCondition[i].isTableRowValue) {
// if (searchCondition[i].required) {
// if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
// message.warning(
// searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
// )
// return
// }
// }
// row[searchCondition[i].value]
// //查询当前table表数据的值
// _searchCondition[searchCondition[i].key] = row[searchCondition[i].value]
// }
else {
// 扩展 转换为筛选条件进行查询
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//用formModel中的值
if (searchCondition[i].required) {
if (
formRef.formModel[searchCondition[i].value] == '' ||
formRef.formModel[searchCondition[i].value] == undefined
) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
formRef.setValues(setV)
return
}
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.formModel[searchCondition[i].value]
})
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
}
}
}
if (verificationParams && verificationParams.length > 0) {
// 转换筛选条件所需
for (let i = 0; i < verificationParams.length; i++) {
// 扩展 转换为筛选条件进行查询
if (verificationParams[i].isSearch) {
if (verificationParams[i].isFormModel) {
filters.push({
action: verificationParams[i].action,
column: verificationParams[i].key,
value: formRef.formModel[verificationParams[i].value]
? formRef.formModel[verificationParams[i].value]
: val.trim()
})
} else {
filters.push({
action: verificationParams[i].action,
column: verificationParams[i].key,
value: verificationParams[i].value
})
}
} else {
_searchCondition[verificationParams[i].key] = verificationParams[i].value
}
}
}
console.log(filters)
if (filters.length > 0) {
_searchCondition.isSearch = true
_searchCondition.filters = filters
}
console.log(4545, _searchCondition)
const obj = {
by: 'ASC',
pageNo: 1,
pageSize: 20
}
console.log(888, _searchCondition)
params = {
isSearch: _searchCondition.isSearch,
filters: _searchCondition.filters,
...obj
}
// console.log(333,params)
if (!formSchema?.multiple && val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
formRef.setValues(setV)
return
}
await formSchema.searchPage(params).then((res) => {
const arr1 = val.split(',')
const list = ref([])
list.value = res?.list?.length > 0 ? res.list.slice(0, 1) : []
if (list.value?.length == 0) {
message.alert('暂无数据')
formRef.setValues(setV)
return
}
if (arr1.length != list.value.length) {
const arr2 = list.value.map((item) => item.code)
const str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
formRef.setValues(setV)
return
}
callback(list.value)
})
}
}
else {
let pageApi = ref()
let params = ref()
let setV = {}
setV[field] = ''
if (val && isString(val)) {
if (
field == 'supplierCode' ||
field == 'itemCode' ||
field == 'productItemCode' ||
field == 'componentItemCode' ||
field == 'packUnit' ||
field == 'inPackUnit' ||
field == 'fromPackingNumber'
) {
let searchField = 'code'
if (field == 'supplierCode') {
params.value = val?.trim()
pageApi.value = getSupplierListByCodes
} else if (
field == 'itemCode' ||
field == 'productItemCode' ||
field == 'componentItemCode'
) {
// 销售价格单
if (routeName == 'Saleprice') {
params.value = {
customerCode: formRef.formModel.customerCode,
itemCodes: val?.trim()
}
pageApi.value = getCustomerItemListByCodes
searchField = 'itemCode'
} else if (routeName == 'ProductscrapRequestMain') {
// 制品报废申请
params.value = {
productionLineCode:
detailData.productionLine || detailData.productionLineCode,
itemCodes: val?.trim()
}
pageApi.value = getProductionLineCodelistByCodes
searchField = 'itemCode'
} else {
// params.value = val.trim()
searchField = 'code'
params.value = {
codes: val?.trim()
}
pageApi.value = getItemListByCodes
}
} else if (field == 'packUnit') {
if (routeName == 'Itemwarehouse' || routeName == 'Callmaterials') {//物料仓库默认配置,叫料标签
searchField = 'packUnit'
params.value = {
itemCode: formRef.formModel.itemCode,
packUnit: val?.trim()
}
pageApi.value = getItemPackageunitListByCodes
} else {
params.value = val?.trim()
pageApi.value = getPackageunitListByCodes
}
} else if (field == 'inPackUnit') {
params.value = {
itemCode: formRef.formModel.itemCode,
packUnit: val.trim()
}
pageApi.value = getItemPackageunitListByCodes
}
// else if (formField == 'fromPackingNumber') {
// params.value = {
// packingNumber: val?.trim()
// }
// pageApi.value = getBalanceItemListByCodes
// }
let obj = {}
let searchCondition1 = formSchema.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
obj[searchCondition1[i].key] = formRef.formModel[searchCondition1[i].value]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (obj[searchCondition1[i].key] == '' || obj[searchCondition1[i].key] == undefined) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
}
} else {
obj[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
if (!formSchema.multiple && val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
formRef.setValues(setV)
return
}
await pageApi.value(params.value).then((res) => {
let arr1 = val.split(',')
let list = ref([])
list.value = res
if (list.value?.length == 0) {
message.alert('暂无数据')
formRef.setValues(setV)
return
}
if (arr1.length != list.value.length) {
let arr2 = list.value.map((item) => item.code)
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
formRef.setValues(setV)
return
}
// emit('searchTableSuccess', formField, searchField, list.value, formRef.value, 'form')
callback(list.value)
})
}
}
}
}
// 根据下方输入框失去焦点校验信息
export const getListByBottonInput = async (headerItem, val, row, routeName, formRef, detailData, tableData, callback) => {
let tableFormSchemaObj = headerItem?.tableForm
console.log(333,tableFormSchemaObj)
if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) {
let params = ref({})
let list = ref([])
console.log(3344)
let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
let verificationParams = headerItem.tableForm.verificationParams //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
params.value[searchCondition1[i].key] = formRef.formModel[
searchCondition1[i].value
]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
} else if (searchCondition1[i].isTableRowValue) {
if (searchCondition1[i].required) {
if (row[searchCondition1[i].value] == '' || row[searchCondition1[i].value] == undefined) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
row[searchCondition1[i].value]
//查询当前table表数据的值
params.value[searchCondition1[i].key] = row[searchCondition1[i].value]
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
} else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
} else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
console.log(999, verificationParams)
if (verificationParams && verificationParams.length > 0) {
for (let i = 0; i < verificationParams.length; i++) {
params.value[verificationParams[i].key] = val
}
}
await tableFormSchemaObj.verificationPage(params.value).then(async (res) => {
list.value = res ? res : []
let arr1 = val.split(',').map(item => item.trim())
if (arr1.length != res.length) {
let arr2 = res.map((item) => item[field])
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
return
} else {
let repeatCode = []
if (tableData.length > 0) {
tableData.forEach((item) => {
const findIndex = arr1.findIndex(valItem => valItem == item[field])
if (findIndex > -1) {
arr1.splice(findIndex, 1)
repeatCode.push(item.itemCode)
}
})
}
if (repeatCode.length > 0) {
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
return;
}
callback(list.value)
}
})
return
} else {
let pageApi = ref()
let params = ref({})
let list = ref([])
let field = 'itemCode'
// scp采购订单
if (!val) return;
if (routeName == 'PurchaseMain') {
pageApi.value = getSupplierItemListByCodes
params.value = {
supplierCode: formRef.formModel.supplierCode,
itemCodes: val?.trim(),
available: true
}
} else if (routeName == 'ProductionMain') {
pageApi.value = getProductionLineCodelistByCodes
params.value = {
productionLineCode: formRef.formModel.productionLine,
itemCodes: val?.trim()
}
} else if (
routeName == 'ZZBJDeliverPlanMain' ||
routeName == 'DeliverPlanMain' ||
routeName == 'DeliverRequestMain' ||
routeName == 'ZZBJDeliverRequestMain'
) {
// 自制备件发货计划,发货计划,成品发货申请,自制备件发货申请
pageApi.value = getCustomerItemListByCodes
params.value = {
customerCode: formRef.formModel.customerCode,
itemCodes: val?.trim()
}
}
// else if (routeName == 'UnplannedissueRequestMain') {
// // 计划外出库
// pageApi.value = getBalanceItemListByCodes
// params.value = {
// packingNumber: val?.trim()
// }
// field = 'packingNumber'
// }
else {
params.value.codes = val?.trim()
pageApi.value = getItemListByCodes
}
await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : []
let arr1 = val.split(',').map(item => item.trim())
if (arr1.length != res.length) {
let arr2 = res.map((item) => item[field])
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
return
} else {
let repeatCode = []
if (tableData.length > 0) {
tableData.forEach((item) => {
const findIndex = arr1.findIndex(valItem => valItem == item[field])
if (findIndex > -1) {
arr1.splice(findIndex, 1)
repeatCode.push(item.itemCode)
}
})
}
if (repeatCode.length > 0) {
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
return;
}
callback(list.value)
}
})
}
}

4
src/api/wms/location/index.ts

@ -136,3 +136,7 @@ export const selectConfigToLocation = async (params) => {
return request.get({ url: `/wms/location/pageConfigToLocation`, params })
}
}
// 根据code获取数据列表
export const getLocationByCodes = async (params) => {
return await request.get({ url: `/wms/location/listByCodes`, params })
}

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

@ -60,4 +60,8 @@ export const exportSupplierinvoiceRecordMain = async (data) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-record-main/get-import-template' })
}
}
export const exportSupplierinvoiceRecordDetail = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-record-deatil/export-excel`, params })
}

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

@ -38,6 +38,11 @@ export const getUnplannedreceiptRequestDetailPage = async (params) => {
}
}
// 查询计划外入库申请子打印标签
export const getUnplannedreceiptRequestDetailPageCreateLabel = async (params) => {
return await request.get({ url: `/wms/unplannedreceipt-request-detail/pageCreateLabel`, params })
}
// 查询计划外入库申请子详情
export const getUnplannedreceiptRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/unplannedreceipt-request-detail/get?id=` + id })

240
src/components/BasicForm/src/BasicForm.vue

@ -134,12 +134,8 @@
:showSearchTableQueryFields="showSearchTableQueryFields"
@searchTableSuccess="searchTableSuccess"
>
<template #selectionsActions="selections">
<slot name="searchTableSelectionsActions" :selections="selections"></slot>
</template>
<template v-for="name in Object.keys($slots)" :key="name" #[name]>
<slot :name="name"></slot>
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{ selections }">
<slot :name="name" :selections="selections"></slot>
</template>
</SearchTable>
</template>
@ -150,7 +146,7 @@ import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue'
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/business'
import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/inputBlur'
import { isString } from 'min-dash'
const props = defineProps({
@ -846,210 +842,25 @@ const onChange = (field, cur) => {
const onBlur = async (field, e) => {
isExecute.value = false
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps
if (formSchemaObj?.enterSearch) {
if (formSchemaObj.searchPage && formSchemaObj.verificationParams) {
//data.ts
let searchCondition =
formSchema.value.find((item) => item.field == field)?.componentProps?.searchCondition || []
//
let verificationParams =
formSchema.value.find((item) => item.field == field)?.componentProps?.verificationParams ||
[]
console.log('走新方法啦')
// searchCondition = [...searchCondition, ...verificationParams]
if (e && isString(e)) {
let setV = {}
setV[field] = ''
let params = {}
const _searchCondition = {}
let filters: any[] = []
if (searchCondition && searchCondition.length > 0) {
//
for (var i = 0; i < searchCondition.length; i++) {
// searchCondition.forEach((item) => {
// row
if (searchCondition[i].isMainValue) {
_searchCondition[searchCondition[i].key] = formRef.value.formModel[
searchCondition[i].value
]
? formRef.value.formModel[searchCondition[i].value]
: props.detailData
? props.detailData[searchCondition[i].value]
: // : row
// ? row[searchCondition[i].value]
''
//
let isNull = false
if (
_searchCondition[searchCondition[i].key] == '' ||
_searchCondition[searchCondition[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
})
}
// else if (searchCondition[i].isTableRowValue) {
// if (searchCondition[i].required) {
// if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
// message.warning(
// searchCondition[i].message ? searchCondition[i].message : ''
// )
// return
// }
// }
// row[searchCondition[i].value]
// //table
// _searchCondition[searchCondition[i].key] = row[searchCondition[i].value]
// }
else {
//
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//formModel
if (searchCondition[i].required) {
if (
formRef.value.formModel[searchCondition[i].value] == '' ||
formRef.value.formModel[searchCondition[i].value] == undefined
) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
})
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
}
}
}
if (verificationParams && verificationParams.length > 0) {
//
for (var i = 0; i < verificationParams.length; i++) {
//
if (verificationParams[i].isSearch) {
if (verificationParams[i].isFormModel) {
filters.push({
action: verificationParams[i].action,
column: verificationParams[i].key,
value: formRef.value.formModel[verificationParams[i].value]
? formRef.value.formModel[verificationParams[i].value]
: e.trim()
})
} else {
filters.push({
action: verificationParams[i].action,
column: verificationParams[i].key,
value: verificationParams[i].value
})
}
} else {
_searchCondition[verificationParams[i].key] = verificationParams[i].value
}
}
}
if (filters.length > 0) {
_searchCondition.isSearch = true
_searchCondition.filters = filters
}
console.log(4545, _searchCondition)
let obj = {
by: 'ASC',
pageNo: 1,
pageSize: 20
}
console.log(888,_searchCondition)
params = {
isSearch:_searchCondition.isSearch,
filters:_searchCondition.filters,
...obj
}
// console.log(333,params)
if (!formSchemaObj?.multiple && e.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
formRef.value.setValues(setV)
return
}
await formSchemaObj.searchPage(params).then((res) => {
let arr1 = e.split(',')
let list = ref([])
list.value = res.list
if (list.value?.length == 0) {
message.alert('暂无数据')
formRef.value.setValues(setV)
return
}
if (arr1.length != list.value.length) {
let arr2 = list.value.map((item) => item.code)
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
formRef.value.setValues(setV)
return
}
})
}
} else {
if (
field == 'supplierCode' ||
field == 'itemCode' ||
field == 'productItemCode' ||
field == 'componentItemCode' ||
field == 'packUnit' ||
field == 'inPackUnit' ||
field == 'fromPackingNumber'
) {
await FormBlur(
field,
e,
routeName.value,
formRef.value,
props.detailData,
formSchema.value,
(searchField, list) => {
emit('searchTableSuccess', field, searchField, list, formRef.value, 'form')
}
)
return
if (formSchemaObj?.enterSearch) {
await FormBlur(
field,
e,
routeName.value,
formRef.value,
props.detailData,
formSchemaObj,
(list) => {
emit('searchTableSuccess', field, formSchemaObj.searchField, list, formRef.value, 'form')
}
}
)
} else {
emit('onBlur', field, e)
}
isExecute.value = true
}
//
const batchAdd = async (val) => {
const row = {}
@ -1093,11 +904,11 @@ const inputStringBlur = async (headerItem, val, row, index) => {
formRef.value,
props.detailData,
props.tableData,
(searchField, list) => {
( list) => {
emit(
'searchTableSuccess',
headerItem.field,
searchField,
headerItem.tableForm.searchField,
list,
formRef.value,
'tableForm',
@ -1116,8 +927,23 @@ const inputStringBlur = async (headerItem, val, row, index) => {
* @param field 当前操作字段
* @param e
*/
const onEnter = (field, value, e) => {
emit('onEnter', field, value, e)
const onEnter = async (field, value, e) => {
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps
if (formSchemaObj?.enterSearch && formSchemaObj?.isEnter ) {
await FormBlur(
field,
value,
routeName.value,
formRef.value,
props.detailData,
formSchemaObj,
(list) => {
emit('onEnter', field, value, e)
}
)
} else {
emit('onEnter', field, value, e)
}
}
//

2
src/components/SearchTable/src/SearchTable.vue

@ -37,7 +37,7 @@
</ContentWrap>
<template #footer>
<div class="flex items-center">
<slot name="selectionsActions" :selections="searchTableRef?searchTableRef.selections:[]"></slot>
<slot :name="'selectionsActions'+formFieldRef" :selections="searchTableRef?searchTableRef.selections:[]"></slot>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="searchDialogVisible = false"> </el-button>

6
src/components/TableForm/src/TableForm.vue

@ -402,6 +402,8 @@
<div
class="p-12px"
v-if="
isShowTableFormSearch||
routeName == 'PurchaseMain' ||
routeName == 'PurchaseMain' ||
routeName == 'ProductionMain' ||
routeName == 'ZZBJDeliverPlanMain' ||
@ -501,6 +503,10 @@ const props = defineProps({
default: ''
}
})
const isShowTableFormSearch = ref(false)
console.log(33333,props.tableFields)
isShowTableFormSearch.value =props.tableFields.some(item=>item.isShowTableFormSearch)
//
const emit = defineEmits([
'tableSelectionChange',

2
src/locales/en-US.ts

@ -1152,6 +1152,8 @@ export default {
'要货预测-供应商':'Demand forecast-Supplier',
:'All',
:'Planner',
:'Min',
:'Max',
},

2
src/locales/zh-CN.ts

@ -1152,6 +1152,8 @@ export default {
'要货预测-供应商':'要货预测-供应商',
:'全选',
:'计划员',
:'最小值',
:'最大值',
},

105
src/utils/calculate.ts

@ -0,0 +1,105 @@
// 判断传入的值-是否为整数
function isInteger(obj) {
return Math.floor(obj) === obj
}
// 将一个浮点数转成整数,返回整数和倍数。如 3.14 >> 314,倍数是 100
// @param floatNum { number } 小数
// @return { object }
// { times: 100, num: 314 }
// 用于返回整数和倍数
function toInteger(floatNum) {
// 声明一个对象用来保存倍数和整数
const ret = { times: 1, num: 0 }
// 第一种情况:是整数
if (isInteger(floatNum)) {
// 把整数给 ret中的 num
ret.num = floatNum
return ret // 最后返回 ret
}
// 第二种情况-不是整数,
const strfi = floatNum + '' // 转为字符串 "0.1"
const dotPos = strfi.indexOf('.') // 查询小数点
const len = strfi.substr(dotPos + 1).length; // 获取小数点后的长度
const times = Math.pow(10, len) // 放大多少倍
const intNum = Number(floatNum.toString().replace('.', '')) // 返回 转为字符串 截取掉小数点 最后转为数字(整数)
// 把获取到的倍数和整数存入对象中
ret.times = times
ret.num = intNum
return ret
}
// 核心方法,实现加减乘除运算,确保不丢失精度
// 思路:把小数放大为整数(乘),进行算术运算,再缩小为小数(除)
// @param a { number } 运算数1
// @param b { number } 运算数2
// @param digits { number } 精度,保留的小数点数,比如 2, 即保留为两位小数
// @param op { string } 运算类型,有加减乘除(add / subtract / multiply / divide)
function operation(a, b, digits, op) {
// 获取倍数和整数的对象
const o1 = toInteger(a)
const o2 = toInteger(b)
// 提取整数
const n1 = o1.num
const n2 = o2.num
// 提取倍数
const t1 = o1.times
const t2 = o2.times
// 获取最大倍数
const max = t1 > t2 ? t1 : t2
let result = 0 //
switch (op) {
case 'add':
if (t1 === t2) { // 两个小数位数相同
result = n1 + n2 //
} else if (t1 > t2) { // o1 小数位 大于 o2
result = n1 + n2 * (t1 / t2)
} else { // o1 小数位 小于 o2
result = n1 * (t2 / t1) + n2
}
return result / max
case 'subtract':
if (t1 === t2) {
result = n1 - n2
} else if (t1 > t2) {
result = n1 - n2 * (t1 / t2)
} else {
result = n1 * (t2 / t1) - n2
}
return result / max
case 'multiply':
result = (n1 * n2) / (t1 * t2)
return result
case 'divide':
result = (n1 / n2) * (t2 / t1)
return result
}
}
// 加减乘除的四个接口
export function add(a, b, digits) {
return operation(a, b, digits, 'add')
}
export function subtract(a, b, digits) {
return operation(a, b, digits, 'subtract')
}
export function multiply(a, b, digits) {
return operation(a, b, digits, 'multiply')
}
export function divide(a, b, digits) {
return operation(a, b, digits, 'divide')
}
// console.log(floatObj.add(0.5, 0.2))
// console.log(floatObj.add(0.12, 0.3))

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

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

22
src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts

@ -49,6 +49,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -59,7 +60,15 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -73,6 +82,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -89,7 +99,15 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
value: "wmsArea",
message: '请选择库区代码!',
isMainValue: true
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

28
src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts

@ -52,7 +52,15 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
action: '==',
isSearch: true,
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -122,6 +130,14 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '仓库基础信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -160,7 +176,15 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

10
src/views/wms/basicDataManage/customerManage/project/project.data.ts

@ -46,7 +46,15 @@ export const Project = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
},

20
src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts

@ -37,7 +37,15 @@ export const Saleprice = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
},
@ -68,7 +76,15 @@ export const Saleprice = useCrudSchemas(reactive<CrudSchema[]>([
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
}]
}],
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
},

22
src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts

@ -112,12 +112,21 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage // 查询弹窗所需分页方法
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -131,12 +140,21 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage // 查询弹窗所需分页方法
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

10
src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts

@ -52,7 +52,15 @@ export const Area = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

20
src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts

@ -67,7 +67,15 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -92,7 +100,15 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

32
src/views/wms/basicDataManage/factoryModeling/location/location.data.ts

@ -58,7 +58,15 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -89,7 +97,15 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -119,7 +135,15 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -416,7 +440,7 @@ export const LocationRules = reactive({
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{required: true, max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
aisle: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

20
src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts

@ -55,7 +55,15 @@ export const Locationgroup = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -86,7 +94,15 @@ export const Locationgroup = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

20
src/views/wms/basicDataManage/factoryModeling/process/process.data.ts

@ -67,7 +67,15 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -97,7 +105,15 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

10
src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts

@ -67,7 +67,15 @@ export const Productionline = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

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

@ -76,7 +76,15 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -107,7 +115,15 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -137,7 +153,15 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
key: 'areaType',
value: confgiDataOne.areaType,
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -167,7 +191,15 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
key: 'areaType',
value: confgiDataTwo.areaType,
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

54
src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts

@ -155,12 +155,12 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{
key: 'available',
value: 'TRUE',
},{
}, {
key: 'itemCode',
value: 'itemCode',
message: "请选择物料代码",
isMainValue: true
}],
}],
verificationParams: [{
key: 'packUnit',
action: '==',
@ -195,12 +195,12 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{
key: 'available',
value: 'TRUE',
},{
}, {
key: 'itemCode',
value: 'itemCode',
message: "请选择物料代码",
isMainValue: true
}],
}],
verificationParams: [{
key: 'packUnit',
action: '==',
@ -210,7 +210,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
isFormModel: true,
required: true,
message: '请选择物料代码',
isBlurParams:true,//是否是失去焦点的方法的参数
isBlurParams: true,//是否是失去焦点的方法的参数
}], // 失去焦点校验参数
}
}
@ -304,7 +304,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -344,7 +344,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
// {
// label: '入库自动转为出库包装规格',
// field: 'newlyToOutpackunit',
@ -440,7 +440,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE'
}
},
isTable:false
isTable: false
},
{
label: '超过高储是否允许叫料',
@ -456,7 +456,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE'
}
},
isTable:false
isTable: false
},
{
label: '优先空库位',
@ -623,7 +623,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
},
table: {
width: 150
} ,
},
form: {
component: 'DatePicker',
componentProps: {
@ -642,7 +642,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
},
table: {
width: 150
} ,
},
form: {
component: 'DatePicker',
componentProps: {
@ -704,7 +704,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 120
} ,
},
},
{
label: '操作',
@ -744,8 +744,8 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '库位代码',
field: 'locationCode',
sort: 'custom',
tableForm:{
multiple:true,//多选
tableForm: {
multiple: true,//多选
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -756,18 +756,28 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
},{
}, {
key: 'areaCode',
value: 'areaCode',
message: '请选择区域代码!',
isMainValue: true
}]
}],
verificationParams: [{
key: 'codes',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}],
verificationPage: LocationApi.getLocationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true, //
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//多选
multiple: true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
@ -777,11 +787,19 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
},{
}, {
key: 'areaCode',
value: 'areaCode',
message: '请选择区域代码!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}]
}
}

64
src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts

@ -64,7 +64,15 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -95,7 +103,15 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
value: 'itemCode',
message: '请填写物料代码!',
isMainValue: true
}]
}],
verificationParams: [{
key: 'packUnit',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -190,6 +206,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -200,7 +217,15 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -214,12 +239,21 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage // 查询弹窗所需分页方法
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -233,12 +267,21 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage // 查询弹窗所需分页方法
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法,
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -252,6 +295,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -272,7 +316,15 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
key:'available',
value:'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{

40
src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts

@ -199,7 +199,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -476,7 +484,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -501,7 +517,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -526,7 +550,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

90
src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts

@ -174,7 +174,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -419,7 +427,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -444,7 +460,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -469,7 +493,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -494,7 +526,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -534,7 +574,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -566,7 +614,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'lineNumber',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -598,7 +654,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -630,7 +694,15 @@ export const PackageInventory = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'asnNumber',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

337
src/views/wms/basicDataManage/orderManage/team/teamForm.vue

@ -10,7 +10,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="班组编码" prop="code">
<el-input v-model="formData.code" placeholder="请输入班组编码" :disabled="isDisabled"/>
<el-input v-model="formData.code" placeholder="请输入班组编码" :disabled="isDisabled" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -35,8 +35,13 @@
<el-col :span="12">
<el-form-item label="负责人" prop="teamMonitorName">
<div class="input-with-button">
<el-input v-model="formData.teamMonitorName" placeholder="请选择负责人" :style="{ width: '35%' }"/>
<el-button :icon="Search" @click="addMonitor"/>
<el-input
v-model="formData.teamMonitorName"
placeholder="请选择负责人"
:style="{ width: '35%' }"
@blur="addUserBlur('teamMonitorName', formData.teamMonitorName)"
/>
<el-button :icon="Search" @click="addMonitor" />
</div>
</el-form-item>
</el-col>
@ -45,16 +50,26 @@
<el-col :span="12">
<el-form-item label="车间代码" prop="workshopCode">
<div class="input-with-button">
<el-input v-model="formData.workshopCode" placeholder="请选择车间代码" :style="{ width: '35%' }"/>
<el-button :icon="Search" @click="addWorkShop"/>
<el-input
v-model="formData.workshopCode"
placeholder="请选择车间代码"
:style="{ width: '35%' }"
@blur="addWorkshopCodeBlur('workshopCode', formData.workshopCode)"
/>
<el-button :icon="Search" @click="addWorkShop" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产线代码" prop="productionLineCode">
<div class="input-with-button">
<el-input v-model="formData.productionLineCode" placeholder="请选择产线代码" :style="{ width: '35%' }"/>
<el-button :icon="Search" @click="addProductionLine"/>
<el-input
v-model="formData.productionLineCode"
placeholder="请选择产线代码"
:style="{ width: '35%' }"
@blur="addProductionLineBlur('productionLineCode', formData.productionLineCode)"
/>
<el-button :icon="Search" @click="addProductionLine" />
</div>
</el-form-item>
</el-col>
@ -68,7 +83,7 @@
placeholder="请选择生效时间"
format="YYYY-MM-DD HH:mm:ss"
value-format="x"
style="width: 100%;"
style="width: 100%"
/>
</el-form-item>
</el-col>
@ -80,7 +95,7 @@
placeholder="请选择失效时间"
format="YYYY-MM-DD HH:mm:ss"
value-format="x"
style="width: 100%;"
style="width: 100%"
/>
</el-form-item>
</el-col>
@ -89,9 +104,14 @@
<el-col :span="24">
<el-form-item label="班组成员">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.username" closable :disable-transitions="false"
@close="handleClose(ent.username)">
{{ ent.nickname}}
<el-tag
v-for="ent in tags"
:key="ent.username"
closable
:disable-transitions="false"
@close="handleClose(ent.username)"
>
{{ ent.nickname }}
</el-tag>
<el-input
v-if="inputVisible"
@ -126,24 +146,24 @@
</template>
</Dialog>
<!--添加班组人员弹窗-->
<!--添加班组人员弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as TeamApi from '@/api/wms/team'
import request from "@/config/axios";
import request from '@/config/axios'
import { SearchTable } from '@/components/SearchTable'
import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data";
import * as UserApi from "@/api/system/user";
import {validateYS} from "@/utils/validator";
import { searchUser } from '@/views/wms/basicDataManage/orderManage/team/team.data'
import * as UserApi from '@/api/system/user'
import { validateYS } from '@/utils/validator'
import { Search } from '@element-plus/icons-vue'
import * as WorkshopApi from "@/api/wms/workshop";
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data";
import {ElInput} from "element-plus";
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import { ElInput } from 'element-plus'
import { FormBlur } from '@/api/wms/business/inputBlur'
defineOptions({ name: 'TeamForm' })
@ -154,7 +174,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const tags = ref([])
const inputValue = ref('')
const inputVisible = ref(false)
@ -171,65 +191,63 @@ const formData = ref({
remark: '',
createTime: '',
members: '',
workshopCode:'',
workshopName:'',
productionLineCode:'',
productionLineName:'',
teamMonitorCode:'',
teamMonitorName:''
workshopCode: '',
workshopName: '',
productionLineCode: '',
productionLineName: '',
teamMonitorCode: '',
teamMonitorName: ''
})
const formRules = reactive({
code: [
{ required: true, message: '班组编码不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
{ validator: validateYS, message: '请输入正确的代码', trigger: 'blur' }
],
name: [
{ required: true, message: '班组名称不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
teamGroup: [{ required: true, message: '班组类别不能为空', trigger: 'change' }],
workshopCode: [{ required: true, message: '请选择车间代码', trigger: 'blur' },],
productionLineCode: [{ required: true, message: '请选择产线代码', trigger: 'blur' },],
teamMonitorName: [{ required: true, message: '请选择负责人', trigger: 'blur' },],
workshopCode: [{ required: true, message: '请选择车间代码', trigger: 'blur' }],
productionLineCode: [{ required: true, message: '请选择产线代码', trigger: 'blur' }],
teamMonitorName: [{ required: true, message: '请选择负责人', trigger: 'blur' }]
})
const basicFormRef = ref() // Ref
const handleClose = (username: string) => {
const index = tags.value.findIndex(tag => tag.username === username);
const index = tags.value.findIndex((tag) => tag.username === username)
if (index !== -1) {
tags.value.splice(index, 1);
tags.value.splice(index, 1)
}
}
/** 弹窗相关参数 */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _formField = ref();
const _searchField = ref();
const _multiple = ref();
const _type = ref();
const _row = ref();
const searchTableRef = ref()
const _searchTableTitle = ref()
const _searchTableAllSchemas = ref()
const _searchTablePage = ref()
const _formField = ref()
const _searchField = ref()
const _multiple = ref()
const _type = ref()
const _row = ref()
const _searchCondition = ref({})
const addMonitor = () =>{
addUserCommon(false,'monitor')
const addMonitor = () => {
addUserCommon(false, 'monitor')
}
const addUser = () =>{
addUserCommon(true,'username')
const addUser = () => {
addUserCommon(true, 'username')
}
/** 选择人员弹窗 */
const addUserCommon = (multiple,field) => {
const addUserCommon = (multiple, field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
action: '==',
column: 'userType',
value: 'WORKER'
})
@ -244,13 +262,40 @@ const addUserCommon = (multiple,field) => {
_searchTableAllSchemas.value = searchUser.allSchemas
openCommon()
}
//
const addUserBlur = async (field, e) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push(
{
action: '==',
column: 'userType',
value: 'WORKER'
},
{
action: '==',
column: 'username',
value: e
}
)
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择人员'
_multiple.value = false
_formField.value = field
_searchField.value = field
_searchTablePage.value = UserApi.getUserPage
_searchTableAllSchemas.value = searchUser.allSchemas
getBlurFun(field, e)
}
/** 选择车间弹窗 */
const addWorkShop = () => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
action: '==',
column: 'available',
value: 'TRUE'
})
@ -265,27 +310,54 @@ const addWorkShop = () => {
_searchTableAllSchemas.value = Workshop.allSchemas
openCommon()
}
/** 选择产线弹窗 */
const addProductionLine = () => {
if (formData.value.workshopCode == '' || formData.value.workshopCode == null ){
message.warning('请先选择车间代码');
return
}
//
const addWorkshopCodeBlur = (field, e) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
action: '==',
column: 'available',
value: 'TRUE'
},{
action: "==",
column: 'workshopCode',
value: formData.value.workshopCode
action: '==',
column: 'code',
value: e
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择车间'
_multiple.value = false
_formField.value = 'workshop'
_searchField.value = 'workshop'
_searchTablePage.value = WorkshopApi.getWorkshopPage
_searchTableAllSchemas.value = Workshop.allSchemas
formData.value.productionLineCode = ''
getBlurFun(field, e)
}
/** 选择产线弹窗 */
const addProductionLine = () => {
if (formData.value.workshopCode == '' || formData.value.workshopCode == null) {
message.warning('请先选择车间代码')
return
}
_searchCondition.value = {}
const filters: any[] = []
filters.push(
{
action: '==',
column: 'available',
value: 'TRUE'
},
{
action: '==',
column: 'workshopCode',
value: formData.value.workshopCode
}
)
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择产线'
_multiple.value = false
_formField.value = 'productionLine'
@ -294,38 +366,68 @@ const addProductionLine = () => {
_searchTableAllSchemas.value = Productionline.allSchemas
openCommon()
}
// 线
const addProductionLineBlur = (field, e) => {
_searchCondition.value = {}
if (formData.value.workshopCode == '' || formData.value.workshopCode == null) {
message.warning('请先选择车间代码')
return
}
_searchCondition.value = {}
const filters: any[] = []
filters.push(
{
action: '==',
column: 'available',
value: 'TRUE'
}, {
action: '==',
column: 'workshopCode',
value: formData.value.workshopCode
},{
action: '==',
column: 'code',
value: e
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择产线'
_multiple.value = false
_formField.value = 'productionLine'
_searchField.value = 'productionLine'
_searchTablePage.value = ProductionlineApi.getProductionlinePage
_searchTableAllSchemas.value = Productionline.allSchemas
getBlurFun(field, e)
}
/** 弹窗选择之后 回调函数 */
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick?.(() => {
if (formField === 'workshop') {
if (formData.value.workshopCode != val[0].code){
if (formData.value.workshopCode != val[0].code) {
formData.value.productionLineCode = null
formData.value.productionLineName = null
}
formData.value.workshopCode = val[0].code
formData.value.workshopName = val[0].name
}
else if (formField === 'productionLine'){
} else if (formField === 'productionLine') {
formData.value.productionLineCode = val[0].code
formData.value.productionLineName = val[0].name
}
else if (formField === 'monitor'){
} else if (formField === 'monitor') {
formData.value.teamMonitorCode = val[0].username
formData.value.teamMonitorName = val[0].nickname
}
else {
val.forEach(item => {
const isExist = tags.value.some(tag => tag.username === item.username);
if (!isExist){
const newUser = {};
} else {
val.forEach((item) => {
const isExist = tags.value.some((tag) => tag.username === item.username)
if (!isExist) {
const newUser = {}
if (formField === 'username') {
newUser['username'] = item.username;
newUser['nickname'] = item.nickname;
newUser['username'] = item.username
newUser['nickname'] = item.nickname
}
tags.value.push(newUser);
tags.value.push(newUser)
}
});
})
}
})
}
@ -343,6 +445,46 @@ const openCommon = () => {
_searchCondition.value
)
}
//
const getBlurFun = async (field, val) => {
let obj = {
by: 'ASC',
pageNo: 1,
pageSize: 20
}
const params = {
isSearch: _searchCondition.value.isSearch,
filters: _searchCondition.value.filters,
...obj
}
if (!_multiple.value && val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
formData.value[field] = ''
return
}
await _searchTablePage.value(params).then((res) => {
let arr1 = val.split(',')
let list = ref([])
list.value = res?.list?.length > 0 ? res.list.slice(0, 1) : []
if (list.value?.length == 0) {
message.alert('暂无数据')
formData.value[field] = ''
return
}
if (arr1.length != list.value.length) {
let arr2 = list.value.map((item) => item[field])
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
formData.value[field] = ''
return
}
// callback(list.value)
})
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
@ -351,18 +493,17 @@ const open = async (type: string, row?: object) => {
resetForm()
//
if (row) {
isDisabled.value = true;
isDisabled.value = true
formLoading.value = true
try {
formData.value = await request.get({ url: `/wms/team/get?id=` + row.id });
tags.value=JSON.parse(formData.value.members)
formData.value = await request.get({ url: `/wms/team/get?id=` + row.id })
tags.value = JSON.parse(formData.value.members)
} finally {
formLoading.value = false
}
}
else {
isDisabled.value = false;
tags.value=[];
} else {
isDisabled.value = false
tags.value = []
}
}
defineExpose({ open }) // open
@ -374,8 +515,8 @@ const submitForm = async () => {
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
if (tags.value.length > 15 ){
message.warning('班组成员最多15人');
if (tags.value.length > 15) {
message.warning('班组成员最多15人')
return
}
//
@ -410,16 +551,15 @@ const resetForm = () => {
remark: '',
createTime: '',
members: '',
workshopCode:'',
workshopName:'',
productionLineCode:'',
productionLineName:'',
teamMonitorCode:'',
teamMonitorName:''
workshopCode: '',
workshopName: '',
productionLineCode: '',
productionLineName: '',
teamMonitorCode: '',
teamMonitorName: ''
}
basicFormRef.value?.resetFields()
}
</script>
<style scoped>
@ -443,5 +583,4 @@ const resetForm = () => {
flex: 1;
/*margin-right: 10px;*/
}
</style>

20
src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts

@ -36,7 +36,15 @@ export const Purchaseprice = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -67,7 +75,15 @@ export const Purchaseprice = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

20
src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts

@ -44,7 +44,15 @@ export const Supplieritem = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -70,7 +78,15 @@ export const Supplieritem = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

2
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -592,7 +592,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
// isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '客户物料基础信息',

2
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue

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

160
src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts

@ -80,50 +80,50 @@ export const PackagesplitMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false
},
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
{
label: '截止时间',
field: 'dueTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
// {
// label: '申请时间',
// field: 'requestTime',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
// {
// label: '截止时间',
// field: 'dueTime',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
{
label: '部门',
field: 'departmentCode',
@ -297,6 +297,9 @@ export const PackagesplitDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '从库存状态',
field: 'fromInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
@ -305,43 +308,46 @@ export const PackagesplitDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从器具号',
field: 'fromContainerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到器具号',
field: 'toContainerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '从器具号',
// field: 'fromContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到器具号',
// field: 'toContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从货主代码',
// field: 'fromOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到货主代码',
// field: 'toOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '物料代码',
field: 'itemCode',
@ -385,6 +391,8 @@ export const PackagesplitDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
sort: 'custom',
table: {
width: 150

2
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

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

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue

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

2
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

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

2
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue

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

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

@ -150,7 +150,7 @@ const isCreateLabel = ref(false)
const formLabelRef = ref()
const labelType = ref('') //
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPage
getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPageCreateLabel
})
const { getList:getDetailList } = detatableMethods
@ -373,7 +373,7 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedreceipt-request-main:close'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:unplannedreceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedreceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:refused'}), //

2
src/views/wms/issueManage/issue/issueRequestMain/index.vue

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

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

@ -766,8 +766,9 @@ export const IssueRequestDetail = useCrudSchemas(
sortTableDefault: 3,
tableForm: {
multiple: true,
enterSearch: true,
isInpuFocusShow: true,
// enterSearch: true,
disabled:true,
// isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

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

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

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

@ -583,7 +583,9 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
tableForm:{
isInpuFocusShow: true,
multiple:true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题

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

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

3
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -106,7 +106,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题

18
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -113,7 +113,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// row['itemCode'] = val[0]['code']
// row['uom'] = val[0]['uom']
val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return
if(tableData.value.find(item1=>item1['itemCode'] == item['code'])){
message.warning(`物料${item['code']}已经存在`)
return
}
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['code']
newRow['uom'] = item['uom']
@ -212,7 +215,7 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:repleinsh-request-main:close'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:repleinsh-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:repleinsh-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:repleinsh-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:repleinsh-request-main:refused'}), //
@ -379,10 +382,13 @@ const submitForm = async (formType, submitData) => {
data.id = data.masterId
}
data.subList = tableData.value //
if( data.subList.length>1){
message.warning('明细只能选择一条数据')
return;
}
data.subList.forEach(item=>{
item.toLocationCode = data.toLocationCode
})
// if( data.subList.length>1){ //
// message.warning('')
// return;
// }
if(tableData.value.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0')
formRef.value.formLoading = false

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

@ -543,7 +543,9 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
isInpuFocusShow: true,
multiple:true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
@ -640,7 +642,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
hiddenInMain:true,
sortSearchDefault:1000,
isSearch: true,
// isSearch: true,
sortTableDefault:1100,
isTableForm: false,
},

2
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

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

2
src/views/wms/productionManage/processproduction/processproductionRequest/index.vue

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

3
src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts

@ -339,7 +339,8 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'productionLineCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题

2
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

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

5
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -475,7 +475,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
// isInpuFocusShow: true,
disabled:true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
@ -781,7 +782,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
},
tableForm: {
disabled: true,
// type: 'Select'
type: 'Select'
}
},
{

3
src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

@ -656,7 +656,8 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题

2
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts

@ -649,7 +649,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{
multiple:true,
enterSearch:true,
isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题

2
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts

@ -649,7 +649,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{
multiple:true,
enterSearch:true,
isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题

2
src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue

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

85
src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts

@ -126,15 +126,15 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
{
label: '创建时间',
field: 'createTime',
@ -189,28 +189,28 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
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: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
{
label: '部门',
field: 'departmentCode',
@ -456,7 +456,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
// isInpuFocusShow: true,
disabled:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
@ -611,7 +612,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 180
},
hiddeInMain: true,
hiddenInMain: true,
isTableForm: false,
form: {
componentProps: {
@ -626,7 +627,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
},
{
label: '创建时间',
@ -639,7 +640,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 180
},
hiddeInMain: true,
hiddenInMain: true,
form: {
component: 'DatePicker',
componentProps: {
@ -658,7 +659,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
isTableForm: false,
isForm: false
},
@ -670,7 +671,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
isTableForm: false,
isForm: false
},
@ -681,7 +682,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
isTableForm: false,
isForm: false
},
@ -692,7 +693,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
isTableForm: false,
isForm: false
},
@ -703,7 +704,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
form: {
component: 'InputNumber',
componentProps: {
@ -725,7 +726,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
isTableForm: false,
isForm: false
},
@ -736,7 +737,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
hiddeInMain: true,
hiddenInMain: true,
isTableForm: false,
isForm: false
},

4
src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue

@ -89,7 +89,7 @@ import * as ProductputawayRequestMainApi from '@/api/wms/productputawayRequestMa
import * as ProductputawayRequestDetailApi from '@/api/wms/productputawayRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
//
defineOptions({ name: 'ProductputawayRequestMain' })
const message = useMessage() //
@ -216,7 +216,7 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productputaway-request-main:close'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productputaway-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productputaway-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productputaway-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productputaway-request-main:refused'}), //

64
src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts

@ -118,15 +118,15 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
{
label: '创建时间',
field: 'createTime',
@ -181,28 +181,28 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false,
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
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: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
{
label: '部门',
field: 'departmentCode',
@ -448,7 +448,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
// isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

2
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts

@ -724,7 +724,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
isDetail: false,
isForm: false ,
table: {
width: 150,
width: 220,
fixed: 'right'
},
isTableForm:true,

2
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

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

65
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -280,15 +280,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false,
// },
{
label: '创建时间',
field: 'createTime',
@ -345,28 +345,28 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false
},
{
label: '截止时间',
field: 'dueTime',
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',
}
},
isTable: false,
},
// {
// label: '截止时间',
// field: 'dueTime',
// 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',
// }
// },
// isTable: false,
// },
{
label: '部门',
field: 'departmentCode',
@ -616,7 +616,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',
searchTitle: '工位信息',

2
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

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

65
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -280,15 +280,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
{
label: '创建时间',
field: 'createTime',
@ -345,28 +345,28 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false
},
{
label: '截止时间',
field: 'dueTime',
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',
}
},
isTable: false,
},
// {
// label: '截止时间',
// field: 'dueTime',
// 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',
// }
// },
// isTable: false,
// },
{
label: '部门',
field: 'departmentCode',
@ -617,7 +617,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',
searchTitle: '工位信息',

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

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

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

@ -238,15 +238,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
{
label: '创建时间',
field: 'createTime',
@ -303,28 +303,28 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false
},
{
label: '截止时间',
field: 'dueTime',
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',
}
},
isTable: false,
},
// {
// label: '截止时间',
// field: 'dueTime',
// 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',
// }
// },
// isTable: false,
// },
{
label: '部门',
field: 'departmentCode',

2
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

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

33
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -180,12 +180,12 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm:false,
isTable:false,
},
{
label: '原因',
field: 'remark',
sort: 'custom',
isTable:false,
},
// {
// label: '原因',
// field: 'remark',
// sort: 'custom',
// isTable:true,
// },
{
label: '到库区类型范围',
field: 'toAreaTypes',
@ -511,6 +511,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm: {
type:'Select',
disabled: true
},
form: {
@ -558,16 +559,16 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
hiddenInMain:true,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable:false,
hiddenInMain:true
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable:false,
// hiddenInMain:true
// },
{
label: '创建者',
field: 'creator',

2
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

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

65
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -254,15 +254,15 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false,
// },
{
label: '创建时间',
field: 'createTime',
@ -319,28 +319,28 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: { width:'100%'},
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: {
// style: { width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
{
label: '部门',
field: 'departmentCode',
@ -554,7 +554,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
sortTableDefault:5,
tableForm:{
multiple: true,
isInpuFocusShow: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题

2
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

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

67
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

@ -307,37 +307,37 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
// {
// label: '截止时间',
// field: 'dueTime',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// isTable:false,
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false,
// },
{
label: '部门',
field: 'departmentCode',
@ -552,7 +552,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
// isInpuFocusShow: true,
disabled:true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
@ -1067,11 +1068,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isForm: false ,
hiddenInMain:true,
isTableForm:false,
table: {
width: 150,
fixed: 'right'
},
hiddeInMain:true,
tableForm: {
type: 'action',
buttonText: 'Bom',

35
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -68,6 +68,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchDetailSchemas:PurchaseDetail.allSchemas,
searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类
searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, // 查询弹窗所需分页方法
isEnter:true,
searchCondition: [{
key:'status',
value:'2',
@ -80,7 +81,15 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
isForm: true,
@ -966,6 +975,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -976,10 +986,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{
tableForm: {
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -990,7 +1009,15 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
isTableForm: true,
isForm: false

34
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts

@ -86,7 +86,15 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
isForm: true,
@ -966,6 +974,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -976,10 +985,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{
tableForm: {
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -990,7 +1008,15 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
isTableForm: true,
isForm: false

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

@ -418,7 +418,8 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['singlePrice'] = val[0]['singlePrice']
setV['amount'] = val[0]['amount']
setV['projectCode'] = val[0]['projectCode']
setV['packingNumber'] = val[0]['packingNumber']
// setV['packingNumber'] = val[0]['packingNumber']
// setV['inventoryBalance'] = val[0]['qty']
if (formField == 'itemCode') {
setV['batch'] = val[0]['toBatch']
@ -428,7 +429,11 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
// setV['fromLocationCode'] = val[0]['fromLocationCode']
// setV['toLocationCode'] = val[0]['toLocationCode']
}
} else {
} else if (formField == 'packingNumber'){
setV[formField] = val[0][searchField]
setV['inventoryBalance'] = val[0]['qty']
}
else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)

193
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -195,7 +195,15 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -209,6 +217,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
disabled:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
@ -221,7 +230,15 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -780,6 +797,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm:false,
isTable:false,
hiddenInMain: true,
isForm: false,
tableForm:{
disabled:true
},
@ -799,6 +817,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm:false,
isTable:false,
hiddenInMain: true,
isForm: false,
tableForm:{
disabled:true
},
@ -834,6 +853,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
hiddenInMain: true,
isTableForm: false,
isTable: false,
isForm: false,
tableForm:{
disabled:true
},
@ -856,6 +876,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
isTableForm: false,
isTable: false,
isForm: false,
form: {
componentProps:{
disabled:true
@ -867,7 +888,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
// isSearch: true,
isTable: true,
sort: 'custom',
table: {
@ -939,12 +960,8 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
componentProps:{
disabled:true
}
},
tableForm:{
tableForm: {
enterSearch: true,
// labelMessage: '信息提示说明!!!',
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从库位代码',
@ -962,7 +979,51 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'out',
message: '',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
// form: {
// componentProps:{
// disabled:true
// }
// },
form:{
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择从库位代码',
searchField: 'code',
searchTitle: '库位代码信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationListByAreaAndBusinesstype,
searchCondition: [{
key: 'businessType',
value: 'PurchaseReturn',
message: '请填写业务类型',
isMainValue: false
},{
key: 'isIn',
value: 'out',
message: '',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
hiddenInMain: true,
isTable: false,
@ -976,12 +1037,54 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
hiddenInMain: true,
isTable: false,
// form: {
// componentProps:{
// disabled: true,
// }
// },
form: {
componentProps:{
disabled:true
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'itemCode',
value: 'itemCode',
message: '请填写物料代码',
isTableRowValue: true, //查询当前searchTable表中行数据的值
required:true,
isMainValue:true
},{
key: 'batch',
value: 'batch',
message: '请填写批次',
isTableRowValue: true, //查询当前searchTable表中行数据的值
// required:true,
isMainValue:true
},{
key: 'locationCode',
value: 'fromLocationCode',
message: '请选择从库位代码',
isTableRowValue: true, //查询当前searchTable表中行数据的值
required:true,
isMainValue:true
}],
verificationParams: [{
key: 'packingNumber',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{
tableForm: {
enterSearch: true,
multiple: true,
// labelMessage: '信息提示说明!!!',
isInpuFocusShow: true, // 开启查询弹窗
@ -1011,31 +1114,42 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableRowValue: true, //查询当前searchTable表中行数据的值
required:true,
isMainValue:false
}]
}],
verificationParams: [{
key: 'packingNumber',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
},
// {
// label: '库存余额',
// field: 'inventoryBalance',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// componentProps: {
// min: 0,
// precision: 6
// }
// },
// isForm:false,
// tableForm:{
// hidden:false,//控制列是否展示
// type:'InputNumber',
// min:0,
// precision: 6
// }
// },
{
label: '库存余额',
field: 'inventoryBalance',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 6
}
},
tableForm:{
hidden:false,//控制列是否展示
type:'InputNumber',
min:0,
precision: 6
},
hiddenInMain: true,
isTable: false,
isDetail: false,
},
{
label: '退货数量',
field: 'qty',
@ -1074,6 +1188,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
isTableForm: false,
isTable: false,
isForm: false,
form: {
componentProps:{
disabled:true
@ -1093,6 +1208,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
hiddenInMain: true,
isTableForm: false,
isTable: false,
isForm: false,
form: {
componentProps:{
disabled:true
@ -1112,6 +1228,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
hiddenInMain: true,
isTableForm: false,
isTable: false,
isForm: false,
form: {
componentProps:{
disabled:true
@ -1131,6 +1248,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
hiddenInMain: true,
isTableForm: false,
isTable: false,
isForm: false,
form: {
componentProps:{
disabled:true
@ -1256,6 +1374,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
tableForm:{
disabled:true
},
isForm: false,
isTableForm: false,
isTable: false,
hiddenInMain: true,
@ -1277,6 +1396,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
tableForm:{
disabled:true
},
isForm: false,
isTableForm:false,
isForm:false
},
@ -1316,6 +1436,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false,
isTable: false,
hiddenInMain: true,
isForm: false,
form: {
componentProps:{
disabled:true

54
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/putawayJobMain.data.ts

@ -793,15 +793,15 @@ export const PutawayJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
hiddenInMain: true,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
// {
// label: '项目代码',
// field: 'projectCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true,
// },
{
label: '数量',
field: 'qty',
@ -844,24 +844,24 @@ export const PutawayJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
hiddenInMain: true,
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
// {
// label: '从货主代码',
// field: 'fromOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true,
// },
// {
// label: '到货主代码',
// field: 'toOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain: true,
// },
{
label: '创建时间',
field: 'createTime',

114
src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/putawayRecordMain.data.ts

@ -513,15 +513,15 @@ export const PutawayRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:3,
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
// {
// label: '从货主代码',
// field: 'fromOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// },
{
label: '从库位代码',
field: 'fromLocationCode',
@ -549,15 +549,15 @@ export const PutawayRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
hiddenInMain:true,
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
// {
// label: '到货主代码',
// field: 'toOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// },
{
label: '到库位代码',
field: 'toLocationCode',
@ -671,15 +671,15 @@ export const PutawayRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
hiddenInMain:true,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
// {
// label: '项目代码',
// field: 'projectCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// },
{
label: '数量',
field: 'qty',
@ -701,18 +701,18 @@ export const PutawayRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150
// },
// },
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// },
// {
// label: '任务明细ID',
// field: 'jobDetailId',
@ -721,24 +721,24 @@ export const PutawayRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150
// },
// },
{
label: '从器具号',
field: 'fromContainerNumber',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '到器具号',
field: 'toContainerNumber',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
},
// {
// label: '从器具号',
// field: 'fromContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// },
// {
// label: '到器具号',
// field: 'toContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// },
{
label: '操作',
hiddenInMain:true,

66
src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts

@ -810,17 +810,17 @@ export const PutawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
isTableForm: false,
isForm: false
},
// {
// label: '项目代码',
// field: 'projectCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// isTableForm: false,
// isForm: false
// },
{
label: '数量',
field: 'qty',
@ -843,28 +843,28 @@ export const PutawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
hiddenInMain:true,
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
isTableForm: false,
isForm: false
},
// {
// label: '从货主代码',
// field: 'fromOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false,
// hiddenInMain:true,
// },
// {
// label: '到货主代码',
// field: 'toOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// isTableForm: false,
// isForm: false
// },
{
label: '操作',
hiddenInMain:true,

124
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts

@ -692,29 +692,29 @@ export const PurchasereceiptJobMainRules = reactive({
* @returns {Array}
*/
export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
hiddenInMain:true,
sortTableDefault:1002,
sortSearchDefault:1002
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:1002
},
// {
// label: '包装号',
// field: 'packingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// isSearch:true,
// hiddenInMain:true,
// sortTableDefault:1002,
// sortSearchDefault:1002
// },
// {
// label: '包装规格',
// field: 'packUnit',
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:1002
// },
{
label: '包装数量',
field: 'qty',
@ -841,15 +841,15 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
hiddenInMain:true,
sortTableDefault:1006,
},
{
label: '来源库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:1007,
},
// {
// label: '来源库位',
// field: 'fromLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:1007,
// },
{
label: '目标库位',
field: 'toLocationCode',
@ -933,26 +933,26 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:1009,
hiddenInMain:true,
},
{
label: '从货主',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortTableDefault:1008,
},
{
label: '到货主',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortTableDefault:1008,
},
// {
// label: '从货主',
// field: 'fromOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// sortTableDefault:1008,
// },
// {
// label: '到货主',
// field: 'toOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// sortTableDefault:1008,
// },
{
label: '物料代码',
field: 'itemCode',
@ -992,16 +992,16 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
hiddenInMain:true,
sortTableDefault:7,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortTableDefault:1010,
},
// {
// label: '项目代码',
// field: 'projectCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// sortTableDefault:1010,
// },
{
label: '计量单位',
field: 'uom',

212
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts

@ -603,16 +603,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
sortTableDefault:14,
hiddenInMain:true
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:14,
hiddenInMain:true
},
// {
// label: '到批次',
// field: 'toBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:14,
// hiddenInMain:true
// },
{
label: '替代批次',
field: 'altBatch',
@ -623,26 +623,26 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
isTable:false,
hiddenInMain:true
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:15,
hiddenInMain:true
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:15,
hiddenInMain:true
},
// {
// label: '从包装号',
// field: 'fromPackingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:15,
// hiddenInMain:true
// },
// {
// label: '到包装号',
// field: 'toPackingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:15,
// hiddenInMain:true
// },
{
label: '从器具号',
field: 'fromContainerNumber',
@ -709,33 +709,33 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:13,
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:16,
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
tableForm: {
disabled: true,
},
isForm:false,
sortTableDefault:16,
},
// {
// label: '包装规格',
// field: 'packUnit',
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:16,
// },
// {
// label: '包装数量',
// field: 'packQty',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// },
// tableForm: {
// disabled: true,
// },
// isForm:false,
// sortTableDefault:16,
// },
{
label: '供应商计量数量',
field: 'supplierQty',
@ -776,16 +776,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
sortTableDefault:18,
hiddenInMain:true
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:18,
// {
// label: '从库位代码',
// field: 'fromLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:18,
},
// },
{
label: '到库位代码',
field: 'toLocationCode',
@ -795,16 +795,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:18,
},
{
label: '从库位组',
field: 'fromLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:19,
hiddenInMain:true
},
// {
// label: '从库位组',
// field: 'fromLocationGroupCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:19,
// hiddenInMain:true
// },
{
label: '到库位组',
field: 'toLocationGroupCode',
@ -815,16 +815,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
sortTableDefault:19,
hiddenInMain:true
},
{
label: '从库区',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:22,
hiddenInMain:true,
},
// {
// label: '从库区',
// field: 'fromAreaCodes',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:22,
// hiddenInMain:true,
// },
{
label: '到库区',
field: 'toAreaCodes',
@ -835,16 +835,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
sortTableDefault:22,
hiddenInMain:true
},
{
label: '从货主',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:23,
hiddenInMain:true
},
// {
// label: '从货主',
// field: 'fromOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:23,
// hiddenInMain:true
// },
{
label: '到货主',
field: 'toOwnerCode',
@ -1004,16 +1004,16 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
// },
// },
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:1998,
hiddenInMain:true
},
// {
// label: '项目代码',
// field: 'projectCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:1998,
// hiddenInMain:true
// },
// {
// label: '代码',
// field: 'code',

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

@ -84,7 +84,15 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
isForm: true,
@ -870,92 +878,92 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
disabled: true
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
hiddenInMain:true,
sortTableDefault:11,
isForm: false
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
isTableForm: false,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
sortTableDefault:11,
tableForm:{
disabled:true
},
isForm: true
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:11,
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
// {
// label: '包装号',
// field: 'packingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// hiddenInMain:true,
// sortTableDefault:11,
// isForm: false
// },
// {
// label: '包装规格',
// field: 'packUnit',
// dictClass: 'string',
// isTable: true,
// isTableForm: false,
// sort: 'custom',
// table: {
// width: 150,
// componentProps: {
// disabled: true
// }
// },
// sortTableDefault:11,
// tableForm:{
// disabled:true
// },
// isForm: true
// },
// {
// label: '包装数量',
// field: 'packQty',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:11,
// form: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择包装',
// searchField: 'packQty',
// searchTitle: '物品包装信息',
// searchAllSchemas: Itempackaging.allSchemas,
// searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
// searchCondition: [
// {
// key: 'itemCode',
// value: 'itemCode',
// message: '请选择订单行',
// isMainValue: true
// },
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
isTableForm: false,
isForm: true
},
// ]
// }
// },
// tableForm: {
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择包装',
// searchField: 'packQty',
// searchTitle: '物品包装信息',
// searchAllSchemas: Itempackaging.allSchemas,
// searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
// searchCondition: [
// {
// key: 'itemCode',
// value: 'itemCode',
// message: '请选择订单行',
// isMainValue: true
// },
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// },
// isTableForm: false,
// isForm: true
// },
{
label: '到库位代码',
field: 'defaultToLocationCode',
@ -967,6 +975,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -977,10 +986,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{
tableForm: {
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -991,35 +1009,43 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
isTableForm: true,
isForm: false
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:13,
hiddenInMain:true,
isTableForm: false,
isForm: false
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:13,
hiddenInMain:true,
isTableForm: false,
isForm: false
},
// {
// label: '从货主代码',
// field: 'fromOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:13,
// hiddenInMain:true,
// isTableForm: false,
// isForm: false
// },
// {
// label: '到货主代码',
// field: 'toOwnerCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:13,
// hiddenInMain:true,
// isTableForm: false,
// isForm: false
// },
{
label: '供应商计量数量',
field: 'supplierPackQty',
@ -1204,29 +1230,29 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
type: 'Select'
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:12,
isTableForm: false,
isForm: false
},
// {
// label: '从库位代码',
// field: 'fromLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:12,
// isTableForm: false,
// isForm: false
// },
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
isTableForm: false,
isForm: false
},
// {
// label: '项目代码',
// field: 'projectCode',
// sort: 'custom',
// table: {
// width: 150
// },
// hiddenInMain:true,
// isTableForm: false,
// isForm: false
// },
{
label: '单据号',
field: 'number',

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

@ -599,24 +599,24 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false,
},
{
label: t('ts.已计划数量'),
field: 'plannedQty',
table: {
width: 150
},
hiddenInMain:true,
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
value: 1
},
isTableForm: false,
isForm: false,
},
// {
// label: t('ts.已计划数量'),
// field: 'plannedQty',
// table: {
// width: 150
// },
// hiddenInMain:true,
// form: {
// component: 'InputNumber',
// componentProps: {
// min: 1,
// precision: 6
// },
// value: 1
// },
// isTableForm: false,
// isForm: false,
// },
{
label: t('ts.已发货数量'),
field: 'shippedQty',

1
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -78,7 +78,6 @@
fieldTableColumn="poLine"
/>
采购订单信息
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />

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

@ -402,7 +402,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), //
// defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 7.15
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //

57
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue

@ -12,7 +12,12 @@
<template #default="scope">
<div
style="margin-left: 400px; margin-top: -8px; margin-bottom: -8px"
v-if="scope.row.packUnit && scope.row.packQty && scope.row.secondPackUnit && scope.row.secondPackQty"
v-if="
scope.row.packUnit &&
scope.row.packQty &&
scope.row.secondPackUnit &&
scope.row.secondPackQty
"
>
<el-table
:data="scope.row.packageList"
@ -102,13 +107,17 @@
</el-table-column>
</el-table>
</div>
<div style="margin-left: 550px; margin-top: -8px; margin-bottom: -8px" v-if="scope.row.packUnit && scope.row.packQty && !scope.row.secondPackUnit">
<div
style="margin-left: 550px; margin-top: -8px; margin-bottom: -8px"
v-if="scope.row.packUnit && scope.row.packQty && !scope.row.secondPackUnit"
>
<div v-for="(item, index) in scope.row.packageList" :key="index">
<el-table :data="item.children" border style="width: 300px" row-key="id">
<el-table-column label="箱行号" width="100" prop="xPoNumber" align="center" > <template #default="scope1">
{{ scope1.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="箱行号" width="100" prop="xPoNumber" align="center">
<template #default="scope1">
{{ scope1.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="数量" width="100" prop="qtyOne" align="center">
<template #default="scope1">
<el-input
@ -130,7 +139,7 @@
<el-button
type="warning"
link
@click="removeX(scope.row, scope.$index, item, index)"
@click="removeX(scope.row, scope.$index, item, index,scope1.row, scope1.$index )"
>移出</el-button
>
</template>
@ -168,6 +177,7 @@
</template>
<script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as accuracyFun from "@/utils/calculate"
const message = useMessage() //
const { t } = useI18n() //
@ -224,12 +234,12 @@ const expandChange = (row: any, expandedRows: any[]) => {
//
row.manTuoQty = Math.floor(parseFloat(row.manXiangQty) / parseFloat(row.otherNumber))
// **
row.tuoInManNumber =
parseFloat(row.manTuoQty) * parseFloat(row.otherNumber) * parseFloat(row.packQty)
let num1 = accuracyFun.multiply(parseFloat(row.manTuoQty ),parseFloat(row.otherNumber))
row.tuoInManNumber =accuracyFun.multiply(num1,parseFloat(row.packQty))
//
row.lastNumber =
parseFloat(row.qty) > parseFloat(row.tuoInManNumber)
? parseFloat(row.qty) - parseFloat(row.tuoInManNumber)
? accuracyFun.subtract( parseFloat(row.qty),parseFloat(row.tuoInManNumber))
: parseFloat(row.qty)
//
row.packageList =[]
@ -258,7 +268,7 @@ const expandChange = (row: any, expandedRows: any[]) => {
} else {
// ,
row.packageList[i].xNumber = row.otherNumber
row.packageList[i].qtyOne = parseFloat(row.otherNumber) * parseFloat(row.packQty)
row.packageList[i].qtyOne = accuracyFun.multiply( parseFloat(row.otherNumber),parseFloat(row.packQty))
}
}
//
@ -381,7 +391,8 @@ const submitForm = () => {
let obj = tableData.value.find((item) => {
item.allNumber = 0
item.packageList.forEach((cur) => {
item.allNumber += parseFloat(cur.qtyOne) || 0
item.allNumber = accuracyFun.add(item.allNumber , parseFloat(cur.qtyOne)?parseFloat(cur.qtyOne):0)
// item.allNumber += parseFloat(cur.qtyOne) || 0
})
return item.allNumber != parseFloat(item.qty)
})
@ -415,7 +426,7 @@ const addT = (oneRow) => {
}
//
const removeT = (oneRow, oneIndex, twoRow, twoIndex) => {
oneRow.packageList.splice(twoIndex, 1)
oneRow.packageList= oneRow.packageList.filter(item=>item.id!=twoRow.id)
oneRow.allTuoQty = oneRow.packageList.length
}
//
@ -435,7 +446,7 @@ const addX = (oneRow, oneIndex, twoRow, twoIndex, type) => {
twoRow.xNumber = twoRow.children.length
let num = 0
twoRow.children.forEach((item) => {
num += parseFloat(item.qtyTwo) || 0
num = accuracyFun.add( parseFloat(num),parseFloat(item.qtyTwo) || 0)
})
twoRow.qtyOne = num
} else {
@ -445,9 +456,8 @@ const addX = (oneRow, oneIndex, twoRow, twoIndex, type) => {
id: twoId.value,
// xPoNumber:
// twoRow.children.length > 0 ? twoRow.children[twoRow.children.length - 1].xPoNumber + 1 : 1,
// qtyTwo: oneRow.packQty
qtyTwo: oneRow.packQty
})
oneRow.allTuoQty = twoRow.children.length
}
}
//
@ -455,16 +465,15 @@ const removeX = (oneRow, oneIndex, twoRow, twoIndex, threeRow, threeIndex, type)
//
if (type == 1) {
//
twoRow.children.splice(threeIndex, 1)
twoRow.children= twoRow.children.filter(item=>item.id!=threeRow.id)
let num = 0
twoRow.children.forEach((item) => {
num += parseFloat(item.qtyTwo) || 0
num = accuracyFun.add( parseFloat(num),parseFloat(item.qtyTwo) || 0)
})
twoRow.qtyOne = num
twoRow.xNumber = twoRow.children.length
} else {
twoRow.children.splice(twoIndex, 1)
oneRow.allTuoQty = twoRow.children.length
twoRow.children= twoRow.children.filter(item=>item.id!=threeRow.id)
}
}
//
@ -484,7 +493,9 @@ const blurOne = (oneRow, twoRow) => {
// twoRow.children = []
// twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty)
// }
twoRow.qtyOne = parseFloat(twoRow.xNumber)? parseFloat(twoRow.xNumber)* parseFloat(oneRow.packQty) : ''
twoRow.qtyOne = parseFloat(twoRow.xNumber) ?
accuracyFun.multiply( parseFloat(twoRow.xNumber),parseFloat(oneRow.packQty))
: ''
// let num = 0
// oneRow.packageList.forEach((item) => {
// num += parseFloat(item.xNumber) || 0
@ -542,7 +553,7 @@ const blurTwo = (oneRow, twoRow, threeRow) => {
// }
let num = 0
twoRow.children.forEach((item) => {
num += parseFloat(item.qtyTwo) || 0
num = accuracyFun.add( parseFloat(num),parseFloat(item.qtyTwo))
})
twoRow.qtyOne = num
}
@ -554,7 +565,7 @@ const blurThree = (oneRow, twoRow, thereeRow) => {
// }
let num = 0
twoRow.children.forEach((item) => {
num += parseFloat(item.qtyTwo) || 0
num = accuracyFun.add( parseFloat(num),parseFloat(item.qtyTwo))
})
twoRow.qtyOne = num
}

62
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -105,6 +105,25 @@
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"
@ -112,6 +131,7 @@
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules"
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage"
@buttonBaseClick="detailButtonBaseClick"
>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
@ -205,6 +225,8 @@ const handleSelectionPoint = async ()=>{
window.open(srcPoint.value+'&ids='+rows.join(','))
}
// -
const butttondata = (row,$index) => {
return [
@ -230,8 +252,10 @@ const buttonTableClick = async (val, row) => {
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({
@ -289,6 +313,44 @@ const handleExport = async () => {
}
}
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 data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordDetail(params)
download.excel(data, `${t('ts.供应商发票记录明细')}.xlsx`)
} catch {
} finally {
exportLoadingDetail.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

325
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/index.vue

@ -1,325 +0,0 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRecordMain.allSchemas.searchSchema" @search="searchList" @reset="searchList" >
<template #cha>
<div style="display:flex;flex-direction: row">
<el-input-number />
<span>{{' 到 '}}</span>
<el-input-number />
</div>
</template>
</Search>
</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>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="SupplierinvoiceRecordMainRules"
:formAllSchemas="SupplierinvoiceRecordMain.allSchemas"
:tableAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:tableFormRules="SupplierinvoiceRecordDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:annexTable="[{
label: t('ts.合同附件'),
prop: 'Annex',
tableName:'contract',
showDownload:true,
hiddenDelete:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
},{
label: t('ts.发票附件'),
prop: 'Annex',
tableName:'invoice',
showDownload:true,
hiddenDelete: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
}"
:isBasic="false"
direction="horizontal"
:column="3"
:allSchemas="SupplierinvoiceRecordDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules"
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage"
>
<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,SupplierinvoiceRecordMainRules,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules,SupplierinvoiceRecordDetailMain } from './supplierinvoiceRecordMain.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";
//
defineOptions({ name: 'SupplierinvoiceRecordMain' })
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 //
})
//
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 {
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: 'open_detail',
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'open_detail') { //
openDetail(row, '单据号', row.number)
}
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any) => {
console.log('openDetail',row)
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)
}
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 = []
setSearchParams(model)
}
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 exportLoading = ref(false) //
const handleExport = async () => {
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordMain({...tableObject.params,checkNums:rows})
download.excel(data, `${t('ts.供应商发票记录主')}.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
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>

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

@ -113,9 +113,9 @@
@sumFormDataHandle="sumFormDataHandle"
>
<template #searchTableSelectionsActions="{selections}">
<template #selectionsActionspoLine="{selections}">
<div style="text-align: left;margin-right:10px">
系统未税金额:{{Number(selections.selections.reduce((prev, item) => prev + Number(Number(Number(Number(item['purchasePrice']).toFixed(2))*item['invoicableQuantity']).toFixed(2)),0)).toFixed(2)}}
系统未税金额:{{Number(selections.reduce((prev, item) => prev + Number(Number(Number(Number(item['purchasePrice']).toFixed(2))*item['invoicableQuantity']).toFixed(2)),0)).toFixed(2)}}
</div>
</template>
<!-- <template #foorter>
@ -189,7 +189,7 @@
:buttondataTable = "[{
label: t('ts.打印'),
name: 'print',
hide: false,
hide: true,
type: 'primary',
// icon: 'ep:operation',
color: '',
@ -398,6 +398,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierinvoice-request-main:create' }), //
defaultButtons.defaultImportBtn({hasPermi: 'wms:supplierinvoice-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi: 'wms:supplierinvoice-request-main:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -419,6 +420,8 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
@ -990,7 +993,6 @@ const handleImport = () => {
}
/**
* tableForm方法
*/
@ -1139,6 +1141,22 @@ const importSuccess = () => {
window.open(documentSrc.value + '&id=' + id)
}
const srcPoint = ref(BASE_URL + '/jmreport/view/972723426543935488?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 handlePrintAll = async (masterId) => {
//
SupplierinvoiceRequestMainApi.printSupplierRecordByMasterId(masterId).then(res =>{

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

@ -2004,18 +2004,18 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 250,
fixed: 'right'
},
hiddenInMain:true,
isTableForm: false,
}
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 250,
// fixed: 'right'
// },
// hiddenInMain:true,
// isTableForm: false,
// }
]))
// 批次校验
const validateSinglePrice = (rule: any, value: any, callback: any) => {

475
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue

@ -0,0 +1,475 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search class="search-box" :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="searchList" @reset="resetList" >
<template #cha>
<div style="display:flex;flex-direction: row">
<el-input-number v-model="staDifferencePrice" :max="endDifferencePrice" size="small" :placeholder="t('ts.最小值')"/>-<el-input-number v-model="endDifferencePrice" :min="staDifferencePrice" size="small" :placeholder="t('ts.最大值')"/>
</div>
</template>
</Search>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table ref="tableRef"
:selection="true"
:selectionColor="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, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(2) }}</span>
</template>
</Table>
</ContentWrap>
<!-- 详情 -->
<Detail
ref="detailRef"
:isOpenSearchTable="true"
fieldTableColumn="poLine"
:annexTable="detailAnnexTable"
direction="horizontal"
:column="3"
:annexAlias="{
hidden:true,
label:t('ts.其他附件')
}"
:otherHeadButttonData="[{
label: t('ts.打印明细'),
name: 'printing',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
},{
label: t('ts.打印全部发货单'),
name: 'printing-all',
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: ''
}]"
:buttondataTable = "[{
label: t('ts.打印'),
name: 'print',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
link: true, //
hasPermi: ''
}]"
:sumFormDataByForm ="(formRef,formModel)=>{
const {singlePrice=0,purchasePrice=0} = formModel
formRef.value.setValues({
differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(2))
})
}"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail"
:apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail"
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage"
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo"
:detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false"
:detailButtonIsShowAdd="false"
@buttonBaseClick="detailButtonBaseClick"
@tableFormButton="tableFormButton"
:mainSubmitCreateApi="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
@handleMainFefresh="handleMainFefresh"
>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
</template>
</Detail>
</template>
<script setup lang="ts">
import dayjs from 'dayjs'
//
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { SupplierinvoiceRequestMain,
SupplierinvoiceRequestMainRules,
SupplierinvoiceRequestDetail,
SupplierinvoiceRequestDetailRules,
SupplierinvoiceRequestFinance,
SupplierinvoiceRequestFinanceRules,
PurchasePass,
PurchasePassRules,
SupplierinvoiceRequestDetailMain
} from './supplierinvoiceRequestMainDifference.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data'
import { getAccessToken } from '@/utils/auth'
import { ElMessageBox } from 'element-plus'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { accountantFormart } from '@/utils/formatter'
defineOptions({ name: 'SupplierinvoiceRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
{
formField: 'supplierCode',
searchTableTitle: t('ts.供应商信息'),
searchTableAllSchemas: Supplier.allSchemas,
searchTablePage: SupplierApi.getSupplierPage
}
])
const staDifferencePrice = ref()
const endDifferencePrice = ref()
const searchList = (model)=>{
model.staDifferencePrice = staDifferencePrice.value
model.endDifferencePrice = endDifferencePrice.value
console.log('searchList',model)
selectionRows.value = []
setSearchParams(model)
}
const resetList = (model)=>{
staDifferencePrice.value = null
endDifferencePrice.value = null
searchList(model)
}
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 handleMainFefresh = ()=>{
getList()
}
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{
console.log('详情',formField, searchField, val, formRef,searchTableFormModel)
val.forEach(item=>{
item.deliveryDate = item['prhRcpDate']
item.arrivalQty = item['prhRcvd']
})
await SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail({
masterId:searchTableFormModel.masterId,
subList:val
})
detailRef.value.updateList()
getList()
}
const Echo = []
const { tableObject, tableMethods } = useTable({
defaultParams:{
balanceStatementStatus : 'TRUE'
},
getListApi: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi: 'wms:supplierinvoice-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
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 { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const clicKRowId = ref();
const detailAnnexTable = ref(
[{
label: t('ts.合同附件'),
prop: 'Annex',
tableName:'contract',
hiddenDelete:true,
hiddenUpload:true,
fileSize:20
},{
label: t('ts.发票附件'),
prop: 'Annex',
tableName:'invoice',
hiddenDelete:true,
hiddenUpload:true,
fileSize:20
},{
label: t('ts.货运单附件'),
prop: 'Annex',
tableName:'waybill',
hiddenDelete:true,
hiddenUpload:true,
fileSize:20
},{
label: t('ts.其他附件'),
prop: 'Annex',
tableName:'invoiceOther',
hiddenDelete:true,
hiddenUpload:true,
fileSize:20
}])
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))
clicKRowId.value = row.id
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
let paramsData =JSON.parse(JSON.stringify(tableObject.params))
if(tableObject.params&&tableObject.params.isSearch==true){
paramsData.filters.push({
action: "in",
column: "number",
value: rows.join(",")
})
}else{
paramsData = {...paramsData,checkNums:rows}
}
console.log('批量导出',paramsData)
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestMain(paramsData)
download.excel(data, `${t('ts.供应商发票申请主')}.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: `${t('ts.供应商发票申请主导入模板')}.xlsx`
})
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: [...searchData.filters,{
action: "==",
column: "balanceStatementStatus",
value: "TRUE"
}]
}
getList() //
}
// --
const detailButtonBaseClick = (val, item) => {
console.log("点击的按钮",val)
if(val == 'printing'){
//
handleDocumentPrint(clicKRowId.value)
}else if(val === 'printing-all'){
//
handlePrintAll(clicKRowId.value)
}else if(val === 'export-detail'){
console.log("导出明细:",clicKRowId.value)
handleDetailExport(clicKRowId.value)
}
}
const tableFormButton = (val, item) => {
console.log("点击的按钮",val)
if(val == 'print'){
//
SupplierinvoiceRequestMainApi.printSupplierRecord(item.asnBillNum).then(res =>{
if(res){
handleSupplierdeliverRecordPrint(res);
}
})
}
}
/** 导出明细按钮操作 */
const exportLoadingDetail = ref(false) //
const handleDetailExport = async (masterId) => {
try {
//
await message.exportConfirm()
//
exportLoadingDetail.value = true
let params = {
masterId: masterId
}
const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestDetail(params)
download.excel(data, `${t('ts.供应商发票申请明细')}.xlsx`)
} catch {
} finally {
exportLoadingDetail.value = false
}
}
const BASE_URL = getJmreportBaseUrl()
//
const documentSupplierdeliverRecordSrc = ref(BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken())
const handleSupplierdeliverRecordPrint = async (id) => {
window.open(documentSupplierdeliverRecordSrc.value + '&id=' + id)
}
//
const documentSrc = ref(BASE_URL + '/jmreport/view/936875675614240768?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
const handlePrintAll = async (masterId) => {
//
SupplierinvoiceRequestMainApi.printSupplierRecordByMasterId(masterId).then(res =>{
if(res && res.length > 0){
for(let i=0;i<res.length;i++){
let id = res[i];
handleSupplierdeliverRecordPrint(id);
}
}else{
message.warning(t('ts.非SCP订单无法打印'))
return;
}
})
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
</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;
}
.search-box .el-input-number__decrease {
display: none !important;
}
::v-deep(.el-input-number__decrease) {
display: none !important;
}
::v-deep(.el-input-number__increase) {
display: none !important;
}
</style>
./supplierinvoiceRequestMainDifference.data

1740
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMainDifference/supplierinvoiceRecordMain.data.ts → src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

File diff suppressed because it is too large
Loading…
Cancel
Save