Commit c4c95c6d authored by zhengke's avatar zhengke

1

parent 855394f6
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<div class="row wrap"> <div class="row wrap">
<div class="col-12"> <div class="col-12">
<q-select stack-label color="primary" filled label="类型" option-value="Id" option-label="Name" <q-select stack-label color="primary" filled label="类型" option-value="Id" option-label="Name"
:options="typeList" class="q-pb-lg" v-model="objOption.CatetoryType" emit-value map-options /> ref="CatetoryType" :options="typeList" class="q-pb-lg" v-model="objOption.CatetoryType" :rules="[val => !!val || '请选择类型']" emit-value map-options />
</div> </div>
</div> </div>
<template v-if="isShowTel"> <template v-if="isShowTel">
...@@ -184,7 +184,9 @@ ...@@ -184,7 +184,9 @@
//保存 //保存
saveCourse() { saveCourse() {
this.$refs.CategoryName.validate(); this.$refs.CategoryName.validate();
if (!this.$refs.CategoryName.hasError) { this.$refs.CatetoryType.validate();
if (!this.$refs.CategoryName.hasError&&!this.$refs.CatetoryType.hasError) {
this.saveCustomLoading = true; this.saveCustomLoading = true;
saveCustomerCategory(this.objOption).then(res => { saveCustomerCategory(this.objOption).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
......
...@@ -39,12 +39,6 @@ ...@@ -39,12 +39,6 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-CustomerType="props">
<q-td>
<div v-if="props.row.CustomerType === 1">企业</div>
<div v-if="props.row.CustomerType === 2">学校</div>
</q-td>
</template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" @click="EditCustom(props.row)" style="font-weight:400" label="修改" /> <q-btn flat size="xs" icon="edit" color="accent" @click="EditCustom(props.row)" style="font-weight:400" label="修改" />
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('CustomerType',Data.CustomerType)"></q-btn> <q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('CustomerType',Data.CustomerType)"></q-btn>
</div> </div>
</div> </div>
<q-select outlined dense stack-label label="类型" @input="getCustomList(Data.CustomerType)" option-value="Id" option-label="Name" <q-select outlined dense stack-label label="类型" option-value="Id" option-label="Name"
:rules="[val => !!val || '请选择类型']" :options="options" v-model="Data.CustomerType" emit-value map-options /> :rules="[val => !!val || '请选择类型']" :options="options" v-model="Data.CustomerType" emit-value map-options />
</div> </div>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('CustomerType')"> <div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('CustomerType')">
...@@ -20,6 +20,21 @@ ...@@ -20,6 +20,21 @@
<span v-if="Data.CustomerType==3">个人</span> <span v-if="Data.CustomerType==3">个人</span>
<span v-if="Data.CustomerType==4">其他</span> <span v-if="Data.CustomerType==4">其他</span>
</div> </div>
<!-- 名称 -->
<div class="q-my-sm" v-if="editField=='CategoryName'">
<div class="flex justify-between items-center q-mb-sm">
<span>名称</span>
<div>
<q-btn size="sm" text-color="primary" label="取消" @click="showEdit('')"></q-btn>
<q-btn size="sm" color="primary" label="确定" class="q-ml-sm" @click="save('CategoryName',Data.CategoryName)"></q-btn>
</div>
</div>
<q-input outlined dense v-model="Data.CategoryName" :rules="[val => !!val || '请输入名称']"></q-input>
</div>
<div class="flex justify-between items-center q-my-lg" v-else @click="showEdit('CategoryName')">
<span>名称</span>
<span>{{Data.CategoryName}}</span>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -51,9 +66,6 @@ ...@@ -51,9 +66,6 @@
} }
}, },
mounted(){ mounted(){
if(this.Data.CustomerType){
this.getCustomList(this.Data.CustomerType);
}
this.getTypeList(); this.getTypeList();
}, },
methods: { methods: {
...@@ -78,28 +90,6 @@ ...@@ -78,28 +90,6 @@
this.options = res.Data; this.options = res.Data;
} }
}) })
},
getCustomList(Type){
let msg = {
CategoryName:"",
CatetoryType:Type
}
this.Data.CategoryId='';
this.Data.EnterpriseName='';
queryCustomerCategoryList(msg).then(res => {
if (res.Code == 1) {
this.customList = res.Data;
}
})
},
getName(Id){
let Name=''
this.customList.forEach(x=>{
if(x.CategoryId==Id){
Name = x.CategoryName
}
})
return Name;
} }
} }
} }
......
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
<script> <script>
import { GetCustomer, SetCustomer ,RemoveCustomer,setCustomerCareOf} from "../../../api/sale/peemanagement"; import { GetCustomer, SetCustomer ,RemoveCustomer,setCustomerCareOf} from "../../../api/sale/peemanagement";
import { import {
queryCustomerCategory queryCustomerCategory,
saveCustomerCategory
} from "../../../api/users/user" } from "../../../api/users/user"
import baseInfo from "./baseInfo.vue"; import baseInfo from "./baseInfo.vue";
import right from "./conRight.vue"; import right from "./conRight.vue";
...@@ -101,7 +102,16 @@ export default { ...@@ -101,7 +102,16 @@ export default {
}, },
saveBaseInfo(obj) { saveBaseInfo(obj) {
this.detailData[obj.field] = obj.val; this.detailData[obj.field] = obj.val;
SetCustomer(this.detailData).then(res => { console.log(this.detailData,'this.detailData');
let msg = {
CategoryName:this.detailData.CategoryName,
CatetoryType:this.detailData.CatetoryType,
CategoryId:this.detailData.CategoryId,
linkMan:'',
linkTel:''
}
saveCustomerCategory(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: "iconfont icon-chenggong", icon: "iconfont icon-chenggong",
...@@ -114,31 +124,6 @@ export default { ...@@ -114,31 +124,6 @@ export default {
} }
}); });
}, },
//同业转交
saveTransForm() {
this.$refs.transfer.validate();
if (this.$refs.transfer.hasError) return;
this.TransferMsg.CustomerIds = this.rowId;
setCustomerCareOf(this.TransferMsg).then(res => {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "转交成功",
position: "top"
});
this.isShowTrans = false;
this.$emit("success");
});
},
//筛选员工
filterEmployee(val, update, abort) {
update(() => {
this.myEmployeeList = this.employeeList.filter(
v => v.EmployeeName.indexOf(val) > -1
);
});
},
//删除客户 //删除客户
RemoveCustomer(obj) { RemoveCustomer(obj) {
let that = this; let that = this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment