15 changed files with 1451 additions and 553 deletions
Unified View
Diff Options
-
17apis/addressManageApi.js
-
13apis/enquiryListApi.js
-
32apis/setting.js
-
2components/qn-input-number/qn-input-number.vue
-
21pages.json
-
207pages/account-management/index.vue
-
262pages/add-account/index.vue
-
27pages/add-address-manage/index.vue
-
42pages/address-manage/index.vue
-
1055pages/cart/index.vue
-
312pages/enquiry-list/index.vue
-
4pages/mine/index.vue
-
6pages/paper-details/index.vue
-
4pages/store/index.vue
-
BINstatic/imgs/mine/client-default.png
@ -0,0 +1,13 @@ |
|||||
|
import http from '../utils/http/index.js' |
||||
|
// 获取获取询价结果列表
|
||||
|
export function getEnquiryOrder(data) { |
||||
|
return http.get( |
||||
|
{ |
||||
|
url: '/base-paper-trading/get/enquiry-order/result-list', |
||||
|
data |
||||
|
}, |
||||
|
{ |
||||
|
hideLoading: true |
||||
|
} |
||||
|
) |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
import http from '../utils/http/index.js' |
||||
|
// 修改员工姓名
|
||||
|
export function employeeName(data) { |
||||
|
return http.post({ |
||||
|
url: '/yyt-uec/update/my/employee-name?userId='+data.userId +'&enterpriseId=' +data.enterpriseId, |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
// 新增员工
|
||||
|
export function addEmployee(data) { |
||||
|
return http.post({ |
||||
|
url: '/yyt-uec/enterprise/add/employee?userId='+data.userId +'&enterpriseId=' +data.enterpriseId, |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
// 员工列表
|
||||
|
export function employeeList(data) { |
||||
|
return http.get({ |
||||
|
url: '/yyt-uec/enterprise/get/employee-list', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
// 删除员工
|
||||
|
export function deleteEmployee(data) { |
||||
|
return http.post({ |
||||
|
url: '/yyt-uec/enterprise/delete/employee?enterpriseId='+data.enterpriseId, |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,207 @@ |
|||||
|
<template> |
||||
|
<view class="account-management"> |
||||
|
<view> |
||||
|
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title=""> |
||||
|
<view class="account-management-title">账号管理</view> |
||||
|
<view slot="left"></view> |
||||
|
<view slot="right" class="add-account" @click="addAccount">添加账号</view> |
||||
|
</uni-nav-bar> |
||||
|
</view> |
||||
|
<view class=""> |
||||
|
<scroll-list style="touch-action: none" ref="orderRef" :option="orderOption" @load="orderUp" @refresh="orderDown"> |
||||
|
<view class="account-list" v-for="(item,index) in list" :key="index"> |
||||
|
<view class="account-iamge-width"><image class="list-image" src="/static/imgs/mine/client-default.png" mode=""></image></view> |
||||
|
<view class="account-text"> |
||||
|
<view class="account-name"><text>{{item.name}}-{{item.title}}</text></view> |
||||
|
<view class="account-phone"><text>{{item.mobile}}</text></view> |
||||
|
</view> |
||||
|
<view class="account-delete" @click="deleteAccount(item)"><text>删除账号</text></view> |
||||
|
</view> |
||||
|
</scroll-list> |
||||
|
</view> |
||||
|
<uni-popup ref="popup" type="dialog"> |
||||
|
<uni-popup-dialog type="info" mode="base" title="确认删除该账号?" :duration="2000" :before-close="true" @close="close" @confirm="confirm"> |
||||
|
<view class="account-dialog-text"> |
||||
|
<text>账号删除后无法在使用系统,请谨慎操作</text> |
||||
|
</view> |
||||
|
</uni-popup-dialog> |
||||
|
</uni-popup> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { back, go2 } from '@/utils/hook.js' |
||||
|
import { employeeList,deleteEmployee } from '@/apis/setting.js' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
orderOption: { |
||||
|
size: 10, |
||||
|
auto: true, |
||||
|
emptyText: '暂无用户~', |
||||
|
background: '#F7F8FA', |
||||
|
fontSize: '40rpx' |
||||
|
}, |
||||
|
params: { |
||||
|
asc: '', |
||||
|
desc: '', |
||||
|
enterpriseId: this.$store.state.companyInfo.id, |
||||
|
}, |
||||
|
pagination: { |
||||
|
pageNum: 0, // 初始会执行一次下拉加载 |
||||
|
pageSize: 10 |
||||
|
}, |
||||
|
list:[], |
||||
|
deleteId:'' |
||||
|
} |
||||
|
}, |
||||
|
onShow() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
back, |
||||
|
addAccount() { |
||||
|
go2('add-account') |
||||
|
}, |
||||
|
deleteAccount(item){ |
||||
|
// deleteEmployee |
||||
|
this.$refs.popup.open() |
||||
|
this.deleteId = item.id |
||||
|
}, |
||||
|
confirm(){ |
||||
|
var params= { |
||||
|
id:this.deleteId, |
||||
|
enterpriseId: this.$store.state.companyInfo.id, |
||||
|
} |
||||
|
deleteEmployee(params) |
||||
|
.then(res => { |
||||
|
if (res) { |
||||
|
uni.showToast({ |
||||
|
title: '删除成功', |
||||
|
icon: 'success' |
||||
|
}) |
||||
|
this.close() |
||||
|
this.pagination.pageNum = 1 |
||||
|
this.getList() |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
reject(err) |
||||
|
}) |
||||
|
}, |
||||
|
close(){ |
||||
|
this.$refs.popup.close() |
||||
|
}, |
||||
|
// 获取用户列表 |
||||
|
getList() { |
||||
|
return new Promise((resolve, reject) => { |
||||
|
employeeList({ ...this.params, ...this.pagination }) |
||||
|
.then(res => { |
||||
|
if (res) { |
||||
|
if (this.pagination.pageNum == 1) { |
||||
|
this.list = res.records |
||||
|
} else { |
||||
|
this.list = this.list.concat(res.records) |
||||
|
} |
||||
|
resolve({ list: this.list, total: res.total }) |
||||
|
} else { |
||||
|
reject() |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
reject(err) |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
//用户分页 |
||||
|
orderUp(page) { |
||||
|
this.pagination.pageNum++ |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.orderRef.refreshSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.orderRef.loadFail() |
||||
|
}) |
||||
|
}, |
||||
|
//用户分页 |
||||
|
orderDown() { |
||||
|
this.pagination.pageNum = 1 |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.orderRef.refreshSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.orderRef.refreshFail() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.account-management { |
||||
|
.account-management-title { |
||||
|
width: 100%; |
||||
|
font-size: 36rpx; |
||||
|
color: #000000; |
||||
|
letter-spacing: 0; |
||||
|
text-align: center; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.add-account { |
||||
|
font-size: 28rpx; |
||||
|
color: #007aff; |
||||
|
text-align: right; |
||||
|
line-height: 40rpx; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.list-image { |
||||
|
width: 100rpx; |
||||
|
height: 100rpx; |
||||
|
border-radius: 50rpx; |
||||
|
} |
||||
|
.account-list { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
height: 148rpx; |
||||
|
background-color: #ffffff; |
||||
|
} |
||||
|
.account-name { |
||||
|
font-size: 30rpx; |
||||
|
color: #333333; |
||||
|
letter-spacing: 0; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.account-phone { |
||||
|
font-size: 26rpx; |
||||
|
color: #888888; |
||||
|
letter-spacing: 0; |
||||
|
text-align: left; |
||||
|
line-height: 32rpx; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
.account-delete { |
||||
|
font-size: 28rpx; |
||||
|
color: #f5222d; |
||||
|
text-align: right; |
||||
|
line-height: 40rpx; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
.account-text { |
||||
|
width: 60%; |
||||
|
line-height: 60rpx; |
||||
|
} |
||||
|
.account-iamge-width { |
||||
|
margin-left: 32rpx; |
||||
|
width: 15%; |
||||
|
} |
||||
|
.account-dialog-text{ |
||||
|
font-size: 28rpx; |
||||
|
color: #969799; |
||||
|
text-align: center; |
||||
|
line-height: 40rpx; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,262 @@ |
|||||
|
<template> |
||||
|
<view class="add-account"> |
||||
|
<view> |
||||
|
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title=""> |
||||
|
<view class="add-account-title">新增企业账号</view> |
||||
|
<view slot="left"></view> |
||||
|
<view slot="right"></view> |
||||
|
</uni-nav-bar> |
||||
|
</view> |
||||
|
<view class=""> |
||||
|
<view class="add-paper-list"> |
||||
|
<view> |
||||
|
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text> |
||||
|
<text class="add-paper-text">手机号</text> |
||||
|
</view> |
||||
|
<view class="add-paper-input"> |
||||
|
<qn-easyinput |
||||
|
type="number" |
||||
|
:maxlength="11" |
||||
|
:styles="{ disableColor: '#fff' }" |
||||
|
v-model="form.mobile" |
||||
|
:inputBorder="false" |
||||
|
text="right" |
||||
|
placeholder="请输入手机号" |
||||
|
></qn-easyinput> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="add-paper-border"></view> |
||||
|
<view class="add-paper-list"> |
||||
|
<view> |
||||
|
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text> |
||||
|
<text class="add-paper-text">用户号</text> |
||||
|
</view> |
||||
|
<view class="add-paper-input"> |
||||
|
<qn-easyinput type="text" :styles="{ disableColor: '#fff' }" v-model="form.name" :inputBorder="false" text="right" placeholder="请输入用户号"></qn-easyinput> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="add-paper-border"></view> |
||||
|
<view class="add-paper-list" @click="paperpopupShow()"> |
||||
|
<view> |
||||
|
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text> |
||||
|
<text class="add-paper-text">职务</text> |
||||
|
</view> |
||||
|
<!-- categoryId --> |
||||
|
<view class=""> |
||||
|
<text v-if="form.title === ''" class="add-paph-text">点击选择职务</text> |
||||
|
<text v-else>{{ form.title }}</text> |
||||
|
<text><uni-icons type="right" color="#000000" size="18"></uni-icons></text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="uploud-btn"> |
||||
|
<view class=""><button type="primary" class="btn-class" plain="true" @click="cencelList()">取消</button></view> |
||||
|
<view class=""><button type="primary" class="btn-class-upload" @click="uploadData()">确认</button></view> |
||||
|
</view> |
||||
|
<uni-popup ref="paperpopup" type="bottom"> |
||||
|
<view class="popup_modal"> |
||||
|
<!-- <slot name="title"><view class="popup_modal-title">选择纸种</view></slot> --> |
||||
|
<scroll-view scroll-y="true" class="popup_modal-scroll"> |
||||
|
<view @click="paperSelectChange(item)" class="popup_modal-scroll-item" v-for="item in paperList" :key="item.id">{{ item.name }}</view> |
||||
|
<uGap></uGap> |
||||
|
<view class="cencel-btn" @click="cencelbtn">取消</view> |
||||
|
</scroll-view> |
||||
|
</view> |
||||
|
</uni-popup> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { back, go2, uploadFile } from '@/utils/hook.js' |
||||
|
import uGap from '@/components/u-gap/u-gap.vue' |
||||
|
import { addEmployee } from '@/apis/setting.js' |
||||
|
const validateFields = ['mobile', 'name', 'title'] |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
form: { |
||||
|
title: '' |
||||
|
}, |
||||
|
paperList: [ |
||||
|
{ |
||||
|
name: '管理员', |
||||
|
id: '1' |
||||
|
}, |
||||
|
{ |
||||
|
name: '业务员', |
||||
|
id: '2' |
||||
|
}, |
||||
|
{ |
||||
|
name: '司机', |
||||
|
id: '3' |
||||
|
}, |
||||
|
{ |
||||
|
name: '分切', |
||||
|
id: '4' |
||||
|
}, |
||||
|
{ |
||||
|
name: '库管', |
||||
|
id: '5' |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
components: { uGap }, |
||||
|
methods: { |
||||
|
back, |
||||
|
paperpopupShow() { |
||||
|
this.$refs.paperpopup.open('bottom') |
||||
|
}, |
||||
|
paperSelectChange(item) { |
||||
|
this.$set(this.form, 'title', item.name) |
||||
|
this.$refs.paperpopup.close() |
||||
|
}, |
||||
|
cencelbtn() { |
||||
|
this.$refs.paperpopup.close() |
||||
|
}, |
||||
|
cencelList(){ |
||||
|
back() |
||||
|
}, |
||||
|
uploadData() { |
||||
|
for (let i = 0; i < validateFields.length; i++) { |
||||
|
if (this.form[validateFields[i]] === null || this.form[validateFields[i]] === '') { |
||||
|
uni.showToast({ |
||||
|
title: '请完善信息', |
||||
|
icon: 'none' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
} |
||||
|
var params = { |
||||
|
...this.form, |
||||
|
enterpriseId: this.$store.state.companyInfo.id, |
||||
|
// userId:this.$store.state.userInfo.userId, |
||||
|
} |
||||
|
addEmployee(params).then(res => { |
||||
|
if (res) { |
||||
|
uni.showToast({ |
||||
|
title: '添加成功', |
||||
|
icon: 'success' |
||||
|
}) |
||||
|
setTimeout(() => { |
||||
|
back() |
||||
|
}, 1000) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.add-account { |
||||
|
.add-account-title { |
||||
|
width: 100%; |
||||
|
font-size: 36rpx; |
||||
|
color: #000000; |
||||
|
letter-spacing: 0; |
||||
|
text-align: center; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.add-account { |
||||
|
font-size: 28rpx; |
||||
|
color: #007aff; |
||||
|
text-align: right; |
||||
|
line-height: 40rpx; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.add-paper-border { |
||||
|
border-bottom: 2rpx solid #d8d8d8; |
||||
|
margin-left: 32rpx; |
||||
|
} |
||||
|
.add-paper-list { |
||||
|
height: 88rpx; |
||||
|
background: #ffffff; |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
padding-left: 32rpx; |
||||
|
padding-right: 32rpx; |
||||
|
} |
||||
|
.add-paper-text { |
||||
|
font-size: 28rpx; |
||||
|
color: #000000; |
||||
|
letter-spacing: 0; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
.add-paper-start { |
||||
|
font-size: 28rpx; |
||||
|
color: #f5222d; |
||||
|
letter-spacing: 0; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
.add-paper-input { |
||||
|
width: 40%; |
||||
|
} |
||||
|
.popup_modal { |
||||
|
width: 750rpx; |
||||
|
height: 600rpx; |
||||
|
background-color: #fff; |
||||
|
border-radius: 10rpx 10rpx 0 0; |
||||
|
.popup_modal-title { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
width: 750rpx; |
||||
|
height: 88rpx; |
||||
|
font-weight: 600; |
||||
|
border-bottom: 2rpx solid #d8d8d8; |
||||
|
} |
||||
|
.popup_modal-scroll { |
||||
|
width: 750rpx; |
||||
|
height: 600rpx; |
||||
|
.popup_modal-scroll-item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
width: 750rpx; |
||||
|
height: 88rpx; |
||||
|
padding: 0rpx 32rpx; |
||||
|
border-bottom: 2rpx solid #d8d8d8; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.cencel-btn { |
||||
|
font-size: 32rpx; |
||||
|
color: #646566; |
||||
|
text-align: center; |
||||
|
line-height: 44rpx; |
||||
|
font-weight: 400; |
||||
|
margin-top: 40rpx; |
||||
|
} |
||||
|
.add-paph-text { |
||||
|
font-size: 28rpx; |
||||
|
color: #888888; |
||||
|
letter-spacing: 0; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
.btn-class { |
||||
|
height: 88rpx; |
||||
|
border-radius: 10rpx; |
||||
|
line-height: 80rpx; |
||||
|
width: 150px; |
||||
|
} |
||||
|
.btn-class-upload { |
||||
|
height: 88rpx; |
||||
|
border-radius: 10rpx; |
||||
|
line-height: 80rpx; |
||||
|
width: 200px; |
||||
|
} |
||||
|
.uploud-btn { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
padding: 20rpx 32rpx; |
||||
|
background-color: #ffffff; |
||||
|
position: absolute; |
||||
|
bottom: 0rpx; |
||||
|
width: 100%; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
1055
pages/cart/index.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,20 +1,292 @@ |
|||||
<template> |
|
||||
<view> |
|
||||
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="询价列表"></uni-nav-bar> |
|
||||
</view> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { go2, back } from '@/utils/hook.js' |
|
||||
export default { |
|
||||
data() { |
|
||||
return {} |
|
||||
}, |
|
||||
methods: { |
|
||||
go2, |
|
||||
back |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped></style> |
|
||||
|
<template> |
||||
|
<view class="warpper"> |
||||
|
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="询价列表"></uni-nav-bar> |
||||
|
<view class=""> |
||||
|
<view class="status-bar"> |
||||
|
<view v-for="(item, index) in statusBarArray" :key="index" :class="{ box: true, 'box--selected': current == index }" @click="selectStatus(item, index)"> |
||||
|
{{ item }} |
||||
|
</view> |
||||
|
</view> |
||||
|
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #ffffff"> |
||||
|
<view class="content" v-for="(item, index) in list" :key="index"> |
||||
|
<uGap v-if="index > 0"></uGap> |
||||
|
<view class="header"> |
||||
|
<view class="header-title">{{ item.belongEnterpriseName }}</view> |
||||
|
<view class="header-value"> |
||||
|
<text :class="(item.status == 30131 || item.status == 30138) ? 'failure' : ''">{{ item.status | statusName }}</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="box"> |
||||
|
<view class="list-box" v-for="(sitem, sindex) in item.itemList" :key="sindex"> |
||||
|
<image class="image" :src="sitem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'" mode=""></image> |
||||
|
<view class="info-box"> |
||||
|
<view class="name">{{sitem.brandName}}</view> |
||||
|
<view class="value">{{sitem.categoryName}}/{{sitem.paperName}}/{{sitem.gramWeight}}g/{{sitem.width}}*{{sitem.length}}/{{sitem.quantity}}张</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="other" v-if="item.status == 30114"> |
||||
|
<view class="left">{{item.createTime}}</view> |
||||
|
<view class="right"> |
||||
|
<view class=""><text class="price" v-if="item.reply">¥ {{item.reply.totalPrice}}</text></view> |
||||
|
<view class="btn" @tap="placeOrderTap(item)" v-if="item.status == 30116">去下单</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</scroll-list> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { go2, back } from '@/utils/hook.js' |
||||
|
import uGap from '@/components/u-gap/u-gap.vue' |
||||
|
import { getEnquiryOrder } from '@/apis/enquiryListApi.js' |
||||
|
export default { |
||||
|
components: { uGap }, |
||||
|
data() { |
||||
|
return { |
||||
|
current: 0, |
||||
|
statusBarArray: ['全部', '待报价', '已报价', '已成交'], |
||||
|
option: { |
||||
|
size: 10, |
||||
|
auto: true, |
||||
|
emptyText: '暂无数据~', |
||||
|
background: '#F7F8FA', |
||||
|
disabled: false, |
||||
|
emptyImage: '/static/imgs/order/order-empty.png' |
||||
|
}, |
||||
|
|
||||
|
pagination: { |
||||
|
enterpriseId: this.$store.state.companyInfo.id || null, |
||||
|
status: 0, |
||||
|
pageNum: 0, // 初始会执行一次下拉加载 |
||||
|
pageSize: 10 |
||||
|
}, |
||||
|
list: [] |
||||
|
} |
||||
|
}, |
||||
|
filters: { |
||||
|
statusName(e) { |
||||
|
let name = '' |
||||
|
switch (e) { |
||||
|
case 30114: |
||||
|
name = '待报价' |
||||
|
break |
||||
|
case 30116: |
||||
|
name = '已报价' |
||||
|
break |
||||
|
case 30131: |
||||
|
name = '已成交' |
||||
|
break |
||||
|
case 30138: |
||||
|
name = '已失效' |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
return name |
||||
|
} |
||||
|
}, |
||||
|
onShow() { |
||||
|
// this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
go2, |
||||
|
back, |
||||
|
selectStatus(item, index) { |
||||
|
this.current = index |
||||
|
this.pagination.status = index |
||||
|
this.downCallback() |
||||
|
}, |
||||
|
getList() { |
||||
|
return new Promise((resolve, reject) => { |
||||
|
getEnquiryOrder({ ...this.pagination }) |
||||
|
.then(res => { |
||||
|
// console.log('询价列表', res.records) |
||||
|
if (res) { |
||||
|
if (this.pagination.pageNum == 1) { |
||||
|
this.list = res.records |
||||
|
} else { |
||||
|
this.list = this.list.concat(res.records) |
||||
|
} |
||||
|
resolve({ list: this.list, total: res.total }) |
||||
|
} else { |
||||
|
reject() |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
reject(err) |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
downCallback() { |
||||
|
this.pagination.pageNum = 1 |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.list.refreshSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.list.refreshFail() |
||||
|
}) |
||||
|
}, |
||||
|
upCallback() { |
||||
|
this.pagination.pageNum++ |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.list.loadSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.list.loadFail() |
||||
|
}) |
||||
|
}, |
||||
|
// 确认下单 |
||||
|
placeOrderTap(item) { |
||||
|
go2('order-make', { orderId: item.id }) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.warpper { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
flex: 1; |
||||
|
height: 100vh; |
||||
|
.status-bar { |
||||
|
flex-grow: 0; |
||||
|
flex-shrink: 0; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
padding: 0 32rpx; |
||||
|
// border-bottom: 2rpx solid #DDDDDD; |
||||
|
background-color: #fff; |
||||
|
border-bottom: 2rpx solid rgba($color: #dddddd, $alpha: 0.8); |
||||
|
height: 90rpx; |
||||
|
.box { |
||||
|
height: 86rpx; |
||||
|
flex-grow: 0; |
||||
|
flex-shrink: 0; |
||||
|
color: #000000; |
||||
|
font-size: 28rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
// border-bottom: 4rpx solid #f8f8f8; |
||||
|
} |
||||
|
.box--selected { |
||||
|
border-bottom: 4rpx solid #007aff; |
||||
|
color: #007aff; |
||||
|
} |
||||
|
} |
||||
|
.content { |
||||
|
.header { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
height: 88rpx; |
||||
|
background: #ffffff; |
||||
|
padding: 0rpx 32rpx; |
||||
|
border-bottom: 2rpx solid #dddddd; |
||||
|
.header-title { |
||||
|
font-size: 30rpx; |
||||
|
color: #333333; |
||||
|
letter-spacing: 0; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.header-value { |
||||
|
font-size: 30rpx; |
||||
|
color: #ff5368; |
||||
|
letter-spacing: 0; |
||||
|
text-align: right; |
||||
|
font-weight: 500; |
||||
|
.failure { |
||||
|
color: #888888; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.box { |
||||
|
padding: 24rpx 32rpx; |
||||
|
.list-box:nth-last-child(even) { |
||||
|
border-bottom: 2rpx solid #dddddd; |
||||
|
} |
||||
|
.list-box { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
height: 148rpx; |
||||
|
background: #ffffff; |
||||
|
|
||||
|
padding: 24rpx 0rpx; |
||||
|
.image { |
||||
|
width: 100rpx; |
||||
|
height: 100rpx; |
||||
|
flex: 0 0 100rpx; |
||||
|
margin-right: 20rpx; |
||||
|
} |
||||
|
.info-box { |
||||
|
.name { |
||||
|
font-size: 30rpx; |
||||
|
color: #333333; |
||||
|
letter-spacing: 0; |
||||
|
text-align: left; |
||||
|
font-weight: 400; |
||||
|
padding-top: 4rpx; |
||||
|
} |
||||
|
.value { |
||||
|
font-size: 26rpx; |
||||
|
color: #888888; |
||||
|
letter-spacing: 0; |
||||
|
text-align: left; |
||||
|
font-weight: 400; |
||||
|
padding-top: 26rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.other { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
padding: 0rpx 32rpx; |
||||
|
height: 80rpx; |
||||
|
background: #ffffff; |
||||
|
border-top: 2rpx solid #dddddd; |
||||
|
.left { |
||||
|
font-size: 26rpx; |
||||
|
color: #888888; |
||||
|
letter-spacing: 0; |
||||
|
text-align: left; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
.right { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
.price { |
||||
|
font-size: 30rpx; |
||||
|
color: #ff5368; |
||||
|
letter-spacing: 0; |
||||
|
text-align: right; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.btn { |
||||
|
margin-left: 24rpx; |
||||
|
width: 132rpx; |
||||
|
height: 54rpx; |
||||
|
line-height: 54rpx; |
||||
|
background: #007aff; |
||||
|
border-radius: 27rpx; |
||||
|
font-size: 28rpx; |
||||
|
color: #ffffff; |
||||
|
letter-spacing: 0; |
||||
|
text-align: center; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save