Browse Source

物料组合关系修改

intex_online20250311
叶佳兴 4 weeks ago
parent
commit
4764f9c944
  1. 2
      src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue
  2. 62
      src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts

2
src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue

@ -90,7 +90,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'itemCode') {
setV[formField] = val.map(item=>item.code).join(',')
setV[formField] = val.map(item=>item.itemCode).join(',')
setV['itemName'] = val.map(item=>item.name).join(',')
} else {
setV[formField] = val[0][searchField]

62
src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts

@ -1,11 +1,17 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
import {Supplieritem} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data";
import * as SupplieritemApi from "@/api/wms/supplieritem";
import {dateFormatter} from "@/utils/formatTime";
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
// 表单校验
export const ItemSyntheticRelationRules = reactive({
name: [required],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }
],
itemCode: [required, { validator: validateItemCodes, message: '应选择多个物料', trigger: 'blur' }],
available: [required],
})
@ -37,6 +43,37 @@ export const ItemSyntheticRelation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '品番',
field: 'itemCode',
@ -49,18 +86,25 @@ export const ItemSyntheticRelation = useCrudSchemas(reactive<CrudSchema[]>([
enterSearch: true, //可输入回车
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择品番', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
verificationPage: ItembasicApi.getItemListByCodes, // 查询弹窗所需分页方法
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
verificationPage: SupplieritemApi.getSupplierItemListByCodes, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
},
{
key: 'supplierCode',
value: 'supplierCode',
message: '请选择供应商代码',
isMainValue: true
}
],
verificationParams: [{
key: 'code',
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,

Loading…
Cancel
Save