Browse Source

增加原因字段

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
47e91ab5d5
  1. 15
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  2. 15
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  3. 14
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  4. 13
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

15
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -668,11 +669,21 @@ export const ScrapJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.SCRAP_REASON, dictType: DICT_TYPE.SCRAP_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '货主代码', label: '货主代码',

15
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -409,11 +410,21 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.SCRAP_REASON, dictType: DICT_TYPE.SCRAP_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '单价', label: '单价',

14
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -70,6 +71,7 @@
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@onBlur="onBlur"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -444,6 +446,18 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const onBlur = (field, e) => {
if (field == 'reason') {
detailRef.value.formRef.formRef.formModel[field] = e.target.value
}
}
const tableFormSelectOnBlur = (field, val, row, index) => {
if (field == 'reason') {
tableData.value[index][field] = val.target.value
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

13
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -584,13 +584,20 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.SCRAP_REASON, dictType: DICT_TYPE.SCRAP_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: { tableForm: {
type: 'Select' type: 'Select',
filterable: true
} }
}, },
{ {

Loading…
Cancel
Save