contactDetailDialog.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. v-if="visible"
  6. :visible.sync="visible"
  7. :title="title"
  8. :close-on-click-modal="false"
  9. width="70%"
  10. @close="cancel"
  11. :maxable="true"
  12. :resizable="true"
  13. >
  14. <el-tabs v-model="activeName" type="card" @tab-click="handleActive">
  15. <el-tab-pane label="基本信息" name="base">
  16. <headerTitle title="基本信息" style="margin-top: 30px"></headerTitle>
  17. <el-form
  18. label-width="120px"
  19. class="el-form-box"
  20. ref="formRef"
  21. :model="form">
  22. <el-row>
  23. <el-col :span="8">
  24. <el-form-item
  25. label="客户分类:"
  26. prop="categoryId">
  27. <el-input v-model="form.categoryName" disabled></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="8">
  31. <el-form-item
  32. label="分管部门:"
  33. prop="fgDeptId"
  34. >
  35. <el-input v-model="form.fgDeptName" disabled></el-input>
  36. </el-form-item>
  37. </el-col>
  38. <el-col :span="8">
  39. <el-form-item label="业务员:" prop="salesmanId">
  40. <el-input v-model="form.salesmanName" disabled></el-input>
  41. </el-form-item>
  42. </el-col>
  43. </el-row>
  44. <el-row>
  45. <el-col :span="8">
  46. <el-form-item label="客户名称:" prop="name">
  47. <el-input v-model="form.name" disabled></el-input>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="8">
  51. <el-form-item label="客户代号:" prop="serialNo">
  52. <el-input v-model="form.serialNo" disabled></el-input>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :span="8">
  56. <el-form-item label="客户简称:" prop="simpleName">
  57. <el-input v-model="form.simpleName" disabled></el-input>
  58. </el-form-item>
  59. </el-col>
  60. </el-row>
  61. <el-row>
  62. <el-col :span="8">
  63. <el-form-item label="法定代表人:" prop="legalPerson">
  64. <el-input v-model="form.legalPerson" disabled></el-input>
  65. </el-form-item>
  66. </el-col>
  67. <el-col :span="8">
  68. <el-form-item label="注册资金:" prop="registeredCapital">
  69. <el-input v-model="form.registeredCapital" disabled></el-input>
  70. </el-form-item>
  71. </el-col>
  72. <el-col :span="8">
  73. <el-form-item label="授信额度:" prop="authorizationLimit">
  74. <el-input v-model="form.authorizationLimit" disabled></el-input>
  75. </el-form-item>
  76. </el-col>
  77. </el-row>
  78. <el-row>
  79. <el-col :span="8">
  80. <el-form-item label="单位电话:" prop="phone">
  81. <el-input v-model="form.phone" disabled></el-input>
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="8">
  85. <el-form-item label="地址:" prop="addressId">
  86. <el-input v-model="form.addressName" disabled></el-input>
  87. </el-form-item>
  88. </el-col>
  89. <el-col :span="8">
  90. <el-form-item label="详细地址:" prop="address">
  91. <el-input v-model="form.address" disabled></el-input>
  92. </el-form-item>
  93. </el-col>
  94. </el-row>
  95. <el-row>
  96. <el-col :span="8">
  97. <el-form-item
  98. class="form_item_label"
  99. label="统一社会信用代码:"
  100. prop="unifiedSocialCreditCode"
  101. >
  102. <el-input v-model="form.unifiedSocialCreditCode" disabled></el-input>
  103. </el-form-item>
  104. </el-col>
  105. <el-col :span="8">
  106. <el-form-item label="所属行业:" prop="industry">
  107. <el-input v-model="form.industryFullName" disabled></el-input>
  108. </el-form-item>
  109. </el-col>
  110. <el-col :span="8">
  111. <el-form-item label="营业类型:" prop="companyCategoryId">
  112. <el-input v-model="form.companyCategoryName" disabled></el-input>
  113. </el-form-item>
  114. </el-col>
  115. </el-row>
  116. <el-row>
  117. <el-col :span="8">
  118. <el-form-item label="企业类型:" prop="companyCategoryId">
  119. <el-input v-model="form.enterpriseTypeName" disabled></el-input>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="8">
  123. <el-form-item label="登记日期:" prop="registerDate">
  124. <el-input v-model="form.registerDate" disabled></el-input>
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="8">
  128. <el-form-item label="经营范围:" prop="businessScope">
  129. <el-input v-model="form.businessScope" disabled></el-input>
  130. </el-form-item>
  131. </el-col>
  132. </el-row>
  133. <el-row>
  134. <el-col :span="8">
  135. <el-form-item label="主营产品:" prop="mainProduct">
  136. <el-input v-model="form.mainProduct" disabled></el-input>
  137. </el-form-item>
  138. </el-col>
  139. <el-col :span="8">
  140. <el-form-item
  141. label="上级单位:"
  142. prop="hasParentGroup"
  143. >
  144. <el-input v-model="form.parentName" disabled></el-input>
  145. </el-form-item>
  146. </el-col>
  147. <el-col :span="8">
  148. <el-form-item label="级别:" >
  149. <DictSelection dictName="供应商级别" disabled clearable v-model="form.level">
  150. </DictSelection>
  151. </el-form-item>
  152. </el-col>
  153. </el-row>
  154. <el-row>
  155. <el-col :span="16">
  156. <el-form-item label="经营范围" prop="businessScope">
  157. <el-input
  158. disabled
  159. type="textarea"
  160. maxlength="500"
  161. placeholder="请输入"
  162. v-model="form.businessScope"
  163. ></el-input>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="8">
  167. <el-form-item prop="businessLicenseFile" label="营业执照附件:">
  168. <el-link v-if="form.businessLicenseFile && form.businessLicenseFile !== ''"
  169. type="primary" :underline="false"
  170. @click="downloadFile(form.businessLicenseFile)"> {{ form.businessLicenseFile.name }}
  171. </el-link>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="16">
  175. <el-form-item label="备注:" prop="remark">
  176. <el-input type="textarea" v-model="form.remark" disabled></el-input>
  177. </el-form-item>
  178. </el-col>
  179. </el-row>
  180. </el-form>
  181. <headerTitle title="银行信息" style="margin-top: 30px"></headerTitle>
  182. <ele-pro-table
  183. ref="table"
  184. :columns="bankColumns"
  185. :datasource="tableBankData"
  186. height="350px"
  187. :toolkit="[]"
  188. :need-page="false"
  189. >
  190. <template v-slot:accountNameHeader="{ column }">
  191. <span>{{ column.label }}</span><span style="color:red">*</span>
  192. </template>
  193. <template v-slot:accountName="{ row }">
  194. {{ row.accountName }}
  195. </template>
  196. <template v-slot:accountNo="{ row }">
  197. {{ row.accountNo }}
  198. </template>
  199. <template v-slot:bankName="{ row }">
  200. {{ row.bankName }}
  201. </template>
  202. <template v-slot:interbankNo="{ row }">
  203. {{ row.interbankNo }}
  204. </template>
  205. </ele-pro-table>
  206. <headerTitle title="联系人信息" style="margin-top: 30px"></headerTitle>
  207. <ele-pro-table
  208. ref="linkTable"
  209. :columns="linkColumns"
  210. :datasource="tableLinkData"
  211. :toolkit="[]"
  212. height="350px"
  213. :need-page="false"
  214. >
  215. <template v-slot:linkNameHeader="{ column }">
  216. <span>{{ column.label }}</span><span style="color:red">*</span>
  217. </template>
  218. <template v-slot:mobilePhoneHeader="{ column }">
  219. <span>{{ column.label }}</span><span style="color:red">*</span>
  220. </template>
  221. <template v-slot:statusHeader="{ column }">
  222. <span>{{ column.label }}</span><span style="color:red">*</span>
  223. </template>
  224. <template v-slot:linkName="{ row }">
  225. {{ row.linkName }}
  226. </template>
  227. <template v-slot:mobilePhone="{ row }">
  228. {{ row.mobilePhone }}
  229. </template>
  230. <template v-slot:phone="{ row }">
  231. {{ row.phone }}
  232. </template>
  233. <template v-slot:email="{ row }">
  234. {{ row.email }}
  235. </template>
  236. <template v-slot:deptName="{ row }">
  237. {{ row.deptName }}
  238. </template>
  239. <template v-slot:post="{ row }">
  240. {{ row.post }}
  241. </template>
  242. <template v-slot:ifChief="{ row, $index }">
  243. <el-select v-model="row.ifChief" class="w100" disabled>
  244. <el-option
  245. v-for="item in ifChiefList"
  246. :key="item.value"
  247. :label="item.label"
  248. :value="item.value"
  249. ></el-option>
  250. </el-select>
  251. </template>
  252. <template v-slot:status="{ row }">
  253. <DictSelection
  254. dictName="联系人状态"
  255. v-model="row.status"
  256. :disabled="true"
  257. ></DictSelection>
  258. </template>
  259. <template v-slot:remark="{ row }">
  260. {{ row.remark }}
  261. </template>
  262. </ele-pro-table>
  263. <headerTitle title="其他信息" style="margin-top: 30px"></headerTitle>
  264. <el-form
  265. label-width="120px"
  266. class="el-form-box"
  267. ref="otherFormRef"
  268. :model="otherForm"
  269. >
  270. <el-row>
  271. <el-col :span="8">
  272. <el-form-item label="结算方式:" prop="settlementMode">
  273. <el-input v-model="otherForm.settlementModeName" disabled></el-input>
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="8">
  277. <el-form-item label="税率:" prop="taxRate">
  278. <el-input v-model="otherForm.taxRate" disabled>
  279. <template slot="append">%</template>
  280. </el-input>
  281. </el-form-item>
  282. </el-col>
  283. <el-col :span="8">
  284. <el-form-item label="折扣率:" prop="discount">
  285. <el-input v-model="otherForm.discount" disabled>
  286. <template slot="append">%</template>
  287. </el-input>
  288. </el-form-item>
  289. </el-col>
  290. </el-row>
  291. <el-row>
  292. <el-col :span="8">
  293. <el-form-item label="收件人:" prop="sender">
  294. <el-input v-model="otherForm.sender" disabled>
  295. </el-input>
  296. </el-form-item>
  297. </el-col>
  298. <el-col :span="8">
  299. <el-form-item label="收件人电话:" prop="senderPhone">
  300. <el-input v-model="otherForm.senderPhone" disabled>
  301. </el-input>
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="8">
  305. <el-form-item label="收件人地址:" prop="addressId">
  306. <el-input v-model="otherForm.addressName" disabled>
  307. </el-input>
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. <el-row>
  312. <el-col :span="8">
  313. <el-form-item label="收件人详细地址:" class="form_item_label" prop="address">
  314. <el-input v-model="otherForm.address" disabled>
  315. </el-input>
  316. </el-form-item>
  317. </el-col>
  318. </el-row>
  319. </el-form>
  320. </el-tab-pane>
  321. <!-- <el-tab-pane label="银行信息" name="bank">-->
  322. <!-- -->
  323. <!-- </el-tab-pane>-->
  324. <!-- <el-tab-pane label="联系人信息" name="link">-->
  325. <!-- -->
  326. <!-- </el-tab-pane>-->
  327. <!-- <el-tab-pane label="其他信息" name="other">-->
  328. <!-- -->
  329. <!-- </el-tab-pane>-->
  330. <el-tab-pane label="证书资质" name="certificate">
  331. <headerTitle title="证书资质信息" style="margin-top: 30px"></headerTitle>
  332. <ele-pro-table ref="certificateTable" :columns="certificateColumns" :needPage="false" :datasource="tableCertificateData"
  333. :toolkit="[]" height="350px">
  334. <!-- 操作栏 -->
  335. <template v-slot:action="scope">
  336. <el-link
  337. v-if="[1,2].includes(scope.row.approvalStatus)"
  338. type="primary"
  339. :underline="false"
  340. icon="el-icon-edit"
  341. @click="addCertificate('view',scope.row)">
  342. 详情
  343. </el-link>
  344. </template>
  345. </ele-pro-table>
  346. </el-tab-pane>
  347. <el-tab-pane label="订单记录" name="order">
  348. <headerTitle title="订单记录" style="margin-top: 30px"></headerTitle>
  349. <div class="ele-border-lighter form-content">
  350. <!-- 数据表格 -->
  351. <ele-pro-table
  352. ref="table"
  353. :columns="orderColumns"
  354. :datasource="orderDatasource"
  355. height="calc(100vh - 520px)"
  356. style="margin-bottom: 10px"
  357. full-height="calc(100vh - 116px)"
  358. tool-class="ele-toolbar-form"
  359. cache-key="eomContactPageTable">
  360. <!-- 查看详情列 -->
  361. <template v-slot:contractNo="{ row }">
  362. <el-link
  363. type="primary"
  364. :underline="false"
  365. @click="opencontractDetail(row)"
  366. >
  367. {{ row.contractNo }}
  368. </el-link
  369. >
  370. </template>
  371. <template v-slot:orderNo="{ row }">
  372. <el-link
  373. type="primary"
  374. :underline="false"
  375. @click="openorderDetail(row)"
  376. >
  377. {{ row.orderNo }}
  378. </el-link
  379. >
  380. </template>
  381. </ele-pro-table>
  382. </div>
  383. </el-tab-pane>
  384. <el-tab-pane label="发货记录" name="send">
  385. <headerTitle title="发货记录" style="margin-top: 30px"></headerTitle>
  386. <div class="ele-border-lighter form-content" >
  387. <!-- 数据表格 -->
  388. <ele-pro-table
  389. ref="table"
  390. :columns="sendColumns"
  391. :datasource="sendDatasource"
  392. height="calc(100vh - 520px)"
  393. style="margin-bottom: 10px"
  394. full-height="calc(100vh - 116px)"
  395. tool-class="ele-toolbar-form"
  396. cache-key="eomContactPageTable"
  397. >
  398. <!-- 查看详情列 -->
  399. <template v-slot:docNo="{ row }">
  400. <el-link
  401. type="primary"
  402. :underline="false"
  403. @click="openorderDetail(row, 'docNo')"
  404. >
  405. {{ row.docNo }}</el-link
  406. >
  407. </template>
  408. <template v-slot:orderNo="{ row }">
  409. <el-link
  410. type="primary"
  411. :underline="false"
  412. @click="openorderDetail(row, 'orderNo')"
  413. >
  414. {{ row.orderNo }}</el-link
  415. >
  416. </template>
  417. <!-- 操作列 -->
  418. <template v-slot:action="{ row }">
  419. <el-link
  420. type="primary"
  421. :underline="false"
  422. icon="el-icon-edit"
  423. @click="openEdit('edit', row)"
  424. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))||isNeed_process_is_close"
  425. >
  426. 修改
  427. </el-link>
  428. <el-link
  429. type="primary"
  430. :underline="false"
  431. icon="el-icon-plus"
  432. @click="sendSubmit(row)"
  433. v-if="isNeed_process_is_close&&[0, 3].includes(row.reviewStatus)"
  434. >
  435. 提交
  436. </el-link>
  437. <el-popconfirm
  438. class="ele-action"
  439. title="确定要删除此信息吗?"
  440. @confirm="remove([row.id])"
  441. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))||!isNeed_process_is_close"
  442. >
  443. <template v-slot:reference>
  444. <el-link type="danger" :underline="false" icon="el-icon-delete">
  445. 删除
  446. </el-link>
  447. </template>
  448. </el-popconfirm>
  449. <el-link
  450. type="primary"
  451. :underline="false"
  452. icon="el-icon-edit"
  453. @click="creatReturnGoods('add', row)"
  454. v-if="[2].includes(row.reviewStatus)"
  455. >
  456. 创建退货单
  457. </el-link>
  458. </template>
  459. </ele-pro-table>
  460. </div>
  461. </el-tab-pane>
  462. <el-tab-pane label="退货记录" name="return">
  463. <headerTitle title="退货记录" style="margin-top: 30px"></headerTitle>
  464. <div class="ele-border-lighter form-content">
  465. <!-- 数据表格 -->
  466. <ele-pro-table
  467. ref="table"
  468. :columns="returnColumns"
  469. :datasource="returnDatasource"
  470. height="calc(100vh - 520px)"
  471. style="margin-bottom: 10px"
  472. full-height="calc(100vh - 116px)"
  473. tool-class="ele-toolbar-form"
  474. cache-key="eomContactPageTable">
  475. <!-- 查看详情列 -->
  476. <template v-slot:returnNo="{ row }">
  477. <el-link
  478. type="primary"
  479. :underline="false"
  480. @click="openorderDetail(row, 'returnNo')"
  481. >
  482. {{ row.returnNo }}
  483. </el-link
  484. >
  485. </template>
  486. <template v-slot:sendNo="{ row }">
  487. <el-link
  488. type="primary"
  489. :underline="false"
  490. @click="openorderDetail(row, 'sendNo')"
  491. >
  492. {{ row.sendNo }}
  493. </el-link
  494. >
  495. </template>
  496. <template v-slot:orderNo="{ row }">
  497. <el-link
  498. type="primary"
  499. :underline="false"
  500. @click="openorderDetail(row, 'orderNo')"
  501. >
  502. {{ row.orderNo }}
  503. </el-link
  504. >
  505. </template>
  506. <!-- 操作列 -->
  507. <template v-slot:action="{ row }">
  508. <el-link
  509. type="primary"
  510. :underline="false"
  511. icon="el-icon-edit"
  512. @click="handleCreateCROrder('add', row)"
  513. v-if="[1].includes(row.canCreateHandleReceipt)&&!row.handleReceiptId">
  514. 退货处理
  515. </el-link>
  516. <el-link
  517. type="primary"
  518. :underline="false"
  519. icon="el-icon-edit"
  520. @click="handleCreateCROrder('update', row)"
  521. v-if="row.handleReceiptId&&row.canCreateHandleReceipt=='0'&&[0,3].includes(row.handleReceiptApproveStatus)">
  522. 退货处理
  523. </el-link>
  524. <el-link
  525. type="primary"
  526. :underline="false"
  527. icon="el-icon-edit"
  528. @click="openEdit('edit', row)"
  529. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))||!isNeed_process_is_close"
  530. >
  531. 修改
  532. </el-link>
  533. <el-link
  534. type="primary"
  535. :underline="false"
  536. icon="el-icon-plus"
  537. @click="returnSubmit(row)"
  538. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))"
  539. >
  540. 提交
  541. </el-link>
  542. <el-popconfirm
  543. class="ele-action"
  544. title="确定要删除此信息吗?"
  545. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))||!isNeed_process_is_close"
  546. @confirm="remove([row.id])"
  547. >
  548. <template v-slot:reference>
  549. <el-link type="danger" :underline="false" icon="el-icon-delete">
  550. 删除
  551. </el-link>
  552. </template>
  553. </el-popconfirm>
  554. </template>
  555. </ele-pro-table>
  556. </div>
  557. </el-tab-pane>
  558. <el-tab-pane label="对账记录" name="reconciliation">
  559. <headerTitle title="对账记录" style="margin-top: 30px"></headerTitle>
  560. <div class="ele-border-lighter form-content">
  561. <!-- 数据表格 -->
  562. <ele-pro-table
  563. ref="table"
  564. :columns="reconciliationColumns"
  565. :datasource="reconciliationDatasource"
  566. height="calc(100vh - 520px)"
  567. style="margin-bottom: 10px"
  568. full-height="calc(100vh - 116px)"
  569. tool-class="ele-toolbar-form"
  570. cache-key="eomContactPageTable">
  571. <!-- 查看详情列 -->
  572. <template v-slot:statementNo="{ row }">
  573. <el-link
  574. type="primary"
  575. :underline="false"
  576. @click="openorderDetail(row, 'statementNo')"
  577. >
  578. {{ row.statementNo }}
  579. </el-link
  580. >
  581. </template>
  582. <template v-slot:orderNo="{ row }">
  583. <el-link
  584. type="primary"
  585. :underline="false"
  586. @click="openorderDetail(row, 'orderNo')"
  587. >
  588. {{ row.orderNo }}
  589. </el-link
  590. >
  591. </template>
  592. <!-- 操作列 -->
  593. <template v-slot:action="{ row }">
  594. <el-link
  595. type="primary"
  596. :underline="false"
  597. icon="el-icon-edit"
  598. @click="handleAddOrEditAccount('update',row)"
  599. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))||!isNeed_process_is_close"
  600. >
  601. 修改
  602. </el-link>
  603. <el-link
  604. type="primary"
  605. :underline="false"
  606. icon="el-icon-plus"
  607. @click="accountstatementSubmit(row)"
  608. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))||!isNeed_process_is_close"
  609. >
  610. 提交
  611. </el-link>
  612. <el-popconfirm
  613. class="ele-action"
  614. title="确定要删除此信息吗?"
  615. @confirm="remove([row.id])"
  616. v-if="(isNeed_process_is_close&&[0, 3].includes(row.reviewStatus))||!isNeed_process_is_close"
  617. >
  618. <template v-slot:reference>
  619. <el-link type="danger" :underline="false" icon="el-icon-delete">
  620. 删除
  621. </el-link>
  622. </template>
  623. </el-popconfirm>
  624. <!-- <el-link-->
  625. <!-- type="primary"-->
  626. <!-- :underline="false"-->
  627. <!-- icon="el-icon-download"-->
  628. <!-- @click="handleExport(row)"-->
  629. <!-- v-if="[2].includes(row.reviewStatus)">-->
  630. <!-- 导出-->
  631. <!-- </el-link>-->
  632. <el-link
  633. size="small"
  634. type="primary"
  635. :underline="false"
  636. icon="el-icon-plus"
  637. class="ele-btn-icon"
  638. v-if="[2].includes(row.reviewStatus)"
  639. @click="handleAddInvoice(row)"
  640. >
  641. 新增发票
  642. </el-link>
  643. </template>
  644. </ele-pro-table>
  645. </div>
  646. </el-tab-pane>
  647. <el-tab-pane label="开票记录" name="invoice">
  648. <headerTitle title="开票记录" style="margin-top: 30px"></headerTitle>
  649. <el-card shadow="never" >
  650. <!-- 数据表格 -->
  651. <ele-pro-table
  652. ref="table"
  653. :columns="invoiceColumns"
  654. :datasource="invoiceDatasource"
  655. height="calc(100vh - 520px)"
  656. tool-class="ele-toolbar-form"
  657. cache-key="eomContactPageTable"
  658. >
  659. <!-- 收款信息 -->
  660. <template v-slot:code="{row}">
  661. <el-link
  662. type="primary"
  663. :underline="false"
  664. @click="handleDetail(row,'view')">
  665. {{ row.code }}
  666. </el-link>
  667. </template>
  668. <!-- 开票信息 -->
  669. <template v-slot:invoiceCode="{row}">
  670. <el-link
  671. type="primary"
  672. :underline="false"
  673. @click="handleInvoiceDetail(row,'view')">
  674. {{ row.invoiceCode }}
  675. </el-link>
  676. </template>
  677. </ele-pro-table>
  678. </el-card>
  679. </el-tab-pane>
  680. <el-tab-pane label="审批流程" name="bpm">
  681. <bpmDetail
  682. v-if="activeName === 'bpm' && form.processInstanceId"
  683. :id="form.processInstanceId"
  684. ></bpmDetail>
  685. </el-tab-pane>
  686. </el-tabs>
  687. <div slot="footer" class="footer">
  688. <el-button @click="cancel">返回</el-button>
  689. </div>
  690. <!-- 资质证书弹窗 -->
  691. <certificate-qualifications-dialog
  692. :certificate-qualifications-dialog-flag.sync="certificateQualificationsDialogFlag"
  693. v-if="certificateQualificationsDialogFlag"
  694. ref="certificateQualificationsDialogRef"
  695. :contactId="form.id"
  696. @reload="reload">
  697. </certificate-qualifications-dialog>
  698. </ele-modal>
  699. </template>
  700. <script>
  701. import {contactDetail, contactQcPackPageAPI} from '@/api/saleManage/contact';
  702. import {getFile} from '@/api/system/file';
  703. import {getInfoById as getCategoryInfo, getInfoByIds} from '@/api/classifyManage/index';
  704. import fileUpload from '@/components/upload/fileUpload';
  705. import dictMixins from '@/mixins/dictMixins';
  706. import deptSelect from '@/components/CommomSelect/dept-select.vue';
  707. import personSelect from '@/components/CommomSelect/person-select.vue';
  708. import {copyObj} from '@/utils/util';
  709. import certificateQualificationsDialog
  710. from "@/views/purchasingManage/supplierManage/components/certificateQualificationsDialog.vue";
  711. import {reviewStatus} from "@/enum/dict";
  712. import searchTable from "@/views/saleManage/saleOrder/components/searchTable.vue";
  713. import {getTableList} from "@/api/saleManage/saleorder";
  714. import {getSendTableList} from "@/api/saleManage/saleordersendrecord";
  715. import {getReturnTableList} from "@/api/saleManage/returnGoods";
  716. import {getAccountstatementList} from "@/api/saleManage/accountstatement";
  717. import {finPayablePageListAPI} from "@/api/financialManage/payableManage";
  718. import bpmDetail from "@/views/bpm/processInstance/detail.vue";
  719. export default {
  720. props: {
  721. categoryTreeList: Array
  722. },
  723. mixins: [dictMixins],
  724. components: {
  725. bpmDetail,
  726. searchTable,
  727. certificateQualificationsDialog,
  728. fileUpload,
  729. deptSelect,
  730. personSelect
  731. },
  732. data() {
  733. let formDef = {
  734. address: '',
  735. addressId: 0,
  736. addressName: '',
  737. authorizationLimit: 0,
  738. businessLicenseFile: {},
  739. businessScope: '',
  740. categoryId: '',
  741. categoryName: '',
  742. companyCategoryId: '',
  743. companyCategoryName: '',
  744. enterpriseTypeName: '',
  745. enterpriseTypeId: '',
  746. hasParentGroup: 0,
  747. industry: '',
  748. industryCode: '',
  749. industryFullName: '',
  750. mainProduct: '',
  751. name: '',
  752. officialIndustry: '',
  753. phone: '',
  754. registerDate: '',
  755. remark: '',
  756. serialNo: '',
  757. simpleName: '',
  758. legalPerson: '',
  759. registeredCapital: '',
  760. type: 1,
  761. unifiedSocialCreditCode: ''
  762. };
  763. let otherFormDef = {
  764. settlementMode: '',
  765. settlementModeName: '',
  766. taxRate: 0,
  767. address: '',
  768. addressId: '',
  769. deptId: '',
  770. deptName: '',
  771. discount: 0,
  772. salesmanId: '',
  773. salesmanName: '',
  774. sender: '',
  775. senderPhone: ''
  776. };
  777. return {
  778. visible: false,
  779. certificateQualificationsDialogFlag: false,
  780. title: '客户详情',
  781. row: {},
  782. activeName: 'base',
  783. formDef,
  784. otherFormDef,
  785. form: copyObj(formDef),
  786. otherForm: copyObj(otherFormDef),
  787. tableBankData: [],
  788. tableLinkData: [],
  789. ifChiefList: [
  790. {
  791. value: 0,
  792. label: '否'
  793. },
  794. {
  795. value: 1,
  796. label: '是'
  797. }
  798. ],
  799. statusList: [
  800. {
  801. label: '未收款',
  802. value: 0
  803. },
  804. {
  805. label: '部分收款',
  806. value: 1
  807. },
  808. {
  809. label: '已收全款',
  810. value: 2
  811. }
  812. ],
  813. bankColumns: [
  814. {
  815. type: 'index',
  816. width: 55,
  817. align: 'center'
  818. },
  819. {
  820. label: '单位名称',
  821. prop: 'accountName',
  822. slot: 'accountName',
  823. action: 'accountName',
  824. headerSlot: 'accountNameHeader',
  825. align: 'center'
  826. },
  827. {
  828. label: '银行账号',
  829. prop: 'accountNo',
  830. slot: 'accountNo',
  831. action: 'accountNo',
  832. align: 'center'
  833. },
  834. {
  835. label: '开户行',
  836. prop: 'bankName',
  837. slot: 'bankName',
  838. action: 'bankName',
  839. align: 'center'
  840. },
  841. {
  842. label: '银行银联号',
  843. prop: 'interbankNo',
  844. slot: 'interbankNo',
  845. action: 'interbankNo',
  846. align: 'center'
  847. },
  848. ],
  849. linkColumns: [
  850. {
  851. type: 'index',
  852. width: 55,
  853. align: 'center'
  854. },
  855. {
  856. label: '姓名',
  857. prop: 'linkName',
  858. slot: 'linkName',
  859. action: 'linkName',
  860. headerSlot: 'linkNameHeader',
  861. align: 'center'
  862. },
  863. {
  864. label: '手机',
  865. prop: 'mobilePhone',
  866. slot: 'mobilePhone',
  867. action: 'mobilePhone',
  868. headerSlot: 'mobilePhoneHeader',
  869. align: 'center'
  870. },
  871. {
  872. label: '电话',
  873. prop: 'phone',
  874. slot: 'phone',
  875. action: 'phone',
  876. align: 'center'
  877. },
  878. {
  879. label: '微信号',
  880. prop: 'wechat',
  881. slot: 'wechat',
  882. action: 'wechat',
  883. align: 'center'
  884. },
  885. {
  886. label: '邮箱',
  887. prop: 'email',
  888. slot: 'email',
  889. action: 'email',
  890. align: 'center'
  891. },
  892. {
  893. label: '部门',
  894. prop: 'deptName',
  895. slot: 'deptName',
  896. action: 'deptName',
  897. align: 'center'
  898. },
  899. {
  900. label: '职务',
  901. prop: 'post',
  902. slot: 'post',
  903. action: 'post',
  904. align: 'center'
  905. },
  906. {
  907. label: '状态',
  908. prop: 'status',
  909. slot: 'status',
  910. action: 'status',
  911. headerSlot: 'statusHeader',
  912. align: 'center'
  913. },
  914. {
  915. label: '是否首要',
  916. prop: 'ifChief',
  917. slot: 'ifChief',
  918. action: 'ifChief',
  919. align: 'center'
  920. },
  921. {
  922. label: '备注',
  923. prop: 'remark',
  924. slot: 'remark',
  925. action: 'remark',
  926. align: 'center'
  927. },
  928. ],
  929. certificateColumns: [
  930. {
  931. type: 'index',
  932. width: 55,
  933. align: 'center'
  934. },
  935. {
  936. label: '编码',
  937. prop: 'code',
  938. slot: 'code',
  939. align: "center",
  940. minWidth: 120
  941. },
  942. {
  943. label: '名称',
  944. prop: 'name',
  945. slot: 'name',
  946. align: "center",
  947. minWidth: 120
  948. },
  949. {
  950. label: '创建人',
  951. prop: 'createUserName',
  952. slot: 'createUserName',
  953. align: "center",
  954. width: 120
  955. },
  956. {
  957. label: '创建时间',
  958. prop: 'createTime',
  959. slot: 'createTime',
  960. align: "center",
  961. minWidth: 120
  962. },
  963. {
  964. label: '状态',
  965. prop: 'approvalStatus',
  966. slot: 'approvalStatus',
  967. align: "center",
  968. width: 120,
  969. formatter: (_row, _column, cellValue) => {
  970. return reviewStatus[_row.approvalStatus];
  971. }
  972. },
  973. {
  974. label: '备注',
  975. prop: 'remark',
  976. slot: 'remark',
  977. align: "center",
  978. minWidth: 120
  979. },
  980. {
  981. action: 'action',
  982. slot: 'action',
  983. label: '操作',
  984. align: "center",
  985. }
  986. ],
  987. orderColumns: [
  988. {
  989. columnKey: 'index',
  990. label: '序号',
  991. type: 'index',
  992. width: 55,
  993. align: 'center',
  994. showOverflowTooltip: true,
  995. fixed: 'left'
  996. },
  997. {
  998. prop: 'orderNo',
  999. label: '订单编码',
  1000. align: 'center',
  1001. sortable: true,
  1002. slot: 'orderNo',
  1003. showOverflowTooltip: true,
  1004. minWidth: 160
  1005. },
  1006. {
  1007. prop: 'contractNo',
  1008. label: '合同编码',
  1009. sortable: true,
  1010. align: 'center',
  1011. slot: 'contractNo',
  1012. showOverflowTooltip: true,
  1013. minWidth: 160
  1014. },
  1015. {
  1016. prop: 'contractNumber',
  1017. label: '合同编号',
  1018. align: 'center',
  1019. showOverflowTooltip: true,
  1020. minWidth: 160
  1021. },
  1022. // {
  1023. // prop: 'deliveryDate',
  1024. // label: '交货日期',
  1025. // align: 'center',
  1026. // showOverflowTooltip: true,
  1027. // minWidth: 200
  1028. // },
  1029. {
  1030. prop: 'saleTypeName',
  1031. label: '销售类型',
  1032. align: 'center',
  1033. showOverflowTooltip: true,
  1034. minWidth: 140
  1035. },
  1036. // {
  1037. // prop: 'partaName',
  1038. // label: '客户名称',
  1039. // align: 'center',
  1040. // showOverflowTooltip: true,
  1041. // minWidth: 180
  1042. // },
  1043. {
  1044. prop: 'partaLinkName',
  1045. label: '联系人',
  1046. align: 'center',
  1047. showOverflowTooltip: true,
  1048. minWidth: 130
  1049. },
  1050. {
  1051. prop: 'partaTel',
  1052. label: '联系电话',
  1053. align: 'center',
  1054. showOverflowTooltip: true,
  1055. minWidth: 130
  1056. },
  1057. {
  1058. prop: 'partbName',
  1059. label: '售出方名称',
  1060. align: 'center',
  1061. showOverflowTooltip: true,
  1062. minWidth: 130
  1063. },
  1064. {
  1065. prop: 'partbLinkName',
  1066. label: '售出方联系人',
  1067. align: 'center',
  1068. showOverflowTooltip: true,
  1069. minWidth: 130
  1070. },
  1071. {
  1072. prop: 'partbTel',
  1073. label: '售出方联系电话',
  1074. align: 'center',
  1075. showOverflowTooltip: true,
  1076. minWidth: 130
  1077. },
  1078. {
  1079. prop: 'payAmount',
  1080. label: '金额(元)',
  1081. align: 'center',
  1082. showOverflowTooltip: true,
  1083. minWidth: 170
  1084. },
  1085. {
  1086. prop: 'orderStatus',
  1087. label: '审核状态',
  1088. align: 'center',
  1089. showOverflowTooltip: true,
  1090. minWidth: 100,
  1091. formatter: (_row, _column, cellValue) => {
  1092. return reviewStatus[_row.orderStatus];
  1093. }
  1094. },
  1095. {
  1096. prop: 'createTime',
  1097. label: '创建时间',
  1098. align: 'center',
  1099. showOverflowTooltip: true,
  1100. minWidth: 170
  1101. },
  1102. // {
  1103. // columnKey: 'action',
  1104. // label: '操作',
  1105. // width: 230,
  1106. // align: 'center',
  1107. // resizable: false,
  1108. // slot: 'action',
  1109. // showOverflowTooltip: true,
  1110. // fixed: 'right'
  1111. // }
  1112. ],
  1113. sendColumns: [
  1114. {
  1115. columnKey: 'index',
  1116. label: '序号',
  1117. type: 'index',
  1118. width: 55,
  1119. align: 'center',
  1120. showOverflowTooltip: true
  1121. },
  1122. {
  1123. prop: 'docNo',
  1124. label: '发货单编码',
  1125. sortable: true,
  1126. align: 'center',
  1127. slot: 'docNo',
  1128. showOverflowTooltip: true,
  1129. minWidth: 200
  1130. },
  1131. {
  1132. prop: 'orderNo',
  1133. label: '销售订单编码',
  1134. sortable: true,
  1135. align: 'center',
  1136. slot: 'orderNo',
  1137. showOverflowTooltip: true,
  1138. minWidth: 200
  1139. },
  1140. {
  1141. prop: 'contactName',
  1142. label: '客户名称',
  1143. align: 'center',
  1144. showOverflowTooltip: true,
  1145. minWidth: 180
  1146. },
  1147. {
  1148. prop: 'replied',
  1149. label: '是否回执',
  1150. align: 'center',
  1151. showOverflowTooltip: true,
  1152. minWidth: 200,
  1153. formatter: (_row, _column, cellValue) => {
  1154. return _row.replied == 1 ? '是' : '否';
  1155. }
  1156. },
  1157. {
  1158. prop: 'reviewStatus',
  1159. label: '状态',
  1160. align: 'center',
  1161. showOverflowTooltip: true,
  1162. minWidth: 200,
  1163. formatter: (_row, _column, cellValue) => {
  1164. return reviewStatus[_row.reviewStatus];
  1165. }
  1166. },
  1167. {
  1168. prop: 'createTime',
  1169. label: '创建时间',
  1170. align: 'center',
  1171. showOverflowTooltip: true,
  1172. minWidth: 170
  1173. }
  1174. ],
  1175. returnColumns: [
  1176. {
  1177. columnKey: 'index',
  1178. label: '序号',
  1179. type: 'index',
  1180. width: 55,
  1181. align: 'center',
  1182. showOverflowTooltip: true,
  1183. },
  1184. {
  1185. prop: 'returnNo',
  1186. label: '退货单编码',
  1187. sortable: true,
  1188. align: 'center',
  1189. slot: 'returnNo',
  1190. showOverflowTooltip: true,
  1191. minWidth: 200
  1192. },
  1193. {
  1194. prop: 'sendNo',
  1195. label: '发货单编码',
  1196. sortable: true,
  1197. align: 'center',
  1198. slot: 'sendNo',
  1199. showOverflowTooltip: true,
  1200. minWidth: 200
  1201. },
  1202. {
  1203. prop: 'orderNo',
  1204. label: '销售订单编码',
  1205. sortable: true,
  1206. align: 'center',
  1207. slot: 'orderNo',
  1208. showOverflowTooltip: true,
  1209. minWidth: 200
  1210. },
  1211. {
  1212. prop: 'contactName',
  1213. label: '客户名称',
  1214. align: 'center',
  1215. showOverflowTooltip: true,
  1216. minWidth: 180
  1217. },
  1218. {
  1219. prop: 'payAmount',
  1220. label: '应付金额',
  1221. align: 'center',
  1222. slot: 'payAmount',
  1223. showOverflowTooltip: true,
  1224. minWidth: 200
  1225. },
  1226. {
  1227. prop: 'returnSourceType',
  1228. label: '退货类型',
  1229. align: 'center',
  1230. showOverflowTooltip: true,
  1231. minWidth: 200,
  1232. formatter: (_row, _column, cellValue) => {
  1233. return _row.returnSourceType == 2? '受托收货退货':'销售发货退货'
  1234. }
  1235. },
  1236. {
  1237. prop: 'reviewStatus',
  1238. label: '状态',
  1239. align: 'center',
  1240. showOverflowTooltip: true,
  1241. minWidth: 200,
  1242. formatter: (_row, _column, cellValue) => {
  1243. return reviewStatus[_row.reviewStatus];
  1244. }
  1245. },
  1246. {
  1247. prop: 'createTime',
  1248. label: '创建时间',
  1249. align: 'center',
  1250. showOverflowTooltip: true,
  1251. minWidth: 170
  1252. }
  1253. ],
  1254. reconciliationColumns: [
  1255. {
  1256. width: 45,
  1257. type: 'selection',
  1258. columnKey: 'selection',
  1259. align: 'center'
  1260. },
  1261. {
  1262. columnKey: 'index',
  1263. label: '序号',
  1264. type: 'index',
  1265. width: 55,
  1266. align: 'center',
  1267. showOverflowTooltip: true,
  1268. fixed: 'left'
  1269. },
  1270. {
  1271. prop: 'statementNo',
  1272. label: '对账单编码',
  1273. align: 'center',
  1274. slot: 'statementNo',
  1275. showOverflowTooltip: true,
  1276. minWidth: 200
  1277. },
  1278. {
  1279. prop: 'contactName',
  1280. label: '客户名称',
  1281. align: 'center',
  1282. showOverflowTooltip: true,
  1283. minWidth: 180
  1284. },
  1285. {
  1286. prop: 'startDate',
  1287. label: '对账开始日期',
  1288. align: 'center',
  1289. slot: 'startDate',
  1290. showOverflowTooltip: true,
  1291. minWidth: 200
  1292. },
  1293. {
  1294. prop: 'endDate',
  1295. label: '对账结束日期',
  1296. align: 'center',
  1297. slot: 'endDate',
  1298. showOverflowTooltip: true,
  1299. minWidth: 200
  1300. },
  1301. {
  1302. prop: 'amountTotalPrice',
  1303. label: '总金额',
  1304. align: 'center',
  1305. showOverflowTooltip: true,
  1306. minWidth: 130
  1307. },
  1308. {
  1309. prop: 'amountReceivablePrice',
  1310. label: '应收金额',
  1311. align: 'center',
  1312. showOverflowTooltip: true,
  1313. minWidth: 130
  1314. },
  1315. {
  1316. prop: 'amountPayablePrice',
  1317. label: '应付金额',
  1318. align: 'center',
  1319. showOverflowTooltip: true,
  1320. minWidth: 130
  1321. },
  1322. {
  1323. prop: 'reviewStatus',
  1324. label: '状态',
  1325. align: 'center',
  1326. showOverflowTooltip: true,
  1327. minWidth: 200,
  1328. formatter: (_row, _column, cellValue) => {
  1329. return reviewStatus[_row.reviewStatus];
  1330. }
  1331. },
  1332. {
  1333. prop: 'replied',
  1334. label: '是否回执',
  1335. align: 'center',
  1336. slot: 'replied',
  1337. showOverflowTooltip: true,
  1338. minWidth: 200,
  1339. formatter: (_row, _column, cellValue) => {
  1340. return _row.replied ? '是' : '否';
  1341. }
  1342. },
  1343. {
  1344. prop: 'createTime',
  1345. label: '创建时间',
  1346. align: 'center',
  1347. showOverflowTooltip: true,
  1348. minWidth: 170
  1349. },
  1350. {
  1351. columnKey: 'action',
  1352. label: '操作',
  1353. width: 230,
  1354. align: 'center',
  1355. resizable: false,
  1356. slot: 'action',
  1357. showOverflowTooltip: true,
  1358. fixed: 'right'
  1359. }
  1360. ],
  1361. invoiceColumns: [
  1362. {
  1363. width: 60,
  1364. label: '序号',
  1365. type: 'index',
  1366. columnKey: 'index',
  1367. align: 'center',
  1368. },
  1369. {
  1370. minWidth: 130,
  1371. prop: 'code',
  1372. label: '应付编码',
  1373. align: 'center',
  1374. slot: 'code',
  1375. showOverflowTooltip: true
  1376. },
  1377. {
  1378. minWidth: 120,
  1379. prop: 'invoiceCode',
  1380. label: '发票编码',
  1381. slot: 'invoiceCode',
  1382. align: 'center',
  1383. showOverflowTooltip: true
  1384. },
  1385. {
  1386. minWidth: 130,
  1387. prop: 'contactName',
  1388. label: '单位名称',
  1389. align: 'center',
  1390. slot: 'contactName',
  1391. showOverflowTooltip: true
  1392. },
  1393. {
  1394. minWidth: 140,
  1395. prop: 'payableDate',
  1396. label: '应付日期',
  1397. slot: 'payableDate',
  1398. align: 'center',
  1399. showOverflowTooltip: true
  1400. },
  1401. {
  1402. minWidth: 100,
  1403. prop: 'payableTotalPrice',
  1404. label: '应付金额',
  1405. align: 'center',
  1406. slot: 'payableTotalPrice',
  1407. showOverflowTooltip: true
  1408. },
  1409. {
  1410. minWidth: 100,
  1411. prop: 'paidTotalPrice',
  1412. label: '已付金额',
  1413. align: 'center',
  1414. slot: 'paidTotalPrice',
  1415. showOverflowTooltip: true
  1416. },
  1417. {
  1418. minWidth: 100,
  1419. prop: 'unpaidTotalPrice',
  1420. label: '未付金额',
  1421. align: 'center',
  1422. slot: 'unpaidTotalPrice',
  1423. showOverflowTooltip: true
  1424. },
  1425. {
  1426. minWidth: 100,
  1427. prop: 'sourceCode',
  1428. label: '来源编码',
  1429. align: 'center',
  1430. slot: 'sourceCode',
  1431. showOverflowTooltip: true
  1432. },
  1433. {
  1434. minWidth: 100,
  1435. prop: 'accountingSubjectName',
  1436. label: '会计科目',
  1437. align: 'center',
  1438. slot: 'accountingSubjectName',
  1439. showOverflowTooltip: true
  1440. },
  1441. {
  1442. minWidth: 100,
  1443. prop: 'status',
  1444. label: '收款状态',
  1445. align: 'center',
  1446. slot: 'status',
  1447. showOverflowTooltip: true,
  1448. formatter: (_row, _column, cellValue) => {
  1449. return this.statusList.find(item => item.value === cellValue).label
  1450. }
  1451. },
  1452. {
  1453. minWidth: 100,
  1454. prop: 'approvalStatus',
  1455. label: '审核状态',
  1456. align: 'center',
  1457. slot: 'approvalStatus',
  1458. formatter: (_row, _column, cellValue) => {
  1459. return reviewStatus[_row.approvalStatus];
  1460. }
  1461. }
  1462. ]
  1463. };
  1464. },
  1465. methods: {
  1466. async open(row) {
  1467. this.row = row;
  1468. this.visible = true;
  1469. await this._getById(row.id);
  1470. },
  1471. /* 订单记录表格数据源 */
  1472. orderDatasource({page, limit, where, order}) {
  1473. return getTableList({
  1474. pageNum: page,
  1475. size: limit,
  1476. ...where,
  1477. partaName:this.row.name
  1478. })
  1479. },
  1480. /* 发货记录表格数据源 */
  1481. sendDatasource({ page, limit, where, order }) {
  1482. return getSendTableList({
  1483. pageNum: page,
  1484. size: limit,
  1485. ...where,
  1486. contactName:this.row.name
  1487. });
  1488. },
  1489. /* 退货表格数据源 */
  1490. returnDatasource({page, limit, where, order}) {
  1491. return getReturnTableList({
  1492. pageNum: page,
  1493. size: limit,
  1494. ...where,
  1495. contactName:this.row.name
  1496. });
  1497. },
  1498. /* 对账单记录表格数据源 */
  1499. reconciliationDatasource({page, limit, where, order}) {
  1500. return getAccountstatementList({
  1501. pageNum: page,
  1502. size: limit,
  1503. type: 1,
  1504. ...where,
  1505. contactName:this.row.name
  1506. });
  1507. },
  1508. /* 开票记录表格数据源 */
  1509. invoiceDatasource({page, limit, where, order}) {
  1510. return finPayablePageListAPI({
  1511. pageNum: page,
  1512. size: limit,
  1513. ...where,
  1514. contactName:this.row.name
  1515. });
  1516. },
  1517. cancel() {
  1518. this.$nextTick(() => {
  1519. // 关闭后,销毁所有的表单数据
  1520. this.form = copyObj(this.formDef),
  1521. this.otherForm = copyObj(this.otherFormDef),
  1522. this.tableBankData = []
  1523. this.tableLinkData = []
  1524. this.visible = false;
  1525. })
  1526. },
  1527. async _getById(id) {
  1528. const data = await contactDetail(id);
  1529. this.form = data.base;
  1530. this.otherForm = data.other;
  1531. this.tableBankData = data.bankList;
  1532. this.tableLinkData = data.linkList;
  1533. if (this.tableLinkData && this.tableLinkData.length > 0) {
  1534. this.tableLinkData.forEach(e => e.status = e.status + "");
  1535. }
  1536. if (this.form.level) {
  1537. this.form.level = this.form.level + "";
  1538. }
  1539. await getInfoByIds(this.form.categoryId).then((res) => {
  1540. let categoryName = res.data.map(item=>item.name)?.join(',')
  1541. this.$set(this.form, 'categoryName', categoryName)
  1542. });
  1543. },
  1544. handleActive(val) {
  1545. if (val.name == 'certificate') {
  1546. this.reload()
  1547. }
  1548. },
  1549. //新增/查看/修改资质
  1550. addCertificate(type, row) {
  1551. this.certificateQualificationsDialogFlag = true
  1552. this.$nextTick(() => {
  1553. this.$refs.certificateQualificationsDialogRef.init(type, row)
  1554. })
  1555. },
  1556. /* 证书资质表格数据源 */
  1557. tableCertificateData({page, limit, where}) {
  1558. if (!this.form.id) return []
  1559. return contactQcPackPageAPI({
  1560. pageNum: page,
  1561. size: limit,
  1562. ...where,
  1563. contactId: this.form.id
  1564. });
  1565. },
  1566. /* 刷新表格 */
  1567. reload(where) {
  1568. where = {
  1569. ...where,
  1570. contactId: this.form.id
  1571. }
  1572. this.$refs.certificateTable.reload({page: 1, where});
  1573. },
  1574. downloadFile(file) {
  1575. getFile({objectName: file.storePath}, file.name);
  1576. },
  1577. }
  1578. };
  1579. </script>