Browse Source

调拨出库 原因下拉 可选可填

master_hella_20240701
陈薪名 9 months ago
parent
commit
5ac9ccc353
  1. 6
      src/components/BasicForm/src/BasicForm.vue
  2. 10
      src/components/TableForm/src/TableForm.vue
  3. 8
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  4. 29
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts

6
src/components/BasicForm/src/BasicForm.vue

@ -86,6 +86,7 @@
@buttonOperationClick="buttonOperationClick"
@inputStringBlur="inputStringBlur"
@inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
/>
</div>
<div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
@ -463,6 +464,7 @@ const resetForm = () => {
const emit = defineEmits([
'success',
'tableSelectionChange',
'tableFormSelectOnBlur',
'extendedButtonsClick',
'formSelectChange',
'formSelectvVisibleChange',
@ -495,6 +497,10 @@ const formSelectvVisibleChange = (field, val, row) => {
const tableSelectionChange = (val) => {
emit('tableSelectionChange', val)
}
// tableform select bulr
const tableFormSelectOnBlur = (field, val, row, index) => {
emit('tableFormSelectOnBlur', field, val, row, index)
}
//
const tableSortChange = (column, prop, order) => {
emit('tableSortChange', column, prop, order)

10
src/components/TableForm/src/TableForm.vue

@ -114,7 +114,8 @@
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(headerItem.field, $event,row)">
@change="formSelectChange(headerItem.field, $event,row)"
@blur="tableFormSelectOnBlur(headerItem.field, $event,row, $index)">
<el-option
v-for="op in initSelectOptions(headerItem)"
:label="op.label"
@ -346,7 +347,8 @@ const emit = defineEmits([
'handleAddTable',
'inpuFocus',
'buttonOperationClick',
'inputStringBlur'
'inputStringBlur',
'tableFormSelectOnBlur'
])
// | type = radio | type = select
const initSelectOptions = (item) => {
@ -356,6 +358,10 @@ const initSelectOptions = (item) => {
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
}
//
const tableFormSelectOnBlur = (field, val,row,index) => {
emit('tableFormSelectOnBlur', field, val,row,index)
}
// -
const inputNumberChange = (field, index, row, e) => {
emit('inputNumberChange', field, index, row, e)

8
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

@ -54,7 +54,7 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@on-blur="onBlur"
@tableFormSelectOnBlur="onBlur"
/>
<!-- 详情 -->
@ -318,10 +318,10 @@ const handleHandle = async (id: number) => {
} catch {}
}
const onBlur = (field, e) => {
const onBlur = (field, val, row, index) => {
// console.log('', field)
// console.log('', e.target.value)
formRef.value.formRef.formModel[field] = e.target.value
// console.log('', val.target.value)
tableData.value[index][field] = val.target.value
}
/** 添加/修改操作 */

29
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts

@ -113,21 +113,6 @@ export const TransferissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '原因',
field: 'reason',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_REASON,
dictClass: 'string',
table: {
width: 150
},
form: {
componentProps: {
filterable: true,
}
}
},
{
label: '申请时间',
field: 'requestTime',
@ -609,6 +594,20 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
disabled: true
}
},
{
label: '原因',
field: 'reason',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_REASON,
dictClass: 'string',
table: {
width: 150
},
tableForm: {
type: 'Select',
filterable: true
}
},
{
label: '包装号',
field: 'packingNumber',

Loading…
Cancel
Save