pjb
2025-07-08 fcbb4059f11d1e2b320d581bf6f960d9965142c6
zy-asrs-admin/src/components/orderDetl/edit.vue
@@ -13,6 +13,10 @@
const TABLE_KEY = 'table-locDetl';
const props = defineProps({
    ioModel: null
})
let tableData = ref([]);
let deleteDetlId = ref([]);
let orderId = ref(null);
@@ -156,6 +160,7 @@
const matChecked = ref([]);
const matQueryList = ref(null);
const matFetching = ref(false);
const searchText = ref('')
const matSelectList = ref([]);
const addDetl = () => {
    openAddDetl.value = true;
@@ -193,6 +198,7 @@
}
const handleSearch = debounce(val => {
    searchText.value = val
    matQuery(val);
}, 600)
@@ -221,9 +227,14 @@
}
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
@@ -334,10 +345,10 @@
        <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>