historyDetail.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  1. <template>
  2. <view class="box">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'消费明细'" ></homenav>
  4. <view class="contentBox">
  5. <view class="top" :style="{background:'#'+themeColor}">
  6. <view class="orderState">
  7. <image src="../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;">
  8. </image>
  9. <!-- <view class="SheetState" v-if="orderData.billsheet.PayState==2">已结算</view>
  10. <view class="SheetState" v-if="orderData.billsheet.PayState==0">未结算</view>
  11. -->
  12. <!-- SheetType单据类型(1维修单 2销售单3洗车单4销售退货) -->
  13. <view class="stateBox" v-if="orderData.billsheet.SheetType == 1">
  14. <!-- 0待施工(已保存)1施工中(已派工)2已完工 3已质检 4 已作废 -->
  15. <view class="SheetState" v-if="orderData.billsheet.SheetState == 0">待施工</view>
  16. <view class="SheetState" v-if="orderData.billsheet.SheetState == 1">施工中</view>
  17. <view class="SheetState" v-if="orderData.billsheet.SheetState == 2">已完工</view>
  18. <view class="SheetState" v-if="orderData.billsheet.SheetState == 3">已质检</view>
  19. <view class="SheetState" v-if="orderData.billsheet.SheetState == 4">已作废</view>
  20. <!-- 结算状态 -->
  21. <view class="SheetState" v-if="orderData.billsheet.PayState == 0">/未结算</view>
  22. <view class="SheetState" v-if="orderData.billsheet.PayState == 2">/已结算</view>
  23. </view>
  24. <view class="stateBox" v-if="orderData.billsheet.SheetType == 2">
  25. <!-- 0待施工(已保存)1施工中(已派工)2已审核 3已质检 4 已作废 -->
  26. <view class="SheetState" v-if="orderData.billsheet.SheetState < 2 ">未审核</view>
  27. <view class="SheetState" v-if="orderData.billsheet.SheetState == 2">已审核</view>
  28. <view class="SheetState" v-if="orderData.billsheet.SheetState == 4">已作废</view>
  29. <!-- 结算状态 -->
  30. <view class="SheetState" v-if="orderData.billsheet.PayState == 0">/未结算</view>
  31. <view class="SheetState" v-if="orderData.billsheet.PayState == 2">/已结算</view>
  32. </view>
  33. <view class="stateBox" v-if="orderData.billsheet.SheetType == 3">
  34. <!-- 0待施工(已保存)1施工中(已派工)2已完工 3已质检 4 已作废 -->
  35. <view class="SheetState" v-if="orderData.billsheet.SheetState == 0">已保存</view>
  36. <view class="SheetState" v-if="orderData.billsheet.SheetState == 4">已作废</view>
  37. <!-- 结算状态 -->
  38. <view class="SheetState" v-if="orderData.billsheet.PayState == 0">/未结算</view>
  39. <view class="SheetState" v-if="orderData.billsheet.PayState == 2">/已结算</view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="shopBox2">
  44. <view class="newboxTop">
  45. <view class="newline1">{{orderData.billsheet.CustomerName}}</view>
  46. <view class="newline1" style="padding-left: 20rpx;">{{orderData.billsheet.PlateNumber}}</view>
  47. </view>
  48. <view class="CarModel" v-if="orderData.billsheet.CarModel">{{orderData.billsheet.CarModel}}</view>
  49. <view class="informationLine" >
  50. <view class="informationTxt">进店里程:</view>
  51. <view class="informationNum" v-if="orderData.billsheet.CurrentMileage>0">
  52. {{orderData.billsheet.CurrentMileage}}km
  53. </view>
  54. </view>
  55. <view class="informationLine" >
  56. <view class="informationTxt">建议下次保养里程:</view>
  57. <view class="informationNum" v-if="orderData.billsheet.NextCareMilage">
  58. {{orderData.billsheet.NextCareMilage}}km
  59. </view>
  60. </view>
  61. <view class="informationLine" v-if="orderData.billsheet.SheetType==1">
  62. <view class="informationTxt">建议下次保养时间:</view>
  63. <view class="informationNum" v-if="orderData.billsheet.NextCareDate">
  64. {{orderData.billsheet.NextCareDate.slice(0,10)}}
  65. </view>
  66. </view>
  67. <view class="baoyangtis">建议下次保养,里程或日期,先到为准</view>
  68. </view>
  69. <!-- 店铺信息 -->
  70. <view class="shopBox">
  71. <image src="../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
  72. <view class="shopCont">
  73. <view class="shopName">{{orderData.billsheet.ShopName}}</view>
  74. <view class="Address" v-if="orderData.billsheet.shopMobilePhone">服务电话:{{orderData.billsheet.shopMobilePhone}}</view>
  75. <view class="Address">{{orderData.billsheet.Address}}</view>
  76. </view>
  77. <view class="shopRightBox" @click="map">
  78. <image src="../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
  79. <view class="shopRihgtTxt">地图</view>
  80. </view>
  81. <view class="shopsx"></view>
  82. <view class="shopRightBox" @click="call">
  83. <image src="../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
  84. <view class="shopRihgtTxt">电话</view>
  85. </view>
  86. </view>
  87. <!-- 订单信息 -->
  88. <view class="information">
  89. <view class="carMes">
  90. <view class="plate">{{orderData.billsheet.time}}</view>
  91. </view>
  92. <view class="informationLine">
  93. <view class="informationTxt">单号:</view>
  94. <view class="informationNum">{{orderData.billsheet.Code}}</view>
  95. </view>
  96. <view class="informationLine">
  97. <view class="informationTxt">服务顾问:</view>
  98. <view class="informationNum">{{orderData.billsheet.PickName}}</view>
  99. </view>
  100. <view class="informationLine">
  101. <view class="informationTxt">技师:</view>
  102. <view class="informationNum">{{orderData.billsheet.workNames}}</view>
  103. </view>
  104. <!-- <view class="informationLine">
  105. <view class="informationTxt">手机号:</view>
  106. <view class="informationNum">{{orderData.billsheet.MobilePhone}}</view>
  107. </view> -->
  108. <!-- <view class="informationLine">
  109. <view class="informationTxt">接车时间:</view>
  110. <view class="informationNum">{{orderData.billsheet.time}}</view>
  111. </view> -->
  112. <view class="informationLine" v-if="FaultDescription">
  113. <view class="informationTxt">故障描述:</view>
  114. <view class="informationNum" v-if="orderData.billsheet.FaultDescription">
  115. {{orderData.billsheet.FaultDescription}}
  116. </view>
  117. </view>
  118. <view class="informationLine" v-if="RepairDescription">
  119. <view class="informationTxt">维修建议:</view>
  120. <view class="informationNum" v-if="orderData.billsheet.RepairDescription">
  121. {{orderData.billsheet.RepairDescription}}
  122. </view>
  123. </view>
  124. <!-- <view class="informationLine" >
  125. <view class="informationTxt">保养技师:</view>
  126. <view class="informationNum" v-if="orderData.billsheet.workNames">
  127. {{orderData.billsheet.workNames}}
  128. </view>
  129. </view> -->
  130. <view class="informationLine" v-if="Comment">
  131. <view class="informationTxt">备注:</view>
  132. <view class="informationNum" v-if="orderData.billsheet.Comment">{{orderData.billsheet.Comment}}
  133. </view>
  134. </view>
  135. </view>
  136. <!-- 项目明细 -->
  137. <view class="detailedBox itemBox" v-if=" orderData.listItems.length!=0">
  138. <view class="detailedTitle">项目</view>
  139. <view class="detailedLineBox">
  140. <view class="detailedLine" v-for="(item,index) in orderData.listItems">
  141. <view style="display: flex;justify-content: space-between;">
  142. <view class="detailedName"><span v-if="item.CardDetailID" class="kaColor">卡</span>{{item.ItemName}}
  143. </view>
  144. <view class="price" v-if="ItemMoney">
  145. <span>¥</span>
  146. {{item.AmountMoney?item.AmountMoney:0}}
  147. </view>
  148. </view>
  149. <view class="secondBox" v-if="ItemComment" :class="{noLine:index == orderData.listItems.length-1}">
  150. <view class="comment" >{{item.Comment}}</view>
  151. <view class="secondRight">
  152. <!-- <view class="grayPrice">¥{{item.CheckOutTaxRate}}</view> -->
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <!-- 商品明细-->
  159. <view class="detailedBox itemBox" v-if="orderData.listParts.length!=0">
  160. <view class="detailedTitle">商品</view>
  161. <view class="detailedLineBox">
  162. <view class="detailedLine" v-for="(item,index) in orderData.listParts">
  163. <view class="goodTop">
  164. <view class="detailedName"><span v-if="item.CardDetailID"
  165. class="kaColor">卡</span>{{item.Brand}} {{item.GoodsName}}</view>
  166. <view class="qty">x{{item.SaleQty}}</view>
  167. </view>
  168. <view class="secondBox" :class="{noLine:index == orderData.listParts.length-1}">
  169. <view class="comment" v-if="GoodsComment">{{item.Comment}}</view>
  170. <view class="secondRight">
  171. <!-- <view class="grayPrice">¥{{item.CheckOutTaxRate}}</view> -->
  172. <view class="price" v-if="ItemMoney">
  173. <span>¥</span>
  174. {{item.AmountMoney?item.AmountMoney:0}}
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. <!-- 费用明细 -->
  182. <view class="goodscost"
  183. v-if="AmountMoney || TotalDiscountMoney || CardMoneyT || CardMoneyC || ReceiptsMoney">
  184. <view class="detailedTitle">费用明细</view>
  185. <view class="goodscostLine" v-if="AmountMoney">
  186. <view class="goodscostTxt">应收总计</view>
  187. <view class="goodsCostNum">¥{{orderData.billsheet.AmountMoney?orderData.billsheet.AmountMoney:0}}</view>
  188. </view>
  189. <view class="goodscostLine" v-if="TotalDiscountMoney">
  190. <view class="goodscostTxt">优惠总计</view>
  191. <view class="goodsCostNum">¥{{orderData.billsheet.TotalDiscountMoney?orderData.billsheet.TotalDiscountMoney:0}}</view>
  192. </view>
  193. <view class="goodscostLine" v-if="CardMoneyT">
  194. <view class="goodscostTxt">计次卡冲销</view>
  195. <view class="goodsCostNum">¥{{orderData.billsheet.CardMoneyT?orderData.billsheet.CardMoneyT:0}}</view>
  196. </view>
  197. <view class="goodscostLine" v-if="CardMoneyC">
  198. <view class="goodscostTxt">储值卡冲销</view>
  199. <view class="goodsCostNum">¥{{orderData.billsheet.CardMoneyCWriteOff?orderData.billsheet.CardMoneyCWriteOff:0}}</view>
  200. </view>
  201. <view class="goodscostLine" v-if="ReceiptsMoney">
  202. <view class="goodscostTxt">支付金额</view>
  203. <view class="goodsCostNum">¥{{orderData.billsheet.money?orderData.billsheet.money:0}}</view>
  204. </view>
  205. <view class="goodscostLine" >
  206. <view class="goodscostTxt">结算方式</view>
  207. <view class="goodsCostNumJsfs" style="color: #333333;">{{orderData.billsheet.lastPayMethod?orderData.billsheet.lastPayMethod:''}}</view>
  208. </view>
  209. </view>
  210. <!-- 手机号授权 -->
  211. <view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
  212. <view class="authorizCont" @click.stop="">
  213. <view class="authorizName">{{wxOpenData.miniAppName}}</view>
  214. <view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
  215. <button class="authorizContbutton" type="default" open-type="getPhoneNumber"
  216. @getphonenumber="decryptPhoneNumber">授权</button>
  217. </view>
  218. <view style="text-align: center;padding-top: 56rpx;">
  219. <image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
  220. </view>
  221. </view>
  222. </view>
  223. <view v-if="appraise == true && orderData.billsheet.PayState == 2" class="bottom">
  224. <view
  225. v-if="(orderData.billsheet.EvaluateState == 0) && (lastDay <= 30) && appraise == true && orderData.billsheet.PayState == 2"
  226. @click.stop="goAppraise()" class="ping">评价</view>
  227. <view v-if="orderData.billsheet.EvaluateState == 1" @click.stop="goAppraiseDetail()" class="kan">查看评价</view>
  228. </view>
  229. </view>
  230. </template>
  231. <script>
  232. import homenav from "../../components/homenav/nav.vue"
  233. export default {
  234. components: {
  235. homenav
  236. },
  237. data() {
  238. return {
  239. location: '',
  240. id: '',
  241. orderData: '',
  242. themeColor: '',
  243. authorizShow: false,
  244. userInfo: '',
  245. ext: '',
  246. wxOpenData: '',
  247. appraise: false,
  248. lastDay: '',
  249. // 权限
  250. FaultDescription: false, //故障描述
  251. RepairDescription: false, //维修建议
  252. Comment: false, //备注
  253. ItemMoney: false, //项目、商品金额
  254. ItemComment: false, //项目备注
  255. GoodsComment: false, //商品备注
  256. AmountMoney: false, //应收总计
  257. TotalDiscountMoney: false, //优惠总计
  258. CardMoneyT: false, //计次卡冲销
  259. CardMoneyC: false, //储值卡冲销
  260. ReceiptsMoney: false, //支付金额
  261. iStatusBarHeight:'',
  262. }
  263. },
  264. onLoad(opt) {
  265. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  266. this.id = opt.id
  267. this.themeColor = uni.getStorageSync("themeColor");
  268. this.userInfo = this.$store.state.userInfo;
  269. this.ext = this.$common.getExtStoreId();
  270. if (this.userInfo) {
  271. this.getData()
  272. } else {
  273. this.$common.automaticlogin().then(val => {
  274. this.userInfo = this.$store.state.userInfo;
  275. this.wxOpenData = this.$store.state.wxOpenData;
  276. this.themeColor = uni.getStorageSync("themeColor");
  277. this.getData()
  278. if(!this.userInfo){
  279. this.authorizShow=true
  280. }
  281. })
  282. }
  283. this.myPower();
  284. this.showPower();
  285. },
  286. methods: {
  287. //显示权限
  288. showPower() {
  289. this.$http('openweiXinCardInfoController/getShowSetting', {
  290. }, 'GET').then(res => {
  291. // 权限
  292. // FaultDescription:false,//故障描述
  293. // RepairDescription:false,//维修建议
  294. // Comment:false,//备注
  295. // ItemMoney:false,//项目、商品金额
  296. // ItemComment:false,//项目备注
  297. // GoodsComment:false,//商品备注
  298. // AmountMoney:false,//应收总计
  299. // TotalDiscountMoney:false,//优惠总计
  300. // CardMoneyT:false,//计次卡冲销
  301. // CardMoneyC:false,//储值卡冲销
  302. // ReceiptsMoney:false,//支付金额
  303. var list = res.data
  304. list.forEach((item, index) => {
  305. if (item.fieldValue == 'FaultDescription') {
  306. this.FaultDescription = item.isChecked
  307. }
  308. if (item.fieldValue == 'RepairDescription') {
  309. this.RepairDescription = item.isChecked
  310. }
  311. if (item.fieldValue == 'Comment') {
  312. this.Comment = item.isChecked
  313. }
  314. if (item.fieldValue == 'ItemMoney') {
  315. this.ItemMoney = item.isChecked
  316. }
  317. if (item.fieldValue == 'ItemComment') {
  318. this.ItemComment = item.isChecked
  319. }
  320. if (item.fieldValue == 'GoodsComment') {
  321. this.GoodsComment = item.isChecked
  322. }
  323. if (item.fieldValue == 'AmountMoney') {
  324. this.AmountMoney = item.isChecked
  325. }
  326. if (item.fieldValue == 'CardMoneyT') {
  327. this.CardMoneyT = item.isChecked
  328. }
  329. if (item.fieldValue == 'CardMoneyC') {
  330. this.CardMoneyC = item.isChecked
  331. }
  332. if (item.fieldValue == 'ReceiptsMoney') {
  333. this.ReceiptsMoney = item.isChecked
  334. }
  335. if (item.fieldValue == 'TotalDiscountMoney') {
  336. this.TotalDiscountMoney = item.isChecked
  337. }
  338. })
  339. })
  340. },
  341. //评价权限
  342. myPower() {
  343. this.$http('openMiniEvaluate/getEvaluateSetting', {
  344. }, 'GET').then(res => {
  345. // var list = res.data.Items
  346. this.appraise = res.data
  347. })
  348. },
  349. goAppraiseDetail(item) {
  350. uni.navigateTo({
  351. url: 'myAppraiseDetail?sheetId=' + this.orderData.billsheet.id
  352. })
  353. },
  354. goAppraise(item) {
  355. uni.navigateTo({
  356. url: 'appraise?sheetID=' + this.orderData.billsheet.id + '&shopID=' + this.orderData.billsheet
  357. .shopID
  358. })
  359. },
  360. decryptPhoneNumber: function(e) {
  361. console.log(e);
  362. this.code = e.detail.code
  363. this.wxPhoneLogin()
  364. this.authorizShow = false;
  365. },
  366. wxPhoneLogin() {
  367. var that = this;
  368. this.$http('miniApp2/sys/wxPhoneLogin', {
  369. appId: this.ext.appId,
  370. unionId: this.ext.unionId,
  371. code: this.code,
  372. openId: this.wxOpenData.openid
  373. }, 'POST').then(res => {
  374. var data = res.data;
  375. if(data.newCustomer){
  376. uni.showModal({
  377. title: '提示',
  378. content: data.newCustomerMsg,
  379. success: function(resTK) {
  380. }
  381. });
  382. var token=res.data.token
  383. data.loginInfo={}
  384. data.loginInfo.token=token
  385. this.$store.commit('mutationswxOpenData', data);
  386. return false;
  387. }
  388. if (data.loginInfo) {
  389. this.userInfo = data.loginInfo.openUser;
  390. this.wxOpenData = data.loginInfo;
  391. this.$store.commit('mutationswxOpenData', data)
  392. this.$store.commit('mutationsuserInfo', this.userInfo)
  393. this.getData()
  394. }
  395. })
  396. },
  397. map() {
  398. console.log("打开地图")
  399. var that = this;
  400. if (!that.orderData.billsheet.lat || !that.orderData.billsheet.lng) {
  401. uni.showToast({
  402. title: '该店铺未设置定位',
  403. icon: 'none',
  404. duration: 3000
  405. });
  406. } else {
  407. uni.openLocation({
  408. latitude: Number(that.orderData.billsheet.lat),
  409. longitude: Number(that.orderData.billsheet.lng),
  410. name: that.orderData.billsheet.ShopName,
  411. address: that.orderData.billsheet.Address,
  412. success: function() {
  413. console.log('success');
  414. },
  415. fail(err) {
  416. console.log(err)
  417. }
  418. });
  419. }
  420. },
  421. call() {
  422. uni.makePhoneCall({
  423. phoneNumber: this.orderData.billsheet.shopMobilePhone
  424. });
  425. },
  426. getData() {
  427. let that = this
  428. uni.showLoading({
  429. title: '加载中'
  430. });
  431. this.$http('openweiXinCardInfoController/queryConsumptionDetail', {
  432. // lat: this.location.lat,
  433. // lng: this.location.lng,
  434. id: this.id,
  435. }, 'POST').then(res => {
  436. uni.hideLoading();
  437. this.orderData = res.data;
  438. console.log('data===', this.orderData);
  439. })
  440. },
  441. //时间对比
  442. getDateBeforeNow(stringTime) {
  443. console.log("传参未格式化", stringTime);
  444. stringTime = new Date(stringTime.replace(/-/g, '/'))
  445. // 统一单位换算
  446. var minute = 1000 * 60;
  447. var hour = minute * 60;
  448. var day = hour * 24;
  449. var week = day * 7;
  450. var month = day * 30;
  451. var year = month * 12;
  452. var time1 = new Date().getTime(); //当前的时间戳 console.log("当前时间", time1);
  453. // 对时间进行毫秒单位转换 var time2 = new Date(stringTime).getTime(); //指定时间的时间戳
  454. console.log("传过来的时间", time2);
  455. var time = time1 - time2;
  456. console.log("计算后的时间", time);
  457. var result =
  458. null; // if (time < 0) { // // alert("传过来的时间的时间不能晚于当前时间!"); // result = stringTime; // } else if (time / year >= 1) {
  459. // result = parseInt(time / year) + "年前";
  460. // } else if (time / month >= 1) {
  461. // result = parseInt(time / month) + "月前";
  462. // } else if (time / week >= 1) { // result = parseInt(time / week) + "周前"; // } else if (time / day >= 1) {
  463. // result = parseInt(time / day) + "天前";
  464. // } else if (time / hour >= 1) { // result = parseInt(time / hour) + "小时前";
  465. // } else if (time / minute >= 1) {
  466. // result = parseInt(time / minute) + "分钟前"; // } else {
  467. // result = "刚刚"; // }
  468. if (time < 0) {
  469. // alert("传过来的时间的时间不能晚于当前时间!");
  470. result = -1;
  471. } else if (time / day >= 0) {
  472. result = parseInt(time / day); //多少天前
  473. }
  474. console.log("多少天前", result);
  475. return result;
  476. },
  477. goback() {
  478. uni.navigateBack({})
  479. },
  480. },
  481. onPullDownRefresh() {
  482. this.getData()
  483. setTimeout(function() {
  484. uni.stopPullDownRefresh();
  485. }, 1000);
  486. },
  487. }
  488. </script>
  489. <style scoped>
  490. .newboxTop{
  491. display: flex;
  492. padding-left: 20rpx;
  493. font-size: 30rpx;
  494. border-bottom: 1rpx solid #EEEEEE;
  495. font-weight: bold;
  496. padding-bottom: 15rpx;
  497. }
  498. .baoyangtis{
  499. font-size: 26rpx;
  500. padding-left: 20rpx;
  501. }
  502. .CarModel{
  503. font-size: 26rpx;
  504. padding: 15rpx 20rpx;
  505. }
  506. .baoyangtis{
  507. padding: 15rpx 20rpx 0 15rpx;
  508. }
  509. .box {
  510. min-height: 100vh;
  511. background: #F4F5F7;
  512. padding-bottom: constant(safe-area-inset-bottom);
  513. padding-bottom: env(safe-area-inset-bottom);
  514. }
  515. .contentBox {
  516. background: #F4F5F7;
  517. padding-bottom: 100rpx;
  518. }
  519. .top {
  520. height: 190rpx;
  521. background: #FF0000;
  522. }
  523. .stateBox {
  524. display: flex;
  525. }
  526. .orderState {
  527. display: flex;
  528. justify-content: center;
  529. align-items: center;
  530. padding-top: 40rpx;
  531. }
  532. .SheetState {
  533. display: flex;
  534. justify-content: center;
  535. font-size: 36rpx;
  536. font-weight: 500;
  537. color: #FFFFFF;
  538. margin-left: 15rpx;
  539. }
  540. .timeEditImg {
  541. width: 25rpx;
  542. height: 25rpx;
  543. padding-left: 20rpx;
  544. }
  545. .shopBoximg {
  546. width: 40rpx;
  547. height: 40rpx;
  548. }
  549. .shopRightImg {
  550. width: 44rpx;
  551. height: 45rpx;
  552. }
  553. .shopsx {
  554. width: 1px;
  555. height: 50rpx;
  556. background: #EEEEEE;
  557. margin-top: 30rpx;
  558. margin-left: 28rpx;
  559. }
  560. .shopBox2{
  561. padding: 30rpx 20rpx;
  562. margin: 0rpx 24rpx;
  563. margin-top: -60rpx;
  564. background-color: #FFFFFF;
  565. border-radius: 10rpx;
  566. }
  567. .shopBox2 .informationTxt {
  568. width: 350rpx;
  569. }
  570. .shopBox {
  571. display: flex;
  572. padding: 30rpx 20rpx;
  573. margin: 0rpx 24rpx;
  574. margin-top: 20rpx;
  575. background-color: #FFFFFF;
  576. border-radius: 10rpx;
  577. }
  578. .shopCont {
  579. width: 405rpx;
  580. padding-left: 20rpx;
  581. }
  582. .shopName {
  583. font-size: 30rpx;
  584. font-weight: bold;
  585. color: #3C3C3C;
  586. line-height: 45rpx;
  587. }
  588. .Address {
  589. color: #999999;
  590. font-size: 24rpx;
  591. margin-top: 10rpx;
  592. }
  593. .shopRihgtTxt {
  594. color: #999999;
  595. font-size: 24rpx;
  596. }
  597. .shopRightBox {
  598. padding-left: 28rpx;
  599. }
  600. .peopleCont {
  601. font-size: 28rpx;
  602. color: #3C3C3C;
  603. padding-left: 20rpx;
  604. }
  605. .people {
  606. display: flex;
  607. padding-left: 20rpx;
  608. padding-top: 30rpx;
  609. padding-bottom: 36rpx;
  610. }
  611. .PlateNumberBox {
  612. display: flex;
  613. padding-left: 20rpx;
  614. padding-bottom: 30rpx;
  615. }
  616. .PlateNumbercx {
  617. font-size: 28rpx;
  618. color: #3C3C3C;
  619. padding-left: 20rpx;
  620. }
  621. .PlateNumber {
  622. width: 130rpx;
  623. height: 32rpx;
  624. border-radius: 4rpx;
  625. border: 1px solid #F19D01;
  626. line-height: 32rpx;
  627. text-align: center;
  628. font-size: 22rpx;
  629. color: #F19D01;
  630. margin-left: 26rpx;
  631. }
  632. .PlateNumberBoxTop {
  633. display: flex;
  634. }
  635. .CarModel {
  636. font-size: 26rpx;
  637. color: #999999;
  638. padding-left: 20rpx;
  639. padding-top: 6rpx;
  640. padding-right: 20rpx;
  641. padding-bottom: 15rpx;
  642. width: 600rpx;
  643. }
  644. .detailedBox {
  645. background: #FFFFFF;
  646. border-radius: 10px;
  647. margin: 20rpx 24rpx;
  648. padding-bottom: 20rpx;
  649. }
  650. .itemBox {
  651. margin-top: 20rpx;
  652. }
  653. .carMes {
  654. padding: 23rpx 20rpx;
  655. display: flex;
  656. align-items: center;
  657. justify-content: flex-start;
  658. border-bottom: 1rpx solid #EEEEEE;
  659. }
  660. .plate {
  661. font-size: 30rpx;
  662. color: #3C3C3C;
  663. font-weight: bold;
  664. margin-right: 20rpx;
  665. }
  666. .mileage {
  667. font-size: 24rpx;
  668. color: #F19D01;
  669. padding: 0rpx 10rpx;
  670. border: 1rpx solid #F19D01;
  671. border-radius: 4rpx;
  672. height: 36rpx;
  673. }
  674. .detailedTitle {
  675. padding: 23rpx 20rpx;
  676. display: flex;
  677. text-align: center;
  678. align-content: flex-start;
  679. border-bottom: 1rpx solid #EEEEEE;
  680. font-size: 30rpx;
  681. font-weight: bold;
  682. color: #3C3C3C;
  683. }
  684. .detailedLine {
  685. padding: 20rpx 20rpx 0rpx;
  686. }
  687. .detailedImg {
  688. width: 120rpx;
  689. height: 120rpx;
  690. border-radius: 10rpx;
  691. }
  692. .detailedName {
  693. font-size: 26rpx;
  694. color: #3C3C3C;
  695. }
  696. .kaColor {
  697. background: #F19D01;
  698. border-radius: 4rpx;
  699. color: #FFFFFF;
  700. font-size: 24rpx;
  701. margin-right: 8rpx;
  702. padding: 3rpx 5rpx;
  703. }
  704. .qty {
  705. font-size: 24rpx;
  706. font-weight: 400;
  707. color: #999999;
  708. }
  709. .secondBox {
  710. display: flex;
  711. padding: 20rpx 0rpx;
  712. justify-content: space-between;
  713. align-items: baseline;
  714. border-bottom: 1rpx solid #EEEEEE;
  715. }
  716. .noLine {
  717. border-bottom: 0 solid #FFFFFF;
  718. }
  719. .comment {
  720. margin-right: 20rpx;
  721. font-size: 24rpx;
  722. font-weight: 400;
  723. color: #999999;
  724. flex-grow: 1;
  725. }
  726. .secondRight {
  727. display: flex;
  728. justify-content: flex-end;
  729. align-items: baseline;
  730. }
  731. .grayPrice {
  732. font-size: 24rpx;
  733. font-weight: 400;
  734. color: #999999;
  735. text-decoration: line-through;
  736. }
  737. .price {
  738. font-size: 32rpx;
  739. font-weight: 500;
  740. color: #FF0000;
  741. display: flex;
  742. align-items: center;
  743. }
  744. span {
  745. font-size: 24rpx;
  746. }
  747. .goodTop {
  748. display: flex;
  749. justify-content: space-between;
  750. }
  751. .goodscost {
  752. background: #FFFFFF;
  753. border-radius: 10px;
  754. margin: 20rpx 24rpx;
  755. padding-bottom: 20rpx;
  756. }
  757. .goodscostLine {
  758. display: flex;
  759. justify-content: space-between;
  760. font-size: 26rpx;
  761. padding: 20rpx 20rpx;
  762. color: #333333;
  763. }
  764. .goodsCostNum {
  765. color: #FF0000;
  766. font-weight: bold;
  767. }
  768. .goodsCostNumJsfs{
  769. color: #333333;
  770. }
  771. .information {
  772. width: 702rpx;
  773. background: #FFFFFF;
  774. border-radius: 10px;
  775. margin-left: 24rpx;
  776. margin-top: 20rpx;
  777. padding: 0rpx 0 15rpx 0;
  778. }
  779. .informationLine {
  780. display: flex;
  781. font-size: 26rpx;
  782. padding: 15rpx 20rpx;
  783. }
  784. .informationTxt {
  785. width: 200rpx;
  786. color: #999999;
  787. }
  788. .informationNum {
  789. color: #333333;
  790. width: calc(100vw - 200rpx);
  791. }
  792. .copyBtn {
  793. width: 86rpx;
  794. height: 40rpx;
  795. background: #F4F5F7;
  796. border-radius: 20rpx;
  797. font-size: 24rpx;
  798. color: #333333;
  799. text-align: center;
  800. line-height: 40rpx;
  801. margin-left: 20rpx;
  802. }
  803. .orderBottom {
  804. width: 750rpx;
  805. height: 98rpx;
  806. background: #FFFFFF;
  807. position: fixed;
  808. left: 0;
  809. bottom: 0;
  810. display: flex;
  811. justify-content: flex-end;
  812. }
  813. .cancelBtn {
  814. width: 150rpx;
  815. height: 56rpx;
  816. border-radius: 36rpx;
  817. border: 2rpx solid #DDDDDD;
  818. text-align: center;
  819. line-height: 56rpx;
  820. font-size: 28rpx;
  821. color: #3C3C3C;
  822. margin-top: 21rpx;
  823. margin-right: 16rpx;
  824. margin-left: 20rpx;
  825. }
  826. .payBtn {
  827. width: 150rpx;
  828. height: 56rpx;
  829. border-radius: 36rpx;
  830. border: 2rpx solid #FF4F00;
  831. text-align: center;
  832. line-height: 56rpx;
  833. font-size: 28rpx;
  834. color: #FF4F00;
  835. margin-top: 21rpx;
  836. margin-right: 16rpx;
  837. margin-left: 20rpx;
  838. }
  839. .timeBox2 {
  840. width: 100vw;
  841. height: 100vh;
  842. background: rgba(0, 0, 0, 0.5);
  843. position: fixed;
  844. top: 0;
  845. left: 0;
  846. }
  847. .timeLeftActive {
  848. background: #FFFFFF;
  849. }
  850. .timeMain {
  851. width: 100vw;
  852. height: 70vh;
  853. margin-top: 30vh;
  854. background: #FFFFFF;
  855. border-radius: 24rpx 24rpx 0px 0px;
  856. }
  857. .timesfNo {
  858. background: #F5F5F5;
  859. }
  860. .timesfActive {
  861. background: #FF4F00;
  862. }
  863. .timesfActive .timeSfNum {
  864. color: #FFFFFF;
  865. }
  866. .timesfActive .timeyy {
  867. color: #FFFFFF;
  868. }
  869. .topBox {
  870. padding: 20rpx 24rpx;
  871. }
  872. .timeTop {
  873. display: flex;
  874. line-height: 90rpx;
  875. padding-left: 24rpx;
  876. padding-right: 24rpx;
  877. justify-content: space-between;
  878. }
  879. .timeTopTitle {
  880. font-size: 30rpx;
  881. font-family: PingFangSC-Medium, PingFang SC;
  882. font-weight: 600;
  883. color: #3C3C3C;
  884. }
  885. .close {
  886. color: #999999;
  887. font-size: 30rpx;
  888. padding-left: 30rpx;
  889. }
  890. .timeCont {
  891. height: calc(70vh - 210rpx);
  892. }
  893. .timeSv {
  894. height: calc(70vh - 210rpx);
  895. }
  896. .timeLeft2 {
  897. width: 162rpx;
  898. background: #F4F5F7;
  899. border-top: 1px soid #F4F5F7;
  900. border-right: 1px soid #F4F5F7;
  901. }
  902. .timeRight2 {
  903. width: 588rpx;
  904. }
  905. .timesf {
  906. width: 165rpx;
  907. height: 98rpx;
  908. border-radius: 7rpx;
  909. border: 2rpx solid #EEEEEE;
  910. text-align: center;
  911. margin-left: 20rpx;
  912. margin-bottom: 24rpx;
  913. }
  914. .timeBottom {
  915. width: 750rpx;
  916. height: 120rpx;
  917. background: #FFFFFF;
  918. box-shadow: 0px -2px 20rpx 0px rgba(153, 153, 153, 0.2);
  919. display: flex;
  920. align-items: center;
  921. }
  922. .timerightBox {
  923. display: flex;
  924. flex-wrap: wrap;
  925. }
  926. .timeCont {
  927. display: flex;
  928. }
  929. .timeSfNum {
  930. color: #666666;
  931. font-size: 28rpx;
  932. padding-top: 15rpx;
  933. }
  934. .timeyy {
  935. font-size: 24rpx;
  936. color: #999999;
  937. }
  938. .timecomplete {
  939. width: 690rpx;
  940. height: 74rpx;
  941. background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
  942. border-radius: 37rpx;
  943. line-height: 74rpx;
  944. text-align: center;
  945. font-size: 30rpx;
  946. color: #FFFFFF;
  947. margin-left: 30rpx;
  948. }
  949. .timeleftLine {
  950. font-size: 30rpx;
  951. color: #999999;
  952. text-align: center;
  953. padding: 28rpx 10rpx;
  954. border-bottom: 1px solid #EEEEEE;
  955. }
  956. .yuyueBox {
  957. background: #FFFFFF;
  958. border-radius: 10rpx;
  959. margin-left: 24rpx;
  960. margin-right: 24rpx;
  961. }
  962. .yuyueTime {
  963. display: flex;
  964. padding-left: 20rpx;
  965. padding-top: 30rpx;
  966. padding-bottom: 36rpx;
  967. align-items: center;
  968. }
  969. .yuyueState {
  970. display: flex;
  971. padding-left: 20rpx;
  972. padding-top: 30rpx;
  973. padding-bottom: 36rpx;
  974. }
  975. .maBox {
  976. display: flex;
  977. justify-content: space-between;
  978. padding: 24rpx 20rpx;
  979. }
  980. .querenMa {
  981. margin: 20rpx 0;
  982. padding-bottom: 30rpx;
  983. }
  984. .maBoximg {
  985. width: 308rpx;
  986. height: 308rpx;
  987. margin: 30rpx 197rpx;
  988. }
  989. .rightShou {
  990. display: flex;
  991. justify-content: flex-start;
  992. align-items: center;
  993. }
  994. .authorizBox {
  995. width: 100vw;
  996. height: 100vh;
  997. background: rgba(0, 0, 0, 0.5);
  998. position: fixed;
  999. top: 0;
  1000. left: 0;
  1001. }
  1002. .authorizCont {
  1003. margin-top: 30vh;
  1004. width: 564rpx;
  1005. height: 408rpx;
  1006. background: #FFFFFF;
  1007. border-radius: 24rpx;
  1008. margin-left: 93rpx;
  1009. position: relative;
  1010. }
  1011. .authorizCloseImg {
  1012. width: 62rpx;
  1013. height: 62rpx;
  1014. }
  1015. .sqLogoBox {
  1016. width: 180rpx;
  1017. height: 180rpx;
  1018. background: #FFFFFF;
  1019. border-radius: 90rpx;
  1020. text-align: center;
  1021. position: absolute;
  1022. top: -50rpx;
  1023. left: 192rpx;
  1024. }
  1025. .authorizName {
  1026. color: #333333;
  1027. line-height: 42rpx;
  1028. font-size: 30rpx;
  1029. text-align: center;
  1030. padding-top: 58rpx;
  1031. }
  1032. .authorizMs {
  1033. color: #999999;
  1034. line-height: 36rpx;
  1035. font-size: 26rpx;
  1036. width: 452rpx;
  1037. padding-top: 24rpx;
  1038. text-align: center;
  1039. margin-left: 56rpx;
  1040. }
  1041. .authorizContbutton {
  1042. width: 422rpx;
  1043. height: 88rpx;
  1044. background: #D53533;
  1045. border-radius: 44rpx;
  1046. line-height: 88rpx;
  1047. text-align: center;
  1048. font-size: 30rpx;
  1049. color: #FFFFFF;
  1050. margin-top: 62rpx;
  1051. margin-left: 71rpx;
  1052. }
  1053. .bottom {
  1054. position: fixed;
  1055. width: 100%;
  1056. padding: 20rpx 24rpx;
  1057. right: 0;
  1058. bottom: 0;
  1059. background: #ffffff;
  1060. font-size: 28rpx;
  1061. display: flex;
  1062. justify-content: flex-end;
  1063. height: 58rpx;
  1064. padding-bottom: constant(safe-area-inset-bottom);
  1065. padding-bottom: env(safe-area-inset-bottom);
  1066. }
  1067. .ping {
  1068. text-align: center;
  1069. color: #FF4F00;
  1070. width: 150rpx;
  1071. height: 56rpx;
  1072. line-height: 56rpx;
  1073. border-radius: 36rpx;
  1074. border: 2rpx solid #FF4F00;
  1075. }
  1076. .kan {
  1077. text-align: center;
  1078. color: #3C3C3C;
  1079. width: 150rpx;
  1080. height: 56rpx;
  1081. line-height: 56rpx;
  1082. border-radius: 36rpx;
  1083. border: 2rpx solid #DDDDDD;
  1084. }
  1085. </style>