maintain.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504
  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. tpn:true,
  841. }
  842. addDta.goodsList.forEach(add=>{
  843. add.del=true;
  844. })
  845. //console.log(addArr)
  846. if(tindex==0){
  847. // console.log(addDta.goodsList[0])
  848. //list.listGoodsAll.splice(index, 1,addDta)
  849. //console.log(list.listGoodsAll[index])
  850. }else{
  851. addNum++
  852. console.log('addNum=='+addNum)
  853. //console.log(addDta.goodsList[0])
  854. list.listGoodsAll.splice(addNum, 0,addDta)
  855. }
  856. }else{
  857. if(goods.goodsGroupDetail.length==tindex+1){
  858. addArr.unshift(tgoods)
  859. referenceDosageQty=referenceDosageQty-tgoods.capacity
  860. var addDta={
  861. goodsGroupDetail:[],
  862. goodsList:addArr,
  863. del:true,
  864. tpn:true,
  865. }
  866. addDta.goodsList.forEach(add=>{
  867. add.del=true;
  868. })
  869. //console.log(addArr)
  870. if(tindex==0){
  871. // console.log(addDta.goodsList[0])
  872. //list.listGoodsAll.splice(index, 1,addDta)
  873. //console.log(list.listGoodsAll[index])
  874. }else{
  875. addNum++
  876. console.log('addNum=='+addNum)
  877. //console.log(addDta.goodsList[0])
  878. list.listGoodsAll.splice(addNum, 0,addDta)
  879. }
  880. }
  881. }
  882. }
  883. }
  884. }
  885. } )
  886. }
  887. }
  888. })
  889. }
  890. })
  891. })
  892. this.mealData.splice(1,0)
  893. console.log("处理数据")
  894. console.log(this.mealData)
  895. this.calculation();
  896. },
  897. handbook(){
  898. uni.navigateTo({
  899. url:'handbook?mileage'+this.maintainCarData.milage+'&liyangId='+this.maintainCarData.nLevelID
  900. })
  901. },
  902. settlement(){
  903. if(!this.isNull){
  904. uni.showToast({
  905. title: '您选择的有未设置价格的商品,请重新选择',
  906. icon:'none',
  907. duration: 5000
  908. });
  909. return false;
  910. }
  911. console.log(this.orderData)
  912. //return false;
  913. uni.removeStorageSync('couponData');
  914. if(this.orderData.length>0){
  915. /* uni.navigateTo({
  916. url:'confirmOrder?orderData='+JSON.stringify(this.orderData)+'&currentMileage='+this.maintainCarData.milage
  917. }) */
  918. uni.navigateTo({
  919. url:'orderShop?orderData='+JSON.stringify(this.orderData)+'&currentMileage='+this.maintainCarData.milage+'&brand='+this.brand
  920. })
  921. }
  922. },
  923. replace(v,index,i,replaceIndex){
  924. //v.splice(replaceIndex, 1)
  925. console.log(v)
  926. console.log(replaceIndex)
  927. v.goodsList.forEach((item,vindex)=>{
  928. if(replaceIndex==vindex){
  929. item.showr=false
  930. }else{
  931. item.showr=true
  932. }
  933. })
  934. uni.removeStorageSync('replaceData');
  935. this.replaceIndex1=index;
  936. this.replaceIndex2=i;
  937. uni.setStorage({
  938. key: 'replaceDataList',
  939. data: v,
  940. success: function () {
  941. uni.navigateTo({
  942. url:'replaceGoods'
  943. })
  944. }
  945. });
  946. },
  947. caidanClick(){
  948. this.qingdanShow=!this.qingdanShow
  949. },
  950. milageEdit(){
  951. this.maintainCarData.milage=''
  952. },
  953. carEdit(){
  954. uni.navigateTo({
  955. url:'../index/cailist?type=2'
  956. })
  957. }
  958. }
  959. }
  960. </script>
  961. <style scoped>
  962. .caidanTk{
  963. height: calc(100vh );
  964. width: 100vw;
  965. background: rgba(0,0,0,0.6);
  966. position:fixed;
  967. left: 0;
  968. top: 0;
  969. }
  970. .tkCont{
  971. height: 70vh;
  972. /* margin-top: calc(40vh ); */
  973. position: absolute;
  974. left: 0;
  975. bottom: 0;
  976. }
  977. .caidanTkTop{
  978. width: 750rpx;
  979. height: 90rpx;
  980. background: #FFFFFF;
  981. border-radius: 24rpx 24rpx 0px 0px;
  982. }
  983. .caidanTkTop{
  984. display: flex;justify-content: space-between;
  985. }
  986. .topTopright{
  987. display: flex;
  988. padding-top: 29rpx;
  989. }
  990. .tkTopTitle{
  991. line-height: 90rpx;
  992. font-size: 30rpx;
  993. font-weight: 600;
  994. color: #3C3C3C;
  995. padding-left: 24rpx;
  996. }
  997. .empty{
  998. width: 86rpx;
  999. height: 42rpx;
  1000. background: #EEEEEE;
  1001. border-radius: 21rpx;
  1002. text-align: center;
  1003. color: #666666;
  1004. font-size: 24rpx;
  1005. line-height: 42rpx;
  1006. }
  1007. .close{
  1008. color: #999999;
  1009. font-size: 30rpx;
  1010. padding-right: 30rpx;
  1011. padding-left: 24rpx;
  1012. }
  1013. .tkMain{
  1014. background: #F0F0F0;
  1015. height: calc(70vh - 90rpx);
  1016. }
  1017. .tkMainSv{
  1018. padding: 0 24rpx;
  1019. width: 702rpx;
  1020. height: calc(70vh - 150rpx);
  1021. }
  1022. .goodsItemRight{
  1023. width: 520rpx;
  1024. padding-left: 20rpx;
  1025. display: flex;
  1026. flex-direction:column;
  1027. justify-content: space-between;
  1028. }
  1029. .goodsItemBottom{
  1030. display: flex;
  1031. justify-content: space-between;
  1032. }
  1033. .goodssalePrice{
  1034. font-size: 32rpx;font-weight: 500;color: #FF4F00;
  1035. }
  1036. .goodsNum{
  1037. font-size: 24rpx;font-weight: 400;color: #999999;
  1038. }
  1039. .top{
  1040. background: #FF4F00;
  1041. display: flex;
  1042. justify-content: space-between;
  1043. padding: 30rpx 25rpx;
  1044. font-size: 28rpx;
  1045. color: #FFFFFF;
  1046. }
  1047. .goodsItem{
  1048. display: flex;
  1049. padding: 15rpx 0;
  1050. }
  1051. .qingdanLine{
  1052. background: #FFFFFF;
  1053. margin-top: 20rpx;
  1054. padding: 24rpx 20rpx;
  1055. border-radius: 10rpx;
  1056. }
  1057. .brandLogo{
  1058. width: 42rpx;
  1059. height: 42rpx;
  1060. padding: 0 10rpx;
  1061. }
  1062. .topLeft{
  1063. display: flex;
  1064. align-content: center;
  1065. }
  1066. .carName{
  1067. width: 61%;
  1068. }
  1069. .topEdit{
  1070. width: 22rpx;
  1071. height: 22rpx;
  1072. padding: 10rpx;
  1073. }
  1074. .topRight{
  1075. display: flex;
  1076. justify-content: flex-end;
  1077. align-items: center;
  1078. }
  1079. .topInput{
  1080. font-size: 28rpx;
  1081. color: #FFFFFF;
  1082. text-align: right;
  1083. padding-top: 3rpx;
  1084. width: 70%;
  1085. }
  1086. .maintainrecommend{
  1087. padding: 30rpx 24rpx;
  1088. display: flex;
  1089. justify-content: space-between;
  1090. border-bottom: 2rpx solid #EEEEEE;
  1091. }
  1092. .recommendTxt{
  1093. color: #3C3C3C;
  1094. font-size: 30rpx;
  1095. font-weight: 600;
  1096. }
  1097. .manual{
  1098. width: 119rpx;
  1099. height: 40rpx;
  1100. border-radius: 20rpx;
  1101. border: 2rpx solid #F19D01;
  1102. text-align: center;
  1103. line-height: 40rpx;
  1104. font-size: 22rpx;
  1105. color: #F19D01;
  1106. }
  1107. .bottom{
  1108. position: fixed;
  1109. left: 0;
  1110. bottom: 0;
  1111. width: 100vw;
  1112. height: 120rpx;
  1113. background: #FFFFFF;
  1114. box-shadow: 0px -2px 20px 0px rgba(153, 153, 153, 0.2);
  1115. padding-bottom: constant(safe-area-inset-bottom);
  1116. padding-bottom: env(safe-area-inset-bottom);
  1117. box-sizing: content-box;
  1118. z-index: 11;
  1119. }
  1120. .ckBottom{
  1121. width: 100vw;
  1122. height: 120rpx;
  1123. padding-bottom: constant(safe-area-inset-bottom);
  1124. padding-bottom: env(safe-area-inset-bottom);
  1125. box-sizing: content-box;
  1126. }
  1127. .main{
  1128. display: flex;
  1129. height: calc(100vh - 410rpx);
  1130. }
  1131. .mainscrollView{
  1132. height: calc(100vh - 410rpx);
  1133. padding-bottom: constant(safe-area-inset-bottom);
  1134. padding-bottom: env(safe-area-inset-bottom);
  1135. box-sizing: content-box;
  1136. margin-bottom: 120rpx;
  1137. }
  1138. /* #ifdef MP-WEIXIN */
  1139. .main{
  1140. display: flex;
  1141. height: calc(100vh - 310rpx);
  1142. }
  1143. .mainscrollView{
  1144. height: calc(100vh - 310rpx);
  1145. }
  1146. /* #endif */
  1147. .mainLeft{
  1148. width: 146rpx;
  1149. background: #F5F5F5;
  1150. }
  1151. .mainRight{
  1152. width: 604rpx;
  1153. }
  1154. .mainLeftLine{
  1155. color: #3C3C3C;
  1156. padding: 30rpx 20rpx;
  1157. font-size: 24rpx;
  1158. text-align: center;
  1159. position: relative;
  1160. }
  1161. .lineNum{
  1162. position: absolute;
  1163. background: #FF270A;
  1164. width: 40rpx;
  1165. height: 26rpx;
  1166. text-align: center;
  1167. line-height: 26rpx;
  1168. font-size: 20rpx;
  1169. color: #FFFFFF;
  1170. border-radius: 13rpx;
  1171. top: 10rpx;
  1172. right: 10rpx;
  1173. }
  1174. .lineLeftActive{
  1175. background: #FFFFFF;
  1176. }
  1177. .nock{
  1178. width: 22rpx;
  1179. height: 22rpx;
  1180. border-radius: 50%;
  1181. border:2px solid #AEAEAE;
  1182. margin-top: 2rpx;
  1183. margin-right: 10rpx;
  1184. }
  1185. .imgPrivacy{
  1186. width: 36rpx;
  1187. height: 36rpx;
  1188. /* margin-top: 2rpx; */
  1189. /* margin-right: 10rpx; */
  1190. }
  1191. .contTopRight{
  1192. display: flex;
  1193. align-items: center;
  1194. width: 38rpx;
  1195. height: 36rpx;
  1196. margin-right: 10rpx;
  1197. }
  1198. .mainRightLine{
  1199. padding: 20rpx 20rpx 0 20rpx;
  1200. }
  1201. .contTop{
  1202. display: flex;
  1203. justify-content: space-between;
  1204. }
  1205. .listPackgeName{
  1206. font-size: 26rpx;
  1207. font-family: PingFangSC-Regular, PingFang SC;
  1208. font-weight: 600;
  1209. color: #3C3C3C;
  1210. }
  1211. .listPackgeMs{
  1212. font-size: 22rpx;
  1213. font-family: PingFangSC-Regular, PingFang SC;
  1214. font-weight: 400;
  1215. color: #999999;
  1216. padding-top: 5rpx;
  1217. line-height: 30rpx;
  1218. }
  1219. .contZk{
  1220. border-bottom: 1px solid #EEEEEE;
  1221. padding-bottom: 20rpx;
  1222. }
  1223. .goodsImg{
  1224. width: 120rpx;
  1225. height: 120rpx;
  1226. border-radius: 11rpx;
  1227. }
  1228. .goodsItemLIne{
  1229. display: flex;
  1230. padding-top: 20rpx;
  1231. padding-bottom: 20rpx;
  1232. }
  1233. .goodsCont{
  1234. display: flex;
  1235. flex-direction:column;
  1236. justify-content: space-between;
  1237. padding-left: 20rpx;
  1238. }
  1239. .goodsContTop{
  1240. display: flex;
  1241. justify-content: space-between;
  1242. width: 400rpx;
  1243. }
  1244. .goodsItemName{
  1245. font-size: 26rpx;
  1246. font-weight: 400;
  1247. color: #3C3C3C;
  1248. width: 78%;
  1249. }
  1250. .salePrice{
  1251. font-size: 32rpx;
  1252. font-weight: 500;
  1253. color: #FF4F00;
  1254. }
  1255. .replaceBox{
  1256. width: 100rpx;
  1257. }
  1258. .replace{
  1259. width: 75rpx;
  1260. height: 37rpx;
  1261. border-radius: 19rpx;
  1262. border: 2rpx solid #B9B9B9;
  1263. text-align: center;
  1264. line-height: 35rpx;
  1265. color: #707070;
  1266. font-size: 22rpx;
  1267. margin-left: 25rpx;
  1268. }
  1269. .contZkMain{
  1270. padding-top: 20rpx;
  1271. }
  1272. .asa{
  1273. width: 44rpx;
  1274. height: 44rpx;
  1275. line-height: 44rpx;
  1276. text-align: center;
  1277. background: #F4F5F7;
  1278. font-size: 30rpx;
  1279. }
  1280. .goodsCOntBOttom{
  1281. display: flex;
  1282. justify-content: space-between;
  1283. }
  1284. .as{
  1285. display: flex;
  1286. }
  1287. .goodsPrice{
  1288. display: flex;justify-content: space-between;
  1289. padding-top: 10rpx;
  1290. }
  1291. .goodsPriceNum{
  1292. color: #F8F8F8;
  1293. font-size: 28rpx;
  1294. }
  1295. .asNum{
  1296. font-size: 24rpx;color: #333333;
  1297. padding: 0 18rpx;
  1298. height: 44rpx;
  1299. line-height: 44rpx;
  1300. background: #F4F5F7;
  1301. margin-left: 1px;
  1302. margin-right: 1px;
  1303. }
  1304. .itemNum{
  1305. font-size: 24rpx;
  1306. font-weight: 400;
  1307. color: #999999;
  1308. }
  1309. .bottom{
  1310. display: flex;
  1311. justify-content: space-between;
  1312. }
  1313. .caidanImg{
  1314. width: 50rpx;
  1315. height: 50rpx;
  1316. }
  1317. .bottomLeft{
  1318. display: flex;
  1319. }
  1320. .caidan{
  1321. padding-left: 33rpx;
  1322. padding-top: 35rpx;
  1323. padding-right: 33rpx;
  1324. position: relative;
  1325. }
  1326. .total{
  1327. position: absolute;
  1328. width: 40rpx;
  1329. height: 26rpx;
  1330. background: #FF270A;
  1331. line-height: 26rpx;
  1332. text-align: center;
  1333. color: #FFFFFF;
  1334. font-size: 20rpx;
  1335. top: 25rpx;
  1336. right: 15rpx;
  1337. border-radius: 13rpx;
  1338. }
  1339. .heji1{
  1340. font-size: 24rpx;
  1341. font-weight: 500;
  1342. color: #666666;
  1343. }
  1344. .hejiNum{
  1345. font-size: 32rpx;
  1346. font-family: PingFangSC-Medium, PingFang SC;
  1347. font-weight: 500;
  1348. color: #FF4F00;
  1349. }
  1350. .hejiMs{
  1351. font-size: 24rpx;
  1352. padding-top: 5rpx;
  1353. color: #999999;
  1354. }
  1355. .heji{
  1356. padding-top: 23rpx;
  1357. }
  1358. .settlement{
  1359. width: 203rpx;
  1360. height: 74rpx;
  1361. background: #FF4F00;
  1362. border-radius: 37rpx;
  1363. text-align: center;
  1364. line-height: 74rpx;
  1365. font-size: 30rpx;
  1366. font-family: PingFangSC-Medium, PingFang SC;
  1367. font-weight: 500;
  1368. color: #FEFFFE;
  1369. margin-top: 23rpx;
  1370. margin-right: 32rpx;
  1371. }
  1372. .nodataImg{
  1373. width: 400rpx;
  1374. padding-top: 100rpx;
  1375. }
  1376. .noTxt{
  1377. font-size: 36rpx;
  1378. color: #999999;
  1379. padding-top: 50rpx;
  1380. }
  1381. .nodataBox{
  1382. text-align: center;
  1383. }
  1384. </style>