@@ -32,8 +32,13 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" ></image> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"> | |||||
<view> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||||
</view> | |||||
<view> | |||||
<text style="color:red">删除</text> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
@@ -89,7 +89,6 @@ Page({ | |||||
this.onShow(); | this.onShow(); | ||||
}, | }, | ||||
paging(){ | paging(){ | ||||
console.log(1); | |||||
this.setData({ | this.setData({ | ||||
pageNums:this.data.pageNums+1, | pageNums:this.data.pageNums+1, | ||||
}) | }) | ||||
@@ -117,7 +116,8 @@ Page({ | |||||
response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | ||||
response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | ||||
response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | ||||
response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | |||||
response.rows[i].orderAmount = Number(response.rows[i].orderAmount).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
} | } | ||||
that.setData({ | that.setData({ | ||||
moneyorderList:response.rows | moneyorderList:response.rows | ||||
@@ -263,7 +263,6 @@ Page({ | |||||
}, | }, | ||||
confirmTem:function(e){ | confirmTem:function(e){ | ||||
let event = this.data.fileEvent | let event = this.data.fileEvent | ||||
console.log(event); | |||||
UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
@@ -55,11 +55,21 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;background-color: rgb(255,0,0,0.4);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete" wx-if="{{item.orderStatus==1}}"> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" ></image> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete" wx-if="{{item.orderStatus==1}}"> | |||||
<view> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||||
</view> | |||||
<view> | |||||
<text style="color:red">删除</text> | |||||
</view> | |||||
</view> | </view> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;background-color: rgb(98,173,102,0.4);" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | |||||
<image src="../../image/icon/upload_icon.png" style="width: 25px;height: 25px;margin: 0 auto;" ></image> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(98,173,102,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | |||||
<view> | |||||
<image src="../../image/icon/upload_icon.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||||
</view> | |||||
<view> | |||||
<text style="color: #62AD66;">附件</text> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
@@ -56,7 +56,6 @@ Page({ | |||||
this.setData({ | this.setData({ | ||||
[event.currentTarget.dataset.formname]: event.detail, | [event.currentTarget.dataset.formname]: event.detail, | ||||
}) | }) | ||||
console.log(this.data.form); | |||||
}, | }, | ||||
closeBox(even){ | closeBox(even){ | ||||
this.setData({ | this.setData({ | ||||
@@ -119,7 +118,6 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
onConfirmAssetType (e) { | onConfirmAssetType (e) { | ||||
console.log(e); | |||||
let obj = e.detail.value; | let obj = e.detail.value; | ||||
this.setData({ | this.setData({ | ||||
'form.assetType':this.data.assetTypeOptions[obj].dictValue, | 'form.assetType':this.data.assetTypeOptions[obj].dictValue, | ||||
@@ -328,7 +326,6 @@ Page({ | |||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bidding_types', {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bidding_types', {method:'GET'}, { | ||||
success: (r) => { | success: (r) => { | ||||
if(r.data.length>0){ | if(r.data.length>0){ | ||||
console.log(res.data,r.data); | |||||
that.setData({ | that.setData({ | ||||
biddingTypeOptions:r.data, | biddingTypeOptions:r.data, | ||||
}) | }) | ||||
@@ -23,6 +23,7 @@ Page({ | |||||
uploadOptions:[], | uploadOptions:[], | ||||
fileList:[], | fileList:[], | ||||
showPopup:false, | showPopup:false, | ||||
showPopupDel:false, | |||||
showRelevance:false, | showRelevance:false, | ||||
relevanceList:[], | relevanceList:[], | ||||
fileEvent:{}, | fileEvent:{}, | ||||
@@ -71,6 +72,7 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
getList:function(){ | getList:function(){ | ||||
let _this = this | |||||
let params = { | let params = { | ||||
pageNum:this.data.pageNums, | pageNum:this.data.pageNums, | ||||
pageSize:10, | pageSize:10, | ||||
@@ -78,13 +80,24 @@ Page({ | |||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_CONTRACTLIST,params,{ | UTIL.httpRequest(API.URL_GET_CONTRACTLIST,params,{ | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
if(res.code == 200){ | if(res.code == 200){ | ||||
if(this.data.pageNums!=1&&this.data.list.length<res.total){ | if(this.data.pageNums!=1&&this.data.list.length<res.total){ | ||||
let lists = this.data.list.concat(res.rows) | |||||
this.setData({list:lists}) | |||||
res.rows.map((rr,index) => { | |||||
rr.totalAmount = Number(rr.totalAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
if(index==(res.rows.length-1)){ | |||||
let lists = this.data.list.concat(res.rows) | |||||
_this.setData({list:lists}) | |||||
} | |||||
}) | |||||
}else if(this.data.pageNums==1){ | }else if(this.data.pageNums==1){ | ||||
this.setData({list:res.rows}) | |||||
res.rows.map((rr,index) => { | |||||
rr.totalAmount = Number(rr.totalAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
if(index==(res.rows.length-1)){ | |||||
_this.setData({list:res.rows}) | |||||
} | |||||
}) | |||||
} | } | ||||
}else{ | }else{ | ||||
UTIL.showToastNoneIcon(res.msg); | UTIL.showToastNoneIcon(res.msg); | ||||
@@ -113,11 +126,25 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
delete(e){ | delete(e){ | ||||
UTIL.httpRequest(API.URL_GET_CONTRACTDELETE + e.currentTarget.dataset.id, {method:'GET'}, { | |||||
this.setData({ | |||||
'itemId':e.currentTarget.dataset.id, | |||||
"showPopupDel":true | |||||
}); | |||||
}, | |||||
cancelTemDel:function(e){ | |||||
this.setData({ | |||||
"itemId":"", | |||||
"showPopupDel":false | |||||
}); | |||||
}, | |||||
confirmTemDel:function(e){ | |||||
this.setData({ | |||||
"showPopupDel":false | |||||
}); | |||||
UTIL.httpRequest(API.URL_GET_CONTRACTDELETE+this.data.itemId , {method:'GET'}, { | |||||
success: (res) => { | success: (res) => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
let new_list = this.data.list | let new_list = this.data.list | ||||
console.log(e.currentTarget.dataset.index); | |||||
new_list.splice(e.currentTarget.dataset.index,1) | new_list.splice(e.currentTarget.dataset.index,1) | ||||
this.setData({'list':new_list}) | this.setData({'list':new_list}) | ||||
UTIL.showToastNoneIcon('删除成功!'); | UTIL.showToastNoneIcon('删除成功!'); | ||||
@@ -141,7 +168,6 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
relevanceDelete(e){ | relevanceDelete(e){ | ||||
console.log(e); | |||||
UTIL.httpRequest(API.URL_GET_ASSETREMOVE+ e.currentTarget.dataset.id, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_ASSETREMOVE+ e.currentTarget.dataset.id, {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
@@ -152,12 +178,6 @@ Page({ | |||||
}else{ | }else{ | ||||
UTIL.showToastNoneIcon('删除失败!'); | UTIL.showToastNoneIcon('删除失败!'); | ||||
} | } | ||||
}, | |||||
fail:(rr) =>{ | |||||
console.log(rr); | |||||
}, | |||||
complete:(rr) => { | |||||
console.log(rr); | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
@@ -172,12 +192,6 @@ Page({ | |||||
'showRelevance':true, | 'showRelevance':true, | ||||
'contractionId':e.currentTarget.dataset.id | 'contractionId':e.currentTarget.dataset.id | ||||
}) | }) | ||||
}, | |||||
fail:(rr) =>{ | |||||
console.log(rr); | |||||
}, | |||||
complete:(rr) => { | |||||
console.log(rr); | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
@@ -217,12 +231,6 @@ Page({ | |||||
_this.setData({"fileList":newuploadList}); | _this.setData({"fileList":newuploadList}); | ||||
_this.setData({"showUpload":true}) | _this.setData({"showUpload":true}) | ||||
} | } | ||||
}, | |||||
fail:(rr) =>{ | |||||
console.log(rr); | |||||
}, | |||||
complete:(rr) => { | |||||
console.log(rr); | |||||
} | } | ||||
}) | }) | ||||
}) | }) | ||||
@@ -242,7 +250,6 @@ Page({ | |||||
}, | }, | ||||
confirmTem:function(e){ | confirmTem:function(e){ | ||||
let event = this.data.fileEvent | let event = this.data.fileEvent | ||||
console.log(event); | |||||
UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
@@ -340,7 +347,6 @@ Page({ | |||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow() { | onShow() { | ||||
console.log(this.data.contractionId) | |||||
if(this.data.contractionId!=""&&this.data.contractionId!=null){ | if(this.data.contractionId!=""&&this.data.contractionId!=null){ | ||||
this.relevanceBack() | this.relevanceBack() | ||||
} | } | ||||
@@ -128,4 +128,7 @@ | |||||
</van-action-sheet> | </van-action-sheet> | ||||
<modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | <modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | ||||
</modal> | |||||
<modal hidden="{{!showPopupDel}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTemDel" bindconfirm="confirmTemDel"> | |||||
</modal> | </modal> |
@@ -90,7 +90,6 @@ Page({ | |||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_PERMANENTLIST,params,{ | UTIL.httpRequest(API.URL_GET_PERMANENTLIST,params,{ | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
let _this = this | let _this = this | ||||
if(res.code == 200){ | if(res.code == 200){ | ||||
if(this.data.pageNums!=1&&this.data.list.length<res.total){ | if(this.data.pageNums!=1&&this.data.list.length<res.total){ | ||||
@@ -221,12 +220,6 @@ Page({ | |||||
_this.setData({"fileList":newuploadList}); | _this.setData({"fileList":newuploadList}); | ||||
_this.setData({"showUpload":true}) | _this.setData({"showUpload":true}) | ||||
} | } | ||||
}, | |||||
fail:(rr) =>{ | |||||
console.log(rr); | |||||
}, | |||||
complete:(rr) => { | |||||
console.log(rr); | |||||
} | } | ||||
}) | }) | ||||
}) | }) | ||||
@@ -245,7 +238,6 @@ Page({ | |||||
}, | }, | ||||
confirmTem:function(e){ | confirmTem:function(e){ | ||||
let event = this.data.fileEvent | let event = this.data.fileEvent | ||||
console.log(event); | |||||
UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
@@ -40,14 +40,32 @@ Page({ | |||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_FINANCIALLIST,params,{ | UTIL.httpRequest(API.URL_GET_FINANCIALLIST,params,{ | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
if(res.code == 200){ | if(res.code == 200){ | ||||
res.summary.syjc=Number(res.summary.syjc ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
res.summary.dai=Number(res.summary.dai ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
res.summary.jie=Number(res.summary.jie ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
res.summary.byjc=Number(res.summary.byjc ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
this.setData({'data':res.summary}) | this.setData({'data':res.summary}) | ||||
if(this.data.pageNums!=1&&this.data.financeList.length<res.total){ | if(this.data.pageNums!=1&&this.data.financeList.length<res.total){ | ||||
res.rows.map(rr => { | |||||
rr.jieAmount = Number(rr.jieAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
rr.daiAmount = Number(rr.daiAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
}) | |||||
let lists = this.data.financeList.concat(res.rows) | let lists = this.data.financeList.concat(res.rows) | ||||
this.setData({financeList:lists}) | this.setData({financeList:lists}) | ||||
}else if(this.data.pageNums==1){ | }else if(this.data.pageNums==1){ | ||||
res.rows.map(rr => { | |||||
rr.jieAmount = Number(rr.jieAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
rr.daiAmount = Number(rr.daiAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
}) | |||||
this.setData({financeList:res.rows}) | this.setData({financeList:res.rows}) | ||||
} | } | ||||
}else{ | }else{ | ||||
@@ -65,7 +83,6 @@ Page({ | |||||
qu.select("#top_view1").boundingClientRect() | qu.select("#top_view1").boundingClientRect() | ||||
qu.select("#top_view2").boundingClientRect() | qu.select("#top_view2").boundingClientRect() | ||||
qu.exec(res => { | qu.exec(res => { | ||||
console.log(res); | |||||
that.setData({ | that.setData({ | ||||
scrollHeight:wx.getSystemInfoSync().windowHeight-res[0].height-res[0].top-res[1].height-res[1].left*2 | scrollHeight:wx.getSystemInfoSync().windowHeight-res[0].height-res[0].top-res[1].height-res[1].left*2 | ||||
}) | }) | ||||
@@ -45,8 +45,8 @@ | |||||
<view class="workflow_list"> | <view class="workflow_list"> | ||||
<view class="process_intro"> | <view class="process_intro"> | ||||
<view class="name">{{item.voucherSummary}}</view> | <view class="name">{{item.voucherSummary}}</view> | ||||
<view class="amount" wx:if="{{item.jieAmount}}">¥+{{item.jieAmount?item.jieAmount:""}}</view> | |||||
<view class="amounts" wx:if="{{item.daiAmount}}">¥-{{item.daiAmount?item.daiAmount:""}}</view> | |||||
<view class="amount" wx:if="{{item.jieAmount!='0.00'}}">¥+{{item.jieAmount?item.jieAmount:""}}</view> | |||||
<view class="amounts" wx:if="{{item.daiAmount!='0.00'}}">¥-{{item.daiAmount?item.daiAmount:""}}</view> | |||||
</view> | </view> | ||||
<view class="process_pay"> | <view class="process_pay"> | ||||
<view class="describe"> | <view class="describe"> | ||||
@@ -71,7 +71,6 @@ Page({ | |||||
this.setData({ | this.setData({ | ||||
[event.currentTarget.dataset.formname]: event.detail, | [event.currentTarget.dataset.formname]: event.detail, | ||||
}) | }) | ||||
console.log(this.data.form); | |||||
}, | }, | ||||
closeBox(even){ | closeBox(even){ | ||||
this.setData({ | this.setData({ | ||||
@@ -226,7 +225,6 @@ Page({ | |||||
this.setData({ | this.setData({ | ||||
[e.currentTarget.dataset.name]: e.detail.value | [e.currentTarget.dataset.name]: e.detail.value | ||||
}) | }) | ||||
console.log(e); | |||||
if(e.currentTarget.dataset.name == 'form.originalValue' ){ | if(e.currentTarget.dataset.name == 'form.originalValue' ){ | ||||
this.setData({ | this.setData({ | ||||
'form.netValue' : e.detail.value, | 'form.netValue' : e.detail.value, | ||||
@@ -266,7 +264,6 @@ Page({ | |||||
UTIL.httpRequest(API.URL_GET_PERMANENTDETAIL + this.data.id, {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_PERMANENTDETAIL + this.data.id, {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
this.setData({'form':res.data}); | this.setData({'form':res.data}); | ||||
console.log(res.data); | |||||
let that = this; | let that = this; | ||||
//获取资产类别 | //获取资产类别 | ||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | ||||
@@ -85,11 +85,18 @@ Page({ | |||||
} | } | ||||
UTIL.httpRequest(API.URL_GET_PERMANENTLIST,params,{ | UTIL.httpRequest(API.URL_GET_PERMANENTLIST,params,{ | ||||
success: (res) => { | success: (res) => { | ||||
console.log(res); | |||||
let _this = this | let _this = this | ||||
if(res.code == 200){ | if(res.code == 200){ | ||||
if(this.data.pageNums!=1&&this.data.list.length<res.total){ | if(this.data.pageNums!=1&&this.data.list.length<res.total){ | ||||
let lists = this.data.list.concat(res.rows) | |||||
let lists = [] | |||||
res.rows.map((rr,index) => { | |||||
rr.originalValue = Number(rr.originalValue ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
if(index==(res.rows.length-1)){ | |||||
lists = _this.data.list.concat(res.rows) | |||||
} | |||||
}) | |||||
//获取资产类别 | //获取资产类别 | ||||
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | ||||
success: (r) => { | success: (r) => { | ||||
@@ -114,6 +121,8 @@ Page({ | |||||
success: (r) => { | success: (r) => { | ||||
if(r.data.length>0){ | if(r.data.length>0){ | ||||
let li = res.rows.map( ress => { | let li = res.rows.map( ress => { | ||||
ress.originalValue = Number(ress.originalValue ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
r.data.map(rr => { | r.data.map(rr => { | ||||
if(ress.assetType == rr.dictValue){ | if(ress.assetType == rr.dictValue){ | ||||
ress.assetType = rr.dictLabel | ress.assetType = rr.dictLabel | ||||
@@ -151,20 +160,48 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
delete(e){ | delete(e){ | ||||
UTIL.httpRequest(API.URL_GET_PERMANENTDELETE + e.currentTarget.dataset.id, {method:'GET'}, { | |||||
success: (res) => { | |||||
if(res.code==200){ | |||||
let new_list = this.data.list | |||||
console.log(e.currentTarget.dataset.index); | |||||
new_list.splice(e.currentTarget.dataset.index,1) | |||||
this.setData({'list':new_list}) | |||||
UTIL.showToastNoneIcon('删除成功!'); | |||||
}else{ | |||||
UTIL.showToastNoneIcon('删除失败!'); | |||||
} | |||||
} | |||||
}) | |||||
this.setData({ | |||||
'itemId':e.currentTarget.dataset.id, | |||||
"showPopupDel":true | |||||
}); | |||||
}, | }, | ||||
// cancelTemDel:function(e){ | |||||
// this.setData({ | |||||
// "itemId":"", | |||||
// "showPopupDel":false | |||||
// }); | |||||
// }, | |||||
// confirmTemDel:function(e){ | |||||
// this.setData({ | |||||
// "showPopupDel":false | |||||
// }); | |||||
// UTIL.httpRequest(API.URL_GET_CONTRACTDELETE+this.data.itemId , {method:'GET'}, { | |||||
// success: (res) => { | |||||
// if(res.code==200){ | |||||
// let new_list = this.data.list | |||||
// new_list.splice(e.currentTarget.dataset.index,1) | |||||
// this.setData({'list':new_list}) | |||||
// UTIL.showToastNoneIcon('删除成功!'); | |||||
// }else{ | |||||
// UTIL.showToastNoneIcon('删除失败!'); | |||||
// } | |||||
// } | |||||
// }) | |||||
// }, | |||||
// delete(e){ | |||||
// UTIL.httpRequest(API.URL_GET_PERMANENTDELETE + e.currentTarget.dataset.id, {method:'GET'}, { | |||||
// success: (res) => { | |||||
// if(res.code==200){ | |||||
// let new_list = this.data.list | |||||
// new_list.splice(e.currentTarget.dataset.index,1) | |||||
// this.setData({'list':new_list}) | |||||
// UTIL.showToastNoneIcon('删除成功!'); | |||||
// }else{ | |||||
// UTIL.showToastNoneIcon('删除失败!'); | |||||
// } | |||||
// } | |||||
// }) | |||||
// }, | |||||
upload(e){ | upload(e){ | ||||
this.setData({itemId:e.currentTarget.dataset.id}); | this.setData({itemId:e.currentTarget.dataset.id}); | ||||
this.asyncFun(e.currentTarget.dataset.id) | this.asyncFun(e.currentTarget.dataset.id) | ||||
@@ -201,12 +238,6 @@ Page({ | |||||
_this.setData({"fileList":newuploadList}); | _this.setData({"fileList":newuploadList}); | ||||
_this.setData({"showUpload":true}) | _this.setData({"showUpload":true}) | ||||
} | } | ||||
}, | |||||
fail:(rr) =>{ | |||||
console.log(rr); | |||||
}, | |||||
complete:(rr) => { | |||||
console.log(rr); | |||||
} | } | ||||
}) | }) | ||||
}) | }) | ||||
@@ -225,7 +256,6 @@ Page({ | |||||
}, | }, | ||||
confirmTem:function(e){ | confirmTem:function(e){ | ||||
let event = this.data.fileEvent | let event = this.data.fileEvent | ||||
console.log(event); | |||||
UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
@@ -47,11 +47,21 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"> | |||||
<view> | |||||
<image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||||
</view> | |||||
<view> | |||||
<text style="color:red">删除</text> | |||||
</view> | |||||
</view> | </view> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
<image src="../../image/apply/icon_add.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"></image> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(98,173,102,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | |||||
<view> | |||||
<image src="../../image/icon/upload_icon.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||||
</view> | |||||
<view> | |||||
<text style="color: #62AD66;">附件</text> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
@@ -75,5 +85,4 @@ | |||||
</scroll-view> | </scroll-view> | ||||
</van-action-sheet> | </van-action-sheet> | ||||
<modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | <modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | ||||
</modal> | </modal> |
@@ -37,9 +37,14 @@ | |||||
</view> | </view> | ||||
</van-cell> | </van-cell> | ||||
<view slot="right" class="deleteBox"> | <view slot="right" class="deleteBox"> | ||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
<image src="/image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | |||||
<view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"> | |||||
<view> | |||||
<image src="../../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||||
</view> | </view> | ||||
<view> | |||||
<text style="color:red">删除</text> | |||||
</view> | |||||
</view> | |||||
</view> | </view> | ||||
</van-swipe-cell> | </van-swipe-cell> | ||||
<view class="ipXbtn"></view> | <view class="ipXbtn"></view> | ||||
@@ -20,7 +20,6 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad(options) { | onLoad(options) { | ||||
console.log(options) | |||||
if(options.id!=null&&options.id!=""){ | if(options.id!=null&&options.id!=""){ | ||||
let that = this | let that = this | ||||
this.setData({id:options.id}) | this.setData({id:options.id}) | ||||
@@ -60,13 +59,11 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
closeBox(even){ | closeBox(even){ | ||||
console.log(even.currentTarget.dataset.name); | |||||
this.setData({ | this.setData({ | ||||
[even.currentTarget.dataset.name]:false | [even.currentTarget.dataset.name]:false | ||||
}) | }) | ||||
}, | }, | ||||
openBox(even){ | openBox(even){ | ||||
console.log(even.currentTarget.dataset.name); | |||||
this.setData({ | this.setData({ | ||||
[even.currentTarget.dataset.name]:true | [even.currentTarget.dataset.name]:true | ||||
}) | }) | ||||
@@ -78,7 +75,6 @@ Page({ | |||||
}); | }); | ||||
}, | }, | ||||
onConfirmYn(event) { | onConfirmYn(event) { | ||||
console.log(event); | |||||
this.setData({ | this.setData({ | ||||
[event.currentTarget.dataset.name]: false, | [event.currentTarget.dataset.name]: false, | ||||
[event.currentTarget.dataset.value]: event.detail.value.dictValue, | [event.currentTarget.dataset.value]: event.detail.value.dictValue, | ||||
@@ -144,7 +140,6 @@ Page({ | |||||
}, | }, | ||||
onChange(event){ | onChange(event){ | ||||
console.log(event); | |||||
this.setData({ | this.setData({ | ||||
[event.currentTarget.dataset.value]: event.detail, | [event.currentTarget.dataset.value]: event.detail, | ||||
}) | }) | ||||
@@ -95,7 +95,8 @@ this.onShow(); | |||||
response.rows[i].ynProjcetStatusText = UTIL.getTransform(response.rows[i].ynProjcetStatus,res.data); | response.rows[i].ynProjcetStatusText = UTIL.getTransform(response.rows[i].ynProjcetStatus,res.data); | ||||
response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | ||||
response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | ||||
response.rows[i].projectAmount = parseFloat(response.rows[i].projectAmount).toFixed(2); | |||||
response.rows[i].projectAmount = Number(response.rows[i].projectAmount).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||||
return $1 + ","; }).replace(/\.$/, "") | |||||
} | } | ||||
that.setData({ | that.setData({ | ||||
@@ -237,7 +238,6 @@ this.onShow(); | |||||
}, | }, | ||||
confirmTem:function(e){ | confirmTem:function(e){ | ||||
let event = this.data.fileEvent | let event = this.data.fileEvent | ||||
console.log(event); | |||||
UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | ||||
success: (res) => { | success: (res) => { | ||||
if(res.code==200){ | if(res.code==200){ | ||||
@@ -400,7 +400,7 @@ export { | |||||
URL_POST_CONTRACTUPDATE, | URL_POST_CONTRACTUPDATE, | ||||
URL_GET_CONTRACTDELETE, | URL_GET_CONTRACTDELETE, | ||||
URL_GET_ATTACHMENTLIST, | URL_GET_ATTACHMENTLIST, | ||||
URL_GET_MONEYORDERADD, | |||||
URL_POST_MONEYORDERADD, | |||||
URL_GET_PERMANENTLIST, | URL_GET_PERMANENTLIST, | ||||
URL_GET_PERMANENTDELETE, | URL_GET_PERMANENTDELETE, | ||||
URL_GET_PERMANENTDETAIL, | URL_GET_PERMANENTDETAIL, | ||||
@@ -412,7 +412,6 @@ export { | |||||
URL_GET_PROJECTADD, | URL_GET_PROJECTADD, | ||||
URL_GET_PROJECTDELETE, | URL_GET_PROJECTDELETE, | ||||
URL_GET_PASSWORDEDIT, | URL_GET_PASSWORDEDIT, | ||||
URL_GET_PAYEEEDIT, | |||||
URL_GET_ASSETLIST, | URL_GET_ASSETLIST, | ||||
URL_GET_MONEYORDERDETAIL, | URL_GET_MONEYORDERDETAIL, | ||||
URL_POST_MONEYORDERUPDATE, | URL_POST_MONEYORDERUPDATE, | ||||
@@ -421,7 +420,7 @@ export { | |||||
URL_GET_DEPOSITDETAIL, | URL_GET_DEPOSITDETAIL, | ||||
URL_POST_DEPOSITUPDATE, | URL_POST_DEPOSITUPDATE, | ||||
URL_GET_ASSETADD, | URL_GET_ASSETADD, | ||||
URL_GET_ASSETREMOVE | |||||
URL_GET_ASSETREMOVE, | |||||
URL_GET_PAYEEEDIT, | URL_GET_PAYEEEDIT, | ||||
URL_GET_PAYEEGET, | URL_GET_PAYEEGET, | ||||
URL_GET_PAYEEREMOVE | URL_GET_PAYEEREMOVE |