Browse Source

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

master_hella_20240701
赵雪冰 8 months ago
parent
commit
183eb2672e
  1. 9
      README.md
  2. 5
      src/api/eam/equipmentAccounts/index.ts
  3. 1
      src/api/eam/itemAccounts/index.ts
  4. 4
      src/api/eam/sparePartsInLocationMain/index.ts
  5. 72
      src/api/eam/sparePartsOutLocationRecordDetail/index.ts
  6. 2
      src/api/eam/sparePartsOutLocationRecordDetail/sparePartsOutLocationDetailRecord.js
  7. 8
      src/api/wms/purchaseclaimRequestMain/index.ts
  8. 6
      src/locales/en-US.ts
  9. 6
      src/locales/zh-CN.ts
  10. 223
      src/views/eam/SparePartsOutLocationRecord/SparePartsOutLocationRecord.data.ts
  11. 6
      src/views/eam/SparePartsOutLocationRecord/index.vue
  12. 142
      src/views/eam/sparepartsinlocation/index.vue
  13. 45
      src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts
  14. 1
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  15. 24
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  16. 18
      src/views/wms/countManage/count/countJobMain/index.vue
  17. 34
      src/views/wms/countManage/count/countPlanMain/index.vue
  18. 11
      src/views/wms/countManage/count/countRecordMain/index.vue
  19. 34
      src/views/wms/countManage/count/countRequestMain/index.vue
  20. 12
      src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue
  21. 26
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue
  22. 148
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  23. 29
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

9
README.md

@ -110,7 +110,14 @@ const { tableObject, tableMethods } = useTable({
getListApi: “PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage”// 分页接口 getListApi: “PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage”// 分页接口
}) })
5、ts文件配置: 5、搜索工作栏
<Search
:schema="[...CountPlanMain.allSchemas.searchSchema,...CountPlanDetail.allSchemas.searchSchema]"
@search="setSearchParams"
@reset="setSearchParams"
/>
6、ts文件配置:
hiddenInMain:true, //子表中数据不展示在主表 hiddenInMain:true, //子表中数据不展示在主表
sortTableDefault:1000, // 主页面中Table表中展示的排序位置:默认值999 ,最小值1,值越大越靠后,值越小越靠前 sortTableDefault:1000, // 主页面中Table表中展示的排序位置:默认值999 ,最小值1,值越大越靠后,值越小越靠前
sortSearchDefault:1000,// 搜素框中展示的排序位置,用法同sortTableDefault sortSearchDefault:1000,// 搜素框中展示的排序位置,用法同sortTableDefault

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

@ -76,4 +76,9 @@ export const exportEquipmentAccounts = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/device/equipment-accounts/get-import-template' }) return request.download({ url: '/eam/device/equipment-accounts/get-import-template' })
}
// 查询设备台账列表
export const getEquipmentAccountsNoPage = async (params) => {
return await request.get({ url: `/eam/device/equipment-accounts/noPage`, params })
} }

1
src/api/eam/itemAccounts/index.ts

@ -61,3 +61,4 @@ export const replaceLocation = async (data: Array<ItemAccountsVO>) => {
export const getItemAccountsNoPage = async (params) => { export const getItemAccountsNoPage = async (params) => {
return await request.get({ url: `/eam/item-accounts/noPage`, params }) return await request.get({ url: `/eam/item-accounts/noPage`, params })
} }

4
src/api/eam/sparePartsInLocationMain/index.ts

@ -85,3 +85,7 @@ export const rejectSparePartsInLocation = async (id) => {
export const approveSparePartsInLocation = async (data) => { export const approveSparePartsInLocation = async (data) => {
return await request.post({ url: `/eam/spare-parts-in-location-main/approve`,data }) return await request.post({ url: `/eam/spare-parts-in-location-main/approve`,data })
} }
// 完成
export const finishSparePartsInLocation = async (id) => {
return await request.post({ url: `/eam/spare-parts-in-location-main/finish?id=` + id })
}

72
src/api/eam/sparePartsOutLocationRecordDetail/index.ts

@ -0,0 +1,72 @@
import request from '@/config/axios'
export interface SparePartsOutLocationRecordDetailVO {
id: number
number: string
theme: string
status: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
areaCode: string
locationCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录主列表
export const getSparePartsOutLocationDetailRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/eam/spare-parts-in-location-main-record/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/page`, params })
}
}
// 查询备件入库记录主详情
export const getSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/get?id=` + id })
}
// 新增备件入库记录主
export const createSparePartsOutLocationDetailRecord = async (
data: SparePartsInLocationMainRecordVO
) => {
return await request.post({ url: `/eam/spare-parts-in-location-main-record/create`, data })
}
// 修改备件入库记录主
export const updateSparePartsOutLocationDetailRecord = async (
data: SparePartsInLocationMainRecordVO
) => {
return await request.put({ url: `/eam/spare-parts-in-location-main-record/update`, data })
}
// 删除备件入库记录主
export const deleteSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-main-record/delete?id=` + id })
}
// 导出备件入库记录主 Excel
export const exportSparePartsOutLocationDetailRecord = async (params) => {
return await request.download({
url: `/eam/spare-parts-in-location-main-record/export-excel`,
params
})
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-in-location-main-record/get-import-template' })
}

2
src/api/eam/sparePartsOutLocationRecordDetail/sparePartsOutLocationDetailRecord.js

@ -1,4 +1,4 @@
import request from '@/utils/request' import request from '@/config/axios'
// 创建领用出库记录子 // 创建领用出库记录子
export function createSparePartsOutLocationRecordDetail(data) { export function createSparePartsOutLocationRecordDetail(data) {

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

@ -77,7 +77,13 @@ export const genRecordsPurchaseclaimRequestMain = async (id) => {
} }
// 导出采购索赔申请主 Excel // 导出采购索赔申请主 Excel
export const exportPurchaseclaimRequestMain = async (params) => { export const exportPurchaseclaimRequestMain = async (params) => {
return await request.download({ url: `/wms/purchaseclaim-request-main/export-excel`, params }) if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.downloadPost({ url: `/wms/purchaseclaim-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchaseclaim-request-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

6
src/locales/en-US.ts

@ -947,6 +947,7 @@ export default {
'是否发布所选中数据?':'Do you publish the selected data?', '是否发布所选中数据?':'Do you publish the selected data?',
'是否关闭所选中数据?':'Do you want to close the selected data?', '是否关闭所选中数据?':'Do you want to close the selected data?',
'是否作废所选中数据?':'Do you want to void the selected data?', '是否作废所选中数据?':'Do you want to void the selected data?',
'是否完成所选中数据?':'Do you want to finish the selected data?',
'发布成功!':'Release Successfully!', '发布成功!':'Release Successfully!',
'是否下架所选中数据?':'Do you want to remove selected data?', '是否下架所选中数据?':'Do you want to remove selected data?',
'下架成功!':'Removed Successfully!', '下架成功!':'Removed Successfully!',
@ -956,6 +957,7 @@ export default {
'打开成功!':'Open Successfully!', '打开成功!':'Open Successfully!',
'关闭成功!':'Closed Successfully', '关闭成功!':'Closed Successfully',
'作废成功!':'Invalid successfully', '作废成功!':'Invalid successfully',
'完成成功!':'Finish successfully',
'失效时间要大于生效时间':'The expiration time must be longer than the effective time', '失效时间要大于生效时间':'The expiration time must be longer than the effective time',
'供应商导入模版':'Supplier import template', '供应商导入模版':'Supplier import template',
'供应商物料':'Supplier Material', '供应商物料':'Supplier Material',
@ -1056,8 +1058,8 @@ export default {
:'Supplier delivery request is led into the template', :'Supplier delivery request is led into the template',
:'Supplier invoice request details', :'Supplier invoice request details',
:'Supplier invoice record master data', :'Supplier invoice record master data',
:'Pass the audit', '审核通过!':'Pass the audit',
:'Recall successful', '撤回成功!':'Recall successful',
:'Cancellation', :'Cancellation',
'是否审批拒绝所选中数据?':'Do you want to approve and reject selected data?', '是否审批拒绝所选中数据?':'Do you want to approve and reject selected data?',
'审批成功!':'Approval is successful!', '审批成功!':'Approval is successful!',

6
src/locales/zh-CN.ts

@ -947,6 +947,7 @@ export default {
'是否发布所选中数据?':'是否发布所选中数据?', '是否发布所选中数据?':'是否发布所选中数据?',
'是否关闭所选中数据?':'是否关闭所选中数据?', '是否关闭所选中数据?':'是否关闭所选中数据?',
'是否作废所选中数据?':'是否作废所选中数据?', '是否作废所选中数据?':'是否作废所选中数据?',
'是否完成所选中数据?':'是否完成所选中数据?',
'发布成功!':'发布成功!', '发布成功!':'发布成功!',
'是否下架所选中数据?':'是否下架所选中数据?', '是否下架所选中数据?':'是否下架所选中数据?',
'下架成功!':'下架成功!', '下架成功!':'下架成功!',
@ -956,6 +957,7 @@ export default {
'打开成功!':'打开成功!', '打开成功!':'打开成功!',
'关闭成功!':'关闭成功!', '关闭成功!':'关闭成功!',
'作废成功!':'作废成功!', '作废成功!':'作废成功!',
'完成成功!':'完成成功!',
'失效时间要大于生效时间':'失效时间要大于生效时间', '失效时间要大于生效时间':'失效时间要大于生效时间',
'供应商导入模版':'供应商导入模版', '供应商导入模版':'供应商导入模版',
'供应商物料':'供应商物料', '供应商物料':'供应商物料',
@ -1056,8 +1058,8 @@ export default {
:'供应商发货申请主导入模版', :'供应商发货申请主导入模版',
:'供应商发票申请明细', :'供应商发票申请明细',
:'供应商发票记录主', :'供应商发票记录主',
:'审核通过', '审核通过!':'审核通过!',
:'撤回成功', '撤回成功!':'撤回成功!',
:'作废', :'作废',
'是否审批拒绝所选中数据?':'是否审批拒绝所选中数据?', '是否审批拒绝所选中数据?':'是否审批拒绝所选中数据?',
'审批成功!':'审批成功!', '审批成功!':'审批成功!',

223
src/views/eam/SparePartsOutLocationRecord/SparePartsOutLocationRecord.data.ts

@ -11,64 +11,55 @@ import { dateFormatter } from '@/utils/formatTime'
export const SparePartsOutLocationRecordMain = useCrudSchemas( export const SparePartsOutLocationRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '申请编号', label: '编号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
}, },
{ {
label: '描述', label: '入库主题',
field: 'description', field: 'theme',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
}, },{
{ label: '入库类型',
label: '申领备件总价', field: 'type',
field: 'sumVal',
sort: 'custom', sort: 'custom',
isSearch: false, dictType: DICT_TYPE.PUT_IN_TYPE,
isTable: false, dictClass: 'string',
isForm: false
}, },
{ {
label: '流程状态', label: '流程状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: false,
isForm:false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM, dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string',
isSearch: true,
form: {
component: 'Select'
}
}, },
{ {
label: '申请人', label: '入库申请人',
field: 'applyer', field: 'applyer',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false,
isForm: false
}, },
{ {
label: '审核人', label: '审核人',
field: 'approver', field: 'approver',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isForm:false
isForm: false,
form: {
component: 'InputNumber',
value: 0
}
}, },
{ {
label: '审核内容', label: '审核内容',
field: 'approveContent', field: 'approveContent',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false, isForm:false
isForm: false
}, },
{ {
label: '审核时间', label: '审核时间',
@ -76,8 +67,7 @@ export const SparePartsOutLocationRecordMain = useCrudSchemas(
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isTable: false, isForm:false,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -92,39 +82,17 @@ export const SparePartsOutLocationRecordMain = useCrudSchemas(
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x'
} }
} },
}, detail: {
{ dateFormat: 'YYYY-MM-DD HH:mm:ss'
label: '自动审核', },
field: 'autoExamine',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false
},
{
label: '自动通过',
field: 'autoAgree',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false
}, },
{ {
label: '创建时间', label: '入库时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isTable: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -133,17 +101,20 @@ export const SparePartsOutLocationRecordMain = useCrudSchemas(
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm: false isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
}, },
{ {
label: '操作', label: '备注',
field: 'action', field: 'remark',
isForm: false, sort: 'custom',
table: { isSearch: false,
width: 150, },
fixed: 'right'
}
}
]) ])
) )
@ -157,21 +128,19 @@ export const SparePartsOutLocationRecordMainRules = reactive({
export const SparePartsOutLocationRecordDetail = useCrudSchemas( export const SparePartsOutLocationRecordDetail = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '备件编号', label: '库位编号',
field: 'sparePartsCode', field: 'locationCode',
sort: 'custom', sort: 'custom',
table: { isSearch: false,
width: 150
},
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题 searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'available',
@ -186,6 +155,7 @@ export const SparePartsOutLocationRecordDetail = useCrudSchemas(
searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段 searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题 searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
@ -198,67 +168,35 @@ export const SparePartsOutLocationRecordDetail = useCrudSchemas(
} }
}, },
{ {
label: '设备类别', label: '库区编号',
field: 'type', field: 'areaCode',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { form: {
width: 150 componentProps: {
disabled: true
}
}, },
tableForm: { tableForm:{
type: 'Select' disabled: true
} }
}, },
{ {
label: '设备工装编号', label: '备件编号',
field: 'equipmentCode', field: 'sparePartsCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 disabled: true
searchTitle: '设备信息', // 查询弹窗标题
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
multiple: true,
searchCondition: [
{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}
]
} }
}, },
tableForm: { tableForm:{
isInpuFocusShow: true, disabled: true
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}
]
} }
}, },
{ {
label: '库存数量', label: '库存数量',
field: 'currentQty', field: 'currentQty',
@ -266,7 +204,14 @@ export const SparePartsOutLocationRecordDetail = useCrudSchemas(
isSearch: false, isSearch: false,
tableForm: { tableForm: {
disabled: true disabled: true
} },
form:{
componentProps:{
disabled: true
}
},
isDetail:false,
isTable:false
}, },
{ {
label: '申领数量', label: '申领数量',
@ -274,23 +219,29 @@ export const SparePartsOutLocationRecordDetail = useCrudSchemas(
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false
}, },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
isTableForm:false
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false isSearch: true,
}, },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false
}
]) ])
) )

6
src/views/eam/SparePartsOutLocationRecord/index.vue

@ -95,9 +95,9 @@ import {
SparePartsOutLocationRecordMainRules, SparePartsOutLocationRecordMainRules,
SparePartsOutLocationRecordDetail, SparePartsOutLocationRecordDetail,
SparePartsOutLocationRecordDetailRules SparePartsOutLocationRecordDetailRules
} from '.SparePartsOutLocationRecord.data' } from './sparePartsOutLocationRecord.data'
import * as SparePartsOutLocationRecordMainApi from '@/api/eam/sparePartsOutLocationRecordMain/index' import * as SparePartsOutLocationRecordMainApi from '@/api/eam/sparePartsOutLocationRecordMain/index'
import * as SparePartsOutLocationRecordDetailApi from '@/api/eam/sparePartsOutLocationRecordDetail/sparePartsOutLocationDetailRecord.js' import * as SparePartsOutLocationRecordDetailApi from '@/api/eam/sparePartsOutLocationRecordDetail/index'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -161,7 +161,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // // defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), // // defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), // // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //

142
src/views/eam/sparepartsinlocation/index.vue

@ -76,7 +76,8 @@
:apiDelete="SparePartsInLocationDetailApi.deleteSparePartsInLocationDetail" :apiDelete="SparePartsInLocationDetailApi.deleteSparePartsInLocationDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="true" :isShowAddBtn="true"
:detailButtonIsShowAdd="false" :detailButtonIsShowAdd="true"
:detailButtonIsShowAddStatusArray="['0']"
/> />
<!-- 审核页面 --> <!-- 审核页面 -->
<!-- <AudiForm ref="audiFormRef" @success="handleApprove"/> --> <!-- <AudiForm ref="audiFormRef" @success="handleApprove"/> -->
@ -85,6 +86,7 @@
:rules="SparePartsInLocationMainRules" :rules="SparePartsInLocationMainRules"
:formAllSchemas="SparePartsInLocationExamine.allSchemas" :formAllSchemas="SparePartsInLocationExamine.allSchemas"
@submitForm="approveSparePartsInLocation" @submitForm="approveSparePartsInLocation"
:isCol="false"
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
@ -134,23 +136,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
console.log(11, val[0])
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'locationCode') { if (formField == 'locationCode') {
// row['sparePartsCode'] = val[0].itemNumber row['locationCode'] = val[0].locationNumber
row['locationCode'] = val[0].code row['areaCode'] = val[0].areaNumber
row['areaCode'] = val[0].areaCode row['sparePartsCode'] = val[0].itemNumber
row['sparePartsCode'] = val[0].sparePartsCode
row['currentQty'] = val[0].qty row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn row['isRadeIn'] = val[0].isRadeIn
} }
} else { } else {
if (formField == 'locationCode') { if (formField == 'locationCode') {
setV['locationCode'] = val[0].code setV['locationCode'] = val[0].locationNumber
setV['areaCode'] = val[0].areaCode setV['areaCode'] = val[0].areaNumber
setV['sparePartsCode'] = val[0].sparePartsCode setV['sparePartsCode'] = val[0].itemNumber
setV['currentQty'] = val[0].qty setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn setV['isRadeIn'] = val[0].isRadeIn
} }
} }
formRef.setValues(setV) formRef.setValues(setV)
@ -162,11 +163,11 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'locationCode') { if (formField == 'locationCode') {
setV['locationCode'] = val[0].code setV['locationCode'] = val[0].locationNumber
setV['areaCode'] = val[0].areaCode setV['areaCode'] = val[0].areaNumber
setV['sparePartsCode'] = val[0].sparePartsCode setV['sparePartsCode'] = val[0].itemNumber
setV['currentQty'] = val[0].qty setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn setV['isRadeIn'] = val[0].isRadeIn
} }
formRef.setValues(setV) formRef.setValues(setV)
}) })
@ -183,9 +184,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:spare-parts-in-location-main:create'}), // defaultButtons.defaultAddBtn({ hasPermi: 'eam:spare-parts-in-location-main:create' }), //
defaultButtons.defaultImportBtn({hasPermi:'eam:spare-parts-in-location-main:import'}), // defaultButtons.defaultImportBtn({ hasPermi: 'eam:spare-parts-in-location-main:import' }), //
defaultButtons.defaultExportBtn({hasPermi:'eam:spare-parts-in-location-main:export'}), // defaultButtons.defaultExportBtn({ hasPermi: 'eam:spare-parts-in-location-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
@ -233,12 +234,34 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row, ['0']), hasPermi: 'eam:spare-parts-in-location-main:update' }), // defaultButtons.mainListEditBtn({
defaultButtons.mainListDeleteBtn({hide: isShowStatusButton(row, ['0']), hasPermi: 'eam:spare-parts-in-location-main:delete' }), // hide: isShowStatusButton(row, ['0']),
defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row, ['0']), hasPermi: 'eam:spare-parts-in-location-main:examine' }), // hasPermi: 'eam:spare-parts-in-location-main:update'
defaultButtons.mainListRevokeBtn({hide: isShowStatusButton(row, ['3']), hasPermi: 'eam:spare-parts-in-location-main:cancel'}), // }), //
defaultButtons.mainListTurnDownBtn({hide: isShowStatusButton(row, ['3']), hasPermi: 'eam:spare-parts-in-location-main:rejecte' }), // defaultButtons.mainListDeleteBtn({
defaultButtons.mainListApproveBtn({hide: isShowStatusButton(row, ['3']), hasPermi: 'eam:spare-parts-in-location-main:approve' }), // hide: isShowStatusButton(row, ['0']),
hasPermi: 'eam:spare-parts-in-location-main:delete'
}), //
defaultButtons.mainListAuditingBtn({
hide: isShowStatusButton(row, ['0']),
hasPermi: 'eam:spare-parts-in-location-main:examine'
}), //
defaultButtons.mainListRevokeBtn({
hide: isShowStatusButton(row, ['3']),
hasPermi: 'eam:spare-parts-in-location-main:cancel'
}), //
defaultButtons.mainListTurnDownBtn({
hide: isShowStatusButton(row, ['3']),
hasPermi: 'eam:spare-parts-in-location-main:rejecte'
}), //
defaultButtons.mainListApproveBtn({
hide: isShowStatusButton(row, ['3']),
hasPermi: 'eam:spare-parts-in-location-main:approve'
}), //
defaultButtons.mainListFinishBtn({
hide: isShowStatusButton(row, ['4']),
hasPermi: 'eam:spare-parts-in-location-main:finish'
}) //
] ]
} }
@ -247,29 +270,28 @@ const buttonTableClick = async (val, row) => {
if (val == 'edit') { if (val == 'edit') {
// //
openForm('update', row) openForm('update', row)
} } else if (val == 'auditing') {
else if (val == 'auditing') {
// //
handleSubmitExamine(row.id) handleSubmitExamine(row.id)
} } else if (val == 'mainTurnDown') {
else if (val == 'mainTurnDown') {
// //
handleRejecte(row.id) handleRejecte(row.id)
} } else if (val == 'mainApprove') {
else if (val == 'mainApprove') {
// //
formRefApproved.value.open('update',row,{masterId:row.id},'auditing') formRefApproved.value.open('update', row, { masterId: row.id }, 'auditing')
} } else if (val == 'revoke') {
else if (val == 'revoke') { // //
handleCancel(row.id) handleCancel(row.id)
} } else if (val == 'finish') {
else if (val == 'delete') { //
handleFinish(row.id)
} else if (val == 'delete') {
// //
handleDelete(row.id) handleDelete(row.id)
} }
} }
const isShowStatusButton = (row,val) => { const isShowStatusButton = (row, val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
return false return false
} else { } else {
@ -343,6 +365,11 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
console.log(formRef.value) console.log(formRef.value)
formRef.value.formLoading = true formRef.value.formLoading = true
let isHave = data.subList.some(item=>item.applyQty>item.currentQty)
if(isHave){
message.warning('申领数量不能大于库存数量')
return
}
try { try {
if (formType === 'create') { if (formType === 'create') {
await SparePartsInLocationMainApi.createSparePartsInLocationMain(data) await SparePartsInLocationMainApi.createSparePartsInLocationMain(data)
@ -386,7 +413,7 @@ const searchFormClick = (searchData) => {
} }
// //
const handleSubmitExamine = async (id: number) => { const handleSubmitExamine = async (id: number) => {
await message.delConfirm(t('ts.是否提交审核?')); await message.delConfirm(t('ts.是否提交审核?'))
try { try {
await SparePartsInLocationMainApi.submitExamineSparePartsInLocation(id) await SparePartsInLocationMainApi.submitExamineSparePartsInLocation(id)
message.success(t('ts.提交审批成功!')) message.success(t('ts.提交审批成功!'))
@ -396,40 +423,49 @@ const handleSubmitExamine = async (id: number) => {
} }
/** 撤回按钮操作 */ /** 撤回按钮操作 */
const handleCancel = async (id: number) => { const handleCancel = async (id: number) => {
await message.delConfirm(t('ts.是否撤回所选中数据?')); await message.delConfirm(t('ts.是否撤回所选中数据?'))
try { try {
await SparePartsInLocationMainApi.cancelSparePartsInLocation(id) await SparePartsInLocationMainApi.cancelSparePartsInLocation(id)
message.success(t('ts.撤回成功')) message.success(t('ts.撤回成功!'))
// //
await getList() await getList()
} catch {} } catch {}
} }
// //
const handleRejecte=async(id: number)=> { const handleRejecte = async (id: number) => {
await message.delConfirm(t('ts.是否驳回所选中数据?')); await message.delConfirm(t('ts.是否驳回所选中数据?'))
try { try {
await SparePartsInLocationMainApi.rejectSparePartsInLocation(id) await SparePartsInLocationMainApi.rejectSparePartsInLocation(id)
message.success(t('ts.驳回成功!')) message.success(t('ts.驳回成功!'))
// //
await getList() await getList()
} catch {} } catch {}
} }
// //
const approveSparePartsInLocation =async(formType,data)=> { const approveSparePartsInLocation = async (formType, data) => {
console.log(data)
try { try {
// const params = {
// id:
// }
await SparePartsInLocationMainApi.approveSparePartsInLocation(data) await SparePartsInLocationMainApi.approveSparePartsInLocation(data)
message.success(t('ts.审核通过!')) message.success(t('ts.审核通过!'))
// //
await getList() formRefApproved.value.dialogVisible = false
await getList()
} finally {
formRefApproved.value.formLoading = false
}
}
//
const handleFinish = async (id: number) => {
await message.delConfirm(t('ts.是否完成所选中数据?'))
try {
await SparePartsInLocationMainApi.finishSparePartsInLocation(id)
message.success(t('ts.完成成功!'))
//
await getList()
} catch {} } catch {}
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

45
src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

@ -1,7 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as ItemAccountsApi from '@/api/eam/itemAccounts' import * as ItemAccountsApi from '@/api/eam/itemAccounts'
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data' import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
@ -161,8 +159,9 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchListPlaceholder: '请选择库位编号', // 输入框占位文本 searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题 searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'available',
@ -173,19 +172,20 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
// isInpuFocusShow: true, isInpuFocusShow: true,
// searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchListPlaceholder: '请选择备件编号', // 输入框占位文本
// searchField: 'itemNumber', // 查询弹窗赋值字段 searchField: 'itemNumber', // 查询弹窗赋值字段
// searchTitle: '备件信息', // 查询弹窗标题 searchTitle: '备件信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
// searchCondition: [ searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
// { searchCondition: [
// key: 'available', {
// value: 'TRUE', key: 'available',
// isMainValue: false value: 'TRUE',
// } isMainValue: false
// ] }
]
} }
}, },
{ {
@ -199,7 +199,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm:{ tableForm:{
// disabled: true disabled: true
} }
}, },
{ {
@ -215,7 +215,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm:{ tableForm:{
// disabled: true disabled: true
} }
}, },
{ {
@ -272,7 +272,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, isTableForm:false,
isTable:false
} }
])) ]))
export const SparePartsInLocationExamineRules = reactive({ export const SparePartsInLocationExamineRules = reactive({
@ -288,8 +288,9 @@ export const SparePartsInLocationExamine = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form:{ form:{
componentProps:{ component: 'Input',
componentProps: {
type: 'textarea'
} }
} }
}, },

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

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

24
src/views/wms/basicDataManage/labelManage/callmaterials/index.vue

@ -55,6 +55,7 @@
callmaterialQtySum:qty*callmaterialQty, callmaterialQtySum:qty*callmaterialQty,
}) })
}" }"
@onEnter="onEnter"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -75,7 +76,9 @@ import Detail from '@/components/Detail/src/Detail.vue'
import { formatTime } from '@/utils/index' import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import * as PackageApi from '@/api/wms/package' import * as PackageApi from '@/api/wms/package'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
//
defineOptions({ name: 'Callmaterials' }) defineOptions({ name: 'Callmaterials' })
const message = useMessage() // const message = useMessage() //
@ -86,6 +89,25 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(Callmaterials.allSchemas.tableColumns) const tableColumns = ref(Callmaterials.allSchemas.tableColumns)
const onEnter = async (field,value)=>{
console.log(field,value)
if(field=='itemCode'){
basicFormRef.value.opensearchTable('itemCode', 'code', '物料信息', Itembasic.allSchemas, ItembasicApi.getItembasicPage,[{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'code',
value: value,
action: '==',
isSearch: true,
isMainValue: false
}])
}
}
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {

18
src/views/wms/countManage/count/countJobMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountJobMain.allSchemas.searchSchema,...CountJobDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountJobMain.allSchemas" :allSchemas="CountJobMain.allSchemas"
:detailAllSchemas="CountJobDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -95,7 +94,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CountJobMain.allSchemas.tableColumns,...CountJobDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountJobMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -142,7 +141,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountJobDetailApi.getCountJobDetailPage // getListApi: CountJobMainApi.getCountJobMainPage //
}) })
// //
@ -193,10 +192,7 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), //
@ -230,13 +226,13 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainJobAba') { // } else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃') console.log('列表-操作按钮事件-放弃')
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') { //
handleClose(row.masterId) handleClose(row.id)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接') console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){// } else if (val == 'exportCountJob'){//
handleExportCountJob(row.masterId,row.number) handleExportCountJob(row.id,row.number)
} else if( val == 'importCountJob'){ // } else if( val == 'importCountJob'){ //
handleImport(row.masterId) handleImport(row.id)
} }
} }

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

@ -2,7 +2,7 @@
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="[...CountPlanMain.allSchemas.searchSchema,...CountPlanDetail.allSchemas.searchSchema]" :schema="CountPlanMain.allSchemas.searchSchema"
@search="setSearchParams" @search="setSearchParams"
@reset="setSearchParams" @reset="setSearchParams"
/> />
@ -16,7 +16,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountPlanMain.allSchemas" :allSchemas="CountPlanMain.allSchemas"
:detailAllSchemas="CountPlanDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -134,7 +133,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CountPlanMain.allSchemas.tableColumns,...CountPlanDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountPlanMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -180,7 +179,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountPlanDetailApi.getCountPlanDetailPage // getListApi: CountPlanMainApi.getCountPlanMainPage //
}) })
// //
@ -243,10 +242,7 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainListPlanOpeBtn({ defaultButtons.mainListPlanOpeBtn({
hide: isShowMainButton(row, ['5']), hide: isShowMainButton(row, ['5']),
@ -287,7 +283,7 @@ const butttondata = (row,$index) => {
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainPlanOpe') { // if (val == 'mainPlanOpe') { //
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.open(row.masterId).then(() => { CountPlanMainApi.open(row.id).then(() => {
message.success(t('打开成功')) message.success(t('打开成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -298,7 +294,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanClo') { // } else if (val == 'mainPlanClo') { //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.close(row.masterId).then(() => { CountPlanMainApi.close(row.id).then(() => {
message.success(t('关闭成功')) message.success(t('关闭成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -309,14 +305,14 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanSub') { // } else if (val == 'mainPlanSub') { //
await message.confirm(t('common.confirmSubmit')) await message.confirm(t('common.confirmSubmit'))
tableObject.loading = true tableObject.loading = true
await CountPlanMainApi.submit(row.masterId) await CountPlanMainApi.submit(row.id)
message.success(t('提交审批成功')) message.success(t('提交审批成功'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} else if (val == 'mainPlanTur') { // } else if (val == 'mainPlanTur') { //
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.reject(row.masterId).then(() => { CountPlanMainApi.reject(row.id).then(() => {
message.success(t('驳回成功')) message.success(t('驳回成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -327,7 +323,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanApp') { // } else if (val == 'mainPlanApp') { //
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.agree(row.masterId).then(() => { CountPlanMainApi.agree(row.id).then(() => {
message.success(t('审批已通过')) message.success(t('审批已通过'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -338,7 +334,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanPub') { // } else if (val == 'mainPlanPub') { //
await message.confirm('确认要发布吗?') await message.confirm('确认要发布吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.publish(row.masterId).then(() => { CountPlanMainApi.publish(row.id).then(() => {
message.success(t('发布成功')) message.success(t('发布成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -349,7 +345,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanRes') { // } else if (val == 'mainPlanRes') { //
await message.confirm('确认要重置吗?') await message.confirm('确认要重置吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.resetting(row.masterId).then(() => { CountPlanMainApi.resetting(row.id).then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -360,7 +356,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.masterId) handleDelete(row.id)
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
@ -369,7 +365,7 @@ const openForm = async (type: string, row?: number) => {
tableData.value = [ tableData.value = [
{ {
type: '', type: '',
value: '' value: []
} }
] // ] //
formRef.value.open(type, row) formRef.value.open(type, row)
@ -497,7 +493,7 @@ CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => {
const tableData = ref([ const tableData = ref([
{ {
type: '', type: '',
value: '' value: []
} }
]) ])
@ -506,7 +502,7 @@ const handleAddTable = () => {
// tableFormKeys.formType='' // tableFormKeys.formType=''
tableFormKeys = { tableFormKeys = {
type: '', type: '',
value: '' value: []
} }
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
} }

11
src/views/wms/countManage/count/countRecordMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountRecordMain.allSchemas.searchSchema,...CountRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountRecordMain.allSchemas" :allSchemas="CountRecordMain.allSchemas"
:detailAllSchemas="CountRecordDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -77,7 +76,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CountRecordMain.allSchemas.tableColumns,...CountRecordDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountRecordMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -85,7 +84,7 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountRecordDetailApi.getCountRecordDetailPage // getListApi: CountRecordMainApi.getCountRecordMainPage //
}) })
// //
@ -127,10 +126,6 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainCountAdjustRequesttBtn({ defaultButtons.mainCountAdjustRequesttBtn({
hasPermi: 'wms:count-record-main:generate' hasPermi: 'wms:count-record-main:generate'

34
src/views/wms/countManage/count/countRequestMain/index.vue

@ -2,7 +2,7 @@
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="[...CountRequestMain.allSchemas.searchSchema,...CountRequestDetail.allSchemas.searchSchema]" :schema="CountRequestMain.allSchemas.searchSchema"
@search="setSearchParams" @search="setSearchParams"
@reset="setSearchParams" @reset="setSearchParams"
/> />
@ -16,7 +16,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountRequestMain.allSchemas" :allSchemas="CountRequestMain.allSchemas"
:detailAllSchemas="CountRequestDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -125,7 +124,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CountRequestMain.allSchemas.tableColumns,...CountRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -200,7 +199,7 @@ const searchTableSuccessCount = (formField, searchField, val, type,row,count) =>
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountRequestDetailApi.getCountRequestDetailPage // getListApi: CountRequestMainApi.getCountRequestMainPage //
}) })
// //
@ -285,10 +284,7 @@ const isShowGenerateMainButton = (row, val) => {
const searchTableRef = ref() const searchTableRef = ref()
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainListCloseBtn({hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),hasPermi: 'wms:count-request-main:close'}), // defaultButtons.mainListCloseBtn({hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),hasPermi: 'wms:count-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide: isShowMainButton(row, ['5']),hasPermi: 'wms:count-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide: isShowMainButton(row, ['5']),hasPermi: 'wms:count-request-main:reAdd'}), //
@ -311,7 +307,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.close(row.masterId) CountRequestMainApi.close(row.id)
.then(() => { .then(() => {
message.success(t('关闭成功')) message.success(t('关闭成功'))
tableObject.loading = false tableObject.loading = false
@ -325,7 +321,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.reAdd(row.masterId) CountRequestMainApi.reAdd(row.id)
.then(() => { .then(() => {
message.success(t('添加成功')) message.success(t('添加成功'))
tableObject.loading = false tableObject.loading = false
@ -339,7 +335,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.submit(row.masterId) CountRequestMainApi.submit(row.id)
.then(() => { .then(() => {
message.success(t('提交审批成功')) message.success(t('提交审批成功'))
tableObject.loading = false tableObject.loading = false
@ -353,7 +349,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.refused(row.masterId) CountRequestMainApi.refused(row.id)
.then(() => { .then(() => {
message.success(t('驳回成功')) message.success(t('驳回成功'))
tableObject.loading = false tableObject.loading = false
@ -367,7 +363,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.agree(row.masterId) CountRequestMainApi.agree(row.id)
.then(() => { .then(() => {
message.success(t('审批已通过')) message.success(t('审批已通过'))
tableObject.loading = false tableObject.loading = false
@ -381,7 +377,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要处理吗?') await message.confirm('确认要处理吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.handle(row.masterId) CountRequestMainApi.handle(row.id)
.then(() => { .then(() => {
message.success(t('处理成功')) message.success(t('处理成功'))
tableObject.loading = false tableObject.loading = false
@ -403,7 +399,7 @@ const buttonTableClick = async (val, row) => {
label:3, label:3,
title:'选择' title:'选择'
}]) }])
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'reCount','',true,'',row,{masterId:row.masterId},'',radioList.value) searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'reCount','',true,'',row,{masterId:row.id},'',radioList.value)
} else if (val == 'mainSuperviseCount') { } else if (val == 'mainSuperviseCount') {
// //
const radioList = ref([{ const radioList = ref([{
@ -413,11 +409,11 @@ const buttonTableClick = async (val, row) => {
label:2, label:2,
title:'选择' title:'选择'
}]) }])
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'superviseCount','',true,'',row,{masterId:row.masterId},'',radioList.value) searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'superviseCount','',true,'',row,{masterId:row.id},'',radioList.value)
} else if (val == 'countAdjustRequest') { } else if (val == 'countAdjustRequest') {
// //
await message.confirm('确认要生成盘点调整申请吗?') await message.confirm('确认要生成盘点调整申请吗?')
CountRequestMainApi.generateCountadjustRequest(row.masterId) CountRequestMainApi.generateCountadjustRequest(row.id)
.then(() => { .then(() => {
message.success(t('已生成盘点调整申请')) message.success(t('已生成盘点调整申请'))
getList() getList()
@ -429,7 +425,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要解冻吗?') await message.confirm('确认要解冻吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.thaw(row.masterId) CountRequestMainApi.thaw(row.id)
.then(() => { .then(() => {
message.success(t('解冻成功')) message.success(t('解冻成功'))
tableObject.loading = false tableObject.loading = false
@ -444,7 +440,7 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { } else if (val == 'delete') {
// //
handleDelete(row.masterId) handleDelete(row.id)
} }
} }

12
src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountadjustRecordMain.allSchemas.searchSchema,...CountadjustRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountadjustRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountadjustRecordMain.allSchemas" :allSchemas="CountadjustRecordMain.allSchemas"
:detailAllSchemas="CountadjustRecordDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -77,7 +76,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CountadjustRecordMain.allSchemas.tableColumns,...CountadjustRecordDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountadjustRecordMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -85,7 +84,7 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountadjustRecordDetailApi.getCountadjustRecordDetailPage // getListApi: CountadjustRecordMainApi.getCountadjustRecordMainPage //
}) })
// //
@ -127,10 +126,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [] return []
} }

26
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountadjustRequestMain.allSchemas.searchSchema,...CountadjustRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountadjustRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountadjustRequestMain.allSchemas" :allSchemas="CountadjustRequestMain.allSchemas"
:detailAllSchemas="CountadjustRequestDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -97,7 +96,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CountadjustRequestMain.allSchemas.tableColumns,...CountadjustRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountadjustRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -131,7 +130,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountadjustRequestDetailApi.getCountadjustRequestDetailPage // getListApi: CountadjustRequestMainApi.getCountadjustRequestMainPage //
}) })
// //
@ -188,10 +187,7 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //
@ -206,7 +202,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.close(row.masterId).then(() => { CountadjustRequestMainApi.close(row.id).then(() => {
message.success(t('关闭成功')) message.success(t('关闭成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -217,7 +213,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.reAdd(row.masterId).then(() => { CountadjustRequestMainApi.reAdd(row.id).then(() => {
message.success(t('添加成功')) message.success(t('添加成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -228,7 +224,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.submit(row.masterId).then(() => { CountadjustRequestMainApi.submit(row.id).then(() => {
message.success(t('提交审批成功')) message.success(t('提交审批成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -239,7 +235,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.refused(row.masterId).then(() => { CountadjustRequestMainApi.refused(row.id).then(() => {
message.success(t('驳回成功')) message.success(t('驳回成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -250,7 +246,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.agree(row.masterId).then(() => { CountadjustRequestMainApi.agree(row.id).then(() => {
message.success(t('审批已通过')) message.success(t('审批已通过'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -261,7 +257,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?') await message.confirm('确认要处理吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.handle(row.masterId).then(() => { CountadjustRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功')) message.success(t('处理成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -272,7 +268,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.masterId) handleDelete(row.id)
} }
} }

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

@ -15,6 +15,7 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l
import * as WorkstationApi from '@/api/wms/workstation' import * as WorkstationApi from '@/api/wms/workstation'
import * as getPlansettingApi from '@/api/wms/plansetting/index' import * as getPlansettingApi from '@/api/wms/plansetting/index'
import * as getBusinessTypeApi from '@/api/wms/businesstype/index' import * as getBusinessTypeApi from '@/api/wms/businesstype/index'
@ -135,6 +136,38 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '到仓库',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isForm: true,
isTableForm:false,
isDetail:false,
form: {
componentProps: {
disabled:true
}
}
},
{
label: '到库位',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
isForm: true,
isTableForm:false,
isDetail:false,
form: {
componentProps: {
disabled:true
}
}
},
{ {
label: '发货类型', label: '发货类型',
field: 'deliverType', field: 'deliverType',
@ -144,6 +177,11 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
disabled:true
}
}
}, },
{ {
label: '计划日期', label: '计划日期',
@ -608,61 +646,61 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '到仓库代码', // label: '到仓库代码',
field: 'toWarehouseCode', // field: 'toWarehouseCode',
sort: 'custom', // sort: 'custom',
isForm: false, // isForm: false,
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '到库位代码', // label: '到库位代码',
field: 'toLocationCode', // field: 'toLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm:{ // tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // searchListPlaceholder: '请选择到库位代码',
searchField: 'code', // searchField: 'code',
searchTitle: '库位基础信息', // searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: WorkstationApi.selectAreaTypeToLocation, // searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'areaType', // key: 'areaType',
value: "deliverType", // value: "deliverType",
message:"请选择发货类型", // message:"请选择发货类型",
isMainValue: true // isMainValue: true
}] // }]
}, // },
form: { // form: {
componentProps: { // componentProps: {
isSearchList: true, // isSearchList: true,
searchListPlaceholder: '请选择到库位代码', // searchListPlaceholder: '请选择到库位代码',
searchField: 'code', // searchField: 'code',
searchTitle: '库位基础信息', // searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas, // searchAllSchemas: Location.allSchemas,
searchPage: WorkstationApi.selectAreaTypeToLocation, // searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'areaType', // key: 'areaType',
value: "deliverType", // value: "deliverType",
message:"请选择发货类型", // message:"请选择发货类型",
isMainValue: false // isMainValue: false
}] // }]
} // }
}, // },
}, // },
{ {
label: '项目', label: '项目',
field: 'project', field: 'project',

29
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -86,6 +86,7 @@ import { DeliverPlanMain,DeliverPlanMainRules,DeliverPlanDetail,DeliverPlanDetai
import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain' import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as AreabasicApi from '@/api/wms/areabasic'
// //
defineOptions({ name: 'DeliverPlanMain' }) defineOptions({ name: 'DeliverPlanMain' })
@ -132,11 +133,13 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { alert(11)
nextTick(async () => {
// tableform // tableform
if(formField == 'customerCode'){ if(formField == 'customerCode'){
customerCode.value = val[0]['code'] customerCode.value = val[0]['code']
} }
DeliverPlanDetail.allSchemas.tableFormColumns.map(item => { DeliverPlanDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'customerDockCode') { if(item.field == 'customerDockCode') {
item.tableForm.searchCondition = [ item.tableForm.searchCondition = [
@ -146,12 +149,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
isMainValue: false isMainValue: false
}] }]
item.form.componentProps.searchCondition = [ item.form.componentProps.searchCondition = [
{ {
key: 'customerCode', key: 'customerCode',
value: customerCode.value , value: customerCode.value ,
isMainValue: false isMainValue: false
}]} }]
}) }
})
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'itemCode') { if(formField == 'itemCode') {
val.forEach(item=>{ val.forEach(item=>{
@ -168,6 +172,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} else { } else {
const setV = {} const setV = {}
if(formField == 'customerDockCode') {
//
setV['toWarehouseCode'] = val[0]['warehouseCode']//
setV['toLocationCode'] = val[0]['defaultLocationCode']//
let res = await AreabasicApi.selectAreabasicDOByCode(val[0]['defaultLocationCode'])
if(res){
setV['deliverType'] = res['type']
}
}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }

Loading…
Cancel
Save