detailsPage.vue 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921
  1. <template>
  2. <dev>
  3. <el-card class="box-card">
  4. <el-form ref="userDataForm" :rules="rules" :model="formData" size="medium" label-width="100px">
  5. <div class="head">
  6. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  7. @click="backToList">返回列表
  8. </el-button>
  9. <h4 style="margin: 0">往来单位</h4>
  10. <dev>
  11. <el-button type="primary" @click="submitForm">保存</el-button>
  12. </dev>
  13. </div>
  14. <el-row style="display: flex; flex-direction: row; align-items: center;">
  15. <div style="width: 8px; height: 20px; border-radius: 2px; background-color: #bd3124; margin-right: 6px;">
  16. </div>
  17. <h4>详情(必填)</h4>
  18. </el-row>
  19. <el-row gutter="15">
  20. <el-col :span="8">
  21. <el-form-item label="客户分类" prop="corpType">
  22. <!-- <el-select v-model="formData.corpType" placeholder="请选择客户分类" clearable :style="{ width: '100%' }">
  23. <el-option v-for="(item, index) in field102Options" :key="index" :label="item.label" :value="item.value"
  24. :disabled="item.disabled"></el-option>
  25. </el-select> -->
  26. <avue-input-tree :check-strictly="true" @change="corpTypeChange" multiple v-model="formData.corpTypeList"
  27. placeholder="请选择客户分类" :props="{ label: 'cnName', value: 'id', disabled: 'status' }"
  28. :dic="customTypeData" :style="{ width: '100%' }"></avue-input-tree>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="8">
  32. <el-form-item label="客户编号" prop="code">
  33. <!-- <el-select v-model="formData.code" placeholder="请选择客户编号" clearable :style="{width: '100%'}">
  34. <el-option v-for="(item, index) in field103Options" :key="index" :label="item.label"
  35. :value="item.value" :disabled="item.disabled"></el-option>
  36. </el-select> -->
  37. <el-input v-model="formData.code" placeholder="请输入客户编号" clearable :style="{ width: '100%' }">
  38. </el-input>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="8">
  42. <el-form-item label="客户简称" prop="shortName">
  43. <!-- <el-select v-model="formData.shortName" placeholder="请选择客户简称" clearable :style="{width: '100%'}">
  44. <el-option v-for="(item, index) in field104Options" :key="index" :label="item.label"
  45. :value="item.value" :disabled="item.disabled"></el-option>
  46. </el-select> -->
  47. <el-input v-model="formData.shortName" placeholder="请输入客户简称" clearable :style="{ width: '100%' }">
  48. </el-input>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="16">
  52. <el-form-item label="客户名称" prop="cnName">
  53. <el-input v-model="formData.cnName" placeholder="请输入客户名称" clearable :style="{ width: '100%' }">
  54. </el-input>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="8">
  58. <el-form-item label="信用代码" prop="uscc">
  59. <el-input v-model="formData.uscc" placeholder="请输入统一社会信用代码" clearable :style="{ width: '100%' }">
  60. </el-input>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :span="16">
  64. <el-form-item label="英文名称" prop="enName">
  65. <el-input v-model="formData.enName" placeholder="请输入英文名称" clearable :style="{ width: '100%' }">
  66. </el-input>
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="8">
  70. <!-- <el-form-item label="英文地址" prop="enAddr">
  71. <el-input v-model="formData.enAddr" placeholder="请输入英文地址" clearable :style="{ width: '100%' }">
  72. </el-input>
  73. </el-form-item> -->
  74. <el-form-item label="邮箱" prop="email">
  75. <el-input v-model="formData.email" placeholder="请输入邮箱" clearable :style="{ width: '100%' }">
  76. </el-input>
  77. </el-form-item>
  78. </el-col>
  79. </el-row>
  80. <el-row gutter="15">
  81. <el-col :span="16">
  82. <el-form-item label="中文地址" prop="cnAddr">
  83. <el-input v-model="formData.cnAddr" placeholder="请输入中文地址" clearable :style="{ width: '100%' }">
  84. </el-input>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="8">
  88. <el-form-item label="备注" prop="remarks">
  89. <el-input v-model="formData.remarks" placeholder="请输入备注" clearable :style="{ width: '100%' }">
  90. </el-input>
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. <el-row gutter="15">
  95. <el-col :span="16">
  96. <el-form-item label="英文地址" prop="enAddr">
  97. <el-input v-model="formData.enAddr" placeholder="请输入英文地址" clearable :style="{ width: '100%' }">
  98. </el-input>
  99. </el-form-item>
  100. </el-col>
  101. <el-col :span="8">
  102. <el-form-item label="状态" prop="status">
  103. <el-select v-model="formData.status" placeholder="请选择状态" clearable :style="{ width: '100%' }">
  104. <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.label" :value="item.value"
  105. :disabled="item.disabled"></el-option>
  106. </el-select>
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. </el-form>
  111. </el-card>
  112. <el-card class="box-card">
  113. <el-form :model="formData" size="medium" label-width="100px" ref="customerDetailsForm" :rules="rules">
  114. <el-row gutter="15">
  115. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  116. <el-tab-pane label="客户详情" name="kgxq">
  117. <el-col :span="8">
  118. <el-form-item label="企业类型" prop="enterpriseType">
  119. <el-select v-model="formData.enterpriseType" size="small" placeholder="请选择信用等级" clearable
  120. :style="{ width: '100%' }">
  121. <el-option v-for="(item, index) in enterpriseTypeDict" :key="index" :label="item.dictValue"
  122. :value="item.dictKey" :disabled="item.disabled"></el-option>
  123. </el-select>
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="8">
  127. <el-form-item label="业务来源" prop="sourceType">
  128. <el-row :gutter="10">
  129. <el-col :span="10">
  130. <search-query :datalist="sourceTypeData" :selectValue="formData.sourceType" :filterable="true"
  131. :clearable="true" :remote="true" :buttonIf="false" placeholder="请选择业务来源"
  132. @corpChange="sourceCorp($event, 'sourceType')">
  133. </search-query>
  134. </el-col>
  135. <el-col :span="13">
  136. <search-query :datalist="srcData" :selectValue="formData.srcCnName" :filterable="true"
  137. :clearable="true" :remote="true" :disabled="!formData.sourceType" :buttonIf="false"
  138. :forParameter="sourceforParameter" placeholder="请选择来源明细"
  139. @remoteMethod="sourceRemote($event, 'srcCnName')" @corpChange="sourceCorp($event, 'srcCnName')"
  140. @corpFocus="sourceRemote($event, 'srcCnName')">
  141. </search-query>
  142. </el-col>
  143. </el-row>
  144. <!--<el-input v-model="formData.sourceType" placeholder="请输入业务来源" clearable :style="{ width: '100%' }">-->
  145. <!--</el-input>-->
  146. </el-form-item>
  147. </el-col>
  148. <el-col :span="8">
  149. <el-form-item label="客户来源" prop="corpSource">
  150. <el-select v-model="formData.corpSource" size="small" placeholder="请选择客户来源" clearable
  151. :style="{ width: '100%' }">
  152. <el-option v-for="(item, index) in corpSourceDict" :key="index" :label="item.dictValue"
  153. :value="item.dictKey" :disabled="item.disabled"></el-option>
  154. </el-select>
  155. </el-form-item>
  156. </el-col>
  157. <el-col :span="8">
  158. <el-form-item label="国家" prop="cntyCode">
  159. <search-query ref="SearchQuery" :datalist="cntyOptions" title="国家" :filterable="true"
  160. :clearable="true" :remote="true"
  161. :forParameter="{ key: 'id', label: 'cnName', value: 'code', disabled: 'status' }"
  162. :disabledStatus="1" :selectValue="formData.cntyCode" placeholder="请选择国家"
  163. @remoteMethod="bcountrysListfun" @corpChange="bcountrysChange">
  164. <bcountrys></bcountrys>
  165. </search-query>
  166. </el-form-item>
  167. </el-col>
  168. <el-col :span="8">
  169. <el-form-item label="优势航线" prop="advantageRoute">
  170. <search-query ref="SearchQuery" :datalist="advantageData" :selectValue="formData.advantageRoute"
  171. title="优势航线" :filterable="true" :clearable="true" :remote="true" placeholder="请选择优势航线"
  172. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }" @corpFocus="blinesListfun"
  173. @remoteMethod="blinesListfun" @corpChange="blinesChange">
  174. <blines></blines>
  175. </search-query>
  176. </el-form-item>
  177. </el-col>
  178. <el-col :span="8">
  179. <el-form-item label="海关号" prop="customsCode">
  180. <el-input v-model="formData.customsCode" size="small" placeholder="请输入海关号" clearable
  181. :style="{ width: '100%' }">
  182. </el-input>
  183. </el-form-item>
  184. </el-col>
  185. <el-col :span="8">
  186. <el-form-item label="负责人" prop="mgrName">
  187. <el-input v-model="formData.mgrName" size="small" placeholder="请输入负责人" clearable
  188. :style="{ width: '100%' }">
  189. </el-input>
  190. </el-form-item>
  191. </el-col>
  192. <el-col :span="8">
  193. <el-form-item label="联系人电话" prop="tel">
  194. <el-input v-model="formData.tel" size="small" placeholder="请输入联系人电话" clearable
  195. :style="{ width: '100%' }">
  196. </el-input>
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="8">
  200. <el-form-item label="传真" prop="fax">
  201. <el-input v-model="formData.fax" size="small" placeholder="请输入传真" clearable
  202. :style="{ width: '100%' }">
  203. </el-input>
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="8">
  207. <el-form-item label="SCAC码" prop="scacCode">
  208. <el-input v-model="formData.scacCode" size="small" placeholder="请输入SCAC码" clearable
  209. :style="{ width: '100%' }">
  210. </el-input>
  211. </el-form-item>
  212. </el-col>
  213. <el-col :span="8">
  214. <el-form-item label="维护人员" prop="maintenanceStaffName">
  215. <!--<el-input v-model="formData.maintenanceStaffName" size="small" placeholder="请输入维护人员" clearable-->
  216. <!-- :style="{ width: '100%' }">-->
  217. <!--</el-input>-->
  218. <search-query :datalist="maintenanceStaffData" :selectValue="formData.maintenanceStaffName"
  219. :filterable="true" :clearable="true" :buttonIf="false" placeholder="请选择维护人员"
  220. :forParameter="{ key: 'id', label: 'name', value: 'name' }"
  221. @corpChange="maintenanceStaffChange($event, 'maintenanceStaffName')" @corpFocus="selectListLosfun">
  222. </search-query>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="8">
  226. <el-form-item label="操作员" prop="salesId">
  227. <!-- <el-input v-model="formData.salesId" placeholder="请输入业务员" clearable :style="{ width: '100%' }"> -->
  228. <el-select v-model="formData.salesId" size="small" filterable @change="salesChange"
  229. placeholder="请选择操作员" clearable :style="{ width: '100%' }">
  230. <el-option v-for="(item, index) in salesData" :key="index" :label="item.realName" :value="item.id"
  231. :disabled="item.disabled"></el-option>
  232. </el-select>
  233. </el-form-item>
  234. </el-col>
  235. <!-- <el-col :span="8">
  236. <el-form-item label="所属单位编号" prop="field125">
  237. <el-input v-model="formData.field125" placeholder="请输入所属单位编号" clearable :style="{width: '100%'}">
  238. </el-input>
  239. </el-form-item>
  240. </el-col> -->
  241. <el-col :span="8">
  242. <el-form-item label="所属单位名称" prop="corpName">
  243. <el-input v-model="formData.corpName" size="small" placeholder="请输入名称" clearable
  244. :style="{ width: '100%' }">
  245. </el-input>
  246. </el-form-item>
  247. </el-col>
  248. <el-col :span="6">
  249. <el-form-item label="信用等级" prop="creditLevel">
  250. <el-select v-model="formData.creditLevel" size="small" placeholder="请输入信用等级" clearable
  251. :style="{ width: '100%' }">
  252. <el-option v-for="(item, index) in creditLevelDict" :key="index" :label="item.dictValue"
  253. :value="item.dictKey" :disabled="item.disabled"></el-option>
  254. </el-select>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="6">
  258. <el-form-item label="PS规则" prop="psRate">
  259. <el-input v-model="formData.psRate" placeholder="请输入PS规则" clearable :style="{ width: '100%' }"
  260. @input="psRateValid(formData.psRate)" @blur="psRateBlue" />
  261. <!--<el-input-number v-model="formData.psRate" controls-position="right" @change="handleChange" :min="0"-->
  262. <!-- :precision="2" :step="1" :style="{ width: '100%' }"></el-input-number>-->
  263. <!-- <search-query :datalist="psRateData"-->
  264. <!-- :selectValue="formData.psRate"-->
  265. <!-- :filterable="true"-->
  266. <!-- :clearable="true"-->
  267. <!-- :buttonIf="false"-->
  268. <!-- :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"-->
  269. <!-- @corpChange="psRateChange($event,'psRate')"-->
  270. <!-- @corpFocus="psRateWorkDictsfun">-->
  271. <!-- </search-query>-->
  272. </el-form-item>
  273. </el-col>
  274. <el-col :span="6">
  275. <el-form-item label="分管员" prop="adminProfiles">
  276. <el-select v-model="formData.adminProfilesList" size="small" multiple @change="adminProfilesChange"
  277. filterable placeholder="请选择分管员" :style="{ width: '100%' }">
  278. <el-option v-for="(item, index) in userOptions" :key="index" :label="item.realName" :value="item.id"
  279. :disabled="item.disabled">
  280. </el-option>
  281. </el-select>
  282. </el-form-item>
  283. </el-col>
  284. <el-col :span="6">
  285. <el-form-item label="船公司约号" prop="carrierArgreementNo">
  286. <el-input v-model="formData.carrierArgreementNo" size="small" placeholder="请输入船公司约号" clearable
  287. :style="{ width: '100%' }">
  288. </el-input>
  289. </el-form-item>
  290. </el-col>
  291. <el-col :span="4">
  292. <el-form-item label="存在HP/S" prop="isPs">
  293. <el-switch v-model="formData.isPs" size="small" :active-value="1" :inactive-value="0" active-text="开启"
  294. inactive-text="关闭"></el-switch>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="4">
  298. <el-form-item label="允许付大于收" prop="psAllowLargeCredit">
  299. <el-switch v-model="formData.psAllowLargeCredit" size="small" :active-value="1" :inactive-value="0"
  300. active-text="开启" inactive-text="关闭"></el-switch>
  301. </el-form-item>
  302. </el-col>
  303. <el-col :span="4">
  304. <el-form-item label="是否已签约" prop="isSigned">
  305. <el-switch v-model="formData.isSigned" size="small" :active-value="1" :inactive-value="0"
  306. active-text="是" inactive-text="否"></el-switch>
  307. </el-form-item>
  308. </el-col>
  309. <el-col :span="4">
  310. <el-form-item label="是否VIP" prop="vip">
  311. <el-switch v-model="formData.vip" size="small" :active-value="1" :inactive-value="0" active-text="是"
  312. inactive-text="否"></el-switch>
  313. </el-form-item>
  314. </el-col>
  315. <el-col :span="8">
  316. <el-form-item label="协议号" prop="agreementNo">
  317. <el-input v-model="formData.agreementNo" size="small" placeholder="请输入协议号" clearable
  318. :style="{ width: '100%' }">
  319. </el-input>
  320. </el-form-item>
  321. </el-col>
  322. <el-col :span="24">
  323. <el-form-item label="详情信息" prop="details">
  324. <el-input v-model="formData.details" size="small" type="textarea" placeholder="请输入详情信息"
  325. :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
  326. </el-form-item>
  327. </el-col>
  328. </el-tab-pane>
  329. <el-tab-pane label="EDI数据" name="edi">
  330. <el-col :span="8">
  331. <el-form-item label="海运邮箱" prop="seaEmail">
  332. <el-input v-model="formData.seaEmail" size="small" placeholder="请输入海运邮箱" clearable
  333. :style="{ width: '100%' }">
  334. </el-input>
  335. </el-form-item>
  336. </el-col>
  337. <el-col :span="8">
  338. <el-form-item label="空运邮箱" prop="airEmail">
  339. <el-input v-model="formData.airEmail" size="small" placeholder="请输入空运邮箱" clearable
  340. :style="{ width: '100%' }">
  341. </el-input>
  342. </el-form-item>
  343. </el-col>
  344. <el-col :span="8">
  345. <el-form-item label="国际编码" prop="unCode">
  346. <el-input v-model="formData.unCode" size="small" placeholder="请输入国际编码" clearable
  347. :style="{ width: '100%' }">
  348. </el-input>
  349. </el-form-item>
  350. </el-col>
  351. <el-col :span="8">
  352. <el-form-item label="iGenZong 代码" prop="igenzongCode">
  353. <el-input v-model="formData.igenzongCode" size="small" placeholder="请输入iGenZong 代码" clearable
  354. :style="{ width: '100%' }">
  355. </el-input>
  356. </el-form-item>
  357. </el-col>
  358. <el-col :span="8">
  359. <el-form-item label="美线约号" prop="amLineAgreementno">
  360. <el-input v-model="formData.amLineAgreementno" size="small" placeholder="请输入美线约号" clearable
  361. :style="{ width: '100%' }">
  362. </el-input>
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="8">
  366. <el-form-item label="船公司代码" prop="carrierCode">
  367. <el-input v-model="formData.carrierCode" size="small" placeholder="请输入船公司代码" clearable
  368. :style="{ width: '100%' }">
  369. </el-input>
  370. </el-form-item>
  371. </el-col>
  372. <el-col :span="8">
  373. <el-form-item label="场站三字码" prop="cyCode">
  374. <el-input v-model="formData.cyCode" size="small" placeholder="请输入场站三字码" clearable
  375. :style="{ width: '100%' }">
  376. </el-input>
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="8">
  380. <el-form-item label="CMA Laracode" prop="cmaLaracode">
  381. <el-input v-model="formData.cmaLaracode" size="small" placeholder="请输入CMA Laracode" clearable
  382. :style="{ width: '100%' }">
  383. </el-input>
  384. </el-form-item>
  385. </el-col>
  386. <el-col :span="8">
  387. <el-form-item label="CMA Location" prop="cmaLocation">
  388. <el-input v-model="formData.cmaLocation" size="small" placeholder="请输入CMA Location" clearable
  389. :style="{ width: '100%' }">
  390. </el-input>
  391. </el-form-item>
  392. </el-col>
  393. <el-col :span="8">
  394. <el-form-item label="ZIM CUCC" prop="zimCucc">
  395. <el-input v-model="formData.zimCucc" size="small" placeholder="请输入ZIM CUCC" clearable
  396. :style="{ width: '100%' }">
  397. </el-input>
  398. </el-form-item>
  399. </el-col>
  400. <el-col :span="8">
  401. <el-form-item label="关贸云编码" prop="gmyCode">
  402. <el-input v-model="formData.gmyCode" size="small" placeholder="请输入关贸云编码" clearable
  403. :style="{ width: '100%' }">
  404. </el-input>
  405. </el-form-item>
  406. </el-col>
  407. <el-col :span="8">
  408. <el-form-item label="INTRRA ICUA" prop="inttraIcua">
  409. <el-input v-model="formData.inttraIcua" size="small" placeholder="请输入INTRRA ICUA" clearable
  410. :style="{ width: '100%' }">
  411. </el-input>
  412. </el-form-item>
  413. </el-col>
  414. <el-col :span="8">
  415. <el-form-item label="INTRRA CODE" prop="inttraCode">
  416. <el-input v-model="formData.inttraCode" size="small" placeholder="请输入INTRRA CODE" clearable
  417. :style="{ width: '100%' }">
  418. </el-input>
  419. </el-form-item>
  420. </el-col>
  421. <el-col :span="8">
  422. <el-form-item label="INTRRA ICUA 联系人" prop="inttraIcuaAttn" label-width="140px">
  423. <el-input v-model="formData.inttraIcuaAttn" size="small" placeholder="请输入INTRRA ICUA 联系人" clearable
  424. :style="{ width: '100%' }">
  425. </el-input>
  426. </el-form-item>
  427. </el-col>
  428. <el-col :span="8">
  429. <el-form-item label="INTRRA ICUA Email" prop="inttraIcuaEmail" label-width="140px">
  430. <el-input v-model="formData.inttraIcuaEmail" size="small" placeholder="请输入INTRRA ICUA Email" clearable
  431. :style="{ width: '100%' }">
  432. </el-input>
  433. </el-form-item>
  434. </el-col>
  435. <el-col :span="8">
  436. <el-form-item label="EDI 格式名称" prop="ediFmt">
  437. <el-input v-model="formData.ediFmt" size="small" placeholder="请输入EDI 格式名称" clearable
  438. :style="{ width: '100%' }">
  439. </el-input>
  440. </el-form-item>
  441. </el-col>
  442. <el-col :span="8">
  443. <el-form-item label="EDI FTP 地址" prop="ediFtp">
  444. <el-input v-model="formData.ediFtp" size="small" placeholder="请输入EDI FTP 地址" clearable
  445. :style="{ width: '100%' }">
  446. </el-input>
  447. </el-form-item>
  448. </el-col>
  449. <el-col :span="8">
  450. <el-form-item label="EDI 邮箱" prop="ediEmail">
  451. <el-input v-model="formData.ediEmail" size="small" placeholder="请输入EDI 邮箱" clearable
  452. :style="{ width: '100%' }">
  453. </el-input>
  454. </el-form-item>
  455. </el-col>
  456. </el-tab-pane>
  457. <el-tab-pane label="财务信息" name="cwxx">
  458. <!-- <el-row style="display: flex; flex-direction: row; align-items: center;">
  459. <div style="width: 8px; height: 20px; border-radius: 2px; background-color: #bd3124; margin-right: 6px;"></div>
  460. <h4>人民币(RMB)</h4>
  461. </el-row>
  462. <el-row gutter="15">
  463. <el-col :span="8">
  464. <el-form-item label="账号名称" prop="field136">
  465. <el-input v-model="formData.field136" placeholder="请输入账号名称" clearable :style="{width: '100%'}">
  466. </el-input>
  467. </el-form-item>
  468. </el-col>
  469. <el-col :span="8">
  470. <el-form-item label="开户银行" prop="field137">
  471. <el-input v-model="formData.field137" placeholder="请输入开户银行" clearable :style="{width: '100%'}">
  472. </el-input>
  473. </el-form-item>
  474. </el-col>
  475. <el-col :span="8">
  476. <el-form-item label="银行账号" prop="field138">
  477. <el-input v-model="formData.field138" placeholder="请输入银行账号" clearable :style="{width: '100%'}">
  478. </el-input>
  479. </el-form-item>
  480. </el-col>
  481. <el-col :span="8">
  482. <el-form-item label="CNAPS" prop="field139">
  483. <el-input v-model="formData.field139" placeholder="请输入CNAPS" clearable :style="{width: '100%'}">
  484. </el-input>
  485. </el-form-item>
  486. </el-col>
  487. <el-col :span="8">
  488. <el-form-item label="银行地址" prop="field140">
  489. <el-input v-model="formData.field140" placeholder="请输入银行地址" clearable :style="{width: '100%'}">
  490. </el-input>
  491. </el-form-item>
  492. </el-col>
  493. </el-row>
  494. <el-row style="display: flex; flex-direction: row; align-items: center;">
  495. <div style="width: 8px; height: 20px; border-radius: 2px; background-color: #bd3124; margin-right: 6px;"></div>
  496. <h4>外币银行信息</h4>
  497. </el-row>
  498. <el-row gutter="15">
  499. <el-col :span="8">
  500. <el-form-item label="账号名称" prop="accountName">
  501. <el-input v-model="formData.accountName" placeholder="请输入账号名称" clearable :style="{width: '100%'}">
  502. </el-input>
  503. </el-form-item>
  504. </el-col>
  505. <el-col :span="8">
  506. <el-form-item label="开户银行" prop="accountBank">
  507. <el-input v-model="formData.accountBank" placeholder="请输入开户银行" clearable :style="{width: '100%'}">
  508. </el-input>
  509. </el-form-item>
  510. </el-col>
  511. <el-col :span="8">
  512. <el-form-item label="银行账号" prop="accountNo">
  513. <el-input v-model="formData.accountNo" placeholder="请输入银行账号" clearable :style="{width: '100%'}">
  514. </el-input>
  515. </el-form-item>
  516. </el-col>
  517. <el-col :span="8">
  518. <el-form-item label="Swift Code" prop="swiftCode">
  519. <el-input v-model="formData.swiftCode" placeholder="请输入Swift Code" clearable
  520. :style="{width: '100%'}"></el-input>
  521. </el-form-item>
  522. </el-col>
  523. <el-col :span="8">
  524. <el-form-item label="银行地址" prop="address">
  525. <el-input v-model="formData.address" placeholder="请输入银行地址" clearable :style="{width: '100%'}">
  526. </el-input>
  527. </el-form-item>
  528. </el-col>
  529. </el-row> -->
  530. <el-row style="display: flex; flex-direction: row; align-items: center;">
  531. <div
  532. style="width: 8px; height: 20px; border-radius: 2px; background-color: #bd3124; margin-right: 6px;">
  533. </div>
  534. <h4>授信信息</h4>
  535. <el-form-item label="授信状态" prop="creditStatus">
  536. <el-switch style="margin-bottom:0" active-value="1" inactive-value="0" v-model="formData.creditStatus"
  537. active-text="开启" inactive-text="关闭"></el-switch>
  538. </el-form-item>
  539. </el-row>
  540. <el-row gutter="15">
  541. <el-col :span="8">
  542. <el-form-item label="授信额度" prop="creditGrant">
  543. <el-input v-model="formData.creditGrant" placeholder="请输入授信额度" clearable :style="{ width: '100%' }">
  544. </el-input>
  545. </el-form-item>
  546. </el-col>
  547. <el-col :span="8">
  548. <el-form-item label="授信天数" prop="creditDay">
  549. <el-input v-model="formData.creditDay" placeholder="请输入授信天数" clearable :style="{ width: '100%' }">
  550. </el-input>
  551. </el-form-item>
  552. </el-col>
  553. <el-col :span="8">
  554. <el-form-item label="授信利率" prop="creditRate">
  555. <el-input v-model="formData.creditRate" placeholder="请输入授信利率" clearable :style="{ width: '100%' }">
  556. </el-input>
  557. </el-form-item>
  558. </el-col>
  559. <el-col :span="8">
  560. <el-form-item label="授信币种" prop="creditCur">
  561. <el-input v-model="formData.creditCur" placeholder="请输入授信币种" clearable :style="{ width: '100%' }">
  562. </el-input>
  563. </el-form-item>
  564. </el-col>
  565. <el-col :span="8">
  566. <el-form-item label="付款方式" prop="paymentType">
  567. <el-input v-model="formData.paymentType" placeholder="请输入付款方式" clearable :style="{ width: '100%' }">
  568. </el-input>
  569. </el-form-item>
  570. </el-col>
  571. <el-col :span="8">
  572. <el-form-item label="账期设置" prop="accountPeriodType">
  573. <el-input v-model="formData.accountPeriodType" placeholder="请输入账期设置" clearable
  574. :style="{ width: '100%' }">
  575. </el-input>
  576. </el-form-item>
  577. </el-col>
  578. <el-col :span="8">
  579. <el-form-item label="最大欠款额" prop="maxArrears">
  580. <el-input v-model="formData.maxArrears" placeholder="请输入最大欠款额" clearable :style="{ width: '100%' }">
  581. </el-input>
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="8">
  585. <el-form-item label="绩效系数" prop="performanceRate">
  586. <el-input v-model="formData.performanceRate" placeholder="请输入绩效系数" clearable
  587. :style="{ width: '100%' }">
  588. </el-input>
  589. </el-form-item>
  590. </el-col>
  591. <el-col :span="8">
  592. <el-form-item label="增值税率" prop="taxRate">
  593. <el-input v-model="formData.taxRate" placeholder="请输入增值税率" clearable :style="{ width: '100%' }">
  594. </el-input>
  595. </el-form-item>
  596. </el-col>
  597. <el-col :span="8">
  598. <el-form-item label="天数" prop="days">
  599. <el-input v-model="formData.days" placeholder="请输入天数" clearable :style="{ width: '100%' }">
  600. </el-input>
  601. </el-form-item>
  602. </el-col>
  603. <el-col :span="8">
  604. <el-form-item label="结清月份" prop="settlementMonth">
  605. <el-input v-model="formData.settlementMonth" placeholder="请输入结清月份" clearable
  606. :style="{ width: '100%' }">
  607. </el-input>
  608. <!-- <el-date-picker v-model="formData.settlementMonth" type="month" placeholder="选择结清月份"
  609. style="width:100%" format="yyyy-MM" value-format="yyyy-MM"> -->
  610. </el-date-picker>
  611. </el-form-item>
  612. </el-col>
  613. <el-col :span="8">
  614. <el-form-item label="结清天数" prop="settlementDays">
  615. <el-input v-model="formData.settlementDays" placeholder="请输入结清天数" clearable
  616. :style="{ width: '100%' }">
  617. </el-input>
  618. </el-form-item>
  619. </el-col>
  620. <el-col :span="8">
  621. <el-form-item label="日利息万分" prop="dailyInterest">
  622. <el-input v-model="formData.dailyInterest" placeholder="请输入日利息万分" clearable
  623. :style="{ width: '100%' }">
  624. </el-input>
  625. </el-form-item>
  626. </el-col>
  627. <el-col :span="8">
  628. <el-form-item label="最大欠款" prop="taxRate">
  629. <el-input v-model="formData.maximumOutstandingDebt" placeholder="请输入最大欠款" clearable
  630. :style="{ width: '100%' }">
  631. </el-input>
  632. </el-form-item>
  633. </el-col>
  634. </el-row>
  635. <!-- <el-row style="display: flex; flex-direction: row; align-items: center;">
  636. <div style="width: 8px; height: 20px; border-radius: 2px; background-color: #bd3124; margin-right: 6px;"></div>
  637. <h4>财务联系人</h4>
  638. </el-row>
  639. <el-row gutter="15">
  640. <el-col :span="8">
  641. <el-form-item label="联系人" prop="field155">
  642. <el-input v-model="formData.field155" placeholder="请输入联系人" clearable :style="{width: '100%'}">
  643. </el-input>
  644. </el-form-item>
  645. </el-col>
  646. <el-col :span="8">
  647. <el-form-item label="联系电话" prop="field156">
  648. <el-input v-model="formData.field156" placeholder="请输入联系电话" clearable :style="{width: '100%'}">
  649. </el-input>
  650. </el-form-item>
  651. </el-col>
  652. <el-col :span="8">
  653. <el-form-item label="部门职务" prop="field157">
  654. <el-input v-model="formData.field157" placeholder="请输入部门职务" clearable :style="{width: '100%'}">
  655. </el-input>
  656. </el-form-item>
  657. </el-col>
  658. </el-row> -->
  659. </el-tab-pane>
  660. <el-tab-pane label="客户联系人" name="khlxk">
  661. <el-button type="primary" @click="corpsAttnAdd">新建</el-button>
  662. <el-table :data="formData.corpsAttnList" border
  663. :header-cell-style="{ background: '#ecf5ff', color: '#232526', fontSize: '12px' }" stripe
  664. style="width: 100%">
  665. <el-table-column prop="code" label="编号" width="180" />
  666. <el-table-column prop="cname" label="名称" width="180" />
  667. <el-table-column prop="attn" label="联系方式" width="180" />
  668. <el-table-column prop="tel" label="电话" width="180" />
  669. <el-table-column prop="position" label="岗位" width="180" />
  670. <el-table-column prop="addr" label="公司地址" width="180" />
  671. <el-table-column prop="sex" label="性别" width="180" />
  672. <el-table-column prop="email" label="邮箱地址" width="180" />
  673. <el-table-column prop="status" label="状态" width="180">
  674. <template slot-scope="scope">
  675. <span v-if="scope.row.status == 0">正常</span>
  676. <span v-if="scope.row.status == 1">启用</span>
  677. </template>
  678. </el-table-column>
  679. <el-table-column fixed="right" label="操作" width="180">
  680. <template slot-scope="scope">
  681. <el-button type="text" size="small" @click="corpsAttnHandle(scope)">编辑</el-button>
  682. <el-button type="text" size="small" @click="corpsAttnDelete(scope)">删除</el-button>
  683. </template>
  684. </el-table-column>
  685. </el-table>
  686. </el-tab-pane>
  687. <el-tab-pane label="银行信息" name="yhxx">
  688. <el-button type="primary" @click="corpsAttnAdd">新建</el-button>
  689. <el-table :data="formData.corpsBankList" border
  690. :header-cell-style="{ background: '#ecf5ff', color: '#232526', fontSize: '12px' }" stripe
  691. style="width: 100%">
  692. <el-table-column prop="uscc" label="税号" width="180" />
  693. <el-table-column prop="accountName" label="账户名称" width="180" />
  694. <el-table-column prop="accountBank" label="开户银行" width="180" />
  695. <el-table-column prop="accountNo" label="银行账号" width="180" />
  696. <el-table-column prop="mnemonicCode" label="助记码" width="180" />
  697. <el-table-column prop="curNo" label="币别" width="180" />
  698. <el-table-column prop="subjectNumber" label="科目编码" width="180" />
  699. <el-table-column prop="address" label="地址" width="180" />
  700. <el-table-column prop="swiftCode" label="Swift Code" width="180" />
  701. <el-table-column prop="cnapsCode" label="CNAPS" width="180" />
  702. <el-table-column prop="status" label="状态">
  703. <template slot-scope="scope">
  704. <span v-if="scope.row.status == 0">正常</span>
  705. <span v-if="scope.row.status == 1">启用</span>
  706. </template>
  707. </el-table-column>
  708. <el-table-column prop="remarks" label="备注" width="180" />
  709. <el-table-column fixed="right" label="操作" width="180">
  710. <template slot-scope="scope">
  711. <el-button type="text" size="small" @click="corpsAttnHandle(scope)">编辑</el-button>
  712. <el-button type="text" size="small" @click="corpsAttnDelete(scope)">删除</el-button>
  713. </template>
  714. </el-table-column>
  715. </el-table>
  716. </el-tab-pane>
  717. <el-tab-pane label="附件" name="fj">
  718. <el-button type="primary" @click="corpsAttnAdd">新建</el-button>
  719. <el-table :data="formData.corpsFilesList" border
  720. :header-cell-style="{ background: '#ecf5ff', color: '#232526', fontSize: '12px' }" stripe
  721. style="width: 100%">
  722. <el-table-column prop="sort" label="排序" />
  723. <el-table-column prop="fileName" label="文件名" />
  724. <el-table-column prop="url" label="文件地址" :show-overflow-tooltip="true">
  725. <template slot-scope="scope">
  726. <el-link type="primary" :href="scope.row.url">{{ scope.row.url }}</el-link>
  727. </template>
  728. </el-table-column>
  729. <el-table-column prop="status" label="状态">
  730. <template slot-scope="scope">
  731. <span v-if="scope.row.status == 0">正常</span>
  732. <span v-if="scope.row.status == 1">启用</span>
  733. </template>
  734. </el-table-column>
  735. <el-table-column prop="remarks" label="备注" />
  736. <el-table-column fixed="right" label="操作" width="180">
  737. <template slot-scope="scope">
  738. <el-button type="text" size="small" @click="corpsAttnHandle(scope)">编辑</el-button>
  739. <el-button type="text" size="small" @click="corpsAttnDelete(scope)">删除</el-button>
  740. </template>
  741. </el-table-column>
  742. </el-table>
  743. </el-tab-pane>
  744. <el-tab-pane label="更名记录" name="gmjl">
  745. <!--<el-button type="primary" @click="corpsAttnAdd">新建</el-button>-->
  746. <el-table :data="formData.corpsRenameList" border
  747. :header-cell-style="{ background: '#ecf5ff', color: '#232526', fontSize: '12px' }" stripe
  748. style="width: 100%">
  749. <el-table-column prop="oldCnName" label="原中文名称" />
  750. <el-table-column prop="newCnName" label="新中文名称" />
  751. <el-table-column prop="oldEnName" label="原英文名称" />
  752. <el-table-column prop="newEnName" label="新英文名称" />
  753. <!-- <el-table-column prop="byId" label="操作人" width="180"/> -->
  754. <el-table-column prop="byTime" label="操作时间" />
  755. <el-table-column prop="remarks" label="备注" />
  756. <el-table-column fixed="right" label="操作">
  757. <template slot-scope="scope">
  758. <el-button type="text" size="small" @click="corpsAttnHandle(scope)">编辑</el-button>
  759. <el-button type="text" size="small" @click="corpsAttnDelete(scope)">删除</el-button>
  760. </template>
  761. </el-table-column>
  762. </el-table>
  763. </el-tab-pane>
  764. <el-tab-pane label="发票抬头" name="fptt">
  765. <el-button type="primary" @click="corpsAttnAdd">新建</el-button>
  766. <el-table :data="formData.corpsInvoiceHeaderList" border
  767. :header-cell-style="{ background: '#ecf5ff', color: '#232526', fontSize: '12px' }" stripe
  768. style="width: 100%">
  769. <!-- <el-table-column prop="pid" label="主表id" width="180" /> -->
  770. <el-table-column prop="invoiceHeader" label="发票抬头" width="180" />
  771. <el-table-column prop="uscc" label="税号" width="180" />
  772. <el-table-column prop="address" label="地址" width="180" />
  773. <el-table-column prop="address" label="地址" width="180" />
  774. <el-table-column prop="attnName" label="联系人姓名" width="180" />
  775. <el-table-column prop="attnTel" label="联系人电话" width="180" />
  776. <el-table-column prop="email" label="电子邮箱" width="180" />
  777. <el-table-column prop="taxpayerNature" label="纳税人性质" width="180" />
  778. <el-table-column prop="taxRate" label="增值税税率" width="180" />
  779. <!-- <el-table-column prop="invoiceType" label="发票类型" width="180" /> -->
  780. <el-table-column prop="accountBankCny" label="人民币账户银行" width="180" />
  781. <el-table-column prop="accountBankUsd" label="美元账户银行" width="180" />
  782. <el-table-column prop="accountNoUsd" label="美元银行账号" width="180" />
  783. <el-table-column prop="guaranteeNo" label="保函号码" width="180" />
  784. <el-table-column prop="guaranteeDate" label="保函日期" width="180" />
  785. <el-table-column prop="version" label="版本" width="180" />
  786. <el-table-column prop="status" label="状态" width="180">
  787. <template slot-scope="scope">
  788. <span v-if="scope.row.status == 0">正常</span>
  789. <span v-if="scope.row.status == 1">启用</span>
  790. </template>
  791. </el-table-column>
  792. <el-table-column prop="remarks" label="备注" width="180" />
  793. <el-table-column fixed="right" label="操作" width="180">
  794. <template slot-scope="scope">
  795. <el-button type="text" size="small" @click="corpsAttnHandle(scope)">编辑</el-button>
  796. <el-button type="text" size="small" @click="corpsAttnDelete(scope)">删除</el-button>
  797. </template>
  798. </el-table-column>
  799. </el-table>
  800. </el-tab-pane>
  801. <el-tab-pane label="不良记录" name="bljl">
  802. <el-button type="primary" @click="corpsAttnAdd">新行</el-button>
  803. <el-table :data="formData.corpsBadrecordList" border
  804. :header-cell-style="{ background: '#ecf5ff', color: '#232526', fontSize: '12px' }" stripe
  805. style="width: 100%">
  806. <el-table-column prop="oldCreditLevel" label="原授信等级" />
  807. <el-table-column prop="newCreditLevel" label="新授信等级" />
  808. <el-table-column prop="version" label="版本" />
  809. <el-table-column prop="status" label="状态">
  810. <template slot-scope="scope">
  811. <span v-if="scope.row.status == 0">正常</span>
  812. <span v-if="scope.row.status == 1">启用</span>
  813. </template>
  814. </el-table-column>
  815. <el-table-column prop="remarks" label="备注" />
  816. <el-table-column fixed="right" label="操作" width="180">
  817. <template slot-scope="scope">
  818. <el-button type="text" size="small" @click="corpsAttnHandle(scope)">编辑</el-button>
  819. <el-button type="text" size="small" @click="corpsAttnDelete(scope)">删除</el-button>
  820. </template>
  821. </el-table-column>
  822. </el-table>
  823. </el-tab-pane>
  824. <!-- <el-tab-pane label="增值税开票" name="zzskp">
  825. 定时任务补偿
  826. </el-tab-pane>
  827. <el-tab-pane label="匹配编号" name="ppbh">
  828. 定时任务补偿
  829. </el-tab-pane>kai -->
  830. </el-tabs>
  831. </el-row>
  832. </el-form>
  833. </el-card>
  834. <el-dialog :title="dialogTitle" :visible.sync="corpsAttnDialogVisible" :append-to-body="true" width="40%"
  835. :before-close="handleClose" :close-on-click-modal="false">
  836. <el-form ref="corpsAttnForm" :rules="corpsAttnRules" :model="corpsAttnForm" label-width="120px">
  837. <div v-if="activeName == 'khlxk'">
  838. <el-form-item label="编号" prop="code" width="180">
  839. <el-input v-model="corpsAttnForm.code"></el-input>
  840. </el-form-item>
  841. <el-form-item label="名称" prop="cname">
  842. <el-input v-model="corpsAttnForm.cname"></el-input>
  843. </el-form-item>
  844. <el-form-item label="联系方式" prop="attn">
  845. <el-input v-model="corpsAttnForm.attn"></el-input>
  846. </el-form-item>
  847. <el-form-item label="邮箱地址" prop="email">
  848. <el-input v-model="corpsAttnForm.email"></el-input>
  849. </el-form-item>
  850. <el-form-item label="电话" prop="tel">
  851. <el-input v-model="corpsAttnForm.tel"></el-input>
  852. </el-form-item>
  853. <el-form-item label="岗位" prop="position">
  854. <el-input v-model="corpsAttnForm.position"></el-input>
  855. </el-form-item>
  856. <el-form-item label="公司地址" prop="addr">
  857. <el-input v-model="corpsAttnForm.addr"></el-input>
  858. </el-form-item>
  859. <!-- <el-form-item label="用户" prop="userId">
  860. <search-query ref="SearchQuery" :datalist="userOptions" title="用户" :filterable="true" :clearable="true"
  861. :remote="true" :forParameter="{ key: 'id', label: 'realName', value: 'id', disabled: 'workingStatus' }"
  862. :disabledStatus="1" @remoteMethod="userListfun" @corpChange="userChange">
  863. <user></user>
  864. </search-query>
  865. </el-form-item> -->
  866. <el-form-item label="性别" prop="sex">
  867. <el-select v-model="corpsAttnForm.sex" placeholder="请选择性别" :style="{ width: '100%' }">
  868. <el-option label="男" value="男"></el-option>
  869. <el-option label="女" value="女"></el-option>
  870. </el-select>
  871. </el-form-item>
  872. <el-form-item label="状态" prop="status">
  873. <el-select v-model="corpsAttnForm.status" placeholder="请选择状态" :style="{ width: '100%' }">
  874. <el-option label="正常" :value="0"></el-option>
  875. <el-option label="停用" :value="1"></el-option>
  876. </el-select>
  877. </el-form-item>
  878. </div>
  879. <div v-if="activeName == 'yhxx'">
  880. <el-form-item label="税号" prop="uscc">
  881. <el-input v-model="corpsAttnForm.uscc"></el-input>
  882. </el-form-item>
  883. <el-form-item label="账户名称" prop="accountName">
  884. <el-input v-model="corpsAttnForm.accountName"></el-input>
  885. </el-form-item>
  886. <el-form-item label="开户银行" prop="accountBank">
  887. <el-input v-model="corpsAttnForm.accountBank"></el-input>
  888. </el-form-item>
  889. <el-form-item label="银行账号" prop="accountNo">
  890. <el-input v-model="corpsAttnForm.accountNo"></el-input>
  891. </el-form-item>
  892. <el-form-item label="助记码" prop="mnemonicCode">
  893. <el-input v-model="corpsAttnForm.mnemonicCode"></el-input>
  894. </el-form-item>
  895. <el-form-item label="币别" prop="curId">
  896. <!-- <el-input v-model="corpsAttnForm.curId"></el-input> -->
  897. <search-query ref="SearchQuery" :selectValue="corpsAttnForm.curId" :datalist="rateOptions" title="币别"
  898. :filterable="true" :clearable="true" :remote="true"
  899. :forParameter="{ key: 'id', label: 'code', value: 'id', disabled: 'status' }" :disabledStatus="1"
  900. @remoteMethod="rateListfun" @corpChange="rateChange">
  901. <rateManagement></rateManagement>
  902. </search-query>
  903. </el-form-item>
  904. <el-form-item label="科目编码" prop="subjectNumber">
  905. <el-input v-model="corpsAttnForm.subjectNumber"></el-input>
  906. </el-form-item>
  907. <el-form-item label="地址" prop="address">
  908. <el-input v-model="corpsAttnForm.address"></el-input>
  909. </el-form-item>
  910. <el-form-item label="Swift Code" prop="swiftCode">
  911. <el-input v-model="corpsAttnForm.swiftCode"></el-input>
  912. </el-form-item>
  913. <el-form-item label="CNAPS" prop="cnapsCode">
  914. <el-input v-model="corpsAttnForm.cnapsCode"></el-input>
  915. </el-form-item>
  916. <el-form-item label="状态" prop="status">
  917. <el-select v-model="corpsAttnForm.status" placeholder="请选择状态" :style="{ width: '100%' }">
  918. <el-option label="正常" :value="0"></el-option>
  919. <el-option label="停用" :value="1"></el-option>
  920. </el-select>
  921. </el-form-item>
  922. <el-form-item label="备注" prop="remarks">
  923. <el-input v-model="corpsAttnForm.remarks"></el-input>
  924. </el-form-item>
  925. </div>
  926. <div v-if="activeName == 'fj'">
  927. <el-form-item label="排序" prop="sort">
  928. <el-input-number v-model="corpsAttnForm.sort" controls-position="right" @change="handleChange" :min="0"
  929. :precision="0" :step="1" :style="{ width: '100%' }"></el-input-number>
  930. </el-form-item>
  931. <el-form-item label="文件上传" prop="url">
  932. <el-upload class="upload-demo"
  933. :action="incomingAction ? incomingAction : '/api/blade-resource/oss/endpoint/put-file'"
  934. :on-remove="handleRemove" :headers="headers" :on-success="handleSuccess" :before-remove="beforeRemove"
  935. :on-progress="handleProgress" multiple :limit="1" :on-exceed="handleExceed" :file-list="fileList">
  936. <el-button size="small" type="primary">点击上传</el-button>
  937. </el-upload>
  938. </el-form-item>
  939. <el-form-item label="状态" prop="status">
  940. <el-select v-model="corpsAttnForm.status" placeholder="请选择状态" :style="{ width: '100%' }">
  941. <el-option label="正常" :value="0"></el-option>
  942. <el-option label="停用" :value="1"></el-option>
  943. </el-select>
  944. </el-form-item>
  945. <el-form-item label="备注" prop="remarks">
  946. <el-input v-model="corpsAttnForm.remarks"></el-input>
  947. </el-form-item>
  948. </div>
  949. <div v-if="activeName == 'fptt'">
  950. <el-form-item label="发票抬头" prop="invoiceHeader">
  951. <el-input v-model="corpsAttnForm.invoiceHeader"></el-input>
  952. </el-form-item>
  953. <el-form-item label="税号" prop="uscc">
  954. <el-input v-model="corpsAttnForm.uscc"></el-input>
  955. </el-form-item>
  956. <el-form-item label="地址" prop="address">
  957. <el-input v-model="corpsAttnForm.address"></el-input>
  958. </el-form-item>
  959. <el-form-item label="联系人姓名" prop="attnName">
  960. <el-input v-model="corpsAttnForm.attnName"></el-input>
  961. </el-form-item>
  962. <el-form-item label="联系人电话" prop="attnTel">
  963. <el-input v-model="corpsAttnForm.attnTel"></el-input>
  964. </el-form-item>
  965. <el-form-item label="电子邮箱" prop="email">
  966. <el-input v-model="corpsAttnForm.email"></el-input>
  967. </el-form-item>
  968. <el-form-item label="纳税人性质" prop="taxpayerNature">
  969. <el-input v-model="corpsAttnForm.taxpayerNature"></el-input>
  970. </el-form-item>
  971. <el-form-item label="增值税税率" prop="taxRate">
  972. <!-- <el-input v-model="corpsAttnForm.taxRate"></el-input> -->
  973. <el-input-number v-model="formData.taxRate" controls-position="right" @change="handleChange" :min="0"
  974. :precision="2" :step="1" :style="{ width: '100%' }"></el-input-number>
  975. </el-form-item>
  976. <!-- <el-form-item label="发票类型" prop="invoiceType">
  977. <el-input v-model="corpsAttnForm.invoiceType"></el-input>
  978. </el-form-item> -->
  979. <el-form-item label="人民币账户银行" prop="accountBankCny">
  980. <el-input v-model="corpsAttnForm.accountBankCny"></el-input>
  981. </el-form-item>
  982. <el-form-item label="人民币银行账号" prop="accountNoCny">
  983. <el-input v-model="corpsAttnForm.accountNoCny"></el-input>
  984. </el-form-item>
  985. <el-form-item label="美元账户银行" prop="accountBankUsd">
  986. <el-input v-model="corpsAttnForm.accountBankUsd"></el-input>
  987. </el-form-item>
  988. <el-form-item label="美元银行账号" prop="accountNoUsd">
  989. <el-input v-model="corpsAttnForm.accountNoUsd"></el-input>
  990. </el-form-item>
  991. <el-form-item label="保函号码" prop="guaranteeNo">
  992. <el-input v-model="corpsAttnForm.guaranteeNo"></el-input>
  993. </el-form-item>
  994. <el-form-item label="保函日期" prop="guaranteeDate">
  995. <el-date-picker v-model="corpsAttnForm.guaranteeDate" value-format="yyyy-MM-dd" type="date"
  996. placeholder="选择日期" :style="{ width: '100%' }">
  997. </el-date-picker>
  998. </el-form-item>
  999. <el-form-item label="状态" prop="status">
  1000. <el-select v-model="corpsAttnForm.status" placeholder="请选择状态" :style="{ width: '100%' }">
  1001. <el-option label="正常" :value="0"></el-option>
  1002. <el-option label="停用" :value="1"></el-option>
  1003. </el-select>
  1004. </el-form-item>
  1005. <el-form-item label="备注" prop="remarks">
  1006. <el-input v-model="corpsAttnForm.remarks"></el-input>
  1007. </el-form-item>
  1008. </div>
  1009. <div v-if="activeName == 'gmjl'">
  1010. <el-form-item label="原中文名称" prop="oldCnName">
  1011. <el-input v-model="corpsAttnForm.oldCnName"></el-input>
  1012. </el-form-item>
  1013. <el-form-item label="新中文名称" prop="newCnName">
  1014. <el-input v-model="corpsAttnForm.newCnName"></el-input>
  1015. </el-form-item>
  1016. <el-form-item label="原英文名称" prop="oldEnName">
  1017. <el-input v-model="corpsAttnForm.oldEnName"></el-input>
  1018. </el-form-item>
  1019. <el-form-item label="新英文名称" prop="newEnName">
  1020. <el-input v-model="corpsAttnForm.newEnName"></el-input>
  1021. </el-form-item>
  1022. <!-- <el-form-item label="操作时间" prop="byTime">
  1023. <el-date-picker v-model="corpsAttnForm.byTime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"
  1024. :style="{ width: '100%' }">
  1025. </el-date-picker>
  1026. </el-form-item> -->
  1027. <el-form-item label="备注" prop="remarks">
  1028. <el-input v-model="corpsAttnForm.remarks"></el-input>
  1029. </el-form-item>
  1030. </div>
  1031. <div v-if="activeName == 'bljl'">
  1032. <el-form-item label="原授信等级" prop="oldCreditLevel">
  1033. <!-- <el-input v-model="corpsAttnForm.oldCreditLevel"></el-input> -->
  1034. <el-select v-model="corpsAttnForm.oldCreditLevel" placeholder="请输入信用等级" clearable
  1035. :style="{ width: '100%' }">
  1036. <el-option v-for="(item, index) in enterpriseTypeDict" :key="index" :label="item.dictValue"
  1037. :value="item.dictKey" :disabled="item.disabled"></el-option>
  1038. </el-select>
  1039. </el-form-item>
  1040. <el-form-item label="新授信等级" prop="newCreditLevel">
  1041. <!-- <el-input v-model="corpsAttnForm.newCreditLevel"></el-input> -->
  1042. <el-select v-model="corpsAttnForm.newCreditLevel" placeholder="请输入信用等级" clearable
  1043. :style="{ width: '100%' }">
  1044. <el-option v-for="(item, index) in enterpriseTypeDict" :key="index" :label="item.dictValue"
  1045. :value="item.dictKey" :disabled="item.disabled"></el-option>
  1046. </el-select>
  1047. </el-form-item>
  1048. <el-form-item label="状态" prop="status">
  1049. <el-select v-model="corpsAttnForm.status" placeholder="请选择状态" :style="{ width: '100%' }">
  1050. <el-option label="正常" :value="0"></el-option>
  1051. <el-option label="停用" :value="1"></el-option>
  1052. </el-select>
  1053. </el-form-item>
  1054. <el-form-item label="备注" prop="remarks">
  1055. <el-input v-model="corpsAttnForm.remarks"></el-input>
  1056. </el-form-item>
  1057. </div>
  1058. </el-form>
  1059. <span slot="footer" class="dialog-footer">
  1060. <el-button @click="corpsAttnAddClose">取 消</el-button>
  1061. <el-button type="primary" @click="corpsAttnAddConfirm">确 定</el-button>
  1062. </span>
  1063. </el-dialog>
  1064. </dev>
  1065. </template>
  1066. <script>
  1067. import { getToken } from "@/util/auth";
  1068. import {
  1069. addBcorps,
  1070. updateBcorps,
  1071. getBcorpsDetail,
  1072. bcorpsattnRemove,
  1073. bcorpsbankRemove,
  1074. bcorpsfilesRemove, bcorpsrenameRemove, corpsinvoiceheaderRemove, bcorpsbadrecordRemove
  1075. } from "@/api/iosBasicData/bcorps";
  1076. import { bcountrysList } from "@/api/iosBasicData/bcountrys";
  1077. import { userList } from "@/api/system/user";
  1078. import { getRateList } from "@/api/iosBasicData/rateManagement";
  1079. import { bcorpstypedefineList } from "@/api/iosBasicData/bcorpstypedefine"
  1080. import { getWorkDicts } from "@/api/system/dictbiz"
  1081. // import { getBcorpsattnList, getBcorpsattnDetail, removevBcorpsattn, addBcorpsattn, updateBcorpsattn } from "@/api/iosBasicData/bcorpsattn";
  1082. import bcountrys from '@/views/iosBasicData/bcountrys/index.vue'
  1083. import user from '@/views/system/user.vue'
  1084. import rateManagement from '@/views/iosBasicData/rateManagement/index.vue'
  1085. import SearchQuery from '@/components/iosbasic-data/searchquery.vue'
  1086. import { getDeptLazyTree } from "@/api/system/dept";
  1087. import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
  1088. import { blinesList } from "@/api/iosBasicData/blines";
  1089. import blines from "@/views/iosBasicData/blines/index.vue";
  1090. import { selectListLos } from "@/api/approval/processConfig";
  1091. import losaudit from "@/views/wel/components/losAssembly/losaudit.vue";
  1092. export default {
  1093. components: {
  1094. SearchQuery, bcountrys, user, rateManagement, blines
  1095. },
  1096. props: {
  1097. detailData: {
  1098. type: Object
  1099. },
  1100. incomingAction: {
  1101. type: String
  1102. },
  1103. },
  1104. data() {
  1105. return {
  1106. psRateData: [], // ps 规则数据
  1107. // 业务来源
  1108. sourceTypeData: [
  1109. {
  1110. label: '公司',
  1111. value: 'OWN'
  1112. },
  1113. {
  1114. label: '代理',
  1115. value: 'AGENT'
  1116. },
  1117. {
  1118. label: '业务员',
  1119. value: 'SALES'
  1120. }
  1121. ],
  1122. // 业务来源下级配置
  1123. sourceforParameter: {},
  1124. // 业务来源下级
  1125. srcData: [],
  1126. maintenanceStaffData: [], // 维护人员
  1127. // tab标签
  1128. activeName: 'kgxq',
  1129. // 远程搜索
  1130. loading: false,
  1131. headers: { "Blade-Auth": "Bearer " + getToken() },
  1132. // 文件list
  1133. fileList: [],
  1134. // 国家list
  1135. cntyOptions: [],
  1136. // 优势航线
  1137. advantageData: [],
  1138. // 币别list
  1139. rateOptions: [],
  1140. // 用户list
  1141. userOptions: [],
  1142. salesData: [], // 操作员
  1143. // 客户类别数据
  1144. customTypeData: [],
  1145. // 用户联系人form
  1146. corpsAttnForm: {
  1147. status: 0
  1148. },
  1149. // 字典
  1150. creditLevelDict: [],
  1151. enterpriseTypeDict: [],
  1152. corpSourceDict:[],
  1153. // 对话框
  1154. // 客户联系人对话框
  1155. dialogTitle: '窗口',
  1156. corpsAttnDialogVisible: false,
  1157. corpsAttnDialogIndex: null,
  1158. formData: {
  1159. status: 0,
  1160. corpsAttnList: [],
  1161. corpsBankList: [],
  1162. corpsFilesList: [],
  1163. corpsInvoiceHeaderList: [],
  1164. corpsRenameList: [],
  1165. corpsBadrecordList: []
  1166. },
  1167. // rules: {
  1168. // corpType: [{
  1169. // required: true,
  1170. // message: '请选择客户分类',
  1171. // trigger: 'change'
  1172. // }],
  1173. // code: [{
  1174. // required: true,
  1175. // message: '请选择客户编号',
  1176. // trigger: 'change'
  1177. // }],
  1178. // shortName: [{
  1179. // required: true,
  1180. // message: '请选择客户简称',
  1181. // trigger: 'change'
  1182. // }],
  1183. // cnName: [{
  1184. // required: true,
  1185. // message: '请选择客户名称',
  1186. // trigger: 'change'
  1187. // }],
  1188. // enName: [{
  1189. // required: true,
  1190. // message: '请选择英文名称',
  1191. // trigger: 'change'
  1192. // }],
  1193. // cnAddr: [{
  1194. // required: true,
  1195. // message: '请选择中文地址',
  1196. // trigger: 'change'
  1197. // }],
  1198. // enAddr: [{
  1199. // required: true,
  1200. // message: '请选择英文地址',
  1201. // trigger: 'change'
  1202. // }],
  1203. // },
  1204. rules: {
  1205. corpType: [{
  1206. required: true,
  1207. message: ' ',
  1208. trigger: 'change'
  1209. }],
  1210. code: [{
  1211. required: true,
  1212. message: ' ',
  1213. trigger: 'change'
  1214. }],
  1215. shortName: [{
  1216. required: true,
  1217. message: ' ',
  1218. trigger: 'change'
  1219. }],
  1220. cnName: [{
  1221. required: true,
  1222. message: ' ',
  1223. trigger: 'change'
  1224. }],
  1225. enName: [{
  1226. required: true,
  1227. message: ' ',
  1228. trigger: 'change'
  1229. }],
  1230. cnAddr: [{
  1231. required: true,
  1232. message: ' ',
  1233. trigger: 'change'
  1234. }],
  1235. // enAddr: [{
  1236. // required: true,
  1237. // message: ' ',
  1238. // trigger: 'change'
  1239. // }],
  1240. uscc: [{
  1241. required: true,
  1242. message: ' ',
  1243. trigger: 'change'
  1244. }],
  1245. sourceType: [{
  1246. required: true,
  1247. message: ' ',
  1248. trigger: 'change'
  1249. }],
  1250. srcCnName: [{
  1251. required: true,
  1252. message: ' ',
  1253. trigger: 'change'
  1254. }],
  1255. },
  1256. // 客户联系人表单校验
  1257. // corpsAttnRules: {
  1258. // code: [
  1259. // { required: true, message: '请输入编号', trigger: 'change' }
  1260. // ],
  1261. // cname: [
  1262. // { required: true, message: '请输入名称', trigger: 'change' }
  1263. // ],
  1264. // accountName: [
  1265. // { required: true, message: '请输入账号名称', trigger: 'change' }
  1266. // ],
  1267. // accountBank: [
  1268. // { required: true, message: '请输入账号银行', trigger: 'change' }
  1269. // ],
  1270. // accountNo: [
  1271. // { required: true, message: '请输入银行账号', trigger: 'change' }
  1272. // ],
  1273. // curId: [
  1274. // { required: true, message: '请输入币别', trigger: 'change' }
  1275. // ],
  1276. // sort: [
  1277. // { required: true, message: '请输入排序', trigger: 'change' }
  1278. // ],
  1279. // invoiceHeader: [
  1280. // { required: true, message: '请输入发票抬头', trigger: 'change' }
  1281. // ],
  1282. // },
  1283. corpsAttnRules: {
  1284. code: [
  1285. { required: true, message: ' ', trigger: 'change' }
  1286. ],
  1287. cname: [
  1288. { required: true, message: ' ', trigger: 'change' }
  1289. ],
  1290. accountName: [
  1291. { required: true, message: ' ', trigger: 'change' }
  1292. ],
  1293. accountBank: [
  1294. { required: true, message: ' ', trigger: 'change' }
  1295. ],
  1296. accountNo: [
  1297. { required: true, message: ' ', trigger: 'change' }
  1298. ],
  1299. mnemonicCode: [
  1300. { required: true, message: ' ', trigger: 'change' }
  1301. ],
  1302. curId: [
  1303. { required: true, message: ' ', trigger: 'change' }
  1304. ],
  1305. sort: [
  1306. { required: true, message: ' ', trigger: 'change' }
  1307. ],
  1308. invoiceHeader: [
  1309. { required: true, message: ' ', trigger: 'change' }
  1310. ],
  1311. uscc: [
  1312. { required: true, message: ' ', trigger: 'change' }
  1313. ]
  1314. },
  1315. statusOptions: [{
  1316. "label": "正常",
  1317. "value": 0
  1318. }, {
  1319. "label": "停用",
  1320. "value": 1
  1321. }],
  1322. }
  1323. },
  1324. computed: {},
  1325. watch: {},
  1326. created() {
  1327. if (this.detailData.id) {
  1328. this.getBcorpsDetailfun(this.detailData.id)
  1329. }
  1330. if (this.detailData.corpType != null) {
  1331. this.formData.corpTypeList = [this.detailData.corpType]
  1332. this.formData.corpType = this.detailData.corpType
  1333. }
  1334. // 查询国家下拉
  1335. bcountrysList(1, 10).then(res => {
  1336. this.cntyOptions = res.data.data.records
  1337. })
  1338. // 查询币别下拉
  1339. getRateList(1, 10).then(res => {
  1340. this.rateOptions = res.data.data.records
  1341. })
  1342. // 获取客户类别
  1343. bcorpstypedefineList(1, 9999).then(res => {
  1344. this.customTypeData = res.data.data.records
  1345. })
  1346. // 查询用户信息
  1347. userList(1, 9999999).then((res) => {
  1348. this.userOptions = res.data.data
  1349. });
  1350. // 操作员数据
  1351. selectListLos('操作员').then(res => {
  1352. this.salesData = res.data.data
  1353. })
  1354. // 查询字典
  1355. getWorkDicts('bcorps-credit-level').then((res) => {
  1356. this.creditLevelDict = res.data.data
  1357. });
  1358. getWorkDicts('bcorps-enterprise-type').then((res) => {
  1359. this.enterpriseTypeDict = res.data.data
  1360. // 没有id 取第一个
  1361. if (!this.formData.id) {
  1362. this.formData.enterpriseType = this.enterpriseTypeDict[0].dictKey
  1363. }
  1364. });
  1365. getWorkDicts('corp_Source').then((res) => {
  1366. this.corpSourceDict = res.data.data
  1367. });
  1368. },
  1369. mounted() { },
  1370. methods: {
  1371. // ps规则监听输入事件
  1372. psRateValid(inputContent) {
  1373. let reg = /^(0.\d+|0|1)$/;
  1374. if (reg.test(inputContent)) {
  1375. this.formData.psRate = Number(inputContent);
  1376. } else {
  1377. if (inputContent != "0.") {
  1378. this.formData.psRate = "";
  1379. }
  1380. }
  1381. },
  1382. // ps 规则失去焦点触发
  1383. psRateBlue() {
  1384. if (this.formData.psRate) {
  1385. this.$set(this.formData, 'psRate', Number(this.formData.psRate).toFixed(2))
  1386. } else {
  1387. this.$set(this.formData, 'psRate', '')
  1388. }
  1389. },
  1390. // 详情
  1391. getBcorpsDetailfun(id) {
  1392. getBcorpsDetail(id).then(res => {
  1393. this.formData = res.data.data
  1394. this.formData.corpTypeList = res.data.data.corpType.split(',')
  1395. this.$set(this.formData, 'adminProfilesList', res.data.data.adminProfiles.split(','))
  1396. })
  1397. },
  1398. // ps 规则下拉
  1399. psRateChange(value, name) {
  1400. this.$set(this.formData, name, value)
  1401. },
  1402. // 维护人员下拉
  1403. maintenanceStaffChange(value, name) {
  1404. for (let item of this.maintenanceStaffData) {
  1405. if (item.name == value) {
  1406. this.$set(this.formData, 'maintenanceStaffId', item.id)
  1407. this.$set(this.formData, 'maintenanceStaffName', item.name)
  1408. }
  1409. }
  1410. },
  1411. // 业务来源下拉
  1412. sourceCorp(value, name) {
  1413. if (name == 'srcCnName') {
  1414. if (!value) {
  1415. this.$set(this.formData, 'srcId', '')
  1416. this.$set(this.formData, 'srcCnName', '')
  1417. this.$set(this.formData, 'srcEnName', '')
  1418. }
  1419. for (let item of this.srcData) {
  1420. if (item[this.sourceforParameter.value] == value) {
  1421. if (this.formData.sourceType == 'OWN') {
  1422. // 国家
  1423. this.$set(this.formData, 'srcId', item.id)
  1424. this.$set(this.formData, 'srcCnName', item.title)
  1425. this.$set(this.formData, 'srcEnName', item.title)
  1426. } else if (this.formData.sourceType == 'AGENT') {
  1427. // 代理
  1428. this.$set(this.formData, 'srcId', item.id)
  1429. this.$set(this.formData, 'srcCnName', item.cnName)
  1430. this.$set(this.formData, 'srcEnName', item.cnName)
  1431. } else if (this.formData.sourceType == 'SALES') {
  1432. // 业务员
  1433. this.$set(this.formData, 'srcId', item.id)
  1434. this.$set(this.formData, 'srcCnName', item.name)
  1435. this.$set(this.formData, 'srcEnName', item.name)
  1436. } else { }
  1437. }
  1438. }
  1439. } else if (name == 'sourceType') {
  1440. this.$set(this.formData, 'sourceType', value)
  1441. this.$set(this.formData, 'srcId', '')
  1442. this.$set(this.formData, 'srcCnName', '')
  1443. this.$set(this.formData, 'srcEnName', '')
  1444. if (this.formData.sourceType == 'OWN') {
  1445. this.sourceforParameter = { key: 'id', label: 'title', value: 'title' }
  1446. this.ownDeptLazyTreefun()
  1447. } else if (this.formData.sourceType == 'AGENT') {
  1448. this.sourceforParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  1449. this.agentBcorpsListfun()
  1450. } else if (this.formData.sourceType == 'SALES') {
  1451. this.sourceforParameter = { key: 'id', label: 'name', value: 'name' }
  1452. this.salesUserGetListfun()
  1453. } else { }
  1454. } else { }
  1455. },
  1456. // 业务来源接口
  1457. sourceRemote(value, name) {
  1458. if (name == 'srcCnName') {
  1459. if (this.formData.sourceType == 'OWN') {
  1460. this.sourceforParameter = { key: 'id', label: 'title', value: 'title' }
  1461. this.ownDeptLazyTreefun()
  1462. } else if (this.formData.sourceType == 'AGENT') {
  1463. this.sourceforParameter = { key: 'id', label: 'cnName', value: 'cnName' }
  1464. this.agentBcorpsListfun(value)
  1465. } else if (this.formData.sourceType == 'SALES') {
  1466. this.sourceforParameter = { key: 'id', label: 'name', value: 'name' }
  1467. this.salesUserGetListfun(value)
  1468. } else { }
  1469. } else { }
  1470. },
  1471. // 获取业务来源代理数据
  1472. agentBcorpsListfun(cnName) {
  1473. let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理,代理客户'
  1474. getBcorpslistByType(1, 10, { cnName, corpTypeName }).then(res => {
  1475. this.srcData = res.data.data.records
  1476. })
  1477. },
  1478. // 获取业务来源业务员数据
  1479. salesUserGetListfun(account) {
  1480. selectListLos('业务员').then(res => {
  1481. this.srcData = res.data.data
  1482. })
  1483. },
  1484. // 获取公司名称 用户管理左侧
  1485. ownDeptLazyTreefun() {
  1486. getDeptLazyTree(0).then(res => {
  1487. this.srcData = res.data.data
  1488. // 来源 内容 默认登录人所属公司
  1489. for (let item of this.srcData) {
  1490. if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
  1491. this.$set(this.formData, 'srcId', item.id)
  1492. this.$set(this.formData, 'srcCnName', item.title)
  1493. this.$set(this.formData, 'srcEnName', item.title)
  1494. }
  1495. }
  1496. })
  1497. },
  1498. // 获取维护人员数据
  1499. selectListLosfun() {
  1500. selectListLos('人事').then(res => {
  1501. this.maintenanceStaffData = res.data.data
  1502. })
  1503. },
  1504. corpTypeChange(ids) {
  1505. let arr = []
  1506. for (let item of ids) {
  1507. for (let ite of this.customTypeData) {
  1508. if (item == ite.id) {
  1509. arr.push(ite.cnName)
  1510. }
  1511. }
  1512. }
  1513. this.formData.corpType = ids.join(",")
  1514. this.formData.corpTypeName = arr.join(",")
  1515. // console.log(this.formData.corpTypeName);
  1516. },
  1517. salesChange(id) {
  1518. if (id == null) {
  1519. this.formData.salesName = null
  1520. }
  1521. for (const user of this.userOptions) {
  1522. if (user.id == id) {
  1523. this.formData.salesName = user.realName;
  1524. }
  1525. }
  1526. },
  1527. // 查询国家下拉
  1528. bcountrysListfun(cnName) {
  1529. bcountrysList(1, 10, { cnName }).then(res => {
  1530. this.cntyOptions = res.data.data.records
  1531. })
  1532. },
  1533. // 获取优势航线数据
  1534. blinesListfun(cnName) {
  1535. blinesList(1, 10, { cnName }).then(res => {
  1536. this.advantageData = res.data.data.records
  1537. })
  1538. },
  1539. // 查询币别下拉
  1540. rateListfun(cnName) {
  1541. getRateList(1, 10, { cnName }).then(res => {
  1542. this.rateOptions = res.data.data.records
  1543. })
  1544. },
  1545. // ps 规则字典数据获取
  1546. psRateWorkDictsfun() {
  1547. getWorkDicts('share_ratio-los').then((res) => {
  1548. this.psRateData = res.data.data
  1549. });
  1550. },
  1551. // 国家的下拉赋值
  1552. bcountrysChange(value) {
  1553. this.formData.cntyCode = value
  1554. for (let item of this.cntyOptions) {
  1555. if (item.code == value) {
  1556. this.formData.cntyName = item.cnName
  1557. }
  1558. }
  1559. },
  1560. // 优势航线下拉赋值
  1561. blinesChange(value) {
  1562. this.$set(this.formData, 'advantageRoute', value)
  1563. },
  1564. // 银行信息币别回调
  1565. rateChange(value) {
  1566. if (!value) {
  1567. this.$set(this.corpsAttnForm, 'curId', null)
  1568. this.$set(this.corpsAttnForm, 'curNo', null)
  1569. }
  1570. for (let item of this.rateOptions) {
  1571. if (item.id == value) {
  1572. this.$set(this.corpsAttnForm, 'curId', item.id)
  1573. this.$set(this.corpsAttnForm, 'curNo', item.code)
  1574. }
  1575. }
  1576. },
  1577. adminProfilesChange(value) {
  1578. if (value != null && value != []) {
  1579. this.formData.adminProfiles = value.join(",")
  1580. }
  1581. var userName = [];
  1582. for (var userId of value) {
  1583. for (var user of this.userOptions) {
  1584. if (user.id == userId) {
  1585. userName.push(user.realName)
  1586. break;
  1587. }
  1588. }
  1589. }
  1590. if (userName != null && userName != []) {
  1591. this.formData.adminProfilesName = userName.join(',')
  1592. }
  1593. },
  1594. submitForm() {
  1595. this.$refs['userDataForm'].validate(valid => {
  1596. if (!valid) return
  1597. // 判断业务来源是否填写
  1598. if (!this.formData.sourceType) {
  1599. this.$message.warning('请填写业务来源')
  1600. return;
  1601. }
  1602. // 判断来源明细是否填写
  1603. if (!this.formData.srcCnName) {
  1604. this.$message.warning('请填写来源明细')
  1605. return;
  1606. }
  1607. // 联系人姓名 取 客户联系人里的第一项
  1608. if (this.formData.corpsAttnList.length > 0) {
  1609. this.formData.attnName = this.formData.corpsAttnList[0].cname
  1610. this.formData.attnTel = this.formData.corpsAttnList[0].tel
  1611. }
  1612. // 部门 取当前登录人的部门
  1613. this.formData.deptId = JSON.parse(localStorage.getItem("saber-userInfo")).content.dept_id
  1614. // TODO 提交表单
  1615. // 联系电话赋值
  1616. if (this.formData.id != null) {
  1617. updateBcorps(this.formData).then(res => {
  1618. this.$message({
  1619. type: "success",
  1620. message: "修改成功!"
  1621. });
  1622. this.getBcorpsDetailfun(res.data.data.id)
  1623. })
  1624. } else {
  1625. this.formData.attnTel = this.formData.tel
  1626. addBcorps(this.formData).then((res) => {
  1627. this.$message({
  1628. type: "success",
  1629. message: "添加成功!"
  1630. });
  1631. this.getBcorpsDetailfun(res.data.data.id)
  1632. });
  1633. }
  1634. })
  1635. },
  1636. resetForm() {
  1637. this.$refs['userDataForm'].resetFields()
  1638. },
  1639. // -------------------------------------- 弹窗相关 ---------------------------------
  1640. // 客户联系人新建
  1641. corpsAttnAdd() {
  1642. this.corpsAttnDialogVisible = true
  1643. if (this.activeName == 'khlxk') {
  1644. this.dialogTitle = "客户联系人"
  1645. } else if (this.activeName == 'yhxx') {
  1646. this.dialogTitle = "银行信息"
  1647. } else if (this.activeName == 'fj') {
  1648. this.dialogTitle = "附件"
  1649. } else if (this.activeName == 'fptt') {
  1650. this.dialogTitle = "发票抬头"
  1651. } else if (this.activeName == 'gmjl') {
  1652. this.dialogTitle = "更名记录"
  1653. } else if (this.activeName == 'bljl') {
  1654. this.dialogTitle = "不良记录"
  1655. }
  1656. },
  1657. // 确认
  1658. corpsAttnAddConfirm() {
  1659. if (this.corpsAttnDialogIndex == null) {
  1660. this.corpsAttnForm.pid = this.formData.id
  1661. // 新建
  1662. this.$refs['corpsAttnForm'].validate(valid => {
  1663. if (!valid) return
  1664. // TODO 提交表单
  1665. // if (this.formData.id != null) {
  1666. // // 调用新建接口
  1667. // if (this.activeName == 'khlxk') {
  1668. // addBcorpsattn(this.corpsAttnForm).then(() => {
  1669. // this.$message({
  1670. // type: "success",
  1671. // message: "添加成功!"
  1672. // });
  1673. // });
  1674. // } else if (this.activeName == 'yhxx') {
  1675. // // this.formData.corpsBankList.push(this.corpsAttnForm);
  1676. // } else if (this.activeName == 'fj') {
  1677. // // this.formData.corpsFilesList.push(this.corpsAttnForm);
  1678. // }
  1679. // } else {
  1680. if (this.activeName == 'khlxk') {
  1681. this.formData.corpsAttnList.push(this.corpsAttnForm);
  1682. } else if (this.activeName == 'yhxx') {
  1683. this.formData.corpsBankList.push(this.corpsAttnForm);
  1684. } else if (this.activeName == 'fj') {
  1685. this.formData.corpsFilesList.push(this.corpsAttnForm);
  1686. } else if (this.activeName == 'fptt') {
  1687. this.formData.corpsInvoiceHeaderList.push(this.corpsAttnForm);
  1688. } else if (this.activeName == 'gmjl') {
  1689. this.formData.corpsRenameList.push(this.corpsAttnForm);
  1690. } else if (this.activeName == 'bljl') {
  1691. this.formData.corpsBadrecordList.push(this.corpsAttnForm);
  1692. }
  1693. // }
  1694. this.corpsAttnForm = {
  1695. status: 0
  1696. };
  1697. this.corpsAttnDialogVisible = false;
  1698. })
  1699. } else {
  1700. // 修改
  1701. // if (this.corpsAttnForm.id != null) {
  1702. // // 调用修改接口
  1703. // if (this.activeName == 'khlxk') {
  1704. // updateBcorpsattn(this.corpsAttnForm).then(_ => {
  1705. // this.$message({
  1706. // type: "success",
  1707. // message: "修改成功!"
  1708. // });
  1709. // })
  1710. // } else if (this.activeName == 'yhxx') {
  1711. // // this.formData.corpsBankList.push(this.corpsAttnForm);
  1712. // } else if (this.activeName == 'fj') {
  1713. // // this.formData.corpsFilesList.push(this.corpsAttnForm);
  1714. // }
  1715. // } else {
  1716. if (this.activeName == 'khlxk') {
  1717. this.formData.corpsAttnList[this.corpsAttnDialogIndex] = this.corpsAttnForm
  1718. } else if (this.activeName == 'yhxx') {
  1719. this.formData.corpsBankList[this.corpsAttnDialogIndex] = this.corpsAttnForm
  1720. } else if (this.activeName == 'fj') {
  1721. this.formData.corpsFilesList[this.corpsAttnDialogIndex] = this.corpsAttnForm
  1722. } else if (this.activeName == 'fptt') {
  1723. this.formData.corpsInvoiceHeaderList[this.corpsAttnDialogIndex] = this.corpsAttnForm
  1724. } else if (this.activeName == 'gmjl') {
  1725. this.formData.corpsRenameList[this.corpsAttnDialogIndex] = this.corpsAttnForm
  1726. } else if (this.activeName == 'bljl') {
  1727. this.formData.corpsBadrecordList[this.corpsAttnDialogIndex] = this.corpsAttnForm
  1728. }
  1729. // }
  1730. this.corpsAttnForm = {
  1731. status: 0
  1732. };
  1733. this.corpsAttnDialogIndex = null
  1734. this.corpsAttnDialogVisible = false;
  1735. }
  1736. },
  1737. // 编辑
  1738. corpsAttnHandle(scope) {
  1739. this.corpsAttnDialogIndex = scope.$index
  1740. this.corpsAttnForm = scope.row;
  1741. this.corpsAttnDialogVisible = true
  1742. },
  1743. // 删除
  1744. corpsAttnDelete(scope) {
  1745. console.log(scope.row.id, 1697)
  1746. this.$confirm('确认要删除吗?', '提示', {
  1747. confirmButtonText: '确定',
  1748. cancelButtonText: '取消',
  1749. type: 'warning'
  1750. }).then(() => {
  1751. // if (scope.row.id != null) {
  1752. // // 调用删除接口
  1753. // if (this.activeName == 'khlxk') {
  1754. // removevBcorpsattn(scope.row.id);
  1755. // } else if (this.activeName == 'yhxx') {
  1756. // this.formData.corpsBankList.splice(scope.$index, 1)
  1757. // } else if (this.activeName == 'fj') {
  1758. // this.formData.corpsFilesList.splice(scope.$index, 1)
  1759. // }
  1760. // } else {
  1761. if (this.activeName == 'khlxk') {
  1762. if (scope.row.id) {
  1763. bcorpsattnRemove(scope.row.id)
  1764. }
  1765. this.formData.corpsAttnList.splice(scope.$index, 1)
  1766. } else if (this.activeName == 'yhxx') {
  1767. if (scope.row.id) {
  1768. bcorpsbankRemove(scope.row.id)
  1769. }
  1770. this.formData.corpsBankList.splice(scope.$index, 1)
  1771. } else if (this.activeName == 'fj') {
  1772. if (scope.row.id) {
  1773. bcorpsfilesRemove(scope.row.id)
  1774. }
  1775. this.formData.corpsFilesList.splice(scope.$index, 1)
  1776. } else if (this.activeName == 'fptt') {
  1777. if (scope.row.id) {
  1778. corpsinvoiceheaderRemove(scope.row.id)
  1779. }
  1780. this.formData.corpsInvoiceHeaderList.splice(scope.$index, 1)
  1781. } else if (this.activeName == 'gmjl') {
  1782. if (scope.row.id) {
  1783. bcorpsrenameRemove(scope.row.id)
  1784. }
  1785. this.formData.corpsRenameList.splice(scope.$index, 1)
  1786. } else if (this.activeName == 'bljl') {
  1787. if (scope.row.id) {
  1788. bcorpsbadrecordRemove(scope.row.id)
  1789. }
  1790. this.formData.corpsBadrecordList.splice(scope.$index, 1)
  1791. }
  1792. // }
  1793. this.$message({
  1794. type: 'success',
  1795. message: '删除成功!'
  1796. });
  1797. }).catch(() => {
  1798. // this.$message({
  1799. // type: 'info',
  1800. // message: '已取消删除'
  1801. // });
  1802. });
  1803. },
  1804. // 关闭窗口
  1805. corpsAttnAddClose() {
  1806. this.corpsAttnForm = {
  1807. status: 0
  1808. };
  1809. this.corpsAttnDialogVisible = false;
  1810. },
  1811. // 文件上传成功
  1812. handleSuccess(response, file, fileList) {
  1813. this.corpsAttnForm.fileName = response.data.originalName;
  1814. this.corpsAttnForm.url = response.data.link;
  1815. },
  1816. // 删除文件
  1817. handleRemove(file, fileList) {
  1818. this.$confirm(`确定移除 ${file.name}?`, '提示', {
  1819. confirmButtonText: '确定',
  1820. cancelButtonText: '取消',
  1821. type: 'warning'
  1822. }).then(() => {
  1823. this.corpsAttnForm.fileName = null
  1824. this.corpsAttnForm.url = null
  1825. this.$message({
  1826. type: 'success',
  1827. message: '删除成功!'
  1828. });
  1829. }).catch(() => {
  1830. this.$message({
  1831. type: 'info',
  1832. message: '已取消删除'
  1833. });
  1834. });
  1835. },
  1836. // ---------------------------------------------------------------------------------
  1837. //返回列表
  1838. backToList() {
  1839. // if (this.formData.id) {
  1840. // this.unLock({
  1841. // moduleName: "xxb",
  1842. // tableName: "primary_school",
  1843. // billId: this.form.id,
  1844. // billNo: this.form.exrateYear + "-" + this.form.moon
  1845. // });
  1846. // }
  1847. this.formData = {
  1848. status: 0,
  1849. corpsAttnList: [],
  1850. corpsBankList: [],
  1851. corpsFilesList: [],
  1852. corpsInvoiceHeaderList: [],
  1853. corpsRenameList: [],
  1854. }
  1855. this.detailData = {}
  1856. this.corpsAttnForm = {
  1857. status: 0
  1858. }
  1859. this.corpsAttnDialogVisible = false,
  1860. this.corpsAttnDialogIndex = null,
  1861. this.$emit("goBack");
  1862. // this.leaveDetailsKey(this.$route.name);
  1863. },
  1864. }
  1865. }
  1866. </script>
  1867. <style lang="scss" scoped>
  1868. /deep/ .el-form-item {
  1869. margin-bottom: 8px;
  1870. // margin-top: 8px;
  1871. }
  1872. .head {
  1873. width: 100%;
  1874. display: flex;
  1875. justify-content: space-between;
  1876. align-items: center;
  1877. }
  1878. .text {
  1879. font-size: 14px;
  1880. }
  1881. .item {
  1882. padding: 18px 0;
  1883. }
  1884. .box-card {
  1885. margin: 10px;
  1886. margin-bottom: 0;
  1887. box-shadow: 0 0 0 red;
  1888. }
  1889. </style>