fininvoicesDetails.vue 92 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList">返回列表
  7. </el-button>
  8. </div>
  9. <div class="add-customer-btn">
  10. <el-button type="success" size="small" :disabled="!form.id" plain @click="newbillFun">新建发票
  11. </el-button>
  12. <el-button size="small" type="warning" plain style="margin-right: 8px" :disabled="!form.id || editPower"
  13. v-if="form.status == 3" :loading="saveLoading" @click="fininvoicesRevokeFinInvoicesfun">撤销开票
  14. </el-button>
  15. <el-button size="small" type="success" plain style="margin-right: 8px" :disabled="!form.id || editPower"
  16. v-else :loading="saveLoading" @click="submit('开票')">确认开票
  17. </el-button>
  18. <el-button size="small" type="primary" :disabled="statusType || editPower" style="margin-right: 8px"
  19. v-if="editSave" :loading="saveLoading" @click="editHandle">编 辑
  20. </el-button>
  21. <el-button size="small" type="primary" :disabled="statusType" style="margin-right: 8px" v-else
  22. :loading="saveLoading" @click="editCustomer()">保 存
  23. </el-button>
  24. </div>
  25. </div>
  26. <div style="margin: 55px 5px 0px 5px;'">
  27. <el-tabs type="border-card">
  28. <el-tab-pane label="基础信息">
  29. <el-form :model="form" ref="form" :rules="rules" label-width="90px" class="demo-ruleForm">
  30. <trade-card title="基础信息" styleIocup="color:#4b9fe9">
  31. <el-row>
  32. <el-col :span="10">
  33. <div class="flexBoxLeft">
  34. <el-row>
  35. <el-col :span="12">
  36. <el-form-item label="所属公司" prop="branchName">
  37. <dic-select v-model="form.branchName" placeholder="所属公司" key="id"
  38. label="deptName" url="/blade-system/dept/top-list"
  39. :filterable="true" :remote="true" dataName="deptName"
  40. :disabled="editSave || !(roleName.includes('admin') || roleName.includes('总部')) || tableData.length"
  41. @selectChange="dicChange('branchName', $event)"></dic-select>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="12">
  45. <el-form-item label="发票号码" prop="invoiceNo">
  46. <el-input style="width: 100%;" v-model="form.invoiceNo" size="small"
  47. autocomplete="off" :disabled="true" clearable
  48. placeholder="发票号码">
  49. </el-input>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="12">
  53. <el-form-item label="开票日期" prop="invoiceDate">
  54. <el-date-picker v-model="form.invoiceDate" clearable
  55. style="width: 100%;" type="date" size="small"
  56. :disabled="editSave || (tableData.length && invoicestype != 1)"
  57. value-format="yyyy-MM-dd" placeholder="请选择开票日期">
  58. </el-date-picker>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="12">
  62. <el-form-item label="开票单位" prop="invCorpCnName">
  63. <search-query :datalist="invCorpData"
  64. :selectValue="form.invCorpCnName" :clearable="true"
  65. :disabled="editSave || !form.corpId || (tableData.length && invoicestype != 1)"
  66. :buttonIf="false" :remote="true" :filterable="true"
  67. placeholder="请选择开票单位"
  68. :forParameter="{ key: 'id', label: 'invoiceHeader', value: 'id' }"
  69. @corpChange="corpChange($event, 'invCorpCnName')"
  70. @remoteMethod="invcorpsinvoiceheaderListfun"
  71. @corpFocus="invcorpsinvoiceheaderListfun">
  72. </search-query>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="12">
  76. <el-form-item label="收/付" prop="dc">
  77. <el-select v-model="form.dc" placeholder="请选择"
  78. :disabled="editSave || (tableData.length && invoicestype != 1)"
  79. size="small">
  80. <el-option v-for="item in options" :key="item.value"
  81. :label="item.label" :value="item.value">
  82. </el-option>
  83. </el-select>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="12">
  87. <el-form-item label="税号" prop="invCorpTaxNo">
  88. <el-input style="width: 100%;" v-model="form.invCorpTaxNo"
  89. size="small" autocomplete="off" :disabled="true" clearable
  90. placeholder="请输入税号">
  91. </el-input>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :span="12">
  95. <el-form-item label="美元银行" prop="invCorpAccountBankUsd">
  96. <el-input style="width: 100%;" v-model="form.invCorpAccountBankUsd"
  97. size="small" autocomplete="off" :disabled="true" clearable
  98. placeholder="请输入美元银行">
  99. </el-input>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="12">
  103. <el-form-item label="美元账户" prop="invCorpAccountNoUsd">
  104. <el-input style="width: 100%;" v-model="form.invCorpAccountNoUsd"
  105. size="small" autocomplete="off" :disabled="true" clearable
  106. placeholder="请输入美元账户">
  107. </el-input>
  108. </el-form-item>
  109. </el-col> <el-col :span="12">
  110. <el-form-item label="发票币种" prop="invCurCode">
  111. <search-query :datalist="invCurCodeData"
  112. :selectValue="form.invCurCode" :filterable="true"
  113. :clearable="true"
  114. :disabled="editSave || (tableData.length && invoicestype != 1)"
  115. :buttonIf="false" placeholder="请选择发票币种"
  116. :forParameter="{ key: 'id', label: 'code', value: 'code' }"
  117. @corpChange="corpChange($event, 'invCurCode')"
  118. @corpFocus="invCurCodeRateListfun">
  119. </search-query>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="12">
  123. <el-form-item label="分单号" prop="hblno">
  124. <el-input style="width: 100%;" v-model="form.hblno" size="small"
  125. autocomplete="off" :disabled="editSave || tableData.length"
  126. clearable placeholder="请输入分单号">
  127. </el-input>
  128. </el-form-item>
  129. </el-col>
  130. </el-row>
  131. <el-row v-show="showForm">
  132. <el-col :span="12">
  133. <el-form-item label="人民币银行" prop="invCorpAccountBankCny">
  134. <el-input style="width: 100%;" v-model="form.invCorpAccountBankCny"
  135. size="small" autocomplete="off" :disabled="true" clearable
  136. placeholder="请输入美元银行">
  137. </el-input>
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="12">
  141. <el-form-item label="人民币账户" prop="invCorpAccountNoCny">
  142. <el-input style="width: 100%;" v-model="form.invCorpAccountNoCny"
  143. size="small" autocomplete="off" :disabled="true" clearable
  144. placeholder="请输入人民币账户">
  145. </el-input>
  146. </el-form-item>
  147. </el-col>
  148. <el-col :span="12">
  149. <el-form-item label="船名/航次" prop="vesselVoyno">
  150. <el-input style="width: 100%;" v-model="form.vesselVoyno"
  151. size="small" autocomplete="off"
  152. :disabled="editSave || (tableData.length && invoicestype != 1)"
  153. clearable placeholder="请输入船名/航次">
  154. </el-input>
  155. </el-form-item>
  156. </el-col>
  157. <el-col :span="12">
  158. <el-form-item label="开航日期" prop="etd">
  159. <el-date-picker v-model="form.etd" clearable style="width: 100%;"
  160. type="date" size="small"
  161. :disabled="editSave || (tableData.length && invoicestype != 1)"
  162. value-format="yyyy-MM-dd HH:mm:ss" placeholder="请输入开航日期">
  163. </el-date-picker>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="12">
  167. <el-form-item label="装货港" prop="pol">
  168. <search-query :datalist="polData" :selectValue="form.pol"
  169. :filterable="true" :clearable="true" :remote="true"
  170. :disabled="editSave || (tableData.length && invoicestype != 1)"
  171. :buttonIf="false" placeholder="请选择装货港"
  172. :forParameter="{ key: 'id', label: 'enName', value: 'enName' }"
  173. @corpChange="corpChange($event, 'pol')"
  174. @remoteMethod="polBportsListfun" @corpFocus="polBportsListfun">
  175. </search-query>
  176. </el-form-item>
  177. </el-col>
  178. <el-col :span="12">
  179. <el-form-item label="卸货港" prop="pod">
  180. <search-query :datalist="podData" :selectValue="form.pod"
  181. :filterable="true" :clearable="true" :remote="true"
  182. :disabled="editSave || (tableData.length && invoicestype != 1)"
  183. :buttonIf="false" placeholder="请选择卸货港"
  184. :forParameter="{ key: 'id', label: 'enName', value: 'enName' }"
  185. @corpChange="corpChange($event, 'pod')"
  186. @remoteMethod="podBportsListfun" @corpFocus="podBportsListfun">
  187. </search-query>
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="12">
  191. <el-form-item label="目的地" prop="destination">
  192. <search-query :datalist="destinationData"
  193. :selectValue="form.destination" :filterable="true"
  194. :clearable="true" :remote="true"
  195. :disabled="editSave || (tableData.length && invoicestype != 1)"
  196. :buttonIf="false" placeholder="请选择目的地"
  197. :forParameter="{ key: 'id', label: 'enName', value: 'enName' }"
  198. @corpChange="corpChange($event, 'destination')"
  199. @remoteMethod="destinationBportsListfun"
  200. @corpFocus="destinationBportsListfun">
  201. </search-query>
  202. </el-form-item>
  203. </el-col>
  204. <el-col :span="12">
  205. <el-form-item label="箱型箱量" prop="containers">
  206. <el-input style="width: 100%;" v-model="form.containers"
  207. size="small" autocomplete="off"
  208. :disabled="editSave || (tableData.length && invoicestype != 1)"
  209. clearable placeholder="请输入箱型箱量">
  210. </el-input>
  211. </el-form-item>
  212. </el-col>
  213. </el-row>
  214. </div>
  215. </el-col>
  216. <el-col :span="14">
  217. <div class="flexBoxRight">
  218. <!--<el-row>-->
  219. <!-- <el-col :span="4">-->
  220. <!-- <el-switch-->
  221. <!-- v-model="form.stlMode"-->
  222. <!-- active-value="1"-->
  223. <!-- inactive-value="0"-->
  224. <!-- active-color="#66dd7a"-->
  225. <!-- inactive-color="#4ea6ea"-->
  226. <!-- active-text="票结"-->
  227. <!-- inactive-text="月结">-->
  228. <!-- </el-switch>-->
  229. <!-- </el-col>-->
  230. <!-- <el-col :span="6">-->
  231. <!-- <el-checkbox style="margin-left: 10%" size="medium" :true-label="1" :false-label="0"-->
  232. <!-- :disabled="editSave"-->
  233. <!-- v-model="form.isDk">整票(不列费用明细)-->
  234. <!-- </el-checkbox>-->
  235. <!-- </el-col>-->
  236. <!-- <el-col :span="5">-->
  237. <!-- <el-checkbox style="margin-left: 10%" size="medium" :true-label="1" :false-label="0"-->
  238. <!-- :disabled="editSave"-->
  239. <!-- v-model="form.isRp">只提取开票费用-->
  240. <!-- </el-checkbox>-->
  241. <!-- </el-col>-->
  242. <!-- <el-col :span="3">-->
  243. <!-- <el-checkbox style="margin-left: 10%" size="medium" :true-label="1" :false-label="0"-->
  244. <!-- :disabled="editSave"-->
  245. <!-- v-model="form.isExportMblno">主单号-->
  246. <!-- </el-checkbox>-->
  247. <!-- </el-col>-->
  248. <!-- <el-col :span="3">-->
  249. <!-- <el-checkbox style="margin-left: 10%" size="medium" :true-label="1" :false-label="0"-->
  250. <!-- :disabled="editSave"-->
  251. <!-- v-model="form.isExportVslvoy">船名航次-->
  252. <!-- </el-checkbox>-->
  253. <!-- </el-col>-->
  254. <!-- <el-col :span="3">-->
  255. <!-- <el-checkbox style="margin-left: 10%" size="medium" :true-label="1" :false-label="0"-->
  256. <!-- :disabled="editSave"-->
  257. <!-- v-model="form.isExportHblno">分单号-->
  258. <!-- </el-checkbox>-->
  259. <!-- </el-col>-->
  260. <!--</el-row>-->
  261. <el-row>
  262. <el-col :span="8">
  263. <el-form-item label="结算单位" prop="corpCnName">
  264. <search-query :datalist="corpData" :selectValue="form.corpCnName"
  265. :clearable="true" :disabled="editSave || tableData.length"
  266. :buttonIf="false" :remote="true" :filterable="true"
  267. placeholder="请输入结算单位"
  268. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  269. @corpChange="corpChange($event, 'corpCnName')"
  270. @remoteMethod="corpBcorpsListfun"
  271. @corpFocus="corpBcorpsListfun">
  272. </search-query>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="8">
  276. <el-form-item label="费用名称" prop="feeCnName">
  277. <dic-select v-model="form.feeCnName" placeholder="费用名称" key="id"
  278. label="cnName" url="/blade-los/bfees/listAll" :filterable="true"
  279. :multiple="true" :collapseTags="true"
  280. :disabled="editSave || tableData.length"></dic-select>
  281. </el-form-item>
  282. </el-col>
  283. <el-col :span="8">
  284. <el-form-item label="税控发票号" prop="taxInvoiceNo">
  285. <el-input style="width: 100%;" v-model="form.taxInvoiceNo"
  286. size="small" autocomplete="off"
  287. :disabled="editSave || (tableData.length && invoicestype != 1)"
  288. clearable placeholder="请输入税控发票号">
  289. </el-input>
  290. </el-form-item>
  291. </el-col>
  292. <el-col :span="8">
  293. <el-form-item label="业务开始日期" prop="accountDateFrom">
  294. <el-date-picker v-model="form.accountDateFrom" clearable
  295. style="width: 100%;" type="date" size="small"
  296. :disabled="editSave || (tableData.length && invoicestype != 1)"
  297. value-format="yyyy-MM-dd" placeholder="选择业务日期">
  298. </el-date-picker>
  299. </el-form-item>
  300. </el-col>
  301. <el-col :span="8">
  302. <el-form-item label="业务结束日期" prop="accountDateTo">
  303. <el-date-picker v-model="form.accountDateTo" clearable
  304. style="width: 100%;" type="date" size="small"
  305. :disabled="editSave || (tableData.length && invoicestype != 1)"
  306. value-format="yyyy-MM-dd" placeholder="选择业务日期">
  307. </el-date-picker>
  308. </el-form-item>
  309. </el-col>
  310. <el-col :span="8">
  311. <el-form-item label="发票汇率" prop="exrate">
  312. <el-input style="width: 100%;" v-model="form.exrate" size="small"
  313. autocomplete="off"
  314. :disabled="editSave || (tableData.length && invoicestype != 1)"
  315. clearable placeholder="请输入发票汇率">
  316. </el-input>
  317. </el-form-item>
  318. </el-col>
  319. <el-col :span="16">
  320. <el-form-item label="业务编号" prop="businessNo">
  321. <el-input style="width: 100%;" v-model="form.businessNo"
  322. size="small" autocomplete="off"
  323. :disabled="editSave || tableData.length" clearable
  324. placeholder="请输入业务编号">
  325. </el-input>
  326. </el-form-item>
  327. </el-col>
  328. <el-col :span="8">
  329. <el-form-item label="发票类型" prop="invType">
  330. <search-query :datalist="invTypeData" :selectValue="form.invType"
  331. :clearable="true"
  332. :disabled="editSave || (tableData.length && invoicestype != 1)"
  333. :buttonIf="false" placeholder="请输入发票类型"
  334. :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
  335. @corpChange="corpChange($event, 'invType')"
  336. @corpFocus="invTypeWorkDictsfun">
  337. </search-query>
  338. </el-form-item>
  339. </el-col>
  340. <el-col :span="16">
  341. <el-form-item label="主单编号" prop="mblno">
  342. <el-input style="width: 100%;" v-model="form.mblno" size="small"
  343. autocomplete="off" :disabled="editSave || tableData.length"
  344. clearable placeholder="请输入主单编号">
  345. </el-input>
  346. </el-form-item>
  347. </el-col>
  348. <el-col :span="8">
  349. <el-form-item label="对账单号" prop="checkNo">
  350. <el-input style="width: 100%;" v-model="form.checkNo" size="small"
  351. autocomplete="off"
  352. :disabled="editSave || (tableData.length && invoicestype != 1)"
  353. clearable placeholder="请输入对账单号">
  354. </el-input>
  355. </el-form-item>
  356. </el-col>
  357. </el-row>
  358. <el-row v-show="showForm">
  359. <el-col :span="16">
  360. <el-form-item label="分单编号" prop="hblno">
  361. <el-input style="width: 100%;" v-model="form.hblno" size="small"
  362. autocomplete="off"
  363. :disabled="editSave || (tableData.length && invoicestype != 1)"
  364. clearable placeholder="请输入分单编号">
  365. </el-input>
  366. </el-form-item>
  367. </el-col>
  368. <el-col :span="8">
  369. <el-form-item label="申请单号" prop="applyNo">
  370. <el-input style="width: 100%;" v-model="form.applyNo" size="small"
  371. autocomplete="off"
  372. :disabled="editSave || (tableData.length && invoicestype != 1)"
  373. clearable placeholder="请输入申请单号">
  374. </el-input>
  375. </el-form-item>
  376. </el-col>
  377. <el-col :span="8">
  378. <el-form-item label="BOOK NO" prop="bookingNo">
  379. <el-input style="width: 100%;" v-model="form.bookingNo" size="small"
  380. autocomplete="off"
  381. :disabled="editSave || (tableData.length && invoicestype != 1)"
  382. clearable placeholder="请输入BOOK NO">
  383. </el-input>
  384. </el-form-item>
  385. </el-col>
  386. <el-col :span="8">
  387. <el-form-item label="业务类型" prop="businessTypes">
  388. <search-query :datalist="businessTypesData"
  389. :selectValue="form.businessTypes" :clearable="true"
  390. :disabled="editSave || (tableData.length && invoicestype != 1)"
  391. :buttonIf="false" :multiple="true" :collapseTags="true"
  392. placeholder="请输入业务类型"
  393. @corpChange="corpChange($event, 'businessTypes')">
  394. </search-query>
  395. </el-form-item>
  396. </el-col>
  397. <el-col :span="8">
  398. <el-form-item label="税率(%)" prop="taxRate">
  399. <el-input style="width: 100%;" v-model="form.taxRate" size="small"
  400. autocomplete="off"
  401. :disabled="editSave || (tableData.length && invoicestype != 1)"
  402. clearable placeholder="请输入税率">
  403. </el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="8">
  407. <el-form-item label="选择币种" prop="curCode">
  408. <search-query :datalist="curData" :selectValue="form.curCode"
  409. :filterable="true" :clearable="true"
  410. :disabled="editSave || (tableData.length && invoicestype != 1)"
  411. :remote="true" :buttonIf="false" placeholder="请输入选择币种"
  412. :forParameter="{ key: 'id', label: 'code', value: 'code' }"
  413. @remoteMethod="getRateListfun"
  414. @corpChange="corpChange($event, 'curCode')"
  415. @corpFocus="getRateListfun">
  416. </search-query>
  417. </el-form-item>
  418. </el-col>
  419. <el-col :span="16">
  420. <el-form-item label="邮箱" prop="yx">
  421. <el-input style="width: 100%;" v-model="form.yx" size="small"
  422. autocomplete="off"
  423. :disabled="editSave || (tableData.length && invoicestype != 1)"
  424. clearable placeholder="请输入邮箱">
  425. </el-input>
  426. </el-form-item>
  427. </el-col>
  428. <el-col :span="24">
  429. <el-form-item label="全电发票:" prop="elecRemarks">
  430. <el-input style="width: 100%;" v-model="form.elecRemarks"
  431. size="small"
  432. :disabled="editSave || (tableData.length && invoicestype != 1)"
  433. autocomplete="off" type="textarea" clearable
  434. placeholder="请输入全电发票备注">
  435. </el-input>
  436. </el-form-item>
  437. </el-col>
  438. </el-row>
  439. </div>
  440. </el-col>
  441. </el-row>
  442. <div style="display: flex;justify-content:space-between;align-items: center;">
  443. <div style="width: 40%;display: flex;justify-content:space-between;">
  444. <span>开票本币:{{ form.amountCny ? form.amountCny : '0.00' }}</span>
  445. <span>开票外币:{{ form.amountUsd ? form.amountUsd : '0.00' }}</span>
  446. <span>开票本币合计:{{ form.amountLoc ? form.amountLoc : '0.00' }}</span>
  447. </div>
  448. <div style="width: 60%;display: flex;justify-content:flex-end;align-items: center;">
  449. <el-checkbox style="margin-left: 10%" size="medium" :true-label="1" :false-label="0"
  450. :disabled="editSave" v-model="form.isExchangeToCny">转换成人民币
  451. </el-checkbox>
  452. <el-checkbox v-model="appendType" :disabled="editSave" false-label="检索"
  453. true-label="追加">追加</el-checkbox>
  454. <el-button type="primary" size="small"
  455. :disabled="editSave || (tableData.length > 0 && appendType == '检索')" plain
  456. @click="finstlbillslistAccBillV1fun(appendType)">提取费用
  457. </el-button>
  458. <el-button size="small" :disabled="tableData.length > 0" @click="ResetFilter">重置条件
  459. </el-button>
  460. <el-button icon="el-icon-arrow-down" type="text" size="small" v-if="!showForm"
  461. @click="showForm = true">开展</el-button>
  462. <el-button icon="el-icon-arrow-up" type="text" size="small" v-if="showForm"
  463. @click="showForm = false">收缩</el-button>
  464. </div>
  465. </div>
  466. </trade-card>
  467. <el-card style="margin-top: 10px">
  468. <el-tabs v-model="detailTabs" type="card" @tab-click="handleClick">
  469. <el-tab-pane label="费用明细" name="first">
  470. <fininvoicesitems ref="fininvoicesitems" :tableData="tableData"
  471. :handleSelectionData="handleSelectionData" :brfalse="!editSave"
  472. :invoicestype="invoicestype" :form="form"
  473. @handleSelectionChange="handleSelectionChange" @deletefun="detailsdeletionfun">
  474. <template slot="menuLeft">
  475. <div style="display: flex;">
  476. <search-query :datalist="serverData" :selectValue="form.serverName"
  477. :clearable="true" :buttonIf="false" :filterable="true"
  478. :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictValue' }"
  479. placeholder="请选择开票项目" @corpChange="corpChange($event, 'serverName')"
  480. @corpFocus="serverWorkDictsfun">
  481. </search-query>
  482. <el-button style="margin-left: 10px" :disabled="editSave" size="small"
  483. type="primary" @click="invoicingfun">生成开票明细</el-button>
  484. <el-button style="margin-left: 10px" :disabled="editSave" size="small"
  485. type="warning" @click="invoicingRevokefun">撤销开票明细</el-button>
  486. <el-button size="small" :disabled="editSave" type="danger"
  487. @click="batchDeletefun">一键删除</el-button>
  488. <el-input style="width: 10%;margin-left: 10px;"
  489. v-model="invoiceAmountCNY" size="small" autocomplete="off"
  490. type="numbers" clearable placeholder="开票金额">
  491. <span style="line-height: 32px;" slot="suffix">本币</span>
  492. </el-input>
  493. <el-input style="width: 10%;margin-left: 5px;"
  494. v-model="invoiceAmountUSD" size="small" autocomplete="off"
  495. type="numbers" clearable placeholder="开票金额">
  496. <span style="line-height: 32px;" slot="suffix">外币</span>
  497. </el-input>
  498. <el-button style="margin-left: 10px" :disabled="statusType" size="small"
  499. type="primary" @click="invoiceMatchingfun()">匹配金额</el-button>
  500. <span style="font-size: 18px;font-weight: 600;margin-left: 50px;">
  501. <span style="color: #67C23A;margin-right: 10px;">
  502. 本币:{{ amountSubSum }}元
  503. </span>
  504. <span style="color: #E6A23C;">
  505. 外币:{{ amountSubUsdSum }}元
  506. </span>
  507. </span>
  508. </div>
  509. </template>
  510. </fininvoicesitems>
  511. </el-tab-pane>
  512. <el-tab-pane label="开票明细" name="second">
  513. <div style="margin-bottom: 10px;display: flex;">
  514. <el-button size="small" :disabled="editSave" type="danger"
  515. @click="invoicingBatchDelete">一键删除</el-button>
  516. <!-- <span style="font-size: 18px;font-weight: 600;margin-left: 100px;">
  517. <span style="color: #67C23A;">
  518. 本币:{{ amountSubSum }}元
  519. </span>
  520. </span> -->
  521. </div>
  522. <fininvoiceitemdetail :tableData="InvoicingList"
  523. :handleSelectionData="invoicingCheckboxData"
  524. @handleSelectionChange="invoicingCheckboxChange" @deletefun="invoiceDeletionfun"
  525. @savefun="invoiceSavefun">
  526. </fininvoiceitemdetail>
  527. </el-tab-pane>
  528. </el-tabs>
  529. </el-card>
  530. <el-card class="box-card" style="margin-top: 10px">
  531. <el-row>
  532. <el-col :span="5">
  533. <el-form-item label="业务编号" prop="billNo">
  534. <el-input style="width: 100%;" v-model="form.billNo" size="small"
  535. autocomplete="off" :disabled="true" clearable placeholder="请输入业务编号">
  536. </el-input>
  537. </el-form-item>
  538. </el-col>
  539. <el-col :span="5">
  540. <el-form-item label="单据日期" prop="billDate">
  541. <el-date-picker v-model="form.billDate" clearable style="width: 100%;"
  542. type="date" size="small" :disabled="true" value-format="yyyy-MM-dd HH:mm"
  543. placeholder="选择单据日期">
  544. </el-date-picker>
  545. </el-form-item>
  546. </el-col>
  547. <el-col :span="5">
  548. <el-form-item label="制单人" prop="createUserName">
  549. <el-input style="width: 100%;" v-model="form.createUserName" size="small"
  550. autocomplete="off" :disabled="true" clearable placeholder="请输入制单人">
  551. </el-input>
  552. </el-form-item>
  553. </el-col>
  554. </el-row>
  555. </el-card>
  556. </el-form>
  557. </el-tab-pane>
  558. <el-tab-pane label="文件中心">
  559. <containerTitle title="上传附件"></containerTitle>
  560. <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
  561. display :disabled="statusType"></c-upload>
  562. </el-tab-pane>
  563. </el-tabs>
  564. </div>
  565. <el-dialog title="选择数据" :visible.sync="retrievePopupsType" append-to-body width="70%"
  566. :close-on-click-modal="false">
  567. <div>
  568. <avue-crud :option="retrievePopupsOption" :data="retrievePopupsData" ref="retrievePopupsRef"
  569. id="out-table">
  570. <template slot="menu" slot-scope="{ row }">
  571. <el-button type="text" size="small" @click.stop="retrievePopupsSelect(row)">选择
  572. </el-button>
  573. </template>
  574. </avue-crud>
  575. </div>
  576. </el-dialog>
  577. </div>
  578. </template>
  579. <script>
  580. import { bcurexrateList } from "@/api/iosBasicData/rateManagement";
  581. import fininvoicesitems from "@/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoicesitems.vue";
  582. import fininvoiceitemdetail from "@/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoiceitemdetail.vue";
  583. import { getRateList } from "@/api/iosBasicData/rateManagement";
  584. import { finstlbillsGetByDetail, finstlbillsitemsRemove, finstlbillslistAccBillV1 } from "@/api/iosBasicData/finstlbills";
  585. import { bcorpsbankList, corpsinvoiceheaderList, getBcorpsList } from "@/api/iosBasicData/bcorps";
  586. import { bportsList } from "@/api/iosBasicData/bports";
  587. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  588. import {
  589. fininvoicesDetail,
  590. fininvoicesSubmit,
  591. fininvoicesitemsRemove,
  592. generateFinInvoicesDetail,
  593. fininvoiceitemdetailRemove,
  594. revokeFinInvoicesDetail,
  595. fininvoiceitemdetailSubmit,
  596. fininvoicesGenerateFinInvoices,
  597. fininvoicesConfirmFinInvoices, fininvoicesRevokeFinInvoices
  598. } from "@/api/iosBasicData/fininvoices";
  599. import { getWorkDicts } from "@/api/system/dictbiz";
  600. import { getCurrentDate } from "@/util/date";
  601. import dicSelect from "@/components/dicSelect/main";
  602. import { finstlbillslistAccBillByCorp } from '@/api/iosBasicData/finstlbills';
  603. import { getMonthDate, getYearDate } from "@/util/date";
  604. export default {
  605. components: { SearchQuery, fininvoicesitems, fininvoiceitemdetail, dicSelect },
  606. data() {
  607. return {
  608. amountSubSum: 0,
  609. amountSubUsdSum: 0,
  610. options: [
  611. {
  612. value: null,
  613. label: '全部'
  614. }, {
  615. value: 'D',
  616. label: '收'
  617. }, {
  618. value: 'C',
  619. label: '付'
  620. }
  621. ],
  622. showForm: false,
  623. retrievePopupsType: false, // 弹窗开启关闭
  624. retrievePopupsData: [], // 选择弹窗数据
  625. retrievePopupsOption: {
  626. border: true,
  627. calcHeight: 30,
  628. tip: false,
  629. height: '500px',
  630. index: true,
  631. addBtn: false,
  632. viewBtn: false,
  633. delBtn: false,
  634. editBtn: false,
  635. refreshBtn: false,
  636. columnBtn: false,
  637. menuWidth: '60',
  638. header: false,
  639. column: [
  640. {
  641. label: "客户中文名",
  642. prop: "cnName",
  643. overHidden: true,
  644. },
  645. {
  646. label: "客户英文文名",
  647. prop: "cnName",
  648. overHidden: true,
  649. },
  650. ]
  651. },
  652. invoiceAmountCNY: 0, // 费用明细开票金额输入框CNY
  653. invoiceAmountUSD: 0, // 费用明细开票金额输入框USD
  654. statusType: false, // 是否确认开票
  655. serverData: [], // 开票项目数据
  656. detailTabs: 'first',
  657. appendType: '检索',
  658. pageLoading: false, // 全屏加载
  659. saveLoading: false, // 按钮加载
  660. form: {
  661. branchId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
  662. branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
  663. dc: 'D',
  664. invCurCode: 'CNY',
  665. isRp: 1,
  666. invType: '全电发票',
  667. taxRate: 0,
  668. isExchangeToCny: 0,
  669. invoiceDate: getCurrentDate(),
  670. },
  671. tableData: [], // 费用明细数据
  672. InvoicingList: [], // 开票明细数据
  673. handleSelectionData: [], // 费用明细选择的数据
  674. invoicingCheckboxData: [], // 开票明细选择的数据
  675. corpData: [], // 结算单位数据
  676. invCorpData: [], // 开票单位
  677. bankReceiptData: [], // 结算单位银行账号数据
  678. // 业务类型
  679. businessTypesData: [
  680. {
  681. label: '海运出口',
  682. value: 'SE'
  683. }, {
  684. label: '海运进口',
  685. value: 'SI'
  686. }
  687. ],
  688. curData: [], // 币别
  689. destinationData: [], // 目的港
  690. podData: [], // 卸货港
  691. polData: [], // 装货港
  692. invCurCodeData: [], // 发票币种
  693. invTypeData: [], // 发票类型
  694. rules: {
  695. branchName: [{
  696. required: true,
  697. message: '',
  698. trigger: 'blur'
  699. },],
  700. // corpCnName: [
  701. // { required: true, message: '请输入付费对象', trigger: 'blur' },
  702. // ],
  703. invoiceDate: [
  704. { required: true, message: '请输入开票日期', trigger: 'blur' },
  705. ],
  706. exrate: [
  707. { required: true, message: '请输入导入汇率', trigger: 'blur' },
  708. ],
  709. taxRate: [
  710. { required: true, message: '请输入所属税率', trigger: 'blur' },
  711. ],
  712. invCurCode: [
  713. { required: true, message: '请输入所属发票币别', trigger: 'blur' },
  714. ],
  715. },
  716. roleName: [], // 当前的角色权限
  717. saberUserInfo: {}, // 当前登录人信息
  718. editPower: false, // 当前是否可以编辑
  719. }
  720. },
  721. props: {
  722. editSave: {
  723. type: Boolean,
  724. default: false
  725. }
  726. },
  727. watch: {
  728. // 监听 状态
  729. "form.status": {
  730. // 执行方法
  731. handler(oldValue, newValue) {
  732. if (oldValue == 3) {
  733. this.statusType = true
  734. } else {
  735. this.statusType = false
  736. }
  737. },
  738. deep: true, // 深度监听
  739. immediate: true // 第一次改变就执行
  740. },
  741. },
  742. async created() {
  743. this.roleName = localStorage.getItem('roleName').split(',')
  744. await this.saveLocalCurrency()
  745. // 获取当前登录人个人信息
  746. this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
  747. if (!this.form.id) {
  748. this.form.invCurCode = this.getLocalCurrency()
  749. bcurexrateList({ current: 1, size: 35, type: '月汇率', code: 'USD', exrateYear: getYearDate() }).then(res => {
  750. for (let item of res.data.data.records) {
  751. if (item.exrateMonth == getMonthDate()) {
  752. this.$set(this.form, 'exrate', item.exrateReceipts)
  753. }
  754. }
  755. })
  756. // getRateList({ current: 1, size: 30 }).then(res => {
  757. // for (let item of res.data.data.records) {
  758. // if (item.code == "USD") {
  759. // this.$set(this.form, 'exrate', item.exrate)
  760. // }
  761. // }
  762. // })
  763. }
  764. },
  765. methods: {
  766. dicChange(name, row) {
  767. if (name == 'branchName') {
  768. if (row) {
  769. this.form.branchId = row.id
  770. this.saveLocalCurrency(row.id)
  771. } else {
  772. this.form.branchId = null
  773. this.form.branchName = null
  774. }
  775. }
  776. },
  777. handleClick() {
  778. this.amountSubSum = 0
  779. this.amountSubUsdSum = 0
  780. },
  781. ResetFilter() {
  782. this.form = {
  783. invCurCode: this.getLocalCurrency(),
  784. isRp: 1,
  785. invType: '全电发票',
  786. taxRate: 0,
  787. isExchangeToCny: 0,
  788. invoiceDate: getCurrentDate(),
  789. }
  790. getRateList({ current: 1, size: 30 }).then(res => {
  791. for (let item of res.data.data.records) {
  792. if (item.code == "USD") {
  793. this.$set(this.form, 'exrate', item.exrate)
  794. }
  795. }
  796. })
  797. },
  798. // 开票明细编辑完成保存
  799. invoiceSavefun(row) {
  800. row.amountRate = this.form.taxRate
  801. // 销售额/(1+税率)×税率
  802. row.amountTax = (row.amount / (1 + (Number(row.amountRate) / 100)) * (Number(row.amountRate) / 100)).toFixed(2)
  803. fininvoiceitemdetailSubmit(row).then(res => {
  804. this.$message.success('操作成功')
  805. this.fininvoicesDetailfun(this.form.id)
  806. })
  807. },
  808. // 确认开票信息
  809. invoicingfun() {
  810. if (this.handleSelectionData.length == 0) {
  811. this.$message.warning('请选择数据')
  812. return;
  813. }
  814. if (!this.form.serverName) {
  815. this.$message.warning('请选择开票项目')
  816. return
  817. }
  818. let obj = this.form
  819. obj.finInvoicesItemsList = []
  820. obj.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(',') : ''
  821. obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  822. //开票日期
  823. if (this.form.invoiceDate) {
  824. obj.invoiceDate = this.form.invoiceDate.slice(0, 10) + ' 00:00:00'
  825. }
  826. // 业务日期
  827. if (this.form.accountDateFrom) {
  828. obj.accountDateFrom = this.form.accountDateFrom.slice(0, 10) + ' 00:00:00'
  829. }
  830. if (this.form.accountDateTo) {
  831. obj.accountDateTo = this.form.accountDateTo.slice(0, 10) + ' 00:00:00'
  832. }
  833. for (let item of this.handleSelectionData) {
  834. // 拿未开票的数据
  835. if (item.status == 0) {
  836. if (item.currentCurCode == this.getLocalCurrency()) {
  837. item.currentAmount = item.currentAmountCNY
  838. } else {
  839. item.currentAmount = item.currentAmountUSD
  840. }
  841. obj.finInvoicesItemsList.push(item)
  842. }
  843. }
  844. if (obj.finInvoicesItemsList.length == 0) {
  845. this.$message.warning('请选择未生成发票的数据')
  846. return
  847. }
  848. // 开票项目
  849. generateFinInvoicesDetail(obj).then(res => {
  850. this.$message.warning('操作成功')
  851. this.fininvoicesDetailfun(this.form.id)
  852. })
  853. this.detailTabs = 'second'
  854. },
  855. // 撤销开票信息
  856. invoicingRevokefun() {
  857. if (this.handleSelectionData.length == 0) {
  858. this.$message.warning('请选择数据')
  859. return;
  860. }
  861. let obj = this.form
  862. obj.finInvoicesItemsList = []
  863. obj.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(',') : ''
  864. obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  865. //开票日期
  866. if (this.form.invoiceDate) {
  867. obj.invoiceDate = this.form.invoiceDate.slice(0, 10) + ' 00:00:00'
  868. }
  869. // 业务日期
  870. if (this.form.accountDateFrom) {
  871. obj.accountDateFrom = this.form.accountDateFrom.slice(0, 10) + ' 00:00:00'
  872. }
  873. if (this.form.accountDateTo) {
  874. obj.accountDateTo = this.form.accountDateTo.slice(0, 10) + ' 00:00:00'
  875. }
  876. for (let item of this.handleSelectionData) {
  877. // 拿未开票的数据
  878. if (item.status == 1) {
  879. if (item.currentCurCode == this.getLocalCurrency()) {
  880. item.currentAmount = item.currentAmountCNY
  881. } else {
  882. item.currentAmount = item.currentAmountUSD
  883. }
  884. obj.finInvoicesItemsList.push(item)
  885. }
  886. }
  887. if (obj.finInvoicesItemsList.length == 0) {
  888. this.$message.warning('请选择已生成发票的数据')
  889. return
  890. }
  891. // 撤销开票项目
  892. revokeFinInvoicesDetail(obj).then(res => {
  893. this.$message.warning('操作成功')
  894. this.fininvoicesDetailfun(this.form.id)
  895. })
  896. },
  897. // 费用明细开票匹配
  898. invoiceMatchingfun() {
  899. if (this.invoiceAmountCNY != 0 || this.invoiceAmountUSD != 0) {
  900. let dataCNY = JSON.parse(JSON.stringify(this.invoiceAmountCNY))
  901. let dataUSD = JSON.parse(JSON.stringify(this.invoiceAmountUSD))
  902. for (let item of this.tableData) {
  903. this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item, false)
  904. if (this.invoiceAmountCNY != 0) {
  905. if (dataCNY < 0) {
  906. dataCNY = 0
  907. }
  908. if (dataCNY > 1500) {
  909. if (item.currentCurCode == this.getLocalCurrency()) {
  910. this.$set(item, 'currentAmountCNY', 1500)
  911. this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item, true)
  912. dataCNY -= 1500
  913. }
  914. } else {
  915. if (item.currentCurCode == this.getLocalCurrency()) {
  916. if (dataCNY != 0) {
  917. this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item, true)
  918. }
  919. this.$set(item, 'currentAmountCNY', dataCNY)
  920. dataCNY -= 1500
  921. }
  922. }
  923. }
  924. if (this.invoiceAmountUSD != 0) {
  925. if (dataUSD < 0) {
  926. dataUSD = 0
  927. }
  928. if (dataUSD > 1500) {
  929. if (item.currentCurCode == 'USD') {
  930. this.$set(item, 'currentAmountUSD', 1500)
  931. this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item, true)
  932. dataUSD -= 1500
  933. }
  934. } else {
  935. if (item.currentCurCode == 'USD') {
  936. this.$set(item, 'currentAmountUSD', dataUSD)
  937. if (dataUSD != 0) {
  938. this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item, true)
  939. }
  940. dataUSD -= 1500
  941. }
  942. }
  943. }
  944. }
  945. }
  946. },
  947. // 费用明细批量删除
  948. batchDeletefun() {
  949. if (this.handleSelectionData.length == 0) {
  950. return this.$message.warning('请选择要删除的数据')
  951. }
  952. this.$confirm("确定将选择数据删除?", {
  953. confirmButtonText: "确定",
  954. cancelButtonText: "取消",
  955. type: "warning"
  956. }).then(() => {
  957. // 获取有id 的数据
  958. const itemsWithId = this.handleSelectionData.filter(item => item.hasOwnProperty('id'));
  959. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  960. // 把选中的删除掉
  961. this.handleSelectionData.forEach((item) => {
  962. for (let index in this.tableData) {
  963. if (item.accBillNo == this.tableData[index].accBillNo) {
  964. this.tableData.splice(Number(index), 1)
  965. }
  966. }
  967. })
  968. // 有id 的处理
  969. if (itemsWithId.length != 0) {
  970. fininvoicesitemsRemove(arrIds.join(',')).then(res => {
  971. this.$message.success('操作成功')
  972. })
  973. }
  974. })
  975. },
  976. // 费用明细单个删除
  977. detailsdeletionfun(id, index) {
  978. this.$confirm("确定将选择数据删除?", {
  979. confirmButtonText: "确定",
  980. cancelButtonText: "取消",
  981. type: "warning"
  982. }).then(() => {
  983. if (id) {
  984. fininvoicesitemsRemove(id).then(res => {
  985. this.$message.success('操作成功')
  986. })
  987. }
  988. this.tableData.splice(index, 1)
  989. })
  990. },
  991. // 开票批量删除
  992. invoicingBatchDelete() {
  993. if (this.invoicingCheckboxData.length == 0) {
  994. return this.$message.warning('请选择要删除的数据')
  995. }
  996. this.$confirm("确定将选择数据删除?", {
  997. confirmButtonText: "确定",
  998. cancelButtonText: "取消",
  999. type: "warning"
  1000. }).then(() => {
  1001. // 获取有id 的数据
  1002. const itemsWithId = this.invoicingCheckboxData.filter(item => item.hasOwnProperty('id'));
  1003. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  1004. // 把选中的删除掉
  1005. this.invoicingCheckboxData.forEach((item) => {
  1006. for (let index in this.InvoicingList) {
  1007. if (item.id == this.InvoicingList[index].id) {
  1008. this.InvoicingList.splice(Number(index), 1)
  1009. }
  1010. }
  1011. })
  1012. // 有id 的处理
  1013. if (itemsWithId.length != 0) {
  1014. fininvoiceitemdetailRemove(arrIds.join(',')).then(res => {
  1015. this.$message.success('操作成功')
  1016. })
  1017. }
  1018. })
  1019. },
  1020. // 开票明细单个删除
  1021. invoiceDeletionfun(id, index) {
  1022. this.$confirm("确定将选择数据删除?", {
  1023. confirmButtonText: "确定",
  1024. cancelButtonText: "取消",
  1025. type: "warning"
  1026. }).then(() => {
  1027. if (id) {
  1028. fininvoiceitemdetailRemove(id).then(res => {
  1029. this.$message.success('操作成功')
  1030. })
  1031. }
  1032. this.InvoicingList.splice(index, 1)
  1033. })
  1034. },
  1035. // 下拉框的回调
  1036. corpChange(value, name) {
  1037. // 结算单位
  1038. if (name == 'corpCnName') {
  1039. if (!value) {
  1040. this.$set(this.form, 'corpId', '')
  1041. this.$set(this.form, 'corpCnName', '')
  1042. this.$set(this.form, 'corpEnName', '')
  1043. return
  1044. }
  1045. for (let item of this.corpData) {
  1046. if (item.cnName == value) {
  1047. this.$set(this.form, 'corpId', item.id)
  1048. this.$set(this.form, 'corpCnName', item.cnName)
  1049. this.$set(this.form, 'corpEnName', item.enName)
  1050. bcorpsbankList(1, 10, { pid: this.form.corpId }).then(res => {
  1051. if (res.data.data.records.length != 0) {
  1052. this.$set(this.form, 'bankReceiptAccountNo', res.data.data.records[0].accountNo)
  1053. this.$set(this.form, 'bankReceiptBankName', res.data.data.records[0].accountBank)
  1054. }
  1055. })
  1056. // 带出开票单位数据
  1057. corpsinvoiceheaderList(1, 20, { pid: this.form.corpId }).then(res => {
  1058. if (res.data.data.records.length != 0) {
  1059. this.$set(this.form, 'invCorpId', res.data.data.records[0].id)
  1060. this.$set(this.form, 'invCorpCnName', res.data.data.records[0].invoiceHeader)
  1061. this.$set(this.form, 'invCorpTaxNo', res.data.data.records[0].uscc) // 税号
  1062. this.$set(this.form, 'invCorpAccountBankUsd', res.data.data.records[0].accountBankUsd) // 美元银行
  1063. this.$set(this.form, 'invCorpAccountNoUsd', res.data.data.records[0].accountNoUsd) // 美元账户
  1064. this.$set(this.form, 'invCorpAccountBankCny', res.data.data.records[0].accountBankUsd) // 人民币银行
  1065. this.$set(this.form, 'invCorpAccountNoCny', res.data.data.records[0].accountNoUsd) // 人民币账户
  1066. }
  1067. })
  1068. }
  1069. }
  1070. }
  1071. // 开票单位
  1072. else if (name == 'invCorpCnName') {
  1073. this.$set(this.form, 'invCorpAccountBankUsd', '')
  1074. this.$set(this.form, 'invCorpAccountNoUsd', '')
  1075. this.$set(this.form, 'invCorpAccountBankCny', '')
  1076. this.$set(this.form, 'invCorpAccountNoCny', '')
  1077. if (!value) {
  1078. this.$set(this.form, 'invCorpId', '')
  1079. this.$set(this.form, 'invCorpCnName', '')
  1080. return
  1081. }
  1082. for (let item of this.invCorpData) {
  1083. if (item.id == value) {
  1084. this.$set(this.form, 'invCorpId', item.id)
  1085. this.$set(this.form, 'invCorpCnName', item.invoiceHeader)
  1086. this.$set(this.form, 'invCorpTaxNo', item.uscc) // 税号
  1087. this.$set(this.form, 'invCorpAccountBankUsd', item.accountBankUsd) // 美元银行
  1088. this.$set(this.form, 'invCorpAccountNoUsd', item.accountNoUsd) // 美元账户
  1089. this.$set(this.form, 'invCorpAccountBankCny', item.accountBankUsd) // 人民币银行
  1090. this.$set(this.form, 'invCorpAccountNoCny', item.accountNoUsd) // 人民币账户
  1091. }
  1092. }
  1093. }
  1094. // 结算单位银行账户
  1095. else if (name == 'bankReceiptAccountNo') {
  1096. for (let item of this.bankReceiptData) {
  1097. if (item.accountNo == value) {
  1098. this.$set(this.form, 'bankReceiptAccountNo', item.accountNo)
  1099. this.$set(this.form, 'bankReceiptBankName', item.accountBank)
  1100. }
  1101. }
  1102. }
  1103. else {
  1104. this.$set(this.form, name, value)
  1105. }
  1106. },
  1107. // 费用明细表格多选
  1108. handleSelectionChange(list) {
  1109. this.amountSubSum = 0
  1110. this.amountSubUsdSum = 0
  1111. if (list.length) {
  1112. list.forEach(e => {
  1113. this.amountSubSum += Number(e.currentAmountCNY ? e.currentAmountCNY : 0)
  1114. this.amountSubUsdSum += Number(e.currentAmountUSD ? e.currentAmountUSD : 0)
  1115. })
  1116. }
  1117. this.handleSelectionData = list
  1118. },
  1119. // 开票明细表格多选
  1120. invoicingCheckboxChange(list) {
  1121. this.amountSubSum = 0
  1122. this.amountSubUsdSum = 0
  1123. if (list.length) {
  1124. list.forEach(e => {
  1125. this.amountSubSum += Number(e.amount ? e.amount : 0)
  1126. })
  1127. }
  1128. this.invoicingCheckboxData = list
  1129. },
  1130. // 编辑事件
  1131. editHandle() {
  1132. this.editSave = false
  1133. },
  1134. newbillFun() {
  1135. if (this.statusType) {
  1136. this.$emit('toAddEdit')
  1137. } else {
  1138. this.$confirm('是否需要保存?', '提示', {
  1139. confirmButtonText: '确定',
  1140. cancelButtonText: '取消',
  1141. type: 'warning'
  1142. }).then(() => {
  1143. this.editCustomer('toAddEdit')
  1144. }).catch(() => {
  1145. this.$emit('toAddEdit')
  1146. });
  1147. }
  1148. },
  1149. submit(type) {
  1150. this.$confirm("确定进行确认开票操作?", {
  1151. confirmButtonText: "确定",
  1152. cancelButtonText: "取消",
  1153. type: "warning"
  1154. }).then(() => {
  1155. this.editCustomer(type)
  1156. }).catch(() => {
  1157. this.saveLoading = false
  1158. });
  1159. },
  1160. // 保存按钮事件
  1161. editCustomer(type) {
  1162. this.$refs.form.validate((valid) => {
  1163. if (!valid) return
  1164. if (!this.form.id) {
  1165. // 是否选择从表数据
  1166. if (this.handleSelectionData.length == 0) {
  1167. this.$message.warning('请选择结算数据');
  1168. return;
  1169. }
  1170. }
  1171. this.form.type = '销项'
  1172. this.form.billNoFormat = 'XXFP'
  1173. this.form.businessTypeCode = 'XXFP'
  1174. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(',') : ''
  1175. this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1176. //开票日期
  1177. if (this.form.invoiceDate) {
  1178. this.form.invoiceDate = this.form.invoiceDate.slice(0, 10) + ' 00:00:00'
  1179. }
  1180. // 业务日期
  1181. if (this.form.accountDateFrom) {
  1182. this.form.accountDateFrom = this.form.accountDateFrom.slice(0, 10) + ' 00:00:00'
  1183. }
  1184. if (this.form.accountDateTo) {
  1185. this.form.accountDateTo = this.form.accountDateTo.slice(0, 10) + ' 00:00:00'
  1186. }
  1187. if (this.form.id) {
  1188. this.form.finInvoicesItemsList = this.form.finInvoicesItemsList.map(item => {
  1189. if (item.currentCurCode == this.getLocalCurrency()) {
  1190. item.currentAmount = item.currentAmountCNY
  1191. } else {
  1192. item.currentAmount = item.currentAmountUSD
  1193. }
  1194. return item
  1195. })
  1196. } else {
  1197. this.form.finInvoicesItemsList = this.handleSelectionData.map(item => {
  1198. if (item.currentCurCode == this.getLocalCurrency()) {
  1199. item.currentAmount = item.currentAmountCNY
  1200. } else {
  1201. item.currentAmount = item.currentAmountUSD
  1202. }
  1203. return item
  1204. })
  1205. }
  1206. this.form.finInvoiceItemDetailList = this.InvoicingList
  1207. this.saveLoading = true
  1208. if (type == '开票') {
  1209. fininvoicesSubmit(this.form).then(res => {
  1210. res.data.data.businessTypes = res.data.data.businessTypes ? res.data.data.businessTypes.split(',') : []
  1211. res.data.data.feeCnName = res.data.data.feeCnName ? res.data.data.feeCnName.split(',') : []
  1212. this.form = res.data.data
  1213. this.fininvoicesConfirmFinInvoicesfun()
  1214. }).finally(() => {
  1215. this.saveLoading = false
  1216. }).catch(error => {
  1217. this.fininvoicesDetailfun(this.form.id)
  1218. })
  1219. } else if (type == 'toAddEdit') {
  1220. fininvoicesSubmit(this.form).then(res => {
  1221. this.$message.success('操作成功');
  1222. this.saveLoading = false // 关闭按钮动画
  1223. this.$emit(type)
  1224. }).catch(() => {
  1225. this.saveLoading = false
  1226. })
  1227. } else {
  1228. this.fininvoicesSubmitfun(this.form)
  1229. }
  1230. })
  1231. },
  1232. retrievePopupsSelect(row) {
  1233. this.$set(this.form, 'corpId', row.id)
  1234. this.$set(this.form, 'corpCnName', row.cnName)
  1235. this.$set(this.form, 'corpEnName', row.enName)
  1236. bcorpsbankList(1, 10, { pid: row.id }).then(res => {
  1237. if (res.data.data.records.length != 0) {
  1238. this.$set(this.form, 'bankReceiptAccountNo', res.data.data.records[0].accountNo)
  1239. this.$set(this.form, 'bankReceiptBankName', res.data.data.records[0].accountBank)
  1240. }
  1241. })
  1242. // 带出开票单位数据
  1243. corpsinvoiceheaderList(1, 20, { pid: row.id }).then(res => {
  1244. if (res.data.data.records.length != 0) {
  1245. this.$set(this.form, 'invCorpId', res.data.data.records[0].id)
  1246. this.$set(this.form, 'invCorpCnName', res.data.data.records[0].invoiceHeader)
  1247. this.$set(this.form, 'invCorpTaxNo', res.data.data.records[0].uscc) // 税号
  1248. this.$set(this.form, 'invCorpAccountBankUsd', res.data.data.records[0].accountBankUsd) // 美元银行
  1249. this.$set(this.form, 'invCorpAccountNoUsd', res.data.data.records[0].accountNoUsd) // 美元账户
  1250. this.$set(this.form, 'invCorpAccountBankCny', res.data.data.records[0].accountBankUsd) // 人民币银行
  1251. this.$set(this.form, 'invCorpAccountNoCny', res.data.data.records[0].accountNoUsd) // 人民币账户
  1252. }
  1253. })
  1254. this.retrievePopupsType = false
  1255. this.finstlbillslistAccBillV1fun(this.appendType)
  1256. },
  1257. finstlbillslistAccBillByCorpfun() {
  1258. let obj = {}
  1259. if (this.form.accountDateFrom) {
  1260. obj.accountDateFrom = this.form.accountDateFrom.slice(0, 10) + ' 00:00:00'
  1261. }
  1262. if (this.form.accountDateTo) {
  1263. obj.accountDateTo = this.form.accountDateTo.slice(0, 10) + ' 00:00:00'
  1264. }
  1265. obj.type = '3'
  1266. obj.branchId = this.form.branchId
  1267. obj.branchName = this.form.branchName
  1268. obj.billNo = this.form.businessNo // 业务编号
  1269. obj.businessBillNo = this.form.billNo // 业务编号
  1270. obj.mblno = this.form.mblno // 主单编号
  1271. obj.hblno = this.form.hblno // 分单编号
  1272. obj.bookingNo = this.form.bookingNo // 订舱号(BOOK NO)
  1273. obj.curCode = this.form.curCode // 币种
  1274. obj.businessType = this.form.businessTypes ? this.form.businessTypes.join(',') : '' // 业务类型
  1275. obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1276. finstlbillslistAccBillByCorp(obj).then(res => {
  1277. this.retrievePopupsType = true
  1278. this.retrievePopupsData = res.data.data
  1279. })
  1280. },
  1281. // 检索
  1282. finstlbillslistAccBillV1fun(type) {
  1283. this.$refs.form.validate((valid) => {
  1284. if (!valid) return
  1285. if (this.form.businessNo || this.form.mblno || this.form.checkNo) {
  1286. if (!this.form.corpId) {
  1287. this.finstlbillslistAccBillByCorpfun()
  1288. return
  1289. }
  1290. } else {
  1291. if (!this.form.corpId) {
  1292. this.$message.warning('请选择结算单位');
  1293. return
  1294. }
  1295. }
  1296. let obj = {}
  1297. //开票日期
  1298. if (this.form.invoiceDate) {
  1299. obj.invoiceDate = this.form.invoiceDate.slice(0, 10) + ' 00:00:00'
  1300. }
  1301. // 业务日期
  1302. if (this.form.accountDateFrom) {
  1303. obj.accountDateFrom = this.form.accountDateFrom.slice(0, 10) + ' 00:00:00'
  1304. }
  1305. if (this.form.accountDateTo) {
  1306. obj.accountDateTo = this.form.accountDateTo.slice(0, 10) + ' 00:00:00'
  1307. }
  1308. obj.type = '3'
  1309. obj.branchId = this.form.branchId
  1310. obj.branchName = this.form.branchName
  1311. obj.billNo = this.form.bookingNo // 账单号
  1312. obj.businessBillNo = this.form.businessNo // 业务编号
  1313. obj.mblno = this.form.mblno // 主单编号
  1314. obj.hblno = this.form.hblno // 分单编号
  1315. obj.bookingNo = this.form.bookingNo // 订舱号(BOOK NO)
  1316. obj.curCode = this.form.curCode // 币种
  1317. obj.businessType = this.form.businessTypes ? this.form.businessTypes.join(',') : '' // 业务类型
  1318. obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1319. obj.dc = this.form.dc
  1320. // 判断是否有对账单号
  1321. if (this.form.checkNo) {
  1322. obj.corpId = this.form.corpId // 结算单位
  1323. obj.checkNo = this.form.checkNo // CHK NO 对账单号
  1324. // obj.dc='D'
  1325. finstlbillsGetByDetail(obj).then(res => {
  1326. let arr = res.data.data.finStlBillsItemsList.map((item, index) => {
  1327. item.lineNo = Number(index) + 1 // 行号
  1328. item.currentCurCode = item.curCode
  1329. item.currentExrate = item.exrate
  1330. if (item.currentCurCode == this.getLocalCurrency()) {
  1331. // 本次发票金额
  1332. item.currentAmountCNY = item.appliedInvoiceCurrentAmount
  1333. } else {
  1334. // 本次发票金额
  1335. item.currentAmountUSD = item.appliedInvoiceCurrentAmount
  1336. }
  1337. delete item.id
  1338. return item
  1339. })
  1340. if (type == '追加') {
  1341. let a = [...this.tableData, ...arr,]
  1342. this.tableData = a.filter((obj, index) => {
  1343. return a.findIndex((elem) => {
  1344. return elem.accBillNo === obj.accBillNo
  1345. }) === index;
  1346. });
  1347. } else {
  1348. // 获取有id 的数据
  1349. const itemsWithId = this.tableData.filter(item => item.hasOwnProperty('id'));
  1350. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  1351. // 有id 的处理
  1352. if (itemsWithId.length != 0) {
  1353. finstlbillsitemsRemove(arrIds.join(',')).then(res => {
  1354. this.$message.success('操作成功')
  1355. })
  1356. }
  1357. if (arr.length == 0) {
  1358. this.$message.warning('当前检索暂无数据!')
  1359. }
  1360. this.tableData = arr
  1361. }
  1362. })
  1363. } else {
  1364. obj.billNo = this.form.businessNo // 业务编号
  1365. obj.corpCnName = this.form.corpId // 结算单位
  1366. obj.checkBillNo = this.form.checkNo // 对账单号
  1367. // obj.dc='D'
  1368. finstlbillslistAccBillV1(obj).then(res => {
  1369. let arr = res.data.data.map((item, index) => {
  1370. console.log(item)
  1371. item.lineNo = Number(index) + 1 // 行号
  1372. item.accBillId = item.id
  1373. item.accBillNo = item.billNo
  1374. item.billNo = item.businessBillNo
  1375. item.accDate = item.createTime
  1376. item.currentCurCode = item.curCode
  1377. item.currentExrate = item.exrate
  1378. item.dc = item.accountDc
  1379. if (item.currentCurCode == this.getLocalCurrency()) {
  1380. // 本次发票金额
  1381. item.currentAmountCNY = item.appliedInvoiceCurrentAmount
  1382. } else {
  1383. // 本次发票金额
  1384. item.currentAmountUSD = item.appliedInvoiceCurrentAmount
  1385. }
  1386. delete item.id
  1387. return item
  1388. })
  1389. if (type == '追加') {
  1390. let a = [...this.tableData, ...arr,]
  1391. this.tableData = a.filter((obj, index) => {
  1392. return a.findIndex((elem) => {
  1393. return elem.accBillNo === obj.accBillNo
  1394. }) === index;
  1395. });
  1396. } else {
  1397. // 获取有id 的数据
  1398. const itemsWithId = this.tableData.filter(item => item.hasOwnProperty('id'));
  1399. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  1400. // 有id 的处理
  1401. if (itemsWithId.length != 0) {
  1402. fininvoicesitemsRemove(arrIds.join(',')).then(res => {
  1403. this.$message.success('操作成功')
  1404. })
  1405. }
  1406. if (arr.length == 0) {
  1407. this.$message.warning('当前检索暂无数据!')
  1408. }
  1409. this.tableData = arr
  1410. }
  1411. })
  1412. }
  1413. })
  1414. },
  1415. // 保存接口
  1416. fininvoicesSubmitfun(obj) {
  1417. fininvoicesSubmit(obj).then(res => {
  1418. this.saveLoading = false
  1419. this.$message.success('操作成功');
  1420. this.fininvoicesDetailfun(res.data.data.id)
  1421. }).catch(() => {
  1422. this.saveLoading = false
  1423. })
  1424. },
  1425. // 详情接口
  1426. fininvoicesDetailfun(id) {
  1427. this.pageLoading = true
  1428. fininvoicesDetail(id).then(res => {
  1429. this.form = res.data.data
  1430. this.saveLocalCurrency(res.data.data.branchId)
  1431. if (this.roleName.indexOf('admin') == -1 ? this.roleName.indexOf('允许修改他人业务') == -1 ? this.saberUserInfo.user_id != this.form.createUser : false : false) {
  1432. this.editPower = true
  1433. } else {
  1434. this.editPower = false
  1435. }
  1436. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.split(',') : [] // 业务类型转换成数组显示
  1437. this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.split(',') : []
  1438. this.tableData = this.form.finInvoicesItemsList.map(item => {
  1439. if (item.currentCurCode == this.getLocalCurrency()) {
  1440. item.currentAmountCNY = item.currentAmount
  1441. } else {
  1442. item.currentAmountUSD = item.currentAmount
  1443. }
  1444. return item
  1445. })
  1446. this.InvoicingList = this.form.finInvoiceItemDetailList.map(item => {
  1447. item.edit = false
  1448. return item
  1449. })
  1450. }).finally(() => {
  1451. this.pageLoading = false
  1452. })
  1453. },
  1454. // 开票获取数据
  1455. fininvoicesGenerateFinInvoicesfun(billId, type) {
  1456. this.pageLoading = true
  1457. this.invoicestype = type ? type : 0
  1458. fininvoicesGenerateFinInvoices({ billId }).then(res => {
  1459. this.form = res.data.data
  1460. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.split(',') : [] // 业务类型转换成数组显示
  1461. this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.split(',') : []
  1462. // 判断是否是数组
  1463. if (Array.isArray(this.form.finInvoicesItemsList)) {
  1464. this.tableData = this.form.finInvoicesItemsList.map(item => {
  1465. if (item.currentCurCode == this.getLocalCurrency()) {
  1466. item.currentAmountCNY = item.currentAmount
  1467. } else {
  1468. item.currentAmountUSD = item.currentAmount
  1469. }
  1470. return item
  1471. })
  1472. }
  1473. // 判断是否是数组
  1474. if (Array.isArray(this.form.finInvoiceItemDetailList)) {
  1475. this.InvoicingList = this.form.finInvoiceItemDetailList.map(item => {
  1476. item.edit = false
  1477. return item
  1478. })
  1479. }
  1480. }).finally(() => {
  1481. this.pageLoading = false
  1482. })
  1483. },
  1484. // 确认申请
  1485. fininvoicesConfirmFinInvoicesfun() {
  1486. this.pageLoading = true
  1487. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(',') : ''
  1488. this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1489. fininvoicesConfirmFinInvoices(this.form).then(res => {
  1490. this.$message.success('操作成功');
  1491. this.fininvoicesDetailfun(res.data.data.id)
  1492. }).finally(() => {
  1493. this.pageLoading = false
  1494. }).catch(error => {
  1495. this.fininvoicesDetailfun(this.form.id)
  1496. })
  1497. },
  1498. // 撤销申请
  1499. fininvoicesRevokeFinInvoicesfun() {
  1500. this.$confirm("确定进行撤销确认发票操作?", {
  1501. confirmButtonText: "确定",
  1502. cancelButtonText: "取消",
  1503. type: "warning"
  1504. }).then(res => {
  1505. this.pageLoading = true
  1506. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(',') : ''
  1507. this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1508. fininvoicesRevokeFinInvoices(this.form).then(res => {
  1509. this.$message.success('操作成功');
  1510. this.fininvoicesDetailfun(res.data.data.id)
  1511. }).finally(() => {
  1512. this.pageLoading = false
  1513. })
  1514. })
  1515. },
  1516. //返回列表
  1517. backToList() {
  1518. this.$emit('goBack')
  1519. },
  1520. // 获取客户名称数据 往来单位数据
  1521. corpBcorpsListfun(cnName) {
  1522. getBcorpsList(1, 10, { cnName }).then(res => {
  1523. this.corpData = res.data.data.records
  1524. })
  1525. },
  1526. // 根据往来单位选择调用获取银行数据
  1527. bcorpsbankListfun(accountNo) {
  1528. bcorpsbankList(1, 10, {
  1529. // curNo:this.cntyCode,
  1530. pid: this.form.corpId,
  1531. accountNo: accountNo
  1532. }).then(res => {
  1533. this.bankReceiptData = res.data.data.records
  1534. })
  1535. },
  1536. // 根据往来单位选择调用获取发票抬头数据 开票单位数据
  1537. invcorpsinvoiceheaderListfun(cnName) {
  1538. corpsinvoiceheaderList(1, 20, { pid: this.form.corpId, cnName }).then(res => {
  1539. this.invCorpData = res.data.data.records
  1540. })
  1541. },
  1542. // 获取币别数据
  1543. getRateListfun(cnName) {
  1544. getRateList({ current: 1, size: 10, cnName }).then(res => {
  1545. this.curData = res.data.data.records
  1546. })
  1547. },
  1548. // 获取发票币别数据
  1549. async invCurCodeRateListfun(cnName) {
  1550. await this.checkRate(null, null, null, 2)
  1551. this.invCurCodeData = this.getCheckRate()
  1552. },
  1553. // 目的地
  1554. destinationBportsListfun(enName) {
  1555. bportsList(1, 10, { enName }).then(res => {
  1556. this.destinationData = res.data.data.records
  1557. })
  1558. },
  1559. // 卸货港
  1560. podBportsListfun(enName) {
  1561. bportsList(1, 10, { enName }).then(res => {
  1562. this.podData = res.data.data.records
  1563. })
  1564. },
  1565. // 装货港
  1566. polBportsListfun(enName) {
  1567. bportsList(1, 10, { enName }).then(res => {
  1568. this.polData = res.data.data.records
  1569. })
  1570. },
  1571. // 发票类型字典数据
  1572. invTypeWorkDictsfun() {
  1573. getWorkDicts('inv_type_los').then(res => {
  1574. this.invTypeData = res.data.data;
  1575. })
  1576. },
  1577. serverWorkDictsfun() {
  1578. getWorkDicts('Invoice_information_los').then(res => {
  1579. this.serverData = res.data.data;
  1580. })
  1581. },
  1582. },
  1583. }
  1584. </script>
  1585. <style scoped>
  1586. ::v-deep .el-form-item__error {
  1587. display: none;
  1588. }
  1589. ::v-deep.el-form-item {
  1590. margin-bottom: 0;
  1591. }
  1592. .cardBox {
  1593. background: #fff;
  1594. width: 100%;
  1595. height: 100%;
  1596. padding: 20px;
  1597. box-sizing: border-box;
  1598. border-radius: 4px;
  1599. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  1600. }
  1601. .flexBox {
  1602. display: flex;
  1603. }
  1604. .flexBoxLeft {
  1605. flex: 2;
  1606. margin-right: 10px;
  1607. //padding-bottom: 40px;
  1608. }
  1609. .flexBoxRight {
  1610. flex: 3;
  1611. //padding-bottom: 40px;
  1612. }
  1613. </style>