|
@@ -293,7 +293,7 @@ onMounted(() => {
|
|
|
|
|
|
|
|
// 获取协议授权机构
|
|
// 获取协议授权机构
|
|
|
const agreementAuth = () => {
|
|
const agreementAuth = () => {
|
|
|
- api.saleApi.agreementdeptTree({ name: "", system: "" }).then((res: any) => {
|
|
|
|
|
|
|
+ api.saleApi.agreementdeptTree({ name: "", system: "", isDistribution: 0 }).then((res: any) => {
|
|
|
if (res.code == "200") {
|
|
if (res.code == "200") {
|
|
|
deptTreeData.value = res.data;
|
|
deptTreeData.value = res.data;
|
|
|
}
|
|
}
|
|
@@ -420,29 +420,32 @@ const handleSubmit = async () => {
|
|
|
await api.saleApi.saveSetting(formData);
|
|
await api.saleApi.saveSetting(formData);
|
|
|
|
|
|
|
|
ElMessage.success('保存成功');
|
|
ElMessage.success('保存成功');
|
|
|
|
|
+ getDetail()
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const handleUpdate = async () => {
|
|
const handleUpdate = async () => {
|
|
|
if (!formRef.value) return;
|
|
if (!formRef.value) return;
|
|
|
|
|
|
|
|
- await formRef.value.validate();
|
|
|
|
|
|
|
+ await formRef.value.validate();
|
|
|
|
|
|
|
|
- const formData = {
|
|
|
|
|
- ...form,
|
|
|
|
|
- id: form.id + '',
|
|
|
|
|
- commissionRatioLevel1: form.commissionRatioLevel1 || 0,
|
|
|
|
|
- commissionRatioLevel2: form.commissionRatioLevel2 || 0,
|
|
|
|
|
- commissionRatioLevel3: form.commissionRatioLevel3 || 0,
|
|
|
|
|
- excludeDeptIds: form.excludeDeptScope == '1' ? [] : selectData.value.map((item) => item.id),
|
|
|
|
|
- systemCode: localStorage.getItem('login_system')
|
|
|
|
|
- };
|
|
|
|
|
- await api.saleApi.update(formData).then((res: any) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage.error(res.msg);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const formData = {
|
|
|
|
|
+ ...form,
|
|
|
|
|
+ id: form.id + '',
|
|
|
|
|
+ commissionRatioLevel1: form.commissionRatioLevel1 || 0,
|
|
|
|
|
+ commissionRatioLevel2: form.commissionRatioLevel2 || 0,
|
|
|
|
|
+ commissionRatioLevel3: form.commissionRatioLevel3 || 0,
|
|
|
|
|
+ excludeDeptIds: form.excludeDeptScope == '1' ? [] : selectData.value.map((item) => item.id),
|
|
|
|
|
+ systemCode: localStorage.getItem('login_system')
|
|
|
|
|
+ };
|
|
|
|
|
+ await api.saleApi.update(formData).then((res: any) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ ElMessage.success('操作成功');
|
|
|
|
|
+ getDetail()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage.error(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|