Browse Source

YT-2107受入号便次时间配置,新增时选择受入号改为放大镜组件选择

intex_online20250327
zhaoyiran 3 weeks ago
parent
commit
dd8054b2f1
  1. 11
      src/api/wms/modelDeliTime/index.ts
  2. 34
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue
  3. 62
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts

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

@ -52,6 +52,13 @@ export const importTemplate = () => {
return request.download({ url: '/wms/model-deli-time-detail/get-import-template' }) return request.download({ url: '/wms/model-deli-time-detail/get-import-template' })
} }
// 查询受入号 // 查询受入号
export const getSupplierAddrList = async () => { export const getSupplierAddrList = async (params) => {
return await request.get({ url: `/wms/itembasic/getModel` }) if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/itembasic/getModelSenior', data })
} else {
return await request.get({ url: `/wms/itembasic/getModel`, params})
}
} }

34
src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue

@ -146,24 +146,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
tableData.value.push(tfk) tableData.value.push(tfk)
}) })
} }
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if (formField == 'supplierCode') { if (formField == 'modelShow') {
setV['modelShow'] = val.map(item=>item.model).join(',')
}
if (formField == 'supplierCode') {
setV['supplierCode'] = val[0].code setV['supplierCode'] = val[0].code
setV['supplierName'] = val[0].name setV['supplierName'] = val[0].name
console.log(ModelDeliTime.allSchemas.formSchema) console.log(ModelDeliTime.allSchemas.formSchema)
const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code) // const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code)
ModelDeliTime.allSchemas.formSchema.forEach(item => { // ModelDeliTime.allSchemas.formSchema.forEach(item => {
if(item.field == 'modelShow'){ // if(item.field == 'modelShow'){
item.componentProps.options = options.map(item=> { // item.componentProps.options = options.map(item=> {
return { // return {
label: item, // label: item,
value:item // value:item
} // }
}) // })
} // }
}) // })
} }
formRef.setValues(setV) formRef.setValues(setV)
}) })
@ -179,7 +182,8 @@ const submitForm = async (formType, submitData) => {
if (data.masterId) { if (data.masterId) {
data.id = data.masterId data.id = data.masterId
} }
data.model =data.modelShow.join(',') data.model =data.modelShow
// data.model =data.modelShow.join(',')
data.yearAndMonth =data.yearAndMonthShow.join(',') data.yearAndMonth =data.yearAndMonthShow.join(',')
data.subList = tableData.value // data.subList = tableData.value //
data.subList.forEach((item) => { data.subList.forEach((item) => {
@ -265,7 +269,7 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
getModelCode() // getModelCode()
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') { //
handleImport() handleImport()

62
src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts

@ -6,6 +6,8 @@ import { Supplier } from '../supplier/supplier.data'
import { DeliTimeWms } from '../DeliTimeWms/deliTimeWms.data' import { DeliTimeWms } from '../DeliTimeWms/deliTimeWms.data'
import * as DeliTimeWmsApi from '@/api/wms/deliTimeWms' import * as DeliTimeWmsApi from '@/api/wms/deliTimeWms'
import { fa } from 'element-plus/es/locale' import { fa } from 'element-plus/es/locale'
import * as modelDeliTimeApi from '@/api/wms/modelDeliTime'
// 表单校验 // 表单校验
export const ModelDeliTimeDetailRules = reactive({ export const ModelDeliTimeDetailRules = reactive({
@ -48,6 +50,15 @@ function getMonthArr() {
return dateArr; return dateArr;
} }
export const ModelList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true,
},
]))
export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
// { // {
// label: '供应商代码', // label: '供应商代码',
@ -100,17 +111,48 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isTable: false, isTable: false,
isDetail: false, isDetail: false,
// form: {
// component: 'Select',
// componentProps: {
// multiple: true,
// collapseTags: true,
// collapseTagsTooltip: true,
// maxCollapseTags: "2",
// optionsAlias: {
// labelField: 'label',
// valueField: 'value'
// }
// }
// }
form: { form: {
component: 'Select', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
multiple: true, multiple:true,
collapseTags: true, disabled:true,
collapseTagsTooltip: true, enterSearch: false,
maxCollapseTags: "2", isSearchList: true, // 开启查询弹窗
optionsAlias: { searchListPlaceholder: '请选择受入号', // 输入框占位文本
labelField: 'label', searchField: 'model', // 查询弹窗赋值字段
valueField: 'value' searchTitle: '受入号', // 查询弹窗标题
} searchAllSchemas: ModelList.allSchemas, // 查询弹窗所需类
searchPage: modelDeliTimeApi.getSupplierAddrList, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -216,6 +258,8 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
} }
])) ]))
export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '编号', label: '编号',

Loading…
Cancel
Save