maintain.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486
  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. }
  577. addDta.goodsList.forEach(add=>{
  578. add.del=true;
  579. })
  580. //console.log(addArr)
  581. if(tindex==0){
  582. // console.log(addDta.goodsList[0])
  583. //list.listGoodsAll.splice(index, 1,addDta)
  584. //console.log(list.listGoodsAll[index])
  585. }else{
  586. addNum++
  587. console.log('addNum=='+addNum)
  588. //console.log(addDta.goodsList[0])
  589. list.listGoodsAll.splice(addNum, 0,addDta)
  590. }
  591. }else{
  592. if(goods.goodsGroupDetail.length==tindex+1){
  593. addArr.unshift(tgoods)
  594. referenceDosageQty=referenceDosageQty-tgoods.capacity
  595. var addDta={
  596. goodsGroupDetail:[],
  597. goodsList:addArr,
  598. del:true
  599. }
  600. addDta.goodsList.forEach(add=>{
  601. add.del=true;
  602. })
  603. //console.log(addArr)
  604. if(tindex==0){
  605. // console.log(addDta.goodsList[0])
  606. //list.listGoodsAll.splice(index, 1,addDta)
  607. //console.log(list.listGoodsAll[index])
  608. }else{
  609. addNum++
  610. console.log('addNum=='+addNum)
  611. //console.log(addDta.goodsList[0])
  612. list.listGoodsAll.splice(addNum, 0,addDta)
  613. }
  614. }
  615. }
  616. }
  617. }
  618. }
  619. } )
  620. }
  621. }
  622. })
  623. }
  624. })
  625. })
  626. this.mealData=res.data;
  627. this.mealData.splice(1,0)
  628. console.log(this.mealData)
  629. this.calculation();
  630. })
  631. },
  632. newData(){
  633. var replaceData=uni.getStorageSync("replaceData");
  634. var location = uni.getStorageSync("locationCity");
  635. var selectCity = uni.getStorageSync("selectCity");
  636. var cityCode=''
  637. if(selectCity){
  638. cityCode=selectCity.code
  639. }else{
  640. cityCode=location.cityCode
  641. }
  642. var params={
  643. mileage:this.maintainCarData.milage,
  644. liyangId:this.maintainCarData.nLevelID,
  645. cityCode:cityCode,
  646. guidePrice:this.maintainCarData.guidePrice?this.maintainCarData.guidePrice:0,
  647. goodsID:replaceData.goodsID,
  648. itemID:replaceData.itemID,
  649. packageID:replaceData.packageID,
  650. packageGoodsGroupID:replaceData.packageGoodsGroupID,
  651. }
  652. uni.showLoading({ });
  653. var arr=[]
  654. this.$http('miniApp/tPackageMiniAppController/queryTGoodsGroupDetailForApp', params,'GET').then(res => {
  655. uni.hideLoading();
  656. res.data.forEach(item=>{
  657. if(item.brandName==replaceData.brandName){
  658. arr.push(item)
  659. }
  660. })
  661. arr.forEach((item,index)=>{
  662. if(item.goodsID==replaceData.goodsID){
  663. arr.splice(index, 1)
  664. }
  665. })
  666. arr.unshift(replaceData)
  667. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsGroupDetail=arr
  668. this.chulidata()
  669. console.log(arr)
  670. })
  671. },
  672. chulidata(){
  673. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList.forEach((item,index)=>{
  674. if(item.gh){
  675. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].goodsList.splice(index, 1)
  676. }
  677. })
  678. this.mealData.forEach(item=>{
  679. //console.log(item)
  680. item.listPackage.forEach((list,i)=>{
  681. if(list.listGoodsAll.length>0){
  682. list.listGoodsAll.forEach((goods,index)=>{
  683. var brandName=goods.goodsList[0].brandName
  684. var newtp=[];
  685. goods.goodsGroupDetail.forEach(tgoods=>{
  686. if(brandName==tgoods.brandName){
  687. newtp.push(tgoods)
  688. }
  689. })
  690. goods.goodsGroupDetail=newtp
  691. /* console.log("同品组")
  692. console.log(goods.goodsGroupDetail) */
  693. if(goods.goodsGroupDetail.length==0){
  694. //同组品为空的情况
  695. if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
  696. //console.log(Number(list.referenceDosageQty)/goods[0].capacity)
  697. if(Number(list.referenceDosageQty)/goods.goodsList[0].capacity>1){
  698. var qtynum1=Number(list.referenceDosageQty)-goods.goodsList[0].capacity
  699. var qtynum2=Math.ceil(qtynum1/goods.goodsList[0].capacity)
  700. goods.goodsList.splice(300);
  701. var addArrnt=JSON.parse(JSON.stringify(goods.goodsList))
  702. //console.log(addArrnt[0])
  703. addArrnt[0].qty=qtynum2;
  704. addArrnt[0].gh=true
  705. var addDta={
  706. goodsGroupDetail:[],
  707. goodsList:addArrnt
  708. }
  709. addDta.goodsList.forEach(add=>{
  710. add.del=true;
  711. })
  712. //addDta.splice(1,0)
  713. console.log(addDta)
  714. var add=JSON.parse(JSON.stringify(addDta))
  715. list.listGoodsAll.splice(index+1, 0,add)
  716. }
  717. }
  718. }else{
  719. //同组品不为空的情况
  720. //console.log("同组品不为空的情况 ")
  721. var remainder=0;
  722. var addNum=index
  723. console.log("list.referenceDosageQty - "+list.referenceDosageQty+list.name)
  724. var referenceDosageQty=Number(list.referenceDosageQty)
  725. //var addArr= goods.goodsList
  726. goods.goodsList.splice(300);
  727. if(list.referenceDosageQty&&!goods.goodsList[0].del){
  728. goods.goodsGroupDetail.forEach((tgoods,tindex)=>{
  729. var addArr=JSON.parse(JSON.stringify(goods.goodsList))
  730. if(tindex==0){
  731. console.log(tgoods.brandName)
  732. if(tgoods.capacity){
  733. if(referenceDosageQty>tgoods.capacity){
  734. if(goods.goodsGroupDetail.length==1){
  735. //console.log("referenceDosageQty>tgoods.capacity")
  736. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  737. //console.log("parseIntNum--"+parseIntNum)
  738. tgoods.qty=parseIntNum+1
  739. addArr.unshift(tgoods)
  740. var reduce= tgoods.capacity*parseIntNum
  741. referenceDosageQty=referenceDosageQty - reduce
  742. var addDta={
  743. goodsGroupDetail:[],
  744. goodsList:addArr,
  745. del:true,
  746. }
  747. addDta.goodsList.forEach(add=>{
  748. add.del=true;
  749. })
  750. list.listGoodsAll.splice(index, 1,addDta)
  751. }else{
  752. //console.log("referenceDosageQty>tgoods.capacity")
  753. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  754. //console.log("parseIntNum--"+parseIntNum)
  755. tgoods.qty=parseIntNum
  756. addArr.unshift(tgoods)
  757. var reduce= tgoods.capacity*parseIntNum
  758. referenceDosageQty=referenceDosageQty - reduce
  759. var addDta={
  760. goodsGroupDetail:[],
  761. goodsList:addArr,
  762. del:true,
  763. }
  764. addDta.goodsList.forEach(add=>{
  765. add.del=true;
  766. })
  767. list.listGoodsAll.splice(index, 1,addDta)
  768. }
  769. }else{
  770. console.log("推荐大于容量")
  771. if(goods.goodsGroupDetail.length==1){
  772. console.log("同组品 一个")
  773. addArr.unshift(tgoods)
  774. referenceDosageQty=referenceDosageQty-tgoods.capacity
  775. var addDta={
  776. goodsGroupDetail:[],
  777. goodsList:addArr,
  778. del:true,
  779. }
  780. addDta.goodsList.forEach(add=>{
  781. add.del=true;
  782. })
  783. list.listGoodsAll.splice(index, 1,addDta)
  784. }else{
  785. list.listGoodsAll.splice(index, 1)
  786. }
  787. }
  788. }else{
  789. addArr.unshift(tgoods)
  790. var addDta={
  791. goodsGroupDetail:[],
  792. goodsList:addArr,
  793. del:true,
  794. }
  795. addDta.goodsList.forEach(add=>{
  796. add.del=true;
  797. })
  798. list.listGoodsAll.splice(index, 1,addDta)
  799. }
  800. }else{
  801. if(goods.goodsGroupDetail[0].capacity){
  802. if(referenceDosageQty>0){
  803. console.log('referenceDosageQty'+referenceDosageQty)
  804. console.log(tgoods)
  805. /* remainder=Number(referenceDosageQty)%tgoods.capacity
  806. if(remainder>1){
  807. addArr.unshift(tgoods)
  808. }
  809. referenceDosageQty=referenceDosageQty-tgoods.capacity */
  810. if(referenceDosageQty>tgoods.capacity){
  811. var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
  812. var reduce= tgoods.capacity*parseIntNum
  813. if(goods.goodsGroupDetail.length==tindex+1){
  814. var a=referenceDosageQty - reduce
  815. if(a>0){
  816. parseIntNum++
  817. }
  818. }
  819. tgoods.qty=parseIntNum
  820. addArr.unshift(tgoods)
  821. referenceDosageQty=referenceDosageQty - reduce
  822. var addDta={
  823. goodsGroupDetail:[],
  824. goodsList:addArr,
  825. del:true
  826. }
  827. addDta.goodsList.forEach(add=>{
  828. add.del=true;
  829. })
  830. //console.log(addArr)
  831. if(tindex==0){
  832. // console.log(addDta.goodsList[0])
  833. //list.listGoodsAll.splice(index, 1,addDta)
  834. //console.log(list.listGoodsAll[index])
  835. }else{
  836. addNum++
  837. console.log('addNum=='+addNum)
  838. //console.log(addDta.goodsList[0])
  839. list.listGoodsAll.splice(addNum, 0,addDta)
  840. }
  841. }else{
  842. if(goods.goodsGroupDetail.length==tindex+1){
  843. addArr.unshift(tgoods)
  844. referenceDosageQty=referenceDosageQty-tgoods.capacity
  845. var addDta={
  846. goodsGroupDetail:[],
  847. goodsList:addArr,
  848. del:true
  849. }
  850. addDta.goodsList.forEach(add=>{
  851. add.del=true;
  852. })
  853. //console.log(addArr)
  854. if(tindex==0){
  855. // console.log(addDta.goodsList[0])
  856. //list.listGoodsAll.splice(index, 1,addDta)
  857. //console.log(list.listGoodsAll[index])
  858. }else{
  859. addNum++
  860. console.log('addNum=='+addNum)
  861. //console.log(addDta.goodsList[0])
  862. list.listGoodsAll.splice(addNum, 0,addDta)
  863. }
  864. }
  865. }
  866. }
  867. }
  868. }
  869. } )
  870. }
  871. }
  872. })
  873. }
  874. })
  875. })
  876. this.mealData.splice(1,0)
  877. console.log(this.mealData)
  878. this.calculation();
  879. },
  880. handbook(){
  881. uni.navigateTo({
  882. url:'handbook?mileage'+this.maintainCarData.milage+'&liyangId='+this.maintainCarData.nLevelID
  883. })
  884. },
  885. settlement(){
  886. if(!this.isNull){
  887. uni.showToast({
  888. title: '您选择的有未设置价格的商品,请重新选择',
  889. icon:'none',
  890. duration: 5000
  891. });
  892. return false;
  893. }
  894. console.log(this.orderData)
  895. //return false;
  896. uni.removeStorageSync('couponData');
  897. if(this.orderData.length>0){
  898. /* uni.navigateTo({
  899. url:'confirmOrder?orderData='+JSON.stringify(this.orderData)+'&currentMileage='+this.maintainCarData.milage
  900. }) */
  901. uni.navigateTo({
  902. url:'orderShop?orderData='+JSON.stringify(this.orderData)+'&currentMileage='+this.maintainCarData.milage+'&brand='+this.brand
  903. })
  904. }
  905. },
  906. replace(v,index,i,replaceIndex){
  907. //v.splice(replaceIndex, 1)
  908. console.log(v)
  909. console.log(replaceIndex)
  910. v.goodsList.forEach((item,vindex)=>{
  911. if(replaceIndex==vindex){
  912. item.showr=false
  913. }else{
  914. item.showr=true
  915. }
  916. })
  917. uni.removeStorageSync('replaceData');
  918. this.replaceIndex1=index;
  919. this.replaceIndex2=i;
  920. uni.setStorage({
  921. key: 'replaceDataList',
  922. data: v,
  923. success: function () {
  924. uni.navigateTo({
  925. url:'replaceGoods'
  926. })
  927. }
  928. });
  929. },
  930. caidanClick(){
  931. this.qingdanShow=!this.qingdanShow
  932. },
  933. milageEdit(){
  934. this.maintainCarData.milage=''
  935. },
  936. carEdit(){
  937. uni.navigateTo({
  938. url:'../index/cailist?type=2'
  939. })
  940. }
  941. }
  942. }
  943. </script>
  944. <style scoped>
  945. .caidanTk{
  946. height: calc(100vh );
  947. width: 100vw;
  948. background: rgba(0,0,0,0.6);
  949. position:fixed;
  950. left: 0;
  951. top: 0;
  952. }
  953. .tkCont{
  954. height: 70vh;
  955. /* margin-top: calc(40vh ); */
  956. position: absolute;
  957. left: 0;
  958. bottom: 0;
  959. }
  960. .caidanTkTop{
  961. width: 750rpx;
  962. height: 90rpx;
  963. background: #FFFFFF;
  964. border-radius: 24rpx 24rpx 0px 0px;
  965. }
  966. .caidanTkTop{
  967. display: flex;justify-content: space-between;
  968. }
  969. .topTopright{
  970. display: flex;
  971. padding-top: 29rpx;
  972. }
  973. .tkTopTitle{
  974. line-height: 90rpx;
  975. font-size: 30rpx;
  976. font-weight: 600;
  977. color: #3C3C3C;
  978. padding-left: 24rpx;
  979. }
  980. .empty{
  981. width: 86rpx;
  982. height: 42rpx;
  983. background: #EEEEEE;
  984. border-radius: 21rpx;
  985. text-align: center;
  986. color: #666666;
  987. font-size: 24rpx;
  988. line-height: 42rpx;
  989. }
  990. .close{
  991. color: #999999;
  992. font-size: 30rpx;
  993. padding-right: 30rpx;
  994. padding-left: 24rpx;
  995. }
  996. .tkMain{
  997. background: #F0F0F0;
  998. height: calc(70vh - 90rpx);
  999. }
  1000. .tkMainSv{
  1001. padding: 0 24rpx;
  1002. width: 702rpx;
  1003. height: calc(70vh - 150rpx);
  1004. }
  1005. .goodsItemRight{
  1006. width: 520rpx;
  1007. padding-left: 20rpx;
  1008. display: flex;
  1009. flex-direction:column;
  1010. justify-content: space-between;
  1011. }
  1012. .goodsItemBottom{
  1013. display: flex;
  1014. justify-content: space-between;
  1015. }
  1016. .goodssalePrice{
  1017. font-size: 32rpx;font-weight: 500;color: #FF4F00;
  1018. }
  1019. .goodsNum{
  1020. font-size: 24rpx;font-weight: 400;color: #999999;
  1021. }
  1022. .top{
  1023. background: #FF4F00;
  1024. display: flex;
  1025. justify-content: space-between;
  1026. padding: 30rpx 25rpx;
  1027. font-size: 28rpx;
  1028. color: #FFFFFF;
  1029. }
  1030. .goodsItem{
  1031. display: flex;
  1032. padding: 15rpx 0;
  1033. }
  1034. .qingdanLine{
  1035. background: #FFFFFF;
  1036. margin-top: 20rpx;
  1037. padding: 24rpx 20rpx;
  1038. border-radius: 10rpx;
  1039. }
  1040. .brandLogo{
  1041. width: 42rpx;
  1042. height: 42rpx;
  1043. padding: 0 10rpx;
  1044. }
  1045. .topLeft{
  1046. display: flex;
  1047. align-content: center;
  1048. }
  1049. .carName{
  1050. width: 61%;
  1051. }
  1052. .topEdit{
  1053. width: 22rpx;
  1054. height: 22rpx;
  1055. padding: 10rpx;
  1056. }
  1057. .topRight{
  1058. display: flex;
  1059. justify-content: flex-end;
  1060. align-items: center;
  1061. }
  1062. .topInput{
  1063. font-size: 28rpx;
  1064. color: #FFFFFF;
  1065. text-align: right;
  1066. padding-top: 3rpx;
  1067. width: 70%;
  1068. }
  1069. .maintainrecommend{
  1070. padding: 30rpx 24rpx;
  1071. display: flex;
  1072. justify-content: space-between;
  1073. border-bottom: 2rpx solid #EEEEEE;
  1074. }
  1075. .recommendTxt{
  1076. color: #3C3C3C;
  1077. font-size: 30rpx;
  1078. font-weight: 600;
  1079. }
  1080. .manual{
  1081. width: 119rpx;
  1082. height: 40rpx;
  1083. border-radius: 20rpx;
  1084. border: 2rpx solid #F19D01;
  1085. text-align: center;
  1086. line-height: 40rpx;
  1087. font-size: 22rpx;
  1088. color: #F19D01;
  1089. }
  1090. .bottom{
  1091. position: fixed;
  1092. left: 0;
  1093. bottom: 0;
  1094. width: 100vw;
  1095. height: 120rpx;
  1096. background: #FFFFFF;
  1097. box-shadow: 0px -2px 20px 0px rgba(153, 153, 153, 0.2);
  1098. padding-bottom: constant(safe-area-inset-bottom);
  1099. padding-bottom: env(safe-area-inset-bottom);
  1100. box-sizing: content-box;
  1101. z-index: 11;
  1102. }
  1103. .ckBottom{
  1104. width: 100vw;
  1105. height: 120rpx;
  1106. padding-bottom: constant(safe-area-inset-bottom);
  1107. padding-bottom: env(safe-area-inset-bottom);
  1108. box-sizing: content-box;
  1109. }
  1110. .main{
  1111. display: flex;
  1112. height: calc(100vh - 410rpx);
  1113. }
  1114. .mainscrollView{
  1115. height: calc(100vh - 410rpx);
  1116. padding-bottom: constant(safe-area-inset-bottom);
  1117. padding-bottom: env(safe-area-inset-bottom);
  1118. box-sizing: content-box;
  1119. margin-bottom: 120rpx;
  1120. }
  1121. /* #ifdef MP-WEIXIN */
  1122. .main{
  1123. display: flex;
  1124. height: calc(100vh - 310rpx);
  1125. }
  1126. .mainscrollView{
  1127. height: calc(100vh - 310rpx);
  1128. }
  1129. /* #endif */
  1130. .mainLeft{
  1131. width: 146rpx;
  1132. background: #F5F5F5;
  1133. }
  1134. .mainRight{
  1135. width: 604rpx;
  1136. }
  1137. .mainLeftLine{
  1138. color: #3C3C3C;
  1139. padding: 30rpx 20rpx;
  1140. font-size: 24rpx;
  1141. text-align: center;
  1142. position: relative;
  1143. }
  1144. .lineNum{
  1145. position: absolute;
  1146. background: #FF270A;
  1147. width: 40rpx;
  1148. height: 26rpx;
  1149. text-align: center;
  1150. line-height: 26rpx;
  1151. font-size: 20rpx;
  1152. color: #FFFFFF;
  1153. border-radius: 13rpx;
  1154. top: 10rpx;
  1155. right: 10rpx;
  1156. }
  1157. .lineLeftActive{
  1158. background: #FFFFFF;
  1159. }
  1160. .nock{
  1161. width: 22rpx;
  1162. height: 22rpx;
  1163. border-radius: 50%;
  1164. border:2px solid #AEAEAE;
  1165. margin-top: 2rpx;
  1166. margin-right: 10rpx;
  1167. }
  1168. .imgPrivacy{
  1169. width: 36rpx;
  1170. height: 36rpx;
  1171. /* margin-top: 2rpx; */
  1172. /* margin-right: 10rpx; */
  1173. }
  1174. .contTopRight{
  1175. display: flex;
  1176. align-items: center;
  1177. width: 38rpx;
  1178. height: 36rpx;
  1179. margin-right: 10rpx;
  1180. }
  1181. .mainRightLine{
  1182. padding: 20rpx 20rpx 0 20rpx;
  1183. }
  1184. .contTop{
  1185. display: flex;
  1186. justify-content: space-between;
  1187. }
  1188. .listPackgeName{
  1189. font-size: 26rpx;
  1190. font-family: PingFangSC-Regular, PingFang SC;
  1191. font-weight: 600;
  1192. color: #3C3C3C;
  1193. }
  1194. .listPackgeMs{
  1195. font-size: 22rpx;
  1196. font-family: PingFangSC-Regular, PingFang SC;
  1197. font-weight: 400;
  1198. color: #999999;
  1199. padding-top: 5rpx;
  1200. line-height: 30rpx;
  1201. }
  1202. .contZk{
  1203. border-bottom: 1px solid #EEEEEE;
  1204. padding-bottom: 20rpx;
  1205. }
  1206. .goodsImg{
  1207. width: 120rpx;
  1208. height: 120rpx;
  1209. border-radius: 11rpx;
  1210. }
  1211. .goodsItemLIne{
  1212. display: flex;
  1213. padding-top: 20rpx;
  1214. padding-bottom: 20rpx;
  1215. }
  1216. .goodsCont{
  1217. display: flex;
  1218. flex-direction:column;
  1219. justify-content: space-between;
  1220. padding-left: 20rpx;
  1221. }
  1222. .goodsContTop{
  1223. display: flex;
  1224. justify-content: space-between;
  1225. width: 400rpx;
  1226. }
  1227. .goodsItemName{
  1228. font-size: 26rpx;
  1229. font-weight: 400;
  1230. color: #3C3C3C;
  1231. width: 78%;
  1232. }
  1233. .salePrice{
  1234. font-size: 32rpx;
  1235. font-weight: 500;
  1236. color: #FF4F00;
  1237. }
  1238. .replaceBox{
  1239. width: 100rpx;
  1240. }
  1241. .replace{
  1242. width: 75rpx;
  1243. height: 37rpx;
  1244. border-radius: 19rpx;
  1245. border: 2rpx solid #B9B9B9;
  1246. text-align: center;
  1247. line-height: 35rpx;
  1248. color: #707070;
  1249. font-size: 22rpx;
  1250. margin-left: 25rpx;
  1251. }
  1252. .contZkMain{
  1253. padding-top: 20rpx;
  1254. }
  1255. .asa{
  1256. width: 44rpx;
  1257. height: 44rpx;
  1258. line-height: 44rpx;
  1259. text-align: center;
  1260. background: #F4F5F7;
  1261. font-size: 30rpx;
  1262. }
  1263. .goodsCOntBOttom{
  1264. display: flex;
  1265. justify-content: space-between;
  1266. }
  1267. .as{
  1268. display: flex;
  1269. }
  1270. .goodsPrice{
  1271. display: flex;justify-content: space-between;
  1272. padding-top: 10rpx;
  1273. }
  1274. .goodsPriceNum{
  1275. color: #F8F8F8;
  1276. font-size: 28rpx;
  1277. }
  1278. .asNum{
  1279. font-size: 24rpx;color: #333333;
  1280. padding: 0 18rpx;
  1281. height: 44rpx;
  1282. line-height: 44rpx;
  1283. background: #F4F5F7;
  1284. margin-left: 1px;
  1285. margin-right: 1px;
  1286. }
  1287. .itemNum{
  1288. font-size: 24rpx;
  1289. font-weight: 400;
  1290. color: #999999;
  1291. }
  1292. .bottom{
  1293. display: flex;
  1294. justify-content: space-between;
  1295. }
  1296. .caidanImg{
  1297. width: 50rpx;
  1298. height: 50rpx;
  1299. }
  1300. .bottomLeft{
  1301. display: flex;
  1302. }
  1303. .caidan{
  1304. padding-left: 33rpx;
  1305. padding-top: 35rpx;
  1306. padding-right: 33rpx;
  1307. position: relative;
  1308. }
  1309. .total{
  1310. position: absolute;
  1311. width: 40rpx;
  1312. height: 26rpx;
  1313. background: #FF270A;
  1314. line-height: 26rpx;
  1315. text-align: center;
  1316. color: #FFFFFF;
  1317. font-size: 20rpx;
  1318. top: 25rpx;
  1319. right: 15rpx;
  1320. border-radius: 13rpx;
  1321. }
  1322. .heji1{
  1323. font-size: 24rpx;
  1324. font-weight: 500;
  1325. color: #666666;
  1326. }
  1327. .hejiNum{
  1328. font-size: 32rpx;
  1329. font-family: PingFangSC-Medium, PingFang SC;
  1330. font-weight: 500;
  1331. color: #FF4F00;
  1332. }
  1333. .hejiMs{
  1334. font-size: 24rpx;
  1335. padding-top: 5rpx;
  1336. color: #999999;
  1337. }
  1338. .heji{
  1339. padding-top: 23rpx;
  1340. }
  1341. .settlement{
  1342. width: 203rpx;
  1343. height: 74rpx;
  1344. background: #FF4F00;
  1345. border-radius: 37rpx;
  1346. text-align: center;
  1347. line-height: 74rpx;
  1348. font-size: 30rpx;
  1349. font-family: PingFangSC-Medium, PingFang SC;
  1350. font-weight: 500;
  1351. color: #FEFFFE;
  1352. margin-top: 23rpx;
  1353. margin-right: 32rpx;
  1354. }
  1355. .nodataImg{
  1356. width: 400rpx;
  1357. padding-top: 100rpx;
  1358. }
  1359. .noTxt{
  1360. font-size: 36rpx;
  1361. color: #999999;
  1362. padding-top: 50rpx;
  1363. }
  1364. .nodataBox{
  1365. text-align: center;
  1366. }
  1367. </style>