yujk vor 3 Jahren
Ursprung
Commit
8400e1423f
4 geänderte Dateien mit 86 neuen und 76 gelöschten Zeilen
  1. +22
    -23
      pages/bank/add/add.js
  2. +39
    -26
      pages/bankDraft/add/add.js
  3. +2
    -4
      pages/fixedAssets/add/add.js
  4. +23
    -23
      pages/project/add/add.js

+ 22
- 23
pages/bank/add/add.js Datei anzeigen

@@ -68,7 +68,6 @@ Page({
if(r.data.length>0){
that.setData({
bankTypeOptions:r.data,
'form.bankType':r.data[0].dictValue
})
}
}
@@ -164,16 +163,17 @@ Page({
if(that.data.form.id==""||that.data.form.id==null){
UTIL.httpRequest(API.URL_GET_DEPOSITADD, that.data.form, {
success: (res) => {
wx.showToast({
title: "提交成功!",
duration: 2000,
icon:"success"
})
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
this.setData({'status':0})
if(res.code == 200){
UTIL.showToastNoneIcon('新增成功');
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
}else{
UTIL.showToastNoneIcon('新增失败');
}
},
fail: function (response) {
if (typeof fail === FUNCTION_TEXT) {
@@ -184,23 +184,23 @@ Page({
this.setData({'status':0})
},
complete: function (response) {
this.setData({'status':0})
wx.hideNavigationBarLoading();
}
})
}else{
UTIL.httpRequest(API.URL_POST_DEPOSITUPDATE, that.data.form, {
success: (res) => {
wx.showToast({
title: "修改成功!",
duration: 2000,
icon:"success"
})
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
this.setData({'status':0})
if(res.code == 200){
UTIL.showToastNoneIcon('修改成功');
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
}else{
UTIL.showToastNoneIcon('修改失败');
}
},
fail: function (response) {
if (typeof fail === FUNCTION_TEXT) {
@@ -211,7 +211,6 @@ Page({
this.setData({'status':0})
},
complete: function (response) {
this.setData({'status':0})
wx.hideNavigationBarLoading();
}
})


+ 39
- 26
pages/bankDraft/add/add.js Datei anzeigen

@@ -27,6 +27,9 @@ Page({
showBtn:true,
showStartTime:false,
showEndTime:false,
status:0,
orderTypeindex:0,
orderStatusindex:0
},

/**
@@ -144,12 +147,19 @@ Page({
[even.currentTarget.dataset.name]:false
})
},
onConfirmOrderType(event) {
onConfirmorderType (e) {
let obj = e.detail.value;
this.setData({
[event.currentTarget.dataset.name]: false,
[event.currentTarget.dataset.value]: event.detail.value.dictValue,
[event.currentTarget.dataset.value+'Text']: event.detail.value.dictLabel,
});
'form.orderType':this.data.orderTypeOptions[obj].dictValue,
'orderTypeindex':obj
})
},
onConfirmorderStatus (e) {
let obj = e.detail.value;
this.setData({
'form.orderStatus':this.data.orderStatusOptions[obj].dictValue,
'orderStatusindex':obj
})
},
goSubmit(){
if(this.data.form.orderNum===''||this.data.form.orderNum==null){ //汇票号码
@@ -179,37 +189,40 @@ Page({
}else if(this.data.form.orderStatus === ''||this.data.form.orderStatus==null){//联行号
UTIL.showToastNoneIcon('汇票状态不能为空!');
return false;
}else{
}else if(this.data.status=='0'){
this.setData({'status':'1'})
var that = this;
that.data.form.method = 'POST';
if(that.data.form.id==""||that.data.form.id==null){
UTIL.httpRequest(API.URL_POST_MONEYORDERADD, that.data.form , {
success: (res) => {
wx.showToast({
title: '新增成功',
icon: 'success',
duration: 2000,
complete(){
setTimeout(function(){
that.back();
},2000)
}
})
this.setData({'status':0})
if(res.code == 200){
UTIL.showToastNoneIcon('新增成功');
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
}else{
UTIL.showToastNoneIcon('新增失败');
}
}
})
}else{
UTIL.httpRequest(API.URL_POST_MONEYORDERUPDATE, that.data.form , {
success: (res) => {
wx.showToast({
title: '修改成功',
icon: 'success',
duration: 2000,
complete(){
setTimeout(function(){
that.back();
},2000)
}
})
this.setData({'status':0})
if(res.code == 200){
UTIL.showToastNoneIcon('修改成功');
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
}else{
UTIL.showToastNoneIcon('修改失败');
}
}
})
}


+ 2
- 4
pages/fixedAssets/add/add.js Datei anzeigen

@@ -211,6 +211,7 @@ Page({
data.method = "POST";
UTIL.httpRequest(API.URL_POST_PERMANENTUPDATE,data,{
success: (res) => {
this.setData({'status':'0'})
if(res.code == 200){
UTIL.showToastNoneIcon('修改成功');
setTimeout(function(){
@@ -220,7 +221,6 @@ Page({
},2000)
}else{
UTIL.showToastNoneIcon('修改失败');
that.setData({'status':'0'})
}
},
fail: function (response) {
@@ -232,7 +232,6 @@ Page({
that.setData({'status':0})
},
complete: function (response) {
that.setData({'status':0})
wx.hideNavigationBarLoading();
}
})
@@ -241,6 +240,7 @@ Page({
data.method = "POST";
UTIL.httpRequest(API.URL_POST_PERMANENTADD,data,{
success: (res) => {
that.setData({'status':'0'})
if(res.code == 200){
UTIL.showToastNoneIcon(res.msg);
setTimeout(function(){
@@ -250,7 +250,6 @@ Page({
},2000)
}else{
UTIL.showToastNoneIcon(res.msg);
that.setData({'status':'0'})
}
},
fail: function (response) {
@@ -262,7 +261,6 @@ Page({
that.setData({'status':0})
},
complete: function (response) {
that.setData({'status':0})
wx.hideNavigationBarLoading();
}
})


+ 23
- 23
pages/project/add/add.js Datei anzeigen

@@ -145,16 +145,17 @@ Page({
if(that.data.form.id==""||that.data.form.id==null){
UTIL.httpRequest(API.URL_GET_PROJECTADD, data, {
success: (res) => {
wx.showToast({
title: "新增成功!",
duration: 2000,
icon:"success"
})
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
this.setData({'status':0})
if(res.code == 200){
UTIL.showToastNoneIcon('新增成功');
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
}else{
UTIL.showToastNoneIcon('新增失败');
}
},
fail: function (response) {
if (typeof fail === FUNCTION_TEXT) {
@@ -162,26 +163,26 @@ Page({
} else {
showToastNoneIcon(API.MSG_FAIL_HTTP);
}
this.setData({'status':0})
that.setData({'status':0})
},
complete: function (response) {
this.setData({'status':0})
wx.hideNavigationBarLoading();
}
})
}else{
UTIL.httpRequest(API.URL_POST_PROJECTUPDATE, data, {
success: (res) => {
wx.showToast({
title: "修改成功!",
duration: 2000,
icon:"success"
})
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
this.setData({'status':0})
if(res.code == 200){
UTIL.showToastNoneIcon('修改成功');
setTimeout(function(){
wx.navigateBack({
delta:1
})
},2000)
}else{
UTIL.showToastNoneIcon('修改失败');
}
},
fail: function (response) {
if (typeof fail === FUNCTION_TEXT) {
@@ -192,7 +193,6 @@ Page({
this.setData({'status':0})
},
complete: function (response) {
this.setData({'status':0})
wx.hideNavigationBarLoading();
}
})


Laden…
Abbrechen
Speichern