exWarehousing.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. <template>
  2. <view class="warp">
  3. <view class="top">
  4. <view class="top-left">{{warehouseName}}</view>
  5. <view>{{binNumber}}仓位</view>
  6. </view>
  7. <view class="content">
  8. <view class="row">
  9. <view class="left">合同编号</view>
  10. <view @click='slectcontractNo'>{{detailData.contractNo}}</view>
  11. </view>
  12. <view class="row">
  13. <view class="left">货名</view>
  14. <view class="right">{{detailData.goodsName ? detailData.goodsName : "选择合同,自动获取"}}
  15. </view>
  16. </view>
  17. <view class="row">
  18. <view class="left">类型</view>
  19. <view @click='show1=true'>{{detailData.type}}</view>
  20. <u-picker :range="typeList" range-key="type" @confirm='typePicker($event)' v-model="show1"
  21. mode="selector">
  22. <view class="">{{detailData.type}}</view>
  23. </u-picker>
  24. </view>
  25. <view class="row row-bottom">
  26. <view class="left">毛重(吨)</view>
  27. <input @input='calculate' v-model='detailData.grossWeight' class="right-bottom"
  28. placeholder="输入毛重"></input>
  29. </view>
  30. <view class="row row-bottom">
  31. <view class="left">皮重(吨)</view>
  32. <input @input='calculate' v-model='detailData.tare' class="right-bottom" placeholder="输入皮重"></input>
  33. </view>
  34. <view class="row row-bottom">
  35. <view class="left">净重(吨)</view>
  36. <input v-model='netWeight' disabled class="right-bottom" placeholder="不可编辑,自动计算"></input>
  37. </view>
  38. <view class="row row-bottom" v-if="detailData.type == '潮粮'">
  39. <view class="left">扣重比</view>
  40. <input v-model='detailData.buckleWeightRatio' class="right-bottom" placeholder="输入扣重比"
  41. @input="pureWeightCount"></input>
  42. </view>
  43. <view class="row row-bottom" v-if="detailData.type == '潮粮'">
  44. <view class="left">干粮水分(%)</view>
  45. <input v-model='detailData.solidGrainWater' class="right-bottom" placeholder="输入干粮水分占比"
  46. @input="pureWeightCount"></input>
  47. </view>
  48. <view class="row row-bottom" v-if="detailData.type == '潮粮'">
  49. <view class="left">潮粮水分(%)</view>
  50. <input v-model='detailData.tidalGrainWater' class="right-bottom" placeholder="输入潮粮水分占比"
  51. @input="pureWeightCount"></input>
  52. </view>
  53. <view class="row row-bottom" v-if="detailData.type == '潮粮'">
  54. <view class="left">纯重(吨)</view>
  55. <input v-model='detailData.pureWeight' class="right-bottom" placeholder="不可编辑,自动计算"></input>
  56. </view>
  57. <view class="row">
  58. <view class="left">品级</view>
  59. <view @click='show3=true'>{{detailData.grade}}</view>
  60. <u-picker :range="pjList" range-key="type" @confirm='pjPicker($event)' v-model="show3" mode="selector">
  61. </u-picker>
  62. </view>
  63. <view class="row">
  64. <view class="left">经办人</view>
  65. <view @click='show6=true'>{{detailData.agent}}</view>
  66. <u-picker :range="handlerList" range-key="staffName" @confirm='handlerPicker($event)' v-model="show6"
  67. mode="selector">
  68. </u-picker>
  69. </view>
  70. <view class="row">
  71. <view class="left">出库日期</view>
  72. <view @click='show7=true'>{{detailData.inOutDate}}</view>
  73. <u-picker v-model="show7" mode="time" @confirm='dateChange($event)' :params="params">
  74. </u-picker>
  75. </view>
  76. <view class="row">
  77. <view class="left">出库类型</view>
  78. <view @click='show5=true'>{{detailData.inOutType}}</view>
  79. <u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
  80. v-model="show5" mode="selector">
  81. </u-picker>
  82. </view>
  83. <view class="row row-bottom">
  84. <view class="left">车牌号</view>
  85. <input v-if="!isPC" v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
  86. <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view>
  87. </view>
  88. </view>
  89. <view class="content2">
  90. <view class="left">上传磅单</view>
  91. <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
  92. :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
  93. @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
  94. </view>
  95. <view class="content1">
  96. <view class="title">
  97. 质检数据(选填)
  98. </view>
  99. <view class="row row-bottom">
  100. <view class="left">质检员</view>
  101. <input v-model='detailData.warehouseInOutDetail.qualityInspector' class="right-bottom"
  102. placeholder="输入质检员姓名"></input>
  103. </view>
  104. <view class="row row-bottom">
  105. <view class="left">水分(%)</view>
  106. <input v-model='detailData.warehouseInOutDetail.waterContent' class="right-bottom"
  107. placeholder="输入水分占比"></input>
  108. </view>
  109. <view class="row row-bottom">
  110. <view class="left">容重(克/升)</view>
  111. <input v-model='detailData.warehouseInOutDetail.bulkDensity' class="right-bottom"
  112. placeholder="输入容重"></input>
  113. </view>
  114. <view class="row row-bottom">
  115. <view class="left">热损伤(%)</view>
  116. <input v-model='detailData.warehouseInOutDetail.jiaorenli' class="right-bottom"
  117. placeholder="输入热损伤占比"></input>
  118. </view>
  119. <view class="row row-bottom">
  120. <view class="left">杂质(%)</view>
  121. <input v-model='detailData.warehouseInOutDetail.impurity' class="right-bottom"
  122. placeholder="输入杂质占比"></input>
  123. </view>
  124. <view class="row row-bottom">
  125. <view class="left">霉变粒(%)</view>
  126. <input v-model='detailData.warehouseInOutDetail.mildewGrain' class="right-bottom"
  127. placeholder="输入霉变粒占比"></input>
  128. </view>
  129. <view class="row row-bottom">
  130. <view class="left">不完善粒(%)</view>
  131. <input v-model='detailData.warehouseInOutDetail.imperfectGrain' class="right-bottom"
  132. placeholder="输入不完善粒占比"></input>
  133. </view>
  134. </view>
  135. <u-toast ref="uToast" />
  136. <view class="bottom-btn">
  137. <u-button type="primary" class="submit" hover-class="none" @click="submit(1)">暂存</u-button>
  138. <u-button type="primary" class="submit" hover-class="none" @click="submit(2)">提交</u-button>
  139. </view>
  140. </view>
  141. </template>
  142. <script>
  143. import upload from '@/components/upload.vue';
  144. import helper from '@/common/helper.js';
  145. import {
  146. mapState
  147. } from 'vuex';
  148. export default {
  149. components: {
  150. upload
  151. },
  152. data() {
  153. return {
  154. show: false,
  155. show1: false,
  156. show2: false,
  157. show3: false,
  158. show4: false,
  159. show5: false,
  160. show6: false,
  161. show7: false,
  162. isPC: true,
  163. // contractNoList: [{
  164. // contractNo: ""
  165. // }],
  166. typeList: [{
  167. type: "干粮"
  168. },
  169. {
  170. type: "潮粮"
  171. }
  172. ],
  173. pjList: [{
  174. type: "一等品"
  175. },
  176. {
  177. type: "二等品"
  178. },
  179. {
  180. type: "三等品"
  181. },
  182. {
  183. type: "等外"
  184. }
  185. ],
  186. handlerList: [{
  187. name: "张三"
  188. },
  189. {
  190. name: "二等"
  191. },
  192. {
  193. name: "三等"
  194. },
  195. {
  196. name: "等外"
  197. }
  198. ],
  199. warehousingTypeList: [],
  200. action: this.$uploadUrl,
  201. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  202. btnLoading: false, //防止重复点击
  203. isAdd: true,
  204. warehouseName: '',
  205. binNumber: '',
  206. detailData: {
  207. contractNo: "请选择合同编号或移库任务编号",
  208. type: "干粮",
  209. grade: "请输入品级",
  210. agent: "请选择经办人",
  211. inOutDate: "请选择出库日期",
  212. inOutType: "请选择出库类型",
  213. warehouseInOutDetail: {},
  214. gradeKey: "",
  215. grossWeight: 0,
  216. tare: 0,
  217. // buckleWeightRatio: 0,
  218. // solidGrainWater: 0,
  219. // tidalGrainWater: 0,
  220. // pureWeight: 0,
  221. },
  222. params: {
  223. year: true,
  224. month: true,
  225. day: true,
  226. // hour: true,
  227. // minute: true,
  228. // second: true
  229. },
  230. // inOutDate: "请选择出库日期",
  231. netWeight: 0,
  232. }
  233. },
  234. computed: {
  235. ...mapState(['hasLogin', 'userInfo'])
  236. },
  237. watch: {
  238. netWeight: function(v) {
  239. this.pureWeightCount()
  240. },
  241. },
  242. onLoad(options) {
  243. this.id = options.id
  244. this.cangId = options.cangId
  245. },
  246. onShow() {
  247. let _data = uni.getStorageSync('erpContractNo')
  248. this.binNumber = helper.erpWarehouse.binNumber
  249. this.warehouseName = helper.erpWarehouse.warehouseName
  250. this.detailData.goodsName = _data.goodsName;
  251. if (_data.contractNo) {
  252. this.detailData.contractNo = _data.contractNo;
  253. }
  254. this.detailData.goodsNameKey = _data.goodsNameKey;
  255. if (!_data.tranCarInfoList) _data.tranCarInfoList = []
  256. if (!this.detailData.contractNo) {
  257. this.detailData.contractNo = '请选择合同编号'
  258. } else {
  259. if (_data.tranCarInfoList.length == 0) {
  260. this.isPC = false
  261. }
  262. }
  263. if (!this.detailData.goodsName) {
  264. this.detailData.goodsName = '货名'
  265. }
  266. let _day = new Date();
  267. _day.setTime(_day.getTime());
  268. this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
  269. //出库类型
  270. this.outWarehouse()
  271. this.detailData.agent = helper.erpWarehouse.personCharge
  272. //经办人
  273. this.handler()
  274. },
  275. methods: {
  276. //计算纯重
  277. pureWeightCount() {
  278. if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this
  279. .detailData.tidalGrainWater) {
  280. // 纯重=净重x[100-(潮粮水分-干粮水分)x扣重比]/100
  281. this.detailData.pureWeight = 100 - (this.detailData.tidalGrainWater - this.detailData
  282. .solidGrainWater) * this.netWeight * this.detailData.buckleWeightRatio / 100
  283. this.detailData.pureWeight = this.detailData.pureWeight.toFixed(3)
  284. }
  285. },
  286. outWarehouse() {
  287. this.$api.doRequest('get', '/commonSysParameter/getInfo', {
  288. constId: 'CON6'
  289. }).then(res => {
  290. this.warehousingTypeList = res.data.data
  291. })
  292. },
  293. handler() {
  294. this.$api.doRequest('get', '/staff/query/getStaffListByCompIdAndWarehouseId', {
  295. compId: helper.erpWarehouse.compId,
  296. warehouseId: helper.erpWarehouse.warehouseId
  297. }).then(res => {
  298. this.handlerList = res.data.data
  299. })
  300. },
  301. contractNopicker(e) {
  302. },
  303. typePicker(e) {
  304. this.detailData.type = this.typeList[e].type
  305. },
  306. pjPicker(e) {
  307. this.detailData.gradeKey = e[0]
  308. this.detailData.grade = this.pjList[e].type
  309. },
  310. handlerPicker(e) {
  311. this.detailData.agentKey = e[0]
  312. this.detailData.agent = this.handlerList[e].staffName
  313. },
  314. dateChange(e) {
  315. this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
  316. },
  317. warehousingTypePicker(e) {
  318. this.detailData.inOutType = this.warehousingTypeList[e].constValue
  319. },
  320. filterFileType(index, lists) {
  321. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  322. lists.splice(index, 1);
  323. // 当前文件不支持
  324. uni.showModal({
  325. title: '暂不支持当前图片类型',
  326. showCancel: false
  327. });
  328. } else {
  329. this.isAdd = false;
  330. }
  331. },
  332. calculate() {
  333. if (this.detailData.grossWeight && this.detailData.tare) {
  334. this.netWeight = this.detailData.grossWeight - this.detailData.tare
  335. }
  336. },
  337. getImgUrl(res) {
  338. this.detailData.addressUrl = res
  339. },
  340. onError(error) {
  341. console.log('------------error-----------')
  342. console.log(error)
  343. },
  344. binNumberpicker(e) {
  345. this.detailData.binNumber = this.positionList[e[0]].binNumber
  346. },
  347. onProgress(e) {},
  348. onRemove() {
  349. this.detailData.addressUrl = ""
  350. },
  351. submit(num) {
  352. if (!this.detailData.contractNo) {
  353. this.$api.msg('合同编号不能为空')
  354. return
  355. }
  356. if (!this.detailData.goodsName) {
  357. this.$api.msg('货名不能为空')
  358. return
  359. }
  360. if (!this.detailData.grossWeight) {
  361. this.$api.msg('毛重不能为空')
  362. return
  363. }
  364. if (isNaN(this.detailData.grossWeight) ||
  365. (String(this.detailData.grossWeight).indexOf('.') != -1 &&
  366. String(this.detailData.grossWeight).length -
  367. (String(this.detailData.grossWeight).indexOf('.') + 1) >
  368. 1) ||
  369. this.detailData.grossWeight < 1 ||
  370. this.detailData.grossWeight > 100000
  371. ) {
  372. this.$api.msg('毛重输入错误!')
  373. return
  374. }
  375. if (!this.detailData.tare) {
  376. this.$api.msg('皮重不能为空')
  377. return
  378. }
  379. if (isNaN(this.detailData.tare) ||
  380. (String(this.detailData.tare).indexOf('.') != -1 &&
  381. String(this.detailData.tare).length -
  382. (String(this.detailData.tare).indexOf('.') + 1) >
  383. 1) ||
  384. this.detailData.tare < 1 ||
  385. this.detailData.tare > 100000
  386. ) {
  387. this.$api.msg('皮重输入错误!')
  388. return
  389. }
  390. if (this.detailData.tare > this.detailData.grossWeight) {
  391. this.$api.msg('皮重不能大于毛重')
  392. return
  393. }
  394. if (this.netWeight < 0) {
  395. this.$api.msg('净重不能小于0')
  396. return
  397. }
  398. if (this.detailData.type == "潮粮") {
  399. if (!this.detailData.buckleWeightRatio) {
  400. this.$api.msg('扣重比不能为空')
  401. return
  402. }
  403. if (isNaN(this.detailData.buckleWeightRatio) ||
  404. (String(this.detailData.buckleWeightRatio).indexOf('.') != -1 &&
  405. String(this.detailData.buckleWeightRatio).length -
  406. (String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
  407. 2) ||
  408. this.detailData.buckleWeightRatio < 0 ||
  409. this.detailData.buckleWeightRatio > 2
  410. ) {
  411. this.$api.msg('扣重比输入错误!')
  412. return
  413. }
  414. if (!this.detailData.solidGrainWater) {
  415. this.$api.msg('干粮水分不能为空')
  416. return
  417. }
  418. if (isNaN(this.detailData.solidGrainWater) ||
  419. (String(this.detailData.solidGrainWater).indexOf('.') != -1 &&
  420. String(this.detailData.solidGrainWater).length -
  421. (String(this.detailData.solidGrainWater).indexOf('.') + 1) >
  422. 1) ||
  423. this.detailData.solidGrainWater < 1 ||
  424. this.detailData.solidGrainWater > 40
  425. ) {
  426. this.$api.msg('干粮水分输入错误!')
  427. return
  428. }
  429. if (!this.detailData.tidalGrainWater) {
  430. this.$api.msg('潮粮水分不能为空')
  431. return
  432. }
  433. if (isNaN(this.detailData.tidalGrainWater) ||
  434. (String(this.detailData.tidalGrainWater).indexOf('.') != -1 &&
  435. String(this.detailData.tidalGrainWater).length -
  436. (String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
  437. 1) ||
  438. this.detailData.tidalGrainWater < 1 ||
  439. this.detailData.tidalGrainWater > 40
  440. ) {
  441. this.$api.msg('潮粮水分输入错误!')
  442. return
  443. }
  444. if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
  445. this.$api.msg('潮粮水分输入错误!')
  446. return
  447. }
  448. if (!this.detailData.pureWeight) {
  449. this.$api.msg('纯重不能为空')
  450. return
  451. }
  452. }
  453. if (this.detailData.grade == "请输入品级") {
  454. this.$api.msg('品级不能为空')
  455. return
  456. }
  457. if (this.detailData.agent == "请选择经办人") {
  458. this.$api.msg('经办人不能为空')
  459. return
  460. }
  461. if (this.detailData.inOutDate == "请选择出库日期") {
  462. this.$api.msg('出库日期不能为空')
  463. return
  464. }
  465. if (this.detailData.inOutType == "请选择出库类型") {
  466. this.$api.msg('出库类型不能为空')
  467. return
  468. }
  469. if (!this.detailData.carNo) {
  470. this.$api.msg('车牌号不能为空')
  471. return
  472. }
  473. if (this.detailData.carNo.length != 7) {
  474. this.$api.msg('车牌号输入有误!')
  475. return
  476. }
  477. if (!this.detailData.addressUrl) {
  478. this.$api.msg('请上传磅单')
  479. return
  480. }
  481. if (this.detailData.warehouseInOutDetail.qualityInspector) {
  482. if (this.detailData.warehouseInOutDetail.qualityInspector < 2 || this.detailData.warehouseInOutDetail
  483. .qualityInspector > 10) {
  484. this.$api.msg('质检员姓名需要2-10个字')
  485. return
  486. }
  487. }
  488. if (this.detailData.warehouseInOutDetail.waterContent) {
  489. if (this.detailData.type == "潮粮" && this.detailData.warehouseInOutDetail.waterContent != this
  490. .detailData.tidalGrainWater) {
  491. this.$api.msg('水分占比与潮粮水分不一致')
  492. return
  493. }
  494. if (this.detailData.type == "干粮") {
  495. if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData.warehouseInOutDetail
  496. .waterContent > 40) {
  497. this.$api.msg('热损伤占比输入错误')
  498. return
  499. }
  500. if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
  501. .detailData.warehouseInOutDetail.jiaorenli).length - (String(
  502. this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
  503. this.$api.msg('热损伤占比输入错误')
  504. return
  505. }
  506. }
  507. }
  508. if (this.detailData.warehouseInOutDetail.bulkDensity) {
  509. if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
  510. .bulkDensity > 1000) {
  511. this.$api.msg('容重输入错误')
  512. return
  513. }
  514. if (String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 && String(this
  515. .detailData.warehouseInOutDetail.bulkDensity).length - (
  516. String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) > 0) {
  517. this.$api.msg('容重输入错误')
  518. return
  519. }
  520. }
  521. if (this.detailData.warehouseInOutDetail.jiaorenli) {
  522. if (this.detailData.warehouseInOutDetail.jiaorenli < 0 || this.detailData.warehouseInOutDetail
  523. .jiaorenli > 40) {
  524. this.$api.msg('热损伤占比输入错误')
  525. return
  526. }
  527. if (String(this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') != -1 && String(this.detailData
  528. .warehouseInOutDetail.jiaorenli).length - (String(
  529. this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') + 1) > 1) {
  530. this.$api.msg('热损伤占比输入错误')
  531. return
  532. }
  533. }
  534. if (this.detailData.warehouseInOutDetail.impurity) {
  535. if (this.detailData.warehouseInOutDetail.impurity < 0 || this.detailData.warehouseInOutDetail
  536. .impurity > 40) {
  537. this.$api.msg('杂质占比输入错误')
  538. return
  539. }
  540. if (String(this.detailData.warehouseInOutDetail.impurity).indexOf('.') != -1 && String(this.detailData
  541. .warehouseInOutDetail.impurity).length - (String(
  542. this.detailData.warehouseInOutDetail.impurity).indexOf('.') + 1) > 1) {
  543. this.$api.msg('杂质占比输入错误')
  544. return
  545. }
  546. }
  547. if (this.detailData.warehouseInOutDetail.mildewGrain) {
  548. if (this.detailData.warehouseInOutDetail.mildewGrain < 0 || this.detailData.warehouseInOutDetail
  549. .mildewGrain > 40) {
  550. this.$api.msg('霉变粒占比输入错误')
  551. return
  552. }
  553. if (String(this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') != -1 && String(this
  554. .detailData
  555. .warehouseInOutDetail.mildewGrain).length - (String(
  556. this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') + 1) > 1) {
  557. this.$api.msg('霉变粒占比输入错误')
  558. return
  559. }
  560. }
  561. if (this.detailData.warehouseInOutDetail.imperfectGrain) {
  562. if (this.detailData.warehouseInOutDetail.imperfectGrain < 0 || this.detailData.warehouseInOutDetail
  563. .imperfectGrain > 40) {
  564. this.$api.msg('不完善粒占比输入错误')
  565. return
  566. }
  567. if (String(this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') != -1 && String(this
  568. .detailData
  569. .warehouseInOutDetail.imperfectGrain).length - (String(
  570. this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') + 1) > 1) {
  571. this.$api.msg('不完善粒占比输入错误')
  572. return
  573. }
  574. }
  575. this.detailData.baseId = helper.erpWarehouse.warehouseId
  576. this.detailData.warehouseName = helper.erpWarehouse.warehouseName
  577. this.detailData.positionId = helper.erpWarehouse.positionId
  578. this.detailData.binNumber = this.binNumber
  579. this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
  580. this.detailData.compId = helper.erpWarehouse.compId
  581. this.detailData.netWeight = this.netWeight
  582. this.detailData.inOutFlag = 1
  583. this.detailData.taskType = "出库任务"
  584. this.detailData.pcFlag = 0
  585. let title = ""
  586. if (num == 1) {
  587. this.detailData.statusFlag = 1
  588. this.detailData.backOffice = this.userInfo.userName
  589. this.detailData.backOfficeId = this.userInfo.id
  590. title = "暂存成功"
  591. } else if (num == 2) {
  592. this.detailData.statusFlag = 3
  593. title = "提交成功"
  594. }
  595. let that = this
  596. uni.showModal({
  597. content: "确定提交出库信息?",
  598. success(res) {
  599. if (res.confirm) {
  600. that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
  601. that.detailData).then(res => {
  602. if (res.data.code == 200) {
  603. that.$api.msg(title)
  604. uni.navigateBack()
  605. }
  606. })
  607. }
  608. }
  609. })
  610. },
  611. slectcontractNo() {
  612. uni.navigateTo({
  613. url: '/pages/erp/warehousing/selectContractNo?flag=' + 5
  614. })
  615. },
  616. slectCarNo() {
  617. uni.navigateTo({
  618. url: '/pages/erp/exWarehousing/selectCarNo'
  619. })
  620. },
  621. }
  622. }
  623. </script>
  624. <style scoped lang="scss">
  625. uni-page-body {
  626. overflow: hidden;
  627. }
  628. .warp {
  629. margin: 10rpx;
  630. padding: 20rpx 20rpx 140rpx 20rpx;
  631. .top {
  632. display: flex;
  633. margin-bottom: 20rpx;
  634. .top-left {
  635. margin-right: 20rpx;
  636. }
  637. }
  638. }
  639. .content,
  640. .content1,
  641. .content2 {
  642. border-radius: 20rpx;
  643. background: white;
  644. padding: 20rpx;
  645. .title {
  646. font-size: 28rpx;
  647. font-weight: 600;
  648. color: #333333;
  649. }
  650. .row {
  651. display: flex;
  652. justify-content: space-between;
  653. border-bottom: 1px solid #EEEEEE;
  654. padding: 21rpx 0;
  655. .right,
  656. input {
  657. font-size: 28rpx;
  658. color: #333333;
  659. }
  660. }
  661. .row-bottom {
  662. // border: 0;
  663. .right-bottom {
  664. width: 300rpx;
  665. text-align: right;
  666. }
  667. }
  668. }
  669. .content1 {
  670. margin-top: 20rpx;
  671. }
  672. .content2 {
  673. margin-top: 10px;
  674. // display: flex;
  675. align-items: center;
  676. .left {
  677. margin-right: 20px;
  678. }
  679. }
  680. .submit {
  681. width: 40%;
  682. background: #22C572;
  683. border-radius: 10rpx;
  684. }
  685. .edit-btn {
  686. background: #22C572;
  687. width: 100rpx;
  688. height: 50rpx;
  689. margin: 0;
  690. color: white;
  691. }
  692. .has-btn {
  693. align-items: center;
  694. }
  695. .bottom-btn {
  696. width: 92%;
  697. position: fixed;
  698. bottom: 40rpx;
  699. display: flex;
  700. z-index: 2;
  701. }
  702. </style>