Issueandreceipt_task_approval.vue 27 KB

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