Browse Source

BUG修改

master
parent
commit
5d91c2951c
  1. 3
      src/utils/disposition/defaultButtons.ts
  2. 12
      src/views/eam/basic/item/index.vue
  3. 12
      src/views/eam/basic/item/item.data.ts
  4. 16
      src/views/eam/basic/location/location.data.ts
  5. 39
      src/views/eam/item/countRecord/countRecord.data.ts
  6. 133
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  7. 18
      src/views/eam/item/itemInLocation/itemInLocation.data.ts
  8. 14
      src/views/eam/item/itemOutLocation/itemOutLocation.data.ts

3
src/utils/disposition/defaultButtons.ts

@ -1094,7 +1094,7 @@ export function ItemInBtn(option:any) {
// 操作列表-到货转账内
export function newTurnIn(option:any) {
return __defaultBtnOption(option,{
label: '到货转账内',
label: '到货转账内',
name: 'newTurnIn',
hide: false,
type: 'primary',
@ -1104,7 +1104,6 @@ export function newTurnIn(option:any) {
})
}
// 默认按钮规则
function __defaultBtnOption(option:any,specific:any){
return {

12
src/views/eam/basic/item/index.vue

@ -184,16 +184,16 @@
// form
const formsSuccess = async (formType, data) => {
var isHave = Item.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
return item.field === 'maxInventory' || item.field === 'minInventory';
});
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
if (data.minInventory && data.maxInventory && data.minInventory >= data.maxInventory) {
message.error('最高库存要大于最低库存')
return false;
}
}
if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null;
if (data.maxInventory == 0) data.maxInventory = null;
if (data.minInventory == 0) data.minInventory = null;
if (formType === 'create') {
await ItemApi.createItem(data)
message.success(t('common.createSuccess'))

12
src/views/eam/basic/item/item.data.ts

@ -67,13 +67,15 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '单位',
field: 'uom',
label: 'ABC分类',
field: 'classification',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
table: {
width: 110
},
width: 100
} ,
},
{
label: '供应商名称',

16
src/views/eam/basic/location/location.data.ts

@ -61,21 +61,21 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '创建时间',
field: 'createTime',
label: '描述',
field: 'description',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
width: 150
},
},
{
label: '描述',
field: 'description',
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 150
width: 170
},
},
{

39
src/views/eam/item/countRecord/countRecord.data.ts

@ -59,22 +59,29 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select'
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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')]
}
},
isForm: false,
},
{
label: '创建时间',
field: 'createTime',
isTable:false,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '操作',
field: 'action',

133
src/views/eam/item/itemAccounts/itemAccounts.data.ts

@ -18,10 +18,6 @@ export const ItemAccountsRules = reactive({
areaNumber: [required],
type: [required],
locationNumber: [required],
// qty: [
// required,
// { validator: validateNumber, message: '数量不能等于0', trigger: 'blur' },
// ],
})
export const ItemAccounts = useCrudSchemas(
@ -57,9 +53,9 @@ export const ItemAccounts = useCrudSchemas(
table: {
width: 130
},
form:{
componentProps:{
disabled:true
form: {
componentProps: {
disabled: true
}
},
isSearch: false
@ -93,7 +89,7 @@ export const ItemAccounts = useCrudSchemas(
field: 'areaName',
sort: 'custom',
isSearch: false,
isForm:false,table: {
isForm: false, table: {
width: 130
},
},
@ -131,7 +127,7 @@ export const ItemAccounts = useCrudSchemas(
field: 'locationName',
sort: 'custom',
isSearch: false,
isForm:false,table: {
isForm: false, table: {
width: 130
},
},
@ -143,7 +139,7 @@ export const ItemAccounts = useCrudSchemas(
width: '110',
},
isDetail: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
formatter: (_ : Recordable, __ : TableColumn, cellValue : number) => {
return typeLists.find((account) => account.value == cellValue)?.label
},
// dictType: DICT_TYPE.APP_DEVICE_MOLD_TYPE,
@ -172,7 +168,7 @@ export const ItemAccounts = useCrudSchemas(
placeholder: "请选择类型"
}
},
},
},
{
label: '库存数量',
field: 'qty',
@ -180,61 +176,66 @@ export const ItemAccounts = useCrudSchemas(
table: {
width: 110
},
form:{
form: {
component: 'InputNumber',
componentProps:{
componentProps: {
min: 0,//最小值`
precision: 2//精度`
}
}
},
{
label: '单位',
field: 'uom',
sort: 'custom',
isSearch: false,
table: {
width: 110
},
},
{
label: '规格型号',
field: 'specifications',
sort: 'custom',
isSearch: false,
table: {
width: 110
},
},
{
label: 'ABC分类',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.CLASSIFICATION,
dictClass: 'string',
isTable: true,
table: {
width: 100
} ,
},
{
label: '使用地点',
field: 'usePlace',
sort: 'custom',
isSearch: false,
table: {
width: 110
},
},
{
label: '项目',
field: 'project',
sort: 'custom',
isSearch: false,
table: {
width: 110
},
},
{
label: '单位',
field: 'uom',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 110
},
},
{
label: '规格型号',
field: 'specifications',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 110
},
},
{
label: 'ABC分类',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.CLASSIFICATION,
dictClass: 'string',
isTable: true,
isForm: false,
table: {
width: 100
},
},
{
label: '使用地点',
field: 'usePlace',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 110
},
},
{
label: '项目',
field: 'project',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 110
},
},
{
label: '创建时间',
field: 'createTime',
@ -254,18 +255,6 @@ export const ItemAccounts = useCrudSchemas(
width: 180
},
},
// {
// label: '是否账内库',
// field: 'isInAccount',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 130
// },
{
label: '操作',
field: 'action',

18
src/views/eam/item/itemInLocation/itemInLocation.data.ts

@ -8,10 +8,7 @@ export const ItemInLocationRules = reactive({
number: [required],
itemNumber: [required],
locationNumber: [required],
qty: [
required,
{ validator: validateNumber, message: '数量不能等于0', trigger: 'blur' },
],
qty: [required,],
returner: [
{ max: 50, message: '不得超过20个字符', trigger: 'blur' },
],
@ -97,16 +94,17 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
label: '归还数量',
field: 'qty',
sort: 'custom',
isSearch: false,
table: {
width: 110
width: 110,
},
form:{
form: {
component: 'InputNumber',
componentProps:{
min: 0,//最小值`
precision: 2//精度`
componentProps: {
min: 0,
precision: 2
}
}
},
},
{
label: '创建时间',

14
src/views/eam/item/itemOutLocation/itemOutLocation.data.ts

@ -9,10 +9,7 @@ import { validateNumber } from '@/utils/validator'
export const ItemOutLocationRules = reactive({
// number: [required],
itemNumber: [required],
qty: [
required,
{ validator: validateNumber, message: '数量不能等于0', trigger: 'blur' },
],
qty: [required],
locationNumber: [required]
})
@ -135,16 +132,17 @@ export const ItemOutLocation = useCrudSchemas(
label: '出库数量',
field: 'qty',
sort: 'custom',
isSearch: false,
table: {
width: 110
width: 110,
},
form: {
component: 'InputNumber',
componentProps: {
min: 0, //最小值`
precision: 2 //精度`
min: 0,
precision: 2
}
}
},
},
{
label: '创建时间',

Loading…
Cancel
Save