Browse Source

物料降级代码开发

hella_online_20240829
chenfang 4 months ago
parent
commit
f744b13a09
  1. 11
      src/api/wms/balance/index.ts
  2. 11
      src/api/wms/productionitemcodeSpareitemcode/index.ts
  3. 60
      src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts
  4. 23
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  5. 34
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  6. 4
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts

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

@ -190,6 +190,17 @@ export const getBalanceByBusinessTypeByItemType = async (params) => {
return await request.get({ url: `/wms/balance/pageBusinessTypeToBalance`, params })
}
}
// 查询库存余额列表根据业务类型 根据库存状态及库区类型再根据物料的种类筛选
export const getBalanceByBusinessCategoryByItemType = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/balance/pageBusinessCategoryToBalanceSenior', data })
} else {
return await request.get({ url: `/wms/balance/pageBusinessCategoryToBalance`, params })
}
}
// 根据code获取数据列表
export const getBalanceItemListByCodes = async (data) => {
  return await request.get({ url: `/wms/balance/listByCodes`,data })

11
src/api/wms/productionitemcodeSpareitemcode/index.ts

@ -19,6 +19,17 @@ export const getProductionitemcodeSpareitemcodePage = async (params) => {
}
}
// 查询量产件备件关系列表
export const getProductionitemcodeSpareitemcodeRelation = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionitemcode-spareitemcode/getRelationSeniorS', data })
} else {
return await request.get({ url: `/wms/productionitemcode-spareitemcode/getRelation`, params })
}
}
// 查询量产件备件关系详情
export const getProductionitemcodeSpareitemcode = async (id: number) => {
return await request.get({ url: `/wms/productionitemcode-spareitemcode/get?id=` + id })

60
src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts

@ -1,5 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../itembasic/itembasic.data'
// 表单校验
export const ProductionitemcodeSpareitemcodeRules = reactive({
@ -13,12 +15,70 @@ export const ProductionitemcodeSpareitemcode = useCrudSchemas(reactive<CrudSchem
field: 'productionItemCode',
sort: 'custom',
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, //可输入回车
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'category',
value: 'LCJ',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true
}], // 失去焦点校验参数
}
}
},
{
label: '备件',
field: 'spareItemCode',
sort: 'custom',
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, //可输入回车
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'category',
value: 'BJ',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true
}], // 失去焦点校验参数
}
}
},
{
label: '是否可用',

23
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -72,6 +72,7 @@ import download from '@/utils/download'
import { RelegateRequestMain, RelegateRequestMainRules, RelegateRequestDetail, RelegateRequestDetailRules } from './relegateRequestMain.data'
import * as RelegateRequestMainApi from '@/api/wms/relegateRequestMain'
import * as RelegateRequestDetailApi from '@/api/wms/relegateRequestDetail'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -109,7 +110,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
})
} else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code']
row['downItemCode'] = val[0]['spareItemCode']
console.log(row['itemCode']);
// ItembasicApi.getItemListByCodes(row['itemCode'])
// if(){
// row['downItemCode'] = val[0]['productionItemCode']
// }else if(){
// row['downItemCode'] = val[0]['spareItemCode']
// }
} else if (formField == 'toLocationCode') {
row['toLocationCode'] = val[0]['code']
} else {
@ -139,17 +148,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
RelegateRequestDetail.allSchemas.tableFormColumns.map(item => {
if (item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
// ,{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }
,{
{
message: '请选择从仓库代码!',
key: 'warehouseCode',
value: 'fromWarehouseCode',

34
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -17,6 +17,8 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l
import * as ItempackageApi from '@/api/wms/itempackage'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ProductionitemcodeSpareitemcodeApi from '@/api/wms/productionitemcodeSpareitemcode'
import { ProductionitemcodeSpareitemcode } from '@/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data'
import * as confgiApi from '@/api/infra/config'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
@ -322,7 +324,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalanceByBusinessTypeByItemType,
searchPage: BalanceApi.getBalanceByBusinessCategoryByItemType,
searchCondition: []
}
},
@ -334,7 +336,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalanceByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalanceByBusinessCategoryByItemType, // 查询弹窗所需分页方法
searchCondition:[
// {
// key: 'available',
@ -361,19 +363,20 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchField: 'code',
searchField: 'productionItemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchAllSchemas: ProductionitemcodeSpareitemcode.allSchemas,
searchPage: ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodeRelation,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'type',
value: confgiData.itemType,
isMainValue: false
}],
key: 'itemCode',
value: 'itemCode',
isTableRowValue: true,
isMainValue:false
}],
verificationParams: [{
key: 'code',
action: '==',
@ -387,19 +390,20 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择降级物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchField: 'productionItemCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchAllSchemas: ProductionitemcodeSpareitemcode.allSchemas, // 查询弹窗所需类
searchPage: ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodeRelation, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'type',
value: confgiData.itemType,
isMainValue: false
key: 'itemCode',
value: 'itemCode',
isTableRowValue: true,
isMainValue:false
}]
},
table: {

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

@ -38,7 +38,7 @@ export const CallmaterialsRules = reactive({
workStationCode: [required],
uom: [required],
callmaterialQty: [required],
project: [{ max: 50, message: '最多50字符', trigger: 'blur'}]
project: [{ max: 64, message: '最多50字符', trigger: 'blur'}]
})
export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
@ -361,7 +361,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
} ,
form: {
componentProps:{
maxlength: 50,
maxlength: 64,
type:'textarea',
showWordLimit:true
}

Loading…
Cancel
Save