Browse Source

器具管理开发代码

hella_chenfang
chenfang 4 weeks ago
parent
commit
e12b216d7f
  1. 7
      src/api/wms/containerMainRequest/index.ts
  2. 3
      src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue
  3. 6
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  4. 16
      src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue
  5. 10
      src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue
  6. 24
      src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts
  7. 5
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  8. 253
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts

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

@ -113,11 +113,16 @@ export const exportDeliverContainerMainRequest = async (params) => {
}
}
// 下载用户导入模板
// 下载用户导入模板(器具初始化/新增)
export const importTemplate = () => {
return request.download({ url: '/wms/container-main-request/get-import-template' })
}
// 下载用户导入模板(器具返回/移动/报废)
export const importTemplateReturnAndMove = () => {
return request.download({ url: '/wms/container-main-request/get-import-template-returnAndMove' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/container-main-request/close?id=' + id })

3
src/views/wms/inventoryjobManage/containermanage/createContainerMainRequest/index.vue

@ -81,7 +81,7 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" :toInventoryStatus= "toInventoryStatus"/>
</template>
<script setup lang="ts">
@ -105,6 +105,7 @@ const toLocationCode = ref()
const importFileName = ref()
const route = useRoute() //
const routeName = ref()
const toInventoryStatus = 'CREATE'
routeName.value = route.name
const tableColumns = ref(ContainerMainRequest.allSchemas.tableColumns)
console.log(99 , routeName.value)

6
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -81,7 +81,7 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" :toInventoryStatus= "toInventoryStatus"/>
</template>
<script setup lang="ts">
@ -105,6 +105,7 @@ const toLocationCode = ref()
const importFileName = ref()
const route = useRoute() //
const routeName = ref()
const toInventoryStatus = 'INITIAL'
routeName.value = route.name
const tableColumns = ref(ContainerMainRequest.allSchemas.tableColumns)
console.log(99 , routeName.value)
@ -536,5 +537,4 @@ onMounted(async () => {
importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplate()
})
</script>
./initialContainerMainRequest.data
</script>

16
src/views/wms/inventoryjobManage/containermanage/moveContainerMainRequest/index.vue

@ -81,7 +81,7 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" :toInventoryStatus= "toInventoryStatus"/>
</template>
<script setup lang="ts">
@ -105,6 +105,7 @@ const toLocationCode = ref()
const importFileName = ref()
const route = useRoute() //
const routeName = ref()
const toInventoryStatus = 'MOVE'
routeName.value = route.name
const tableColumns = ref(ContainerMainRequest.allSchemas.tableColumns)
console.log(99 , routeName.value)
@ -119,12 +120,12 @@ const { tableObject, tableMethods } = useTable({
if ( routeName.value == 'MoveContainerManageRequest') {
tableObject.params = {
type:'Move',
type:'MOVE',
}
searchType.value = 'Move'
searchType.value = 'MOVE'
ContainerMainRequest.allSchemas.formSchema.forEach(item=>{
if(item.field == 'type'){
item.value = "Move"
item.value = "MOVE"
}
});
@ -148,9 +149,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if(val.length==0) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['containerNumber'] = item['code']
newRow['containerNumber'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['toInventoryStatus'] = 'OK'
newRow['fromLocationCode'] = item['locationCode']
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['toQty'] = item['qty']
tableData.value.push(newRow)
})
@ -531,7 +535,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplate()
importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateReturnAndMove()
})
</script>

10
src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/index.vue

@ -81,7 +81,7 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess":toInventoryStatus= "toInventoryStatus"/>
</template>
<script setup lang="ts">
@ -105,6 +105,7 @@ const toLocationCode = ref()
const importFileName = ref()
const route = useRoute() //
const routeName = ref()
const toInventoryStatus = 'RETURN'
routeName.value = route.name
const tableColumns = ref(ContainerMainRequest.allSchemas.tableColumns)
console.log(99 , routeName.value)
@ -148,9 +149,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if(val.length==0) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['containerNumber'] = item['code']
newRow['containerNumber'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['toInventoryStatus'] = 'OK'
newRow['fromLocationCode'] = item['locationCode']
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['toQty'] = item['qty']
tableData.value.push(newRow)
})
@ -531,7 +535,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplate()
importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateReturnAndMove()
})
</script>

24
src/views/wms/inventoryjobManage/containermanage/returnContainerMainRequest/returnContainerMainRequest.data.ts

@ -488,7 +488,29 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '库存状态',
label: '从库存状态',
field: 'fromInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',

5
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue

@ -81,7 +81,7 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/wms/container-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" :toInventoryStatus= "toInventoryStatus"/>
</template>
<script setup lang="ts">
@ -107,6 +107,7 @@ const toLocationCode = ref()
const fromLocationCode = ref()
const importFileName = ref()
const route = useRoute() //
const toInventoryStatus = 'SCRAP'
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ContainerMainRequest.allSchemas.tableColumns)
@ -556,7 +557,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplate()
importTemplateData.templateUrl = await ContainerMainRequestApi.importTemplateReturnAndMove()
})
</script>

253
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts

@ -9,6 +9,7 @@ import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as getBusinessTypeApi from '@/api/wms/businesstype/index'
// 表单校验
export const ContainerMainRequestRules = reactive({
@ -27,6 +28,17 @@ const queryParams = {
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData = data?.list[0] || {}
const businessTypeQueryParams = {
pageSize:10,
pageNo:1,
code:'ScrapContainerManage',
name:'器具报废管理'
}
const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams)
const businessTypeData =businessTypeValue?.list[0]||{}
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
@ -63,6 +75,49 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
// {
// label: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'code',
// searchTitle: '库位信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.selectBusinessTypeToLocation,
// searchCondition: [{
// key: 'businessType',
// value: businessTypeData.code,
// },{
// key: 'isIn',
// value: 'in',
// isMainValue: false
// }]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'code',
// searchTitle: '库位信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.selectBusinessTypeToLocation,
// searchCondition: [{
// key: 'businessType',
// value: businessTypeData.code,
// },{
// key: 'isIn',
// value: 'in',
// isMainValue: false
// }]
// }
// }
// },
{
label: '类型',
field: 'type',
@ -96,16 +151,18 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'mainRemark',
sort: 'custom',
isSearch: false,
isTable: true
isForm: true,
isTable: false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
table: {
width: 150
},
isSearch: false,
isForm: false,
isTable: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
@ -218,7 +275,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isSearch: true,
isSearch: false,
isForm: false,
isTable: false,
search: {
component: 'DatePicker',
componentProps: {
@ -227,8 +286,6 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isTable: true,
isForm: false,
},
{
label: '创建者',
@ -236,8 +293,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 130
},
isSearch: false,
isForm: false,
isTable: true
isTable: false,
},
{
label: '最后更新时间',
@ -267,6 +325,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '最后更新者',
field: 'updater',
isDetail: true,
isSearch: false,
isForm: false,
isTable: false,
table: {
@ -277,8 +336,9 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isForm: false,
isTable: false
isTable: false,
},
{
label: '并发乐观锁',
@ -288,13 +348,15 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber',
value: 0
},
isSearch: false,
isForm: false,
isTable: false
isTable: false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isForm: false,
isTable: false,
},
@ -357,14 +419,14 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '器具号',
field: 'containerNumber',
sort: 'custom',
tableForm: {
multiple: true,
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择器具号',
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectConfigToBalance,
searchPage: BalanceApi.getBalanceByQJ,
},
form: {
// labelMessage: '信息提示说明!!!',
@ -374,7 +436,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectConfigToBalance,
searchPage: BalanceApi.getBalanceByQJ,
}
}
},
@ -382,6 +444,9 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '来源库位代码',
field: 'fromLocationCode',
sort: 'custom',
isForm: false,
isTableForm: false,
isTable: false,
table: {
width: 150
},
@ -396,83 +461,70 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '目标库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectPageItemAreaToLocation,
// 失去焦点校验参数
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true,
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectPageItemAreaToLocation,
// 失去焦点校验参数
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true,
}]
}
}
},
{
label: '从库存状态',
field: 'fromInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
},
},
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
},
// {
// label: '目标库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// enterSearch:true,
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'code',
// searchTitle: '库位信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.selectPageItemAreaToLocation,
// // 失去焦点校验参数
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: 'true',
// isFormModel: true,
// }]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择到库位代码',
// searchField: 'code',
// searchTitle: '库位信息',
// searchAllSchemas: Location.allSchemas,
// searchPage: LocationApi.selectPageItemAreaToLocation,
// // 失去焦点校验参数
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: 'true',
// isFormModel: true,
// }]
// }
// }
// },
// {
// label: '从库存状态',
// field: 'fromInventoryStatus',
// dictType: DICT_TYPE.INVENTORY_STATUS,
// dictClass: 'string',
// isForm: false,
// isTableForm: false,
// isTable: false,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// disabled: true,
// type: 'Select'
// },
// },
// {
// label: '从数量',
// field: 'fromQty',
@ -482,7 +534,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
// },
// },
{
label: '数量',
label: '数量',
field: 'toQty',
sort: 'custom',
form: {
@ -514,11 +566,30 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select'
}
},
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
},
{
label: '子备注',
field: 'remark',
sort: 'custom',
isTable: true
isTable: true,
isForm: false,
isTableForm: false
},
{
label: '创建时间',

Loading…
Cancel
Save