newlyAdded.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. <template>
  2. <view>
  3. <view class="ordertop">
  4. <view>
  5. <view class="iconblue"></view>
  6. <text class="license">基础信息</text>
  7. </view>
  8. <view class="line">
  9. <u-line color="#ccc" border-style='dashed' />
  10. </view>
  11. <u-form :model="form" :rules="rules" ref="uForm" :errorType="errorType">
  12. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  13. <u-form-item style="width: 100%;" :border-bottom="false" label-width="150rpx" label="入库日期:" prop="fBsdate"
  14. required>
  15. <u-input type="type" :clearable="false" placeholder="请选择入库日期" v-model="form.fBsdate" disabled @click="shOw = !shOw" />
  16. <u-calendar v-model="shOw" mode="date" @change="bsdate"></u-calendar>
  17. </u-form-item>
  18. </view>
  19. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  20. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="品名:" prop="fGoodsid" required>
  21. <u-input type="type" :clearable="false" placeholder="请选品名" v-model="fGoodsid" disabled @click="goods = !goods" />
  22. <u-select v-model="goods" @confirm="confiRm" :list="good_s" label-name="fName" value-name="fId">
  23. </u-select>
  24. </u-form-item>
  25. </view>
  26. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  27. <u-form-item style="width: 100%;" :border-bottom="false" label-width="150rpx" label="货物属性:" prop="fBusinessType"
  28. required disabled>
  29. <u-input type="type" :clearable="false" placeholder="请选择货物属性" v-model="fBusinessType" disabled @click="iness = !iness" />
  30. <u-select v-model="iness" @confirm="business" :list="fBusiness" label-name="dictLabel" value-name="dictSort" />
  31. </u-form-item>
  32. </view>
  33. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  34. <u-form-item style="width: 100%;" :border-bottom="false" label-width="150rpx" label="属性详情:" prop="fMarks" required>
  35. <u-input type="type" :clearable="false" placeholder="请输入属性详情" v-model="form.fMarks" />
  36. </u-form-item>
  37. </view>
  38. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  39. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="库区:" prop="fWarehouseInformation"
  40. required>
  41. <u-select v-model="fQty" mode="mutil-column-auto" :list="list" @confirm="confirm" label-name="label" value-name="id"
  42. child-name="children"></u-select>
  43. <u-input type="type" :clearable="false" placeholder="请选库区" v-model="fWarehouseInformation" disabled @click="fQty = !fQty" />
  44. </u-form-item>
  45. </view>
  46. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  47. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="件数:" prop="fQty" required>
  48. <u-input type="digit" :clearable="false" placeholder="请输入件数" v-model="form.fQty" @input="calculation" />
  49. </u-form-item>
  50. </view>
  51. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  52. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="毛重:" prop="fGrossweight"
  53. required>
  54. <u-input type="digit" :clearable="false" placeholder="请输入毛重" v-model="form.fGrossweight" />
  55. </u-form-item>
  56. </view>
  57. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  58. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="净重:" prop="fNetweight"
  59. required>
  60. <u-input type="digit" :clearable="false" placeholder="请输入净重" v-model="form.fNetweight" />
  61. </u-form-item>
  62. </view>
  63. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  64. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="车号:" prop="fTruckno" required>
  65. <u-input type="type" :clearable="false" placeholder="请输入车号" v-model="form.fTruckno" />
  66. </u-form-item>
  67. </view>
  68. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  69. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="车队:" prop="fFleet">
  70. <u-input type="type" :clearable="false" placeholder="请选车队" v-model="fFleet" disabled @click="fEleet = !fEleet" />
  71. <u-select v-model="fEleet" @confirm="confiEm" :list="fleEt" label-name="fName" value-name="fId">
  72. </u-select>
  73. </u-form-item>
  74. </view>
  75. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  76. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="箱号:" prop="fCntrno">
  77. <u-input type="type" :clearable="false" placeholder="请输入箱号" v-model="form.fCntrno" />
  78. </u-form-item>
  79. </view>
  80. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  81. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="箱型:" prop="fcntrtype">
  82. <u-input type="type" :clearable="false" placeholder="请输入箱型" v-model="fcntrtype" disabled @click="rtype = !rtype" />
  83. <u-select v-model="rtype" @confirm="fcntrtPe" :list="fcnt" label-name="fName" value-name="fId"></u-select>
  84. </u-form-item>
  85. </view>
  86. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  87. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="箱量:" prop="fCntqty">
  88. <u-input type="digit" :clearable="false" placeholder="请输入箱量" v-model="form.fCntqty" />
  89. </u-form-item>
  90. </view>
  91. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  92. <u-form-item style="width: 100%;" :border-bottom="false" label-width="150rpx" label="劳务公司:" prop="labour">
  93. <u-input type="type" :clearable="false" placeholder="请选择劳务公司" v-model="labour" disabled @click="laBour = !laBour" />
  94. <u-select v-model="laBour" @confirm="confiLm" :list="laboUr" label-name="fName" value-name="fId">
  95. </u-select>
  96. </u-form-item>
  97. </view>
  98. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  99. <u-form-item style="width: 100%;" :border-bottom="false" label-width="130rpx" label="装卸工:" prop="fStevedore">
  100. <u-input type="type" :clearable="false" placeholder="请输入装卸工" v-model="form.fStevedore" />
  101. </u-form-item>
  102. </view>
  103. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  104. <u-form-item style="width: 100%;" :border-bottom="false" label-width="130rpx" label="提单号:" prop="fOriginalbillno">
  105. <u-input type="type" :clearable="false" placeholder="请输入提单号" v-model="form.fOriginalbillno" disabled />
  106. </u-form-item>
  107. </view>
  108. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  109. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="司机:" prop="fDriverName">
  110. <u-input type="type" :clearable="false" placeholder="请输入司机" v-model="form.fDriverName" />
  111. </u-form-item>
  112. </view>
  113. <view class="basic" style="margin: 0 auto;">
  114. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="备注:">
  115. <u-input type="textarea" height="20rpx" placeholder="请输入备注" :clearable="false" v-model="form.remark" />
  116. </u-form-item>
  117. </view>
  118. </u-form>
  119. </view>
  120. <view class="ordertop" style="margin-bottom: 60rpx;">
  121. <view>
  122. <view class="iconblue"></view>
  123. <text class="license">附件上传</text>
  124. <!-- <view class="various" @click="attachmentP">保存附件</view> -->
  125. </view>
  126. <view class="line">
  127. <u-line color="#ccc" border-style='dashed' />
  128. </view>
  129. <view style="width: 94%;margin: 0 auto;">
  130. <u-upload ref="uUpload" :deletable="false" :action="action" :header="headers" @on-success="success" :file-list="fileList">
  131. </u-upload>
  132. </view>
  133. </view>
  134. <br>
  135. <view style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;">
  136. <u-button type="primary" @click="appCheckCode">提交保存</u-button>
  137. </view>
  138. <u-modal v-model="submIt" @confirm="submit" :content="content" @cancel="submIt = false" :show-cancel-button="true" />
  139. <u-modal v-model="CheckStatus" @confirm="goBack" :content="content2" @cancel="CheckStatus = false"
  140. :show-cancel-button="true" />
  141. </view>
  142. </template>
  143. <script>
  144. export default {
  145. data() {
  146. return {
  147. content2:"数据发生变化,是否需要返回到列表?",
  148. fcntrtype: '',
  149. fcnt: [],
  150. errorType: ['toast'],
  151. rules: {
  152. fBsdate: [{
  153. required: true,
  154. message: '请选择入库日期',
  155. // blur和change事件触发检验
  156. trigger: ['blur', 'change']
  157. }],
  158. fGoodsid: [{
  159. required: true,
  160. type: 'number',
  161. message: '请选择品名',
  162. // blur和change事件触发检验
  163. trigger: ['blur', 'change']
  164. }],
  165. fBusinessType: [{
  166. required: true,
  167. type: 'number',
  168. message: '请选择货物属性',
  169. // blur和change事件触发检验
  170. trigger: ['blur', 'change']
  171. }],
  172. fMarks: [{
  173. required: true,
  174. message: '请输入属性详情',
  175. // blur和change事件触发检验
  176. trigger: ['blur', 'change']
  177. }],
  178. fWarehouseInformation: [{
  179. required: true,
  180. message: '请选择库区',
  181. // blur和change事件触发检验
  182. trigger: ['blur', 'change']
  183. }],
  184. fQty: [{
  185. required: true,
  186. message: '请输入件数',
  187. // blur和change事件触发检验
  188. trigger: ['blur', 'change']
  189. }],
  190. fGrossweight: [{
  191. required: true,
  192. message: '请输入毛重',
  193. // blur和change事件触发检验
  194. trigger: ['blur', 'change']
  195. }],
  196. fNetweight: [{
  197. required: true,
  198. message: '请输入净重',
  199. // blur和change事件触发检验
  200. trigger: ['blur', 'change']
  201. }],
  202. fTruckno: [{
  203. required: true,
  204. message: '请输入车号',
  205. // blur和change事件触发检验
  206. trigger: ['blur', 'change']
  207. }],
  208. fOriginalbillno: [{
  209. required: true,
  210. message: '请输入提单号',
  211. // blur和change事件触发检验
  212. trigger: ['blur', 'change']
  213. }],
  214. },
  215. title: '', //标题
  216. fQty: false,
  217. iness: false,
  218. fBusiness: [],
  219. fBusinessType: '',
  220. action: 'https://test.wms.tubaosoft.com/prod-api/common/upload',
  221. headers: {
  222. Authorization: 'Bearer ' + uni.getStorageSync('lifeData').vuex_token
  223. },
  224. content: '是否确认提交',
  225. fileList: [],
  226. submIt: false,
  227. operationType: '',
  228. goods: false,
  229. good_s: [],
  230. lists: [],
  231. list: [],
  232. form: {
  233. fBsdate: '',
  234. fGoodsid: '',
  235. fBusinessType: '',
  236. fMarks: '',
  237. fWarehouseInformation: '',
  238. fQty: '',
  239. fGrossweight: '',
  240. fNetweight: '',
  241. fTruckno: '',
  242. fFleet: '',
  243. fCntrno: '',
  244. fcntrtype: '',
  245. fCntqty: '',
  246. labour: '',
  247. fStevedore: '',
  248. fOriginalbillno: ''
  249. },
  250. fEleet: false,
  251. rtype: false,
  252. fleEt: [],
  253. labour: '',
  254. laBour: false,
  255. laboUr: [],
  256. shOw: false,
  257. fFleet: '',
  258. fId: '',
  259. fGoodsid: '',
  260. fWarehouseInformation: '',
  261. warehouseBills: {},
  262. planNumber: {},
  263. CheckStatus:false,
  264. }
  265. },
  266. onLoad(option) {
  267. console.log(JSON.parse(decodeURIComponent(option.item)))
  268. this.dataList = JSON.parse(decodeURIComponent(option.item))
  269. this.planNumber.fQty = JSON.parse(decodeURIComponent(option.item)).fQty
  270. this.planNumber.fGrossweight = JSON.parse(decodeURIComponent(option.item)).fGrossweight
  271. this.planNumber.fNetweight = JSON.parse(decodeURIComponent(option.item)).fNetweight
  272. this.fGoodsid = JSON.parse(decodeURIComponent(option.item)).goodsName
  273. this.form.fOriginalbillno = JSON.parse(decodeURIComponent(option.item)).fMblno
  274. this.form.fBsdate = JSON.parse(decodeURIComponent(option.item)).fBsdate
  275. let lists = {
  276. fId: JSON.parse(decodeURIComponent(option.item)).fId
  277. }
  278. this.fId = JSON.parse(decodeURIComponent(option.item)).fId
  279. this.$u.get('/warehouseBusiness/applets/appBasicInformation',lists).then(res => {
  280. console.log(res)
  281. this.list = res.warehouse
  282. this.fBusiness = res.attributes
  283. this.good_s = res.goodsList
  284. this.fleEt = res.feelCorpList
  285. this.fcnt = res.cntrList
  286. this.laboUr = res.corpsList
  287. this.warehouseBills = res.warehouseBills
  288. console.log(res.warehouseBills)
  289. this.form.fGoodsid = res.warehouseBills.fGoodsid
  290. this.form.fBillno = res.warehouseBills.fBillno
  291. this.form.fMblno = res.warehouseBills.fMblno
  292. this.form.fBillingway = res.warehouseBills.fBillingway
  293. console.log(this.list)
  294. }).catch(err => {
  295. console.log(err)
  296. })
  297. },
  298. onReady() {
  299. this.$refs.uForm.setRules(this.rules);
  300. },
  301. methods: {
  302. goBack(){
  303. uni.navigateBack()
  304. },
  305. appCheckCode() {
  306. console.log(this.form.fDateChanged)
  307. this.$u.get('/warehouseBusiness/applets/appCheckCode',{
  308. fId: this.warehouseBills.fId,
  309. fType: "warehouse",
  310. codeVal: this.warehouseBills.fDateChanged,
  311. }).then(res => {
  312. if (!res) {
  313. this.CheckStatus=true
  314. } else {
  315. this.submIt=true
  316. }
  317. }).catch(err => {
  318. uni.showToast({
  319. icon: 'none',
  320. title: '网络繁忙请稍后再试',
  321. position: "bottom"
  322. })
  323. })
  324. },
  325. calculation() {
  326. // console.log(this.form.fQty)
  327. // this.warehouseBills.fQty //总件数
  328. // this.warehouseBills.fGrossweight //总净重
  329. // this.warehouseBills.fNetweight //总毛重
  330. let sumQty=this.warehouseBills.fPlanqty-this.warehouseBills.fQty
  331. if (this.form.fQty <= sumQty) {
  332. let fQty = Number(this.warehouseBills.fPlangrossweight / this.warehouseBills.fPlanqty)
  333. let fqTy = Number(this.warehouseBills.fPlannetweight / this.warehouseBills.fPlanqty)
  334. let fGrossweight = fQty * this.form.fQty
  335. let fNetweight = fqTy * this.form.fQty
  336. this.form.fGrossweight = fGrossweight.toFixed(2)
  337. this.form.fNetweight = fNetweight.toFixed(2)
  338. } else {
  339. this.form.fQty = ''
  340. this.form.fGrossweight = ''
  341. this.form.fNetweight = ''
  342. uni.showToast({
  343. icon: 'none',
  344. title: '总计划件数为:' + sumQty + '不能大于总计划件数',
  345. position: "bottom"
  346. })
  347. }
  348. },
  349. business(e) {
  350. // console.log(e)
  351. this.form.fBusinessType = e[0].value
  352. this.fBusinessType = e[0].label
  353. },
  354. bsdate(e) {
  355. // console.log(e)
  356. this.form.fBsdate = e.result
  357. },
  358. confiLm(e) {
  359. // console.log(e)
  360. this.form.labour = e[0].value
  361. this.labour = e[0].label
  362. },
  363. confiEm(e) {
  364. // console.log(e)
  365. this.form.fFleet = e[0].value
  366. this.fFleet = e[0].label
  367. },
  368. fcntrtPe(e) {
  369. console.log(e)
  370. this.form.fcntrtype = e[0].value
  371. this.fcntrtype = e[0].label
  372. },
  373. confiRm(e) {
  374. // console.log(e)
  375. this.form.fGoodsid = e[0].value
  376. this.fGoodsid = e[0].label
  377. },
  378. confirm(e) {
  379. // console.log(e)
  380. let res = ''
  381. let id = ''
  382. for (let item in e) {
  383. id = e[item].value
  384. res += e[item].label + '/'
  385. }
  386. this.form.fWarehouseInformation = this.dataList.fWarehouseName + '/' + res.substr(0, res.length - 1)
  387. this.fWarehouseInformation = this.dataList.fWarehouseName + '/' + res.substr(0, res.length - 1)
  388. this.form.fWarehouselocid = id
  389. console.log(this.form.fWarehouseInformation, this.fWarehouseInformation)
  390. },
  391. receiving(id, i) {
  392. // 获取当前时间
  393. let date = new Date();
  394. let dateYear = date.getFullYear(); //获取年 
  395. let dateMonth = date.getMonth(); //获取月  
  396. let dateDate = date.getDate(); //获取当日
  397. uni.setNavigationBarTitle({
  398. title: this.title
  399. })
  400. this.$u.post('/fleet/ftmsorderbillscars/selectDriver',{
  401. id: id
  402. }).then(res => {
  403. // console.log(res)
  404. this.form = res.cars
  405. switch (i) {
  406. case 1:
  407. this.form.acceptDate = dateYear + '-' + dateMonth + '-' + dateDate
  408. break
  409. case 3:
  410. this.form.loadDate = dateYear + '-' + dateMonth + '-' + dateDate
  411. break
  412. case 4:
  413. this.form.mdLoadDate = dateYear + '-' + dateMonth + '-' + dateDate
  414. break
  415. case 5:
  416. this.form.unLoadDate = dateYear + '-' + dateMonth + '-' + dateDate
  417. break
  418. default:
  419. uni.showToast({
  420. icon: 'none',
  421. title: '未知错误状态=' + i,
  422. position: "bottom"
  423. })
  424. break
  425. }
  426. if (this.form.acceptDate) {
  427. this.form.acceptDate = this.form.acceptDate.slice(0, 10)
  428. }
  429. if (this.form.loadDate) {
  430. this.form.loadDate = this.form.loadDate.slice(0, 10)
  431. }
  432. if (this.form.mdLoadDate) {
  433. this.form.mdLoadDate = this.form.mdLoadDate.slice(0, 10)
  434. }
  435. if (this.form.unLoadDate) {
  436. this.form.unLoadDate = this.form.unLoadDate.slice(0, 10)
  437. }
  438. }).catch(err => {
  439. uni.showToast({
  440. icon: 'none',
  441. title: '网络繁忙请稍后再试',
  442. position: "bottom"
  443. })
  444. })
  445. },
  446. success(data, index, lists, name) {
  447. // console.log(data)
  448. // console.log(index)
  449. // console.log(lists)
  450. // console.log(name)
  451. // sssconsole.log(this.fileList)
  452. },
  453. attachmentP() {
  454. this.lists = []
  455. console.log(this.fileList)
  456. console.log(this.$refs.uUpload.lists)
  457. let lists = this.$refs.uUpload.lists
  458. if (lists.length != 0) {
  459. for (let item in this.$refs.uUpload.lists) {
  460. console.log(this.$refs.uUpload.lists[item].response)
  461. if (this.$refs.uUpload.lists[item].response) {
  462. this.lists.push({
  463. fUrl: this.$refs.uUpload.lists[item].response.url,
  464. fName: this.$refs.uUpload.lists[item].response.fileName
  465. })
  466. }
  467. }
  468. }
  469. let fileList = []
  470. console.log(this.fileList)
  471. if (this.fileList.length != 0) {
  472. for (let item in this.fileList) {
  473. fileList.push({
  474. fUrl: this.fileList[item].response.url,
  475. fName: this.fileList[item].response.fileName
  476. })
  477. }
  478. }
  479. this.lists = this.lists.concat(fileList)
  480. // console.log(this.lists)
  481. this.$u.post('/warehouseBusiness/applets/saveWarehouse',{
  482. 'warehousebillsitems': JSON.stringify({
  483. fId: this.form.fId,
  484. fQty: this.form.fQty,
  485. fGrossweight: this.form.fGrossweight,
  486. fNetweight: this.form.fNetweight,
  487. fPid: this.form.fPid
  488. }),
  489. 'tEnclosure': JSON.stringify(this.lists)
  490. }).then(res => {
  491. // console.log(res)
  492. if (res.code == 500) {
  493. if (res.msg == 'parseDecimal error, field : oilAmt') {
  494. uni.showToast({
  495. icon: 'none',
  496. title: '数字不正确,请检查后再提交',
  497. position: "bottom"
  498. })
  499. } else {
  500. uni.showToast({
  501. icon: 'none',
  502. title: res.msg,
  503. position: "bottom"
  504. })
  505. }
  506. } else if (res.code == 200) {
  507. // uni.navigateBack();
  508. uni.showToast({
  509. icon: 'none',
  510. title: '保存成功',
  511. position: "bottom"
  512. })
  513. }
  514. }).catch(err => {
  515. uni.showToast({
  516. icon: 'none',
  517. title: '网络繁忙请稍后再试',
  518. position: "bottom"
  519. })
  520. })
  521. },
  522. //提交
  523. submit() {
  524. this.$refs.uForm.validate(valid => {
  525. if (valid) {
  526. console.log(valid)
  527. this.lists = []
  528. console.log(this.fileList)
  529. console.log(this.$refs.uUpload.lists)
  530. let lists = this.$refs.uUpload.lists
  531. if (lists.length != 0) {
  532. for (let item in this.$refs.uUpload.lists) {
  533. console.log(this.$refs.uUpload.lists[item].response)
  534. if (this.$refs.uUpload.lists[item].response) {
  535. this.lists.push({
  536. fUrl: this.$refs.uUpload.lists[item].response.url,
  537. fName: this.$refs.uUpload.lists[item].response.fileName
  538. })
  539. }
  540. }
  541. }
  542. let fileList = []
  543. console.log(this.fileList)
  544. if (this.fileList.length != 0) {
  545. for (let item in this.fileList) {
  546. fileList.push({
  547. fUrl: this.fileList[item].response.url,
  548. fName: this.fileList[item].response.fileName
  549. })
  550. }
  551. }
  552. this.lists = this.lists.concat(fileList)
  553. this.form.fPid = this.fId
  554. let data = new Date();
  555. this.form.fChargedate = this.form.fOriginalbilldate = this.form.fBsdate
  556. this.form.fBilltype = 'SJRK'
  557. console.log(this.form)
  558. this.$u.post('/warehouseBusiness/applets/saveWarehouse',{
  559. item: this.form,
  560. attachs: this.lists
  561. }).then(res => {
  562. console.log(res)
  563. if (res.code == 500) {
  564. if (res.msg == 'parseDecimal error, field : oilAmt') {
  565. uni.showToast({
  566. icon: 'none',
  567. title: '数字不正确,请检查后再提交',
  568. position: "bottom"
  569. })
  570. } else {
  571. uni.showToast({
  572. icon: 'none',
  573. title: res.msg,
  574. position: "bottom"
  575. })
  576. }
  577. } else if (res.code == 200) {
  578. uni.navigateBack();
  579. }
  580. }).catch(err => {
  581. uni.showToast({
  582. icon: 'none',
  583. title: '网络繁忙请稍后再试',
  584. position: "bottom"
  585. })
  586. })
  587. } else {
  588. // console.log('验证失败');
  589. // console.log(this.form.fGoodsid)
  590. }
  591. })
  592. }
  593. }
  594. };
  595. </script>
  596. <style scoped lang="scss">
  597. .basic {
  598. width: 94%;
  599. margin: 10rpx auto;
  600. display: flex;
  601. justify-content: space-between;
  602. }
  603. .basic>view {
  604. margin-bottom: 10rpx;
  605. }
  606. .basic>view:nth-child(1) {
  607. color: #797979;
  608. }
  609. .license {
  610. float: left;
  611. font-size: 32rpx;
  612. }
  613. .ordertop {
  614. width: 96%;
  615. background-color: #fff;
  616. margin: 20rpx auto;
  617. border-radius: 20rpx;
  618. padding-top: 20rpx;
  619. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  620. padding-bottom: 10rpx;
  621. }
  622. .ordertop>view:nth-child(1) {
  623. width: 98%;
  624. margin-bottom: 60rpx;
  625. }
  626. .iconblue {
  627. width: 10rpx;
  628. height: 45rpx;
  629. float: left;
  630. background-color: #3a63cf;
  631. margin-right: 10rpx;
  632. }
  633. .various {
  634. float: right;
  635. width: 150rpx;
  636. border: 2rpx solid #3a63cf;
  637. text-align: center;
  638. border-radius: 100rpx;
  639. color: #3a63cf;
  640. }
  641. .line {
  642. width: 92%;
  643. margin: 0 auto;
  644. }
  645. </style>