daichu_details.vue 16 KB

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