|
@@ -99,20 +99,16 @@
|
|
|
|
|
|
// this.userInfo = uni.getStorageSync("userInfo")
|
|
|
},
|
|
|
- onReachBottom() { //上拉触底函数
|
|
|
- if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
|
- this.warehouseInOutInfo.currentPage += 1
|
|
|
- this.Data()
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
getData(){
|
|
|
- var data=[]
|
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList',
|
|
|
{compId:this.pcUserInfo.compId,flag:3}).then(res => {
|
|
|
+ var data=[]
|
|
|
if(res.data.code==200){
|
|
|
- for(var i=0;i<res.data.data.length;i++){
|
|
|
- data.push({value:res.data.data[i].contractNo,label:res.data.data[i].contractNo})
|
|
|
+ if(res.data.data.length>0){
|
|
|
+ for(var i=0;i<res.data.data.length;i++){
|
|
|
+ data.push({value:res.data.data[i].contractNo,label:res.data.data[i].contractNo})
|
|
|
+ }
|
|
|
}
|
|
|
this.contractNoList=data
|
|
|
}
|
|
@@ -127,6 +123,10 @@
|
|
|
this.list.contractNo=item[0].value
|
|
|
},
|
|
|
audit(){
|
|
|
+ if (this.list.procurementPlanType == '期货') {
|
|
|
+ this.list.freezingDeposit = this.list.transactionsNumber*this.list.customerInfo.depositRatio
|
|
|
+ }
|
|
|
+ console.log(this.list)
|
|
|
var that=this
|
|
|
uni.showModal({
|
|
|
content: "审核通过后,将通知客户订单生效,是否确定通过审核?",
|
|
@@ -134,25 +134,25 @@
|
|
|
confirmText: '提交',
|
|
|
success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
- that.$api.doRequest('post', '/purchaseOrder/api/editPurchaseOrder', that.list).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
+ that.$api.doRequest('post', '/purchaseOrder/api/editPurchaseOrder', that.list).then(res1 => {
|
|
|
+ if (res1.data.code == 200) {
|
|
|
that.$api.doRequest('post', '/workflow/api/handle', {
|
|
|
taskId:that.list.taskId,
|
|
|
approved: true,
|
|
|
auditMind: '34',
|
|
|
needReapply: false,
|
|
|
- }).then(res1 => {
|
|
|
- if (res1.data.code == 200) {
|
|
|
+ }).then(res2 => {
|
|
|
+ if (res2.data.code == 200) {
|
|
|
that.$api.msg('审核成功');
|
|
|
that.$nextTick(function(){
|
|
|
uni.navigateBack(-1)
|
|
|
})
|
|
|
}else{
|
|
|
- that.$api.msg(res1.data.message);
|
|
|
+ that.$api.msg('系统异常,请联系管理员');
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- that.$api.msg(res.data.message);
|
|
|
+ that.$api.msg('系统异常,请联系管理员');
|
|
|
}
|
|
|
})
|
|
|
}
|