improvedExWaehousingDetail.vue 21 KB

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