tradeServices_audit.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <template>
  2. <view class="container">
  3. <u-form ref="uForm">
  4. <view class="form_item">
  5. <view class="title">申请信息</view>
  6. <!-- <u-divider ></u-divider> -->
  7. <u-form-item label-width='260' label="业务编号" :borderBottom="false">
  8. <u-input v-model="tradeList.billNo" input-align="right" placeholder="暂无" disabled />
  9. </u-form-item>
  10. <u-form-item label-width='260' label="名头" :borderBottom="false">
  11. <u-input v-model="tradeList.renown" input-align="right" placeholder="暂无" disabled />
  12. </u-form-item>
  13. <u-form-item label-width='260' label="仓库名称" :borderBottom="false">
  14. <u-input v-model="tradeList.warehouseName" input-align="right" placeholder="暂无" disabled />
  15. </u-form-item>
  16. <u-form-item label-width='260' label="仓位号" :borderBottom="false">
  17. <u-input v-model="tradeList.warehouseNo" input-align="right" placeholder="暂无" disabled />
  18. </u-form-item>
  19. <u-form-item label-width='260' label="仓库地址" :borderBottom="false">
  20. <u-input v-model="tradeList.warehouseAddress" input-align="right" placeholder="暂无" disabled />
  21. </u-form-item>
  22. <u-form-item label-width='260' label="货名" :borderBottom="false">
  23. <u-input v-model="tradeList.goodsName" input-align="right" placeholder="暂无" disabled />
  24. </u-form-item>
  25. <u-form-item label-width='260' label="品级" :borderBottom="false">
  26. <u-input v-model="tradeList.grade" input-align="right" placeholder="暂无" disabled />
  27. </u-form-item>
  28. <u-form-item label-width='260' label="现有储量(吨)" :borderBottom="false">
  29. <u-input v-model="tradeList.nowWeight" input-align="right" placeholder="暂无" disabled />
  30. </u-form-item>
  31. <u-form-item label-width='260' label="可用储量(吨)" :borderBottom="false">
  32. <u-input v-model="tradeList.useWeight" input-align="right" placeholder="暂无" disabled />
  33. </u-form-item>
  34. <u-form-item label-width='260' label="本单重量(吨)" :borderBottom="false">
  35. <u-input v-model="tradeList.weight" input-align="right" placeholder="暂无" disabled />
  36. </u-form-item>
  37. <u-form-item label-width='260' label="单价(元/吨)" :borderBottom="false">
  38. <u-input v-model="tradeList.unitPrice" input-align="right" placeholder="暂无" disabled />
  39. </u-form-item>
  40. <u-form-item label-width='260' label="总价值(元)" :borderBottom="false">
  41. <u-input v-model="tradeList.totalValue" input-align="right" placeholder="暂无" disabled />
  42. </u-form-item>
  43. <u-form-item label-width='260' label="申请比例(%)" :borderBottom="false">
  44. <u-input v-model="tradeList.applicationProportion" input-align="right" placeholder="暂无" disabled />
  45. </u-form-item>
  46. <u-form-item label-width='260' label="申请金额(元)" :borderBottom="false">
  47. <u-input v-model="tradeList.interest" input-align="right" placeholder="暂无" disabled />
  48. </u-form-item>
  49. </view>
  50. <view class="form_item">
  51. <view class="title">附件</view>
  52. <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="0"
  53. :file-list="imgUrl" :size-type="['compressed']" @on-success="getImgUrl" :deletable="false"
  54. :showProgress="false" @on-uploaded="isAdd = true" :before-upload="filterFileType"
  55. @on-progress="onProgress"></upload>
  56. </view>
  57. <view class="form_item">
  58. <view class="title">外审部门</view>
  59. <u-form-item label-width='260' label="银行" :borderBottom="false">
  60. <u-input v-model="tradeList.bank" input-align="right" placeholder="暂无" disabled />
  61. </u-form-item>
  62. <u-form-item label-width='260' label="第三方" :borderBottom="false">
  63. <u-input v-model="tradeList.interest" input-align="right" placeholder="暂无" disabled />
  64. </u-form-item>
  65. </view>
  66. </u-form>
  67. <view class="form_item flex">
  68. <view class="auditInfo flex" @click="auditInfo">
  69. <view class="title1">审核记录</view>
  70. <view class="img">
  71. <image src="../../../static/img/myimg/gengduo1@3x.png"
  72. style="width: 16rpx; height: 30rpx;top: 20rpx;margin-right: 0rpx;"></image>
  73. </view>
  74. </view>
  75. </view>
  76. <view style='padding:10px;' class='flex bottom-btn'>
  77. <u-button @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  78. <u-button @click='pass' type="success" class="btn2">通过</u-button>
  79. </view>
  80. <!-- <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  81. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  82. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal> -->
  83. <view v-if="show" class="shade">
  84. <view class="wrap">
  85. <view class="alert-top">
  86. <view class="titleAudit">
  87. {{title}}
  88. </view>
  89. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  90. </view>
  91. <view class="u-textarea-style">
  92. <view class="right-bottom">
  93. {{auditMind.length}}/100个字
  94. </view>
  95. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  96. maxlength="100" />
  97. </view>
  98. <view @click='close()' class="cancel">取消</view>
  99. <view @click='passSubmit()' class="confirm">确定</view>
  100. </view>
  101. </view>
  102. </view>
  103. </template>
  104. <script>
  105. import upload from '@/components/upload.vue';
  106. export default {
  107. components: {
  108. upload
  109. },
  110. data() {
  111. return {
  112. id: "",
  113. action: this.$uploadUrl,
  114. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  115. btnLoading: false, //防止重复点击
  116. imgUrl: [],
  117. tradeList: {},
  118. isShowAlert:false,
  119. show:false,
  120. content:"",
  121. title:"",
  122. auditMind:"",//审核意见
  123. }
  124. },
  125. onLoad(options) {
  126. this.id = options.id
  127. this.getList()
  128. },
  129. onshow() {
  130. },
  131. methods: {
  132. getList() {
  133. var that = this
  134. that.$api.doRequest('get', '/tradeWarehouseReceiptAppl/getTrageInfo', {
  135. id: that.id
  136. }).then(res => {
  137. that.tradeList = res.data.data
  138. //通过图片id找到地址
  139. that.$api.doRequest('get', '/appendix/query/getFileList', {
  140. appendixIds: that.tradeList.appendix
  141. }).then(res => {
  142. for (let i = 0; i < res.data.data.length; i++) {
  143. that.imgUrl.push({
  144. url: res.data.data[i].appendixPath
  145. })
  146. }
  147. }).catch(res => {
  148. if (res.errmsg) {
  149. uni.showToast({
  150. title: res.errmsg,
  151. icon: 'none',
  152. duration: 2000
  153. })
  154. }
  155. });
  156. })
  157. },
  158. reject(){
  159. this.show = true
  160. this.title = "驳回原因(驳回)"
  161. },
  162. pass(){
  163. this.show = true
  164. this.title = "审核意见(通过)"
  165. },
  166. close(){
  167. this.show = false
  168. },
  169. passSubmit(){
  170. if(this.title = "驳回原因(驳回)"){
  171. if(!this.auditMind){
  172. this.$api.msg('驳回意见不能为空')
  173. return
  174. }
  175. this.$api.doRequest('post', '/workflow/api/handle', {
  176. taskId: this.tradeList.taskId,
  177. approved: false,
  178. auditMind: this.auditMind,
  179. needReapply: true,
  180. }).then(res => {
  181. if(res.data.code == 200){
  182. uni.showToast({
  183. title: "审核成功",
  184. icon: 'none',
  185. duration: 2000
  186. })
  187. uni.navigateBack()
  188. }
  189. }).catch(res => {
  190. if (res.errmsg) {
  191. uni.showToast({
  192. title: res.errmsg,
  193. icon: 'none',
  194. duration: 2000
  195. })
  196. }
  197. });
  198. // }
  199. }else{
  200. this.$api.doRequest('post', '/workflow/api/handle', {
  201. taskId: this.tradeList.taskId,
  202. approved: true,
  203. auditMind: this.auditMind ? this.auditMind : "审核通过",
  204. needReapply: false,
  205. }).then(res => {
  206. if(res.data.code == 200){
  207. uni.showToast({
  208. title: "审核成功",
  209. icon: 'none',
  210. duration: 2000
  211. })
  212. uni.navigateBack()
  213. }
  214. }).catch(res => {
  215. if (res.errmsg) {
  216. uni.showToast({
  217. title: res.errmsg,
  218. icon: 'none',
  219. duration: 2000
  220. })
  221. }
  222. });
  223. }
  224. },
  225. auditInfo(){
  226. // uni.navigateTo({
  227. // url: '/pages/task/procurement_close_details?id=' + item.businessId + "&isShowbtn=true"
  228. // })
  229. },
  230. filterFileType(index, lists) {
  231. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif' &&
  232. lists[index].fileType != 'jpeg') {
  233. lists.splice(index, 1);
  234. // 当前文件不支持
  235. uni.showModal({
  236. title: '暂不支持当前图片类型',
  237. showCancel: false
  238. });
  239. } else {
  240. this.isAdd = false;
  241. }
  242. },
  243. }
  244. }
  245. </script>
  246. <style scoped lang="scss">
  247. .container {
  248. padding: 20rpx 12rpx 250rpx 12rpx;
  249. }
  250. .title {
  251. font-size: 34rpx;
  252. font-weight: 600;
  253. margin-top: 20rpx;
  254. line-height: 70rpx;
  255. border-bottom: 2rpx solid #EEEEEE;
  256. }
  257. .form_item {
  258. background: #fff;
  259. margin: 10px;
  260. border-radius: 10px;
  261. padding: 20rpx 30rpx;
  262. // width: 100%;
  263. }
  264. .u-form-item {
  265. padding: 12rpx 0 !important;
  266. }
  267. .auditInfo {
  268. width: 100%;
  269. .title1 {
  270. width: 99%;
  271. font-size: 34rpx;
  272. font-weight: 600;
  273. // margin-top: 20rpx;
  274. line-height: 70rpx;
  275. }
  276. }
  277. .bottom-btn {
  278. width: 100%;
  279. position: fixed;
  280. bottom: 0;
  281. display: flex;
  282. z-index: 2;
  283. left: 0;
  284. background-color: #f8f8f8;
  285. flex-direction: column;
  286. .btn1,
  287. .btn2 {
  288. width: 100%;
  289. margin-bottom: 26rpx;
  290. border-radius: 90rpx;
  291. }
  292. .btn1 {
  293. background: white;
  294. color: #00C265;
  295. }
  296. }
  297. .shade {
  298. position: fixed;
  299. top: 0;
  300. left: 0;
  301. height: 100%;
  302. width: 100%;
  303. background: rgba(0, 0, 0, 0.4);
  304. z-index: 3;
  305. .wrap {
  306. position: absolute;
  307. left: 0;
  308. top: 0;
  309. right: 0;
  310. bottom: 0;
  311. margin: auto;
  312. background: #fff;
  313. width: calc(100% - 198rpx);
  314. height: 700rpx;
  315. border-radius: 20rpx;
  316. .alert-top {
  317. padding: 33rpx;
  318. display: flex;
  319. justify-content: center;
  320. align-items: center;
  321. position: relative;
  322. }
  323. .titleAudit {
  324. font-size: 32rpx;
  325. font-weight: 600;
  326. color: #333333;
  327. }
  328. .close {
  329. position: absolute;
  330. right: 33rpx;
  331. }
  332. }
  333. }
  334. .cancel,
  335. .confirm {
  336. position: absolute;
  337. display: inline-block;
  338. width: 50%;
  339. text-align: center;
  340. bottom: 0;
  341. padding: 10px;
  342. border-top: 1px solid #eee;
  343. font-size: 34rpx;
  344. }
  345. .cancel {
  346. left: 0;
  347. border-right: 1px solid #eee;
  348. color: #AFB3BF;
  349. }
  350. .confirm {
  351. right: 0;
  352. color: #22C572;
  353. }
  354. .u-textarea-style {
  355. margin: 20rpx;
  356. background: #F9F9FA;
  357. border-radius: 10px;
  358. border: 1px solid #EEEEEE;
  359. padding: 10rpx 20rpx;
  360. position: relative;
  361. .right-bottom {
  362. position: absolute;
  363. right: 20rpx;
  364. bottom: 20rpx;
  365. color: #AFB3BF;
  366. }
  367. }
  368. /deep/.u-list-item {
  369. margin: 4rpx !important;
  370. }
  371. </style>