diff --git a/web/src/views/Contract.vue b/web/src/views/Contract.vue
index 53d2956..fec193b 100644
--- a/web/src/views/Contract.vue
+++ b/web/src/views/Contract.vue
@@ -32,8 +32,8 @@
{{ text }}
- 已签约
- 未签约
+
+
@@ -178,6 +178,7 @@ import { createContract, updateContract, queryContractList, queryContractInfo, d
import { queryProductList } from "../api/product";
import { queryCustomerOption } from "../api/customer";
import { message, Modal } from 'ant-design-vue';
+import Spot from '../components/Spot.vue';
// 合同表格字段
const columns = [{
diff --git a/web/src/views/Customer.vue b/web/src/views/Customer.vue
index 423d810..49a7bf9 100644
--- a/web/src/views/Customer.vue
+++ b/web/src/views/Customer.vue
@@ -33,8 +33,8 @@
- 已成交
- 未成交
+
+
{{ record.region + " " + record.address }}
@@ -166,6 +166,7 @@ import { SearchOutlined, ExclamationCircleOutlined, ExportOutlined, MailTwoTone
import moment from 'moment'
import { createCustomer, updateCustomer, sendMailToCustomer, queryCustomerList, queryCustomerInfo, deleteCustomer, customerExport } from '../api/customer';
import { message, Modal } from 'ant-design-vue';
+import Spot from '../components/Spot.vue';
import regionData from '../assets/region';
// 表格字段
@@ -344,20 +345,25 @@ const onSave = () => {
createCustomer(customer).then((res) => {
if (res.data.code == 0) {
message.success('保存成功')
+ customerFormRef.value.resetFields()
+ visible.value = false;
getCustomerList()
}
+ if (res.data.code == 20001) {
+ message.error('客户名称已经存在')
+ }
})
}
if (operation.value == 2) {
updateCustomer(customer).then((res) => {
if (res.data.code == 0) {
message.success('保存成功')
+ customerFormRef.value.resetFields()
+ visible.value = false;
getCustomerList()
}
})
}
- customerFormRef.value.resetFields()
- visible.value = false;
});
};
diff --git a/web/src/views/Product.vue b/web/src/views/Product.vue
index 8f1e443..e49d59e 100644
--- a/web/src/views/Product.vue
+++ b/web/src/views/Product.vue
@@ -28,8 +28,8 @@
{{ text }}
- 上架
- 下架
+
+
默认
@@ -88,8 +88,12 @@
- 上架
- 下架
+
+
+
+
+
+
@@ -112,6 +116,7 @@ import { ref, reactive, onMounted, createVNode } from 'vue';
import { SearchOutlined, ExclamationCircleOutlined, ExportOutlined } from '@ant-design/icons-vue';
import moment from 'moment'
import { createProduct, updateProduct, queryProductList, deleteProduct, queryProductInfo, productExport } from '../api/product';
+import Spot from '../components/Spot.vue';
import { message, Modal } from 'ant-design-vue';
// 表格字段
@@ -260,20 +265,25 @@ const onSave = () => {
createProduct(product).then((res) => {
if (res.data.code == 0) {
message.success('保存成功')
+ productFormRef.value.resetFields()
+ visible.value = false;
getProductList()
}
+ if (res.data.code == 40001) {
+ message.error('产品名称已经存在')
+ }
})
}
if (operation.value == 2) {
updateProduct(product).then((res) => {
if (res.data.code == 0) {
+ productFormRef.value.resetFields()
+ visible.value = false;
message.success('保存成功')
getProductList()
}
})
}
- productFormRef.value.resetFields()
- visible.value = false;
});
};