Issueandreceipt_task_approval.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  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" 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. id: "",
  259. OutList: {}, //出
  260. EnterList: {}, //入
  261. retreatList: {}, //退
  262. type: '移库',
  263. show: false,
  264. show1: false,
  265. border: false,
  266. rejectInfo: "", //驳回原因
  267. pjList: [{
  268. type: '一等品'
  269. },
  270. {
  271. type: '二等品'
  272. },
  273. {
  274. type: '三等品'
  275. },
  276. {
  277. type: '等外'
  278. }
  279. ],
  280. }
  281. },
  282. // onReady() {
  283. // this.$refs.uForm.setRules(this.rules);
  284. // },
  285. onLoad(options) {
  286. this.id = options.id
  287. this.getList()
  288. },
  289. computed: {
  290. ...mapState(['hasLogin', 'userInfo']),
  291. },
  292. methods: {
  293. getList() {
  294. this.$api.doRequest('get', '/inOutWarehouseTask/getTask', {
  295. id: this.id
  296. }).then(res => {
  297. if (res.data.code == 200) {
  298. this.$api.doRequest('get', '/inOutWarehouseTask/getInOutWarehouseTask', {
  299. relevanceId: res.data.data.relevanceId
  300. }).then(res => {
  301. if (res.data.code == 200) {
  302. for (let i = 0; i < res.data.data.length; i++) {
  303. if (res.data.data[i].inOutType == "移库出库" || res.data.data[i]
  304. .inOutType == "贸易服务出库" || res.data.data[i].inOutType == "销售出库" ||
  305. res.data.data[i].inOutType == "暂存出库") {
  306. this.OutList = res.data.data[i]
  307. this.OutList.judge = 1
  308. } else if (res.data.data[i].inOutType == "移库入库" || res.data.data[i]
  309. .inOutType == "暂存入库" || res
  310. .data.data[i].inOutType == "采购入库" || res.data.data[i].inOutType ==
  311. "贸易服务入库") {
  312. this.EnterList = res.data.data[i]
  313. this.EnterList.judge = 2
  314. } else if (res.data.data[i].inOutType == "退库") {
  315. this.retreatList = res.data.data[i]
  316. this.retreatList.judge = 3
  317. }
  318. }
  319. }
  320. })
  321. }
  322. })
  323. },
  324. pjPicker(e) {
  325. this.OutList.grade = this.pjList[e[0]].type
  326. this.OutList.gradeKey = e[0] + 1
  327. },
  328. pjPicker1(e) {
  329. this.EnterList.grade = this.pjList[e[0]].type
  330. this.EnterList.gradeKey = e[0] + 1
  331. },
  332. passSubmit() {
  333. let that = this
  334. uni.showModal({
  335. content: "是否确定通过?",
  336. showCancel: true,
  337. confirmText: '确定',
  338. success: function(res) {
  339. if (res.confirm) {
  340. debugger
  341. that.OutList.inOutFlag = 1
  342. that.EnterList.inOutFlag = 2
  343. if (that.OutList.taskTypeKey == 1) {
  344. that.requestadd(that.OutList)
  345. } else if (that.EnterList.taskTypeKey == 2) {
  346. that.requestadd(that.EnterList)
  347. } else if (
  348. that.OutList.taskTypeKey == 3 ||
  349. that.OutList.taskTypeKey == 4
  350. ) {
  351. that.requestadd(that.OutList, 'repetition')
  352. if (!that.deletetask) {
  353. that.requestadd(that.EnterList, 'repetition')
  354. }
  355. }
  356. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey == 2) {
  357. that.requestadd(that.retreatList)
  358. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList.taskTypeKey ==
  359. 4) {
  360. that.requestadd(that.retreatList, 'repetition')
  361. }
  362. }
  363. }
  364. })
  365. },
  366. rejectSubmit() {
  367. // (1出库2入库3移库4退库并出库)
  368. if (!this.rejectInfo) {
  369. this.$api.msg('驳回原因不能为空!')
  370. } else {
  371. this.show1 = false
  372. let that = this
  373. uni.showModal({
  374. content: "是否确定驳回?",
  375. showCancel: true,
  376. confirmText: '确定',
  377. success: function(res) {
  378. if (res.confirm) {
  379. if (that.OutList.taskTypeKey == 1) {
  380. that.requestaudit(that.OutList)
  381. } else if (that.OutList.taskTypeKey == 2) {
  382. that.requestaudit(that.OutList)
  383. } else if (
  384. that.OutList.taskTypeKey == 3 ||
  385. that.OutList.taskTypeKey == 4
  386. ) {
  387. that.requestaudit(that.OutList, 'repetition')
  388. if (!that.deletetask) {
  389. that.requestaudit(that.OutList, 'repetition')
  390. }
  391. }
  392. if (that.EnterList.taskTypeKey) {
  393. if (that.EnterList.taskTypeKey == 1 || that.EnterList.taskTypeKey == 2) {
  394. that.requestaudit(that.EnterList)
  395. } else if (that.EnterList.taskTypeKey == 3 || that.EnterList.taskTypeKey ==
  396. 4) {
  397. that.requestaudit(that.EnterList, 'repetition')
  398. }
  399. }
  400. if (that.retreatList.taskTypeKey) {
  401. if (that.retreatList.taskTypeKey == 1 || that.retreatList.taskTypeKey ==
  402. 2) {
  403. that.requestaudit(that.retreatList)
  404. } else if (that.retreatList.taskTypeKey == 3 || that.retreatList
  405. .taskTypeKey == 4) {
  406. that.requestaudit(that.retreatList, 'repetition')
  407. }
  408. }
  409. }
  410. }
  411. })
  412. }
  413. },
  414. requestadd(list, status) {
  415. list.compId = sessionStorage.getItem('ws-pf_compId')
  416. list.publisher = this.userInfo.userName
  417. uni.showLoading({
  418. title:"审核中"
  419. })
  420. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  421. if (res.data.code == 200) {
  422. this.$api.doRequest('post', '/workflow/api/handle', {
  423. taskId: list.taskId,
  424. approved: true,
  425. auditMind: '34',
  426. needReapply: false
  427. }).then(res => {
  428. uni.hideLoading()
  429. if (res.data.code == 200) {
  430. this.$api.msg('审核成功!')
  431. setTimeout(function() {
  432. uni.navigateBack()
  433. }, 1000);
  434. }else{
  435. this.$api.msg('审核失败!')
  436. }
  437. }).catch(res => {
  438. uni.hideLoading()
  439. if(res.message){
  440. uni.showToast({
  441. title: res.message,
  442. icon: 'none',
  443. duration: 2000
  444. })
  445. }
  446. else{
  447. uni.showToast({
  448. title: "系统异常,请联系管理员",
  449. icon: 'none',
  450. duration: 2000
  451. })
  452. }
  453. })
  454. }
  455. else{
  456. this.$api.msg('审核失败!')
  457. }
  458. }).catch(res => {
  459. uni.hideLoading()
  460. if(res.message){
  461. uni.showToast({
  462. title: res.message,
  463. icon: 'none',
  464. duration: 2000
  465. })
  466. }
  467. else{
  468. uni.showToast({
  469. title: "系统异常,请联系管理员",
  470. icon: 'none',
  471. duration: 2000
  472. })
  473. }
  474. })
  475. },
  476. requestaudit(list, status) {
  477. list.compId = '2710b21efc1e4393930c5dc800010dc4'
  478. list.publisher = this.userInfo.userName
  479. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  480. if (res.data.code == 200) {
  481. this.$api.doRequest('post', '/workflow/api/handle', {
  482. taskId: list.taskId,
  483. approved: false,
  484. auditMind: this.rejectInfo,
  485. needReapply: true
  486. }).then(res => {
  487. if (res.data.code == 200) {
  488. this.$api.msg('驳回成功!')
  489. setTimeout(function() {
  490. uni.navigateBack()
  491. }, 1000);
  492. }
  493. })
  494. }
  495. })
  496. },
  497. check() {
  498. // (1出库2入库3移库4退库并出库)taskTypeKey
  499. if(this.OutList.taskTypeKey == 1 || this.OutList.taskTypeKey == 3){
  500. if (!this.OutList.grade) {
  501. this.$api.msg('品级不能为空')
  502. return
  503. }
  504. if (!this.OutList.bulkDensity) {
  505. this.$api.msg('容重不能为空')
  506. return
  507. }
  508. if (this.OutList.bulkDensity < 500 || this.OutList.bulkDensity > 1000) {
  509. this.$api.msg('容重输入错误')
  510. return
  511. }
  512. if (String(this.OutList.bulkDensity).indexOf('.') != -1 && String(this.OutList.bulkDensity).length - (
  513. String(this.OutList.bulkDensity).indexOf('.') + 1) > 0) {
  514. this.$api.msg('容重输入错误')
  515. return
  516. }
  517. if (!this.OutList.waterContent) {
  518. this.$api.msg('水分不能为空')
  519. return
  520. }
  521. if (isNaN(this.OutList.waterContent) ||
  522. (String(this.OutList.waterContent).indexOf('.') != -1 &&
  523. String(this.OutList.waterContent).length -
  524. (String(this.OutList.waterContent).indexOf('.') + 1) >
  525. 2) ||
  526. this.OutList.waterContent < 1 ||
  527. this.OutList.waterContent > 40
  528. ) {
  529. this.$api.msg('水分输入错误!')
  530. return
  531. }
  532. if (!this.OutList.unitPrice) {
  533. this.$api.msg('单价不能为空')
  534. return
  535. }
  536. if (isNaN(this.OutList.unitPrice) ||
  537. (String(this.OutList.unitPrice).indexOf('.') != -1 &&
  538. String(this.OutList.unitPrice).length -
  539. (String(this.OutList.unitPrice).indexOf('.') + 1) >
  540. 2) ||
  541. this.OutList.unitPrice < 1 ||
  542. this.OutList.unitPrice > 10000
  543. ) {
  544. this.$api.msg('单价输入错误!')
  545. return
  546. }
  547. }
  548. if (this.OutList.taskTypeKey == 1) {
  549. if (!this.OutList.businessDescribe) {
  550. this.$api.msg('业务描述不能为空')
  551. return
  552. }
  553. if (this.OutList.businessDescribe.length > 150) {
  554. this.$api.msg('业务描述长度错误')
  555. return
  556. }
  557. }
  558. if (this.EnterList.taskTypeKey ==2 && this.EnterList.judge) {
  559. if (!this.EnterList.grade) {
  560. this.$api.msg('品级不能为空')
  561. return
  562. }
  563. if (!this.EnterList.bulkDensity) {
  564. this.$api.msg('容重不能为空')
  565. return
  566. }
  567. if (this.EnterList.bulkDensity < 500 || this.EnterList.bulkDensity > 1000) {
  568. this.$api.msg('容重输入错误')
  569. return
  570. }
  571. if (String(this.EnterList.bulkDensity).indexOf('.') != -1 && String(this.EnterList.bulkDensity).length - (
  572. String(this.EnterList.bulkDensity).indexOf('.') + 1) > 0) {
  573. this.$api.msg('容重输入错误')
  574. return
  575. }
  576. if (!this.EnterList.waterContent) {
  577. this.$api.msg('水分不能为空')
  578. return
  579. }
  580. if (isNaN(this.EnterList.waterContent) ||
  581. (String(this.EnterList.waterContent).indexOf('.') != -1 &&
  582. String(this.EnterList.waterContent).length -
  583. (String(this.EnterList.waterContent).indexOf('.') + 1) >
  584. 2) ||
  585. this.EnterList.waterContent < 1 ||
  586. this.EnterList.waterContent > 40
  587. ) {
  588. this.$api.msg('水分输入错误!')
  589. return
  590. }
  591. if (!this.EnterList.unitPrice) {
  592. this.$api.msg('单价不能为空')
  593. return
  594. }
  595. if (isNaN(this.EnterList.unitPrice) ||
  596. (String(this.EnterList.unitPrice).indexOf('.') != -1 &&
  597. String(this.EnterList.unitPrice).length -
  598. (String(this.EnterList.unitPrice).indexOf('.') + 1) >
  599. 2) ||
  600. this.EnterList.unitPrice < 1 ||
  601. this.EnterList.unitPrice > 10000
  602. ) {
  603. this.$api.msg('单价输入错误!')
  604. return
  605. }
  606. if (!this.EnterList.businessDescribe) {
  607. this.$api.msg('业务描述不能为空')
  608. return
  609. }
  610. if (this.EnterList.businessDescribe.length > 150) {
  611. this.$api.msg('业务描述长度错误')
  612. return
  613. }
  614. }
  615. if (this.OutList.taskTypeKey == 3) {
  616. if (!this.EnterList.businessDescribe) {
  617. this.$api.msg('业务描述不能为空')
  618. return
  619. }
  620. if (this.EnterList.businessDescribe.length > 150) {
  621. this.$api.msg('业务描述长度错误')
  622. return
  623. }
  624. }
  625. if(this.retreatList.taskTypeKey == 4 && this.retreatList.judge){
  626. if (!this.retreatList.grade) {
  627. this.$api.msg('品级不能为空')
  628. return
  629. }
  630. if (!this.retreatList.bulkDensity) {
  631. this.$api.msg('容重不能为空')
  632. return
  633. }
  634. if (this.retreatList.bulkDensity < 500 || this.retreatList.bulkDensity > 1000) {
  635. this.$api.msg('容重输入错误')
  636. return
  637. }
  638. if (String(this.retreatList.bulkDensity).indexOf('.') != -1 && String(this.retreatList.bulkDensity).length - (
  639. String(this.retreatList.bulkDensity).indexOf('.') + 1) > 0) {
  640. this.$api.msg('容重输入错误')
  641. return
  642. }
  643. if (!this.retreatList.waterContent) {
  644. this.$api.msg('水分不能为空')
  645. return
  646. }
  647. if (isNaN(this.retreatList.waterContent) ||
  648. (String(this.retreatList.waterContent).indexOf('.') != -1 &&
  649. String(this.retreatList.waterContent).length -
  650. (String(this.retreatList.waterContent).indexOf('.') + 1) >
  651. 2) ||
  652. this.retreatList.waterContent < 1 ||
  653. this.retreatList.waterContent > 40
  654. ) {
  655. this.$api.msg('水分输入错误!')
  656. return
  657. }
  658. if (!this.retreatList.unitPrice) {
  659. this.$api.msg('单价不能为空')
  660. return
  661. }
  662. if (isNaN(this.retreatList.unitPrice) ||
  663. (String(this.retreatList.unitPrice).indexOf('.') != -1 &&
  664. String(this.retreatList.unitPrice).length -
  665. (String(this.retreatList.unitPrice).indexOf('.') + 1) >
  666. 2) ||
  667. this.retreatList.unitPrice < 1 ||
  668. this.retreatList.unitPrice > 10000
  669. ) {
  670. this.$api.msg('单价输入错误!')
  671. return
  672. }
  673. if (!this.EnterList.businessDescribe) {
  674. this.$api.msg('业务描述不能为空')
  675. return
  676. }
  677. if (this.EnterList.businessDescribe.length > 150) {
  678. this.$api.msg('业务描述长度错误')
  679. return
  680. }
  681. }
  682. }
  683. }
  684. }
  685. </script>
  686. <style scoped lang="scss">
  687. .content1 {
  688. margin: 10rpx;
  689. padding-bottom: 224rpx;
  690. .title {
  691. height: 70rpx;
  692. line-height: 60rpx;
  693. font-size: 32rpx;
  694. font-weight: 600;
  695. color: #333333;
  696. border-bottom: 2rpx solid #EEEEEE;
  697. }
  698. }
  699. .uForm {
  700. padding: 0 40rpx;
  701. }
  702. .u-form-item {
  703. padding: 0;
  704. }
  705. .bottom-btn {
  706. width: 100%;
  707. position: fixed;
  708. bottom: 0;
  709. display: flex;
  710. z-index: 2;
  711. left: 0;
  712. background-color: #f8f8f8;
  713. flex-direction: column;
  714. .btn1,
  715. .btn2 {
  716. width: 100%;
  717. margin-bottom: 26rpx;
  718. border-radius: 90rpx;
  719. }
  720. .btn1 {
  721. background: white;
  722. color: #00C265;
  723. }
  724. }
  725. .submit {
  726. width: 50%;
  727. background: #22C572;
  728. border-radius: 10rpx;
  729. }
  730. .part2 {
  731. margin-top: 20rpx;
  732. }
  733. .textarea {
  734. border: 1px solid #ccc;
  735. border-radius: 10rpx;
  736. background-color: #F9F9FA;
  737. height: 100px;
  738. }
  739. .row {
  740. display: flex;
  741. justify-content: space-between;
  742. // border-bottom: 1px solid #EEEEEE;
  743. padding: 21rpx 0;
  744. .right,
  745. input {
  746. font-size: 28rpx;
  747. color: #333333;
  748. }
  749. }
  750. //弹出框
  751. // .popup {
  752. // padding: 30rpx;
  753. // border-radius: 20rpx;
  754. // }
  755. .rejectInfoCss {
  756. border: 1px solid #ccc;
  757. border-radius: 10rpx;
  758. background-color: #F9F9FA;
  759. height: 100px;
  760. margin: 30rpx;
  761. }
  762. .uForm_item {
  763. padding: 20rpx;
  764. background-color: #FFFFFF;
  765. margin: 20rpx;
  766. border-radius: 20rpx;
  767. }
  768. .rejectText {
  769. text-align: center;
  770. }
  771. .topInfo {
  772. height: 210rpx;
  773. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  774. padding: 30rpx;
  775. .topInfo-item {
  776. height: 150rpx;
  777. background-color: #FFFFFF;
  778. border-radius: 20rpx;
  779. padding: 40rpx;
  780. .logo {
  781. width: 40rpx;
  782. height: 40rpx;
  783. margin-top: 8rpx;
  784. }
  785. .infoText {
  786. font-size: 36rpx;
  787. font-weight: 600;
  788. margin-left: 20rpx;
  789. }
  790. .infoData {
  791. color: #878C9C;
  792. font-size: 26rpx;
  793. margin-top: 10rpx;
  794. }
  795. }
  796. }
  797. </style>