库存商品字段调整;入库格局商品性质填写数量;入库时商品搜索后页码重置为1
This commit is contained in:
1 parent
bf54733b34
commit
0d824b0b24
4 files changed
+74
-39
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="选择商品" width="80%" :close-on-click-modal="false" draggable @close="dialogVisible = false">
|
||||
<el-row>
|
||||
<el-form :model="queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<el-form :model="queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList(true)">
|
||||
<el-form-item label="商品名称" prop="productName">
|
||||
<el-input placeholder="请输入商品名称" v-model="queryForm.productName" />
|
||||
</el-form-item>
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-input placeholder="请输入条码" v-model="queryForm.barcode" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="search" type="primary" @click="getDataList(true)">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -49,6 +49,11 @@
|
||||
<div v-else class="text-gray-400">无包装单位</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productNature" label="商品性质" show-overflow-tooltip align="center" width="150">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="supermarket_nature" :value="scope.row.productNature" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态" min-width="100px" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="status" :value="scope.row.status" />
|
||||
@@ -79,7 +84,7 @@ import { displayPrice } from "/@/utils/formatMoney"
|
||||
|
||||
const emit = defineEmits(["getSelectedRows"])
|
||||
|
||||
const { status } = useDict("status")
|
||||
const { supermarket_nature, status } = useDict("supermarket_nature", "status")
|
||||
const queryRef = ref()
|
||||
const tableRef = ref() // 对话框多选表格ref
|
||||
const loading = ref(false) // 对话框多选表格loading
|
||||
@@ -88,6 +93,8 @@ const queryForm = reactive<any>({
|
||||
productCode: "",
|
||||
barcode: "",
|
||||
productName: "",
|
||||
current: 1,
|
||||
size: 10,
|
||||
})
|
||||
const total = ref<number>(0)
|
||||
const dataList = ref<any[]>([]) // 对话框多选表格数据
|
||||
@@ -97,11 +104,14 @@ const dataList = ref<any[]>([]) // 对话框多选表格数据
|
||||
// 打开弹窗
|
||||
const openDialog = async () => {
|
||||
dialogVisible.value = true
|
||||
getDataList()
|
||||
getDataList(false)
|
||||
}
|
||||
|
||||
// 获取商品数据并且勾选
|
||||
const getDataList = async () => {
|
||||
const getDataList = async (isSearch = false) => {
|
||||
if (isSearch) {
|
||||
queryForm.current = 1
|
||||
}
|
||||
loading.value = true
|
||||
try {
|
||||
const { code, data } = await getErpSpuPage(queryForm)
|
||||
@@ -133,7 +143,7 @@ const currentChangeHandle = (val: number) => {
|
||||
|
||||
const resetQuery = () => {
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
getDataList(true)
|
||||
}
|
||||
|
||||
// 商品选择对话框确认
|
||||
|
||||
Reference in new issue
Block a user