diff --git a/src/components/contract.vue b/src/components/contract.vue
index c4e0cfc..9d1e695 100644
--- a/src/components/contract.vue
+++ b/src/components/contract.vue
@@ -12,23 +12,23 @@ import {
const search = ref('')
const select = ref('1')
const dateRange = ref([])
-const filterType = ref('')
const loading = ref(false)
const searchResults = ref([])
const showSearchResults = ref(false)
const showAddForm = ref(false)
const isEditMode = ref(false)
const currentContractId = ref(null)
+const showDetailDialog = ref(false)
+const currentDetail = ref(null)
const form = reactive({
contract_no: '',
contract_name: '',
- type: '',
- party_a: '蜜雪冰城股份有限公司',
- party_b: '',
- sign_date: '',
- start_date: '',
- end_date: '',
+ customer_id: '',
+ contract_content: '',
+ employee_id: '',
+ effective_date: '',
+ expiry_date: '',
amount: 0,
status: '待审批',
remark: ''
@@ -49,6 +49,11 @@ const fetchData = async () => {
// 处理搜索
const handleSearch = async () => {
+ // 如果在表单页面,先关闭表单
+ if (showAddForm.value) {
+ cancelAdd()
+ }
+
loading.value = true
let keyword = search.value
@@ -59,7 +64,6 @@ const handleSearch = async () => {
const params = {
keyword,
searchField: select.value,
- type: filterType.value,
startDate: dateRange.value?.[0],
endDate: dateRange.value?.[1]
}
@@ -79,7 +83,6 @@ const handleDateChange = () => {
const resetSearch = () => {
search.value = ''
select.value = '1'
- filterType.value = ''
dateRange.value = []
fetchData()
}
@@ -98,12 +101,11 @@ const editContract = (row) => {
Object.assign(form, {
contract_no: row.contract_no,
contract_name: row.contract_name,
- type: row.type,
- party_a: row.party_a,
- party_b: row.party_b,
- sign_date: row.sign_date,
- start_date: row.start_date,
- end_date: row.end_date,
+ customer_id: row.customer_id,
+ contract_content: row.contract_content,
+ employee_id: row.employee_id,
+ effective_date: row.effective_date,
+ expiry_date: row.expiry_date,
amount: row.amount,
status: row.status,
remark: row.remark
@@ -148,12 +150,11 @@ const resetForm = () => {
Object.assign(form, {
contract_no: '',
contract_name: '',
- type: '',
- party_a: '蜜雪冰城股份有限公司',
- party_b: '',
- sign_date: '',
- start_date: '',
- end_date: '',
+ customer_id: '',
+ contract_content: '',
+ employee_id: '',
+ effective_date: '',
+ expiry_date: '',
amount: 0,
status: '待审批',
remark: ''
@@ -162,6 +163,18 @@ const resetForm = () => {
currentContractId.value = null
}
+// 双击查看详情
+const showDetail = (row) => {
+ currentDetail.value = row
+ showDetailDialog.value = true
+}
+
+// 关闭详情弹窗
+const closeDetail = () => {
+ showDetailDialog.value = false
+ currentDetail.value = null
+}
+
// 状态样式
const getStatusType = (status) => {
const map = {
@@ -239,20 +252,13 @@ const formatDate = (date) => {
筛选条件:
-
-
-
-
-
-
-
@@ -274,23 +280,24 @@ const formatDate = (date) => {
共找到 {{ searchResults.length }} 条合同
-
+
-
-
+
+
¥{{ row.amount?.toLocaleString() }}
-
+
{{ row.status }}
-
+
+
编辑
@@ -312,48 +319,34 @@ const formatDate = (date) => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -376,8 +369,12 @@ const formatDate = (date) => {
+
+
+
+
-
+
@@ -386,6 +383,36 @@ const formatDate = (date) => {
+
+
+
+
+
+ {{ currentDetail.contract_no }}
+ {{ currentDetail.contract_name }}
+ {{ currentDetail.customer_id }}
+ {{ currentDetail.employee_id }}
+
+ ¥{{ currentDetail.amount?.toLocaleString() }}
+
+
+ {{ currentDetail.status }}
+
+ {{ currentDetail.effective_date }}
+ {{ currentDetail.expiry_date }}
+
+ {{ currentDetail.contract_content || '无' }}
+
+
+ {{ currentDetail.remark || '无' }}
+
+
+
+
+ 关闭
+ 编辑
+
+
@@ -441,4 +468,25 @@ const formatDate = (date) => {
.loading-container, .empty-container {
padding: 40px 0;
}
+
+.clickable-row {
+ cursor: pointer;
+}
+
+.detail-content {
+ padding: 10px 0;
+}
+
+.amount-text {
+ font-weight: 600;
+ color: #e6a23c;
+ font-size: 16px;
+}
+
+.content-text {
+ white-space: pre-wrap;
+ line-height: 1.6;
+ max-height: 120px;
+ overflow-y: auto;
+}
\ No newline at end of file
diff --git a/src/components/customer.vue b/src/components/customer.vue
index f19ed45..be6126c 100644
--- a/src/components/customer.vue
+++ b/src/components/customer.vue
@@ -165,7 +165,7 @@ const clearSearch = () => {
重置
- 新增用户
+ 新增客户
@@ -176,7 +176,7 @@ const clearSearch = () => {
-
+
@@ -192,10 +192,11 @@ const clearSearch = () => {
+
- {{ row.customer_type === 'VIP' ? '地区总代理' : '普通代理' }}
+ {{ row.customer_type === 'VIP' ? '地区总代理' : '加盟商' }}
@@ -244,7 +245,7 @@ const clearSearch = () => {
地区总代理
- 普通代理
+ 加盟商
diff --git a/src/components/employee.vue b/src/components/employee.vue
new file mode 100644
index 0000000..9fad52d
--- /dev/null
+++ b/src/components/employee.vue
@@ -0,0 +1,11 @@
+
+
+
+hello ,im 3
+
+
+
\ No newline at end of file
diff --git a/src/components/panel.vue b/src/components/panel.vue
index 689e792..fb85fe8 100644
--- a/src/components/panel.vue
+++ b/src/components/panel.vue
@@ -63,16 +63,21 @@ const switchFold = () => {
售后管理
-
+
产品管理
-
+
员工管理
+
+
+ 用户管理
+
+
@@ -112,6 +117,15 @@ const switchFold = () => {
display: flex;
align-items: center;
gap: 10px;
+ border-bottom: none !important;
+}
+
+.logo-item.is-active {
+ border-bottom: none !important;
+}
+
+.logo-item.is-active::after {
+ display: none !important;
}
.logo-img {
diff --git a/src/components/products.vue b/src/components/products.vue
new file mode 100644
index 0000000..9fad52d
--- /dev/null
+++ b/src/components/products.vue
@@ -0,0 +1,11 @@
+
+
+
+hello ,im 3
+
+
+
\ No newline at end of file
diff --git a/src/components/user.vue b/src/components/user.vue
new file mode 100644
index 0000000..9fad52d
--- /dev/null
+++ b/src/components/user.vue
@@ -0,0 +1,11 @@
+
+
+
+hello ,im 3
+
+
+
\ No newline at end of file
diff --git a/src/router.js b/src/router.js
index d566c92..cffabea 100644
--- a/src/router.js
+++ b/src/router.js
@@ -5,6 +5,9 @@ import Panel from "./components/panel.vue";
import Customer from "./components/customer.vue";
import Contract from "./components/contract.vue";
import Service from "./components/service.vue";
+import Products from "./components/products.vue";
+import Employee from "./components/employee.vue";
+import User from "./components/user.vue";
const routes = [
{ path: "/", redirect: "/login" },
@@ -18,6 +21,9 @@ const routes = [
{ path: "customer", component: Customer },
{ path: "contract", component: Contract },
{ path: "service", component: Service },
+ { path: "products", component: Products },
+ { path: "employee", component: Employee },
+ { path: "user", component: User }
],
},
]