Browse Source

HL-6059物料隔离申请选择时没有供应商代码或者名称

hella_online_20240927
yufei_wang 2 months ago
parent
commit
600f8b5fe8
  1. 10
      src/components/TableForm/src/TableForm.vue
  2. 16
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
  3. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

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

@ -118,7 +118,7 @@
/>
<el-button
:key="headerItem.field + $index + 'button'"
v-if="headerItem?.tableForm?.isInpuFocusShow"
v-if="headerItem?.tableForm?.isInpuFocusShow || showInputSearch(headerItem, row)"
@click="inpuFocus(headerItem, row, index)"
><Icon icon="ep:search" size="14"
/></el-button>
@ -672,7 +672,7 @@ const handleAddTable = () => {
}
//
const inpuFocus = (headerItem, row, index) => {
if (headerItem?.tableForm?.isInpuFocusShow) {
if (headerItem?.tableForm?.isInpuFocusShow||showInputSearch(headerItem, row)) {
emit('inpuFocus', headerItem, row, index)
}
}
@ -721,6 +721,12 @@ const batchAdd = () => {
}
emit('batchAdd', keyWord.value)
}
const showInputSearch = (headerItem, row) => {
//
return Boolean(row['isInpuFocusShow_' + headerItem.field])
}
const disabledInput = (headerItem, row) => {
if (headerItem.tableForm?.isInpuFocusShow) {
if (headerItem.tableForm?.enterSearch) {

16
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue

@ -60,6 +60,7 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@clearInput="clearInput"
/>
<!-- 详情 -->
@ -361,6 +362,11 @@ const getDefaultToLocationCode = async ()=>{
formRef.value.formRef.formModel["toLocationCode"] = res.list[0]['code']
}
}
const clearInput = (field, row, index) => {
if(field=='supplierCode'){
row['supplierName'] = ''
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
@ -379,9 +385,19 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['uom'] = item['uom']
newRow['qty'] = item['qty']
newRow['toInventoryStatus'] = "HOLD" //
newRow['supplierCode'] = item['supplierCode']
newRow['supplierName'] = item['supplierName']
if(!newRow['supplierCode']){
newRow.disabled_supplierCode = false
newRow.isInpuFocusShow_supplierCode = true
}else{
newRow.disabled_supplierCode = true
newRow.isInpuFocusShow_supplierCode = false
}
tableData.value.push(newRow)
})
} else if(formField == 'supplierCode'){
row[formField] = val[0][searchField]
row['supplierName'] = val[0]['name']
} else{
row[formField] = val[0][searchField]

2
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

@ -1138,7 +1138,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150,
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
// isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商',
searchField: 'code',
searchTitle: '供应商信息',

Loading…
Cancel
Save