purchase_settlement_details.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <view class="container">
  3. <view class="topInfo">
  4. <view class="topInfo-item">
  5. <view class="flex info">
  6. <view class="logo">
  7. <image src="../../../static/img/reject.png" mode="" v-if="list[0].status == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list[0].status == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode="" v-if="list[0].status == '审核中'||list[0].status == '未审核'"
  12. style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText">{{list[0].status}}</view>
  15. </view>
  16. <view class="infoData">{{list[0].warehousingDate}}</view>
  17. </view>
  18. </view>
  19. <view class="content">
  20. <view class="top content-item">
  21. <view>{{contractNo}}</view>
  22. <view>元/吨</view>
  23. </view>
  24. <view class="content-item">
  25. <view class="car-container" v-for="(item,index) in list">
  26. <view class="car-num title">{{item.carNo}}</view>
  27. <view class="row">
  28. <view class="left car-type-item">净重</view>
  29. <view class="right weightInfoCss">{{item.netWeight}} 吨</view>
  30. </view>
  31. <view class="row">
  32. <view class="left car-type-item">结重</view>
  33. <view class="right weightInfoCss">{{item.settlementWeight}} 吨</view>
  34. </view>
  35. <view class="row">
  36. <view class="left car-type-item">扣款</view>
  37. <view class="right weightInfoCss">¥{{item.deductionAmountchange?item.deductionAmountchange:"0"}}/吨</view>
  38. </view>
  39. <view class="row ">
  40. <view class="left money">应付</view>
  41. <view class="right moneyInfo">¥{{item.amountIngPayable}}元</view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <u-toast ref="uToast" />
  47. <view style='padding:10px;' class='flex bottom-btn'>
  48. <u-button @click='fanHui' type="success" class="btn2">返回</u-button>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. id: "",
  57. currentPage: 1,
  58. pageSize: 10,
  59. list: [
  60. {status:"",}
  61. ],
  62. contractNo: "",
  63. }
  64. },
  65. onLoad(options) {
  66. this.id = options.id
  67. this.getList()
  68. },
  69. methods: {
  70. getList(id) {
  71. this.$api.doRequest('get', '/stockPurchaseReceiptReport/getInfo', {
  72. id: this.id
  73. }).then(res => {
  74. this.contractNo = res.data.data.contractNo
  75. if (res.data.code == 200) {
  76. this.$api.doRequest('get', '/stockPurchaseReceiptReport/selectPurchaseOrder', {
  77. compId: "2710b21efc1e4393930c5dc800010dc4",
  78. currentPage: this.currentPage,
  79. pageSize: this.pageSize,
  80. contractNo: this.contractNo,
  81. }).then(res => {
  82. if (res.data.code == 200) {
  83. this.list = res.data.data.records
  84. }
  85. })
  86. }
  87. })
  88. },
  89. //驳回
  90. rejectSubmit() {
  91. var that = this
  92. if (this.list.length == 0) {
  93. that.$api.msg('没有要审核的条目!')
  94. } else {
  95. // uni.showModal({
  96. // content: "是否确定驳回?",
  97. // success(res) {
  98. // if(res)
  99. // this.audit(this.list[0], 0, false, true, '已驳回')
  100. // }
  101. // })
  102. uni.showModal({
  103. content: "是否确定驳回?",
  104. showCancel: true,
  105. confirmText: '确定',
  106. success: function(res) {
  107. if (res.confirm) {
  108. that.audit(that.list[0], 0, false, true, '已驳回')
  109. }
  110. }
  111. })
  112. }
  113. },
  114. //通过
  115. passSubmit() {
  116. var that = this
  117. if (this.list.length == 0) {
  118. that.$api.msg('没有要审核的条目!')
  119. } else {
  120. // uni.showModal({
  121. // content: "是否确定通过?",
  122. // success(res) {
  123. // if(res)
  124. // this.audit(this.list[0], 0, true, 2)
  125. // }
  126. // })
  127. uni.showModal({
  128. content: "是否确定通过?",
  129. showCancel: true,
  130. confirmText: '确定',
  131. success: function(res) {
  132. if (res.confirm) {
  133. that.audit(that.list[0], 0, true, 2)
  134. }
  135. }
  136. })
  137. }
  138. },
  139. //审核方法
  140. audit(item, index, status, status2, reason) {
  141. if (index < this.list.length) {
  142. this.$api.doRequest('post', '/workflow/api/handle', {
  143. taskId: item.taskId,
  144. approved: status,
  145. auditMind: reason != undefined ? '已驳回' : '34',
  146. needReapply: status2 != undefined ? true : false,
  147. }).then(res => {
  148. this.audit(this.list[index + 1], index + 1, status)
  149. })
  150. } else {
  151. if (status == true) {
  152. that.$api.msg('通过成功')
  153. this.getList()
  154. } else if (status == false) {
  155. that.$api.msg('驳回成功')
  156. this.getList()
  157. }
  158. }
  159. },
  160. fanHui(){
  161. uni.navigateBack()
  162. }
  163. }
  164. }
  165. </script>
  166. <style scoped lang="scss">
  167. .container {
  168. padding: 20rpx 20rpx 250rpx 20rpx;
  169. }
  170. .content {
  171. margin-top: 30rpx;
  172. .top {
  173. display: flex;
  174. justify-content: space-between;
  175. }
  176. .content-item {
  177. border-radius: 20rpx;
  178. background: white;
  179. padding: 40rpx 20rpx;
  180. margin-bottom: 30rpx;
  181. }
  182. .title {
  183. font-size: 32rpx;
  184. font-weight: 600;
  185. color: #333333;
  186. text-align: left;
  187. margin: 20rpx 0;
  188. }
  189. .car-container{
  190. border-bottom: 2rpx solid #EEEEEE;
  191. }
  192. .car-type-item {
  193. font-size: 28rpx;
  194. margin: 20rpx 0;
  195. color: #878C9C;
  196. }
  197. .weightInfoCss {
  198. font-size: 28rpx;
  199. color: #333333;
  200. font-weight: 500;
  201. }
  202. .row {
  203. display: flex;
  204. justify-content: space-between;
  205. // .right,
  206. // input {
  207. // font-size: 28rpx;
  208. // // color: #333333;
  209. // }
  210. }
  211. .money {
  212. font-size: 32rpx;
  213. font-weight: 500;
  214. margin-bottom: 30rpx ;
  215. }
  216. .moneyInfo {
  217. color: #22C572;
  218. font-size: 32rpx;
  219. }
  220. }
  221. .bottom-btn {
  222. width: 100%;
  223. position: fixed;
  224. bottom:0;
  225. display: flex;
  226. z-index: 2;
  227. left: 0;
  228. background-color: #f8f8f8;
  229. flex-direction: column;
  230. .btn1,.btn2{
  231. width: 100%;
  232. margin-bottom: 26rpx;
  233. border-radius: 90rpx;
  234. }
  235. .btn1{
  236. background: white;
  237. color: #00C265;
  238. }
  239. }
  240. .topInfo {
  241. height: 210rpx;
  242. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  243. padding: 30rpx;
  244. .topInfo-item {
  245. height: 150rpx;
  246. background-color: #FFFFFF;
  247. border-radius: 20rpx;
  248. padding: 40rpx;
  249. .logo {
  250. width: 40rpx;
  251. height: 40rpx;
  252. margin-top: 8rpx;
  253. }
  254. .infoText {
  255. font-size: 36rpx;
  256. font-weight: 600;
  257. margin-left: 20rpx;
  258. }
  259. .infoData {
  260. color: #878C9C;
  261. font-size: 26rpx;
  262. margin-top: 10rpx;
  263. }
  264. }
  265. }
  266. </style>