Issueandreceipt_task_approval.vue 30 KB

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