邓雄飞 4 years ago
parent
commit
1c3a222b8f
22 changed files with 893 additions and 343 deletions
  1. 18
      apis/add-paper.js
  2. 8
      apis/setting.js
  3. 2
      apis/trade.js
  4. 220
      manifest.json
  5. 22
      pages.json
  6. 70
      pages/about/index.vue
  7. 92
      pages/add-paper/index.vue
  8. 5
      pages/client-detail/base-paper-deals.vue
  9. 4
      pages/client-detail/basic-information.vue
  10. 3
      pages/client-detail/equipment-information.vue
  11. 149
      pages/mall/index.vue
  12. 71
      pages/mall/no-data.vue
  13. 5
      pages/my-offer/index.vue
  14. 73
      pages/paper-detail/index.vue
  15. 95
      pages/quotation-details/index.vue
  16. 75
      pages/setting/index.vue
  17. 84
      pages/store-settings/index.vue
  18. 85
      pages/submit-quotation/index.vue
  19. 46
      pages/switching-mall/index.vue
  20. 2
      pages/trade/index.vue
  21. 3
      pages/trade/quotationList.vue
  22. 104
      pages/user-info/index.vue

18
apis/add-paper.js

@ -44,3 +44,21 @@ export function productStatus(data) {
data
})
}
// 编辑店铺、
export function updataStore(data) {
return http.post({
url: '/base-paper-trading/update/store?mallSupplierId='+data.mallSupplierId,
data
})
}
/**
* 获取我店铺列表
* swagger:http://api-ops-yyt-test.qniao.cn/base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/店铺/getMyStoreListUsingGET
*/
export function getStoreList(data) {
return http.get({
url: '/base-paper-trading/get/my/store-list',
data
})
}

8
apis/setting.js

@ -0,0 +1,8 @@
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
})
}

2
apis/trade.js

@ -33,7 +33,7 @@ export function getMyreplyList(data) {
// 提交报价
export function updataEnquiryReply(data) {
return http.post({
url: '/base-paper-trading/update/enquiry-reply',
url: '/base-paper-trading/update/enquiry-reply?userId='+data.userId,
data
})
}

220
manifest.json

@ -1,119 +1,119 @@
{
"name" : "纸掌柜",
"appid" : "__UNI__8C1E198",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"networkTimeout" : {
"request" : 6000
"name": "纸掌柜",
"appid": "__UNI__8C1E198",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"networkTimeout": {
"request": 6000
},
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"compatible" : {
"ignoreVersion" : true
},
/* */
"modules" : {
"Maps" : {},
"Geolocation" : {},
"FaceID" : {},
"iBeacon" : {}
"compatible": {
"ignoreVersion": true
},
/* */
"modules": {
"Maps": {},
"Geolocation": {},
"FaceID": {},
"iBeacon": {}
},
/* */
"distribute": {
/* android */
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
],
"abiFilters": ["armeabi-v7a", "x86"]
},
/* ios */
"ios": {},
/* SDK */
"sdkConfigs": {
"maps": {
"amap": {
"appkey_ios": "0182ee2a9fdd5fd3ef6a8bd5a2f98325",
"appkey_android": "877848546f7f3717101a17c33e1d4df3"
}
},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
],
"abiFilters" : [ "armeabi-v7a", "x86" ]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "0182ee2a9fdd5fd3ef6a8bd5a2f98325",
"appkey_android" : "877848546f7f3717101a17c33e1d4df3"
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "",
"UniversalLinks" : ""
}
},
"ad" : {},
"geolocation" : {
"amap" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "0182ee2a9fdd5fd3ef6a8bd5a2f98325",
"appkey_android" : "877848546f7f3717101a17c33e1d4df3"
}
},
"share" : {}
}
"payment": {
"weixin": {
"__platform__": ["ios", "android"],
"appid": "",
"UniversalLinks": ""
}
},
"uniStatistics" : {
"enable" : true
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
"ad": {},
"geolocation": {
"amap": {
"__platform__": ["ios", "android"],
"appkey_ios": "0182ee2a9fdd5fd3ef6a8bd5a2f98325",
"appkey_android": "877848546f7f3717101a17c33e1d4df3"
}
},
"usingComponents" : true
"share": {}
}
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
"uniStatistics": {
"enable": true
}
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
},
"vueVersion" : "2",
"h5" : {
"router" : {
"mode" : "history"
}
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "2",
"h5": {
"router": {
"mode": "history"
}
}
}

22
pages.json

@ -258,7 +258,27 @@
"enablePullDownRefresh": false
}
}
],
,{
"path" : "pages/user-info/index",
"style" :
{
"navigationBarTitleText": "用户名",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/about/index",
"style" :
{
"navigationBarTitleText": "关于",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",

70
pages/about/index.vue

@ -0,0 +1,70 @@
<template>
<view class="about">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="about-title">关于纸掌柜</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="about-main">
<view class=""><image class="about-image" src="../../static/logo.png" mode=""></image></view>
<view class="about-text"><text>纸掌柜</text></view>
<view class="about-subtext"><text>帮你卖好每一吨纸</text></view>
<view class="about-vs"><text>版本号 纸掌柜 V1.0.0</text></view>
</view>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
export default {
data() {
return {}
},
methods: {
back
}
}
</script>
<style lang="scss">
.about {
.about-main {
text-align: center;
}
.about-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.about-image {
width: 160rpx;
height: 160rpx;
margin-top: 180rpx;
}
.about-text {
opacity: 0.8;
font-size: 64rpx;
color: #000000;
font-weight: 400;
}
.about-subtext {
font-size: 28rpx;
color: #555555;
letter-spacing: 0;
font-weight: 400;
margin-top: 18rpx;
}
.about-vs {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
margin-top: 100rpx;
}
}
</style>

92
pages/add-paper/index.vue

@ -14,7 +14,7 @@
<text class="add-paper-text">纸品名称</text>
</view>
<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 class="add-paper-border"></view>
@ -25,7 +25,7 @@
</view>
<view class="add-paper-input">
<qn-easyinput
type="digit"
type="text"
:styles="{ disableColor: '#fff' }"
v-model="form.manufacturerName"
:inputBorder="false"
@ -42,7 +42,7 @@
</view>
<view class="add-paper-input">
<qn-easyinput
type="digit"
type="text"
:styles="{ disableColor: '#fff' }"
v-model="form.brandName"
: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-text">是否主营</text>
</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>
<uGap></uGap>
@ -134,7 +134,7 @@
text="right"
placeholder="请输入账期售价"
></qn-easyinput>
<view class="paper-price-title text-left">/</view>
<view class="paper-price-title text-left">/{{ item.stockUnit === '1' ? '' : '吨' }}</view>
</view>
</view>
<view class="paper-price-item">
@ -151,7 +151,7 @@
text="right"
placeholder="请输入纸品库存"
></qn-easyinput>
<view class="paper-price-title text-left"></view>
<view class="paper-price-title text-left">{{ item.stockUnit === '1' ? '' : '吨' }}</view>
</view>
</view>
<view class="paper-price-item">
@ -168,7 +168,7 @@
text="right"
placeholder="请输入最低起送量"
></qn-easyinput>
<view class="paper-price-title text-left"></view>
<view class="paper-price-title text-left">{{ item.stockUnit === '1' ? '' : '吨' }}</view>
</view>
</view>
</view>
@ -281,11 +281,11 @@
</template>
<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 uGap from '@/components/u-gap/u-gap.vue'
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']
export default {
components: {
@ -297,7 +297,7 @@ export default {
title: '添加纸品',
form: {
name: null,
isMainProduct: 0,
isMainProductRep: 0,
manufacturerName: null,
brandName: null,
categoryId: null
@ -337,26 +337,28 @@ export default {
],
imgList: [],
priceIndex: 0,
eidtFor: 0
eidtFor: 0,
option: ''
}
},
onLoad(option) {
if (option) {
this.title = option.title
}
this.option = option
this.getCategoryListQuery()
this.eidtFor = 0
if (this.title === '编辑纸品') {
this.getDteailList()
setTimeout(()=>{
this.getDteailList()
},200)
this.eidtFor = 1
}
console.log('this.$store.state.supplierInfo.id',this.$store.state.supplierInfo.id)
this.getCategoryListQuery()
},
watch: {
['form.name'](val) {
this.form.id = ""
console.log(111)
}
},
methods: {
back,
@ -379,14 +381,40 @@ export default {
//
getDteailList(res) {
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) {
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.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.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 = []
for(let i = 0;i < this.imgList.length;i++){
for (let i = 0; i < this.imgList.length; i++) {
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 = {
...this.form,
isMainProduct: this.form.isMainProductRep === 0 ? true : false,
skuList: this.skuList,
imgList:upImage,
supplierId:this.$store.state.supplierInfo.id
imgList: upImage,
supplierId: this.$store.state.supplierInfo.supplierId
}
if (this.eidtFor === 0) {
createProduct(params).then(res => {

5
pages/client-detail/base-paper-deals.vue

@ -70,7 +70,6 @@ export default {
// customerEnterpriseId: '651107734133018624', // ID
// mallSupplierId: '670334117090562048', // id
status: '0', // 0 /30106,/30107,/30207,/30104
enterpriseIds: [] //ID
},
pagination: {
pageNum: 0, //
@ -93,7 +92,7 @@ export default {
//
getOrderVolumeStatistics() {
getOrderVolumeStatistics(this.orderParams).then(res => {
console.log('原纸交易顶部统计数据', res)
// console.log('', res)
this.topInfo = res
})
},
@ -101,7 +100,7 @@ export default {
return new Promise((resolve, reject) => {
getBasePaperDeals({ ...this.params, ...this.pagination })
.then(res => {
console.log('原纸交易', res)
// console.log('', res)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records

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

@ -14,7 +14,7 @@
<text class="text">{{info.name}}</text>
<image
class="icon"
:src="info.registrationStatus ? '/static/imgs/general/cooperation-icon.png' : '/static/imgs/general/no-cooperation-icon.png'"
:src="info.cooperation == 1 ? '/static/imgs/general/cooperation-icon.png' : '/static/imgs/general/no-cooperation-icon.png'"
></image>
</view>
<view class="desc u-line-2">
@ -38,7 +38,7 @@
</view>
<view class="site">
<image class="icon" src="/static/imgs/client-detail/address-icon.png"></image>
<text class="text">{{ info.locProvinceName }}{{ info.locCityName }} {{ info.locDetail }}</text>
<text class="text">{{ info.locProvinceName }}{{ info.locCityName }}{{info.locDistrictName}}{{info.locStreetName}} {{ info.locDetail }}</text>
</view>
</view>
</view>

3
pages/client-detail/equipment-information.vue

@ -131,7 +131,8 @@ export default {
asc: '',
desc: '',
duration: '3',
enterpriseIds: []
customerEnterpriseId: this.$store.state.supplierInfo.id || null, // IDid
// customerEnterpriseId: '651107734133018624',
},
pagination: {
pageNum: 0, //

149
pages/mall/index.vue

@ -1,13 +1,13 @@
<template>
<view class="warpper">
<uni-nav-bar>
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view slot="left" class="left-title">纸商城</view>
<view slot="right" class="right-title">分享</view>
<view slot="right" class="right-title" @tap="shareTap">分享</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="title">{{ storeInformation.name }}</view>
<view class="desc">全部商品 39 &nbsp; | &nbsp;上新 9</view>
</view>
<view class="right">
@ -15,52 +15,62 @@
切换商城
<image class="cut-icon" src="/static/imgs/mall/cut-icon.png" mode=""></image>
</view>
<view class="set" @click="setting()">设置</view>
<view class="set" @click="setting">设置</view>
</view>
</view>
<uGap></uGap>
<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 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="" style="width: 100%;">
<view class="title">
<view class="">{{ item.brandName }}</view>
<view class="">
<image class="icon" :src="item.status === 30111 ? '/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">
克重(价格)
<text v-for="(sku,index) in item.skuList">{{sku.weight}}({{sku.listPrice}})</text>
</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 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>
<uGap></uGap>
</view>
</scroll-list>
</scroll-list>
</view>
<view>
<view class="offer-prices" @click="nativeTo()">
<image class="my-image" src="../../static/imgs/trade/camera.png" mode=""></image>
</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 { back, go2, loginGo2 } from '@/utils/hook.js'
import { SupplierList, productStatus } from '@/apis/add-paper.js'
import noData from './no-data.vue'
export default {
components: { uGap },
components: { uGap, noData },
data() {
return {
pageShow: true,
storeInformation: {
supplierId: null,
name: null
},
option: {
size: 10,
auto: true,
@ -79,25 +89,36 @@ export default {
orderPagination: {
pageNum: 0, //
pageSize: 10,
storeId:null,
name:null,
supplierId:this.$store.state.supplierInfo.id
storeId: null,
name: null,
supplierId: this.$store.state.supplierInfo.supplierId
},
listData:[]
listData: []
}
},
onShow() {
this.storeInformation = {
supplierId: this.$store.state.supplierInfo.supplierId,
name: this.$store.state.supplierInfo.name
}
this.quertData()
},
onLoad() {
this.quertData()
},
methods: {
back,
//
// pageShow
quertData() {
console.log('this.$store.state',this.$store.state)
return new Promise((resolve, reject) => {
SupplierList({ ...this.orderPagination })
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 {
@ -133,48 +154,70 @@ export default {
},
//
checkMall() {
go2('switching-mall')
go2('switching-mall', { supplierId: this.storeInformation.supplierId })
},
//
nativeTo() {
var params = {
title: '添加纸品'
}
go2('add-paper',params)
go2('add-paper', params)
},
//
editPaper(){
editPaper(item) {
var params = {
...item,
title: '编辑纸品'
}
go2('add-paper',params)
go2('add-paper', params)
},
//
setting(){
setting(item) {
go2('store-settings')
},
//
detailInfo(){
loginGo2('paper-detail')
detailInfo(item) {
loginGo2('paper-detail', item)
},
//
productStatusChange(item){
productStatusChange(item) {
var params = {
id:item.id,
status:item.status === '30111'?'30112':'30111'
id: item.id,
status: item.status === 30111 ? 30112 : 30111
}
productStatus(params).then(res => {
if (res) {
uni.showToast({
title: '添加成功',
title: '状态修改成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
setTimeout(()=>{
this.orderPagination.pageNum = 1
this.quertData()
},500)
}
})
},
//
shareTap() {
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: "http://uniapp.dcloud.io/",
title: "uni-app分享",
summary: "我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",
imageUrl: "https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/d8590190-4f28-11eb-b680-7980c8a877b8.png",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}
}
}
</script>
@ -340,7 +383,7 @@ export default {
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #007AFF;
background-color: #007aff;
border-radius: 50%;
padding: 10rpx;
text-align: center;

71
pages/mall/no-data.vue

@ -0,0 +1,71 @@
<template>
<view class="warpper">
<image class="icon" src="/static/imgs/client-detail/no-data-icon.png"></image>
<view class="text-row">
<view class="">
还没有纸品快去
</view>
<view class="btn" @tap="nativeTo">
添加
</view>
</view>
</view>
</template>
<script>
import { back, go2, loginG2 } from '@/utils/hook.js'
export default {
props: {
title:{
type: String,
default: null
}
},
data() {
return {
}
},
methods: {
//
nativeTo() {
var params = {
title: '添加纸品'
}
go2('add-paper',params)
},
}
}
</script>
<style lang="scss">
.warpper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
margin-top: 25%;
.icon {
width: 560rpx;
height: 320rpx;
}
.text-row {
display: flex;
flex-direction: row;
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
font-weight: 400;
}
.btn {
font-size: 32rpx;
color: #007AFF;
letter-spacing: 0;
text-align: center;
font-weight: 400;
text-decoration: underline;
}
}
</style>

5
pages/my-offer/index.vue

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

73
pages/paper-detail/index.vue

@ -4,7 +4,7 @@
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="paper-detail-title">纸品详情</view>
<view slot="left"></view>
<view slot="right" class="paper-detail-right-title">分享</view>
<view slot="right" class="paper-detail-right-title" @tap="shareTap">分享</view>
</uni-nav-bar>
</view>
<view class="paper-detail-info">
@ -14,15 +14,15 @@
</view>
<view class="">
<text class="paper-detail-info-text">纸厂信息</text>
<text class="paper-detail-info-subtext">博汇</text>
<text class="paper-detail-info-subtext">{{form.manufacturerName}}</text>
</view>
<view class="">
<text class="paper-detail-info-text">品牌信息</text>
<text class="paper-detail-info-subtext">朱雀</text>
<text class="paper-detail-info-subtext">{{form.brandName}}</text>
</view>
<view class="">
<text class="paper-detail-info-text">纸种信息</text>
<text class="paper-detail-info-subtext">白卡纸</text>
<text class="paper-detail-info-subtext">{{form.categoryName}}</text>
</view>
</view>
<uGap></uGap>
@ -32,19 +32,19 @@
<uni-table emptyText="暂无更多数据">
<!-- 表头行 -->
<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="75">是否特价</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr>
<uni-td>2500g</uni-td>
<uni-td>779*1092</uni-td>
<uni-td>4400.00</uni-td>
<uni-td>8900</uni-td>
<uni-td></uni-td>
<uni-tr v-for="(item,index) in skuList" :key="index">
<uni-td>{{item.weight}}</uni-td>
<!-- <uni-td>779*1092</uni-td> -->
<uni-td>{{item.listPrice}}</uni-td>
<uni-td>{{item.stock}}</uni-td>
<uni-td>{{item.isPromoting === true ?'':'否'}}</uni-td>
</uni-tr>
</uni-table>
</view>
@ -53,28 +53,25 @@
<view class="paper-datail-list ">
<view class="paper-datail-list-title">纸品图片</view>
<view class="paper-list-view">
<image class="paper-datail-list-image" src="../../static/imgs/client-credit-list/client-default.png" mode=""></image>
<image class="paper-datail-list-image" src="../../static/imgs/client-credit-list/client-default.png" mode=""></image>
<image class="paper-datail-list-image" src="../../static/imgs/client-credit-list/client-default.png" mode=""></image>
<image class="paper-datail-list-image" src="../../static/imgs/client-credit-list/client-default.png" mode=""></image>
<image v-for="(item,index) in imgList" class="paper-datail-list-image" :src="item" mode=""></image>
</view>
</view>
<uGap></uGap>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">商品买点</view>
<view class="paper-datail-list-text"><text>月结30天价格不加服务费</text></view>
<view class="paper-datail-list-text"><text>{{form.sellingProposition}}</text></view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">商品描述</view>
<view class="paper-datail-list-text"><text>售价全部为含税价支持先用后付欢迎来电查询近期价格波动较大请下单前先咨询价格</text></view>
<view class="paper-datail-list-text"><text>{{form.description}}</text></view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">送货说明</view>
<view class="paper-datail-list-text"><text>分切纸不足重量的另加调机费低于送货重量或超出送货范围的运费另计</text></view>
<view class="paper-datail-list-text"><text>{{form.shippingNote}}</text></view>
</view>
<view class="paper-datail-list paper-bottom-border">
<view class="paper-datail-list-title ">其他说明</view>
<view class="paper-datail-list-text"><text>无其他说明</text></view>
<view class="paper-datail-list-text"><text>{{form.otherNote}}</text></view>
</view>
</view>
</template>
@ -91,25 +88,49 @@ export default {
return {
form:{},
skuList:[],
imgList:[]
imgList:[],
option:''
}
},
onLoad(option) {
this.getDteailList(option)
this.option = option
},
methods: {
back,
//
getDteailList(res) {
getDteailList(option) {
var params = {
mallSupplierIds : null,
productId : null
mallSupplierIds : this.$store.state.supplierInfo.supplierId,
productId : option.id
}
this.getSupplierDteail(params).then(res => {
getSupplierDteail(params).then(res => {
if (res) {
this.form = res
this.skuList = res.skuList
this.imgList = res.imgList
this.$set(this.form,'categoryName',this.option.categoryName)
}
})
},
//
shareTap() {
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: "http://uniapp.dcloud.io/",
title: "uni-app分享",
summary: "我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",
imageUrl: "https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/d8590190-4f28-11eb-b680-7980c8a877b8.png",
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}
}
}
</script>

95
pages/quotation-details/index.vue

@ -28,12 +28,12 @@
<uGap></uGap>
<view class="submit-contant" v-for="(items, index) in upDataObj.itemList" :key="index">
<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 class="submit-contant-body">
<view class="">
<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>
<text class="submit-contant-body-title">单价(/)</text>
@ -51,18 +51,18 @@
<view class="submit-contant-order">
<view class="">
<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 class="">
<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>
<uGap></uGap>
<view class="submit-contant-time">
<view class="">
<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>
<uGap></uGap>
@ -91,46 +91,36 @@ export default {
value: '',
visible: true,
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: {
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) {
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() {
this.$refs.popup.close()
this.$refs.popupPrice.close()
@ -168,13 +166,12 @@ export default {
this.$refs.popupTime.close()
},
//
editPrice(){
var params= {
title:"修改报价"
editPrice() {
var params = {
title: '修改报价'
}
go2('submit-quotation', params)
},
go2('submit-quotation', params)
}
}
}
</script>
@ -557,16 +554,16 @@ export default {
padding: 32rpx;
line-height: 42rpx;
}
.edit-price{
.edit-price {
font-size: 28rpx;
color: #007AFF;
color: #007aff;
text-align: right;
line-height: 40prx;
font-weight: 500;
}
.price-tips{
.price-tips {
font-size: 30rpx;
color: #FF5368;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;

75
pages/setting/index.vue

@ -1,9 +1,78 @@
<template>
<view>设置</view>
<view class="system-settimg">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="system-settimg-title">系统设置</view>
<view slot="left"></view>
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="list-main" v-for="(item,index) in name" :key="index">
<view class="list-flex" :class="(index+1) === name.length ? '':'list-border'" @click="checkList(index)">
<view class="list-text"><text>{{item}}</text></view>
<view class="">
<text><uni-icons type="right" color="#000000" size="18"></uni-icons></text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {}
import { back, go2, uploadFile } from '@/utils/hook.js'
export default {
data() {
return {
name:['用户名','账号管理','用户协议','系统权限','关于纸掌柜']
}
},
methods: {
back,
checkList(item){
switch (item){
case 0:
go2('user-info')
break;
case 4:
go2('about')
break;
default:
break;
}
},
}
}
</script>
<style></style>
<style lang="scss">
.system-settimg {
.system-settimg-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.list-main{
background-color: #FFFFFF;
}
.list-border{
border-bottom: 2rpx solid #d8d8d8;
}
.list-flex {
display: flex;
justify-content: space-between;
margin: 0rpx 32rpx;
height: 100rpx;
align-items: center;
}
.list-text {
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 400;
}
}
</style>

84
pages/store-settings/index.vue

@ -24,7 +24,7 @@
<view class="tore-setting-name"><text>店铺logo</text></view>
<view class="store-log store-image-flex">
<uni-file-picker
class="stotr-image-width"
class="stotr-image-width"
v-model="imageValue"
file-mediatype="image"
mode="grid"
@ -35,9 +35,8 @@
@success="success"
@fail="fail"
@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>
<view class="store-image-text ">建议尺寸200*200像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
</view>
@ -45,7 +44,7 @@
<view class="store-log">
<view class="tore-setting-name"><text>背景图片</text></view>
<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>
</uni-file-picker>
<view class="store-image-text">建议尺寸750*370像素尺寸不匹配时图片将被压缩或拉伸以铺满画面</view>
@ -53,18 +52,21 @@
</view>
</view>
<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>
</template>
<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 {
data() {
return {
storeName: '',
imageValue: [],
background: '',
logo: '',
imageStyles: {
width: 120,
height: 100,
@ -74,9 +76,16 @@ export default {
width: 183,
height: 94,
border: false
}
},
option:''
}
},
onLoad(option) {
if (option) {
this.option = option
}
},
methods: {
back,
//
@ -91,9 +100,10 @@ export default {
},
//
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) {
@ -104,6 +114,36 @@ export default {
}
}
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">
.store-setting {
background-color: #FFFFFF;
background-color: #ffffff;
.store-setting-title {
width: 100%;
font-size: 36rpx;
@ -139,7 +179,7 @@ export default {
.store-log {
margin-top: 32rpx;
}
.store-image-flex{
.store-image-flex {
display: flex;
}
.store-image-text {
@ -150,24 +190,24 @@ export default {
line-height: 40rpx;
margin-left: 10rpx;
}
.stotr-image-widtht{
.stotr-image-widtht {
width: 100%;
background-color: rgba(220,222,224,1);
background-color: rgba(220, 222, 224, 1);
}
.stotr-image-width{
.stotr-image-width {
width: 48%;
background-color: rgba(220,222,224,1);
background-color: rgba(220, 222, 224, 1);
}
.upload-btn{
.upload-btn {
position: absolute;
width: 92%;
bottom: 32rpx;
left: 32rpx;
width: 92%;
bottom: 32rpx;
left: 32rpx;
}
.paper-upload-image{
.paper-upload-image {
width: 120rpx;
height: 120rpx;
background: rgba(220,222,224,1);
background: rgba(220, 222, 224, 1);
border-radius: 10rpx;
}
}

85
pages/submit-quotation/index.vue

@ -78,7 +78,7 @@
<view class="submit-contant-time">
<view class="">
<text class="submit-contant-time-title">有效时间</text>
<text class="submit-contant-time-title">{{ upDataObj.createTime }}</text>
<text class="submit-contant-time-title">{{ upDataObj.enquiryValidTime }}</text>
</view>
<view class="" @click="resetTime()"><text class="submit-contant-time-subtitle">设置</text></view>
</view>
@ -194,7 +194,7 @@
<view class="item submit-check-text" v-for="(item, index) in years" :key="index">{{ item }}</view>
</picker-view-column>
<picker-view-column>
<view class="item submit-check-text" v-for="(item, index) in months" :key="index">{{ item }}分钟</view>
<view class="item submit-check-text" v-for="(item, index) in months" :key="index">{{ item }}</view>
</picker-view-column>
</picker-view>
</view>
@ -221,11 +221,11 @@ export default {
const months = []
const month = date.getMonth() + 1
const day = date.getDate()
for (let i = 1; i < 49; i++) {
years.push(i + '小时')
for (let i = 1; i < 3; i++) {
years.push(i + '')
}
for (let i = 1; i < 61; i++) {
months.push(i)
for (let i = 1; i < 24; i++) {
months.push(i + '小时')
}
return {
value: '',
@ -241,16 +241,16 @@ export default {
timeValue: [0, 0],
pickerValue: [],
upDataObj: {
otherFee:0,
totalAllPrice:0,
enquiryValidTimeSplit:[]
otherFee: 0,
totalAllPrice: 0,
enquiryValidTimeSplit: []
},
addObj: {},
prices: {
totalPrice: 0
},
modifyIndex: 0,
pricesIndex: 0,
pricesIndex: 0
// items: []
}
},
@ -270,10 +270,9 @@ export default {
this.upDataObj = res
var timeb = this.upDataObj.enquiryValidTime.split(' ')
var timeabs = timeb[1].split(':')
console.log('timeabs',timeabs)
this.$set(this.upDataObj,'enquiryValidTimeSplit',timeabs)
this.$set(this.upDataObj,'otherFee',0)
this.$set(this.upDataObj,'totalAllPrice',0)
this.$set(this.upDataObj, 'enquiryValidTimeSplit', timeabs)
this.$set(this.upDataObj, 'otherFee', 0)
this.$set(this.upDataObj, 'totalAllPrice', 0)
console.log('this.upDataObj', res)
}
})
@ -329,8 +328,40 @@ export default {
},
//
pickerSure() {
console.log('timeValue',this.timeValue)
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.$set(this.upDataObj, 'enquiryValidTime', abs)
console.log(abs)
},
addDate(date, days,hours) {
if (days == undefined || days == '') {
days = 1
}
var date = new Date(date)
date.setDate(date.getDate() + days)
date.setHours(date.getHours()+ hours);
var month = date.getMonth() + 1
var day = date.getDate()
var hours = date.getHours()
var min = date.getMinutes()
var second = date.getSeconds()
return date.getFullYear() + '-' + this.getFormatDate(month) + '-' + this.getFormatDate(day) +' ' + this.getFormatDate(hours) +':' + this.getFormatDate(min)+':' +this.getFormatDate(second)
},
getFormatDate(arg) {
if (arg == undefined || arg == '') {
return ''
}
var re = arg + ''
if (re.length < 2) {
re = '0' + re
}
return re
},
//
sureModifyPaper() {
@ -348,38 +379,38 @@ export default {
pricesSure() {
this.$set(this.upDataObj.itemList[this.pricesIndex], 'otherFee', this.prices.otherFee)
this.$set(this.upDataObj.itemList[this.pricesIndex], 'unitFee', this.prices.unitFee)
var abs = parseFloat(this.prices.gramWeight) * parseFloat(this.prices.unitFee)
var abs = parseFloat(this.prices.gramWeight) * parseFloat(this.prices.unitFee)
this.$set(this.upDataObj.itemList[this.pricesIndex], 'totalPrice', abs.toFixed(2))
this.upDataObj = JSON.parse(JSON.stringify(this.upDataObj))
this.$refs.popupPrice.close()
console.log(this.upDataObj.itemList)
this.priceFree()
},
priceFree(){
for(let i = 0;i<this.upDataObj.itemList.length;i++){
var totalAllPrice = parseFloat(this.upDataObj.totalAllPrice) + parseFloat( this.upDataObj.itemList[i].totalPrice)
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)
var otherFee = parseFloat(this.upDataObj.otherFee) + parseFloat(this.upDataObj.itemList[i].otherFee)
this.upDataObj.otherFee = otherFee.toFixed(2)
}
},
//
updataQuery() {
var params = {
...this.upDataObj
...this.upDataObj,
userId: this.$store.state.userInfo.userId
}
return new Promise((resolve, reject) => {
updataEnquiryReply( params )
updataEnquiryReply(params)
.then(res => {
if (res) {
uni.showToast({
title: '添加成功',
icon: 'success'
})
setTimeout(()=>{
back()
},800)
setTimeout(() => {
back()
}, 800)
}
})
.catch(err => {

46
pages/switching-mall/index.vue

@ -7,39 +7,61 @@
<view slot="right"></view>
</uni-nav-bar>
</view>
<view class="" v-for="(item,index) in 5" :key="index" @click="checkCompany(item)">
<view class="" v-for="(item, index) in enterpriseList" :key="index" @click="checkCompany(item, index)">
<uni-list>
<uni-list-item>
<!-- 自定义 header -->
<view slot="header" class="slot-box"><image class="slot-image check-mall-image" src="/static/logo.png" mode="widthFix"></image></view>
<view slot="header" class="slot-box"><image class="slot-image check-mall-image" :src="item.logo || '/static/logo.png'" mode="scaleToFill"></image></view>
<!-- 自定义 body -->
<view slot="body" class="slot-box check-mall-text">
<view class="check-mall-text-textTitle"><text>东莞市隆兴纸业有限公司</text></view>
<view class="check-mall-text-textSubTitle"><text>全部商品39</text></view>
<view class="check-mall-text-textTitle">
<text>{{ item.name }}</text>
</view>
<view class="check-mall-text-textSubTitle">
<text>全部商品{{ item.productNumber }}</text>
</view>
</view>
<view v-if="index === 2" slot="footer" class="slot-box check-mall-sure"><icon type="success_no_circle" size="26" /></view>
<view v-if="supplierId === item.supplierId" slot="footer" class="slot-box check-mall-sure"><icon type="success_no_circle" size="26" /></view>
</uni-list-item>
</uni-list>
</view>
</view>
</template>
<script>
import { back, go2 } from '@/utils/hook.js'
import { getStoreList } from '@/apis/add-paper.js'
import store from '@/store/index'
export default {
data() {
return {
companyData:[],
companyData: [],
enterpriseList: [],
supplierId: null
}
},
onLoad(option) {
this.supplierId = option.supplierId
this.queryData()
},
methods: {
back,
//
checkCompany(){
go2('mall')
queryData() {
getStoreList().then(res => {
console.log('==', res)
this.enterpriseList = res
})
},
//
checkCompany(item) {
this.$store.commit('setSupplierInfo', {
id: item.id,
name: item.name,
fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus,
supplierId: item.supplierId
})
go2('mall')
}
}
}
</script>
@ -57,7 +79,7 @@ export default {
.check-mall-image {
width: 100rpx;
height: 100rpx;
border-radius: 50rpx;
border-radius: 50%;
}
.check-mall-text {
line-height: 60rpx;

2
pages/trade/index.vue

@ -1,6 +1,6 @@
<template>
<view class="trade-index">
<uni-nav-bar>
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view class="left-title">
<view v-if="mainKey === '0'" class="text-view"><text class="title">交易大厅</text></view>
<view v-if="mainKey === '1'">

3
pages/trade/quotationList.vue

@ -98,6 +98,9 @@ export default {
list: []
}
},
onShow() {
this.getQuotationQurty()
},
onLoad(option) {},
filters: {
replyStatusName(status) {

104
pages/user-info/index.vue

@ -0,0 +1,104 @@
<template>
<view class="user-info">
<view>
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="">
<view class="user-info-title">用户名</view>
<view slot="left"></view>
<view slot="right">
<button type="primary" class="user-btn" @click="save">保存</button>
</view>
</uni-nav-bar>
</view>
<view class="user-contant">
<text class=""><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text>
<text class="user-text">请输入新的用户名</text>
</view>
<view class="">
<uni-easyinput maxlength="100" :inputBorder="false" type="textarea" class="user-info-input" v-model="name" placeholder="请输入内容"></uni-easyinput>
</view>
</view>
</template>
<script>
import { back, go2, uploadFile } from '@/utils/hook.js'
import { employeeName, } from '@/apis/setting.js'
export default {
data() {
return {
name:''
}
},
onLoad() {
this.name = this.$store.state.userInfo.name
},
methods: {
back,
save(){
if(this.name === '' || this.name === null){
uni.showToast({
title: '请完善信息',
icon: 'none'
})
return
}
var params = {
userId:this.$store.state.userInfo.userId,
name:this.name,
enterpriseId :this.$store.state.supplierInfo.id
}
employeeName(params).then(res => {
if (res) {
uni.showToast({
title: '修改成功',
icon: 'success'
})
setTimeout(() => {
back()
}, 1000)
}
})
}
}
}
</script>
<style lang="scss">
.user-info{
background-color: #FFFFFF;
height: 800rpx;
.user-info-title {
width: 100%;
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.user-btn{
width: 108rpx;
height: 54rpx;
background: #007AFF;
border-radius: 27rpx;
font-size: 28rpx;
color: #FFFFFF;
letter-spacing: 0;
font-weight: 500;
line-height: 60rpx;
}
.user-text{
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.user-contant{
margin: 20rpx 32rpx;
}
.user-info-input {
background: #f7f8fa;
border-radius: 20rpx;
margin: 10rpx 32rpx 32rpx 32rpx;
width: 686rpx;
}
}
</style>
Loading…
Cancel
Save