Browse Source

修改问题

devlop
杨阁辉 4 years ago
parent
commit
aa8f668235
5 changed files with 994 additions and 908 deletions
  1. 38
      pages/add-paper/index.vue
  2. 2
      pages/mall/index.vue
  3. 204
      pages/message/system-message.vue
  4. 1658
      pages/submit-quotation/index.vue
  5. BIN
      static/imgs/mall/edit.png

38
pages/add-paper/index.vue

@ -96,7 +96,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">
@ -128,7 +128,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>
@ -146,7 +146,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">
@ -163,7 +163,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">
@ -181,7 +181,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>
@ -334,15 +334,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,
@ -418,7 +428,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)
}
@ -433,7 +444,7 @@ export default {
listPrice: null,
minimum: null,
stock: null,
stockUnit: '2',
stockUnit: 2,
weight: null,
categoryName: null
})
@ -473,6 +484,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({

2
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',

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;

1658
pages/submit-quotation/index.vue
File diff suppressed because it is too large
View File

BIN
static/imgs/mall/edit.png

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