index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. <template>
  2. <view>
  3. <view class="ordertop">
  4. <view>
  5. <view class="iconblue"></view>
  6. <text class="license">基础信息</text>
  7. <view class="various">{{form.billstatus}}</view>
  8. </view>
  9. <view class="line">
  10. <u-line color="#ccc" border-style='dashed' />
  11. </view>
  12. <view class="basic">
  13. <view>货主</view>
  14. <view>{{form.corpName}}</view>
  15. </view>
  16. <view class="basic">
  17. <view>提单号</view>
  18. <view>{{form.fMblno}}</view>
  19. </view>
  20. <view class="basic">
  21. <view>箱型/箱量/箱号</view>
  22. <view>{{form.fCntrtype}}/{{form.fCntqty}}/{{form.fCntrno}}</view>
  23. </view>
  24. <!-- <view class="basic">
  25. <view>箱量</view>
  26. <view>{{form.cntqty}}</view>
  27. </view> -->
  28. <!-- <view class="basic">
  29. <view>箱号</view>
  30. <view>{{form.cntrno}}</view>
  31. </view> -->
  32. <!-- <view class="basic">
  33. <view>入库日期</view>
  34. <view>{{form.bsdate}}</view>
  35. </view> -->
  36. <!-- <view class="basic">
  37. <view>入库状态</view>
  38. <view>{{form.billstatus}}</view>
  39. </view> -->
  40. <view class="basic">
  41. <view>品名/属性详情</view>
  42. <view>{{form.goodsName}}/{{form.marks}}</view>
  43. </view>
  44. <view class="basic">
  45. <view>车号/司机</view>
  46. <view>{{form.fTruckno}}/{{form.fDriverName}}</view>
  47. </view>
  48. <!-- <view class="basic">
  49. <view>司机</view>
  50. <view>{{form.fDriverName}}</view>
  51. </view> -->
  52. <view class="basic">
  53. <view>司机电话</view>
  54. <view>{{form.fDriverTel}}</view>
  55. </view>
  56. <view class="basic">
  57. <view>货物属性</view>
  58. <view>{{form.businessType}}</view>
  59. </view>
  60. <!-- <view class="basic">
  61. <view>货物名称</view>
  62. <view>{{form.fMarks}}</view>
  63. </view> -->
  64. <!-- <view class="basic">
  65. <view>属性详情</view>
  66. <view>{{form.marks}}</view>
  67. </view> -->
  68. <view class="basic">
  69. <view>劳务公司</view>
  70. <view>{{form.fleetName}}</view>
  71. </view>
  72. <view class="basic">
  73. <view>库区</view>
  74. <view>{{form.fWarehouseInformation}}</view>
  75. </view>
  76. </view>
  77. <view class="ordertop">
  78. <view>
  79. <view class="iconblue"></view>
  80. <text class="license">可编辑</text>
  81. </view>
  82. <view class="line">
  83. <u-line color="#ccc" border-style='dashed' />
  84. </view>
  85. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  86. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="件数:">
  87. <u-input type="digit" :clearable="false" v-model="form.fQty" />
  88. </u-form-item>
  89. </view>
  90. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  91. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="毛重:">
  92. <u-input type="digit" :clearable="false" v-model="form.fGrossweight" />
  93. </u-form-item>
  94. </view>
  95. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  96. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="净重:">
  97. <u-input type="digit" :clearable="false" v-model="form.fNetweight" />
  98. </u-form-item>
  99. </view>
  100. <!-- <view class="basic" style="margin: 0 auto;height: 55rpx;">
  101. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="库区:">
  102. <u-select v-model="formation" mode="mutil-column-auto" :list="list" @confirm="mation"
  103. label-name="label" value-name="id" child-name="children"></u-select>
  104. <u-input type="type" :clearable="false" v-model="warehouseInformation" placeholder="请选择库区" disabled
  105. @click="formation = !formation" />
  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="160rpx" label="出库日期:">
  110. <u-calendar v-model="show_bsdate" mode="date" max-date="2050" @change="changeBsdate"></u-calendar>
  111. <u-input type="type" :clearable="false" v-model="form.fBsdate" placeholder="请选择日期" disabled @click="show_bsdate = !show_bsdate"/>
  112. </u-form-item>
  113. </view>
  114. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  115. <u-form-item style="width: 100%;" :border-bottom="false" label-width="130rpx" label="装卸工:">
  116. <u-input type="type" :clearable="false" v-model="form.fStevedore" />
  117. </u-form-item>
  118. </view>
  119. <view class="basic" style="margin: 0 auto;height: 55rpx;">
  120. <u-form-item style="width: 100%;" :border-bottom="false" label-width="130rpx" label="叉车工:">
  121. <u-input type="type" :clearable="false" v-model="form.fForkliftman" />
  122. </u-form-item>
  123. </view>
  124. <view class="basic" style="margin: 0 auto;">
  125. <u-form-item style="width: 100%;" :border-bottom="false" label-width="100rpx" label="备注:">
  126. <u-input type="textarea" height="20rpx" :clearable="false" v-model="form.remark" />
  127. </u-form-item>
  128. </view>
  129. </view>
  130. <view class="ordertop" v-if="entryPrinting == 0?form.billstatus == '出库中'||form.billstatus == '已出库':true" style="margin-bottom: 60rpx;">
  131. <view>
  132. <view class="iconblue"></view>
  133. <text class="license">{{form.billstatus != '已出库'?"附件上传":'查看附件'}}</text>
  134. <view class="various" @click="attachmentP" v-if="deptName != '外部用户'&&form.billstatus != '已出库'">保存附件</view>
  135. </view>
  136. <view class="line">
  137. <u-line color="#ccc" border-style='dashed'/>
  138. </view>
  139. <view style="width: 94%;margin: 0 auto;">
  140. <u-upload ref="uUpload" :max-count="form.billstatus == '已出库'?fileList.length:999" :deletable="form.billstatus == '已出库'?false:true" @on-remove="onRemove" :action="action" :header="headers"
  141. @on-success="success" :file-list="fileList" :before-upload="beforeUpload">
  142. </u-upload>
  143. <u-empty v-if="fileList.length == 0&&form.billstatus == '已出库'" text="无图片" mode="list" style="margin: 20rpx auto;"></u-empty>
  144. </view>
  145. </view>
  146. <br>
  147. <view
  148. style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;z-index: 9999;" v-if="deptName != '外部用户'">
  149. <u-button type="primary" @click="appCheckCode" v-if="entryPrinting != 0?form.billstatus == '出库中'||form.billstatus == '计划'||form.billstatus == '待出库':form.billstatus == '出库中'">出库确认</u-button>
  150. <u-button type="primary" @click="appCheckCode" v-else-if="entryPrinting == 0?form.billstatus == '计划'||form.billstatus == '待出库':false">叫车进场</u-button>
  151. </view>
  152. <u-modal v-model="submIt" @confirm="submit" :content="content" @cancel="submIt = false"
  153. :show-cancel-button="true" />
  154. <u-modal v-model="CheckStatus" @confirm="getForm" :content="content2" @cancel="CheckStatus = false"
  155. :show-cancel-button="true" />
  156. <view style="position: absolute;top: -999999px;">
  157. <view>
  158. <canvas style="width: 1000px;height: 1000px;" canvas-id="firstCanvas"></canvas>
  159. </view>
  160. </view>
  161. </view>
  162. </template>
  163. <script>
  164. export default {
  165. data() {
  166. return {
  167. urldata: "",
  168. CheckStatus: false,
  169. title: '', //标题
  170. formation: false,
  171. show_bsdate:false,
  172. list: [],
  173. action: this.$u.http.config.baseUrl + '/common/upload',
  174. // action: 'https://test.tms.tubaosoft.com/prod-api/common/upload',
  175. headers: {
  176. Authorization: 'Bearer ' + this.$store.state.vuex_token
  177. },
  178. warehouseInformation: '',
  179. content: '是否确认提交',
  180. content2: "数据发生变化,是否需要更新一下?",
  181. fileList: [],
  182. submIt: false,
  183. operationType: '',
  184. lists: [],
  185. warehouseBills: {},
  186. form: {
  187. mblno: '', //提单号
  188. carregNo: '', //车号
  189. transUserId: '', //调度员*
  190. driverUserId: '', //驾驶员*
  191. goodsId: '', //装货品名
  192. cntrQty: '', //调度数量
  193. ysl: '', //船名
  194. voy: '', //航次
  195. loadAddr: '', //提箱地点
  196. loadDate: '', //提箱时间
  197. loadAttntel: '', //提箱联系
  198. mdLoadAddr: '', //装卸地点
  199. mdLoadDate: '', //装卸时间
  200. mdLoadAttnTel: '', //装卸联系
  201. unLoadAddrL: '', //卸车地点
  202. unLadDate: '', //卸车时间
  203. unLoadAttnTel: '' //卸车联系
  204. },
  205. entryPrinting:1,
  206. deptName:''
  207. }
  208. },
  209. onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数
  210. this.deptName = uni.getStorageSync('deptName')
  211. this.$u.get('/system/config/configKey/entry.printing').then(res =>{
  212. // console.log(res)
  213. this.entryPrinting = res.msg
  214. })
  215. // console.log(option); //打印出上个页面传递的参数.
  216. let listi = {
  217. fId: JSON.parse(decodeURIComponent(option.item)).fId
  218. }
  219. this.$u.get('/warehouseBusiness/applets/appWarehouseItemDataById', listi).then(res => {
  220. // console.log(res)
  221. this.form = res.data.item
  222. this.warehouseInformation = this.form.warehouseInformation
  223. this.warehouseBills = res.data.warehouseBills
  224. this.form.enclosure = res.data.enclosure
  225. for (let item in this.form.enclosure) {
  226. this.fileList.push({
  227. url: this.form.enclosure[item].fUrl,
  228. response: {
  229. fileName: this.form.enclosure[item].fName,
  230. url: this.form.enclosure[item].fUrl
  231. }
  232. })
  233. }
  234. })
  235. console.log(this.form)
  236. uni.showLoading({
  237. title: '加载中'
  238. });
  239. setTimeout(function() {
  240. uni.hideLoading();
  241. }, 1000);
  242. },
  243. methods: {
  244. changeBsdate(e){
  245. this.form.fBsdate = e.result
  246. },
  247. getForm() {
  248. this.$u.get('/warehouseBusiness/applets/appWarehouseItemDataById', {
  249. fId: this.form.fId
  250. }).then(res => {
  251. this.form = res.data.item
  252. this.warehouseInformation = this.form.warehouseInformation
  253. this.warehouseBills = res.data.warehouseBills
  254. }).catch(err => {
  255. console.log(err)
  256. })
  257. },
  258. appCheckCode() {
  259. if (this.form.fWarehouseInformation) {
  260. this.$u.get('/warehouseBusiness/applets/appCheckCode', {
  261. fId: this.warehouseBills.fId,
  262. fType: "warehouse",
  263. codeVal: this.warehouseBills.fDateChanged,
  264. }).then(res => {
  265. if (!res.data) {
  266. this.CheckStatus = true
  267. } else {
  268. this.submIt = true
  269. }
  270. })
  271. } else {
  272. uni.showToast({
  273. icon: 'none',
  274. title: '请选择库区',
  275. position: "bottom"
  276. })
  277. }
  278. },
  279. mation(e) {
  280. // console.log(e)
  281. let res = ''
  282. let id = ''
  283. for (let item in e) {
  284. id = e[item].value
  285. res += e[item].label + '/'
  286. }
  287. this.form.fWarehouseInformation = res.substr(0, res.length - 1)
  288. this.form.fWarehouselocid = id
  289. this.warehouseInformation = res.substr(0, res.length - 1)
  290. },
  291. receiving(id, i) {
  292. // 获取当前时间
  293. let date = new Date();
  294. let dateYear = date.getFullYear(); //获取年 
  295. let dateMonth = date.getMonth(); //获取月  
  296. let dateDate = date.getDate(); //获取当日
  297. uni.setNavigationBarTitle({
  298. title: this.title
  299. })
  300. this.$u.post('/fleet/ftmsorderbillscars/selectDriver', {
  301. id: id
  302. }).then(res => {
  303. console.log(res)
  304. this.form = res.data.cars
  305. switch (i) {
  306. case 1:
  307. this.form.acceptDate = dateYear + '-' + dateMonth + '-' + dateDate
  308. break
  309. case 3:
  310. this.form.loadDate = dateYear + '-' + dateMonth + '-' + dateDate
  311. break
  312. case 4:
  313. this.form.mdLoadDate = dateYear + '-' + dateMonth + '-' + dateDate
  314. break
  315. case 5:
  316. this.form.unLoadDate = dateYear + '-' + dateMonth + '-' + dateDate
  317. break
  318. default:
  319. uni.showToast({
  320. icon: 'none',
  321. title: '未知错误状态=' + i,
  322. position: "bottom"
  323. })
  324. break
  325. }
  326. if (this.form.acceptDate) {
  327. this.form.acceptDate = this.form.acceptDate.slice(0, 10)
  328. }
  329. if (this.form.loadDate) {
  330. this.form.loadDate = this.form.loadDate.slice(0, 10)
  331. }
  332. if (this.form.mdLoadDate) {
  333. this.form.mdLoadDate = this.form.mdLoadDate.slice(0, 10)
  334. }
  335. if (this.form.unLoadDate) {
  336. this.form.unLoadDate = this.form.unLoadDate.slice(0, 10)
  337. }
  338. }).catch(err => {
  339. uni.showToast({
  340. icon: 'none',
  341. title: '网络繁忙请稍后再试',
  342. position: "bottom"
  343. })
  344. })
  345. },
  346. success(data, index, lists, name) {
  347. // console.log(data)
  348. // console.log(index)
  349. // console.log(lists)
  350. // console.log(name)
  351. // console.log(this.fileList)
  352. },
  353. attachmentP() {
  354. this.lists = []
  355. console.log(this.fileList)
  356. console.log(this.$refs.uUpload.lists)
  357. let lists = this.$refs.uUpload.lists
  358. if (lists.length != 0) {
  359. for (let item in this.$refs.uUpload.lists) {
  360. console.log(this.$refs.uUpload.lists[item].response)
  361. if (this.$refs.uUpload.lists[item].response) {
  362. this.lists.push({
  363. fUrl: this.$refs.uUpload.lists[item].response.url,
  364. fName: this.$refs.uUpload.lists[item].response.fileName
  365. })
  366. }
  367. }
  368. }
  369. let fileList = []
  370. console.log(this.fileList)
  371. if (this.fileList.length != 0) {
  372. for (let item in this.fileList) {
  373. fileList.push({
  374. fUrl: this.fileList[item].response.url,
  375. fName: this.fileList[item].response.fileName
  376. })
  377. }
  378. }
  379. this.lists = this.lists.concat(fileList)
  380. console.log(this.lists)
  381. this.$u.post('/warehouseBusiness/applets/appSubmitWarehouse', {
  382. item: this.form,
  383. attachs: this.lists
  384. }).then(res => {
  385. console.log(res.code)
  386. if (res.code == 200) {
  387. // uni.navigateBack();
  388. uni.showToast({
  389. icon: 'none',
  390. title: '保存成功',
  391. position: "bottom"
  392. })
  393. } else if (res.data.code == 500) {
  394. if (res.data.msg == 'parseDecimal error, field : oilAmt') {
  395. uni.showToast({
  396. icon: 'none',
  397. title: '数字不正确,请检查后再提交',
  398. position: "bottom"
  399. })
  400. } else {
  401. uni.showToast({
  402. icon: 'none',
  403. title: res.data.msg,
  404. position: "bottom"
  405. })
  406. }
  407. }
  408. })
  409. },
  410. //提交
  411. submit() {
  412. if (this.form.billstatus == '出库中' || this.entryPrinting != 0) {
  413. this.lists = []
  414. console.log(this.fileList)
  415. console.log(this.$refs.uUpload.lists)
  416. let lists = this.$refs.uUpload.lists
  417. if (lists.length != 0) {
  418. for (let item in this.$refs.uUpload.lists) {
  419. console.log(this.$refs.uUpload.lists[item].response)
  420. if (this.$refs.uUpload.lists[item].response) {
  421. this.lists.push({
  422. fUrl: this.$refs.uUpload.lists[item].response.url,
  423. fName: this.$refs.uUpload.lists[item].response.fileName
  424. })
  425. }
  426. }
  427. }
  428. let fileList = []
  429. console.log(this.fileList)
  430. if (this.fileList.length != 0) {
  431. for (let item in this.fileList) {
  432. fileList.push({
  433. fUrl: this.fileList[item].response.url,
  434. fName: this.fileList[item].response.fileName
  435. })
  436. }
  437. }
  438. this.lists = this.lists.concat(fileList)
  439. this.$u.post('/warehouseBusiness/applets/appOperationConfirmation', {
  440. item: this.form,
  441. attachs: this.lists
  442. }).then(res => {
  443. console.log(res)
  444. if (res.code == 500) {
  445. if (res.msg == 'parseDecimal error, field : oilAmt') {
  446. uni.showToast({
  447. icon: 'none',
  448. title: '数字不正确,请检查后再提交',
  449. position: "bottom"
  450. })
  451. } else {
  452. uni.showToast({
  453. icon: 'none',
  454. title: res.msg,
  455. position: "bottom"
  456. })
  457. }
  458. } else if (res.code == 200) {
  459. uni.navigateBack();
  460. }
  461. })
  462. } else {
  463. this.$u.post('/warehouseBusiness/applets/appWarehouseOperation', {
  464. item: this.form,
  465. attachs: []
  466. }).then(res => {
  467. console.log(res)
  468. if (res.code == 500) {
  469. if (res.msg == 'parseDecimal error, field : oilAmt') {
  470. uni.showToast({
  471. icon: 'none',
  472. title: '数字不正确,请检查后再提交',
  473. position: "bottom"
  474. })
  475. } else {
  476. uni.showToast({
  477. icon: 'none',
  478. title: res.data.msg,
  479. position: "bottom"
  480. })
  481. }
  482. } else if (res.code == 200) {
  483. uni.redirectTo({
  484. url: '../index'
  485. });
  486. uni.makePhoneCall({
  487. phoneNumber: '' + this.form.fDriverTel, // 手机号
  488. });
  489. }
  490. })
  491. }
  492. },
  493. // 上传照片
  494. async beforeUpload(index, list) {
  495. uni.showLoading({
  496. title: '上传中...',
  497. })
  498. var data = await this.getWatermark(index, list);
  499. uni.hideLoading()
  500. return data;
  501. },
  502. //照片添加水印
  503. getWatermark(index, list) {
  504. return new Promise((resolve, reject) => {
  505. var that = this;
  506. uni.getImageInfo({
  507. src: list[index].url,
  508. success: (ress) => {
  509. let ctx = uni.createCanvasContext('firstCanvas'); //创建画布
  510. //将图片src放到cancas内,宽高为图片大小
  511. ctx.drawImage(list[index].url, 0, 0, ress.width / 3, ress.height / 3)
  512. ctx.setFillStyle('#FFFFFF') //字体颜色
  513. let textToWidth = ress.width / 3 * 0.3; //字体宽度
  514. let textToHeight = ress.height / 3; //字体高度
  515. let address = ''
  516. //获取当前时间
  517. let dataTime = new Date().getFullYear() + '-' + Number(new Date()
  518. .getMonth() + 1) + '-' + new Date().getDate() + ' ' + new Date()
  519. .getHours() + ':' + new Date().getMinutes() + ':' + new Date()
  520. .getSeconds()
  521. // 获取地理位置
  522. uni.getLocation({
  523. type: 'gcj02',
  524. geocode: true,
  525. success: function(res) {
  526. address = res.address.province + res.address.city + res.address.district + res.address.street + res.address.streetNum
  527. if (uni.getSystemInfoSync().platform == 'ios') {
  528. ctx.setFontSize(34) //字体大小
  529. ctx.fillText("时间:" + dataTime, textToWidth * 0.2, textToHeight *
  530. 0.7) // 设置字体
  531. ctx.fillText("地址:"+address, textToWidth * 0.2,
  532. textToHeight * 0.7 + 34) // 设置字体
  533. } else {
  534. ctx.setFontSize(12) //字体大小
  535. ctx.fillText("时间:" + dataTime, textToWidth * 0.2, textToHeight *
  536. 0.95) // 设置字体
  537. ctx.fillText("地址:"+address, textToWidth * 0.2,
  538. textToHeight * 0.95 + 12) // 设置字体
  539. }
  540. ctx.draw(false, () => {
  541. setTimeout(() => { //使用定时是因为制作水印需要时间,设置定时才不会出bug
  542. uni.canvasToTempFilePath({ //将画布中内容转成图片,即水印与图片合成
  543. width: ress.width / 3, // 画布宽
  544. height: ress.height / 3, // 画布高
  545. canvasId: 'firstCanvas',
  546. success: (res) => {
  547. list[index].url = res
  548. .tempFilePath
  549. uni.saveImageToPhotosAlbum({ //保存到手机
  550. filePath: res
  551. .tempFilePath,
  552. success: (re) => {
  553. resolve(true);
  554. }
  555. })
  556. }
  557. })
  558. }, 500)
  559. });
  560. },
  561. fail: function(e) {
  562. uni.showToast({
  563. icon: 'none',
  564. title: '获取地址失败, 请检查是否开启定位权限',
  565. duration: 5000,
  566. position:'bottom'
  567. })
  568. if (uni.getSystemInfoSync().platform == 'ios') {
  569. ctx.setFontSize(34) //字体大小
  570. ctx.fillText("时间:" + dataTime, textToWidth * 0.2, textToHeight *
  571. 0.7) // 设置字体
  572. ctx.fillText("地址:"+address, textToWidth * 0.2,
  573. textToHeight * 0.7 + 34) // 设置字体
  574. } else {
  575. ctx.setFontSize(12) //字体大小
  576. ctx.fillText("时间:" + dataTime, textToWidth * 0.2, textToHeight *
  577. 0.95) // 设置字体
  578. ctx.fillText("地址:"+address, textToWidth * 0.2,
  579. textToHeight * 0.95 + 12) // 设置字体
  580. }
  581. ctx.draw(false, () => {
  582. setTimeout(() => { //使用定时是因为制作水印需要时间,设置定时才不会出bug
  583. uni.canvasToTempFilePath({ //将画布中内容转成图片,即水印与图片合成
  584. width: ress.width / 3, // 画布宽
  585. height: ress.height / 3, // 画布高
  586. canvasId: 'firstCanvas',
  587. success: (res) => {
  588. list[index].url = res
  589. .tempFilePath
  590. uni.saveImageToPhotosAlbum({ //保存到手机
  591. filePath: res
  592. .tempFilePath,
  593. success: (re) => {
  594. resolve(true);
  595. }
  596. })
  597. }
  598. })
  599. }, 500)
  600. });
  601. }
  602. });
  603. }
  604. })
  605. })
  606. }
  607. }
  608. };
  609. </script>
  610. <style scoped lang="scss">
  611. .basic {
  612. width: 94%;
  613. margin: 10rpx auto;
  614. display: flex;
  615. justify-content: space-between;
  616. }
  617. .basic>view {
  618. margin-bottom: 10rpx;
  619. }
  620. .basic>view:nth-child(1) {
  621. color: #797979;
  622. }
  623. .license {
  624. float: left;
  625. font-size: 32rpx;
  626. }
  627. .ordertop {
  628. width: 96%;
  629. background-color: #fff;
  630. margin: 20rpx auto;
  631. border-radius: 20rpx;
  632. padding-top: 20rpx;
  633. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  634. padding-bottom: 10rpx;
  635. }
  636. .ordertop>view:nth-child(1) {
  637. width: 98%;
  638. margin-bottom: 60rpx;
  639. }
  640. .iconblue {
  641. width: 10rpx;
  642. height: 45rpx;
  643. float: left;
  644. background-color: #3a63cf;
  645. margin-right: 10rpx;
  646. }
  647. .various {
  648. float: right;
  649. width: 150rpx;
  650. border: 2rpx solid #3a63cf;
  651. text-align: center;
  652. border-radius: 100rpx;
  653. color: #3a63cf;
  654. }
  655. .line {
  656. width: 92%;
  657. margin: 0 auto;
  658. }
  659. </style>