From 90943dd32237e9e1c9f0cd66e33b2145c26883ff Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期一, 25 九月 2023 14:14:47 +0800
Subject: [PATCH] feat: 侧边栏样式调整; 表格组件样式调整; 新增搜索组件; 销售线索模块布局样式调整
---
src/views/client/salesLead/AddSalesLeadDialog.vue | 113 +++++++++++++++++++++++++++++++-------------------------
1 files changed, 63 insertions(+), 50 deletions(-)
diff --git a/src/views/client/salesLead/AddSalesLeadDialog.vue b/src/views/client/salesLead/AddSalesLeadDialog.vue
index 4c9ec58..db84fa9 100644
--- a/src/views/client/salesLead/AddSalesLeadDialog.vue
+++ b/src/views/client/salesLead/AddSalesLeadDialog.vue
@@ -30,8 +30,8 @@
<el-input v-model="editConfig.infomation.number"></el-input>
</el-form-item>
</el-col>
- </el-row>
- <el-row>
+ <!-- </el-row>
+ <el-row> -->
<el-col :span="12">
<el-form-item label="鑱旂郴浜哄鍚�" prop="contact_name">
<el-input v-model="editConfig.infomation.contact_name"></el-input>
@@ -42,8 +42,8 @@
<el-input v-model="editConfig.infomation.contact_position"></el-input>
</el-form-item>
</el-col>
- </el-row>
- <el-row>
+ <!-- </el-row>
+ <el-row> -->
<el-col :span="12">
<el-form-item label="鎵嬫満鍙风爜" prop="contact_phone">
<el-input
@@ -78,9 +78,9 @@
>
</el-option>
</el-select>
- <div class="common-select-btn" @click="editDropdownBox">
+ <!-- <div class="common-select-btn" @click="editDropdownBox">
<i class="el-icon-setting"></i>
- </div>
+ </div> -->
</div>
</el-form-item>
</el-col>
@@ -120,11 +120,12 @@
placeholder="璇烽�夋嫨"
class="common-select-sel"
size="mini"
+ disabled
>
<el-option v-for="item in countryOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
- <div class="common-select-btn"><i class="el-icon-setting"></i></div>
+ <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
</div>
</el-form-item>
</el-col>
@@ -136,11 +137,12 @@
placeholder="璇烽�夋嫨"
class="common-select-sel"
size="mini"
+ @change="selProvinceChange"
>
<el-option v-for="item in provinceOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
- <div class="common-select-btn"><i class="el-icon-setting"></i></div>
+ <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
</div>
</el-form-item>
</el-col>
@@ -152,15 +154,16 @@
placeholder="璇烽�夋嫨"
class="common-select-sel"
size="mini"
+ :disabled="cityOptions.length <= 0 ? true : false"
>
<el-option v-for="item in cityOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
- <div class="common-select-btn"><i class="el-icon-setting"></i></div>
+ <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
</div>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="鍖哄煙" prop="region_id">
<div class="common-select">
<el-select
@@ -175,20 +178,20 @@
<div class="common-select-btn"><i class="el-icon-setting"></i></div>
</div>
</el-form-item>
- </el-col>
- </el-row>
- <!-- <el-row>
+ </el-col> -->
+ <!-- </el-row> -->
+ <!-- <el-row> -->
<el-col :span="24">
- <el-form-item label="鍦板潃" prop="address">
+ <el-form-item label="璇︾粏鍦板潃" prop="detail_address">
<el-input
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
placeholder="璇疯緭鍏ュ唴瀹�"
- v-model="editConfig.infomation.address"
+ v-model="editConfig.infomation.detail_address"
></el-input>
</el-form-item>
</el-col>
- </el-row> -->
+ </el-row>
</div>
<!-- 澶囨敞淇℃伅 -->
<div v-if="isUnflod" class="basic-info-title">澶囨敞淇℃伅</div>
@@ -228,6 +231,7 @@
import EditDropdownDialog from "@/views/other/commonDialog/EditDropdownDialog"
import { getAddSalesLeads, getUpdateSalesLeads } from "@/api/client/salesLead"
import { getAllData } from "@/api/client/client"
+import { getCityList } from "@/api/common/address"
export default {
name: "AddSalesLeadDialog",
@@ -266,7 +270,7 @@
},
businessSourceOptions: [],
memberOptions: [],
- countryOptions: [], // 鍥藉
+ countryOptions: [{ id: 1, name: "涓浗" }], // 鍥藉
provinceOptions: [], // 鐪佷唤
cityOptions: [], // 鍩庡競
regionOptions: [], // 鍖哄煙
@@ -280,18 +284,25 @@
}
},
created() {
+ if (this.editConfig.title !== "鏂板缓" && this.editConfig.infomation.province_id !== 0) {
+ this.getCityList(this.editConfig.infomation.province_id, "edit")
+ }
this.getCommonData()
},
mounted() {},
methods: {
getCommonData() {
+ this.editConfig.infomation.country_id = 1
+ this.editConfig.infomation.province_id =
+ this.editConfig.infomation.province_id === 0 ? "" : this.editConfig.infomation.province_id
+ this.editConfig.infomation.city_id =
+ this.editConfig.infomation.city_id === 0 ? "" : this.editConfig.infomation.city_id
getAllData()
.then((res) => {
console.log(res)
this.businessSourceOptions = res.data.sales_source
- this.countryOptions = res.data.country
+ // this.countryOptions = res.data.country
this.provinceOptions = res.data.province
- this.cityOptions = res.data.city
this.regionOptions = res.data.region
this.memberOptions = res.data.member
})
@@ -320,41 +331,28 @@
number: this.editConfig.infomation.number || "",
province_id: this.editConfig.infomation.province_id || 0,
region_id: this.editConfig.infomation.region_id || 0,
- sales_sources_id: this.editConfig.infomation.sales_sources_id || 0
+ sales_sources_id: this.editConfig.infomation.sales_sources_id || 0,
+ detail_address: this.editConfig.infomation.detail_address || ""
}
console.log(params)
if (this.editConfig.title === "鏂板缓") {
- getAddSalesLeads(params)
- .then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message({
- message: "娣诲姞鎴愬姛",
- type: "success"
- })
- this.$parent.getData()
- }
- })
- .catch((err) => {
- console.log(err)
- })
+ getAddSalesLeads(params).then((res) => {
+ console.log(res)
+ this.editConfig.visible = false
+ if (res.code === 200) {
+ this.$message.success("娣诲姞鎴愬姛")
+ this.$parent.getData()
+ }
+ })
} else {
- getUpdateSalesLeads(params)
- .then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message({
- message: "缂栬緫鎴愬姛",
- type: "success"
- })
- this.$parent.getData()
- }
- })
- .catch((err) => {
- console.log(err)
- })
+ getUpdateSalesLeads(params).then((res) => {
+ console.log(res)
+ this.editConfig.visible = false
+ if (res.code === 200) {
+ this.$message.success("缂栬緫鎴愬姛")
+ this.$parent.getData()
+ }
+ })
}
} else {
console.log("error submit")
@@ -381,6 +379,21 @@
confirmPhone(value) {
const inputValue = value.replace(/[^\d*]/g, "")
this.editConfig.infomation.contact_phone = inputValue
+ },
+ // 閫夋嫨鐪佷唤
+ selProvinceChange(val) {
+ this.getCityList(val, "sel")
+ },
+ async getCityList(val, value) {
+ await getCityList({ province_id: val }).then((res) => {
+ console.log(res)
+ if (res.data.code === 200) {
+ this.cityOptions = res.data.data.list
+ if (value === "sel") {
+ this.editConfig.infomation.city_id = ""
+ }
+ }
+ })
}
}
}
--
Gitblit v1.8.0