Commit 13fca3da by LJM

「爱智小程序」—业务验收问题合集fix

parent 3613d455
.confirmQuotePage{
.confirmQuotePage {
background: #f8f8f8;
padding-top:75rpx;
padding-top: 75rpx;
padding-bottom: 175rpx;
.cons{
width:700rpx;
margin:0 auto;
.top-box{
.cons {
width: 700rpx;
margin: 0 auto;
.top-box {
background: #fff;
padding:30rpx 22rpx;
padding: 30rpx 22rpx;
border-radius: 20rpx;
padding-top:15rpx;
.tit{
padding-top: 15rpx;
.tit {
font-size: 26rpx;
color: #000000;
height:92rpx;
height: 92rpx;
line-height: 92rpx;
border-bottom: 1rpx solid #E7E7E7;
border-bottom: 1rpx solid #e7e7e7;
&:last-child {
border-bottom: none;
}
.address-box{
}
.address-box {
display: block;
padding-top: 10rpx;
.addbx{
.iconfont{
.addbx {
.iconfont {
font-size: 16rpx;
color:#898989;
color: #898989;
}
.ad {
height: 62rpx;
}
.ad{height:62rpx;}
.csq{
.csq {
font-size: 26rpx;
color: #000000;
}
.ad1{
.ad1 {
font-size: 30rpx;
color: #000000;
height:35rpx;
height: 35rpx;
line-height: 35rpx;
font-weight: bold;
margin-top:4rpx;
margin-top: 4rpx;
}
.cnnk{
.cnnk {
font-size: 24rpx;
color: #666666;
line-height: 40rpx;
height:40rpx;
margin-top:8rpx;
text{margin-right:20rpx;}
height: 40rpx;
margin-top: 8rpx;
text {
margin-right: 20rpx;
}
.mr{
}
.mr {
width: 70rpx;
height: 35rpx;
background: #FFF5F5;
background: #fff5f5;
border-radius: 5rpx;
border: 1rpx solid #D0121B;
border: 1rpx solid #d0121b;
text-align: center;
line-height: 35rpx;
font-size: 24rpx;
color: #D0121B;
margin-left:20rpx;
color: #d0121b;
margin-left: 20rpx;
}
}
}
}
.goods-box{
margin-top:25rpx;
.goods-box {
margin-top: 25rpx;
background: #fff;
padding:30rpx 23rpx;
padding-top:0rpx;
padding: 30rpx 23rpx;
padding-top: 0rpx;
border-radius: 20rpx;
image{width:190rpx;height:190rpx;margin-right: 29rpx;border: 2rpx solid #F6F6F6;border-radius: 5rpx;}
image {
width: 190rpx;
height: 190rpx;
margin-right: 29rpx;
border: 2rpx solid #f6f6f6;
border-radius: 5rpx;
}
.group{
.group {
padding-bottom: 38rpx;
padding-top:30rpx;
border-bottom: 1rpx solid #E7E7E7;
.ganme{
padding-top: 30rpx;
border-bottom: 1rpx solid #e7e7e7;
.ganme {
font-size: 26rpx;
color: #000000;
line-height: 45rpx;
height:90rpx;
width:440rpx;
height: 90rpx;
width: 440rpx;
}
.hqs{
.hqs {
font-size: 26rpx;
color: #666666;
height:40rpx;
height: 40rpx;
line-height: 40rpx;
margin-top:20rpx;
margin-top: 20rpx;
}
.price{
.price {
font-size: 30rpx;
color: #000000;
line-height: 40rpx;
height:40rpx;
height: 40rpx;
line-height: 40rpx;
margin-top:10rpx;
margin-top: 10rpx;
}
}
}
.coupo-box{
.coupo-box {
border-radius: 20rpx;
margin-top:25rpx;
height:62rpx;
margin-top: 25rpx;
height: 62rpx;
font-size: 26rpx;
color: #000000;
line-height: 62rpx;
.r{
.r {
font-size: 26rpx;
color: #D0121B;
height:62rpx;
.icon{
color: #d0121b;
height: 62rpx;
.icon {
font-size: 16rpx;
color:#D0121B;
margin-left:25rpx;
color: #d0121b;
margin-left: 25rpx;
position: relative;
top:-3rpx;
top: -3rpx;
}
.not{
.not {
color: #999999;
.icon{
color:#898989;
.icon {
color: #898989;
}
}
}
}
.pur-sn-box{
.pur-sn-box {
background: #fff;
margin-top:25rpx;
padding:20rpx;
padding-bottom:32rpx;
margin-top: 25rpx;
padding: 20rpx;
padding-bottom: 32rpx;
border-radius: 20rpx;
.tit{
.tit {
font-size: 26rpx;
color: #000000;
line-height: 62rpx;
height:62rpx;
height: 62rpx;
}
.pur-sn-val{
.pur-sn-val {
height: 80rpx;
background: #F8F8F8;
background: #f8f8f8;
line-height: 80rpx;
border-radius: 5rpx;
border: 1rpx solid #E7E7E7;
border: 1rpx solid #e7e7e7;
font-size: 26rpx;
color: #000000;
padding:0 20rpx;
&:hover{
border: 1rpx solid #D0121B;
padding: 0 20rpx;
&:hover {
border: 1rpx solid #d0121b;
}
&.placeholder-class{
&.placeholder-class {
color: #808080;
font-size: 26rpx;
}
}
}
.price-infos{
padding:30rpx 20rpx;
.price-infos {
padding: 30rpx 20rpx;
background: #fff;
margin-top:25rpx;
margin-top: 25rpx;
border-radius: 20rpx;
.item{
.item {
font-size: 26rpx;
color: #000000;
line-height: 62rpx;
height:62rpx;
height: 62rpx;
}
.top{border-bottom:1rpx solid #E7E7E7;padding-bottom:20rpx;}
.bottom{
padding-top:25rpx;
.price-pay{
color:#D0121B;
.top {
border-bottom: 1rpx solid #e7e7e7;
padding-bottom: 20rpx;
}
.bottom {
padding-top: 25rpx;
.price-pay {
color: #d0121b;
}
}
.rules{
height:86rpx;
.icon{
}
.rules {
height: 86rpx;
.icon {
font-size: 30rpx;
color:#e5e5e5;
color: #e5e5e5;
}
.icon-checked{
color:#D0121B;
.icon-checked {
color: #d0121b;
}
.tklink{
.tklink {
font-size: 24rpx;
color: #000000;
margin-left: 16rpx;
}
}
}
.foot{
height:175rpx;
width:100%;
.foot {
height: 175rpx;
width: 100%;
position: fixed;
left:0rpx;
right:0rpx;
bottom:0rpx;
left: 0rpx;
right: 0rpx;
bottom: 0rpx;
z-index: 2;
background: #fff;
padding-left:40rpx;
padding-right:25rpx;
border-top:1rpx solid #E7E7E7;
.l{
padding-left: 40rpx;
padding-right: 25rpx;
border-top: 1rpx solid #e7e7e7;
.l {
font-size: 24rpx;
color: #000000;
text{
text {
font-size: 32rpx;
color: #D91800;
color: #d91800;
}
}
.submit-btn{
.submit-btn {
width: 288rpx;
height: 70rpx;
background: linear-gradient( 90deg, #F66F15 0%, #FE3014 100%);
background: linear-gradient(90deg, #f66f15 0%, #fe3014 100%);
border-radius: 100rpx;
font-size: 26rpx;
color: #FFFFFF;
color: #ffffff;
text-align: center;
line-height: 70rpx;
}
}
}
/**温馨提示输入邮箱**/
.pop-tips{
.pop-tips {
width: 100%;
background: #FFFFFF;
background: #ffffff;
border-radius: 10rpx 10rpx 0rpx 0rpx;
padding:24rpx 30rpx;
padding: 24rpx 30rpx;
position: relative;
padding-bottom: 150rpx;
.trt{
.trt {
text-align: right;
.icon{color:#898989;font-size: 25rpx;}
.icon {
color: #898989;
font-size: 25rpx;
}
}
.ttit{
.ttit {
width: 520rpx;
height: 53rpx;
font-size: 26rpx;
color: #000000;
line-height: 53rpx;
text-align: center;
margin:0 auto;
margin: 0 auto;
}
.tipjk{
.tipjk {
font-size: 22rpx;
color: #666666;
text-align: center;
}
.cons{
padding-bottom:80rpx;
padding-top:60rpx;
.label{
.cons {
padding-bottom: 80rpx;
padding-top: 60rpx;
.label {
font-size: 24rpx;
color: #000000;
width: 620rpx;
margin:0 auto;
text{
margin: 0 auto;
text {
font-size: 24rpx;
color: #D0121B;
color: #d0121b;
}
}
.inputv{
.inputv {
display: block;
width: 620rpx;
padding-left:20rpx;
margin:0 auto;
margin-top:15rpx;
padding-left: 20rpx;
margin: 0 auto;
margin-top: 15rpx;
height: 80rpx;
background: #FFFFFF;
background: #ffffff;
border-radius: 5rpx;
border: 1rpx solid #CACACA;
border: 1rpx solid #cacaca;
font-size: 24rpx;
color: #000000;
}
}
.sure{
.sure {
width: 100%;
height: 110rpx;
background: #D0121B;
background: #d0121b;
line-height: 110rpx;
text-align: center;
font-size: 30rpx;
color: #FFFFFF;
color: #ffffff;
position: absolute;
bottom:0rpx;
left:0rpx;
bottom: 0rpx;
left: 0rpx;
}
}
/**优惠券弹窗**/
.pop-yhq{
.pop-yhq {
width: 100%;
background: #FFFFFF;
background: #ffffff;
border-radius: 10rpx 10rpx 0rpx 0rpx;
padding:24rpx 30rpx;
padding: 24rpx 30rpx;
position: relative;
padding-bottom: 150rpx;
.trt{
.trt {
text-align: right;
.icon{color:#898989;font-size: 25rpx;}
.icon {
color: #898989;
font-size: 25rpx;
}
}
.tit{
.tit {
font-size: 24rpx;
color: #000000;
margin-bottom: 25rpx;
text-align: center;
}
.cons{
margin-top:68rpx;
max-height:800rpx;
.cons {
margin-top: 68rpx;
max-height: 800rpx;
overflow-y: auto;
.group{
height:180rpx;
margin-bottom:25rpx;
.group {
height: 180rpx;
margin-bottom: 25rpx;
background: url('https://img.ichunt.com/images/ichunt/202502/24/435bcc261a434392135ee0846ac99d60.png') no-repeat;
background-size: 100% 100%;
padding-left: 27rpx;
padding-right: 30rpx;
border-radius: 20rpx;
border:1rpx solid #fff;
&.act{
border:1rpx solid #D0121B;
border: 1rpx solid #fff;
&.act {
border: 1rpx solid #d0121b;
}
.l{
.price{
.l {
.price {
font-weight: 600;
font-size: 30rpx;
color: #FF3000;
.textp{
color: #ff3000;
.textp {
font-size: 60rpx;
color: #FF3000;
color: #ff3000;
}
margin-right: 68rpx;
.tips{
.tips {
font-size: 22rpx;
color: #FF6300;
color: #ff6300;
font-weight: normal;
}
}
.yhld{
.yhld {
font-size: 22rpx;
color: #FF6300;
view{
color: #ff6300;
view {
font-size: 35rpx;
color: #3B2C1B;
height:72rpx;
color: #3b2c1b;
height: 72rpx;
line-height: 65rpx;
}
}
}
.rbtn{
.rbtn {
width: 146rpx;
height: 58rpx;
background: linear-gradient( 180deg, #F6491D 0%, #F52A1B 100%);
background: linear-gradient(180deg, #f6491d 0%, #f52a1b 100%);
border-radius: 5rpx;
font-size: 26rpx;
color: #FFFFFF;
color: #ffffff;
text{
text {
background: url('https://img.ichunt.com/images/ichunt/202502/24/4ab2a242f3e45c0bafe3fb3207263ed2.png') no-repeat;
background-size: 100% 100%;
height:25rpx;
width:25rpx;
height: 25rpx;
width: 25rpx;
margin-left: 10rpx;
}
}
}
}
.add-btn{
.add-btn {
width: 100%;
height: 110rpx;
background: #D0121B;
background: #d0121b;
line-height: 110rpx;
text-align: center;
font-size: 30rpx;
color: #FFFFFF;
color: #ffffff;
position: absolute;
bottom:0rpx;
left:0rpx;
bottom: 0rpx;
left: 0rpx;
}
}
.classNavPage{
.bugc-ceng{
.classNavPage {
.bugc-ceng {
position: relative;
z-index: 1;
background: #fff;
}
.cons{
padding-top:23rpx;
.one-c-box{
padding-left:18rpx;
.cons {
padding-top: 23rpx;
.one-c-box {
padding-left: 18rpx;
position: relative;
padding-right:90rpx;
height:63rpx;
padding-right: 90rpx;
height: 63rpx;
.lb{
height:100%;
width:100%;
.lb {
height: 100%;
width: 100%;
overflow-x: auto;
.itemo{
.itemo {
height: 45rpx;
line-height: 45rpx;
padding:0 17rpx;
padding: 0 17rpx;
border-radius: 5rpx;
border: 1rpx solid #fff;
margin-right:25rpx;
margin-right: 25rpx;
font-size: 24rpx;
color: #000000;
flex-shrink: 0;
&.act{
border: 1rpx solid #D0121B;
background: #FFF5F5;
color: #D0121B;
&.act {
border: 1rpx solid #d0121b;
background: #fff5f5;
color: #d0121b;
}
}
}
.rb{
width:90rpx;
height:45rpx;
.rb {
width: 90rpx;
height: 45rpx;
position: absolute;
top:0rpx;
right:0rpx;
top: 0rpx;
right: 0rpx;
text-align: center;
.icon{
.icon {
font-size: 16rpx;
color:#000;
color: #000;
}
}
.one-c-hide-cons{
.one-c-hide-cons {
position: absolute;
z-index: 1;
width: 100%;
background: #FFFFFF;
background: #ffffff;
border-radius: 0rpx 0rpx 20rpx 20rpx;
top:-24rpx;
left:0rpx;
top: -24rpx;
left: 0rpx;
transition: max-height 0.5s;
max-height: 0;
overflow: hidden;
.tit{
.tit {
padding: 11rpx 30rpx;
font-size: 24rpx;
color: #000000;
margin-bottom: 35rpx;
}
.hide-sec{
.hide-sec {
flex-wrap: wrap;
padding-left:60rpx;
padding-bottom:40rpx;
.itemh{
padding-left: 60rpx;
padding-bottom: 40rpx;
.itemh {
margin-bottom: 40rpx;
margin-right: 33rpx;
&:nth-child(4n){
&:nth-child(4n) {
margin-right: 0rpx;
}
image{
image {
display: block;
width:106rpx;
height:106rpx;
margin:0 auto;
width: 106rpx;
height: 106rpx;
margin: 0 auto;
}
text{
margin-top:8rpx;
text {
margin-top: 8rpx;
display: block;
width:135rpx;
width: 135rpx;
text-align: center;
font-size: 24rpx;
color: #666666;
height:30rpx;
height: 30rpx;
line-height: 30rpx;
}
&.act{
text{color:#D0121B;}
&.act {
text {
color: #d0121b;
}
}
}
}
.foot{
height:87rpx;
.foot {
height: 87rpx;
font-size: 24rpx;
color: #000000;
border-top:1rpx solid #D1D1D1;
border-top: 1rpx solid #d1d1d1;
border-radius: 0rpx 0rpx 20rpx 20rpx;
.icon{
.icon {
font-size: 16rpx;
margin-left: 20rpx;
}
}
}
&.show{
.one-c-hide-cons{max-height: 700rpx;}
&::after{
content:"";
&.show {
.one-c-hide-cons {
max-height: 800rpx;
overflow-y: auto;
}
&::after {
content: '';
position: fixed;
left:0;
top:0;
right:0;
bottom:0;
background: rgba(0,0,0,0.3);
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
}
}
}
.two-c-box{
margin-top:20rpx;
height:calc(100vh - 175rpx - 130rpx);
.lc{
width:225rpx;
height:100%;
padding-top:40rpx;
.two-c-box {
margin-top: 20rpx;
height: calc(100vh - 175rpx - 130rpx);
.lc {
width: 225rpx;
height: 100%;
padding-top: 40rpx;
font-size: 24rpx;
color: #666666;
overflow-y: auto;
background: #f8f8f8;
.item{
padding:15rpx 0;
padding-left:35rpx;
padding-right:50rpx;
.item {
padding: 15rpx 0;
padding-left: 35rpx;
padding-right: 50rpx;
margin-bottom: 10rpx;
height:92rpx;
&.act{
height: 92rpx;
&.act {
color: #000000;
background: #fff;
border-radius: 100rpx 0 0 100rpx;
}
}
}
.rc{
width:525rpx;
height:100%;
.rc {
width: 525rpx;
height: 100%;
overflow-y: auto;
padding-left:35rpx;
.item{
padding-left: 35rpx;
.item {
margin-right: 35rpx;
width: 130rpx;
padding-bottom:20rpx;
padding-bottom: 20rpx;
//margin-bottom:10rpx;
display: inline-block;
height:227rpx;
&:nth-child(3n){
height: 227rpx;
&:nth-child(3n) {
margin-right: 0rpx;
}
image{
image {
width: 130rpx;
height: 130rpx;
margin-bottom: 12rpx;
display: block;
}
text{
text {
color: #000000;
width: 130rpx;
display: block;
line-height: 30rpx;
height:30rpx;
height: 30rpx;
text-align: center;
font-size: 24rpx;
color: #000000;
}
}
}
}
}
}
/* #ifdef H5 */
.classNavPage{
.two-c-box{
height:calc(100vh - 90rpx - 130rpx);
.classNavPage {
.two-c-box {
height: calc(100vh - 90rpx - 130rpx);
}
}
/* #endif */
......@@ -3,7 +3,7 @@
<barX />
<view class="header row verCenter">
<text class="icon iconfont icon-arrowleft" @click="$goBack"></text>
<view>{{id==1?'爱智网站服务协议':'爱智网隐私政策'}}</view>
<view>{{id==1?'爱智网站服务协议':'爱智隐私政策'}}</view>
</view>
<view class="content" v-html="content"></view>
</view>
......@@ -18,20 +18,20 @@
export default {
data() {
return {
id:1,
content:""
id: 1,
content: ""
}
},
onLoad: function(option) {
this.id=option.id
this.id = option.id
this.getData()
},
methods: {
getData(){
this.request(Api_Url + '/api/xcx/newsPage', 'GET', {type:this.id}, true).then(res => {
if(res.code==0){
this.content=res.data.content
}else{
getData() {
this.request(Api_Url + '/api/xcx/newsPage', 'GET', { type: this.id }, true).then(res => {
if (res.code == 0) {
this.content = res.data.content
} else {
uni.showToast({
title: res.msg,
icon: 'error'
......@@ -49,32 +49,35 @@
</script>
<style scoped lang="scss">
.rulePage{
.header{
height:110rpx;
padding-left:33rpx;
.icon{
.rulePage {
.header {
height: 110rpx;
padding-left: 33rpx;
.icon {
font-size: 35rpx;
color: #898989;
margin-right:160rpx;
margin-right: 160rpx;
}
view{
view {
font-weight: 600;
font-size: 32rpx;
color: #000000;
}
}
.content{
padding:33rpx;
padding-top:0rpx;
.content {
padding: 33rpx;
padding-top: 0rpx;
font-size: 26rpx;
color: #000000;
line-height: 50rpx;
letter-spacing: 1px;
overflow-y: auto;
height:calc(100vh - 285rpx);
height: calc(100vh - 285rpx);
/* #ifdef H5 */
height:calc(100vh - 200rpx);
height: calc(100vh - 200rpx);
/* #endif */
}
}
......
<template>
<view class="confirmQuotePage">
<barX />
<titleNav :title="'确认报价单'"/>
<titleNav :title="'确认报价单'" />
<view class="cons">
<view class="top-box">
<view class="tit">询价人:{{create_name}}</view>
<navigator :url="'/pages/user/address?form=confirmQuote&address_id='+address_id+'&coupon_id='+coupon_id" class="address-box">
<view class="tit">公司名称:{{priceInfo.company_name}}</view>
<!-- <navigator :url="'/pages/user/address?form=confirmQuote&address_id='+address_id+'&coupon_id='+coupon_id" class="address-box">
<view class="addbx row bothSide verCenter">
<view class="l">
<view class="ad row verCenter">
......@@ -17,7 +18,7 @@
</view>
<text class="icon iconfont icon-arrowright"></text>
</view>
</navigator>
</navigator> -->
</view>
<view class="goods-box" v-if="carList.length>0">
<view class="group row" v-for="(item,index) in carList" :key="index">
......@@ -43,10 +44,10 @@
</view>
</view>
</view>
<view class="pur-sn-box">
<!-- <view class="pur-sn-box">
<view class="tit">客户采购单号</view>
<input type="text" class="pur-sn-val" v-model="purchase_sn" placeholder-class="placeholder-class" placeholder="请输入采购单号"/>
</view>
<input type="text" class="pur-sn-val" v-model="purchase_sn" placeholder-class="placeholder-class" placeholder="请输入采购单号" />
</view> -->
<view class="price-infos" v-if="priceInfo">
<view class="top ">
<view class="item row bothSide"><text>商品含税总额</text><text>{{priceInfo.currency_sign}}{{priceInfo.all_amount}}</text></view>
......@@ -59,12 +60,11 @@
</view>
</view>
<view class="rules row verCenter">
<text class="icon iconfont icon-checked1" :class="{'icon-checked':isTest}"
@click="isTest=!isTest"></text>
<text class="icon iconfont icon-checked1" :class="{'icon-checked':isTest}" @click="isTest=!isTest"></text>
<navigator url="/pages/car/confirmRule" class="tklink">查看交易条款</navigator>
</view>
</view>
<view class="foot row verCenter bothSide " >
<view class="foot row verCenter bothSide ">
<view class="l row verCenter">含税总额:<text v-if="priceInfo">{{priceInfo.currency_sign}}{{priceInfo.pay_amount}}</text> </view>
<view class="submit-btn" @click="openTipsx">完成报价</view>
</view>
......@@ -118,128 +118,129 @@
</template>
<script>
import {Api_Url} from '@/util/api.js'
import { Api_Url } from '@/util/api.js'
import barX from '@/components/barx.vue';
import titleNav from '@/components/title_nav.vue';
export default {
data() {
return {
isTest:true,
pdf_email:"",
purchase_sn:"",
userInfo:"",
create_name:"",
address_id:"",
addressInfo:"",
carList:[],
coupon_list:[],
coupon_id:"",
priceInfo:"",
isCompany:(uni.getStorageSync('user_info')&&JSON.parse(uni.getStorageSync('user_info')).company_name)?true:false
isTest: true,
pdf_email: "",
purchase_sn: "",
userInfo: "",
create_name: "",
address_id: "",
addressInfo: "",
carList: [],
coupon_list: [],
coupon_id: "",
priceInfo: "",
isCompany: (uni.getStorageSync('user_info') && JSON.parse(uni.getStorageSync('user_info')).company_name) ? true : false
}
},
onLoad: function(options) {
this.address_id=options.address_id||""
this.coupon_id=options.coupon_id||""
this.userInfo=JSON.parse(uni.getStorageSync('user_info'))
this.create_name=this.userInfo.wx_nickname||this.userInfo.phone||this.userInfo.email
this.address_id = options.address_id || ""
this.coupon_id = options.coupon_id || ""
this.userInfo = JSON.parse(uni.getStorageSync('user_info'))
this.create_name = this.userInfo.wx_nickname || this.userInfo.phone || this.userInfo.email
},
onShow(){
onShow() {
this.getCarList()
this.getAddress()
//this.getAddress()
},
methods: {
chooseYhq(coupon_id){
this.coupon_id=coupon_id
chooseYhq(coupon_id) {
this.coupon_id = coupon_id
},
chooseUp(){
if(this.coupon_list==0){return}
chooseUp() {
if (this.coupon_list == 0) { return }
this.openPop()
},
confirmYhq(){
confirmYhq() {
this.calPrice()
this.closePop()
},
calPrice(){
let sku_=[]
this.carList.forEach(item=>{
calPrice() {
let sku_ = []
this.carList.forEach(item => {
sku_.push({
sku_id:item.goods_id,
num:item.goods_num
sku_id: item.goods_id,
num: item.goods_num
})
})
this.request(Api_Url + '/api/order/calQuotePrice', 'post', {sku_json:JSON.stringify(sku_),user_coupon_id:(this.coupon_id||"")}, true,true).then(res => {
if(res.code==0){
this.priceInfo=res.data
this.request(Api_Url + '/api/order/calQuotePrice', 'post', { sku_json: JSON.stringify(sku_), user_coupon_id: (this.coupon_id || "") }, true, true).then(res => {
if (res.code == 0) {
this.priceInfo = res.data;
this.pdf_email = res.data.recent_quote_email;
}
})
},
getCarList(){
this.carList=[]
this.request(Api_Url + '/api/cart/getCartGoodsInfo', 'GET', {sku_ids:uni.getStorageSync('car_ids')}, true,true).then(res => {
if(res.code==0){
let arr_=res.data.goods_list
arr_.forEach(item=>{
item.delivery_list.forEach(item1=>{
getCarList() {
this.carList = []
this.request(Api_Url + '/api/cart/getCartGoodsInfo', 'GET', { sku_ids: uni.getStorageSync('car_ids') }, true, true).then(res => {
if (res.code == 0) {
let arr_ = res.data.goods_list
arr_.forEach(item => {
item.delivery_list.forEach(item1 => {
this.carList.push(item1)
})
})
this.coupon_list=res.data.coupon_list||[]
this.coupon_list = res.data.coupon_list || []
this.calPrice()
}
})
},
getAddress(){
getAddress() {
this.request(Api_Url + '/api/address/getList', 'GET', {}, true).then(res => {
if(res.code==0){
let arr_=res.data.list||[]
arr_.forEach(item=>{
if(this.address_id){
if(item.address_id==this.address_id){
this.addressInfo=item
if (res.code == 0) {
let arr_ = res.data.list || []
arr_.forEach(item => {
if (this.address_id) {
if (item.address_id == this.address_id) {
this.addressInfo = item
}
}else{
if(item.is_default==1){
this.addressInfo=item
} else {
if (item.is_default == 1) {
this.addressInfo = item
}
}
})
if(arr_.length>0&&(!this.addressInfo)){
this.addressInfo=arr_[0]
if (arr_.length > 0 && (!this.addressInfo)) {
this.addressInfo = arr_[0]
}
if(this.addressInfo){
this.address_id=this.addressInfo.address_id
if (this.addressInfo) {
this.address_id = this.addressInfo.address_id
}
}
})
},
createQuote(){
createQuote() {
let goods_json_arr=[]
this.carList.forEach(item=>{
let goods_json_arr = []
this.carList.forEach(item => {
goods_json_arr.push({
sku_id:item.goods_id,
num:item.goods_num
sku_id: item.goods_id,
num: item.goods_num
})
})
let obj_={
create_name:this.create_name,
pdf_email:this.pdf_email,
sku_json:JSON.stringify(goods_json_arr),
user_coupon_id:this.coupon_id,
address_id:this.address_id,
purchase_sn:this.purchase_sn
let obj_ = {
create_name: this.create_name,
pdf_email: this.pdf_email,
sku_json: JSON.stringify(goods_json_arr),
user_coupon_id: this.coupon_id,
address_id: this.address_id,
purchase_sn: this.purchase_sn
}
this.request(Api_Url + '/api/xcx/confirmQuote', 'post', obj_, true).then(res => {
if(res.code==0){
uni.setStorageSync('quoteInfo',JSON.stringify(res.data))
if (res.code == 0) {
uni.setStorageSync('quoteInfo', JSON.stringify(res.data))
uni.navigateTo({
url: '/pages/car/confirmQuoteSuccess'
});
}else{
} else {
uni.showToast({
title: res.msg,
icon: 'nonde'
......@@ -249,21 +250,7 @@
})
},
openTipsx() {
if(!this.address_id){
uni.showToast({
title: '请选择地址',
icon: 'none'
});
return
}
if(!this.purchase_sn){
uni.showToast({
title: '请输入客户采购单号',
icon: 'none'
});
return
}
if(!this.isTest){
if (!this.isTest) {
uni.showToast({
title: '请勾选并确认交易条款',
icon: 'none'
......
......@@ -2,7 +2,7 @@
<view class="classNavPage">
<barX />
<view class="bugc-ceng">
<searchHead @confirm="onConfirm" @goUrl="goUrl"/>
<searchHead @confirm="onConfirm" @goUrl="goUrl" />
</view>
<view class="cons">
......@@ -11,19 +11,17 @@
<view class="itemo" :class="{'act':item.checkedx}" v-for="(item,index) in pageData" :key="index" @click="tab(1,item.base_id)">{{item.title}}</view>
</view>
<view class="rb row verCenter rowCenter" @click="isShowClassOne=!isShowClassOne">
<text :class="['icon','iconfont','icon-arrowxia']" ></text>
<text :class="['icon','iconfont','icon-arrowxia']"></text>
</view>
<view class="one-c-hide-cons">
<view class="tit">全部分类</view>
<view class="hide-sec row">
<view class="itemh" :class="{'act':item.checkedx}" v-for="(item,index) in pageData" :key="index" @click="tab(1,item.base_id)">
<image :src="item.images||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit" ></image>
<image :src="item.images||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit"></image>
<text class="elep">{{item.title}}</text>
</view>
</view>
<view class="foot row verCenter rowCenter" @click="isShowClassOne=!isShowClassOne">收起<text
class="icon iconfont icon-arrowshang"></text></view>
<view class="foot row verCenter rowCenter" @click="isShowClassOne=!isShowClassOne">收起<text class="icon iconfont icon-arrowshang"></text></view>
</view>
</view>
<view class="two-c-box row bothSide">
......@@ -32,7 +30,7 @@
</view>
<view class="rc ">
<navigator :url="'/pages/class/list?class_id2='+item.class_id" class="item" v-for="(item,index) in sanJlist" :key="index">
<image :src="item.class_icon||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit" ></image>
<image :src="item.class_icon||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit"></image>
<text class="elep">{{item.class_name}}</text>
</navigator>
......@@ -57,42 +55,42 @@
return {
isShowClassOne: false, //是否展示一级分类浮层
pageData: [],
erJList:[],
sanJlist:[],
class_id1:"",
class_id2:""
erJList: [],
sanJlist: [],
class_id1: "",
class_id2: ""
}
},
onLoad: function(option) {
this.class_id1=option.class_id1?option.class_id1:''
this.class_id2=option.class_id2?option.class_id2:''
this.class_id1 = option.class_id1 ? option.class_id1 : ''
this.class_id2 = option.class_id2 ? option.class_id2 : ''
this.getData()
},
methods: {
tab(type,id){
if(type==1){
this.pageData.forEach(item=>{
if(item.base_id==id){
item.checkedx=true
this.erJList=item.right_cate_list||[]
}else{
item.checkedx=false
tab(type, id) {
if (type == 1) {
this.pageData.forEach(item => {
if (item.base_id == id) {
item.checkedx = true
this.erJList = item.right_cate_list || []
} else {
item.checkedx = false
}
(this.erJList||[]).forEach((item1, index1) => {
(this.erJList || []).forEach((item1, index1) => {
if (index1 == 0) {
item1.checkedx = true
this.sanJlist=item1.children
this.sanJlist = item1.children
} else {
item1.checkedx = false
}
})
})
}else{
} else {
this.erJList.forEach((item1, index1) => {
if (item1.class_id == id) {
item1.checkedx = true
this.sanJlist=item1.children
this.sanJlist = item1.children
} else {
item1.checkedx = false
}
......@@ -101,36 +99,36 @@
},
getData() {
this.request(Api_Url + '/api/xcx/category', 'GET', {}, true).then(res => {
if(res.code==0){
if (res.code == 0) {
this.pageData = res.data.category_list || []
this.pageData.forEach((item, index) => {
if(this.class_id1){
if(this.class_id1==item.base_id){
if (this.class_id1) {
if (this.class_id1 == item.base_id) {
item.checkedx = true
this.erJList=item.right_cate_list||[]
}else{
this.erJList = item.right_cate_list || []
} else {
item.checkedx = false
}
}else{
} else {
if (index == 0) {
item.checkedx = true
this.erJList=item.right_cate_list||[]
this.erJList = item.right_cate_list || []
} else {
item.checkedx = false
}
}
(this.erJList||[]).forEach((item1, index1) => {
if(this.class_id2){
if(this.class_id2==item1.class_id){
(this.erJList || []).forEach((item1, index1) => {
if (this.class_id2) {
if (this.class_id2 == item1.class_id) {
item1.checkedx = true
this.sanJlist=item1.children
}else{
this.sanJlist = item1.children
} else {
item1.checkedx = false
}
}else{
} else {
if (index1 == 0) {
item1.checkedx = true
this.sanJlist=item1.children
this.sanJlist = item1.children
} else {
item1.checkedx = false
}
......@@ -139,7 +137,7 @@
})
})
}else{
} else {
uni.showToast({
title: res.msg,
icon: 'error'
......@@ -163,7 +161,7 @@
url: '/pages/search/list?k=' + key_
});
},
goUrl(){
goUrl() {
uni.navigateTo({
url: '/pages/search/nav'
});
......
<template>
<view class="goodsDetailPage" v-if="goods_info">
<barX />
<view class="header row verCenter" >
<view class="header row verCenter">
<text class="icon iconfont icon-arrowleft" @click="$goBack"></text>
<text class="tab-item" :class="{'act':pageTab==1}" @click="tab(1)">商品</text>
<text class="tab-item " :class="{'act':pageTab==2}" @click="tab(2)">详情</text>
</view>
<view class="goods_info">
<view class="swiper-box" v-if="images.length>0">
<swiper class="swiper" @change="handleSwiperChange" :indicator-dots="false" :autoplay="false"
:interval="3000" :duration="500">
<swiper class="swiper" @change="handleSwiperChange" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="500">
<swiper-item class="swiper-item" v-for="(item, index) in images" :key="index">
<image class="swiper-image" :src="item.thumbnail||'https://www.iedge.net/assets/images/common/defaultnew.png'" mode="aspectFit" />
</swiper-item>
......@@ -39,10 +38,8 @@
</view>
<view class="tag-box row"
v-if="goods_info.goods_tag&&goods_info.goods_tag.goods_tag_names&&goods_info.goods_tag.goods_tag_names.length>0">
<view class="tag" :class="{'tag1': index % 2 != 0, 'tag2': index % 2 == 0}"
v-for="(item,index) in goods_info.goods_tag.goods_tag_names" :key="index">{{item}}</view>
<view class="tag-box row" v-if="goods_info.goods_tag&&goods_info.goods_tag.goods_tag_names&&goods_info.goods_tag.goods_tag_names.length>0">
<view class="tag" :class="{'tag1': index % 2 != 0, 'tag2': index % 2 == 0}" v-for="(item,index) in goods_info.goods_tag.goods_tag_names" :key="index">{{item}}</view>
</view>
<view class="goods-name elep2">{{goods_info.sku_name}}</view>
<view class="attr-box">
......@@ -88,12 +85,12 @@
</view>
<view class="foot row verCenter bothSide" >
<view class="foot row verCenter bothSide">
<navigator class="item" :url='$globalData.KFQQ'>
<text class="icon iconfont icon-kfd"></text>
<view>客服</view>
</navigator>
<navigator class="item" url="/pages/car/list" >
<navigator class="item" url="/pages/car/list">
<text class="icon iconfont icon-card"></text>
<view>购物车</view>
</navigator>
......@@ -120,14 +117,14 @@
<view class="price1">¥ {{buyPrice}}</view>
<view class="hbha row verCenter bothSide">
<text class="icon iconfont icon-jian" @click="addjNum(goods_info.sku_id,1)"></text>
<input type="number" v-model="goods_numberx" @input="changeNum(goods_info.sku_id)"/>
<input type="number" v-model="goods_numberx" @input="changeNum(goods_info.sku_id)" />
<text class="icon iconfont icon-jia" @click="addjNum(goods_info.sku_id,2)"></text>
</view>
</view>
</view>
<view class="goods-box">
<view class="tit">型号</view>
<view class="item" :class="{'act':goods_id==item.goods_id}" v-for="(item,index) in goods_series" :key="index" >
<view class="item" :class="{'act':goods_id==item.goods_id}" v-for="(item,index) in goods_series" :key="index">
<text @click="changeSku(item.goods_id)">{{item.goods_name}}</text>
</view>
......@@ -142,14 +139,13 @@
<view class="trt"><text class="icon iconfont icon-caca" @click="closeAddList"></text></view>
<view class="ttit elep">{{goods_info.goods_name}}</view>
<view class="new-box row">
<text class="new-btn row verCenter" @click="openNewList">新建清单<text
class="icon iconfont icon-jia"></text></text>
<text class="new-btn row verCenter" @click="openNewList">新建清单<text class="icon iconfont icon-jia"></text></text>
</view>
<view class="list-box" v-if="qDList.length>0">
<view class="item row verCenter bothSide" v-for="(item,index) in qDList" :key="index">
<view class="row verCenter" @click.stop="chooseQd(item.list_id)">
<view class="l">
<text class="icon iconfont icon-checked1" :class="{'icon-checked':item.checked}" ></text>
<text class="icon iconfont icon-checked1" :class="{'icon-checked':item.checked}"></text>
</view>
<view class="c">
<view class="elep">{{item.list_name}}</view>
......@@ -179,7 +175,7 @@
<view class="trt"><text class="icon iconfont icon-caca" @click="closeNewList"></text></view>
<view class="ttit elep">新建清单</view>
<view class="cons">
<input type="text" class="inputv" v-model="list_name" placeholder="请输入清单名称,若未输入则显示商品编码;" />
<input type="text" class="inputv" v-model="list_name" placeholder="请输入清单名称,若未输入则显示商品分类;" />
</view>
<view class="add-list" @click="createList()">确认</view>
</view>
......@@ -197,10 +193,10 @@
export default {
data() {
return {
isLogin:uni.getStorageSync('token')?true:false,
goods_id_page:"",
buyPrice:"",
isCompany:(uni.getStorageSync('user_info')&&JSON.parse(uni.getStorageSync('user_info')).company_name)?true:false,
isLogin: uni.getStorageSync('token') ? true : false,
goods_id_page: "",
buyPrice: "",
isCompany: (uni.getStorageSync('user_info') && JSON.parse(uni.getStorageSync('user_info')).company_name) ? true : false,
productType: 1,
pageTab: 1,
productTop: 0,
......@@ -211,10 +207,10 @@
goods_numberx: 1, //购买数量
goods_id: "",
goods_info: "",
goods_series:[],
goods_series: [],
addType: 1,
list_name:"",//清单名字
qDList:[],
list_name: "", //清单名字
qDList: [],
miniShareOptions: {
title: '爱智工业平台',
path: '/pages/goods/detail?goods_id=',
......@@ -258,48 +254,48 @@
};
},
onLoad(option) {
this.goods_id_page=option.goods_id
this.goods_id_page = option.goods_id
this.goods_id = option.goods_id
this.getData()
this.getQdList()
this.miniShareOptions.path='/pages/goods/detail?goods_id='+option.goods_id
this.miniShareOptions.path = '/pages/goods/detail?goods_id=' + option.goods_id
},
onPageScroll(e) {
this.pageTab = 1
if (e.scrollTop >=300) {
if (e.scrollTop >= 300) {
this.pageTab = 2
}
},
methods: {
gocar(){
if(!uni.getStorageSync('token')){
gocar() {
if (!uni.getStorageSync('token')) {
uni.navigateTo({
url:"/pages/auth/login?referer="+encodeURIComponent(`/pages/goods/detail?goods_id=${this.goods_id_page}`)
url: "/pages/auth/login?referer=" + encodeURIComponent(`/pages/goods/detail?goods_id=${this.goods_id_page}`)
})
return
}
let obj_={
let obj_ = {
sku_id: this.goods_id,
goods_num:this.goods_numberx,
price:this.buyPrice,
guid_:this.addType,
goods_num: this.goods_numberx,
price: this.buyPrice,
guid_: this.addType,
}
if(this.addType==2){
obj_.is_cover_goods_num=1
if (this.addType == 2) {
obj_.is_cover_goods_num = 1
}
this.request(Api_Url + '/api/cart/addCart', 'GET', obj_, true).then(res => {
if (res.code == 0) {
if(this.addType==1){
if (this.addType == 1) {
uni.showToast({
title: "添加购物车成功",
icon: 'success'
});
this.close()
}else{
uni.setStorageSync('car_ids',this.goods_id);
uni.setStorageSync('confirmOrderBackUrl',`/pages/goods/detail?goods_id=${this.goods_id_page}`)
} else {
uni.setStorageSync('car_ids', this.goods_id);
uni.setStorageSync('confirmOrderBackUrl', `/pages/goods/detail?goods_id=${this.goods_id_page}`)
uni.navigateTo({
url:'/pages/car/confirmOrder'
url: '/pages/car/confirmOrder'
});
}
} else {
......@@ -311,17 +307,17 @@
});
},
changeNum(sku_id,type){
changeNum(sku_id, type) {
clearTimeout(this.timeout);
this.timeout = setTimeout(() => {
let result=this.goods_info
let result = this.goods_info
let mpl = Number(result.multiple||result.mpl);//倍数 加减的数量基数
let stock = Number(result.stock);//库存
let moq = Number(result.moq);//起订量
let value_ = Number(this.goods_numberx);//当前的数量
value_ = Math.ceil(value_ / mpl) * mpl;//失去焦点数量
this.goods_numberx = value_;//最终的数量
let mpl = Number(result.multiple || result.mpl); //倍数 加减的数量基数
let stock = Number(result.stock); //库存
let moq = Number(result.moq); //起订量
let value_ = Number(this.goods_numberx); //当前的数量
value_ = Math.ceil(value_ / mpl) * mpl; //失去焦点数量
this.goods_numberx = value_; //最终的数量
if (value_ < moq) {
this.goods_numberx = moq
}
......@@ -330,34 +326,34 @@
}
}, 800);
},
addjNum(sku_id,type){
let result=this.goods_info
addjNum(sku_id, type) {
let result = this.goods_info
let mpl = Number(result.multiple||result.mpl);//倍数 加减的数量基数
let stock = Number(result.stock);//库存
let moq = Number(result.moq);//起订量
let value_ = Number(this.goods_numberx);//当前的数量
if(type==1){
let mpl = Number(result.multiple || result.mpl); //倍数 加减的数量基数
let stock = Number(result.stock); //库存
let moq = Number(result.moq); //起订量
let value_ = Number(this.goods_numberx); //当前的数量
if (type == 1) {
//减法
var down_value = value_ - mpl;//减过后的值
var down_value = value_ - mpl; //减过后的值
if (down_value < moq) {
this.goods_numberx = moq;
uni.showToast({
title: '数量不能小于起订量',
duration: 2000,
icon:"none"
icon: "none"
})
} else {
this.goods_numberx=down_value
this.goods_numberx = down_value
}
}else{
} else {
//加法
var up_value = value_ + mpl;//加过后的值
var up_value = value_ + mpl; //加过后的值
if (up_value > stock) {
uni.showToast({
title: '数量不能大于库存',
duration: 2000,
icon:"none"
icon: "none"
})
this.goods_numberx = Math.floor(stock / mpl) * mpl;
} else {
......@@ -366,18 +362,18 @@
}
},
changeSku(sku_id){
this.goods_id=sku_id
changeSku(sku_id) {
this.goods_id = sku_id
this.getData(1)
},
pdfPre(){
pdfPre() {
uni.downloadFile({
url: this.goods_info.pdf,
success: function (res) {
success: function(res) {
uni.openDocument({
filePath: res.tempFilePath,
showMenu: true,
success: function (res) {
success: function(res) {
console.log('打开文档成功');
}
});
......@@ -390,29 +386,29 @@
}, true).then(res => {
if (res.code == 0) {
this.goods_info = res.data.goods_info
this.miniShareOptions.title=this.goods_info.goods_name+" "+this.goods_info.class_name
if(this.goods_info.sku_detail){
this.goods_info.sku_detail=this.goods_info.sku_detail.replace(/<img/gi, '<img class="img-style"')
this.miniShareOptions.title = this.goods_info.goods_name + " " + this.goods_info.class_name
if (this.goods_info.sku_detail) {
this.goods_info.sku_detail = this.goods_info.sku_detail.replace(/<img/gi, '<img class="img-style"')
}
this.goods_numberx=Number(this.goods_info.moq)
this.buyPrice=0;
if(this.goods_info.ladder_price&&this.goods_info.ladder_price.length>0){
this.buyPrice=this.isCompany?(this.goods_info['ladder_price'][1]['price_cn']||0):(this.goods_info['ladder_price'][0]['price_cn']||0)
this.goods_numberx = Number(this.goods_info.moq)
this.buyPrice = 0;
if (this.goods_info.ladder_price && this.goods_info.ladder_price.length > 0) {
this.buyPrice = this.isCompany ? (this.goods_info['ladder_price'][1]['price_cn'] || 0) : (this.goods_info['ladder_price'][0]['price_cn'] || 0)
}
if(!type){
this.goods_series=res.data.goods_series||[]
if (!type) {
this.goods_series = res.data.goods_series || []
this.goods_series.sort((a, b) => {
if (a.goods_id == this.goods_id) return -1;
if (b.goods_id == this.goods_id) return 1;
return 0;
});
}
this.images =[{name:"default.png",thumbnail:res.data.goods_info.goods_images||""},...(res.data.goods_info.spu_extra.image_list || [])]
setTimeout(()=>{
this.images = [{ name: "default.png", thumbnail: res.data.goods_info.goods_images || "" }, ...(res.data.goods_info.spu_extra.image_list || [])]
setTimeout(() => {
this.calculatePositions();
},100)
}, 100)
} else {
uni.showToast({
title: res.msg,
......@@ -439,41 +435,41 @@
},
handleSwiperChange(e) {
this.currentPage = e.detail.current;
setTimeout(()=>{
setTimeout(() => {
this.calculatePositions();
},100)
}, 100)
},
getQdList(){
if(!uni.getStorageSync('token')){return}
this.request(Api_Url + '/api/xcx/getGoodsList', 'get', {page:1,limit:100}, false).then(res => {
this.qDList=[]
if(res.code==0){
let arr_=res.data.list||[]
arr_.forEach(item=>{
item.checked=false
getQdList() {
if (!uni.getStorageSync('token')) { return }
this.request(Api_Url + '/api/xcx/getGoodsList', 'get', { page: 1, limit: 100 }, false).then(res => {
this.qDList = []
if (res.code == 0) {
let arr_ = res.data.list || []
arr_.forEach(item => {
item.checked = false
})
this.qDList=arr_
this.qDList = arr_
}
})
},
chooseQd(list_id){
this.qDList.forEach(item=>{
if(item.list_id==list_id){
item.checked=!item.checked
chooseQd(list_id) {
this.qDList.forEach(item => {
if (item.list_id == list_id) {
item.checked = !item.checked
}
})
},
createList(){
this.request(Api_Url + '/api/xcx/createGoodsList', 'post', {list_name:(this.list_name||this.goods_info.class_name)}, true).then(res => {
if(res.code==0){
createList() {
this.request(Api_Url + '/api/xcx/createGoodsList', 'post', { list_name: (this.list_name || this.goods_info.class_name) }, true).then(res => {
if (res.code == 0) {
uni.showToast({
title: "创建清单成功",
icon: 'success'
});
this.closeNewList()
this.getQdList()
}else{
} else {
uni.showToast({
title: res.msg,
icon: 'nonde'
......@@ -482,35 +478,33 @@
})
},
addQdList(){
let checkList=this.qDList.filter(item=>item.checked)
let ids_=checkList.map(item=>item.list_id)
if(checkList.length==0){
addQdList() {
let checkList = this.qDList.filter(item => item.checked)
let ids_ = checkList.map(item => item.list_id)
if (checkList.length == 0) {
uni.showToast({
title: "请选择一条清单",
icon: 'none'
});
return
}
let sku_json=[
{
sku_id:this.goods_id,
qty:this.goods_numberx
}
]
let sku_json = [{
sku_id: this.goods_id,
qty: this.goods_numberx
}]
this.request(Api_Url + '/api/xcx/addGoodsList', 'post', {
list_id:ids_.join(","),
sku_json:JSON.stringify(sku_json)
list_id: ids_.join(","),
sku_json: JSON.stringify(sku_json)
}, true).then(res => {
if(res.code==0){
if (res.code == 0) {
uni.showToast({
title: "加入清单成功",
icon: 'success'
});
this.closeAddList()
this.getQdList()
}else{
} else {
uni.showToast({
title: res.msg,
icon: 'nonde'
......@@ -528,9 +522,9 @@
this.$refs.popupcar.close('bottom');
},
openAddList() {
if(!uni.getStorageSync('token')){
if (!uni.getStorageSync('token')) {
uni.navigateTo({
url:"/pages/auth/login?referer="+encodeURIComponent(`/pages/goods/detail?goods_id=${this.goods_id_page}`)
url: "/pages/auth/login?referer=" + encodeURIComponent(`/pages/goods/detail?goods_id=${this.goods_id_page}`)
})
return
}
......
......@@ -14,8 +14,7 @@
<view class="c">{{item.detail_address}}</view>
<view class="b row bothSide">
<view class="l row verCenter" @click="setdefault(item.address_id)" v-if="!form">
<text class="icon iconfont icon-checked1"
:class="{'icon-checked':item.is_default==1}"></text>
<text class="icon iconfont icon-checked1" :class="{'icon-checked':item.is_default==1}"></text>
<text>{{item.is_default==1?"已默认":"设为默认"}}</text>
</view>
<view v-else></view>
......@@ -27,7 +26,7 @@
<view class="r row verCenter">
<text @click.stop="deleteAdress(item.address_id)">删除</text>
<text @click.stop="copy(item)">复制</text>
<!-- <text @click.stop="copy(item)">复制</text> -->
<view @click.stop="goUpdate(item.address_id)">修改</view>
</view>
</view>
......@@ -55,57 +54,57 @@
data() {
return {
isInit: false, //记录是否加载了数据
form:"",
address_id:"",
invoice_id:"",
coupon_id:"",
form: "",
address_id: "",
invoice_id: "",
coupon_id: "",
list: [],
}
},
onLoad: function(options) {
this.form=options.form||""
this.address_id=options.address_id||""
this.invoice_id=options.invoice_id||""
this.coupon_id=options.coupon_id||""
this.form = options.form || ""
this.address_id = options.address_id || ""
this.invoice_id = options.invoice_id || ""
this.coupon_id = options.coupon_id || ""
},
onShow() {
this.getData();
},
methods: {
goUpdate(address_id){
goUpdate(address_id) {
uni.navigateTo({
url:'/pages/user/addressEdit?address_id=' + address_id
url: '/pages/user/addressEdit?address_id=' + address_id
})
},
setChoose(address_id){
if(!this.form){return}
let address_id_go=""
this.list.forEach(item=>{
item.checkedx=false
if(address_id==item.address_id){
item.checkedx=true
address_id_go=item.address_id
setChoose(address_id) {
if (!this.form) { return }
let address_id_go = ""
this.list.forEach(item => {
item.checkedx = false
if (address_id == item.address_id) {
item.checkedx = true
address_id_go = item.address_id
}
})
setTimeout(()=>{
if(this.form=="confirmQuote"){
setTimeout(() => {
if (this.form == "confirmQuote") {
//报价过来
uni.navigateTo({
url: '/pages/car/confirmQuote?address_id='+address_id_go+'&coupon_id='+this.coupon_id
url: '/pages/car/confirmQuote?address_id=' + address_id_go + '&coupon_id=' + this.coupon_id
});
return
}
uni.navigateTo({
url: '/pages/car/confirmOrder?address_id='+address_id_go+'&coupon_id='+this.coupon_id+'&invoice_id='+this.invoice_id
url: '/pages/car/confirmOrder?address_id=' + address_id_go + '&coupon_id=' + this.coupon_id + '&invoice_id=' + this.invoice_id
});
},200);
}, 200);
},
copy(item){
copy(item) {
uni.setClipboardData({
data: (item.nation_cn!="中国"?item.nation_cn:'')+item.province_val+' '+item.city_val+' '+item.district_val+' '+item.detail_address,
success: function () {
data: (item.nation_cn != "中国" ? item.nation_cn : '') + item.province_val + ' ' + item.city_val + ' ' + item.district_val + ' ' + item.detail_address,
success: function() {
uni.showToast({
title: '复制成功',
icon: 'success'
......@@ -164,14 +163,14 @@
p: 1
}
this.request(Api_Url + '/api/address/getList', 'GET', obj_, (loading?false:true)).then(res => {
this.request(Api_Url + '/api/address/getList', 'GET', obj_, (loading ? false : true)).then(res => {
if (res.code == 0) {
this.isInit = 1;
let arr_ = res.data.list || []
arr_.forEach(item=>{
item.checkedx=false
if(item.address_id==this.address_id){
item.checkedx=true
arr_.forEach(item => {
item.checkedx = false
if (item.address_id == this.address_id) {
item.checkedx = true
}
})
this.list = arr_
......
......@@ -11,12 +11,12 @@
</view>
<view class="input-group row verCenter">
<text class="label">手机号</text>
<picker @change="bindPickerChange($event)" :value="areaIndex" :range="areaArray"
:range-key="'name'">
<text class="areabox-but "><text class="but-val">{{areaArray[areaIndex].value}}</text><text
class="icon iconfont icon-arrowxia"></text></text>
<picker @change="bindPickerChange($event)" :value="areaIndex" :range="areaArray" :range-key="'name'">
<view class="areabox-but ">
<text class="but-val">{{areaArray[areaIndex].value}}</text>
<text class="icon iconfont icon-arrowxia"></text>
</view>
</picker>
<input type="number" v-model="formParams.mobile" placeholder="请输入手机号" placeholder-class="placeholder-class" />
</view>
<view class="input-group row verCenter">
......@@ -78,27 +78,27 @@
areaArray: [{
name: "0086(中国大陆)",
value: '0086'
},
{
name: "00852(中国香港)",
value: '00852'
},
{
name: "00853(中国澳门)",
value: '00853'
},
{
name: "00886(中国台湾)",
value: '00886'
},
{
name: "0066(泰国)",
value: '0066'
},
{
name: "0084(越南)",
value: '0084'
}
// {
// name: "00852(中国香港)",
// value: '00852'
// },
// {
// name: "00853(中国澳门)",
// value: '00853'
// },
// {
// name: "00886(中国台湾)",
// value: '00886'
// },
// {
// name: "0066(泰国)",
// value: '0066'
// },
// {
// name: "0084(越南)",
// value: '0084'
// }
],
}
},
......@@ -237,7 +237,7 @@
return false;
}
let reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
if ((!this.formParams.mobile) || ((this.formParams.intl_code=="0086")&&!reg.test(this.formParams.mobile))) {
if ((!this.formParams.mobile) || ((this.formParams.intl_code == "0086") && !reg.test(this.formParams.mobile))) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
......
......@@ -5,38 +5,34 @@
<view class="cons">
<view class="input-box">
<view class="input-group row verCenter" >
<view class="input-group row verCenter">
<text class="label required">公司名称</text>
<input type="text" v-model="formParams.com_name" placeholder="请输入公司名称" placeholder-class="placeholder-class" />
<input type="text" v-model="formParams.com_name" placeholder="请输入公司名称" placeholder-class="placeholder-class" @blur="tianyancha()" />
</view>
<view class="input-group row verCenter" >
<view class="input-group row verCenter">
<text class="label required ">公司税号</text>
<input type="text" v-model="formParams.tax_no" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" />
</view>
<view class="input-group row verCenter" >
<view class="input-group row verCenter">
<text class="label required">公司电话</text>
<input type="text" v-model="formParams.com_tel" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" />
</view>
<view class="input-group row verCenter" >
<view class="input-group row verCenter">
<text class="label required">注册地址</text>
<input type="text" v-model="formParams.com_addr" placeholder="系统自动查询后补充" placeholder-class="placeholder-class" />
</view>
<view class="input-group row verCenter">
<text class="label required" >联系人</text>
<text class="label required">联系人</text>
<input type="text" v-model="formParams.contact_person" placeholder="请输入联系人" placeholder-class="placeholder-class" />
</view>
<view class="input-group row verCenter">
<text class="label required" >联系电话</text>
<text class="label required">联系电话</text>
<input type="text" v-model="formParams.contact_phone" placeholder="请输入联系电话" placeholder-class="placeholder-class" />
</view>
<view class="input-group row verCenter">
<text class="label required">邮箱</text>
<input type="text" v-model="formParams.email" placeholder="请输入邮箱" placeholder-class="placeholder-class" />
</view>
</view>
</view>
......@@ -56,22 +52,22 @@
export default {
data() {
return {
id:"",
formParams:{
id: "",
formParams: {
com_name: "",
tax_no:"" ,
tax_no: "",
com_tel: "",
com_addr: "",
contact_person:"",
contact_phone:"",
email:""
contact_person: "",
contact_phone: "",
email: ""
},
certification:[]
certification: []
}
},
onLoad: function(options) {
this.id=options.id||""
if(this.id){
this.id = options.id || ""
if (this.id) {
this.getData()
}
......@@ -80,86 +76,111 @@
},
methods: {
getData(){
getData() {
//获取用户信息
this.request(Api_Url + '/api/user/info', 'GET', {}, true).then(res => {
if (res.code == 0) {
let arr_=res.data.certification||[]
this.certification=arr_.filter(item=>item.id==this.id)
this.formParams={
let arr_ = res.data.certification || []
this.certification = arr_.filter(item => item.id == this.id)
this.formParams = {
...this.certification[0]
}
}
});
},
changeTab(inv_type){
this.formParams.inv_type=inv_type
/**
* 天眼查
*/
tianyancha() {
if (!this.formParams.com_name) { return }
this.request(Api_Url + '/api/user/tianyancha', 'GET', { company_name: this.formParams.com_name }, false).then(res => {
if (res.code == 0) {
if (!res.data.com_name) {
uni.showToast({
title: '天眼查没有查到该公司信息',
icon: 'none'
});
}
this.formParams.com_name = res.data.com_name;
this.formParams.tax_no = res.data.tax_number;
this.formParams.com_tel = res.data.phone_number;
this.formParams.com_addr = res.data.com_address;
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
changeTab(inv_type) {
this.formParams.inv_type = inv_type
console.log(this.formParams.inv_type)
},
onSwitchChange(e) {
this.formParams.is_default = e.detail.value ? 1 : 0;
},
submitI(){
submitI() {
if(!this.formParams.com_name){
if (!this.formParams.com_name) {
uni.showToast({
title: '公司名称不能为空',
icon: 'none'
});
return;
}
if(!this.formParams.tax_no){
if (!this.formParams.tax_no) {
uni.showToast({
title: '公司税号不能为空',
icon: 'none'
});
return;
}
if(!this.formParams.com_tel){
if (!this.formParams.com_tel) {
uni.showToast({
title: '公司电话不能为空',
icon: 'none'
});
return;
}
if(!this.formParams.com_addr){
if (!this.formParams.com_addr) {
uni.showToast({
title: '注册地址不能为空',
icon: 'none'
});
return;
}
if(!this.formParams.contact_person){
if (!this.formParams.contact_person) {
uni.showToast({
title: '联系人不能为空',
icon: 'none'
});
return;
}
if(!this.formParams.contact_phone){
if (!this.formParams.contact_phone) {
uni.showToast({
title: '联系电话不能为空',
icon: 'none'
});
return;
}
if(!this.formParams.email){
if (!this.formParams.email) {
uni.showToast({
title: '邮箱不能为空',
icon: 'none'
});
return;
}
let url='/api/com/add'
if(this.id){
this.formParams.id=this.id
url='/api/com/edit'
let url = '/api/com/add'
if (this.id) {
this.formParams.id = this.id
url = '/api/com/edit'
}
this.request(Api_Url + url, 'POST', this.formParams, true).then(res => {
if (res.code == 0) {
uni.showToast({
title: this.id?'编辑成功':'新增成功',
title: this.id ? '编辑成功' : '新增成功',
icon: 'success'
});
setTimeout(() => {
......
let _env = ""
let api_url=""
let api_url = ""
if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
if (process.env.NODE_ENV === 'production') { // H5 生产环境
_env = 'release'
......@@ -8,7 +8,7 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
}
api_url = _env == 'release' ? 'https://www.iedge.net' : ''
console.log(api_url,_env)
console.log(api_url, _env)
} else if (process.env.UNI_PLATFORM === 'mp-weixin') { // 判断是否为微信小程序平台
_env = uni.getAccountInfoSync().miniProgram.envVersion //develop: trial: release:
// if (_env != 'develop') {
......@@ -18,12 +18,11 @@ if (process.env.UNI_PLATFORM === 'h5') { // 判断是否为 H5 平台
api_url = _env == 'release' ? 'https://www.iedge.net' : 'http://iedge.liexindev.net'
//api_url ='https://www.iedge.net'
console.log(api_url,_env)
//api_url = 'https://www.iedge.net'
console.log(api_url, _env)
} else { // 其他平台(如 App 等)
}
export const Api_Url=api_url
export const Api_Url = api_url
\ No newline at end of file
......@@ -4,7 +4,7 @@ export default {
miniShareOptions: {
title: '爱智工业平台',
path: '/pages/index/index',
imageUrl: 'https://img.ichunt.com/images/ichunt/202503/11/8bd43dcc1b28a3fd8c417ac0c6410406.png',
imageUrl: 'https://img.ichunt.com/images/ichunt/202503/19/cdaebc710d636541b8d9916210b46a49.png',
desc: ''
}
};
......@@ -24,7 +24,7 @@ export default {
return {
title: '爱智工业平台',
path: '/pages/index/index',
imageUrl: 'https://img.ichunt.com/images/ichunt/202503/11/8bd43dcc1b28a3fd8c417ac0c6410406.png',
imageUrl: 'https://img.ichunt.com/images/ichunt/202503/19/cdaebc710d636541b8d9916210b46a49.png',
success: () => {
uni.showToast({ title: '分享成功', icon: 'success' });
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment