Commit c5dd3d2d authored by zhengke's avatar zhengke

修改

parent 07023e19
......@@ -368,4 +368,16 @@ export function GetCatetoryTypeList(data) {
method: 'post',
data
})
}
/**
* 保存合并
* @param {查询参数} data
*/
export function ReplaceCategory(data) {
return request({
url: '/B2BCustomer/ReplaceCategory',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeAuditCustomerForm">
<div class="info-content-component">
<div class="info-head flex items-center">
<div class="flex items-center">
<div>
<div class="text-h7">
{{ detailData.CategoryName }}
</div>
</div>
<div class="info-head flex items-center" style="justify-content:space-between;">
<div class="text-h7">
{{ detailData.CategoryName }}
</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>
<q-space />
</div>
<div class="info-content">
<div class="detail-info">
......@@ -35,8 +66,11 @@
} from "../../../api/sale/peemanagement";
import {
queryCustomerCategory,
saveCustomerCategory
saveCustomerCategory,
queryCustomerCategoryList,
ReplaceCategory
} from "../../../api/users/user"
import baseInfo from "./baseInfo.vue";
import right from "./conRight.vue";
export default {
......@@ -69,15 +103,45 @@
TransferMsg: {
CustomerIds: "",
EmpId: ""
},
customList:[],
AllcustomList:[],
mergeMsg:{
CategoryId:0,
NewCategoryId:''
}
};
},
mounted() {
this.initObj();
this.getCustomList(1);
this.employeeList = this.empList;
this.myEmployeeList = this.empList;
},
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() {
this.$emit("close");
......@@ -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>
......
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