Issueandreceipt_task_approval.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007
  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=""
  8. v-if="OutList.taskStatus == '已驳回'||EnterList.taskStatus == '已驳回'" style="height: 40rpx;">
  9. </image><!-- 驳回 -->
  10. <image src="../../../static/img/tongguo.png" mode=""
  11. v-else-if="OutList.taskStatus == '已通过'||EnterList.taskStatus == '已通过'||OutList.taskStatus == '执行中'"
  12. style="height: 40rpx;"></image><!-- 通过 -->
  13. <image src="../../../static/img/daishenhe.png" mode=""
  14. v-else-if="OutList.taskStatus == '审核中'||OutList.taskStatus == '待审核'||EnterList.taskStatus == '待审核'"
  15. style="height: 40rpx;"></image><!-- 待审核 -->
  16. </view>
  17. <view class="infoText" v-if="OutList.taskStatus">{{OutList.taskStatus}}</view>
  18. <view class="infoText" v-else>{{EnterList.taskStatus}}</view>
  19. </view>
  20. <view class="infoData" v-if="OutList.updateDate">{{OutList.updateDate}}</view>
  21. <view class="infoData" v-else>{{EnterList.updateDate}}</view>
  22. </view>
  23. </view>
  24. <view class="content1">
  25. <u-form :model="OutList" ref="uForm">
  26. <u-form-item label="任务类型" prop="inOutType" label-width="140" class="uForm_item">
  27. <u-input v-model="OutList.inOutType" input-align="right" disabled v-if="OutList.inOutType" />
  28. <u-input v-model="EnterList.inOutType" input-align="right" disabled v-else />
  29. </u-form-item>
  30. <view v-if="retreatList.judge == 3">
  31. <!-- 退库 -->
  32. <view class="uForm_item">
  33. <view class="title part2">{{retreatList.inOutType}}</view>
  34. <view class='row'>
  35. <view class="left">编号</view>
  36. <view class="right">退库({{retreatList.inOutTaskNo}}}</view>
  37. </view>
  38. <view class='row'>
  39. <view class="left">仓库</view>
  40. <view class="right">{{retreatList.warehouseName}}</view>
  41. </view>
  42. <view class='row'>
  43. <view class="left">出库类型</view>
  44. <view class="right">{{retreatList.inOutType}}</view>
  45. </view>
  46. <view class='row' v-if="retreatList.inOutType == '移库出库'">
  47. <view class="left">移库任务编号</view>
  48. <view class="right">{{retreatList.moveTaskNo}}</view>
  49. </view>
  50. <view class='row' v-if="retreatList.inOutType != '移库出库'">
  51. <view class="left">合同编号</view>
  52. <view class="right">{{retreatList.contractNo}}</view>
  53. </view>
  54. <view class='row'>
  55. <view class="left">货名</view>
  56. <view class="right">{{retreatList.goodsName}}</view>
  57. </view>
  58. <view class='row'>
  59. <view class="left">重量(吨)</view>
  60. <view class="right">{{retreatList.weight}}</view>
  61. </view>
  62. <view class='row'>
  63. <view class="left">预计出库日期</view>
  64. <view class="right">{{retreatList.predictDate}}</view>
  65. </view>
  66. <!-- <view class='row'>
  67. <view class="left">预估运费(元/吨)</view>
  68. <view class="right">{{retreatList.estimatedFreight}}</view>
  69. </view> -->
  70. <view class='row'>
  71. <view class="left">收货人</view>
  72. <view class="right">{{retreatList.agent}}</view>
  73. </view>
  74. </view>
  75. <view class="uForm_item">
  76. <u-form-item label="品级" prop="grade" label-width="150">
  77. <u-input v-model="retreatList.grade" input-align="right" placeholder="" @click='show=true'
  78. disabled />
  79. <u-picker :range="pjList" range-key="type" @confirm='pjPicker($event)' v-model="show"
  80. mode="selector">
  81. </u-picker>
  82. </u-form-item>
  83. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190">
  84. <u-input v-model="retreatList.bulkDensity" input-align="right" placeholder="" />
  85. </u-form-item>
  86. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160">
  87. <u-input v-model="retreatList.waterContent" input-align="right" placeholder="" />
  88. </u-form-item>
  89. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160">
  90. <u-input v-model="retreatList.unitPrice" input-align="right" placeholder="" />
  91. </u-form-item>
  92. </view>
  93. </view>
  94. <view v-if="OutList.judge == 1">
  95. <view class="uForm_item">
  96. <!-- 出库 -->
  97. <view class="title part2">{{OutList.inOutType}}</view>
  98. <view class='row'>
  99. <view class="left">编号</view>
  100. <view class="right">出库({{OutList.inOutTaskNo}})</view>
  101. </view>
  102. <view class='row'>
  103. <view class="left">仓库</view>
  104. <view class="right">{{OutList.warehouseName}}</view>
  105. </view>
  106. <view class='row'>
  107. <view class="left">出库类型</view>
  108. <view class="right">{{OutList.inOutType}}</view>
  109. </view>
  110. <view class='row' v-if="OutList.inOutType == '移库出库'">
  111. <view class="left">移库任务编号</view>
  112. <view class="right">{{OutList.moveTaskNo}}</view>
  113. </view>
  114. <view class='row' v-if="OutList.inOutType != '移库出库'">
  115. <view class="left">合同编号</view>
  116. <view class="right">{{OutList.contractNo}}</view>
  117. </view>
  118. <view class='row'>
  119. <view class="left">货名</view>
  120. <view class="right">{{OutList.goodsName}}</view>
  121. </view>
  122. <view class='row'>
  123. <view class="left">重量(吨)</view>
  124. <view class="right">{{OutList.weight}}</view>
  125. </view>
  126. <view class='row'>
  127. <view class="left">预计出库日期</view>
  128. <view class="right">{{OutList.predictDate}}</view>
  129. </view>
  130. <!-- <view class='row'>
  131. <view class="left">预估运费(元/吨)</view>
  132. <view class="right">{{OutList.estimatedFreight}}</view>
  133. </view> -->
  134. <view class='row'>
  135. <view class="left">发货人</view>
  136. <view class="right">{{OutList.agent}}</view>
  137. </view>
  138. </view>
  139. <view class="uForm_item">
  140. <u-form-item label="品级" prop="grade" label-width="150" v-if="retreatList.inOutType != '退库'">
  141. <u-input v-model="OutList.grade" input-align="right" placeholder="" @click='show=true'
  142. disabled />
  143. <u-picker :range="pjList" range-key="type" @confirm='pjPicker($event)' v-model="show"
  144. mode="selector"></u-picker>
  145. </u-form-item>
  146. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190"
  147. v-if="retreatList.inOutType != '退库'">
  148. <u-input v-model="OutList.bulkDensity" input-align="right" placeholder="" />
  149. </u-form-item>
  150. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160"
  151. v-if="retreatList.inOutType != '退库'">
  152. <u-input v-model="OutList.waterContent" input-align="right" placeholder="" />
  153. </u-form-item>
  154. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160"
  155. v-if="retreatList.inOutType != '退库'">
  156. <u-input v-model="OutList.unitPrice" input-align="right" placeholder="" />
  157. </u-form-item>
  158. <u-form-item label="业务描述" prop="businessDescribe" label-width="160" label-position="top"
  159. v-if="OutList.inOutType != '移库出库'">
  160. <u-input v-model="OutList.businessDescribe" input-align="left" placeholder="请输入业务描述"
  161. type="textarea" class="textarea" maxlength="150" />
  162. </u-form-item>
  163. <u-form-item v-if="retreatList.inOutType!='退库'" label="仓位号(选填)" prop="binNumber"
  164. label-width="170">
  165. <u-input v-model="OutList.binNumber" input-align="right" placeholder="未指定" />
  166. </u-form-item>
  167. </view>
  168. </view>
  169. <view v-if="EnterList.judge == 2">
  170. <view class="uForm_item">
  171. <!-- 入库 -->
  172. <view class="title part2">{{EnterList.inOutType}}</view>
  173. <view class='row'>
  174. <view class="left">编号</view>
  175. <view class="right">入库({{EnterList.inOutTaskNo}})</view>
  176. </view>
  177. <view class='row'>
  178. <view class="left">仓库</view>
  179. <view class="right">{{EnterList.warehouseName}}</view>
  180. </view>
  181. <view class='row'>
  182. <view class="left">入库类型</view>
  183. <view class="right">{{EnterList.inOutType}}</view>
  184. </view>
  185. <view class='row' v-if="EnterList.inOutType == '移库入库'">
  186. <view class="left">移库任务编号</view>
  187. <view class="right">{{EnterList.moveTaskNo}}</view>
  188. </view>
  189. <view class='row' v-if="EnterList.inOutType != '移库入库'">
  190. <view class="left">合同编号</view>
  191. <view class="right">{{EnterList.contractNo}}</view>
  192. </view>
  193. <view class='row'>
  194. <view class="left">货名</view>
  195. <view class="right">{{EnterList.goodsName}}</view>
  196. </view>
  197. <view class='row'>
  198. <view class="left">重量(吨)</view>
  199. <view class="right">{{EnterList.weight}}</view>
  200. </view>
  201. <view class='row'>
  202. <view class="left">预计入库日期</view>
  203. <view class="right">{{EnterList.predictDate}}</view>
  204. </view>
  205. <!-- <view class='row'>
  206. <view class="left">预估运费(元/吨)</view>
  207. <view class="right">{{EnterList.estimatedFreight}}</view>
  208. </view> -->
  209. <view class='row'>
  210. <view class="left">收货人</view>
  211. <view class="right">{{EnterList.agent}}</view>
  212. </view>
  213. </view>
  214. <view class="uForm_item">
  215. <u-form-item label="品级" prop="grade" label-width="150" v-if="EnterList.inOutType != '移库入库' ">
  216. <u-input v-model="EnterList.grade" input-align="right" placeholder="请选择品级"
  217. @click='show=true' disabled />
  218. <u-picker :range="pjList" range-key="type" @confirm='pjPicker1($event)' v-model="show"
  219. mode="selector">
  220. </u-picker>
  221. </u-form-item>
  222. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190"
  223. v-if="EnterList.inOutType != '移库入库'">
  224. <u-input v-model="EnterList.bulkDensity" input-align="right" placeholder="请输入容重占比" />
  225. </u-form-item>
  226. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160"
  227. v-if="EnterList.inOutType != '移库入库'">
  228. <u-input v-model="EnterList.waterContent" input-align="right" placeholder="请输入水分占比" />
  229. </u-form-item>
  230. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160"
  231. v-if="EnterList.inOutType != '移库入库'">
  232. <u-input v-model="EnterList.unitPrice" input-align="right" placeholder="请输入单价" />
  233. </u-form-item>
  234. <u-form-item label="业务描述" prop="businessDescribe" label-width="160" label-position="top">
  235. <u-input v-model="EnterList.businessDescribe" input-align="left" placeholder="请输入业务描述"
  236. type="textarea" class="textarea" maxlength="150" />
  237. </u-form-item>
  238. <u-form-item v-if="OutList.inOutType!='退库'" label="仓位号(选填)" prop="binNumber" label-width="170">
  239. <u-input v-model="EnterList.binNumber" input-align="right" placeholder="未指定" />
  240. </u-form-item>
  241. </view>
  242. </view>
  243. </u-form>
  244. </view>
  245. <view v-if='show1' class="shade">
  246. <view class="wrap">
  247. <view class="alert-top">
  248. <view class="title">
  249. {{title}}
  250. </view>
  251. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  252. </view>
  253. <view class="u-textarea-style">
  254. <view class="right-bottom">
  255. {{auditMind.length}}/100个字
  256. </view>
  257. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  258. maxlength="100" />
  259. </view>
  260. <view @click='close()' class="cancel">取消</view>
  261. <view @click='passSubmit()' class="confirm">确定</view>
  262. </view>
  263. </view>
  264. <u-toast ref="uToast" />
  265. <view style='padding:10px;' class='flex bottom-btn'>
  266. <u-button @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  267. <u-button @click='pass' type="success" class="btn2">通过</u-button>
  268. </view>
  269. </view>
  270. </template>
  271. <script>
  272. import helper from '@/common/helper.js';
  273. import {
  274. mapState
  275. } from 'vuex';
  276. export default {
  277. data() {
  278. return {
  279. everyCheck: '',
  280. height: 200,
  281. autoHeight: true,
  282. border: false,
  283. id: "",
  284. OutList: {}, //出
  285. EnterList: {}, //入
  286. retreatList: {}, //退
  287. type: '移库',
  288. show: false,
  289. show1: false,
  290. auditMind: '',
  291. pjList: [{
  292. type: '一等品'
  293. },
  294. {
  295. type: '二等品'
  296. },
  297. {
  298. type: '三等品'
  299. },
  300. {
  301. type: '等外'
  302. }
  303. ],
  304. count:0,
  305. }
  306. },
  307. // onReady() {
  308. // this.$refs.uForm.setRules(this.rules);
  309. // },
  310. onBackPress(e) {
  311. if(this.everyCheck){
  312. uni.navigateTo({
  313. url: "/pages/task/my_task"
  314. })
  315. return true;
  316. }
  317. },
  318. onLoad(options) {
  319. this.id = options.id
  320. this.everyCheck = uni.getStorageSync("everyTask")
  321. this.count=0
  322. this.getList()
  323. },
  324. computed: {
  325. ...mapState(['hasLogin', 'userInfo']),
  326. },
  327. methods: {
  328. getList() {
  329. this.$api.doRequest('get', '/inOutWarehouseTask/getTask', {
  330. id: this.id
  331. }).then(res => {
  332. if (res.data.code == 200) {
  333. this.$api.doRequest('get', '/inOutWarehouseTask/getInOutWarehouseTask', {
  334. relevanceId: res.data.data.relevanceId
  335. }).then(res => {
  336. if (res.data.code == 200) {
  337. for (let i = 0; i < res.data.data.length; i++) {
  338. if (res.data.data[i].inOutType == "移库出库" || res.data.data[i]
  339. .inOutType == "贸易服务出库" || res.data.data[i].inOutType == "销售出库" ||
  340. res.data.data[i].inOutType == "暂存出库") {
  341. this.OutList = res.data.data[i]
  342. this.OutList.judge = 1
  343. } else if (res.data.data[i].inOutType == "移库入库" || res.data.data[i]
  344. .inOutType == "暂存入库" || res
  345. .data.data[i].inOutType == "采购入库" || res.data.data[i].inOutType ==
  346. "贸易服务入库") {
  347. this.EnterList = res.data.data[i]
  348. this.EnterList.judge = 2
  349. } else if (res.data.data[i].inOutType == "退库") {
  350. this.retreatList = res.data.data[i]
  351. this.retreatList.judge = 3
  352. }
  353. }
  354. }
  355. })
  356. }
  357. })
  358. },
  359. pjPicker(e) {
  360. this.OutList.grade = this.pjList[e[0]].type
  361. this.OutList.gradeKey = e[0] + 1
  362. },
  363. pjPicker1(e) {
  364. this.EnterList.grade = this.pjList[e[0]].type
  365. this.EnterList.gradeKey = e[0] + 1
  366. },
  367. close() {
  368. this.show1 = false
  369. },
  370. pass() {
  371. this.show1 = true
  372. this.title = '审核意见(通过)'
  373. },
  374. reject() {
  375. this.show1 = true
  376. this.title = '驳回原因(驳回)'
  377. },
  378. passSubmit() {
  379. var that = this
  380. if (this.title == '驳回原因(驳回)') {
  381. this.rejectSubmit()
  382. } else {
  383. let that = this
  384. that.show = false
  385. uni.showModal({
  386. content: "是否确定通过?",
  387. showCancel: true,
  388. confirmText: '确定',
  389. success: function(res) {
  390. if (res.confirm) {
  391. that.OutList.inOutFlag = 1
  392. that.EnterList.inOutFlag = 2
  393. if (that.OutList.taskTypeKey == 1) {
  394. that.requestadd(that.OutList)
  395. } else if (that.EnterList.taskTypeKey == 2) {
  396. that.requestadd(that.EnterList)
  397. } else if (
  398. that.OutList.taskTypeKey == 3 ||
  399. that.OutList.taskTypeKey == 4
  400. ) {
  401. that.requestadd(that.OutList, 'repetition')
  402. if (!that.deletetask) {
  403. that.requestadd(that.EnterList, 'repetition')
  404. }
  405. }
  406. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey == 2) {
  407. that.requestadd(that.retreatList)
  408. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList.taskTypeKey ==
  409. 4) {
  410. that.requestadd(that.retreatList, 'repetition')
  411. }
  412. }
  413. }
  414. })
  415. }
  416. },
  417. rejectSubmit() {
  418. // (1出库2入库3移库4退库并出库)
  419. if (!this.auditMind) {
  420. this.$api.msg('驳回原因不能为空!')
  421. } else {
  422. this.show = false
  423. let that = this
  424. uni.showModal({
  425. content: "是否确定驳回?",
  426. showCancel: true,
  427. confirmText: '确定',
  428. success: function(res) {
  429. if (res.confirm) {
  430. if (that.OutList.taskTypeKey == 1) {
  431. that.requestaudit(that.OutList)
  432. } else if (that.OutList.taskTypeKey == 2) {
  433. that.requestaudit(that.OutList)
  434. } else if (
  435. that.OutList.taskTypeKey == 3 ||
  436. that.OutList.taskTypeKey == 4
  437. ) {
  438. that.requestaudit(that.OutList, 'repetition')
  439. if (!that.deletetask) {
  440. that.requestaudit(that.OutList, 'repetition')
  441. }
  442. }
  443. if (that.EnterList.taskTypeKey) {
  444. if (that.EnterList.taskTypeKey == 1 || that.EnterList.taskTypeKey == 2) {
  445. that.requestaudit(that.EnterList)
  446. } else if (that.EnterList.taskTypeKey == 3 || that.EnterList.taskTypeKey ==
  447. 4) {
  448. that.requestaudit(that.EnterList, 'repetition')
  449. }
  450. }
  451. if (that.retreatList.taskTypeKey) {
  452. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey ==
  453. 2) {
  454. that.requestaudit(that.retreatList)
  455. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList
  456. .taskTypeKey == 4) {
  457. that.requestaudit(that.retreatList, 'repetition')
  458. }
  459. }
  460. }
  461. }
  462. })
  463. }
  464. },
  465. requestadd(list, status) {
  466. let that = this
  467. uni.getStorage({
  468. key: 'pcUserInfo',
  469. success(e) {
  470. list.compId = e.data.compId //这就是你想要取的token
  471. uni.showLoading({
  472. title: "审核中"
  473. })
  474. that.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(
  475. res => {
  476. if (res.data.code == 200) {
  477. that.$api.doRequest('post', '/workflow/api/handle', {
  478. taskId: list.taskId,
  479. approved: true,
  480. auditMind: that.auditMind,
  481. needReapply: false
  482. }).then(res => {
  483. if (res.data.code == 200) {
  484. that.$api.msg('审核成功!')
  485. that.count++
  486. if (that.everyCheck) {
  487. helper.setAudit(that.list)
  488. }
  489. } else {
  490. that.$api.msg('审核失败!')
  491. }
  492. if(list.taskTypeKey == '3' || list.taskTypeKey == '4'){
  493. if(that.count == 2){
  494. setTimeout(function() {
  495. uni.hideLoading()
  496. uni.navigateBack()
  497. }, 1000);
  498. }
  499. }else{
  500. setTimeout(function() {
  501. uni.hideLoading()
  502. uni.navigateBack()
  503. }, 1000);
  504. }
  505. }).catch(res => {
  506. uni.hideLoading()
  507. if (res.message) {
  508. uni.showToast({
  509. title: res.message,
  510. icon: 'none',
  511. duration: 2000
  512. })
  513. } else {
  514. uni.showToast({
  515. title: "系统异常,请联系管理员",
  516. icon: 'none',
  517. duration: 2000
  518. })
  519. }
  520. })
  521. } else {
  522. that.$api.msg('审核失败!')
  523. }
  524. }).catch(res => {
  525. uni.hideLoading()
  526. if (res.message) {
  527. uni.showToast({
  528. title: res.message,
  529. icon: 'none',
  530. duration: 2000
  531. })
  532. } else {
  533. uni.showToast({
  534. title: "系统异常,请联系管理员",
  535. icon: 'none',
  536. duration: 2000
  537. })
  538. }
  539. })
  540. }
  541. })
  542. // list.publisher = this.userInfo.userName
  543. },
  544. requestaudit(list, status) {
  545. uni.showLoading({
  546. title: "审核中"
  547. })
  548. list.compId = '2710b21efc1e4393930c5dc800010dc4'
  549. // list.publisher = this.userInfo.userName
  550. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  551. if (res.data.code == 200) {
  552. this.$api.doRequest('post', '/workflow/api/handle', {
  553. taskId: list.taskId,
  554. approved: false,
  555. auditMind: this.auditMind,
  556. needReapply: true
  557. }).then(res => {
  558. if (res.data.code == 200) {
  559. this.$api.msg('驳回成功!')
  560. this.count++
  561. if (this.everyCheck) {
  562. helper.setAudit(this.list)
  563. }
  564. uni.hideLoading()
  565. if(list.taskTypeKey == '3' || list.taskTypeKey == '4'){
  566. if(this.count == 2){
  567. setTimeout(function() {
  568. uni.hideLoading()
  569. uni.navigateBack()
  570. }, 1000);
  571. }
  572. }else{
  573. setTimeout(function() {
  574. uni.hideLoading()
  575. uni.navigateBack()
  576. }, 1000);
  577. }
  578. }else{
  579. this.$api.msg('驳回失败!')
  580. }
  581. })
  582. }
  583. })
  584. },
  585. check() {
  586. // (1出库2入库3移库4退库并出库)taskTypeKey
  587. if (this.OutList.taskTypeKey == 1 || this.OutList.taskTypeKey == 3) {
  588. if (!this.OutList.grade) {
  589. this.$api.msg('品级不能为空')
  590. return
  591. }
  592. if (!this.OutList.bulkDensity) {
  593. this.$api.msg('容重不能为空')
  594. return
  595. }
  596. if (this.OutList.bulkDensity < 500 || this.OutList.bulkDensity > 1000) {
  597. this.$api.msg('容重输入错误')
  598. return
  599. }
  600. if (String(this.OutList.bulkDensity).indexOf('.') != -1 && String(this.OutList.bulkDensity).length - (
  601. String(this.OutList.bulkDensity).indexOf('.') + 1) > 0) {
  602. this.$api.msg('容重输入错误')
  603. return
  604. }
  605. if (!this.OutList.waterContent) {
  606. this.$api.msg('水分不能为空')
  607. return
  608. }
  609. if (isNaN(this.OutList.waterContent) ||
  610. (String(this.OutList.waterContent).indexOf('.') != -1 &&
  611. String(this.OutList.waterContent).length -
  612. (String(this.OutList.waterContent).indexOf('.') + 1) >
  613. 2) ||
  614. this.OutList.waterContent < 1 ||
  615. this.OutList.waterContent > 40
  616. ) {
  617. this.$api.msg('水分输入错误!')
  618. return
  619. }
  620. if (!this.OutList.unitPrice) {
  621. this.$api.msg('单价不能为空')
  622. return
  623. }
  624. if (isNaN(this.OutList.unitPrice) ||
  625. (String(this.OutList.unitPrice).indexOf('.') != -1 &&
  626. String(this.OutList.unitPrice).length -
  627. (String(this.OutList.unitPrice).indexOf('.') + 1) >
  628. 2) ||
  629. this.OutList.unitPrice < 1 ||
  630. this.OutList.unitPrice > 10000
  631. ) {
  632. this.$api.msg('单价输入错误!')
  633. return
  634. }
  635. }
  636. if (this.OutList.taskTypeKey == 1) {
  637. if (!this.OutList.businessDescribe) {
  638. this.$api.msg('业务描述不能为空')
  639. return
  640. }
  641. if (this.OutList.businessDescribe.length > 150) {
  642. this.$api.msg('业务描述长度错误')
  643. return
  644. }
  645. }
  646. if (this.EnterList.taskTypeKey == 2 && this.EnterList.judge) {
  647. if (!this.EnterList.grade) {
  648. this.$api.msg('品级不能为空')
  649. return
  650. }
  651. if (!this.EnterList.bulkDensity) {
  652. this.$api.msg('容重不能为空')
  653. return
  654. }
  655. if (this.EnterList.bulkDensity < 500 || this.EnterList.bulkDensity > 1000) {
  656. this.$api.msg('容重输入错误')
  657. return
  658. }
  659. if (String(this.EnterList.bulkDensity).indexOf('.') != -1 && String(this.EnterList.bulkDensity)
  660. .length - (
  661. String(this.EnterList.bulkDensity).indexOf('.') + 1) > 0) {
  662. this.$api.msg('容重输入错误')
  663. return
  664. }
  665. if (!this.EnterList.waterContent) {
  666. this.$api.msg('水分不能为空')
  667. return
  668. }
  669. if (isNaN(this.EnterList.waterContent) ||
  670. (String(this.EnterList.waterContent).indexOf('.') != -1 &&
  671. String(this.EnterList.waterContent).length -
  672. (String(this.EnterList.waterContent).indexOf('.') + 1) >
  673. 2) ||
  674. this.EnterList.waterContent < 1 ||
  675. this.EnterList.waterContent > 40
  676. ) {
  677. this.$api.msg('水分输入错误!')
  678. return
  679. }
  680. if (!this.EnterList.unitPrice) {
  681. this.$api.msg('单价不能为空')
  682. return
  683. }
  684. if (isNaN(this.EnterList.unitPrice) ||
  685. (String(this.EnterList.unitPrice).indexOf('.') != -1 &&
  686. String(this.EnterList.unitPrice).length -
  687. (String(this.EnterList.unitPrice).indexOf('.') + 1) >
  688. 2) ||
  689. this.EnterList.unitPrice < 1 ||
  690. this.EnterList.unitPrice > 10000
  691. ) {
  692. this.$api.msg('单价输入错误!')
  693. return
  694. }
  695. if (!this.EnterList.businessDescribe) {
  696. this.$api.msg('业务描述不能为空')
  697. return
  698. }
  699. if (this.EnterList.businessDescribe.length > 150) {
  700. this.$api.msg('业务描述长度错误')
  701. return
  702. }
  703. }
  704. if (this.OutList.taskTypeKey == 3) {
  705. if (!this.EnterList.businessDescribe) {
  706. this.$api.msg('业务描述不能为空')
  707. return
  708. }
  709. if (this.EnterList.businessDescribe.length > 150) {
  710. this.$api.msg('业务描述长度错误')
  711. return
  712. }
  713. }
  714. if (this.retreatList.taskTypeKey == 4 && this.retreatList.judge) {
  715. if (!this.retreatList.grade) {
  716. this.$api.msg('品级不能为空')
  717. return
  718. }
  719. if (!this.retreatList.bulkDensity) {
  720. this.$api.msg('容重不能为空')
  721. return
  722. }
  723. if (this.retreatList.bulkDensity < 500 || this.retreatList.bulkDensity > 1000) {
  724. this.$api.msg('容重输入错误')
  725. return
  726. }
  727. if (String(this.retreatList.bulkDensity).indexOf('.') != -1 && String(this.retreatList.bulkDensity)
  728. .length - (
  729. String(this.retreatList.bulkDensity).indexOf('.') + 1) > 0) {
  730. this.$api.msg('容重输入错误')
  731. return
  732. }
  733. if (!this.retreatList.waterContent) {
  734. this.$api.msg('水分不能为空')
  735. return
  736. }
  737. if (isNaN(this.retreatList.waterContent) ||
  738. (String(this.retreatList.waterContent).indexOf('.') != -1 &&
  739. String(this.retreatList.waterContent).length -
  740. (String(this.retreatList.waterContent).indexOf('.') + 1) >
  741. 2) ||
  742. this.retreatList.waterContent < 1 ||
  743. this.retreatList.waterContent > 40
  744. ) {
  745. this.$api.msg('水分输入错误!')
  746. return
  747. }
  748. if (!this.retreatList.unitPrice) {
  749. this.$api.msg('单价不能为空')
  750. return
  751. }
  752. if (isNaN(this.retreatList.unitPrice) ||
  753. (String(this.retreatList.unitPrice).indexOf('.') != -1 &&
  754. String(this.retreatList.unitPrice).length -
  755. (String(this.retreatList.unitPrice).indexOf('.') + 1) >
  756. 2) ||
  757. this.retreatList.unitPrice < 1 ||
  758. this.retreatList.unitPrice > 10000
  759. ) {
  760. this.$api.msg('单价输入错误!')
  761. return
  762. }
  763. if (!this.EnterList.businessDescribe) {
  764. this.$api.msg('业务描述不能为空')
  765. return
  766. }
  767. if (this.EnterList.businessDescribe.length > 150) {
  768. this.$api.msg('业务描述长度错误')
  769. return
  770. }
  771. }
  772. }
  773. }
  774. }
  775. </script>
  776. <style scoped lang="scss">
  777. .content1 {
  778. margin: 10rpx;
  779. padding-bottom: 224rpx;
  780. .title {
  781. height: 70rpx;
  782. line-height: 60rpx;
  783. font-size: 32rpx;
  784. font-weight: 600;
  785. color: #333333;
  786. border-bottom: 2rpx solid #EEEEEE;
  787. }
  788. }
  789. .uForm {
  790. padding: 0 40rpx;
  791. }
  792. .u-form-item {
  793. padding: 0;
  794. }
  795. .bottom-btn {
  796. width: 100%;
  797. position: fixed;
  798. bottom: 0;
  799. display: flex;
  800. z-index: 2;
  801. left: 0;
  802. background-color: #f8f8f8;
  803. flex-direction: column;
  804. .btn1,
  805. .btn2 {
  806. width: 100%;
  807. margin-bottom: 26rpx;
  808. border-radius: 90rpx;
  809. }
  810. .btn1 {
  811. background: white;
  812. color: #00C265;
  813. }
  814. }
  815. .submit {
  816. width: 50%;
  817. background: #22C572;
  818. border-radius: 10rpx;
  819. }
  820. .part2 {
  821. margin-top: 20rpx;
  822. }
  823. .textarea {
  824. border: 1px solid #ccc;
  825. border-radius: 10rpx;
  826. background-color: #F9F9FA;
  827. height: 100px;
  828. }
  829. .row {
  830. display: flex;
  831. justify-content: space-between;
  832. // border-bottom: 1px solid #EEEEEE;
  833. padding: 21rpx 0;
  834. .right,
  835. input {
  836. font-size: 28rpx;
  837. color: #333333;
  838. }
  839. }
  840. //弹出框
  841. // .popup {
  842. // padding: 30rpx;
  843. // border-radius: 20rpx;
  844. // }
  845. // .rejectInfoCss {
  846. // border: 1px solid #ccc;
  847. // border-radius: 10rpx;
  848. // background-color: #F9F9FA;
  849. // margin: 30rpx;
  850. // overflow-y: auto;
  851. // // height: 300rpx;
  852. // background: red;
  853. // }
  854. .uForm_item {
  855. padding: 20rpx;
  856. background-color: #FFFFFF;
  857. margin: 20rpx;
  858. border-radius: 20rpx;
  859. }
  860. .rejectText {
  861. text-align: center;
  862. }
  863. .topInfo {
  864. height: 210rpx;
  865. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  866. padding: 30rpx;
  867. .topInfo-item {
  868. height: 150rpx;
  869. background-color: #FFFFFF;
  870. border-radius: 20rpx;
  871. padding: 40rpx;
  872. .logo {
  873. width: 40rpx;
  874. height: 40rpx;
  875. margin-top: 8rpx;
  876. }
  877. .infoText {
  878. font-size: 36rpx;
  879. font-weight: 600;
  880. margin-left: 20rpx;
  881. }
  882. .infoData {
  883. color: #878C9C;
  884. font-size: 26rpx;
  885. margin-top: 10rpx;
  886. }
  887. }
  888. }
  889. .shade {
  890. position: fixed;
  891. top: 0;
  892. left: 0;
  893. height: 100%;
  894. width: 100%;
  895. background: rgba(0, 0, 0, 0.4);
  896. z-index: 3;
  897. .wrap {
  898. position: absolute;
  899. left: 0;
  900. top: 0;
  901. right: 0;
  902. bottom: 0;
  903. margin: auto;
  904. background: #fff;
  905. width: calc(100% - 198rpx);
  906. height: 700rpx;
  907. border-radius: 20rpx;
  908. .alert-top {
  909. padding: 33rpx;
  910. display: flex;
  911. justify-content: center;
  912. align-items: center;
  913. position: relative;
  914. }
  915. .title {
  916. font-size: 32rpx;
  917. font-weight: 600;
  918. color: #333333;
  919. }
  920. .close {
  921. position: absolute;
  922. right: 33rpx;
  923. }
  924. }
  925. }
  926. .cancel,
  927. .confirm {
  928. position: absolute;
  929. display: inline-block;
  930. width: 50%;
  931. text-align: center;
  932. bottom: 0;
  933. padding: 10px;
  934. border-top: 1px solid #eee;
  935. font-size: 34rpx;
  936. }
  937. .cancel {
  938. left: 0;
  939. border-right: 1px solid #eee;
  940. color: #AFB3BF;
  941. }
  942. .confirm {
  943. right: 0;
  944. color: #22C572;
  945. }
  946. .u-textarea-style {
  947. margin: 20rpx;
  948. background: #F9F9FA;
  949. border-radius: 10px;
  950. border: 1px solid #EEEEEE;
  951. padding: 10rpx 20rpx;
  952. position: relative;
  953. .right-bottom {
  954. position: absolute;
  955. right: 20rpx;
  956. bottom: 20rpx;
  957. color: #AFB3BF;
  958. }
  959. }
  960. /deep/.u-input__textarea {
  961. height: 300rpx !important;
  962. }
  963. </style>