finstlbillsDetails.vue 80 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569
  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 size="small" style="margin-right: 8px" :loading="saveLoading" :disabled="!form.id"
  11. @click="previewreportfun">预 览
  12. </el-button>
  13. <el-button size="small" style="margin-right: 8px" v-if="roleName.indexOf('admin') != -1"
  14. :loading="saveLoading" :disabled="!form.id" @click="DesignreportDialog = true">报表设计
  15. </el-button>
  16. <el-button size="small" type="success" plain style="margin-right: 8px"
  17. :disabled="!form.id || editPower || $route.query.id" v-if="form.status == '0' || form.status == '4'"
  18. :loading="saveLoading" @click="submit('申请')">提交申请
  19. </el-button>
  20. <el-button size="small" type="warning" plain style="margin-right: 8px" :disabled="!form.id || editPower"
  21. v-if="form.status == '1' || form.status == '4' || (form.status == '3' && roleName.indexOf('admin') != -1)"
  22. :loading="saveLoading" @click="revokeSettlementApprovefun">撤销申请
  23. </el-button>
  24. <span v-if="form.status == '3'" style="font-size: 12px;padding-right: 10px;">审核通过</span>
  25. <el-button type="success" size="small" :disabled="!form.id" plain @click="newbillFun">新建账单
  26. </el-button>
  27. <el-button size="small" type="primary" style="margin-right: 8px"
  28. :disabled="!(form.status == '0' || form.status == '4') || editPower || $route.query.id"
  29. v-if="editSave" :loading="saveLoading" @click="editHandle">编 辑
  30. </el-button>
  31. <el-button size="small" type="primary" style="margin-right: 8px"
  32. :disabled="!(form.status == '0' || form.status == '4')" v-else :loading="saveLoading"
  33. @click="editCustomer()">保 存
  34. </el-button>
  35. <el-dropdown style="line-height: 0">
  36. <el-button type="warning" :loading="saveLoading" :disabled="!form.id" size="small">
  37. 审 批<i class="el-icon-arrow-down el-icon--right"></i>
  38. </el-button>
  39. <el-dropdown-menu slot="dropdown">
  40. <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
  41. </el-dropdown-item>
  42. </el-dropdown-menu>
  43. </el-dropdown>
  44. </div>
  45. </div>
  46. <div style="margin: 55px 5px 0px 5px;'">
  47. <el-tabs type="border-card">
  48. <el-tab-pane label="基础信息">
  49. <el-card class="box-card">
  50. <el-form :model="form" ref="form" label-width="90px" :rules="rules" class="demo-ruleForm">
  51. <el-row>
  52. <el-row>
  53. <el-col :span="4">
  54. <el-form-item label="所属公司" prop="branchName">
  55. <dic-select v-model="form.branchName" placeholder="所属公司" key="id"
  56. label="deptName" url="/blade-system/dept/top-list" :filterable="true"
  57. :remote="true" dataName="deptName"
  58. :disabled="editSave || !(roleName.includes('admin') || roleName.includes('总部')) || tableData.length"
  59. @selectChange="dicChange('branchName', $event)"></dic-select>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="4">
  63. <el-form-item label="付费对象" prop="corpCnName">
  64. <search-query :datalist="corpData" :selectValue="form.corpCnName"
  65. :clearable="true" :disabled="editSave || tableData.length != 0"
  66. :filterable="true" :remote="true" :buttonIf="false"
  67. placeholder="请选择付费对象"
  68. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  69. @corpChange="corpChange($event, 'corpCnName')"
  70. @remoteMethod="corpBcorpsListfun" @corpFocus="corpBcorpsListfun">
  71. </search-query>
  72. </el-form-item>
  73. </el-col>
  74. <el-col :span="6">
  75. <el-form-item label="开户账号" prop="bankId">
  76. <search-query :datalist="bankData" :selectValue="form.bankId"
  77. :clearable="true"
  78. :disabled="editSave || !form.corpId || tableData.length"
  79. :filterable="true"
  80. :forParameter="{ key: 'id', label: 'accountBankNo', value: 'id' }"
  81. :addIf="true" :tableIf="false" placeholder="请选择开户账号" @addJump="bankJump"
  82. @corpChange="corpChange($event, 'bankId')"
  83. @remoteMethod="bcorpsbankListfun" @corpFocus="bcorpsbankListfun">
  84. </search-query>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="5">
  88. <el-form-item label="付费事由" prop="remarks">
  89. <el-input style="width: 100%;" v-model="form.remarks" size="small"
  90. autocomplete="off" :disabled="editSave || tableData.length" clearable
  91. placeholder="请输入付费事由">
  92. </el-input>
  93. </el-form-item>
  94. </el-col>
  95. <el-col :span="5">
  96. <el-form-item label="费用名称" prop="feeCnName">
  97. <dic-select v-model="form.feeCnName" placeholder="费用名称" key="id"
  98. label="cnName" url="/blade-los/bfees/listAll" :filterable="true"
  99. :multiple="true" :collapseTags="true"
  100. :disabled="editSave || tableData.length"></dic-select>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="4">
  104. <el-form-item label="预计收回" prop="estimatedTime">
  105. <el-date-picker v-model="form.estimatedTime" type="date"
  106. style="width: 100%;" size="small"
  107. :disabled="editSave || tableData.length" value-format="yyyy-MM-dd"
  108. placeholder="请选择预计收回">
  109. </el-date-picker>
  110. </el-form-item>
  111. </el-col>
  112. <el-col :span="5">
  113. <el-form-item label="收款情况" prop="collectionSituation">
  114. <el-input style="width: 100%;" v-model="form.collectionSituation"
  115. size="small" autocomplete="off" :disabled="editSave || tableData.length"
  116. clearable placeholder="请输入收款情况">
  117. </el-input>
  118. </el-form-item>
  119. </el-col>
  120. <el-col :span="4">
  121. <el-form-item label="业务开始" prop="businessDateStart">
  122. <el-date-picker v-model="form.businessDateStart" clearable
  123. style="width: 100%;" type="date" size="small"
  124. :disabled="editSave || tableData.length" format="yyyy-MM-dd"
  125. value-format="yyyy-MM-dd" placeholder="请选择业务开始日期">
  126. </el-date-picker>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="4">
  130. <el-form-item label="业务结束" prop="businessDateEnd">
  131. <el-date-picker v-model="form.businessDateEnd" clearable
  132. style="width: 100%;" type="date" size="small"
  133. :disabled="editSave || tableData.length" format="yyyy-MM-dd"
  134. value-format="yyyy-MM-dd" placeholder="选择财务结束日期">
  135. </el-date-picker>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :span="3">
  139. <el-form-item label="收/付" prop="queryAmount">
  140. <search-query :datalist="dcData" :selectValue="form.dc" :filterable="true"
  141. :clearable="true" :remote="true" :buttonIf="false"
  142. :disabled="editSave || tableData.length" placeholder="请选择收/付"
  143. @corpChange="corpChange($event, 'dc')">
  144. </search-query>
  145. </el-form-item>
  146. </el-col>
  147. <el-col :span="3">
  148. <el-form-item label="币别" prop="curCode">
  149. <search-query :datalist="curCodeData" :selectValue="form.curCode"
  150. :clearable="true" :disabled="editSave || tableData.length"
  151. :buttonIf="false" :filterable="true" :remote="true" placeholder="请选择币别"
  152. :forParameter="{ key: 'id', label: 'code', value: 'code' }"
  153. @corpChange="corpChange($event, 'curCode')"
  154. @remoteMethod="getRateListfun" @corpFocus="getRateListfun">
  155. </search-query>
  156. </el-form-item>
  157. </el-col>
  158. <el-col :span="5">
  159. <el-form-item label="业务编号" prop="businessNo">
  160. <el-input style="width: 100%;" v-model="form.businessNo" size="small"
  161. autocomplete="off" :disabled="editSave || tableData.length" clearable
  162. placeholder="请输入业务编号">
  163. </el-input>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="5">
  167. <el-form-item label="账单编号" prop="accountNo">
  168. <el-input style="width: 100%;" v-model="form.accountNo" size="small"
  169. autocomplete="off" :disabled="editSave || tableData.length" clearable
  170. placeholder="请输入账单编号">
  171. </el-input>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="5">
  175. <el-form-item label="MBL NO" prop="mblno">
  176. <el-input style="width: 100%;" v-model="form.mblno" size="small"
  177. autocomplete="off" :disabled="editSave || tableData.length" clearable
  178. placeholder="请输入MBL NO">
  179. </el-input>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="5">
  183. <el-form-item label="HBL NO" prop="hblno">
  184. <el-input style="width: 100%;" v-model="form.hblno" size="small"
  185. autocomplete="off" :disabled="editSave || tableData.length" clearable
  186. placeholder="请输入HBL NO">
  187. </el-input>
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="4">
  191. <el-form-item label="对账单号" prop="checkNo">
  192. <el-input style="width: 100%;" v-model="form.checkNo" size="small"
  193. autocomplete="off" :disabled="editSave || tableData.length" clearable
  194. placeholder="请输入对账单号">
  195. </el-input>
  196. </el-form-item>
  197. </el-col>
  198. </el-row>
  199. <expand :showBtn="true" :showSpan="true">
  200. <el-row>
  201. <el-col :span="5">
  202. <el-form-item label="业务类型" prop="businessTypes">
  203. <search-query :datalist="businessTypesData"
  204. :selectValue="form.businessTypes" :clearable="true"
  205. :disabled="editSave || tableData.length" :buttonIf="false"
  206. :multiple="true" placeholder="请选择业务类型"
  207. @corpChange="corpChange($event, 'businessTypes')">
  208. </search-query>
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="5">
  212. <el-form-item label="船 名" prop="vesselCnName">
  213. <search-query :datalist="vesselData" :selectValue="form.vesselCnName"
  214. :filterable="true" :clearable="true" :remote="true"
  215. :disabled="editSave || tableData.length" :buttonIf="false"
  216. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  217. placeholder="请选择船名" @remoteMethod="vesselBvesselsListfun"
  218. @corpChange="corpChange($event, 'vessel')"
  219. @corpFocus="vesselBvesselsListfun">
  220. </search-query>
  221. </el-form-item>
  222. </el-col>
  223. <el-col :span="5">
  224. <el-form-item label="航 次" prop="voyageNo">
  225. <el-input style="width: 100%;" v-model="form.voyageNo" size="small"
  226. autocomplete="off" :disabled="editSave || tableData.length"
  227. clearable placeholder="请输入航次"></el-input>
  228. </el-form-item>
  229. </el-col>
  230. <el-col :span="5">
  231. <el-form-item label="单据编号" prop="billNo">
  232. <el-input style="width: 100%;" v-model="form.billNo" size="small"
  233. autocomplete="off" :disabled="true" clearable
  234. placeholder="单据编号"></el-input>
  235. </el-form-item>
  236. </el-col>
  237. <el-col :span="4">
  238. <el-form-item label="修改人" prop="updateUserName">
  239. <el-input style="width: 100%;" v-model="form.updateUserName"
  240. size="small" autocomplete="off" :disabled="true" clearable
  241. placeholder="修改人"></el-input>
  242. </el-form-item>
  243. </el-col>
  244. </el-row>
  245. </expand>
  246. <el-row>
  247. <el-col span="24">
  248. <div style="text-align: right">
  249. <el-checkbox v-model="appendType" :disabled="editSave" false-label="检索"
  250. true-label="追加">追加</el-checkbox>
  251. <el-button size="small" type="primary"
  252. :disabled="editSave || (tableData.length > 0 && appendType == '检索')"
  253. :loading="saveLoading" @click="retrievalfun">检 索
  254. </el-button>
  255. <el-button size="small" type="primary"
  256. :disabled="editSave || (tableData.length > 0 && appendType == '检索')"
  257. :loading="saveLoading" @click="quickSearch">快捷检索
  258. </el-button>
  259. <el-button size="small" :disabled="tableData.length > 0"
  260. @click="ResetFilter">重置条件
  261. </el-button>
  262. </div>
  263. </el-col>
  264. </el-row>
  265. </el-row>
  266. </el-form>
  267. </el-card>
  268. <el-card style="margin-top: 10px">
  269. <finstlbillsitems ref="finstlbillsitems" :form="form" :tableData="tableData"
  270. :editSave="editSave" :handleSelectionData="handleSelectionData"
  271. @handleSelectionChange="handleSelectionChange" @deletefun="finstlbillsitemsRemovefun">
  272. <template slot="menuLeft">
  273. <div>
  274. <el-button size="small" type="success" :disabled="editSave" :loading="saveLoading"
  275. @click="SelectedRows">确认选定行
  276. </el-button>
  277. <el-button size="small" type="danger" style="margin-left: 10px" :disabled="editSave"
  278. :loading="saveLoading" @click="batchDeletefun">一键删除
  279. </el-button>
  280. <el-input style="width: 10%;margin-left: 10px;" v-model="invoiceAmountCNY"
  281. size="small" autocomplete="off" type="numbers" clearable placeholder="开票金额">
  282. <span style="line-height: 32px;" slot="suffix">本币</span>
  283. </el-input>
  284. <el-input style="width: 10%;margin-left: 5px;" v-model="invoiceAmountUSD"
  285. size="small" autocomplete="off" type="numbers" clearable placeholder="开票金额">
  286. <span style="line-height: 32px;" slot="suffix">外币</span>
  287. </el-input>
  288. <el-button style="margin-left: 10px" :disabled="editSave" size="small"
  289. type="primary" @click="invoiceMatchingfun()">匹配金额</el-button>
  290. <span style="font-size: 18px;font-weight: 600;margin-left: 10px;">
  291. <span style="color: #67C23A;margin-right: 10px;">
  292. 本币:{{ amountSubSum }}元
  293. </span>
  294. <span style="color: #E6A23C;">
  295. 外币:{{ amountSubUsdSum }}元
  296. </span>
  297. </span>
  298. </div>
  299. </template>
  300. </finstlbillsitems>
  301. </el-card>
  302. <el-card style="margin-top: 10px">
  303. <el-row>
  304. <el-col :span="3">
  305. <div class="bottomFlex" style="color: #6BBCD1">
  306. <span>本币应付:</span>
  307. <span class="weightnum">{{ form.amountCr || 0 }}</span>
  308. </div>
  309. </el-col>
  310. <el-col :span="3">
  311. <div class="bottomFlex" style="color: #6BBCD1">
  312. <span>外币应付:</span>
  313. <span class="weightnum">{{ form.amountCrUsd || 0 }}</span>
  314. </div>
  315. </el-col>
  316. <el-col :span="6">
  317. <div class="bottomFlex" style="color: #6BBCD1">
  318. <span>本币应付合计:</span>
  319. <span class="weightnum">{{ form.amountCrLoc || 0 }}</span>
  320. </div>
  321. </el-col>
  322. <el-col :span="3">
  323. <div class="bottomFlex" style="color: #81B337">
  324. <span>本币应收:</span>
  325. <span class="weightnum">{{ form.amountDr || 0 }}</span>
  326. </div>
  327. </el-col>
  328. <el-col :span="3">
  329. <div class="bottomFlex" style="color: #81B337">
  330. <span>外币应收:</span>
  331. <span class="weightnum">{{ form.amountDrUsd || 0 }}</span>
  332. </div>
  333. </el-col>
  334. <el-col :span="6">
  335. <div class="bottomFlex" style="color: #81B337">
  336. <span>本币应收合计:</span>
  337. <span class="weightnum">{{ form.amountDrLoc || 0 }}</span>
  338. </div>
  339. </el-col>
  340. </el-row>
  341. </el-card>
  342. </el-tab-pane>
  343. <el-tab-pane label="文件中心">
  344. <containerTitle title="上传附件"></containerTitle>
  345. <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
  346. display :disabled="form.status == '3'"></c-upload>
  347. </el-tab-pane>
  348. </el-tabs>
  349. </div>
  350. <!--选择数据弹窗-->
  351. <el-dialog title="选择数据" class="el-dialogDeep" :visible.sync="retrievePopupsType" append-to-body width="70%"
  352. :close-on-click-modal="false">
  353. <div>
  354. <avue-crud :option="retrievePopupsOption" :data="retrievePopupsData" ref="retrievePopupsRef"
  355. id="out-table">
  356. <template slot="menu" slot-scope="{ row }">
  357. <el-button type="text" icon="" size="small" @click.stop="retrievePopupsSelect(row)">选择
  358. </el-button>
  359. </template>
  360. </avue-crud>
  361. </div>
  362. </el-dialog>
  363. <!--设计报表弹窗-->
  364. <el-dialog append-to-body title="设计报表" class="el-dialogDeep" :visible.sync="DesignreportDialog" width="70%"
  365. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  366. <reports :id="form.id" :assemblyForm="form" businessValue="FFSQ"></reports>
  367. </el-dialog>
  368. <!--预览-->
  369. <el-dialog title="打印" :visible.sync="selectPrintingDialog" append-to-body width="70%"
  370. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  371. <div>
  372. <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>
  373. </div>
  374. <span slot="footer" class="dialog-footer">
  375. <el-button size="small" @click="selectPrintingDialog = false;">取 消</el-button>
  376. </span>
  377. </el-dialog>
  378. <!--审核弹窗-->
  379. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  380. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  381. <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
  382. </el-dialog>
  383. <!--报表组件-->
  384. <reportContainer ref="reportContainer"></reportContainer>
  385. <search-popup ref="searchPopup" :form="form" :tableData="tableData" @importData="importData"></search-popup>
  386. </div>
  387. </template>
  388. <script>
  389. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  390. import {
  391. getRateList
  392. } from "@/api/iosBasicData/rateManagement";
  393. import {
  394. bcorpsbankList,
  395. getBcorpslistByType
  396. } from "@/api/iosBasicData/bcorps";
  397. import {
  398. finstlbillsConfirmSignFor,
  399. finstlbillsDetail,
  400. finstlbillsGetByDetail,
  401. finstlbillsitemsRemove,
  402. finstlbillslistAccBillByCorp,
  403. finstlbillslistAccBillV1,
  404. finstlbillsRevokeSignFor,
  405. finstlbillsSubmit,
  406. revokeSettlementApprove,
  407. settlementApprove
  408. } from '@/api/iosBasicData/finstlbills'
  409. import expand from "@/components/basic-container/expand.vue";
  410. import finstlbillsitems from "@/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue";
  411. import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
  412. import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
  413. import {
  414. reportsGetReportData
  415. } from "@/api/iosBasicData/reports";
  416. import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
  417. import {
  418. getList as getreportsList
  419. } from "@/api/iosBasicData/reports";
  420. import {
  421. getBvesselsList
  422. } from "@/api/iosBasicData/bvessels";
  423. import bcorps from "@/views/iosBasicData/bcorps/index.vue";
  424. import checkSchedule from "@/components/checkH/checkSchedule.vue";
  425. import dicSelect from "@/components/dicSelect/main";
  426. import searchPopup from "./assembly/searchPopup.vue";
  427. export default {
  428. components: {
  429. checkSchedule,
  430. bcorps,
  431. reportContainer,
  432. reportformsList,
  433. reports,
  434. SearchQuery,
  435. expand,
  436. finstlbillsitems,
  437. dicSelect,
  438. searchPopup
  439. },
  440. props: {
  441. // 编辑还是保存
  442. editSave: {
  443. type: Boolean,
  444. default: true
  445. },
  446. },
  447. data() {
  448. return {
  449. amountSubSum: 0,
  450. amountSubUsdSum: 0,
  451. roleName: localStorage.getItem("roleName"),
  452. checkId: '', // 审核需要的id
  453. batchNo: '',
  454. checkScheduleDialog: false,
  455. retrievePopupsType: false, // 弹窗开启关闭
  456. retrievePopupsData: [], // 选择弹窗数据
  457. retrievePopupsOption: {
  458. border: true,
  459. calcHeight: 30,
  460. tip: false,
  461. height: 'auto',
  462. index: true,
  463. addBtn: false,
  464. viewBtn: false,
  465. delBtn: false,
  466. editBtn: false,
  467. refreshBtn: false,
  468. columnBtn: false,
  469. menuWidth: '60',
  470. column: [{
  471. label: "客户中文名",
  472. prop: "cnName",
  473. overHidden: true,
  474. },
  475. {
  476. label: "客户英文文名",
  477. prop: "cnName",
  478. overHidden: true,
  479. },
  480. ]
  481. },
  482. invoiceAmountCNY: 0, // 费用明细开票金额输入框CNY
  483. invoiceAmountUSD: 0, // 费用明细开票金额输入框USD
  484. DesignreportDialog: false, // 设计报表弹窗
  485. selectPrintingDialog: false, // 预览报表
  486. // 收/付数据
  487. dcData: [{
  488. label: '全部',
  489. value: null
  490. }, {
  491. label: '收',
  492. value: 'D'
  493. }, {
  494. label: '付',
  495. value: 'C'
  496. }],
  497. appendType: '检索', // 是否追加
  498. tableData: [],
  499. pageLoading: false, // 全屏加载动画
  500. saveLoading: false, // 按钮动画
  501. // 绑定的数据
  502. form: {
  503. branchId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
  504. branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
  505. dc: 'C',
  506. mblno: null,
  507. corpCnName: null,
  508. corpId: null
  509. },
  510. handleSelectionData: [], // 表格选择的数据
  511. corpData: [], // 结算单位 数据
  512. bankData: [], // 查询银行数据
  513. curCodeData: [], // 币别
  514. srcforParameter: {},
  515. // 业务类型
  516. businessTypesData: [{
  517. label: '海运出口',
  518. value: 'SE'
  519. }, {
  520. label: '海运进口',
  521. value: 'SI'
  522. }],
  523. vesselData: [], // 船名数据
  524. rules: {
  525. // corpCnName: [{
  526. // required: true,
  527. // message: '请输入付费对象',
  528. // trigger: 'blur'
  529. // },],
  530. // bankId: [
  531. // { required: true, message: '请输入开户银行', trigger: 'blur' },
  532. // ],
  533. },
  534. roleName: [], // 当前的角色权限
  535. saberUserInfo: {}, // 当前登录人信息
  536. editPower: false, // 当前是否可以编辑
  537. }
  538. },
  539. created() {
  540. this.roleName = localStorage.getItem('roleName').split(',')
  541. // 获取当前登录人个人信息
  542. this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
  543. if (this.$route.query.mblno) {
  544. // console.log(111111)
  545. this.form.mblno = this.$route.query.mblno
  546. this.form.corpCnName = this.$route.query.corpCnName
  547. this.form.corpId = this.$route.query.corpId
  548. }
  549. this.saveLocalCurrency()
  550. },
  551. methods: {
  552. importData(list) {
  553. this.tableData = this.tableData.concat(list)
  554. },
  555. dicChange(name, row) {
  556. if (name == 'branchName') {
  557. if (row) {
  558. this.form.branchId = row.id
  559. this.saveLocalCurrency(row.id)
  560. } else {
  561. this.form.branchId = null
  562. this.form.branchName = null
  563. }
  564. }
  565. },
  566. // 开户账户跳转维护
  567. bankJump() {
  568. console.log(this.form)
  569. if (this.$store.getters.CorrespondenceUnitslos) {
  570. this.$alert("往来单位已存在,请保存关闭再进行操作", "温馨提示", {
  571. confirmButtonText: "确定",
  572. type: "warning",
  573. callback: action => {
  574. console.log(action, 430);
  575. }
  576. });
  577. return
  578. }
  579. this.$router.$avueRouter.closeTag("/iosBasicData/bcorps/index");
  580. this.$router.push({
  581. path: "/iosBasicData/bcorps/index",
  582. query: {
  583. id: this.form.corpId
  584. },
  585. })
  586. },
  587. // 打印
  588. reportRadio(val) {
  589. // 获取报表数据
  590. reportsGetReportData({
  591. billId: this.form.id,
  592. reportCode: val.classifyCode,
  593. groupCode: val.groupCode,
  594. type: 'FFSQ'
  595. }).then(res => {
  596. this.handleReportPreview(val.url, res.data.data.data)
  597. })
  598. },
  599. // 报表预览
  600. previewreportfun() {
  601. getreportsList(1, 10, {
  602. businessType: 'FFSQ',
  603. // classifyCode:'付费申请',
  604. // groupCode:'付费申请'
  605. }).then(res => {
  606. if (res.data.data.records.length == 1) {
  607. this.reportRadio(res.data.data.records[0])
  608. } else {
  609. this.saveLoading = true
  610. this.selectPrintingDialog = true
  611. this.saveLoading = false
  612. let page = {
  613. pageSize: 10,
  614. currentPage: 1,
  615. total: 0
  616. }
  617. this.$nextTick(() => {
  618. this.$refs.reportformsList.onLoad(page, {
  619. businessType: 'FFSQ',
  620. // classifyCode:'付费申请',
  621. // groupCode:'付费申请'
  622. })
  623. })
  624. }
  625. })
  626. },
  627. // 费用明细开票匹配
  628. invoiceMatchingfun() {
  629. if (this.invoiceAmountCNY != 0 || this.invoiceAmountUSD != 0) {
  630. let dataCNY = JSON.parse(JSON.stringify(this.invoiceAmountCNY))
  631. let dataUSD = JSON.parse(JSON.stringify(this.invoiceAmountUSD))
  632. for (let item of this.tableData) {
  633. this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item, false)
  634. if (this.invoiceAmountCNY != 0) {
  635. if (dataCNY < 0) {
  636. dataCNY = 0
  637. }
  638. if (dataCNY > 1500) {
  639. if (item.currentStlCurCode == this.getLocalCurrency()) {
  640. this.$set(item, 'currentStlAmountRMB', 1500)
  641. this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item, true)
  642. dataCNY -= 1500
  643. }
  644. } else {
  645. if (item.currentStlCurCode == this.getLocalCurrency()) {
  646. if (dataCNY != 0) {
  647. this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item, true)
  648. }
  649. this.$set(item, 'currentStlAmountRMB', dataCNY)
  650. dataCNY -= 1500
  651. }
  652. }
  653. }
  654. if (this.invoiceAmountUSD != 0) {
  655. if (dataUSD < 0) {
  656. dataUSD = 0
  657. }
  658. if (dataUSD > 1500) {
  659. if (item.currentStlCurCode != this.getLocalCurrency()) {
  660. this.$set(item, 'currentStlAmountUSD', 1500)
  661. this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item, true)
  662. dataUSD -= 1500
  663. }
  664. } else {
  665. if (item.currentStlCurCode != this.getLocalCurrency()) {
  666. this.$set(item, 'currentStlAmountUSD', dataUSD)
  667. if (dataUSD != 0) {
  668. this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item, true)
  669. }
  670. dataUSD -= 1500
  671. }
  672. }
  673. }
  674. }
  675. }
  676. },
  677. // 一键删除
  678. batchDeletefun() {
  679. if (this.handleSelectionData.length == 0) {
  680. return this.$message.warning('请选择要删除的数据')
  681. }
  682. this.$confirm("确定将选择数据删除?", {
  683. confirmButtonText: "确定",
  684. cancelButtonText: "取消",
  685. type: "warning"
  686. }).then(() => {
  687. // 获取有id 的数据
  688. const itemsWithId = this.handleSelectionData.filter(item => item.hasOwnProperty('id'));
  689. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  690. // 把选中的删除掉
  691. this.handleSelectionData.forEach((item) => {
  692. for (let index in this.tableData) {
  693. if (item.accBillNo == this.tableData[index].accBillNo) {
  694. this.tableData.splice(index, 1)
  695. }
  696. }
  697. })
  698. // 有id 的处理
  699. if (itemsWithId.length != 0) {
  700. finstlbillsitemsRemove(arrIds.join(',')).then(res => {
  701. this.$message.success('操作成功')
  702. })
  703. }
  704. })
  705. },
  706. // 删除
  707. finstlbillsitemsRemovefun(id, index) {
  708. this.$confirm("确定将选择数据删除?", {
  709. confirmButtonText: "确定",
  710. cancelButtonText: "取消",
  711. type: "warning"
  712. }).then(() => {
  713. if (id) {
  714. finstlbillsitemsRemove(id).then(res => {
  715. this.$message.success('操作成功')
  716. })
  717. }
  718. this.tableData.splice(index, 1)
  719. })
  720. },
  721. // 下拉回调
  722. corpChange(value, name) {
  723. // 结算单位
  724. if (name == 'corpCnName') {
  725. if (!value) {
  726. this.$set(this.form, 'corpId', '')
  727. this.$set(this.form, 'corpCnName', '')
  728. this.$set(this.form, 'corpEnName', '')
  729. this.$set(this.form, 'corpArgreementNo', '')
  730. }
  731. for (let item of this.corpData) {
  732. if (item.cnName == value) {
  733. this.$set(this.form, 'corpId', item.id)
  734. this.$set(this.form, 'corpCnName', item.cnName)
  735. this.$set(this.form, 'corpEnName', item.enName)
  736. this.$set(this.form, 'corpArgreementNo', item.enName)
  737. this.bcorpsbankListfun()
  738. }
  739. }
  740. } else if (name == 'bankId') {
  741. if (!value) {
  742. this.$set(this.form, 'bankId', '')
  743. this.$set(this.form, 'bankAccountName', '')
  744. this.$set(this.form, 'bankAccountBank', '')
  745. this.$set(this.form, 'bankAccountNo', '')
  746. }
  747. for (let item of this.bankData) {
  748. if (item.id == value) {
  749. this.$set(this.form, 'bankId', item.id)
  750. this.$set(this.form, 'bankAccountName', item.accountName)
  751. this.$set(this.form, 'bankAccountBank', item.accountBank)
  752. this.$set(this.form, 'bankAccountNo', item.accountNo)
  753. }
  754. }
  755. } else if (name == 'vessel') {
  756. for (let item of this.vesselData) {
  757. if (item.cnName == value) {
  758. this.$set(this.form, 'vesselId', item.id)
  759. this.$set(this.form, 'vesselCnName', item.cnName)
  760. this.$set(this.form, 'vesselEnName', item.enName)
  761. }
  762. }
  763. } else {
  764. this.$set(this.form, name, value)
  765. }
  766. },
  767. submit(type) {
  768. this.$confirm("确定进行申请操作?", {
  769. confirmButtonText: "确定",
  770. cancelButtonText: "取消",
  771. type: "warning"
  772. }).then(() => {
  773. this.editCustomer(type)
  774. })
  775. },
  776. newbillFun() {
  777. if (!(this.form.status == '0' || this.form.status == '4')) {
  778. this.$emit('toAddEdit')
  779. } else {
  780. this.$confirm('是否需要保存?', '提示', {
  781. confirmButtonText: '确定',
  782. cancelButtonText: '取消',
  783. type: 'warning'
  784. }).then(() => {
  785. this.editCustomer('toAddEdit')
  786. }).catch(() => {
  787. this.$emit('toAddEdit')
  788. });
  789. }
  790. },
  791. // 编辑
  792. editHandle() {
  793. this.editSave = false
  794. },
  795. // 保存
  796. editCustomer(type) {
  797. this.$refs.form.validate((valid) => {
  798. if (!valid) return
  799. if (!this.form.id) {
  800. // 是否选择从表数据
  801. if (this.handleSelectionData.length == 0) {
  802. this.$message.warning('请选择结算数据');
  803. return;
  804. }
  805. }
  806. for (let item of this.handleSelectionData) {
  807. if (!item.currentStlCurCode) {
  808. this.$message.warning('请选择本次结算币种');
  809. return;
  810. }
  811. }
  812. if (this.form.estimatedTime) {
  813. this.form.estimatedTime = this.form.estimatedTime + ' 00:00:00'
  814. }
  815. this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart
  816. .slice(0, 10) + ' 00:00:00' : null // 财务开始日期
  817. this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0,
  818. 10) + ' 00:00:00' : null // 财务开始日期
  819. this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + ' 00:00:00' :
  820. null
  821. this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) +
  822. ' 00:00:00' : null
  823. this.form.billNoFormat = 'FFSQ'
  824. this.form.businessTypeCode = 'FFSQ'
  825. this.form.businessType = 'FFSQ' // 结算单
  826. this.form.businessTypes = Array.isArray(this.form.businessTypes) ? this.form.businessTypes.join(',') : '' // 业务类型
  827. this.form.feeCnName = Array.isArray(this.form.feeCnName) ? this.form.feeCnName.join(',') : this.form.feeCnName
  828. this.saveLoading = true // 打开按钮动画
  829. if (this.form.id) {
  830. if (type == '选定行') {
  831. this.form.finStlBillsItemsList = this.handleSelectionData.map((item, index) => {
  832. if (item.currentStlCurCode == this.getLocalCurrency()) {
  833. item.currentStlAmount = item.currentStlAmountRMB
  834. } else {
  835. item.currentStlAmount = item.currentStlAmountUSD
  836. }
  837. if (!this.form.id) {
  838. // delete item.businessType
  839. delete item.billDate
  840. delete item.accountDc
  841. }
  842. return item
  843. })
  844. }
  845. this.form.finStlBillsItemsList = this.form.finStlBillsItemsList.map((item, index) => {
  846. if (item.currentStlCurCode == this.getLocalCurrency()) {
  847. item.currentStlAmount = item.currentStlAmountRMB
  848. } else {
  849. item.currentStlAmount = item.currentStlAmountUSD
  850. }
  851. return item
  852. })
  853. } else {
  854. this.form.finStlBillsItemsList = this.handleSelectionData.map((item, index) => {
  855. if (item.currentStlCurCode == this.getLocalCurrency()) {
  856. item.currentStlAmount = item.currentStlAmountRMB
  857. } else {
  858. item.currentStlAmount = item.currentStlAmountUSD
  859. }
  860. if (!this.form.id) {
  861. // delete item.businessType
  862. delete item.billDate
  863. delete item.accountDc
  864. }
  865. return item
  866. })
  867. }
  868. // 判断是直接保存还是提交申请
  869. if (type == '申请') {
  870. finstlbillsSubmit(this.form).then(res => {
  871. this.form = res.data.data
  872. this.settlementApprovefun()
  873. }).catch(() => {
  874. this.saveLoading = false
  875. this.finstlbillsDetailfun(this.form.id)
  876. })
  877. } else if (type == 'toAddEdit') {
  878. finstlbillsSubmit(this.form).then(res => {
  879. this.$message.success('操作成功');
  880. this.saveLoading = false // 关闭按钮动画
  881. this.$emit(type)
  882. }).catch(() => {
  883. this.saveLoading = false
  884. })
  885. } else {
  886. finstlbillsSubmit(this.form).then(res => {
  887. this.$message.success('操作成功');
  888. this.saveLoading = false // 关闭按钮动画
  889. this.finstlbillsDetailfun(res.data.data.id)
  890. }).catch(() => {
  891. this.saveLoading = false
  892. })
  893. }
  894. })
  895. },
  896. // 详情接口
  897. finstlbillsDetailfun(id) {
  898. this.pageLoading = true
  899. finstlbillsDetail(id).then(res => {
  900. this.form = res.data.data
  901. this.saveLocalCurrency(res.data.data.branchId)
  902. if (this.roleName.indexOf('admin') == -1 ? this.roleName.indexOf('允许修改他人业务') == -1 ? this
  903. .saberUserInfo.user_id != this.form.createUser : false : false) {
  904. this.editPower = true
  905. } else {
  906. this.editPower = false
  907. }
  908. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.split(',') :
  909. [] // 业务类型转换成数组显示
  910. this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.split(',') : []
  911. this.tableData = this.form.finStlBillsItemsList.map(item => {
  912. item.stlTtlAmountNet = Number(item.stlTtlAmount) - (Number(item.stlTtlAmount) *
  913. (Number(item.taxRate) + Number(item.surchargeRate)))
  914. item.currentStlAmountNet = Number(item.unsettledAmount) - (Number(item
  915. .unsettledAmount) * (Number(item.taxRate) + Number(item
  916. .surchargeRate)))
  917. if (item.curCode == this.getLocalCurrency()) {
  918. this.$set(item, 'currentInvoiceAmountRMB', item.currentInvoiceAmount)
  919. this.$set(item, 'amountRMB', item.amount)
  920. this.$set(item, 'amountNetRMB', item.amountNet)
  921. this.$set(item, 'stlTtlAmountRMB', item.stlTtlAmount)
  922. this.$set(item, 'stlTtlAmountNetRMB', item.stlTtlAmountNet)
  923. this.$set(item, 'currentStlAmountNetRMB', item.currentStlAmountNet)
  924. this.$set(item, 'currentStlAmountRMB', item.currentStlAmount)
  925. } else {
  926. this.$set(item, 'currentInvoiceAmountUSD', item.currentInvoiceAmount)
  927. this.$set(item, 'amountUSD', item.amount)
  928. this.$set(item, 'amountNetUSD', item.amountNet)
  929. this.$set(item, 'stlTtlAmountNetUSD', item.stlTtlAmountNet)
  930. this.$set(item, 'stlTtlAmountUSD', item.stlTtlAmount)
  931. this.$set(item, 'currentStlAmountNetUSD', item.currentStlAmountNet)
  932. this.$set(item, 'currentStlAmountUSD', item.currentStlAmount)
  933. }
  934. this.$set(item, 'costDate', [])
  935. return item
  936. })
  937. this.bcorpsbankListfun() // 查银行数据
  938. }).finally(() => {
  939. this.pageLoading = false
  940. })
  941. },
  942. // 重置条件
  943. ResetFilter() {
  944. this.form = {
  945. dc: 'C',
  946. mblno: null,
  947. corpCnName: null,
  948. corpId: null
  949. }
  950. },
  951. // 弹窗选择
  952. retrievePopupsSelect(row) {
  953. // this.form = row
  954. this.$set(this.form, 'corpId', row.id)
  955. this.$set(this.form, 'corpCnName', row.cnName)
  956. this.$set(this.form, 'corpEnName', row.enName)
  957. this.$set(this.form, 'corpArgreementNo', row.enName)
  958. this.retrievePopupsType = false
  959. this.bcorpsbankListfun()
  960. this.finstlbillslistAccBillV1fun(this.appendType)
  961. },
  962. //请核关闭
  963. choceScheduleFun() {
  964. this.checkScheduleDialog = false
  965. },
  966. // 检索
  967. retrievalfun() {
  968. this.$refs.form.validate((valid) => {
  969. if (!valid) return
  970. // 判断是否有对账单位
  971. if (!this.form.corpId && (this.form.businessNo || this.form.accountNo || this.form.hblno || this.form
  972. .mblno)) {
  973. console.log('新接口')
  974. this.finstlbillslistAccBillByCorpfun()
  975. } else {
  976. if (!this.form.corpId) {
  977. return this.$message.warning('请填写对账单位')
  978. }
  979. console.log('原来的接口')
  980. this.finstlbillslistAccBillV1fun(this.appendType)
  981. }
  982. })
  983. },
  984. quickSearch() {
  985. this.$refs.form.validate((valid) => {
  986. if (!valid) return
  987. // 判断是否有对账单位
  988. if (!this.form.corpId && (this.form.businessNo || this.form.accountNo || this.form.hblno || this.form
  989. .mblno)) {
  990. console.log('新接口')
  991. this.finstlbillslistAccBillByCorpfun()
  992. } else {
  993. if (!this.form.corpId) {
  994. return this.$message.warning('请填写对账单位')
  995. }
  996. console.log('原来的接口')
  997. // this.finstlbillslistAccBillV1fun(this.appendType)
  998. this.$refs.searchPopup.openDialog(this.appendType)
  999. }
  1000. })
  1001. },
  1002. // 检索弹窗数据
  1003. finstlbillslistAccBillByCorpfun() {
  1004. let obj = {}
  1005. obj.type = '2'
  1006. obj.branchId = this.form.branchId
  1007. obj.branchName = this.form.branchName
  1008. obj.curCode = this.form.curCode // 币别
  1009. obj.dc = this.form.dc // 收付 D=收 C=付
  1010. obj.accBillNo = this.form.accountNo // 账单编号 ACCT NO
  1011. obj.billNo = this.form.businessNo // 单据编号 JOB NO
  1012. obj.mblno = this.form.mblno // MB/L NO
  1013. obj.hblno = this.form.hblno // HB/L NO
  1014. obj.queryAmount = this.form.queryAmount // 查询金额
  1015. obj.businessType = this.form.businessTypes ? this.form.businessTypes.join(',') : '' // 业务类型
  1016. obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1017. obj.vesselCnName = this.form.vesselCnName // 中文船名
  1018. obj.receivableAdvance = this.form.receivableAdvance // 预收帐款
  1019. obj.voyageNo = this.form.voyageNo // 航次
  1020. // obj.auditStatus = '0'
  1021. obj.businessDateStart = this.form.businessDateStart // 财务开始日期
  1022. obj.businessDateEnd = this.form.businessDateEnd // 财务结束日期
  1023. finstlbillslistAccBillByCorp(obj).then(res => {
  1024. this.retrievePopupsType = true
  1025. this.retrievePopupsData = res.data.data
  1026. })
  1027. },
  1028. // 检索接口
  1029. finstlbillslistAccBillV1fun(type) {
  1030. let obj = {}
  1031. obj.type = '2'
  1032. obj.branchId = this.form.branchId
  1033. obj.branchName = this.form.branchName
  1034. obj.curCode = this.form.curCode // 币别
  1035. obj.dc = this.form.dc // 收付 D=收 C=付
  1036. obj.accBillNo = this.form.accountNo // 账单编号 ACCT NO
  1037. obj.billNo = this.form.businessNo // 单据编号 JOB NO
  1038. obj.mblno = this.form.mblno // MB/L NO
  1039. obj.hblno = this.form.hblno // HB/L NO
  1040. obj.queryAmount = this.form.queryAmount // 查询金额
  1041. obj.businessType = this.form.businessTypes ? this.form.businessTypes.join(',') : '' // 业务类型
  1042. obj.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1043. obj.vesselCnName = this.form.vesselCnName // 中文船名
  1044. obj.receivableAdvance = this.form.receivableAdvance // 预收帐款
  1045. obj.voyageNo = this.form.voyageNo // 航次
  1046. // obj.auditStatus = '0'
  1047. obj.businessDateStart = this.form.businessDateStart // 财务开始日期
  1048. obj.businessDateEnd = this.form.businessDateEnd // 财务结束日期
  1049. // 判断是否有对账单号
  1050. if (this.form.checkNo) {
  1051. obj.corpId = this.form.corpId // 结算单位
  1052. obj.checkNo = this.form.checkNo // CHK NO 对账单号
  1053. finstlbillsGetByDetail(obj).then(res => {
  1054. let arr = res.data.data.finStlBillsItemsList.map((item) => {
  1055. if (item.curCode == this.getLocalCurrency()) {
  1056. // 发票
  1057. this.$set(item, 'currentInvoiceAmountRMB', item.currentInvoiceAmount)
  1058. // 应结算金额
  1059. this.$set(item, 'amountRMB', item.amount)
  1060. // 已结算金额
  1061. this.$set(item, 'stlTtlAmountRMB', item.stlTtlAmount)
  1062. // 本次金额
  1063. this.$set(item, 'currentStlAmountRMB', item.appliedCurrentStlAmount)
  1064. } else {
  1065. // 发票
  1066. this.$set(item, 'currentInvoiceAmountUSD', item.currentInvoiceAmount)
  1067. // 应结算金额
  1068. this.$set(item, 'amountUSD', item.amount)
  1069. // 已结算金额
  1070. this.$set(item, 'stlTtlAmountUSD', item.stlTtlAmount)
  1071. // 本次金额
  1072. this.$set(item, 'currentStlAmountUSD', item.appliedCurrentStlAmount)
  1073. }
  1074. delete item.id
  1075. return item
  1076. })
  1077. if (type == '追加') {
  1078. let a = [...this.tableData, ...arr,]
  1079. this.tableData = a.filter((obj, index) => {
  1080. return a.findIndex((elem) => {
  1081. return elem.accBillNo === obj.accBillNo
  1082. }) === index;
  1083. });
  1084. } else {
  1085. // 获取有id 的数据
  1086. const itemsWithId = this.tableData.filter(item => item.hasOwnProperty('id'));
  1087. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  1088. // 有id 的处理
  1089. if (itemsWithId.length != 0) {
  1090. finstlbillsitemsRemove(arrIds.join(',')).then(res => {
  1091. this.$message.success('操作成功')
  1092. })
  1093. }
  1094. if (arr.length == 0) {
  1095. this.$message.warning('当前检索暂无数据!')
  1096. }
  1097. this.tableData = arr
  1098. }
  1099. })
  1100. } else {
  1101. obj.corpCnName = this.form.corpId // 结算单位
  1102. obj.checkBillNo = this.form.checkNo // CHK NO 对账单号
  1103. finstlbillslistAccBillV1(obj).then(res => {
  1104. let arr = res.data.data.map((item, index) => {
  1105. item.accBillId = item.id
  1106. delete item.id
  1107. // 账单编号
  1108. item.accBillNo = item.billNo
  1109. item.currentStlCurCode = item.curCode // 币别
  1110. item.currentStlExrate = item.exrate // 汇率
  1111. // quantity
  1112. // quantityCntrTypesDescr
  1113. item.lineNo = Number(index) + 1
  1114. item.pType = item.businessType
  1115. item.billNo = item.businessBillDivideNo ? item.businessBillDivideNo : item
  1116. .businessBillNo
  1117. item.accDate = item.billDate
  1118. item.dc = item.accountDc // 收付
  1119. if (item.curCode == this.getLocalCurrency()) {
  1120. // 发票
  1121. this.$set(item, 'currentInvoiceAmountRMB', item.currentInvoiceAmount)
  1122. // 应结算金额
  1123. this.$set(item, 'amountRMB', item.amount)
  1124. // 已结算金额
  1125. this.$set(item, 'stlTtlAmountRMB', item.stlTtlAmount)
  1126. // 本次金额
  1127. this.$set(item, 'currentStlAmountRMB', item.appliedCurrentStlAmount)
  1128. } else {
  1129. // 发票
  1130. this.$set(item, 'currentInvoiceAmountUSD', item.currentInvoiceAmount)
  1131. // 应结算金额
  1132. this.$set(item, 'amountUSD', item.amount)
  1133. // 已结算金额
  1134. this.$set(item, 'stlTtlAmountUSD', item.stlTtlAmount)
  1135. // 本次金额
  1136. this.$set(item, 'currentStlAmountUSD', item.appliedCurrentStlAmount)
  1137. }
  1138. return item
  1139. })
  1140. if (type == '追加') {
  1141. let a = [...this.tableData, ...arr]
  1142. this.tableData = a.filter((obj, index) => {
  1143. return a.findIndex((elem) => {
  1144. return elem.accBillNo === obj.accBillNo
  1145. }) === index;
  1146. });
  1147. } else {
  1148. // 获取有id 的数据
  1149. const itemsWithId = this.tableData.filter(item => item.hasOwnProperty('id'));
  1150. let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
  1151. // 有id 的处理
  1152. if (itemsWithId.length != 0) {
  1153. finstlbillsitemsRemove(arrIds.join(',')).then(res => {
  1154. this.$message.success('操作成功')
  1155. })
  1156. }
  1157. if (arr.length == 0) {
  1158. this.$message.warning('当前检索暂无数据!')
  1159. }
  1160. this.tableData = arr
  1161. }
  1162. })
  1163. }
  1164. },
  1165. // 结算确认
  1166. settlementApprovefun() {
  1167. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(',') : '' // 业务类型
  1168. this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart.slice(0, 10) +
  1169. ' 00:00:00' : null // 财务开始日期
  1170. this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0, 10) +
  1171. ' 00:00:00' : null // 财务开始日期
  1172. this.form.estimatedTime = this.form.estimatedTime ? this.form.estimatedTime.slice(0, 10) + ' 00:00:00' :
  1173. null
  1174. this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + ' 00:00:00' : null
  1175. this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) +
  1176. ' 00:00:00' : null
  1177. this.form.url = '/iosBasicData/PaymentApplication/index',
  1178. this.form.pageStatus = "this.$store.getters.paidapplication"
  1179. this.form.pageLabel = "付费申请(F)"
  1180. this.pageLoading = true
  1181. settlementApprove(this.form).then(res => {
  1182. this.$message.success('操作成功');
  1183. this.editSave = true
  1184. this.finstlbillsDetailfun(this.form.id)
  1185. }).finally(() => {
  1186. this.pageLoading = false
  1187. this.saveLoading = false
  1188. }).catch(() => {
  1189. this.saveLoading = false
  1190. this.finstlbillsDetailfun(this.form.id)
  1191. })
  1192. },
  1193. // 结算撤销
  1194. revokeSettlementApprovefun() {
  1195. this.$confirm("确定进行撤销申请操作?", {
  1196. confirmButtonText: "确定",
  1197. cancelButtonText: "取消",
  1198. type: "warning"
  1199. }).then(() => {
  1200. this.form.businessTypes = this.form.businessTypes ? this.form.businessTypes.join(',') :
  1201. '' // 业务类型
  1202. this.form.feeCnName = this.form.feeCnName ? this.form.feeCnName.join(',') : ''
  1203. this.form.businessDateStart = this.form.businessDateStart ? this.form.businessDateStart
  1204. .slice(0, 10) + ' 00:00:00' : null // 财务开始日期
  1205. this.form.businessDateEnd = this.form.businessDateEnd ? this.form.businessDateEnd.slice(0,
  1206. 10) + ' 00:00:00' : null // 财务开始日期
  1207. this.form.estimatedTime = this.form.estimatedTime ? this.form.estimatedTime.slice(0, 10) +
  1208. ' 00:00:00' : null
  1209. this.form.billDate = this.form.billDate ? this.form.billDate.slice(0, 10) + ' 00:00:00' :
  1210. null
  1211. this.form.auditDateTo = this.form.auditDateTo ? this.form.auditDateTo.slice(0, 10) +
  1212. ' 00:00:00' : null
  1213. revokeSettlementApprove(this.form).then(res => {
  1214. this.$message.success('操作成功');
  1215. this.finstlbillsDetailfun(res.data.data.id)
  1216. }).finally(() => {
  1217. this.pageLoading = false
  1218. })
  1219. })
  1220. },
  1221. // 确认选定行
  1222. SelectedRows() {
  1223. this.editCustomer('选定行')
  1224. },
  1225. // 下面表格多选
  1226. handleSelectionChange(list) {
  1227. this.amountSubSum = 0
  1228. this.amountSubUsdSum = 0
  1229. if (list.length) {
  1230. list.forEach(e => {
  1231. this.amountSubSum += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0)
  1232. this.amountSubUsdSum += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0)
  1233. })
  1234. }
  1235. this.handleSelectionData = list
  1236. },
  1237. //返回列表
  1238. backToList() {
  1239. this.$emit('goBack')
  1240. },
  1241. // 请求的接口
  1242. // 获取币别数据
  1243. // 获取币别数据
  1244. async getRateListfun(cnName) {
  1245. await this.checkRate(null, null, null, 2)
  1246. this.curCodeData = this.getCheckRate()
  1247. // getRateList({ current: 1, size: 10, cnName }).then(res => {
  1248. // this.curCodeData = res.data.data.records
  1249. // })
  1250. },
  1251. // 获取结算单位数据
  1252. corpBcorpsListfun(cnName) {
  1253. getBcorpslistByType(1, 10, {
  1254. cnName
  1255. }).then(res => {
  1256. this.corpData = res.data.data.records
  1257. })
  1258. },
  1259. // 获取银行数据
  1260. bcorpsbankListfun() {
  1261. bcorpsbankList(1, 50, {
  1262. pid: this.form.corpId
  1263. }).then(res => {
  1264. this.bankData = res.data.data.records.map(item => {
  1265. item.accountBankNo = item.accountBank + ' - ' + item.accountNo
  1266. return item
  1267. })
  1268. // 如果没有 id 就表示没有保存,赋值第一项数据
  1269. if (!this.form.id && this.bankData.length > 0) {
  1270. this.$set(this.form, 'bankId', this.bankData[0].id)
  1271. this.$set(this.form, 'bankAccountName', this.bankData[0].accountName)
  1272. this.$set(this.form, 'bankAccountBank', this.bankData[0].accountBank)
  1273. this.$set(this.form, 'bankAccountNo', this.bankData[0].accountNo)
  1274. }
  1275. })
  1276. },
  1277. // 船名
  1278. vesselBvesselsListfun(cnName) {
  1279. getBvesselsList(1, 10, {
  1280. cnName
  1281. }).then(res => {
  1282. this.vesselData = res.data.data.records
  1283. })
  1284. },
  1285. // 预览报表
  1286. handleReportPreview(url, data) {
  1287. console.log(url, 1670)
  1288. console.log(data, 1671)
  1289. Stimulsoft.Base.StiLicense.key =
  1290. '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
  1291. // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
  1292. Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile(
  1293. '/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
  1294. Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile(
  1295. '/reports/stimulsoft/Localization/zh-CHS.xml')
  1296. // 工具栏
  1297. var options = new Stimulsoft.Viewer.StiViewerOptions()
  1298. options.height = '100%'
  1299. options.appearance.scrollbarsMode = true // 滚动条模式
  1300. options.toolbar.showDesignButton = false // 显示设计按钮
  1301. options.toolbar.showAboutButton = false // 显示关于按钮
  1302. options.toolbar.showResourcesButton = false // 显示资源按钮
  1303. options.toolbar.showFullScreenButton = false // 显示全屏按钮
  1304. options.toolbar.showOpenButton = false // 显示打开按钮
  1305. options.appearance.showTooltips = false // 显示工具提示
  1306. options.appearance.showDialogsHelp = false // 显示对话框帮助
  1307. options.exports.showExportToDocument = false // 显示导出到文档
  1308. options.toolbar.showParametersButton = true // 显示参数按钮
  1309. options.appearance.bookmarksPrint = true // 书签打印
  1310. // options.toolbar.showPrintButton = false // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
  1311. // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
  1312. // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
  1313. // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
  1314. options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
  1315. // htmlRenderMode html渲染模式
  1316. options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
  1317. // 是创建一个 Stimulsoft 报表查看器的实例的代码
  1318. let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
  1319. // 报表
  1320. console.log("创建一个报表实例");
  1321. console.log()
  1322. let report = new window.Stimulsoft.Report.StiReport();
  1323. // 加载文件
  1324. console.log("从url加载报表");
  1325. // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
  1326. report.load(url)
  1327. data.pageOne = 'Page : 1 of 1'
  1328. // 处理超长数据
  1329. if (data.hshipperDetails) {
  1330. var consignerIndex2 = data.hshipperDetails.indexOf('\n')
  1331. for (let i = 0; i < 4; i++) {
  1332. consignerIndex2 = data.hshipperDetails.indexOf('\n', consignerIndex2 + 1);
  1333. }
  1334. if (consignerIndex2 != -1) {
  1335. var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails
  1336. .length)
  1337. data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + ' *'
  1338. data.commodityDescr += '\n*' + hshipperDetails
  1339. }
  1340. }
  1341. if (data.hconsigneeDetails) {
  1342. var consigneeIndex2 = data.hconsigneeDetails.indexOf('\n')
  1343. for (let i = 0; i < 3; i++) {
  1344. consigneeIndex2 = data.hconsigneeDetails.indexOf('\n', consigneeIndex2 + 1);
  1345. }
  1346. if (consigneeIndex2 != -1) {
  1347. var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data
  1348. .hconsigneeDetails.length)
  1349. data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + ' **'
  1350. data.commodityDescr += '\n**' + hconsigneeDetails
  1351. }
  1352. }
  1353. if (data.hnotifyDetails) {
  1354. var notifierIndex2 = data.hnotifyDetails.indexOf('\n')
  1355. for (let i = 0; i < 3; i++) {
  1356. notifierIndex2 = data.hnotifyDetails.indexOf('\n', notifierIndex2 + 1);
  1357. }
  1358. if (notifierIndex2 != -1) {
  1359. var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails
  1360. .length)
  1361. data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + ' ***'
  1362. data.commodityDescr += '\n***' + hnotifyDetails
  1363. }
  1364. }
  1365. // 处理箱号
  1366. if (this.isPrintTheBoxNumber) {
  1367. data.commodityDescr += '\n.\n.\n'
  1368. }
  1369. // PLACE & DATE OF ISSUE
  1370. data.placeAndDateOfIssue = ''
  1371. if (data.issueAt) {
  1372. data.placeAndDateOfIssue += data.issueAt
  1373. }
  1374. if (data.issueDate) {
  1375. let date = new Date(data.issueDate.replace(/-/g, '/'));
  1376. let yyyy = date.getFullYear();
  1377. let mmmm = date.toDateString().split(" ")[1]
  1378. let dd = date.getDate()
  1379. data.placeAndDateOfIssue += ', ' + dd + '-' + mmmm + '-' + yyyy
  1380. }
  1381. // Total number of containers or packages received by the Carriers
  1382. if (data.preContainersList) {
  1383. let boxMap = new Map();
  1384. for (let boxQuantity of data.preContainersList) {
  1385. if (boxMap.get(boxQuantity.cntrTypeCode)) {
  1386. let v = boxMap.get(boxQuantity.cntrTypeCode)
  1387. boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity)
  1388. } else {
  1389. boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity)
  1390. }
  1391. }
  1392. let boxs = ''
  1393. boxMap.forEach(function (value, key, map) {
  1394. boxs += value + 'x' + key + ', '
  1395. })
  1396. boxs = boxs.substring(0, boxs.length - 2)
  1397. data.boxQuantity = boxs + ' CONTAINER(S) ONLY'
  1398. }
  1399. // Number of original B/Ls
  1400. if (data.numberOfObl) {
  1401. data.numberOfObl += ' (' + data.numberOfOblDigit + ')'
  1402. }
  1403. if (data.commodityDescr) {
  1404. var descriptionIndex2 = data.commodityDescr.indexOf('\n')
  1405. for (let i = 0; i < 19; i++) {
  1406. descriptionIndex2 = data.commodityDescr.indexOf('\n', descriptionIndex2 + 1);
  1407. }
  1408. if (descriptionIndex2 != -1) {
  1409. data.pageOne = 'Page : 1 of 2'
  1410. data.pageTwo = 'Page : 2 of 2'
  1411. var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr
  1412. .length)
  1413. data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2)
  1414. data.extraLongTips = '** TO BE CONTINUED ON ATTACHED LIST **'
  1415. data.extraLongText = extraLongText
  1416. }
  1417. }
  1418. // console.log(data.hshipperDetails, 'hshipperDetails2')
  1419. // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
  1420. var dataSet = new Stimulsoft.System.Data.DataSet(
  1421. 'reportData'
  1422. )
  1423. dataSet.readJson(data) // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
  1424. // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
  1425. // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
  1426. report.regData('reportData', 'reportData', dataSet)
  1427. // 从模版和数据加载报表
  1428. // loadReport(report, '', {})
  1429. // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
  1430. viewer.report = report;
  1431. this.$refs.reportContainer.showContainer(
  1432. () => {
  1433. setTimeout(() => {
  1434. viewer.renderHtml('reportContainer')
  1435. this.createViewerButtons(viewer)
  1436. }, 50)
  1437. },
  1438. () => { },
  1439. )
  1440. console.log("加载成功完成!");
  1441. },
  1442. createViewerButtons(viewer) {
  1443. viewer.jsObject.collections.images['myClose.png'] =
  1444. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
  1445. const closeBtn = viewer.jsObject.SmallButton(
  1446. 'closeBtn',
  1447. '关闭',
  1448. 'myClose.png'
  1449. )
  1450. // 增加打印弹窗配置
  1451. const printBtn = viewer.jsObject.SmallButton(
  1452. 'printBtn',
  1453. '打印报表',
  1454. 'myClose.png'
  1455. )
  1456. // console.log(viewer.jsObject.print(),'1013')
  1457. // 获取 关闭按钮的dom元素位置
  1458. const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
  1459. const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
  1460. const userButtonCell = buttonsTable.rows[0].insertCell(0)
  1461. // 获取打印按钮的位置
  1462. const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild // 打印按钮
  1463. const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0] // 打印按钮dom位置
  1464. userButtonPrint.addEventListener("click", (event) => {
  1465. console.log("打印点击");
  1466. // event.preventDefault()
  1467. });
  1468. userButtonPrint.addEventListener("mouseover", (event) => {
  1469. console.log("移入打印按钮");
  1470. console.log(event, 1035)
  1471. });
  1472. userButtonCell.className = 'stiJsViewerClearAllStyles'
  1473. userButtonCell.appendChild(closeBtn) // 添加关闭节点
  1474. // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
  1475. let that = this
  1476. // 关闭按钮的监听点击
  1477. closeBtn.action = function () {
  1478. console.log(that.$refs.ReportContainer, '1022')
  1479. if (that.$refs.reportContainer)
  1480. that.$refs.reportContainer.hideContainer()
  1481. }
  1482. // // // 打印按钮监听
  1483. // printBtn.action = (e)=>{
  1484. // console.log('打印')
  1485. // window.print()
  1486. // }
  1487. },
  1488. }
  1489. }
  1490. </script>
  1491. <style scoped>
  1492. ::v-deep .el-form-item__error {
  1493. display: none;
  1494. }
  1495. ::v-deep.el-form-item {
  1496. margin-bottom: 0;
  1497. }
  1498. .bottomFlex {
  1499. display: flex;
  1500. align-items: center;
  1501. }
  1502. .weightfont {
  1503. font-size: 20px;
  1504. font-weight: bold;
  1505. }
  1506. .weightnum {
  1507. font-size: 18px;
  1508. font-weight: 500;
  1509. }
  1510. /deep/.el-dialog .el-dialog__body {
  1511. padding: 0px 20px;
  1512. }
  1513. </style>