陈薪名 1 year ago
parent
commit
47968c8252
  1. 10
      src/components/BasicForm/src/BasicForm.vue
  2. 3
      src/views/wms/basicDataManage/itemManage/itembasic/index.vue
  3. 6
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  4. 24
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  5. 92
      src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts
  6. 94
      src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts
  7. 36
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

10
src/components/BasicForm/src/BasicForm.vue

@ -244,6 +244,16 @@ const submitForm = async () => {
// data.masterId = props.masterParmas.masterId
// data.number = props.masterParmas.number
// }
console.log(props.formAllSchemas.formSchema)
var isHave = props.formAllSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if (formType.value === 'create') {
await props.apiCreate(data)
message.success(t('common.createSuccess'))

3
src/views/wms/basicDataManage/itemManage/itembasic/index.vue

@ -62,11 +62,10 @@ import { Itembasic, rules } from './itembasic.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { ItemBasicTabsList } from '@/utils/disposition/tabsList'
defineOptions({ name: 'Itembasic' })
const { tableObject, tableMethods } = useTable({
getListApi: ItembasicApi.getItembasicPage //
})
console.log(tableObject)
const importFormRef = ref()
//
const HeadButttondata = [

6
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -419,7 +419,8 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验
export const rules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 30, message: '不得超过30个字符', trigger: 'blur' },
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
@ -487,4 +488,5 @@ export const rules = reactive({
expireTime: [
{ required: true, message: '请输入失效时间', trigger: 'change' }
],
})
})
console.log(Itembasic)

24
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -243,6 +243,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -264,6 +265,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -284,6 +286,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -322,6 +325,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -414,6 +418,9 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '盘点范围值',
@ -477,6 +484,7 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -499,6 +507,7 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -526,6 +535,15 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -538,6 +556,9 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '是否可用',
@ -557,6 +578,9 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '操作',

92
src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts

@ -1,8 +1,12 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import { CountPlanMain } from '../countPlanMain/countPlanMain.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
@ -28,6 +32,7 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
},
{
label: '计划单号',
@ -36,6 +41,17 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '盘点计划', // 查询弹窗标题
searchAllSchemas: CountPlanMain.allSchemas, // 查询弹窗所需类
searchPage: CountPlanMainApi.getCountPlanMainPage // 查询弹窗所需分页方法
}
}
},
{
label: '阶段',
@ -81,7 +97,8 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
componentProps: {
disabled: true
}
}
},
isForm: false,
},
{
label: '备注',
@ -106,6 +123,7 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -136,11 +154,13 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
{
label: '截止时间',
@ -156,6 +176,7 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -208,6 +229,7 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -318,9 +340,9 @@ export const CountRequestMain = useCrudSchemas(<CrudSchema[]>([
//表单校验
export const CountRequestMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
// requestNumber: [
// { required: true, message: '请选择申请单号', trigger: 'change' }
// ],
stage: [
{ required: true, message: '请选择阶段', trigger: 'change' }
],
@ -345,9 +367,9 @@ export const CountRequestMainRules = reactive({
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
})
@ -364,32 +386,16 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从器具号',
field: 'fromContainerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到包装号',
field: 'toPackingNumber',
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '器具号',
field: 'toContainerNumber',
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
@ -421,6 +427,9 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '盘点明细号',
@ -437,6 +446,8 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述1',
@ -445,6 +456,8 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述2',
@ -453,6 +466,8 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '数量',
@ -463,6 +478,16 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -472,6 +497,8 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '计量单位',
@ -483,6 +510,9 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '最后更新时间',
@ -498,6 +528,7 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -560,6 +591,7 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -596,8 +628,8 @@ export const CountRequestDetailRules = reactive({
countDetailNumber: [
{ required: true, message: '请输入盘点明细号', trigger: 'blur' }
],
fromPackingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }

94
src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts

@ -1,8 +1,12 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as CountRecordMainApi from '@/api/wms/countRecordMain'
import { CountRecordMain } from '../../count/countRecordMain/countRecordMain.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
@ -29,6 +33,7 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
width: 150
},
isSearch: true,
isForm: false,
},
{
label: '盘点记录单号',
@ -37,6 +42,17 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择盘点记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '盘点记录', // 查询弹窗标题
searchAllSchemas: CountRecordMain.allSchemas, // 查询弹窗所需类
searchPage: CountRecordMainApi.getCountRecordMainPage // 查询弹窗所需分页方法
}
}
},
{
label: '仓库代码',
@ -68,6 +84,7 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
disabled: true
}
},
isForm: false,
},
{
label: '备注',
@ -92,6 +109,7 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -122,11 +140,13 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
{
label: '截止时间',
@ -142,6 +162,7 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -194,6 +215,7 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -304,9 +326,9 @@ export const CountadjustRequestMain = useCrudSchemas(<CrudSchema[]>([
//表单校验
export const CountadjustRequestMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
// requestNumber: [
// { required: true, message: '请选择申请单号', trigger: 'change' }
// ],
warehouseCode: [
{ required: true, message: '请选择仓库代码', trigger: 'change' }
],
@ -325,9 +347,9 @@ export const CountadjustRequestMainRules = reactive({
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
})
/**
@ -392,6 +414,9 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '库存数量',
@ -402,6 +427,15 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -413,6 +447,15 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -424,6 +467,15 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -433,6 +485,8 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述1',
@ -441,6 +495,8 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述2',
@ -449,6 +505,8 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '数量',
@ -459,6 +517,15 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -468,6 +535,8 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '计量单位',
@ -479,6 +548,9 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '最后更新时间',
@ -494,6 +566,7 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -556,6 +629,7 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -613,9 +687,9 @@ export const CountadjustRequestDetailRules = reactive({
adjustQty: [
{ required: true, message: '请输入调整数量', trigger: 'blur' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
// number: [
// { required: true, message: '请输入单据号', trigger: 'blur' }
// ],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],

36
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -44,7 +44,6 @@
@success="getList"
:rules="CountadjustRequestMainRules"
:formAllSchemas="CountadjustRequestMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="CountadjustRequestDetail.allSchemas"
:tableFormRules="CountadjustRequestDetailRules"
:tableData="tableData"
@ -64,12 +63,12 @@
:allSchemas="CountadjustRequestMain.allSchemas"
:detailAllSchemas="CountadjustRequestDetail.allSchemas"
:detailAllSchemasRules="CountadjustRequestDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="CountadjustRequestDetailApi.createCountadjustRequestDetail"
:apiUpdate="CountadjustRequestDetailApi.updateCountadjustRequestDetail"
:apiPage="CountadjustRequestDetailApi.getCountadjustRequestDetailPage"
:apiDelete="CountadjustRequestDetailApi.deleteCountadjustRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
@ -99,41 +98,28 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []

Loading…
Cancel
Save