杨阁辉 4 years ago
parent
commit
2ecb7aaa94
7 changed files with 548 additions and 469 deletions
  1. 8
      apis/add-paper.js
  2. 76
      pages/add-paper/index.vue
  3. 733
      pages/mall/index.vue
  4. 5
      pages/my-offer/index.vue
  5. 16
      pages/paper-detail/index.vue
  6. 95
      pages/quotation-details/index.vue
  7. 84
      pages/store-settings/index.vue

8
apis/add-paper.js

@ -44,3 +44,11 @@ export function productStatus(data) {
data data
}) })
} }
// 编辑店铺、
export function updataStore(data) {
return http.post({
url: '/base-paper-trading/update/store?mallSupplierId='+data.mallSupplierId,
data
})
}

76
pages/add-paper/index.vue

@ -14,7 +14,7 @@
<text class="add-paper-text">纸品名称</text> <text class="add-paper-text">纸品名称</text>
</view> </view>
<view class="add-paper-input"> <view class="add-paper-input">
<qn-easyinput type="digit" :styles="{ disableColor: '#fff' }" v-model="form.name" :inputBorder="false" text="right" placeholder="请输入纸品名称"></qn-easyinput>
<qn-easyinput type="text" :styles="{ disableColor: '#fff' }" v-model="form.name" :inputBorder="false" text="right" placeholder="请输入纸品名称"></qn-easyinput>
</view> </view>
</view> </view>
<view class="add-paper-border"></view> <view class="add-paper-border"></view>
@ -25,7 +25,7 @@
</view> </view>
<view class="add-paper-input"> <view class="add-paper-input">
<qn-easyinput <qn-easyinput
type="digit"
type="text"
:styles="{ disableColor: '#fff' }" :styles="{ disableColor: '#fff' }"
v-model="form.manufacturerName" v-model="form.manufacturerName"
:inputBorder="false" :inputBorder="false"
@ -42,7 +42,7 @@
</view> </view>
<view class="add-paper-input"> <view class="add-paper-input">
<qn-easyinput <qn-easyinput
type="digit"
type="text"
:styles="{ disableColor: '#fff' }" :styles="{ disableColor: '#fff' }"
v-model="form.brandName" v-model="form.brandName"
:inputBorder="false" :inputBorder="false"
@ -70,7 +70,7 @@
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text> <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> <text class="add-paper-text">是否主营</text>
</view> </view>
<view><uni-data-checkbox v-model="form.isMainProduct" :localdata="range" @change="change"></uni-data-checkbox></view>
<view><uni-data-checkbox v-model="form.isMainProductRep" :localdata="range"></uni-data-checkbox></view>
</view> </view>
</view> </view>
<uGap></uGap> <uGap></uGap>
@ -281,11 +281,11 @@
</template> </template>
<script> <script>
import { back, go2,uploadFile } from '@/utils/hook.js'
import { back, go2, uploadFile } from '@/utils/hook.js'
import qnEasyinput from '@/components/qn-easyinput/qn-easyinput.vue' import qnEasyinput from '@/components/qn-easyinput/qn-easyinput.vue'
import uGap from '@/components/u-gap/u-gap.vue' import uGap from '@/components/u-gap/u-gap.vue'
import { getCategoryList, createProduct, getSupplierDteail, updateProduct } from '@/apis/add-paper.js' import { getCategoryList, createProduct, getSupplierDteail, updateProduct } from '@/apis/add-paper.js'
const validateFields = ['name', 'isMainProduct', 'manufacturerName', 'brandName', 'categoryId']
const validateFields = ['name', 'isMainProductRep', 'manufacturerName', 'brandName', 'categoryId']
const validatePriceFields = ['isPromoting', 'listPrice', 'minimum', 'stock', 'stockUnit', 'weight'] const validatePriceFields = ['isPromoting', 'listPrice', 'minimum', 'stock', 'stockUnit', 'weight']
export default { export default {
components: { components: {
@ -297,7 +297,7 @@ export default {
title: '添加纸品', title: '添加纸品',
form: { form: {
name: null, name: null,
isMainProduct: 0,
isMainProductRep: 0,
manufacturerName: null, manufacturerName: null,
brandName: null, brandName: null,
categoryId: null categoryId: null
@ -337,24 +337,26 @@ export default {
], ],
imgList: [], imgList: [],
priceIndex: 0, priceIndex: 0,
eidtFor: 0
eidtFor: 0,
option: ''
} }
}, },
onLoad(option) { onLoad(option) {
if (option) { if (option) {
this.title = option.title this.title = option.title
} }
this.option = option
this.eidtFor = 0 this.eidtFor = 0
if (this.title === '编辑纸品') { if (this.title === '编辑纸品') {
this.getDteailList() this.getDteailList()
this.eidtFor = 1 this.eidtFor = 1
} }
console.log('this.$store.state.supplierInfo.id',this.$store.state.supplierInfo.id)
console.log('this.$store.state.supplierInfo.id', this.$store.state.supplierInfo.id)
this.getCategoryListQuery() this.getCategoryListQuery()
}, },
watch: { watch: {
['form.name'](val) { ['form.name'](val) {
this.form.id = ""
this.form.id = ''
console.log(111) console.log(111)
} }
}, },
@ -379,14 +381,40 @@ export default {
// //
getDteailList(res) { getDteailList(res) {
var params = { var params = {
mallSupplierIds : null,
productId : null
mallSupplierIds: this.$store.state.supplierInfo.supplierId,
productId: this.option.id
} }
this.getSupplierDteail(params).then(res => {
getSupplierDteail(params).then(res => {
if (res) { if (res) {
this.form = res this.form = res
if (this.form.isMainProduct === true) {
this.$set(this.form, 'isMainProductRep', 0)
} else {
this.$set(this.form, 'isMainProductRep', 1)
}
this.skuList = res.skuList this.skuList = res.skuList
this.imgList = res.imgList
for(let j = 0;j<this.skuList.length;j++){
if(this.skuList[j].isPromoting === true){
this.skuList[j].isPromoting = 0
}else{
this.skuList[j].isPromoting = 1
}
}
for(let x =0;x<this.paperList.length;x++){
if(this.paperList[x].id === this.form.categoryId){
this.$set(this.form,'categoryName',this.paperList[x].name)
}
}
this.imgList = []
for (let i = 0; i < res.imgList.length; i++) {
var params = {
name: 'text',
extname: 'text',
url: res.imgList[i]
}
this.imgList.push(params)
}
console.log('this.form',this.form)
} }
}) })
}, },
@ -421,9 +449,9 @@ export default {
this.imgList.push(item.tempFiles[0]) this.imgList.push(item.tempFiles[0])
this.postuploadFile(item.tempFiles[0]) this.postuploadFile(item.tempFiles[0])
}, },
postuploadFile(path){
uploadFile(path.path).then(val=>{
this.imgList[this.imgList.length -1].pathUrl = val
postuploadFile(path) {
uploadFile(path.path).then(val => {
this.imgList[this.imgList.length - 1].pathUrl = val
}) })
}, },
// //
@ -458,14 +486,22 @@ export default {
} }
} }
var upImage = [] var upImage = []
for(let i = 0;i < this.imgList.length;i++){
for (let i = 0; i < this.imgList.length; i++) {
upImage.push(this.imgList[i].pathUrl) upImage.push(this.imgList[i].pathUrl)
} }
for(let j = 0;j<this.skuList.length;j++){
if(this.skuList[j].isPromoting === 0){
this.skuList[j].isPromoting = true
}else{
this.skuList[j].isPromoting = false
}
}
var params = { var params = {
...this.form, ...this.form,
isMainProduct: this.form.isMainProductRep === 0 ? true : false,
skuList: this.skuList, skuList: this.skuList,
imgList:upImage,
supplierId:this.$store.state.supplierInfo.supplierId
imgList: upImage,
supplierId: this.$store.state.supplierInfo.supplierId
} }
if (this.eidtFor === 0) { if (this.eidtFor === 0) {
createProduct(params).then(res => { createProduct(params).then(res => {

733
pages/mall/index.vue

@ -1,368 +1,369 @@
<template>
<view class="warpper">
<uni-nav-bar>
<view slot="left" class="left-title">纸商城</view>
<view slot="right" class="right-title">分享</view>
</uni-nav-bar>
<view class="top-box">
<view class=""><image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image></view>
<view class="center">
<view class="title">东莞市隆兴纸业有限公司</view>
<view class="desc">全部商品 39 &nbsp; | &nbsp;上新 9</view>
</view>
<view class="right">
<view class="cut" @click="checkMall()">
切换商城
<image class="cut-icon" src="/static/imgs/mall/cut-icon.png" mode=""></image>
</view>
<view class="set" @click="setting()">设置</view>
</view>
</view>
<uGap></uGap>
<view class="" v-if="pageShow">
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #FFFFFF;">
<view v-for="(item, index) in listData" :key="index" @click="detailInfo(item)">
<view class="content">
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image>
<view class="">
<view class="title">
<view class="">{{ item.brandName }}</view>
<view class="">
<image class="icon" :src="item.status === 1 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" mode=""></image>
</view>
</view>
<view class="sub-title">{{ item.categoryName }}/{{ item.name }}/{{ item.manufacturerName }}</view>
<view class="desc">克重(价格)200(3900) 235(3900) 255(390 0)255(390</view>
</view>
</view>
<view class="other">
<view class="time">{{ item.updateTime }}</view>
<view class="btn">
<view class="" @click="editPaper()">编辑</view>
<view class="divide"></view>
<view class="" @click="productStatusChange(item)">{{ item.status === '30111' ? '下架' : '上架' }}</view>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
<view>
<view class="offer-prices" @click="nativeTo()"><image class="my-image" src="../../static/imgs/trade/camera.png" mode=""></image></view>
</view>
<no-data v-if="!pageShow"></no-data>
</view>
</template>
<script>
import uGap from '@/components/u-gap/u-gap.vue'
import { back, go2, loginG2 } from '@/utils/hook.js'
import { SupplierList, productStatus } from '@/apis/add-paper.js'
import noData from './no-data.vue'
export default {
components: { uGap, noData },
data() {
return {
pageShow: true,
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false
},
pattern: {
backgroundColor: '#007AFF',
buttonColor: '#007AFF'
},
content: [],
horizontal: 'right',
vertical: 'bottom',
direction: 'vertical',
orderPagination: {
pageNum: 0, //
pageSize: 10,
storeId:null,
name:null,
supplierId:this.$store.state.supplierInfo.supplierId
},
listData: []
}
},
onLoad() {
this.quertData()
},
methods: {
back,
// pageShow
quertData() {
return new Promise((resolve, reject) => {
SupplierList({ ...this.orderPagination })
.then(res => {
console.log('纸品列表', res)
if (res) {
if (res.records.length === 0) {
this.pageShow = false
return
}
if (this.orderPagination.pageNum == 1) {
this.listData = res.records
} else {
this.listData = this.listData.concat(res.records)
}
resolve({ list: this.listData, total: res.total })
}
<template>
<view class="warpper">
<uni-nav-bar>
<view slot="left" class="left-title">纸商城</view>
<view slot="right" class="right-title">分享</view>
</uni-nav-bar>
<view class="top-box">
<view class=""><image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image></view>
<view class="center">
<view class="title">东莞市隆兴纸业有限公司</view>
<view class="desc">全部商品 39 &nbsp; | &nbsp;上新 9</view>
</view>
<view class="right">
<view class="cut" @click="checkMall()">
切换商城
<image class="cut-icon" src="/static/imgs/mall/cut-icon.png" mode=""></image>
</view>
<view class="set" @click="setting">设置</view>
</view>
</view>
<uGap></uGap>
<view class="" v-if="pageShow">
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #FFFFFF;">
<view v-for="(item, index) in listData" :key="index" >
<view class="content" @click="detailInfo(item)">
<image class="image" :src="item.litPicUrl" mode=""></image>
<view class="">
<view class="title">
<view class="">{{ item.brandName }}</view>
<view class="">
<image class="icon" :src="item.status === 1 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" mode=""></image>
</view>
</view>
<view class="sub-title">{{ item.categoryName }}/{{ item.name }}/{{ item.manufacturerName }}</view>
<view class="desc">克重(价格)200(3900) 235(3900) 255(390 0)255(390</view>
</view>
</view>
<view class="other">
<view class="time">{{ item.updateTime }}</view>
<view class="btn">
<view class="" @click="editPaper(item)">编辑</view>
<view class="divide"></view>
<view class="" @click="productStatusChange(item)">{{ item.status === '30111' ? '下架' : '上架' }}</view>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
<view>
<view class="offer-prices" @click="nativeTo()"><image class="my-image" src="../../static/imgs/trade/camera.png" mode=""></image></view>
</view>
<no-data v-if="!pageShow"></no-data>
</view>
</template>
<script>
import uGap from '@/components/u-gap/u-gap.vue'
import { back, go2, loginG2 } from '@/utils/hook.js'
import { SupplierList, productStatus } from '@/apis/add-paper.js'
import noData from './no-data.vue'
export default {
components: { uGap, noData },
data() {
return {
pageShow: true,
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false
},
pattern: {
backgroundColor: '#007AFF',
buttonColor: '#007AFF'
},
content: [],
horizontal: 'right',
vertical: 'bottom',
direction: 'vertical',
orderPagination: {
pageNum: 0, //
pageSize: 10,
storeId: null,
name: null,
supplierId: this.$store.state.supplierInfo.supplierId
},
listData: []
}
},
onLoad() {
this.quertData()
},
methods: {
back,
// pageShow
quertData() {
return new Promise((resolve, reject) => {
SupplierList({ ...this.orderPagination })
.then(res => {
console.log('纸品列表', res)
if (res) {
if (res.records.length === 0) {
this.pageShow = false
return
}
if (this.orderPagination.pageNum == 1) {
this.listData = res.records
} else {
this.listData = this.listData.concat(res.records)
}
resolve({ list: this.listData, total: res.total })
}
})
.catch(err => {
reject(err)
})
})
},
downCallback() {
this.orderPagination.pageNum = 1
this.quertData()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback() {
this.orderPagination.pageNum++
this.quertData()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
},
//
checkMall() {
go2('switching-mall')
},
//
nativeTo() {
var params = {
title: '添加纸品'
}
go2('add-paper', params)
},
//
editPaper(item) {
var params = {
...item,
title: '编辑纸品'
}
go2('add-paper', params)
},
//
setting(item) {
go2('store-settings')
},
//
detailInfo(item) {
go2('paper-detail', item)
},
//
productStatusChange(item) {
var params = {
id: item.id,
status: item.status === '30111' ? '30112' : '30111'
}
productStatus(params).then(res => {
if (res) {
uni.showToast({
title: '状态修改成功',
icon: 'success'
}) })
.catch(err => {
reject(err)
})
})
},
downCallback() {
this.orderPagination.pageNum = 1
this.quertData()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback() {
this.orderPagination.pageNum++
this.quertData()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
},
//
checkMall() {
go2('switching-mall')
},
//
nativeTo() {
var params = {
title: '添加纸品'
}
go2('add-paper', params)
},
//
editPaper() {
var params = {
title: '编辑纸品'
}
go2('add-paper', params)
},
//
setting() {
go2('store-settings')
},
//
detailInfo(item){
loginGo2('paper-detail',item)
},
//
productStatusChange(item) {
var params = {
id: item.id,
status: item.status === '30111' ? '30112' : '30111'
}
productStatus(params).then(res => {
if (res) {
uni.showToast({
title: '添加成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
}
})
}
}
}
</script>
<style lang="scss">
.warpper {
width: 750rpx;
.left-title {
font-size: 40rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: right;
font-weight: 500;
}
.top-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
height: 180rpx;
background: url('/static/imgs/mall/zsc-bg-icon.png') no-repeat;
background-size: 100%;
.image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.right {
width: 140rpx;
}
.center {
position: relative;
left: -20rpx;
}
.title {
font-size: 34rpx;
color: #ffffff;
letter-spacing: 2rpx;
font-weight: 600;
margin-bottom: 12rpx;
}
.desc {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
padding-right: 32rpx;
}
.cut {
display: flex;
align-items: center;
font-size: 24rpx;
color: #ffffff;
letter-spacing: 0;
text-align: center;
font-weight: 400;
.cut-icon {
width: 29.42rpx;
height: 26.67rpx;
margin-left: 10rpx;
}
}
.set {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
position: relative;
top: 39rpx;
left: 60rpx;
}
}
.content {
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
display: flex;
flex-direction: row;
padding: 24rpx 0rpx 24rpx 32rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 18rpx;
}
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
.icon {
position: relative;
top: -22rpx;
width: 150rpx;
height: 50rpx;
}
}
.sub-title {
position: relative;
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
top: -4rpx;
}
.desc {
font-size: 28rpx;
color: #555555;
letter-spacing: 0;
font-weight: 400;
padding-top: 10rpx;
line-height: 1.4;
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 80rpx;
background: #ffffff;
padding: 0rpx 32rpx;
.time {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
}
.btn {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
color: #007aff;
letter-spacing: 0;
text-align: right;
font-weight: 400;
}
.divide {
width: 2rpx;
height: 32rpx;
background: #d8d8d8;
margin: 0 32rpx;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
.offer-prices {
position: absolute;
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #007aff;
border-radius: 50%;
padding: 10rpx;
text-align: center;
width: 110rpx;
height: 110rpx;
border: 2rpx solid #f9f9f9;
box-shadow: 0rpx 4rpx 34rpx 0rpx rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.my-image {
width: 100rpx;
height: 100rpx;
}
}
this.orderPagination.pageNum = 1
this.quertData()
}
})
}
}
}
</script>
<style lang="scss">
.warpper {
width: 750rpx;
.left-title {
font-size: 40rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: right;
font-weight: 500;
}
.top-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
height: 180rpx;
background: url('/static/imgs/mall/zsc-bg-icon.png') no-repeat;
background-size: 100%;
.image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.right {
width: 140rpx;
}
.center {
position: relative;
left: -20rpx;
}
.title {
font-size: 34rpx;
color: #ffffff;
letter-spacing: 2rpx;
font-weight: 600;
margin-bottom: 12rpx;
}
.desc {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
padding-right: 32rpx;
}
.cut {
display: flex;
align-items: center;
font-size: 24rpx;
color: #ffffff;
letter-spacing: 0;
text-align: center;
font-weight: 400;
.cut-icon {
width: 29.42rpx;
height: 26.67rpx;
margin-left: 10rpx;
}
}
.set {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
position: relative;
top: 39rpx;
left: 60rpx;
}
}
.content {
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
display: flex;
flex-direction: row;
padding: 24rpx 0rpx 24rpx 32rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 18rpx;
}
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
.icon {
position: relative;
top: -22rpx;
width: 150rpx;
height: 50rpx;
}
}
.sub-title {
position: relative;
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
top: -4rpx;
}
.desc {
font-size: 28rpx;
color: #555555;
letter-spacing: 0;
font-weight: 400;
padding-top: 10rpx;
line-height: 1.4;
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 80rpx;
background: #ffffff;
padding: 0rpx 32rpx;
.time {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
}
.btn {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
color: #007aff;
letter-spacing: 0;
text-align: right;
font-weight: 400;
}
.divide {
width: 2rpx;
height: 32rpx;
background: #d8d8d8;
margin: 0 32rpx;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
.offer-prices {
position: absolute;
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #007aff;
border-radius: 50%;
padding: 10rpx;
text-align: center;
width: 110rpx;
height: 110rpx;
border: 2rpx solid #f9f9f9;
box-shadow: 0rpx 4rpx 34rpx 0rpx rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.my-image {
width: 100rpx;
height: 100rpx;
}
}
</style> </style>

5
pages/my-offer/index.vue

@ -140,10 +140,7 @@ export default {
// //
myPriceInfo(item) { myPriceInfo(item) {
console.log(item)
uni.navigateTo({
url: '/pages/quotation-details/index'
})
go2('quotation-details',item)
} }
} }
} }

16
pages/paper-detail/index.vue

@ -32,19 +32,19 @@
<uni-table emptyText="暂无更多数据"> <uni-table emptyText="暂无更多数据">
<!-- 表头行 --> <!-- 表头行 -->
<uni-tr class="paper-table-title"> <uni-tr class="paper-table-title">
<uni-th align="left" width="65">克重</uni-th>
<uni-th align="left" width="65">规格</uni-th>
<uni-th align="left" width="55">克重</uni-th>
<!-- <uni-th align="left" width="65">规格</uni-th> -->
<uni-th align="left" width="65">售价</uni-th> <uni-th align="left" width="65">售价</uni-th>
<uni-th align="left" width="65">库存</uni-th> <uni-th align="left" width="65">库存</uni-th>
<uni-th align="left" width="65">是否特价</uni-th>
<uni-th align="left" width="75">是否特价</uni-th>
</uni-tr> </uni-tr>
<!-- 表格数据行 --> <!-- 表格数据行 -->
<uni-tr v-for="(item,index) in skuList" :key="index"> <uni-tr v-for="(item,index) in skuList" :key="index">
<uni-td>{{item.weight}}</uni-td> <uni-td>{{item.weight}}</uni-td>
<uni-td>779*1092</uni-td>
<!-- <uni-td>779*1092</uni-td> -->
<uni-td>{{item.listPrice}}</uni-td> <uni-td>{{item.listPrice}}</uni-td>
<uni-td>{{item.stock}}</uni-td> <uni-td>{{item.stock}}</uni-td>
<uni-td>{{item.isPromoting === ture ?'是':'否'}}</uni-td>
<uni-td>{{item.isPromoting === true ?'是':'否'}}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</view> </view>
@ -99,10 +99,10 @@ export default {
// //
getDteailList(option) { getDteailList(option) {
var params = { var params = {
mallSupplierIds : option.id,
productId : null
mallSupplierIds : this.$store.state.supplierInfo.supplierId,
productId : option.id
} }
this.getSupplierDteail(params).then(res => {
getSupplierDteail(params).then(res => {
if (res) { if (res) {
this.form = res this.form = res
this.skuList = res.skuList this.skuList = res.skuList

95
pages/quotation-details/index.vue

@ -28,12 +28,12 @@
<uGap></uGap> <uGap></uGap>
<view class="submit-contant" v-for="(items, index) in upDataObj.itemList" :key="index"> <view class="submit-contant" v-for="(items, index) in upDataObj.itemList" :key="index">
<view class="submit-contant-head"> <view class="submit-contant-head">
<view class="submit-contant-title">{{ items.brandName }}|{{ items.gramWeight }}|{{ items.length }}*{{ items.width }}|{{ items.quantity }}</view>
<view class="submit-contant-title">{{ items.brandName }}|{{ items.gramWeight }}|{{ items.length }}*{{ items.width }}|{{ items.quantity }}</view>
</view> </view>
<view class="submit-contant-body"> <view class="submit-contant-body">
<view class=""> <view class="">
<text class="submit-contant-body-title">重量()</text> <text class="submit-contant-body-title">重量()</text>
<text class="submit-contant-body-subtitle">1.6544</text>
<text class="submit-contant-body-subtitle">{{ items.wight }}</text>
</view> </view>
<view> <view>
<text class="submit-contant-body-title">单价(/)</text> <text class="submit-contant-body-title">单价(/)</text>
@ -51,18 +51,18 @@
<view class="submit-contant-order"> <view class="submit-contant-order">
<view class=""> <view class="">
<text class="submit-contant-order-title">其他费用</text> <text class="submit-contant-order-title">其他费用</text>
<text class="submit-contant-order-subtitle">¥ 80.00</text>
<text class="submit-contant-order-subtitle">¥ {{ upDataObj.otherFee }}</text>
</view> </view>
<view class=""> <view class="">
<text class="submit-contant-order-title">合计</text> <text class="submit-contant-order-title">合计</text>
<text class="submit-contant-order-money">¥ 13800.32</text>
<text class="submit-contant-order-money">¥ {{ upDataObj.totalAllPrice }}</text>
</view> </view>
</view> </view>
<uGap></uGap> <uGap></uGap>
<view class="submit-contant-time"> <view class="submit-contant-time">
<view class=""> <view class="">
<text class="submit-contant-time-title">有效时间</text> <text class="submit-contant-time-title">有效时间</text>
<text class="submit-contant-time-title">24小时</text>
<text class="submit-contant-time-title">{{ upDataObj.enquiryValidTime }}</text>
</view> </view>
</view> </view>
<uGap></uGap> <uGap></uGap>
@ -91,46 +91,36 @@ export default {
value: '', value: '',
visible: true, visible: true,
title: 'picker-view', title: 'picker-view',
upDataObj:{
belongEnterpriseName:'东莞市隆兴纸业有限公司',
deliveryArea:'广东省/广州市/天河区',
deliveryDay:'2021/12/29 12:30',
enquiryValidTime:[12,11,10],
itemList:[
{
brandName:'丽品白卡',
categoryName:"",
gramWeight:'200g',
length:'787',
quantity:'5000张',
width:'1092',
unitFee:'1000',
totalPrice:'1202'
},
{
brandName:'丽品白卡',
categoryName:"",
gramWeight:'200g',
length:'787',
quantity:'5000张',
width:'1092',
unitFee:'1000',
totalPrice:'1202'
}
]
},
upDataObj: {
belongEnterpriseName: '东莞市隆兴纸业有限公司',
deliveryArea: '广东省/广州市/天河区',
deliveryDay: '2021/12/29 12:30',
enquiryValidTime: [12, 11, 10],
itemList: []
}
} }
}, },
onLoad(Option) {
this.getDetail(Option.id)
},
methods: { methods: {
back, back,
// //
getDetail(id){
this.enquiryReplyDetail(id)
.then(({ list, total }) => {
this.$refs.orderRef.loadSuccess({ list, total })
getDetail(id) {
enquiryReplyDetail(id)
.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.$set(this.upDataObj, 'otherFee', 0)
this.$set(this.upDataObj, 'totalAllPrice', 0)
this.priceFree()
}
}) })
.catch(() => {
this.$refs.orderRef.loadFail()
.catch(err => {
reject(err)
}) })
}, },
// //
@ -150,6 +140,14 @@ export default {
bindChange(e) { bindChange(e) {
console.log(e.detail.value) console.log(e.detail.value)
}, },
priceFree() {
for (let i = 0; i < this.upDataObj.itemList.length; i++) {
var totalAllPrice = parseFloat(this.upDataObj.totalAllPrice) + parseFloat(this.upDataObj.itemList[i].totalPrice)
this.upDataObj.totalAllPrice = totalAllPrice.toFixed(2)
var otherFee = parseFloat(this.upDataObj.otherFee) + parseFloat(this.upDataObj.itemList[i].otherFee)
this.upDataObj.otherFee = otherFee.toFixed(2)
}
},
close() { close() {
this.$refs.popup.close() this.$refs.popup.close()
this.$refs.popupPrice.close() this.$refs.popupPrice.close()
@ -168,13 +166,12 @@ export default {
this.$refs.popupTime.close() this.$refs.popupTime.close()
}, },
// //
editPrice(){
var params= {
title:"修改报价"
editPrice() {
var params = {
title: '修改报价'
} }
go2('submit-quotation', params)
},
go2('submit-quotation', params)
}
} }
} }
</script> </script>
@ -557,16 +554,16 @@ export default {
padding: 32rpx; padding: 32rpx;
line-height: 42rpx; line-height: 42rpx;
} }
.edit-price{
.edit-price {
font-size: 28rpx; font-size: 28rpx;
color: #007AFF;
color: #007aff;
text-align: right; text-align: right;
line-height: 40prx; line-height: 40prx;
font-weight: 500; font-weight: 500;
} }
.price-tips{
.price-tips {
font-size: 30rpx; font-size: 30rpx;
color: #FF5368;
color: #ff5368;
letter-spacing: 0; letter-spacing: 0;
text-align: right; text-align: right;
font-weight: 500; font-weight: 500;

84
pages/store-settings/index.vue

@ -24,7 +24,7 @@
<view class="tore-setting-name"><text>店铺logo</text></view> <view class="tore-setting-name"><text>店铺logo</text></view>
<view class="store-log store-image-flex"> <view class="store-log store-image-flex">
<uni-file-picker <uni-file-picker
class="stotr-image-width"
class="stotr-image-width"
v-model="imageValue" v-model="imageValue"
file-mediatype="image" file-mediatype="image"
mode="grid" mode="grid"
@ -35,9 +35,8 @@
@success="success" @success="success"
@fail="fail" @fail="fail"
@select="select" @select="select"
@delete="deleteImage"
> >
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker> </uni-file-picker>
<view class="store-image-text ">建议尺寸200*200像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view> <view class="store-image-text ">建议尺寸200*200像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
</view> </view>
@ -45,7 +44,7 @@
<view class="store-log"> <view class="store-log">
<view class="tore-setting-name"><text>背景图片</text></view> <view class="tore-setting-name"><text>背景图片</text></view>
<view class="store-log store-image-flex"> <view class="store-log store-image-flex">
<uni-file-picker class="stotr-image-widtht" :limit="1" fileMediatype="image" :image-styles="imageStylest" >
<uni-file-picker class="stotr-image-widtht" @select="backSelect" :limit="1" fileMediatype="image" :image-styles="imageStylest">
<image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image> <image class="paper-upload-image" src="../../static/imgs/trade/uploadImage.png" mode=""></image>
</uni-file-picker> </uni-file-picker>
<view class="store-image-text">建议尺寸750*370像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view> <view class="store-image-text">建议尺寸750*370像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
@ -53,18 +52,21 @@
</view> </view>
</view> </view>
<view class=""> <view class="">
<view class="upload-btn"><button type="primary" class="btn-class">保存设置</button></view>
<view class="upload-btn"><button type="primary" class="btn-class" @click="uploadSet">保存设置</button></view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { back, go2 } from '@/utils/hook.js'
import { back, go2, uploadFile } from '@/utils/hook.js'
import { updataStore } from '@/apis/add-paper.js'
export default { export default {
data() { data() {
return { return {
storeName: '', storeName: '',
imageValue: [], imageValue: [],
background: '',
logo: '',
imageStyles: { imageStyles: {
width: 120, width: 120,
height: 100, height: 100,
@ -74,9 +76,16 @@ export default {
width: 183, width: 183,
height: 94, height: 94,
border: false border: false
}
},
option:''
} }
}, },
onLoad(option) {
if (option) {
this.option = option
}
},
methods: { methods: {
back, back,
// //
@ -91,9 +100,10 @@ export default {
}, },
// //
select(item) { select(item) {
console.log(item)
console.log(this.imageValue)
this.imageValue.push(item.tempFiles[0])
this.postuploadFile(item.tempFiles[0], 'logo')
},
backSelect(item) {
this.postuploadFile(item.tempFiles[0], 'background')
}, },
// //
deleteImage(item) { deleteImage(item) {
@ -104,6 +114,36 @@ export default {
} }
} }
console.log(this.imageValue) console.log(this.imageValue)
},
postuploadFile(path, type) {
uploadFile(path.path).then(val => {
if (type === 'logo') {
this.logo = val
} else {
this.background = val
}
})
},
//
uploadSet() {
var params = {
backgroundImg: this.background,
id: this.$store.state.supplierInfo.id,
logo: this.logo,
name: this.storeName,
mallSupplierId: this.$store.state.supplierInfo.supplierId
}
updataStore(params).then(res => {
if (res) {
uni.showToast({
title: '设置成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
}
})
} }
} }
} }
@ -111,7 +151,7 @@ export default {
<style lang="scss"> <style lang="scss">
.store-setting { .store-setting {
background-color: #FFFFFF;
background-color: #ffffff;
.store-setting-title { .store-setting-title {
width: 100%; width: 100%;
font-size: 36rpx; font-size: 36rpx;
@ -139,7 +179,7 @@ export default {
.store-log { .store-log {
margin-top: 32rpx; margin-top: 32rpx;
} }
.store-image-flex{
.store-image-flex {
display: flex; display: flex;
} }
.store-image-text { .store-image-text {
@ -150,24 +190,24 @@ export default {
line-height: 40rpx; line-height: 40rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
.stotr-image-widtht{
.stotr-image-widtht {
width: 100%; width: 100%;
background-color: rgba(220,222,224,1);
background-color: rgba(220, 222, 224, 1);
} }
.stotr-image-width{
.stotr-image-width {
width: 48%; width: 48%;
background-color: rgba(220,222,224,1);
background-color: rgba(220, 222, 224, 1);
} }
.upload-btn{
.upload-btn {
position: absolute; position: absolute;
width: 92%;
bottom: 32rpx;
left: 32rpx;
width: 92%;
bottom: 32rpx;
left: 32rpx;
} }
.paper-upload-image{
.paper-upload-image {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
background: rgba(220,222,224,1);
background: rgba(220, 222, 224, 1);
border-radius: 10rpx; border-radius: 10rpx;
} }
} }

Loading…
Cancel
Save