Browse Source

对接登录

master
前端-胡立永 7 months ago
parent
commit
fe21e78da2
9 changed files with 1238 additions and 1120 deletions
  1. +6
    -0
      api/api.js
  2. +2
    -1
      components/base/topbar.vue
  3. +1
    -1
      pages/index/index.vue
  4. +298
    -287
      pages/index/tradingPlatform.vue
  5. +101
    -29
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  6. +53
    -28
      pages_order/center/systemSet.vue
  7. +225
    -240
      pages_order/components/address/addressList.vue
  8. +2
    -2
      pages_order/components/order/orderList.vue
  9. +550
    -532
      pages_order/order/offerOrBillLading.vue

+ 6
- 0
api/api.js View File

@ -62,6 +62,12 @@ const config = {
method: 'POST',
limit : 1000,
},
// 忘记密码
newPassword: {
url: '/alUser/newPassword',
method: 'POST',
limit : 1000,
},
// ========================产品报价===============================
// 清关申请


+ 2
- 1
components/base/topbar.vue View File

@ -9,7 +9,8 @@
</view>
<!--右边-->
<view v-if="showRight == '1'" @click="switchIdentity" class="change">
{{ $t('pages.index.index.purchaser') }}
<!-- {{ $t('pages.index.index.purchaser') }} -->
{{ userShop ? '供应商' : '采购商' }}
</view>
</view>
</template>


+ 1
- 1
pages/index/index.vue View File

@ -25,7 +25,7 @@
<view class="left">
<!--<span>Company Profile</span>-->
<span> {{ $t('pages.index.index.companyProfile') }}</span>
<span class="subText"> {{ $t('pages.index.index.aluminiumProduct') }}</span>
<span class="subText"> {{ $t('pages.index.index.aluminiumProduct') }}</span>
</view>
<view class="right">
随着全球经济的快速发展我们这家领先的企业公司应运而生致力于为客户提供卓越的服务和优质的产品我们公司成立于2001年总部位于深圳市横岗大厦拥有广泛的业务领域和专业的团队专注于实现客户的期望和需求


+ 298
- 287
pages/index/tradingPlatform.vue View File

@ -1,304 +1,315 @@
<template>
<view class="trading-platform">
<view class="trading-platform">
<topbar showRight="0"></topbar>
<topbar showRight="0"></topbar>
<view class="frame">
<!--顶部栏-->
<view class="frame">
<!--顶部栏-->
<!--折线图-->
<div ref="chartContainer" class="chart" style="width: 100%; height: 300px;">
<!--折线图-->
<div ref="chartContainer" class="chart" style="width: 100%; height: 300px;">
</div>
</div>
<!-- 供应商 -->
<view v-if="userShop" class="supplier">
<!-- 供应商 -->
<view v-if="userShop" class="supplier">
<view class="purchaser-title" style="">
<span class="active"> {{ $t('other.orderList') }}</span>
</view>
<view class="purchaser-title" style="">
<span class="active"> {{ $t('other.orderList') }}</span>
</view>
<view class="supplierList">
<orderList :list="list"/>
</view>
</view>
<view class="supplierList">
<orderList :list="list" />
</view>
</view>
<!-- 采购商 -->
<view v-else class="purchaser">
<!--切换现货/期货-->
<view class="purchaser-title" style="">
<span v-for="(item, index) in type" :class="actionIndex == index ? 'active' : 'noactive'"
@click="actionIndexChange(index)">{{ item.name }}</span>
</view>
<view class="productList">
<productList :list="list"/>
</view>
</view>
</view>
<tabber select="1"/>
</view>
<!-- 采购商 -->
<view v-else class="purchaser">
<!--切换现货/期货-->
<view class="purchaser-title" style="">
<span v-for="(item, index) in type" :class="actionIndex == index ? 'active' : 'noactive'"
@click="actionIndexChange(index)">{{ item.name }}</span>
</view>
<view class="productList">
<productList :list="list" />
</view>
</view>
</view>
<tabber select="1" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import topbar from "@/components/base/topbar.vue";
import {mapGetters} from 'vuex'
import ProductList from "@/components/user/productList.vue";
import OrderList from "@/pages_order/components/order/orderList.vue";
import mixinList from '@/mixins/list.js'
import * as echarts from 'echarts';
export default {
mixins: [mixinList],
components: {
OrderList,
ProductList,
topbar,
tabber,
},
computed: {
...mapGetters(['userShop']),
},
data() {
return {
actionIndex: 0,
mixinsListApi: 'getMyProductlist',
type: [
{
name: this.$t('other.spotTrading')
},
{
name: this.$t('other.futuresTrading')
},
],
chartData: [
// {date: "08/16", value: 10},
// {date: "08/17", value: 15},
// {date: "08/18", value: 45},
// {date: "08/19", value: 20},
// {date: "08/20", value: 18},
// {date: "08/21", value: 10},
// {date: "08/22", value: 15},
// {date: "08/23", value: 25},
// {date: "08/24", value: 35},
// {date: "08/25", value: 30},
// {date: "08/26", value: 25},
// {date: "08/27", value: 25},
],
unit: '元/吨',
}
},
onLoad() {
if (this.userShop) {
// /
this.mixinsListApi = 'productList'
} else {
//
this.mixinsListApi = 'productlist'
this.queryParams.productType = this.actionIndex
}
},
mounted() {
// this.getAlPrice()
// setTimeout(() => {
// this.initChart();
// })
},
onShow() {
this.getAlPrice()
},
methods: {
getAlPrice() {
this.$api('getAlPrice', res => {
this.unit = res.result.unit
this.chartData = res.result.data
this.initChart(res.result.data)
})
},
initChart(data) {
var that = this;
const chartContainer = this.$refs.chartContainer;
if (!chartContainer) {
console.error("Chart container not found");
return;
}
const myChart = echarts.init(chartContainer);
//
const dates = data.map(item => item.date);
const values = data.map(item => item.value);
// ECharts
const option = {
backgroundColor: '#1B263B',
title: {
text: `${'铝均价' + data[0].value}`,
right: '10%',
top: '10%',
textStyle: {
color: '#fff',
fontSize: 14
}
},
tooltip: {
trigger: 'axis',
formatter: '{c0}',
backgroundColor: '#3A506B',
textStyle: {
color: '#fff'
}
},
grid: {
left: '10%',
right: '10%',
bottom: '20%'
},
xAxis: {
type: 'category',
data: dates,
axisLine: {
lineStyle: {
color: '#fff'
}
},
axisLabel: {
color: '#fff'
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: '#fff'
}
},
axisLabel: {
color: '#fff',
formatter: function (value) {
return value;
}
}
},
series: [{
name: '长江',
type: 'line',
data: values,
smooth: true,
symbol: 'circle',
symbolSize: 8,
itemStyle: {
color: '#4ECDC4'
},
lineStyle: {
color: '#4ECDC4',
width: 2
},
areaStyle: {
color: 'rgba(78, 205, 196, 0.2)'
},
}]
};
myChart.setOption(option);
},
// tab
actionIndexChange(index) {
// index0index1
this.actionIndex = index;
this.queryParams.productType = this.actionIndex
this.getData()
},
}
}
import tabber from '@/components/base/tabbar.vue'
import topbar from "@/components/base/topbar.vue";
import {
mapGetters
} from 'vuex'
import ProductList from "@/components/user/productList.vue";
import OrderList from "@/pages_order/components/order/orderList.vue";
import mixinList from '@/mixins/list.js'
import * as echarts from 'echarts';
export default {
mixins: [mixinList],
components: {
OrderList,
ProductList,
topbar,
tabber,
},
computed: {
...mapGetters(['userShop']),
},
data() {
return {
actionIndex: 0,
mixinsListApi: 'getMyProductlist',
type: [{
name: this.$t('other.spotTrading')
},
{
name: this.$t('other.futuresTrading')
},
],
chartData: [
// {date: "08/16", value: 10},
// {date: "08/17", value: 15},
// {date: "08/18", value: 45},
// {date: "08/19", value: 20},
// {date: "08/20", value: 18},
// {date: "08/21", value: 10},
// {date: "08/22", value: 15},
// {date: "08/23", value: 25},
// {date: "08/24", value: 35},
// {date: "08/25", value: 30},
// {date: "08/26", value: 25},
// {date: "08/27", value: 25},
],
unit: '元/吨',
}
},
onLoad() {
if (this.userShop) {
// /
this.mixinsListApi = 'productList'
} else {
//
this.mixinsListApi = 'productlist'
this.queryParams.productType = this.actionIndex
}
},
mounted() {
// this.getAlPrice()
// setTimeout(() => {
// this.initChart();
// })
},
onShow() {
this.getAlPrice()
},
methods: {
getAlPrice() {
this.$api('getAlPrice', res => {
this.unit = res.result.unit
this.chartData = res.result.data
this.initChart(res.result.data)
})
},
initChart(data) {
var that = this;
const chartContainer = this.$refs.chartContainer;
if (!chartContainer) {
console.error("Chart container not found");
return;
}
const myChart = echarts.init(chartContainer);
//
const dates = data.map(item => item.date).splice(0, 48);
const values = data.map(item => item.value).splice(0, 48);
//
let sum = 0
values.forEach(n => {
sum += parseFloat(n)
})
console.log(sum);
// ECharts
const option = {
backgroundColor: '#1B263B',
title: {
text: `${'铝均价' + (sum / values.length).toFixed(4)}`,
right: '10%',
top: '10%',
textStyle: {
color: '#fff',
fontSize: 14
}
},
tooltip: {
trigger: 'axis',
formatter: '{c0}',
backgroundColor: '#3A506B',
textStyle: {
color: '#fff'
}
},
grid: {
left: '10%',
right: '10%',
bottom: '20%'
},
xAxis: {
type: 'category',
data: dates,
axisLine: {
lineStyle: {
color: '#fff'
}
},
axisLabel: {
color: '#fff'
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: '#fff'
}
},
axisLabel: {
color: '#fff',
formatter: function(value) {
return value;
}
}
},
series: [{
name: '长江',
type: 'line',
data: values,
smooth: true,
symbol: 'circle',
symbolSize: 8,
itemStyle: {
color: '#4ECDC4'
},
lineStyle: {
color: '#4ECDC4',
width: 2
},
areaStyle: {
color: 'rgba(78, 205, 196, 0.2)'
},
}]
};
myChart.setOption(option);
},
// tab
actionIndexChange(index) {
// index0index1
this.actionIndex = index;
this.queryParams.productType = this.actionIndex
this.getData()
},
}
}
</script>
<style scoped lang="scss">
.trading-platform {
background-image: url('../../static/image/index/1.png');
.frame {
display: flex;
flex-direction: column;
justify-content: center;
height: calc(100vh - 120rpx - 120rpx);
.chart {
height: 300px !important;
background-color: #1B263B; /* 背景颜色 */
}
.supplier {
height: 70%;
padding: 20rpx 20rpx;
background-image: url('../../static/image/index/1.png');
color: #FFF;
font-size: 32rpx;
.supplierList {
margin-top: 20rpx;
height: 92%;
overflow: auto;
}
.purchaser-title {
height: 8%;
.active {
text-decoration: underline;
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
.noactive {
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
}
}
.purchaser {
height: 60%;
padding: 20rpx 0;
color: #FFF;
font-size: 32rpx;
.purchaser-title {
.active {
text-decoration: underline;
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
.noactive {
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
}
.productList {
margin-top: 20rpx;
height: 60vh;
overflow: auto;
}
}
}
}
.trading-platform {
background-image: url('../../static/image/index/1.png');
.frame {
display: flex;
flex-direction: column;
justify-content: center;
height: calc(100vh - 120rpx - 120rpx);
.chart {
height: 300px !important;
background-color: #1B263B;
/* 背景颜色 */
}
.supplier {
height: 70%;
padding: 20rpx 20rpx;
background-image: url('../../static/image/index/1.png');
color: #FFF;
font-size: 32rpx;
.supplierList {
margin-top: 20rpx;
height: 92%;
overflow: auto;
}
.purchaser-title {
height: 8%;
.active {
text-decoration: underline;
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
.noactive {
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
}
}
.purchaser {
height: 60%;
padding: 20rpx 0;
color: #FFF;
font-size: 32rpx;
.purchaser-title {
.active {
text-decoration: underline;
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
.noactive {
width: 80rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
padding: 10rpx 20rpx;
}
}
.productList {
margin-top: 20rpx;
height: 60vh;
overflow: auto;
}
}
}
}
</style>

+ 101
- 29
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -3,8 +3,9 @@
<navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<!-- 登录和注册 -->
<view class="loginRegister" v-if='titleIndex!=2'>
<view class="loginRegister" v-if='titleIndex==1'>
<!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
@ -44,19 +45,19 @@
</view>
<!-- 忘记密码 -->
<view class='forgetPassword' v-if='titleIndex==2'>
<view class='forgetPassword' v-if='titleIndex != 1'>
<!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 表单 -->
<view class="form1">
<view class="userName">
<uv-input v-model="form1.userName" placeholder="请输入手机号" border="surround" shape='circle'
<uv-input v-model="form1.username" placeholder="请输入手机号" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="code">
<view class="left">
<uv-input v-model="form1.code" placeholder="请输入验证码" border="surround" shape='circle'
<uv-input v-model="form1.captcha" placeholder="请输入验证码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="right">
@ -70,11 +71,11 @@
</view>
</view>
<view class="password1">
<uv-input v-model="form1.password1" placeholder="设置您的新密码(6到50个字符)" password clearable
<uv-input v-model="form1.password" placeholder="设置您的新密码(6到50个字符)" password clearable
border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="password2">
<uv-input v-model="form1.password2" placeholder="重新确认密码" password clearable border="surround"
<uv-input v-model="form1.newPassword" placeholder="重新确认密码" password clearable border="surround"
shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
</view>
@ -128,10 +129,10 @@
captcha: '',
},
form1: {
userName: '',
code: '',
password1: '',
password2: '',
username: '',
captcha: '',
password: '',
newPassword: '',
},
tips: '获取验证码',
seconds: 60,
@ -139,44 +140,115 @@
},
methods: {
submit() {
if (!this.checkboxValue.length) {
if (!this.checkboxValue.length && this.titleIndex != 2) {
return uni.showToast({
title: '请先同意隐私协议',
icon: 'none'
})
}
if (this.titleIndex == 0) {
//
this.register()
} else if (this.titleIndex == 1) {
//
this.login()
} else {
//
this.updatePassword()
}
},
//
login(){
if (this.$utils.verificationAll(this.form, {
username: '请输入账号',
password: '请输入密码',
})) {
return
}
if (!this.$utils.verificationPhone(this.form.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
}
if (this.titleIndex == 0) {
//
this.$api('registerUser', this.form, res => {
if (res.code == 200) {
this.titleIndex = 1
uni.showToast({
title: '注册成功,请登录!',
icon: 'none'
})
}
//
this.$store.commit('login', this.form)
},
//
register(){
if (this.$utils.verificationAll(this.form1, {
username: '请输入账号',
captcha : '请输入验证码',
password: '请输入密码',
newPassword: '请确认密码',
})) {
return
}
if (!this.$utils.verificationPhone(this.form1.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
} else if (this.titleIndex == 1) {
//
this.$store.commit('login', this.form)
} else {
}
if (this.form1.password != this.form1.newPassword) {
return uni.showToast({
title: '密码与确认密码不一致',
icon: 'none'
})
}
this.$api('registerUser', this.form1, res => {
if (res.code == 200) {
this.titleIndex = 1
uni.showToast({
title: '注册成功,请登录!',
icon: 'none'
})
}
})
},
updatePassword(){
if (this.$utils.verificationAll(this.form1, {
username: '请输入账号',
captcha : '请输入验证码',
password: '请输入新密码',
newPassword: '请确认密码',
})) {
return
}
if (!this.$utils.verificationPhone(this.form1.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
}
if (this.form1.password != this.form1.newPassword) {
return uni.showToast({
title: '密码与确认密码不一致',
icon: 'none'
})
}
this.$api('newPassword', this.form1, res => {
this.form1 = {}
if (res.code == 200) {
this.titleIndex = 1
uni.showToast({
title: '修改成功,请登录!',
icon: 'none'
})
}
})
},
//
changePage(index) {
@ -203,7 +275,7 @@
title: '正在获取验证码'
})
this.$api('sendSms', {
username: this.form1.userName,
username: this.form1.username,
}, res => {
if (res.code == 200) {
uni.hideLoading();


+ 53
- 28
pages_order/center/systemSet.vue View File

@ -52,56 +52,62 @@
title: `${this.$t('pageTitle.accountSetting')}`,
itemList: [
// text: `${this.$t('pageTitle.switchAccount')}`
{
leftIcon: "../../static/image/center/1.svg",
text: `${this.$t('pageTitle.switchAccount')}`,
rightIcon: ">"
},
{
leftIcon: "../../static/image/center/2.svg",
text: `${this.$t('pageTitle.changePassword')}`,
rightIcon: ">"
},
// {
// leftIcon: "../../static/image/center/1.svg",
// text: `${this.$t('pageTitle.switchAccount')}`,
// rightIcon: ">"
// },
// {
// leftIcon: "../../static/image/center/2.svg",
// text: `${this.$t('pageTitle.changePassword')}`,
// rightIcon: ">"
// },
{
leftIcon: "../../static/image/center/3.svg",
text: this.$t('pageTitle.logout'),
rightIcon: ">",
type : 'logout',
},
{
leftIcon: "../../static/image/center/4.svg",
text: this.$t('pageTitle.addressList'),
rightIcon: ">",
toUrl: '/pages_order/center/addressListManage'
},
]
},
{
title: `${this.$t('pageTitle.systemSetting')}`,
itemList: [{
leftIcon: "../../static/image/center/1.svg",
text: `${this.$t('pageTitle.languageSwitch')}`,
rightIcon: ">"
},
itemList: [
// {
// leftIcon: "../../static/image/center/1.svg",
// text: `${this.$t('pageTitle.languageSwitch')}`,
// rightIcon: ">"
// },
{
leftIcon: "../../static/image/center/2.svg",
text: `${this.$t('pageTitle.versionUpdate')}`,
rightIcon: ">"
rightIcon: ">",
type : 'versionUpdate'
},
{
leftIcon: "../../static/image/center/3.svg",
text: this.$t('pageTitle.clearCache'),
rightIcon: ">"
rightIcon: ">",
type : 'clearCache',
},
]
},
{
title: `${this.$t('pageTitle.identitySetting')}`,
itemList: [{
leftIcon: "../../static/image/center/1.svg",
text: this.$t('pageTitle.switchIdentity'),
rightIcon: ">"
}, ]
itemList: [
{
leftIcon: "../../static/image/center/1.svg",
text: this.$t('pageTitle.switchIdentity'),
rightIcon: ">",
toUrl: '/pages_order/auth/selectionIdentity'
},
{
leftIcon: "../../static/image/center/4.svg",
text: this.$t('pageTitle.addressList'),
rightIcon: ">",
toUrl: '/pages_order/center/addressListManage'
},
]
}
],
}
@ -122,6 +128,25 @@
logout(){
this.$store.commit('logout')
},
versionUpdate(){
uni.showToast({
title: '您当前已经是最新版本',
icon: 'none'
})
},
clearCache(){
uni.showModal({
title: '确认要清理缓存吗?',
success(res) {
if(res.confirm){
uni.showToast({
title: '缓存清理成功',
icon: 'none'
})
}
}
})
},
},
}
</script>


+ 225
- 240
pages_order/components/address/addressList.vue View File

@ -1,247 +1,232 @@
<template>
<scroll-view
scroll-y="true"
:style="{height: height}"
@scrolltolower="moreAddress">
<uv-radio-group v-model="selectAddress"
@change="editDefault"
v-if="addressList.length > 0">
<view v-for="item in addressList" :key="item.id" class="address-item">
<view class="address-item-top"
@click="select(item)">
<view class="img-box">
<image src="/static/image/address/icon.png" mode="aspectFill"></image>
</view>
<view class="address-info">
<view class="user-info">
<text class="user-name">{{ item.name }}</text>
<text class="user-phone">{{ item.phone }}</text>
<text v-if="item.id == selectAddress" class="is-default">默认</text>
</view>
<view class="address-detail">
{{ item.address + " " + item.addressDetail }}
</view>
</view>
</view>
<view class="controls"
v-if="controls">
<view class="default-checkbox">
<uv-radio
:name="item.id"
label-disabled
size="30rpx"
icon-size="30rpx">
默认地址
</uv-radio>
</view>
<view class="edit-btn">
<uv-icon name="edit-pen"></uv-icon>
<text @click="editAddress(item)" class="control-title">编辑</text>
</view>
<view class="del-btn" @click="deleteAddress(item.id)">
<uv-icon name="trash"></uv-icon>
<text class="control-title" >删除</text>
</view>
</view>
</view>
</uv-radio-group>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
</view>
</scroll-view>
<scroll-view scroll-y="true" :style="{height: height}" @scrolltolower="moreAddress">
<uv-radio-group v-model="selectAddress" @change="editDefault" v-if="addressList.length > 0">
<view v-for="item in addressList" :key="item.id" class="address-item">
<view class="address-item-top" @click="select(item)">
<view class="img-box">
<image src="/static/image/address/icon.png" mode="aspectFill"></image>
</view>
<view class="address-info">
<view class="user-info">
<text class="user-name">{{ item.name }}</text>
<text class="user-phone">{{ item.phone }}</text>
<text v-if="item.id == selectAddress" class="is-default">默认</text>
</view>
<view class="address-detail">
{{ item.address + " " + item.addressDetail }}
</view>
</view>
</view>
<view class="controls" v-if="controls">
<view class="default-checkbox">
<uv-radio :name="item.id" label-disabled size="30rpx" icon-size="30rpx">
默认地址
</uv-radio>
</view>
<view class="edit-btn">
<uv-icon name="edit-pen"></uv-icon>
<text @click="editAddress(item)" class="control-title">编辑</text>
</view>
<view class="del-btn" @click="deleteAddress(item.id)">
<uv-icon name="trash"></uv-icon>
<text class="control-title">删除</text>
</view>
</view>
</view>
</uv-radio-group>
<view style="padding: 100rpx 0;" v-else>
<uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
</view>
</scroll-view>
</template>
<script>
export default {
props : {
controls : {
default : false,
type : Boolean,
},
height : {
default : 'calc(90vh - 180rpx)'
}
},
data() {
return {
selectAddress : 0,
queryParams: {
pageNo: 1,
pageSize: 10,
},
addressList: [],
total : 0,
}
},
methods: {
//
getAddressList() {
return new Promise((success, fail) => {
this.$api('addressList', this.queryParams, res => {
if (res.code == 200) {
console.log("res.result.records", res.result.records)
this.addressList = res.result.records || [];
this.total = res.result.total || 0;
this.addressList.forEach(n => { //
if (n.defaultFlag == 1) {
this.selectAddress = n.id
}
})
success(res.result)
}
})
})
},
//
moreAddress(){
if(this.queryParams.pageSize > this.total){
return
}
this.queryParams.pageSize += 10
this.getAddressList()
},
//
deleteAddress(e){
this.$emit('deleteAddress', e)
},
//
editAddress(e){
this.$emit('editAddress', e)
},
//
editDefault(e){
this.$emit('editDefault', e)
},
//
select(e){
this.$emit('select', e)
},
}
}
export default {
props: {
controls: {
default: false,
type: Boolean,
},
height: {
default: 'calc(90vh - 180rpx)'
}
},
data() {
return {
selectAddress: 0,
queryParams: {
pageNo: 1,
pageSize: 10,
},
addressList: [],
total: 0,
}
},
created() {
},
methods: {
//
getAddressList() {
return new Promise((success, fail) => {
this.$api('addressList', this.queryParams, res => {
if (res.code == 200) {
console.log("res.result.records", res.result.records)
this.addressList = res.result.records || [];
this.total = res.result.total || 0;
this.addressList.forEach(n => { //
if (n.defaultFlag == 1) {
this.selectAddress = n.id
}
})
success(res.result)
}
})
})
},
//
moreAddress() {
if (this.queryParams.pageSize > this.total) {
return
}
this.queryParams.pageSize += 10
this.getAddressList()
},
//
deleteAddress(e) {
this.$emit('deleteAddress', e)
},
//
editAddress(e) {
this.$emit('editAddress', e)
},
//
editDefault(e) {
this.$emit('editDefault', e)
},
//
select(e) {
this.$emit('select', e)
},
}
}
</script>
<style scoped lang="scss">
.address-item {
background: white;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 20rpx;
padding: 15rpx 15rpx 0rpx 15rpx;
width: 680rpx;
.address-item-top {
border-bottom: 1px dashed #D3D1D1;
display: flex;
align-items: center;
padding: 0rpx 0rpx 15rpx 0rpx;
.img-box {
width: 120rpx;
height: 120rpx;
image {
width: 75%;
height: 75%;
display: block;
margin: 12.5% auto;
}
}
.address-info {
width: calc(100% - 120rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.user-info {
display: flex;
align-items: center;
text {
display: block;
line-height: 40rpx;
margin-right: 20rpx;
}
.user-name,
.user-phone {
font-size: 30rpx;
}
.is-default {
display: flex;
align-items: center;
justify-content: center;
background: #FEB773;
color: white;
width: 80rpx;
height: 35rpx;
border-radius: 20rpx;
font-size: 22rpx;
}
}
.address-detail {
color: #4a4a4a;
font-size: 26rpx;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
}
}
.controls {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
padding: 15rpx 15rpx 25rpx 15rpx;
.default-checkbox {
display: flex;
text {
margin-left: 8rpx;
}
}
.control-title {
height: 30rpx;
line-height: 30rpx;
color: #666666;
}
view {
display: flex;
align-items: center;
}
image {
width: 23rpx;
height: 23rpx;
vertical-align: middle;
margin-right: 8rpx;
}
}
}
</style>
.address-item {
background: white;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 20rpx;
padding: 15rpx 15rpx 0rpx 15rpx;
width: 680rpx;
.address-item-top {
border-bottom: 1px dashed #D3D1D1;
display: flex;
align-items: center;
padding: 0rpx 0rpx 15rpx 0rpx;
.img-box {
width: 120rpx;
height: 120rpx;
image {
width: 75%;
height: 75%;
display: block;
margin: 12.5% auto;
}
}
.address-info {
width: calc(100% - 120rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.user-info {
display: flex;
align-items: center;
text {
display: block;
line-height: 40rpx;
margin-right: 20rpx;
}
.user-name,
.user-phone {
font-size: 30rpx;
}
.is-default {
display: flex;
align-items: center;
justify-content: center;
background: #FEB773;
color: white;
width: 80rpx;
height: 35rpx;
border-radius: 20rpx;
font-size: 22rpx;
}
}
.address-detail {
color: #4a4a4a;
font-size: 26rpx;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
}
}
.controls {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
padding: 15rpx 15rpx 25rpx 15rpx;
.default-checkbox {
display: flex;
text {
margin-left: 8rpx;
}
}
.control-title {
height: 30rpx;
line-height: 30rpx;
color: #666666;
}
view {
display: flex;
align-items: center;
}
image {
width: 23rpx;
height: 23rpx;
vertical-align: middle;
margin-right: 8rpx;
}
}
}
</style>

+ 2
- 2
pages_order/components/order/orderList.vue View File

@ -35,9 +35,9 @@
<view class="tip">
<!--审核状态 0审核中 1 审核通过 2审核未通过-->
<img v-if="item.auditStatus==0" src="../../static/order/1.svg" style="width: 100%;height: 100%;"/>
<img v-if="item.auditStatus==0" src="../../static/order/3.svg" style="width: 100%;height: 100%;"/>
<img v-if="item.auditStatus==1" src="../../static/order/1.svg" style="width: 100%;height: 100%;"/>
<img v-if="item.auditStatus==2" src="../../static/order/3.svg" style="width: 100%;height: 100%;"/>
<img v-if="item.auditStatus==2" src="../../static/order/2.svg" style="width: 100%;height: 100%;"/>
</view>
</view>


+ 550
- 532
pages_order/order/offerOrBillLading.vue
File diff suppressed because it is too large
View File


Loading…
Cancel
Save