|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const TABLE_KEY = 'table-locDetl'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const props = defineProps({ | 
|---|
|  |  |  | ioModel: null | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let tableData = ref([]); | 
|---|
|  |  |  | let deleteDetlId = ref([]); | 
|---|
|  |  |  | let orderId = ref(null); | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_loc_detl.matnr', '商品编号'), | 
|---|
|  |  |  | dataIndex: 'matnr', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | width: 200, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | const matChecked = ref([]); | 
|---|
|  |  |  | const matQueryList = ref(null); | 
|---|
|  |  |  | const matFetching = ref(false); | 
|---|
|  |  |  | const searchText = ref('') | 
|---|
|  |  |  | const matSelectList = ref([]); | 
|---|
|  |  |  | const addDetl = () => { | 
|---|
|  |  |  | openAddDetl.value = true; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleSearch = debounce(val => { | 
|---|
|  |  |  | searchText.value = val | 
|---|
|  |  |  | matQuery(val); | 
|---|
|  |  |  | }, 600) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | matQuery(null); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function matQuery(condition) { | 
|---|
|  |  |  | matFetching.value = true; | 
|---|
|  |  |  | post('/api/mat/page', { | 
|---|
|  |  |  | let url = '/api/mat/page' | 
|---|
|  |  |  | if (props.ioModel == 2) { | 
|---|
|  |  |  | url = '/api/locs/mats/page' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | post(url, { | 
|---|
|  |  |  | current: 1, | 
|---|
|  |  |  | pageSize: 10, | 
|---|
|  |  |  | condition: condition | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <a-modal v-model:open="openAddDetl" :title="formatMessage('component.orderDetl.edit.addDetl', '添加明细')" | 
|---|
|  |  |  | @ok="handleAddDetlOk" @cancel="handleAddDetlCancel"> | 
|---|
|  |  |  | <a-select v-model:value="matChecked" :options="matQueryList" mode="multiple" | 
|---|
|  |  |  | <a-select v-model:value="matChecked" :options="matQueryList" mode="multiple" :searchValue="searchText" | 
|---|
|  |  |  | :placeholder="formatMessage('component.orderDetl.edit.selectMat', '请选择物料')" @search="handleSearch" | 
|---|
|  |  |  | :filter-option="false" :not-found-content="matFetching ? undefined : null" @select="handleSelect" | 
|---|
|  |  |  | @deselect="handleDeselect"></a-select> | 
|---|
|  |  |  | :filter-option="false" :not-found-content="matFetching ? undefined : null"  @select="handleSelect" allowClear | 
|---|
|  |  |  | @deselect="handleDeselect" ></a-select> | 
|---|
|  |  |  | </a-modal> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|