exWarehousing.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  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. },
  216. params: {
  217. year: true,
  218. month: true,
  219. day: true,
  220. // hour: true,
  221. // minute: true,
  222. // second: true
  223. },
  224. // inOutDate: "请选择出库日期",
  225. netWeight: ""
  226. }
  227. },
  228. computed: {
  229. ...mapState(['hasLogin', 'userInfo'])
  230. },
  231. watch: {
  232. netWeight: function(v) {
  233. this.pureWeightCount()
  234. },
  235. },
  236. onLoad(options) {
  237. this.id = options.id
  238. this.cangId = options.cangId
  239. },
  240. onShow() {
  241. this.binNumber = helper.erpWarehouse.binNumber
  242. this.warehouseName = helper.erpWarehouse.warehouseName
  243. this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
  244. if (uni.getStorageSync('erpContractNo').contractNo) {
  245. this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
  246. }
  247. this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
  248. if (!uni.getStorageSync('erpContractNo').tranCarInfoList)
  249. uni.getStorageSync('erpContractNo').tranCarInfoList = []
  250. if (!this.detailData.contractNo) {
  251. this.detailData.contractNo = '请选择合同编号'
  252. } else {
  253. if (uni.getStorageSync('erpContractNo').tranCarInfoList) {
  254. if (uni.getStorageSync('erpContractNo').tranCarInfoList.length == 0) {
  255. this.isPC = false
  256. }
  257. }
  258. }
  259. if (!this.detailData.goodsName) {
  260. this.detailData.goodsName = '货名'
  261. }
  262. //出库类型
  263. this.outWarehouse()
  264. //经办人
  265. this.handler()
  266. },
  267. methods: {
  268. //计算纯重
  269. pureWeightCount() {
  270. if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this
  271. .detailData.tidalGrainWater) {
  272. // 纯重=净重x[100-(潮粮水分-干粮水分)x扣重比]/100
  273. this.detailData.pureWeight = 100 - (this.detailData.tidalGrainWater - this.detailData
  274. .solidGrainWater) * this.netWeight * this.detailData.buckleWeightRatio / 100
  275. this.detailData.pureWeight = this.detailData.pureWeight.toFixed(3)
  276. }
  277. },
  278. outWarehouse() {
  279. this.$api.doRequest('get', '/commonSysParameter/getInfo', {
  280. constId: 'CON6'
  281. }).then(res => {
  282. this.warehousingTypeList = res.data.data
  283. })
  284. },
  285. handler() {
  286. this.$api.doRequest('get', '/staff/query/getStaffListByCompIdAndWarehouseId', {
  287. compId: helper.erpWarehouse.compId,
  288. warehouseId: helper.erpWarehouse.warehouseId
  289. }).then(res => {
  290. this.handlerList = res.data.data
  291. })
  292. },
  293. contractNopicker(e) {
  294. },
  295. typePicker(e) {
  296. this.detailData.type = this.typeList[e].type
  297. },
  298. pjPicker(e) {
  299. this.detailData.gradeKey = e[0]
  300. this.detailData.grade = this.pjList[e].type
  301. },
  302. handlerPicker(e) {
  303. this.detailData.agentKey = e[0]
  304. this.detailData.agent = this.handlerList[e].staffName
  305. },
  306. dateChange(e) {
  307. this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
  308. },
  309. warehousingTypePicker(e) {
  310. this.detailData.inOutType = this.warehousingTypeList[e].constValue
  311. },
  312. filterFileType(index, lists) {
  313. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  314. lists.splice(index, 1);
  315. // 当前文件不支持
  316. uni.showModal({
  317. title: '暂不支持当前图片类型',
  318. showCancel: false
  319. });
  320. } else {
  321. this.isAdd = false;
  322. }
  323. },
  324. calculate() {
  325. if (this.detailData.grossWeight && this.detailData.tare) {
  326. this.netWeight = this.detailData.grossWeight - this.detailData.tare
  327. }
  328. },
  329. getImgUrl(res) {
  330. this.detailData.addressUrl = res
  331. },
  332. onError(error) {
  333. console.log('------------error-----------')
  334. console.log(error)
  335. },
  336. binNumberpicker(e) {
  337. this.detailData.binNumber = this.positionList[e[0]].binNumber
  338. },
  339. onProgress(e) {},
  340. onRemove() {
  341. this.detailData.addressUrl = ""
  342. },
  343. submit(num) {
  344. if (!this.detailData.contractNo) {
  345. this.$api.msg('合同编号不能为空')
  346. return
  347. }
  348. if (!this.detailData.goodsName) {
  349. this.$api.msg('货名不能为空')
  350. return
  351. }
  352. if (!this.detailData.grossWeight) {
  353. this.$api.msg('毛重不能为空')
  354. return
  355. }
  356. if (isNaN(this.detailData.grossWeight) ||
  357. (String(this.detailData.grossWeight).indexOf('.') != -1 &&
  358. String(this.detailData.grossWeight).length -
  359. (String(this.detailData.grossWeight).indexOf('.') + 1) >
  360. 1) ||
  361. this.detailData.grossWeight < 1 ||
  362. this.detailData.grossWeight > 100000
  363. ) {
  364. this.$api.msg('毛重输入错误!')
  365. return
  366. }
  367. if (!this.detailData.tare) {
  368. this.$api.msg('皮重不能为空')
  369. return
  370. }
  371. if (isNaN(this.detailData.tare) ||
  372. (String(this.detailData.tare).indexOf('.') != -1 &&
  373. String(this.detailData.tare).length -
  374. (String(this.detailData.tare).indexOf('.') + 1) >
  375. 1) ||
  376. this.detailData.tare < 1 ||
  377. this.detailData.tare > 100000
  378. ) {
  379. this.$api.msg('皮重输入错误!')
  380. return
  381. }
  382. if (this.detailData.tare > this.detailData.grossWeight) {
  383. this.$api.msg('皮重不能大于毛重')
  384. return
  385. }
  386. if (this.netWeight < 0) {
  387. this.$api.msg('净重不能小于0')
  388. return
  389. }
  390. if (this.detailData.type == "潮粮") {
  391. if (!this.detailData.buckleWeightRatio) {
  392. this.$api.msg('扣重比不能为空')
  393. return
  394. }
  395. if (isNaN(this.detailData.buckleWeightRatio) ||
  396. (String(this.detailData.buckleWeightRatio).indexOf('.') != -1 &&
  397. String(this.detailData.buckleWeightRatio).length -
  398. (String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
  399. 2) ||
  400. this.detailData.buckleWeightRatio < 0 ||
  401. this.detailData.buckleWeightRatio > 2
  402. ) {
  403. this.$api.msg('扣重比输入错误!')
  404. return
  405. }
  406. if (!this.detailData.solidGrainWater) {
  407. this.$api.msg('干粮水分不能为空')
  408. return
  409. }
  410. if (isNaN(this.detailData.solidGrainWater) ||
  411. (String(this.detailData.solidGrainWater).indexOf('.') != -1 &&
  412. String(this.detailData.solidGrainWater).length -
  413. (String(this.detailData.solidGrainWater).indexOf('.') + 1) >
  414. 1) ||
  415. this.detailData.solidGrainWater < 1 ||
  416. this.detailData.solidGrainWater > 40
  417. ) {
  418. this.$api.msg('干粮水分输入错误!')
  419. return
  420. }
  421. if (!this.detailData.tidalGrainWater) {
  422. this.$api.msg('潮粮水分不能为空')
  423. return
  424. }
  425. if (isNaN(this.detailData.tidalGrainWater) ||
  426. (String(this.detailData.tidalGrainWater).indexOf('.') != -1 &&
  427. String(this.detailData.tidalGrainWater).length -
  428. (String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
  429. 1) ||
  430. this.detailData.tidalGrainWater < 1 ||
  431. this.detailData.tidalGrainWater > 40
  432. ) {
  433. this.$api.msg('潮粮水分输入错误!')
  434. return
  435. }
  436. if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
  437. this.$api.msg('潮粮水分输入错误!')
  438. return
  439. }
  440. if (!this.detailData.pureWeight) {
  441. this.$api.msg('纯重不能为空')
  442. return
  443. }
  444. }
  445. if (this.detailData.grade == "请输入品级") {
  446. this.$api.msg('品级不能为空')
  447. return
  448. }
  449. if (this.detailData.agent == "请选择经办人") {
  450. this.$api.msg('经办人不能为空')
  451. return
  452. }
  453. if (this.detailData.inOutDate == "请选择出库日期") {
  454. this.$api.msg('出库日期不能为空')
  455. return
  456. }
  457. if (this.detailData.inOutType == "请选择出库类型") {
  458. this.$api.msg('出库类型不能为空')
  459. return
  460. }
  461. if (!this.detailData.carNo) {
  462. this.$api.msg('车牌号不能为空')
  463. return
  464. }
  465. if (!this.detailData.addressUrl) {
  466. this.$api.msg('请上传磅单')
  467. return
  468. }
  469. if (this.detailData.warehouseInOutDetail.qualityInspector) {
  470. if (this.detailData.warehouseInOutDetail.qualityInspector < 2 || this.detailData.warehouseInOutDetail
  471. .qualityInspector > 10) {
  472. this.$api.msg('质检员姓名需要2-10个字')
  473. return
  474. }
  475. }
  476. if (this.detailData.warehouseInOutDetail.waterContent) {
  477. if (this.detailData.type == "潮粮" && this.detailData.warehouseInOutDetail.waterContent != this
  478. .detailData.tidalGrainWater) {
  479. this.$api.msg('水分占比与潮粮水分不一致')
  480. return
  481. }
  482. if (this.detailData.type == "干粮") {
  483. if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData.warehouseInOutDetail
  484. .waterContent > 40) {
  485. this.$api.msg('热损伤占比输入错误')
  486. return
  487. }
  488. if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
  489. .detailData.warehouseInOutDetail.jiaorenli).length - (String(
  490. this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
  491. this.$api.msg('热损伤占比输入错误')
  492. return
  493. }
  494. }
  495. }
  496. if (this.detailData.warehouseInOutDetail.bulkDensity) {
  497. if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
  498. .bulkDensity > 1000) {
  499. this.$api.msg('容重输入错误')
  500. return
  501. }
  502. if (String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 && String(this
  503. .detailData.warehouseInOutDetail.bulkDensity).length - (
  504. String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) > 0) {
  505. this.$api.msg('容重输入错误')
  506. return
  507. }
  508. }
  509. if (this.detailData.warehouseInOutDetail.jiaorenli) {
  510. if (this.detailData.warehouseInOutDetail.jiaorenli < 0 || this.detailData.warehouseInOutDetail
  511. .jiaorenli > 40) {
  512. this.$api.msg('热损伤占比输入错误')
  513. return
  514. }
  515. if (String(this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') != -1 && String(this.detailData
  516. .warehouseInOutDetail.jiaorenli).length - (String(
  517. this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') + 1) > 1) {
  518. this.$api.msg('热损伤占比输入错误')
  519. return
  520. }
  521. }
  522. if (this.detailData.warehouseInOutDetail.impurity) {
  523. if (this.detailData.warehouseInOutDetail.impurity < 0 || this.detailData.warehouseInOutDetail
  524. .impurity > 40) {
  525. this.$api.msg('杂质占比输入错误')
  526. return
  527. }
  528. if (String(this.detailData.warehouseInOutDetail.impurity).indexOf('.') != -1 && String(this.detailData
  529. .warehouseInOutDetail.impurity).length - (String(
  530. this.detailData.warehouseInOutDetail.impurity).indexOf('.') + 1) > 1) {
  531. this.$api.msg('杂质占比输入错误')
  532. return
  533. }
  534. }
  535. if (this.detailData.warehouseInOutDetail.mildewGrain) {
  536. if (this.detailData.warehouseInOutDetail.mildewGrain < 0 || this.detailData.warehouseInOutDetail
  537. .mildewGrain > 40) {
  538. this.$api.msg('霉变粒占比输入错误')
  539. return
  540. }
  541. if (String(this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') != -1 && String(this.detailData
  542. .warehouseInOutDetail.mildewGrain).length - (String(
  543. this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') + 1) > 1) {
  544. this.$api.msg('霉变粒占比输入错误')
  545. return
  546. }
  547. }
  548. if (this.detailData.warehouseInOutDetail.imperfectGrain) {
  549. if (this.detailData.warehouseInOutDetail.imperfectGrain < 0 || this.detailData.warehouseInOutDetail
  550. .imperfectGrain > 40) {
  551. this.$api.msg('不完整粒占比输入错误')
  552. return
  553. }
  554. if (String(this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') != -1 && String(this.detailData
  555. .warehouseInOutDetail.imperfectGrain).length - (String(
  556. this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') + 1) > 1) {
  557. this.$api.msg('不完整粒占比输入错误')
  558. return
  559. }
  560. }
  561. this.detailData.baseId = helper.erpWarehouse.warehouseId
  562. this.detailData.warehouseName = helper.erpWarehouse.warehouseName
  563. this.detailData.positionId = helper.erpWarehouse.positionId
  564. this.detailData.binNumber = this.binNumber
  565. this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
  566. this.detailData.compId = helper.erpWarehouse.compId
  567. this.detailData.netWeight = this.netWeight
  568. this.detailData.inOutFlag = 1
  569. this.detailData.taskType = "出库任务"
  570. this.detailData.pcFlag = 0
  571. let title = ""
  572. if (num == 1) {
  573. this.detailData.statusFlag = 1
  574. this.detailData.backOffice = this.userInfo.userName
  575. this.detailData.backOfficeId = this.userInfo.id
  576. title = "暂存成功"
  577. } else if (num == 2) {
  578. this.detailData.statusFlag = 3
  579. title = "提交成功"
  580. }
  581. let that = this
  582. uni.showModal({
  583. content: "确定提交出库信息?",
  584. success(res) {
  585. if (res.confirm) {
  586. that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
  587. that.detailData).then(res => {
  588. if (res.data.code == 200) {
  589. that.$api.msg(title)
  590. uni.navigateBack()
  591. }
  592. })
  593. }
  594. }
  595. })
  596. },
  597. slectcontractNo() {
  598. uni.navigateTo({
  599. url: '/pages/erp/warehousing/selectContractNo?flag=' + 5
  600. })
  601. },
  602. slectCarNo() {
  603. uni.navigateTo({
  604. url: '/pages/erp/exWarehousing/selectCarNo'
  605. })
  606. },
  607. }
  608. }
  609. </script>
  610. <style scoped lang="scss">
  611. uni-page-body {
  612. overflow: hidden;
  613. }
  614. .warp {
  615. margin: 10rpx;
  616. padding: 20rpx 20rpx 140rpx 20rpx;
  617. .top {
  618. display: flex;
  619. margin-bottom: 20rpx;
  620. .top-left {
  621. margin-right: 20rpx;
  622. }
  623. }
  624. }
  625. .content,
  626. .content1,
  627. .content2 {
  628. border-radius: 20rpx;
  629. background: white;
  630. padding: 20rpx;
  631. .title {
  632. font-size: 28rpx;
  633. font-weight: 600;
  634. color: #333333;
  635. }
  636. .row {
  637. display: flex;
  638. justify-content: space-between;
  639. border-bottom: 1px solid #EEEEEE;
  640. padding: 21rpx 0;
  641. .right,
  642. input {
  643. font-size: 28rpx;
  644. color: #333333;
  645. }
  646. }
  647. .row-bottom {
  648. // border: 0;
  649. .right-bottom {
  650. width: 300rpx;
  651. text-align: right;
  652. }
  653. }
  654. }
  655. .content1 {
  656. margin-top: 20rpx;
  657. }
  658. .content2 {
  659. margin-top: 10px;
  660. // display: flex;
  661. align-items: center;
  662. .left {
  663. margin-right: 20px;
  664. }
  665. }
  666. .submit {
  667. width: 40%;
  668. background: #22C572;
  669. border-radius: 10rpx;
  670. }
  671. .edit-btn {
  672. background: #22C572;
  673. width: 100rpx;
  674. height: 50rpx;
  675. margin: 0;
  676. color: white;
  677. }
  678. .has-btn {
  679. align-items: center;
  680. }
  681. .bottom-btn {
  682. width: 92%;
  683. position: fixed;
  684. bottom: 40rpx;
  685. display: flex;
  686. z-index: 2;
  687. }
  688. </style>