Issueandreceipt_task_approval.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  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. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  418. if (res.data.code == 200) {
  419. this.$api.doRequest('post', '/workflow/api/handle', {
  420. taskId: list.taskId,
  421. approved: true,
  422. auditMind: '34',
  423. needReapply: false
  424. }).then(res => {
  425. if (res.data.code == 200) {
  426. this.$api.msg('审核成功!')
  427. setTimeout(function() {
  428. uni.navigateBack()
  429. }, 1000);
  430. }
  431. })
  432. }
  433. })
  434. },
  435. requestaudit(list, status) {
  436. list.compId = '2710b21efc1e4393930c5dc800010dc4'
  437. list.publisher = this.userInfo.userName
  438. this.$api.doRequest('post', '/inOutWarehouseTask/api/checkOrUpdateInOutTask', list).then(res => {
  439. if (res.data.code == 200) {
  440. this.$api.doRequest('post', '/workflow/api/handle', {
  441. taskId: list.taskId,
  442. approved: false,
  443. auditMind: this.rejectInfo,
  444. needReapply: true
  445. }).then(res => {
  446. if (res.data.code == 200) {
  447. this.$api.msg('驳回成功!')
  448. setTimeout(function() {
  449. uni.navigateBack()
  450. }, 1000);
  451. }
  452. })
  453. }
  454. })
  455. },
  456. check() {
  457. // (1出库2入库3移库4退库并出库)taskTypeKey
  458. if(this.OutList.taskTypeKey == 1 || this.OutList.taskTypeKey == 3){
  459. if (!this.OutList.grade) {
  460. this.$api.msg('品级不能为空')
  461. return
  462. }
  463. if (!this.OutList.bulkDensity) {
  464. this.$api.msg('容重不能为空')
  465. return
  466. }
  467. if (this.OutList.bulkDensity < 500 || this.OutList.bulkDensity > 1000) {
  468. this.$api.msg('容重输入错误')
  469. return
  470. }
  471. if (String(this.OutList.bulkDensity).indexOf('.') != -1 && String(this.OutList.bulkDensity).length - (
  472. String(this.OutList.bulkDensity).indexOf('.') + 1) > 0) {
  473. this.$api.msg('容重输入错误')
  474. return
  475. }
  476. if (!this.OutList.waterContent) {
  477. this.$api.msg('水分不能为空')
  478. return
  479. }
  480. if (isNaN(this.OutList.waterContent) ||
  481. (String(this.OutList.waterContent).indexOf('.') != -1 &&
  482. String(this.OutList.waterContent).length -
  483. (String(this.OutList.waterContent).indexOf('.') + 1) >
  484. 2) ||
  485. this.OutList.waterContent < 1 ||
  486. this.OutList.waterContent > 40
  487. ) {
  488. this.$api.msg('水分输入错误!')
  489. return
  490. }
  491. if (!this.OutList.unitPrice) {
  492. this.$api.msg('单价不能为空')
  493. return
  494. }
  495. if (isNaN(this.OutList.unitPrice) ||
  496. (String(this.OutList.unitPrice).indexOf('.') != -1 &&
  497. String(this.OutList.unitPrice).length -
  498. (String(this.OutList.unitPrice).indexOf('.') + 1) >
  499. 2) ||
  500. this.OutList.unitPrice < 1 ||
  501. this.OutList.unitPrice > 10000
  502. ) {
  503. this.$api.msg('单价输入错误!')
  504. return
  505. }
  506. }
  507. if (this.OutList.taskTypeKey == 1) {
  508. if (!this.OutList.businessDescribe) {
  509. this.$api.msg('业务描述不能为空')
  510. return
  511. }
  512. if (this.OutList.businessDescribe.length > 150) {
  513. this.$api.msg('业务描述长度错误')
  514. return
  515. }
  516. }
  517. if (this.EnterList.taskTypeKey ==2 && this.EnterList.judge) {
  518. if (!this.EnterList.grade) {
  519. this.$api.msg('品级不能为空')
  520. return
  521. }
  522. if (!this.EnterList.bulkDensity) {
  523. this.$api.msg('容重不能为空')
  524. return
  525. }
  526. if (this.EnterList.bulkDensity < 500 || this.EnterList.bulkDensity > 1000) {
  527. this.$api.msg('容重输入错误')
  528. return
  529. }
  530. if (String(this.EnterList.bulkDensity).indexOf('.') != -1 && String(this.EnterList.bulkDensity).length - (
  531. String(this.EnterList.bulkDensity).indexOf('.') + 1) > 0) {
  532. this.$api.msg('容重输入错误')
  533. return
  534. }
  535. if (!this.EnterList.waterContent) {
  536. this.$api.msg('水分不能为空')
  537. return
  538. }
  539. if (isNaN(this.EnterList.waterContent) ||
  540. (String(this.EnterList.waterContent).indexOf('.') != -1 &&
  541. String(this.EnterList.waterContent).length -
  542. (String(this.EnterList.waterContent).indexOf('.') + 1) >
  543. 2) ||
  544. this.EnterList.waterContent < 1 ||
  545. this.EnterList.waterContent > 40
  546. ) {
  547. this.$api.msg('水分输入错误!')
  548. return
  549. }
  550. if (!this.EnterList.unitPrice) {
  551. this.$api.msg('单价不能为空')
  552. return
  553. }
  554. if (isNaN(this.EnterList.unitPrice) ||
  555. (String(this.EnterList.unitPrice).indexOf('.') != -1 &&
  556. String(this.EnterList.unitPrice).length -
  557. (String(this.EnterList.unitPrice).indexOf('.') + 1) >
  558. 2) ||
  559. this.EnterList.unitPrice < 1 ||
  560. this.EnterList.unitPrice > 10000
  561. ) {
  562. this.$api.msg('单价输入错误!')
  563. return
  564. }
  565. if (!this.EnterList.businessDescribe) {
  566. this.$api.msg('业务描述不能为空')
  567. return
  568. }
  569. if (this.EnterList.businessDescribe.length > 150) {
  570. this.$api.msg('业务描述长度错误')
  571. return
  572. }
  573. }
  574. if (this.OutList.taskTypeKey == 3) {
  575. if (!this.EnterList.businessDescribe) {
  576. this.$api.msg('业务描述不能为空')
  577. return
  578. }
  579. if (this.EnterList.businessDescribe.length > 150) {
  580. this.$api.msg('业务描述长度错误')
  581. return
  582. }
  583. }
  584. if(this.retreatList.taskTypeKey == 4 && this.retreatList.judge){
  585. if (!this.retreatList.grade) {
  586. this.$api.msg('品级不能为空')
  587. return
  588. }
  589. if (!this.retreatList.bulkDensity) {
  590. this.$api.msg('容重不能为空')
  591. return
  592. }
  593. if (this.retreatList.bulkDensity < 500 || this.retreatList.bulkDensity > 1000) {
  594. this.$api.msg('容重输入错误')
  595. return
  596. }
  597. if (String(this.retreatList.bulkDensity).indexOf('.') != -1 && String(this.retreatList.bulkDensity).length - (
  598. String(this.retreatList.bulkDensity).indexOf('.') + 1) > 0) {
  599. this.$api.msg('容重输入错误')
  600. return
  601. }
  602. if (!this.retreatList.waterContent) {
  603. this.$api.msg('水分不能为空')
  604. return
  605. }
  606. if (isNaN(this.retreatList.waterContent) ||
  607. (String(this.retreatList.waterContent).indexOf('.') != -1 &&
  608. String(this.retreatList.waterContent).length -
  609. (String(this.retreatList.waterContent).indexOf('.') + 1) >
  610. 2) ||
  611. this.retreatList.waterContent < 1 ||
  612. this.retreatList.waterContent > 40
  613. ) {
  614. this.$api.msg('水分输入错误!')
  615. return
  616. }
  617. if (!this.retreatList.unitPrice) {
  618. this.$api.msg('单价不能为空')
  619. return
  620. }
  621. if (isNaN(this.retreatList.unitPrice) ||
  622. (String(this.retreatList.unitPrice).indexOf('.') != -1 &&
  623. String(this.retreatList.unitPrice).length -
  624. (String(this.retreatList.unitPrice).indexOf('.') + 1) >
  625. 2) ||
  626. this.retreatList.unitPrice < 1 ||
  627. this.retreatList.unitPrice > 10000
  628. ) {
  629. this.$api.msg('单价输入错误!')
  630. return
  631. }
  632. if (!this.EnterList.businessDescribe) {
  633. this.$api.msg('业务描述不能为空')
  634. return
  635. }
  636. if (this.EnterList.businessDescribe.length > 150) {
  637. this.$api.msg('业务描述长度错误')
  638. return
  639. }
  640. }
  641. }
  642. }
  643. }
  644. </script>
  645. <style scoped lang="scss">
  646. .content1 {
  647. margin: 10rpx;
  648. padding-bottom: 224rpx;
  649. .title {
  650. height: 70rpx;
  651. line-height: 60rpx;
  652. font-size: 32rpx;
  653. font-weight: 600;
  654. color: #333333;
  655. border-bottom: 2rpx solid #EEEEEE;
  656. }
  657. }
  658. .uForm {
  659. padding: 0 40rpx;
  660. }
  661. .u-form-item {
  662. padding: 0;
  663. }
  664. .bottom-btn {
  665. width: 100%;
  666. position: fixed;
  667. bottom: 0;
  668. display: flex;
  669. z-index: 2;
  670. left: 0;
  671. background-color: #f8f8f8;
  672. flex-direction: column;
  673. .btn1,
  674. .btn2 {
  675. width: 100%;
  676. margin-bottom: 26rpx;
  677. border-radius: 90rpx;
  678. }
  679. .btn1 {
  680. background: white;
  681. color: #00C265;
  682. }
  683. }
  684. .submit {
  685. width: 50%;
  686. background: #22C572;
  687. border-radius: 10rpx;
  688. }
  689. .part2 {
  690. margin-top: 20rpx;
  691. }
  692. .textarea {
  693. border: 1px solid #ccc;
  694. border-radius: 10rpx;
  695. background-color: #F9F9FA;
  696. height: 100px;
  697. }
  698. .row {
  699. display: flex;
  700. justify-content: space-between;
  701. // border-bottom: 1px solid #EEEEEE;
  702. padding: 21rpx 0;
  703. .right,
  704. input {
  705. font-size: 28rpx;
  706. color: #333333;
  707. }
  708. }
  709. //弹出框
  710. // .popup {
  711. // padding: 30rpx;
  712. // border-radius: 20rpx;
  713. // }
  714. .rejectInfoCss {
  715. border: 1px solid #ccc;
  716. border-radius: 10rpx;
  717. background-color: #F9F9FA;
  718. height: 100px;
  719. margin: 30rpx;
  720. }
  721. .uForm_item {
  722. padding: 20rpx;
  723. background-color: #FFFFFF;
  724. margin: 20rpx;
  725. border-radius: 20rpx;
  726. }
  727. .rejectText {
  728. text-align: center;
  729. }
  730. .topInfo {
  731. height: 210rpx;
  732. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  733. padding: 30rpx;
  734. .topInfo-item {
  735. height: 150rpx;
  736. background-color: #FFFFFF;
  737. border-radius: 20rpx;
  738. padding: 40rpx;
  739. .logo {
  740. width: 40rpx;
  741. height: 40rpx;
  742. margin-top: 8rpx;
  743. }
  744. .infoText {
  745. font-size: 36rpx;
  746. font-weight: 600;
  747. margin-left: 20rpx;
  748. }
  749. .infoData {
  750. color: #878C9C;
  751. font-size: 26rpx;
  752. margin-top: 10rpx;
  753. }
  754. }
  755. }
  756. </style>