Browse Source

1、订单新建中,选取客户带出会计单位。

2、订单新建,添加默认带出销售类型和仓库名称
master
chenxuhui 7 years ago
parent
commit
50fb37a91f
1 changed files with 22 additions and 4 deletions
  1. +22
    -4
      pages/order/newBill/newBill.js

+ 22
- 4
pages/order/newBill/newBill.js View File

@ -18,6 +18,8 @@ var getCustomerInfo = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Get
let insert = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Insert'
var getUserPrifile = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/AccountRpc/GetUserPrifile"
// 获取完整的年月日 时分秒,以及默认显示的数组'
function setTime(that) {
// 精确到分的处理,将数组的秒去掉
@ -71,13 +73,15 @@ function GetGoodsInfo(that, dmo, detail) {
}
function GetCustomerInfo(that, dmo) {
var params = [dmo.Customer_ID, ["Department_ID", "Department_Name", "Employee_ID", "Employee_Name", "TakeGoods_Type", "Address"]]
var params = [dmo.Customer_ID, ["Department_ID", "Department_Name", "Employee_ID", "Employee_Name", "AccountingUnit_ID","AccountingUnit_Name","TakeGoods_Type", "Address"]]
network.transfer_request(getCustomerInfo, params, function(res) {
var obj = JSON.parse(res.result);
dmo.Department_ID = obj.Department_ID;
dmo.Department_Name = obj.Department_Name;
dmo.Employee_ID = obj.Employee_ID;
dmo.Employee_Name = obj.Employee_Name;
dmo.AccountingUnit_ID = obj.AccountingUnit_ID;
dmo.AccountingUnit_Name = obj.AccountingUnit_Name;
if (obj.TakeGoods_Type != null)
dmo.TakeGoods_Type = obj.TakeGoods_Type.Name;
else
@ -101,15 +105,29 @@ Page({
},
dateTimeArray1: null,
dateTime1: null,
backPage:"",
backPage: "",
},
onLoad: function(options) {
var that = this;
setTime(that)
setTime(that);
this.getUserPrifile();
},
getUserPrifile: function() {
var that = this;
network.transfer_request(getUserPrifile, [], function(res) {
that.data.dmo.SaleKind_ID = res.result.Order_SaleKind_ID;
that.data.dmo.SaleKind_Name = res.result.Order_SaleKind_Name;
that.data.dmo.Store_ID = res.result.Order_Store_ID;
that.data.dmo.Store_Name = res.result.Order_Store_Name;
that.setData({
dmo: that.data.dmo
});
});
},
onShow: function () {
onShow: function() {
var that = this;
if (this.data.backPage == "goodsNameChoosePage") {
var goodsArr = app.globalData.goodsNameArray;


Loading…
Cancel
Save