interimPay.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. <!-- -->
  2. <template>
  3. <div style="height: 100%" class="flexStar">
  4. <div class="boxswai" style="width: 50%; padding-left: 0px">
  5. <div class="boxnei" style="display: flex; flex-direction: column">
  6. <avue-crud :data="data"
  7. ref="crud"
  8. :option="option"
  9. :page.sync="page"
  10. v-model="form"
  11. @on-load="onLoad">
  12. <template slot="menuLeft">
  13. <span style="font-weight: bold;"> 系统中期支付项列表</span>
  14. </template>
  15. <template slot="menuRight">
  16. <el-button type="primary" size="small" icon="el-icon-plus" @click="handleAdd">添加中期支付项</el-button>
  17. </template>
  18. <!-- 合同公式 -->
  19. <template
  20. slot-scope="{type}"
  21. slot="key11Form"
  22. >
  23. <div class="flexStar">
  24. <el-input :disabled="true" v-model="form.key11" style="width: 70%;margin-right: 10px;"></el-input>
  25. <el-link type="primary" @click="handleaddFormula">添加公式</el-link>
  26. <el-link type="primary" class="marleft10">删除公式</el-link>
  27. </div>
  28. </template>
  29. <template
  30. slot-scope="{type}"
  31. slot="key12Form"
  32. >
  33. <div class="flexStar">
  34. <el-input :disabled="true" v-model="form.key12" style="width: 70%;margin-right: 10px;"></el-input>
  35. <el-link type="primary" @click="handleaddFormula">添加公式</el-link>
  36. <el-link type="primary" class="marleft10">删除公式</el-link>
  37. </div>
  38. </template>
  39. <template
  40. slot-scope="{type}"
  41. slot="key13Form"
  42. >
  43. <div class="flexStar">
  44. <el-input :disabled="true" v-model="form.key13" style="width: 70%;margin-right: 10px;"></el-input>
  45. <el-link type="primary" @click="handleaddFormula">添加公式</el-link>
  46. <el-link type="primary" class="marleft10">删除公式</el-link>
  47. </div>
  48. </template>
  49. </avue-crud>
  50. <!-- 添加公式弹窗 -->
  51. <el-dialog
  52. title="添加公式"
  53. :visible.sync="addFormuladialog"
  54. append-to-body
  55. width="60%"
  56. :before-close="formuladialogClose">
  57. <avue-crud :data="fordata"
  58. :option="foroption"
  59. :page.sync="forpage"
  60. @row-click="rowClick"
  61. @on-load="foronLoad">
  62. <template slot="menuLeft">
  63. <div class="flex" style="align-items: center;">
  64. <span style="white-space: nowrap;"> 公式分类:</span>
  65. <el-select v-model="forType" placeholder="请选择">
  66. <el-option
  67. v-for="item in forOptions"
  68. :key="item.value"
  69. :label="item.label"
  70. :value="item.value">
  71. </el-option>
  72. </el-select>
  73. </div>
  74. </template>
  75. <template #radio="{row}">
  76. <el-radio v-model="selectRow"
  77. :label="row.$index">{{ row.$index+1 }}</el-radio>
  78. </template>
  79. </avue-crud>
  80. <span slot="footer" class="dialog-footer">
  81. <el-button @click="addFormuladialog = false">取 消</el-button>
  82. <el-button type="primary" @click="addFormuladialog = false">确 定</el-button>
  83. </span>
  84. </el-dialog>
  85. </div>
  86. </div>
  87. <div
  88. class="boxswai"
  89. style="width: 50%; padding-left: 0px; padding-right: 0px"
  90. >
  91. <div class="boxnei">
  92. <form id="inputForm" action="" method="post" class="form-horizontal">
  93. <h4>详情信息</h4>
  94. <table class="table-form" style="width: 100%;">
  95. <tbody>
  96. <tr>
  97. <td class="tit" width="20%">支付项编号:</td>
  98. <td id="code">100章</td>
  99. <td class="tit" width="20%">支付项名称:</td>
  100. <td id="itemName">100章</td>
  101. </tr>
  102. <tr>
  103. <td class="tit" width="20%">支付项类型:</td>
  104. <td id="itemType">100章</td>
  105. <td class="tit" width="20%">是否为扣款项:</td>
  106. <td id="negative">否</td>
  107. </tr>
  108. <tr>
  109. <td class="tit" width="20%">是否合计项:</td>
  110. <td id="sumItem">否</td>
  111. <td class="tit" width="20%">是否显示百分比:</td>
  112. <td id="showPercent">是</td>
  113. </tr>
  114. <tr>
  115. <td class="tit" width="20%">是否手动输入:</td>
  116. <td id="useHand">否</td>
  117. <td class="tit" width="20%">排序号:</td>
  118. <td id="orderNum">1</td>
  119. </tr>
  120. <tr>
  121. <td class="tit" width="20%">合同计算公式名称:</td>
  122. <td colspan="3" id="contractCalcName">章清单合同原总金额</td>
  123. </tr>
  124. <tr>
  125. <td class="tit" width="20%">变更计算公式名称:</td>
  126. <td colspan="3" id="alterationCalcName">章清单变更金额</td>
  127. </tr>
  128. <tr>
  129. <td class="tit" width="20%">本期计算公式名称:</td>
  130. <td colspan="3" id="calcName">章清单本期完成金额</td>
  131. </tr>
  132. <tr>
  133. <td class="tit" width="10%">备注:</td>
  134. <td colspan="3" id="remark"></td>
  135. </tr>
  136. </tbody></table>
  137. </form>
  138. <div class="totalbox">
  139. <avue-crud :data="totaldata" :option="totaloption" >
  140. <template slot="menuLeft">
  141. <span style="font-weight: bold;margin-right: 5px;">汇总项</span>
  142. <el-link type="primary" size="small"
  143. icon="el-icon-plus"
  144. @click="addTotal">添加汇总项</el-link>
  145. </template>
  146. </avue-crud>
  147. </div>
  148. </div>
  149. </div>
  150. <!-- 添加汇总项弹窗 -->
  151. <el-dialog
  152. append-to-body
  153. title="添加汇总项"
  154. :visible.sync="tatoldialogVisible"
  155. width="50%"
  156. :before-close="handleTatolClose">
  157. <avue-crud :data="tadddata"
  158. :option="taddoption"
  159. >
  160. </avue-crud>
  161. <span slot="footer" class="dialog-footer">
  162. <el-button @click="tatoldialogVisible = false">取 消</el-button>
  163. <el-button type="primary" @click="tatoldialogVisible = false">确 定</el-button>
  164. </span>
  165. </el-dialog>
  166. </div>
  167. </template>
  168. <script >
  169. export default {
  170. data () {
  171. return {
  172. page: {
  173. pageSize: 20,
  174. pagerCount: 5
  175. },
  176. form:{},
  177. data: [],
  178. option: {
  179. height: 'auto',
  180. refreshBtn:false,
  181. columnBtn:false,
  182. addBtn:false,
  183. tip: false,
  184. border: true,
  185. index: true,
  186. dialogWidth: 1000,
  187. calcHeight: 30,
  188. addBtnText:'新增支付项',
  189. menuWidth: 140,
  190. dialogClickModal: false,
  191. column: [
  192. { span: 24,
  193. labelWidth: 130,
  194. label: '支付项编号',
  195. prop: 'key1'
  196. },
  197. { span: 24,
  198. labelWidth: 130,
  199. label: '支付项名称',
  200. prop: 'key2',
  201. rules: [{
  202. required: true,
  203. message: "请输入名称",
  204. trigger: "blur"
  205. }]
  206. },
  207. { span: 24,
  208. labelWidth: 130,
  209. label: '支付项类型',
  210. prop: 'key3',
  211. type: "select",
  212. dicUrl: "/api/blade-system/dict-biz/dictionary?code=table_template_type",
  213. props: {
  214. label: "dictValue",
  215. value: "dictKey"
  216. },
  217. dataType: "number",
  218. rules: [{
  219. required: true,
  220. message: "选择类型",
  221. trigger: "blur"
  222. }]
  223. },
  224. { span: 24,
  225. labelWidth: 130,
  226. label: '合同计算公式名称',
  227. prop: 'key11',
  228. disabled:true,
  229. hide: true,
  230. },
  231. { span: 24,
  232. labelWidth: 130,
  233. label: '变更计算公式名称',
  234. prop: 'key12',
  235. disabled:true,
  236. hide: true,
  237. },
  238. { span: 24,
  239. labelWidth: 130,
  240. label: '本期计算公式名称',
  241. prop: 'key13',
  242. disabled:true,
  243. hide: true,
  244. },
  245. { span: 24,
  246. labelWidth: 130,
  247. label: '是否为扣款项',
  248. prop: 'key4',
  249. type: "select",
  250. dicData: [
  251. {
  252. label: "否",
  253. value: 0
  254. },
  255. {
  256. label: "是",
  257. value: 1
  258. }
  259. ],
  260. },
  261. { span: 24,
  262. labelWidth: 130,
  263. label: '是否加粗',
  264. prop: 'key21',
  265. type: "select",
  266. hide: true,
  267. dicData: [
  268. {
  269. label: "否",
  270. value: 0
  271. },
  272. {
  273. label: "是",
  274. value: 1
  275. }
  276. ],
  277. },
  278. { span: 24,
  279. labelWidth: 130,
  280. label: '是否手动输入',
  281. hide: true,
  282. prop: 'key22',
  283. type: "select",
  284. dicData: [
  285. {
  286. label: "否",
  287. value: 0
  288. },
  289. {
  290. label: "是",
  291. value: 1
  292. }
  293. ],
  294. },
  295. { span: 24,
  296. labelWidth: 130,
  297. label: '是否显示百分比',
  298. hide: true,
  299. prop: 'key22',
  300. type: "select",
  301. dicData: [
  302. {
  303. label: "否",
  304. value: 0
  305. },
  306. {
  307. label: "是",
  308. value: 1
  309. }
  310. ],
  311. },
  312. {
  313. labelWidth: 130,
  314. hide: true,
  315. span:24,
  316. label: '是否合计项',
  317. prop: 'key5',
  318. type: "select",
  319. dicData: [
  320. {
  321. label: "否",
  322. value: 0
  323. },
  324. {
  325. label: "是",
  326. value: 1
  327. }
  328. ],
  329. },
  330. {
  331. labelWidth: 130,
  332. span:24,
  333. label: '支付适用类型',
  334. prop: 'key6',
  335. type: "select",
  336. dicData: [
  337. {
  338. label: "承包商",
  339. value: 0
  340. },
  341. {
  342. label: "监理",
  343. value: 1
  344. }
  345. ],
  346. },
  347. { span: 24,
  348. hide: true,
  349. labelWidth: 130,
  350. label: '排序号',
  351. prop: 'key7',
  352. },
  353. { span: 24,
  354. hide: true,
  355. labelWidth: 130,
  356. label: '备注',
  357. prop: 'key8',
  358. type: "textarea",
  359. },
  360. ],
  361. },
  362. addFormuladialog:false,
  363. forpage: {
  364. pageSize: 20,
  365. pagerCount: 5
  366. },
  367. fordata: [],
  368. foroption: {
  369. border:true,
  370. align: 'center',
  371. refreshBtn:false,
  372. columnBtn:false,
  373. menu:false,
  374. addBtn:false,
  375. editBtn:false,
  376. delBtn:false,
  377. column: [
  378. {
  379. label: '选择',
  380. prop: 'radio',
  381. width: 60,
  382. hide: false
  383. },
  384. {
  385. label: '公式编号',
  386. prop: 'name'
  387. },
  388. {
  389. label: '公式名称',
  390. prop: 'sex'
  391. },
  392. {
  393. label: '公式备注',
  394. prop: 'key3'
  395. }
  396. ]
  397. },
  398. selectRow: '',
  399. forType:'',
  400. forOptions:[
  401. {
  402. value: '选项1',
  403. label: '公路计量'
  404. }, {
  405. value: '选项2',
  406. label: '监理服务'
  407. },
  408. ],
  409. totaldata: [
  410. {
  411. ids:1,
  412. name:'200',
  413. sex:'200章',
  414. key3:'否',
  415. key4:'否',
  416. key5:'承包商'
  417. },{
  418. ids:1,
  419. name:'200',
  420. sex:'200章',
  421. key3:'否',
  422. key4:'否',
  423. key5:'承包商'
  424. },
  425. {
  426. ids:1,
  427. name:'200',
  428. sex:'200章',
  429. key3:'否',
  430. key4:'否',
  431. key5:'承包商'
  432. }, {
  433. ids:1,
  434. name:'200',
  435. sex:'200章',
  436. key3:'否',
  437. key4:'否',
  438. key5:'承包商'
  439. },
  440. {
  441. ids:1,
  442. name:'200',
  443. sex:'200章',
  444. key3:'否',
  445. key4:'否',
  446. key5:'承包商'
  447. },
  448. ],
  449. totaloption:{
  450. rowKey:'ids',
  451. refreshBtn:false,
  452. columnBtn:false,
  453. editBtn:false,
  454. border:true,
  455. index:true,
  456. height:'auto',
  457. calcHeight: 90,
  458. menuWidth: 80,
  459. addBtn:false,
  460. column:[
  461. {
  462. label:'支付项编号',
  463. prop:'name'
  464. }, {
  465. label:'支付项名称',
  466. prop:'sex'
  467. },
  468. {
  469. label:'支付项类型',
  470. prop:'key3'
  471. },
  472. {
  473. label:'合同计算公式',
  474. prop:'key3'
  475. },
  476. {
  477. label:'变更计算公式',
  478. prop:'key4'
  479. },
  480. {
  481. label:'本期计算公式',
  482. prop:'key5'
  483. },
  484. {
  485. label:'是否为扣款项',
  486. prop:'key5',
  487. },
  488. ],
  489. },
  490. tatoldialogVisible:false,
  491. tadddata:[
  492. {
  493. ids:1,
  494. name:'200',
  495. sex:'200章',
  496. key3:'否',
  497. key4:'否',
  498. key5:'承包商'
  499. },{
  500. ids:1,
  501. name:'200',
  502. sex:'200章',
  503. key3:'否',
  504. key4:'否',
  505. key5:'承包商'
  506. },
  507. {
  508. ids:1,
  509. name:'200',
  510. sex:'200章',
  511. key3:'否',
  512. key4:'否',
  513. key5:'承包商'
  514. }, {
  515. ids:1,
  516. name:'200',
  517. sex:'200章',
  518. key3:'否',
  519. key4:'否',
  520. key5:'承包商'
  521. },
  522. {
  523. ids:1,
  524. name:'200',
  525. sex:'200章',
  526. key3:'否',
  527. key4:'否',
  528. key5:'承包商'
  529. },
  530. ],
  531. taddoption: {
  532. delBtn: false,
  533. editBtn: false,
  534. addBtn:false,
  535. columnBtn:false,
  536. refreshBtn:false,
  537. border:true,
  538. selection:true,
  539. index:true,
  540. menu:false,
  541. column:[
  542. {
  543. label:'支付项编号',
  544. prop:'name'
  545. }, {
  546. label:'支付项名称',
  547. prop:'sex'
  548. },
  549. {
  550. label:'支付项类型',
  551. prop:'key3'
  552. },
  553. {
  554. label:'合同计算公式',
  555. prop:'key3'
  556. },
  557. {
  558. label:'变更计算公式',
  559. prop:'key4'
  560. },
  561. {
  562. label:'本期计算公式',
  563. prop:'key5'
  564. },
  565. {
  566. label:'是否为扣款项',
  567. prop:'key5'
  568. },
  569. ],
  570. },
  571. }
  572. },
  573. methods: {
  574. onLoad (page) {
  575. this.page.total = 40
  576. //模拟分页
  577. if (this.page.currentPage === 1) {
  578. this.data = [
  579. {
  580. key1: 100,
  581. key2: '100章',
  582. key3: 2,
  583. key4: '否',
  584. key5: '否',
  585. key6: '承包商',
  586. }, {
  587. key1: 200,
  588. key2: '200章',
  589. key3: 1,
  590. key4: '否',
  591. key5: '否',
  592. key6: '承包商',
  593. },
  594. ]
  595. } else if (this.page.currentPage == 2) {
  596. this.data = [
  597. {
  598. key1: 100,
  599. key2: 1,
  600. key3: '100章',
  601. key4: '否',
  602. key5: '否',
  603. key6: '承包商',
  604. }, {
  605. key1: 200,
  606. key2: 2,
  607. key3: '200章',
  608. key4: '否',
  609. key5: '否',
  610. key6: '承包商',
  611. },
  612. ]
  613. }
  614. },
  615. //添加中期支付项
  616. handleAdd() {
  617. this.$refs.crud.rowAdd();
  618. },
  619. handleaddFormula(){
  620. this.addFormuladialog=true
  621. },
  622. formuladialogClose(){
  623. this.addFormuladialog=false
  624. },
  625. foronLoad (page) {
  626. this.forpage.total = 40
  627. //模拟分页
  628. if (this.forpage.currentPage === 1) {
  629. this.fordata = [
  630. {
  631. id: 1,
  632. name: 'advance_HT',
  633. sex: '动员预付款合同金额',
  634. key3:'单独使用计量期,取本期内动员预付款支付的金额汇总,定制动员预付款计量期模块专用'
  635. }, {
  636. id: 2,
  637. name: 'advance_HT',
  638. sex: '动员预付款合同金额',
  639. key3:'单独使用计量期,取本期内动员预付款支付的金额汇总,定制动员预付款计量期模块专用'
  640. }
  641. ]
  642. }
  643. },
  644. rowClick (row) {
  645. this.selectRow = row.$index
  646. this.$message.success('选择序号' + row.$index)
  647. },
  648. addTotal(){
  649. console.log('xin');
  650. this.tatoldialogVisible=true
  651. },
  652. handleTatolClose(){
  653. this.tatoldialogVisible=false
  654. }
  655. }
  656. }
  657. </script>
  658. <style lang='scss' scoped>
  659. .form-horizontal .table-form, .form-horizontal .table-form td {
  660. border: 1px solid #ddd;
  661. background-color: #fdfdfd;
  662. font-size: 14px;
  663. padding: 4px;
  664. }
  665. .totalbox{
  666. width: 100%;
  667. margin-top: 20px;
  668. }
  669. </style>