Commit 61f0c4bb authored by yujinyao's avatar yujinyao

客户设置

parent 0b716b8c
......@@ -530,7 +530,7 @@ export function changeCustomerDefaultBilling(data){
export function customerSettingButton(data){
return request({
url:'ecw/customer/change-customer-arrival-confirm',
url:'ecw/customer/update-customer-setup',
method:'put',
data
})
......
......@@ -106,6 +106,7 @@ export default {
return {
dialogVisible: false,
form: {
id: 0,
isShowTidanPrice: false,
arrivalConfirm: 0,
weightUnit: null,
......@@ -151,7 +152,7 @@ export default {
getCustomer(this.customerId).then((response) => {
const row = response.data
this.form = {
customerId: row.id,
id: row.id,
isShowTidanPrice: row.isShowTidanPrice,
arrivalConfirm: row.arrivalConfirm,
weightUnit: row.weightUnit,
......
......@@ -591,42 +591,6 @@
>{{ $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>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
......@@ -889,7 +853,7 @@
>{{ $t("报价") }}</el-button
>
<el-button
v-has-permi="[selectAuthorityFn('ecw:customer:treat-quoted-price')]"
v-has-permi="['ecw:customer:setting']"
size="mini"
type="text"
icon="el-icon-user"
......@@ -1401,7 +1365,7 @@
<customer-setting
ref="customerSetting"
@refresh="getList"
/>
></customer-setting>
<!--业绩类型 -->
<el-dialog title="业绩类型" :visible.sync="dialogVisible" width="30%">
<div>
......@@ -2119,6 +2083,12 @@ export default {
this.getList()
})
},
handleSetting(row) {
this.$refs['customerSetting'].dialogVisible = true
this.$nextTick(_ => {
this.$refs['customerSetting'].init(row.id)
})
},
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
......@@ -2133,12 +2103,6 @@ export default {
return null
}
},
handleSetting(row) {
this.$refs['customerSetting'].dialogVisible = true
this.$nextTick(_ => {
this.$refs['customerSetting'].init(row.id)
})
},
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
......
......@@ -387,42 +387,6 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:treat-export']">{{$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>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -598,7 +562,15 @@
</router-link>
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:customer:treat-perfect']">{{$t('完善')}}</el-button>
<!-- <el-button v-has-permi="['ecw:customer:treat-recovery']" size="mini" type="text" @click="recovery(scope.row)" > {{$t('回收客户')}} </el-button>-->
<!-- <el-button v-has-permi="['ecw:customer:treat-recovery']" size="mini" type="text" @click="recovery(scope.row)" > {{$t('回收客户')}} </el-button>-->
<el-button
v-has-permi="['ecw:customer:setting']"
size="mini"
type="text"
icon="el-icon-user"
@click="handleSetting(scope.row)"
>{{ $t("设置") }}</el-button
>
</template>
</el-table-column>
......@@ -835,6 +807,7 @@ import {getCountryListAll} from "@/api/ecw/country";
import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import CustomerSetting from "../customer/components/customerSetting.vue";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getNodeList } from "@/api/ecw/node";
import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee,changeCustomerDefaultBilling } from "@/api/ecw/customer";
......@@ -919,7 +892,8 @@ export default {
components: {
Contacts,
transferCustomer,
AreaCodeSelector
AreaCodeSelector,
CustomerSetting
},
data() {
return {
......@@ -1252,19 +1226,11 @@ export default {
customerIdList : undefined
};
},
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.countryList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn)
}
handleSetting(row) {
this.$refs['customerSetting'].dialogVisible = true
this.$nextTick(_ => {
this.$refs['customerSetting'].init(row.id)
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getBusiCountryNames(ids) {
if (ids) {
......@@ -1321,34 +1287,7 @@ export default {
} else {
return null
}
},
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()
})
},
setDefaultBilling() {
changeCustomerDefaultBilling({
customerIdList: this.selectCustomerList,
defaultBilling: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
}
}
};
</script>
......@@ -394,42 +394,6 @@
v-hasPermi="['ecw:customer:distribution-transfer']">{{$t('批量移交')}}</el-button>
</el-col>
</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>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -585,6 +549,14 @@
v-hasPermi="['ecw:customer:distribution-delete']">{{$t('删除')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="distribution(scope.row)"
v-hasPermi="['ecw:customer:distribution-customer-service']">{{$t('分配客服')}}</el-button>
<el-button
v-has-permi="['ecw:customer:setting']"
size="mini"
type="text"
icon="el-icon-user"
@click="handleSetting(scope.row)"
>{{ $t("设置") }}</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -628,6 +600,7 @@ import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import CustomerSetting from "../customer/components/customerSetting.vue";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getNodeList } from "@/api/ecw/node";
import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee,changeCustomerDefaultBilling } from "@/api/ecw/customer";
......@@ -645,7 +618,8 @@ export default {
Template,
upload,
transferCustomer,
AreaCodeSelector
AreaCodeSelector,
CustomerSetting
},
data() {
return {
......@@ -963,19 +937,11 @@ export default {
})
}).catch(() => {});
},
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.countryList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn)
}
handleSetting(row) {
this.$refs['customerSetting'].dialogVisible = true
this.$nextTick(_ => {
this.$refs['customerSetting'].init(row.id)
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getBusiCountryNames(ids) {
if (ids) {
......
......@@ -428,42 +428,6 @@
>{{ $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>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
......@@ -714,6 +678,14 @@
@click="quote(scope.row)"
>{{ $t("报价") }}</el-button
>
<el-button
v-has-permi="['ecw:customer:setting']"
size="mini"
type="text"
icon="el-icon-user"
@click="handleSetting(scope.row)"
>{{ $t("设置") }}</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -740,6 +712,10 @@
:show.sync="show"
:customer-ids.sync="selectCustomerList"
></transfer-customer>
<customer-setting
ref="customerSetting"
@refresh="getList"
></customer-setting>
</div>
</template>
......@@ -763,7 +739,7 @@ import { getCreditPage } from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import CustomerSetting from "../customer/components/customerSetting.vue";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getNodeList } from "@/api/ecw/node";
import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee, changeCustomerDefaultBilling } from "@/api/ecw/customer";
......@@ -778,7 +754,8 @@ export default {
customerFollowList,
customerComplaints,
transferCustomer,
AreaCodeSelector
AreaCodeSelector,
CustomerSetting
},
computed: {
isChinese() {
......@@ -1251,31 +1228,10 @@ export default {
this.$refs["customerComplaint"].handleAdd();
});
},
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()
})
},
setDefaultBilling() {
changeCustomerDefaultBilling({
customerIdList: this.selectCustomerList,
defaultBilling: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
handleSetting(row) {
this.$refs['customerSetting'].dialogVisible = true
this.$nextTick(_ => {
this.$refs['customerSetting'].init(row.id)
})
},
getBusiCountryNames(ids) {
......
......@@ -512,42 +512,6 @@
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<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>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
</el-row>
<!-- 列表 -->
......@@ -721,7 +685,7 @@
<span >{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column width="100px" :label="$t('操作')" align="center" fixed="right">
<el-table-column width="200px" :label="$t('操作')" align="center" fixed="right">
<template slot-scope="scope">
<router-link :to="'/customer/query/' + scope.row.id">
<el-button
......@@ -729,6 +693,7 @@
size="mini"
style="margin-right: 10px"
type="text"
icon="el-icon-view"
>查看</el-button
>
</router-link>
......@@ -737,9 +702,18 @@
v-has-permi="['ecw:customer:sea-gain']"
size="mini"
type="text"
icon="el-icon-edit"
@click="fishingFn(scope.row)"
>{{ $t("捞取") }}</el-button
>
<el-button
v-has-permi="['ecw:customer:setting']"
size="mini"
type="text"
icon="el-icon-user"
@click="handleSetting(scope.row)"
>{{ $t("设置") }}</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -787,6 +761,10 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<customer-setting
ref="customerSetting"
@refresh="getList"
></customer-setting>
</div>
</template>
......@@ -808,6 +786,7 @@ import { getCountryListAll } from "@/api/ecw/country";
import { getCreditPage } from "@/api/customer/credit";
import Template from "@/views/cms/template/index.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import CustomerSetting from "../customer/components/customerSetting.vue";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getNodeList } from "@/api/ecw/node";
import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee,changeCustomerDefaultBilling } from "@/api/ecw/customer";
......@@ -823,7 +802,8 @@ export default {
Contacts,
Template,
upload,
AreaCodeSelector
AreaCodeSelector,
CustomerSetting
},
data() {
return {
......@@ -1297,19 +1277,11 @@ export default {
this.multipleSelection = val;
this.selectCustomerList = val.map((i) => i.id);
},
getBusiCountryNames(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
this.countryList.forEach(item => {
if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn)
}
handleSetting(row) {
this.$refs['customerSetting'].dialogVisible = true
this.$nextTick(_ => {
this.$refs['customerSetting'].init(row.id)
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getBusiCountryNames(ids) {
if (ids) {
......@@ -1367,33 +1339,6 @@ export default {
return null
}
},
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()
})
},
setDefaultBilling() {
changeCustomerDefaultBilling({
customerIdList: this.selectCustomerList,
defaultBilling: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
},
};
</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