123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- <template>
- <div>
- <div class="sty">
- <el-page-header @back="goBack" content="详情页面"></el-page-header>
- </div>
- <el-form :model="infoList" label-width="130px" size="small" label-position="right">
- <el-card class="">
- <div slot="header" class="clearfix">
- <strong>客户</strong>
- </div>
- <div>
- <!-- <el-form label-width="130px" size="small" label-position="right"> -->
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="创建组织" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="客户编码" prop="">
- <el-input v-model="infoList.number"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="使用组织" prop="">
- <el-input v-model="infoList.useOrgName"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="简称" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- </el-form> -->
- </div>
- </el-card>
- <br />
- <el-card class="">
- <div slot="header" class="clearfix">
- <strong>基本信息</strong>
- </div>
- <span>地址</span>
- <el-divider></el-divider>
- <div>
- <!-- <el-form label-width="130px" size="small" label-position="right"> -->
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="国家" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="地区" prop="">
- <el-input v-model="infoList.region"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="省份" prop="">
- <el-input v-model="infoList.province"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="城市" prop="">
- <el-input v-model="infoList.city"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="通信地址" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="邮政编码" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="公司网址" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="商城订单对应组织" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="联系邮箱" prop="">
- <el-input v-model="infoList.email"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- </el-form> -->
- </div>
- <span>管理</span>
- <el-divider></el-divider>
- <div>
- <!-- <el-form label-width="130px" size="small" label-position="right"> -->
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="联系电话" prop="">
- <el-input v-model="infoList.mobile"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="传真" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="公司类别" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="公司性质" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="公司规模" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- </el-form> -->
- </div>
- <span>相关</span>
- <el-divider></el-divider>
- <div>
- <!-- <el-form label-width="130px" size="small" label-position="right"> -->
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="对应供应商" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="对应集团客户" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="客户类别" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="客户分组" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="集团客户" prop="">
- <el-checkbox></el-checkbox>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="默认付款方" prop="">
- <el-checkbox></el-checkbox>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="不校验可发量" prop="">
- <el-checkbox></el-checkbox>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="对应组织" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="备注" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- </el-form> -->
- </div>
- <span>开票信息</span>
- <el-divider></el-divider>
- <div>
- <!-- <el-form label-width="130px" size="small" label-position="right"> -->
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="发票抬头" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="纳税登记号" prop="">
- <el-input></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="开户银行" prop="">
- <el-input v-model="infoList.bank"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="银行账号" prop="">
- <el-input v-model="infoList.bankAccount"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="开票联系电话" prop="">
- <el-input v-model="infoList.invoicePhone"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="开票通讯地址" prop="">
- <el-input v-model="infoList.invoiceAddress"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- </el-form> -->
- </div>
- <span>智慧订货</span>
- <el-divider></el-divider>
- <div>
- <!-- <el-form label-width="130px" size="small" label-position="right"> -->
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="允许对接智慧订单" prop="">
- <el-checkbox></el-checkbox>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- </el-form> -->
- </div>
- </el-card>
- </el-form>
- <br />
- <el-card>
- <div slot="header" class="clearfix">
- <strong>信用额度</strong>
- </div>
- <div class="diy-table-1">
- <el-row :gutter="0" class="xyed">
- <div v-for="(v, i) in infoList.customerWallets" :key="i" v-show="v.type == 'COMMONLY'">
- <el-col :span="12" class="item">
- <div class="label">信用额度</div>
- <div class="value">{{ v.freeCreditAmount }}</div>
- </el-col>
- <el-col :span="12" class="item">
- <div class="label">钱包类型</div>
- <div class="value">{{ v.customerWalletName }}-{{ v.type == 'COMMONLY' ? '普通钱包' : '返利钱包' }}</div>
- </el-col>
- </div>
- </el-row>
- </div>
- </el-card>
- <br />
- <el-card>
- <div slot="header" class="clearfix">
- <strong>标签信息</strong>
- </div>
- <div class="diy-table-1" style="width: 100%">
- <el-form label-width="120px" class="demo-ruleForm">
- <el-row>
- <el-col :span="6">
- <el-form-item label="集团客户" prop="">
- <el-radio v-model="infoList.isGroupCompany" :label="true">是</el-radio>
- <el-radio v-model="infoList.isGroupCompany" :label="false">否</el-radio>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="是否可转折让" prop="">
- <el-radio v-model="infoList.isZr" :label="true">是</el-radio>
- <el-radio v-model="infoList.isZr" :label="false">否</el-radio>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label-width="0px"> 注:设置后返利可以转入折让钱包 </el-form-item>
- </el-col>
- <!-- <el-col :span="12">
- <el-form-item label="是否前置仓" prop="">
- <el-radio v-model="infoList.isFront" :label="true">前置仓</el-radio>
- <el-radio v-model="infoList.isFront" :label="false">经销商自有仓库</el-radio>
- <el-button type="primary" size="mini" @click="handelSubmit">修改</el-button>
- </el-form-item>
- </el-col> -->
- </el-row>
- <el-col>
- <el-form-item label="分子公司">
- <el-tag class="tagStyle" v-for="v in infoList.kingDeeCustomers" :key="v.id">{{ v.name }}</el-tag>
- </el-form-item>
- </el-col>
- <el-col>
- <el-form-item label="提货方式">
- <el-col :span="12">
- <div>
- <el-checkbox v-model="isFront" :label="true"> 物流配送(嘉贤物流)</el-checkbox>
- </div>
- <div>选择商家自提需配置物流产品类别</div>
- <div>
- <el-checkbox-group v-model="frontCategory">
- <el-checkbox v-for="(item, index) in dataList" :key="index" :label="item.id">
- {{ item.name }}
- </el-checkbox>
- </el-checkbox-group>
- </div>
- </el-col>
- <el-col :span="12">
- <div>
- <el-checkbox v-model="isPick" :label="true">商家自提</el-checkbox>
- </div>
- <div>选择商家自提需配置自提产品类别</div>
- <div>
- <el-checkbox-group v-model="pickCategory">
- <el-checkbox v-for="(item, index) in dataList" :key="index" :label="item.id">
- {{ item.name }}
- </el-checkbox>
- </el-checkbox-group>
- </div>
- </el-col>
- <div>注:设置配送方式后提货预约可根据配置的提货方式进行选择</div>
- <div>
- <el-button type="primary" size="default" @click="onSubmit">保存</el-button>
- </div>
- </el-form-item>
- </el-col>
- </el-form>
- </div>
- </el-card>
- </div>
- </template>
- <script>
- import { getKingDeeCategory } from '@/api/basic_data/material'
- import { getDealerInfo, updateCustomer, updatePick } from '@/api/basic_data/dealer'
- export default {
- props: {
- detailsId: {
- type: String,
- required: true
- }
- },
- data() {
- return {
- infoList: {},
- dataList: [],
- radio: [],
- isFront:false,
- isPick:false,
- pickCategory: [],
- frontCategory: []
- }
- },
- async created() {
- this.getDataList()
- const res = await getDealerInfo({ id: this.detailsId })
- this.isFront = res.data.isFront
- this.isPick = res.data.isPick
- if (res.data.kingDeeCustomerCategoriesFront&& res.data.kingDeeCustomerCategoriesFront.length) {
- this.frontCategory = res.data.kingDeeCustomerCategoriesFront.map(k => {
- return k.categoryId
- })
- }
- if (res.data.kingDeeCustomerCategories&& res.data.kingDeeCustomerCategories.length) {
- this.pickCategory = res.data.kingDeeCustomerCategories.map(k => {
- return k.categoryId
- })
- }
- this.infoList = res.data
- },
- methods: {
- goBack() {
- this.$emit('close')
- },
- //金蝶存货类别列表
- async getDataList() {
- const res = await getKingDeeCategory()
- this.dataList = res.data
- },
- handelSubmit() {
- updateCustomer({
- id: this.infoList.id,
- isFront: this.infoList.isFront
- }).then(res => {
- this.$successMsg(this.infoList.isFront ? '已更改为前置仓' : '已更改为经销商自有仓库')
- })
- },
- onSubmit() {
- if (!this.isFront && !this.isPick) {
- this.$errorMsg('必须选择一种提货方式')
- return
- }
- if ((this.isFront && !this.frontCategory.length) || (this.isPick && !this.pickCategory.length)) {
- this.$errorMsg('必须选择产品类别')
- return
- }
-
- updatePick({
- id: this.detailsId,
- isFront: this.isFront?this.isFront:false,
- isPick: this.isPick?this.isPick:false,
- pickCategory:this.isPick? this.pickCategory.join(','):'',
- frontCategory:this.isFront? this.frontCategory.join(','):''
- }).then(res => {
- this.$successMsg('保存成功')
- this.$emit('close')
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .sty {
- margin-bottom: 20px;
- }
- ::v-deep .diy-table-1 {
- width: 50%;
- .xyed {
- border-top: 1px solid #ebeef5;
- .item {
- margin-bottom: 18px;
- }
- }
- }
- .tagStyle {
- margin: 0 18px;
- }
- </style>
|