dealer_list-detail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <template>
  2. <div>
  3. <div class="sty">
  4. <el-page-header @back="goBack" content="详情页面"></el-page-header>
  5. </div>
  6. <el-form :model="infoList" label-width="130px" size="small" label-position="right">
  7. <el-card class="">
  8. <div slot="header" class="clearfix">
  9. <strong>客户</strong>
  10. </div>
  11. <div>
  12. <!-- <el-form label-width="130px" size="small" label-position="right"> -->
  13. <el-row :gutter="20">
  14. <el-col :xs="24" :sm="12" :lg="6">
  15. <el-form-item label="创建组织" prop="">
  16. <el-input></el-input>
  17. </el-form-item>
  18. </el-col>
  19. <el-col :xs="24" :sm="12" :lg="6">
  20. <el-form-item label="客户编码" prop="">
  21. <el-input v-model="infoList.number"></el-input>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :xs="24" :sm="12" :lg="6">
  25. <el-form-item label="使用组织" prop="">
  26. <el-input v-model="infoList.useOrgName"></el-input>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :xs="24" :sm="12" :lg="6">
  30. <el-form-item label="简称" prop="">
  31. <el-input></el-input>
  32. </el-form-item>
  33. </el-col>
  34. </el-row>
  35. <!-- </el-form> -->
  36. </div>
  37. </el-card>
  38. <br />
  39. <el-card class="">
  40. <div slot="header" class="clearfix">
  41. <strong>基本信息</strong>
  42. </div>
  43. <span>地址</span>
  44. <el-divider></el-divider>
  45. <div>
  46. <!-- <el-form label-width="130px" size="small" label-position="right"> -->
  47. <el-row :gutter="20">
  48. <el-col :xs="24" :sm="12" :lg="6">
  49. <el-form-item label="国家" prop="">
  50. <el-input></el-input>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :xs="24" :sm="12" :lg="6">
  54. <el-form-item label="地区" prop="">
  55. <el-input v-model="infoList.region"></el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :xs="24" :sm="12" :lg="6">
  59. <el-form-item label="省份" prop="">
  60. <el-input v-model="infoList.province"></el-input>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :xs="24" :sm="12" :lg="6">
  64. <el-form-item label="城市" prop="">
  65. <el-input v-model="infoList.city"></el-input>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :xs="24" :sm="12" :lg="6">
  69. <el-form-item label="通信地址" prop="">
  70. <el-input></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :xs="24" :sm="12" :lg="6">
  74. <el-form-item label="邮政编码" prop="">
  75. <el-input></el-input>
  76. </el-form-item>
  77. </el-col>
  78. <el-col :xs="24" :sm="12" :lg="6">
  79. <el-form-item label="公司网址" prop="">
  80. <el-input></el-input>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :xs="24" :sm="12" :lg="6">
  84. <el-form-item label="商城订单对应组织" prop="">
  85. <el-input></el-input>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :xs="24" :sm="12" :lg="6">
  89. <el-form-item label="联系邮箱" prop="">
  90. <el-input v-model="infoList.email"></el-input>
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. <!-- </el-form> -->
  95. </div>
  96. <span>管理</span>
  97. <el-divider></el-divider>
  98. <div>
  99. <!-- <el-form label-width="130px" size="small" label-position="right"> -->
  100. <el-row :gutter="20">
  101. <el-col :xs="24" :sm="12" :lg="6">
  102. <el-form-item label="联系电话" prop="">
  103. <el-input v-model="infoList.mobile"></el-input>
  104. </el-form-item>
  105. </el-col>
  106. <el-col :xs="24" :sm="12" :lg="6">
  107. <el-form-item label="传真" prop="">
  108. <el-input></el-input>
  109. </el-form-item>
  110. </el-col>
  111. <el-col :xs="24" :sm="12" :lg="6">
  112. <el-form-item label="公司类别" prop="">
  113. <el-input></el-input>
  114. </el-form-item>
  115. </el-col>
  116. <el-col :xs="24" :sm="12" :lg="6">
  117. <el-form-item label="公司性质" prop="">
  118. <el-input></el-input>
  119. </el-form-item>
  120. </el-col>
  121. <el-col :xs="24" :sm="12" :lg="6">
  122. <el-form-item label="公司规模" prop="">
  123. <el-input></el-input>
  124. </el-form-item>
  125. </el-col>
  126. </el-row>
  127. <!-- </el-form> -->
  128. </div>
  129. <span>相关</span>
  130. <el-divider></el-divider>
  131. <div>
  132. <!-- <el-form label-width="130px" size="small" label-position="right"> -->
  133. <el-row :gutter="20">
  134. <el-col :xs="24" :sm="12" :lg="6">
  135. <el-form-item label="对应供应商" prop="">
  136. <el-input></el-input>
  137. </el-form-item>
  138. </el-col>
  139. <el-col :xs="24" :sm="12" :lg="6">
  140. <el-form-item label="对应集团客户" prop="">
  141. <el-input></el-input>
  142. </el-form-item>
  143. </el-col>
  144. <el-col :xs="24" :sm="12" :lg="6">
  145. <el-form-item label="客户类别" prop="">
  146. <el-input></el-input>
  147. </el-form-item>
  148. </el-col>
  149. <el-col :xs="24" :sm="12" :lg="6">
  150. <el-form-item label="客户分组" prop="">
  151. <el-input></el-input>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :xs="24" :sm="12" :lg="6">
  155. <el-form-item label="集团客户" prop="">
  156. <el-checkbox></el-checkbox>
  157. </el-form-item>
  158. </el-col>
  159. <el-col :xs="24" :sm="12" :lg="6">
  160. <el-form-item label="默认付款方" prop="">
  161. <el-checkbox></el-checkbox>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :xs="24" :sm="12" :lg="6">
  165. <el-form-item label="不校验可发量" prop="">
  166. <el-checkbox></el-checkbox>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :xs="24" :sm="12" :lg="6">
  170. <el-form-item label="对应组织" prop="">
  171. <el-input></el-input>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :xs="24" :sm="12" :lg="6">
  175. <el-form-item label="备注" prop="">
  176. <el-input></el-input>
  177. </el-form-item>
  178. </el-col>
  179. </el-row>
  180. <!-- </el-form> -->
  181. </div>
  182. <span>开票信息</span>
  183. <el-divider></el-divider>
  184. <div>
  185. <!-- <el-form label-width="130px" size="small" label-position="right"> -->
  186. <el-row :gutter="20">
  187. <el-col :xs="24" :sm="12" :lg="6">
  188. <el-form-item label="发票抬头" prop="">
  189. <el-input></el-input>
  190. </el-form-item>
  191. </el-col>
  192. <el-col :xs="24" :sm="12" :lg="6">
  193. <el-form-item label="纳税登记号" prop="">
  194. <el-input></el-input>
  195. </el-form-item>
  196. </el-col>
  197. <el-col :xs="24" :sm="12" :lg="6">
  198. <el-form-item label="开户银行" prop="">
  199. <el-input v-model="infoList.bank"></el-input>
  200. </el-form-item>
  201. </el-col>
  202. <el-col :xs="24" :sm="12" :lg="6">
  203. <el-form-item label="银行账号" prop="">
  204. <el-input v-model="infoList.bankAccount"></el-input>
  205. </el-form-item>
  206. </el-col>
  207. <el-col :xs="24" :sm="12" :lg="6">
  208. <el-form-item label="开票联系电话" prop="">
  209. <el-input v-model="infoList.invoicePhone"></el-input>
  210. </el-form-item>
  211. </el-col>
  212. <el-col :xs="24" :sm="12" :lg="6">
  213. <el-form-item label="开票通讯地址" prop="">
  214. <el-input v-model="infoList.invoiceAddress"></el-input>
  215. </el-form-item>
  216. </el-col>
  217. </el-row>
  218. <!-- </el-form> -->
  219. </div>
  220. <span>智慧订货</span>
  221. <el-divider></el-divider>
  222. <div>
  223. <!-- <el-form label-width="130px" size="small" label-position="right"> -->
  224. <el-row :gutter="20">
  225. <el-col :xs="24" :sm="12" :lg="6">
  226. <el-form-item label="允许对接智慧订单" prop="">
  227. <el-checkbox></el-checkbox>
  228. </el-form-item>
  229. </el-col>
  230. </el-row>
  231. <!-- </el-form> -->
  232. </div>
  233. </el-card>
  234. </el-form>
  235. <br />
  236. <el-card>
  237. <div slot="header" class="clearfix">
  238. <strong>信用额度</strong>
  239. </div>
  240. <div class="diy-table-1">
  241. <el-row :gutter="0" class="xyed">
  242. <div v-for="(v, i) in infoList.customerWallets" :key="i" v-show="v.type == 'COMMONLY'">
  243. <el-col :span="12" class="item">
  244. <div class="label">信用额度</div>
  245. <div class="value">{{ v.freeCreditAmount }}</div>
  246. </el-col>
  247. <el-col :span="12" class="item">
  248. <div class="label">钱包类型</div>
  249. <div class="value">{{ v.customerWalletName }}-{{ v.type == 'COMMONLY' ? '普通钱包' : '返利钱包' }}</div>
  250. </el-col>
  251. </div>
  252. </el-row>
  253. </div>
  254. </el-card>
  255. <br />
  256. <el-card>
  257. <div slot="header" class="clearfix">
  258. <strong>标签信息</strong>
  259. </div>
  260. <div class="diy-table-1" style="width: 100%">
  261. <el-form label-width="120px" class="demo-ruleForm">
  262. <el-row>
  263. <el-col :span="6">
  264. <el-form-item label="集团客户" prop="">
  265. <el-radio v-model="infoList.isGroupCompany" :label="true">是</el-radio>
  266. <el-radio v-model="infoList.isGroupCompany" :label="false">否</el-radio>
  267. </el-form-item>
  268. </el-col>
  269. <el-col :span="6">
  270. <el-form-item label="是否可转折让" prop="">
  271. <el-radio v-model="infoList.isZr" :label="true">是</el-radio>
  272. <el-radio v-model="infoList.isZr" :label="false">否</el-radio>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="12">
  276. <el-form-item label-width="0px"> 注:设置后返利可以转入折让钱包 </el-form-item>
  277. </el-col>
  278. <!-- <el-col :span="12">
  279. <el-form-item label="是否前置仓" prop="">
  280. <el-radio v-model="infoList.isFront" :label="true">前置仓</el-radio>
  281. <el-radio v-model="infoList.isFront" :label="false">经销商自有仓库</el-radio>
  282. <el-button type="primary" size="mini" @click="handelSubmit">修改</el-button>
  283. </el-form-item>
  284. </el-col> -->
  285. </el-row>
  286. <el-col>
  287. <el-form-item label="分子公司">
  288. <el-tag class="tagStyle" v-for="v in infoList.kingDeeCustomers" :key="v.id">{{ v.name }}</el-tag>
  289. </el-form-item>
  290. </el-col>
  291. <el-col>
  292. <el-form-item label="提货方式">
  293. <el-col :span="12">
  294. <div>
  295. <el-checkbox v-model="isFront" :label="true"> 物流配送(嘉贤物流)</el-checkbox>
  296. </div>
  297. <div>选择商家自提需配置物流产品类别</div>
  298. <div>
  299. <el-checkbox-group v-model="frontCategory">
  300. <el-checkbox v-for="(item, index) in dataList" :key="index" :label="item.id">
  301. {{ item.name }}
  302. </el-checkbox>
  303. </el-checkbox-group>
  304. </div>
  305. </el-col>
  306. <el-col :span="12">
  307. <div>
  308. <el-checkbox v-model="isPick" :label="true">商家自提</el-checkbox>
  309. </div>
  310. <div>选择商家自提需配置自提产品类别</div>
  311. <div>
  312. <el-checkbox-group v-model="pickCategory">
  313. <el-checkbox v-for="(item, index) in dataList" :key="index" :label="item.id">
  314. {{ item.name }}
  315. </el-checkbox>
  316. </el-checkbox-group>
  317. </div>
  318. </el-col>
  319. <div>注:设置配送方式后提货预约可根据配置的提货方式进行选择</div>
  320. <div>
  321. <el-button type="primary" size="default" @click="onSubmit">保存</el-button>
  322. </div>
  323. </el-form-item>
  324. </el-col>
  325. </el-form>
  326. </div>
  327. </el-card>
  328. </div>
  329. </template>
  330. <script>
  331. import { getKingDeeCategory } from '@/api/basic_data/material'
  332. import { getDealerInfo, updateCustomer, updatePick } from '@/api/basic_data/dealer'
  333. export default {
  334. props: {
  335. detailsId: {
  336. type: String,
  337. required: true
  338. }
  339. },
  340. data() {
  341. return {
  342. infoList: {},
  343. dataList: [],
  344. radio: [],
  345. isFront:false,
  346. isPick:false,
  347. pickCategory: [],
  348. frontCategory: []
  349. }
  350. },
  351. async created() {
  352. this.getDataList()
  353. const res = await getDealerInfo({ id: this.detailsId })
  354. this.isFront = res.data.isFront
  355. this.isPick = res.data.isPick
  356. if (res.data.kingDeeCustomerCategoriesFront&& res.data.kingDeeCustomerCategoriesFront.length) {
  357. this.frontCategory = res.data.kingDeeCustomerCategoriesFront.map(k => {
  358. return k.categoryId
  359. })
  360. }
  361. if (res.data.kingDeeCustomerCategories&& res.data.kingDeeCustomerCategories.length) {
  362. this.pickCategory = res.data.kingDeeCustomerCategories.map(k => {
  363. return k.categoryId
  364. })
  365. }
  366. this.infoList = res.data
  367. },
  368. methods: {
  369. goBack() {
  370. this.$emit('close')
  371. },
  372. //金蝶存货类别列表
  373. async getDataList() {
  374. const res = await getKingDeeCategory()
  375. this.dataList = res.data
  376. },
  377. handelSubmit() {
  378. updateCustomer({
  379. id: this.infoList.id,
  380. isFront: this.infoList.isFront
  381. }).then(res => {
  382. this.$successMsg(this.infoList.isFront ? '已更改为前置仓' : '已更改为经销商自有仓库')
  383. })
  384. },
  385. onSubmit() {
  386. if (!this.isFront && !this.isPick) {
  387. this.$errorMsg('必须选择一种提货方式')
  388. return
  389. }
  390. if ((this.isFront && !this.frontCategory.length) || (this.isPick && !this.pickCategory.length)) {
  391. this.$errorMsg('必须选择产品类别')
  392. return
  393. }
  394. updatePick({
  395. id: this.detailsId,
  396. isFront: this.isFront?this.isFront:false,
  397. isPick: this.isPick?this.isPick:false,
  398. pickCategory:this.isPick? this.pickCategory.join(','):'',
  399. frontCategory:this.isFront? this.frontCategory.join(','):''
  400. }).then(res => {
  401. this.$successMsg('保存成功')
  402. this.$emit('close')
  403. })
  404. }
  405. }
  406. }
  407. </script>
  408. <style lang="scss" scoped>
  409. .sty {
  410. margin-bottom: 20px;
  411. }
  412. ::v-deep .diy-table-1 {
  413. width: 50%;
  414. .xyed {
  415. border-top: 1px solid #ebeef5;
  416. .item {
  417. margin-bottom: 18px;
  418. }
  419. }
  420. }
  421. .tagStyle {
  422. margin: 0 18px;
  423. }
  424. </style>