邓雄飞 4 years ago
parent
commit
291f00dc8a
7 changed files with 219 additions and 140 deletions
  1. 38
      pages/add-paper/index.vue
  2. 6
      pages/client-detail/basic-information.vue
  3. 18
      pages/mall/index.vue
  4. 204
      pages/message/system-message.vue
  5. 6
      pages/my-offer/index.vue
  6. 87
      pages/submit-quotation/index.vue
  7. BIN
      static/imgs/mall/edit.png

38
pages/add-paper/index.vue

@ -104,7 +104,7 @@
<view class="dian"></view>
<view class="paper-price-title">纸品售价{{ index + 1 }}</view>
</view>
<view class="delete-text" @click="deletePrice()">删除</view>
<view class="delete-text" @click="deletePrice(index)">删除</view>
</view>
<view class="paper-price-item">
<view class="label">
@ -138,7 +138,7 @@
<text class="label_text">库存单位</text>
</view>
<view class="label_value label-select" @click="popueShow(index)">
<text class="paper-price-title text-right">{{ item.stockUnit === '1' ? '张' : '吨' }}</text>
<text class="paper-price-title text-right">{{ item.stockUnit === 1 ? '张' : '吨' }}</text>
<uni-icons type="bottom" color="#000000" size="18"></uni-icons>
</view>
</view>
@ -156,7 +156,7 @@
text="right"
placeholder="请输入账期售价"
></qn-easyinput>
<view class="paper-price-title text-left">/{{ item.stockUnit === '1' ? '张' : '吨' }}</view>
<view class="paper-price-title text-left">/{{ item.stockUnit === 1 ? '张' : '吨' }}</view>
</view>
</view>
<view class="paper-price-item">
@ -173,7 +173,7 @@
text="right"
placeholder="请输入纸品库存"
></qn-easyinput>
<view class="paper-price-title text-left">{{ item.stockUnit === '1' ? '张' : '吨' }}</view>
<view class="paper-price-title text-left">{{ item.stockUnit === 1 ? '张' : '吨' }}</view>
</view>
</view>
<view class="paper-price-item">
@ -191,7 +191,7 @@
:maxlength="9999999999"
placeholder="请输入最低起送量"
></qn-easyinput>
<view class="paper-price-title text-left">{{ item.stockUnit === '1' ? '张' : '吨' }}</view>
<view class="paper-price-title text-left">{{ item.stockUnit === 1 ? '张' : '吨' }}</view>
</view>
</view>
</view>
@ -346,15 +346,25 @@ export default {
searchList: [
{
name: '张',
id: '1'
id: 1
},
{
name: '吨',
id: '2'
id: 2
}
],
paperList: [],
skuList: [],
skuList: [
{
isPromoting: 1,
listPrice: null,
minimum: null,
stock: null,
stockUnit: 2,
weight: null,
categoryName: null
}
],
imgList: [],
priceIndex: 0,
eidtFor: 0,
@ -427,7 +437,8 @@ export default {
var params = {
name: 'text',
extname: 'text',
url: res.imgList[i]
url: res.imgList[i],
pathUrl: res.imgList[i]
}
this.imgList.push(params)
}
@ -442,7 +453,7 @@ export default {
listPrice: null,
minimum: null,
stock: null,
stockUnit: '2',
stockUnit: 2,
weight: null,
categoryName: null
})
@ -482,6 +493,13 @@ export default {
console.log(this.imgList)
},
uploadPrice() {
if (this.skuList.length === 0) {
uni.showToast({
title: '请添加纸品售价',
icon: 'none'
})
return
}
for (let i = 0; i < validateFields.length; i++) {
if (this.form[validateFields[i]] === null || this.form[validateFields[i]] === '') {
uni.showToast({

6
pages/client-detail/basic-information.vue

@ -89,13 +89,15 @@
<view class="left">
<view class="title"><text>产房面积</text></view>
<view class="value">
<text>{{ info.plantArea }}m²</text>
<text>{{ info.plantArea }}</text>
<text v-if="info.plantArea">m²</text>
</view>
</view>
<view class="right">
<view class="title"><text>年营业额</text></view>
<view class="value">
<text>{{ info.annualTurnover }}</text>
<text>{{ info.annualTurnover }}</text>
<text v-if="info.annualTurnover"></text>
</view>
</view>
</view>

18
pages/mall/index.vue

@ -117,7 +117,7 @@ export default {
pageSize: 10,
storeId: null,
name: null,
supplierId: this.$store.state.supplierInfo.supplierId
supplierId: this.$store.state.supplierInfo.supplierId,
},
listData: [],
logo: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif',
@ -140,6 +140,9 @@ export default {
this.getSupplier(this.$store.state.supplierInfo.supplierId)
}
},
onShow() {
this.downCallback()
},
methods: {
back,
//
@ -155,11 +158,11 @@ export default {
} else {
this.logo = res.logo
}
if (res.backgroundImg === '') {
this.backgroundStyle = 'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;'
} else {
this.backgroundStyle = 'background: url(' + res.backgroundImg + ') no-repeat;'
}
// if (res.backgroundImg === '') {
// this.backgroundStyle = 'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;'
// } else {
// this.backgroundStyle = 'background: url(' + res.backgroundImg + ') no-repeat;'
// }
}
})
.catch((err) => {
@ -423,7 +426,7 @@ export default {
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #007aff;
background-color: #007AFF;
border-radius: 50%;
padding: 10rpx;
text-align: center;
@ -439,6 +442,7 @@ export default {
.my-image {
width: 100rpx;
height: 100rpx;
}
}
</style>

204
pages/message/system-message.vue

@ -1,116 +1,144 @@
<template>
<view class="system-message">
<scroll-list ref="messageRef" :option="option" @load="quotationUp" @refresh="quotationDown">
<view v-for="(item,index) in list" :key="index">
<view class="system-message-main">
<view class="system-message-main-top">
<view class="system-message-title">
<view class="">客户下单</view>
<view class="dian" v-if="item.readOrNot === 0"></view>
</view>
<view class="system-message-subtitle">{{item.createTime}}</view>
</view>
<view class="system-message-contant">{{item.content}}</view>
</view>
</view>
</scroll-list>
<scroll-list ref="messageRef" :option="option" @load="quotationUp" @refresh="quotationDown">
<view v-for="(item, index) in list" :key="index">
<view class="system-message-main">
<view class="system-message-main-top">
<view class="system-message-title">
<view class="">{{ item.messageType | meesageTypeFilter }}</view>
<view class="dian" v-if="item.readOrNot === 0"></view>
</view>
<view class="system-message-subtitle">{{ item.createTime }}</view>
</view>
<view class="system-message-contant">{{ item.content }}</view>
</view>
</view>
</scroll-list>
</view>
</template>
<script>
import { systemMessageList,systemRead } from '@/apis/trade'
import { systemMessageList, systemRead } from '@/apis/trade'
export default {
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无消息~',
background: '#F7F8FA',
fontSize: '40rpx'
size: 10,
auto: true,
emptyText: '暂无消息~',
background: '#F7F8FA',
fontSize: '40rpx'
},
pagination: {
pageNum: 0, //
pageSize: 10
pageNum: 0, //
pageSize: 10
},
list:[]
list: []
}
},
filters: {
meesageTypeFilter(value) {
var mes = ''
if (value) {
switch (value) {
case 1:
mes = '客户下单'
break
case 2:
mes = '客户付款'
break
case 3:
mes = '客户收货'
break
case 4:
mes = '客户询价'
break
case 4:
mes = '取消订单'
bre
default:
break
}
}
return mes
// 1- 2- 3- 4- 5-
}
},
onLoad(option) {
this.queryData()
},
onLoad(option) {
this.queryData()
},
methods: {
queryData(){
queryData() {
return new Promise((resolve, reject) => {
systemMessageList({...this.pagination })
.then((res) => {
if (res) {
var data= res.records
var count = 0
for(let i =0;i<data.length;i++){
if(data[i].readOrNot === 0){
count = count + 1
}
}
this.$emit('systemCount',count)
if (this.pagination.pageNum === 0) {
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)
})
systemMessageList({ ...this.pagination })
.then(res => {
if (res) {
var data = res.records
var count = 0
for (let i = 0; i < data.length; i++) {
if (data[i].readOrNot === 0) {
count = count + 1
}
}
this.$emit('systemCount', count)
if (this.pagination.pageNum === 0) {
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)
})
})
},
//
quotationUp(page) {
this.pagination.pageNum++
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.loadFail()
})
this.pagination.pageNum++
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.loadFail()
})
},
//
quotationDown() {
this.pagination.pageNum = 0
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.refreshFail()
})
this.pagination.pageNum = 0
this.queryData()
.then(({ list, total }) => {
this.$refs.messageRef.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.messageRef.refreshFail()
})
},
allread(){
allread() {
return new Promise((resolve, reject) => {
var meesage = this.list.map(item => {return item.id})
systemRead(meesage)
.then((res) => {
if (res) {
uni.showToast({
title: '操作成功',
icon: 'success'
})
this.pagination.pageNum = 0
this.queryData()
} else {
reject()
}
})
.catch((err) => {
reject(err)
})
var meesage = this.list.map(item => {
return item.id
})
systemRead(meesage)
.then(res => {
if (res) {
uni.showToast({
title: '操作成功',
icon: 'success'
})
this.pagination.pageNum = 0
this.queryData()
} else {
reject()
}
})
.catch(err => {
reject(err)
})
})
}
}
@ -153,7 +181,7 @@ export default {
height: 100rpx;
}
.dian {
background: #FF0000 ;
background: #ff0000;
height: 14rpx;
width: 14rpx;
border-radius: 20rpx;

6
pages/my-offer/index.vue

@ -13,9 +13,9 @@
<text class="list-title">{{ items.belongEnterpriseName }}</text>
<text class="list-title-Subtitle">{{ controlItems[items.orderStatus - 1] }}</text>
</view>
<view class="list-border list-info-line" v-for="(item, index) in items.orderItemList" :key="index">
<view class="list-info" :class="index === items.orderItemList.length ? 'list-border' : ''">
<view class=""><image class="list-image" src="../../static/logo.png"></image></view>
<view class="list-border list-info-line" v-for="(item, index) in items.itemList" :key="index">
<view class="list-info" :class="index === items.itemList.length ? 'list-border' : ''">
<view class=""><image class="list-image" :src="item.productImg || '../../static/logo.png'"></image></view>
<view class="list-info-contant">
<view class="list-info-title">{{ item.brandName }}{{ item.categoryName }}</view>
<view class="list-info-text">

87
pages/submit-quotation/index.vue

@ -7,34 +7,19 @@
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="submit-main">
<view><text class="submit-main-title">交货要求</text></view>
<view>
<text class="submit-main-subTitle">询价客户</text>
<text class="submit-main-subContent">{{ upDataObj.belongEnterpriseName }}</text>
</view>
<view>
<text class="submit-main-subTitle">交货区域</text>
<text class="submit-main-subContent">{{ upDataObj.deliveryArea }}</text>
</view>
<view>
<text class="submit-main-subTitle">交货时间</text>
<text class="submit-main-subContent">{{ upDataObj.deliveryDay }}</text>
</view>
</view>
<uGap></uGap>
<view class="submit-deadline">
<view class="submit-text">报价截止</view>
<view class="submit-time">
<text class="submit-time-text">{{ upDataObj.enquiryValidTimeSplit[0] }}</text>
<text class="submit-time-text">{{ hour }}</text>
</view>
<view class="submit-colon">:</view>
<view class="sbumit-colon">:</view>
<view class="submit-time">
<text class="submit-time-text">{{ upDataObj.enquiryValidTimeSplit[1] }}</text>
<text class="submit-time-text">{{ min }}</text>
</view>
<view class="submit-colon">:</view>
<view class="sbumit-colon">:</view>
<view class="submit-time">
<text class="submit-time-text">{{ upDataObj.enquiryValidTimeSplit[2] }}</text>
<text class="submit-time-text">{{ second }}</text>
</view>
</view>
<uGap></uGap>
@ -267,7 +252,12 @@ export default {
totalPrice: 0
},
modifyIndex: 0,
pricesIndex: 0
pricesIndex: 0,
curStartTime: '',
day: '0',
hour: '00',
min: '00',
second: '00'
// items: []
}
},
@ -286,9 +276,8 @@ export default {
.then((res) => {
if (res) {
this.upDataObj = res
var timeb = this.upDataObj.enquiryValidTime.split(' ')
var timeabs = timeb[1].split(':')
this.$set(this.upDataObj, 'enquiryValidTimeSplit', timeabs)
this.curStartTime = res.enquiryValidTime
this.countTime()
this.$set(this.upDataObj, 'otherFee', 0)
this.$set(this.upDataObj, 'totalAllPrice', 0)
this.priceFree()
@ -299,9 +288,49 @@ export default {
}
}
})
.catch((err) => {
reject(err)
})
.catch((err) => {})
},
setEnquiryTime(time) {
var timeb = time.split(' ')
var timeabs = timeb[1].split(':')
this.$set(this.upDataObj, 'enquiryValidTimeSplit', timeabs)
},
countTime(time) {
//
let date = new Date()
let now = date.getTime()
//
let endDate = new Date(this.curStartTime) // this.curStartTime
let end = endDate.getTime()
//
let leftTime = end - now
// d,h,m,s
if (leftTime >= 0) {
//
this.day = Math.floor(leftTime / 1000 / 60 / 60 / 24)
//
let h = Math.floor((leftTime / 1000 / 60 / 60) % 24)
this.hour = h < 10 ? '0' + h : h
//
let m = Math.floor((leftTime / 1000 / 60) % 60)
this.min = m < 10 ? '0' + m : m
//
let s = Math.floor((leftTime / 1000) % 60)
this.second = s < 10 ? '0' + s : s
} else {
this.day = 0
this.hour = '00'
this.min = '00'
this.second = '00'
}
// this.setEnquiryTime()
// 0
if (Number(this.hour) === 0 && Number(this.day) === 0 && Number(this.min) === 0 && Number(this.second) === 0) {
return
} else {
// countTime,
setTimeout(this.countTime, 1000)
}
},
//
surePrice() {
@ -354,9 +383,7 @@ export default {
console.log('timeValue', this.timeValue)
this.$refs.popupTime.close()
var abs = this.addDate(new Date(), this.timeValue[0] + 1, this.timeValue[1] + 1)
var timeb = abs.split(' ')
var timeabs = timeb[1].split(':')
this.$set(this.upDataObj, 'enquiryValidTimeSplit', timeabs)
this.curStartTime = abs
this.$set(this.upDataObj, 'enquiryValidTime', abs)
console.log(abs)
},

BIN
static/imgs/mall/edit.png

Before After
Width: 32  |  Height: 32  |  Size: 1.0 KiB
Loading…
Cancel
Save