addOrEditDialogNew.vue 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. :visible.sync="addOrEditDialogFlag"
  6. :title="title"
  7. :append-to-body="true"
  8. :close-on-click-modal="false"
  9. width="70%"
  10. :before-close="cancel"
  11. :maxable="true"
  12. :resizable="true"
  13. >
  14. <el-form
  15. ref="form"
  16. :rules="rules"
  17. class="el-form-box-add"
  18. :model="form"
  19. label-width="160px"
  20. >
  21. <headerTitle title="基本信息"></headerTitle>
  22. <el-row :gutter="12">
  23. <el-col :span="8">
  24. <el-form-item label="发票类型" prop="type">
  25. <el-select
  26. v-model="form.type"
  27. @change="handleSelType('isType')"
  28. clearable
  29. :disabled="!isEditType"
  30. style="width: 100%"
  31. >
  32. <el-option label="开票" value="1"></el-option>
  33. <el-option label="收票" value="2"></el-option>
  34. </el-select>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="8" v-if="form.type">
  38. <el-form-item label="来源类型" prop="sourceType">
  39. <el-select
  40. v-model="form.sourceType"
  41. @change="handleSelType()"
  42. :disabled="!isEditType"
  43. clearable
  44. style="width: 100%"
  45. >
  46. <el-option v-for="item in sourceTypeOp" :label="item.label" :value="item.value" :key="item.value"></el-option>
  47. <!-- <el-option label="对账单" :value="1"></el-option>
  48. <el-option label="合同" :value="2"></el-option>
  49. <el-option label="订单" :value="3"></el-option>
  50. <el-option label="收款计划" :value="1"></el-option>
  51. <el-option
  52. label="应收"
  53. :value="5"
  54. v-if="form.type == 1"
  55. ></el-option>
  56. <el-option
  57. label="应付"
  58. :value="4"
  59. v-if="form.type == 2"
  60. ></el-option> -->
  61. </el-select>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="8" v-if="form.sourceType == 6">
  65. <el-form-item label="收款计划编码" prop="sourceCode">
  66. <el-input
  67. v-model="form.sourceCode"
  68. readonly
  69. @click.native="handleSelectAccount(6)"
  70. ></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="8" v-if="form.sourceType == 7">
  74. <el-form-item label="付款计划编码" prop="sourceCode">
  75. <el-input
  76. v-model="form.sourceCode"
  77. readonly
  78. @click.native="handleSelectAccount(7)"
  79. ></el-input>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="8" v-if="form.sourceType == 5">
  83. <el-form-item label="应收编码" prop="sourceCode">
  84. <el-input
  85. v-model="form.sourceCode"
  86. readonly
  87. @click.native="handleSelectAccount(5)"
  88. ></el-input>
  89. </el-form-item>
  90. </el-col>
  91. <el-col :span="8" v-if="form.sourceType == 4">
  92. <el-form-item label="应付编码" prop="sourceCode">
  93. <el-input
  94. v-model="form.sourceCode"
  95. readonly
  96. @click.native="handleSelectAccount(4)"
  97. ></el-input>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="8">
  101. <el-form-item label="发票金额" prop="amount">
  102. <el-input
  103. type="number"
  104. v-model="form.amount"
  105. :precision="2"
  106. :controls="false"
  107. style="width: 100%"
  108. disabled
  109. :min="0"
  110. >
  111. <template slot="append">
  112. <span>元</span>
  113. </template>
  114. </el-input>
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="8">
  118. <el-form-item label="发票号" prop="invoiceNos">
  119. <el-input
  120. v-model="form.invoiceNos"
  121. ></el-input>
  122. </el-form-item>
  123. </el-col>
  124. <el-col :span="8">
  125. <el-form-item label="开票日期">
  126. <el-date-picker
  127. style="width: 100%"
  128. v-model="form.expectInvoiceDate"
  129. type="date"
  130. value-format="yyyy-MM-dd"
  131. placeholder="选择日期"
  132. >
  133. </el-date-picker>
  134. </el-form-item>
  135. </el-col>
  136. <el-col :span="8">
  137. <el-form-item label="申请部门" prop="applyDeptId">
  138. <ele-tree-select
  139. clearable
  140. :data="deptTreeList"
  141. v-model="form.applyDeptId"
  142. valueKey="id"
  143. labelKey="name"
  144. placeholder="请选择"
  145. @change="changeDeptInfo"
  146. default-expand-all
  147. />
  148. </el-form-item>
  149. </el-col>
  150. <el-col :span="8">
  151. <el-form-item label="申请人" prop="applyUserId">
  152. <personSelect
  153. ref="directorRef"
  154. v-model="form.applyUserId"
  155. @selfChange="changeUserInfo"
  156. />
  157. </el-form-item>
  158. </el-col>
  159. <el-col :span="8">
  160. <el-form-item label="发票种类" prop="category">
  161. <el-select
  162. v-model="form.category"
  163. clearable
  164. style="width: 100%"
  165. >
  166. <el-option label="增值税专用发票" :value="1"></el-option>
  167. <el-option label="增值税普通发票" :value="2"></el-option>
  168. </el-select>
  169. </el-form-item>
  170. </el-col>
  171. <el-col :span="8">
  172. <el-form-item prop="files" label="发票附件">
  173. <fileMain v-model="form.files"></fileMain>
  174. </el-form-item>
  175. </el-col>
  176. </el-row>
  177. <headerTitle title="发票信息"></headerTitle>
  178. <el-row :gutter="12">
  179. <el-col :span="12">
  180. <el-form-item label="购买方名称" prop="companyName">
  181. <el-input
  182. v-model="form.companyName"
  183. placeholder="请输入"
  184. v-if="enterprisePage.length <= 1 || form.type == 1"
  185. />
  186. <el-select
  187. v-if="enterprisePage.length > 1 && form.type == 2"
  188. style="width: 100%"
  189. v-model="form.companyName"
  190. placeholder="请选择"
  191. @change="enterpriseChange"
  192. >
  193. <el-option
  194. v-for="item in enterprisePage"
  195. :key="item.id"
  196. :label="item.name"
  197. :value="item.name"
  198. >
  199. </el-option>
  200. </el-select>
  201. </el-form-item>
  202. <el-form-item
  203. label="统一社会信用代码"
  204. prop="companyUsc"
  205. class="form_item_label"
  206. >
  207. <el-input v-model="form.companyUsc"></el-input>
  208. </el-form-item>
  209. <el-form-item label="联系人" prop="companyContactName">
  210. <el-input v-model="form.companyContactName"></el-input>
  211. </el-form-item>
  212. <el-form-item label="电话" prop="companyTel">
  213. <el-input v-model="form.companyTel"></el-input>
  214. </el-form-item>
  215. <el-form-item label="银行账号" prop="companyBankAccount">
  216. <el-input v-model="form.companyBankAccount"></el-input>
  217. </el-form-item>
  218. <el-form-item label="开户行" prop="companyBankBranchNo">
  219. <el-input v-model="form.companyBankBranchNo"></el-input>
  220. </el-form-item>
  221. <el-form-item label="地址" prop="companyAddress">
  222. <el-input v-model="form.companyAddress"></el-input>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="12">
  226. <el-form-item label="销售方名称" prop="receiverName">
  227. <el-input
  228. v-model="form.receiverName"
  229. placeholder="请输入"
  230. v-if="enterprisePage.length <= 1 || form.type == 2"
  231. />
  232. <el-select
  233. v-if="enterprisePage.length > 1 && form.type == 1"
  234. style="width: 100%"
  235. v-model="form.receiverName"
  236. placeholder="请选择"
  237. @change="enterpriseChange"
  238. >
  239. <el-option
  240. v-for="item in enterprisePage"
  241. :key="item.id"
  242. :label="item.name"
  243. :value="item.name"
  244. >
  245. </el-option>
  246. </el-select>
  247. </el-form-item>
  248. <el-form-item
  249. label="统一社会信用代码"
  250. prop="salesCompanyUsc"
  251. class="form_item_label"
  252. >
  253. <el-input v-model="form.salesCompanyUsc"></el-input>
  254. </el-form-item>
  255. <el-form-item label="联系人" prop="receiverContactName">
  256. <el-input v-model="form.receiverContactName"></el-input>
  257. </el-form-item>
  258. <el-form-item label="电话" prop="receiverTel">
  259. <el-input v-model="form.receiverTel"></el-input>
  260. </el-form-item>
  261. <el-form-item label="银行账号" prop="salesCompanyBankAccount">
  262. <el-input v-model="form.salesCompanyBankAccount"></el-input>
  263. </el-form-item>
  264. <el-form-item label="开户行" prop="salesCompanyBankBranchNo">
  265. <el-input v-model="form.salesCompanyBankBranchNo"></el-input>
  266. </el-form-item>
  267. <el-form-item label="地址" prop="receiverAddress">
  268. <el-input v-model="form.receiverAddress"></el-input>
  269. </el-form-item>
  270. <!-- <el-form-item prop="files" label="发票附件">
  271. <fileMain v-model="form.files"></fileMain>
  272. </el-form-item> -->
  273. </el-col>
  274. </el-row>
  275. <div class="payinfo" style="margin-top: 20px;">
  276. <headerTitle :title="form.type == 2 ? '付款计划信息' : '收款计划信息'"></headerTitle>
  277. <!-- <el-form ref="form" :model="tableForm"> -->
  278. <ele-pro-table
  279. ref="table"
  280. :needPage="false"
  281. :columns="columns"
  282. :datasource="form.receiptPayments"
  283. row-key="id"
  284. class="time-form"
  285. >
  286. <template v-slot:toolbar>
  287. <!-- <span>已开票金额:{{ totalInvoiceAmount }}</span> -->
  288. </template>
  289. <template v-slot:planPaymentAmount="scope">
  290. <el-form-item
  291. style="width: 100%;"
  292. label-width="0"
  293. :prop="'receiptPayments.' + scope.$index + '.planPaymentAmount'"
  294. :rules="[
  295. {
  296. required: false,
  297. message: '请输入计划金额',
  298. trigger: 'blur'
  299. }
  300. ]"
  301. >
  302. <span v-if="dialogType === 'view'">{{ scope.row.planPaymentAmount }}</span>
  303. <el-input v-else v-model="scope.row.planPaymentAmount" type="number" @input="updatePlanPaymentAmount(scope.row)"></el-input>
  304. </el-form-item>
  305. </template>
  306. <template v-slot:invoiceAmount="scope">
  307. <el-form-item
  308. style="width: 100%;"
  309. label-width="0"
  310. :prop="'receiptPayments.' + scope.$index + '.invoiceAmount'"
  311. :rules="[
  312. {
  313. required: false,
  314. message: '请输入开票金额',
  315. trigger: 'blur'
  316. },
  317. {
  318. required: false,
  319. validator: (rule, value, callback) => {
  320. if (value === undefined || value === null || value === '') {
  321. callback('请输入开票金额');
  322. } else if (parseFloat(value) <= 0 || parseFloat(value) > parseFloat(scope.row.unInvoiceAmount)) {
  323. callback('开票金额必须大于0且不超过未开票金额');
  324. } else {
  325. callback();
  326. }
  327. },
  328. trigger: 'blur'
  329. }
  330. ]"
  331. >
  332. <span v-if="dialogType === 'view'">{{ scope.row.invoiceAmount }}</span>
  333. <el-input v-else v-model="scope.row.invoiceAmount" type="number" @input="updateInvoiceAmount(scope.row)"></el-input>
  334. </el-form-item>
  335. </template>
  336. </ele-pro-table>
  337. <!-- </el-form> -->
  338. </div>
  339. </el-form>
  340. <div style="margin-top: 20px;">
  341. <headerTitle title="关联物品清单信息"></headerTitle>
  342. <table-info-new
  343. :dialogType="dialogType"
  344. :contactData="contactData"
  345. ref="tableInfoRef"
  346. :invoiceAmount="form.invoiceAmount"
  347. @invoiceAmountChange="invoiceAmountChange"
  348. ></table-info-new>
  349. </div>
  350. <div slot="footer">
  351. <el-button type="primary" v-click-once @click="handleSave(0)">保存</el-button>
  352. <el-button
  353. type="primary"
  354. v-if="isNeed_process_is_close"
  355. v-click-once
  356. @click="handleSave(1)"
  357. >提交</el-button
  358. >
  359. <el-button v-click-once @click="cancel">返回</el-button>
  360. </div>
  361. <process-submit-dialog
  362. api-fun-name="fininvoiceapplyStatusAPI"
  363. :processSubmitDialogFlag.sync="processSubmitDialogFlag"
  364. v-if="processSubmitDialogFlag"
  365. ref="processSubmitDialogRef"
  366. @reload="reload"
  367. ></process-submit-dialog>
  368. <!--对账单-->
  369. <!-- <account-statement-dialog
  370. ref="accountStatementDialogRef"
  371. :form="form"
  372. v-if="accountStatementDialogFlag"
  373. :accountstatement-dialog-flag.sync="accountStatementDialogFlag"
  374. @getAccountData="getAccountData"
  375. :contactData="contactData"
  376. :type="form.type"
  377. >
  378. </account-statement-dialog> -->
  379. <!--采购订单-->
  380. <purchasinOrderListDialog
  381. ref="orderListDialogRef"
  382. @changeParent="changeOrder"
  383. ></purchasinOrderListDialog>
  384. <!--销售订单-->
  385. <saleOrderListDialog
  386. ref="saleOrderListDialogref"
  387. @changeParent="changeOrder"
  388. ></saleOrderListDialog>
  389. <contractListDialog
  390. ref="selectContractRef"
  391. @changeParent="changeContract"
  392. :type="form.type"
  393. ></contractListDialog>
  394. <!-- 应收 -->
  395. <receivableDialog
  396. ref="receivableRef"
  397. @receivableDone="receivableDone"
  398. v-if="receivableDialogFlag"
  399. :receivableDialogFlag.sync="receivableDialogFlag"
  400. ></receivableDialog>
  401. <!-- 应付 -->
  402. <paymentListDialog
  403. ref="receivableRef1"
  404. @receivableDone="receivableDone"
  405. v-if="paymentListDialogFlag"
  406. :paymentListDialogFlag.sync="paymentListDialogFlag"
  407. ></paymentListDialog>
  408. <!-- 收款计划列表 -->
  409. <collectionPlanDialog
  410. ref="collectionPlanDialogRef"
  411. v-if="collectionPlanDialogFlag"
  412. :collectionPlanDialogFlag.sync="collectionPlanDialogFlag"
  413. @getPlanData="getPlanData"
  414. :type="form.type"
  415. ></collectionPlanDialog>
  416. </ele-modal>
  417. </template>
  418. <script>
  419. import personSelect from '@/components/CommomSelect/person-select.vue';
  420. import { listOrganizations } from '@/api/system/organization';
  421. import { mapGetters } from 'vuex';
  422. import fileUpload from '@/components/upload/fileUpload.vue';
  423. import tableInfoNew from './tableInfoNew.vue';
  424. import { getTreeByPid } from '@/api/classifyManage';
  425. import {
  426. invoiceApplyInfoV2API,
  427. invoiceApplyCreateAPI,
  428. invoiceApplyUpdateV2API
  429. } from '@/api/financialManage/invoiceManage';
  430. import { getpurchaseorderDetail } from '@/api/purchasingManage/purchaseOrder';
  431. import { getSaleOrderDetail } from '@/api/saleManage/saleorder';
  432. import { getDetail } from '@/api/contractManage/contractBook';
  433. import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
  434. import accountStatementDialog from './accountstatementDialog.vue';
  435. import contractListDialog from '@/views/saleManage/saleOrder/components/contractListDialog.vue';
  436. import purchasinOrderListDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/orderListDialog.vue'; //采购订单
  437. import saleOrderListDialog from '@/views/saleManage/saleOrder/invoice/components/orderListDialog.vue'; //销售订单
  438. import { enterprisePage } from '@/api/contractManage/contractBook';
  439. import { contactDetail } from '@/api/saleManage/contact';
  440. // import fileMain from '@/components/addDoc/index.vue';
  441. import receivableDialog from '@/views/financialManage/receivableManage/components/receivableDialog.vue'; //应收
  442. import paymentListDialog from '@/views/financialManage/payableManage/components/paymentListDialog.vue'; //应付
  443. import collectionPlanDialog from './collectionPlanDialog.vue' // 收款计划列表
  444. import { updateContractStatus } from '@/api/contractManage/contractBook';
  445. import { getMergeInvoiceInfoAPI } from '@/api/financialManage/payAndCollectPlan';
  446. import { paymentTypeOp } from '@/enum/dict';
  447. const defForm = {
  448. accountingSubjectCode: '',
  449. accountingSubjectId: '',
  450. accountingSubjectName: '',
  451. amount: undefined,
  452. contactId: '',
  453. companyAddress: '',
  454. companyBankAccount: '',
  455. companyUsc: '',
  456. expectInvoiceDate: '',
  457. companyBankBranchNo: '',
  458. companyName: '',
  459. receiverAddress: '',
  460. receiverName: '',
  461. receiverTel: '',
  462. receiverContactName: '',
  463. companyTel: '',
  464. companyContactName: '',
  465. detailList: [],
  466. drawerId: '',
  467. drawerName: '',
  468. files: [],
  469. invoiceStatus: '',
  470. link: [],
  471. remark: '',
  472. settlementAccountId: '',
  473. settlementAccountName: '',
  474. invoiceAmount: 0,
  475. getAccountData: '',
  476. sourceId: '',
  477. sourceCode: '',
  478. salesCompanyUsc: '',
  479. salesCompanyBankBranchNo: '',
  480. salesCompanyBankAccount: '',
  481. category: 1,
  482. receiptPayments: [],
  483. productMap: {}
  484. };
  485. export default {
  486. name: 'add-or-edit-dialog',
  487. components: {
  488. processSubmitDialog,
  489. fileUpload,
  490. personSelect,
  491. tableInfoNew,
  492. accountStatementDialog,
  493. contractListDialog,
  494. purchasinOrderListDialog,
  495. saleOrderListDialog,
  496. // fileMain,
  497. receivableDialog,
  498. paymentListDialog,
  499. collectionPlanDialog
  500. },
  501. props: {
  502. isEditType: {
  503. type: Boolean,
  504. default: true
  505. },
  506. addOrEditDialogFlag: {
  507. type: Boolean,
  508. default: false
  509. },
  510. contactData: {
  511. type: Object,
  512. default: () => {
  513. return {};
  514. }
  515. }
  516. },
  517. provide() {
  518. return {
  519. invoiceType: () => this.form.type
  520. };
  521. },
  522. computed: {
  523. ...mapGetters(['user']),
  524. sourceTypeOp() {
  525. return this.form.type == 1 ? [{
  526. label: '收款计划',
  527. value: 6
  528. }, {
  529. label: '应收管理',
  530. value: 5
  531. }] : [{
  532. label: '付款计划',
  533. value: 7
  534. }, {
  535. label: '应付管理',
  536. value: 4
  537. }]
  538. },
  539. columns() {
  540. return [
  541. {
  542. width: 45,
  543. type: 'index',
  544. columnKey: 'index',
  545. align: 'center',
  546. fixed: 'left'
  547. },
  548. {
  549. width: 150,
  550. prop: 'sourceOrderDetailNo',
  551. label: this.form.type == 1 ? '收款计划编码' : '付款计划编码',
  552. align: 'center'
  553. },
  554. {
  555. width: 150,
  556. prop: 'relatedOrderNo',
  557. label: '订单编号',
  558. align: 'center'
  559. },
  560. {
  561. width: 120,
  562. prop: 'relatedOrderType',
  563. label: '订单类型',
  564. align: 'center',
  565. formatter: (row) => {
  566. return row.relatedOrderType == 1 ? '销售订单' : '采购订单'
  567. }
  568. },
  569. {
  570. width: 120,
  571. prop: 'contractNo',
  572. label: '合同编码',
  573. align: 'center'
  574. },
  575. {
  576. width: 120,
  577. prop: 'contractCode',
  578. label: '合同编号',
  579. align: 'center'
  580. },
  581. {
  582. width: 120,
  583. prop: 'contractName',
  584. label: '合同名称',
  585. align: 'center'
  586. },
  587. {
  588. prop: 'issueNumber',
  589. label: '期数',
  590. align: 'center'
  591. },
  592. {
  593. width: 120,
  594. prop: 'paymentType',
  595. label: '款项类型',
  596. align: 'center',
  597. formatter: (row) => {
  598. return this.paymentTypeOp.find(item => item.value == row.paymentType)?.label || ''
  599. }
  600. },
  601. {
  602. prop: 'moneyName',
  603. label: '款项名称',
  604. align: 'center',
  605. width: 170
  606. },
  607. {
  608. width: 150,
  609. prop: 'paymentRatio',
  610. label: '比例',
  611. align: 'center',
  612. formatter: (row) => {
  613. return row.paymentRatio ? row.paymentRatio + '%' : ''
  614. }
  615. },
  616. {
  617. width: 170,
  618. prop: 'planPaymentAmount',
  619. label: this.form.type == 1 ? '计划收款金额' : '计划付款金额',
  620. align: 'center',
  621. slot: 'planPaymentAmount'
  622. },
  623. {
  624. width: 150,
  625. prop: 'unInvoiceAmount',
  626. label: '未开票金额',
  627. align: 'center'
  628. },
  629. {
  630. width: 150,
  631. prop: 'invoicedAmount',
  632. label: '已开票金额',
  633. align: 'center'
  634. },
  635. {
  636. width: 160,
  637. prop: 'invoiceAmount',
  638. label: '本次开票金额',
  639. align: 'center',
  640. // slot: 'invoiceAmount',
  641. fixed: 'right'
  642. }
  643. ];
  644. },
  645. },
  646. data() {
  647. return {
  648. businessId: '',
  649. paymentTypeOp,
  650. fullscreen: false,
  651. receivableDialogFlag: false,
  652. dialogType: '',
  653. title: '',
  654. isOtherSourceFlag: false,
  655. processSubmitDialogFlag: false,
  656. collectionPlanDialogFlag: false,
  657. paymentListDialogFlag: false,
  658. enterprisePage: [],
  659. totalInvoiceAmount: 0,
  660. form: {
  661. applyDeptId: '',
  662. applyDeptName: '',
  663. applyUserId: '',
  664. applyUserName: '',
  665. type: '1',
  666. id: '',
  667. ...defForm
  668. },
  669. feeTypeList: [],
  670. accountingSubjectList: [],
  671. deptList: [],
  672. deptTreeList: [],
  673. rules: {
  674. applyDeptId: { required: true, message: '请选择', trigger: 'change' },
  675. applyUserId: { required: true, message: '请选择', trigger: 'change' },
  676. accountingSubjectId: {
  677. required: true,
  678. message: '请选择',
  679. trigger: 'change'
  680. },
  681. feeTypeId: { required: true, message: '请选择', trigger: 'change' },
  682. // amount: { required: true, message: '请输入', trigger: 'blur' },
  683. companyName: { required: true, message: '请输入', trigger: 'blur' },
  684. type: { required: true, message: '请选择', trigger: 'change' },
  685. sourceType: { required: true, message: '请选择', trigger: 'change' }
  686. }
  687. };
  688. },
  689. created() {
  690. this.getClassifyList(24, 'accountingSubjectList');
  691. this.getDeptList();
  692. },
  693. methods: {
  694. //从发票管理新增发票初始化
  695. async init(row = {}, type) {
  696. this.businessId = row.id || '';
  697. this.title = type == 'add' ? '新增' : '修改';
  698. console.log('row', row, type);
  699. this.dialogType = type;
  700. if (type == 'add') {
  701. this.form.applyDeptId = this.user.info.groupId;
  702. this.form.applyDeptName = this.user.info.groupName;
  703. this.form.applyUserId = this.user.info.userId;
  704. this.form.applyUserName = this.user.info.name;
  705. enterprisePage({
  706. pageNum: 1,
  707. size: 200
  708. }).then((res) => {
  709. this.enterprisePage = [];
  710. this.enterprisePage.push(...res.list);
  711. this.enterpriseChange(this.enterprisePage[0]?.name);
  712. });
  713. } else {
  714. await this.getInfo(row.id);
  715. }
  716. this.$nextTick(async () => {
  717. // await this.getUser List(this.form.applyDeptId);
  718. });
  719. },
  720. updateInvoiceAmount(row) {
  721. // row.invoiceAmount = Number(row.invoiceAmount).toFixed(2);
  722. this.form.amount = this.form.receiptPayments.reduce((pre, cur) => {
  723. return pre + Number(cur.invoiceAmount);
  724. }, 0);
  725. // this.$refs.tableInfoRef.setSinglePrice(row, this.form.receiptPayments);
  726. },
  727. //来源类型
  728. async handleSelectAccount(val) {
  729. if (val == 6 || val == 7) {
  730. this.collectionPlanDialogFlag = true;
  731. }
  732. if (val == 2) {
  733. this.$refs.selectContractRef.open({}, 1, 1);
  734. }
  735. if (val == 3 && this.form.type == 2) {
  736. this.$refs.orderListDialogRef.open({}, 1, true);
  737. }
  738. if (val == 3 && this.form.type == 1) {
  739. this.$refs.saleOrderListDialogref.open({}, 1, true);
  740. }
  741. if (val == 5) {
  742. this.receivableDialogFlag = true;
  743. }
  744. if (val == 4) {
  745. this.paymentListDialogFlag = true;
  746. }
  747. },
  748. //合同回调
  749. async changeContract(data) {
  750. const res = await getDetail(data.id);
  751. this.$set(this.form, 'sourceId', data.id);
  752. this.$set(this.form, 'sourceCode', data.contractNo);
  753. this.$set(
  754. this.form,
  755. 'amount',
  756. res.contractVO?.discountTotalPrice - res.contractVO?.invoiceAmount
  757. );
  758. this.$set(this.form, 'invoiceAmount', res.contractVO?.invoiceAmount);
  759. this.getContactDetail(
  760. this.form.type == 2
  761. ? res.contractVO?.partbId
  762. : res.contractVO?.partaId,
  763. res.contractVO
  764. );
  765. res.productList.forEach((item) => {
  766. item.singlePrice =
  767. (item.discountSinglePrice &&
  768. Number(item.discountSinglePrice).toFixed(2)) ||
  769. item.singlePrice;
  770. item.totalPrice =
  771. (item.discountTotalPrice &&
  772. Number(item.discountTotalPrice).toFixed(2)) ||
  773. item.totalPrice;
  774. item.typeName = this.form.type == 1 ? '销售合同' : '采购合同';
  775. item.type = this.form.type == 1 ? '101' : '102';
  776. });
  777. this.$nextTick(() => {
  778. this.$refs.table.setValue(res.productList);
  779. });
  780. this.$forceUpdate();
  781. },
  782. async getContactDetail(id, data) {
  783. let contactValue = {};
  784. if (id) {
  785. this.form.contactId = id;
  786. contactValue = await contactDetail(id);
  787. }
  788. const { base, other, bankList, linkList } = contactValue;
  789. if (this.form.type == 1) {
  790. this.form.companyName = base.name;
  791. this.form.companyUsc = base.unifiedSocialCreditCode;
  792. this.form.companyAddress = other?.addressName + other?.address;
  793. this.form.companyTel =
  794. data.partbTel ||
  795. linkList.find((item) => item.ifChief == 1)?.mobilePhone;
  796. this.form.companyBankAccount = bankList[0]?.accountNo;
  797. this.form.companyBankBranchNo = bankList[0]?.bankName;
  798. this.enterpriseChange(data.partbName);
  799. } else {
  800. this.form.receiverName = base.name;
  801. this.form.receiverAddress = base?.addressName + other?.address;
  802. this.form.receiverTel =
  803. data.partaTel ||
  804. linkList.find((item) => item.ifChief == 1)?.mobilePhone;
  805. this.form.salesCompanyUsc = base.unifiedSocialCreditCode;
  806. this.form.salesCompanyBankAccount = bankList[0]?.accountNo;
  807. this.form.salesCompanyBankBranchNo = bankList[0]?.bankName;
  808. this.enterpriseChange(data.partaName);
  809. }
  810. },
  811. setCompanyBankAccount(base) {
  812. console.log('base~~~', base);
  813. if (this.form.type == 1) {
  814. console.log('base~~~111', base.companyName);
  815. this.form.companyName = base.companyName;
  816. this.form.companyUsc = base.companyUsc;
  817. this.form.companyAddress = base.companyAddress;
  818. this.form.companyTel = base.companyTel;
  819. this.form.companyContactName = base.companyContactName;
  820. this.form.companyBankAccount = base.companyBankAccount;
  821. this.form.companyBankBranchNo = base.companyBankBranchNo;
  822. // this.enterpriseChange(base.companyName);
  823. } else {
  824. this.form.receiverName = base.receiverName;
  825. this.form.receiverAddress = base.receiverAddress;
  826. this.form.receiverTel = base.receiverTel;
  827. this.form.receiverContactName = base.receiverContactName;
  828. this.form.salesCompanyUsc = base.salesCompanyUsc;
  829. this.form.salesCompanyBankAccount = base.salesCompanyBankAccount;
  830. this.form.salesCompanyBankBranchNo = base.salesCompanyBankBranchNo;
  831. // this.enterpriseChange(base.receiverName);
  832. }
  833. },
  834. //订单回调
  835. async changeOrder(data) {
  836. this.$set(this.form, 'sourceId', data.id);
  837. this.$set(this.form, 'sourceCode', data.orderNo);
  838. let res = {};
  839. if (this.form.type == 2) {
  840. res = await getpurchaseorderDetail(data.id);
  841. } else {
  842. res = await getSaleOrderDetail(data.id);
  843. }
  844. this.$set(this.form, 'amount', res.payAmount - res.invoiceAmount);
  845. this.$set(this.form, 'invoiceAmount', res.invoiceAmount);
  846. this.getContactDetail(
  847. this.form.type == 2 ? res.partbId : res.partaId,
  848. res
  849. );
  850. res.productList.forEach((item) => {
  851. item.singlePrice =
  852. (item.discountSinglePrice &&
  853. Number(item.discountSinglePrice).toFixed(2)) ||
  854. item.singlePrice;
  855. item.totalPrice =
  856. (item.discountTotalPrice &&
  857. Number(item.discountTotalPrice).toFixed(2)) ||
  858. item.totalPrice;
  859. item.typeName = this.form.type == 1 ? '销售订单' : '采购订单';
  860. item.type = this.form.type == 1 ? '201' : '202';
  861. });
  862. this.$nextTick(() => {
  863. this.$refs.table.setValue(res.productList);
  864. });
  865. this.$forceUpdate();
  866. console.log(res);
  867. },
  868. //应收应付回调
  869. async payableManage(data) {
  870. const { row, form } = data;
  871. console.log(data);
  872. this.$set(this.form, 'sourceId', row.id);
  873. this.$set(this.form, 'sourceCode', row.code);
  874. // this.$set(
  875. // this.form,
  876. // 'amount',
  877. // row.receivedTotalPrice || row.paidTotalPrice
  878. // );
  879. // this.$set(this.form, 'invoiceAmount', row.invoiceAmount);
  880. // this.getContactDetail(form.contactId, {});
  881. },
  882. receivableDone(data) {
  883. // this.$set(this.form, 'type', Number(data.type));
  884. // this.$set(this.form, 'sourceType', data.sourceType);
  885. // this.payableManage(data.data);
  886. this.getPlanData(data)
  887. },
  888. // 收/付款计划回调
  889. async getPlanData(data) {
  890. let tempIds = [];
  891. let tempNames = [];
  892. if(this.form.sourceType == 4 || this.form.sourceType == 5) {
  893. tempIds = data.map((item) => item.receiptPlanOrderId);
  894. tempNames = data.map((item) => item.code);
  895. } else {
  896. tempIds = data.map((item) => item.id);
  897. tempNames = data.map((item) => item.detailNo);
  898. }
  899. this.form.sourceCode = tempNames.join(',');
  900. const res = await getMergeInvoiceInfoAPI(tempIds)
  901. res.receiptPayments = res.receiptPayments.map((item) => {
  902. item.invoiceAmount = item.unInvoiceAmount;
  903. return item
  904. })
  905. this.form.receiptPayments = res.receiptPayments;
  906. this.form.productMap = res.productMap;
  907. const amount = this.form.receiptPayments.reduce((prev, cur) => prev +
  908. +cur.invoiceAmount, 0) || 0;
  909. this.form.amount = amount;
  910. console.log('form~~~', this.form);
  911. this.setCompanyBankAccount(res)
  912. // this.form.detailList = res.detailList;
  913. this.$nextTick(() => {
  914. this.$refs.tableInfoRef.setValue(this.form);
  915. })
  916. console.log('getPlanData~~~', res);
  917. // console.log('detailList~~~', res.detailList);
  918. },
  919. //对账单回调
  920. async getAccountData(tableInfo) {
  921. let res = {};
  922. if (this.form.type == 2) {
  923. res = await getpurchaseorderDetail(tableInfo?.children?.orderId);
  924. } else {
  925. res = await getSaleOrderDetail(tableInfo?.children?.orderId);
  926. }
  927. this.getContactDetail(tableInfo.contactId, res);
  928. this.$nextTick(() => {
  929. this.$set(this.form, 'sourceId', tableInfo?.children?.id);
  930. this.$set(this.form, 'sourceCode', tableInfo?.statementNo);
  931. this.$set(
  932. this.form,
  933. 'invoiceAmount',
  934. tableInfo?.children?.invoiceAmount
  935. );
  936. this.$refs.table.getAccountData(tableInfo);
  937. });
  938. },
  939. //订单、合同列表
  940. async createInvoice1(data, type, sourceType) {
  941. console.log('createInvoice1~~~', data);
  942. // const tempIds = data.map((item) => item.id).join(',');
  943. this.$set(this.form, 'type', type);
  944. this.$set(this.form, 'sourceType', sourceType);
  945. // this.$set(this.form, 'sourceCode', tempIds);
  946. await this.init({}, 'add');
  947. this.getPlanData(data);
  948. // if (sourceType == 2) {
  949. // this.changeContract(data);
  950. // }
  951. // if (sourceType == 3) {
  952. // this.changeOrder(data);
  953. // }
  954. // if (sourceType == 4 || sourceType == 5) {
  955. // this.payableManage(data);
  956. // }
  957. },
  958. //对账单列表
  959. createInvoice(
  960. row = {},
  961. invoiceType,
  962. tableInfo = {},
  963. isOtherSourceFlag = true,
  964. dialogType = 'add'
  965. ) {
  966. this.dialogType = dialogType;
  967. this.init(row, dialogType);
  968. this.form.type = tableInfo.type;
  969. this.$set(this.form, 'sourceType', invoiceType);
  970. // this.form.sourceType=invoiceType
  971. setTimeout(() => {
  972. this.getAccountData(tableInfo);
  973. }, 400);
  974. },
  975. //获取详情
  976. async getInfo(id) {
  977. this.form = await invoiceApplyInfoV2API(id);
  978. this.$nextTick(() => {
  979. this.$refs.tableInfoRef.putValue(this.form);
  980. })
  981. },
  982. //获取分类管理中的数据
  983. async getClassifyList(id, listName) {
  984. let res = await getTreeByPid(id);
  985. this[listName] = res.data;
  986. },
  987. //获取费用类别选中数据
  988. changeFeeTypeInfo(val) {
  989. if (!val) {
  990. this.form.feeTypeName = '';
  991. this.form.feeTypeCode = '';
  992. }
  993. let data = this.$refs.feeTypeTree?.$refs?.tree?.getCurrentNode() || {};
  994. this.form.feeTypeName = data.name;
  995. this.form.feeTypeCode = data.code;
  996. },
  997. //获取会计科目选中数据
  998. changeSubjectInfo(val) {
  999. if (!val) return (this.form.accountingSubjectName = '');
  1000. let data = this.$refs.treeSelect?.$refs?.tree?.getCurrentNode() || {};
  1001. this.form.accountingSubjectName = data.name;
  1002. },
  1003. // 获取部门数据
  1004. getDeptList() {
  1005. listOrganizations().then((list) => {
  1006. this.deptList = list;
  1007. this.deptTreeList = this.$util.toTreeData({
  1008. data: list,
  1009. idField: 'id',
  1010. parentIdField: 'parentId'
  1011. });
  1012. });
  1013. },
  1014. // 选择负责人部门
  1015. changeDeptInfo(id) {
  1016. const info = this.deptList.find((e) => e.id == id) || {};
  1017. this.form.applyDeptName = info.name;
  1018. this.form.applyUserId = '';
  1019. this.form.applyUserName = '';
  1020. this.getUserList(id);
  1021. },
  1022. // 获取人员数据
  1023. getUserList(deptId) {
  1024. if (deptId) {
  1025. this.$refs.directorRef.getList({ deptId });
  1026. }
  1027. },
  1028. //选择人员数据
  1029. changeUserInfo(val, info) {
  1030. this.form.applyUserName = info.name;
  1031. },
  1032. //
  1033. handleSelType(val) {
  1034. this.form = Object.assign({}, this.form, defForm);
  1035. if (val == 'isType') {
  1036. this.$set(this.form, 'sourceType', '');
  1037. }
  1038. this.form.receiptPayments = [];
  1039. this.$refs.tableInfoRef.clearTable();
  1040. this.enterpriseChange(this.enterprisePage[0]?.name);
  1041. },
  1042. setPrice(val) {
  1043. this.form.amount = val;
  1044. },
  1045. //系统公司信息
  1046. enterpriseChange(name) {
  1047. let data = this.enterprisePage.find((item) => item.name == name);
  1048. if (this.form.type == 2) {
  1049. this.form.companyName = data?.name;
  1050. this.form.companyUsc = data?.unifiedSocialCreditCode;
  1051. this.form.companyAddress = data?.address;
  1052. this.form.companyTel = data?.tel;
  1053. this.form.companyContactName = data?.contact;
  1054. } else {
  1055. this.form.receiverName = data?.name;
  1056. this.form.receiverAddress = data?.address;
  1057. this.form.salesCompanyUsc = data?.unifiedSocialCreditCode;
  1058. this.form.receiverTel = data?.tel;
  1059. this.form.receiverContactName = data?.contact;
  1060. }
  1061. this.$forceUpdate();
  1062. },
  1063. invoiceAmountChange(item, sum) {
  1064. console.log('item~~~', item, sum);
  1065. const sameKeyItems = this.form.receiptPayments.filter((d) => d.relatedOrderNo === item.key)
  1066. console.log('sameKeyItems~~~', sameKeyItems);
  1067. let remainingTotal = sum;
  1068. const lastIndex = sameKeyItems.length - 1;
  1069. // 从上到下分配 sum 给相同订单号的数据,多余数量放在最后一个
  1070. sameKeyItems.forEach((paymentItem, index) => {
  1071. if (remainingTotal <= 0) {
  1072. paymentItem.invoiceAmount = 0;
  1073. } else if (index === lastIndex) {
  1074. // 最后一个分配所有剩余
  1075. paymentItem.invoiceAmount = remainingTotal.toFixed(2);
  1076. } else {
  1077. const unInvoiceAmount = parseFloat(paymentItem.unInvoiceAmount) || 0;
  1078. const allocateAmount = Math.min(remainingTotal, unInvoiceAmount);
  1079. paymentItem.invoiceAmount = allocateAmount.toFixed(2);
  1080. remainingTotal -= allocateAmount;
  1081. }
  1082. });
  1083. this.updateInvoiceAmount();
  1084. console.log('分配完成后的 sameKeyItems:', sameKeyItems);
  1085. },
  1086. updatePlanPaymentAmount(item) {
  1087. console.log('item~~~', item);
  1088. item.unInvoiceAmount = item.planPaymentAmount - item.invoicedAmount;
  1089. // 更新关联物品清单中的 defaultAmountTotalPrice
  1090. const tableInfoRef = this.$refs.tableInfoRef;
  1091. if (tableInfoRef && item.relatedOrderNo) {
  1092. const key = item.relatedOrderNo;
  1093. const newTotal = this.form.receiptPayments
  1094. .filter((d) => d.relatedOrderNo === key)
  1095. .reduce((sum, d) => sum + (parseFloat(d.unInvoiceAmount) || 0), 0);
  1096. tableInfoRef.tableForm.detailList.forEach((detail) => {
  1097. if (detail.key === key) {
  1098. this.$set(detail, 'defaultAmountTotalPrice', newTotal.toFixed(2));
  1099. }
  1100. });
  1101. }
  1102. },
  1103. getValidate() {
  1104. console.log(this.form);
  1105. let arr = [
  1106. new Promise((resolve, reject) => {
  1107. this.$refs.form.validate((valid) => {
  1108. if (!valid) {
  1109. reject(false);
  1110. } else {
  1111. resolve(true);
  1112. }
  1113. });
  1114. })
  1115. ];
  1116. // this.$refs.tableInfoRef.tableForm.detailList.forEach((item, index) => {
  1117. // arr.push(
  1118. // new Promise((resolve, reject) => {
  1119. // this.$refs.tableInfoRef.$ref['form'+index].validateForm((valid) => {
  1120. // if (!valid) {
  1121. // reject(false);
  1122. // } else {
  1123. // resolve(true);
  1124. // }
  1125. // });
  1126. // })
  1127. // );
  1128. // })
  1129. return Promise.all(arr);
  1130. },
  1131. async handleSave(flag) {
  1132. // this.$refs.form.validate(async (valid) => {
  1133. try {
  1134. const valid = await this.getValidate();
  1135. console.log('valid~~~',valid);
  1136. // if (!valid) return this.$message.warning('有必填项未填,请检查');
  1137. // if (this.form.sourceType != 4 || this.form.sourceType != 5) {
  1138. // tableData = await this.$refs.table.getTableValidate();
  1139. // }
  1140. // // 校验表格数据
  1141. // const tableValid = await new Promise((resolve) => {
  1142. // this.$refs.table.validateForm((valid) => {
  1143. // resolve(valid);
  1144. // });
  1145. // });
  1146. const tableValid = await this.$refs.tableInfoRef.getTableValidate();
  1147. console.log('tableValid~~~',tableValid);
  1148. // if (!tableValid) {
  1149. // return;
  1150. // }
  1151. let tableData = this.$refs.tableInfoRef.getTableData();
  1152. // this.form.link = tableData.link;
  1153. this.form.productMap = tableData;
  1154. console.log('commitData~~~',this.form);
  1155. const API =
  1156. this.dialogType == 'add'
  1157. ? invoiceApplyCreateAPI
  1158. : invoiceApplyUpdateV2API;
  1159. const id = await API(this.form);
  1160. if (this.form.sourceType == 2) {
  1161. updateContractStatus([this.form.sourceId]);
  1162. }
  1163. if (flag) {
  1164. await this.handleSub(id);
  1165. return;
  1166. }
  1167. this.$message.success('操作成功');
  1168. this.done();
  1169. this.cancel();
  1170. // });
  1171. } catch (error) {
  1172. // this.$message.warning('有必填项未填,请检查');
  1173. }
  1174. },
  1175. //
  1176. handleSave1(flag) {
  1177. this.$refs.form.validate(async (valid) => {
  1178. if (!valid) return this.$message.warning('有必填项未填,请检查');
  1179. let tableData = {};
  1180. if (this.form.sourceType != 4 || this.form.sourceType != 5) {
  1181. tableData = await this.$refs.table.getTableValidate();
  1182. }
  1183. // 校验表格数据
  1184. const tableValid = await new Promise((resolve) => {
  1185. this.$refs.table.validateForm((valid) => {
  1186. resolve(valid);
  1187. });
  1188. });
  1189. if (!tableValid) {
  1190. return;
  1191. }
  1192. this.form.link = tableData.link;
  1193. this.form.detailList = tableData.detailList;
  1194. const API =
  1195. this.dialogType == 'add'
  1196. ? invoiceApplySaveAPI
  1197. : invoiceApplyUpdateV2API;
  1198. const id = await API(this.form);
  1199. if (this.form.sourceType == 2) {
  1200. updateContractStatus([this.form.sourceId]);
  1201. }
  1202. if (flag) {
  1203. await this.handleSub(id);
  1204. return;
  1205. }
  1206. this.$message.success('操作成功');
  1207. this.done();
  1208. this.cancel();
  1209. });
  1210. },
  1211. //提交-开启流程
  1212. async handleSub(id = '') {
  1213. let data = await invoiceApplyInfoV2API(this.businessId || id);
  1214. this.processSubmitDialogFlag = true;
  1215. let key =
  1216. data.type == 1 ? 'fin_invoice_apply' : 'fin_invoice_receive_apply';
  1217. this.$nextTick(() => {
  1218. let params = {
  1219. businessId: data.id,
  1220. businessKey: key,
  1221. formCreateUserId: data.createUserId,
  1222. variables: {
  1223. type: data.type,
  1224. businessCode: data.orderNo,
  1225. businessName: data.companyName,
  1226. businessType: data.type == 1 ? '开票' : '收票'
  1227. }
  1228. // callBackMethodType : '1',
  1229. // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
  1230. // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
  1231. // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
  1232. // miniHandle : '',
  1233. // miniView : '',
  1234. };
  1235. this.$refs.processSubmitDialogRef.init(params);
  1236. });
  1237. // try {
  1238. // await invoiceApplySubmit({
  1239. // businessId: id || this.form.id,
  1240. // type: this.form.type
  1241. // });
  1242. // } catch (e) {
  1243. // this.$message.error(e.message);
  1244. // }
  1245. },
  1246. reload() {
  1247. this.done();
  1248. this.cancel();
  1249. },
  1250. //刷新主列表数据
  1251. done() {
  1252. this.$emit('reload');
  1253. },
  1254. //关闭弹窗
  1255. cancel() {
  1256. this.$emit('update:addOrEditDialogFlag', false);
  1257. }
  1258. }
  1259. };
  1260. </script>
  1261. <style scoped lang="scss">
  1262. .el-form-box .el-table .el-table__row .el-table__cell {
  1263. padding: 10px 0;
  1264. }
  1265. .payinfo .el-form-item {
  1266. margin-bottom: 0!important;
  1267. }
  1268. </style>