Commit dd9d2183 authored by yujinyao's avatar yujinyao

客户设置默认付款和控货无收货人

parent cf2ba127
......@@ -503,3 +503,19 @@ export function updatecustomerToOld(params){
params
})
}
export function changeCustomerDefaultPay(data){
return request({
url:'ecw/customer/change-customer-default-pay',
method:'put',
data
})
}
export function changeCustomerNoConsignee(data){
return request({
url:'ecw/customer/change-customer-no-consignee',
method:'put',
data
})
}
......@@ -968,7 +968,7 @@
v-model.trim="row.phoneNew"
:placeholder="$t('请输入联系方式')"
size="mini"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
@input="row.phoneNew=row.phoneNew.replace(/\s+/g, '')"
/>
</el-form-item>
</template>
......@@ -1531,6 +1531,9 @@ export default {
pickupPoints: (this.form.pickupPoints || [])?.join(","),
productIds: (this.form.productIds || [])?.join(","),
busiCountryIds: (this.form.busiCountryIds || [])?.join(","),
noConsignee: undefined,
defaultPay: undefined,
defaultBilling: undefined,
};
form.customerContacts = JSON.parse(
JSON.stringify(this.form.customerContacts)
......
......@@ -47,7 +47,7 @@
<el-input
:placeholder="$t('请输入联系方式')"
v-model.trim="queryParams.defaultContactPhone"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
@input="queryParams.defaultContactPhone=queryParams.defaultContactPhone.replace(/\s+/g, '')"
></el-input>
</el-form-item>
<el-form-item :label="$t('客户类别')" prop="level">
......@@ -307,6 +307,30 @@
>{{ $t("合并客户") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultPay"
v-hasPermi="['ecw:customer:change-customer-default-pay']"
>{{ $t("设置默认付款") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setNoConsignee"
v-hasPermi="['ecw:customer:change-customer-no-consignee']"
>{{ $t("设置默认控货无收货人") }}</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
......@@ -1068,7 +1092,7 @@ import customerComplaints from "@/components/customerComplaints";
import { listServiceUser } from "@/api/system/user";
import { getCountryListAll } from "@/api/ecw/country";
import { getCreditPage } from "@/api/customer/credit";
import { customerExportExcel } from "@/api/ecw/customer";
import { customerExportExcel, changeCustomerDefaultPay, changeCustomerNoConsignee} from "@/api/ecw/customer";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue";
......@@ -1588,6 +1612,24 @@ export default {
})
.catch(() => {});
},
setDefaultPay() {
changeCustomerDefaultPay({
customerIdList: this.selectCustomerList,
defaultPay: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
setNoConsignee() {
changeCustomerNoConsignee({
customerIdList: this.selectCustomerList,
noConsigee: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
}
},
};
</script>
......@@ -626,9 +626,35 @@
</el-tab-pane>
</el-tabs>
<el-card style="margin-top: 15px;">
<h3>{{$t('银行账户')}}</h3>
<el-table :data="customer.customerBankBackVOList" border>
<el-table-column :label="$t('编号')" type="index"></el-table-column>
<el-table-column :label="$t('账户名称')" prop="accountName"></el-table-column>
<el-table-column :label="$t('币别')">
<template v-slot="{row}">
{{$l(currecyList.find(i => row.currency == i.id),'title')}}
</template>
</el-table-column>
<el-table-column :label="$t('银行名称')" prop="bankName"></el-table-column>
<el-table-column :label="$t('银行账户')" prop="bankAccount"></el-table-column>
<el-table-column :label="$t('银行代码')" prop="bankCode"></el-table-column>
<el-table-column :label="$t('账户类型')">
<template v-slot="{row}">
{{Number(row.accountType) === 1 ? $t('公账') : $t('私账')}}
</template>
</el-table-column>
<el-table-column :label="$t('状态')">
<template v-slot="{row}">
{{row.status ? $t('正常') : $t('停用')}}
</template>
</el-table-column>
<el-table-column :label="$t('银行地址')" prop="bankAddress"></el-table-column>
</el-table>
</el-card>
<el-card style="margin-top: 15px">
<h3>{{$t('联系人')}}</h3>
<el-table
:data="customerContacts"
style="width: 100%"
......@@ -687,33 +713,6 @@
</el-table-column>
</el-table>
</el-card>
<el-card style="margin-top: 15px;">
<h3>{{$t('银行账户')}}</h3>
<el-table :data="customer.customerBankBackVOList" border>
<el-table-column :label="$t('编号')" type="index"></el-table-column>
<el-table-column :label="$t('账户名称')" prop="accountName"></el-table-column>
<el-table-column :label="$t('币别')">
<template v-slot="{row}">
{{$l(currecyList.find(i => row.currency == i.id),'title')}}
</template>
</el-table-column>
<el-table-column :label="$t('银行名称')" prop="bankName"></el-table-column>
<el-table-column :label="$t('银行账户')" prop="bankAccount"></el-table-column>
<el-table-column :label="$t('银行代码')" prop="bankCode"></el-table-column>
<el-table-column :label="$t('账户类型')">
<template v-slot="{row}">
{{Number(row.accountType) === 1 ? $t('公账') : $t('私账')}}
</template>
</el-table-column>
<el-table-column :label="$t('状态')">
<template v-slot="{row}">
{{row.status ? $t('正常') : $t('停用')}}
</template>
</el-table-column>
<el-table-column :label="$t('银行地址')" prop="bankAddress"></el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
......
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