add.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. <template>
  2. <!--上级企业 负责人-->
  3. <div>
  4. <el-button size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
  5. <el-drawer
  6. direction="rtl"
  7. append-to-body
  8. title="新建公海客户"
  9. :show-close="false"
  10. :visible.sync="dialogFormVisible"
  11. @close="onClose"
  12. size="600px">
  13. <div class="drawer__panel">
  14. <el-row :gutter="20">
  15. <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
  16. <el-col :span="20">
  17. <el-form-item label="客户名称:" prop="enterprisename">
  18. <el-input v-model="form.enterprisename" placeholder="客户名称"></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :span="4">
  22. <el-popover
  23. placement="right"
  24. width="900"
  25. v-model="businessShow"
  26. trigger="manual">
  27. <el-input
  28. style="width:300px;margin-bottom: 10px"
  29. placeholder="请输入内容"
  30. v-model="form.enterprisename"
  31. clearable
  32. @clear="businessSearch"
  33. size="mini"
  34. @keyup.enter.native="businessSearch">
  35. <i slot="prefix" class="el-icon-search" @click="businessSearch"></i>
  36. </el-input>
  37. <el-table :data="businessData" @row-click="businessSelect" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
  38. <el-table-column width="260" label="客户名称">
  39. <template slot-scope="scope">
  40. <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="客户地址">
  44. <template slot-scope="scope">
  45. <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column width="200" label="客户税号">
  49. <template slot-scope="scope">
  50. <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. <!-- <div class="container normal-panel" style="text-align:right">
  55. <el-pagination
  56. background
  57. @size-change="handleSizeChange"
  58. @current-change="handleCurrentChange"
  59. :current-page="currentPage"
  60. :page-sizes="[5]"
  61. layout="total,sizes, prev, pager, next, jumper"
  62. :total="total">
  63. </el-pagination>
  64. </div>-->
  65. <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === ''">工商查询</el-button>
  66. </el-popover>
  67. </el-col>
  68. <el-col :span="24">
  69. <el-form-item label="企业简称:" prop="abbreviation">
  70. <el-input v-model="form.abbreviation" placeholder="企业简称"></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <!-- <el-col :span="24">
  74. <el-form-item label="erp编号:" prop="erpagentnum">
  75. <el-input v-model="form.erpagentnum" placeholder="请输入erp编号" style="width: 100%"></el-input>
  76. </el-form-item>
  77. </el-col>-->
  78. <el-col :span="24">
  79. <el-form-item label="客户类型:" prop="type">
  80. <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
  81. <el-option
  82. v-for="item in customerType()"
  83. :key="item.value"
  84. :label="item.value"
  85. :value="item.value">
  86. <!-- <span style="float: left">{{ item.value }}</span>
  87. <span v-if="item.remarks !== ''" style="float: right; color: #8492a6; font-size: 10px">{{ item.remarks }}</span>-->
  88. <span style="float: left">{{ item.value }}</span>
  89. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
  90. </el-option>
  91. </el-select>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :span="24">
  95. <el-form-item label="客户等级:" >
  96. <el-select v-model="form.grade" placeholder="请选择客户等级" style="width: 100%">
  97. <el-option
  98. v-for="item in options.customerGrade"
  99. :key="item.rowindex"
  100. :label="item.value "
  101. :value="item.value">
  102. <span style="float: left">{{ item.value }}</span>
  103. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
  104. </el-option>
  105. </el-select>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="24">
  109. <el-form-item label="客户分类:" >
  110. <el-select v-model="form.customergrade" placeholder="请选择客户分类" style="width: 100%">
  111. <el-option
  112. v-for="item in options.customerClassification"
  113. :key="item.rowindex"
  114. :label="item.value "
  115. :value="item.value">
  116. <span style="float: left">{{ item.value }}</span>
  117. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
  118. </el-option>
  119. </el-select>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="24">
  123. <el-form-item label="客户行业:" >
  124. <el-select
  125. ref="sle"
  126. style="width:100%;"
  127. v-model="form.industry"
  128. multiple
  129. placeholder="请选择所属行业"
  130. size="mini"
  131. >
  132. <el-option
  133. v-for="item in options.industryData"
  134. :key="item.value"
  135. :label="item.value"
  136. :value="item.value"
  137. >
  138. <span style="float: left">{{ item.value }}</span>
  139. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
  140. </el-option>
  141. </el-select>
  142. </el-form-item>
  143. </el-col>
  144. <el-col :span="24">
  145. <el-form-item label="税号:" prop="taxno">
  146. <el-input v-model="form.taxno" placeholder="税号"></el-input>
  147. </el-form-item>
  148. </el-col>
  149. <el-col :span="24">
  150. <el-form-item label="法人:" prop="contact">
  151. <el-input v-model="form.contact" placeholder="请输入法人信息" style="width: 100%"></el-input>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="24">
  155. <el-form-item label="联系电话:" prop="telephone">
  156. <el-input v-model="form.telephone" placeholder="请输入联系电话" style="width: 100%"></el-input>
  157. </el-form-item>
  158. </el-col>
  159. <el-col :span="24">
  160. <el-form-item label="省市县:" prop="province">
  161. <el-cascader
  162. style="width: 100%"
  163. v-model="value"
  164. :options="basicData.data().areaData"
  165. @change="cascaderChange" clearable>
  166. </el-cascader>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :span="24">
  170. <el-form-item label="详细地址:" prop="address">
  171. <el-input v-model="form.address" placeholder="详细地址"></el-input>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="24">
  175. <el-form-item label="上级企业:" >
  176. <el-popover
  177. placement="bottom"
  178. width="700"
  179. trigger="click"
  180. v-model="customerShow"
  181. @show="customerList">
  182. <el-input
  183. style="width:300px;margin-bottom: 10px"
  184. placeholder="请输入内容"
  185. v-model="customerParam.content.where.condition"
  186. clearable
  187. @clear="customerList(customerParam.content.pageNumber = 1)"
  188. size="mini"
  189. @keyup.enter.native="customerList(customerParam.content.pageNumber = 1)">
  190. <i slot="prefix" class="el-icon-search" @click="customerList(customerParam.content.pageNumber = 1)"></i>
  191. </el-input>
  192. <el-table :data="customer.customerData" @row-click="customerData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
  193. <el-table-column
  194. label="客户编号"
  195. width="180">
  196. <template slot-scope="scope">
  197. <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
  198. </template>
  199. </el-table-column>
  200. <el-table-column
  201. label="客户名称"
  202. width="200">
  203. <template slot-scope="scope">
  204. <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
  205. </template>
  206. </el-table-column>
  207. <el-table-column
  208. label="地址"
  209. >
  210. <template slot-scope="scope">
  211. <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
  212. </template>
  213. </el-table-column>
  214. </el-table>
  215. <div class="container normal-panel" style="text-align:right">
  216. <el-pagination
  217. background
  218. small
  219. @size-change="handleSizeChangeCustomer"
  220. @current-change="handleCurrentChangeCustomer"
  221. :page-sizes="[10,20,50,100,]"
  222. layout="total,sizes, prev, pager, next, jumper"
  223. :current-page="customer.currentPage"
  224. :total="customer.total">
  225. </el-pagination>
  226. </div>
  227. <el-input slot="reference" :readonly="true" v-model="form.superiorenterprisename" autocomplete="off" placeholder="请选择客户" @input="selectCustomer"></el-input>
  228. </el-popover>
  229. </el-form-item>
  230. </el-col>
  231. <el-col :span="24">
  232. <el-form-item label="客户来源:" prop="source">
  233. <el-input v-model="form.source" placeholder="客户来源"></el-input>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="24">
  237. <el-form-item label="公海池:" prop="sa_customerpoolid">
  238. <el-select v-model="form.sa_customerpoolid" placeholder="请选择公海池" size="small">
  239. <el-option
  240. v-for="item in publicList()"
  241. :key="item.sa_customerpoolid"
  242. :label="item.poolname"
  243. :value="item.sa_customerpoolid">
  244. </el-option>
  245. </el-select>
  246. </el-form-item>
  247. </el-col>
  248. </el-form>
  249. </el-row>
  250. </div>
  251. <div class="fixed__btn__panel">
  252. <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
  253. <duplicateCheck ref="check" :data="form" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
  254. <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
  255. </div>
  256. </el-drawer>
  257. </div>
  258. </template>
  259. <script>
  260. import duplicateCheck from "@/components/duplicatesCheck/publicCustomerCheck";
  261. export default {
  262. name: "add",
  263. inject:['customerLead','customerType','arealist','publicList'],
  264. components:{duplicateCheck},
  265. data(){
  266. return {
  267. dialogFormVisible:false,
  268. isordercheck:true,
  269. isusedcheck:false,
  270. customerShow:false,
  271. checkResults:'',
  272. businessData:[],
  273. businessParam:{
  274. "id": 20221208103601,
  275. "content": {
  276. "pageNumber":1,
  277. "pageSize":5,
  278. "keyword":''
  279. },
  280. },
  281. businessShow:false,
  282. total:0,
  283. currentPage:0,
  284. options:{
  285. industryData:[],
  286. customerGrade:[],
  287. customerClassification:[],
  288. },
  289. form:{
  290. sa_customersid: 0,//新增是传0
  291. parentid: 0, //上级客户ID,默认或没有上级的时候传0
  292. sys_enterpriseid: 0, //合作企业档案ID,新增是传0,更新
  293. enterprisename:"",//客户名称(企业名称)
  294. type: "", //客户类型
  295. customergrade:'',//客户等级
  296. sa_customerpoolid: '', //客户池(公海池)ID,默认或没有的时候传0
  297. source: "", //客户来源
  298. province:"",//非必填,可选
  299. city:"",//非必填,可选
  300. county:"",//非必填,可选
  301. address:"",//非必填,可选
  302. abbreviation:"",//非必填,可选
  303. taxno:"",//税号,非必填,可选
  304. grade:'',// 客户等级(商户等级)
  305. industry:[],//非必填,可选,所属行业
  306. contact:"",//非必填,可选
  307. phonenumber:"",//非必填,可选
  308. ispublic:1,
  309. telephone: "",
  310. sa_agentsid: "",
  311. erpagentnum:""
  312. },
  313. value:'',
  314. rules:{
  315. enterprisename:[
  316. { required: true, message: '输入客户名称', trigger: 'blur'},
  317. ],
  318. type: [
  319. { required: true, message: '还未选择客户类型', trigger: 'change' },
  320. ],
  321. source:[
  322. { required: false, message: '请填写客户来源', trigger: 'blur'}
  323. ],
  324. sa_customerpoolid:[
  325. { required: true, message: '请选择公海池', trigger: 'blur'}
  326. ],
  327. contact: [
  328. { required: true, message: '请输入法人', trigger: 'blur' },
  329. ],
  330. telephone: [
  331. { required: true, message: '请输入联系电话', trigger: 'blur' },
  332. ],
  333. province: [
  334. { required: true, message: '请选择省市县', trigger: 'change' },
  335. ],
  336. },
  337. customerParam:{
  338. "id": 20220920083901,
  339. "content": {
  340. "pageNumber": 1,
  341. "pageSize": 10,
  342. "where": {
  343. "condition": "",
  344. "type":2,
  345. "sa_projectid":""
  346. }
  347. }
  348. },
  349. customer:{
  350. customerData:[],
  351. total:0,
  352. currentPage:0,
  353. },
  354. }
  355. },
  356. methods:{
  357. /*工商查询*/
  358. async businessSearch(){
  359. this.businessParam.content.keyword = this.form.enterprisename
  360. const res = await this.$api.requested(this.businessParam)
  361. console.log(res,"工商查询结果")
  362. this.businessData = res.data
  363. this.total = res.total
  364. this.currentPage = res.pageNumber
  365. this.businessShow = true
  366. },
  367. /*选择工商信息*/
  368. businessSelect(val){
  369. console.log("选择的工商信息",val)
  370. this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
  371. confirmButtonText: '确定',
  372. cancelButtonText: '取消',
  373. type: 'warning'
  374. }).then(() => {
  375. this.businessShow = false
  376. this.form.enterprisename = val.companyName
  377. this.form.address = val.address === "-" ? '' : val.address
  378. this.form.taxno = val.taxNum
  379. this.value = [val.regProvince,val.regCity,val.regArea]
  380. this.form.province = val.regProvince
  381. this.form.city = val.regCity
  382. this.form.county = val.regArea
  383. this.form.contact = val.legalPerson
  384. }).catch(() => {
  385. this.businessShow = false
  386. this.$message({
  387. type: 'info',
  388. message: '已取消更新'
  389. });
  390. })
  391. },
  392. /*handleSizeChange(val) {
  393. // console.log(`每页 ${val} 条`);
  394. this.param.content.pageSize = val
  395. this.businessSearch()
  396. },
  397. handleCurrentChange(val) {
  398. // console.log(`当前页: ${val}`);
  399. this.param.content.pageNumber = val
  400. this.businessSearch()
  401. },*/
  402. /*查重检查*/
  403. onCheck(){
  404. this.$refs.form.validate((valid) => {
  405. if (!valid) return false
  406. this.$refs.check.queryRule()
  407. })
  408. },
  409. /*自动查重判断*/
  410. duplicateCheck(){
  411. this.$refs.form.validate(async (valid) => {
  412. if (!valid) return false
  413. const res = await this.$api.requested({
  414. "id": 20221208172002,
  415. "content": {
  416. "sa_customersid":0,
  417. "enterprisename":this.form.enterprisename,
  418. "taxno":this.form.taxno,
  419. "address":this.form.address
  420. },
  421. })
  422. console.log(res,"查重结果")
  423. if (res.data.length !== 0){
  424. console.log("重复")
  425. }
  426. this.checkResults = res.data.length
  427. this.onSave()
  428. })
  429. },
  430. onSave(){
  431. this.$refs.form.validate((valid) => {
  432. if (!valid) return false
  433. this.$refs.check.creatShow = true
  434. this.$refs.check.queryRule()
  435. })
  436. },
  437. onSubmit(){
  438. this.$refs['form'].validate(async (valid) => {
  439. if (!valid) return false
  440. /*if (this.form.province) {
  441. this.form.city = this.form.province[1]
  442. this.form.county = this.form.province[2]
  443. this.form.province = this.form.province[0]
  444. }*/
  445. const res = await this.$api.requested({
  446. "id": "20221010164302",
  447. "version":1,
  448. "content": this.form
  449. })
  450. this.tool.showMessage(res,()=>{
  451. if (this.checkResults === 0){
  452. this.$emit('onSuccess')
  453. this.$refs['form'].resetFields();
  454. this.form = {
  455. "sa_customersid": 0,//新增是传0
  456. "parentid": 0, //上级客户ID,默认或没有上级的时候传0
  457. "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
  458. "enterprisename":"",//客户名称(企业名称)
  459. "type": "", //客户类型
  460. "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
  461. "source": "", //客户来源
  462. "province":"",//非必填,可选
  463. "city":"",//非必填,可选
  464. "county":"",//非必填,可选
  465. "address":"",//非必填,可选
  466. "abbreviation":"",//非必填,可选
  467. "taxno":"",//税号,非必填,可选
  468. "grade":'',// 客户等级(商户等级)
  469. "industry":"",//非必填,可选,所属行业
  470. "contact":"",//非必填,可选
  471. "phonenumber":""//非必填,可选
  472. }
  473. this.dialogFormVisible = false
  474. this.checkResults = ''
  475. this.value = ''
  476. }else {
  477. this.setTag(res.data.sa_customersid)
  478. }
  479. /*this.$router.push({path:'/PublicCustomerDetail',query:{id:res.data.sa_customersid,rowindex:0}})
  480. this.$store.dispatch('changeDetailDrawer',true)*/
  481. })
  482. })
  483. },
  484. async setTag(id){
  485. const res = await this.$api.requested({
  486. "id": 20220929090901,
  487. "content": {
  488. "ownertable":"sa_customers",
  489. "ownerid":id,
  490. "datatag":[
  491. "疑似重复",
  492. ]
  493. }
  494. })
  495. this.$emit('onSuccess')
  496. this.$refs['form'].resetFields();
  497. this.form = {
  498. "sa_customersid": 0,//新增是传0
  499. "parentid": 0, //上级客户ID,默认或没有上级的时候传0
  500. "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
  501. "enterprisename":"",//客户名称(企业名称)
  502. "type": "", //客户类型
  503. "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
  504. "source": "", //客户来源
  505. "province":"",//非必填,可选
  506. "city":"",//非必填,可选
  507. "county":"",//非必填,可选
  508. "address":"",//非必填,可选
  509. "abbreviation":"",//非必填,可选
  510. "taxno":"",//税号,非必填,可选
  511. "grade":'',// 客户等级(商户等级)
  512. "industry":"",//非必填,可选,所属行业
  513. "contact":"",//非必填,可选
  514. "phonenumber":""//非必填,可选
  515. }
  516. this.dialogFormVisible = false
  517. this.checkResults = ''
  518. this.value = ''
  519. },
  520. onClose(){
  521. this.$refs['form'].resetFields();
  522. this.form = {
  523. "sa_customersid": 0,//新增是传0
  524. "parentid": 0, //上级客户ID,默认或没有上级的时候传0
  525. "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
  526. "enterprisename":"",//客户名称(企业名称)
  527. "type": "", //客户类型
  528. "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
  529. "source": "", //客户来源
  530. "province":"",//非必填,可选
  531. "city":"",//非必填,可选
  532. "county":"",//非必填,可选
  533. "address":"",//非必填,可选
  534. "abbreviation":"",//非必填,可选
  535. "taxno":"",//税号,非必填,可选
  536. "grade":'',// 客户等级(商户等级)
  537. "industry":"",//非必填,可选,所属行业
  538. "contact":"",//非必填,可选
  539. "phonenumber":""//非必填,可选
  540. }
  541. this.dialogFormVisible = false
  542. this.checkResults = ''
  543. this.value = ''
  544. this.businessShow = false
  545. this.$emit('onSuccess')
  546. },
  547. cascaderChange (val) {
  548. this.form.province = val[0]
  549. if (val.length === 1)
  550. return this.form = Object.assign({},this.form,{province:val[0],city:'',county:''})
  551. this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
  552. this.$refs.form.validateField('province')
  553. },
  554. async customerList(){
  555. const res = await this.$api.requested(this.customerParam)
  556. this.customer.customerData = res.data
  557. this.customer.total = res.total
  558. this.customer.currentPage = res.pageNumber
  559. },
  560. selectCustomer(){
  561. this.customerParam.content.where.condition = this.form.enterprisename
  562. this.customerList()
  563. },
  564. /*客户选择信息*/
  565. customerData(val){
  566. this.form.parentid = val.sa_customersid
  567. this.form.superiorenterprisename = val.enterprisename
  568. this.customerShow = false
  569. },
  570. /*客户分页*/
  571. handleSizeChangeCustomer(val) {
  572. // console.log(`每页 ${val} 条`);
  573. this.customerParam.content.pageSize = val
  574. this.customerList()
  575. },
  576. handleCurrentChangeCustomer(val) {
  577. // console.log(`当前页: ${val}`);
  578. this.customerParam.content.pageNumber = val
  579. this.customerList()
  580. },
  581. /*行业列表*/
  582. async industryList(){
  583. const siteid = JSON.parse(sessionStorage.getItem('active_account')).siteid
  584. console.log("行业列表")
  585. const res = await this.$api.requested({
  586. "classname": "sysmanage.develop.optiontype.optiontype",
  587. "method": "optiontypeselect",
  588. "content": {
  589. "pageNumber": 1,
  590. "pageSize": 20,
  591. "typename": "industry",
  592. "parameter": {
  593. "siteid": siteid
  594. }
  595. }
  596. })
  597. this.options.industryData = res.data
  598. },
  599. /*客户分类*/
  600. async gradeList(){
  601. const siteid = JSON.parse(sessionStorage.getItem('active_account')).siteid
  602. const res = await this.$api.requested({
  603. "classname": "sysmanage.develop.optiontype.optiontype",
  604. "method": "optiontypeselect",
  605. "content": {
  606. "pageNumber": 1,
  607. "pageSize": 20,
  608. "typename": "customergrade",
  609. "parameter": {
  610. "siteid": siteid
  611. }
  612. }
  613. })
  614. console.log("客户等级",res.data)
  615. /*for (var i=0;i<res.data.length; i++){
  616. if (res.data[i].remarks !== ''){
  617. this.options.gradeData[i] = res.data[i].value + "——" + res.data[i].remarks
  618. }else{
  619. this.options.gradeData[i] = res.data[i].value
  620. }
  621. }*/
  622. this.options.customerClassification = res.data
  623. console.log("处理后客户等级",this.options.customerClassification)
  624. },
  625. /*客户等级*/
  626. queryCustomerGrade(){
  627. this.$store.dispatch('optiontypeselect','agentgrade').then(res=>{
  628. this.options.customerGrade = res.data
  629. })
  630. },
  631. checkSuccess(val){
  632. this.checkResults = val
  633. }
  634. },
  635. mounted() {
  636. this.industryList()
  637. this.gradeList()
  638. this.queryCustomerGrade()
  639. }
  640. }
  641. </script>
  642. <style scoped>
  643. /deep/.el-select,.el-cascader {
  644. width: 100%;
  645. }
  646. /deep/.el-input__prefix {
  647. display: flex;
  648. align-items: center;
  649. }
  650. </style>