Browse Source

物料变更查询

hella_online_20240829
chenfang 4 months ago
parent
commit
1c819481a7
  1. 4
      src/api/wms/itembasic/index.ts
  2. 2
      src/api/wms/productionitemcodeSpareitemcode/index.ts
  3. 40
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  4. 20
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

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

@ -119,3 +119,7 @@ export const getItemListByCodes = async (params) => {
return await request.get({ url: `/wms/itembasic/listByCodes`,params})
}
// 根据cood查询器具物料信息
export const selectContainermanageItemCode = async (code: String) => {
return await request.get({ url: `/wms/itembasic/selectContainermanageItemCode`,code})
}

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

@ -24,7 +24,7 @@ export const getProductionitemcodeSpareitemcodeRelation = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionitemcode-spareitemcode/getRelationSeniorS', data })
return await request.post({ url: '/wms/productionitemcode-spareitemcode/getRelationSenior', data })
} else {
return await request.get({ url: `/wms/productionitemcode-spareitemcode/getRelation`, params })
}

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

@ -62,6 +62,21 @@
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true" />
<!-- 创建标签 -->
<!-- <BasicForm
ref="formLabelRef"
@success="getList"
:tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductreceiptRequestLabelRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitFormLabel" -->
<!-- /> -->
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
@ -77,7 +92,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { ProductreceiptRequestLabel,ProductreceiptRequestLabelRules } from '../../../../productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data'
defineOptions({ name: 'RelegateRequestMain' })
const message = useMessage() //
@ -89,7 +105,8 @@ const businessType = 'relegate'
routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
//
const detailListTableColumns = ProductreceiptRequestLabel.allSchemas
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
@ -108,22 +125,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
newRow['inventoryStatus'] = item['inventoryStatus']
tableData.value.push(newRow)
})
} else if (formField == 'downItemCode') {
if(row['itemCode'] == val[0]['spareItemCode']){
row['downItemCode'] = val[0]['productionItemCode'] //
}else{
row['downItemCode'] = val[0]['spareItemCode'] //
// if(row['itemCode'] == val[0]['spareItemCode']){
// row['downItemCode'] = val[0]['productionItemCode'] //
// }else{
// 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']
// }
console.log(row['itemCode']);
ItembasicApi.getItemListByCodes(row['itemCode'])
} else if (formField == 'toLocationCode') {
row['toLocationCode'] = val[0]['code']
} else {

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

@ -2,7 +2,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
@ -18,8 +17,6 @@ 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 = {
pageSize:10,
@ -28,7 +25,6 @@ const queryParams = {
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
const confgiData = await confgiApi.queryByKey("relegateItemType")
// 表单校验
export const RelegateRequestMainRules = reactive({
fromWarehouseCode: [required],
@ -343,7 +339,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
// value: 'TRUE',
// isMainValue: false
// }
,{
{
message: '请选择从仓库代码!',
key: 'fromWarehouseCode',
value: 'fromWarehouseCode',
@ -355,24 +351,24 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '降级物料代码',
label: '物料变更代码',
field: 'downItemCode',
sort: 'custom',
form: {
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchListPlaceholder: '请选择物料代码',
searchField: 'productionItemCode',
searchTitle: '物料基础信息',
searchAllSchemas: ProductionitemcodeSpareitemcode.allSchemas,
searchAllSchemas: Itembasic.allSchemas,
searchPage: ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodeRelation,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
key: 'code',
value: 'itemCode',
isTableRowValue: true,
isMainValue:false
@ -389,10 +385,10 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择降级物料代码', // 输入框占位文本
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'productionItemCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: ProductionitemcodeSpareitemcode.allSchemas, // 查询弹窗所需类
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodeRelation, // 查询弹窗所需分页方法
searchCondition:[
{
@ -400,7 +396,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
key: 'code',
value: 'itemCode',
isTableRowValue: true,
isMainValue:false

Loading…
Cancel
Save