|
@@ -17,11 +17,12 @@ Page({
|
|
|
label: "订单进度",
|
|
|
icon: "icon-tabcaozuojilu1",
|
|
|
model: "#Progress"
|
|
|
- }],
|
|
|
- /* , {
|
|
|
+ }, {
|
|
|
label: "发票",
|
|
|
- icon: "icon-tabkaipiaoxinxi"
|
|
|
- } */
|
|
|
+ icon: "icon-tabkaipiaoxinxi",
|
|
|
+ model: "#Invoice"
|
|
|
+ }],
|
|
|
+ saletypeList: null,
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.setData({
|
|
@@ -29,6 +30,48 @@ Page({
|
|
|
order_rebate_used: wx.getStorageSync('siteP').order_rebate_used
|
|
|
});
|
|
|
this.getDetail(true);
|
|
|
+
|
|
|
+ //获取企业免邮额度
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20220920084001,
|
|
|
+ "content": {},
|
|
|
+ }).then(res => {
|
|
|
+ console.log("查询企业档案", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ figure: res.data.freefreightamount
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ //销售分类
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "sysmanage.develop.optiontype.optiontype",
|
|
|
+ "method": "optiontypeselect",
|
|
|
+ "content": {
|
|
|
+ pageSize: "999",
|
|
|
+ "typename": "saletype",
|
|
|
+ "parameter": {
|
|
|
+ "siteid": wx.getStorageSync('siteP').siteid
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, false).then(res => {
|
|
|
+ console.log("销售分类", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ saletypeList: res.data
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 设置回签单 */
|
|
|
+ changeSignbackstatus(e) {
|
|
|
+ this.data.detail.signbackstatus = e.detail;
|
|
|
+ this.changeDetail();
|
|
|
},
|
|
|
/* 获取详情 */
|
|
|
getDetail(init = false, show = true) {
|
|
@@ -51,9 +94,24 @@ Page({
|
|
|
if (init) this.partialRenewal(true)
|
|
|
})
|
|
|
},
|
|
|
+ /* 选择销售分类 */
|
|
|
+ selectSaletype(e) {
|
|
|
+ if (this.isEdit()) return;
|
|
|
+ if (this.data.detail.type == '项目订单') return;
|
|
|
+ },
|
|
|
+ /* 设置销售分类 */
|
|
|
+ setSaletype(e) {
|
|
|
+ let value = this.data.saletypeList[e.detail.value].value;
|
|
|
+ if (value == this.data.detail.saletype) return;
|
|
|
+ this.setData({
|
|
|
+ "detail.saletype": value
|
|
|
+ })
|
|
|
+ this.changeDetail();
|
|
|
+ },
|
|
|
/* 选择结算人 */
|
|
|
selectAgent() {
|
|
|
if (this.isEdit()) return;
|
|
|
+ if (this.data.detail.type == '项目订单') return;
|
|
|
wx.navigateTo({
|
|
|
url: `/select/agent/index?params=${JSON.stringify({
|
|
|
"id":20230104103702,
|
|
@@ -260,7 +318,7 @@ Page({
|
|
|
"sa_accountclassid": data.accountclass.sa_accountclassid || 0, //营销账户类型ID
|
|
|
"sa_brandid": data.sa_brandid, //品牌ID
|
|
|
"sys_enterprise_financeid": data.sys_enterprise_financeid || 0, //合作企业财务信息ID(开票信息)
|
|
|
- "sa_logiscompid": data.logiscomp.sa_logiscompid, //物流公司档案ID
|
|
|
+ //"sa_logiscompid": data.logiscomp.sa_logiscompid || 0, 物流公司档案ID
|
|
|
"rec_contactsid": data.rec_contactsid || 0, //合作企业联系人表ID(收货信息)
|
|
|
"type": data.type, //订单类型
|
|
|
"typemx": data.typemx, // 明细分类,可选
|
|
@@ -269,8 +327,8 @@ Page({
|
|
|
"tradefield": data.tradefield, //必选
|
|
|
"pay_enterpriseid": data.pay_enterpriseid, //结算单位
|
|
|
"rebate_userate": data.accountclass.rebate_userate, //返利金使用比例
|
|
|
- "rebate_used": data.rebate_used, //默认0,是否使用返利金
|
|
|
- "billdate": data.billdate, //单据日期,默认创建日期
|
|
|
+ signbackstatus: data.signbackstatus,
|
|
|
+ saletype: data.saletype
|
|
|
};
|
|
|
if (content.type = '项目订单') {
|
|
|
content.sa_contractid = data.sa_contractid,
|