Browse Source

no message

feature/v1.2
xpz2018 5 years ago
parent
commit
305b36cdc4
8 changed files with 64 additions and 12 deletions
  1. 2
      api/user.js
  2. 2
      app.js
  3. 19
      pages/home/employee/index.js
  4. 6
      pages/home/employee/index.wxml
  5. 4
      pages/process/index/index.wxml
  6. 4
      pages/process/order-price/index.js
  7. 35
      pages/process/order-price/index.wxml
  8. 4
      pages/process/order-price/index.wxss

2
api/user.js

@ -23,6 +23,7 @@ const getAuthSession = () => mGet('/uec/create/identity-auth-session', null, con
const certificateImage = (params) => mPost('/uec/recognize/certificate-img', params, config) const certificateImage = (params) => mPost('/uec/recognize/certificate-img', params, config)
const certificateIdentity = (params) => mPost('/uec/identify/identity', params, config) const certificateIdentity = (params) => mPost('/uec/identify/identity', params, config)
const generateCode = (params) => mPost('/uec/generate/qrcode', params, config) const generateCode = (params) => mPost('/uec/generate/qrcode', params, config)
const createQrcode = (params) => mPost('/uec/create/qrcode-record', params, config)
const verifyCode = (code, params) => mGet(`/uec/verify/qrcode${code}`, params, config) const verifyCode = (code, params) => mGet(`/uec/verify/qrcode${code}`, params, config)
const applyEmplyee = (params) => mPost(`/uec/apply/to/be/employee/of/enterprise-department`, params, config) const applyEmplyee = (params) => mPost(`/uec/apply/to/be/employee/of/enterprise-department`, params, config)
const getCheckList = (params) => mGet(`/uec/get/employee-joining-department-application-list`, params, config) const getCheckList = (params) => mGet(`/uec/get/employee-joining-department-application-list`, params, config)
@ -200,6 +201,7 @@ export {
modifyMobile, modifyMobile,
verifyCode, verifyCode,
generateCode, generateCode,
createQrcode,
applyEmplyee, applyEmplyee,
getCheckList, getCheckList,
auditEmploye, auditEmploye,

2
app.js

@ -1,6 +1,6 @@
//app.js //app.js
App({ App({
evn: 2, // 0: 开发版本;1:测试版本;2:生产版本
evn: 0, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: [''], tmplIds: [''],
version: 152, version: 152,
xAppId: '503258978847953926', xAppId: '503258978847953926',

19
pages/home/employee/index.js

@ -1,6 +1,6 @@
// pages/home/employee/index.js // pages/home/employee/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import { getCheckList, auditEmploye, generateCode } from "../../../api/user"
import { getCheckList, auditEmploye, createQrcode } from "../../../api/user"
import { getEmployeList } from "../../../api/saas" import { getEmployeList } from "../../../api/saas"
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -20,7 +20,8 @@ Scene({
actions: [ actions: [
{ id: 1, name: '删除该员工' } { id: 1, name: '删除该员工' }
], ],
nowIndex: -1
nowIndex: -1,
qrcode: null
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -28,6 +29,13 @@ Scene({
onLoad: function (options) { onLoad: function (options) {
this.setData({ height: app.globalData.fragmentHeight }) this.setData({ height: app.globalData.fragmentHeight })
this.fetchMemberList() this.fetchMemberList()
const form = { id: 5 }
form.metaData = { factoryId: app.userInfo.factoryId, factoryName: app.userInfo.factoryName }
createQrcode(form).then(result => {
this.setData({ qrcode: result.data.id })
}).catch(err => {
util.showToast(err)
})
}, },
fetchMemberList: function(){ fetchMemberList: function(){
wx.showLoading({ title: '加载中', mask: true }) wx.showLoading({ title: '加载中', mask: true })
@ -132,5 +140,12 @@ Scene({
that.setData({ showEmbedded: false }) that.setData({ showEmbedded: false })
} }
}) })
},
onShareAppMessage: function () {
return {
title: '邀请您加入' + app.userInfo.factoryName,
imageUrl: '/assets/image/icon_logo.png',
path: `pages/login/index?qrcode=${this.data.qrcode}`
}
} }
}) })

6
pages/home/employee/index.wxml

@ -55,10 +55,10 @@
</van-cell> </van-cell>
</view> </view>
<view class="booking-tool" style="bottom:200rpx" bindtap="addEmployee">
<view class="roder-add flex flex-center">
<view class="booking-tool" style="bottom:200rpx" wx:if="{{ qrcode }}">
<button class="roder-add flex flex-center" open-type="share">
<text class="cuIcon-add text-white" style="font-size:32px"></text> <text class="cuIcon-add text-white" style="font-size:32px"></text>
</view>
</button>
</view> </view>
<van-overlay show="{{ showEmbedded }}" duration="{{0}}" bind:click="onClickHideEmbedded"> <van-overlay show="{{ showEmbedded }}" duration="{{0}}" bind:click="onClickHideEmbedded">

4
pages/process/index/index.wxml

@ -101,7 +101,7 @@
<view style="padding: 0rpx 28rpx;margin-top:24rpx" wx:if="{{!totalInfo.creditLine}}"> <view style="padding: 0rpx 28rpx;margin-top:24rpx" wx:if="{{!totalInfo.creditLine}}">
<image style="width:694rpx;height:200rpx" src="/assets/image/icon-banner.png" bindtap="toAuths"></image> <image style="width:694rpx;height:200rpx" src="/assets/image/icon-banner.png" bindtap="toAuths"></image>
</view> </view>
<view style="padding: 0rpx 28rpx;margin-top:24rpx" wx:else>
<view style="padding: 0rpx 28rpx;margin-top:24rpx" bindtap="agentList" wx:else>
<view class="bg-white" style="border-radius: 20rpx;padding: 24rpx 0rpx 8rpx 0rpx"> <view class="bg-white" style="border-radius: 20rpx;padding: 24rpx 0rpx 8rpx 0rpx">
<view class="flex flex-justify" style="padding: 0rpx 28rpx 24rpx 28rpx"> <view class="flex flex-justify" style="padding: 0rpx 28rpx 24rpx 28rpx">
<view class="text-black text-sg text-bold">千鸟代付额度</view> <view class="text-black text-sg text-bold">千鸟代付额度</view>
@ -110,7 +110,7 @@
<van-icon name="arrow" color="#aaa"/> <van-icon name="arrow" color="#aaa"/>
</view> </view>
</view> </view>
<view class="flex" style="padding:0rpx 0rpx 24rpx 0rpx" bindtap="agentList">
<view class="flex" style="padding:0rpx 0rpx 24rpx 0rpx">
<view style="flex:1;padding:0rpx 32rpx;margin-right:12rpx"> <view style="flex:1;padding:0rpx 32rpx;margin-right:12rpx">
<view class="flex flex-center" style="justify-content: flex-start"> <view class="flex flex-center" style="justify-content: flex-start">
<view style="height:24rpx;width:6rpx;background:#007AFF"></view> <view style="height:24rpx;width:6rpx;background:#007AFF"></view>

4
pages/process/order-price/index.js

@ -15,6 +15,7 @@ Scene({
safeBottom: app.globalData.safeBottom, safeBottom: app.globalData.safeBottom,
paperList: null, paperList: null,
form: null, form: null,
step: 1,
columns: [], columns: [],
focus: 0, focus: 0,
visible: false, visible: false,
@ -48,6 +49,9 @@ Scene({
}) })
} }
}, },
nextStep: function (e) {
this.setData({ step: 2 })
},
showPlate: function (e) { showPlate: function (e) {
this.keyboard = this.keyboard || this.selectComponent('#wux-keyboard') this.keyboard = this.keyboard || this.selectComponent('#wux-keyboard')
this.keyboard.show(this.data.form.plateNumber, 0) this.keyboard.show(this.data.form.plateNumber, 0)

35
pages/process/order-price/index.wxml

@ -1,9 +1,36 @@
<!--pages/process/order-check/index.wxml--> <!--pages/process/order-check/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">定价详情</view>
<view slot="content">过磅定价</view>
</cu-custom> </cu-custom>
<view wx:if="{{form}}">
<view wx:if="{{form && step == 1}}">
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">客户姓名</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">过磅时间</view>
<view class="text-gray">{{form.createTime}}</view>
</view>
</van-cell>
<view class="flex flex-center flex-column">
<van-image wx:for="{{form.totalWeighingPicture}}" wx:key="index" use-loading-slot width="686rpx" height="400rpx"
custom-class="big-icon" data-url="{{item.url}}" fit="cover" src="{{item.url}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
<view style="padding:48rpx 32rpx">
<van-button block type="danger" bind:click="cancelOrder">取消订单</van-button>
<view style="height:36rpx"></view>
<van-button block type="info" bind:click="nextStep">进行定价</van-button>
</view>
</view>
<view wx:elif="{{form && step == 2}}">
<van-index-anchor index="订单信息" /> <van-index-anchor index="订单信息" />
<van-cell> <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
@ -91,9 +118,9 @@
</view> </view>
</van-cell> </van-cell>
</view> </view>
<view style="height:{{136 + safeBottom}}rpx;"></view>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{form && step == 2}}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" <view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;"
wx:if="{{form}}">
wx:if="{{form && step == 2}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelOrder">取消</van-button> <van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelOrder">取消</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="priceOrder">提交 <van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="priceOrder">提交
</van-button> </van-button>

4
pages/process/order-price/index.wxss

@ -1,4 +1,8 @@
/* pages/process/order-check/index.wxss */ /* pages/process/order-check/index.wxss */
.page-icon { .page-icon {
margin-right: 24rpx; margin-right: 24rpx;
}
.big-icon{
margin-top: 24rpx;
} }
Loading…
Cancel
Save