Issueandreceipt_task_details.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. <template>
  2. <view class="warp">
  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="OutList.taskStatus == '已驳回'||EnterList.taskStatus == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-else-if="OutList.taskStatus == '已通过'||EnterList.taskStatus == '已通过'||OutList.taskStatus == '执行中'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode="" v-else-if="OutList.taskStatus == '审核中'||OutList.taskStatus == '待审核'||EnterList.taskStatus == '待审核'"
  12. style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText" v-if="OutList.taskStatus">{{OutList.taskStatus}}</view>
  15. <view class="infoText" v-else>{{EnterList.taskStatus}}</view>
  16. </view>
  17. <view class="infoData" v-if="OutList.updateDate">{{OutList.updateDate}}</view>
  18. <view class="infoData" v-else>{{EnterList.updateDate}}</view>
  19. </view>
  20. </view>
  21. <view class="content1">
  22. <u-form :model="OutList" ref="uForm">
  23. <u-form-item label="任务类型" prop="inOutType" label-width="140" class="uForm_item">
  24. <u-input v-model="OutList.inOutType" input-align="right" disabled v-if="OutList.inOutType" />
  25. <u-input v-model="EnterList.inOutType" input-align="right" disabled v-else />
  26. </u-form-item>
  27. <view v-if="retreatList.judge == 3 && retreatList">
  28. <!-- 退库 -->
  29. <view class="uForm_item">
  30. <view class="title part2">{{retreatList.inOutType}}</view>
  31. <view class='row'>
  32. <view class="left">编号</view>
  33. <view class="right">退库({{retreatList.inOutTaskNo}}}</view>
  34. </view>
  35. <view class='row'>
  36. <view class="left">仓库</view>
  37. <view class="right">{{retreatList.warehouseName}}</view>
  38. </view>
  39. <view class='row'>
  40. <view class="left">出库类型</view>
  41. <view class="right">{{retreatList.inOutType}}</view>
  42. </view>
  43. <view class='row' v-if="retreatList.inOutType == '移库出库'">
  44. <view class="left">移库任务编号</view>
  45. <view class="right">{{retreatList.moveTaskNo}}</view>
  46. </view>
  47. <view class='row' v-if="retreatList.inOutType != '移库出库'">
  48. <view class="left">合同编号</view>
  49. <view class="right">{{retreatList.contractNo}}</view>
  50. </view>
  51. <view class='row'>
  52. <view class="left">货名</view>
  53. <view class="right">{{retreatList.goodsName}}</view>
  54. </view>
  55. <view class='row'>
  56. <view class="left">重量(吨)</view>
  57. <view class="right">{{retreatList.weight}}</view>
  58. </view>
  59. <view class='row'>
  60. <view class="left">预计出库日期</view>
  61. <view class="right">{{retreatList.predictDate}}</view>
  62. </view>
  63. <view class='row'>
  64. <view class="left">出库经办人</view>
  65. <view class="right">{{retreatList.publisher}}</view>
  66. </view>
  67. </view>
  68. <view class="uForm_item">
  69. <u-form-item label="品级" prop="grade" label-width="150" disabled>
  70. <u-input v-model="retreatList.grade" input-align="right" placeholder="" @click='show=true'
  71. disabled />
  72. </u-picker>
  73. </u-form-item>
  74. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190">
  75. <u-input v-model="retreatList.bulkDensity" input-align="right" placeholder="" disabled/>
  76. </u-form-item>
  77. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160">
  78. <u-input v-model="retreatList.waterContent" input-align="right" placeholder="" disabled/>
  79. </u-form-item>
  80. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160">
  81. <u-input v-model="retreatList.unitPrice" input-align="right" placeholder="" disabled/>
  82. </u-form-item>
  83. </view>
  84. </view>
  85. <view v-if="OutList.judge == 1">
  86. <view class="uForm_item">
  87. <!-- 出库 -->
  88. <view class="title part2">{{OutList.inOutType}}</view>
  89. <view class='row'>
  90. <view class="left">编号</view>
  91. <view class="right">出库({{OutList.inOutTaskNo}})</view>
  92. </view>
  93. <view class='row'>
  94. <view class="left">仓库</view>
  95. <view class="right">{{OutList.warehouseName}}</view>
  96. </view>
  97. <view class='row'>
  98. <view class="left">出库类型</view>
  99. <view class="right">{{OutList.inOutType}}</view>
  100. </view>
  101. <view class='row' v-if="OutList.inOutType == '移库出库'">
  102. <view class="left">移库任务编号</view>
  103. <view class="right">{{OutList.moveTaskNo}}</view>
  104. </view>
  105. <view class='row' v-if="OutList.inOutType != '移库出库'">
  106. <view class="left">合同编号</view>
  107. <view class="right">{{OutList.contractNo}}</view>
  108. </view>
  109. <view class='row'>
  110. <view class="left">货名</view>
  111. <view class="right">{{OutList.goodsName}}</view>
  112. </view>
  113. <view class='row'>
  114. <view class="left">重量(吨)</view>
  115. <view class="right">{{OutList.weight}}</view>
  116. </view>
  117. <view class='row'>
  118. <view class="left">预计出库日期</view>
  119. <view class="right">{{OutList.predictDate}}</view>
  120. </view>
  121. <view class='row'>
  122. <view class="left">出库经办人</view>
  123. <view class="right">{{OutList.publisher}}</view>
  124. </view>
  125. </view>
  126. <view class="uForm_item">
  127. <u-form-item label="品级" prop="grade" label-width="150" v-if="retreatList.inOutType != '退库'">
  128. <u-input v-model="OutList.grade" input-align="right" placeholder=""
  129. disabled />
  130. </u-form-item>
  131. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190"
  132. v-if="retreatList.inOutType != '退库'">
  133. <u-input v-model="OutList.bulkDensity" input-align="right" placeholder="" disabled/>
  134. </u-form-item>
  135. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160"
  136. v-if="retreatList.inOutType != '退库'" >
  137. <u-input v-model="OutList.waterContent" input-align="right" placeholder="" disabled/>
  138. </u-form-item>
  139. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160"
  140. v-if="retreatList.inOutType != '退库'">
  141. <u-input v-model="OutList.unitPrice" input-align="right" placeholder="" disabled/>
  142. </u-form-item>
  143. <u-form-item label="业务描述" prop="businessDescribe" label-width="160" label-position="top"
  144. v-if="OutList.inOutType != '移库出库'">
  145. <u-input v-model="OutList.businessDescribe" input-align="left" placeholder="请输入业务描述"
  146. type="textarea" class="textarea" maxlength="150" disabled/>
  147. </u-form-item>
  148. <u-form-item v-if="retreatList.inOutType!='退库'" label="仓位号(选填)" prop="binNumber"
  149. label-width="170">
  150. <u-input v-model="OutList.binNumber" input-align="right" placeholder="未指定" disabled/>
  151. </u-form-item>
  152. </view>
  153. </view>
  154. <view v-if="EnterList.judge == 2 && EnterList">
  155. <view class="uForm_item">
  156. <!-- 入库 -->
  157. <view class="title part2">{{EnterList.inOutType}}</view>
  158. <view class='row'>
  159. <view class="left">编号</view>
  160. <view class="right">入库({{EnterList.inOutTaskNo}})</view>
  161. </view>
  162. <view class='row'>
  163. <view class="left">仓库</view>
  164. <view class="right">{{EnterList.warehouseName}}</view>
  165. </view>
  166. <view class='row'>
  167. <view class="left">入库类型</view>
  168. <view class="right">{{EnterList.inOutType}}</view>
  169. </view>
  170. <view class='row' v-if="EnterList.inOutType == '移库入库'">
  171. <view class="left">移库任务编号</view>
  172. <view class="right">{{EnterList.moveTaskNo}}</view>
  173. </view>
  174. <view class='row' v-if="EnterList.inOutType != '移库入库'">
  175. <view class="left">合同编号</view>
  176. <view class="right">{{EnterList.contractNo}}</view>
  177. </view>
  178. <view class='row'>
  179. <view class="left">货名</view>
  180. <view class="right">{{EnterList.goodsName}}</view>
  181. </view>
  182. <view class='row'>
  183. <view class="left">重量(吨)</view>
  184. <view class="right">{{EnterList.weight}}</view>
  185. </view>
  186. <view class='row'>
  187. <view class="left">预计入库日期</view>
  188. <view class="right">{{EnterList.predictDate}}</view>
  189. </view>
  190. <view class='row'>
  191. <view class="left">出库经办人</view>
  192. <view class="right">{{EnterList.publisher}}</view>
  193. </view>
  194. </view>
  195. <view class="uForm_item">
  196. <u-form-item label="品级" prop="grade" label-width="150" v-if="EnterList.inOutType != '移库入库' ">
  197. <u-input v-model="EnterList.grade" input-align="right" placeholder="请选择品级"
  198. @click='show=true' disabled />
  199. </u-picker>
  200. </u-form-item>
  201. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190"
  202. v-if="EnterList.inOutType != '移库入库'">
  203. <u-input v-model="EnterList.bulkDensity" input-align="right" placeholder="请输入容重占比" disabled/>
  204. </u-form-item>
  205. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160"
  206. v-if="EnterList.inOutType != '移库入库'">
  207. <u-input v-model="EnterList.waterContent" input-align="right" placeholder="请输入水分占比" disabled/>
  208. </u-form-item>
  209. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160"
  210. v-if="EnterList.inOutType != '移库入库'">
  211. <u-input v-model="EnterList.unitPrice" input-align="right" placeholder="请输入单价" disabled/>
  212. </u-form-item>
  213. <u-form-item label="业务描述" prop="businessDescribe" label-width="160" label-position="top">
  214. <u-input v-model="EnterList.businessDescribe" input-align="left" placeholder="请输入业务描述"
  215. type="textarea" class="textarea" maxlength="150" disabled/>
  216. </u-form-item>
  217. <u-form-item v-if="OutList.inOutType!='退库'" label="仓位号(选填)" prop="binNumber" label-width="170">
  218. <u-input v-model="EnterList.binNumber" input-align="right" placeholder="未指定" disabled/>
  219. </u-form-item>
  220. </view>
  221. </view>
  222. <view class="uForm_item" v-if="OutList.taskTypeKey == 3 && !EnterList.judge">
  223. <view class="deleteText">移库入库(已删除)</view>
  224. </view>
  225. </u-form>
  226. </view>
  227. <view style='padding:10px;' class='flex bottom-btn'>
  228. <u-button @click='fanHui' type="success" class="btn1" hover-class='none'>返回</u-button>
  229. </view>
  230. </view>
  231. </template>
  232. <script>
  233. import {
  234. mapState
  235. } from 'vuex';
  236. export default {
  237. data() {
  238. return {
  239. id: "",
  240. OutList: {}, //出
  241. EnterList: {}, //入
  242. retreatList: {}, //退
  243. type: '移库',
  244. show: false,
  245. show1: false,
  246. border: false,
  247. rejectInfo: "", //驳回原因
  248. pjList: [{
  249. type: '一等品'
  250. },
  251. {
  252. type: '二等品'
  253. },
  254. {
  255. type: '三等品'
  256. },
  257. {
  258. type: '等外'
  259. }
  260. ],
  261. }
  262. },
  263. // onReady() {
  264. // this.$refs.uForm.setRules(this.rules);
  265. // },
  266. onLoad(options) {
  267. this.id = options.id
  268. this.getList()
  269. },
  270. computed: {
  271. ...mapState(['hasLogin', 'userInfo']),
  272. },
  273. methods: {
  274. getList() {
  275. this.$api.doRequest('get', '/inOutWarehouseTask/getTask', {
  276. id: this.id
  277. }).then(res => {
  278. if (res.data.code == 200) {
  279. this.$api.doRequest('get', '/inOutWarehouseTask/getInOutWarehouseTask', {
  280. relevanceId: res.data.data.relevanceId
  281. }).then(res => {
  282. if (res.data.code == 200) {
  283. for (let i = 0; i < res.data.data.length; i++) {
  284. if (res.data.data[i].inOutType == "移库出库" || res.data.data[i]
  285. .inOutType == "贸易服务出库" || res.data.data[i].inOutType == "销售出库" ||
  286. res.data.data[i].inOutType == "暂存出库") {
  287. this.OutList = res.data.data[i]
  288. this.OutList.judge = 1
  289. } else if (res.data.data[i].inOutType == "移库入库" || res.data.data[i]
  290. .inOutType == "暂存入库" || res
  291. .data.data[i].inOutType == "采购入库" || res.data.data[i].inOutType ==
  292. "贸易服务入库") {
  293. this.EnterList = res.data.data[i]
  294. this.EnterList.judge = 2
  295. } else if (res.data.data[i].inOutType == "退库") {
  296. this.retreatList = res.data.data[i]
  297. this.retreatList.judge = 3
  298. }
  299. }
  300. }
  301. })
  302. }
  303. })
  304. },
  305. pjPicker(e) {
  306. this.OutList.grade = this.pjList[e[0]].type
  307. this.OutList.gradeKey = e[0] + 1
  308. },
  309. pjPicker1(e) {
  310. this.EnterList.grade = this.pjList[e[0]].type
  311. this.EnterList.gradeKey = e[0] + 1
  312. },
  313. passSubmit() {
  314. this.OutList.inOutFlag = 1
  315. this.EnterList.inOutFlag = 2
  316. if (this.OutList.taskTypeKey == 1) {
  317. this.requestadd(this.OutList)
  318. } else if (this.EnterList.taskTypeKey == 2) {
  319. this.requestadd(this.EnterList)
  320. } else if (
  321. this.OutList.taskTypeKey == 3 ||
  322. this.OutList.taskTypeKey == 4
  323. ) {
  324. this.requestadd(this.OutList, 'repetition')
  325. if (!this.deletetask) {
  326. this.requestadd(this.EnterList, 'repetition')
  327. }
  328. }
  329. if(this.retreatList.taskTypeKey == 1 || this.retreatList.taskTypeKey == 2){
  330. this.requestadd(this.retreatList)
  331. }else if(this.retreatList.taskTypeKey == 3 || this.retreatList.taskTypeKey == 4){
  332. this.requestadd(this.retreatList, 'repetition')
  333. }
  334. },
  335. rejectSubmit() {
  336. // (1出库2入库3移库4退库并出库)taskTypeKey
  337. if (!this.rejectInfo) {
  338. this.$api.msg('驳回原因不能为空!')
  339. } else {
  340. this.show1 = false
  341. if (this.OutList.taskTypeKey == 1 ) {
  342. this.requestaudit(this.OutList)
  343. } else if (this.OutList.taskTypeKey == 2) {
  344. this.requestaudit(this.OutList)
  345. } else if (
  346. this.OutList.taskTypeKey == 3 ||
  347. this.OutList.taskTypeKey == 4
  348. ) {
  349. this.requestaudit(this.OutList, 'repetition')
  350. if (!this.deletetask) {
  351. this.requestaudit(this.OutList, 'repetition')
  352. }
  353. }
  354. if(this.EnterList){
  355. if(this.EnterList.taskTypeKey == 1 || this.EnterList.taskTypeKey == 2){
  356. this.requestaudit(this.EnterList)
  357. }else if(this.EnterList.taskTypeKey == 3 || this.EnterList.taskTypeKey == 4){
  358. this.requestaudit(this.EnterList, 'repetition')
  359. }
  360. }
  361. if(this.retreatList){
  362. if(this.retreatList.taskTypeKey == 1 || this.retreatList.taskTypeKey == 2){
  363. this.requestaudit(this.retreatList)
  364. }else if(this.retreatList.taskTypeKey == 3 || this.retreatList.taskTypeKey == 4){
  365. this.requestaudit(this.retreatList, 'repetition')
  366. }
  367. }
  368. }
  369. },
  370. requestadd(list, status) {
  371. list.compId = sessionStorage.getItem('ws-pf_compId')
  372. list.publisher = this.userInfo.userName
  373. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  374. if (res.data.code == 200) {
  375. this.$api.doRequest('post', '/workflow/api/handle', {
  376. taskId: list.taskId,
  377. approved: true,
  378. auditMind: '34',
  379. needReapply: false
  380. }).then(res => {
  381. if (res.data.code == 200) {
  382. this.$api.msg('审核成功!')
  383. setTimeout(function() {
  384. uni.navigateBack()
  385. }, 1000);
  386. }
  387. })
  388. }
  389. })
  390. },
  391. requestaudit(list, status) {
  392. list.compId = '2710b21efc1e4393930c5dc800010dc4'
  393. list.publisher = this.userInfo.userName
  394. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  395. if (res.data.code == 200) {
  396. this.$api.doRequest('post', '/workflow/api/handle', {
  397. taskId: list.taskId,
  398. approved: false,
  399. auditMind: this.rejectInfo,
  400. needReapply: true
  401. }).then(res => {
  402. if (res.data.code == 200) {
  403. this.$api.msg('驳回成功!')
  404. setTimeout(function() {
  405. uni.navigateBack()
  406. }, 1000);
  407. }
  408. })
  409. }
  410. })
  411. },
  412. fanHui(){
  413. uni.navigateBack()
  414. }
  415. }
  416. }
  417. </script>
  418. <style scoped lang="scss">
  419. .content1 {
  420. margin: 10rpx;
  421. padding-bottom: 120rpx;
  422. .title {
  423. height: 70rpx;
  424. line-height: 60rpx;
  425. font-size: 32rpx;
  426. font-weight: 600;
  427. color: #333333;
  428. border-bottom: 2rpx solid #EEEEEE;
  429. }
  430. }
  431. .uForm {
  432. padding: 0 40rpx;
  433. }
  434. .u-form-item {
  435. padding: 0;
  436. }
  437. .bottom-btn {
  438. width: 100%;
  439. position: fixed;
  440. bottom: 0;
  441. display: flex;
  442. z-index: 2;
  443. left: 0;
  444. background-color: #f8f8f8;
  445. flex-direction: column;
  446. .btn1,
  447. .btn2 {
  448. width: 100%;
  449. margin-bottom: 26rpx;
  450. border-radius: 90rpx;
  451. }
  452. .btn1 {
  453. background: white;
  454. color: #00C265;
  455. }
  456. }
  457. .submit {
  458. width: 50%;
  459. background: #22C572;
  460. border-radius: 10rpx;
  461. }
  462. .part2 {
  463. margin-top: 20rpx;
  464. }
  465. .textarea {
  466. border: 1px solid #ccc;
  467. border-radius: 10rpx;
  468. background-color: #F9F9FA;
  469. height: 100px;
  470. }
  471. .row {
  472. display: flex;
  473. justify-content: space-between;
  474. // border-bottom: 1px solid #EEEEEE;
  475. padding: 21rpx 0;
  476. .right,
  477. input {
  478. font-size: 28rpx;
  479. color: #333333;
  480. }
  481. }
  482. //弹出框
  483. // .popup {
  484. // padding: 30rpx;
  485. // border-radius: 20rpx;
  486. // }
  487. .rejectInfoCss {
  488. border: 1px solid #ccc;
  489. border-radius: 10rpx;
  490. background-color: #F9F9FA;
  491. height: 100px;
  492. margin: 30rpx;
  493. }
  494. .uForm_item {
  495. padding: 20rpx;
  496. background-color: #FFFFFF;
  497. margin: 20rpx;
  498. border-radius: 20rpx;
  499. }
  500. .rejectText {
  501. text-align: center;
  502. }
  503. .topInfo {
  504. height: 210rpx;
  505. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  506. padding: 30rpx;
  507. .topInfo-item {
  508. height: 150rpx;
  509. background-color: #FFFFFF;
  510. border-radius: 20rpx;
  511. padding: 40rpx;
  512. .logo {
  513. width: 40rpx;
  514. height: 40rpx;
  515. margin-top: 8rpx;
  516. }
  517. .infoText {
  518. font-size: 36rpx;
  519. font-weight: 600;
  520. margin-left: 20rpx;
  521. }
  522. .infoData {
  523. color: #878C9C;
  524. font-size: 26rpx;
  525. margin-top: 10rpx;
  526. }
  527. }
  528. }
  529. .deleteText{
  530. text-align: center;
  531. color: #AFB3BF;
  532. }
  533. </style>