Browse Source

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

master
叶佳兴 2 weeks ago
parent
commit
2ce515ffd0
  1. 8
      src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
  2. 55
      src/views/eam/item/countadjustPlan/countadjustPlan.data.ts
  3. 9
      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,
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
},
@ -30,7 +29,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
formatter: dateFormatter,
isTable: true,
table: {
width: 180,
},
isForm: false,
detail: {
@ -45,7 +43,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: false,
table: {
width: 150,
},
},
{
@ -55,7 +52,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
formatter: dateFormatter,
isTable: true,
table: {
width: 180,
},
isForm: false,
detail: {
@ -69,7 +65,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: false,
table: {
width: 150,
},
},
{
@ -79,7 +74,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: false,
table: {
width: 150,
},
},
{
@ -87,7 +81,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'name',
sort: 'custom',
table: {
width: 150,
},
},
{
@ -99,7 +92,6 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',

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

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

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

@ -79,9 +79,12 @@ const tableColumns = ref(CountadjustPlan.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
const setV = {}
setV[formField] = val[0][searchField]
if(formField=='areaNumber'){
setV['areaNumber'] = val.map(item=>item[searchField]).join(',')
}
formRef.setValues(setV)
})
}

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

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

Loading…
Cancel
Save