detailsPage.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  1. <template>
  2. <div>
  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" @click="goBack()">返回列表 </el-button>
  6. <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
  7. <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">下一票</el-button>
  8. </div>
  9. <div class="customer-title">{{ form.operatingType }}</div>
  10. <div class="add-customer-btn">
  11. <el-button size="small" :disabled="!form.id" @click="$refs.print.openDialog()">预 览 </el-button>
  12. <el-button v-if="roleName.includes('admin')" size="small" :disabled="!form.id" @click="$refs.report.openDialog()">报表设计 </el-button>
  13. <el-button v-if="form.operatingType == '付费申请'" size="small" type="success" @click="allClick('查看指示')">查看指示</el-button>
  14. <el-button type="success" size="small" v-if="form.operatingType == '销账'" @click="allClick('预付款')">预付款</el-button>
  15. <el-button size="small" type="danger" plain :disabled="editButton" v-if="form.status == 3" @click="allClick('撤销完成')">撤销完成 </el-button>
  16. <el-button
  17. size="small"
  18. type="success"
  19. plain
  20. :disabled="editButton"
  21. v-if="form.operatingStatus == 3 && form.status == 2"
  22. @click="allClick('确认完成')"
  23. >确认完成
  24. </el-button>
  25. <el-button
  26. v-if="form.operatingStatus == 1 || form.operatingStatus == 2 || form.operatingStatus == 3"
  27. size="small"
  28. type="danger"
  29. plain
  30. :disabled="editButton || form.status == 3"
  31. @click="allClick('撤销操作')"
  32. >撤销操作
  33. </el-button>
  34. <el-dropdown v-if="form.operatingStatus == 0" trigger="click" @command="moreClick">
  35. <el-button type="success" size="small" style="margin: 0 8px" :disabled="editButton || form.status == 3"
  36. >更多操作<i class="el-icon-arrow-down el-icon--right"></i>
  37. </el-button>
  38. <el-dropdown-menu slot="dropdown">
  39. <el-dropdown-item v-if="form.dc == 'C'" command="付费申请">付费申请</el-dropdown-item>
  40. <el-dropdown-item v-if="!roleName.includes('财务') && isOffsetting" command="收付相抵">收付相抵</el-dropdown-item>
  41. <el-dropdown-item v-if="!roleName.includes('财务') && isWriteOff" command="挂账销账">挂账销账</el-dropdown-item>
  42. <el-dropdown-item v-if="isApplication" command="发票申请">发票申请</el-dropdown-item>
  43. </el-dropdown-menu>
  44. </el-dropdown>
  45. <el-button class="el-button--small-yh" type="primary" size="small" v-if="editButton" @click="inEdit">编 辑 </el-button>
  46. <el-button v-else class="el-button--small-yh" type="primary" size="small" :disabled="editButton || form.status == 3" @click="submit"
  47. >保 存
  48. </el-button>
  49. </div>
  50. </div>
  51. <div style="margin-top: 50px">
  52. <el-card class="box-card">
  53. <avue-form :option="optionForm" v-model="form" ref="avueForm">
  54. <tempalte slot="corpCnName">
  55. <dic-select
  56. v-model="form.corpCnName"
  57. placeholder="对账单位"
  58. label="cnName"
  59. res="records"
  60. url="/blade-los/bcorps/listByType?current=1&size=10"
  61. :filterable="true"
  62. :remote="true"
  63. dataName="cnName"
  64. @selectChange="dicChange('corpCnName', $event)"
  65. :disabled="editDisabled || form.finStlBillsItemsList.length"
  66. :slotRight="true"
  67. rightLabel="shortName"
  68. ></dic-select>
  69. </tempalte>
  70. <tempalte slot="corpIsSigned">
  71. <div style="display: flex">
  72. <el-checkbox :true-label="1" :false-label="0" size="small" v-model="form.corpIsSigned" disabled>已签约 </el-checkbox>
  73. <el-input v-model="form.isSignedPersonName" placeholder="请输入 签约人" size="small" disabled></el-input>
  74. </div>
  75. </tempalte>
  76. </avue-form>
  77. <avue-form v-show="show" class="form2" :option="optionForm2" v-model="form" ref="avueForm2">
  78. <tempalte slot="dc">
  79. <el-select v-model="form.dc" placeholder="请选择 收付" :disabled="editDisabled || form.finStlBillsItemsList.length">
  80. <el-option v-for="item in dcOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
  81. </el-select>
  82. </tempalte>
  83. <tempalte slot="operatorName">
  84. <dic-select
  85. v-model="form.operatorName"
  86. placeholder="操作员"
  87. label="name"
  88. res="records"
  89. url="/blade-user/page?current=1&size=10"
  90. :filterable="true"
  91. :remote="true"
  92. dataName="account"
  93. @selectChange="dicChange('operatorName', $event)"
  94. :disabled="editDisabled"
  95. ></dic-select>
  96. </tempalte>
  97. <tempalte slot="srcCnName">
  98. <dic-select
  99. v-model="form.srcCnName"
  100. placeholder="业务员"
  101. label="cname"
  102. res="records"
  103. url="/blade-los/bstaffinformation/list?current=1&size=10&positionType=业务员&status=0&whetherEmployedOrNot=1"
  104. :filterable="true"
  105. :remote="true"
  106. dataName="cname"
  107. @selectChange="dicChange('srcCnName', $event)"
  108. :disabled="editDisabled"
  109. ></dic-select>
  110. </tempalte>
  111. <tempalte slot="businessDate">
  112. <date-range
  113. :start-date.sync="form.businessDateStart"
  114. :end-date.sync="form.businessDateEnd"
  115. :defaultTime="['00:00:00', '00:00:00']"
  116. :disabled="editDisabled"
  117. ></date-range>
  118. </tempalte>
  119. <tempalte slot="auditDate">
  120. <date-range
  121. :start-date.sync="form.auditDateFrom"
  122. :end-date.sync="form.auditDateTo"
  123. :defaultTime="['00:00:00', '00:00:00']"
  124. :disabled="editDisabled"
  125. ></date-range>
  126. </tempalte>
  127. <tempalte slot="signForDate">
  128. <date-range
  129. :start-date.sync="form.signForDateStart"
  130. :end-date.sync="form.signForDateEnd"
  131. :defaultTime="['00:00:00', '00:00:00']"
  132. :disabled="editDisabled"
  133. ></date-range>
  134. </tempalte>
  135. <tempalte slot="Btn" style="display: flex; justify-content: flex-end">
  136. <el-button type="primary" size="mini" icon="el-icon-search" @click="allClick('检索')" :disabled="editDisabled">检索</el-button>
  137. <el-button size="mini" @click="allClick('重置条件')" :disabled="editDisabled || form.finStlBillsItemsList.length">重置条件</el-button>
  138. </tempalte>
  139. </avue-form>
  140. <div style="display: flex; justify-content: center; font-size: 14px" @click="show = !show" @mouseenter="enter" @mouseleave="leave">
  141. <div v-show="show" style="height: 16px; cursor: pointer">
  142. <span class="el-button--text"><i class="el-icon-caret-top" /><span v-show="showSpan">隐藏</span></span>
  143. </div>
  144. <div v-show="!show" style="height: 16px; cursor: pointer">
  145. <span class="el-button--text"><i class="el-icon-caret-bottom" /><span v-show="showSpan">显示</span></span>
  146. </div>
  147. </div>
  148. </el-card>
  149. <el-tabs style="margin-top: 2px" class="box-tabs" type="border-card" v-model="activeName" @tab-click="handleClick">
  150. <el-tab-pane label="查询结果" name="1">
  151. <query-data ref="queryData" :form="form" :tableData="form.finStlBillsItemsList" @update="update" :disabled="editDisabled"></query-data>
  152. </el-tab-pane>
  153. <el-tab-pane label="选定数据" name="2">
  154. <picked-data ref="pickedData" :form="form" :tableData="form.finStlBillsItemsList" @update="update" :disabled="editButton"></picked-data>
  155. </el-tab-pane>
  156. <el-tab-pane label="开票明细" name="3">
  157. <fininvoiceitemdetail :form="form" :data="form.finInvoiceItemDetailList" @update="update" :disabled="form.operatingStatus != 0">
  158. </fininvoiceitemdetail
  159. ></el-tab-pane>
  160. </el-tabs>
  161. <!--选择数据弹窗-->
  162. <el-dialog title="选择数据" class="el-dialogDeep" :visible.sync="retrievePopupsType" append-to-body width="70%" :close-on-click-modal="false">
  163. <div>
  164. <avue-crud :option="retrievePopupsOption" :data="retrievePopupsData">
  165. <template slot="menu" slot-scope="{ row }">
  166. <el-button type="text" icon="" size="small" @click.stop="retrievePopupsSelect(row)">选择 </el-button>
  167. </template>
  168. </avue-crud>
  169. </div>
  170. </el-dialog>
  171. <cashier-item ref="cashier" @update="update" :disabled="form.operatingType == '付费申请'"></cashier-item>
  172. <advance-payment ref="advance" @apData="apData" :disabled="form.status == 3"></advance-payment>
  173. <fee-info ref="feeInfo"></fee-info>
  174. <business-reports :id="form.id" ref="print" businessValue="DZZX" :type="true"></business-reports>
  175. <reports :id="form.id" :assemblyForm="form" businessValue="DZZX" ref="report"></reports>
  176. </div>
  177. </div>
  178. </template>
  179. <script>
  180. import dicSelect from "@/components/dicSelect/main";
  181. import dateRange from "@/components/dateRange/main.vue";
  182. import queryData from "./components/queryData.vue";
  183. import pickedData from "./components/pickedData.vue";
  184. import cashierItem from "./components/cashierItem.vue";
  185. import fininvoiceitemdetail from "./components/fininvoiceitemdetail.vue";
  186. import advancePayment from "./components/advancePayment.vue";
  187. import { dateFormat } from "@/util/date";
  188. import {
  189. finstlbillsConfirmReconciliation,
  190. finstlbillsDetail,
  191. finstlbillsRevokeReconciliation,
  192. finstlbillsSubmit,
  193. revokeSettlementApprove,
  194. confirmOffset,
  195. revokeOffset,
  196. finInvoicesApprove,
  197. revokeFinInvoicesApprove,
  198. agreementListAll,
  199. finstlbillslistAccBillByCorp,
  200. settlementApprove,
  201. } from "@/api/iosBasicData/finstlbills";
  202. import { confirmWriteOff, revokeWriteOff } from "@/api/iosBasicData/writeOff.js";
  203. import { getListAllDetail } from "@/api/iosBasicData/cashier.js";
  204. import businessReports from "@/components/iosbasic-data/businessReportsTS.vue";
  205. import reports from "@/components/iosbasic-data/reportsTS.vue";
  206. import _ from "lodash";
  207. export default {
  208. name: "detailsPage",
  209. data() {
  210. return {
  211. show: true,
  212. showSpan: false,
  213. editButton: false,
  214. editDisabled: false,
  215. activeName: "1",
  216. form: {
  217. billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00", // 对账日期 默认 当天
  218. isApproved: 2,
  219. isSignfor: 2,
  220. isChecked: 2,
  221. isCleared: 2,
  222. isInvoice: 2,
  223. finStlBillsItemsList: [],
  224. finInvoiceItemDetailList: [],
  225. advancePaymentRecordList: [],
  226. },
  227. optionForm: {
  228. menuBtn: false,
  229. span: 5,
  230. disabled: false,
  231. labelWidth: 70,
  232. column: [
  233. {
  234. label: "对账单号",
  235. prop: "billNo",
  236. placeholder: "系统生成对账单号",
  237. disabled: true,
  238. },
  239. {
  240. label: "对账日期",
  241. prop: "billDate",
  242. type: "date",
  243. format: "yyyy-MM-dd",
  244. valueFormat: "yyyy-MM-dd 00:00:00",
  245. disabled: false,
  246. },
  247. {
  248. label: "限定金额",
  249. prop: "limitedAmount",
  250. disabled: true,
  251. },
  252. {
  253. label: "备注",
  254. prop: "remarks",
  255. disabled: false,
  256. },
  257. {
  258. label: "对账单位",
  259. prop: "corpCnName",
  260. disabled: false,
  261. },
  262. {
  263. label: "简称/编码",
  264. prop: "corpShortName",
  265. disabled: true,
  266. span: 3,
  267. },
  268. {
  269. label: "",
  270. labelWidth: 0,
  271. prop: "corpCode",
  272. disabled: true,
  273. span: 2,
  274. },
  275. {
  276. label: "账期备注",
  277. prop: "corpAccRemarks",
  278. disabled: true,
  279. },
  280. {
  281. label: "",
  282. labelWidth: 0,
  283. prop: "corpIsSigned",
  284. disabled: true,
  285. },
  286. {
  287. label: "预收账款",
  288. prop: "advanceFromCustomers",
  289. disabled: true,
  290. span: 4,
  291. },
  292. ],
  293. },
  294. optionForm2: {
  295. menuBtn: false,
  296. span: 5,
  297. disabled: false,
  298. labelWidth: 70,
  299. column: [
  300. {
  301. label: "收/付",
  302. prop: "dc",
  303. type: "select",
  304. dicData: [
  305. {
  306. label: "收",
  307. value: "D",
  308. },
  309. {
  310. label: "付",
  311. value: "C",
  312. },
  313. ],
  314. disabled: false,
  315. span: 3,
  316. },
  317. {
  318. label: "币别",
  319. labelWidth: 40,
  320. prop: "curCode",
  321. type: "select",
  322. dicUrl: "/api/blade-los/bcurrency/page?current=1&size=10&code={{key}}",
  323. props: {
  324. label: "code",
  325. value: "code",
  326. res: "data.records",
  327. },
  328. disabled: false,
  329. span: 2,
  330. },
  331. {
  332. label: "操作/业务",
  333. prop: "operatorName",
  334. disabled: false,
  335. span: 3,
  336. },
  337. {
  338. label: "",
  339. labelWidth: 0,
  340. prop: "srcCnName",
  341. disabled: false,
  342. span: 2,
  343. },
  344. {
  345. label: "对账号",
  346. prop: "duizhangNo",
  347. disabled: false,
  348. },
  349. {
  350. label: "业务类型",
  351. prop: "businessTypes",
  352. type: "select",
  353. dicData: [
  354. {
  355. label: "海运出口",
  356. value: "SE",
  357. },
  358. {
  359. label: "海运进口",
  360. value: "SI",
  361. },
  362. ],
  363. filterable: true,
  364. multiple: true,
  365. dataType: "string",
  366. tags: true,
  367. disabled: false,
  368. },
  369. {
  370. label: "审核",
  371. prop: "isApproved",
  372. labelWidth: 40,
  373. type: "select",
  374. clearable: false,
  375. dicData: [
  376. {
  377. label: "全部",
  378. value: 2,
  379. },
  380. {
  381. label: "是",
  382. value: 1,
  383. },
  384. {
  385. label: "否",
  386. value: 0,
  387. },
  388. ],
  389. disabled: false,
  390. value: 2,
  391. span: 2,
  392. },
  393. {
  394. label: "发票",
  395. prop: "isInvoice",
  396. labelWidth: 40,
  397. clearable: false,
  398. type: "select",
  399. dicData: [
  400. {
  401. label: "全部",
  402. value: 2,
  403. },
  404. {
  405. label: "是",
  406. value: 1,
  407. },
  408. {
  409. label: "否",
  410. value: 0,
  411. },
  412. ],
  413. disabled: false,
  414. span: 2,
  415. },
  416. {
  417. label: "业务编号",
  418. prop: "businessNo",
  419. disabled: false,
  420. },
  421. {
  422. label: "主单号",
  423. prop: "mblno",
  424. disabled: false,
  425. },
  426. {
  427. label: "分单号",
  428. prop: "hblno",
  429. disabled: false,
  430. },
  431. {
  432. label: "订舱号",
  433. prop: "bookingNumber",
  434. disabled: false,
  435. },
  436. {
  437. label: "对账",
  438. prop: "isChecked",
  439. labelWidth: 40,
  440. clearable: false,
  441. type: "select",
  442. dicData: [
  443. {
  444. label: "全部",
  445. value: 2,
  446. },
  447. {
  448. label: "是",
  449. value: 1,
  450. },
  451. {
  452. label: "否",
  453. value: 0,
  454. },
  455. ],
  456. disabled: false,
  457. span: 2,
  458. },
  459. {
  460. label: "签收",
  461. prop: "isSignfor",
  462. labelWidth: 40,
  463. type: "select",
  464. clearable: false,
  465. dicData: [
  466. {
  467. label: "全部",
  468. value: 2,
  469. },
  470. {
  471. label: "是",
  472. value: 1,
  473. },
  474. {
  475. label: "否",
  476. value: 0,
  477. },
  478. ],
  479. disabled: false,
  480. span: 2,
  481. },
  482. {
  483. label: "ETD期间",
  484. prop: "businessDate", // businessDate只是插槽值 字段为 businessDateStart businessDateEnd
  485. disabled: false,
  486. },
  487. {
  488. label: "审核日期",
  489. prop: "auditDate", //auditDate只是插槽值 字段为 auditDateFrom auditDateTo
  490. disabled: false,
  491. },
  492. {
  493. label: "签收日期",
  494. prop: "signForDate", //signForDate只是插槽值 字段为 signForDateStart signForDateEnd
  495. disabled: false,
  496. },
  497. {
  498. label: "费用名称",
  499. prop: "feeCnName",
  500. type: "select",
  501. dicUrl: "/api/blade-los/bfees/listAll",
  502. props: {
  503. label: "cnName",
  504. value: "cnName",
  505. },
  506. filterable: true,
  507. multiple: true,
  508. dataType: "string",
  509. tags: true,
  510. disabled: false,
  511. },
  512. {
  513. label: "销账",
  514. prop: "isCleared",
  515. labelWidth: 40,
  516. clearable: false,
  517. type: "select",
  518. dicData: [
  519. {
  520. label: "全部",
  521. value: 2,
  522. },
  523. {
  524. label: "是",
  525. value: 1,
  526. },
  527. {
  528. label: "否",
  529. value: 0,
  530. },
  531. ],
  532. disabled: false,
  533. span: 2,
  534. },
  535. {
  536. label: "船名",
  537. prop: "vesselCnName",
  538. disabled: false,
  539. },
  540. {
  541. label: "航次",
  542. prop: "voyageNo",
  543. disabled: false,
  544. },
  545. {
  546. label: "发票号",
  547. prop: "invoiceNo",
  548. disabled: false,
  549. },
  550. {
  551. label: "查询金额",
  552. prop: "checkBalance",
  553. disabled: false,
  554. },
  555. {
  556. label: "",
  557. prop: "Btn",
  558. labelWidth: 0,
  559. span: 4,
  560. },
  561. ],
  562. },
  563. dcOptions: [
  564. {
  565. label: "收",
  566. value: "D",
  567. },
  568. {
  569. label: "付",
  570. value: "C",
  571. },
  572. ],
  573. retrievePopupsType: false, // 弹窗开启关闭
  574. retrievePopupsData: [], // 选择弹窗数据
  575. retrievePopupsOption: {
  576. border: true,
  577. calcHeight: 30,
  578. tip: false,
  579. height: 500,
  580. index: true,
  581. addBtn: false,
  582. viewBtn: false,
  583. delBtn: false,
  584. editBtn: false,
  585. refreshBtn: false,
  586. columnBtn: false,
  587. menuWidth: "60",
  588. column: [
  589. {
  590. label: "客户中文名",
  591. prop: "cnName",
  592. overHidden: true,
  593. },
  594. {
  595. label: "客户英文文名",
  596. prop: "cnEame",
  597. overHidden: true,
  598. },
  599. ],
  600. },
  601. roleName: localStorage.getItem("roleName").split(","),
  602. saberUserInfo: JSON.parse(localStorage.getItem("saber-userInfo")).content, // 当前登录人个人信息
  603. };
  604. },
  605. components: {
  606. dicSelect,
  607. queryData,
  608. pickedData,
  609. dateRange,
  610. cashierItem,
  611. fininvoiceitemdetail,
  612. advancePayment,
  613. businessReports,
  614. reports,
  615. },
  616. props: {
  617. detailData: Object,
  618. pageIds: {
  619. type: Array, // 指定 prop 的类型为 Array
  620. default: () => [], // 提供一个默认值,这里使用函数形式返回一个空数组
  621. },
  622. },
  623. async created() {
  624. if (this.detailData && this.detailData.id) {
  625. this.editButton = true;
  626. this.editDisabled = true;
  627. this.optionForm.disabled = true;
  628. this.optionForm2.disabled = true;
  629. this.getDetail(this.detailData.id);
  630. }
  631. },
  632. methods: {
  633. compareSizes() {
  634. if (this.form.finStlBillsItemsList.length == 0) {
  635. return "不比较";
  636. }
  637. if (this.form.finStlBillsItemsList.length == this.form.finStlBillsItemsList.filter((item) => item.dc == "D").length) {
  638. return "全收";
  639. }
  640. if (this.form.finStlBillsItemsList.length == this.form.finStlBillsItemsList.filter((item) => item.dc == "C").length) {
  641. return "全付";
  642. }
  643. let DSUM = 0;
  644. let CSUM = 0;
  645. for (let item of this.form.finStlBillsItemsList) {
  646. if (item.dc == "D") {
  647. if (item.currentStlCurCode == "CNY") {
  648. DSUM += Number(item.currentStlAmountRMB);
  649. } else {
  650. DSUM += Number(item.currentStlAmountUSD) * item.currentStlExrate;
  651. }
  652. }
  653. if (item.dc == "C") {
  654. if (item.currentStlCurCode == "CNY") {
  655. CSUM += Number(item.currentStlAmountRMB);
  656. } else {
  657. CSUM += Number(item.currentStlAmountUSD) * item.currentStlExrate;
  658. }
  659. }
  660. }
  661. if (DSUM > CSUM) {
  662. return "D";
  663. }
  664. if (DSUM < CSUM) {
  665. return "C";
  666. }
  667. if (DSUM == CSUM) {
  668. return "相等";
  669. }
  670. },
  671. enter() {
  672. this.showSpan = true;
  673. },
  674. leave() {
  675. this.showSpan = false;
  676. },
  677. lastPage() {
  678. if (this.pageIds.length) {
  679. const index = this.pageIds.indexOf(this.form.id);
  680. if (index == 0) {
  681. return this.$message.error("没有上一票了");
  682. }
  683. const lastIndex = index - 1;
  684. this.getDetail(this.pageIds[lastIndex]);
  685. }
  686. },
  687. nextPage() {
  688. if (this.pageIds.length) {
  689. const index = this.pageIds.indexOf(this.form.id);
  690. if (this.pageIds[this.pageIds.length - 1] == this.form.id) {
  691. return this.$message.error("没有下一票了");
  692. }
  693. const nextIndex = index + 1;
  694. this.getDetail(this.pageIds[nextIndex]);
  695. }
  696. },
  697. inEdit() {
  698. this.editButton = false;
  699. //管理员 允许修改他人业务 本人单据可以编辑
  700. if (this.form.status != 3 && this.form.operatingStatus != 3) {
  701. if (this.roleName.includes("admin") || this.roleName.includes("允许修改他人业务") || this.saberUserInfo.user_id == this.form.createUser) {
  702. this.editDisabled = false;
  703. this.optionForm.disabled = false;
  704. this.optionForm2.disabled = false;
  705. }
  706. }
  707. },
  708. moreClick(name) {
  709. if (this.form.finStlBillsItemsList.length == 0) {
  710. return this.$message.error("选定数据不能为空");
  711. }
  712. for (let item of this.form.finStlBillsItemsList) {
  713. if (item.isChecked == 0) {
  714. return this.$message.error("选定数据存在未对账的数据,请维护");
  715. }
  716. if (item.isSignfor == 0) {
  717. return this.$message.error("选定数据存在未签收的数据,请维护");
  718. }
  719. }
  720. let obj = {
  721. ...this.form,
  722. billNoFormat: "HYDZ",
  723. businessTypeCode: "HYDZ",
  724. businessType: "CHK",
  725. url: "/iosBasicData/financialManagement/finstlbills/index",
  726. pageLabel: "对账中心(J)",
  727. };
  728. if (name == "付费申请") {
  729. if (this.form.finStlBillsItemsList.filter((item) => item.dc == "C").length == 0) {
  730. return this.$message.error("费用明细没有付费数据");
  731. }
  732. this.$refs.cashier.openDialog(this.form, this.form.finStlBillsItemsList, "auto");
  733. // const loading = this.$loading({
  734. // lock: true,
  735. // text: "加载中",
  736. // spinner: "el-icon-loading",
  737. // background: "rgba(255,255,255,0.7)"
  738. // });
  739. // settlementApprove(obj)
  740. // .then(res => {
  741. // this.$message.success("操作成功");
  742. // this.getDetail(this.form.id);
  743. // })
  744. // .finally(() => {
  745. // loading.close();
  746. // });
  747. }
  748. if (name == "收付相抵") {
  749. const loading = this.$loading({
  750. lock: true,
  751. text: "加载中",
  752. spinner: "el-icon-loading",
  753. background: "rgba(255,255,255,0.7)",
  754. });
  755. confirmOffset(obj)
  756. .then((res) => {
  757. this.$message.success("操作成功");
  758. this.getDetail(this.form.id);
  759. })
  760. .finally(() => {
  761. loading.close();
  762. });
  763. }
  764. if (name == "挂账销账") {
  765. this.$refs.advance.openDialog(this.form);
  766. }
  767. if (name == "发票申请") {
  768. if (this.form.finInvoiceItemDetailList.length == 0) {
  769. return this.$message.error("开票明细不能为空");
  770. }
  771. for (let item of this.form.finInvoiceItemDetailList) {
  772. if (!item.invoiceCompanyId) {
  773. return this.$message.error("发票抬头不能为空");
  774. }
  775. if (!item.curCode) {
  776. return this.$message.error("币别不能为空");
  777. }
  778. if (!Number(item.exrate)) {
  779. return this.$message.error("汇率不能为空或0");
  780. }
  781. if (Number(item.price ? item.price : 0) <= 0) {
  782. return this.$message.error("单价不能为非正数");
  783. }
  784. }
  785. const loading = this.$loading({
  786. lock: true,
  787. text: "加载中",
  788. spinner: "el-icon-loading",
  789. background: "rgba(255,255,255,0.7)",
  790. });
  791. finInvoicesApprove(obj)
  792. .then((res) => {
  793. this.$message.success("操作成功");
  794. this.getDetail(this.form.id);
  795. })
  796. .finally(() => {
  797. loading.close();
  798. });
  799. }
  800. },
  801. dicChange(name, row) {
  802. if (name == "corpCnName") {
  803. if (row) {
  804. this.form.corpId = row.id;
  805. this.form.corpEnName = row.enName;
  806. this.form.corpCode = row.code;
  807. this.form.corpShortName = row.shortName;
  808. this.form.corpArgreementNo = row.enName;
  809. this.form.limitedAmount = null;
  810. this.form.corpAccRemarks = null;
  811. this.form.corpIsSigned = 0;
  812. this.form.isSignedPersonId = null;
  813. this.form.isSignedPersonName = null;
  814. let obj = {
  815. corpId: row.id,
  816. validDate: dateFormat(new Date(), "yyyy-MM-dd"),
  817. };
  818. agreementListAll(obj).then((res) => {
  819. if (res.data.data.length) {
  820. let obj = res.data.data[0];
  821. let USDTEXT = obj.amountUsd ? "USD:" + Number(obj.amountUsd) : "";
  822. let CNYTEXT = obj.amountCny ? "RMB:" + Number(obj.amountCny) : "";
  823. //USD有值是 中间要加空格
  824. this.form.limitedAmount = (USDTEXT ? USDTEXT + " " : "") + CNYTEXT;
  825. this.form.corpAccRemarks = obj.accountPeriodRemarks;
  826. this.form.corpIsSigned = 1;
  827. this.form.isSignedPersonId = obj.createUser;
  828. this.form.isSignedPersonName = obj.createUserName;
  829. }
  830. });
  831. } else {
  832. this.form.corpId = null;
  833. this.form.corpCode = null;
  834. this.form.corpShortName = null;
  835. this.form.corpEnName = null;
  836. this.form.corpCnName = null;
  837. this.form.corpArgreementNo = null;
  838. this.form.limitedAmount = null;
  839. this.form.corpAccRemarks = null;
  840. this.form.corpIsSigned = 0;
  841. this.form.isSignedPersonId = null;
  842. this.form.isSignedPersonName = null;
  843. }
  844. }
  845. if (name == "operatorName") {
  846. if (row) {
  847. this.form.operatorId = row.id;
  848. } else {
  849. this.form.operatorId = null;
  850. this.form.operatorName = null;
  851. }
  852. }
  853. if (name == "srcCnName") {
  854. if (row) {
  855. this.form.srcId = row.id;
  856. this.form.srcEnName = row.ename;
  857. } else {
  858. this.form.srcId = null;
  859. this.form.srcCnName = null;
  860. this.form.srcEnName = null;
  861. }
  862. }
  863. },
  864. async allClick(name) {
  865. if (name == "预付款") {
  866. this.$refs.advance.openDialog(this.form);
  867. }
  868. if (name == "检索") {
  869. if (this.form.duizhangNo) {
  870. this.activeName = "2";
  871. //查对账号
  872. this.$refs.pickedData.search(name);
  873. } else {
  874. this.activeName = "1";
  875. //直接检索
  876. this.$refs.queryData.search(name);
  877. }
  878. }
  879. if (name == "重置条件") {
  880. let obj = {
  881. ...this.$options.data().form,
  882. id: this.form.id,
  883. version: this.form.version,
  884. tenantId: this.form.tenantId,
  885. branchId: this.form.branchId,
  886. createUser: this.form.createUser,
  887. createUserName: this.form.createUserName,
  888. createTime: this.form.createTime,
  889. updateUser: this.form.updateUser,
  890. updateUserName: this.form.updateUserName,
  891. updateTime: this.form.updateTime,
  892. billNo: this.form.billNo,
  893. };
  894. await this.$refs.avueForm.resetForm();
  895. await this.$refs.avueForm2.resetForm();
  896. this.form = obj;
  897. }
  898. if (name == "查看指示") {
  899. this.$refs.cashier.openDialog(this.form, this.form.finStlBillsItemsList, "view");
  900. }
  901. if (name == "确认完成") {
  902. if (this.form.finStlBillsItemsList.length == 0) {
  903. return this.$message.error("选定数据不能为空");
  904. }
  905. if (this.form.operatingType == "付费申请") {
  906. getListAllDetail({ srcId: this.form.id }).then((res) => {
  907. if (
  908. Number(this.form.amountSub) != Number(this.form.actualAmountCr) ||
  909. Number(this.form.amountSubUsd) != Number(this.form.actualAmountCrUsd)
  910. ) {
  911. this.$confirm("对账金额与实际支付金额不相等,是否确认对账?", {
  912. confirmButtonText: "确定",
  913. cancelButtonText: "取消",
  914. type: "warning",
  915. }).then(() => {
  916. this.confirm();
  917. });
  918. } else {
  919. this.$confirm("确定进行确认完成操作?", {
  920. confirmButtonText: "确定",
  921. cancelButtonText: "取消",
  922. type: "warning",
  923. }).then(() => {
  924. this.confirm();
  925. });
  926. }
  927. });
  928. }
  929. if (this.form.operatingType != "付费申请") {
  930. this.$confirm("确定进行确认完成操作?", {
  931. confirmButtonText: "确定",
  932. cancelButtonText: "取消",
  933. type: "warning",
  934. }).then(() => {
  935. this.confirm();
  936. });
  937. }
  938. }
  939. if (name == "撤销完成") {
  940. this.$confirm("确定进行撤销对账操作?", {
  941. confirmButtonText: "确定",
  942. cancelButtonText: "取消",
  943. type: "warning",
  944. }).then(() => {
  945. let obj = {
  946. ...this.form,
  947. billNoFormat: "HYDZ",
  948. businessTypeCode: "HYDZ",
  949. businessType: "CHK",
  950. };
  951. const loading = this.$loading({
  952. lock: true,
  953. text: "加载中",
  954. spinner: "el-icon-loading",
  955. background: "rgba(255,255,255,0.7)",
  956. });
  957. finstlbillsRevokeReconciliation(obj)
  958. .then((res) => {
  959. this.$message.success("操作成功");
  960. this.editButton = true;
  961. this.getDetail(this.form.id);
  962. })
  963. .finally(() => {
  964. loading.close();
  965. });
  966. });
  967. }
  968. if (name == "撤销操作") {
  969. this.$confirm("确定进行撤销申请操作?", {
  970. confirmButtonText: "确定",
  971. cancelButtonText: "取消",
  972. type: "warning",
  973. }).then(() => {
  974. let obj = {
  975. ...this.form,
  976. billNoFormat: "HYDZ",
  977. businessTypeCode: "HYDZ",
  978. businessType: "CHK",
  979. };
  980. if (this.form.operatingType == "付费申请") {
  981. const loading = this.$loading({
  982. lock: true,
  983. text: "加载中",
  984. spinner: "el-icon-loading",
  985. background: "rgba(255,255,255,0.7)",
  986. });
  987. revokeSettlementApprove(obj)
  988. .then((res) => {
  989. this.$message.success("操作成功");
  990. this.editButton = true;
  991. this.getDetail(this.form.id);
  992. })
  993. .finally(() => {
  994. loading.close();
  995. });
  996. }
  997. if (this.form.operatingType == "收付相抵") {
  998. const loading = this.$loading({
  999. lock: true,
  1000. text: "加载中",
  1001. spinner: "el-icon-loading",
  1002. background: "rgba(255,255,255,0.7)",
  1003. });
  1004. revokeOffset(obj)
  1005. .then((res) => {
  1006. this.$message.success("操作成功");
  1007. this.getDetail(this.form.id);
  1008. })
  1009. .finally(() => {
  1010. loading.close();
  1011. });
  1012. }
  1013. if (this.form.operatingType == "销账") {
  1014. const loading = this.$loading({
  1015. lock: true,
  1016. text: "加载中",
  1017. spinner: "el-icon-loading",
  1018. background: "rgba(255,255,255,0.7)",
  1019. });
  1020. revokeWriteOff(obj)
  1021. .then((res) => {
  1022. this.$message.success("操作成功");
  1023. this.getDetail(this.form.id);
  1024. })
  1025. .finally(() => {
  1026. loading.close();
  1027. });
  1028. }
  1029. if (this.form.operatingType == "发票申请") {
  1030. const loading = this.$loading({
  1031. lock: true,
  1032. text: "加载中",
  1033. spinner: "el-icon-loading",
  1034. background: "rgba(255,255,255,0.7)",
  1035. });
  1036. revokeFinInvoicesApprove(obj)
  1037. .then((res) => {
  1038. this.$message.success("操作成功");
  1039. this.getDetail(this.form.id);
  1040. })
  1041. .finally(() => {
  1042. loading.close();
  1043. });
  1044. }
  1045. });
  1046. }
  1047. },
  1048. otherSearch() {
  1049. let obj = {
  1050. type: 1,
  1051. isReview: this.form.isApproved, // 审核状态
  1052. isSignfor: this.form.isSignfor, // 是否已签收(0 否 1是)
  1053. dc: this.form.dc, // 收付 D=收 C=付
  1054. curCode: this.form.curCode, // 币别
  1055. srcId: this.form.srcId, // 业务员id
  1056. isCleared: this.form.isCleared, // 是否销账(0 未销账 3 部分销账 9 销账)
  1057. // accBillNo: this.form.accountNo, // 账单编号 ACCT NO
  1058. billNo: this.form.businessNo, // 单据编号 JOB NO
  1059. mblno: this.form.mblno, // 主单号
  1060. hblno: this.form.hblno, // 分单号
  1061. isChecked: this.form.isChecked, // 是否对账(0 未对账 1 已对账)
  1062. queryAmount: this.form.queryAmount, // 查询金额
  1063. businessType: this.form.businessTypes, // 业务类型
  1064. invoiceStatus: this.form.isInvoice, // 发票状态 0 = 未开 9=已开 2 待开 3 不开
  1065. vesselCnName: this.form.vesselCnName, // 中文船名
  1066. invoiceNo: this.form.invoiceNo, // 发票号
  1067. bookingNo: this.form.bookingNo, // 订舱号 BKNO
  1068. createUserName: this.form.updateUser ? this.form.updateUser : "", // 操作员id
  1069. voyageNo: this.form.voyageNo, // 航次
  1070. businessDateStart: this.form.businessDateStart, // 业务开始日期
  1071. businessDateEnd: this.form.businessDateEnd, // 业务结束日期
  1072. approvedDateStart: this.form.auditDateFrom, // 审核开始日期
  1073. approvedDateEnd: this.form.auditDateTo, // 审核结束日期
  1074. signForDateStart: this.form.signForDateStart,
  1075. signForDateEnd: this.form.signForDateEnd,
  1076. feeCnName: this.form.feeCnName,
  1077. };
  1078. finstlbillslistAccBillByCorp(obj).then((res) => {
  1079. this.retrievePopupsType = true;
  1080. this.retrievePopupsData = res.data.data;
  1081. });
  1082. },
  1083. retrievePopupsSelect(row) {
  1084. this.$set(this.form, "corpId", row.id);
  1085. this.$set(this.form, "corpCnName", row.cnName);
  1086. this.$set(this.form, "corpEnName", row.enName);
  1087. this.$set(this.form, "corpArgreementNo", row.enName);
  1088. this.form.limitedAmount = null;
  1089. this.form.corpAccRemarks = null;
  1090. this.form.corpIsSigned = 0;
  1091. this.form.isSignedPersonId = null;
  1092. this.form.isSignedPersonName = null;
  1093. let obj = {
  1094. corpId: row.id,
  1095. validDate: dateFormat(new Date(), "yyyy-MM-dd"),
  1096. };
  1097. agreementListAll(obj).then((res) => {
  1098. if (res.data.data.length) {
  1099. let obj = res.data.data[0];
  1100. let USDTEXT = obj.amountUsd ? "USD:" + Number(obj.amountUsd) : "";
  1101. let CNYTEXT = obj.amountCny ? "RMB:" + Number(obj.amountCny) : "";
  1102. //USD有值是 中间要加空格
  1103. this.form.limitedAmount = (USDTEXT ? USDTEXT + " " : "") + CNYTEXT;
  1104. this.form.corpAccRemarks = obj.accountPeriodRemarks;
  1105. this.form.corpIsSigned = 1;
  1106. this.form.isSignedPersonId = obj.createUser;
  1107. this.form.isSignedPersonName = obj.createUserName;
  1108. }
  1109. });
  1110. this.retrievePopupsType = false;
  1111. this.$refs.queryData.search("检索");
  1112. },
  1113. //确认对账
  1114. confirm() {
  1115. let obj = {
  1116. ...this.form,
  1117. billNoFormat: "HYDZ",
  1118. businessTypeCode: "HYDZ",
  1119. businessType: "CHK",
  1120. url: "/iosBasicData/financialManagement/finstlbills/index",
  1121. pageLabel: "对账中心(J)",
  1122. };
  1123. const loading = this.$loading({
  1124. lock: true,
  1125. text: "加载中",
  1126. spinner: "el-icon-loading",
  1127. background: "rgba(255,255,255,0.7)",
  1128. });
  1129. finstlbillsConfirmReconciliation(obj)
  1130. .then((res) => {
  1131. this.getDetail(this.form.id);
  1132. })
  1133. .finally(() => {
  1134. loading.close();
  1135. });
  1136. },
  1137. // application() {
  1138. // },
  1139. update(id, type) {
  1140. this.getDetail(id, type);
  1141. },
  1142. apData(list) {
  1143. this.form.advancePaymentRecordList = list;
  1144. let obj = {
  1145. ...this.form,
  1146. billNoFormat: "HYDZ",
  1147. businessTypeCode: "HYDZ",
  1148. businessType: "CHK",
  1149. url: "/iosBasicData/financialManagement/finstlbills/index",
  1150. pageLabel: "对账中心(J)",
  1151. };
  1152. const loading = this.$loading({
  1153. lock: true,
  1154. text: "加载中",
  1155. spinner: "el-icon-loading",
  1156. background: "rgba(255,255,255,0.7)",
  1157. });
  1158. confirmWriteOff(obj)
  1159. .then((res) => {
  1160. this.$message.success("操作成功");
  1161. this.getDetail(this.form.id);
  1162. })
  1163. .finally(() => {
  1164. loading.close();
  1165. });
  1166. },
  1167. submit() {
  1168. // if (!this.form.corpId) {
  1169. // return this.$message.error("请选择对账单位");
  1170. // }
  1171. for (let item of this.form.finInvoiceItemDetailList) {
  1172. if (!item.invoiceCompanyId) {
  1173. return this.$message.error("发票抬头不能为空");
  1174. }
  1175. if (!item.curCode) {
  1176. return this.$message.error("币别不能为空");
  1177. }
  1178. if (!Number(item.exrate)) {
  1179. return this.$message.error("汇率不能为空或0");
  1180. }
  1181. if (Number(item.price ? item.price : 0) <= 0) {
  1182. return this.$message.error("单价不能为非正数");
  1183. }
  1184. }
  1185. this.form.finStlBillsItemsList.forEach((item, index) => {
  1186. if (item.currentStlCurCode == "CNY") {
  1187. item.currentStlAmount = item.currentStlAmountRMB;
  1188. } else {
  1189. item.currentStlAmount = item.currentStlAmountUSD;
  1190. }
  1191. });
  1192. let obj = {
  1193. ...this.form,
  1194. billNoFormat: "HYDZ",
  1195. businessTypeCode: "HYDZ",
  1196. businessType: "CHK",
  1197. };
  1198. const loading = this.$loading({
  1199. lock: true,
  1200. text: "加载中",
  1201. spinner: "el-icon-loading",
  1202. background: "rgba(255,255,255,0.7)",
  1203. });
  1204. finstlbillsSubmit(obj)
  1205. .then((res) => {
  1206. this.$message.success("操作成功");
  1207. this.getDetail(res.data.data.id);
  1208. })
  1209. .finally(() => {
  1210. loading.close();
  1211. });
  1212. },
  1213. getDetail(id, type) {
  1214. //生成发票跳转到开票明细
  1215. if (type == "finstlbills") {
  1216. this.activeName = "3";
  1217. } else {
  1218. //其他时候默认显示选定数据tabs
  1219. this.activeName = "2";
  1220. }
  1221. const loading = this.$loading({
  1222. lock: true,
  1223. text: "加载中",
  1224. spinner: "el-icon-loading",
  1225. background: "rgba(255,255,255,0.7)",
  1226. });
  1227. finstlbillsDetail(id)
  1228. .then((res) => {
  1229. res.data.data.finStlBillsItemsList.forEach((item) => {
  1230. item.customSelected = false;
  1231. if (item.curCode == "CNY") {
  1232. this.$set(item, "amountRMB", item.amount);
  1233. // this.$set(item, "currentInvoiceAmountRMB", Number(item.appliedInvoiceAmount ? item.appliedInvoiceAmount : 0));
  1234. this.$set(item, "unsettledAmountRMB", Number(item.amount ? item.amount : 0));
  1235. this.$set(item, "currentStlAmountRMB", Number(item.currentStlAmount ? item.currentStlAmount : 0));
  1236. this.$set(item, "currentStlAmountUSD", Number(0));
  1237. this.$set(item, "stlAmountDr", Number(item.stlTtlAmount ? item.stlTtlAmount : 0));
  1238. this.$set(item, "stlAmountDrUSD", Number(0));
  1239. } else {
  1240. this.$set(item, "amountUSD", item.amount);
  1241. // this.$set(item, "currentInvoiceAmountUSD", Number(item.appliedInvoiceAmount ? item.appliedInvoiceAmount : 0));
  1242. this.$set(item, "unsettledAmountUSD", Number(item.amount ? item.amount : 0));
  1243. this.$set(item, "currentStlAmountUSD", Number(item.currentStlAmount ? item.currentStlAmount : 0));
  1244. this.$set(item, "currentStlAmountRMB", Number(0));
  1245. this.$set(item, "stlAmountDr", Number(0));
  1246. this.$set(item, "stlAmountDrUSD", Number(item.stlTtlAmount ? item.stlTtlAmount : 0));
  1247. }
  1248. });
  1249. if (res.data.data.status == 3 || res.data.data.operatingStatus == 3) {
  1250. this.editDisabled = true;
  1251. this.optionForm.disabled = true;
  1252. this.optionForm2.disabled = true;
  1253. }
  1254. this.form = res.data.data;
  1255. if (type == "query") {
  1256. //再次查询是为了避免已选定的数据不能再次出现查询结果里面
  1257. this.$refs.queryData.search();
  1258. }
  1259. setTimeout(() => {
  1260. this.$refs.pickedData.refreshData();
  1261. this.$refs.pickedData.resetTotal();
  1262. }, 100);
  1263. })
  1264. .finally(() => {
  1265. loading.close();
  1266. });
  1267. },
  1268. // 更改表格颜色
  1269. headerClassName(tab) {
  1270. //颜色间隔
  1271. let back = "";
  1272. if (tab.columnIndex >= 0 && tab.column.level === 1) {
  1273. if (tab.columnIndex % 2 === 0) {
  1274. back = "back-one";
  1275. } else if (tab.columnIndex % 2 === 1) {
  1276. back = "back-two";
  1277. }
  1278. }
  1279. return back;
  1280. },
  1281. goBack(type) {
  1282. this.$emit("goBack");
  1283. },
  1284. },
  1285. watch: {},
  1286. computed: {
  1287. // 收 1.只有收费明细-发票申请,挂账销账,
  1288. // 2.收付明细都有
  1289. // 1).收付金额相等-收付相抵
  1290. // 2).收大于付-发票申请(金额取差额),收付相抵,挂账销账(销账金额取差额)
  1291. // 付 1.只有付费-付费申请
  1292. // 2.收付明细都有且付大于收-付费申请(指示金额取差额),收付相抵
  1293. //收付相抵
  1294. isOffsetting() {
  1295. if (this.form.id) {
  1296. if (this.form.finStlBillsItemsList.length != this.form.finStlBillsItemsList.filter((item) => item.dc == "D").length) {
  1297. if (this.form.dc == "C" && this.compareSizes() == "C") {
  1298. return true;
  1299. }
  1300. if (this.form.dc == "D" && this.compareSizes() == "D") {
  1301. return true;
  1302. }
  1303. if (this.form.dc == "D" && this.compareSizes() == "相等") {
  1304. return true;
  1305. }
  1306. } else {
  1307. return false;
  1308. }
  1309. } else {
  1310. return false;
  1311. }
  1312. },
  1313. //挂账销账
  1314. isWriteOff() {
  1315. if (this.form.id && this.form.dc == "D" && (this.compareSizes() == "D" || this.compareSizes() == "全收")) {
  1316. return true;
  1317. } else {
  1318. return false;
  1319. }
  1320. },
  1321. //发票申请
  1322. isApplication() {
  1323. if (this.form.id && this.form.dc == "D" && (this.compareSizes() == "D" || this.compareSizes() == "全收")) {
  1324. return true;
  1325. } else {
  1326. return false;
  1327. }
  1328. },
  1329. },
  1330. };
  1331. </script>
  1332. <style lang="scss" scoped>
  1333. ::v-deep .el-form-item__error {
  1334. display: none !important;
  1335. }
  1336. ::v-deep .el-form-item {
  1337. margin-bottom: 2px !important;
  1338. }
  1339. ::v-deep .el-table .cell {
  1340. padding: 0 2px !important;
  1341. .el-form-item {
  1342. margin-bottom: 0px !important;
  1343. }
  1344. }
  1345. ::v-deep .avue-crud .el-table .el-form-item__label {
  1346. left: -1px;
  1347. }
  1348. // ::v-deep#out-table .back-one {
  1349. // background: #ecf5ff !important;
  1350. // }
  1351. // ::v-deep#out-table .back-two {
  1352. // background: #ecf5ff !important;
  1353. // }
  1354. ::v-deep #out-table .back-one {
  1355. background: #ecf5ff !important;
  1356. text-align: center;
  1357. padding: 4px 0;
  1358. }
  1359. ::v-deep #out-table .back-two {
  1360. background: #ecf5ff !important;
  1361. text-align: center;
  1362. padding: 4px 0;
  1363. }
  1364. ::v-deep .el-table--small td,
  1365. .el-table--small th {
  1366. padding: 2px !important;
  1367. }
  1368. ::v-deep .box-card .el-card__body {
  1369. padding: 2px !important;
  1370. }
  1371. ::v-deep .form2 .el-collapse-item__wrap {
  1372. background-color: #ecf5ff !important;
  1373. }
  1374. ::v-deep .box-tabs .el-tabs__item {
  1375. height: 30px;
  1376. line-height: 30px;
  1377. }
  1378. ::v-deep .box-tabs .el-tabs__content {
  1379. padding: 2px !important;
  1380. }
  1381. ::v-deep .el-checkbox__input.is-disabled + span.el-checkbox__label {
  1382. color: #606266;
  1383. }
  1384. .disabledBox {
  1385. display: flex;
  1386. align-items: center;
  1387. }
  1388. .meetSize {
  1389. font-size: 16px;
  1390. color: #54bcbd;
  1391. }
  1392. .customer-title {
  1393. position: absolute;
  1394. top: 12px;
  1395. z-index: 1000;
  1396. left: calc(50% - 175px);
  1397. color: #67c23a;
  1398. }
  1399. </style>