procurement_close_details.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. methods: {
  102. getData(){
  103. var data=[]
  104. this.$api.doRequest('get', '/purchaseClosingReport/getInfo', {id:this.id}).then(res => {
  105. if(res.data.code==200){
  106. this.list=res.data.data
  107. }
  108. })
  109. },
  110. confirm(item){
  111. this.list.contractNo=item[0].value
  112. },
  113. audit(){
  114. var that=this
  115. uni.showModal({
  116. content: "是否确定通过审核?",
  117. showCancel: true,
  118. confirmText: '提交',
  119. success: function(res) {
  120. if (res.confirm) {
  121. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  122. taskId:that.list.taskId,
  123. approved: true,
  124. auditMind: '34',
  125. needReapply: false,
  126. }).then(res1 => {
  127. if (res1.data.code == 200) {
  128. that.$api.msg('审核成功');
  129. that.$nextTick(function(){
  130. uni.navigateBack()
  131. })
  132. }else{
  133. that.$api.msg('系统异常,请联系管理员');
  134. }
  135. })
  136. }
  137. }
  138. })
  139. },
  140. reject(){
  141. var that=this
  142. uni.showModal({
  143. content: "是否确定驳回?",
  144. showCancel: true,
  145. confirmText: '提交',
  146. success: function(res) {
  147. if (res.confirm) {
  148. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  149. taskId:that.list.taskId,
  150. approved: false,
  151. auditMind: '已驳回',
  152. needReapply: true,
  153. }).then(res1 => {
  154. if (res1.data.code == 200) {
  155. that.$api.msg('驳回成功');
  156. that.$nextTick(function(){
  157. uni.navigateBack()
  158. })
  159. }else{
  160. that.$api.msg(res1.data.message);
  161. }
  162. }).catch()
  163. }
  164. }
  165. })
  166. }
  167. }
  168. }
  169. </script>
  170. <style lang="scss" scoped>
  171. page{
  172. background: #fff;
  173. }
  174. .content{
  175. padding:30px;
  176. }
  177. </style>