Browse Source

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

intex_online20250327
zhaoyiran 3 weeks ago
parent
commit
dd8054b2f1
  1. 11
      src/api/wms/modelDeliTime/index.ts
  2. 36
      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' })
}
// 查询受入号
export const getSupplierAddrList = async () => {
return await request.get({ url: `/wms/itembasic/getModel` })
export const getSupplierAddrList = async (params) => {
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})
}
}

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

@ -119,7 +119,7 @@ routeName.value = route.name
const tableColumns = ref(ModelDeliTime.allSchemas.tableColumns)
const detailAllSchemas = ref(ModelDeliTimeDetail.allSchemas)
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async() => {
if (formField == 'code') {
let codes = val.filter((item) =>
@ -146,24 +146,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
tableData.value.push(tfk)
})
}
const setV = {}
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['supplierName'] = val[0].name
console.log(ModelDeliTime.allSchemas.formSchema)
const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code)
ModelDeliTime.allSchemas.formSchema.forEach(item => {
if(item.field == 'modelShow'){
item.componentProps.options = options.map(item=> {
return {
label: item,
value:item
}
})
}
})
// const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code)
// ModelDeliTime.allSchemas.formSchema.forEach(item => {
// if(item.field == 'modelShow'){
// item.componentProps.options = options.map(item=> {
// return {
// label: item,
// value:item
// }
// })
// }
// })
}
formRef.setValues(setV)
})
@ -179,7 +182,8 @@ const submitForm = async (formType, submitData) => {
if (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.subList = tableData.value //
data.subList.forEach((item) => {
@ -265,7 +269,7 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
getModelCode()
// getModelCode()
openForm('create')
} else if (val == 'import') { //
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 * as DeliTimeWmsApi from '@/api/wms/deliTimeWms'
import { fa } from 'element-plus/es/locale'
import * as modelDeliTimeApi from '@/api/wms/modelDeliTime'
// 表单校验
export const ModelDeliTimeDetailRules = reactive({
@ -48,6 +50,15 @@ function getMonthArr() {
return dateArr;
}
export const ModelList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true,
},
]))
export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '供应商代码',
@ -100,17 +111,48 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isTable: false,
isDetail: false,
// form: {
// component: 'Select',
// componentProps: {
// multiple: true,
// collapseTags: true,
// collapseTagsTooltip: true,
// maxCollapseTags: "2",
// optionsAlias: {
// labelField: 'label',
// valueField: 'value'
// }
// }
// }
form: {
component: 'Select',
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
maxCollapseTags: "2",
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
multiple:true,
disabled:true,
enterSearch: false,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择受入号', // 输入框占位文本
searchField: 'model', // 查询弹窗赋值字段
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[]>([
{
label: '编号',

Loading…
Cancel
Save