Issueandreceipt_task_approval.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  1. <template>
  2. <view class="warp">
  3. <view class="topInfo" v-if='retreatList.inOutType!="退库"'>
  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.data.data[i]
  346. .inOutType == "收购入库"|| res
  347. .data.data[i].inOutType == "采购入库" || res.data.data[i].inOutType ==
  348. "贸易服务入库") {
  349. this.EnterList = res.data.data[i]
  350. this.EnterList.judge = 2
  351. } else if (res.data.data[i].inOutType == "退库") {
  352. this.retreatList = res.data.data[i]
  353. this.retreatList.judge = 3
  354. }
  355. }
  356. for(let i = 0; i < res1.data.data.length; i++) {
  357. if(res1.data.data[i].contractNo==this.EnterList.contractNo){
  358. if(res1.data.data[i].priceType=='随行就市'){
  359. this.EnterList.status=true
  360. }else{
  361. this.EnterList.status=false
  362. }
  363. }
  364. if(res1.data.data[i].contractNo==this.retreatList.contractNo){
  365. if(res1.data.data[i].priceType=='随行就市'){
  366. this.retreatList.status=true
  367. }else{
  368. this.retreatList.status=false
  369. }
  370. }
  371. }
  372. })
  373. }
  374. })
  375. }
  376. })
  377. },
  378. pjPicker(e) {
  379. this.OutList.grade = this.pjList[e[0]].type
  380. this.OutList.gradeKey = e[0] + 1
  381. },
  382. pjPicker1(e) {
  383. this.EnterList.grade = this.pjList[e[0]].type
  384. this.EnterList.gradeKey = e[0] + 1
  385. },
  386. close() {
  387. this.show1 = false
  388. },
  389. pass() {
  390. this.show1 = true
  391. this.title = '审核意见(通过)'
  392. },
  393. reject() {
  394. this.show1 = true
  395. this.title = '驳回原因(驳回)'
  396. },
  397. passSubmit() {
  398. var that = this
  399. if (this.title == '驳回原因(驳回)') {
  400. this.rejectSubmit()
  401. } else {
  402. let that = this
  403. that.show = false
  404. uni.showModal({
  405. content: "是否确定通过?",
  406. showCancel: true,
  407. confirmText: '确定',
  408. success: function(res) {
  409. if (res.confirm) {
  410. that.OutList.inOutFlag = 1
  411. that.EnterList.inOutFlag = 2
  412. if (that.OutList.taskTypeKey == 1) {
  413. that.requestadd(that.OutList)
  414. } else if (that.EnterList.taskTypeKey == 2) {
  415. that.requestadd(that.EnterList)
  416. } else if (
  417. that.OutList.taskTypeKey == 3 ||
  418. that.OutList.taskTypeKey == 4
  419. ) {
  420. that.requestadd(that.OutList, 'repetition')
  421. if (!that.deletetask) {
  422. that.requestadd(that.EnterList, 'repetition')
  423. }
  424. }
  425. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey == 2) {
  426. that.requestadd(that.retreatList)
  427. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList.taskTypeKey ==
  428. 4) {
  429. that.requestadd(that.retreatList, 'repetition')
  430. }
  431. }
  432. }
  433. })
  434. }
  435. },
  436. rejectSubmit() {
  437. // (1出库2入库3移库4退库并出库)
  438. if (!this.auditMind) {
  439. this.$api.msg('驳回原因不能为空!')
  440. } else {
  441. this.show = false
  442. let that = this
  443. uni.showModal({
  444. content: "是否确定驳回?",
  445. showCancel: true,
  446. confirmText: '确定',
  447. success: function(res) {
  448. if (res.confirm) {
  449. if (that.OutList.taskTypeKey == 1) {
  450. that.requestaudit(that.OutList)
  451. } else if (that.OutList.taskTypeKey == 2) {
  452. that.requestaudit(that.OutList)
  453. } else if (
  454. that.OutList.taskTypeKey == 3 ||
  455. that.OutList.taskTypeKey == 4
  456. ) {
  457. that.requestaudit(that.OutList, 'repetition')
  458. if (!that.deletetask) {
  459. that.requestaudit(that.OutList, 'repetition')
  460. }
  461. }
  462. if (that.EnterList.taskTypeKey) {
  463. if (that.EnterList.taskTypeKey == 1 || that.EnterList.taskTypeKey == 2) {
  464. that.requestaudit(that.EnterList)
  465. } else if (that.EnterList.taskTypeKey == 3 || that.EnterList.taskTypeKey ==
  466. 4) {
  467. that.requestaudit(that.EnterList, 'repetition')
  468. }
  469. }
  470. if (that.retreatList.taskTypeKey) {
  471. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey ==
  472. 2) {
  473. that.requestaudit(that.retreatList)
  474. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList
  475. .taskTypeKey == 4) {
  476. that.requestaudit(that.retreatList, 'repetition')
  477. }
  478. }
  479. }
  480. }
  481. })
  482. }
  483. },
  484. requestadd(list, status) {
  485. let that = this
  486. uni.getStorage({
  487. key: 'pcUserInfo',
  488. success(e) {
  489. list.compId = e.data.compId //这就是你想要取的token
  490. uni.showLoading({
  491. title: "审核中"
  492. })
  493. that.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(
  494. res => {
  495. if (res.data.code == 200) {
  496. that.$api.doRequest('post', '/workflow/api/handle', {
  497. taskId: list.taskId,
  498. approved: true,
  499. auditMind: that.auditMind,
  500. needReapply: false
  501. }).then(res => {
  502. if (res.data.code == 200) {
  503. that.$api.msg('审核成功!')
  504. that.count++
  505. if (that.everyCheck) {
  506. helper.setAudit(that.list)
  507. }
  508. } else {
  509. that.$api.msg('审核失败!')
  510. }
  511. if(list.taskTypeKey == '3' || list.taskTypeKey == '4'){
  512. if(that.count == 2){
  513. setTimeout(function() {
  514. uni.hideLoading()
  515. uni.navigateBack()
  516. }, 1000);
  517. }
  518. }else{
  519. setTimeout(function() {
  520. uni.hideLoading()
  521. uni.navigateBack()
  522. }, 1000);
  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. } else {
  541. that.$api.msg('审核失败!')
  542. }
  543. }).catch(res => {
  544. uni.hideLoading()
  545. if (res.message) {
  546. uni.showToast({
  547. title: res.message,
  548. icon: 'none',
  549. duration: 2000
  550. })
  551. } else {
  552. uni.showToast({
  553. title: "系统异常,请联系管理员",
  554. icon: 'none',
  555. duration: 2000
  556. })
  557. }
  558. })
  559. }
  560. })
  561. // list.publisher = this.userInfo.userName
  562. },
  563. requestaudit(list, status) {
  564. uni.showLoading({
  565. title: "审核中"
  566. })
  567. list.compId = '2710b21efc1e4393930c5dc800010dc4'
  568. // list.publisher = this.userInfo.userName
  569. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  570. if (res.data.code == 200) {
  571. this.$api.doRequest('post', '/workflow/api/handle', {
  572. taskId: list.taskId,
  573. approved: false,
  574. auditMind: this.auditMind,
  575. needReapply: true
  576. }).then(res => {
  577. if (res.data.code == 200) {
  578. this.$api.msg('驳回成功!')
  579. this.count++
  580. if (this.everyCheck) {
  581. helper.setAudit(this.list)
  582. }
  583. uni.hideLoading()
  584. if(list.taskTypeKey == '3' || list.taskTypeKey == '4'){
  585. if(this.count == 2){
  586. setTimeout(function() {
  587. uni.hideLoading()
  588. uni.navigateBack()
  589. }, 1000);
  590. }
  591. }else{
  592. setTimeout(function() {
  593. uni.hideLoading()
  594. uni.navigateBack()
  595. }, 1000);
  596. }
  597. }else{
  598. this.$api.msg('驳回失败!')
  599. }
  600. })
  601. }
  602. })
  603. },
  604. check() {
  605. // (1出库2入库3移库4退库并出库)taskTypeKey
  606. if (this.OutList.taskTypeKey == 1 || this.OutList.taskTypeKey == 3) {
  607. if (!this.OutList.grade) {
  608. this.$api.msg('品级不能为空')
  609. return
  610. }
  611. if (!this.OutList.bulkDensity) {
  612. this.$api.msg('容重不能为空')
  613. return
  614. }
  615. if (this.OutList.bulkDensity < 500 || this.OutList.bulkDensity > 1000) {
  616. this.$api.msg('容重输入错误')
  617. return
  618. }
  619. if (String(this.OutList.bulkDensity).indexOf('.') != -1 && String(this.OutList.bulkDensity).length - (
  620. String(this.OutList.bulkDensity).indexOf('.') + 1) > 0) {
  621. this.$api.msg('容重输入错误')
  622. return
  623. }
  624. if (!this.OutList.waterContent) {
  625. this.$api.msg('水分不能为空')
  626. return
  627. }
  628. if (isNaN(this.OutList.waterContent) ||
  629. (String(this.OutList.waterContent).indexOf('.') != -1 &&
  630. String(this.OutList.waterContent).length -
  631. (String(this.OutList.waterContent).indexOf('.') + 1) >
  632. 2) ||
  633. this.OutList.waterContent < 1 ||
  634. this.OutList.waterContent > 40
  635. ) {
  636. this.$api.msg('水分输入错误!')
  637. return
  638. }
  639. if (!this.OutList.unitPrice) {
  640. this.$api.msg('单价不能为空')
  641. return
  642. }
  643. if (isNaN(this.OutList.unitPrice) ||
  644. (String(this.OutList.unitPrice).indexOf('.') != -1 &&
  645. String(this.OutList.unitPrice).length -
  646. (String(this.OutList.unitPrice).indexOf('.') + 1) >
  647. 2) ||
  648. this.OutList.unitPrice < 1 ||
  649. this.OutList.unitPrice > 10000
  650. ) {
  651. this.$api.msg('单价输入错误!')
  652. return
  653. }
  654. }
  655. if (this.OutList.taskTypeKey == 1) {
  656. if (!this.OutList.businessDescribe) {
  657. this.$api.msg('业务描述不能为空')
  658. return
  659. }
  660. if (this.OutList.businessDescribe.length > 150) {
  661. this.$api.msg('业务描述长度错误')
  662. return
  663. }
  664. }
  665. if (this.EnterList.taskTypeKey == 2 && this.EnterList.judge) {
  666. if (!this.EnterList.grade) {
  667. this.$api.msg('品级不能为空')
  668. return
  669. }
  670. if (!this.EnterList.bulkDensity) {
  671. this.$api.msg('容重不能为空')
  672. return
  673. }
  674. if (this.EnterList.bulkDensity < 500 || this.EnterList.bulkDensity > 1000) {
  675. this.$api.msg('容重输入错误')
  676. return
  677. }
  678. if (String(this.EnterList.bulkDensity).indexOf('.') != -1 && String(this.EnterList.bulkDensity)
  679. .length - (
  680. String(this.EnterList.bulkDensity).indexOf('.') + 1) > 0) {
  681. this.$api.msg('容重输入错误')
  682. return
  683. }
  684. if (!this.EnterList.waterContent) {
  685. this.$api.msg('水分不能为空')
  686. return
  687. }
  688. if (isNaN(this.EnterList.waterContent) ||
  689. (String(this.EnterList.waterContent).indexOf('.') != -1 &&
  690. String(this.EnterList.waterContent).length -
  691. (String(this.EnterList.waterContent).indexOf('.') + 1) >
  692. 2) ||
  693. this.EnterList.waterContent < 1 ||
  694. this.EnterList.waterContent > 40
  695. ) {
  696. this.$api.msg('水分输入错误!')
  697. return
  698. }
  699. if (!this.EnterList.unitPrice) {
  700. this.$api.msg('单价不能为空')
  701. return
  702. }
  703. if (isNaN(this.EnterList.unitPrice) ||
  704. (String(this.EnterList.unitPrice).indexOf('.') != -1 &&
  705. String(this.EnterList.unitPrice).length -
  706. (String(this.EnterList.unitPrice).indexOf('.') + 1) >
  707. 2) ||
  708. this.EnterList.unitPrice < 1 ||
  709. this.EnterList.unitPrice > 10000
  710. ) {
  711. this.$api.msg('单价输入错误!')
  712. return
  713. }
  714. if (!this.EnterList.businessDescribe) {
  715. this.$api.msg('业务描述不能为空')
  716. return
  717. }
  718. if (this.EnterList.businessDescribe.length > 150) {
  719. this.$api.msg('业务描述长度错误')
  720. return
  721. }
  722. }
  723. if (this.OutList.taskTypeKey == 3) {
  724. if (!this.EnterList.businessDescribe) {
  725. this.$api.msg('业务描述不能为空')
  726. return
  727. }
  728. if (this.EnterList.businessDescribe.length > 150) {
  729. this.$api.msg('业务描述长度错误')
  730. return
  731. }
  732. }
  733. if (this.retreatList.taskTypeKey == 4 && this.retreatList.judge) {
  734. if (!this.retreatList.grade) {
  735. this.$api.msg('品级不能为空')
  736. return
  737. }
  738. if (!this.retreatList.bulkDensity) {
  739. this.$api.msg('容重不能为空')
  740. return
  741. }
  742. if (this.retreatList.bulkDensity < 500 || this.retreatList.bulkDensity > 1000) {
  743. this.$api.msg('容重输入错误')
  744. return
  745. }
  746. if (String(this.retreatList.bulkDensity).indexOf('.') != -1 && String(this.retreatList.bulkDensity)
  747. .length - (
  748. String(this.retreatList.bulkDensity).indexOf('.') + 1) > 0) {
  749. this.$api.msg('容重输入错误')
  750. return
  751. }
  752. if (!this.retreatList.waterContent) {
  753. this.$api.msg('水分不能为空')
  754. return
  755. }
  756. if (isNaN(this.retreatList.waterContent) ||
  757. (String(this.retreatList.waterContent).indexOf('.') != -1 &&
  758. String(this.retreatList.waterContent).length -
  759. (String(this.retreatList.waterContent).indexOf('.') + 1) >
  760. 2) ||
  761. this.retreatList.waterContent < 1 ||
  762. this.retreatList.waterContent > 40
  763. ) {
  764. this.$api.msg('水分输入错误!')
  765. return
  766. }
  767. if (!this.retreatList.unitPrice) {
  768. this.$api.msg('单价不能为空')
  769. return
  770. }
  771. if (isNaN(this.retreatList.unitPrice) ||
  772. (String(this.retreatList.unitPrice).indexOf('.') != -1 &&
  773. String(this.retreatList.unitPrice).length -
  774. (String(this.retreatList.unitPrice).indexOf('.') + 1) >
  775. 2) ||
  776. this.retreatList.unitPrice < 1 ||
  777. this.retreatList.unitPrice > 10000
  778. ) {
  779. this.$api.msg('单价输入错误!')
  780. return
  781. }
  782. if (!this.EnterList.businessDescribe) {
  783. this.$api.msg('业务描述不能为空')
  784. return
  785. }
  786. if (this.EnterList.businessDescribe.length > 150) {
  787. this.$api.msg('业务描述长度错误')
  788. return
  789. }
  790. }
  791. }
  792. }
  793. }
  794. </script>
  795. <style scoped lang="scss">
  796. .content1 {
  797. margin: 10rpx;
  798. padding-bottom: 224rpx;
  799. .title {
  800. height: 70rpx;
  801. line-height: 60rpx;
  802. font-size: 32rpx;
  803. font-weight: 600;
  804. color: #333333;
  805. border-bottom: 2rpx solid #EEEEEE;
  806. }
  807. }
  808. .uForm {
  809. padding: 0 40rpx;
  810. }
  811. .u-form-item {
  812. padding: 0;
  813. }
  814. .bottom-btn {
  815. width: 100%;
  816. position: fixed;
  817. bottom: 0;
  818. display: flex;
  819. z-index: 2;
  820. left: 0;
  821. background-color: #f8f8f8;
  822. flex-direction: column;
  823. .btn1,
  824. .btn2 {
  825. width: 100%;
  826. margin-bottom: 26rpx;
  827. border-radius: 90rpx;
  828. }
  829. .btn1 {
  830. background: white;
  831. color: #00C265;
  832. }
  833. }
  834. .submit {
  835. width: 50%;
  836. background: #22C572;
  837. border-radius: 10rpx;
  838. }
  839. .part2 {
  840. margin-top: 20rpx;
  841. }
  842. .textarea {
  843. border: 1px solid #ccc;
  844. border-radius: 10rpx;
  845. background-color: #F9F9FA;
  846. height: 100px;
  847. }
  848. .row {
  849. display: flex;
  850. justify-content: space-between;
  851. // border-bottom: 1px solid #EEEEEE;
  852. padding: 21rpx 0;
  853. .right,
  854. input {
  855. font-size: 28rpx;
  856. color: #333333;
  857. }
  858. }
  859. //弹出框
  860. // .popup {
  861. // padding: 30rpx;
  862. // border-radius: 20rpx;
  863. // }
  864. // .rejectInfoCss {
  865. // border: 1px solid #ccc;
  866. // border-radius: 10rpx;
  867. // background-color: #F9F9FA;
  868. // margin: 30rpx;
  869. // overflow-y: auto;
  870. // // height: 300rpx;
  871. // background: red;
  872. // }
  873. .uForm_item {
  874. padding: 20rpx;
  875. background-color: #FFFFFF;
  876. margin: 20rpx;
  877. border-radius: 20rpx;
  878. }
  879. .rejectText {
  880. text-align: center;
  881. }
  882. .topInfo {
  883. height: 210rpx;
  884. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  885. padding: 30rpx;
  886. .topInfo-item {
  887. height: 150rpx;
  888. background-color: #FFFFFF;
  889. border-radius: 20rpx;
  890. padding: 40rpx;
  891. .logo {
  892. width: 40rpx;
  893. height: 40rpx;
  894. margin-top: 8rpx;
  895. }
  896. .infoText {
  897. font-size: 36rpx;
  898. font-weight: 600;
  899. margin-left: 20rpx;
  900. }
  901. .infoData {
  902. color: #878C9C;
  903. font-size: 26rpx;
  904. margin-top: 10rpx;
  905. }
  906. }
  907. }
  908. .shade {
  909. position: fixed;
  910. top: 0;
  911. left: 0;
  912. height: 100%;
  913. width: 100%;
  914. background: rgba(0, 0, 0, 0.4);
  915. z-index: 3;
  916. .wrap {
  917. position: absolute;
  918. left: 0;
  919. top: 0;
  920. right: 0;
  921. bottom: 0;
  922. margin: auto;
  923. background: #fff;
  924. width: calc(100% - 198rpx);
  925. height: 700rpx;
  926. border-radius: 20rpx;
  927. .alert-top {
  928. padding: 33rpx;
  929. display: flex;
  930. justify-content: center;
  931. align-items: center;
  932. position: relative;
  933. }
  934. .title {
  935. font-size: 32rpx;
  936. font-weight: 600;
  937. color: #333333;
  938. }
  939. .close {
  940. position: absolute;
  941. right: 33rpx;
  942. }
  943. }
  944. }
  945. .cancel,
  946. .confirm {
  947. position: absolute;
  948. display: inline-block;
  949. width: 50%;
  950. text-align: center;
  951. bottom: 0;
  952. padding: 10px;
  953. border-top: 1px solid #eee;
  954. font-size: 34rpx;
  955. }
  956. .cancel {
  957. left: 0;
  958. border-right: 1px solid #eee;
  959. color: #AFB3BF;
  960. }
  961. .confirm {
  962. right: 0;
  963. color: #22C572;
  964. }
  965. .u-textarea-style {
  966. margin: 20rpx;
  967. background: #F9F9FA;
  968. border-radius: 10px;
  969. border: 1px solid #EEEEEE;
  970. padding: 10rpx 20rpx;
  971. position: relative;
  972. .right-bottom {
  973. position: absolute;
  974. right: 20rpx;
  975. bottom: 20rpx;
  976. color: #AFB3BF;
  977. }
  978. }
  979. /deep/.u-input__textarea {
  980. height: 300rpx !important;
  981. }
  982. </style>