Browse Source

品番拉动修改

intex_online_yejiaxing
叶佳兴 2 weeks ago
parent
commit
b8cdaa0022
  1. 39
      src/views/wms/basicDataManage/itemPull/itemPull.data.ts
  2. 23
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue
  3. 625
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts

39
src/views/wms/basicDataManage/itemPull/itemPull.data.ts

@ -4,16 +4,50 @@ import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as AreaApi from '@/api/wms/areabasic'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
// 表单校验
export const ItemPullRules = reactive({
itemCode: [required],
defaultErpLocationCode: [required],
replenishType: [required],
pullType: [required]
})
export const ItemPull = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: 'ERP默认收货库位',
field: 'defaultErpLocationCode',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple: true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择ERP默认收货库位', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '品番',
field: 'itemCode',
@ -21,7 +55,7 @@ export const ItemPull = useCrudSchemas(
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
@ -104,7 +138,6 @@ export const ItemPull = useCrudSchemas(
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',

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

@ -142,7 +142,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk['code'] = item['code']
tfk['shift'] = item['shift']
tfk['beginTime'] = item['begeinTime']
tfk['beginTime'] = item['beginTime']
tableData.value.push(tfk)
})
}
@ -389,17 +389,34 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplierAddrDeliTimeDetail')
}
/** 删除按钮操作 */
// const handleDelete = async (id: number) => {
// try {
// //
// await message.delConfirm()
// //
// await ModelDeliTimeDetailApi.deleteSupplierAddrDeliTimeDetail(id)
// message.success(t('common.delSuccess'))
// //
// await getList()
// } catch {}
// }
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
tableObject.loading = true
//
await ModelDeliTimeDetailApi.deleteSupplierAddrDeliTimeDetail(id)
message.success(t('common.delSuccess'))
//
tableObject.loading = false
//
await getList()
} catch {}
} catch {}finally{
tableObject.loading = false
}
}
/** 导出按钮操作 */

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

@ -1,5 +1,4 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
// import {Supplier} from '@/basicDataManage/supplierManage/supplier/supplier.data'
import { Supplier } from '../supplier/supplier.data'
@ -7,312 +6,289 @@ 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'
import { dateFormatter, dateFormatterHHMMSS } from '@/utils/formatTime'
// 表单校验
export const ModelDeliTimeDetailRules = reactive({
modelShow: [required],
yearAndMonthShow: [required],
delayDeli: [required],
delayDeli: [required]
})
function getMonthArr() {
let dateArr = [];
let year = new Date().getFullYear();
let month = new Date().getMonth();
let dateArr = []
let year = new Date().getFullYear()
let month = new Date().getMonth()
const n = 12
if (n < month) {
//1.n<month的情况
for (let i = month - n + 1; i <= month; i++) {
let m1 = i < 10 ? "0" + i : i;
let m1 = i < 10 ? '0' + i : i
dateArr.push({
label: year + '-' + m1,
value: year + '-' + m1
});
})
}
} else {
//2.n>month的情况
for (let i = (12 - (n - month) + 1); i <= 12; i++) {
let m1 = i < 10 ? "0" + i : i;
//2.n>month的情况
for (let i = 12 - (n - month) + 1; i <= 12; i++) {
let m1 = i < 10 ? '0' + i : i
dateArr.push({
label: year + '-' + m1,
value: year + '-' + m1
});
})
}
for (let i = 1; i <= month; i++) {
let m1 = i < 10 ? "0" + i : i;
let m1 = i < 10 ? '0' + i : i
dateArr.push({
label: (parseFloat(year) + 1) + '-' + m1,
value: (parseFloat(year) + 1) + '-' + m1,
});
label: parseFloat(year) + 1 + '-' + m1,
value: parseFloat(year) + 1 + '-' + m1
})
}
}
return dateArr;
return dateArr
}
export const ModelList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true,
},
]))
export const ModelList = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true
}
])
)
export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '供应商代码',
// field: 'supplierCode',
// sort: 'custom',
// isSearch: true,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// enterSearch: true,
// searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: '供应商', // 查询弹窗标题
// searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
// searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: "TRUE",
// isMainValue: false
// }
// ],
// // 失去焦点校验参数
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: 'true',
// isFormModel: true,
// }]
// }
// }
// },
// {
// label: '供应商名称',
// field: 'supplierName',
// sort: 'custom',
// form :{
// componentProps:{
// disabled:true
// }
// },
// },
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true,
isTable: true,
isDetail: true,
// form: {
// component: 'Select',
// componentProps: {
// multiple: true,
// collapseTags: true,
// collapseTagsTooltip: true,
// maxCollapseTags: "2",
// optionsAlias: {
// labelField: 'label',
// valueField: 'value'
export const ModelDeliTime = useCrudSchemas(
reactive<CrudSchema[]>([
// {
// label: '供应商代码',
// field: 'supplierCode',
// sort: 'custom',
// isSearch: true,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// enterSearch: true,
// searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: '供应商', // 查询弹窗标题
// searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
// searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: "TRUE",
// isMainValue: false
// }
// ],
// // 失去焦点校验参数
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: 'true',
// isFormModel: true,
// }]
// }
// }
// }
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
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
}
] // 失去焦点校验参数
}
}
},
// {
// label: '受入号',
// field: 'model',
// sort: 'custom',
// isTable: true,
// isDetail: true,
// isForm: false,
// },
{
label: '年月',
field: 'yearAndMonthShow',
sort: 'custom',
isTable: false,
isDetail: false,
form: {
component: 'Select',
api: () => getMonthArr(),
value:[],
componentProps: {
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
maxCollapseTags:"2",
optionsAlias: {
labelField: 'label',
valueField: 'value'
// },
// {
// label: '供应商名称',
// field: 'supplierName',
// sort: 'custom',
// form :{
// componentProps:{
// disabled:true
// }
// },
// },
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true,
isTable: true,
isDetail: true,
// form: {
// component: 'Select',
// componentProps: {
// multiple: true,
// collapseTags: true,
// collapseTagsTooltip: true,
// maxCollapseTags: "2",
// optionsAlias: {
// labelField: 'label',
// valueField: 'value'
// }
// }
// }
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
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
}
] // 失去焦点校验参数
}
}
}
},
{
label: '年月',
field: 'yearAndMonth',
sort: 'custom',
isTable: true,
isDetail: true,
isForm: false,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
type: 'month',
valueFormat: 'YYYY-MM',
},
// {
// label: '受入号',
// field: 'model',
// sort: 'custom',
// isTable: true,
// isDetail: true,
// isForm: false,
// },
{
label: '年月',
field: 'yearAndMonthShow',
sort: 'custom',
isTable: false,
isDetail: false,
form: {
component: 'Select',
api: () => getMonthArr(),
value: [],
componentProps: {
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
maxCollapseTags: '2',
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
}
},
},
{
label: '延迟便次',
field: 'delayDeli',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0,
componentProps: {
min:0,
precision:0
{
label: '年月',
field: 'yearAndMonth',
sort: 'custom',
isTable: true,
isDetail: true,
isForm: false,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
type: 'month',
valueFormat: 'YYYY-MM'
}
}
},
},
{
label: '班次',
field: 'shift',
sort: 'custom',
isForm: false,
dictType: DICT_TYPE.DELISHIF,
dictClass: 'string',
},
{
label: '编号',
field: 'code',
sort: 'custom',
isForm: false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
{
label: '延迟便次',
field: 'delayDeli',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0,
componentProps: {
min: 0,
precision: 0
}
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '班次',
field: 'shift',
sort: 'custom',
isForm: false,
dictType: DICT_TYPE.DELISHIF,
dictClass: 'string'
},
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail:false,
table: {
width: 150,
fixed: 'right'
}
}
]))
export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号',
field: 'code',
sort: 'custom',
isForm: false,
tableForm:{
multiple: true,//多选
isInpuFocusShow: false, // 开启查询弹窗
disabled:true,
searchListPlaceholder: '请选择便次时间配置',// 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '便次时间配置', // 查询弹窗标题
searchAllSchemas: DeliTimeWms.allSchemas, // 查询弹窗所需类
searchPage: DeliTimeWmsApi.getDeliTimePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
{
label: '编号',
field: 'code',
sort: 'custom',
isForm: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
],
verificationPage: DeliTimeWmsApi.getDeliTimePage, // tableForm下方输入框校验失去焦点之后是否正确的方法
// isShowTableFormSearch: true, //tableForm下方是否出现输入框
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择品番', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
}
])
)
export const ModelDeliTimeDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编号',
field: 'code',
sort: 'custom',
isForm: false,
tableForm: {
multiple: true, //多选
isInpuFocusShow: false, // 开启查询弹窗
disabled: true,
searchListPlaceholder: '请选择便次时间配置', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '便次时间配置', // 查询弹窗标题
searchAllSchemas: DeliTimeWms.allSchemas, // 查询弹窗所需类
searchPage: DeliTimeWmsApi.getDeliTimePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},
}
],
verificationPage: DeliTimeWmsApi.getDeliTimePage, // tableForm下方输入框校验失去焦点之后是否正确的方法
// isShowTableFormSearch: true, //tableForm下方是否出现输入框
verificationParams: [
{
key: 'itemCode',
@ -323,40 +299,103 @@ export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([
isFormModel: true
}
] // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择品番', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题
searchAllSchemas: DeliTimeWms.allSchemas, // 查询弹窗所需类
searchPage: DeliTimeWmsApi.getDeliTimePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '班次',
field: 'shift',
sort: 'custom',
isForm: false,
dictType: DICT_TYPE.DELISHIF,
dictClass: 'string',
tableForm: {
disabled: true,
type: 'Select'
}
},
{
label: '开始时间',
field: 'beginTime',
sort: 'custom',
formatter: dateFormatterHHMMSS,
isSearch: true,
search: {
component: 'TimePicker',
componentProps: {
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
form: {
component: 'TimePicker',
componentProps: {
disabled: true,
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x'
}
},
tableForm: {
disabled: true,
type:'FormDateTime',
format:'HH:mm:ss',
valueFormat: 'x'
},
detail: {
dateFormat: 'HH:mm:ss'
}
},
{
label: '操作',
field: 'action',
isForm: false,
isTableForm: false,
table: {
width: 150,
fixed: 'right'
}
}
},
{
label: '班次',
field: 'shift',
sort: 'custom',
isForm: false,
dictType: DICT_TYPE.DELISHIF,
dictClass: 'string',
tableForm:{
disabled:true,
type:'Select'
}
},
{
label: '操作',
field: 'action',
isForm: false,
isTableForm:false,
table: {
width: 150,
fixed: 'right'
}
}
// {
// label: '开始时间',
// field: 'beginTime',
// sort: 'custom',
// isForm: false,
// formatter: dateFormatter,
// tableForm:{
// disabled:true,
// formatter: dateFormatter,
// }
// },
]))
// {
// label: '开始时间',
// field: 'beginTime',
// sort: 'custom',
// isForm: false,
// formatter: dateFormatter,
// tableForm:{
// disabled:true,
// formatter: dateFormatter,
// }
// },
])
)

Loading…
Cancel
Save