maintain.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502
  1. <template>
  2. <view>
  3. <view class="top">
  4. <view class="topLeft">
  5. <image :src="maintainCarData.brandLogo" mode="aspectFit" class="brandLogo"></image>
  6. <view class="carName">{{maintainCarData.brand}}-{{maintainCarData.series}}</view>
  7. <image src="../../static/img/icon_edit.png" mode="" class="topEdit" @click="carEdit"></image>
  8. </view>
  9. <view class="topRight">
  10. <input type="number" v-model="maintainCarData.milage" @confirm="upMileage" value="" placeholder="请输入当前里程" class="topInput" placeholder-style="color:#ffffff;"/>
  11. <image src="../../static/img/icon_edit.png" mode="" class="topEdit" @click="milageEdit"></image>
  12. </view>
  13. </view>
  14. <!-- 保养推荐 -->
  15. <view class="maintainrecommend">
  16. <view class="recommendTxt">保养推荐</view>
  17. <view class="manual" @click="handbook()">保养手册</view>
  18. </view>
  19. <!--主体 -->
  20. <view class="main">
  21. <view class="mainLeft">
  22. <scroll-view scroll-y="true" class="mainscrollView">
  23. <view class="mainLeftLine" v-for="(item,index) in mealData" :class="{lineLeftActive:leftIndex==index}"
  24. @click="leftClick(item,index)">
  25. <span>{{item.name}}</span>
  26. <view class="lineNum" v-show="item.num!=0">{{item.num}}</view>
  27. </view>
  28. </scroll-view>
  29. </view>
  30. <view class="mainRight">
  31. <scroll-view scroll-y="true" class="mainscrollView">
  32. <view v-show="mealData[leftIndex].listPackage.length==0">
  33. <view class="nodataBox">
  34. <image src="../../static/img/nodata.png" mode="widthFix" class="nodataImg"></image>
  35. <view class="noTxt">暂无数据</view>
  36. </view>
  37. </view>
  38. <view class="mainRightLine" v-for="(item,index) in mealData[leftIndex].listPackage">
  39. <view class="contTop">
  40. <view class="contTopLeft">
  41. <view class="listPackgeName"> {{item.name}} </view>
  42. <view class="listPackgeMs">
  43. <span v-if="item.referenceDosageQty">{{item.referenceDosage}}</span>
  44. </view>
  45. </view>
  46. <view class="contTopRight" @click="listcheck(item)">
  47. <image src="../../static/img/login_icon_checked.png" mode="" class="imgPrivacy" v-show="item.planItem"></image>
  48. <image src="../../static/img/login_icon_uncheck.png" mode="" class="imgPrivacy" v-show="!item.planItem"></image>
  49. <!-- <view class="nock" v-show="!item.check"></view> -->
  50. </view>
  51. </view>
  52. <view class="contZk">
  53. <view class="contZkMain" v-show="item.planItem">
  54. <view v-for="(vf,findex) in item.listGoodsAll">
  55. <view class="goodsItemLIne" v-for="(v,i) in vf.goodsList" v-if="i==0" @click="goGoods(v)">
  56. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  57. <image src="../../static/img/noimg.png" mode="" class="goodsImg sm" v-else></image>
  58. <view class="goodsCont">
  59. <view class="goodsContTop">
  60. <view class="goodsItemName">{{v.showName}}</view>
  61. <view class="replaceBox" @click.stop="replace(vf,index,findex,i)">
  62. <view class="replace" v-if="vf.goodsList.length>1&&!v.gh">更换</view>
  63. </view>
  64. </view>
  65. <view class="goodsCOntBOttom">
  66. <view class="salePrice">¥{{v.salePrice?v.salePrice:'-'}}</view>
  67. <view class="as">
  68. <view class="asa" @click.stop="reduce(v)">-</view>
  69. <view class="asNum">{{v.qty}}</view>
  70. <view class="asa" @click.stop="plus(v)">+</view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="goodsItemLIne" v-for="(v,i) in item.listItem" >
  77. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  78. <image src="../../static/img/icon_xiangmu.png" mode="" class="goodsImg sm" v-else></image>
  79. <view class="goodsCont">
  80. <view class="goodsContTop">
  81. <view class="goodsItemName">{{v.itemName}}</view>
  82. </view>
  83. <view class="goodsCOntBOttom">
  84. <view class="salePrice" >¥{{v.salePrice?v.salePrice:'-'}}</view>
  85. <view class="itemNum">x1</view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view style="height: 100rpx;"></view>
  93. </scroll-view>
  94. </view>
  95. </view>
  96. <!-- 底部 -->
  97. <view class="bottom">
  98. <view class="bottomLeft">
  99. <view class="caidan" @click="caidanClick">
  100. <image src="../../static/img/caidan.png" mode="" class="caidanImg"></image>
  101. <view class="total" v-show="total>0">{{total}}</view>
  102. </view>
  103. <view>
  104. <view class="heji"> <span class="heji1">合计</span> <span class="hejiNum">¥{{totalhj}}</span> </view>
  105. <view class="hejiMs">商品¥{{goodsTotal}}+工时费¥{{salePriceTotal}}</view>
  106. </view>
  107. </view>
  108. <view class="settlement" @click="settlement">去选店</view>
  109. </view>
  110. <view class="caidanTk" v-show="qingdanShow" @click="qingdanShow=false">
  111. <view class="tkCont">
  112. <view class="caidanTkTop">
  113. <view class="tkTopTitle">清单</view>
  114. <view class="topTopright">
  115. <view class="empty" @click.stop="empty">清空</view>
  116. <view class="close" @click="qingdanShow=false">X</view>
  117. </view>
  118. </view>
  119. <view class="tkMain" @click.stop>
  120. <scroll-view scroll-y="true" class="tkMainSv">
  121. <view class="qingdanLine" v-for="(item,index) in orderData">
  122. <view class="mainTitle">{{item.name}}</view>
  123. <view class="goodsItem" v-for="(v,i) in item.listGoodsAll">
  124. <view >
  125. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  126. <image src="../../static/img/noimg.png" mode="" class="goodsImg " v-else></image>
  127. </view>
  128. <view class="goodsItemRight" >
  129. <view class="goodsItemName">{{v.showName}}</view>
  130. <view class="goodsItemBottom">
  131. <view class="goodssalePrice">¥{{v.salePrice?v.salePrice:'-'}}</view>
  132. <view class="goodsNum">x{{v.qty}}</view>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="goodsItem" v-for="(v,i) in item.listItem">
  137. <view>
  138. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  139. <image src="../../static/img/icon_xiangmu.png" mode="" class="goodsImg " v-else></image>
  140. </view>
  141. <view class="goodsItemRight" >
  142. <view class="goodsItemName">{{v.itemName}}</view>
  143. <view class="goodsItemBottom">
  144. <view class="goodssalePrice">¥{{v.salePrice?v.salePrice:'-'}}</view>
  145. <view class="goodsNum">x{{v.qty}}</view>
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. <view class="ckBottom"></view>
  151. </scroll-view>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. </template>
  157. <script>
  158. export default {
  159. data() {
  160. return {
  161. maintainCarData:'',
  162. shopData:'',
  163. mealData:'',
  164. leftIndex:0,
  165. total:0,
  166. qingdanShow:false,
  167. totalhj:0,
  168. goodsTotal:0,
  169. salePriceTotal:0,
  170. orderData:[],
  171. replaceIndex1:'',
  172. replaceIndex2:'',
  173. brand:'',
  174. isNull:true,
  175. }
  176. },
  177. onLoad(opt) {
  178. this.$common.isUserId()
  179. this.maintainCarData=uni.getStorageSync("maintainCarData");
  180. //console.log(this.maintainCarData)
  181. this.shopData=uni.getStorageSync("shopData");
  182. if(this.maintainCarData.milage==0){
  183. this.maintainCarData.milage='';
  184. }
  185. if (opt.brand) {
  186. this.brand = opt.brand
  187. }
  188. this.getData();
  189. },
  190. onShow() {
  191. var maintainCarData2=uni.getStorageSync("maintainCarData");
  192. if(this.maintainCarData.id!=maintainCarData2.id){
  193. this.maintainCarData=maintainCarData2;
  194. if(this.maintainCarData.milage==0){
  195. this.maintainCarData.milage='';
  196. }
  197. this.getData();
  198. }
  199. var replaceData=uni.getStorageSync("replaceData");
  200. if(replaceData){
  201. //replaceData.qty=1;
  202. console.log(replaceData)
  203. //console.log(this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll.goodsList[this.replaceIndex2])
  204. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList.unshift(replaceData)
  205. //console.log(this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll.goodsList[this.replaceIndex2])
  206. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList=this.unique(this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList)
  207. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList[0].del=false;
  208. //this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2]=replaceData
  209. //this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsName='666'
  210. //console.log(this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2])
  211. this.$forceUpdate()
  212. this.newData()
  213. }
  214. },
  215. methods: {
  216. unique(arr1) {
  217. const res = new Map();
  218. return arr1.filter((a) => !res.has(a.goodsID) && res.set(a.goodsID, 1))
  219. },
  220. upMileage(){
  221. this.getData();
  222. this.$http('worldKeepCar/worldHome/updateTMemberCarByHome', {
  223. id: this.maintainCarData.id,
  224. milage: this.maintainCarData.milage?this.maintainCarData.milage:0,
  225. }, 'POST').then(res => {
  226. uni.hideLoading();
  227. console.log(res);
  228. if (res.code == 0) {
  229. var cardata = uni.getStorageSync("maintainCarData")
  230. if (cardata) {
  231. cardata.milage = this.maintainCarData.milage
  232. uni.setStorage({
  233. key: 'maintainCarData',
  234. data: cardata,
  235. success: function () {
  236. }
  237. });
  238. }
  239. }
  240. })
  241. },
  242. // milageEditconfirm(){
  243. // this.getData();
  244. // var that=this;
  245. // for(let k in this.maintainCarData){this.maintainCarData[k] = this.maintainCarData[k]==null?'':this.maintainCarData[k]}
  246. // this.$http('miniAppMyBMemberCar/updateMemberCar',this.maintainCarData,'POST').then(res => {
  247. // uni.hideLoading();
  248. // uni.setStorage({
  249. // key: 'maintainCarData',
  250. // data: that.maintainCarData,
  251. // success: function () {
  252. // /* uni.navigateBack({
  253. // delta:1
  254. // }) */
  255. // }
  256. // });
  257. // })
  258. // },
  259. leftClick(item,index){
  260. this.leftIndex=index
  261. },
  262. listcheck(item){
  263. item.planItem=!item.planItem;
  264. //var
  265. if(this.mealData[this.leftIndex].name=='小保养'){
  266. this.calculation('大保养');
  267. }else if(this.mealData[this.leftIndex].name=='大保养'){
  268. this.calculation('小保养');
  269. }else{
  270. this.calculation();
  271. }
  272. if(item.planItem){
  273. /* this.orderData.push(item) */
  274. }
  275. },
  276. goGoods(item){
  277. /* uni.navigateTo({
  278. url:'../module/goodsDetail?goodsId='+item.goodsID+'&type=1'+'&typeIndex=2&maintain=1'
  279. }) */
  280. },
  281. empty(){
  282. var that=this;
  283. uni.showModal({
  284. title: '提示',
  285. content: '确定要清空清单吗',
  286. success: function (res) {
  287. if (res.confirm) {
  288. that.orderData=[];
  289. that.mealData.forEach(item=>{
  290. item.num=0;
  291. if(item.listPackage){
  292. item.listPackage.forEach(v=>{
  293. v.planItem=false
  294. })
  295. }
  296. })
  297. console.log(that.mealData)
  298. that.calculation();
  299. that.qingdanShow=false;
  300. }
  301. }
  302. });
  303. },
  304. calculation(txt){
  305. this.isNull=true
  306. this.total=0;
  307. this.totalhj=0;
  308. this.goodsTotal=0;
  309. this.salePriceTotal=0;
  310. this.orderData=[]
  311. this.mealData.forEach(v=>{
  312. v.num=0;
  313. if(txt == v.name){
  314. console.log(v.name)
  315. if(v.listPackage){
  316. v.listPackage.forEach(i=>{
  317. i.planItem=false
  318. })
  319. }
  320. }else{
  321. if(v.listPackage){
  322. v.listPackage.forEach(i=>{
  323. if(i.planItem){
  324. var obj={
  325. listGoodsAll:[],
  326. listItem:'',
  327. id:i.id,
  328. name:i.name
  329. }
  330. if(i.listGoodsAll.length>0){
  331. i.listGoodsAll.forEach((goods,goodsIndex)=>{
  332. console.log(goods.goodsGroupDetail)
  333. /* goods.forEach(sp=>{
  334. this.goodsTotal=Number(this.goodsTotal)
  335. this.goodsTotal+=sp.salePrice*sp.qty
  336. this.goodsTotal=this.goodsTotal.toFixed(2)
  337. })
  338. //goods[0].salePrice=1;*/
  339. this.goodsTotal=Number(this.goodsTotal)
  340. if(!isNaN(goods.goodsList[0].salePrice)){
  341. this.goodsTotal+=goods.goodsList[0].salePrice*goods.goodsList[0].qty
  342. this.goodsTotal=this.goodsTotal.toFixed(2)
  343. }else{
  344. this.isNull=false
  345. }
  346. if(goods.goodsList[0].salePrice==null){
  347. this.isNull=false
  348. }
  349. obj.listGoodsAll.push(goods.goodsList[0])
  350. })
  351. }
  352. if(i.listItem.length>0){
  353. obj.listItem=i.listItem
  354. }
  355. this.orderData.push(obj)
  356. v.num++;
  357. this.total++;
  358. i.listItem.forEach(xm=>{
  359. xm.qty=1;
  360. if(!isNaN(xm.salePrice)){
  361. this.salePriceTotal=Number(this.salePriceTotal)
  362. this.salePriceTotal+=xm.salePrice
  363. this.salePriceTotal=this.salePriceTotal.toFixed(2)
  364. }else{
  365. this.isNull=false
  366. }
  367. if(xm.salePrice==null){
  368. this.isNull=false
  369. }
  370. //xm.salePrice=1;
  371. })
  372. //this.totalhj
  373. }
  374. })
  375. }
  376. }
  377. //if(v.listPackage)
  378. })
  379. this.totalhj=Number(this.goodsTotal)+Number(this.salePriceTotal)
  380. this.totalhj=this.totalhj.toFixed(2)
  381. console.log(this.orderData)
  382. },
  383. reduce(v){
  384. console.log(v)
  385. if(v.qty>1){
  386. v.qty--;
  387. this.calculation()
  388. }else if(v.del){
  389. if(v.qty>0){
  390. v.qty--;
  391. this.calculation()
  392. }
  393. }
  394. },
  395. plus(v){
  396. v.qty++;
  397. this.calculation()
  398. },
  399. getData(){
  400. uni.showLoading({
  401. title: '加载中'
  402. })
  403. var location = uni.getStorageSync("locationCity");
  404. var selectCity = uni.getStorageSync("selectCity");
  405. var cityCode=''
  406. if(selectCity){
  407. cityCode=selectCity.code
  408. }else{
  409. cityCode=location.cityCode
  410. }
  411. this.$http('miniApp/tPackageMiniAppController/queryPackageList', {
  412. mileage:this.maintainCarData.milage,
  413. liyangId:this.maintainCarData.nLevelID,
  414. cityCode:cityCode,
  415. guidePrice:this.maintainCarData.guidePrice?this.maintainCarData.guidePrice:0,
  416. },'GET').then(res => {
  417. console.log(res)
  418. uni.hideLoading();
  419. if(res.code==1){
  420. uni.showModal({
  421. title: '提示',
  422. content: res.msg,
  423. showCancel:false,
  424. success: function (res) {
  425. }
  426. });
  427. }
  428. res.data.forEach(item=>{
  429. //console.log(item)
  430. item.listPackage.forEach((list,i)=>{
  431. if(list.listGoodsAll.length>0){
  432. list.listGoodsAll.forEach((goods,index)=>{
  433. var brandName=goods.goodsList[0].brandName
  434. var newtp=[];
  435. goods.goodsGroupDetail.forEach(tgoods=>{
  436. if(brandName==tgoods.brandName){
  437. newtp.push(tgoods)
  438. }
  439. })
  440. goods.goodsGroupDetail=newtp
  441. /* console.log("同品组")
  442. console.log(goods.goodsGroupDetail) */
  443. if(goods.goodsGroupDetail.length==0){
  444. //同组品为空的情况
  445. if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
  446. //console.log(Number(list.referenceDosageQty)/goods[0].capacity)
  447. if(Number(list.referenceDosageQty)/goods.goodsList[0].capacity>1){
  448. var qtynum1=Number(list.referenceDosageQty)-goods.goodsList[0].capacity
  449. var qtynum2=Math.ceil(qtynum1/goods.goodsList[0].capacity)
  450. goods.goodsList.splice(300);
  451. var addArrnt=JSON.parse(JSON.stringify(goods.goodsList))
  452. //console.log(addArrnt[0])
  453. addArrnt[0].qty=qtynum2;
  454. addArrnt[0].gh=true
  455. var addDta={
  456. goodsGroupDetail:[],
  457. goodsList:addArrnt
  458. }
  459. addDta.goodsList.forEach(add=>{
  460. add.del=true;
  461. })
  462. //addDta.splice(1,0)
  463. console.log(addDta)
  464. var add=JSON.parse(JSON.stringify(addDta))
  465. list.listGoodsAll.splice(index+1, 0,add)
  466. }
  467. }
  468. }else{
  469. //同组品不为空的情况
  470. //console.log("同组品不为空的情况 ")
  471. var remainder=0;
  472. var addNum=index
  473. console.log("list.referenceDosageQty - "+list.referenceDosageQty+list.name)
  474. var referenceDosageQty=Number(list.referenceDosageQty)
  475. //var addArr= goods.goodsList
  476. goods.goodsList.splice(300);
  477. if(list.referenceDosageQty&&!goods.goodsList[0].del){
  478. goods.goodsGroupDetail.forEach((tgoods,tindex)=>{
  479. var addArr=JSON.parse(JSON.stringify(goods.goodsList))
  480. if(tindex==0){
  481. console.log(tgoods.brandName)
  482. if(tgoods.capacity){
  483. if(referenceDosageQty>tgoods.capacity){
  484. if(goods.goodsGroupDetail.length==1){
  485. //console.log("referenceDosageQty>tgoods.capacity")
  486. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  487. //console.log("parseIntNum--"+parseIntNum)
  488. tgoods.qty=parseIntNum+1
  489. addArr.unshift(tgoods)
  490. var reduce= tgoods.capacity*parseIntNum
  491. referenceDosageQty=referenceDosageQty - reduce
  492. var addDta={
  493. goodsGroupDetail:[],
  494. goodsList:addArr,
  495. del:true,
  496. }
  497. addDta.goodsList.forEach(add=>{
  498. add.del=true;
  499. })
  500. list.listGoodsAll.splice(index, 1,addDta)
  501. }else{
  502. //console.log("referenceDosageQty>tgoods.capacity")
  503. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  504. //console.log("parseIntNum--"+parseIntNum)
  505. tgoods.qty=parseIntNum
  506. addArr.unshift(tgoods)
  507. var reduce= tgoods.capacity*parseIntNum
  508. referenceDosageQty=referenceDosageQty - reduce
  509. var addDta={
  510. goodsGroupDetail:[],
  511. goodsList:addArr,
  512. del:true,
  513. }
  514. addDta.goodsList.forEach(add=>{
  515. add.del=true;
  516. })
  517. list.listGoodsAll.splice(index, 1,addDta)
  518. }
  519. }else{
  520. console.log("推荐大于容量")
  521. if(goods.goodsGroupDetail.length==1){
  522. console.log("同组品 一个")
  523. addArr.unshift(tgoods)
  524. referenceDosageQty=referenceDosageQty-tgoods.capacity
  525. var addDta={
  526. goodsGroupDetail:[],
  527. goodsList:addArr,
  528. del:true,
  529. }
  530. addDta.goodsList.forEach(add=>{
  531. add.del=true;
  532. })
  533. list.listGoodsAll.splice(index, 1,addDta)
  534. }else{
  535. list.listGoodsAll.splice(index, 1)
  536. }
  537. }
  538. }else{
  539. addArr.unshift(tgoods)
  540. var addDta={
  541. goodsGroupDetail:[],
  542. goodsList:addArr,
  543. del:true,
  544. }
  545. addDta.goodsList.forEach(add=>{
  546. add.del=true;
  547. })
  548. list.listGoodsAll.splice(index, 1,addDta)
  549. }
  550. }else{
  551. if(goods.goodsGroupDetail[0].capacity){
  552. if(referenceDosageQty>0){
  553. console.log('referenceDosageQty'+referenceDosageQty)
  554. console.log(tgoods)
  555. /* remainder=Number(referenceDosageQty)%tgoods.capacity
  556. if(remainder>1){
  557. addArr.unshift(tgoods)
  558. }
  559. referenceDosageQty=referenceDosageQty-tgoods.capacity */
  560. if(referenceDosageQty>tgoods.capacity){
  561. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  562. var reduce= tgoods.capacity*parseIntNum
  563. if(goods.goodsGroupDetail.length==tindex+1){
  564. var a=referenceDosageQty - reduce
  565. if(a>0){
  566. parseIntNum++
  567. }
  568. }
  569. tgoods.qty=parseIntNum
  570. addArr.unshift(tgoods)
  571. referenceDosageQty=referenceDosageQty - reduce
  572. var addDta={
  573. goodsGroupDetail:[],
  574. goodsList:addArr,
  575. del:true,
  576. tpn:true,
  577. }
  578. addDta.goodsList.forEach(add=>{
  579. add.del=true;
  580. })
  581. //console.log(addArr)
  582. if(tindex==0){
  583. // console.log(addDta.goodsList[0])
  584. //list.listGoodsAll.splice(index, 1,addDta)
  585. //console.log(list.listGoodsAll[index])
  586. }else{
  587. addNum++
  588. console.log('addNum=='+addNum)
  589. //console.log(addDta.goodsList[0])
  590. list.listGoodsAll.splice(addNum, 0,addDta)
  591. }
  592. }else{
  593. if(goods.goodsGroupDetail.length==tindex+1){
  594. addArr.unshift(tgoods)
  595. referenceDosageQty=referenceDosageQty-tgoods.capacity
  596. var addDta={
  597. goodsGroupDetail:[],
  598. goodsList:addArr,
  599. del:true,
  600. tpn:true,
  601. }
  602. addDta.goodsList.forEach(add=>{
  603. add.del=true;
  604. })
  605. //console.log(addArr)
  606. if(tindex==0){
  607. // console.log(addDta.goodsList[0])
  608. //list.listGoodsAll.splice(index, 1,addDta)
  609. //console.log(list.listGoodsAll[index])
  610. }else{
  611. addNum++
  612. console.log('addNum=='+addNum)
  613. //console.log(addDta.goodsList[0])
  614. list.listGoodsAll.splice(addNum, 0,addDta)
  615. }
  616. }
  617. }
  618. }
  619. }
  620. }
  621. } )
  622. }
  623. }
  624. })
  625. }
  626. })
  627. })
  628. this.mealData=res.data;
  629. this.mealData.splice(1,0)
  630. //debugger;
  631. console.log(this.mealData)
  632. this.calculation();
  633. })
  634. },
  635. newData(){
  636. var replaceData=uni.getStorageSync("replaceData");
  637. var location = uni.getStorageSync("locationCity");
  638. var selectCity = uni.getStorageSync("selectCity");
  639. var cityCode=''
  640. if(selectCity){
  641. cityCode=selectCity.code
  642. }else{
  643. cityCode=location.cityCode
  644. }
  645. var params={
  646. mileage:this.maintainCarData.milage,
  647. liyangId:this.maintainCarData.nLevelID,
  648. cityCode:cityCode,
  649. guidePrice:this.maintainCarData.guidePrice?this.maintainCarData.guidePrice:0,
  650. goodsID:replaceData.goodsID,
  651. itemID:replaceData.itemID,
  652. packageID:replaceData.packageID,
  653. packageGoodsGroupID:replaceData.packageGoodsGroupID,
  654. }
  655. uni.showLoading({ });
  656. var arr=[]
  657. this.$http('miniApp/tPackageMiniAppController/queryTGoodsGroupDetailForApp', params,'GET').then(res => {
  658. uni.hideLoading();
  659. res.data.forEach(item=>{
  660. if(item.brandName==replaceData.brandName){
  661. arr.push(item)
  662. }
  663. })
  664. arr.forEach((item,index)=>{
  665. if(item.goodsID==replaceData.goodsID){
  666. arr.splice(index, 1)
  667. }
  668. })
  669. arr.unshift(replaceData)
  670. console.log("处理的同品组")
  671. console.log(arr)
  672. //debugger;
  673. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsGroupDetail=arr
  674. this.mealData.splice(1,0)
  675. console.log("this.leftIndex"+this.leftIndex+'--'+this.replaceIndex1+'--'+this.replaceIndex2)
  676. console.log(this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2])
  677. console.log(this.mealData)
  678. this.chulidata()
  679. })
  680. },
  681. chulidata(){
  682. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList.forEach((item,index)=>{
  683. if(item.gh){
  684. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList.splice(index, 1)
  685. }
  686. })
  687. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll.forEach((item,index)=>{
  688. if(item.tpn){
  689. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll.splice(index, 1)
  690. }
  691. })
  692. this.mealData.forEach(item=>{
  693. //console.log(item)
  694. item.listPackage.forEach((list,i)=>{
  695. if(list.listGoodsAll.length>0){
  696. list.listGoodsAll.forEach((goods,index)=>{
  697. var brandName=goods.goodsList[0].brandName
  698. var newtp=[];
  699. goods.goodsGroupDetail.forEach(tgoods=>{
  700. if(brandName==tgoods.brandName){
  701. newtp.push(tgoods)
  702. }
  703. })
  704. goods.goodsGroupDetail=newtp
  705. /* console.log("同品组")
  706. console.log(goods.goodsGroupDetail) */
  707. if(goods.goodsGroupDetail.length==0){
  708. //同组品为空的情况
  709. if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
  710. //console.log(Number(list.referenceDosageQty)/goods[0].capacity)
  711. if(Number(list.referenceDosageQty)/goods.goodsList[0].capacity>1){
  712. var qtynum1=Number(list.referenceDosageQty)-goods.goodsList[0].capacity
  713. var qtynum2=Math.ceil(qtynum1/goods.goodsList[0].capacity)
  714. goods.goodsList.splice(300);
  715. var addArrnt=JSON.parse(JSON.stringify(goods.goodsList))
  716. //console.log(addArrnt[0])
  717. addArrnt[0].qty=qtynum2;
  718. addArrnt[0].gh=true
  719. var addDta={
  720. goodsGroupDetail:[],
  721. goodsList:addArrnt
  722. }
  723. addDta.goodsList.forEach(add=>{
  724. add.del=true;
  725. })
  726. //addDta.splice(1,0)
  727. console.log(addDta)
  728. var add=JSON.parse(JSON.stringify(addDta))
  729. list.listGoodsAll.splice(index+1, 0,add)
  730. }
  731. }
  732. }else{
  733. //同组品不为空的情况
  734. //console.log("同组品不为空的情况 ")
  735. var remainder=0;
  736. var addNum=index
  737. console.log("list.referenceDosageQty - "+list.referenceDosageQty+list.name)
  738. var referenceDosageQty=Number(list.referenceDosageQty)
  739. //var addArr= goods.goodsList
  740. goods.goodsList.splice(300);
  741. if(list.referenceDosageQty&&!goods.goodsList[0].del){
  742. goods.goodsGroupDetail.forEach((tgoods,tindex)=>{
  743. var addArr=JSON.parse(JSON.stringify(goods.goodsList))
  744. if(tindex==0){
  745. console.log(tgoods.brandName)
  746. if(tgoods.capacity){
  747. if(referenceDosageQty>tgoods.capacity){
  748. if(goods.goodsGroupDetail.length==1){
  749. //console.log("referenceDosageQty>tgoods.capacity")
  750. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  751. //console.log("parseIntNum--"+parseIntNum)
  752. tgoods.qty=parseIntNum+1
  753. addArr.unshift(tgoods)
  754. var reduce= tgoods.capacity*parseIntNum
  755. referenceDosageQty=referenceDosageQty - reduce
  756. var addDta={
  757. goodsGroupDetail:[],
  758. goodsList:addArr,
  759. del:true,
  760. }
  761. addDta.goodsList.forEach(add=>{
  762. add.del=true;
  763. })
  764. list.listGoodsAll.splice(index, 1,addDta)
  765. }else{
  766. //console.log("referenceDosageQty>tgoods.capacity")
  767. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  768. //console.log("parseIntNum--"+parseIntNum)
  769. tgoods.qty=parseIntNum
  770. addArr.unshift(tgoods)
  771. var reduce= tgoods.capacity*parseIntNum
  772. referenceDosageQty=referenceDosageQty - reduce
  773. var addDta={
  774. goodsGroupDetail:[],
  775. goodsList:addArr,
  776. del:true,
  777. }
  778. addDta.goodsList.forEach(add=>{
  779. add.del=true;
  780. })
  781. list.listGoodsAll.splice(index, 1,addDta)
  782. }
  783. }else{
  784. console.log("推荐大于容量")
  785. if(goods.goodsGroupDetail.length==1){
  786. console.log("同组品 一个")
  787. addArr.unshift(tgoods)
  788. referenceDosageQty=referenceDosageQty-tgoods.capacity
  789. var addDta={
  790. goodsGroupDetail:[],
  791. goodsList:addArr,
  792. del:true,
  793. }
  794. addDta.goodsList.forEach(add=>{
  795. add.del=true;
  796. })
  797. list.listGoodsAll.splice(index, 1,addDta)
  798. }else{
  799. list.listGoodsAll.splice(index, 1)
  800. }
  801. }
  802. }else{
  803. addArr.unshift(tgoods)
  804. var addDta={
  805. goodsGroupDetail:[],
  806. goodsList:addArr,
  807. del:true,
  808. }
  809. addDta.goodsList.forEach(add=>{
  810. add.del=true;
  811. })
  812. list.listGoodsAll.splice(index, 1,addDta)
  813. }
  814. }else{
  815. if(goods.goodsGroupDetail[0].capacity){
  816. if(referenceDosageQty>0){
  817. console.log('referenceDosageQty'+referenceDosageQty)
  818. console.log(tgoods)
  819. /* remainder=Number(referenceDosageQty)%tgoods.capacity
  820. if(remainder>1){
  821. addArr.unshift(tgoods)
  822. }
  823. referenceDosageQty=referenceDosageQty-tgoods.capacity */
  824. if(referenceDosageQty>tgoods.capacity){
  825. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  826. var reduce= tgoods.capacity*parseIntNum
  827. if(goods.goodsGroupDetail.length==tindex+1){
  828. var a=referenceDosageQty - reduce
  829. if(a>0){
  830. parseIntNum++
  831. }
  832. }
  833. tgoods.qty=parseIntNum
  834. addArr.unshift(tgoods)
  835. referenceDosageQty=referenceDosageQty - reduce
  836. var addDta={
  837. goodsGroupDetail:[],
  838. goodsList:addArr,
  839. del:true
  840. }
  841. addDta.goodsList.forEach(add=>{
  842. add.del=true;
  843. })
  844. //console.log(addArr)
  845. if(tindex==0){
  846. // console.log(addDta.goodsList[0])
  847. //list.listGoodsAll.splice(index, 1,addDta)
  848. //console.log(list.listGoodsAll[index])
  849. }else{
  850. addNum++
  851. console.log('addNum=='+addNum)
  852. //console.log(addDta.goodsList[0])
  853. list.listGoodsAll.splice(addNum, 0,addDta)
  854. }
  855. }else{
  856. if(goods.goodsGroupDetail.length==tindex+1){
  857. addArr.unshift(tgoods)
  858. referenceDosageQty=referenceDosageQty-tgoods.capacity
  859. var addDta={
  860. goodsGroupDetail:[],
  861. goodsList:addArr,
  862. del:true
  863. }
  864. addDta.goodsList.forEach(add=>{
  865. add.del=true;
  866. })
  867. //console.log(addArr)
  868. if(tindex==0){
  869. // console.log(addDta.goodsList[0])
  870. //list.listGoodsAll.splice(index, 1,addDta)
  871. //console.log(list.listGoodsAll[index])
  872. }else{
  873. addNum++
  874. console.log('addNum=='+addNum)
  875. //console.log(addDta.goodsList[0])
  876. list.listGoodsAll.splice(addNum, 0,addDta)
  877. }
  878. }
  879. }
  880. }
  881. }
  882. }
  883. } )
  884. }
  885. }
  886. })
  887. }
  888. })
  889. })
  890. this.mealData.splice(1,0)
  891. console.log("处理数据")
  892. console.log(this.mealData)
  893. this.calculation();
  894. },
  895. handbook(){
  896. uni.navigateTo({
  897. url:'handbook?mileage'+this.maintainCarData.milage+'&liyangId='+this.maintainCarData.nLevelID
  898. })
  899. },
  900. settlement(){
  901. if(!this.isNull){
  902. uni.showToast({
  903. title: '您选择的有未设置价格的商品,请重新选择',
  904. icon:'none',
  905. duration: 5000
  906. });
  907. return false;
  908. }
  909. console.log(this.orderData)
  910. //return false;
  911. uni.removeStorageSync('couponData');
  912. if(this.orderData.length>0){
  913. /* uni.navigateTo({
  914. url:'confirmOrder?orderData='+JSON.stringify(this.orderData)+'&currentMileage='+this.maintainCarData.milage
  915. }) */
  916. uni.navigateTo({
  917. url:'orderShop?orderData='+JSON.stringify(this.orderData)+'&currentMileage='+this.maintainCarData.milage+'&brand='+this.brand
  918. })
  919. }
  920. },
  921. replace(v,index,i,replaceIndex){
  922. //v.splice(replaceIndex, 1)
  923. console.log(v)
  924. console.log(replaceIndex)
  925. v.goodsList.forEach((item,vindex)=>{
  926. if(replaceIndex==vindex){
  927. item.showr=false
  928. }else{
  929. item.showr=true
  930. }
  931. })
  932. uni.removeStorageSync('replaceData');
  933. this.replaceIndex1=index;
  934. this.replaceIndex2=i;
  935. uni.setStorage({
  936. key: 'replaceDataList',
  937. data: v,
  938. success: function () {
  939. uni.navigateTo({
  940. url:'replaceGoods'
  941. })
  942. }
  943. });
  944. },
  945. caidanClick(){
  946. this.qingdanShow=!this.qingdanShow
  947. },
  948. milageEdit(){
  949. this.maintainCarData.milage=''
  950. },
  951. carEdit(){
  952. uni.navigateTo({
  953. url:'../index/cailist?type=2'
  954. })
  955. }
  956. }
  957. }
  958. </script>
  959. <style scoped>
  960. .caidanTk{
  961. height: calc(100vh );
  962. width: 100vw;
  963. background: rgba(0,0,0,0.6);
  964. position:fixed;
  965. left: 0;
  966. top: 0;
  967. }
  968. .tkCont{
  969. height: 70vh;
  970. /* margin-top: calc(40vh ); */
  971. position: absolute;
  972. left: 0;
  973. bottom: 0;
  974. }
  975. .caidanTkTop{
  976. width: 750rpx;
  977. height: 90rpx;
  978. background: #FFFFFF;
  979. border-radius: 24rpx 24rpx 0px 0px;
  980. }
  981. .caidanTkTop{
  982. display: flex;justify-content: space-between;
  983. }
  984. .topTopright{
  985. display: flex;
  986. padding-top: 29rpx;
  987. }
  988. .tkTopTitle{
  989. line-height: 90rpx;
  990. font-size: 30rpx;
  991. font-weight: 600;
  992. color: #3C3C3C;
  993. padding-left: 24rpx;
  994. }
  995. .empty{
  996. width: 86rpx;
  997. height: 42rpx;
  998. background: #EEEEEE;
  999. border-radius: 21rpx;
  1000. text-align: center;
  1001. color: #666666;
  1002. font-size: 24rpx;
  1003. line-height: 42rpx;
  1004. }
  1005. .close{
  1006. color: #999999;
  1007. font-size: 30rpx;
  1008. padding-right: 30rpx;
  1009. padding-left: 24rpx;
  1010. }
  1011. .tkMain{
  1012. background: #F0F0F0;
  1013. height: calc(70vh - 90rpx);
  1014. }
  1015. .tkMainSv{
  1016. padding: 0 24rpx;
  1017. width: 702rpx;
  1018. height: calc(70vh - 150rpx);
  1019. }
  1020. .goodsItemRight{
  1021. width: 520rpx;
  1022. padding-left: 20rpx;
  1023. display: flex;
  1024. flex-direction:column;
  1025. justify-content: space-between;
  1026. }
  1027. .goodsItemBottom{
  1028. display: flex;
  1029. justify-content: space-between;
  1030. }
  1031. .goodssalePrice{
  1032. font-size: 32rpx;font-weight: 500;color: #FF4F00;
  1033. }
  1034. .goodsNum{
  1035. font-size: 24rpx;font-weight: 400;color: #999999;
  1036. }
  1037. .top{
  1038. background: #FF4F00;
  1039. display: flex;
  1040. justify-content: space-between;
  1041. padding: 30rpx 25rpx;
  1042. font-size: 28rpx;
  1043. color: #FFFFFF;
  1044. }
  1045. .goodsItem{
  1046. display: flex;
  1047. padding: 15rpx 0;
  1048. }
  1049. .qingdanLine{
  1050. background: #FFFFFF;
  1051. margin-top: 20rpx;
  1052. padding: 24rpx 20rpx;
  1053. border-radius: 10rpx;
  1054. }
  1055. .brandLogo{
  1056. width: 42rpx;
  1057. height: 42rpx;
  1058. padding: 0 10rpx;
  1059. }
  1060. .topLeft{
  1061. display: flex;
  1062. align-content: center;
  1063. }
  1064. .carName{
  1065. width: 61%;
  1066. }
  1067. .topEdit{
  1068. width: 22rpx;
  1069. height: 22rpx;
  1070. padding: 10rpx;
  1071. }
  1072. .topRight{
  1073. display: flex;
  1074. justify-content: flex-end;
  1075. align-items: center;
  1076. }
  1077. .topInput{
  1078. font-size: 28rpx;
  1079. color: #FFFFFF;
  1080. text-align: right;
  1081. padding-top: 3rpx;
  1082. width: 70%;
  1083. }
  1084. .maintainrecommend{
  1085. padding: 30rpx 24rpx;
  1086. display: flex;
  1087. justify-content: space-between;
  1088. border-bottom: 2rpx solid #EEEEEE;
  1089. }
  1090. .recommendTxt{
  1091. color: #3C3C3C;
  1092. font-size: 30rpx;
  1093. font-weight: 600;
  1094. }
  1095. .manual{
  1096. width: 119rpx;
  1097. height: 40rpx;
  1098. border-radius: 20rpx;
  1099. border: 2rpx solid #F19D01;
  1100. text-align: center;
  1101. line-height: 40rpx;
  1102. font-size: 22rpx;
  1103. color: #F19D01;
  1104. }
  1105. .bottom{
  1106. position: fixed;
  1107. left: 0;
  1108. bottom: 0;
  1109. width: 100vw;
  1110. height: 120rpx;
  1111. background: #FFFFFF;
  1112. box-shadow: 0px -2px 20px 0px rgba(153, 153, 153, 0.2);
  1113. padding-bottom: constant(safe-area-inset-bottom);
  1114. padding-bottom: env(safe-area-inset-bottom);
  1115. box-sizing: content-box;
  1116. z-index: 11;
  1117. }
  1118. .ckBottom{
  1119. width: 100vw;
  1120. height: 120rpx;
  1121. padding-bottom: constant(safe-area-inset-bottom);
  1122. padding-bottom: env(safe-area-inset-bottom);
  1123. box-sizing: content-box;
  1124. }
  1125. .main{
  1126. display: flex;
  1127. height: calc(100vh - 410rpx);
  1128. }
  1129. .mainscrollView{
  1130. height: calc(100vh - 410rpx);
  1131. padding-bottom: constant(safe-area-inset-bottom);
  1132. padding-bottom: env(safe-area-inset-bottom);
  1133. box-sizing: content-box;
  1134. margin-bottom: 120rpx;
  1135. }
  1136. /* #ifdef MP-WEIXIN */
  1137. .main{
  1138. display: flex;
  1139. height: calc(100vh - 310rpx);
  1140. }
  1141. .mainscrollView{
  1142. height: calc(100vh - 310rpx);
  1143. }
  1144. /* #endif */
  1145. .mainLeft{
  1146. width: 146rpx;
  1147. background: #F5F5F5;
  1148. }
  1149. .mainRight{
  1150. width: 604rpx;
  1151. }
  1152. .mainLeftLine{
  1153. color: #3C3C3C;
  1154. padding: 30rpx 20rpx;
  1155. font-size: 24rpx;
  1156. text-align: center;
  1157. position: relative;
  1158. }
  1159. .lineNum{
  1160. position: absolute;
  1161. background: #FF270A;
  1162. width: 40rpx;
  1163. height: 26rpx;
  1164. text-align: center;
  1165. line-height: 26rpx;
  1166. font-size: 20rpx;
  1167. color: #FFFFFF;
  1168. border-radius: 13rpx;
  1169. top: 10rpx;
  1170. right: 10rpx;
  1171. }
  1172. .lineLeftActive{
  1173. background: #FFFFFF;
  1174. }
  1175. .nock{
  1176. width: 22rpx;
  1177. height: 22rpx;
  1178. border-radius: 50%;
  1179. border:2px solid #AEAEAE;
  1180. margin-top: 2rpx;
  1181. margin-right: 10rpx;
  1182. }
  1183. .imgPrivacy{
  1184. width: 36rpx;
  1185. height: 36rpx;
  1186. /* margin-top: 2rpx; */
  1187. /* margin-right: 10rpx; */
  1188. }
  1189. .contTopRight{
  1190. display: flex;
  1191. align-items: center;
  1192. width: 38rpx;
  1193. height: 36rpx;
  1194. margin-right: 10rpx;
  1195. }
  1196. .mainRightLine{
  1197. padding: 20rpx 20rpx 0 20rpx;
  1198. }
  1199. .contTop{
  1200. display: flex;
  1201. justify-content: space-between;
  1202. }
  1203. .listPackgeName{
  1204. font-size: 26rpx;
  1205. font-family: PingFangSC-Regular, PingFang SC;
  1206. font-weight: 600;
  1207. color: #3C3C3C;
  1208. }
  1209. .listPackgeMs{
  1210. font-size: 22rpx;
  1211. font-family: PingFangSC-Regular, PingFang SC;
  1212. font-weight: 400;
  1213. color: #999999;
  1214. padding-top: 5rpx;
  1215. line-height: 30rpx;
  1216. }
  1217. .contZk{
  1218. border-bottom: 1px solid #EEEEEE;
  1219. padding-bottom: 20rpx;
  1220. }
  1221. .goodsImg{
  1222. width: 120rpx;
  1223. height: 120rpx;
  1224. border-radius: 11rpx;
  1225. }
  1226. .goodsItemLIne{
  1227. display: flex;
  1228. padding-top: 20rpx;
  1229. padding-bottom: 20rpx;
  1230. }
  1231. .goodsCont{
  1232. display: flex;
  1233. flex-direction:column;
  1234. justify-content: space-between;
  1235. padding-left: 20rpx;
  1236. }
  1237. .goodsContTop{
  1238. display: flex;
  1239. justify-content: space-between;
  1240. width: 400rpx;
  1241. }
  1242. .goodsItemName{
  1243. font-size: 26rpx;
  1244. font-weight: 400;
  1245. color: #3C3C3C;
  1246. width: 78%;
  1247. }
  1248. .salePrice{
  1249. font-size: 32rpx;
  1250. font-weight: 500;
  1251. color: #FF4F00;
  1252. }
  1253. .replaceBox{
  1254. width: 100rpx;
  1255. }
  1256. .replace{
  1257. width: 75rpx;
  1258. height: 37rpx;
  1259. border-radius: 19rpx;
  1260. border: 2rpx solid #B9B9B9;
  1261. text-align: center;
  1262. line-height: 35rpx;
  1263. color: #707070;
  1264. font-size: 22rpx;
  1265. margin-left: 25rpx;
  1266. }
  1267. .contZkMain{
  1268. padding-top: 20rpx;
  1269. }
  1270. .asa{
  1271. width: 44rpx;
  1272. height: 44rpx;
  1273. line-height: 44rpx;
  1274. text-align: center;
  1275. background: #F4F5F7;
  1276. font-size: 30rpx;
  1277. }
  1278. .goodsCOntBOttom{
  1279. display: flex;
  1280. justify-content: space-between;
  1281. }
  1282. .as{
  1283. display: flex;
  1284. }
  1285. .goodsPrice{
  1286. display: flex;justify-content: space-between;
  1287. padding-top: 10rpx;
  1288. }
  1289. .goodsPriceNum{
  1290. color: #F8F8F8;
  1291. font-size: 28rpx;
  1292. }
  1293. .asNum{
  1294. font-size: 24rpx;color: #333333;
  1295. padding: 0 18rpx;
  1296. height: 44rpx;
  1297. line-height: 44rpx;
  1298. background: #F4F5F7;
  1299. margin-left: 1px;
  1300. margin-right: 1px;
  1301. }
  1302. .itemNum{
  1303. font-size: 24rpx;
  1304. font-weight: 400;
  1305. color: #999999;
  1306. }
  1307. .bottom{
  1308. display: flex;
  1309. justify-content: space-between;
  1310. }
  1311. .caidanImg{
  1312. width: 50rpx;
  1313. height: 50rpx;
  1314. }
  1315. .bottomLeft{
  1316. display: flex;
  1317. }
  1318. .caidan{
  1319. padding-left: 33rpx;
  1320. padding-top: 35rpx;
  1321. padding-right: 33rpx;
  1322. position: relative;
  1323. }
  1324. .total{
  1325. position: absolute;
  1326. width: 40rpx;
  1327. height: 26rpx;
  1328. background: #FF270A;
  1329. line-height: 26rpx;
  1330. text-align: center;
  1331. color: #FFFFFF;
  1332. font-size: 20rpx;
  1333. top: 25rpx;
  1334. right: 15rpx;
  1335. border-radius: 13rpx;
  1336. }
  1337. .heji1{
  1338. font-size: 24rpx;
  1339. font-weight: 500;
  1340. color: #666666;
  1341. }
  1342. .hejiNum{
  1343. font-size: 32rpx;
  1344. font-family: PingFangSC-Medium, PingFang SC;
  1345. font-weight: 500;
  1346. color: #FF4F00;
  1347. }
  1348. .hejiMs{
  1349. font-size: 24rpx;
  1350. padding-top: 5rpx;
  1351. color: #999999;
  1352. }
  1353. .heji{
  1354. padding-top: 23rpx;
  1355. }
  1356. .settlement{
  1357. width: 203rpx;
  1358. height: 74rpx;
  1359. background: #FF4F00;
  1360. border-radius: 37rpx;
  1361. text-align: center;
  1362. line-height: 74rpx;
  1363. font-size: 30rpx;
  1364. font-family: PingFangSC-Medium, PingFang SC;
  1365. font-weight: 500;
  1366. color: #FEFFFE;
  1367. margin-top: 23rpx;
  1368. margin-right: 32rpx;
  1369. }
  1370. .nodataImg{
  1371. width: 400rpx;
  1372. padding-top: 100rpx;
  1373. }
  1374. .noTxt{
  1375. font-size: 36rpx;
  1376. color: #999999;
  1377. padding-top: 50rpx;
  1378. }
  1379. .nodataBox{
  1380. text-align: center;
  1381. }
  1382. </style>