diff --git a/src/views/supermarketerp/components/select-dialog.vue b/src/views/supermarketerp/components/select-dialog.vue
index 198a31c..ae2ea7d 100644
--- a/src/views/supermarketerp/components/select-dialog.vue
+++ b/src/views/supermarketerp/components/select-dialog.vue
@@ -1,7 +1,7 @@
-
+
@@ -12,7 +12,7 @@
- 查询
+ 查询
重置
@@ -49,6 +49,11 @@
无包装单位
+
+
+
+
+
@@ -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({
productCode: "",
barcode: "",
productName: "",
+ current: 1,
+ size: 10,
})
const total = ref(0)
const dataList = ref([]) // 对话框多选表格数据
@@ -97,11 +104,14 @@ const dataList = ref([]) // 对话框多选表格数据
// 打开弹窗
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)
}
// 商品选择对话框确认
diff --git a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue
index 7fc58a5..cb5563c 100644
--- a/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue
+++ b/src/views/supermarketerp/purchaseManagement/smErpCgInventory/form.vue
@@ -114,6 +114,11 @@
{{ row.erpSpuId && erpSpuSimpleAll.find((item: any) => item.id === row.erpSpuId)?.productName }}
+
+
+ {{ supermarket_nature.find((item: any) => item.value == row.productNature)?.label || "" }}
+
+
-
+
+
@@ -223,8 +235,10 @@ import { formatDate } from "/@/utils/formatTime"
import { displayPrice, storePrice } from "/@/utils/formatMoney"
import { tablePrint } from "../../supermarketUtils"
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
+import { useDict } from "/@/hooks/dict"
const SelectDialog = defineAsyncComponent(() => import("/@/views/supermarketerp/components/select-dialog.vue"))
+const { supermarket_nature } = useDict("supermarket_nature")
const props = withDefaults(
defineProps<{
@@ -383,7 +397,7 @@ const removeRow = () => {
const selectRecords = $table.getCheckboxRecords()
if (selectRecords.length > 0) {
vxeTableData.value = vxeTableData.value.filter((item: any) => !selectRecords.some((row) => row.erpSpuId === item.erpSpuId))
- updateFootEvent()
+ updateFootCount(vxeTableData.value)
}
}
}
@@ -422,6 +436,7 @@ const settledTableItems = computed(() => {
id: item.isNew ? "" : item.id,
erpSpuId: item.erpSpuId,
quantity: item.quantity,
+ productNature: item.productNature,
unitPrice: selectedUnitObj.purchasePrice ? Number(selectedUnitObj?.purchasePrice) : 0,
realPrice: selectedUnitObj.realPrice ? storePrice(selectedUnitObj?.realPrice) : 0,
totalAmount: storePrice(Number(selectedUnitObj?.totalAmount || 0)),
diff --git a/src/views/supermarketerp/smErpSupplier/index.vue b/src/views/supermarketerp/smErpSupplier/index.vue
index d5cc8fb..9ea739f 100644
--- a/src/views/supermarketerp/smErpSupplier/index.vue
+++ b/src/views/supermarketerp/smErpSupplier/index.vue
@@ -125,7 +125,7 @@
ref="excelUploadRef"
:title="$t('supermarket.importSupplierTip')"
url="/supermarket/smErpSupplier/import"
- @refreshDataList="getDataList"
+ @refreshDataList="refreshDataList"
/>
@@ -158,14 +158,19 @@ const state: BasicTableProps = reactive({
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
// 获取货商类别
-onMounted(async () => {
+onMounted(() => {
+ getSupplierType()
+})
+
+// 获取货商类别
+const getSupplierType = async () => {
try {
const res = await getSupplierTypeSimpleAll()
supplierType.value = res.data.filter((item: any) => item.id)
} catch (error) {
supplierType.value = []
}
-})
+}
// 清空搜索条件
const resetQuery = () => {
@@ -181,6 +186,12 @@ const exportExcel = () => {
downBlobFile("/supermarketerp/smErpSupplier/export", Object.assign(state.queryForm, { ids: selectObjs }), "货商管理.xlsx")
}
+// 导入成功刷新数据
+const refreshDataList = () => {
+ getDataList()
+ getSupplierType()
+}
+
// 多选事件
const selectionChangHandle = (objs: { supplierId: string }[]) => {
selectObjs.value = objs.map(({ supplierId }) => supplierId)
diff --git a/src/views/supermarketerp/supermarketSpu/index.vue b/src/views/supermarketerp/supermarketSpu/index.vue
index bf40157..693df9a 100644
--- a/src/views/supermarketerp/supermarketSpu/index.vue
+++ b/src/views/supermarketerp/supermarketSpu/index.vue
@@ -19,8 +19,8 @@
-
-
+
+
查询
@@ -82,7 +82,7 @@
-
+
@@ -90,14 +90,9 @@
{{ supermarketCategory?.find((item: any) => item.id === scope.row.categoryId)?.name }}
-
+
- {{ supermarketSupplier?.find((item: any) => item.supplierId == scope.row.supplierId)?.supplierName }}
-
-
-
-
- {{ supermarketBrand?.find((item: any) => item.id === scope.row.brandId)?.name }}
+
@@ -105,11 +100,16 @@
-
+
-
+ {{ supermarketSupplier?.find((item: any) => item.supplierId == scope.row.supplierId)?.supplierName }}
+
{{ displayPrice(row.costPrice, "") }}
@@ -117,6 +117,11 @@
{{ displayPrice(row.retailPrice, "") }}
+
+
+
+
+
@@ -124,18 +129,13 @@
-
-
-
-
-
-
-
+
+
+
([]) // 商品分类
-const supermarketBrand = ref([]) // 商品品牌
+// const supermarketBrand = ref([]) // 商品品牌
const supermarketSupplier = ref([]) // 货商
const state: BasicTableProps = reactive({
@@ -243,12 +243,12 @@ onMounted(async () => {
supermarketCategory.value = []
}
// 获取商品品牌
- try {
- const res = await getSupermarketBrand()
- supermarketBrand.value = res.data
- } catch (error) {
- supermarketBrand.value = []
- }
+ // try {
+ // const res = await getSupermarketBrand()
+ // supermarketBrand.value = res.data
+ // } catch (error) {
+ // supermarketBrand.value = []
+ // }
// 获取货商
try {
const res = await getSupplierSimpleAll()