Issueandreceipt_task_approval.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  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.publisher}}</view>
  69. </view>
  70. </view>
  71. <view class="uForm_item">
  72. <u-form-item label="品级" prop="grade" label-width="150">
  73. <u-input v-model="retreatList.grade" input-align="right" placeholder="" @click='show=true'
  74. disabled />
  75. <u-picker :range="pjList" range-key="type" @confirm='pjPicker($event)' v-model="show"
  76. mode="selector">
  77. </u-picker>
  78. </u-form-item>
  79. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190">
  80. <u-input v-model="retreatList.bulkDensity" input-align="right" placeholder="" />
  81. </u-form-item>
  82. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160">
  83. <u-input v-model="retreatList.waterContent" input-align="right" placeholder="" />
  84. </u-form-item>
  85. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160">
  86. <u-input v-model="retreatList.unitPrice" input-align="right" placeholder="" />
  87. </u-form-item>
  88. </view>
  89. </view>
  90. <view v-if="OutList.judge == 1">
  91. <view class="uForm_item">
  92. <!-- 出库 -->
  93. <view class="title part2">{{OutList.inOutType}}</view>
  94. <view class='row'>
  95. <view class="left">编号</view>
  96. <view class="right">出库({{OutList.inOutTaskNo}})</view>
  97. </view>
  98. <view class='row'>
  99. <view class="left">仓库</view>
  100. <view class="right">{{OutList.warehouseName}}</view>
  101. </view>
  102. <view class='row'>
  103. <view class="left">出库类型</view>
  104. <view class="right">{{OutList.inOutType}}</view>
  105. </view>
  106. <view class='row' v-if="OutList.inOutType == '移库出库'">
  107. <view class="left">移库任务编号</view>
  108. <view class="right">{{OutList.moveTaskNo}}</view>
  109. </view>
  110. <view class='row' v-if="OutList.inOutType != '移库出库'">
  111. <view class="left">合同编号</view>
  112. <view class="right">{{OutList.contractNo}}</view>
  113. </view>
  114. <view class='row'>
  115. <view class="left">货名</view>
  116. <view class="right">{{OutList.goodsName}}</view>
  117. </view>
  118. <view class='row'>
  119. <view class="left">数量</view>
  120. <view class="right">{{OutList.weight}}</view>
  121. </view>
  122. <view class='row'>
  123. <view class="left">预计出库日期</view>
  124. <view class="right">{{OutList.predictDate}}</view>
  125. </view>
  126. <view class='row'>
  127. <view class="left">发货人</view>
  128. <view class="right">{{OutList.publisher}}</view>
  129. </view>
  130. </view>
  131. <view class="uForm_item">
  132. <u-form-item label="品级" prop="grade" label-width="150" v-if="retreatList.inOutType != '退库'">
  133. <u-input v-model="OutList.grade" input-align="right" placeholder="" @click='show=true'
  134. disabled />
  135. <u-picker :range="pjList" range-key="type" @confirm='pjPicker($event)' v-model="show"
  136. mode="selector"></u-picker>
  137. </u-form-item>
  138. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190"
  139. v-if="retreatList.inOutType != '退库'">
  140. <u-input v-model="OutList.bulkDensity" input-align="right" placeholder="" />
  141. </u-form-item>
  142. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160"
  143. v-if="retreatList.inOutType != '退库'">
  144. <u-input v-model="OutList.waterContent" input-align="right" placeholder="" />
  145. </u-form-item>
  146. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160"
  147. v-if="retreatList.inOutType != '退库'">
  148. <u-input v-model="OutList.unitPrice" input-align="right" placeholder="" />
  149. </u-form-item>
  150. <u-form-item label="业务描述" prop="businessDescribe" label-width="160" label-position="top"
  151. v-if="OutList.inOutType != '移库出库'">
  152. <u-input v-model="OutList.businessDescribe" input-align="left" placeholder="请输入业务描述"
  153. type="textarea" class="textarea" maxlength="150" />
  154. </u-form-item>
  155. <u-form-item v-if="retreatList.inOutType!='退库'" label="仓位号(选填)" prop="binNumber"
  156. label-width="170">
  157. <u-input v-model="OutList.binNumber" input-align="right" placeholder="未指定" />
  158. </u-form-item>
  159. </view>
  160. </view>
  161. <view v-if="EnterList.judge == 2">
  162. <view class="uForm_item">
  163. <!-- 入库 -->
  164. <view class="title part2">{{EnterList.inOutType}}</view>
  165. <view class='row'>
  166. <view class="left">编号</view>
  167. <view class="right">入库({{EnterList.inOutTaskNo}})</view>
  168. </view>
  169. <view class='row'>
  170. <view class="left">仓库</view>
  171. <view class="right">{{EnterList.warehouseName}}</view>
  172. </view>
  173. <view class='row'>
  174. <view class="left">入库类型</view>
  175. <view class="right">{{EnterList.inOutType}}</view>
  176. </view>
  177. <view class='row' v-if="EnterList.inOutType == '移库入库'">
  178. <view class="left">移库任务编号</view>
  179. <view class="right">{{EnterList.moveTaskNo}}</view>
  180. </view>
  181. <view class='row' v-if="EnterList.inOutType != '移库入库'">
  182. <view class="left">合同编号</view>
  183. <view class="right">{{EnterList.contractNo}}</view>
  184. </view>
  185. <view class='row'>
  186. <view class="left">货名</view>
  187. <view class="right">{{EnterList.goodsName}}</view>
  188. </view>
  189. <view class='row'>
  190. <view class="left">数量</view>
  191. <view class="right">{{EnterList.weight}}</view>
  192. </view>
  193. <view class='row'>
  194. <view class="left">预计入库日期</view>
  195. <view class="right">{{EnterList.predictDate}}</view>
  196. </view>
  197. <view class='row'>
  198. <view class="left">收货人</view>
  199. <view class="right">{{EnterList.publisher}}</view>
  200. </view>
  201. </view>
  202. <view class="uForm_item">
  203. <u-form-item label="品级" prop="grade" label-width="150" v-if="EnterList.inOutType != '移库入库' ">
  204. <u-input v-model="EnterList.grade" input-align="right" placeholder="请选择品级"
  205. @click='show=true' disabled />
  206. <u-picker :range="pjList" range-key="type" @confirm='pjPicker1($event)' v-model="show"
  207. mode="selector">
  208. </u-picker>
  209. </u-form-item>
  210. <u-form-item label="容重(克/升)>=" prop="bulkDensity" label-width="190"
  211. v-if="EnterList.inOutType != '移库入库'">
  212. <u-input v-model="EnterList.bulkDensity" input-align="right" placeholder="请输入容重占比" />
  213. </u-form-item>
  214. <u-form-item label="水分(%)<=" prop="waterContent" label-width="160"
  215. v-if="EnterList.inOutType != '移库入库'">
  216. <u-input v-model="EnterList.waterContent" input-align="right" placeholder="请输入水分占比" />
  217. </u-form-item>
  218. <u-form-item label="单价(元/吨)" prop="unitPrice" label-width="160"
  219. v-if="EnterList.inOutType != '移库入库'">
  220. <u-input v-model="EnterList.unitPrice" input-align="right" placeholder="请输入单价" />
  221. </u-form-item>
  222. <u-form-item label="业务描述" prop="businessDescribe" label-width="160" label-position="top">
  223. <u-input v-model="EnterList.businessDescribe" input-align="left" placeholder="请输入业务描述"
  224. type="textarea" class="textarea" maxlength="150" />
  225. </u-form-item>
  226. <u-form-item v-if="OutList.inOutType!='退库'" label="仓位号(选填)" prop="binNumber" label-width="170">
  227. <u-input v-model="EnterList.binNumber" input-align="right" placeholder="未指定" />
  228. </u-form-item>
  229. </view>
  230. </view>
  231. </u-form>
  232. </view>
  233. <u-popup v-model="show1" mode="center">
  234. <view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
  235. <view class="rejectText">驳回原因</view>
  236. <u-input v-model="rejectInfo" type="textarea" :border="border" :height="height" :auto-height="autoHeight" class="rejectInfoCss"
  237. placeholder="请输入驳回原因" />
  238. <view class="flex">
  239. <u-button @click="show1 = false" type="error" hover-class='none'>取消</u-button>
  240. <u-button @click="rejectSubmit()" type="success">确定</u-button>
  241. </view>
  242. </view>
  243. </u-popup>
  244. <u-toast ref="uToast" />
  245. <view style='padding:10px;' class='flex bottom-btn'>
  246. <u-button @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
  247. <u-button @click='passSubmit()' type="success" class="btn2">通过</u-button>
  248. </view>
  249. </view>
  250. </template>
  251. <script>
  252. import {
  253. mapState
  254. } from 'vuex';
  255. export default {
  256. data() {
  257. return {
  258. height: 100,
  259. autoHeight: true,
  260. id: "",
  261. OutList: {}, //出
  262. EnterList: {}, //入
  263. retreatList: {}, //退
  264. type: '移库',
  265. show: false,
  266. show1: false,
  267. border: false,
  268. rejectInfo: "", //驳回原因
  269. pjList: [{
  270. type: '一等品'
  271. },
  272. {
  273. type: '二等品'
  274. },
  275. {
  276. type: '三等品'
  277. },
  278. {
  279. type: '等外'
  280. }
  281. ],
  282. }
  283. },
  284. // onReady() {
  285. // this.$refs.uForm.setRules(this.rules);
  286. // },
  287. onLoad(options) {
  288. this.id = options.id
  289. this.getList()
  290. },
  291. computed: {
  292. ...mapState(['hasLogin', 'userInfo']),
  293. },
  294. methods: {
  295. getList() {
  296. this.$api.doRequest('get', '/inOutWarehouseTask/getTask', {
  297. id: this.id
  298. }).then(res => {
  299. if (res.data.code == 200) {
  300. this.$api.doRequest('get', '/inOutWarehouseTask/getInOutWarehouseTask', {
  301. relevanceId: res.data.data.relevanceId
  302. }).then(res => {
  303. if (res.data.code == 200) {
  304. for (let i = 0; i < res.data.data.length; i++) {
  305. if (res.data.data[i].inOutType == "移库出库" || res.data.data[i]
  306. .inOutType == "贸易服务出库" || res.data.data[i].inOutType == "销售出库" ||
  307. res.data.data[i].inOutType == "暂存出库") {
  308. this.OutList = res.data.data[i]
  309. this.OutList.judge = 1
  310. } else if (res.data.data[i].inOutType == "移库入库" || res.data.data[i]
  311. .inOutType == "暂存入库" || res
  312. .data.data[i].inOutType == "采购入库" || res.data.data[i].inOutType ==
  313. "贸易服务入库") {
  314. this.EnterList = res.data.data[i]
  315. this.EnterList.judge = 2
  316. } else if (res.data.data[i].inOutType == "退库") {
  317. this.retreatList = res.data.data[i]
  318. this.retreatList.judge = 3
  319. }
  320. }
  321. }
  322. })
  323. }
  324. })
  325. },
  326. pjPicker(e) {
  327. this.OutList.grade = this.pjList[e[0]].type
  328. this.OutList.gradeKey = e[0] + 1
  329. },
  330. pjPicker1(e) {
  331. this.EnterList.grade = this.pjList[e[0]].type
  332. this.EnterList.gradeKey = e[0] + 1
  333. },
  334. passSubmit() {
  335. let that = this
  336. uni.showModal({
  337. content: "是否确定通过?",
  338. showCancel: true,
  339. confirmText: '确定',
  340. success: function(res) {
  341. if (res.confirm) {
  342. that.OutList.inOutFlag = 1
  343. that.EnterList.inOutFlag = 2
  344. if (that.OutList.taskTypeKey == 1) {
  345. that.requestadd(that.OutList)
  346. } else if (that.EnterList.taskTypeKey == 2) {
  347. that.requestadd(that.EnterList)
  348. } else if (
  349. that.OutList.taskTypeKey == 3 ||
  350. that.OutList.taskTypeKey == 4
  351. ) {
  352. that.requestadd(that.OutList, 'repetition')
  353. if (!that.deletetask) {
  354. that.requestadd(that.EnterList, 'repetition')
  355. }
  356. }
  357. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey == 2) {
  358. that.requestadd(that.retreatList)
  359. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList.taskTypeKey ==
  360. 4) {
  361. that.requestadd(that.retreatList, 'repetition')
  362. }
  363. }
  364. }
  365. })
  366. },
  367. rejectSubmit() {
  368. // (1出库2入库3移库4退库并出库)
  369. if (!this.rejectInfo) {
  370. this.$api.msg('驳回原因不能为空!')
  371. } else {
  372. this.show1 = false
  373. let that = this
  374. uni.showModal({
  375. content: "是否确定驳回?",
  376. showCancel: true,
  377. confirmText: '确定',
  378. success: function(res) {
  379. if (res.confirm) {
  380. if (that.OutList.taskTypeKey == 1) {
  381. that.requestaudit(that.OutList)
  382. } else if (that.OutList.taskTypeKey == 2) {
  383. that.requestaudit(that.OutList)
  384. } else if (
  385. that.OutList.taskTypeKey == 3 ||
  386. that.OutList.taskTypeKey == 4
  387. ) {
  388. that.requestaudit(that.OutList, 'repetition')
  389. if (!that.deletetask) {
  390. that.requestaudit(that.OutList, 'repetition')
  391. }
  392. }
  393. if (that.EnterList.taskTypeKey) {
  394. if (that.EnterList.taskTypeKey == 1 || that.EnterList.taskTypeKey == 2) {
  395. that.requestaudit(that.EnterList)
  396. } else if (that.EnterList.taskTypeKey == 3 || that.EnterList.taskTypeKey ==
  397. 4) {
  398. that.requestaudit(that.EnterList, 'repetition')
  399. }
  400. }
  401. if (that.retreatList.taskTypeKey) {
  402. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey ==
  403. 2) {
  404. that.requestaudit(that.retreatList)
  405. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList
  406. .taskTypeKey == 4) {
  407. that.requestaudit(that.retreatList, 'repetition')
  408. }
  409. }
  410. }
  411. }
  412. })
  413. }
  414. },
  415. requestadd(list, status) {
  416. list.compId = sessionStorage.getItem('ws-pf_compId')
  417. list.publisher = this.userInfo.userName
  418. uni.showLoading({
  419. title:"审核中"
  420. })
  421. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  422. if (res.data.code == 200) {
  423. this.$api.doRequest('post', '/workflow/api/handle', {
  424. taskId: list.taskId,
  425. approved: true,
  426. auditMind: '34',
  427. needReapply: false
  428. }).then(res => {
  429. uni.hideLoading()
  430. if (res.data.code == 200) {
  431. this.$api.msg('审核成功!')
  432. setTimeout(function() {
  433. uni.navigateBack()
  434. }, 1000);
  435. }else{
  436. this.$api.msg('审核失败!')
  437. }
  438. }).catch(res => {
  439. uni.hideLoading()
  440. if(res.message){
  441. uni.showToast({
  442. title: res.message,
  443. icon: 'none',
  444. duration: 2000
  445. })
  446. }
  447. else{
  448. uni.showToast({
  449. title: "系统异常,请联系管理员",
  450. icon: 'none',
  451. duration: 2000
  452. })
  453. }
  454. })
  455. }
  456. else{
  457. this.$api.msg('审核失败!')
  458. }
  459. }).catch(res => {
  460. uni.hideLoading()
  461. if(res.message){
  462. uni.showToast({
  463. title: res.message,
  464. icon: 'none',
  465. duration: 2000
  466. })
  467. }
  468. else{
  469. uni.showToast({
  470. title: "系统异常,请联系管理员",
  471. icon: 'none',
  472. duration: 2000
  473. })
  474. }
  475. })
  476. },
  477. requestaudit(list, status) {
  478. list.compId = '2710b21efc1e4393930c5dc800010dc4'
  479. list.publisher = this.userInfo.userName
  480. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  481. if (res.data.code == 200) {
  482. this.$api.doRequest('post', '/workflow/api/handle', {
  483. taskId: list.taskId,
  484. approved: false,
  485. auditMind: this.rejectInfo,
  486. needReapply: true
  487. }).then(res => {
  488. if (res.data.code == 200) {
  489. this.$api.msg('驳回成功!')
  490. setTimeout(function() {
  491. uni.navigateBack()
  492. }, 1000);
  493. }
  494. })
  495. }
  496. })
  497. },
  498. check() {
  499. // (1出库2入库3移库4退库并出库)taskTypeKey
  500. if(this.OutList.taskTypeKey == 1 || this.OutList.taskTypeKey == 3){
  501. if (!this.OutList.grade) {
  502. this.$api.msg('品级不能为空')
  503. return
  504. }
  505. if (!this.OutList.bulkDensity) {
  506. this.$api.msg('容重不能为空')
  507. return
  508. }
  509. if (this.OutList.bulkDensity < 500 || this.OutList.bulkDensity > 1000) {
  510. this.$api.msg('容重输入错误')
  511. return
  512. }
  513. if (String(this.OutList.bulkDensity).indexOf('.') != -1 && String(this.OutList.bulkDensity).length - (
  514. String(this.OutList.bulkDensity).indexOf('.') + 1) > 0) {
  515. this.$api.msg('容重输入错误')
  516. return
  517. }
  518. if (!this.OutList.waterContent) {
  519. this.$api.msg('水分不能为空')
  520. return
  521. }
  522. if (isNaN(this.OutList.waterContent) ||
  523. (String(this.OutList.waterContent).indexOf('.') != -1 &&
  524. String(this.OutList.waterContent).length -
  525. (String(this.OutList.waterContent).indexOf('.') + 1) >
  526. 2) ||
  527. this.OutList.waterContent < 1 ||
  528. this.OutList.waterContent > 40
  529. ) {
  530. this.$api.msg('水分输入错误!')
  531. return
  532. }
  533. if (!this.OutList.unitPrice) {
  534. this.$api.msg('单价不能为空')
  535. return
  536. }
  537. if (isNaN(this.OutList.unitPrice) ||
  538. (String(this.OutList.unitPrice).indexOf('.') != -1 &&
  539. String(this.OutList.unitPrice).length -
  540. (String(this.OutList.unitPrice).indexOf('.') + 1) >
  541. 2) ||
  542. this.OutList.unitPrice < 1 ||
  543. this.OutList.unitPrice > 10000
  544. ) {
  545. this.$api.msg('单价输入错误!')
  546. return
  547. }
  548. }
  549. if (this.OutList.taskTypeKey == 1) {
  550. if (!this.OutList.businessDescribe) {
  551. this.$api.msg('业务描述不能为空')
  552. return
  553. }
  554. if (this.OutList.businessDescribe.length > 150) {
  555. this.$api.msg('业务描述长度错误')
  556. return
  557. }
  558. }
  559. if (this.EnterList.taskTypeKey ==2 && this.EnterList.judge) {
  560. if (!this.EnterList.grade) {
  561. this.$api.msg('品级不能为空')
  562. return
  563. }
  564. if (!this.EnterList.bulkDensity) {
  565. this.$api.msg('容重不能为空')
  566. return
  567. }
  568. if (this.EnterList.bulkDensity < 500 || this.EnterList.bulkDensity > 1000) {
  569. this.$api.msg('容重输入错误')
  570. return
  571. }
  572. if (String(this.EnterList.bulkDensity).indexOf('.') != -1 && String(this.EnterList.bulkDensity).length - (
  573. String(this.EnterList.bulkDensity).indexOf('.') + 1) > 0) {
  574. this.$api.msg('容重输入错误')
  575. return
  576. }
  577. if (!this.EnterList.waterContent) {
  578. this.$api.msg('水分不能为空')
  579. return
  580. }
  581. if (isNaN(this.EnterList.waterContent) ||
  582. (String(this.EnterList.waterContent).indexOf('.') != -1 &&
  583. String(this.EnterList.waterContent).length -
  584. (String(this.EnterList.waterContent).indexOf('.') + 1) >
  585. 2) ||
  586. this.EnterList.waterContent < 1 ||
  587. this.EnterList.waterContent > 40
  588. ) {
  589. this.$api.msg('水分输入错误!')
  590. return
  591. }
  592. if (!this.EnterList.unitPrice) {
  593. this.$api.msg('单价不能为空')
  594. return
  595. }
  596. if (isNaN(this.EnterList.unitPrice) ||
  597. (String(this.EnterList.unitPrice).indexOf('.') != -1 &&
  598. String(this.EnterList.unitPrice).length -
  599. (String(this.EnterList.unitPrice).indexOf('.') + 1) >
  600. 2) ||
  601. this.EnterList.unitPrice < 1 ||
  602. this.EnterList.unitPrice > 10000
  603. ) {
  604. this.$api.msg('单价输入错误!')
  605. return
  606. }
  607. if (!this.EnterList.businessDescribe) {
  608. this.$api.msg('业务描述不能为空')
  609. return
  610. }
  611. if (this.EnterList.businessDescribe.length > 150) {
  612. this.$api.msg('业务描述长度错误')
  613. return
  614. }
  615. }
  616. if (this.OutList.taskTypeKey == 3) {
  617. if (!this.EnterList.businessDescribe) {
  618. this.$api.msg('业务描述不能为空')
  619. return
  620. }
  621. if (this.EnterList.businessDescribe.length > 150) {
  622. this.$api.msg('业务描述长度错误')
  623. return
  624. }
  625. }
  626. if(this.retreatList.taskTypeKey == 4 && this.retreatList.judge){
  627. if (!this.retreatList.grade) {
  628. this.$api.msg('品级不能为空')
  629. return
  630. }
  631. if (!this.retreatList.bulkDensity) {
  632. this.$api.msg('容重不能为空')
  633. return
  634. }
  635. if (this.retreatList.bulkDensity < 500 || this.retreatList.bulkDensity > 1000) {
  636. this.$api.msg('容重输入错误')
  637. return
  638. }
  639. if (String(this.retreatList.bulkDensity).indexOf('.') != -1 && String(this.retreatList.bulkDensity).length - (
  640. String(this.retreatList.bulkDensity).indexOf('.') + 1) > 0) {
  641. this.$api.msg('容重输入错误')
  642. return
  643. }
  644. if (!this.retreatList.waterContent) {
  645. this.$api.msg('水分不能为空')
  646. return
  647. }
  648. if (isNaN(this.retreatList.waterContent) ||
  649. (String(this.retreatList.waterContent).indexOf('.') != -1 &&
  650. String(this.retreatList.waterContent).length -
  651. (String(this.retreatList.waterContent).indexOf('.') + 1) >
  652. 2) ||
  653. this.retreatList.waterContent < 1 ||
  654. this.retreatList.waterContent > 40
  655. ) {
  656. this.$api.msg('水分输入错误!')
  657. return
  658. }
  659. if (!this.retreatList.unitPrice) {
  660. this.$api.msg('单价不能为空')
  661. return
  662. }
  663. if (isNaN(this.retreatList.unitPrice) ||
  664. (String(this.retreatList.unitPrice).indexOf('.') != -1 &&
  665. String(this.retreatList.unitPrice).length -
  666. (String(this.retreatList.unitPrice).indexOf('.') + 1) >
  667. 2) ||
  668. this.retreatList.unitPrice < 1 ||
  669. this.retreatList.unitPrice > 10000
  670. ) {
  671. this.$api.msg('单价输入错误!')
  672. return
  673. }
  674. if (!this.EnterList.businessDescribe) {
  675. this.$api.msg('业务描述不能为空')
  676. return
  677. }
  678. if (this.EnterList.businessDescribe.length > 150) {
  679. this.$api.msg('业务描述长度错误')
  680. return
  681. }
  682. }
  683. }
  684. }
  685. }
  686. </script>
  687. <style scoped lang="scss">
  688. .content1 {
  689. margin: 10rpx;
  690. padding-bottom: 224rpx;
  691. .title {
  692. height: 70rpx;
  693. line-height: 60rpx;
  694. font-size: 32rpx;
  695. font-weight: 600;
  696. color: #333333;
  697. border-bottom: 2rpx solid #EEEEEE;
  698. }
  699. }
  700. .uForm {
  701. padding: 0 40rpx;
  702. }
  703. .u-form-item {
  704. padding: 0;
  705. }
  706. .bottom-btn {
  707. width: 100%;
  708. position: fixed;
  709. bottom: 0;
  710. display: flex;
  711. z-index: 2;
  712. left: 0;
  713. background-color: #f8f8f8;
  714. flex-direction: column;
  715. .btn1,
  716. .btn2 {
  717. width: 100%;
  718. margin-bottom: 26rpx;
  719. border-radius: 90rpx;
  720. }
  721. .btn1 {
  722. background: white;
  723. color: #00C265;
  724. }
  725. }
  726. .submit {
  727. width: 50%;
  728. background: #22C572;
  729. border-radius: 10rpx;
  730. }
  731. .part2 {
  732. margin-top: 20rpx;
  733. }
  734. .textarea {
  735. border: 1px solid #ccc;
  736. border-radius: 10rpx;
  737. background-color: #F9F9FA;
  738. height: 100px;
  739. }
  740. .row {
  741. display: flex;
  742. justify-content: space-between;
  743. // border-bottom: 1px solid #EEEEEE;
  744. padding: 21rpx 0;
  745. .right,
  746. input {
  747. font-size: 28rpx;
  748. color: #333333;
  749. }
  750. }
  751. //弹出框
  752. // .popup {
  753. // padding: 30rpx;
  754. // border-radius: 20rpx;
  755. // }
  756. .rejectInfoCss {
  757. border: 1px solid #ccc;
  758. border-radius: 10rpx;
  759. background-color: #F9F9FA;
  760. margin: 30rpx;
  761. overflow-y: auto;
  762. // height: 300rpx;
  763. background: red;
  764. }
  765. .uForm_item {
  766. padding: 20rpx;
  767. background-color: #FFFFFF;
  768. margin: 20rpx;
  769. border-radius: 20rpx;
  770. }
  771. .rejectText {
  772. text-align: center;
  773. }
  774. .topInfo {
  775. height: 210rpx;
  776. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  777. padding: 30rpx;
  778. .topInfo-item {
  779. height: 150rpx;
  780. background-color: #FFFFFF;
  781. border-radius: 20rpx;
  782. padding: 40rpx;
  783. .logo {
  784. width: 40rpx;
  785. height: 40rpx;
  786. margin-top: 8rpx;
  787. }
  788. .infoText {
  789. font-size: 36rpx;
  790. font-weight: 600;
  791. margin-left: 20rpx;
  792. }
  793. .infoData {
  794. color: #878C9C;
  795. font-size: 26rpx;
  796. margin-top: 10rpx;
  797. }
  798. }
  799. }
  800. </style>