Browse Source

出货单

feature/v1.3
xpz2018 5 years ago
parent
commit
a5a751a7a4
9 changed files with 40 additions and 61 deletions
  1. 6
      pages/home/customer-info/index.wxml
  2. 6
      pages/home/employee-info/index.js
  3. 8
      pages/home/employee-info/index.wxml
  4. 27
      pages/home/employee/index.js
  5. 2
      pages/message/card-list/index.wxml
  6. 5
      pages/process/index/index.js
  7. 2
      pages/storage/order-create/index.js
  8. 1
      pages/storage/pound-list/index.js
  9. 44
      pages/storage/pound-list/index.wxml

6
pages/home/customer-info/index.wxml

@ -18,14 +18,14 @@
<view style="height:32rpx"></view>
<view style="margin-top:20rpx;padding:48rpx 32rpx" wx:if="{{ cardNo }}">
<van-button block type="default" bind:click="chooseMember">选择客户进行替换</van-button>
<van-button block type="default" bind:click="chooseMember">选择客户进行绑定</van-button>
<view style="height:36rpx"></view>
<van-button block type="info" bind:click="submitForm">确认绑</van-button>
<van-button block type="info" bind:click="submitForm">确认绑</van-button>
</view>
<view style="margin-top:20rpx;padding:48rpx 32rpx" wx:else>
<van-button block type="primary" bind:click="registCustomer" wx:if="{{form.id && !form.userId}}">邀请注册纸通宝</van-button>
<view style="height:36rpx" wx:if="{{form.id && !form.userId}}"></view>
<van-button block type="info" bind:click="submitForm">保存</van-button>
<van-button block type="info" bind:click="submitForm">确认绑定</van-button>
</view>
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:cancel="onClose" bind:close="onClose"

6
pages/home/employee-info/index.js

@ -35,6 +35,9 @@ Scene({
}
if(options.cardNo){
this.setData({ cardNo: options.cardNo, ['form.cardNo']: options.cardNo })
Dialog.alert({ title: '温馨提示', message: '员工绑定卡号,需要从现有员工中进行选择,现在去选择?' }).then(() => {
this.chooseMember()
})
}
getRoleList().then(result => {
this.setData({ roleList: result.data.records })
@ -75,6 +78,9 @@ Scene({
if(!util.isEmpty(this.data.form.joinAt)){
this.data.form.joinAt = this.data.form.joinAt.substring(0, 10)
}
if(!Array.isArray(this.data.form.enterpriseRoleIds)){
this.data.form.enterpriseRoleIds = [this.data.form.enterpriseRoleIds]
}
editEmploye(this.data.form).then(result => {
wx.hideLoading()
util.showBackToast('修改成功')

8
pages/home/employee-info/index.wxml

@ -2,12 +2,12 @@
<view slot="content">员工资料</view>
</cu-custom>
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="点击可以修改员工信息" wx:if="{{form.enterpriseMemberId}}" />
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="{{ cardNo ? '选择员工进行绑定' : '点击可以修改员工信息' }}" wx:if="{{form.enterpriseMemberId}}" />
<van-field value="{{ form.enterpriseMemberId }}" label="员工编号:" disabled wx:if="{{ form.enterpriseMemberId }}" />
<van-field value="{{ form.cardNo }}" label="卡号:" disabled wx:if="{{ cardNo }}"/>
<van-field value="{{ form.enterpriseMemberName || form.applicantName }}" label="员工姓名:" placeholder="请输入员工姓名" bind:input="bindInput" />
<van-field value="{{ form.enterpriseMemberName || form.applicantName }}" label="员工姓名:" disabled placeholder="请输入员工姓名" bind:input="bindInput" />
<van-field value="{{ form.mobile || form.applicationMobile }}" type="number" label="手机号码:" disabled placeholder="请输入手机号码" />
<van-field value="{{ form.enterpriseRoleNames }}" placeholder="请选择角色" readonly label="员工角色:" is-link bindtap="chooseMethod" />
<van-field value="{{ form.enterpriseRoleNames }}" placeholder="请选择角色" label="员工角色:" clickable readonly disabled="{{ !form.enterpriseMemberId }}" is-link bindtap="chooseMethod" />
<van-cell wx:if="{{form.enterpriseMemberId}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">员工状态:</view>
@ -22,7 +22,7 @@
<view style="height:32rpx"></view>
<view style="margin-top:20rpx;padding:48rpx 32rpx" wx:if="{{ cardNo }}">
<van-button block type="default" bind:click="chooseMember">选择员工进行替换</van-button>
<van-button block type="default" bind:click="chooseMember">选择员工进行绑定</van-button>
<view style="height:36rpx"></view>
<van-button block type="info" bind:click="submitForm">保存</van-button>
</view>

27
pages/home/employee/index.js

@ -70,20 +70,19 @@ Scene({
channel.emit('onCallback', { what: 121, detail: item })
wx.navigateBack()
} else {
// wx.navigateTo({
// url: `/pages/home/employee-info/index?id=${item.enterpriseMemberId}`,
// events: {
// onCallback: (data) => {
// if (data.what == 120) {
// that.fetchMemberList()
// }
// }
// },
// success: function(res) {
// res.eventChannel.emit('onParam', item)
// }
// })
wx.navigateTo({ url: `/pages/home/employee-info/index?cardNo=00874574123` })
wx.navigateTo({
url: `/pages/home/employee-info/index?id=${item.enterpriseMemberId}`,
events: {
onCallback: (data) => {
if (data.what == 120) {
that.fetchMemberList()
}
}
},
success: function(res) {
res.eventChannel.emit('onParam', item)
}
})
}
},
agreeItem: function(e){

2
pages/message/card-list/index.wxml

@ -12,7 +12,7 @@
<view class="text-empty">{{loading? '正在加载' : '暂无消息'}}</view>
</view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<van-cell clickable is-link center wx:for="{{pageItem}}" wx:key="index" title="卡号:{{item.cardNo || ''}}" value="点击进行处理" size="large" label="滴卡时间:{{item.mobile}}" data-page="{{pageIndex}}" data-index="{{index}}" bind:click="lookItem"/>
<van-cell clickable is-link center wx:for="{{pageItem}}" wx:key="index" title="卡号:{{item.cardNo || ''}}" value="点击进行处理" label="时间:{{item.createTime}}" data-page="{{pageIndex}}" data-index="{{index}}" bind:click="lookItem"/>
</view>
<!--加载更多的UI-->
<van-divider content-position="center" wx:if="{{ form.pageNum > 1}}" custom-style="padding:0rpx 120rpx">

5
pages/process/index/index.js

@ -95,9 +95,8 @@ Component({
},
outList: function(e){
if(e.currentTarget.dataset.status == 1){
// wx.navigateTo({ url: '/pages/storage/pound-info/index?id=579730676195135488' })
// wx.navigateTo({ url: '/pages/storage/order-info/index?id=579730676195135488' })
wx.navigateTo({ url: '/pages/storage/order-settlement/index?id=579730676195135488' })
// wx.navigateTo({ url: '/pages/storage/order-settlement/index?id=579730676195135488' })
wx.navigateTo({ url: '/pages/storage/pound-list/index' })
} else if(e.currentTarget.dataset.status == 2){
wx.navigateTo({ url: '/pages/storage/order-list/index?status=1' })
} else if(e.currentTarget.dataset.status == 3){

2
pages/storage/order-create/index.js

@ -90,7 +90,7 @@ Scene({
this.setData({ visible: false, ['form.productName']: detail.value })
},
onChange: function({detail}) {
this.setData({ activeNames: detail });
this.setData({ activeNames: detail })
},
submitForm: function(){
if(util.isEmpty(this.data.form.factoryName)){

1
pages/storage/pound-list/index.js

@ -21,7 +21,6 @@ Scene({
pageNum: 1,
pageSize: 10
},
title: '全部',
lastTime: null
},
// * 生命周期函数--监听页面加载

44
pages/storage/pound-list/index.wxml

@ -1,6 +1,6 @@
<!--pages/process/order-list/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">{{title}}</view>
<view slot="content">磅单列表</view>
</cu-custom>
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchOrderList">
@ -17,41 +17,17 @@
<text class="text-sg" style="line-height:64rpx;padding-left:32rpx">{{item.tipsTime}}</text>
</view>
<view class="item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem">
<view class="flex flex-justify" wx:if="{{item.status == 1 || item.status == 2 || item.status == 3}}">
<view style="height: 88rpx">
<view class="flex flex-center text-sg text-black">
<text>客户名称:{{item.factoryCustomerName}}</text>
<text wx:if="{{item.status != 1 && item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text>
</view>
<view class="text-sm text-gray" style="margin-top:12rpx" wx:if="{{item.status == 1}}">毛重:{{item.totalWeight}}公斤</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.status == 2}}">
<view class="text-sm text-gray">品类:{{item.productName}}</view>
<view class="text-sm text-gray">毛重:{{item.totalWeight}}公斤</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.status == 3}}">
<view class="text-sm text-gray">品类:{{item.productName}}</view>
<view class="text-sm text-gray">金额:{{item.settlePrice}}元</view>
</view>
<view class="flex flex-justify">
<view class="text-df">磅单编号:{{item.factoryCustomerName}}</view>
<view class="flex">
<view class="text-df" style="color:#FA541C" wx:if="{{item.status == 0}}">过磅中</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 1}}">已过磅</view>
</view>
</view>
<view wx:else>
<view class="flex flex-justify">
<view class="flex flex-center">
<text>客户名称:{{item.factoryCustomerName}}</text>
<text wx:if="{{item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text>
</view>
<view class="flex" >
<view class="text-df" style="color:#FA541C" wx:if="{{item.status == 4}}">待付款</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 41}}">代付中</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 42}}">待结算</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 5}}">已完成</view>
</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-gray">品类:{{item.productName}}</view>
<view class="text-sm text-gray">重量:{{item.settleWeight}}公斤</view>
<view class="text-sm text-gray">金额:{{item.settlePrice}}元</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-gray">毛重:{{item.productName}}公斤</view>
<view class="text-sm text-gray">皮重:{{item.settleWeight}}公斤</view>
<view class="text-sm text-gray">净重:{{item.netWeight}}公斤</view>
</view>
</view>
</view>

Loading…
Cancel
Save