provider-maintenance2.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396
  1. <!-- 供应商维护 -->
  2. <template>
  3. <div class="container">
  4. <Form :label-width="80" inline>
  5. <FormItem label="关键词">
  6. <Poptip trigger="focus" width="250" placement="bottom">
  7. <div slot="content">
  8. <ul style="" class="commons-select-search">
  9. <li :key="i.id" v-for="i in supplierList" @click="params.search = i.name">
  10. {{i.name}}
  11. </li>
  12. </ul>
  13. </div>
  14. <Input style="width:150px" v-model="params.search" @on-change="getSupplierSelectList" placeholder="请输入用途关键词"></Input>
  15. </Poptip>
  16. </FormItem>
  17. <Form-item label="按产品查看">
  18. <Select
  19. v-model="params.PurposeIndex"
  20. style="width: 150px"
  21. @on-change="selectPurposeFn"
  22. filterable
  23. >
  24. <div slot="empty">无匹配数据</div>
  25. <Option value="">全部</Option>
  26. <Option
  27. v-for="(i, index) in selectPurposeList"
  28. :value="i"
  29. :key="index"
  30. >{{ i }}</Option
  31. >
  32. </Select>
  33. </Form-item>
  34. <FormItem label="按账期查看">
  35. <Select v-model="params.accountDate" style="width:150px" >
  36. <div slot="empty">无匹配数据</div>
  37. <Option value="">全部</Option>
  38. <Option v-for="(i,index) in accountDateList" :value="i.value" :key="index">
  39. {{ i.label }}
  40. </Option>
  41. </Select>
  42. </FormItem>
  43. <FormItem label="按采购周期">
  44. <Select v-model="params.type" style="width:150px">
  45. <div slot="empty">无匹配数据</div>
  46. <Option value="">全部</Option>
  47. <Option v-for="(i,index) in safetyWarnDayList" :value="i.value" :key="index">
  48. {{ i.label }}
  49. </Option>
  50. </Select>
  51. </FormItem>
  52. <Button type="primary" @click="getStatisticsClassify();changePage(1)">查询</Button>
  53. <div style="float:right">
  54. <Button type="primary" style="margin-right:10px" @click="eventHandle('account')">收款账号维护</Button>
  55. <Button type="primary" style="margin-right:10px" @click="eventHandle('priceHandle')">价格维护</Button>
  56. <Button type="primary" @click="eventHandle('add')">添加</Button>
  57. </div>
  58. </Form>
  59. <div class="tabs-warp">
  60. <div
  61. @click="params.type = i.value;changePage(1);"
  62. :class="params.type == i.value ? 'active' : ''"
  63. v-for="i in statisticsClassifyData"
  64. :key="i.value">
  65. {{i.label}}
  66. </div>
  67. </div>
  68. <my-table :calcHeight="110" :data="data" :columns="columns" :table-page="params" @event-handle="eventHandle" @on-change="changePage"></my-table>
  69. <my-modal-form
  70. v-model="show"
  71. :title="title"
  72. :isMaterial="true"
  73. width="800px"
  74. :config="formType === 'add'? formConfig: formType === 'edit'? editFormConfig : showFormConfig"
  75. :rule-validate="ruleValidate"
  76. :data="formData"
  77. :type="formType"
  78. @confirm="cfm">
  79. </my-modal-form>
  80. <provider-account-form v-model="accountShow"></provider-account-form>
  81. <Modal
  82. v-model="accountDateRemarkModal"
  83. title="采购周期"
  84. >
  85. <Table :data="accountDateRemarkModalData" :columns="accountDateRemarkModalcolumns"></Table>
  86. </Modal>
  87. </div>
  88. </template>
  89. <script>
  90. import { GetFactoryPageList, FactoryAdd, FactoryUpdate, FactoryDelete, GetMaterialCategoryZTree } from '@/api/baseData'
  91. import { GetUserPageList } from '@/api/user'
  92. import MyTable from '_c/my-table/my-table2'
  93. import MyModalForm from '_c/my-modal-form/my-modal-form'
  94. import ProviderAccountForm from './provider-account-form'
  95. import axios from 'axios'
  96. import dun from '@/assets/images/dun.png'
  97. import renderListimgs from '_c/my-table/renderListimgs'
  98. export default {
  99. name: 'provider_maintenance',
  100. components: {
  101. MyTable,
  102. MyModalForm,
  103. ProviderAccountForm,
  104. renderListimgs
  105. },
  106. data () {
  107. const v = this
  108. return {
  109. dun:dun,
  110. technologyTypeList:['直喷','热转','打纸','墨水','其他','全部'],
  111. statisticsClassifyData:[],
  112. title: '',
  113. show: false,
  114. accountShow: false,
  115. supplierList:[],
  116. data: [],
  117. deleteId: '',
  118. formType: '',
  119. formData: {
  120. certificate:null,
  121. businessLicense:null,
  122. },
  123. ruleValidate: {
  124. // categoryCode: [
  125. // { required: true, message: '物料类型不能为空', trigger: 'blur' }
  126. // ],
  127. // name: [
  128. // { required: true, message: '供应商名称不能为空', trigger: 'blur' }
  129. // ],
  130. // accountDate: [
  131. // { required: true, message: '账期不能为空', trigger: 'blur' }
  132. // ],
  133. },
  134. formConfig: [
  135. {
  136. type: 'input',
  137. label: '供应商代码',
  138. key: 'code',
  139. disabled: true,
  140. placeholder: '系统自动生成',
  141. span: 12
  142. },
  143. // {
  144. // type: 'selectSearch',
  145. // label: '绑定用户',
  146. // key: 'bingdUserID',
  147. // list: [],
  148. // placeholder: '请输入绑定用户',
  149. // span: 12
  150. // },
  151. {
  152. type: 'input',
  153. label: '登录账户',
  154. key: 'bindUserAccount',
  155. placeholder: '请输入登录账户',
  156. span: 12
  157. },
  158. {
  159. type: 'selectSearch',
  160. label: '物料类型',
  161. key: 'materialClassifyId',
  162. list: [],
  163. placeholder: '请选择物料类型',
  164. span: 12
  165. },
  166. {
  167. type: 'upload',
  168. label: '供应商名称',
  169. text: '上传营业执照',
  170. key: 'name'
  171. },
  172. {
  173. type: 'input',
  174. label: '账期',
  175. key: 'accountDate',
  176. placeholder: '请输入账期',
  177. span: 12
  178. },
  179. {
  180. type: 'input',
  181. label: '账期说明',
  182. key: 'accountDateRemark',
  183. placeholder: '请输入账期说明',
  184. span: 12
  185. },
  186. {
  187. type: 'upload-flie',
  188. label: '营业执照',
  189. text: '上传营业执照',
  190. key: 'businessLicense',
  191. },
  192. {
  193. type: 'upload-flie',
  194. label: 'ca65',
  195. text: '加州65号法令合规测试证书',
  196. key: 'certificate'
  197. },
  198. {
  199. type: 'input',
  200. comType: 'textarea',
  201. label: '备注',
  202. key: 'remark',
  203. placeholder: '请输入仓库说明'
  204. },
  205. {
  206. type: 'tabs',
  207. hiddenLabel: true,
  208. tabs: [
  209. {
  210. title: '工商信息',
  211. forms: [
  212. {
  213. type: 'input',
  214. label: '法定代表人',
  215. key: 'legalPerson',
  216. placeholder: '请输入法定代表人',
  217. span: 12
  218. },
  219. {
  220. type: 'input',
  221. label: '社会信用代码',
  222. key: 'societyCreditCode',
  223. placeholder: '请输入社会信用代码',
  224. span: 12
  225. },
  226. {
  227. type: 'input',
  228. label: '注册地址',
  229. key: 'registeredAddress',
  230. placeholder: '请输入注册地址'
  231. },
  232. {
  233. type: 'input',
  234. label: '成立日期',
  235. key: 'establishDate',
  236. placeholder: '请输入成立日期',
  237. span: 12
  238. },
  239. {
  240. type: 'input',
  241. label: '注册资本',
  242. key: 'registeredCapital',
  243. placeholder: '请输入注册资本',
  244. span: 12
  245. },
  246. {
  247. type: 'input',
  248. label: '企业类型',
  249. key: 'enterpriseType',
  250. placeholder: '请输入企业类型',
  251. span: 12
  252. },
  253. {
  254. type: 'input',
  255. label: '营业期限',
  256. key: 'businessTerm',
  257. placeholder: '请输入营业期限',
  258. span: 12
  259. },
  260. {
  261. type: 'input',
  262. comType: 'textarea',
  263. label: '营业范围',
  264. key: 'businessScope',
  265. placeholder: '请输入营业范围'
  266. }
  267. ]
  268. },
  269. {
  270. title: '联系信息',
  271. forms: [
  272. {
  273. type: 'input',
  274. label: '联系人',
  275. key: 'linkMen',
  276. placeholder: '请输入联系人',
  277. span: 12
  278. },
  279. {
  280. type: 'input',
  281. label: '手机号码',
  282. key: 'mobile',
  283. placeholder: '请输入手机号码',
  284. span: 12
  285. },
  286. {
  287. type: 'input',
  288. label: '固定电话',
  289. key: 'telephone',
  290. placeholder: '请输入固定电话',
  291. span: 12
  292. },
  293. {
  294. type: 'input',
  295. label: '电子邮箱',
  296. key: 'email',
  297. placeholder: '请输入电子邮箱',
  298. span: 12
  299. },
  300. {
  301. type: 'input',
  302. label: '传真',
  303. key: 'fax',
  304. placeholder: '请输入传真',
  305. span: 12
  306. }
  307. ]
  308. },
  309. {
  310. title: '账户信息',
  311. forms: [
  312. {
  313. type: 'input',
  314. label: '对公户名',
  315. key: 'accountName',
  316. placeholder: '请输入对公户名',
  317. span: 12
  318. },
  319. {
  320. type: 'input',
  321. label: '开户银行',
  322. key: 'openBank',
  323. placeholder: '请输入开户银行',
  324. span: 12
  325. },
  326. {
  327. type: 'input',
  328. label: '对公账号',
  329. key: 'bankAccout',
  330. placeholder: '请输入对公账号',
  331. span: 12
  332. },
  333. {
  334. type: '',
  335. hiddenLabel: true
  336. },
  337. {
  338. type: 'input',
  339. label: '对私户名',
  340. key: 'privateAccountName',
  341. placeholder: '请输入对私户名',
  342. span: 12
  343. },
  344. {
  345. type: 'input',
  346. label: '开户银行',
  347. key: 'privateOpenBank',
  348. placeholder: '请输入开户银行',
  349. span: 12
  350. },
  351. {
  352. type: 'input',
  353. label: '对私账号',
  354. key: 'privateBankAccount',
  355. placeholder: '请输入对私账号',
  356. span: 12
  357. }
  358. ]
  359. },
  360. {
  361. title: '维护记录',
  362. type: 'picList',
  363. key: 'supplierKeepList'
  364. },
  365. {
  366. title: '其他资质',
  367. type: 'quaList',
  368. key: 'otherQualifications'
  369. }
  370. ]
  371. }
  372. ],
  373. editFormConfig: [
  374. {
  375. type: 'input',
  376. label: '供应商代码',
  377. key: 'code',
  378. placeholder: '请输入供应商代码',
  379. span: 12
  380. },
  381. // {
  382. // type: 'selectSearch',
  383. // label: '绑定用户',
  384. // key: 'bingdUserID',
  385. // list: [],
  386. // placeholder: '请输入绑定用户',
  387. // span: 12
  388. // },
  389. {
  390. type: 'input',
  391. label: '登录账户',
  392. disabled: true,
  393. key: 'userAccount',
  394. placeholder: '请输入登录账户',
  395. span: 12
  396. },
  397. {
  398. type: 'selectSearch',
  399. label: '物料类型',
  400. key: 'categoryCode',
  401. list: [],
  402. placeholder: '请选择物料类型',
  403. span: 12
  404. },
  405. {
  406. type: 'upload',
  407. label: '供应商名称',
  408. text: '上传营业执照',
  409. key: 'name'
  410. },
  411. {
  412. type: 'input',
  413. label: '账期',
  414. key: 'accountDate',
  415. placeholder: '请输入账期',
  416. span: 12
  417. },
  418. {
  419. type: 'input',
  420. label: '账期说明',
  421. key: 'accountDateRemark',
  422. placeholder: '请输入账期说明',
  423. span: 12
  424. },
  425. {
  426. type: 'upload-flie',
  427. label: '营业执照',
  428. text: '上传营业执照',
  429. key: 'businessLicense',
  430. },
  431. {
  432. type: 'upload-flie',
  433. label: 'ca65',
  434. text: '加州65号法令合规测试证书',
  435. key: 'certificate'
  436. },
  437. {
  438. type: 'input',
  439. comType: 'textarea',
  440. label: '备注',
  441. key: 'remark',
  442. placeholder: '请输入仓库说明'
  443. },
  444. {
  445. type: 'tabs',
  446. hiddenLabel: true,
  447. tabs: [
  448. {
  449. title: '工商信息',
  450. forms: [
  451. {
  452. type: 'input',
  453. label: '法定代表人',
  454. key: 'legalPerson',
  455. placeholder: '请输入法定代表人',
  456. span: 12
  457. },
  458. {
  459. type: 'input',
  460. label: '社会信用代码',
  461. key: 'societyCreditCode',
  462. placeholder: '请输入社会信用代码',
  463. span: 12
  464. },
  465. {
  466. type: 'input',
  467. label: '注册地址',
  468. key: 'registeredAddress',
  469. placeholder: '请输入注册地址'
  470. },
  471. {
  472. type: 'input',
  473. label: '成立日期',
  474. key: 'establishDate',
  475. placeholder: '请输入成立日期',
  476. span: 12
  477. },
  478. {
  479. type: 'input',
  480. label: '注册资本',
  481. key: 'registeredCapital',
  482. placeholder: '请输入注册资本',
  483. span: 12
  484. },
  485. {
  486. type: 'input',
  487. label: '企业类型',
  488. key: 'enterpriseType',
  489. placeholder: '请输入企业类型',
  490. span: 12
  491. },
  492. {
  493. type: 'input',
  494. label: '营业期限',
  495. disabled: true,
  496. key: 'businessTerm',
  497. placeholder: '请输入营业期限',
  498. span: 12
  499. },
  500. {
  501. type: 'input',
  502. comType: 'textarea',
  503. label: '营业范围',
  504. key: 'businessScope',
  505. placeholder: '请输入营业范围'
  506. }
  507. ]
  508. },
  509. {
  510. title: '联系信息',
  511. forms: [
  512. {
  513. type: 'input',
  514. label: '联系人',
  515. key: 'linkMen',
  516. placeholder: '请输入联系人',
  517. span: 12
  518. },
  519. {
  520. type: 'input',
  521. label: '手机号码',
  522. key: 'mobile',
  523. placeholder: '请输入手机号码',
  524. span: 12
  525. },
  526. {
  527. type: 'input',
  528. label: '固定电话',
  529. key: 'telephone',
  530. placeholder: '请输入固定电话',
  531. span: 12
  532. },
  533. {
  534. type: 'input',
  535. label: '电子邮箱',
  536. key: 'email',
  537. placeholder: '请输入电子邮箱',
  538. span: 12
  539. },
  540. {
  541. type: 'input',
  542. label: '传真',
  543. key: 'fax',
  544. placeholder: '请输入传真',
  545. span: 12
  546. }
  547. ]
  548. },
  549. {
  550. title: '账户信息',
  551. forms: [
  552. {
  553. type: 'input',
  554. label: '对公户名',
  555. key: 'accountName',
  556. placeholder: '请输入对公户名',
  557. span: 12
  558. },
  559. {
  560. type: 'input',
  561. label: '开户银行',
  562. key: 'openBank',
  563. placeholder: '请输入开户银行',
  564. span: 12
  565. },
  566. {
  567. type: 'input',
  568. label: '对公账号',
  569. key: 'bankAccout',
  570. placeholder: '请输入对公账号',
  571. span: 12
  572. },
  573. {
  574. type: '',
  575. hiddenLabel: true
  576. },
  577. {
  578. type: 'input',
  579. label: '对私户名',
  580. key: 'privateAccountName',
  581. placeholder: '请输入对私户名',
  582. span: 12
  583. },
  584. {
  585. type: 'input',
  586. label: '开户银行',
  587. key: 'privateOpenBank',
  588. placeholder: '请输入开户银行',
  589. span: 12
  590. },
  591. {
  592. type: 'input',
  593. label: '对私账号',
  594. key: 'privateBankAccount',
  595. placeholder: '请输入对私账号',
  596. span: 12
  597. }
  598. ]
  599. },
  600. {
  601. title: '维护记录',
  602. type: 'picList',
  603. key: 'facPicList'
  604. },
  605. {
  606. title: '主营价格',
  607. type: 'material'
  608. },
  609. {
  610. title: '采购分析',
  611. type: 'charts'
  612. },
  613. {
  614. title: '维护记录',
  615. type: 'picList',
  616. key: 'facPicList'
  617. },
  618. {
  619. title: '其他资质',
  620. type: 'quaList',
  621. key: 'facquaList'
  622. }
  623. ]
  624. },
  625. ],
  626. showFormConfig: [
  627. {
  628. type: 'input',
  629. label: '供应商代码',
  630. disabled: true,
  631. key: 'code',
  632. placeholder: '请输入供应商代码',
  633. span: 12
  634. },
  635. // {
  636. // type: 'selectSearch',
  637. // label: '绑定用户',
  638. // disabled: true,
  639. // key: 'bingdUserID',
  640. // list: [],
  641. // placeholder: '请输入绑定用户',
  642. // span: 12
  643. // },
  644. {
  645. type: 'input',
  646. label: '登录账户',
  647. disabled: true,
  648. key: 'userAccount',
  649. placeholder: '请输入登录账户',
  650. span: 12
  651. },
  652. {
  653. type: 'selectSearch',
  654. label: '物料类型',
  655. key: 'categoryCode',
  656. disabled: true,
  657. list: [],
  658. placeholder: '请选择物料类型',
  659. span: 12
  660. },
  661. {
  662. type: 'upload',
  663. label: '供应商名称',
  664. disabled: true,
  665. text: '上传营业执照',
  666. key: 'name'
  667. },
  668. {
  669. type: 'input',
  670. label: '账期',
  671. disabled: true,
  672. key: 'accountDate',
  673. placeholder: '请输入账期',
  674. span: 12
  675. },
  676. {
  677. type: 'input',
  678. label: '账期说明',
  679. disabled: true,
  680. key: 'accountDateRemark',
  681. placeholder: '请输入账期说明',
  682. span: 12
  683. },
  684. {
  685. type: 'upload-flie',
  686. label: '营业执照',
  687. text: '上传营业执照',
  688. key: 'businessLicense',
  689. },
  690. {
  691. type: 'upload-flie',
  692. label: 'ca65',
  693. text: '加州65号法令合规测试证书',
  694. key: 'certificate'
  695. },
  696. {
  697. type: 'input',
  698. comType: 'textarea',
  699. label: '备注',
  700. disabled: true,
  701. key: 'remark',
  702. placeholder: '请输入仓库说明'
  703. },
  704. {
  705. type: 'tabs',
  706. hiddenLabel: true,
  707. tabs: [
  708. {
  709. title: '工商信息',
  710. forms: [
  711. {
  712. type: 'input',
  713. label: '法定代表人',
  714. disabled: true,
  715. key: 'legalPerson',
  716. placeholder: '请输入法定代表人',
  717. span: 12
  718. },
  719. {
  720. type: 'input',
  721. label: '社会信用代码',
  722. disabled: true,
  723. key: 'societyCreditCode',
  724. placeholder: '请输入社会信用代码',
  725. span: 12
  726. },
  727. {
  728. type: 'input',
  729. label: '注册地址',
  730. disabled: true,
  731. key: 'registeredAddress',
  732. placeholder: '请输入注册地址'
  733. },
  734. {
  735. type: 'input',
  736. label: '成立日期',
  737. disabled: true,
  738. key: 'establishDate',
  739. placeholder: '请输入成立日期',
  740. span: 12
  741. },
  742. {
  743. type: 'input',
  744. label: '注册资本',
  745. disabled: true,
  746. key: 'registeredCapital',
  747. placeholder: '请输入注册资本',
  748. span: 12
  749. },
  750. {
  751. type: 'input',
  752. label: '企业类型',
  753. disabled: true,
  754. key: 'enterpriseType',
  755. placeholder: '请输入企业类型',
  756. span: 12
  757. },
  758. {
  759. type: 'input',
  760. label: '营业期限',
  761. disabled: true,
  762. key: 'businessTerm',
  763. placeholder: '请输入营业期限',
  764. span: 12
  765. },
  766. {
  767. type: 'input',
  768. comType: 'textarea',
  769. label: '营业范围',
  770. disabled: true,
  771. key: 'businessScope',
  772. placeholder: '请输入营业范围'
  773. }
  774. ]
  775. },
  776. {
  777. title: '联系信息',
  778. forms: [
  779. {
  780. type: 'input',
  781. label: '联系人',
  782. disabled: true,
  783. key: 'linkMen',
  784. placeholder: '请输入联系人',
  785. span: 12
  786. },
  787. {
  788. type: 'input',
  789. label: '手机号码',
  790. disabled: true,
  791. key: 'mobile',
  792. placeholder: '请输入手机号码',
  793. span: 12
  794. },
  795. {
  796. type: 'input',
  797. label: '固定电话',
  798. disabled: true,
  799. key: 'telephone',
  800. placeholder: '请输入固定电话',
  801. span: 12
  802. },
  803. {
  804. type: 'input',
  805. label: '电子邮箱',
  806. disabled: true,
  807. key: 'email',
  808. placeholder: '请输入电子邮箱',
  809. span: 12
  810. },
  811. {
  812. type: 'input',
  813. label: '传真',
  814. disabled: true,
  815. key: 'fax',
  816. placeholder: '请输入传真',
  817. span: 12
  818. }
  819. ]
  820. },
  821. {
  822. title: '账户信息',
  823. forms: [
  824. {
  825. type: 'input',
  826. label: '对公户名',
  827. disabled: true,
  828. key: 'accountName',
  829. placeholder: '请输入对公户名',
  830. span: 12
  831. },
  832. {
  833. type: 'input',
  834. label: '开户银行',
  835. disabled: true,
  836. key: 'openBank',
  837. placeholder: '请输入开户银行',
  838. span: 12
  839. },
  840. {
  841. type: 'input',
  842. label: '对公账号',
  843. disabled: true,
  844. key: 'bankAccout',
  845. placeholder: '请输入对公账号',
  846. span: 12
  847. },
  848. {
  849. type: '',
  850. hiddenLabel: true
  851. },
  852. {
  853. type: 'input',
  854. label: '对私户名',
  855. disabled: true,
  856. key: 'privateAccountName',
  857. placeholder: '请输入对私户名',
  858. span: 12
  859. },
  860. {
  861. type: 'input',
  862. label: '开户银行',
  863. disabled: true,
  864. key: 'privateOpenBank',
  865. placeholder: '请输入开户银行',
  866. span: 12
  867. },
  868. {
  869. type: 'input',
  870. label: '对私账号',
  871. disabled: true,
  872. key: 'privateBankAccount',
  873. placeholder: '请输入对私账号',
  874. span: 12
  875. }
  876. ]
  877. },
  878. {
  879. title: '维护记录',
  880. type: 'picList',
  881. key: 'facPicList'
  882. },
  883. {
  884. title: '主营价格',
  885. type: 'material'
  886. },
  887. {
  888. title: '采购分析',
  889. type: 'charts'
  890. },
  891. {
  892. title: '其他资质',
  893. type: 'quaList',
  894. key: 'facquaList'
  895. }
  896. ]
  897. }
  898. ],
  899. columns: [
  900. {
  901. title: '序号',
  902. type: 'index',
  903. width: 60,
  904. align: 'center'
  905. },
  906. {
  907. title: '供应商代码',
  908. key: 'supplierCoded',
  909. minWidth: 100
  910. },
  911. {
  912. title: '供应商名称',
  913. key: 'supplierName',
  914. minWidth: 300,
  915. render(h,p){
  916. return h(renderListimgs,{
  917. props: {
  918. row: p.row
  919. }
  920. })
  921. },
  922. },
  923. {
  924. title: '物料类型',
  925. key: 'malssifyName',
  926. minWidth: 150
  927. },
  928. {
  929. title: '账期',
  930. key: 'accountDate',
  931. minWidth: 100
  932. },
  933. {
  934. title: '采购周期',
  935. key: 'accountDateRemark',
  936. minWidth: 100,
  937. render:(h,p)=>{
  938. return h('span',{
  939. style:{
  940. color:'#0077ff',
  941. cursor:"pointer"
  942. },
  943. on: {
  944. click: () => {
  945. axios.post('/api/storage-restructure/supplier/getSafetyWarnDayBySupplier',{supplierId:p.row.id}).then(res=>{
  946. this.accountDateRemarkModalData = res.data.data
  947. this.accountDateRemarkModal = true
  948. })
  949. }
  950. }
  951. },
  952. '查看'
  953. )
  954. }
  955. },
  956. {
  957. title: '账期说明',
  958. key: 'accountDateRemark',
  959. minWidth: 100
  960. },
  961. {
  962. title: '联系人',
  963. key: 'linkMen',
  964. minWidth: 100
  965. },
  966. {
  967. title: '联系电话',
  968. key: 'telephone',
  969. minWidth: 150
  970. },
  971. {
  972. title: '操作',
  973. key: 'action',
  974. align: 'center',
  975. fixed: 'right',
  976. width: 150,
  977. render: (h, params) => {
  978. return h('div', [
  979. h(
  980. 'Icon',
  981. {
  982. props: {
  983. custom: 'iconfont icon-chakan',
  984. size: '20',
  985. color: '#6bc01e'
  986. },
  987. style: {
  988. marginRight: '20px'
  989. },
  990. on: {
  991. click: () => {
  992. this.show = true
  993. axios.get('/cloudApi/supplier/detail?id=' + params.row.id,{}).then(res=>{
  994. this.formData = res.data.data
  995. this.formType = 'form'
  996. this.title = '供应商详情'
  997. this.show = true
  998. })
  999. }
  1000. }
  1001. },
  1002. '查看明细'
  1003. ),
  1004. h(
  1005. 'Icon',
  1006. {
  1007. props: {
  1008. custom: 'iconfont icon-edit',
  1009. size: '20',
  1010. color: '#087BE1'
  1011. },
  1012. style: {
  1013. marginRight: '20px'
  1014. },
  1015. on: {
  1016. click: () => {
  1017. this.$post('/api/storage-restructure/supplier/details',{id:params.row.id}).then(res=>{
  1018. this.formData = res.data
  1019. this.formType = 'edit'
  1020. this.title = '修改'
  1021. this.show = true
  1022. })
  1023. }
  1024. }
  1025. },
  1026. '修改'
  1027. ),
  1028. h(
  1029. 'Icon',
  1030. {
  1031. props: {
  1032. custom: 'iconfont icon-delete',
  1033. size: '20',
  1034. color: 'red'
  1035. },
  1036. on: {
  1037. click: () => {
  1038. this.$MyModal.show({ text: '是否删除?' }).$on('confirm', () => {
  1039. axios.post('/cloudApi/supplier/delete',{id:params.row.id}).then(res=>{
  1040. if (res.data.code == 200) {
  1041. v.$Message.info(res.data.msg)
  1042. v.getList()
  1043. }
  1044. })
  1045. })
  1046. }
  1047. }
  1048. },
  1049. '删除'
  1050. )
  1051. ])
  1052. }
  1053. }
  1054. ],
  1055. accountDateRemarkModalcolumns:[
  1056. {
  1057. title: '序号',
  1058. type: 'index',
  1059. width: 60,
  1060. align: 'center'
  1061. },
  1062. {
  1063. title: '物料编码',
  1064. key: 'materialCode'
  1065. },
  1066. {
  1067. title: '面料名称',
  1068. key: 'materialName'
  1069. },
  1070. {
  1071. title: '采购周期',
  1072. key: 'safetyWarnDay'
  1073. },
  1074. ],
  1075. accountDateRemarkModalData:[],
  1076. accountDateRemarkModal:false,
  1077. tableFilter: [
  1078. {
  1079. name: 'Input',
  1080. value: 'key',
  1081. placeholder: '请输入关键字'
  1082. },
  1083. {
  1084. name: 'Button',
  1085. type: 'primary',
  1086. text: '查询',
  1087. e: 'search'
  1088. },
  1089. {
  1090. name: 'Button',
  1091. type: 'primary',
  1092. text: '添加',
  1093. align: 'right',
  1094. e: 'add'
  1095. },
  1096. {
  1097. name: 'Button',
  1098. type: 'primary',
  1099. text: '价格维护',
  1100. align: 'right',
  1101. e: 'priceHandle'
  1102. },
  1103. {
  1104. name: 'Button',
  1105. type: 'primary',
  1106. text: '收款账号维护',
  1107. align: 'right',
  1108. width: '300',
  1109. e: 'account'
  1110. }
  1111. ],
  1112. params: {
  1113. pageNum: 1,
  1114. pageSize: 10,
  1115. total: 0,
  1116. TechnologyType:99,
  1117. Purpose:null,
  1118. search:null,
  1119. },
  1120. total:0,
  1121. loading:false,
  1122. selectPurposeList:[],
  1123. accountDateList:[],
  1124. safetyWarnDayList:[],
  1125. }
  1126. },
  1127. methods: {
  1128. getSafetyWarnDayList(){
  1129. const v = this
  1130. this.$post('/api/storage-restructure/supplier/getSafetyWarnDay',{}).then(res=>{
  1131. console.log(res)
  1132. v.safetyWarnDayList = res.data
  1133. })
  1134. },
  1135. getAccountDateList(){
  1136. const v = this
  1137. this.$post('/api/storage-restructure/supplier/getAccountDate',{}).then(res=>{
  1138. console.log(res)
  1139. v.accountDateList = res.data
  1140. })
  1141. },
  1142. selectPurposeFn(e){
  1143. console.log(e)
  1144. if(e == 999){
  1145. this.params.Purpose = ''
  1146. }else{
  1147. this.params.Purpose = this.selectPurposeList[e].purpose
  1148. }
  1149. },
  1150. cfm (type, formData) {
  1151. if (type === 'add') {
  1152. const formDataCopy = {
  1153. ...formData,
  1154. supplierBank:{
  1155. accountName:formData.accountName,
  1156. openBank:formData.openBank,
  1157. bankAccount:formData.bankAccount,
  1158. privateAccountName:formData.privateAccountName,
  1159. privateOpenBank:formData.privateOpenBank,
  1160. privateBankAccount:formData.privateBankAccount,
  1161. },
  1162. supplierContacts:{
  1163. linkMen:formData.linkMen,
  1164. mobile:formData.mobile,
  1165. telephone:formData.telephone,
  1166. email:formData.email,
  1167. fax:formData.fax,
  1168. },
  1169. supplierKeepList:[],
  1170. otherQualifications:[],
  1171. }
  1172. this.$post('/api/storage-restructure/supplier/add',formDataCopy).then(res=>{
  1173. this.show = false
  1174. this.$Message.info(res.data.msg)
  1175. if(res.code === 200){
  1176. this.show = false
  1177. this.$Message.info(res.msg)
  1178. this.getList()
  1179. }
  1180. })
  1181. } else if (type === 'edit') {
  1182. axios.post('/cloudApi/supplier/edit',formData).then(res=>{
  1183. this.show = false
  1184. this.$Message.info(res.data.msg)
  1185. this.getList()
  1186. })
  1187. }
  1188. },
  1189. // 检索条件事件处理
  1190. eventHandle (option) {
  1191. switch (option) {
  1192. case 'search':
  1193. console.log(option)
  1194. this.params.pageNum = 1
  1195. this.params.search = option.key
  1196. this.getList()
  1197. break
  1198. case 'add':
  1199. this.formType = 'add'
  1200. this.title = '添加供应商'
  1201. this.show = true
  1202. break
  1203. case 'priceHandle':
  1204. this.$router.push({
  1205. name: 'provider_price_maintenance'
  1206. })
  1207. break
  1208. case 'account':
  1209. this.accountShow = true
  1210. break
  1211. }
  1212. },
  1213. changePage (pageNum) {
  1214. this.params.pageNum = pageNum
  1215. this.getList()
  1216. },
  1217. getMaterialCategoryZTree () {
  1218. this
  1219. .$post(
  1220. '/api/storage-restructure/materialClassify/tree')
  1221. .then((res) => {
  1222. for (let i = 0; i < res.data.length; i++) {
  1223. const element = res.data[i];
  1224. element.label = element.name
  1225. element.value = element.id
  1226. }
  1227. console.log(res.data)
  1228. this.formConfig[2].list = res.data
  1229. this.editFormConfig[2].list = res.data
  1230. this.showFormConfig[2].list = res.data
  1231. })
  1232. },
  1233. getUserPageList () {
  1234. GetUserPageList({
  1235. pageNum: 1,
  1236. pageSize: 9999
  1237. }).then(res => {
  1238. if (res.code === 0) {
  1239. let list = res.result.list.map(item => {
  1240. return {
  1241. label: item.realName,
  1242. value: item.id
  1243. }
  1244. })
  1245. this.formConfig[1].list = list
  1246. this.editFormConfig[1].list = list
  1247. this.showFormConfig[1].list = list
  1248. }
  1249. })
  1250. },
  1251. getList () {
  1252. this.$post('/api/storage-restructure/supplier/page', {...this.params})
  1253. .then((res) => {
  1254. this.data = res.data.records
  1255. this.params.total = res.data.total
  1256. })
  1257. // GetFactoryPageList(this.params).then(res => {
  1258. // if (res.code === 0) {
  1259. // this.data = res.result.list
  1260. // this.params.total = res.result.totalCount
  1261. // }
  1262. // })
  1263. },
  1264. getMaterialSelectPurposeList(){
  1265. const v = this
  1266. v.loading = true
  1267. v.$post('/api/storage-restructure/material/getPurpose', {})
  1268. .then((res) => {
  1269. v.selectPurposeList = res.data
  1270. v.loading = false
  1271. })
  1272. },
  1273. getSupplierSelectList(req){
  1274. const v = this
  1275. v.loading = true
  1276. axios
  1277. .post('/cloudApi/supplier/selectList', {search:this.params.search})
  1278. .then((res) => {
  1279. v.supplierList = res.data.data
  1280. v.loading = false
  1281. console.log(v.supplierList)
  1282. })
  1283. },
  1284. getStatisticsClassify(){
  1285. this
  1286. .$post(
  1287. '/api/storage-restructure/supplier/getStatistics',this.params)
  1288. .then((res) => {
  1289. this.statisticsClassifyData = res.data
  1290. })
  1291. },
  1292. //获取物料类型树
  1293. socketInit(){
  1294. var ws = new WebSocket("ws://36.134.91.96:10001/api/storage-restructure/webStock/123123");
  1295. //申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
  1296. ws.onopen = function(){
  1297.   //当WebSocket创建成功时,触发onopen事件
  1298. console.log("open");
  1299.   ws.send("hello"); //将消息发送到服务端
  1300. }
  1301. ws.onmessage = function(e){
  1302.   //当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
  1303. console.log(e.data,'1111111111111111111111111111')
  1304. var msg = JSON.parse(e.data)
  1305. if(msg.type == 1){
  1306. msg.data.instructions = 'test'
  1307. msg.data.type = '2'
  1308. msg.type = '2'
  1309. ws.send(JSON.stringify(msg));
  1310. }
  1311. }
  1312. ws.onclose = function(e){
  1313.   //当客户端收到服务端发送的关闭连接请求时,触发onclose事件
  1314.   console.log("close");
  1315. }
  1316. ws.onerror = function(e){
  1317.   //如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
  1318.   console.log(error);
  1319. }
  1320. },
  1321. },
  1322. mounted () {
  1323. this.getList()
  1324. // this.getUserPageList()
  1325. this.getMaterialCategoryZTree()
  1326. this.getStatisticsClassify()
  1327. // this.getSupplierSelectList()
  1328. this.getMaterialSelectPurposeList()
  1329. this.getAccountDateList()
  1330. this.getSafetyWarnDayList()
  1331. //this.socketInit()
  1332. }
  1333. }
  1334. </script>
  1335. <style lang="less" scoped>
  1336. .container {
  1337. .tabs-warp{
  1338. height: 60px;
  1339. line-height: 60px;
  1340. border-bottom: 1px solid #979797;
  1341. margin-bottom: 10px;
  1342. display: flex;
  1343. div{
  1344. width: 20%;
  1345. font-size: 16px;
  1346. text-align: center;
  1347. position: relative;
  1348. cursor: pointer;
  1349. span{
  1350. color:#EF0000
  1351. }
  1352. }
  1353. div.active::before{
  1354. position: absolute;
  1355. content:" ";
  1356. left: 0;
  1357. right:0;
  1358. bottom:0;
  1359. height:4px;
  1360. background: #1A3AF0;
  1361. }
  1362. }
  1363. }
  1364. </style>