From 4fc4068252f1a07e0f42c20ad058a32c87f85a28 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 28 七月 2023 16:24:52 +0800
Subject: [PATCH] 手机号增加校验
---
src/views/service/orderManage/index.vue | 180 ++++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 110 insertions(+), 70 deletions(-)
diff --git a/src/views/service/orderManage/index.vue b/src/views/service/orderManage/index.vue
index 5054603..e76d7f3 100644
--- a/src/views/service/orderManage/index.vue
+++ b/src/views/service/orderManage/index.vue
@@ -1,40 +1,45 @@
<template>
<div class="sales-lead">
+ <div class="tab-view">
+ <el-tabs v-model="activeName" @tab-click="tabsClick">
+ <el-tab-pane label="鍏ㄩ儴" name="first"></el-tab-pane>
+ <el-tab-pane label="寰呭垎閰�" name="second"></el-tab-pane>
+ <el-tab-pane label="宸插偓鍗�" name="third"></el-tab-pane>
+ <el-tab-pane label="澶勭悊涓�" name="fourth"></el-tab-pane>
+ <el-tab-pane label="宸茬粨鍗�" name="aaa"></el-tab-pane>
+ </el-tabs>
+ </div>
<SearchCommonView ref="searchCommonView" :query-class-options="queryClassOptions" :search-options="searchOptions" />
<div class="btn-pager">
<PublicFunctionBtnView :receive="true" :submit-approval="true" :operates-list="operatesList" />
- <PagerView class="page" />
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
</div>
<TableCommonView ref="tableListRef" :table-list="tableList">
<template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="120">
+ <el-table-column label="鎿嶄綔" width="90">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
+ <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button>
</template>
</el-table-column>
</template>
</TableCommonView>
- <!-- 鏂板缓/缂栬緫閿�鍞嚎绱� -->
- <AddSalesLeadDialog v-if="editSalesLeadConfig.visible" :edit-sales-lead-config="editSalesLeadConfig" />
+ <!-- 鏂板缓/缂栬緫 -->
+ <AddOrderManageDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
</div>
</template>
<script>
-import SearchCommonView from "@/components/makepager/SearchCommonView"
-import PublicFunctionBtnView from "@/components/makepager/PublicFunctionBtnView"
-import PagerView from "@/components/makepager/PagerView"
-import TableCommonView from "@/components/makepager/TableCommonView"
-import AddSalesLeadDialog from "@/views/custom/salesLead/AddSalesLeadDialog"
+import AddOrderManageDialog from "@/views/service/orderManage/AddOrderManageDialog"
+import { getOrderManageList, getDelOrderManage } from "@/api/serviceManage/orderManage"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
name: "SalesLead",
props: {},
+ mixins: [pageMixin],
components: {
- SearchCommonView,
- PublicFunctionBtnView,
- PagerView,
- TableCommonView,
- AddSalesLeadDialog
+ AddOrderManageDialog
},
computed: {
searchCommonHeight() {
@@ -43,8 +48,15 @@
},
data() {
return {
+ activeName: "first",
tableList: {},
- queryClassOptions: [{ value: "1", label: "鍏ㄩ儴" }],
+ queryClassOptions: [
+ { value: "1", label: "鍏ㄩ儴" },
+ { value: "2", label: "灏忕▼搴忔姤淇�" },
+ { value: "3", label: "闈㈣鎶ヤ慨" },
+ { value: "4", label: "浠婃棩鍐呭垱寤�" },
+ { value: "5", label: "涓夊ぉ鍐呭垱寤�" }
+ ],
searchOptions: [],
operatesList: [
{ id: "1", name: "鍏变韩" },
@@ -56,7 +68,7 @@
{ id: "7", name: "瀹℃壒璁剧疆" },
{ id: "8", name: "鎭㈠棰勮鍒楀" }
],
- editSalesLeadConfig: {
+ editConfig: {
visible: false,
title: "鏂板缓",
infomation: {}
@@ -65,28 +77,19 @@
},
created() {
this.setTable()
+ this.getData()
},
methods: {
setTable() {
this.tableList = {
- tableInfomation: [
- {
- orderNumber: "LEA110",
- customName: "涓婃捣閫氱敤鏈烘鏈夐檺鍏徃",
- contactName: "钁e浼�",
- servicePerson: "绯荤粺绠$悊鍛�",
- orderStatus: "宸茬粨鍗�",
- repairSource: "鐢佃瘽鎶ヤ慨",
- orderType: "淇濆唴鏀惰垂"
- }
- ],
+ tableInfomation: [],
tableColumn: [
- { label: "宸ュ崟缂栧彿", prop: "orderNumber", min: 100 }, // 宸ュ崟缂栧彿
- { label: "瀹㈡埛鍚嶇О", prop: "customName", min: 130 }, // 瀹㈡埛鍚嶇О
+ { label: "宸ュ崟缂栧彿", prop: "number", min: 100 }, // 宸ュ崟缂栧彿
+ { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 130 }, // 瀹㈡埛鍚嶇О
{ label: "鑱旂郴浜哄鍚�", prop: "contactName" }, // 鑱旂郴浜哄鍚�
- { label: "鏈嶅姟浜哄憳", prop: "servicePerson" }, // 鏈嶅姟浜哄憳
- { label: "宸ュ崟鐘舵��", prop: "orderStatus" }, // 宸ュ崟鐘舵��
- { label: "鎶ヤ慨鏉ユ簮", prop: "repairSource" }, // 鎶ヤ慨鏉ユ簮
+ { label: "鏈嶅姟浜哄憳", prop: "name" }, // 鏈嶅姟浜哄憳
+ { label: "宸ュ崟鐘舵��", prop: "orderType" }, // 宸ュ崟鐘舵��
+ { label: "鎶ヤ慨鏉ユ簮", prop: "reportSourceId" }, // 鎶ヤ慨鏉ユ簮
{ label: "宸ュ崟绫诲瀷", prop: "orderType" } // 宸ュ崟绫诲瀷
]
}
@@ -96,50 +99,78 @@
this.searchOptions.push({ value: (i + 1).toString(), label: label })
}
},
+ // 璇锋眰鏁版嵁
+ async getData() {
+ this.loading = true
+ await getOrderManageList({
+ keyword: "",
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
+ })
+ .then((res) => {
+ console.log(res)
+ if (res.code === 200) {
+ if (res.data.list && res.data.list.length > 0) {
+ const list = res.data.list.map((item) => {
+ return {
+ ...item
+ }
+ })
+ this.tableList.tableInfomation = list || []
+ this.pagerOptions.totalCount = res.data.count
+ } else {
+ this.tableList.tableInfomation = []
+ }
+ } else {
+ this.tableList.tableInfomation = []
+ }
+ this.loading = false
+ })
+ .catch((err) => {
+ console.log(err)
+ this.tableList.tableInfomation = []
+ this.loading = false
+ })
+ },
+ // tab鍒囨崲
+ tabsClick(tab, event) {
+ console.log(tab, event)
+ },
// 鏂板缓
addBtnClick() {
- this.editSalesLeadConfig.visible = true
- this.editSalesLeadConfig.title = "鏂板缓"
- this.editSalesLeadConfig.infomation = {
- customName: "",
- saleLeadNumber: "LEA50",
- contactName: "",
- contactDuties: "",
- phoneNumber: "",
- businessStatus: "鏂板缓",
- businessSource: "1",
- owner: "",
- position: "",
- map: "",
- country: "1",
- province: "1",
- city: "1",
- region: "1",
- address: ""
- }
+ this.editConfig.visible = true
+ this.editConfig.title = "鏂板缓"
+ this.editConfig.infomation = {}
},
// 缂栬緫
handleClick(row) {
console.log(row)
- this.editSalesLeadConfig.visible = true
- this.editSalesLeadConfig.title = "缂栬緫"
- this.editSalesLeadConfig.infomation = {
- customName: row.customName,
- saleLeadNumber: row.saleLeadNumber,
- contactName: row.contactName,
- contactDuties: row.contactDuties,
- phoneNumber: row.phoneNumber,
- businessStatus: "鏂板缓",
- businessSource: row.businessSource,
- owner: row.owner,
- position: "",
- map: "",
- country: "1",
- province: "1",
- city: "1",
- region: "1",
- address: ""
- }
+ this.editConfig.visible = true
+ this.editConfig.title = "缂栬緫"
+ this.editConfig.infomation = { ...row }
+ },
+ // 鍒犻櫎
+ delClick(id) {
+ this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(function () {
+ return getDelOrderManage({ id: id })
+ })
+ .then((response) => {
+ if (response.code === 200) {
+ this.$message.success("鍒犻櫎鎴愬姛")
+ this.getData()
+ } else {
+ this.$message.warning("鍒犻櫎澶辫触")
+ }
+ })
+ .catch(function () {})
+ },
+ getSelectArray(val) {
+ console.log(val)
}
}
}
@@ -155,4 +186,13 @@
}
}
}
+::v-deep {
+ .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
+ padding-left: 25px;
+ }
+ .el-tabs__item {
+ padding: 0 25px;
+ height: 45px;
+ }
+}
</style>
--
Gitblit v1.8.0