Issueandreceipt_task_approval.vue 29 KB

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