procurement_close_details.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template name="task">
  2. <view class="content">
  3. <u-form :model="form" ref="uForm">
  4. <u-form-item label-width='260' label="合同编号">
  5. {{list.contractNo}}
  6. </u-form-item>
  7. <u-form-item label-width='260' label="平仓日期">
  8. {{list.closePositionDate}}
  9. </u-form-item>
  10. <u-form-item label-width='260' label="平仓数量">
  11. {{list.closingQuantity}}
  12. </u-form-item>
  13. <u-form-item label-width='260' label="成交价格">
  14. {{ list.transactionPrice }}
  15. </u-form-item>
  16. <u-form-item label-width='260' label="平仓价格(元/吨)">
  17. {{list.closeRate}}
  18. </u-form-item>
  19. <u-form-item label-width='260' label="基差(元/吨)">
  20. {{list.basisPrice}}
  21. </u-form-item>
  22. <u-form-item label-width='260' label="应付金额(元)">
  23. {{list.amountIngPayable}}
  24. </u-form-item>
  25. <u-form-item label-width='260' label="已付金额(元)">
  26. {{list.amountEdPayable}}
  27. </u-form-item>
  28. <u-form-item label-width='260' label="未付金额(元)">
  29. {{list.amountNotPayable}}
  30. </u-form-item>
  31. <u-form-item label-width='260' label="付款日期">
  32. {{list.paymentDate}}
  33. </u-form-item>
  34. <u-form-item label-width='260' label="应收金额(元)">
  35. {{list.collectionIngPayable}}
  36. </u-form-item>
  37. <u-form-item label-width='260' label="已收金额(元)">
  38. {{list.collectionEdPayable}}
  39. </u-form-item>
  40. <u-form-item label-width='260' label="未收金额(元)">
  41. {{list.collectionNotPayable}}
  42. </u-form-item>
  43. <u-form-item label-width='260' label="收款日期">
  44. {{list.collectionDate}}
  45. </u-form-item>
  46. <u-form-item label-width='260' label="客户">
  47. {{list.customerName}}
  48. </u-form-item>
  49. <u-form-item label-width='260' label="库点">
  50. {{list.warehouseName}}
  51. </u-form-item>
  52. <u-form-item label-width='260' label="状态">
  53. <view v-if='list.approveStatus!=null'>
  54. {{list.approveStatus}}
  55. </view>
  56. <view v-else>{{list.status}}</view>
  57. </u-form-item>
  58. </u-form>
  59. <view style='padding:10px;' class='flex'>
  60. <u-button v-if='list.status=="未审核"' @click='reject' type="error">驳回</u-button>
  61. <u-button v-if='list.status=="未审核"' @click='audit' type="success">通过</u-button>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import {
  67. mapState
  68. } from 'vuex';
  69. export default {
  70. name: "task",
  71. data() {
  72. return {
  73. show:false,
  74. id:0,
  75. form: {
  76. name: '',
  77. intro: '',
  78. sex: ''
  79. },
  80. list:{},
  81. radio: '',
  82. pcUserInfo:uni.getStorageSync('pcUserInfo'),
  83. switchVal: false,
  84. contractNoList:[]
  85. };
  86. },
  87. computed: {
  88. ...mapState(['hasLogin', 'userInfo'])
  89. },
  90. onLoad(options){
  91. console.log(options)
  92. this.id=options.id
  93. },
  94. onShow() {
  95. var that=this
  96. this.$nextTick(function(){
  97. that.getData()
  98. })
  99. // this.userInfo = uni.getStorageSync("userInfo")
  100. },
  101. onReachBottom() { //上拉触底函数
  102. if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
  103. this.warehouseInOutInfo.currentPage += 1
  104. this.Data()
  105. }
  106. },
  107. methods: {
  108. getData(){
  109. var data=[]
  110. this.$api.doRequest('get', '/purchaseClosingReport/getInfo', {id:this.id}).then(res => {
  111. if(res.data.code==200){
  112. this.list=res.data.data
  113. }
  114. })
  115. },
  116. confirm(item){
  117. this.list.contractNo=item[0].value
  118. },
  119. audit(){
  120. var that=this
  121. uni.showModal({
  122. content: "是否确定通过审核?",
  123. showCancel: true,
  124. confirmText: '提交',
  125. success: function(res) {
  126. if (res.confirm) {
  127. that.$api.doRequest('post', '/workflow/api/handle', {
  128. taskId:that.list.taskId,
  129. approved: true,
  130. auditMind: '34',
  131. needReapply: false,
  132. }).then(res1 => {
  133. if (res1.data.code == 200) {
  134. that.$api.msg('审核成功');
  135. that.$nextTick(function(){
  136. uni.navigateBack()
  137. })
  138. }else{
  139. that.$api.msg(res1.data.message);
  140. }
  141. })
  142. }
  143. }
  144. })
  145. },
  146. reject(){
  147. var that=this
  148. uni.showModal({
  149. content: "是否确定驳回?",
  150. showCancel: true,
  151. confirmText: '提交',
  152. success: function(res) {
  153. if (res.confirm) {
  154. that.$api.doRequest('post', '/workflow/api/handle', {
  155. taskId:that.list.taskId,
  156. approved: false,
  157. auditMind: '已驳回',
  158. needReapply: true,
  159. }).then(res1 => {
  160. if (res1.data.code == 200) {
  161. that.$api.msg('驳回成功');
  162. that.$nextTick(function(){
  163. uni.navigateBack()
  164. })
  165. }else{
  166. that.$api.msg(res1.data.message);
  167. }
  168. }).catch()
  169. }
  170. }
  171. })
  172. }
  173. }
  174. }
  175. </script>
  176. <style lang="scss" scoped>
  177. page{
  178. background: #fff;
  179. }
  180. .content{
  181. padding:10px;
  182. }
  183. </style>