Browse Source

库存修改前端展示

master
chenfang 12 months ago
parent
commit
c6320777fc
  1. 20
      src/api/wms/inventorymoveJobMain/index.ts
  2. 30
      src/api/wms/inventorymoveRequestMain/index.ts
  3. 73
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  4. 31
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  5. 91
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  6. 123
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  7. 44
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

20
src/api/wms/inventorymoveJobMain/index.ts

@ -81,3 +81,23 @@ export const exportInventorymoveJobMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-job-main/get-import-template' })
}
// 承接库存转移任务
export const acceptInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/accept?id=` + id })
}
// 放弃库存转移任务
export const abandonInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/abandon?id=` + id })
}
// 关闭库存转移任务
export const closeInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/close?id=` + id })
}
// 执行库存转移任务
export const executeInventorymoveMain = async (data) => {
return await request.put({ url: `/wms/inventorymove-job-main/execute`, data})
}

30
src/api/wms/inventorymoveRequestMain/index.ts

@ -65,3 +65,33 @@ export const exportInventorymoveRequestMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/handle?id=' + id })
}

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

@ -72,7 +72,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorychange-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -82,20 +82,6 @@ import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequest
import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'OktoholdRequestMain' })
//
// defineOptions({ name: 'HoldtookRequestMain' })
// //
// defineOptions({ name: 'HoldtoscrapRequestMain' })
// //
// defineOptions({ name: 'OktoscrapRequestMain' })
// //
// defineOptions({ name: 'ScraptoholdRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
@ -105,54 +91,10 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InventorychangeRequestMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const { tableObject, tableMethods } = useTable({
getListApi: InventorychangeRequestMainApi.getInventorychangeRequestMainPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
}
//
const updataTableColumns = (val) => {
@ -169,11 +111,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['itemCode'] = val[0]['itemCode']
row['fromBatch'] = val[0]['batch']
row['locationCode'] = val[0]['locationCode']
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
row['fromInventoryStatus'] = val[0]['inventoryStatus']
}
console.log(116, row)
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
@ -372,10 +315,6 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try {
if (formType === 'create') {
console.log(data)

31
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -348,34 +348,8 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
tableForm: {
disabled: true
}
},
{
@ -608,7 +582,6 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm: {
type: 'Select'
},
isTableForm: false,
},
{
label: '库位组代码',

91
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue

@ -177,7 +177,7 @@ const butttondata = (row) => {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
@ -185,12 +185,95 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
"id": 3,
"requestNumber": "REQ3720231215-0003",
"useOnTheWayLocation": "TRUE",
"fromWarehouseCode": "W1",
"requestTime": 1702604632000,
"requestDueTime": 1703952000000,
"status": "1",
"expiredTime": 1703952000000,
"updateTime": 1702607543000,
"updater": "1",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "SCRAP",
"toLocationTypes": "SCRAP",
"number": "JOB1120231215-0005",
"businessType": "OkToHoldJob",
"remark": "主备注",
"createTime": 1702607543000,
"creator": "1",
"creatorName": null,
"toWarehouseCode": "W1",
"fromAreaCodes": "L-R-001",
"toAreaCodes": "L-R-001",
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
subList: [{
"id": "1809190000225116835",
"itemCode": "testCF",
"itemName": "陈放测试物品",
"itemDesc1": "测试用",
"itemDesc2": "测试用",
"projectCode": "5",
"qty": 1,
"uom": "EA",
"number": "JOB1120231215-0005",
"remark": "子备注",
"createtime": null,
"creator": "1",
"packingNumber": "testCF",
"containerNumber": null,
"batch": "20230808",
"inventoryStatus": "OK",
"poNumber": null,
"poLine": null,
"fromLocationCode": "Loc_testCF",
"toLocationCode": "L-R-001-001-1-01",
"fromOwnerCode": null,
"toOwnerCode": null,
recordList: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 22,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
}]
}
InventorymoveJobMainApi.executeInventorymoveMain(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
InventorymoveJobMainApi.abandonInventorymoveMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
InventorymoveJobMainApi.closeInventorymoveMain(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
InventorymoveJobMainApi.acceptInventorymoveMain(row.id)
}
}

123
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -73,7 +73,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorymove-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" />
</template>
<script setup lang="ts">
@ -94,6 +94,56 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -142,10 +192,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
@ -195,13 +241,14 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:inventorymove-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), //
]
}
@ -210,15 +257,53 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
InventorymoveRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
InventorymoveRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要提交审批吗?')
InventorymoveRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要驳回吗?')
InventorymoveRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
await message.confirm('确认要审批通过吗?')
InventorymoveRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
InventorymoveRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -289,6 +374,10 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try {
if (formType === 'create') {
await InventorymoveRequestMainApi.createInventorymoveRequestMain(data)

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

@ -8,6 +8,9 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -57,6 +60,43 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从仓库代码',
searchField: 'code',
searchTitle: '仓库基础信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择从仓库代码',
searchField: 'code',
searchTitle: '仓库基础信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '申请时间',
field: 'requestTime',
@ -102,7 +142,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '从仓库代码',
field: 'fromWarehouseOde',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
@ -375,7 +415,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const InventorymoveRequestMainRules = reactive({
// fromWarehouseOde: [
// fromWarehouseCode: [
// { required: true, message: '请选择从仓库代码', trigger: 'change' }
// ],
// fromLocationTypes: [

Loading…
Cancel
Save