daishou_details.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. <template>
  2. <view class="container">
  3. <u-form ref="uForm">
  4. <u-form-item label-width='260' label="合同编号">
  5. <u-input v-model="list.contractNo" input-align="right" placeholder="" disabled />
  6. </u-form-item>
  7. <u-form-item label-width='260' label="买方">
  8. <u-input v-model="list.buyer" input-align="right" placeholder="" disabled />
  9. </u-form-item>
  10. <u-form-item label-width='260' label="买方电话">
  11. <u-input v-model="list.buyerPhone" input-align="right" placeholder="" disabled />
  12. </u-form-item>
  13. <u-form-item label-width='260' label="卖方">
  14. <u-input v-model="list.seller" input-align="right" placeholder="" disabled />
  15. </u-form-item>
  16. <u-form-item label-width='260' label="卖方电话">
  17. <u-input v-model="list.sellerPhone" input-align="right" placeholder="" disabled />
  18. </u-form-item>
  19. <u-form-item label-width='260' label="结算方式">
  20. <u-input v-model="list.settlementMethod" input-align="right" placeholder="" disabled />
  21. </u-form-item>
  22. <u-form-item label-width='260' label="交货方式">
  23. <u-input v-model="list.deliverType1" input-align="right" placeholder="" disabled />
  24. </u-form-item>
  25. <u-form-item label-width='260' label="验收方式">
  26. <u-input v-model="list.acceptanceMethod" input-align="right" placeholder="" disabled />
  27. </u-form-item>
  28. <u-form-item label-width='260' label="重量(吨)">
  29. <u-input v-model="list.weight" input-align="right" placeholder="" disabled />
  30. </u-form-item>
  31. <u-form-item label-width='260' label="交货日期(起)">
  32. <u-input v-model="list.deliveryDateStart" input-align="right" placeholder="" disabled />
  33. </u-form-item>
  34. <u-form-item label-width='260' label="溢短装(%)">
  35. <u-input v-model="list.overShort" input-align="right" placeholder="" disabled />
  36. </u-form-item>
  37. <u-form-item label-width='260' label="交货日期(止)">
  38. <u-input v-model="list.deliveryDateEnd" input-align="right" placeholder="" disabled />
  39. </u-form-item>
  40. <u-form-item label-width='260' label="交货地所在地区">
  41. <view class="textCss">
  42. {{list.deliveryProvince}}{{list.deliveryCity}}{{list.deliveryArea}}
  43. </view>
  44. </u-form-item>
  45. <u-form-item label-width='260' label="交货地详细地址">
  46. <u-input v-model="list.placeDelivery" input-align="right" placeholder="" disabled />
  47. </u-form-item>
  48. <u-form-item label-width='260' label="签订日期">
  49. <u-input v-model="list.signingDate" input-align="right" placeholder="" disabled />
  50. </u-form-item>
  51. <u-form-item label-width='260' label="代收费">
  52. <view class="textCss">
  53. {{list.agencyCharge}}
  54. </view>
  55. </u-form-item>
  56. <u-form-item label-width='300' label="最终实际交易量(吨)">
  57. <u-input v-model="list.finalTradingVolume" input-align="right" placeholder="" disabled />
  58. </u-form-item>
  59. <u-form-item label-width='270' label="代收库负责人">
  60. <u-input v-model="list.personCharge" input-align="right" placeholder="" disabled />
  61. </u-form-item>
  62. <u-form-item label-width='270' label="客户送粮上限(吨)">
  63. <u-input v-model="list.grainDelivery" input-align="right" placeholder="" disabled />
  64. </u-form-item>
  65. <u-form-item label-width='260' label="货名">
  66. <u-input v-model="list.contractGoodsInfo.goodsName" input-align="right" placeholder="" disabled />
  67. </u-form-item>
  68. <u-form-item label-width='260' label="水分(%)<=">
  69. <u-input v-model="list.contractGoodsInfo.waterContent" input-align="right" placeholder="" disabled />
  70. </u-form-item>
  71. <u-form-item label-width='260' label="品级">
  72. <u-input v-model="list.contractGoodsInfo.grade" input-align="right" placeholder="" disabled />
  73. </u-form-item>
  74. <u-form-item label-width='260' label="杂质(%)<=">
  75. <u-input v-model="list.contractGoodsInfo.impurity" input-align="right" placeholder="" disabled />
  76. </u-form-item>
  77. <u-form-item label-width='260' label="容重(克/升)>=">
  78. <u-input v-model="list.contractGoodsInfo.bulkDensity" input-align="right" placeholder="" disabled />
  79. </u-form-item>
  80. <u-form-item label-width='260' label="霉变粒(%)<=">
  81. <u-input v-model="list.contractGoodsInfo.mildewGrain" input-align="right" placeholder="" disabled />
  82. </u-form-item>
  83. <u-form-item label-width='260' label="热损伤(%)<=">
  84. <u-input v-model="list.contractGoodsInfo.jiaorenli" input-align="right" placeholder="" disabled />
  85. </u-form-item>
  86. <u-form-item label-width='260' label="不完善粒(%)<=">
  87. <u-input v-model="list.contractGoodsInfo.imperfectGrain" input-align="right" placeholder="" disabled />
  88. </u-form-item>
  89. <u-form-item label-width='260' label="合同收入(元)">
  90. <u-input v-model="list.contractProcessInfo.goodsNameKey" input-align="right" placeholder="" disabled />
  91. </u-form-item>
  92. <u-form-item label-width='260' label="已开发票(元)">
  93. <u-input v-model="list.contractProcessInfo.goodsName" input-align="right" placeholder="" disabled />
  94. </u-form-item>
  95. <u-form-item label-width='260' label="费用支出(元)">
  96. <u-input v-model="list.contractProcessInfo.waterContent" input-align="right" placeholder="" disabled />
  97. </u-form-item>
  98. <u-form-item label-width='260' label="未开发票(元)">
  99. <u-input v-model="list.contractProcessInfo.impurity" input-align="right" placeholder="" disabled />
  100. </u-form-item>
  101. <u-form-item label-width='260' label="未回款(元)">
  102. <u-input v-model="list.contractProcessInfo.mildewGrain" input-align="right" placeholder="" disabled />
  103. </u-form-item>
  104. <u-form-item label-width='260' label="双章原件回收情况">
  105. <u-input v-model="list.contractProcessInfo.grade" input-align="right" placeholder="" disabled />
  106. </u-form-item>
  107. <u-form-item label-width='260' label="备注信息">
  108. </u-form-item>
  109. <u-form-item>
  110. <textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="" disabled />
  111. </u-form-item>
  112. <u-form-item label-width='260' label="附件">
  113. <!-- <view class="textCss">
  114. <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
  115. :file-list="imglist" :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError"
  116. @on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
  117. @on-progress="onProgress" :deletable="false" :showProgress = "false"></upload>
  118. </view> -->
  119. <view v-for='item in imglist'>
  120. <view @click='shadeshow(item)'>
  121. <image style='width: 200rpx;height: 200rpx;' :src="item" mode=""></image>
  122. </view>
  123. </view>
  124. </u-form-item>
  125. </u-form>
  126. <view style='padding:10px;' class='flex bottom-btn'>
  127. <u-button v-if='list.approveStatus||isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>
  128. 驳回
  129. </u-button>
  130. <u-button v-if='list.approveStatus||isSHowBtn' @click='pass' type="success" class="btn2">通过</u-button>
  131. </view>
  132. <view v-if='show' class="shade">
  133. <view class="wrap">
  134. <view class="alert-top">
  135. <view class="title">
  136. {{title}}
  137. </view>
  138. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  139. </view>
  140. <view class="u-textarea-style">
  141. <view class="right-bottom">
  142. {{auditMind.length}}/100个字
  143. </view>
  144. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  145. maxlength="100" />
  146. </view>
  147. <view @click='close()' class="cancel">取消</view>
  148. <view @click='passSubmit()' class="confirm">确定</view>
  149. </view>
  150. </view>
  151. <view @click='imgShow=false' v-if="imgShow" class="shade">
  152. <image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
  153. </view>
  154. </view>
  155. </template>
  156. <script>
  157. import upload from '@/components/upload.vue';
  158. import helper from '@/common/helper.js';
  159. export default {
  160. components: {
  161. upload
  162. },
  163. data() {
  164. return {
  165. isSHowBtn: true,
  166. id: "",
  167. currentPage: 1,
  168. pageSize: 10,
  169. list: {
  170. status: "",
  171. contractGoodsInfo: {},
  172. contractProcessInfo: {}
  173. },
  174. imglist: [],
  175. auditMind: '',
  176. show: false,
  177. title: '',
  178. contractNo: "",
  179. action: this.$uploadUrl,
  180. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  181. isAdd: true,
  182. imgShow: false,
  183. url: "",
  184. everyCheck: ''
  185. }
  186. },
  187. onBackPress(e) {
  188. if(this.everyCheck){
  189. uni.navigateTo({
  190. url: "/pages/task/my_task"
  191. })
  192. return true;
  193. }
  194. },
  195. onLoad(options) {
  196. this.id = options.id
  197. this.getList()
  198. this.everyCheck = uni.getStorageSync("everyTask")
  199. this.isSHowBtn = options.isShowbtn
  200. },
  201. methods: {
  202. shadeshow(url) {
  203. this.imgShow = true
  204. this.url = url
  205. },
  206. getList(id) {
  207. var that = this
  208. this.$api.doRequest('get', '/contractManagementInfo/getInfo', {
  209. id: this.id
  210. }).then(res => {
  211. if (res.data.code == 200) {
  212. this.list = res.data.data
  213. if (this.list.deliverType == 1) {
  214. this.list.deliverType1 = '我方自提'
  215. } else if (this.list.deliverType == 2) {
  216. this.list.deliverType1 = '对方送货'
  217. }
  218. this.$api.doRequest('get', '/appendix/query/getFileList', {
  219. appendixIds: that.list.addressUrl
  220. }).then(res1 => {
  221. for (var i = 0; i < res1.data.data.length; i++) {
  222. that.imglist.push(res1.data.data[i].appendixPath)
  223. }
  224. })
  225. }
  226. })
  227. },
  228. filterFileType(index, lists) {
  229. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  230. lists.splice(index, 1);
  231. // 当前文件不支持
  232. uni.showModal({
  233. title: '暂不支持当前图片类型',
  234. showCancel: false
  235. });
  236. } else {
  237. this.isAdd = false;
  238. }
  239. },
  240. //驳回
  241. rejectSubmit() {
  242. uni.showLoading({
  243. title: '加载中',
  244. mask: true
  245. });
  246. var that = this
  247. that.$api.doRequest('post', '/workflow/api/handle', {
  248. taskId: that.list.taskId,
  249. approved: false,
  250. auditMind: this.auditMind,
  251. needReapply: true,
  252. }).then(res => {
  253. that.$api.msg('驳回成功')
  254. that.show = false
  255. setTimeout(function() {
  256. if (that.everyCheck) {
  257. helper.setAudit(that.list)
  258. } else {
  259. uni.navigateBack()
  260. }
  261. uni.hideLoading()
  262. }, 1000);
  263. })
  264. },
  265. close() {
  266. this.show = false
  267. },
  268. pass() {
  269. this.show = true
  270. this.title = '审核意见(通过)'
  271. },
  272. reject() {
  273. this.show = true
  274. this.title = '驳回原因(驳回)'
  275. },
  276. //通过
  277. passSubmit() {
  278. var that = this
  279. if (this.title == '驳回原因(驳回)') {
  280. this.rejectSubmit()
  281. } else {
  282. uni.showLoading({
  283. title: '加载中',
  284. mask: true
  285. });
  286. that.$api.doRequest('post', '/workflow/api/handle', {
  287. taskId: that.list.taskId,
  288. approved: true,
  289. auditMind: this.auditMind,
  290. needReapply: true,
  291. }).then(res => {
  292. that.$api.msg('通过成功')
  293. that.show = false
  294. setTimeout(function() {
  295. if (that.everyCheck) {
  296. helper.setAudit(that.list)
  297. } else {
  298. uni.navigateBack()
  299. }
  300. uni.hideLoading()
  301. }, 1000);
  302. })
  303. }
  304. },
  305. //审核方法
  306. audit(item, index, status, status2, reason) {
  307. if (index < this.list.length) {
  308. this.$api.doRequest('post', '/workflow/api/handle', {
  309. taskId: item.taskId,
  310. approved: status,
  311. auditMind: reason != undefined ? '已驳回' : '34',
  312. needReapply: status2 != undefined ? true : false,
  313. }).then(res => {
  314. this.audit(this.list[index + 1], index + 1, status)
  315. })
  316. } else {
  317. if (status == true) {
  318. that.$api.msg('通过成功')
  319. this.getList()
  320. } else if (status == false) {
  321. that.$api.msg('驳回成功')
  322. this.getList()
  323. }
  324. }
  325. },
  326. }
  327. }
  328. </script>
  329. <style scoped lang="scss">
  330. .container {
  331. padding: 20rpx 20rpx 250rpx 20rpx;
  332. }
  333. .u-form {
  334. background: #fff;
  335. border-radius: 10px;
  336. padding: 0 10px;
  337. .u-form-item {
  338. line-height: 30px;
  339. padding: 5px 0;
  340. }
  341. }
  342. .content {
  343. margin-top: 30rpx;
  344. .top {
  345. display: flex;
  346. justify-content: space-between;
  347. }
  348. .content-item {
  349. border-radius: 20rpx;
  350. background: white;
  351. padding: 40rpx 20rpx;
  352. margin-bottom: 30rpx;
  353. }
  354. .title {
  355. font-size: 32rpx;
  356. font-weight: 600;
  357. color: #333333;
  358. text-align: left;
  359. margin: 20rpx 0;
  360. }
  361. .car-container {
  362. border-bottom: 2rpx solid #EEEEEE;
  363. }
  364. .car-type-item {
  365. font-size: 28rpx;
  366. margin: 20rpx 0;
  367. color: #878C9C;
  368. }
  369. .weightInfoCss {
  370. font-size: 28rpx;
  371. color: #333333;
  372. font-weight: 500;
  373. }
  374. .row {
  375. display: flex;
  376. justify-content: space-between;
  377. // .right,
  378. // input {
  379. // font-size: 28rpx;
  380. // // color: #333333;
  381. // }
  382. }
  383. .money {
  384. font-size: 32rpx;
  385. font-weight: 500;
  386. margin-bottom: 30rpx;
  387. }
  388. .moneyInfo {
  389. color: #22C572;
  390. font-size: 32rpx;
  391. }
  392. }
  393. .bottom-btn {
  394. width: 100%;
  395. position: fixed;
  396. bottom: 0;
  397. display: flex;
  398. z-index: 2;
  399. left: 0;
  400. background-color: #f8f8f8;
  401. flex-direction: column;
  402. .btn1,
  403. .btn2 {
  404. width: 100%;
  405. margin-bottom: 26rpx;
  406. border-radius: 90rpx;
  407. }
  408. .btn1 {
  409. background: white;
  410. color: #00C265;
  411. }
  412. }
  413. .topInfo {
  414. height: 210rpx;
  415. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  416. padding: 30rpx;
  417. .topInfo-item {
  418. height: 150rpx;
  419. background-color: #FFFFFF;
  420. border-radius: 20rpx;
  421. padding: 40rpx;
  422. .logo {
  423. width: 40rpx;
  424. height: 40rpx;
  425. margin-top: 8rpx;
  426. }
  427. .infoText {
  428. font-size: 36rpx;
  429. font-weight: 600;
  430. margin-left: 20rpx;
  431. }
  432. .infoData {
  433. color: #878C9C;
  434. font-size: 26rpx;
  435. margin-top: 10rpx;
  436. }
  437. }
  438. }
  439. .shade {
  440. position: fixed;
  441. top: 0;
  442. left: 0;
  443. height: 100%;
  444. width: 100%;
  445. background: rgba(0, 0, 0, 0.4);
  446. z-index: 3;
  447. .wrap {
  448. position: absolute;
  449. left: 0;
  450. top: 0;
  451. right: 0;
  452. bottom: 0;
  453. margin: auto;
  454. background: #fff;
  455. width: calc(100% - 198rpx);
  456. height: 700rpx;
  457. border-radius: 20rpx;
  458. .alert-top {
  459. padding: 33rpx;
  460. display: flex;
  461. justify-content: center;
  462. align-items: center;
  463. position: relative;
  464. }
  465. .title {
  466. font-size: 32rpx;
  467. font-weight: 600;
  468. color: #333333;
  469. }
  470. .close {
  471. position: absolute;
  472. right: 33rpx;
  473. }
  474. }
  475. }
  476. .cancel,
  477. .confirm {
  478. position: absolute;
  479. display: inline-block;
  480. width: 50%;
  481. text-align: center;
  482. bottom: 0;
  483. padding: 10px;
  484. border-top: 1px solid #eee;
  485. font-size: 34rpx;
  486. }
  487. .cancel {
  488. left: 0;
  489. border-right: 1px solid #eee;
  490. color: #AFB3BF;
  491. }
  492. .confirm {
  493. right: 0;
  494. color: #22C572;
  495. }
  496. .textCss {
  497. display: flex;
  498. justify-content: flex-end;
  499. width: 100%;
  500. text-align: right;
  501. }
  502. .textarea {
  503. margin: 20px auto;
  504. width: 100%;
  505. background: #F9F9FA;
  506. border-radius: 10px;
  507. border: 1px solid #EEEEEE;
  508. font-size: 28rpx;
  509. padding: 10px;
  510. }
  511. /deep/.u-form-item--right__content__slot{
  512. flex-wrap: wrap;
  513. }
  514. .u-textarea-style {
  515. margin: 20rpx;
  516. background: #F9F9FA;
  517. border-radius: 10px;
  518. border: 1px solid #EEEEEE;
  519. padding: 10rpx 20rpx;
  520. position: relative;
  521. .right-bottom {
  522. position: absolute;
  523. right: 20rpx;
  524. bottom: 20rpx;
  525. color: #AFB3BF;
  526. }
  527. }
  528. </style>