From a19133219811f9286fa71a0fb8c1deb628cf74a3 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 28 十一月 2024 16:51:08 +0800
Subject: [PATCH] #
---
zy-asrs-admin/src/components/orderDetl/edit.vue | 41 ++++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/zy-asrs-admin/src/components/orderDetl/edit.vue b/zy-asrs-admin/src/components/orderDetl/edit.vue
index 3e458f4..ec756a4 100644
--- a/zy-asrs-admin/src/components/orderDetl/edit.vue
+++ b/zy-asrs-admin/src/components/orderDetl/edit.vue
@@ -6,6 +6,7 @@
import { logout } from '@/config.js';
import { formatMessage } from '@/utils/localeUtils.js';
import useTableSearch from '@/utils/tableUtils.jsx';
+import { debounce } from 'lodash-es';
const context = getCurrentInstance()?.appContext.config.globalProperties;
const router = useRouter();
@@ -35,13 +36,13 @@
ellipsis: true,
},
{
- title: formatMessage('db.man_loc_detl.matnr', '鐗╂枡鍙�'),
+ title: formatMessage('db.man_loc_detl.matnr', '鍟嗗搧缂栧彿'),
dataIndex: 'matnr',
width: 140,
ellipsis: true,
},
{
- title: formatMessage('db.man_loc_detl.maktx', '鐗╂枡鍚�'),
+ title: formatMessage('db.man_loc_detl.maktx', '鍟嗗搧鍚嶇О'),
dataIndex: 'maktx',
width: 140,
ellipsis: true,
@@ -56,6 +57,20 @@
{
title: formatMessage('db.man_loc_detl.anfme', '鏁伴噺'),
dataIndex: 'anfme',
+ width: 140,
+ ellipsis: true,
+ editable: true,
+ },
+ {
+ title: formatMessage('db.man_loc_detl.qty', '宸插畬鎴愭暟閲�'),
+ dataIndex: 'qty',
+ width: 140,
+ ellipsis: true,
+ editable: true,
+ },
+ {
+ title: formatMessage('db.man_loc_detl.workQty', '浣滀笟涓暟閲�'),
+ dataIndex: 'workQty',
width: 140,
ellipsis: true,
editable: true,
@@ -113,6 +128,7 @@
const openAddDetl = ref(false);
const matChecked = ref([]);
const matQueryList = ref(null);
+const matFetching = ref(false);
const matSelectList = ref([]);
const addDetl = () => {
openAddDetl.value = true;
@@ -128,6 +144,8 @@
maktx: item.data.maktx,
batch: '',
anfme: 0,
+ qty: 0,
+ workQty: 0,
memo: ''
};
fieldList.forEach((field) => {
@@ -147,9 +165,9 @@
matChecked.value = [];
}
-const handleSearch = val => {
+const handleSearch = debounce(val => {
matQuery(val);
-}
+}, 600)
const handleSelect = (value, option) => {
let flag = true;
@@ -177,9 +195,10 @@
matQuery(null);
function matQuery(condition) {
+ matFetching.value = true;
post('/api/mat/page', {
current: 1,
- pageSize: 100,
+ pageSize: 10,
condition: condition
}).then((resp) => {
let result = resp.data;
@@ -187,11 +206,12 @@
result.data.records.forEach((item) => {
tmp.push({
value: item.matnr,
- label: item.matnr,
+ label: item.matnr + '_' + item.maktx,
data: item
})
})
matQueryList.value = tmp;
+ matFetching.value = false;
})
}
@@ -217,7 +237,7 @@
}
watch(orderId, (newVal, oldVal) => {
- if(newVal == undefined || newVal == null) {
+ if (newVal == undefined || newVal == null) {
tableData.value = [];
return;
}
@@ -234,6 +254,8 @@
maktx: item.mat$.maktx,
batch: item.batch,
anfme: item.anfme,
+ qty: item.qty,
+ workQty: item.workQty,
memo: item.memo
};
fieldList.forEach((field) => {
@@ -243,7 +265,7 @@
})
tableData.value = tmp;
})
-
+
})
defineExpose({
@@ -287,7 +309,8 @@
@ok="handleAddDetlOk" @cancel="handleAddDetlCancel">
<a-select v-model:value="matChecked" :options="matQueryList" mode="multiple"
:placeholder="formatMessage('component.orderDetl.edit.selectMat', '璇烽�夋嫨鐗╂枡')" @search="handleSearch"
- @select="handleSelect" @deselect="handleDeselect"></a-select>
+ :filter-option="false" :not-found-content="matFetching ? undefined : null" @select="handleSelect"
+ @deselect="handleDeselect"></a-select>
</a-modal>
</div>
</template>
--
Gitblit v1.9.1