procurement_report_details.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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.goodsName}}
  9. </u-form-item>
  10. <u-form-item label-width='260' label="仓位号">
  11. {{list.positionNumber}}
  12. </u-form-item>
  13. <u-form-item label-width='260' label="车牌号">
  14. {{ list.carNo }}({{ list.tranCarNo }})
  15. </u-form-item>
  16. <u-form-item label-width='260' label="入库日期">
  17. {{list.warehousingDate}}
  18. </u-form-item>
  19. <u-form-item label-width='260' label="蛋白(%)>=">
  20. {{list.protein}}
  21. </u-form-item>
  22. <u-form-item label-width='260' label="水分(%)<=">
  23. {{list.waterContent}}
  24. </u-form-item>
  25. <u-form-item label-width='260' label="单价(元/吨)">
  26. {{list.unitPrice}}
  27. </u-form-item>
  28. <u-form-item label-width='260' label="基差(元/吨)">
  29. {{list.basisPrice}}
  30. </u-form-item>
  31. <u-form-item label-width='260' label="卸车费(元/吨)">
  32. {{list.unloadingCharge}}
  33. </u-form-item>
  34. <u-form-item label-width='260' label="发票费(元/吨)">
  35. {{list.invoiceFee}}
  36. </u-form-item>
  37. <u-form-item label-width='260' label="扣款(元/吨)">
  38. {{list.deductionAmount}}
  39. </u-form-item>
  40. <u-form-item label-width='260' label="结算单价(元/吨)">
  41. {{list.settlementPrice}}
  42. </u-form-item>
  43. <u-form-item label-width='260' label="净重(吨)">
  44. {{list.netWeight}}
  45. </u-form-item>
  46. <u-form-item label-width='260' label="应付金额(元)">
  47. {{list.amountIngPayable}}
  48. </u-form-item>
  49. <u-form-item label-width='260' label="已付金额(元)">
  50. {{list.amountEdPayable}}
  51. </u-form-item>
  52. <u-form-item label-width='260' label="未付金额(元)">
  53. {{list.amountNotPayable}}
  54. </u-form-item>
  55. <u-form-item label-width='260' label="付款日期">
  56. {{list.paymentDate}}
  57. </u-form-item>
  58. <u-form-item label-width='260' label="结转">
  59. {{list.carryForward}}
  60. </u-form-item>
  61. <u-form-item label-width='260' label="客户确认">
  62. {{list.customerConfirmationStatus}}
  63. </u-form-item>
  64. <u-form-item label-width='260' label="客户">
  65. {{list.customerName}}
  66. </u-form-item>
  67. <u-form-item label-width='260' label="库点">
  68. {{list.warehouseName}}
  69. </u-form-item>
  70. <u-form-item label-width='260' label="发票类型">
  71. {{list.invoiceType}}
  72. </u-form-item>
  73. <u-form-item label-width='260' label="已开发票(元)">
  74. {{list.alreadyInvoice}}
  75. </u-form-item>
  76. <u-form-item label-width='260' label="状态">
  77. <view v-if='list.approveStatus!=null'>
  78. {{list.approveStatus}}
  79. </view>
  80. <view v-else>{{list.status}}</view>
  81. </u-form-item>
  82. </u-form>
  83. <view style='padding:10px;' class='flex'>
  84. <u-button v-if='list.status=="未审核"' @click='reject' type="error">驳回</u-button>
  85. <u-button v-if='list.status=="未审核"' @click='audit' type="success">通过</u-button>
  86. </view>
  87. </view>
  88. </template>
  89. <script>
  90. import {
  91. mapState
  92. } from 'vuex';
  93. export default {
  94. name: "task",
  95. data() {
  96. return {
  97. show:false,
  98. id:0,
  99. form: {
  100. name: '',
  101. intro: '',
  102. sex: ''
  103. },
  104. list:{},
  105. radio: '',
  106. pcUserInfo:uni.getStorageSync('pcUserInfo'),
  107. switchVal: false,
  108. contractNoList:[]
  109. };
  110. },
  111. computed: {
  112. ...mapState(['hasLogin', 'userInfo'])
  113. },
  114. onLoad(options){
  115. console.log(options)
  116. this.id=options.id
  117. },
  118. onShow() {
  119. var that=this
  120. this.$nextTick(function(){
  121. that.getData()
  122. })
  123. // this.userInfo = uni.getStorageSync("userInfo")
  124. },
  125. methods: {
  126. getData(){
  127. var data=[]
  128. // this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList',
  129. // {compId:this.pcUserInfo.compId,flag:3}).then(res => {
  130. // if(res.data.code==200){
  131. // for(var i=0;i<res.data.data.length;i++){
  132. // data.push({value:res.data.data[i].contractNo,label:res.data.data[i].contractNo})
  133. // }
  134. // this.contractNoList=data
  135. // }
  136. // })
  137. this.$api.doRequest('get', '/purchaseReceiptReport/getInfo', {id:this.id}).then(res => {
  138. if(res.data.code==200){
  139. this.list=res.data.data
  140. }
  141. })
  142. },
  143. confirm(item){
  144. this.list.contractNo=item[0].value
  145. },
  146. audit(){
  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: true,
  157. auditMind: '34',
  158. needReapply: false,
  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('系统异常,请联系管理员');
  167. }
  168. })
  169. }
  170. }
  171. })
  172. },
  173. reject(){
  174. var that=this
  175. uni.showModal({
  176. content: "是否确定驳回?",
  177. showCancel: true,
  178. confirmText: '提交',
  179. success: function(res) {
  180. if (res.confirm) {
  181. that.$api.doRequest('post', '/workflow/api/handle', {
  182. taskId:that.list.taskId,
  183. approved: false,
  184. auditMind: '已驳回',
  185. needReapply: true,
  186. }).then(res1 => {
  187. if (res1.data.code == 200) {
  188. that.$api.msg('驳回成功');
  189. that.$nextTick(function(){
  190. uni.navigateBack()
  191. })
  192. }else{
  193. that.$api.msg(res1.data.message);
  194. }
  195. }).catch()
  196. }
  197. }
  198. })
  199. }
  200. }
  201. }
  202. </script>
  203. <style lang="scss" scoped>
  204. page{
  205. background: #fff;
  206. }
  207. .content{
  208. padding:30px;
  209. }
  210. </style>