Browse Source

修改库存事务查询唯一条件

master
叶佳兴 2 weeks ago
parent
commit
2ce515ffd0
  1. 8
      src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
  2. 49
      src/views/eam/item/countadjustPlan/countadjustPlan.data.ts
  3. 3
      src/views/eam/item/countadjustPlan/index.vue
  4. 16
      src/views/eam/item/itemAccounts/itemAccounts.data.ts

8
src/views/eam/item/applicationRecord/applicationRecordMain.data.ts

@ -19,7 +19,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isSearch: true, isSearch: true,
table: { table: {
width: 180,
fixed: 'left' fixed: 'left'
}, },
}, },
@ -30,7 +29,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
formatter: dateFormatter, formatter: dateFormatter,
isTable: true, isTable: true,
table: { table: {
width: 180,
}, },
isForm: false, isForm: false,
detail: { detail: {
@ -45,7 +43,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isSearch: false, isSearch: false,
table: { table: {
width: 150,
}, },
}, },
{ {
@ -55,7 +52,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
formatter: dateFormatter, formatter: dateFormatter,
isTable: true, isTable: true,
table: { table: {
width: 180,
}, },
isForm: false, isForm: false,
detail: { detail: {
@ -69,7 +65,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isSearch: false, isSearch: false,
table: { table: {
width: 150,
}, },
}, },
{ {
@ -79,7 +74,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isSearch: false, isSearch: false,
table: { table: {
width: 150,
}, },
}, },
{ {
@ -87,7 +81,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150,
}, },
}, },
{ {
@ -99,7 +92,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isTable: true, isTable: true,
table: { table: {
width: 150
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',

49
src/views/eam/item/countadjustPlan/countadjustPlan.data.ts

@ -1,4 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { LocationArea, LocationAreaRules } from '../../basic/locationArea/locationArea.data'
import * as LocationAreaApi from '@/api/eam/basic/locationArea'
// 表单校验 // 表单校验
export const CountadjustPlanRules = reactive({ export const CountadjustPlanRules = reactive({
@ -26,7 +28,7 @@ export const CountadjustPlan = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '盘点类型', label: '盘点类型',
field: 'classification', field: 'classificationView',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.CLASSIFICATION, dictType: DICT_TYPE.CLASSIFICATION,
dictClass: 'string', dictClass: 'string',
@ -34,35 +36,60 @@ export const CountadjustPlan = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
isForm: true, isForm: true,
table: { table: {
width: 150 },
form: {
component:'Select',
componentProps: {
multiple: true,
disabled: false
}
}, },
tableForm: { tableForm: {
multiple: true,
type: 'Select', type: 'Select',
disabled: false disabled: false
} }
}, },
{ {
label: '是否账内库', label: '是否账内库',
field: 'isInAccount', field: 'isInAccountView',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
sort: 'custom', isForm: true,
table: { table: {
width: 140 },
form: {
component:'Select',
componentProps: {
multiple: true,
disabled: false
}
}, },
tableForm: { tableForm: {
multiple: true,
type: 'Select', type: 'Select',
inactiveValue: 'FALSE', disabled: false
disabled: true }
},
{
label: '库区编号',
field: 'areaNumber',
sort: 'custom',
table: {
}, },
form: { form: {
component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', multiple: true,
activeValue: 'TRUE' isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区编号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '库区', // 查询弹窗标题
searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类
searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法
searchCondition: []
} }
} }
}, },

3
src/views/eam/item/countadjustPlan/index.vue

@ -81,6 +81,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField=='areaNumber'){
setV['areaNumber'] = val.map(item=>item[searchField]).join(',')
}
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

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

@ -434,16 +434,28 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false, isForm: false,
}, },
{
label: '批次',
field: 'batch',
sort: 'custom',
isTable: true,
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{ {
label: '库龄', label: '库龄',
field: 'areaAge', field: 'areaAge',
sort: 'custom', sort: 'custom',
formatter: (row: Recordable, column: TableColumn, cellValue: any) => { formatter: (row: Recordable, column: TableColumn, cellValue: any) => {
if (!row.purchaseTime) { if (!row.batchDate) {
return '未知'; // 如果 purchaseTime 为 null 或 undefined,返回 '未知' return '未知'; // 如果 purchaseTime 为 null 或 undefined,返回 '未知'
} }
const purchaseTime = new Date(row.purchaseTime); // 获取采购时间 const purchaseTime = new Date(row.batchDate); // 获取采购时间
if (isNaN(purchaseTime.getTime())) { if (isNaN(purchaseTime.getTime())) {
return '未知'; // 如果 purchaseTime 不是有效日期,返回 '未知' return '未知'; // 如果 purchaseTime 不是有效日期,返回 '未知'
} }

Loading…
Cancel
Save