financeFlowable.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <movable-area style="width: auto;height: auto;" :scale="true" :out-of-bounds="true">
  3. <movable-view :x="x" :y="y" direction="all" :scale="true" style="width: 100%;height: auto;" :out-of-bounds="true">
  4. <view style="margin: 25rpx 25rpx 75rpx 25rpx;">
  5. <view style = "text-align: center;font-size: 43rpx; margin-bottom:10rpx">国电投国际贸易(北京)有限公司<br>境内付款申请及确认单 </view>
  6. <view style = "margin-bottom:10rpx;text-align: right;">编号:{{form.number}}</view>
  7. <view style = "margin-bottom:10rpx;text-align: center;">日期:{{form.date}}</view>
  8. <view class="h-table" :style = "tableFontSize">
  9. <view class="h-tr h-tr-8">
  10. <view class="h-td">客户信息</view>
  11. <view class="h-td h-td-colspan">{{form.stockType=='00'?form.buyName:form.companyName}}</view>
  12. </view>
  13. <view class="h-tr h-tr-8">
  14. <view class="h-td">货源单位</view>
  15. <view class="h-td h-td-colspan"></view>
  16. </view>
  17. <view class="h-tr h-tr-8">
  18. <view class="h-td">合同号</view>
  19. <view class="h-td h-td-colspan">{{form.contractNo}}</view>
  20. <view class="h-td">合同总额</view>
  21. <view class="h-td">{{(!!form.original)?form.original:form.localAmt}}</view>
  22. <view class="h-td">已结金额</view>
  23. <view class="h-td">{{form.payedAmt}}</view>
  24. </view>
  25. <view class="h-tr h-tr-8">
  26. <view class="h-td">仓库名称</view>
  27. <view class="h-td h-td-colspan">{{form.wareName}}</view>
  28. <view class="h-td">备注</view>
  29. <view class="h-td h-td-colspan">{{form.remark}}</view>
  30. </view>
  31. <view class="h-tr h-tr-8">
  32. <view class="h-td h-td-colspan h-td-left">本次结算明细:</view>
  33. </view>
  34. <view class="h-tr h-tr-8">
  35. <view class="h-td">商品名称</view>
  36. <view class="h-td">发票份数</view>
  37. <view class="h-td">规格型号</view>
  38. <view class="h-td">数量</view>
  39. <view class="h-td">含税单价</view>
  40. <view class="h-td">不含税金额</view>
  41. <view class="h-td">税额</view>
  42. <view class="h-td">价税合计</view>
  43. </view>
  44. <view class="h-tr h-tr-8" v-for="(item, index) in dataArray" :key="item.id">
  45. <view class="h-td">{{item.proName}}</view>
  46. <view class="h-td">{{item.invoiceNum}}</view>
  47. <view class="h-td">{{item.value}}</view>
  48. <view class="h-td">{{item.weight}}</view>
  49. <view class="h-td">{{item.afbsrPrice}}</view>
  50. <view class="h-td">{{item.excludingTax}}</view>
  51. <view class="h-td">{{item.tax}}</view>
  52. <view class="h-td">{{item.amount}}</view>
  53. </view>
  54. <view class="h-tr h-tr-8">
  55. <view class="h-td">合计</view>
  56. <view class="h-td">{{AllinvoiceNum}}</view>
  57. <view class="h-td"></view>
  58. <view class="h-td">{{Allweight}}</view>
  59. <view class="h-td"></view>
  60. <view class="h-td">{{AllexcludingTax}}</view>
  61. <view class="h-td">{{Alltax}}</view>
  62. <view class="h-td">{{Allamount}}</view>
  63. </view>
  64. <view class="h-tr h-tr-8">
  65. <view class="h-td">经办人</view>
  66. <view class="h-td h-td-colspan">{{form.createName}}</view>
  67. <view class="h-td">部门复核</view>
  68. <view class="h-td h-td-colspan">{{sessionName}}</view>
  69. </view>
  70. <view class="h-tr h-tr-8">
  71. <view class="h-td">财务确认</view>
  72. <view class="h-td h-td-colspan"></view>
  73. <view class="h-td">财务签收</view>
  74. <view class="h-td h-td-colspan"></view>
  75. </view>
  76. </view>
  77. <view style = "margin-bottom:10rpx;margin-top:10rpx;text-align: left;">注:本单据一式两份,财务部和业务部各执一份 </view>
  78. </view>
  79. </movable-view>
  80. </movable-area>
  81. </template>
  82. <script>
  83. export default {
  84. props:["businessKey"],
  85. data(){
  86. return{
  87. form : {},
  88. dataArray : [],
  89. AllinvoiceNum : '0',
  90. Allweight : '0',
  91. AllexcludingTax : '0',
  92. Alltax : '0',
  93. Alltax : '0',
  94. sessionName : '',
  95. x: 0,
  96. y: 0,
  97. tableFontSize : 'font-size:22rpx'
  98. }
  99. },
  100. beforeMount() {
  101. let self = this;
  102. this.admRequest({
  103. action : 'FinanceManageAction/financeDetail',
  104. data : {
  105. id : self.businessKey
  106. },
  107. success(res){
  108. let dataArray = res.data.data;
  109. self.sessionName = res.data.sessionName;
  110. if (dataArray.length > 0) {
  111. self.form = dataArray[0];
  112. }
  113. self.dataArray = dataArray;
  114. for (let d of dataArray) {
  115. self.AllinvoiceNum = self.accAdd(self.AllinvoiceNum, d.invoiceNum, 0);
  116. self.Allweight = self.accAdd(self.Allweight, d.weight, 4);
  117. self.AllexcludingTax = self.accAdd(self.AllexcludingTax, d.excludingTax, 2);
  118. self.Alltax = self.accAdd(self.Alltax, d.tax, 2);
  119. self.Allamount = self.accAdd(self.Allamount, d.amount, 2);
  120. }
  121. }
  122. })
  123. // 竖屏
  124. if (uni.getSystemInfoSync().screenHeight > uni.getSystemInfoSync().screenWidth) {
  125. this.tableFontSize = 'font-size:22rpx';
  126. } else {
  127. this.tableFontSize = 'font-size:15rpx';
  128. }
  129. },
  130. methods:{
  131. accAdd(arg1, arg2,pointWs) {
  132. var r1, r2, max;
  133. try { r1 = arg1.toString().split(".")[1].length } catch (e) { r1 = 0 }
  134. try { r2 = arg2.toString().split(".")[1].length } catch (e) { r2 = 0 }
  135. max = Math.pow(10, Math.max(r1, r2));
  136. if (!pointWs) {
  137. return ((arg1 * max + arg2 * max) / max) + "";
  138. } else {
  139. if (!arg1) {
  140. arg1 = 0;
  141. }
  142. if (!arg2) {
  143. arg2 = 0;
  144. }
  145. arg1 = parseFloat(arg1);
  146. arg2 = parseFloat(arg2);
  147. return this.fomatFloat((arg1 + arg2), pointWs);
  148. }
  149. },
  150. fomatFloat(num,n){
  151. if (!n) {
  152. n = 2;
  153. }
  154. var f = parseFloat(num);
  155. if(isNaN(f)){
  156. return num;
  157. }
  158. var start = "";
  159. if (f < 0) {
  160. start = "-";
  161. }
  162. f = Math.abs(f);
  163. f = Math.round(f*Math.pow(10, n))/Math.pow(10, n); // n 幂
  164. var s = f.toString();
  165. var rs = s.indexOf('.');
  166. //判定如果是整数,增加小数点再补0
  167. if(rs < 0){
  168. rs = s.length;
  169. s += '.';
  170. }
  171. while(s.length <= rs + n){
  172. s += '0';
  173. }
  174. s = start + s;
  175. return s;
  176. },
  177. getCallBackData(){
  178. let data = {};
  179. data.param = {approvalName : this.sessionName};
  180. data.callBackUrl = "FlowableApiAction/payBackDeal";
  181. return data;
  182. }
  183. }
  184. }
  185. </script>
  186. <style lang="scss">
  187. /* 引入表格样式表 */
  188. @import "@/static/css/helang-table.scss";
  189. </style>