|
@@ -6,16 +6,37 @@ Page({
|
|
|
showAll: false,
|
|
|
disabled: true,
|
|
|
content: {
|
|
|
+ "sa_accountclassid": 0,
|
|
|
"sa_aftersalesmagid": 0,
|
|
|
"sa_orderid": "",
|
|
|
- "reason": "",
|
|
|
- "billdate": "",
|
|
|
+ sys_enterpriseid: "",
|
|
|
"type": "退货单"
|
|
|
},
|
|
|
-
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
let form = [{
|
|
|
+ label: "单据日期",
|
|
|
+ error: false,
|
|
|
+ errMsg: "",
|
|
|
+ type: "date",
|
|
|
+ value: getTime.formatTime(new Date(), '-').split(' ')[0],
|
|
|
+ placeholder: "报价日期",
|
|
|
+ valueName: "billdate",
|
|
|
+ checking: "base",
|
|
|
+ required: true
|
|
|
+ }, {
|
|
|
+ label: "退返类型",
|
|
|
+ error: false,
|
|
|
+ errMsg: "",
|
|
|
+ type: "option",
|
|
|
+ optionNmae: "returncategory",
|
|
|
+ optionType: "radio", //复选 radio 单选
|
|
|
+ value: "",
|
|
|
+ placeholder: "退返类型",
|
|
|
+ valueName: "typemx",
|
|
|
+ checking: "base",
|
|
|
+ required: true
|
|
|
+ }, {
|
|
|
label: "返退原因",
|
|
|
error: false,
|
|
|
errMsg: "",
|
|
@@ -24,7 +45,6 @@ Page({
|
|
|
placeholder: "请输入返退原因",
|
|
|
valueName: "reason",
|
|
|
required: false,
|
|
|
-
|
|
|
}, {
|
|
|
label: "是否实物退回",
|
|
|
error: false,
|
|
@@ -88,7 +108,7 @@ Page({
|
|
|
placeholder: "选择订单号",
|
|
|
valueName: "sa_orderid",
|
|
|
checking: "base",
|
|
|
- required: true
|
|
|
+ required: false
|
|
|
})
|
|
|
this.setData({
|
|
|
form
|
|
@@ -155,9 +175,12 @@ Page({
|
|
|
...this.data.content,
|
|
|
...this.selectComponent("#Form").submit()
|
|
|
}
|
|
|
- content.sa_orderid = content.sa_orderid[1][0] || '';
|
|
|
- content.sys_enterpriseid = content.sys_enterpriseid[1][0] || '';
|
|
|
-
|
|
|
+ content.sa_orderid = (typeof content.sa_orderid) == 'string' ? content.sa_orderid : content.sa_orderid[1][0];
|
|
|
+ if ((typeof content.sys_enterpriseid) == 'string') {
|
|
|
+ delete(content.sys_enterpriseid)
|
|
|
+ } else {
|
|
|
+ content.sys_enterpriseid[1][0];
|
|
|
+ }
|
|
|
let res = await _Http.basic({
|
|
|
"id": "20230104160503",
|
|
|
content
|
|
@@ -168,8 +191,7 @@ Page({
|
|
|
icon: "none",
|
|
|
mask: true
|
|
|
})
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
+ if (res.msg == '成功') setTimeout(() => {
|
|
|
wx.redirectTo({
|
|
|
url: '/packageA/returnOne/detail?id=' + res.data.sa_aftersalesmagid,
|
|
|
})
|