Browse Source

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

master_hella_20240701
chenfang 5 months ago
parent
commit
21ccb44320
  1. 5
      src/api/eam/equipmentRepairJobMain/index.ts
  2. 5
      src/api/eam/equipmentReportRepairRequest/index.ts
  3. 6
      src/api/wms/balance/index.ts
  4. 524
      src/api/wms/business/business.ts
  5. 7
      src/api/wms/customeritem/index.ts
  6. 7
      src/api/wms/itembasic/index.ts
  7. 4
      src/api/wms/itempackage/index.ts
  8. 5
      src/api/wms/packageunit/index.ts
  9. 5
      src/api/wms/productionlineitem/index.ts
  10. 6
      src/api/wms/supplier/index.ts
  11. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  12. 8
      src/api/wms/supplieritem/index.ts
  13. 6
      src/components/Annex/src/Annex.vue
  14. 58
      src/components/BasicForm/src/BasicForm.vue
  15. 2
      src/components/BasicForm/src/BasicFormWmsCount.vue
  16. 2
      src/components/Detail/src/Detail.vue
  17. 10
      src/components/Form/src/Form.vue
  18. 54
      src/components/TableForm/src/TableForm.vue
  19. 26
      src/views/eam/equipmentInspectionMain/index.vue
  20. 25
      src/views/eam/equipmentMaintenanceMain/index.vue
  21. 129
      src/views/eam/equipmentRepairJobMain/finishForm1.vue
  22. 6
      src/views/eam/equipmentRepairJobMain/finishForm2.vue
  23. 126
      src/views/eam/equipmentRepairJobMain/finishForm3.vue
  24. 54
      src/views/eam/equipmentRepairJobMain/index.vue
  25. 2
      src/views/eam/equipmentRepairRecordMain/index.vue
  26. 23
      src/views/eam/equipmentReportRepairRequest/audiForm.vue
  27. 25
      src/views/eam/equipmentSpotCheckMain/index.vue
  28. 2
      src/views/eam/planInspection/index.vue
  29. 2
      src/views/eam/planSpotCheck/index.vue
  30. 1
      src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts
  31. 1
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  32. 1
      src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts
  33. 83
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  34. 3
      src/views/wms/countManage/count/countPlanMain/index.vue
  35. 12
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  36. 2
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  37. 1
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
  38. 2
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts
  39. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  40. 5
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  41. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  42. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  43. 1
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  44. 1
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  45. 4
      src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts
  46. 2
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  47. 23
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts
  48. 15
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  49. 24
      src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
  50. 17
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  51. 24
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
  52. 15
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  53. 24
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
  54. 31
      src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts
  55. 8
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  56. 3
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  57. 4
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts
  58. 1
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  59. 8
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts
  60. 2
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  61. 4
      src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts
  62. 4
      src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
  63. 4
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  64. 4
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  65. 2
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  66. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  67. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  68. 26
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue
  69. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts
  70. 46
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  71. 2
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  72. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
  73. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  74. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  75. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue
  76. 67
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  77. 84
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  78. 114
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

5
src/api/eam/equipmentRepairJobMain/index.ts

@ -69,6 +69,11 @@ export const createEquipmentRepairJobMain = async (data: EquipmentRepairJobMainV
return await request.post({ url: `/eam/equipment-repair-job-main/create`, data })
}
// 维修验证更新工单主
export const wxVerifyEquipmentRepairJobMain = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/wxVerify`, data })
}
// 修改维修工单主
export const updateEquipmentRepairJobMain = async (data: EquipmentRepairJobMainVO) => {
return await request.put({ url: `/eam/equipment-repair-job-main/update`, data })

5
src/api/eam/equipmentReportRepairRequest/index.ts

@ -77,6 +77,11 @@ export const updateEquipmentReportRepairOrder = async (data: EquipmentReportRepa
return await request.post({ url: `/eam/equipment-report-repair-request/updateOrder`, data })
}
// 审核报修工单状态
export const audiEquipmentReportRepairOrder = async (data: EquipmentReportRepairRequestVO) => {
return await request.post({ url: `/eam/equipment-report-repair-request/audiOrder`, data })
}
// 完成并创建维修工单
export const createEquipmentWeixiuOrder = async (data: EquipmentReportRepairRequestVO) => {
return await request.post({ url: `/eam/equipment-report-repair-request/updateCreateOrder`, data })

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

@ -189,4 +189,8 @@ export const getBalanceByBusinessTypeByItemType = async (params) => {
} else {
return await request.get({ url: `/wms/balance/pageBusinessTypeToBalance`, params })
}
}
}
// 根据code获取数据列表
export const getBalanceItemListByCodes = async (data) => {
  return await request.get({ url: `/wms/balance/listByCodes`,data })
}

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

@ -0,0 +1,524 @@
// 获取供应商列表
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)
}
})
}

7
src/api/wms/customeritem/index.ts

@ -72,4 +72,9 @@ export const getPageBusinessTypeToItemCode = async (params) => {
} else {
return await request.get({ url: `/wms/customeritem/pageBusinessTypeToItemCode`, params })
}
}
}
// 根据code获取数据列表
export const getCustomerItemListByCodes = async (data) => {
return await request.get({ url: `/wms/customeritem/listByCodes?itemCodes=` + data.itemCodes + '&customerCode='+data.customerCode + '&businessType='+(data.businessType?data.businessType:'') })
}

7
src/api/wms/itembasic/index.ts

@ -113,4 +113,9 @@ export const selectConfigToItembasic = async (params) => {
// 根据物料代码查计量单位
export const getQueryItemCodeInfo = async (data) => {
return await request.post({ url: 'wms/itembasic/queryItemCodeInfo', data })
}
}
// 根据code获取数据列表
export const getItemListByCodes = async (params) => {
return await request.get({ url: `/wms/itembasic/listByCodes`,params})
}

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

@ -86,3 +86,7 @@ export const exportItempackaging = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/itempackage/get-import-template' })
}
// 根据code获取数据列表
export const getItemPackageunitListByCodes = async (data) => {
return await request.get({ url: `/wms/itempackage/listByCodes?itemCode=` + data.itemCode + '&packUnit='+data.packUnit})
}

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

@ -69,3 +69,8 @@ export const exportPackageunit = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/packageunit/get-import-template' })
}
// 根据code获取数据列表
export const getPackageunitListByCodes = async (codes: string) => {
return await request.get({ url: `/wms/packageunit/listByCodes?codes=` + codes })
}

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

@ -67,3 +67,8 @@ export const exportProductionlineitem = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/productionlineitem/get-import-template' })
}
export const getProductionLineCodelistByCodes = (data) => {
return request.get({ url: `/wms/productionlineitem/listByCodes?productionLineCode=`+data.productionLineCode +'&itemCodes='+data.itemCodes})
}

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

@ -93,3 +93,9 @@ export const exportSupplierSCP = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/supplier/get-import-template' })
}
// 根据code获取数据列表
export const getSupplierListByCodes = async (codes: string) => {
return await request.get({ url: `/wms/supplier/listByCodes?codes=` + codes })
}

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

@ -147,3 +147,8 @@ export const getLoginUserRoleList = async () => {
}
// 编辑的时候计算主表系统税额
export const getTaxAmount = async ({id,taxRate}) => {
return await request.get({ url: `/wms/supplierinvoice-request-main/computeById?id=${id}&taxRate=${taxRate}`})
}

8
src/api/wms/supplieritem/index.ts

@ -99,4 +99,10 @@ export const selectItembasicTypeToSupplieritem = async (params) => {
export const getDefaultLocationCode = async(data: SupplieritemVO)=> {
return await request.post({ url: `/wms/supplieritem/getDefaultLocationCode`, data })
}
}
// 根据code获取数据列表
export const getSupplierItemListByCodes = async (data) => {
return await request.get({ url: `/wms/supplieritem/listByCodes?supplierCode=`+data.supplierCode +'&itemCodes='+data.itemCodes })
}

6
src/components/Annex/src/Annex.vue

@ -3,7 +3,7 @@
<div class="annex">
<div class="title flex items-center">
<!-- <div class="title-txt">附件</div> -->
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" :title="t('ts.添加附件')" :upData="upData" :limit="10"
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" :fileSize="fileSize" :title="t('ts.添加附件')" :upData="upData" :limit="10"
@update:modelValue="handleAnnexSuccess" v-if="showAddBtn&&annexData.annexList.length<5"/>
</div>
<div class="list">
@ -56,6 +56,10 @@ const props = defineProps({
return ['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg']
}
},
fileSize:{
type:Number,
required: false,
},
showPreview: {
type: Boolean,
required: false

58
src/components/BasicForm/src/BasicForm.vue

@ -99,6 +99,8 @@
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange"
@clearInput='clearInput'
@batchAdd="batchAdd"
:routeName="routeName"
>
<template v-slot="{row}">
<slot :row="row"></slot>
@ -132,9 +134,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
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 { debounce } from 'lodash-es'
import { tableFormBlurVer,FormBlur,getListByBottonInput } from '@/api/wms/business/business'
const props = defineProps({
//
basicFormWidth: {
@ -338,7 +339,10 @@ const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
console.log(111,formSchema)
const route = useRoute() //
const routeName = ref('')
routeName.value = route.name
const isExecute = ref(true)//true
// -
// const buttondata = [
@ -496,9 +500,13 @@ let originFormModel = {}
const updateOriginFormModel = (data)=>{
originFormModel = JSON.parse(JSON.stringify(data))
}
const sumFormDataHandle1 = ()=>{
emit('sumFormDataHandle',formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel)
}
watch(()=>unref(formRef)?.formModel,async () => {
if(props?.sumFormDataByForm&&unref(formRef)?.formModel){
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel)
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel,sumFormDataHandle1)
}
},{
deep:true
@ -674,7 +682,8 @@ const emit = defineEmits([
'formFormDateChange',
'footButtonClick',
'clearSearchInput',
'clearInput'
'clearInput',
'sumFormDataHandle'
])
//
const formSelectChange = (field, val, row) => {
@ -758,11 +767,42 @@ const onChange = (field, cur) => {
/**
* 监听失焦事件
* @param field 当前操作字段
* @param e
* @param e
*/
const onBlur = (field, e) => {
const onBlur = async (field, e) => {
isExecute.value = false
await FormBlur(field, e,routeName.value,formRef.value,props.detailData,formSchema.value,(searchField, list)=>{
emit('searchTableSuccess', field, searchField, list, formRef.value, 'form')
})
isExecute.value = true
emit('onBlur', field, e)
}
//
const batchAdd = async (val) => {
const row = {}
tableAllSchemas.value.tableFormColumns.forEach((item) => {
row[item.field] = item.default ? item.default : ''
})
const headerItem = tableAllSchemas.value.tableColumns.find((item) => item.field == props.fieldTableColumn)
await getListByBottonInput(headerItem, val,row,routeName.value,formRef.value,props.detailData,props.tableData,(list)=>{
emit('searchTableSuccess',headerItem.field,'itemCode',list, formRef.value,'tableForm',row)
})
}
const inputStringBlur = async (headerItem, val, row, index) => {
// isExecute.value = false
await tableFormBlurVer(headerItem,val,row,index,routeName.value,formRef.value,props.detailData,props.tableData,(searchField, list)=>{
emit('searchTableSuccess',headerItem.field,searchField,list, formRef.value,'tableForm',row,'blur',index)
})
// isExecute.value = true
}
/**
* 回车事件
* @param field 当前操作字段
@ -791,9 +831,7 @@ const buttonOperationClick = (row, label, index)=> {
emit("buttonOperationClick", row, label, index);
}
const inputStringBlur = (headerItem, row, index)=> {
emit("inputStringBlur", headerItem, row, index);
}
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handleAddTable,changeDialogWidth}) // open
</script>

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

@ -757,7 +757,7 @@ const submitForm = async () => {
try {
const data = unref(formRef)?.formModel
const data1 = unref(formRef1)?.formModel
emit('submitForm', formType.value, {...data,...data1})
emit('submitForm', formType.value, {...data})
} finally {
formLoading.value = false
}

2
src/components/Detail/src/Detail.vue

@ -108,6 +108,7 @@
<Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
:fileType="annexItem.fileType"
:fileSize="annexItem.fileSize"
:showAddBtn="!annexItem.hiddenUpload"
:showPreview="annexItem.showPreview"
:showDownload = "annexItem.showDownload"
@ -525,6 +526,7 @@ const getAnnexFileList = async (row) => {
hasSubDetail:item.hasSubDetail||false,
subDetailTableData:item.subDetailTableData,
fileType:item.fileType||['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg'],
fileSize:item.fileSize||5,
showPreview:item.showPreview||false, //
showDownload:item.showDownload||false, //
hiddenDelete:item.hiddenDelete || false, //

10
src/components/Form/src/Form.vue

@ -269,7 +269,10 @@ export default defineComponent({
//
emit('onEnter',item.field,formModel.value[item.field],event)
}
}} v-slots={{
}}
onBlur={(e)=>{onBlur(item.field, e)}}
v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){
@ -318,7 +321,10 @@ export default defineComponent({
//
emit('onEnter',item.field,formModel.value[item.field],event)
}
}} disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
}}
onBlur={(e)=>{onBlur(item.field,formModel.value[item.field])}}
disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){

54
src/components/TableForm/src/TableForm.vue

@ -66,9 +66,9 @@
clearable
:type="headerItem?.tableForm?.inputType"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')"
:disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false"
:disabled="disabledInput(headerItem)"
style="flex:1"
@blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"
@blur="inputStringBlur(headerItem, row[headerItem.field], row,index)"
/>
<Icon icon="ep:circle-close" v-if="headerItem?.tableForm?.isInpuFocusShow && headerItem?.tableForm?.disabled&& headerItem?.tableForm?.clearable" style='position:absolute;right:50px;cursor: pointer;' @click="clearInput(headerItem.field,row,index)"/>
<el-button :key="headerItem.field+$index+'button'" v-if="headerItem?.tableForm?.isInpuFocusShow" @click="inpuFocus(headerItem,row,index)"><Icon icon="ep:search" size="14"/></el-button>
@ -333,6 +333,10 @@
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer;" />
<div>{{t('ts.批量删除')}}</div>
</div>
<div class="p-12px" v-if="routeName == 'PurchaseMain'||routeName == 'ProductionMain'||routeName == 'ZZBJDeliverPlanMain'||routeName == 'DeliverPlanMain'||routeName == 'DeliverRequestMain'||routeName == 'ZZBJDeliverRequestMain'||routeName == 'UnplannedreceiptRequestMain'">
<el-input v-model="keyWord" style="width: 240px" placeholder="回车自动添加"/>
<el-button type="primary" style="margin-left: 10px" @click="batchAdd">{{t('批量添加')}}</el-button>
</div>
</div>
</div>
</template>
@ -408,7 +412,13 @@ const props = defineProps({
tableFormRules: {
type: Object,
default: null
}
},
//
routeName: {
type: String,
required: false,
default: ''
},
})
//
const emit = defineEmits([
@ -426,7 +436,8 @@ const emit = defineEmits([
'inputStringBlur',
'tableFormSelectOnBlur',
'formFormDateChange',
'clearInput'
'clearInput',
'batchAdd'
])
// | type = radio | type = select
const initSelectOptions = (item) => {
@ -528,8 +539,8 @@ const inpuFocus = (headerItem, row, index)=>{
}
// input
const inputStringBlur = (field, val,row) => {
emit('inputStringBlur', field, val,row)
const inputStringBlur = (headerItem, val,row,index) => {
emit('inputStringBlur', headerItem, val,row,index)
}
const clearInput= (field, row, index) => {
emit('clearInput',field, row, index)
@ -548,10 +559,39 @@ const showTableData = ()=>{
return props.tableData
}
}
const keyWord = ref('')
console.log(9999,props.tableFields)
const batchAdd = ()=>{
console.log(keyWord.value)
let field = ''
const itemCodeFields = props.tableFields.find(item=>item.field == 'itemCode')
const supplierFields = props.tableFields.find(item=>item.field == 'supplierCode')
if(itemCodeFields){
field = itemCodeFields.field
}else {
if(itemCodeFields){
field = supplierFields.field
}
}
console.log(field)
emit('batchAdd',keyWord.value)
}
const disabledInput=(headerItem)=>{
if(headerItem.tableForm?.isInpuFocusShow){
if(headerItem.tableForm?.enterSearch){
return false
}else{
return true
}
}else{
return headerItem?.tableForm?.disabled || true
}
}
// setup
defineExpose({
TableBaseComponents_Ref,
validateForm
validateForm,
keyWord
})
</script>

26
src/views/eam/equipmentInspectionMain/index.vue

@ -94,6 +94,7 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts";
import * as EquipmentSpotCheckMainApi from "@/api/eam/equipmentSpotCheckMain";
defineOptions({ name: 'EquipmentInspectionMain' })
@ -189,9 +190,10 @@ const isShowEditStatusButton = (row) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentInspectionMain:update'}), //
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentInspectionMain:update'}), //
//defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentInspectionMain:update'}),
@ -213,6 +215,8 @@ const buttonTableClick = async (val, row) => {
handleFinish(row)
} else if (val == 'validate') { //
handleValidate(row)
} else if (val == 'cancel') { //
handleCancel(row.id)
}
}
@ -392,6 +396,26 @@ const handleValidate = async (row) => {
}
/** 作废按钮操作 */
const handleCancel = async (id: number) => {
try {
//
await message.delConfirm('是否作废所选中任务?');
const params = ref({
id: '',
status:'',
})
params.value.id = id
params.value.status = '8'
//
await EquipmentInspectionMainApi.updateEquipmentInspectionOrder(params.value)
message.success(t('执行成功'))
//
await getList()
} catch {}
}
const detailBasicFormOnChange = (field, item) => {
//
if(field == 'result' && item == '1'){

25
src/views/eam/equipmentMaintenanceMain/index.vue

@ -104,6 +104,7 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts";
import * as EquipmentInspectionMainApi from "@/api/eam/equipmentInspectionMain";
defineOptions({ name: 'EquipmentMaintenanceMain' })
@ -197,9 +198,10 @@ const isShowEditStatusButton = (row) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentMaintenanceMain:update'}),
@ -221,6 +223,8 @@ const buttonTableClick = async (val, row) => {
handleFinish(row)
} else if (val == 'validate') { //
handleValidate(row)
} else if (val == 'cancel') { //
handleCancel(row.id)
}
}
@ -391,6 +395,25 @@ const handleValidate = async (row) => {
}
/** 作废按钮操作 */
const handleCancel = async (id: number) => {
try {
//
await message.delConfirm('是否作废所选中任务?');
const params = ref({
id: '',
status:'',
})
params.value.id = id
params.value.status = '8'
//
await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value)
message.success(t('执行成功'))
//
await getList()
} catch {}
}
/** 启用 */
const handleEnable = async (id: number) => {
try {

129
src/views/eam/equipmentRepairJobMain/finishForm1.vue

@ -2,29 +2,29 @@
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false">
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="维修验证人" prop="verifyerRepair">
<el-input v-model="formData.verifyerRepair" placeholder="请输入维修验证人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="维修验证人" prop="verifyerRepair">-->
<!-- <el-input v-model="formData.verifyerRepair" placeholder="请输入维修验证人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="维修验证内容" prop="verifyContentRepair">
<el-input v-model="formData.verifyContentRepair" placeholder="请输入维修验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="维修验证时间" prop="verifyTimeRepair">
<el-date-picker
v-model="formData.verifyTimeRepair"
type="datetime"
value-format="x"
placeholder="选择维修验证时间">
</el-date-picker>
<el-input v-model="formData.verifyContentRepair" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入维修验证内容" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="维修验证时间" prop="verifyTimeRepair">-->
<!-- <el-date-picker-->
<!-- v-model="formData.verifyTimeRepair"-->
<!-- type="datetime"-->
<!-- value-format="x"-->
<!-- placeholder="选择维修验证时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button>
@ -41,7 +41,10 @@ import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
import {updateEquipmentRepairJobMain} from "@/api/eam/equipmentRepairJobMain";
import {
updateEquipmentRepairJobMain,
wxVerifyEquipmentRepairJobMain
} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'TeamForm' })
@ -64,93 +67,25 @@ const formData = ref({
id:'',
number:'',
sources:'',
verifyerRepair: '',
//verifyerRepair: '',
verifyContentRepair: '',
verifyTimeRepair: '',
//verifyTimeRepair: '',
})
const formRules = reactive({
verifyerRepair: [
{ required: true, message: '验证人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
// verifyerRepair: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
verifyContentRepair: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTimeRepair: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
// verifyTimeRepair: [
// { required: true, message: '', trigger: 'blur' },
// ],
})
const basicFormRef = ref() // 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 addItem = () =>{
// addItemCommon(true,'xunJianItem')
// }
//
// /** */
// const addItemCommon = (multiple,field) => {
// _searchCondition.value = {}
// const filters: any[] = []
// filters.push({
// action: "==",
// column: 'available',
// value: 'TRUE'
// })
// //
// _searchCondition.value.isSearch = true
// _searchCondition.value.filters = filters
// _searchTableTitle.value = ''
// _multiple.value = multiple
// _formField.value = field
// _searchField.value = field
// _searchTablePage.value = inspectionItemApi.getInspectionItemPage
// _searchTableAllSchemas.value = InspectionItem.allSchemas
// openCommon()
// }
//
// /** */
// const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
// nextTick?.(() => {
// if (formField === 'xunJianItem') {
// val.forEach(item => {
// const isExist = tags.value.some(tag => tag.content === item.content);
// if (!isExist){
// const newItem = {};
// newItem['content'] = item.content;
// newItem['id'] = item.id;
// tags.value.push(newItem);
// }
// });
// }
// })
// }
// /**/
// const openCommon = () => {
// searchTableRef.value.open(
// _searchTableTitle.value,
// _searchTableAllSchemas.value,
// _searchTablePage.value,
// _formField.value,
// _searchField.value,
// _multiple.value,
// _type.value,
// _row.value,
// _searchCondition.value
// )
// }
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
@ -172,7 +107,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentRepairJobMainApi.updateEquipmentRepairJobMain(formData.value)
await EquipmentRepairJobMainApi.wxVerifyEquipmentRepairJobMain(formData.value)
//success
emit('success',formData.value.id,formData.value.sources)
dialogVisible.value = false

6
src/views/eam/equipmentRepairJobMain/finishForm2.vue

@ -76,7 +76,6 @@
import * as EquipmentRepairJobMainApi from '@/api/eam/equipmentRepairJobMain'
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import {updateEquipmentRepairMain} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'TeamForm' })
@ -104,7 +103,7 @@ const formData = ref({
endTime:'',
maintenancePhone:'',
completeResult:'',
status:'5'
status:'6'
})
const formRules = reactive({
maintenanceDesc: [
@ -137,6 +136,7 @@ const open = async (type: string, row?: object) => {
//
formData.value.id = row.id
formData.value.number = row.number
formData.value.status = '5'
}
defineExpose({ open }) // open
@ -150,7 +150,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentRepairJobMainApi.updateEquipmentRepairMain(formData.value);
await EquipmentRepairJobMainApi.executeEquipmentRepairJobMain(formData.value);
//success
emit('success',formData.value.id)

126
src/views/eam/equipmentRepairJobMain/finishForm3.vue

@ -2,29 +2,29 @@
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false">
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="报修验证人" prop="verifyerReport">
<el-input v-model="formData.verifyerReport" placeholder="请输入报修验证人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="报修验证人" prop="verifyerReport">-->
<!-- <el-input v-model="formData.verifyerReport" placeholder="请输入报修验证人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="报修验证内容" prop="verifyContentReport">
<el-input v-model="formData.verifyContentReport" placeholder="请输入报修验证内容" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="报修验证时间" prop="verifyTimeReport">
<el-date-picker
v-model="formData.verifyTimeReport"
type="datetime"
value-format="x"
placeholder="选择报修验证时间">
</el-date-picker>
<el-input v-model="formData.verifyContentReport" type="textarea" :input-style="{height:'100px'}" maxlength="300" placeholder="请输入报修验证内容" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="报修验证时间" prop="verifyTimeReport">-->
<!-- <el-date-picker-->
<!-- v-model="formData.verifyTimeReport"-->
<!-- type="datetime"-->
<!-- value-format="x"-->
<!-- placeholder="选择报修验证时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm('success')"> </el-button>
@ -40,6 +40,7 @@
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
import {bxVerifyEquipmentRepairJobMain} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'TeamForm' })
@ -61,93 +62,25 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
verifyerReport: '',
//verifyerReport: '',
verifyContentReport: '',
verifyTimeReport: '',
//verifyTimeReport: '',
})
const formRules = reactive({
verifyerReport: [
{ required: true, message: '验证人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
// verifyerReport: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
verifyContentReport: [
{ required: true, message: '验证内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
verifyTimeReport: [
{ required: true, message: '验证时间不能为空', trigger: 'blur' },
],
// verifyTimeReport: [
// { required: true, message: '', trigger: 'blur' },
// ],
})
const basicFormRef = ref() // 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 addItem = () =>{
// addItemCommon(true,'xunJianItem')
// }
//
// /** */
// const addItemCommon = (multiple,field) => {
// _searchCondition.value = {}
// const filters: any[] = []
// filters.push({
// action: "==",
// column: 'available',
// value: 'TRUE'
// })
// //
// _searchCondition.value.isSearch = true
// _searchCondition.value.filters = filters
// _searchTableTitle.value = ''
// _multiple.value = multiple
// _formField.value = field
// _searchField.value = field
// _searchTablePage.value = inspectionItemApi.getInspectionItemPage
// _searchTableAllSchemas.value = InspectionItem.allSchemas
// openCommon()
// }
//
// /** */
// const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
// nextTick?.(() => {
// if (formField === 'xunJianItem') {
// val.forEach(item => {
// const isExist = tags.value.some(tag => tag.content === item.content);
// if (!isExist){
// const newItem = {};
// newItem['content'] = item.content;
// newItem['id'] = item.id;
// tags.value.push(newItem);
// }
// });
// }
// })
// }
// /**/
// const openCommon = () => {
// searchTableRef.value.open(
// _searchTableTitle.value,
// _searchTableAllSchemas.value,
// _searchTablePage.value,
// _formField.value,
// _searchField.value,
// _multiple.value,
// _type.value,
// _row.value,
// _searchCondition.value
// )
// }
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
@ -156,6 +89,7 @@ const open = async (type: string, row?: object) => {
//
formData.value.id = row.id
formData.value.number = row.number
formData.value.status = '8'
}
defineExpose({ open }) // open
@ -168,7 +102,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentRepairJobMainApi.updateEquipmentRepairJobMain(formData.value)
await EquipmentRepairJobMainApi.createEquipmentRepairNewOrder(formData.value)
//success
emit('success',formData.value.id)
dialogVisible.value = false

54
src/views/eam/equipmentRepairJobMain/index.vue

@ -184,7 +184,7 @@ const isShowBaoXiuButton = (row) => {
// -
const butttondata = (row) => {
return[
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
defaultButtons.mainListTransferBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), //
@ -319,15 +319,8 @@ const finishForm3Ref = ref()
const handleValidateReport = async (row) => {
await message.delConfirm('是否验证所选中工单?');
message.confirmPassword(t('')).then(async () => {
const params = ref({id: '', status:''})
params.value.id = row.id
params.value.status = '8'
//
await EquipmentRepairJobMainApi.createEquipmentRepairNewOrder(params.value)
message.success(t('工单已结束'))
//
await getList()
finishForm3Ref.value.open('update', row);
}).catch (async (action: Action) => {
if(action === 'cancel'){
const params = ref({id: '', number:''})
@ -460,18 +453,18 @@ const getClosed1=(val)=> {
const getData1=(val1,val2)=> {
nextTick?.(async () => {
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val1
if(val2 == '1'){
params.value.status = '8'
}
if(val2 == '0'){
params.value.status = '7'
}
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
// const params = ref({
// id: '',
// status:'',
// })
// params.value.id = val1
// if(val2 == '1'){
// params.value.status = '8'
// }
// if(val2 == '0'){
// params.value.status = '7'
// }
// await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
@ -520,20 +513,17 @@ const getClosed3=(val)=> {
//finishForm3
const getData3=(val)=> {
nextTick?.(async () => {
console.log(val)
try {
const params = ref({
id: '',
status:'',
})
params.value.id = val
params.value.status = '7'
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
//console.log(val)
// const params = ref({
// id: '',
// status:'',
// })
// params.value.id = val
// params.value.status = '7'
// await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
} catch {}
}
)
}

2
src/views/eam/equipmentRepairRecordMain/index.vue

@ -240,7 +240,7 @@ const openRepairExperience = (type: string, row?: any) => {
const repairExperienceFormsSuccess = async (formType, data) => {
console.log(data)
const data1 = {
repairNumber: data.number,
repairRecordNumber: data.recordNo,
name: data.name,
content: data.content,
masterId: data.id,

23
src/views/eam/equipmentReportRepairRequest/audiForm.vue

@ -2,11 +2,11 @@
<Dialog v-model="dialogVisible" :title="dialogTitle" :close-on-click-modal="false">
<el-form ref="basicFormRef" v-loading="formLoading" :model="formData" :rules="formRules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="审核人" prop="approver">
<el-input v-model="formData.approver" placeholder="请输入审核人" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="审核人" prop="approver">-->
<!-- <el-input v-model="formData.approver" placeholder="请输入审核人" :disabled="isDisabled"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="审核内容" prop="approveContent">
<el-input v-model="formData.approveContent" placeholder="请输入审核内容" />
@ -40,6 +40,7 @@
import { SearchTable } from '@/components/SearchTable'
import {ElInput} from "element-plus";
import * as EquipmentReportRepairRequestApi from "@/api/eam/equipmentReportRepairRequest";
import {audiEquipmentReportRepairOrder} from "@/api/eam/equipmentReportRepairRequest";
defineOptions({ name: 'TeamForm' })
@ -61,15 +62,15 @@ const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
id:'',
number:'',
approver: '',
//approver: '',
approveContent: '',
approveTime: '',
})
const formRules = reactive({
approver: [
{ required: true, message: '审核人不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
// approver: [
// { required: true, message: '', trigger: 'blur' },
// { max: 50, message: '50', trigger: 'blur' }
// ],
approveContent: [
{ required: true, message: '审核内容不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -102,7 +103,7 @@ const submitForm = async (val) => {
if (!valid) return
//
await EquipmentReportRepairRequestApi.updateEquipmentReportRepairRequest(formData.value)
await EquipmentReportRepairRequestApi.audiEquipmentReportRepairOrder(formData.value)
dialogVisible.value = false
}

25
src/views/eam/equipmentSpotCheckMain/index.vue

@ -93,6 +93,7 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts";
import * as EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'EquipmentSpotCheckMain' })
@ -187,9 +188,10 @@ const isShowEditStatusButton = (row) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
//defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentSpotCheckMain:update'}),
@ -211,6 +213,8 @@ const buttonTableClick = async (val, row) => {
handleFinish(row)
} else if (val == 'validate') { //
handleValidate(row)
} else if (val == 'cancel') { //
handleCancel(row.id)
}
}
@ -389,6 +393,25 @@ const handleValidate = async (row) => {
}
/** 作废按钮操作 */
const handleCancel = async (id: number) => {
try {
//
await message.delConfirm('是否作废所选中任务?');
const params = ref({
id: '',
status:'',
})
params.value.id = id
params.value.status = '8'
//
await EquipmentSpotCheckMainApi.updateEquipmentSpotCheckOrder(params.value)
message.success(t('执行成功'))
//
await getList()
} catch {}
}
const detailBasicFormOnChange = (field, item) => {
//

2
src/views/eam/planInspection/index.vue

@ -159,7 +159,7 @@ const isShowStatusButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:planInspection:update'}), //
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planInspection:update'}), //
defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planInspection:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planInspection:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planInspection:update'}),

2
src/views/eam/planSpotCheck/index.vue

@ -160,7 +160,7 @@ const isShowStatusButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:planSpotCheck:update'}), //
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planSpotCheck:update'}), //
defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planSpotCheck:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planSpotCheck:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planSpotCheck:update'}),

1
src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts

@ -86,6 +86,7 @@ export const Itemwarehouse = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段

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

@ -78,6 +78,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本

1
src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts

@ -125,6 +125,7 @@ export const SupplierUser = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true,
searchListPlaceholder: '请选供应商信息',
searchField: 'code',

83
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -43,10 +43,13 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
value:'MANUAL',
},
isSearch: true
},
{
label: '执行周期',
label: '',//执行周期
field: 'crontab',
sort: 'custom',
table: {
@ -83,45 +86,45 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
// {
// label: '物料忽略名单',
// field: 'ignoreListOfItem',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// multiple:true,//是否可以多选
// searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '物料信息', // 查询弹窗标题
// searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
// searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
// }
// }
// },
// {
// label: '库位忽略名单',
// field: 'ignoreListOfLocation',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// multiple:true,//是否可以多选
// searchListPlaceholder: '请选择库位忽略名单', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage // 查询弹窗所需分页方法
//
// }
// }
// },
{
label: '物料忽略名单',
field: 'ignoreListOfItem',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//是否可以多选
searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
}
}
},
{
label: '库位忽略名单',
field: 'ignoreListOfLocation',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//是否可以多选
searchListPlaceholder: '请选择库位忽略名单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage // 查询弹窗所需分页方法
}
}
},
// {
// label: '盘点范围列表',
// field: 'scopeList',

3
src/views/wms/countManage/count/countPlanMain/index.vue

@ -54,7 +54,6 @@
:formAllSchemas="CountPlanMain.allSchemas"
:tableAllSchemas="CountPlanDetail.allSchemas"
:tableFormRules="CountPlanDetailRules"
:CountPlanMain1FormAllSchemas="CountPlanMain1.allSchemas"
:tableData="tableData"
:apiUpdate="CountPlanMainApi.updateCountPlanMain"
:apiCreate="CountPlanMainApi.createCountPlanMain"
@ -113,7 +112,7 @@ import {
CountPlanMainRules,
CountPlanDetail,
CountPlanDetailRules,
CountPlanMain1
// CountPlanMain1
} from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail'

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

@ -1290,8 +1290,8 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSche
}
},
{
label: '包装数量',
field: 'packQty',
label: '包装规格',
field: 'packUnit',
sort: 'custom',
table: {
width: 150
@ -1322,6 +1322,7 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSche
}
},
tableForm: {
enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
@ -1346,16 +1347,13 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSche
isForm: true
},
{
label: '包装规格',
field: 'packUnit',
label: '包装数量',
field: 'packQty',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm:{
disabled:true

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

@ -189,7 +189,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
}else if(formField == 'packQty'){
}else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
}else if(formField == 'toLocationCode') {

1
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts

@ -394,6 +394,7 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'code',

2
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts

@ -561,6 +561,7 @@ export const PackageoverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 120
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
@ -609,6 +610,7 @@ export const PackageoverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 120
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本

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

@ -1495,6 +1495,7 @@ export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
tableForm: {
enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',

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

@ -745,7 +745,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
isSearch: false,
isTable:false,
sortSearchDefault:6,
sortTableDefault:1100,
@ -763,6 +763,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
sortSearchDefault:2,
sortTableDefault:3,
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
@ -863,7 +864,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '备注',
field: 'remark',

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

@ -1130,6 +1130,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
width: 150
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段

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

@ -616,6 +616,7 @@ export const ProductionreturnRequestDetailNoLabel = useCrudSchemas(reactive<Crud
width: 150
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段

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

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

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

@ -53,6 +53,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

4
src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts

@ -190,7 +190,7 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
label: '创建者',
field: 'creator',
sort: 'custom',
isTable: true,
isTable: false,
table: {
width: 150
},
@ -206,7 +206,7 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: true,
isTable: false,
form: {
component: 'DatePicker',
componentProps: {

2
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -118,7 +118,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// console.log(err);
// })
if(formField=='itemCode'){
row[formField] = val[0][searchField]
// row[formField] = val[0][searchField]
val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))

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

@ -204,17 +204,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -610,6 +610,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},

15
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -107,14 +107,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async() => {
if (type == 'tableForm') {
//
await ItemBasicApi.getItembasicPage({
code: row['itemCode']
}).then(res => {
row['uom'] = res?.list[0].uom
}).catch(err =>{
console.log(err);
})
// await ItemBasicApi.getItembasicPage({
// code: row['itemCode']
// }).then(res => {
// row['uom'] = res?.list[0].uom
// }).catch(err =>{
// console.log(err);
// })
row[formField] = val[0][searchField]
row['uom'] = val[0]['uom']
} else {
const setV = {}
if(formField == 'workshop'){

24
src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts

@ -195,17 +195,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -601,6 +601,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
@ -626,6 +627,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

17
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

@ -106,15 +106,16 @@ const updataTableColumns = (val) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async() => {
if (type == 'tableForm') {
//
await ItemBasicApi.getItembasicPage({
code: row['itemCode']
}).then(res => {
row['uom'] = res?.list[0].uom
}).catch(err =>{
console.log(err);
})
// //
// await ItemBasicApi.getItembasicPage({
// code: row['itemCode']
// }).then(res => {
// row['uom'] = res?.list[0].uom
// }).catch(err =>{
// console.log(err);
// })
row[formField] = val[0][searchField]
row['uom'] = val[0]['uom']
} else {
const setV = {}
if(formField == 'workshop'){

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

@ -195,17 +195,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -601,6 +601,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
@ -626,6 +627,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

15
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

@ -107,14 +107,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async() => {
if (type == 'tableForm') {
//
await ItemBasicApi.getItembasicPage({
code: row['itemCode']
}).then(res => {
row['uom'] = res?.list[0].uom
}).catch(err =>{
console.log(err);
})
// await ItemBasicApi.getItembasicPage({
// code: row['itemCode']
// }).then(res => {
// row['uom'] = res?.list[0].uom
// }).catch(err =>{
// console.log(err);
// })
row[formField] = val[0][searchField]
row['uom'] = val[0]['uom']
} else {
const setV = {}
if(formField == 'workshop'){

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

@ -196,17 +196,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -602,6 +602,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
@ -627,6 +628,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

31
src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadProductionPlanMainRules = reactive({
@ -71,6 +72,36 @@ export const QadProductionPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
component: 'SelectV2'
},
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
// {
// label: '备注',
// field: 'remark',

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

@ -229,7 +229,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: false,
},
{
label: '创建时间',
@ -238,7 +238,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 180
@ -671,7 +671,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -688,7 +688,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable: false,
isTable: true,
},
// {
// label: '任务明细ID',

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

@ -820,6 +820,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
@ -1808,6 +1809,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
}
},
tableForm: {
enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
@ -1876,6 +1878,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
}
},
tableForm: {
enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',

4
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts

@ -676,7 +676,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -693,7 +693,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable: false,
isTable: true,
},
// {
// label: '任务明细ID',

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

@ -821,6 +821,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:1003,
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',

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

@ -217,7 +217,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: false,
},
{
label: '创建时间',
@ -230,7 +230,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: true,
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -665,7 +665,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -682,7 +682,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable: false,
isTable: true,
},
// {

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

@ -778,6 +778,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:1003,
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
@ -1789,6 +1790,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
}
},
tableForm: {
enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',

4
src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts

@ -659,7 +659,7 @@ export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
isTable:true,
hiddenInMain:true,
},
{
@ -673,7 +673,7 @@ export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable:false,
isTable:true,
hiddenInMain:true,
form: {
component: 'DatePicker',

4
src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts

@ -568,7 +568,7 @@ export const ProductredressRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable:false,
isTable:true,
hiddenInMain: true,
},
{
@ -592,7 +592,7 @@ export const ProductredressRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
}
},
isForm: false,
isTable:false,
isTable:true,
hiddenInMain: true,
},
{

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

@ -575,7 +575,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
isTableForm: false,
isForm: false,
isTable:false,
isTable:true,
hiddenInMain:true
},
{
@ -589,7 +589,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 180
},
isTable:false,
isTable:true,
hiddenInMain:true,
form: {
component: 'DatePicker',

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

@ -809,7 +809,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
width: 180
},
hiddenInMain: true,
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -830,7 +830,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
hiddenInMain: true,
isTable: false,
isTable: true,
isTableForm: false,
isForm: false
},

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

@ -634,6 +634,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
@ -653,6 +654,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -173,7 +173,7 @@ const butttondata = (row,$index) => {
return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //
]
}

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -729,9 +729,11 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMain(data)
message.success(t('common.createSuccess'))
} else {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data)
message.success(t('common.updateSuccess'))
}

26
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue

@ -353,20 +353,20 @@ const butttondata = (row,$index) => {
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
// defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
{
label: '生成标签',
name: 'ssbq',
hide: isASNShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
},
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), //
// {
// label: '',
// name: 'ssbq',
// hide: isASNShowMainButton(row, ['3']),
// type: 'primary',
// icon: '',
// color: '',
// hasPermi: '',
// link: true //
// },
// defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
// defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
@ -729,9 +729,11 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
data.orderTypeM='2';
await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMain(data)
message.success(t('common.createSuccess'))
} else {
data.orderTypeM='2';
await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data)
message.success(t('common.updateSuccess'))
}

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

@ -535,6 +535,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled:true
}
}
},
@ -589,9 +590,6 @@ export const PurchasereceiptRequestMainRules = reactive({
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],

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

@ -1279,29 +1279,29 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm:false,
isForm:false
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
hiddenInMain: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isForm:false,
isTableForm:false,
form: {
componentProps:{
disabled:true
}
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isSearch: true,
// isTable: true,
// hiddenInMain: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// disabled:true
// },
// isForm:false,
// isTableForm:false,
// form: {
// componentProps:{
// disabled:true
// }
// },
// },
{
label: '备注',
field: 'remark',

2
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -590,9 +590,11 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMainSpare(data)
message.success(t('common.createSuccess'))
} else {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data)
message.success(t('common.updateSuccess'))
}

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

@ -35,6 +35,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
labelMessage: '影响明细中物料代码,需在供应商物料中维护',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

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

@ -417,6 +417,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
disabled:true,
multiple:true,//多选
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商物料',

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

@ -185,6 +185,7 @@ const getSearchTableData = async (number,formField,searchField)=>{
defaultParams:{number},
getListApi: PurchaseDetailApi.getPurchaseDetailPagePoNumber //
})
tableObject.pageSize = 500
//
const { getList:getList1 } = tableMethods
await getList1()

1
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -114,6 +114,7 @@ const openFormByCreate = async ( data ) => {
defaultParams:{code:data['supplierCode']},
getListApi: SupplierApi.getSupplierPage //
})
tableObject.pageSize = 500
const { getList } = tableMethods
await getList()
if(tableObject.tableList.length>0){

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

@ -99,6 +99,39 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:5,
isSearch: true
},
{
label: '未税差额',
field: 'beforeTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:5,
isForm:false,
isTableForm:false
},
{
label: '税额差异',
field: 'taxAmountDiff',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:5,
isForm:false,
isTableForm:false
},
{
label: '价税合计差额',
field: 'totalTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:5,
isForm:false,
isTableForm:false
},
{
label: '系统税额',
field: 'taxAmount',
@ -335,7 +368,8 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
value:[],
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD',
valueFormat: 'x',
dateFormat: 'YYYY-MM-DD',
type: 'daterange',
defaultTime: [new Date('1 '), new Date('1 ')]
}
@ -614,36 +648,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '未税差额',
field: 'beforeTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
isForm:false,
isTableForm:false
},
{
label: '税额差异',
field: 'taxAmountDiff',
formatter: accountantFormart,
table: {
width: 150
},
isForm:false,
isTableForm:false
},
{
label: '价税合计差额',
field: 'totalTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
isForm:false,
isTableForm:false
},
]))
//表单校验

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

@ -53,26 +53,42 @@
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel)=>{
const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel
:sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel,sumFormDataHandle1)=>{
const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel
// 2X*2
let taxAmount_ = 0.00
if(formType=='update'){ //
taxAmount_ = taxAmount
console.log('taxRate',taxRate)
console.log('originFormModel',originFormModel.taxRate)
console.log('taxAmount',taxAmount)
if(taxRate!=originFormModel.taxRate){
if(originFormModel){
sumFormDataHandle1()
}
updateOriginFormModel(formModel)
}
formRef.value.setValues({
afterTaxAmount:amount+taxAmount, // 3+
adTaxAmount:beforeTaxAmount+totalTaxAmount, //6+
beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//--
taxAmountDiff:totalTaxAmount-taxAmount,// -
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // =+
})
}else if(formType=='create'){ //
let taxAmount_ = taxAmount
if(taxRate!=originFormModel.taxRate){
taxAmount_ = tableData.reduce((prev, item) => prev + Number(Number(taxRate*0.01*Number(Number(item['singlePrice']*item['invoicableQuantity']).toFixed(2))).toFixed(2)),0)
updateOriginFormModel(formModel)
}
formRef.value.setValues({
taxAmount:taxAmount_,
afterTaxAmount:amount+taxAmount, // 3+
adTaxAmount:beforeTaxAmount+totalTaxAmount, //6+
beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//--
taxAmountDiff:totalTaxAmount-taxAmount,// -
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // =+
})
}
formRef.value.setValues({
taxAmount:taxAmount_,
afterTaxAmount:amount+taxAmount, // 3+
adTaxAmount:beforeTaxAmount+totalTaxAmount, //6+
beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//--
taxAmountDiff:totalTaxAmount-taxAmount,// -
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // =+
})
}"
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{
@ -92,6 +108,7 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@sumFormDataHandle="sumFormDataHandle"
>
<!-- <template #foorter>
<div style="text-align: left">
@ -185,6 +202,7 @@
@tableFormButton="tableFormButton"
:mainSubmitCreateApi="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
@handleMainFefresh="handleMainFefresh"
>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
@ -204,6 +222,7 @@
</template>
<script setup lang="ts">
import dayjs from 'dayjs'
//
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
@ -267,6 +286,9 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => {
})
}
}
const handleMainFefresh = ()=>{
getList()
}
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{
console.log('详情',formField, searchField, val, formRef,searchTableFormModel)
@ -279,6 +301,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
subList:val
})
detailRef.value.updateList()
getList()
}
// const basicFormFooter = computed(()=>{
@ -607,17 +630,21 @@ const handleImport = () => {
prop: 'Annex',
tableName:'contract',
hiddenDelete:false,
hiddenUpload:false
hiddenUpload:false,
fileSize:20
},{
label: t('ts.发票附件'),
prop: 'Annex',
tableName:'invoice',
hiddenDelete:false,
hiddenUpload:false
hiddenUpload:false,
fileSize:20
},{
label: t('ts.货运单附件'),
prop: 'Annex',
tableName:'waybill'
tableName:'waybill',
fileSize:20
}])
const openDetail = (row : any, titleName : any, titleValue : any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
@ -625,7 +652,7 @@ const handleImport = () => {
clicKRowId.value = row.id
//
if(row.status=='1'||row.status=='2'||row.status=='6'){
if((roleList.value.indexOf('purchase')>-1&&row.status=='2')||(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='1'||row.status=='6'))){
detailAnnexTable.value[0].hiddenDelete = false
detailAnnexTable.value[0].hiddenUpload = false
}else{
@ -633,7 +660,7 @@ const handleImport = () => {
detailAnnexTable.value[0].hiddenUpload = true
}
//
if(row.status=='3'||row.status=='7'){
if(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='3'||row.status=='7')){
detailAnnexTable.value[1].hiddenDelete = false
detailAnnexTable.value[1].hiddenUpload = false
}else{
@ -750,6 +777,7 @@ const handleImport = () => {
/** 审批通过按钮操作 finance_mainPlanSub */
const formFinanceRef = ref()
const handleFinanceApp = async (row) => {
row.postingDate = dayjs().valueOf()
formFinanceRef.value.open('update', row,null,'财务通过','财务通过')
}
@ -937,6 +965,17 @@ const handleImport = () => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
const sumFormDataHandle = async (formRef1,formModel,tableData,formType,originFormModel,updateOriginFormModel)=>{
if(formType=='update'){
if(formModel&&formModel.id&&formModel.taxRate&&originFormModel){
let res = await SupplierinvoiceRequestMainApi.getTaxAmount({id:formModel.id,taxRate:formModel.taxRate})
console.log('更新taxAmount',res)
formRef1.value.setValues({
taxAmount:res
})
}
}
}
//
const submitForm = async (formType, submitData) => {
let data = {...submitData}
@ -1074,12 +1113,11 @@ const importSuccess = () => {
}else{
roleList.value = []
}
detailButtonIsShowAddStatusArray.value = ['1','6']
// if(roleList.value.indexOf('supplier_operator')>-1){
// detailButtonIsShowAddStatusArray.value = ['1','6']
// }else{
// detailButtonIsShowAddStatusArray.value = []
// }
if(roleList.value.indexOf('supplier_operator')>-1){
detailButtonIsShowAddStatusArray.value = ['1','6']
}else{
detailButtonIsShowAddStatusArray.value = []
}
}
/** 初始化 **/

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

@ -161,7 +161,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
componentProps: {    
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -461,6 +462,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:5,
form: {
component: 'InputNumber',
componentProps: {
@ -477,6 +479,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:5,
form: {
component: 'InputNumber',
componentProps: {
@ -493,6 +496,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:5,
isTableForm:false,
form: {
component: 'InputNumber',
@ -1204,7 +1208,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
{
label: '差额',
label: '单价差额',
field: 'differencePrice',
formatter: singlePriceFormart,
table: {
@ -1370,44 +1374,44 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
{
label: '未税差额',//子表数据
field: 'untaxedDifference',
formatter: accountantFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 2,
}
},
{
label: '含税差额',
field: 'taxInclusiveDifference',
formatter: accountantFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 2,
}
},
// {
// label: '未税差额',//子表数据
// field: 'untaxedDifference',
// formatter: accountantFormart,
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// componentProps: {
// precision: 2,
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 0,
// precision: 2,
// }
// },
// {
// label: '含税差额',
// field: 'taxInclusiveDifference',
// formatter: accountantFormart,
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// componentProps: {
// precision: 2,
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 0,
// precision: 2,
// }
// },
//仅是主列表页面的筛选搜索条件
@ -1434,21 +1438,21 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
{
label: '货币',
field: 'currency',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
// {
// label: '货币',
// field: 'currency',
// table: {
// width: 150
// },
// form: {
// componentProps: {
// disabled: true
// }
// },
// tableForm:{
// disabled: true
// }
// },
{
label: '备注',
field: 'remark',

Loading…
Cancel
Save