From d89c495a7da517d653e9ea42b8e6405eef823ef6 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期一, 29 七月 2024 16:23:24 +0800
Subject: [PATCH] update 还有售后需要测试一下
---
sub_pages/supplier/order-settlement/order-settlement.vue | 34
pages/home/supplier-home.vue | 6
sub_pages/partner/delivery/delivery-detail.vue | 679 ++++----
sub_pages/partner/delivery/delivery.vue | 422 +++--
pages.json | 51
sub_pages/partner/order-manage/order-manage.vue | 2
App.vue | 15
sub_pages/supplier/order-sale/order-sale.vue | 17
store/index.js | 788 +++++-----
sub_pages/supplier/order-settlement/order-settlement-detail.vue | 225 +++
pages/login/supplier-login.vue | 893 ++++++------
sub_pages/partner/delivery/delivery-home.vue | 143 ++
sub_pages/supplier/order-sale/order-sale-detail.vue | 404 +++++
sub_pages/partner/markup-config/markup-config.vue | 397 ++--
pages/order/order.vue | 6
pages/order/order-detail.vue | 92
pages/user/supplier-user.vue | 22
17 files changed, 2,541 insertions(+), 1,655 deletions(-)
diff --git a/App.vue b/App.vue
index b46206b..157231c 100644
--- a/App.vue
+++ b/App.vue
@@ -25,10 +25,17 @@
setTimeout(async () => {
const res = await this.$store.dispatch('getCurrentInfo');
// #ifndef PUB_CUSTOMER
- if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
- uni.reLaunch({
- url: '/pages/home/supplier-home'
- })
+ if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
+ if(this.currentInfo.type==='admin'){
+ uni.reLaunch({
+ url: '/sub_pages/partner/delivery/delivery-home'
+ })
+ }else{
+ uni.reLaunch({
+ url: '/pages/home/supplier-home'
+ })
+ }
+
} else {
uni.reLaunch({
url: '/pages/login/supplier-login'
diff --git a/pages.json b/pages.json
index a91dc3d..9ede212 100644
--- a/pages.json
+++ b/pages.json
@@ -144,20 +144,6 @@
},
{
- "path": "order-settlement/order-settlement",
- "style": {
- "navigationBarTitleText": "账单结算",
- "enablePullDownRefresh": true
- }
- },
- {
- "path": "order-sale/order-sale",
- "style": {
- "navigationBarTitleText": "售后理赔",
- "enablePullDownRefresh": true
- }
- },
- {
"path": "order-records/order-records",
"style": {
"navigationBarTitleText": "扣款记录",
@@ -171,6 +157,36 @@
"navigationBarTitleText": "协议",
"enablePullDownRefresh": false
}
+ },
+ // #endif
+ // #ifdef PUB_PARTNER || PUB_SUPPLIER
+ {
+ "path": "order-settlement/order-settlement",
+ "style": {
+ "navigationBarTitleText": "账单结算",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "order-sale/order-sale",
+ "style": {
+ "navigationBarTitleText": "售后理赔",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path" : "order-settlement/order-settlement-detail",
+ "style" :
+ {
+ "navigationBarTitleText" : "结算单详情"
+ }
+ },
+ {
+ "path": "order-sale/order-sale-detail",
+ "style" :
+ {
+ "navigationBarTitleText" : "理赔单详情"
+ }
}
// #endif
]
@@ -213,6 +229,13 @@
"navigationBarTitleText": "质检详情",
"enablePullDownRefresh": true
}
+ },
+ {
+ "path": "delivery/delivery-home",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
}
// #endif
]
diff --git a/pages/home/supplier-home.vue b/pages/home/supplier-home.vue
index 1e42fca..5d17578 100644
--- a/pages/home/supplier-home.vue
+++ b/pages/home/supplier-home.vue
@@ -102,7 +102,7 @@
</view>
</view>
</view>
- <view class="item-container flex m-t-12" style="padding: 34rpx 44rpx;">
+ <view class="item-container flex m-t-12" style="padding: 34rpx 44rpx;" v-if="selftype=='supplier'">
<view class="rate-view flex1" style="max-width: 140rpx;">
<view class="title">售后率</view>
<view class="title" style="color: red;">{{tj.salesRate||0}}%</view>
@@ -163,13 +163,13 @@
</view>
<view class="order-desc syst">售后理赔</view>
</view>
- <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-records/order-records',true)">
+ <!-- <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-records/order-records',true)">
<view class="img-c">
<image class="icon margin-bottom order-icon kkjl"
src="/static/images/supplier/user/user-icon-kkjl.png" mode="scaleToFill" />
</view>
<view class="order-desc wbsp">扣款记录</view>
- </view>
+ </view> -->
</view>
</view>
diff --git a/pages/login/supplier-login.vue b/pages/login/supplier-login.vue
index 96c7a4a..aa583d7 100644
--- a/pages/login/supplier-login.vue
+++ b/pages/login/supplier-login.vue
@@ -1,498 +1,505 @@
<template>
- <view class="main-container login-container img100 relative" style="margin-top: 0rpx;">
- <!-- background-image:url('@/static/images/supplier/login/bg.png') -->
+ <view class="main-container login-container img100 relative" style="margin-top: 0rpx;">
+ <!-- background-image:url('@/static/images/supplier/login/bg.png') -->
- <image class="component-bg"
- src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png"
- mode="scaleToFill"/>
- <view class="t-login top-bg">
- <view class="nav-title">登录</view>
- <view class="login">
- <form class="cl">
- <view class="t-a titles-top">
- <view class="title-1">HELLO</view>
- <view class="title-2">欢迎登录<span class="title-3">花满芫</span>
- <!-- #ifdef PUB_SUPPLIER -->
- <span>供应商管理平台</span>
- <!-- #endif -->
- <!-- #ifdef PUB_PARTNER -->
- <span>合伙人管理平台</span>
- <!-- #endif -->
- </view>
- </view>
- <view class="t-a input form-input" v-if="loginType=='pwd'">
- <!-- <input type="text" name="userName" placeholder="请输入账号" v-model="userName" /> -->
- <u-input placeholder="请输入账号" :border="false" v-model="userName"></u-input>
+ <image class="component-bg"
+ src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png"
+ mode="scaleToFill" />
+ <view class="t-login top-bg">
+ <view class="nav-title">登录</view>
+ <view class="login">
+ <form class="cl">
+ <view class="t-a titles-top">
+ <view class="title-1">HELLO</view>
+ <view class="title-2">欢迎登录<span class="title-3">花满芫</span>
+ <!-- #ifdef PUB_SUPPLIER -->
+ <span>供应商管理平台</span>
+ <!-- #endif -->
+ <!-- #ifdef PUB_PARTNER -->
+ <span>合伙人管理平台</span>
+ <!-- #endif -->
+ </view>
+ </view>
+ <view class="t-a input form-input" v-if="loginType=='pwd'">
+ <!-- <input type="text" name="userName" placeholder="请输入账号" v-model="userName" /> -->
+ <u-input placeholder="请输入账号" :border="false" v-model="userName"></u-input>
- </view>
- <view class="t-a input form-input" v-if="loginType=='pwd'">
- <!-- <input type="text" :password="true" name="password" placeholder="请输入密码" v-model="password" /> -->
- <u-input :password="true" :border="false" placeholder="请输入密码" v-model="password"></u-input>
- </view>
- <view class="t-a input form-input" v-if="loginType=='code'">
+ </view>
+ <view class="t-a input form-input" v-if="loginType=='pwd'">
+ <u-input :password="true" :border="false" placeholder="请输入密码" v-model="password"></u-input>
+ </view>
+ <view class="t-a input form-input" v-if="loginType=='code'">
- <!-- <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" />
- <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
- {{getCodeText}}
- </view> -->
- <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber">
- <template slot="suffix">
- <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
- {{ getCodeText }}
- </view>
- </template>
- </u-input>
- </view>
+ <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber">
+ <template slot="suffix">
+ <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
+ {{ getCodeText }}
+ </view>
+ </template>
+ </u-input>
+ </view>
- <view class="t-a form-input" v-if="loginType=='code'">
- <!-- <input type="text" name="userName" placeholder="请输入手机验证码" v-model="smsCode" /> -->
- <u-input placeholder="请输入手机验证码" :border="false" v-model="smsCode"></u-input>
+ <view class="t-a form-input" v-if="loginType=='code'">
+ <u-input placeholder="请输入手机验证码" :border="false" v-model="smsCode"></u-input>
- </view>
+ </view>
- <button @tap="login()" class="bottom-button">登 录</button>
- <view class="flex">
- <view class="topic-font" v-if="loginType=='pwd'" @click="loginType='code'">手机验证码登录</view>
- <view class="topic-font" v-if="loginType=='code'" @click="loginType='pwd'">账号密码登录</view>
+ <button @tap="login()" class="bottom-button">登 录</button>
- <view class="topic-font m-l-a m-r-0" @click="toReg">前往注册</view>
+ <view class="flex">
+ <view class="topic-font" v-if="loginType=='pwd'&&apitype!=='loginAdmin'" @click="loginType='code'">手机验证码登录</view>
+ <view class="topic-font" v-if="loginType=='code'&&apitype!=='loginAdmin'" @click="loginType='pwd'">账号密码登录</view>
- <!-- #ifdef PUB_CUSTOMER -->
- <view class="topic-font m-l-a m-r-0" @click="toHome">返回首页</view>
- <!-- #endif -->
- </view>
+ <view class="topic-font m-l-a m-r-0" v-if="apitype!=='loginAdmin'" @click="toReg">前往注册</view>
- </form>
- </view>
- </view>
- </view>
+ <!-- #ifdef PUB_CUSTOMER -->
+ <view class="topic-font m-l-a m-r-0" @click="toHome">返回首页</view>
+ <!-- #endif -->
+ <!-- #ifdef PUB_PARTNER -->
+ <view class="topic-font m-l-a m-r-0" @click="()=>{
+ if(apitype==='loginPartner'){
+ apitype = 'loginAdmin'
+ loginType = 'pwd'
+ }else{
+ apitype = 'loginPartner'
+ }
+ }">
+ 切换为{{apitype!=='loginPartner'?'合伙人':'质检人员'}}登录
+ </view>
+ <!-- #endif -->
+ </view>
+
+ </form>
+ </view>
+ </view>
+ </view>
</template>
<script>
-// import util from '@/utils/util.js'
-// import gzmzApi from '@/api/gzmzApi.js'
-// import myCache from '@/utils/myCache.js'
-export default {
- // props: {
- // // apitype: 'loginSupplier',
- // apitype: {
- // type: String,
- // default () {
- // // #ifdef PUB_SUPPLIER
- // return 'loginSupplier'
- // // #endif
- // // #ifdef PUB_PARTNER
- // return 'loginPartner'
- // // #endif
- // // #ifdef PUB_CUSTOMER
- // return 'loginCustomer'
- // // #endif
- // // return 'loginPartner'
- // }
- // },
- // },
- data() {
- return {
- openId: '-1',
- userName: '',
- password: '',
- // userName: '',
- // password: '',
+ // import util from '@/utils/util.js'
+ // import gzmzApi from '@/api/gzmzApi.js'
+ // import myCache from '@/utils/myCache.js'
+ export default {
+ // props: {
+ // // apitype: 'loginSupplier',
+ // apitype: {
+ // type: String,
+ // default () {
+ // // #ifdef PUB_SUPPLIER
+ // return 'loginSupplier'
+ // // #endif
+ // // #ifdef PUB_PARTNER
+ // return 'loginPartner'
+ // // #endif
+ // // #ifdef PUB_CUSTOMER
+ // return 'loginCustomer'
+ // // #endif
+ // // return 'loginPartner'
+ // }
+ // },
+ // },
+ data() {
+ return {
+ openId: '-1',
+ userName: '',
+ password: '',
+ // userName: '',
+ // password: '',
- phoneNumber: '',
- smsCode: '',
+ phoneNumber: '',
+ smsCode: '',
- checked: false,
- loginType: 'pwd', //pwd和code,密码和验证码登录
- pcfvalue: undefined,
- getCodeText: '获取验证码',
- getCodeBtnColor: "#20613D",
- getCodeisWaiting: false,
- Timer: undefined,
- // #ifdef PUB_SUPPLIER
- apitype: 'loginSupplier',
- // #endif
- // #ifdef PUB_PARTNER
- apitype: 'loginPartner',
- // #endif
- // #ifdef PUB_CUSTOMER
- apitype: 'loginCustomer',
- // #endif
- // return 'loginPartner'
- };
- },
- methods: {
- async getCode() {
- console.log('getCode')
- uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
- if (this.getCodeisWaiting) {
- return;
- }
- if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { //校验手机号码是否有误
- this.$message.showToast('请填写正确手机号码')
- return false;
- }
- this.getCodeText = "发送中..." //发送验证码
- this.getCodeisWaiting = true;
- this.getCodeBtnColor = "#000" //追加样式,修改颜色
- //示例用定时器模拟请求效果
- //setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
- const {
- code
- } = await this.$http.request('post', '/api/sms/send/code', {
- data: {
- tel: this.phoneNumber,
- userType: this.apitype.replace("login", "").toLowerCase()
- }
- })
- if (code == 0) {
- uni.showToast({
- title: '验证码已发送',
- icon: "none"
- });
- this.setTimer(); //调用定时器方法
- } else {
- this.getCodeText = "获取验证码" //发送验证码
- this.getCodeisWaiting = false;
- this.getCodeBtnColor = "#20613D";
- }
- // setTimeout(() => {
- // uni.showToast({
- // title: '验证码已发送',
- // icon: "none"
- // }); //弹出提示框
- // //示例默认1234,生产中请删除这一句。
- // // this.code = '1234'; //发送验证码,进行填入
- // this.setTimer(); //调用定时器方法
- // }, 1000)
- },
- //setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
- setTimer() {
- let holdTime = 60; //定义变量并赋值
- this.getCodeText = "重新获取(60)"
- //setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
- //setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
- this.Timer = setInterval(() => {
- if (holdTime <= 0) {
- this.getCodeisWaiting = false;
- this.getCodeBtnColor = "#20613D";
- this.getCodeText = "获取验证码"
- clearInterval(this.Timer); //清除该函数
- return; //返回前面
- }
- this.getCodeText = "重新获取(" + holdTime + ")"
- holdTime--;
- }, 1000)
- },
- toHome(){
- uni.redirectTo({
- url: '/pages/home/home'
- })
- },
- toReg() {
- // uni.switchTab({
- // url: '/pages/index/index'
- // })
- var addstr = ''
- // #ifdef PUB_PARTNER
- addstr = '?source=step'
- uni.navigateTo({
- url: '/sub_pages/partner/partner-info/partner-info' + addstr
- })
- // #endif
- // #ifdef PUB_SUPPLIER
- uni.redirectTo({
- url: '/pages/login/supplier-reg'
- })
- // #endif
- // #ifdef PUB_CUSTOMER
- addstr = '?source=step'
- uni.navigateTo({
- url: '/sub_pages/customer/customer-info/customer-info' + addstr
- })
- // #endif
- },
- changeAll(e) {
- this.pcfvalue = e.detail.value[0]
- },
- async login() {
- uni.showLoading({
- title: '登陆中'
- });
- var that = this;
- if (this.loginType == 'pwd') {
- if (!that.userName) {
- uni.showToast({
- title: '请输入用户名',
- icon: 'none'
- });
- return;
- }
- if (!that.password) {
- uni.showToast({
- title: '请输入密码',
- icon: 'none'
- });
- return;
- }
- }
- if (this.loginType == 'code') {
- if (!that.phoneNumber) {
- uni.showToast({
- title: '请输入手机号',
- icon: 'none'
- });
- return;
- }
- if (!that.smsCode) {
- uni.showToast({
- title: '请输入手机验证码',
- icon: 'none'
- });
- return;
- }
- }
- // if (this.pcfvalue == undefined) {
- // util.showMyToast('必须勾选《用户服务协议》及《隐私政策》');
- // return;
- // }
- let post = {
- username: this.userName,
- password: this.password,
- tel: this.phoneNumber,
- smsCode: this.smsCode
- // openId: '123456789'
- }
- // const {
- // code
- // } = await this.$http.request('get', '/api/login/admin')
- const resp = await this.$store.dispatch(this.apitype, post);
- // uni.hideLoading()
+ checked: false,
+ loginType: 'pwd', //pwd和code,密码和验证码登录
+ pcfvalue: undefined,
+ getCodeText: '获取验证码',
+ getCodeBtnColor: "#20613D",
+ getCodeisWaiting: false,
+ Timer: undefined,
+ // #ifdef PUB_SUPPLIER
+ apitype: 'loginSupplier',
+ // #endif
+ // #ifdef PUB_PARTNER
+ apitype: 'loginPartner',
+ // #endif
+ // #ifdef PUB_CUSTOMER
+ apitype: 'loginCustomer',
+ // #endif
+ // return 'loginPartner'
+ };
+ },
+ methods: {
+ async getCode() {
+ console.log('getCode')
+ uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
+ if (this.getCodeisWaiting) {
+ return;
+ }
+ if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { //校验手机号码是否有误
+ this.$message.showToast('请填写正确手机号码')
+ return false;
+ }
+ this.getCodeText = "发送中..." //发送验证码
+ this.getCodeisWaiting = true;
+ this.getCodeBtnColor = "#000" //追加样式,修改颜色
+ //示例用定时器模拟请求效果
+ //setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
+ const {
+ code
+ } = await this.$http.request('post', '/api/sms/send/code', {
+ data: {
+ tel: this.phoneNumber,
+ userType: this.apitype.replace("login", "").toLowerCase()
+ }
+ })
+ if (code == 0) {
+ uni.showToast({
+ title: '验证码已发送',
+ icon: "none"
+ });
+ this.setTimer(); //调用定时器方法
+ } else {
+ this.getCodeText = "获取验证码" //发送验证码
+ this.getCodeisWaiting = false;
+ this.getCodeBtnColor = "#20613D";
+ }
+ // setTimeout(() => {
+ // uni.showToast({
+ // title: '验证码已发送',
+ // icon: "none"
+ // }); //弹出提示框
+ // //示例默认1234,生产中请删除这一句。
+ // // this.code = '1234'; //发送验证码,进行填入
+ // this.setTimer(); //调用定时器方法
+ // }, 1000)
+ },
+ //setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
+ setTimer() {
+ let holdTime = 60; //定义变量并赋值
+ this.getCodeText = "重新获取(60)"
+ //setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
+ //setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
+ this.Timer = setInterval(() => {
+ if (holdTime <= 0) {
+ this.getCodeisWaiting = false;
+ this.getCodeBtnColor = "#20613D";
+ this.getCodeText = "获取验证码"
+ clearInterval(this.Timer); //清除该函数
+ return; //返回前面
+ }
+ this.getCodeText = "重新获取(" + holdTime + ")"
+ holdTime--;
+ }, 1000)
+ },
+ toHome() {
+ uni.redirectTo({
+ url: '/pages/home/home'
+ })
+ },
+ toReg() {
+ // uni.switchTab({
+ // url: '/pages/index/index'
+ // })
+ var addstr = ''
+ // #ifdef PUB_PARTNER
+ addstr = '?source=step'
+ uni.navigateTo({
+ url: '/sub_pages/partner/partner-info/partner-info' + addstr
+ })
+ // #endif
+ // #ifdef PUB_SUPPLIER
+ uni.redirectTo({
+ url: '/pages/login/supplier-reg'
+ })
+ // #endif
+ // #ifdef PUB_CUSTOMER
+ addstr = '?source=step'
+ uni.navigateTo({
+ url: '/sub_pages/customer/customer-info/customer-info' + addstr
+ })
+ // #endif
+ },
+ changeAll(e) {
+ this.pcfvalue = e.detail.value[0]
+ },
+ async login() {
+ uni.showLoading({
+ title: '登陆中'
+ });
+ var that = this;
+ if (this.loginType == 'pwd') {
+ if (!that.userName) {
+ uni.showToast({
+ title: '请输入用户名',
+ icon: 'none'
+ });
+ return;
+ }
+ if (!that.password) {
+ uni.showToast({
+ title: '请输入密码',
+ icon: 'none'
+ });
+ return;
+ }
+ }
+ if (this.loginType == 'code') {
+ if (!that.phoneNumber) {
+ uni.showToast({
+ title: '请输入手机号',
+ icon: 'none'
+ });
+ return;
+ }
+ if (!that.smsCode) {
+ uni.showToast({
+ title: '请输入手机验证码',
+ icon: 'none'
+ });
+ return;
+ }
+ }
+ // if (this.pcfvalue == undefined) {
+ // util.showMyToast('必须勾选《用户服务协议》及《隐私政策》');
+ // return;
+ // }
+ let post = {
+ username: this.userName,
+ password: this.password,
+ tel: this.phoneNumber,
+ smsCode: this.smsCode
+ // openId: '123456789'
+ }
+ // const {
+ // code
+ // } = await this.$http.request('get', '/api/login/admin')
+ const resp = await this.$store.dispatch(this.apitype, post);
+ // uni.hideLoading()
- if (resp.code === 0) {
+ if (resp.code === 0) {
- // myCache.cache("userToken", res.data.accessToken)
- // let userRes = await gzmzApi.getMemberInfo();
- // if (userRes.status) {
- // myCache.cache("userInfo", JSON.stringify(userRes.data))
- // }
- // setTimeout(() => {
- // uni.navigateBack();
- // }, 1000);
+ // myCache.cache("userToken", res.data.accessToken)
+ // let userRes = await gzmzApi.getMemberInfo();
+ // if (userRes.status) {
+ // myCache.cache("userInfo", JSON.stringify(userRes.data))
+ // }
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 1000);
- } else {
- // uni.showToast({
- // title: '登录失败!',
- // icon: 'none'
- // });
- return;
- }
+ } else {
+ // uni.showToast({
+ // title: '登录失败!',
+ // icon: 'none'
+ // });
+ return;
+ }
- },
- tc1(id) {
- uni.navigateTo({
- url: '/pages/users/xieyi?id=' + id,
- });
- }
- }
-};
+ },
+ tc1(id) {
+ uni.navigateTo({
+ url: '/pages/users/xieyi?id=' + id,
+ });
+ }
+ }
+ };
</script>
<style lang="scss" scoped>
-.form-input {
- background-color: #f8f7fc;
- border-radius: 50rpx;
- margin-bottom: 50rpx;
- border: 1px solid #e9e9e9;
+ .form-input {
+ background-color: #f8f7fc;
+ border-radius: 50rpx;
+ margin-bottom: 50rpx;
+ border: 1px solid #e9e9e9;
- /deep/ .u-input {
- padding-left: 60rpx !important;
- padding-right: 40rpx !important;
- }
+ /deep/ .u-input {
+ padding-left: 60rpx !important;
+ padding-right: 40rpx !important;
+ }
- /deep/ input {
- height: 70rpx;
- line-height: 70rpx;
+ /deep/ input {
+ height: 70rpx;
+ line-height: 70rpx;
- }
+ }
-}
+ }
</style>
<style lang="scss" scoped>
-@import './login.scss';
+ @import './login.scss';
-.main-container {
- margin: 20px 0;
-}
+ .main-container {
+ margin: 20px 0;
+ }
-.img-a {
- position: absolute;
- width: 100%;
- top: -150rpx;
- right: 0;
-}
+ .img-a {
+ position: absolute;
+ width: 100%;
+ top: -150rpx;
+ right: 0;
+ }
-.img-b {
- position: absolute;
- width: 50%;
- bottom: 0;
- left: -120rpx;
-}
+ .img-b {
+ position: absolute;
+ width: 50%;
+ bottom: 0;
+ left: -120rpx;
+ }
-.to-home {
- margin-top: 30rpx;
- font-size: 30rpx;
- color: #5af;
- display: flex;
- flex-direction: row-reverse;
-}
+ .to-home {
+ margin-top: 30rpx;
+ font-size: 30rpx;
+ color: #5af;
+ display: flex;
+ flex-direction: row-reverse;
+ }
-.t-login {
- width: 100%;
- margin: 0 auto;
- font-size: 28rpx;
- color: #000;
-}
+ .t-login {
+ width: 100%;
+ margin: 0 auto;
+ font-size: 28rpx;
+ color: #000;
+ }
-.t-login .bg {
- width: 100%;
- position: relative;
-}
+ .t-login .bg {
+ width: 100%;
+ position: relative;
+ }
-.t-login .login {
- width: 650rpx;
- margin: 60rpx auto;
- margin-top: 0rpx;
- font-size: 28rpx;
- color: #000;
-}
+ .t-login .login {
+ width: 650rpx;
+ margin: 60rpx auto;
+ margin-top: 0rpx;
+ font-size: 28rpx;
+ color: #000;
+ }
-.t-login button {
- font-size: 28rpx;
- background: #5677fc;
- color: #fff;
- height: 90rpx;
- line-height: 90rpx;
- border-radius: 50rpx;
- box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
-}
+ .t-login button {
+ font-size: 28rpx;
+ background: #5677fc;
+ color: #fff;
+ height: 90rpx;
+ line-height: 90rpx;
+ border-radius: 50rpx;
+ box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
+ }
-.t-login input {
- padding: 0 20rpx 0 60rpx;
- height: 90rpx;
- line-height: 90rpx;
- margin-bottom: 50rpx;
- background: #f8f7fc;
- border: 1px solid #e9e9e9;
- font-size: 28rpx;
- border-radius: 50rpx;
-}
+ .t-login input {
+ padding: 0 20rpx 0 60rpx;
+ height: 90rpx;
+ line-height: 90rpx;
+ margin-bottom: 50rpx;
+ background: #f8f7fc;
+ border: 1px solid #e9e9e9;
+ font-size: 28rpx;
+ border-radius: 50rpx;
+ }
-.t-login .t-a {
- position: relative;
+ .t-login .t-a {
+ position: relative;
- .get-code {
- // position: absolute;
- // right: 40rpx;
- // top: 25rpx;
- }
-}
+ .get-code {
+ // position: absolute;
+ // right: 40rpx;
+ // top: 25rpx;
+ }
+ }
-.t-login .t-a .icon {
- width: 40rpx;
- height: 40rpx;
- position: absolute;
- left: 24rpx;
- top: 14rpx;
- margin-right: 20rpx;
-}
+ .t-login .t-a .icon {
+ width: 40rpx;
+ height: 40rpx;
+ position: absolute;
+ left: 24rpx;
+ top: 14rpx;
+ margin-right: 20rpx;
+ }
-.t-login .t-a .line {
- width: 2rpx;
- height: 40rpx;
- background-color: #dedede;
- position: absolute;
- top: 28rpx;
- left: 98rpx;
-}
+ .t-login .t-a .line {
+ width: 2rpx;
+ height: 40rpx;
+ background-color: #dedede;
+ position: absolute;
+ top: 28rpx;
+ left: 98rpx;
+ }
-.t-login .t-b {
- text-align: left;
- font-size: 46rpx;
- color: #000;
- padding: 300rpx 0 30rpx 0;
- font-weight: bold;
-}
+ .t-login .t-b {
+ text-align: left;
+ font-size: 46rpx;
+ color: #000;
+ padding: 300rpx 0 30rpx 0;
+ font-weight: bold;
+ }
-.t-login .t-b2 {
- text-align: left;
- font-size: 32rpx;
- color: #aaaaaa;
- padding: 0rpx 0 120rpx 0;
-}
+ .t-login .t-b2 {
+ text-align: left;
+ font-size: 32rpx;
+ color: #aaaaaa;
+ padding: 0rpx 0 120rpx 0;
+ }
-.t-login .t-c {
- position: absolute;
- right: 22rpx;
- top: 22rpx;
- background: #5677fc;
- color: #fff;
- font-size: 24rpx;
- border-radius: 50rpx;
- height: 50rpx;
- line-height: 50rpx;
- padding: 0 25rpx;
- z-index: 999;
-}
+ .t-login .t-c {
+ position: absolute;
+ right: 22rpx;
+ top: 22rpx;
+ background: #5677fc;
+ color: #fff;
+ font-size: 24rpx;
+ border-radius: 50rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ padding: 0 25rpx;
+ z-index: 999;
+ }
-.t-login .t-d {
- text-align: center;
- color: #999;
- margin: 80rpx 0;
-}
+ .t-login .t-d {
+ text-align: center;
+ color: #999;
+ margin: 80rpx 0;
+ }
-.t-login .t-e {
- text-align: center;
- width: 250rpx;
- margin: 80rpx auto 0;
-}
+ .t-login .t-e {
+ text-align: center;
+ width: 250rpx;
+ margin: 80rpx auto 0;
+ }
-.t-login .t-g {
- float: left;
- width: 50%;
-}
+ .t-login .t-g {
+ float: left;
+ width: 50%;
+ }
-.t-login .t-e image {
- width: 50rpx;
- height: 50rpx;
-}
+ .t-login .t-e image {
+ width: 50rpx;
+ height: 50rpx;
+ }
-.t-login .t-f {
- text-align: center;
- margin: 200rpx 0 0 0;
- color: #666;
-}
+ .t-login .t-f {
+ text-align: center;
+ margin: 200rpx 0 0 0;
+ color: #666;
+ }
-.t-login .t-f text {
- margin-left: 20rpx;
- color: #aaaaaa;
- font-size: 27rpx;
-}
+ .t-login .t-f text {
+ margin-left: 20rpx;
+ color: #aaaaaa;
+ font-size: 27rpx;
+ }
-// .t-login .uni-input-placeholder {
-// color: #000;
-// }
+ // .t-login .uni-input-placeholder {
+ // color: #000;
+ // }
-.cl {
- zoom: 1;
-}
+ .cl {
+ zoom: 1;
+ }
-.cl:after {
- clear: both;
- display: block;
- visibility: hidden;
- height: 0;
- content: '\20';
-}
+ .cl:after {
+ clear: both;
+ display: block;
+ visibility: hidden;
+ height: 0;
+ content: '\20';
+ }
</style>
\ No newline at end of file
diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue
index 00cee22..f0e61f5 100644
--- a/pages/order/order-detail.vue
+++ b/pages/order/order-detail.vue
@@ -24,7 +24,7 @@
}
},
methods: {
-
+
async getDetail() {
this.$message.showLoading()
const {
@@ -141,8 +141,9 @@
}
break
case 'evaluate': {
- const res = await this.$message.confirm('请输入评价信息', {
- editable: true
+ const res = await this.$message.confirm('', {
+ editable: true,
+ title:'请输入评价信息'
})
if (res.content && res.confirm) {
// 发送请求
@@ -190,9 +191,8 @@
</view>
<view class="address-container bg-white br-4 m-t-12">
<view class="flex">
- <view class="icon-loc m-r-10">
- <image src="/static/common/icon-loc.png" class="image"></image>
- </view>
+ <image src="/static/common/icon-loc.png" class="image m-r-10"></image>
+
<view class="info">
<view class="title">
{{ dto.customer }}
@@ -212,7 +212,8 @@
</image>
<view class="flex1">
<view class=" flex">
- <view class="title"><span class="level">{{ item.flowerCategory }}</span><span class="level">{{ item.flowerLevelStr }}</span>{{ item.flowerName }}
+ <view class="title"><span class="level">{{ item.flowerCategory }}</span><span
+ class="level">{{ item.flowerLevelStr }}</span>{{ item.flowerName }}
</view>
<!-- <view class="m-l-a m-r-0">-->
<!-- {{item.flowerCategory || '-'}}-->
@@ -351,8 +352,6 @@
</view>
<view class="button button-1" @click="buttonClick('evaluate')" v-if=" dto.status === 'EVALUATE'"> 评价
</view>
- <view class="button button-1" @click="buttonClick('evaluate')" v-if=" dto.status === 'EVALUATE'"> 评价
- </view>
<!-- <view class="button button-1" @click="buttonClick('couldRefund')"
v-if="dto.couldRefund"> 退款
</view> -->
@@ -370,10 +369,42 @@
background: #F7F7F7;
padding: 30rpx;
- .info-container {
- .button-space {
- min-height: 140rpx;
+ .button-space {
+ min-height: 140rpx;
+ }
+
+ .buttons-bottom {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ height: 120rpx;
+ background-color: #FFFFFF;
+ box-shadow: 0 2rpx 30rpx rgba(0, 0, 0, .3);
+
+ .button {
+ border-radius: 42rpx;
+ border: 2rpx solid #CECECE;
+ font-weight: 400;
+ font-size: 30rpx;
+ color: #999999;
+ text-align: center;
+ line-height: 60rpx;
+ height: 60rpx;
+ padding: 10rpx 30rpx;
+ background-color: #FFFFFF;
+ margin: 0 auto;
+ display: inline-block;
+ vertical-align: middle;
+ margin-top: 20rpx;
+ min-width: 120rpx;
}
+
+ .button-1 {}
+ }
+
+ .info-container {
+
.icon-kf {
width: 44rpx;
@@ -394,25 +425,6 @@
}
}
- .buttons-bottom {
- position: fixed;
- left: 0;
- bottom: 0;
- right: 0;
- height: 120rpx;
-
- .button {
- border-radius: 42rpx;
- border: 2rpx solid #CECECE;
- font-weight: 400;
- font-size: 28rpx;
- color: #999999;
- text-align: center;
- line-height: 76rpx;
- }
-
- .button-1 {}
- }
}
.info-container {
@@ -450,18 +462,14 @@
.address-container {
padding: 28rpx;
- .icon-loc {
- width: 48rpx;
- height: 48rpx;
- background: #20613D;
+ .image {
+ // background-color: #20613D;
border-radius: 50%;
-
- .image {
- margin-top: 8rpx;
- margin-left: 8rpx;
- width: 32rpx;
- height: 32rpx;
- }
+ margin-top: 8rpx;
+ margin-left: 8rpx;
+ width: 32rpx;
+ height: 32rpx;
+ // padding: 8rpx;
}
.info {
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 0d6feed..7a3e36d 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -156,8 +156,8 @@
line-height: 40rpx;
margin: 0 auto;
//min-width: ;
- padding-left: 20rpx;
- padding-right: 20rpx;
+ // padding-left: 10rpx;
+ // padding-right: 10rpx;
width: fit-content;
min-width: 120rpx;
text-align: center;
@@ -167,7 +167,7 @@
font-weight: 600;
font-size: 32rpx;
color: #20613D;
- line-height: 44rpx;
+ // line-height: 44rpx;
}
.status-each:first-child {
diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue
index 99e3571..f593ec7 100644
--- a/pages/user/supplier-user.vue
+++ b/pages/user/supplier-user.vue
@@ -31,8 +31,11 @@
<view class="t1">
{{
(!!currentInfo.supplierDTO ? (currentInfo.supplierDTO.name) : "") || (!!currentInfo.customerDTO ? (currentInfo.customerDTO.name) : "") || currentInfo.nickName || currentInfo.loginName || '-'
- }}<span v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'">
+ }}
+ <span v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'">
({{ currentInfo.supplierDTO ? currentInfo.supplierDTO.statusStr : '' }})</span>
+ <span v-if="currentInfo.partnerDTO&¤tInfo.partnerDTO.status!=='P'">
+ ({{ currentInfo.partnerDTO ? currentInfo.partnerDTO.statusStr : '' }})</span>
</view>
<view class="t2">{{ currentInfo.tel || '暂无电话' }}</view>
</view>
@@ -145,7 +148,8 @@
</view>
<!-- #endif -->
<view class="user-utils m-20">
- <view class="user-util m-t-12 flex" @click="goto('/sub_pages/customer/customer-info/customer-info',true)">
+ <view class="user-util m-t-12 flex" v-if="selftype==='customer'||!selftype"
+ @click="goto('/sub_pages/customer/customer-info/customer-info',true)">
<view class="title">个人信息</view>
<view class="right-icon">
<uni-icons type="right"></uni-icons>
@@ -275,9 +279,9 @@
// }
// }
- // },
- onShow(){
- this.getTj()
+ // },
+ onShow() {
+ this.getTj()
},
onLoad(options) {
// const url = options.q ? decodeURIComponent(options.q) : '';
@@ -296,21 +300,21 @@
methods: {
getTj() {
// /api/supplier/delivery
-
+
if (this.currentInfo.id && this.currentInfo.id !== this.cacheUserId) {
this.cacheUserId = this.currentInfo.id
let that = this
- setTimeout(() => {
+ setTimeout(() => {
// #ifdef PUB_CUSTOMER
this.$http.request('get', '/api/customer/center/tj', {}).then(res => {
if (res.code === 0) {
that.tj = res.data || {}
}
- })
+ })
// #endif
}, 200)
}
-
+
},
async clearlogout() {
diff --git a/store/index.js b/store/index.js
index ba659d7..9f5be1f 100644
--- a/store/index.js
+++ b/store/index.js
@@ -6,415 +6,417 @@
Vue.use(Vuex)
const store = new Vuex.Store({
- state: {
- hasLogin: false,
- isUniverifyLogin: false,
- loginProvider: "",
- openid: null,
- testvuex: false,
- colorIndex: 0,
- colorList: ['#FF0000', '#00FF00', '#0000FF'],
- noMatchLeftWindow: true,
- active: 'componentPage',
- leftWinActive: '/pages/component/view/view',
- activeOpen: '',
- menu: [],
- univerifyErrorMsg: '',
- currentInfo: {}, //个人用户信息
- cache_address: {},
- // remoteip:'',//服务器ip
- sign: {
- 'enterprise': 0,
- 'info': 0,
- 'flower': 0,
- 'shopping': 0,
- 'follow': 0,
- 'delivery':0
- },
- defaultaddress: {}
- },
- mutations: {
+ state: {
+ hasLogin: false,
+ isUniverifyLogin: false,
+ loginProvider: "",
+ openid: null,
+ testvuex: false,
+ colorIndex: 0,
+ colorList: ['#FF0000', '#00FF00', '#0000FF'],
+ noMatchLeftWindow: true,
+ active: 'componentPage',
+ leftWinActive: '/pages/component/view/view',
+ activeOpen: '',
+ menu: [],
+ univerifyErrorMsg: '',
+ currentInfo: {}, //个人用户信息
+ cache_address: {},
+ // remoteip:'',//服务器ip
+ sign: {
+ 'enterprise': 0,
+ 'info': 0,
+ 'flower': 0,
+ 'shopping': 0,
+ 'follow': 0,
+ 'delivery': 0
+ },
+ defaultaddress: {}
+ },
+ mutations: {
- updateLogin(state, provider) {
- console.log('updateLogin', provider)
- state.hasLogin = provider && true || false;
- if (!state.hasLogin) {
- storage.removeItem('token')
- }
- },
- login(state, provider) {
- state.hasLogin = true;
- state.loginProvider = provider;
- },
- logout(state) {
- state.hasLogin = false
- state.openid = null
- state.currentInfo = {}
- storage.removeItem('token')
- message.showToast('退出登录成功')
- // #ifdef APP
- var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件
+ updateLogin(state, provider) {
+ console.log('updateLogin', provider)
+ state.hasLogin = provider && true || false;
+ if (!state.hasLogin) {
+ storage.removeItem('token')
+ }
+ },
+ login(state, provider) {
+ state.hasLogin = true;
+ state.loginProvider = provider;
+ },
+ logout(state) {
+ state.hasLogin = false
+ state.openid = null
+ state.currentInfo = {}
+ storage.removeItem('token')
+ message.showToast('退出登录成功')
+ // #ifdef APP
+ var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件
- let ret = KeepAliveModule.stopLocation();
- console.log('ret', ret)
- // #endif
- uni.redirectTo({
- url: '/views/login/login'
- })
- },
- setOpenid(state, openid) {
- state.openid = openid
- },
- setDefaultAddress(state, defaultaddress) {
- state.defaultaddress = defaultaddress
- },
- setTestTrue(state) {
- state.testvuex = true
- },
- setTestFalse(state) {
- state.testvuex = false
- },
- setColorIndex(state, index) {
- state.colorIndex = index
- },
- setActive(state, tabPage) {
- state.active = tabPage
- },
- setActiveOpen(state, activeOpen) {
- state.activeOpen = activeOpen
- },
- setMenu(state, menu) {
- state.menu = menu
- },
- setUniverifyLogin(state, payload) {
- typeof payload !== 'boolean' ? payload = !!payload : '';
- state.isUniverifyLogin = payload;
- },
- setUniverifyErrorMsg(state, payload = '') {
- state.univerifyErrorMsg = payload
- }
- },
- getters: {
- currentColor(state) {
- return state.colorList[state.colorIndex]
- }
- },
- actions: {
- sign_add: async function ({
- commit,
- state
- }, key) {
- console.log('sign_add', key)
- state.sign[key] = 1
- },
- sign_clear: async function ({
- commit,
- state
- }, key) {
- console.log('sign_clear', key)
- state.sign[key] = 0
- },
- // lazy loading openid
- logout: async function ({
- commit,
- state
- }) {
- commit('logout')
- },
- getUserOpenId: async function ({
- commit,
- state
- }) {
- return await new Promise((resolve, reject) => {
- if (state.openid) {
- resolve(state.openid)
- } else {
- uni.login({
- success: (data) => {
- commit('login')
- setTimeout(function () { //模拟异步请求服务器获取 openid
- const openid = '123456789'
- console.log(
- 'uni.request mock openid[' +
- openid + ']');
- commit('setOpenid', openid)
- resolve(openid)
- }, 1000)
- },
- fail: (err) => {
- console.log('uni.login 接口调用失败,将无法正常使用开放接口等服务',
- err)
- reject(err)
- }
- })
- }
- })
- },
- getCurrentInfo: async function ({
- commit,
- state
- }) {
- //把权限获取到
- // console.log('getCurrentInfo,getCurrentInfo')
- const currentInfo = await http.request('get', '/api/current/user', {})
- if (currentInfo && currentInfo.code == 0) {
- // state.cMenu = cMenu
- // state.roles = currentInfo.data.roles || []
- state.currentInfo = currentInfo.data || {}
- state.type = currentInfo.data.type || ''
- state.spacecode = currentInfo.data.spacecode || ''
- // if(reload){
- // location.reload()
- // }
- commit("updateLogin", true)
- } else {
- commit("updateLogin", false)
- //这种情况就是要跳转到登录页面
- }
- },
- loginwx: async function ({
- dispatch,
- commit,
- state
- }, data) {
- var code = data.code
- let inviter = data.inviter || ''
- console.log('')
- const resp = await http.request('post', '/api/login/wechat', {
- data: {
- code: code,
- imgurl: data.imgurl || '',
- nickname: data.nickname || '',
- inviter: inviter
- },
- // params:{
- // code:code
- // }
- })
- if (resp && resp.code == 0) {
- state.isBind = true
- storage.setItem("token", resp.data.access_token || "")
- state.hasLogin = true
- if (inviter) {
- storage.removeItem('inviter');
- storage.removeItem('inviterTime');
- storage.removeItem('inviterName');
- }
- await dispatch('getCurrentInfo')
- } else {
- message.showToast('登录失败.' + (resp && resp.msg))
- storage.removeItem('openid');
- storage.removeItem('tel');
- storage.removeItem('token');
- }
- return resp
- },
- regUser: async function ({
- commit,
- dispatch,
- state
- }, data) {
- {
- const resp = await http.request('post', '/api/register/' + data.type, {
- data: {
- username: data.username,
- password: data.password,
- tel: data.phoneNumber || data.tel,
- smsCode: data.smsCode || '',
- dto: data.dto || undefined,
- wxcode: data.wxcode || undefined
- },
- params: {
- clientType: data.clientType || 'app'
- }
- })
- console.log('resp', resp)
- if (resp && resp.code == 0) {
+ let ret = KeepAliveModule.stopLocation();
+ console.log('ret', ret)
+ // #endif
+ uni.redirectTo({
+ url: '/views/login/login'
+ })
+ },
+ setOpenid(state, openid) {
+ state.openid = openid
+ },
+ setDefaultAddress(state, defaultaddress) {
+ state.defaultaddress = defaultaddress
+ },
+ setTestTrue(state) {
+ state.testvuex = true
+ },
+ setTestFalse(state) {
+ state.testvuex = false
+ },
+ setColorIndex(state, index) {
+ state.colorIndex = index
+ },
+ setActive(state, tabPage) {
+ state.active = tabPage
+ },
+ setActiveOpen(state, activeOpen) {
+ state.activeOpen = activeOpen
+ },
+ setMenu(state, menu) {
+ state.menu = menu
+ },
+ setUniverifyLogin(state, payload) {
+ typeof payload !== 'boolean' ? payload = !!payload : '';
+ state.isUniverifyLogin = payload;
+ },
+ setUniverifyErrorMsg(state, payload = '') {
+ state.univerifyErrorMsg = payload
+ }
+ },
+ getters: {
+ currentColor(state) {
+ return state.colorList[state.colorIndex]
+ }
+ },
+ actions: {
+ sign_add: async function({
+ commit,
+ state
+ }, key) {
+ console.log('sign_add', key)
+ state.sign[key] = 1
+ },
+ sign_clear: async function({
+ commit,
+ state
+ }, key) {
+ console.log('sign_clear', key)
+ state.sign[key] = 0
+ },
+ // lazy loading openid
+ logout: async function({
+ commit,
+ state
+ }) {
+ commit('logout')
+ },
+ getUserOpenId: async function({
+ commit,
+ state
+ }) {
+ return await new Promise((resolve, reject) => {
+ if (state.openid) {
+ resolve(state.openid)
+ } else {
+ uni.login({
+ success: (data) => {
+ commit('login')
+ setTimeout(function() { //模拟异步请求服务器获取 openid
+ const openid = '123456789'
+ console.log(
+ 'uni.request mock openid[' +
+ openid + ']');
+ commit('setOpenid', openid)
+ resolve(openid)
+ }, 1000)
+ },
+ fail: (err) => {
+ console.log('uni.login 接口调用失败,将无法正常使用开放接口等服务',
+ err)
+ reject(err)
+ }
+ })
+ }
+ })
+ },
+ getCurrentInfo: async function({
+ commit,
+ state
+ }) {
+ //把权限获取到
+ // console.log('getCurrentInfo,getCurrentInfo')
+ const currentInfo = await http.request('get', '/api/current/user', {})
+ if (currentInfo && currentInfo.code == 0) {
+ // state.cMenu = cMenu
+ // state.roles = currentInfo.data.roles || []
+ state.currentInfo = currentInfo.data || {}
+ state.type = currentInfo.data.type || ''
+ state.spacecode = currentInfo.data.spacecode || ''
+ // if(reload){
+ // location.reload()
+ // }
+ commit("updateLogin", true)
+ } else {
+ commit("updateLogin", false)
+ //这种情况就是要跳转到登录页面
+ }
+ },
+ loginwx: async function({
+ dispatch,
+ commit,
+ state
+ }, data) {
+ var code = data.code
+ let inviter = data.inviter || ''
+ console.log('')
+ const resp = await http.request('post', '/api/login/wechat', {
+ data: {
+ code: code,
+ imgurl: data.imgurl || '',
+ nickname: data.nickname || '',
+ inviter: inviter
+ },
+ // params:{
+ // code:code
+ // }
+ })
+ if (resp && resp.code == 0) {
+ state.isBind = true
+ storage.setItem("token", resp.data.access_token || "")
+ state.hasLogin = true
+ if (inviter) {
+ storage.removeItem('inviter');
+ storage.removeItem('inviterTime');
+ storage.removeItem('inviterName');
+ }
+ await dispatch('getCurrentInfo')
+ } else {
+ message.showToast('登录失败.' + (resp && resp.msg))
+ storage.removeItem('openid');
+ storage.removeItem('tel');
+ storage.removeItem('token');
+ }
+ return resp
+ },
+ regUser: async function({
+ commit,
+ dispatch,
+ state
+ }, data) {
+ {
+ const resp = await http.request('post', '/api/register/' + data.type, {
+ data: {
+ username: data.username,
+ password: data.password,
+ tel: data.phoneNumber || data.tel,
+ smsCode: data.smsCode || '',
+ dto: data.dto || undefined,
+ wxcode: data.wxcode || undefined
+ },
+ params: {
+ clientType: data.clientType || 'app'
+ }
+ })
+ console.log('resp', resp)
+ if (resp && resp.code == 0) {
- } else {
+ } else {
- }
- return resp
- }
+ }
+ return resp
+ }
- },
- loginPartner: async function ({
- commit,
- dispatch,
- state
- }, data) {
- {
- const resp = await http.request('post', '/api/login/partner' + ((data
- .phoneNumber || data.tel) ? '/phone' : ''), {
- data: {
- username: (data.phoneNumber || data.tel) ? (data.phoneNumber ||
- data.tel) : data.username,
- password: data.password,
- tel: data.phoneNumber || data.tel,
- smsCode: data.smsCode || ''
- },
- params: {
- clientType: data.clientType || 'app'
- }
- })
- console.log('resp', resp)
- if (resp && resp.code == 0) {
- // await getCurrentInfo()
- // // this.$message.showToast('登录成功')
- // console.log(resp)
- storage.setItem('token', resp.data.access_token)
- commit("updateLogin", true)
- await dispatch('getCurrentInfo')
+ },
+ loginPartner: async function({
+ commit,
+ dispatch,
+ state
+ }, data) {
+ {
+ const resp = await http.request('post', '/api/login/partner' + ((data
+ .phoneNumber || data.tel) ? '/phone' : ''), {
+ data: {
+ username: (data.phoneNumber || data.tel) ? (data.phoneNumber ||
+ data.tel) : data.username,
+ password: data.password,
+ tel: data.phoneNumber || data.tel,
+ smsCode: data.smsCode || ''
+ },
+ params: {
+ clientType: data.clientType || 'app'
+ }
+ })
+ if (resp && resp.code == 0) {
+ storage.setItem('token', resp.data.access_token)
+ commit("updateLogin", true)
+ await dispatch('getCurrentInfo')
+ uni.reLaunch({
+ url: '/pages/home/supplier-home'
+ })
+ } else {}
+ return resp
+ }
+ },
+ loginAdmin: async function({
+ commit,
+ dispatch,
+ state
+ }, data) {
+ {
+ // + ((data
+ // .phoneNumber || data.tel) ? '/phone' : '')
+ const resp = await http.request('post', '/api/login/admin/wx', {
+ data: {
+ username: (data.phoneNumber || data.tel) ? (data.phoneNumber ||
+ data.tel) : data.username,
+ password: data.password,
+ tel: data.phoneNumber || data.tel,
+ smsCode: data.smsCode || ''
+ },
+ params: {
+ clientType: data.clientType || 'app'
+ }
+ })
+ if (resp && resp.code == 0) {
+ storage.setItem('token', resp.data.access_token)
+ commit("updateLogin", true)
+ await dispatch('getCurrentInfo')
+ uni.reLaunch({
+ url: '/sub_pages/partner/delivery/delivery-home'
+ })
+ } else {}
+ return resp
+ }
+ },
+ loginSupplier: async function({
+ commit,
+ dispatch,
+ state
+ }, data) {
+ {
+ const resp = await http.request('post', '/api/login/supplier' + ((data
+ .phoneNumber || data.tel) ? '/phone' : ''), {
+ data: {
+ username: (data.phoneNumber || data.tel) ? (data.phoneNumber ||
+ data.tel) : data.username,
+ password: data.password,
+ tel: data.phoneNumber || data.tel,
+ smsCode: data.smsCode || ''
+ },
+ params: {
+ clientType: data.clientType || 'app'
+ }
+ })
+ console.log('resp', resp)
+ if (resp && resp.code == 0) {
+ // await getCurrentInfo()
+ // // this.$message.showToast('登录成功')
+ // console.log(resp)
+ storage.setItem('token', resp.data.access_token)
+ commit("updateLogin", true)
+ await dispatch('getCurrentInfo')
- console.log('login,reLaunch')
- // #ifdef APP
- var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件
+ console.log('login,reLaunch')
+ // #ifdef APP
+ var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件
- KeepAliveModule && KeepAliveModule.startLocation({
- intervalTime: 5000, //定位间隔时间
- gaodeApiKey: "0eef1axxxxxx7964", //高德地图Key,已停用,引入插件配置
- locationMode: 1, //定位模式
- purpose: 0, //定位场景
- ifUpload: true, //是否上报服务器
- uploadUrl: "http://bio51-api.fixbug.fun/api/current/employee/location", //上报接口
- params: "{'lat':'1','lng':'3'}", //其他参数
- headers: "{'authorization1':'Bearer xOHeJhg'}",
- }, function (res) {
- console.log("启用结果:", res);
- let ret = KeepAliveModule.getCurrentLocation();
- console.log("启用结果2:", ret);
- });
- // #endif
- // uni.redirectTo({
- // url: '/views/app/app-home/app-home'
- // })
- uni.reLaunch({
- url: '/pages/home/supplier-home'
- })
- } else {
- // this.$message.showToast('登录失败')
+ KeepAliveModule && KeepAliveModule.startLocation({
+ intervalTime: 5000, //定位间隔时间
+ gaodeApiKey: "0eef1axxxxxx7964", //高德地图Key,已停用,引入插件配置
+ locationMode: 1, //定位模式
+ purpose: 0, //定位场景
+ ifUpload: true, //是否上报服务器
+ uploadUrl: "http://bio51-api.fixbug.fun/api/current/employee/location", //上报接口
+ params: "{'lat':'1','lng':'3'}", //其他参数
+ headers: "{'authorization1':'Bearer xOHeJhg'}",
+ }, function(res) {
+ console.log("启用结果:", res);
+ let ret = KeepAliveModule.getCurrentLocation();
+ console.log("启用结果2:", ret);
+ });
+ // #endif
+ // uni.redirectTo({
+ // url: '/views/app/app-home/app-home'
+ // })
+ uni.reLaunch({
+ url: '/pages/home/supplier-home'
+ })
+ } else {
+ // this.$message.showToast('登录失败')
- }
- return resp
- }
+ }
+ return resp
+ }
- },
- loginSupplier: async function ({
- commit,
- dispatch,
- state
- }, data) {
- {
- const resp = await http.request('post', '/api/login/supplier' + ((data
- .phoneNumber || data.tel) ? '/phone' : ''), {
- data: {
- username: (data.phoneNumber || data.tel) ? (data.phoneNumber ||
- data.tel) : data.username,
- password: data.password,
- tel: data.phoneNumber || data.tel,
- smsCode: data.smsCode || ''
- },
- params: {
- clientType: data.clientType || 'app'
- }
- })
- console.log('resp', resp)
- if (resp && resp.code == 0) {
- // await getCurrentInfo()
- // // this.$message.showToast('登录成功')
- // console.log(resp)
- storage.setItem('token', resp.data.access_token)
- commit("updateLogin", true)
- await dispatch('getCurrentInfo')
+ },
- console.log('login,reLaunch')
- // #ifdef APP
- var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件
-
- KeepAliveModule && KeepAliveModule.startLocation({
- intervalTime: 5000, //定位间隔时间
- gaodeApiKey: "0eef1axxxxxx7964", //高德地图Key,已停用,引入插件配置
- locationMode: 1, //定位模式
- purpose: 0, //定位场景
- ifUpload: true, //是否上报服务器
- uploadUrl: "http://bio51-api.fixbug.fun/api/current/employee/location", //上报接口
- params: "{'lat':'1','lng':'3'}", //其他参数
- headers: "{'authorization1':'Bearer xOHeJhg'}",
- }, function (res) {
- console.log("启用结果:", res);
- let ret = KeepAliveModule.getCurrentLocation();
- console.log("启用结果2:", ret);
- });
- // #endif
- // uni.redirectTo({
- // url: '/views/app/app-home/app-home'
- // })
- uni.reLaunch({
- url: '/pages/home/supplier-home'
- })
- } else {
- // this.$message.showToast('登录失败')
-
- }
- return resp
- }
-
- },
-
- loginCustomer: async function ({
- commit,
- dispatch,
- state
- }, data) {
- {
- const resp = await http.request('post', '/api/login/customer' + (data
- .phoneNumber ? '/phone' : ''), {
- data: {
- username: (data.phoneNumber || data.tel) ? (data.phoneNumber ||
- data.tel) : data.username,
- password: data.password,
- tel: data.phoneNumber || data.tel,
- smsCode: data.smsCode || ''
- },
- params: {
- clientType: data.clientType || 'app'
- }
- })
- console.log('resp', resp)
- if (resp && resp.code === 0) {
- storage.setItem('token', resp.data.access_token)
- commit("updateLogin", true)
- await dispatch('getCurrentInfo')
- uni.reLaunch({
- url: '/pages/home/home'
- })
- } else {
+ loginCustomer: async function({
+ commit,
+ dispatch,
+ state
+ }, data) {
+ {
+ const resp = await http.request('post', '/api/login/customer' + (data
+ .phoneNumber ? '/phone' : ''), {
+ data: {
+ username: (data.phoneNumber || data.tel) ? (data.phoneNumber ||
+ data.tel) : data.username,
+ password: data.password,
+ tel: data.phoneNumber || data.tel,
+ smsCode: data.smsCode || ''
+ },
+ params: {
+ clientType: data.clientType || 'app'
+ }
+ })
+ console.log('resp', resp)
+ if (resp && resp.code === 0) {
+ storage.setItem('token', resp.data.access_token)
+ commit("updateLogin", true)
+ await dispatch('getCurrentInfo')
+ uni.reLaunch({
+ url: '/pages/home/home'
+ })
+ } else {
- }
- return resp
- }
+ }
+ return resp
+ }
- },
- submitShopping: async function ({commit, dispatch}, data) {
- const resp = await http.request('post', '/api/customer/flower/cart/change-num', {
- data: {
- id: data.id,
- num: 1
- }
- }
- )
- if (resp && resp.code === 0) {
- message.showToast('添加购物车成功')
- dispatch('sign_add', 'shopping')
- } else {
+ },
+ submitShopping: async function({
+ commit,
+ dispatch
+ }, data) {
+ const resp = await http.request('post', '/api/customer/flower/cart/change-num', {
+ data: {
+ id: data.id,
+ num: 1
+ }
+ })
+ if (resp && resp.code === 0) {
+ message.showToast('添加购物车成功')
+ dispatch('sign_add', 'shopping')
+ } else {
- }
- return resp
- },
+ }
+ return resp
+ },
- }
+ }
})
export default store
\ No newline at end of file
diff --git a/sub_pages/partner/delivery/delivery-detail.vue b/sub_pages/partner/delivery/delivery-detail.vue
index 0d9bdad..e04d172 100644
--- a/sub_pages/partner/delivery/delivery-detail.vue
+++ b/sub_pages/partner/delivery/delivery-detail.vue
@@ -1,372 +1,375 @@
<script>
-export default {
- data() {
- return {
- dto: {
- id: '',
- items: [],
- supplierName: '',
- orderNo: '',
- stationName: '',
- arriveRemarks: '',
- },
- id: '',
- form: {
- id: '',
- status: '',
- checkImageList: [],
- checkRemarks: '',
- deductAmount: 0,
- },
- check_status: [
- {
- label: '退回',
- value: 'back'
- },
- {
- label: '降级',
- value: 'reduce'
- },
- {
- label: '缺货',
- value: 'lack'
- },
- {
- label: '完成',
- value: 'ok'
- }
- ]
- };
- },
- async onLoad(options) {
- this.id = options.id || ''
- await this.init()
+ export default {
+ data() {
+ return {
+ dto: {
+ id: '',
+ items: [],
+ supplierName: '',
+ orderNo: '',
+ stationName: '',
+ arriveRemarks: '',
+ },
+ id: '',
+ form: {
+ id: '',
+ status: '',
+ checkImageList: [],
+ checkRemarks: '',
+ deductAmount: 0,
+ },
+ check_status: [{
+ label: '退回',
+ value: 'back'
+ },
+ {
+ label: '降级',
+ value: 'reduce'
+ },
+ {
+ label: '缺货',
+ value: 'lack'
+ },
+ {
+ label: '完成',
+ value: 'ok'
+ }
+ ]
+ };
+ },
+ async onLoad(options) {
+ this.id = options.id || ''
+ await this.init()
- },
- async onPullDownRefresh() {
- await this.init()
- uni.stopPullDownRefresh()
- },
- methods: {
- closeCheckForm() {
- this.$refs.popup_form.close()
+ },
+ async onPullDownRefresh() {
+ await this.init()
+ uni.stopPullDownRefresh()
+ },
+ methods: {
+ closeCheckForm() {
+ this.$refs.popup_form.close()
- },
- async clickCheck(item, status) {
- this.form = {
- id: item.id || '',
- status: '',
- statusStr: '',
- checkImageList: item.checkImageList || [],
- checkRemarks: item.checkRemarks || '',
- deductAmount: item.deductAmount || 0,
- }
- this.check_status.forEach(tmp => {
- if (tmp.value === this.form.status) {
- this.form.statusStr = tmp.label
- }
- })
- //显示
- this.$refs.popup_form.open()
+ },
+ async clickCheck(item, status) {
+ this.form = {
+ id: item.id || '',
+ status: status,
+ statusStr: '',
+ checkImageList: item.checkImageList || [],
+ checkRemarks: item.checkRemarks || '',
+ deductAmount: item.deductAmount || 0,
+ }
+ this.check_status.forEach(tmp => {
+ if (tmp.value === this.form.status) {
+ this.form.statusStr = tmp.label
+ }
+ })
+ //显示
+ this.$refs.popup_form.open()
- },
- async submitCheck() {
- if (isNaN(parseFloat(this.form.deductAmount)) || this.form.deductAmount < 0) {
- this.$message.showToast('扣款金额需要大于等于0')
- return
- }
- this.$message.showLoading()
- const {
- code
- } = await this.$http.request('get', '/api/delivery/list/view/check', {
- data: {
- ...this.form
- }
- })
- this.$message.hideLoading()
- if (code === 0) {
- this.$message.showToast('操作成功')
- this.$refs.popup_form.close()
- setTimeout(() => {
- this.init()
- }, 200)
- }
- },
- async init() {
- this.$message.showLoading()
- const {
- data
- } = await this.$http.request('get', '/api/delivery/list/view?id=' + this.id, {})
+ },
+ async submitCheck() {
+ if (isNaN(parseFloat(this.form.deductAmount)) || this.form.deductAmount < 0) {
+ this.$message.showToast('扣款金额需要大于等于0')
+ return
+ }
+ this.$message.showLoading()
+ const {
+ code
+ } = await this.$http.request('post', '/api/delivery/list/view/check', {
+ data: {
+ ...this.form,
+ deductAmount: parseFloat(this.form.deductAmount) || 0
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ this.$message.showToast('操作成功')
+ this.$refs.popup_form.close()
+ setTimeout(() => {
+ this.init()
+ }, 200)
+ }
+ },
+ async init() {
+ this.$message.showLoading()
+ const {
+ data
+ } = await this.$http.request('get', '/api/delivery/list/view?id=' + this.id, {})
- this.$message.hideLoading()
- if (data) {
- this.dto = {
- ...this.dto,
- ...data
- }
- }
- },
- deleteCheckImage(index) {
- this.form.checkImageList.splice(index, 1)
- },
- uploadCheckImage() {
- let that = this
- uni.chooseImage({
- count: 1, // 最多可以选择的图片张数,默认9
- sizeType: ['compressed'], //original 原图,compressed 压缩图,默认二者都有
- sourceType: ['camera', 'album'], //album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
- success: function (res) {
- let errMsg = res.errMsg
- let tempFiles = res.tempFiles
- if (errMsg === 'chooseImage:ok') {
- if (tempFiles[0].size > 1024 * 1024 * 5) {
- that.$message.confirm('图片最多支持5M大小,超出大小限制')
- return
- }
- that.$message.showLoading()
- that.$http.upload(tempFiles[0].path).then(async res => {
- console.log('res1', res)
- var pic = res.data && res.data.length > 0 && res.data[
- 0]
- .url || ''
- that.$message.hideLoading()
- that.form.checkImageList.push(pic)
- that.$forceUpdate()
- }).catch(res => {
- that.$message.hideLoading()
- console.error(res)
- })
- }
- }
- })
- }
- }
-}
+ this.$message.hideLoading()
+ if (data) {
+ this.dto = {
+ ...this.dto,
+ ...data
+ }
+ }
+ },
+ deleteCheckImage(index) {
+ this.form.checkImageList.splice(index, 1)
+ },
+ uploadCheckImage() {
+ let that = this
+ uni.chooseImage({
+ count: 1, // 最多可以选择的图片张数,默认9
+ sizeType: ['compressed'], //original 原图,compressed 压缩图,默认二者都有
+ sourceType: ['camera', 'album'], //album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
+ success: function(res) {
+ let errMsg = res.errMsg
+ let tempFiles = res.tempFiles
+ if (errMsg === 'chooseImage:ok') {
+ if (tempFiles[0].size > 1024 * 1024 * 5) {
+ that.$message.confirm('图片最多支持5M大小,超出大小限制')
+ return
+ }
+ that.$message.showLoading()
+ that.$http.upload(tempFiles[0].path).then(async res => {
+ console.log('res1', res)
+ var pic = res.data && res.data.length > 0 && res.data[
+ 0]
+ .url || ''
+ that.$message.hideLoading()
+ that.form.checkImageList.push(pic)
+ console.log('form', that.form)
+ that.$forceUpdate()
+ }).catch(res => {
+ that.$message.hideLoading()
+ console.error(res)
+ })
+ }
+ }
+ })
+ }
+ }
+ }
</script>
<template>
- <view class="delivery-detail-page">
- <view v-if="dto.id">
- <view class="delivery-info flex">
- <view class="flex1 desc">
- <view>供货商名称:{{ dto.stationName }}</view>
- <view>订单号:{{ dto.orderNo }}</view>
- <view>供货商备注:{{ dto.arriveRemarks }}</view>
- </view>
- <view class="m-l-15 m-r-0 station">
- <view>{{ dto.stationName }}</view>
- </view>
- </view>
- <view v-for="(item,index) of dto.items" :key="index" class="delivery-order-item m-t-12">
- <view class="flex">
- <image class="flower-img img100 m-r-6" :src="item.flowerCover" @click="previewImg(item.flowerCover)">
- </image>
- <view class="flex1">
- <view class=" flex">
- <view class="title">{{ item.flowerName }}<span class="level">{{ item.flowerLevelStr }}</span></view>
- </view>
- <view class="each-list">
- <view class="each-item">
- <view class="label">颜色</view>
- <view class="value">{{ item.flowerColor || '-' }}</view>
+ <view class="delivery-detail-page bg-white p20">
+ <view v-if="dto.id">
+ <view class="delivery-info flex">
+ <view class="flex1 desc">
+ <view>供货商名称:{{ dto.stationName }}</view>
+ <view>订单号:{{ dto.orderNo }}</view>
+ <view>供货商备注:{{ dto.arriveRemarks }}</view>
+ </view>
+ <view class="m-l-15 m-r-0 station">
+ <view>{{ dto.stationName }}</view>
+ </view>
+ </view>
+ <view v-for="(item,index) of dto.items" :key="index" class="delivery-order-item m-t-12">
+ <view class="flex">
+ <image class="flower-img img100 m-r-6" :src="item.flowerCover"
+ @click="previewImg(item.flowerCover)">
+ </image>
+ <view class="flex1">
+ <view class=" flex">
+ <view class="title">{{ item.flowerName }}<span
+ class="level">{{ item.flowerLevelStr }}</span></view>
+ </view>
+ <view class="each-list">
+ <view class="each-item">
+ <view class="label">颜色</view>
+ <view class="value">{{ item.flowerColor || '-' }}</view>
- </view>
- <view class="each-item">
- <view class="label">规格</view>
- <view class="value">{{ item.flowerUnit || '-' }}</view>
- </view>
- <view class="each-item">
- <view class="label">数量</view>
- <view class="value">{{ item.num || 0 }}</view>
+ </view>
+ <view class="each-item">
+ <view class="label">规格</view>
+ <view class="value">{{ item.flowerUnit || '-' }}</view>
+ </view>
+ <view class="each-item">
+ <view class="label">数量</view>
+ <view class="value">{{ item.num || 0 }}</view>
- </view>
- <view class="each-item">
- <view class="label">价格</view>
- <view class="value">{{ item.price || '-' }}</view>
- </view>
- </view>
- </view>
- </view>
- <view class="line-gray">
+ </view>
+ <view class="each-item">
+ <view class="label">价格</view>
+ <view class="value">{{ item.price || '-' }}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="line-gray">
- </view>
- <view class="buttons">
- <view class="button" v-for="button of check_status" :key="check_status.value"
- @click.stop="clickCheck(item,button.value)">{{ button.label }}
- </view>
- </view>
- </view>
- </view>
+ </view>
+ <view class="buttons">
+ <view class="button text-center" v-for="button of check_status" :key="button.value"
+ @click.stop="clickCheck(item,button.value)">{{ button.label }}
+ </view>
+ </view>
+ </view>
+ </view>
- <uni-popup ref="popup_form" type="top" :mask-click="false">
- <view class="popup-check-form">
- <view class="close-parent">
- 质检操作-{{ form.statusStr || '-' }}
- <uni-icons class="close" type="closeempty" @click="closeCheckForm"></uni-icons>
- </view>
- <view class="submit form">
- <view class="form-item">
- <view class="form-item-label require">
- 质检备注
- </view>
- <view class="form-item-value">
- <input v-model="form.checkRemarks" placeholder="请输入质检备注" class="form-input"></input>
- </view>
- </view>
- <view class="form-item">
- <view class="form-item-label require">
- 扣款金额
- </view>
- <view class="form-item-value">
- <input v-model="form.deductAmount" placeholder="请输入扣款金额" type="digit" class="form-input"></input>
+ <uni-popup ref="popup_form" type="top" :mask-click="false">
+ <view class="popup-check-form">
+ <view class="close-parent">
+ 质检操作-{{ form.statusStr || '-' }}
+ <uni-icons class="close" type="closeempty" @click="closeCheckForm"></uni-icons>
+ </view>
+ <view class="submit form">
+ <view class="form-item">
+ <view class="form-item-label require">
+ 质检备注
+ </view>
+ <view class="form-item-value">
+ <input v-model="form.checkRemarks" placeholder="请输入质检备注" class="form-input"></input>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label require">
+ 扣款金额
+ </view>
+ <view class="form-item-value">
+ <input v-model="form.deductAmount" placeholder="请输入扣款金额" type="digit"
+ class="form-input"></input>
- </view>
- </view>
- <view class="form-item">
- <view class="form-item-label require">
- 图片
- </view>
- <view class="form-item-value">
- <u-button type="text" @click="uploadCheckImage()">上传</u-button>
- </view>
- </view>
- <view class="flex p20"
- v-if="form.checkImageList&&form.checkImageList.length>0">
- <view class="m-t-12 m-r-10 " v-for="(timg,index) of dto.checkImageList" :key="index">
- <image class="check-img" :src="timg" @click.stop="previewImg(timg)">
- </image>
- <view class="t-red text-center" @click.stop="deleteCheckImage(index)">删除</view>
- </view>
- </view>
- </view>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label require">
+ 图片
+ </view>
+ <view class="form-item-value m-l-a m-r-0">
+ <view class="t-red" @click="uploadCheckImage()">上传</view>
+ </view>
+ </view>
+ <view class="flex p20" v-if="form.checkImageList&&form.checkImageList.length>0">
+ <view class="m-t-12 m-r-10 " v-for="(timg,index) of form.checkImageList" :key="index">
+ <image class="check-img" :src="timg" @click.stop="previewImg(timg)">
+ </image>
+ <view class="t-red text-center" @click.stop="deleteCheckImage(index)">删除</view>
+ </view>
+ </view>
+ </view>
- <view class="button-green m-t-15" @click="submitCheck">提交</view>
- </view>
- </uni-popup>
- </view>
+ <view class="button-green m-t-15" @click="submitCheck">提交</view>
+ </view>
+ </uni-popup>
+ </view>
</template>
<style lang="scss" scoped>
-.delivery-detail-page {
- .delivery-order-item {
- .title {
- font-weight: 600;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
+ .delivery-detail-page {
+ .delivery-order-item {
+ .title {
+ font-weight: 600;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
- .level {
- font-weight: 400;
- font-size: 28rpx;
- color: #20613D;
- line-height: 40rpx;
- margin-left: 20rpx;
- }
- }
+ .level {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #20613D;
+ line-height: 40rpx;
+ margin-left: 20rpx;
+ }
+ }
- .buttons {
- display: flex;
+ .buttons {
+ display: flex;
- .button {
- margin: 0 auto;
- width: 98rpx;
- line-height: 48rpx;
- border-radius: 24rpx;
- border: 2rpx solid #CECECE;
- text-align: center;
- font-size: 24rpx;
- color: #666666;
- line-height: 34rpx;
- }
- }
+ .button {
+ margin: 0 auto;
+ width: 98rpx;
+ line-height: 48rpx;
+ border-radius: 24rpx;
+ border: 2rpx solid #CECECE;
+ text-align: center;
+ font-size: 24rpx;
+ color: #666666;
+ line-height: 34rpx;
+ }
+ }
- .flower-img {
- width: 128rpx;
- height: 118rpx;
- min-width: 128rpx;
- min-height: 118rpx;
- }
+ .flower-img {
+ width: 128rpx;
+ height: 118rpx;
+ min-width: 128rpx;
+ min-height: 118rpx;
+ }
- .each-list {
- display: flex;
- flex-wrap: wrap;
- margin-top: 6rpx;
+ .each-list {
+ display: flex;
+ flex-wrap: wrap;
+ margin-top: 6rpx;
- .each-item {
- min-width: 30%;
- max-width: 40%;
- text-align: center;
- margin-left: 0rpx;
- margin-right: auto;
- display: flex;
+ .each-item {
+ min-width: 30%;
+ max-width: 40%;
+ text-align: center;
+ margin-left: 0rpx;
+ margin-right: auto;
+ display: flex;
- .label {
- font-weight: 400;
- font-size: 24rpx;
- color: #666666;
- text-align: left;
- padding-right: 10rpx;
- }
+ .label {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ text-align: left;
+ padding-right: 10rpx;
+ }
- .label::after {
- content: ": "
- }
+ .label::after {
+ content: ": "
+ }
- .value {
- font-weight: 400;
- font-size: 24rpx;
- color: #666666;
- }
- }
- }
- }
+ .value {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ }
+ }
+ }
+ }
- .popup-check-form {
- background: #FFFFFF;
- border-radius: 16rpx;
- // width: 690rpx;
- height: 882rpx;
- margin-top: 120rpx;
- margin-left: 30rpx;
- margin-right: 30rpx;
- padding: 24rpx 36rpx;
+ .popup-check-form {
+ background: #FFFFFF;
+ border-radius: 16rpx;
+ // width: 690rpx;
+ height: 882rpx;
+ margin-top: 120rpx;
+ margin-left: 30rpx;
+ margin-right: 30rpx;
+ padding: 24rpx 36rpx;
- .check-img {
- width: 96rpx;
- height: 96rpx;
- border-radius: 4rpx;
- border: 2rpx dashed #CECECE;
- }
+ .check-img {
+ width: 96rpx;
+ height: 96rpx;
+ border-radius: 4rpx;
+ border: 2rpx dashed #CECECE;
+ }
- .submit {
- margin-top: 30rpx;
+ .submit {
+ margin-top: 30rpx;
- .form-input {
- height: 36rpx;
- line-height: 36rpx;
- }
- }
- }
+ .form-input {
+ height: 36rpx;
+ line-height: 36rpx;
+ }
+ }
+ }
- .delivery-info {
- padding: 20rpx;
+ .delivery-info {
+ padding: 20rpx;
- .desc {
- font-weight: 400;
- font-size: 28rpx;
- color: #666666;
- line-height: 40rpx;
- }
+ .desc {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #666666;
+ line-height: 40rpx;
+ }
- .station {
- height: 50rpx;
- background: #C6E8D4;
- border-radius: 4rpx;
- padding-left: 20rpx;
- padding-right: 20rpx;
- min-width: 110rpx;
+ .station {
+ height: 50rpx;
+ background: #C6E8D4;
+ border-radius: 4rpx;
+ padding-left: 20rpx;
+ padding-right: 20rpx;
+ min-width: 110rpx;
- line-height: 50rpx;
- }
- }
-}
+ line-height: 50rpx;
+ }
+ }
+ }
</style>
\ No newline at end of file
diff --git a/sub_pages/partner/delivery/delivery-home.vue b/sub_pages/partner/delivery/delivery-home.vue
new file mode 100644
index 0000000..19a83aa
--- /dev/null
+++ b/sub_pages/partner/delivery/delivery-home.vue
@@ -0,0 +1,143 @@
+<template>
+ <view class="main-container user-container">
+
+ <view class="top-bg img100 relative" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }">
+ <image class="component-bg"
+ src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png"
+ mode="scaleToFill" />
+
+ <view class="title" style="position: relative;">
+ 个人中心
+
+ </view>
+ <view class="flex user-info">
+ <!-- 头像 -->
+
+ <image class="user-icon" v-if="currentInfo.picture
+ ||currentInfo.customerDTO&¤tInfo.customerDTO.cover
+ ||currentInfo.supplierDTO&¤tInfo.supplierDTO.cover
+ " :src="currentInfo.picture
+ ||currentInfo.customerDTO&¤tInfo.customerDTO.cover
+ ||currentInfo.supplierDTO&¤tInfo.supplierDTO.cover" mode="aspectFit"></image>
+ <image class="user-icon" v-else
+ src='https://youzhen123.oss-cn-huhehaote.aliyuncs.com/WechatOwnerProperty/images/mrtx.png'
+ mode="aspectFit"></image>
+
+ <view class="name" v-if="currentInfo.id">
+ <view class="t1">
+ {{
+ (!!currentInfo.supplierDTO ? (currentInfo.supplierDTO.name) : "") || (!!currentInfo.customerDTO ? (currentInfo.customerDTO.name) : "") || currentInfo.nickName || currentInfo.loginName || '-'
+ }}<span v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'">
+ ({{ currentInfo.supplierDTO ? currentInfo.supplierDTO.statusStr : '' }})</span>
+ </view>
+ <view class="t2">{{ currentInfo.tel || '暂无电话' }}</view>
+ </view>
+ <view class="name" v-if="!currentInfo.id" open-type="getUserInfo" @click.stop="toCustomerLogin"
+ style="font-size: 48rpx;margin-top: 16rpx;">
+ {{ '点击登陆' }}
+ </view>
+ <image class="icon-setting" src="../../static/common/icon-setting.png" mode="aspectFit"></image>
+ </view>
+ </view>
+
+ <view class="user-utils m-20">
+ <view class="user-util m-t-12 flex" @click="goto('/sub_pages/partner/delivery/delivery',true)">
+ <view class="title">质检列表</view>
+ <view class="right-icon">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+ <view class="user-util m-t-12 flex" @click="goto('/pages/user/user-pwd/user-pwd',true)">
+ <view class="title">修改密码</view>
+ <view class="right-icon">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+
+ <view class="user-util m-t-12 " v-if="selftype==='supplier'||selftype==='customer' || !selftype">
+ <view class="title">我的客服</view>
+ <view class="flex">
+ <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image>
+ <view class="name" @click="callTel">
+ 客服电话 : <span class="topic-gray">{{ tel }}</span>
+ </view>
+ <view class="right-icon" open-type="contact">
+ <uni-icons type="right"></uni-icons>
+ </view>
+ </view>
+ </view>
+ </view>
+
+
+ <view class="button-login-out topic-gray" @click="clearlogout">
+ 退出登录
+ </view>
+
+
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ CustomBar: uni.getStorageSync('CustomBar'),
+ StatusBar: uni.getStorageSync('StatusBar'),
+ tcode: '',
+ inviterName: '',
+ // StatusBar:0,
+ tel: '15974805814',
+ tj: {},
+ cacheUserId: '',
+
+ };
+ },
+ // watch: {
+ // currentInfo(nv, ov) {
+ // if (!cacheUserId) {
+
+ // }
+ // }
+ // },
+ onShow() {},
+ onLoad(options) {
+ // const url = options.q ? decodeURIComponent(options.q) : '';
+ // const urlcode = options.url && decodeURIComponent(options.url) || ''
+
+
+
+ },
+ created() {
+
+ },
+ async onPullDownRefresh() {
+ await this.$store.dispatch('getCurrentInfo')
+ uni.stopPullDownRefresh()
+ },
+ methods: {
+
+
+ async clearlogout() {
+ await this.$message.confirm('是否退出登录?')
+ this.$store.commit('updateLogin', false)
+
+ uni.reLaunch({
+ url: '/pages/login/supplier-login'
+ })
+ },
+ async callTel() {
+ await this.$message.confirm('是否拨打客服电话')
+ uni.makePhoneCall({
+ phoneNumber: this.tel //仅为示例
+ });
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "@/pages/user/user.scss";
+</style>
+
+<style lang="scss" scoped>
+</style>
\ No newline at end of file
diff --git a/sub_pages/partner/delivery/delivery.vue b/sub_pages/partner/delivery/delivery.vue
index 582518e..771a62f 100644
--- a/sub_pages/partner/delivery/delivery.vue
+++ b/sub_pages/partner/delivery/delivery.vue
@@ -1,207 +1,255 @@
<script>
-export default {
- data() {
- return {
- query: {
- supplierName: '',
- stationId: '',
- stationName: '',
- statusStr:'',
- status:'',
- },
- show_select_station: false,
- show_select_status: false,
+ export default {
+ data() {
+ return {
+ query: {
+ supplierName: '',
+ stationId: '',
+ stationName: '',
+ statusStr: '',
+ status: '',
+ },
+ show_select_station: false,
+ show_select_status: false,
- columns_station: [],
- status_columns:[],
- }
- },
- onLoad() {
- this.listApi = '/api/delivery/list/today'
- this.getList()
- this.$http.request('get', '/api/station/list', {
- params: {}
- }).then(res => {
- var data = res.data
- this.columns_station = [data || []]
- })
- this.$http.request('get', '/api/code/value', {
- params: {
- type: 'DELIVERY_ORDER_STATUS'
- }
- }).then(res => {
- var data = res.data
- this.status_columns = [data || []]
- this.status_columns[0].unshift({
- label: '全部',
- value: ''
- })
- })
+ columns_station: [],
+ status_columns: [],
+ }
+ },
+ onLoad() {
+ this.listApi = '/api/delivery/list'
+ this.getList()
+ this.$http.request('get', '/api/station/list', {
+ params: {}
+ }).then(res => {
+ var data = res.data
+ this.columns_station = [data || []]
+ })
+ this.$http.request('get', '/api/code/value', {
+ params: {
+ type: 'DELIVERY_ORDER_STATUS'
+ }
+ }).then(res => {
+ var data = res.data
+ this.status_columns = [data || []]
+ this.status_columns[0].unshift({
+ label: '全部',
+ value: ''
+ })
+ })
- },
- onReachBottom() {
- this.page.current += 1
- this.getMore()
- },
- async onPullDownRefresh() {
- this.page.current = 1
- await this.getList()
- uni.stopPullDownRefresh()
- },
- methods: {
- select_station(e) {
- this.show_select_station = false
- this.query.stationName = e.value[0].name
- this.query.stationId = e.value[0].id
- this.refreshList()
- },
- select_status(e) {
- this.show_select_status = false
- this.query.statusStr = e.value[0].name
- this.query.status = e.value[0].id
- this.refreshList()
- },
- toDetail(item) {
- uni.navigateTo({
- url: `/sub_pages/partner/delivery/delivery-detail?id=${item.id}`
- })
- },
- async compelete(item) {
- await this.$message.confirm("是否完成此单质检")
+ },
+ onReachBottom() {
+ this.page.current += 1
+ this.getMore()
+ },
+ async onPullDownRefresh() {
+ this.page.current = 1
+ await this.getList()
+ uni.stopPullDownRefresh()
+ },
+ methods: {
+ buttonSearchFlow() {
+ this.refreshList()
+ },
+ select_station(e) {
+ this.show_select_station = false
+ this.query.stationName = e.value[0].name
+ this.query.stationId = e.value[0].id
+ this.refreshList()
+ },
+ select_status(e) {
+ this.show_select_status = false
+ this.query.statusStr = e.value[0].name
+ this.query.status = e.value[0].id
+ this.refreshList()
+ },
+ toDetail(item) {
+ uni.navigateTo({
+ url: `/sub_pages/partner/delivery/delivery-detail?id=${item.id}`
+ })
+ },
+ async compelete(item) {
+ await this.$message.confirm("是否完成此单质检")
- const {code, data} = this.$http.request('get', '/api/delivery/list/view/complete', {
- params: {
- id: item.id
- }
- })
- if (code === 0) {
- this.$message.showToast('完成成功')
- setTimeout(() => {
- this.refreshList()
- }, 200)
- }
- }
- }
-}
+ const {
+ code,
+ data
+ } = this.$http.request('get', '/api/delivery/list/view/complete', {
+ params: {
+ id: item.id
+ }
+ })
+ if (code === 0) {
+ this.$message.showToast('完成成功')
+ let tmp = this
+ setTimeout(() => {
+ tmp.refreshList()
+ }, 200)
+ }
+ }
+ }
+ }
</script>
<template>
- <!-- 列表页面 -->
- <view class="page-delivery">
- <view class="p15" style="min-height: calc(100vh - 260rpx);">
- <view class="search-container m-t-12 flex">
- <view class="flex1 input">
- <u-input placeholder="请输入花名" v-model="search_flow">
- <template slot="suffix">
- <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons>
- </template>
- </u-input>
- </view>
- </view>
- <view class="component-filter-container">
- <view class="flex1" @click="show_select_status=true">
- 配送单状态:{{ query.statusStr || '全部' }}
- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
- </view>
+ <!-- 列表页面 -->
+ <view class="page-delivery">
+ <view class="p15" style="min-height: calc(100vh - 260rpx);">
+ <view class="search-container m-t-12 flex">
+ <view class="flex1 input">
+ <u-input placeholder="请输入供应商名称" v-model="query.supplierName">
+ <template slot="suffix">
+ <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons>
+ </template>
+ </u-input>
+ </view>
+ </view>
+ <view class="component-filter-container p20 bg-white">
+ <view class="flex1" @click="show_select_status=true">
+ 配送单状态:{{ query.statusStr || '全部' }}
+ <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
+ </view>
- <view class="flex1" @click="show_select_station=true">
- 集货站:{{ query.stationName || '全部' }}
- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
- </view>
- </view>
+ <view class="flex1" @click="show_select_station=true">
+ 集货站:{{ query.stationName || '全部' }}
+ <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
+ </view>
+ </view>
- <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
- <view v-for="(item,index) in list" :key="index" class="m-b-24">
- <view class="delivery-item">
- <view class="title">{{ item.supplierName }}</view>
- <view class="line-gray"></view>
- <view class="form-item">
- <view class="form-item-label">订单单号:</view>
- <view class="form-item-value">{{ item.orderNo || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">集货站名称:</view>
- <view class="form-item-value">{{ item.stationName || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">配送单状态:</view>
- <view class="form-item-value">{{ item.levelStr || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">送达时间</view>
- <view class="form-item-value">{{ item.arriveTime || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">供货总数</view>
- <view class="form-item-value">{{ item.totalNum || '-' }}</view>
- </view>
- <view class="line-gray"></view>
- <view class="flex">
- <view class="button button-2 m-l-a m-r-0" @click="toDetail(item)">前往质检</view>
- <view class="button button-1 m-l-15 m-r-0" @click="compelete(item)">质检完成</view>
- </view>
- </view>
- </view>
- </view>
+ <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
+ <view v-for="(item,index) in list" :key="index" class="m-b-24">
+ <view class="delivery-item bg-white br-4 p10">
+ <view class="title">供应商:{{ item.supplierName }}</view>
+ <view class="line-gray"></view>
+ <view class="form-item">
+ <view class="form-item-label">订单单号</view>
+ <view class="form-item-value">{{ item.orderNo || '-' }}</view>
+ </view>
+ <view class="flex">
+ <view class="form-item flex1">
+ <view class="form-item-label">集货站</view>
+ <view class="form-item-value">{{ item.stationName || '-' }}</view>
+ </view>
- <!-- 判断是否到底了,自动吧 -->
- <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
- <u-picker @confirm="select_station" keyName="name" @cancel="show_select_station=false"
- :show="show_select_station" :columns="columns_station"></u-picker>
- <u-picker @confirm="select_status" keyName="name" @cancel="show_select_status=false"
- :show="show_select_status" :columns="status_columns"></u-picker>
+ </view>
+ <view class="flex">
+ <view class="form-item flex1">
+ <view class="form-item-label">状态</view>
+ <view class="form-item-value">{{ item.statusStr || '-' }}</view>
+ </view>
+ <view class="form-item flex1">
+ <view class="form-item-label">供货总数</view>
+ <view class="form-item-value">{{ item.totalNum || '-' }}</view>
+ </view>
+ </view>
+ <view class="form-item flex1">
+ <view class="form-item-label">送达时间</view>
+ <view class="form-item-value">{{ item.arriveTime || '-' }}</view>
+ </view>
- </view>
+ <view class="line-gray" v-if="item.status==='ARRIVED'"></view>
+ <view class="flex buttons" v-if="item.status==='ARRIVED'">
+ <view class="button button-0 m-l-a m-r-0" @click="toDetail(item)">前往质检</view>
+ <view class="button button-1 m-l-15 m-r-0" @click="compelete(item)">质检完成</view>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <!-- 判断是否到底了,自动吧 -->
+ <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
+ <u-picker @confirm="select_station" keyName="name" @cancel="show_select_station=false"
+ :show="show_select_station" :columns="columns_station"></u-picker>
+ <u-picker @confirm="select_status" keyName="name" @cancel="show_select_status=false" :show="show_select_status"
+ :columns="status_columns"></u-picker>
+
+
+ </view>
</template>
<style lang="scss" scoped>
-.page-delivery {
- .delivery-item {
- .title {
- font-weight: 400;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
- }
+ .page-delivery {
+ .delivery-item {
+ .title {
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #000000;
+ line-height: 40rpx;
+ }
- .button {
- min-width: 122rpx;
- text-align: center;
- height: 48rpx;
- line-height: 48rpx;
- border-radius: 28rpx;
- border: 2rpx solid #20613D;
- font-size: 24rpx;
- color: #20613D;
- }
- }
+ .form-item {
+ line-height: 40rpx;
+ font-size: 28rpx;
+ color: #666;
+ display: flex;
- .search-container {
- display: flex;
- margin: 12rpx 0rpx 20rpx 0rpx;
- position: relative;
- z-index: 1;
+ .form-item-label {
+ min-width: 120rpx;
+ }
- .input {
- // flex: 1;
- // max-width: 400rpx;
- background-color: #fff !important;
- // line-height: 58rpx;
- // height: 58rpx;
- border-radius: 8rpx;
- }
+ .form-item-label::after {
+ content: ":";
+ margin-right: 20rpx;
+ }
+ }
- .button {
- min-width: 120rpx;
- max-width: 120rpx;
- margin-left: auto;
- margin-right: 0rpx;
- text-align: right;
- line-height: 70rpx !important;
- // height: 58rpx !important;
- // display: flex;
- }
- }
-}
+ .buttons {
+ display: flex;
+ margin-left: auto;
+ width: fit-content;
+ .button {
+ // width: 216rpx;
+ padding: 10rpx 20rpx;
+ line-height: 34rpx;
+ font-size: 24rpx;
+ height: 34rpx;
+ background: #20613D;
+ text-align: center;
+ border-radius: 30rpx;
+
+ }
+
+ .button-1 {
+ background: #fff;
+ color: #333;
+ border: 2rpx solid #333;
+
+ }
+
+ .button-0 {
+ color: #fff;
+ border: 2rpx solid #20613D;
+ }
+ }
+ }
+
+ .search-container {
+ display: flex;
+ margin: 12rpx 0rpx 20rpx 0rpx;
+ position: relative;
+ z-index: 1;
+
+ .input {
+ // flex: 1;
+ // max-width: 400rpx;
+ background-color: #fff !important;
+ // line-height: 58rpx;
+ // height: 58rpx;
+ border-radius: 8rpx;
+ }
+
+ .button {
+ min-width: 120rpx;
+ max-width: 120rpx;
+ margin-left: auto;
+ margin-right: 0rpx;
+ text-align: right;
+ line-height: 70rpx !important;
+ // height: 58rpx !important;
+ // display: flex;
+ }
+ }
+ }
</style>
\ No newline at end of file
diff --git a/sub_pages/partner/markup-config/markup-config.vue b/sub_pages/partner/markup-config/markup-config.vue
index 3da9ed6..83f25ca 100644
--- a/sub_pages/partner/markup-config/markup-config.vue
+++ b/sub_pages/partner/markup-config/markup-config.vue
@@ -1,227 +1,230 @@
<template>
- <view class="list-container markup-config">
- <view class="search-container m-t-12 flex">
- <view class="flex1 input">
- <u--input placeholder="请输入商品名称" v-model="query.name">
- </u--input>
- </view>
- <view class="button" @click="refreshList">搜索</view>
- </view>
- <view class="m-t-12">
- {{ !query.time && '请选择时间' || (query.time) }}
- </view>
+ <view class="list-container markup-config p20">
+ <view class="search-container m-t-12 flex">
+ <view class="flex1 input">
+ <u-input placeholder="请输入分类名称" v-model="query.name" clearable>
+ <template slot="suffix">
+ <uni-icons color="#20613D" type="search" size="24" @tap="refreshList"></uni-icons>
+ </template>
+ </u-input>
+ </view>
+ </view>
+
+<!-- <view class="m-t-12 text-center bg-white p10" @click="show_time_picker_time=true">
+ {{ !query.time && '请选择时间' || (query.time) }}
+ </view> -->
- <view class="p15" style="min-height: calc(100vh - 160rpx);">
- <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
- <view v-for="(item,index) in list" :key="index" class="m-b-24 markup-config-list list-container">
- <view class="markup-config-item list-item">
- <view class="title">
- 商品名称:{{ item.name || '-' }}
- </view>
- <u-divider></u-divider>
- <view class="form">
- <view class="form-item">
- <view class="form-item-label">分类</view>
- <view class="form-item-value">{{ item.categoryStr || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">规格</view>
- <view class="form-item-value">{{ item.unit || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">规格</view>
- <view class="form-item-value">{{ item.unit || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">重量</view>
- <view class="form-item-value">{{ item.weight || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">颜色</view>
- <view class="form-item-value">{{ item.color || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">级别</view>
- <view class="form-item-value">{{ item.levelStr || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">供应商价格</view>
- <view class="form-item-value">¥{{ item.price || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">加价金额</view>
- <view class="form-item-value">{{ item.fee || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">审核时间</view>
- <view class="form-item-value">{{ item.auditTime || '-' }}</view>
- </view>
- <view class="form-item">
- <view class="form-item-label">供应商名称</view>
- <view class="form-item-value">{{ item.supplierName || '-' }}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
+ <view class="p15" style="min-height: calc(100vh - 160rpx);">
+ <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
+ <view v-for="(item,index) in list" :key="index" class="m-b-24 markup-config-list list-container">
+ <view class="markup-config-item list-item">
+ <view class="title">
+ 商品名称:{{ item.name || '-' }}
+ </view>
+ <u-divider></u-divider>
+ <view class="form">
+ <view class="form-item">
+ <view class="form-item-label">分类</view>
+ <view class="form-item-value">{{ item.categoryStr || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">规格</view>
+ <view class="form-item-value">{{ item.unit || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">规格</view>
+ <view class="form-item-value">{{ item.unit || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">重量</view>
+ <view class="form-item-value">{{ item.weight || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">颜色</view>
+ <view class="form-item-value">{{ item.color || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">级别</view>
+ <view class="form-item-value">{{ item.levelStr || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">供应商价格</view>
+ <view class="form-item-value">¥{{ item.price || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">加价金额</view>
+ <view class="form-item-value">{{ item.fee || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">审核时间</view>
+ <view class="form-item-value">{{ item.auditTime || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="form-item-label">供应商名称</view>
+ <view class="form-item-value">{{ item.supplierName || '-' }}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
- <!-- 判断是否到底了,自动吧 -->
- <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
- <u-datetime-picker :show="show_time_picker_time" @cancel="show_time_picker_time=false"
- @confirm="select_time_picker_time" v-model="tmp_picker_time" mode="time"></u-datetime-picker>
+ <!-- 判断是否到底了,自动吧 -->
+ <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
+ <u-datetime-picker :show="show_time_picker_time" @cancel="show_time_picker_time=false"
+ @confirm="select_time_picker_time" v-model="tmp_picker_time" mode="datetime"></u-datetime-picker>
- </view>
+ </view>
</template>
<script>
-export default {
- data() {
- return {
- tabIndex: 0,
- query: {
- name: '',
- time: '',
- },
- show_time_picker_time: false,
- tmp_picker_time: new Date(),
+ export default {
+ data() {
+ return {
+ tabIndex: 0,
+ query: {
+ name: '',
+ time: '',
+ },
+ show_time_picker_time: false,
+ tmp_picker_time: new Date(),
- }
- },
- onLoad() {
- this.listApi = '/api/flower/markup/sp/list'
- this.getList()
+ }
+ },
+ onLoad() {
+ this.listApi = '/api/flower/markup/sp/list'
+ this.getList()
- },
- onReachBottom() {
- this.page.current += 1
- this.getMore()
- },
- async onPullDownRefresh() {
- this.page.current = 1
- await this.getList()
- uni.stopPullDownRefresh()
- },
- methods: {
- async select_time_picker_time(e) {
- var vv = e.value
- if (vv) {
- vv = vv.replace('aN:', '00:')
- }
- var time = new Date(`2023-8-21 ${vv}:00`)
- this.show_time_picker_time = false
- this.query.time = this.$util.toDateMinOnly(time)
- },
- toDetail(item) {
- // uni.navigateTo({
- // url: `/pages/notice/notice?id=${item.id}`
- // })
- }
- }
-}
+ },
+ onReachBottom() {
+ this.page.current += 1
+ this.getMore()
+ },
+ async onPullDownRefresh() {
+ this.page.current = 1
+ await this.getList()
+ uni.stopPullDownRefresh()
+ },
+ methods: {
+ async select_time_picker_time(e) {
+ console.log('select_time_picker_time', e)
+ var vv = e.value
+ if (vv) {
+ vv = vv.replace('aN:', '00:')
+ }
+ var time = new Date(`2023-8-21 ${vv}:00`)
+ this.show_time_picker_time = false
+ this.query.time = this.$util.toDateMinOnly(time)
+ },
+ toDetail(item) {
+ // uni.navigateTo({
+ // url: `/pages/notice/notice?id=${item.id}`
+ // })
+ }
+ }
+ }
</script>
<style lang="scss" scope>
-.list-container.markup-config {
- .search-container {
- display: flex;
- margin: 24rpx 30rpx 20rpx 30rpx;
+ .list-container.markup-config {
+ .search-container {
+ display: flex;
+ // margin: 24rpx 30rpx 20rpx 30rpx;
- .input {
- // flex: 1;
- // max-width: 400rpx;
- background-color: #fff !important;
- // line-height: 58rpx;
- // height: 58rpx;
- }
- .button {
- min-width: 120rpx;
- max-width: 120rpx;
- margin-left: auto;
- margin-right: 0rpx;
- text-align: right;
- line-height: 70rpx !important;
- // height: 58rpx !important;
- // display: flex;
- }
- }
+ .input {
+ // flex: 1;
+ // max-width: 400rpx;
+ background-color: #fff !important;
+ // line-height: 58rpx;
+ // height: 58rpx;
+ }
- .markup-config-list {
- .markup-config-item {
- margin-bottom: 20rpx;
- padding: 28rpx;
- background: #FFFFFF;
- border-radius: 8rpx;
+ .button {
+ min-width: 120rpx;
+ max-width: 120rpx;
+ margin-left: auto;
+ margin-right: 0rpx;
+ // text-align: right;
+ line-height: 70rpx !important;
+ // height: 58rpx !important;
+ // display: flex;
+ }
+ }
- .title {
- font-weight: 600;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
+ .markup-config-list {
+ .markup-config-item {
+ margin-bottom: 20rpx;
+ padding: 28rpx;
+ background: #FFFFFF;
+ border-radius: 8rpx;
- .status {
- font-weight: 400;
- font-size: 28rpx;
- color: #20613D;
- line-height: 40rpx;
- }
+ .title {
+ font-weight: 600;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
- .status.red {
- color: #CF0000;
- }
+ .status {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #20613D;
+ line-height: 40rpx;
+ }
- .status.green {
- color: var(--topiccolor);
- }
- }
+ .status.red {
+ color: #CF0000;
+ }
- .line {
- height: 2rpx solid #EEEEEE;
- margin-top: 16rpx;
- margin-bottom: 16rpx;
- }
+ .status.green {
+ color: var(--topiccolor);
+ }
+ }
- .tj {
- .label {
- font-weight: 600;
- font-size: 28rpx;
- color: #000000;
- line-height: 40rpx;
- }
+ .line {
+ height: 2rpx solid #EEEEEE;
+ margin-top: 16rpx;
+ margin-bottom: 16rpx;
+ }
- .value {
- font-weight: 400;
- font-size: 28rpx;
- color: #CF0000;
- line-height: 40rpx;
- }
- }
+ .tj {
+ .label {
+ font-weight: 600;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
+ }
- .form {
- display: flex;
- flex-wrap: wrap;
+ .value {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #CF0000;
+ line-height: 40rpx;
+ }
+ }
- .form-item {
- height: 40rpx;
- line-height: 40rpx;
- // padding-top: 4rpx;
- padding-bottom: 0rpx;
- border-bottom: none;
- min-width: 35%;
- max-width: 50%;
- flex: 1;
+ .form {
+ display: flex;
+ flex-wrap: wrap;
- .form-item-label {
- }
+ .form-item {
+ height: 40rpx;
+ line-height: 40rpx;
+ // padding-top: 4rpx;
+ padding-bottom: 0rpx;
+ border-bottom: none;
+ min-width: 35%;
+ max-width: 50%;
+ flex: 1;
- .form-item-value {
- }
- }
+ .form-item-label {}
- }
- }
+ .form-item-value {}
+ }
- }
-}
+ }
+ }
+
+ }
+ }
</style>
\ No newline at end of file
diff --git a/sub_pages/partner/order-manage/order-manage.vue b/sub_pages/partner/order-manage/order-manage.vue
index 66ea822..9d66fe8 100644
--- a/sub_pages/partner/order-manage/order-manage.vue
+++ b/sub_pages/partner/order-manage/order-manage.vue
@@ -72,7 +72,7 @@
}
},
onLoad() {
- this.listApi = `/api/partner/list`
+ this.listApi = `/api/partner/order/list`
this.getList()
},
diff --git a/sub_pages/supplier/order-sale/order-sale-detail.vue b/sub_pages/supplier/order-sale/order-sale-detail.vue
new file mode 100644
index 0000000..bbb1b4f
--- /dev/null
+++ b/sub_pages/supplier/order-sale/order-sale-detail.vue
@@ -0,0 +1,404 @@
+<script>
+ export default {
+ data() {
+ return {
+ id: '',
+ dto: {},
+ type: '',
+ // #ifdef PUB_CUSTOMER
+ type: 'customer',
+ // #endif
+ // #ifdef PUB_PARTNER
+ type: 'partner',
+ // #endif
+ };
+ },
+ async onLoad(options) {
+ console.log('options', options)
+ this.id = options.id || ''
+ if (this.id) {
+ await this.getDetail()
+ this.getItemList()
+ }
+ },
+ methods: {
+
+ async getDetail() {
+ this.$message.showLoading()
+ const {
+ code,
+ data
+ } = await this.$http.request('get', `/api/${this.type}/sales/list/view`, {
+ params: {
+ id: this.id
+ }
+ })
+ this.$message.hideLoading()
+ console.log('getDetail', data)
+ if (code === 0) {
+ this.dto = {
+ ...this.dto,
+ ...data,
+ items: data.items || []
+ }
+ }
+ },
+
+
+ },
+ }
+</script>
+
+<template>
+ <view class="order-detail-page">
+ <view class="address-container bg-white br-4 m-t-12">
+ <view class="flex">
+ <image src="/static/common/icon-loc.png" class="image m-r-10"></image>
+
+ <!-- <view class="icon-loc m-r-10">
+ <image src="/static/common/icon-loc.png" class="image"></image>
+ </view> -->
+ <view class="info">
+ <view class="title">
+ {{ dto.customer }}
+ <view class="tel">{{ dto.customerTel }}</view>
+ </view>
+ <view class="content">{{ dto.customerAddress }}</view>
+ </view>
+ </view>
+ </view>
+ <view class="flower-info m-b-20 m-t-12 br-4" v-for="(item,index) of dto.items" :key="index">
+ <view class="supplier-name ">
+ <image class="icon-dp" src="/static/common/icon-dp.png"></image>
+ {{ item.supplierName }}
+ </view>
+ <view class="flex m-t-12">
+ <image class="flower-img img100 m-r-6" :src="item.flowerCover" @click="previewImg(item.flowerCover)">
+ </image>
+ <view class="flex1">
+ <view class=" flex">
+ <view class="title"><span class="level">{{ item.flowerCategory }}</span><span
+ class="level">{{ item.flowerLevelStr }}</span>{{ item.flowerName }}
+ </view>
+ </view>
+ <view class="each-list">
+ <view class="each-item">
+ <view class="label">颜色</view>
+ <view class="value">{{ item.flowerColor || '-' }}</view>
+
+ </view>
+ <view class="each-item">
+ <view class="label">规格</view>
+ <view class="value">{{ item.flowerUnit || '-' }}</view>
+ </view>
+
+ <view class="each-item">
+ <view class="label">数量</view>
+ <view class="value">{{ item.num || 0 }}</view>
+
+ </view>
+ <view class="each-item">
+ <view class="label">售价</view>
+ <view class="value">¥{{ item.price || 0 }}</view>
+
+ </view>
+ <view class="each-item">
+ <view class="label">商品总金额</view>
+ <view class="value">¥{{ item.total || 0 }}</view>
+
+ </view>
+ <view class="each-item">
+ <view class="label">责任方</view>
+ <view class="value">{{ item.personInChargeStr || '-' }}</view>
+ </view>
+ <view class="each-item">
+ <view class="label">备注</view>
+ <view class="value">{{ item.remarks || '-' }}</view>
+ </view>
+ <view class="each-item">
+ <view class="label">赔付金额</view>
+ <view class="value t-red">¥{{ item.amount || '-' }}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ </view>
+
+ <view class="info-container bg-white br-4">
+ <view class="form-item">
+ <view class="label">订单编号:</view>
+ <view class="value">{{ dto.orderNo || '-' }}</view>
+ <view class="button m-l-a m-r-0" @click="copyTxt(dto.orderNo)">复制
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="label">状态:</view>
+ <view class="value">{{ dto.statusStr || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">订单金额:</view>
+ <view class="value">{{ dto.totalOrderAmount || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">理由:</view>
+ <view class="value">{{ dto.reason || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">提交人:</view>
+ <view class="value">{{ dto.createName || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">提交时间:</view>
+ <view class="value">{{ dto.createTime || '-' }}</view>
+ </view>
+ </view>
+
+ <view class="info-container bg-white br-4">
+
+ <view class="form-item">
+ <view class="label">售后单号:</view>
+ <view class="value">{{ dto.salesNo || '-' }}</view>
+ <view class="button m-l-a m-r-0" @click="copyTxt(dto.salesNo)">复制
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="label">审核时间:</view>
+ <view class="value">{{ dto.auditTime || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">审核状态:</view>
+ <view class="value">{{ dto.auditStatusStr || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">审核备注:</view>
+ <view class="value">{{ dto.auditRemarks || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">总赔付金额:</view>
+ <view class="value">{{ dto.totalAmount || '-' }}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">转账状态:</view>
+ <view class="value">{{ dto.transferStatusStr || '-' }}</view>
+ </view>
+
+ </view>
+
+
+
+ </view>
+</template>
+
+<style lang="scss" scoped>
+ .order-detail-page {
+ background: #F7F7F7;
+ padding: 30rpx;
+
+ .info-container {
+ .button-space {
+ min-height: 140rpx;
+ }
+
+ .icon-kf {
+ width: 44rpx;
+ height: 44rpx;
+ }
+
+ .icon-call {
+ width: 32rpx;
+ height: 32rpx;
+ }
+
+ .icon-view {
+ line-height: 40rpx;
+
+ .icon {
+ display: inline-block;
+ vertical-align: middle;
+ }
+ }
+
+ .buttons-bottom {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ height: 120rpx;
+
+ .button {
+ border-radius: 42rpx;
+ border: 2rpx solid #CECECE;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #999999;
+ text-align: center;
+ line-height: 76rpx;
+ }
+
+ .button-1 {}
+ }
+ }
+
+ .info-container {
+ padding: 28rpx;
+
+ .form-item {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #666666;
+ line-height: 60rpx;
+ display: flex;
+
+ .label {
+ min-width: 140rpx;
+ margin-right: 20rpx;
+ }
+
+ .value {
+ word-break: break-all;
+ }
+ }
+
+ .line {
+ height: 2rpx solid #EEEEEE;
+ }
+ }
+
+ .top-tip {
+ .icon-car {
+ width: 52rpx;
+ height: 52rpx;
+ }
+ }
+
+ .address-container {
+ padding: 28rpx;
+.image {
+ // background-color: #20613D;
+ border-radius: 50%;
+ margin-top: 8rpx;
+ margin-left: 8rpx;
+ width: 32rpx;
+ height: 32rpx;
+ // padding: 8rpx;
+ }
+ // .icon-loc {
+ // width: 48rpx;
+ // height: 48rpx;
+ // background: #20613D;
+ // border-radius: 50%;
+
+ // .image {
+ // margin-top: 8rpx;
+ // margin-left: 8rpx;
+ // width: 32rpx;
+ // height: 32rpx;
+ // }
+ // }
+
+ .info {
+ .title {
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #000000;
+ line-height: 44rpx;
+
+ .tel {
+ display: inline-block;
+ margin-left: 20rpx;
+ }
+ }
+
+ .content {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
+ }
+
+ }
+ }
+
+ .flower-info {
+ padding: 28rpx;
+
+ background: #FFFFFF;
+ border-radius: 8rpx;
+
+ .supplier-name {
+ border-bottom: 2rpx solid #EEEEEE;
+ font-weight: 600;
+ font-size: 28rpx;
+ color: #000000;
+ padding-bottom: 10rpx;
+ line-height: 40rpx;
+
+ .icon-dp {
+ width: 27rpx;
+ height: 27rpx;
+ display: inline-block;
+ vertical-align: middle;
+ }
+ }
+
+ .title {
+ font-weight: 600;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
+
+ .level {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #20613D;
+ line-height: 40rpx;
+ margin-right: 20rpx;
+ }
+ }
+
+ .flower-img {
+ width: 128rpx;
+ height: 118rpx;
+ min-width: 128rpx;
+ min-height: 118rpx;
+ }
+
+ .each-list {
+ display: flex;
+ flex-wrap: wrap;
+ margin-top: 6rpx;
+
+ .each-item {
+ min-width: 30%;
+ max-width: 40%;
+ text-align: center;
+ margin-left: 0rpx;
+ margin-right: auto;
+ display: flex;
+
+ .label {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ text-align: left;
+ padding-right: 10rpx;
+ }
+
+ .label::after {
+ content: ": "
+ }
+
+ .value {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ }
+ }
+ }
+
+ }
+
+ }
+</style>
\ No newline at end of file
diff --git a/sub_pages/supplier/order-sale/order-sale.vue b/sub_pages/supplier/order-sale/order-sale.vue
index 6580a9d..2306b7f 100644
--- a/sub_pages/supplier/order-sale/order-sale.vue
+++ b/sub_pages/supplier/order-sale/order-sale.vue
@@ -1,12 +1,13 @@
<template>
<view class="list-container order-sale supplier">
-<!-- <view class="component-tab-container m-t-12">
+ <!-- <view class="component-tab-container m-t-12">
<view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view>
<view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view>
</view> -->
<view class="p15" style="min-height: calc(100vh - 160rpx);">
<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
- <view v-for="(item,index) in list" :key="index" class="m-b-24 order-sale-list list-container">
+ <view v-for="(item,index) in list" :key="index" @click="toDetail(item)"
+ class="m-b-24 order-sale-list list-container">
<view class="order-sale-item br-4 list-item bg-white">
<view class="title flex">
<view>售后单号:{{item.salesNo}}</view>
@@ -37,14 +38,14 @@
<view class="label">联系方式</view>
<view class="value">{{item.customerTel}}</view>
</view>
- </view>
+ </view>
<view class="form-item">
<view class="label">提交人</view>
- <view class="value">{{item.createName}}</view>
+ <view class="value">{{item.createName}}</view>
</view>
<view class="form-item width100">
<view class="label">提交时间</view>
- <view class="value">{{item.createTime}}</view>
+ <view class="value">{{item.createTime}}</view>
</view>
<view class="form-item">
<view class="label">理由</view>
@@ -91,9 +92,9 @@
}
},
toDetail(item) {
- // uni.navigateTo({
- // url: `/pages/notice/notice?id=${item.id}`
- // })
+ uni.navigateTo({
+ url: `/sub_pages/supplier/order-sale/order-sale-detail?id=${item.id}`
+ })
}
}
}
diff --git a/sub_pages/supplier/order-settlement/order-settlement-detail.vue b/sub_pages/supplier/order-settlement/order-settlement-detail.vue
new file mode 100644
index 0000000..e2defe2
--- /dev/null
+++ b/sub_pages/supplier/order-settlement/order-settlement-detail.vue
@@ -0,0 +1,225 @@
+<template>
+ <view class="list-container order-sale supplier p20">
+ <view class="m-b-24 order-sale-list list-container">
+ <view class="order-sale-item br-4 m-t-12 list-item bg-white">
+ <view class="title flex">
+ <view class="title">
+ <image src="/static/common/icon-date.png" class="icon-date m-r-10 image"></image>
+ 转账日期:{{dto.createTime}}
+ </view>
+ </view>
+ <view class="line"></view>
+ <view class="form">
+ <view class="flex">
+ <view class="form-item flex1">
+ <view class="label">结算单价/均价</view>
+ <view class="value">¥{{dto.price||'0.00'}}</view>
+ </view>
+ <view class="form-item flex1">
+ <view class="label">商品数量</view>
+ <view class="value">{{dto.flowerNum||0}}</view>
+ </view>
+ </view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">订单数量</view>
+ <view class="value">{{dto.orderNum}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">买家数量</view>
+ <view class="value">{{dto.customerNum}}</view>
+ </view>
+ </view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">服务费</view>
+ <view class="value">{{dto.serviceFee}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">售后理赔</view>
+ <view class="value">{{dto.salesFee}}</view>
+ </view>
+ </view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">质检扣款</view>
+ <view class="value">{{dto.checkFee}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">集货站运费</view>
+ <view class="value">{{dto.stationFee}}</view>
+ </view>
+ </view>
+ </view>
+
+ <view class="line"></view>
+ <view class="form">
+ <view class="flex">
+ <view class="form-item">
+ <view class="label title-bold">交易合计</view>
+ <view class="value t-red">¥{{dto.totalAmount||0}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label title-bold">结算金额</view>
+ <view class="value t-red">¥{{dto.settlementAmount||0}}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="m-b-24 order-sale-list list-container">
+ <view class="order-sale-item br-4 m-t-12 list-item bg-white">
+ <view class="title flex">
+ 结算商品明细
+ </view>
+ <view v-for="(item,index) of dto.details" :key="index" class="p10">
+ <view class="line"></view>
+ <view class="form">
+ <view class="form-item flex">
+ <view class="label">商品名称</view>
+ <view class="value">{{item.flowerName||'-'}}</view>
+ </view>
+ <view class="flex">
+ <view class="form-item flex1">
+ <view class="label">结算单价</view>
+ <view class="value">¥{{item.price||'0.00'}}</view>
+ </view>
+ <view class="form-item flex1">
+ <view class="label">商品数量</view>
+ <view class="value">{{item.num||0}}</view>
+ </view>
+ </view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">结算合计</view>
+ <view class="value">¥{{item.totalAmount||0}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">质检扣款</view>
+ <view class="value">¥{{item.checkFee||'0.00'}}</view>
+ </view>
+ </view>
+ <view class="flex">
+ <view class="form-item">
+ <view class="label">集货站运费</view>
+ <view class="value">¥{{item.stationFee||'0.00'}}</view>
+ </view>
+ <view class="form-item">
+ <view class="label">售后理赔</view>
+ <view class="value">¥{{item.salesFee||'0.00'}}</view>
+ </view>
+ </view>
+ </view>
+
+ </view>
+
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ id: '',
+ dto: {
+
+ }
+ }
+ },
+ onLoad(options) {
+ this.id = options.id || ''
+ if (this.id)
+ this.getList()
+
+ },
+
+ methods: {
+ async getDetail() {
+ this.$message.showLoading()
+ const {
+ code,
+ data
+ } = await this.$http.request('get', '/api/partner/settlement/list/view?id=' + this.id, {
+
+ })
+
+ this.$message.hideLoading()
+ if (code == 0) {
+ this.dto = {
+ ...data,
+ details:data.details||[]
+ }
+ }
+
+
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scope>
+ .order-sale-list {
+ .order-sale-item {
+ margin-bottom: 20rpx;
+ padding: 22rpx;
+
+ .title {
+ font-weight: 600;
+ font-size: 28rpx;
+ color: #000000;
+ line-height: 40rpx;
+ }
+
+ .line {
+ min-height: 2rpx;
+ background-color: #EEEEEE;
+ margin-top: 16rpx;
+ margin-bottom: 16rpx;
+ }
+
+ .form {
+ display: flex;
+ flex-wrap: wrap;
+
+ .form-item {
+ flex: 1;
+ // min-width: 40%;
+ // max-width: 50%;
+
+ .label {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ line-height: 34rpx;
+ }
+
+ .label::after {
+ content: ":";
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ line-height: 34rpx;
+ }
+
+ .value {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #000000;
+ line-height: 34rpx;
+ }
+
+ .value.red {
+ color: #CF0000;
+ }
+ }
+
+ .form-item.width100 {
+ max-width: unset;
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/sub_pages/supplier/order-settlement/order-settlement.vue b/sub_pages/supplier/order-settlement/order-settlement.vue
index 24a2209..3bd6fe3 100644
--- a/sub_pages/supplier/order-settlement/order-settlement.vue
+++ b/sub_pages/supplier/order-settlement/order-settlement.vue
@@ -6,7 +6,8 @@
</view>
<view class="p15" style="min-height: calc(100vh - 160rpx);">
<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
- <view v-for="(item,index) in list" :key="index" class="m-b-24 order-sale-list list-container">
+ <view v-for="(item,index) in list" :key="index" @click="toDetail(item)"
+ class="m-b-24 order-sale-list list-container">
<view class="order-sale-item br-4 list-item bg-white">
<view class="title flex">
<view class="title">
@@ -58,7 +59,7 @@
</view>
</view>
</view>
-
+
<view class="line"></view>
<view class="form">
<view class="flex">
@@ -87,18 +88,19 @@
data() {
return {
tabIndex: 0,
- query:{
- startDateStr:'',
- endDateStr:'',
+ query: {
+ startDateStr: '',
+ endDateStr: '',
}
}
},
onLoad() {
- var currentMonthStr = this.$util.toDate(new Date())
+ var currentMonthStr = this.$util.toDate(new Date()).substring(0, 8) + '01'
this.query.startDateStr = currentMonthStr
- var lastMonthDate = new Date(new Date(currentMonthStr).getTime() - 3600_000*24*10)
+ var lastMonthDate = new Date(new Date(this.$util.toDate(new Date(currentMonthStr).getTime() + 3600_000 * 24 *
+ 40).substring(0, 8) + '01').getTime() - 3600_000 * 24 * 1)
this.query.endDateStr = this.$util.toDate(lastMonthDate)
-
+
this.listApi = '/api/partner/settlement/list'
this.getList()
@@ -113,21 +115,27 @@
uni.stopPullDownRefresh()
},
methods: {
+ toDetail(item) {
+ uni.navigateTo({
+ url: `/sub_pages/supplier/order-settlement/order-settlement-detail?id=${item.id}`
+ })
+ },
changeIndex(index) {
if (this.tabIndex !== index) {
this.tabIndex = index
// 刷新 query
- if(index===0){
- var currentMonthStr = this.$util.toDate(new Date())
+ if (index === 0) {
+ var currentMonthStr = this.$util.toDate(new Date()).substring(0, 8) + '01'
this.query.startDateStr = currentMonthStr
- var lastMonthDate = new Date(new Date(currentMonthStr).getTime() - 3600_000*24*10)
+ var lastMonthDate = new Date(new Date(this.$util.toDate(new Date(currentMonthStr).getTime() +
+ 3600_000 * 24 * 40).substring(0, 8) + '01').getTime() - 3600_000 * 24 * 1)
this.query.endDateStr = this.$util.toDate(lastMonthDate)
- }else{
+ } else {
this.query.startDateStr = ''
this.query.endDateStr = ''
}
this.refreshList()
-
+
}
},
toDetail(item) {
--
Gitblit v1.9.3