Issueandreceipt_task_approval.vue 28 KB

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