Browse Source

订单、特价申请、担保单、三种单据类型的详情页面根据工作流程状态添加提交工作流按钮

master
chenxuhui 7 years ago
parent
commit
dce1e99fe9
7 changed files with 226 additions and 21 deletions
  1. +57
    -0
      app.wxss
  2. +29
    -0
      pages/guarantee/detail/detail.js
  3. +37
    -4
      pages/guarantee/detail/detail.wxml
  4. +29
    -7
      pages/order/detail/detail.js
  5. +17
    -2
      pages/order/detail/detail.wxml
  6. +32
    -7
      pages/specialOrderApplication/specialOrderApplyDetail/specialOrderApplyDetail.js
  7. +25
    -1
      pages/specialOrderApplication/specialOrderApplyDetail/specialOrderApplyDetail.wxml

+ 57
- 0
app.wxss View File

@ -8,3 +8,60 @@
padding: 200rpx 0; padding: 200rpx 0;
box-sizing: border-box; box-sizing: border-box;
} }
.imageView {
height: 80px;
width: 100%;
margin-top: 20rpx;
position: relative;
align-items: center;
justify-content: center;
box-sizing: content-box;
}
.imageViewNoMargin{
height: 80px;
width: 100%;
margin-top: -10rpx;
position: relative;
align-items: center;
justify-content: center;
box-sizing: content-box;
}
.currentImage {
width: 100%;
height: 100%;
}
.bottomGroupView{
margin-top: -10rpx;
width: 100%;
height: 80px;
display: flex;
flex-direction: row;
}
.btnTextView {
position: absolute;
width: 100%;
top:0;
line-height: 65px;
text-align: center;
}
.btnText {
color: white;
font-size: 20px;
}
.goodsNameImageToTopFar{
height: calc(100% - 180px);
background:#EAF1F8;
}
.blueAddText{
color: #2689f8;
font-size: 20px;
}

+ 29
- 0
pages/guarantee/detail/detail.js View File

@ -12,6 +12,15 @@ function load(that, ID) {
if (DepartmentWorkFlow_Detail_Name == "初始") { if (DepartmentWorkFlow_Detail_Name == "初始") {
istrue = true; istrue = true;
} }
// 部门工作流的判断
var DepartmentWorkFlow_ID = res.result.DepartmentWorkFlow_ID;
var DepartmentWorkFlow_Detail_ID = res.result.DepartmentWorkFlow_Detail_ID;
if (DepartmentWorkFlow_ID && !DepartmentWorkFlow_Detail_ID) {
// if (!DepartmentWorkFlow_ID && !DepartmentWorkFlow_Detail_ID) {
that.setData({
showForwardBtn: true
})
}
if (res.result.Customer_Name != null) { if (res.result.Customer_Name != null) {
var accountcustomerNew = [{ var accountcustomerNew = [{
@ -181,6 +190,8 @@ Page({
array: [], array: [],
showView: false, showView: false,
winHeight: app.globalData.winHeight, winHeight: app.globalData.winHeight,
// 是否显示部门工作流提交按钮
showForwardBtn: false,
}, },
/** /**
@ -301,6 +312,24 @@ Page({
guaranteeMoney: billMoney + this.data.requestMoney guaranteeMoney: billMoney + this.data.requestMoney
}) })
}, },
// 点击提交按钮
forwardBtnClick: function () {
let params = [orderID];
var businessGuaranteeForward = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/Forward';
network.transfer_request(businessGuaranteeForward, params, function (res) {
wx.showToast({
title: '提交工作审批流成功',
success: function () {
wx.navigateBack({
delta: 1,
})
}
})
})
},
// 点击保存按钮
submitForm: function(e) { submitForm: function(e) {
let accountCustomerId = this.data.accountcustomer[this.data.accountcustomerIndex].ID; let accountCustomerId = this.data.accountcustomer[this.data.accountcustomerIndex].ID;
let accountUnitId = this.data.accountUnit[this.data.accountUnitIndex].ID; let accountUnitId = this.data.accountUnit[this.data.accountUnitIndex].ID;


+ 37
- 4
pages/guarantee/detail/detail.wxml View File

@ -1,5 +1,5 @@
<!--pages/updataguarantee/updataguarantee.wxml--> <!--pages/updataguarantee/updataguarantee.wxml-->
<scroll-view class='scroll-views'scroll-y="true" style="height:{{winHeight}}px" >
<scroll-view class='scroll-views' scroll-y="true" style="height:{{winHeight}}px">
<view class='twoitem'> <view class='twoitem'>
<text>结账客户</text> <text>结账客户</text>
<text class='item_value'>{{accountcustomer[accountcustomerIndex].Name}}</text> <text class='item_value'>{{accountcustomer[accountcustomerIndex].Name}}</text>
@ -50,7 +50,7 @@
<text class='text_name'>{{item.Customer_Name}}</text> <text class='text_name'>{{item.Customer_Name}}</text>
<text class='text_name'>日期:{{item.Date}}</text> <text class='text_name'>日期:{{item.Date}}</text>
</view> </view>
<!-- <view class='itemview_h'>
<!-- <view class='itemview_h'>
<text class='text_id'>{{item.BillTypeName}}No.{{item.ID}}</text> <text class='text_id'>{{item.BillTypeName}}No.{{item.ID}}</text>
<text class='text_id'>金额:{{item.Money}}</text> <text class='text_id'>金额:{{item.Money}}</text>
</view> </view>
@ -68,8 +68,41 @@
</view> </view>
<button class="submit {{showView?'':'hide'}}" catchtap='addBills'>添加担保明细</button>
<button class="submit {{showView?'':'hide'}}" catchtap='submitForm'>提交</button>
<!-- <button class="submit {{showView?'':'hide'}}" catchtap='addBills'>添加担保明细</button>
<button class="submit {{showView?'':'hide'}}" catchtap='submitForm'>提交</button> -->
<view class="imageView {{showView?'':'hide'}}" catchtap='addBills'>
<image class='currentImage' src="/imgs/longWhiteBtn.png">
<view class='btnTextView'>
<text class='blueAddText'>添加担保明细</text>
</view>
</image>
</view>
<view class='bottomGroupView' wx:if="{{showForwardBtn}}">
<view class='imageViewNoMargin' catchtap='forwardBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>提交</text>
</view>
</image>
</view>
<view class='imageViewNoMargin' catchtap='submitForm'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>保存</text>
</view>
</image>
</view>
</view>
<view class='imageViewNoMargin' wx:else catchtap='submitForm'>
<image class='currentImage' src="/imgs/longBlueBtn.png">
<view class='btnTextView'>
<text class='btnText'>保存</text>
</view>
</image>
</view>
<view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view> <view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view>


+ 29
- 7
pages/order/detail/detail.js View File

@ -3,8 +3,8 @@ var app = getApp()
var network = require("../../../utils/net.js") var network = require("../../../utils/net.js")
var dateTimePicker = require('../../../utils/dateTimePicker.js'); var dateTimePicker = require('../../../utils/dateTimePicker.js');
var utilll = require('../../../utils/util.js'); var utilll = require('../../../utils/util.js');
var timechage = require("../../../utils/dateTimeUtil.js")
var timechage = require("../../../utils/dateTimeUtil.js");
var orderID;
var getAccountingUnit = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; var getAccountingUnit = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit";
var getCustomer = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; var getCustomer = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer";
var getDept = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; var getDept = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment";
@ -18,6 +18,7 @@ var getCustomerInfo = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Get
var load = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Load"; var load = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Load";
let update = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Update'; let update = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Update';
var saleOrderForward = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Forward';
function setTime(that) { function setTime(that) {
// 获取完整的年月日 时分秒,以及默认显示的数组 // 获取完整的年月日 时分秒,以及默认显示的数组
@ -101,6 +102,8 @@ Page({
dateTimeArray1: null, dateTimeArray1: null,
dateTime1: null, dateTime1: null,
backPage:'', backPage:'',
// 是否显示部门工作流提交按钮
showForwardBtn: false,
}, },
onLoad: function(options) { onLoad: function(options) {
@ -111,18 +114,22 @@ Page({
if (app.globalData.shareInParameter.id) { if (app.globalData.shareInParameter.id) {
var detailItemID = parseInt(app.globalData.shareInParameter.id); var detailItemID = parseInt(app.globalData.shareInParameter.id);
// wx.showModal({
// title: '看下ID值',
// content: '+++' + detailItemID + '+++',
// })
// detailItemType = app.globalData.shareInParameter.detailItemType;
} else { } else {
var detailItemID = parseInt(options.ID); var detailItemID = parseInt(options.ID);
} }
var that = this; var that = this;
network.transfer_request(load, [detailItemID], function(res) { network.transfer_request(load, [detailItemID], function(res) {
orderID =res.result.ID;
app.globalData.shareInParameter = {}; app.globalData.shareInParameter = {};
var DepartmentWorkFlow_ID = res.result.DepartmentWorkFlow_ID;
var DepartmentWorkFlow_Detail_ID = res.result.DepartmentWorkFlow_Detail_ID;
if (DepartmentWorkFlow_ID && !DepartmentWorkFlow_Detail_ID) {
// if (!DepartmentWorkFlow_ID && !DepartmentWorkFlow_Detail_ID) {
that.setData({
showForwardBtn: true
})
}
res.result.LoadTime = timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), 'Y-M-D h:m'); res.result.LoadTime = timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), 'Y-M-D h:m');
console.log(res.result); console.log(res.result);
that.setData({ that.setData({
@ -450,6 +457,21 @@ Page({
}) })
}, },
// 点击提交按钮
forwardBtnClick: function () {
let params = [orderID];
network.transfer_request(saleOrderForward, params, function (res) {
wx.showToast({
title: '提交工作审批流成功',
success: function () {
wx.navigateBack({
delta: 1,
})
}
})
})
},
// 存货明细页面更多按钮 // 存货明细页面更多按钮
moreBtnClick: function (e) { moreBtnClick: function (e) {
var that = this; var that = this;


+ 17
- 2
pages/order/detail/detail.wxml View File

@ -150,13 +150,20 @@
</image> </image>
</view> </view>
<view class='bottomGroupView'>
<view class='imageViewNoMargin' catchtap='moreBtnClick'>
<view class='bottomGroupView' wx:if="{{showForwardBtn}}">
<!-- <view class='imageViewNoMargin' catchtap='moreBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png"> <image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'> <view class='btnTextView'>
<text class='btnText'>更多</text> <text class='btnText'>更多</text>
</view> </view>
</image> </image>
</view> -->
<view class='imageViewNoMargin' catchtap='forwardBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>提交</text>
</view>
</image>
</view> </view>
<view class='imageViewNoMargin' catchtap='submitForm'> <view class='imageViewNoMargin' catchtap='submitForm'>
<image class='currentImage' src="/imgs/blueBtn.png"> <image class='currentImage' src="/imgs/blueBtn.png">
@ -167,6 +174,14 @@
</view> </view>
</view> </view>
<view class='imageViewNoMargin' wx:else catchtap='submitForm'>
<image class='currentImage' src="/imgs/longBlueBtn.png">
<view class='btnTextView'>
<text class='btnText'>保存</text>
</view>
</image>
</view>
<!-- <button class='submit' catchtap='submitForm' wx:if="{{dmo.BillState=='未审核'}}">保存</button> --> <!-- <button class='submit' catchtap='submitForm' wx:if="{{dmo.BillState=='未审核'}}">保存</button> -->
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>


+ 32
- 7
pages/specialOrderApplication/specialOrderApplyDetail/specialOrderApplyDetail.js View File

@ -4,12 +4,12 @@ var network = require("../../../utils/net.js");
const app = getApp(); const app = getApp();
var dateTimePicker = require('../../../utils/dateTimePicker.js'); var dateTimePicker = require('../../../utils/dateTimePicker.js');
var timechage = require("../../../utils/dateTimeUtil.js") var timechage = require("../../../utils/dateTimeUtil.js")
var orderID;
var getDept = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; var getDept = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment";
var getSaleKind = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind" var getSaleKind = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind"
var getPrice = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetGoodsPirce"; var getPrice = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetGoodsPirce";
var insert = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/MarketingActivityRpc/Insert'; var insert = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/MarketingActivityRpc/Insert';
var specialOrderApplyForward = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/MarketingActivityRpc/Forward';
function GetSaleKind(that, v) { function GetSaleKind(that, v) {
let method = getSaleKind; let method = getSaleKind;
let params = [{ let params = [{
@ -99,6 +99,8 @@ Page({
department: [], //销售部门 department: [], //销售部门
name: "", name: "",
remark: '', remark: '',
// 是否显示部门工作流提交按钮
showForwardBtn: false,
}, },
// 添加名称 // 添加名称
@ -260,6 +262,22 @@ Page({
}) })
}, },
// 点击提交按钮
forwardBtnClick: function (){
let params = [orderID];
network.transfer_request(specialOrderApplyForward, params, function (res) {
wx.showToast({
title: '提交工作审批流成功',
success: function () {
wx.navigateBack({
delta: 1,
})
}
})
})
},
/** /**
* 存货明细保存按钮 点击新建单据 内部做逻辑判断 存储值是否都已经加载 * 存货明细保存按钮 点击新建单据 内部做逻辑判断 存储值是否都已经加载
*/ */
@ -407,11 +425,6 @@ Page({
if (app.globalData.shareInParameter.id) { if (app.globalData.shareInParameter.id) {
var detailItemID = parseInt(app.globalData.shareInParameter.id); var detailItemID = parseInt(app.globalData.shareInParameter.id);
// wx.showModal({
// title: '看下ID值',
// content: '+++' + detailItemID + '+++',
// })
// detailItemType = app.globalData.shareInParameter.detailItemType;
} else { } else {
var detailItemID = parseInt(options.ID); var detailItemID = parseInt(options.ID);
} }
@ -419,7 +432,19 @@ Page({
var method ='/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/MarketingActivityRpc/Load'; var method ='/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/MarketingActivityRpc/Load';
let params = [detailItemID]; let params = [detailItemID];
network.transfer_request(method, params, function (res) { network.transfer_request(method, params, function (res) {
orderID =res.result.ID;
app.globalData.shareInParameter = {}; app.globalData.shareInParameter = {};
// 部门工作流
// res.result.DepartmentWorkFlow_ID
// res.result.DepartmentWorkFlow_Detail_ID
var DepartmentWorkFlow_ID = res.result.DepartmentWorkFlow_ID;
var DepartmentWorkFlow_Detail_ID = res.result.DepartmentWorkFlow_Detail_ID;
if (DepartmentWorkFlow_ID && !DepartmentWorkFlow_Detail_ID){
// if (!DepartmentWorkFlow_ID && !DepartmentWorkFlow_Detail_ID) {
that.setData({
showForwardBtn:true
})
}
// 获取数据加载页面 // 获取数据加载页面
let goodsDetailsArray = []; let goodsDetailsArray = [];
var goodsNameArray = res.result.GoodsDetails; var goodsNameArray = res.result.GoodsDetails;


+ 25
- 1
pages/specialOrderApplication/specialOrderApplyDetail/specialOrderApplyDetail.wxml View File

@ -118,7 +118,31 @@
</image> </image>
</view> </view>
<view class='imageViewNoMargin' catchtap='submitOrder'>
<view class='bottomGroupView' wx:if="{{showForwardBtn}}">
<!-- <view class='imageViewNoMargin' catchtap='moreBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>更多</text>
</view>
</image>
</view> -->
<view class='imageViewNoMargin' catchtap='forwardBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>提交</text>
</view>
</image>
</view>
<view class='imageViewNoMargin' catchtap='submitOrder'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>保存</text>
</view>
</image>
</view>
</view>
<view class='imageViewNoMargin' wx:else catchtap='submitOrder'>
<image class='currentImage' src="/imgs/longBlueBtn.png"> <image class='currentImage' src="/imgs/longBlueBtn.png">
<view class='btnTextView'> <view class='btnTextView'>
<text class='btnText'>保存</text> <text class='btnText'>保存</text>


Loading…
Cancel
Save