detailCreditLine.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. <template>
  2. <div class="app-container">
  3. <el-form ref="form" :label-position="labelPosition" :model="form" :rules="rules" label-width="106px" disabled>
  4. <el-divider content-position="left">授信信息</el-divider>
  5. <el-row>
  6. <el-col :span="8">
  7. <el-form-item label="资金方:" prop="zfpcrFundSide">
  8. <el-select v-model="form.zfpcrFundSide" style="width : 284px" clearable>
  9. <el-option
  10. v-for="(item,index) in zfCompanyList"
  11. :key="index"
  12. :label="item.scyName"
  13. :value="item.scyId"
  14. ></el-option>
  15. </el-select>
  16. </el-form-item>
  17. </el-col>
  18. <el-col :span="8">
  19. <el-form-item label="融资产品:" prop="zfpcrProductId">
  20. <el-select v-model="form.zfpcrProductId" style="width : 284px" clearable>
  21. <el-option
  22. v-for="(item,index) in financeProductList"
  23. :key="index"
  24. :label="item.zfpName"
  25. :value="item.zfpId"
  26. ></el-option>
  27. </el-select>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="8">
  31. <el-form-item label="授信企业名称:" prop="zfpcrCompanyId">
  32. <el-select v-model="form.zfpcrCompanyId" style="width : 284px" clearable>
  33. <el-option
  34. v-for="(item,index) in hxCompanyList"
  35. :key="index"
  36. :label="item.scyName"
  37. :value="item.scyId"
  38. ></el-option>
  39. </el-select>
  40. </el-form-item>
  41. </el-col>
  42. </el-row>
  43. <el-row>
  44. <el-col :span="8">
  45. <el-form-item label="原授信额度:" prop="zfpcrOldAmount" >
  46. <el-input v-model="form.zfpcrOldAmount" style="width:284px" disabled>
  47. <template slot="append">元</template>
  48. </el-input>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="8">
  52. <el-form-item label="已用授信额度:" prop="zfiAmount" >
  53. <el-input v-model="form.zfiAmount" style="width:284px" disabled>
  54. <template slot="append">元</template>
  55. </el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="8">
  59. <el-form-item label="剩余授信额度:" prop="usableAmount" >
  60. <el-input v-model="form.usableAmount" style="width:284px" disabled>
  61. <template slot="append">元</template>
  62. </el-input>
  63. </el-form-item>
  64. </el-col>
  65. </el-row>
  66. <el-row>
  67. <el-col :span="8">
  68. <el-form-item label="授信额度:" prop="zfpcrAmount">
  69. <!-- <el-tooltip class="item" effect="light" :content= "zfpcrAmountFormat" placement="top-start"> -->
  70. <el-input v-model="form.zfpcrAmount" placeholder="请输入授信额度" style="width:284px">
  71. <template slot="append">元</template>
  72. </el-input>
  73. <!-- </el-tooltip> -->
  74. </el-form-item>
  75. </el-col>
  76. <el-col :span="8">
  77. <el-form-item label="利率:" prop="zfpcrRate">
  78. <el-input v-model="form.zfpcrRate" placeholder="请输入利率" style="width:284px">
  79. <template slot="append">%起</template>
  80. </el-input>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="8">
  84. <el-form-item label="有效期:" prop="zfpcrDateType">
  85. <el-radio-group v-model="form.zfpcrDateType" size="medium">
  86. <el-radio-button v-for="(dict,index) in dateTypeOptions" :key="index" :label="dict.dictValue" border>{{dict.dictLabel}}</el-radio-button>
  87. </el-radio-group>
  88. </el-form-item>
  89. </el-col>
  90. </el-row>
  91. <el-row>
  92. <el-col :span="8">
  93. <el-form-item label="有效期范围:" prop="dateTime" v-if="this.form.zfpcrDateType == '1'">
  94. <el-date-picker
  95. v-model="form.dateTime"
  96. clearable
  97. style="width: 284px"
  98. unlink-panels
  99. value-format="yyyy-MM-dd"
  100. type="daterange"
  101. range-separator="-"
  102. start-placeholder="开始日期"
  103. end-placeholder="结束日期">
  104. </el-date-picker>
  105. </el-form-item>
  106. </el-col>
  107. <el-col :span="8">
  108. <el-form-item label="融资网点:" prop="zfpcrAddress">
  109. <el-input v-model="form.zfpcrAddress" placeholder="请输入融资网点" style="width:284px"/>
  110. </el-form-item>
  111. </el-col>
  112. <el-col :span="8">
  113. <el-form-item label="是否收取手续费:" prop="zfpcrCharge" label-width="113px">
  114. <el-radio-group v-model="form.zfpcrCharge" size="medium" >
  115. <el-radio-button v-for="(dict,index) in chargeOptions" :key="index" :label="dict.dictValue" border>{{dict.dictLabel}}</el-radio-button>
  116. </el-radio-group>
  117. </el-form-item>
  118. </el-col>
  119. </el-row>
  120. <el-row>
  121. <el-col :span="8">
  122. <el-form-item label="平台服务费收取费率:" prop="zfpcrChargeRate" label-width="139px" v-if="this.form.zfpcrCharge == '1'">
  123. <el-input v-model="form.zfpcrChargeRate" placeholder="请输入平台服务费收取费率" style="width:284px">
  124. <template slot="append">%</template>
  125. </el-input>
  126. </el-form-item>
  127. </el-col>
  128. <el-col :span="8">
  129. <el-form-item label="核心企业还款账户账号:" prop="zfpcrAccount" label-width="142px">
  130. <el-autocomplete
  131. style="width:286px"
  132. class="inline-input"
  133. v-model="form.zfpcrAccount"
  134. :fetch-suggestions="querySearch"
  135. placeholder="核心企业还款账户账号"
  136. ></el-autocomplete>
  137. </el-form-item>
  138. </el-col>
  139. <el-col :span="8">
  140. <el-form-item label="核心企业还款账户开户行:" prop="zfpcrAccountBank" label-width="142px">
  141. <el-input v-model="form.zfpcrAccountBank" placeholder="请输入核心企业还款账户开户行" style="width:284px" maxlength="30" readonly>
  142. </el-input>
  143. </el-form-item>
  144. </el-col>
  145. </el-row>
  146. <el-row>
  147. <el-col :span="8">
  148. <el-form-item label="融资放款方式:" prop="zfpcrLoanType">
  149. <el-select v-model="form.zfpcrLoanType" placeholder="请选择状态" clearable style="width : 284px" clearable>
  150. <el-option
  151. v-for="dict in loanTypeOptions"
  152. :key="dict.dictValue"
  153. :label="dict.dictLabel"
  154. :value="dict.dictValue"
  155. />
  156. </el-select>
  157. </el-form-item>
  158. </el-col>
  159. <el-col :span="8">
  160. <el-form-item label="记账簿托管方式:" prop="zfpcrBookkeepingType" label-width="113px">
  161. <el-select v-model="form.zfpcrBookkeepingType" placeholder="请选择状态" clearable style="width : 284px" clearable>
  162. <el-option
  163. v-for="dict in bookkeepingTypeOptions"
  164. :key="dict.dictValue"
  165. :label="dict.dictLabel"
  166. :value="dict.dictValue"
  167. />
  168. </el-select>
  169. </el-form-item>
  170. </el-col>
  171. </el-row>
  172. <el-divider content-position="left">关联合同</el-divider>
  173. <el-form-item prop="zfqcrContractId" style="margin-left: 100px" >
  174. <!-- <el-button size="mini" type="primary" @click="openTicket">选择合同</el-button>
  175. <el-button size="mini" @click="deleteTicekt">清空全部</el-button> -->
  176. <el-table :data="ticketList" style="width: 1100px">
  177. <el-table-column label="序号" type="index" width="50" align="center">
  178. <template slot-scope="scope">
  179. <span>{{ (queryParamsContract.pageNum - 1) * queryParamsContract.pageSize + scope.$index + 1}}</span>
  180. </template>
  181. </el-table-column>
  182. <el-table-column label="合同模板名称" align="center" prop="zfcName" />
  183. <el-table-column label="签署节点" align="center" prop="zfcNode" :formatter="nodeFormat"/>
  184. <el-table-column label="合同id" align="center" prop="zfcId" v-if="false" />
  185. <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
  186. <template slot-scope="scope">
  187. <el-button
  188. size="mini"
  189. type="text"
  190. icon="el-icon-delete"
  191. @click="handleDelete(scope.$index, ticketList)"
  192. >删除</el-button>
  193. </template>
  194. </el-table-column> -->
  195. </el-table>
  196. </el-form-item>
  197. </el-form>
  198. <!-- 合同信息 -->
  199. <el-dialog :title="title" :visible.sync="open" width="1120px" append-to-body>
  200. <el-form :model="queryParamsContract" ref="formQuery" :inline="true" label-width="68px" style="margin-bottom: -21px">
  201. <el-form-item label="合同模板编号" prop="zfcNumber">
  202. <el-input
  203. v-model="queryParamsContract.zfcNumber"
  204. placeholder="请输入合同模板编号"
  205. clearable
  206. size="small"
  207. maxlength="11"
  208. @keyup.enter.native="handleQuerys"/>
  209. </el-form-item>
  210. <el-form-item label="合同模板名称" prop="zfcName">
  211. <el-input
  212. v-model="queryParamsContract.zfcName"
  213. placeholder="请输入合同模板名称"
  214. clearable
  215. size="small"
  216. maxlength="11"
  217. @keyup.enter.native="handleQuerys"/>
  218. </el-form-item>
  219. <el-form-item>
  220. <el-button
  221. type="cyan"
  222. icon="el-icon-search"
  223. size="mini"
  224. @click="handleQuerys"
  225. >搜索</el-button>
  226. <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys"
  227. >重置</el-button>
  228. </el-form-item>
  229. </el-form>
  230. <el-table :data="contractList"
  231. ref="tableContract"
  232. class="single-select-table"
  233. @selection-change="handleSelectionChange"
  234. :row-key="rowkey">
  235. <el-table-column
  236. type="selection"
  237. :reserve-selection="true"
  238. width="50"
  239. align="center"/>
  240. <el-table-column label="序号" type="index" width="50" align="center">
  241. <template slot-scope="scope">
  242. <span>{{ (queryParamsContract.pageNum - 1) * queryParamsContract.pageSize + scope.$index + 1}}</span>
  243. </template>
  244. </el-table-column>
  245. <el-table-column label="合同模板编号" align="center" prop="zfcNumber" show-overflow-tooltip />
  246. <el-table-column label="合同模板名称" align="center" prop="zfcName" />
  247. <el-table-column label="签署节点" align="center" prop="zfcNode" :formatter="nodeFormat"/>
  248. </el-table>
  249. <pagination
  250. v-show="total > 0"
  251. :total="total"
  252. :page.sync="queryParamsContract.pageNum"
  253. :limit.sync="queryParamsContract.pageSize"
  254. @pagination="getContractList" />
  255. <span slot="footer" class="dialog-footer">
  256. <el-button size="mini" @click="cancelTicket">取消</el-button>
  257. <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
  258. </span>
  259. </el-dialog>
  260. <div class="footer" style="margin-top: 100px; float: right">
  261. <el-button type="info" @click="cancel">取消</el-button>
  262. <!-- <el-button type="success" @click="submitForm"
  263. >提交</el-button> -->
  264. </div>
  265. </div>
  266. </template>
  267. <script>
  268. import { listCreditLine, getCreditLine, delCreditLine, addCreditLine, updateCreditLine} from "@/api/service/creditLine/creditLine";
  269. import { listFinanceProduct } from "@/api/common/financeProduct"
  270. import { listCompany } from "@/api/common/company"
  271. import { listCompanyAcc } from "@/api/common/companyAcc"
  272. export default {
  273. name: "detailCreditLine",
  274. components: {},
  275. data() {
  276. return {
  277. //金额展示
  278. zfpcrAmountFormat: '',
  279. //还款账户搜所
  280. restaurants: [],
  281. labelPosition: 'top',
  282. // 遮罩层
  283. loading: true,
  284. // 选中数组
  285. ids: [],
  286. // 非单个禁用
  287. single: true,
  288. // 非多个禁用
  289. multiple: true,
  290. // 显示搜索条件
  291. showSearch: true,
  292. // 总条数
  293. total: 0,
  294. // 企业授信额度表格数据
  295. creditLineList: [],
  296. //资金方数据
  297. zfCompanyList: [],
  298. //融资产品数据
  299. financeProductList: [],
  300. //核心企业数据
  301. hxCompanyList: [],
  302. //核心企业还款账户数据:
  303. accList: [],
  304. //合同表格数据
  305. ticketList: [],
  306. //合同列表数据
  307. contractList: [],
  308. //有效期数据字典
  309. dateTypeOptions: [],
  310. //是否收取手续费数据字典
  311. chargeOptions: [],
  312. //融资放款方式数据字典
  313. loanTypeOptions: [],
  314. //记账簿托管方式数据字典
  315. bookkeepingTypeOptions: [],
  316. //签署节点数据字典
  317. nodeOptions: [],
  318. // 弹出层标题
  319. title: "",
  320. // 是否显示弹出层
  321. open: false,
  322. // 查询参数
  323. queryParams: {
  324. pageNum: 1,
  325. pageSize: 10,
  326. zfpcrProductId: null,
  327. zfpcrCompanyId: null,
  328. zfpcrType: null,
  329. zfpcrAmount: null,
  330. zfpcrRate: null,
  331. zfpcrDivisionAmount: null,
  332. zfpcrDateType: null,
  333. zfpcrStartDate: null,
  334. zfpcrEndDate: null,
  335. zfpcrAddress: null,
  336. zfpcrCharge: null,
  337. zfpcrChargeRate: null,
  338. zfpcrAccount: null,
  339. zfpcrLoanType: null,
  340. zfpcrBookkeepingType: null,
  341. zfpcrStatus: null,
  342. zfpcrProfitSpare1: null,
  343. zfpcrProfitSpare2: null,
  344. zfpcrProfitSpare3: null,
  345. zfpcrProfitSpare4: null,
  346. zfpcrProfitSpare5: null,
  347. zfpcrProfitSpare6: null,
  348. zfpcrProfitSpare7: null,
  349. zfpcrProfitSpare8: null,
  350. zfpcrProfitSpare9: null,
  351. },
  352. queryParamsContract: {
  353. pageNum: 1,
  354. pageSize: 10,
  355. zfcId: null,
  356. zfcName: null,
  357. zfcNumber: null,
  358. zfcManagementId: null
  359. },
  360. // 表单参数
  361. form: {
  362. zfpcrDateType: '0',
  363. zfpcrCharge: '1'
  364. },
  365. // 表单校验
  366. rules: {
  367. zfpcrFundSide: [
  368. { required: true, message: "资金方不能为空", trigger: ["blur", "change"] }
  369. ],
  370. zfpcrProductId: [
  371. { required: true, message: "融资产品不能为空", trigger: ["blur", "change"] }
  372. ],
  373. zfpcrCompanyId: [
  374. { required: true, message: "授信企业名称不能为空", trigger: ["blur", "change"] }
  375. ],
  376. zfpcrAmount: [
  377. { required: true, message: "授信额度不能为空", trigger: ["blur", "change"] },
  378. {
  379. pattern: /^[0-9][0-9]{0,7}$|^[1-9][0-9]{0,7}[.]\d{1,2}$/,
  380. message: "请输入正确的额度",
  381. trigger: "change",
  382. },
  383. ],
  384. zfpcrRate: [
  385. { required: true, message: "利率不能为空", trigger: ["blur", "change"] },
  386. {
  387. pattern: /^([0-9]{1,2}$)|(^[0-9]{1,2}\.[0-9]{1,2}$)|100$/,
  388. message: "请输入正确的利率",
  389. trigger: "change",
  390. },
  391. ],
  392. dateTime: [
  393. { required: true, message: "有效期范围不能为空", trigger: ["blur", "change"] }
  394. ],
  395. zfpcrChargeRate: [
  396. { required: true, message: "平台服务费收取费率不能为空", trigger: ["blur", "change"] },
  397. {
  398. pattern: /^([0-9]{1,2}$)|(^[0-9]{1,2}\.[0-9]{1,2}$)|100$/,
  399. message: "请输入正确的平台服务费收取费率",
  400. trigger: "change",
  401. },
  402. ],
  403. zfpcrAccount: [
  404. { required: true, message: "核心企业还款账户账号", trigger: ["blur", "change"] }
  405. ],
  406. zfpcrAccountBank: [
  407. { required: true, message: "核心企业还款账户开户行", trigger: ["blur", "change"] }
  408. ],
  409. zfpcrLoanType: [
  410. { required: true, message: "融资放款方式不能为空", trigger: ["blur", "change"] }
  411. ],
  412. zfpcrBookkeepingType: [
  413. { required: true, message: "记账簿托管方式不能为空", trigger: ["blur", "change"] }
  414. ],
  415. }
  416. };
  417. },
  418. created() {
  419. const zfpcrId = this.$route.params && this.$route.params.zfpcrId;
  420. const zfiAmount = this.$route.params && this.$route.params.zfiAmount;
  421. const usableAmount = this.$route.params && this.$route.params.usableAmount;
  422. var self =this;
  423. getCreditLine(zfpcrId).then((response) => {
  424. this.ticketList = response.data.ticketList;
  425. /* 查询资方 */
  426. //公司类型
  427. const scyType = '03';
  428. //公司id
  429. const scyId = response.data.list[0].zfpManagementId;
  430. listCompany(scyType,scyId).then((response) =>{
  431. this.zfCompanyList = response.data
  432. });
  433. /* 查询融资产品 */
  434. //产品id
  435. const zfpcrProductId = response.data.list[0].zfpcrProductId;
  436. listFinanceProduct(zfpcrProductId).then((response) =>{
  437. this.financeProductList = response.data
  438. });
  439. /* 查询授信企业名称 */
  440. //公司类型
  441. const scyTypes = '01';
  442. //公司id
  443. const scyIds = response.data.list[0].zfpcrCompanyId;
  444. listCompany(scyTypes,scyIds).then((response) =>{
  445. this.hxCompanyList = response.data
  446. });
  447. /* 查询还款账户 */
  448. //银行卡号
  449. const zfpcrAccount = response.data.list[0].zfpcrAccount;
  450. listCompanyAcc(zfpcrAccount).then((response) =>{
  451. this.accList = response.data
  452. this.restaurants = response.data;
  453. }).then(()=>{
  454. self.form = response.data.list[0]
  455. self.form.zfpcrFundSide = self.zfCompanyList[0].scyId;
  456. this.$set(this.form, "dateTime", [response.data.list[0].zfpcrStartDate, response.data.list[0].zfpcrEndDate])
  457. this.$set(this.form, "zfiAmount", zfiAmount);
  458. this.$set(this.form, "usableAmount", usableAmount);
  459. });
  460. });
  461. // this.getZfCompany();
  462. // this.getFinanceProduct();
  463. // this.getHxCompany();
  464. // this.getCompanyAcc();
  465. this.getDicts("zc_zfpcr_date_type").then(response => {
  466. this.dateTypeOptions = response.data;
  467. });
  468. this.getDicts("zc_zfpcr_charge").then(response => {
  469. this.chargeOptions = response.data;
  470. });
  471. this.getDicts("zc_zfpcr_loan_type").then(response => {
  472. this.loanTypeOptions = response.data;
  473. });
  474. this.getDicts("zc_zfpcr_bookkeeping_type").then(response => {
  475. this.bookkeepingTypeOptions = response.data;
  476. });
  477. this.getDicts("zc_zfc_node").then((response) => {
  478. this.nodeOptions = response.data;
  479. });
  480. },
  481. methods: {
  482. /* 资方公司 */
  483. getZfCompany(){
  484. //公司类型
  485. const scyType = '03'
  486. listCompany(scyType).then((response) =>{
  487. this.zfCompanyList = response.data
  488. })
  489. },
  490. /* 融资产品 */
  491. getFinanceProduct(){
  492. listFinanceProduct().then((response) =>{
  493. this.financeProductList = response.data
  494. })
  495. },
  496. /* 授信企业 */
  497. getHxCompany(){
  498. //公司类型
  499. const scyTypes = '01'
  500. listCompany(scyTypes).then((response) =>{
  501. this.hxCompanyList = response.data
  502. })
  503. },
  504. /* 核心企业还款账户账号 */
  505. getCompanyAcc(){
  506. listCompanyAcc().then((response) =>{
  507. this.accList = response.data
  508. this.restaurants = response.data;
  509. })
  510. },
  511. /* 账户模糊搜所 */
  512. querySearch(queryString, cb) {
  513. var restaurants = this.restaurants;
  514. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
  515. // 调用 callback 返回建议列表的数据
  516. cb(results);
  517. },
  518. createFilter(queryString) {
  519. return (restaurant) => {
  520. return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
  521. };
  522. },
  523. /* 合同相关 */
  524. //合同列表
  525. getContractList() {
  526. this.queryParamsContract.zfcManagementId = this.form.zfpcrFundSide
  527. listContract(this.queryParamsContract).then((response) => {
  528. this.contractList = response.data.records;
  529. this.selectChecked();
  530. this.total = response.data.total;
  531. });
  532. },
  533. //打开合同选择列表
  534. openTicket() {
  535. this.getContractList()
  536. this.open = true
  537. this.title = "合同信息"
  538. },
  539. selectChecked() {
  540. this.ticketList.forEach((item) => {
  541. this.contractList.forEach(row => {
  542. if (row.zfcId == item.zfcId) {
  543. this.$nextTick(() => {
  544. this.$refs.tableContract && this.$refs.tableContract.toggleRowSelection(row, true);
  545. })
  546. }
  547. });
  548. });
  549. },
  550. /* 多选框跨页 */
  551. rowkey(row) {
  552. return row.zfcId;
  553. },
  554. // 多选框选中数据
  555. handleSelectionChange(val) {
  556. this.chooseTicket = val
  557. },
  558. // 确认选择
  559. closeTicket() {
  560. if(this.chooseTicket.length > 0){
  561. this.ticketList = this.chooseTicket
  562. this.$set(this.form, "zfcName", this.ticketList[0].zfcName);
  563. this.$set(this.form, "zfcNumber", this.ticketList[0].zfcNumber);
  564. this.$set(this.form, "zfcSubject", this.ticketList[0].zfcSubject);
  565. this.$set(this.form, "zfcId", this.ticketList[0].zfcId);
  566. this.open = false
  567. }else{
  568. this.$message({
  569. message: '请选择合同',
  570. type: 'warning'
  571. });
  572. }
  573. },
  574. //取消选择合同按钮
  575. cancelTicket(){
  576. this.ticketList = [];
  577. if(this.$refs.tableContract){
  578. this.$refs.tableContract.clearSelection();
  579. }
  580. this.open = false;
  581. },
  582. // 取消按钮
  583. cancel() {
  584. // this.reset();
  585. this.$store.dispatch("tagsView/delView", this.$route);
  586. this.$router.go(-1);
  587. this.open = false;
  588. },
  589. /** 清空选择发票信息 */
  590. deleteTicekt() {
  591. this.ticketList = []
  592. if(this.$refs.tableContract){
  593. this.$refs.tableContract.clearSelection();
  594. }
  595. },
  596. /* 删除按钮 */
  597. handleDelete(index, rows) {
  598. rows.splice(index, 1);
  599. if(this.$refs.tableContract){
  600. this.$refs.tableContract.clearSelection();
  601. }
  602. this.selectChecked();
  603. },
  604. onSelectAll() {
  605. if(this.$refs.tableContract){
  606. this.$refs.tableContract.clearSelection();
  607. }
  608. },
  609. handleQuerys() {
  610. this.queryParamsContract.pageNum = 1;
  611. this.getContractList();
  612. },
  613. resetQuerys() {
  614. this.resetForm("formQuery");
  615. this.handleQuerys();
  616. },
  617. /** 提交按钮 */
  618. submitForm() {
  619. // if(this.ticketList == undefined || this.ticketList.length == 0){
  620. // this.$message({
  621. // message: '请选择合同',
  622. // type: 'warning'
  623. // });
  624. // return;
  625. // }
  626. this.$refs["form"].validate(valid => {
  627. this.form.ticketList = this.ticketList;
  628. if (valid) {
  629. const loading = this.$loading({
  630. lock: true,
  631. text: "Loading",
  632. spinner: "el-icon-loading",
  633. background: "rgba(0, 0, 0, 0.7)",
  634. });
  635. addCreditLine(this.form).then(response => {
  636. this.msgSuccess("新增成功");
  637. this.$store.dispatch("tagsView/delView", this.$route);
  638. this.$router.go(-1);
  639. }).catch((response) => {
  640. loading.close();
  641. });
  642. }
  643. });
  644. },
  645. //签署节点字典反显
  646.     nodeFormat(row, column) {
  647.       var zfcNodes = row.zfcNode.split(",");
  648.       var zfcNodeList='';
  649.       for(var i=0;i<zfcNodes.length;i++){
  650.         zfcNodeList += this.selectDictLabel(this.nodeOptions, zfcNodes[i]);
  651.         if(i < zfcNodes.length-1){
  652.           zfcNodeList +=",";
  653.         }
  654.       }
  655.       return zfcNodeList;
  656.     },
  657. /* 金额展示 */
  658. handleInput(str) {
  659. this.zfpcrAmountFormat = amtformat(str,2, ".", ",");
  660. },
  661. /* // 将数字金额转换为大写金额 */
  662. smallToBig(money) {
  663. // 将数字金额转换为大写金额
  664. var cnNums = new Array(
  665. "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ); //汉字的数字
  666. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  667. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  668. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  669. var cnInteger = "整"; //整数金额时后面跟的字符
  670. var cnIntLast = "元"; //整数完以后的单位
  671. //最大处理的数字
  672. var maxNum = 999999999999999.9999;
  673. var integerNum; //金额整数部分
  674. var decimalNum; //金额小数部分
  675. //输出的中文金额字符串
  676. var chineseStr = "";
  677. var parts; //分离金额后用的数组,预定义
  678. if (money == "" || money == null || money == undefined) {
  679. return "零元零角零分";
  680. }
  681. money = parseFloat(money);
  682. if (money >= maxNum) {
  683. //超出最大处理数字
  684. return "超出最大处理数字";
  685. }
  686. if (money == 0) {
  687. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  688. return chineseStr;
  689. }
  690. //四舍五入保留两位小数,转换为字符串
  691. money = Math.round(money * 100).toString();
  692. integerNum = money.substr(0, money.length - 2);
  693. decimalNum = money.substr(money.length - 2);
  694. //获取整型部分转换
  695. if (parseInt(integerNum, 10) > 0) {
  696. var zeroCount = 0;
  697. var IntLen = integerNum.length;
  698. for (var i = 0; i < IntLen; i++) {
  699. var n = integerNum.substr(i, 1);
  700. var p = IntLen - i - 1;
  701. var q = p / 4;
  702. var m = p % 4;
  703. if (n == "0") {
  704. zeroCount++;
  705. } else {
  706. if (zeroCount > 0) {
  707. chineseStr += cnNums[0];
  708. }
  709. //归零
  710. zeroCount = 0;
  711. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  712. }
  713. if (m == 0 && zeroCount < 4) {
  714. chineseStr += cnIntUnits[q];
  715. }
  716. }
  717. chineseStr += cnIntLast;
  718. }
  719. //小数部分
  720. if (decimalNum != "") {
  721. var decLen = decimalNum.length;
  722. for (var i = 0; i < decLen; i++) {
  723. var n = decimalNum.substr(i, 1);
  724. if (n != "0") {
  725. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  726. }
  727. }
  728. }
  729. if (chineseStr == "") {
  730. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  731. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  732. chineseStr += cnInteger;
  733. }
  734. return chineseStr;
  735. },
  736. },
  737. };
  738. </script>
  739. <style>
  740. .single-select-table thead .el-table-column--selection .cell {
  741. display: none;
  742. }
  743. </style>