historyDetail.vue 34 KB

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