Commit c5dd3d2d authored by zhengke's avatar zhengke

修改

parent 07023e19
...@@ -369,3 +369,15 @@ export function GetCatetoryTypeList(data) { ...@@ -369,3 +369,15 @@ export function GetCatetoryTypeList(data) {
data data
}) })
} }
/**
* 保存合并
* @param {查询参数} data
*/
export function ReplaceCategory(data) {
return request({
url: '/B2BCustomer/ReplaceCategory',
method: 'post',
data
})
}
\ No newline at end of file
<template> <template>
<q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeAuditCustomerForm"> <q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeAuditCustomerForm">
<div class="info-content-component"> <div class="info-content-component">
<div class="info-head flex items-center"> <div class="info-head flex items-center" style="justify-content:space-between;">
<div class="flex items-center">
<div>
<div class="text-h7"> <div class="text-h7">
{{ detailData.CategoryName }} {{ detailData.CategoryName }}
</div> </div>
<div>
<q-btn
color="accent"
size="sm"
label="合并"
icon="compare_arrows"
@click="isShowTrans = true"
>
<q-popup-proxy :offset="[10, 10]">
<q-banner v-if="isShowTrans">
<q-select
style="margin-top:20px;"
filled
v-model="mergeMsg.NewCategoryId"
@filter="filterFn"
use-input
dense
:options="customList"
option-label="CategoryName"
option-value="CategoryId"
emit-value
map-options
:rules="[val => !!val || '请选合并人']"
ref="transfer"
/>
<q-btn
label="保存"
style="float:right;margin-top:15px"
color="accent q-mb-lg"
size="sm"
@click="saveMerge"
/>
</q-banner>
</q-popup-proxy>
</q-btn>
</div> </div>
</div> </div>
<q-space />
</div>
<div class="info-content"> <div class="info-content">
<div class="detail-info"> <div class="detail-info">
<baseInfo :Data="detailData" :isCanEdit="isCanEdit" @confirm="saveBaseInfo"></baseInfo> <baseInfo :Data="detailData" :isCanEdit="isCanEdit" @confirm="saveBaseInfo"></baseInfo>
...@@ -35,8 +66,11 @@ ...@@ -35,8 +66,11 @@
} from "../../../api/sale/peemanagement"; } from "../../../api/sale/peemanagement";
import { import {
queryCustomerCategory, queryCustomerCategory,
saveCustomerCategory saveCustomerCategory,
queryCustomerCategoryList,
ReplaceCategory
} 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";
export default { export default {
...@@ -69,15 +103,45 @@ ...@@ -69,15 +103,45 @@
TransferMsg: { TransferMsg: {
CustomerIds: "", CustomerIds: "",
EmpId: "" EmpId: ""
},
customList:[],
AllcustomList:[],
mergeMsg:{
CategoryId:0,
NewCategoryId:''
} }
}; };
}, },
mounted() { mounted() {
this.initObj(); this.initObj();
this.getCustomList(1);
this.employeeList = this.empList; this.employeeList = this.empList;
this.myEmployeeList = this.empList; this.myEmployeeList = this.empList;
}, },
methods: { methods: {
//筛选客户
filterFn(val, update) {
update(() => {
if (val === '') {
this.customList = JSON.parse(JSON.stringify(this.AllcustomList))
} else {
const needle = val.toLowerCase();
this.customList = this.AllcustomList.filter(v => v.CategoryName.toLowerCase().indexOf(needle) > -1);
}
})
},
getCustomList(Type){
let msg = {
CategoryName:"",
CatetoryType:Type
}
queryCustomerCategoryList(msg).then(res => {
if (res.Code == 1) {
this.customList = res.Data;
this.AllcustomList = res.Data;
}
})
},
//关闭弹窗 //关闭弹窗
closeAuditCustomerForm() { closeAuditCustomerForm() {
this.$emit("close"); this.$emit("close");
...@@ -161,6 +225,23 @@ ...@@ -161,6 +225,23 @@
}); });
}); });
}, },
//保存合并
saveMerge(){
this.mergeMsg.CategoryId = this.CategoryId;
ReplaceCategory(this.mergeMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.isShowTrans=false;
this.$emit("success");
}
});
}
} }
}; };
</script> </script>
......
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