@@ -13,6 +13,8 @@ Page({ | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
minDate: new Date(2008, 5, 1).getTime(), | |||
maxDate: new Date(2040, 0, 31).getTime(), | |||
isIPX: app.globalData.isIPX, | |||
radio:'1', | |||
active:0, | |||
@@ -31,7 +31,7 @@ | |||
<text>联系电话:{{form.approvalItemTemplate.telephone}}</text> | |||
<van-field required label="申请时间:" readonly is-link value="{{ applyDate }}" placeholder="请选择申请时间" border="{{ false }}" bind:change="onChangeTime" bindtap="openBox" data-name="showApplyDate" /> | |||
<van-calendar show="{{ showApplyDate }}" bind:close="closeBox" data-name="showApplyDate" bind:confirm="onConfirmTime" data-value="form.transfers[{{index}}].applyDate" show-confirm="{{ false }}" /> | |||
<van-calendar show="{{ showApplyDate }}" min-date="{{minDate}}" max-date="{{maxDate}}" bind:close="closeBox" data-name="showApplyDate" bind:confirm="onConfirmTime" data-value="form.transfers[{{index}}].applyDate" show-confirm="{{ false }}" /> | |||
</view> | |||
<van-collapse accordion value="{{ activeNames }}" bind:change="onChangeBox" bind:open="onOpen" bind:close="onCloseSecond"> | |||
@@ -22,6 +22,8 @@ Page({ | |||
orderStatus: "", //汇票状态 必填 1在库 2转付中 3转付 4承兑 | |||
remark: "", | |||
}, | |||
minDate: new Date(2008, 5, 1).getTime(), | |||
maxDate: new Date(2040, 0, 31).getTime(), | |||
orderStatusOptions:[], | |||
orderTypeOptions:[], | |||
showBtn:true | |||
@@ -26,11 +26,11 @@ | |||
<van-field label="收票单位" value="{{ form.billReceiveUnit }}" placeholder="收票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billReceiveUnit"/> | |||
<van-field readonly label="开票日期" value="{{ form.startTime }}" placeholder="开票日期" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.startTime" bindtap="openBox" data-name="showStartTime"/> | |||
<van-calendar show="{{ showStartTime }}" bind:close="closeBox" data-name="showStartTime" bind:confirm="onConfirmTime" data-value="form.startTime" show-confirm="{{ false }}" /> | |||
<van-field readonly label="开票日期" value="{{ form.startTime }}" placeholder="开票日期" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.startTime" bindtap="openBox" data-name="showStartTime"/> | |||
<van-calendar show="{{ showStartTime }}" min-date="{{minDate}}" max-date="{{maxDate}}" bind:close="closeBox" data-name="showStartTime" bind:confirm="onConfirmTime" data-value="form.startTime" show-confirm="{{ false }}" /> | |||
<van-field readonly label="到期日期" value="{{ form.endTime }}" placeholder="到期日期" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.endTime" bindtap="openBox" data-name="showEndTime"/> | |||
<van-calendar show="{{ showEndTime }}" bind:close="closeBox" data-name="showEndTime" bind:confirm="onConfirmTime" data-value="form.endTime" show-confirm="{{ false }}" /> | |||
<van-calendar show="{{ showEndTime }}" min-date="{{minDate}}" max-date="{{maxDate}}" bind:close="closeBox" data-name="showEndTime" bind:confirm="onConfirmTime" data-value="form.endTime" show-confirm="{{ false }}" /> | |||
<van-popup show="{{showOrderStatus}}" round position="bottom" bind:close="closeBox" data-name="showOrderStatus"> | |||
<van-picker | |||
@@ -154,43 +154,43 @@ Page({ | |||
return mydate | |||
}, | |||
goSubmit:function(){ | |||
if(this.data.form.code==''||this.data.form.code==null){ //合同编码 | |||
if(this.data.form.code===''||this.data.form.code==null){ //合同编码 | |||
UTIL.showToastNoneIcon('请填写合同编码!'); | |||
return false; | |||
}else if(this.data.form.name==''||this.data.form.name==null){ //合同名称 | |||
}else if(this.data.form.name===''||this.data.form.name==null){ //合同名称 | |||
UTIL.showToastNoneIcon('请输入合同名称!'); | |||
return false; | |||
}else if(this.data.form.firstParty==''||this.data.form.firstParty==null){ //甲方 | |||
}else if(this.data.form.firstParty===''||this.data.form.firstParty==null){ //甲方 | |||
UTIL.showToastNoneIcon('请输入单据编码!'); | |||
return false; | |||
}else if(this.data.form.secondParty==''||this.data.form.secondParty==null){ //乙方 | |||
}else if(this.data.form.secondParty===''||this.data.form.secondParty==null){ //乙方 | |||
UTIL.showToastNoneIcon('请输入备注说明!'); | |||
return false; | |||
}else if(this.data.form.collectionPay == ''||this.data.form.collectionPay==null){//收付款类型 | |||
}else if(this.data.form.collectionPay === ''||this.data.form.collectionPay==null){//收付款类型 | |||
UTIL.showToastNoneIcon('收付款类型不能为空!'); | |||
return false; | |||
}else if(this.data.form.contractionSource == ''||this.data.form.contractionSource==null){//合同来源 | |||
}else if(this.data.form.contractionSource === ''||this.data.form.contractionSource==null){//合同来源 | |||
UTIL.showToastNoneIcon('合同来源不能为空!'); | |||
return false; | |||
}else if(this.data.form.totalAmount == ''||this.data.form.totalAmount==null){//合同金额 | |||
}else if(this.data.form.totalAmount === ''||this.data.form.totalAmount==null){//合同金额 | |||
UTIL.showToastNoneIcon('合同金额不能为空!'); | |||
return false; | |||
}else if(this.data.form.buildingTime == ''||this.data.form.buildingTime==null){//签订日期 | |||
}else if(this.data.form.buildingTime === ''||this.data.form.buildingTime==null){//签订日期 | |||
UTIL.showToastNoneIcon('合同金额不能为空!'); | |||
return false; | |||
}else if(this.data.form.startTime == ''||this.data.form.startTime==null){//开始日期 | |||
}else if(this.data.form.startTime === ''||this.data.form.startTime==null){//开始日期 | |||
UTIL.showToastNoneIcon('开始日期不能为空!'); | |||
return false; | |||
}else if(this.data.form.endTime == ''||this.data.form.endTime==null){//结束日期 | |||
}else if(this.data.form.endTime === ''||this.data.form.endTime==null){//结束日期 | |||
UTIL.showToastNoneIcon('结束日期不能为空!'); | |||
return false; | |||
}else if(this.data.form.price == ''||this.data.form.price==null){//单价 | |||
}else if(this.data.form.price === ''||this.data.form.price==null){//单价 | |||
UTIL.showToastNoneIcon('单价不能为空!'); | |||
return false; | |||
}else if(this.data.form.receivedAmount == ''||this.data.form.receivedAmount==null){//已结款 | |||
}else if(this.data.form.receivedAmount === ''||this.data.form.receivedAmount==null){//已结款 | |||
UTIL.showToastNoneIcon('已结款不能为空!'); | |||
return false; | |||
}else if(this.data.form.contractionStatus == ''||this.data.form.contractionStatus==null){//合同状态 | |||
}else if(this.data.form.contractionStatus === ''||this.data.form.contractionStatus==null){//合同状态 | |||
UTIL.showToastNoneIcon('单价不能为空!'); | |||
return false; | |||
}else{ | |||
@@ -251,7 +251,7 @@ | |||
<view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>招标日期</view> | |||
<picker mode="date" value="{{form.biddingDate}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmBiddingDate"> | |||
<view class="picker"> | |||
{{form.biddingDate?form.biddingDate:'招标日期'}} | |||
{{form.biddingDate?form.biddingDate.substring(0,9):'招标日期'}} | |||
</view> | |||
</picker> | |||
</view> | |||
@@ -292,7 +292,7 @@ | |||
<view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>审核时间</view> | |||
<picker mode="date" value="{{form.reviewTime}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmReviewTime"> | |||
<view class="picker"> | |||
{{form.reviewTime?form.reviewTime:'审核时间'}} | |||
{{form.reviewTime?form.reviewTime.substring(0,9):'审核时间'}} | |||
</view> | |||
</picker> | |||
</view> | |||
@@ -154,8 +154,11 @@ Page({ | |||
data.method = "POST"; | |||
data.assetTable = "t_asset_permanent" | |||
data.assetId = e.currentTarget.dataset.item.id | |||
data.contractionId = this.data.itemId | |||
data.contractionId = this.data.itemId | |||
data.num = e.currentTarget.dataset.item.quantity | |||
if(data.unit==""||data.unit==null){ | |||
data.unit = '1' | |||
} | |||
UTIL.httpRequest(API.URL_GET_ASSETADD,data,{ | |||
success: (res) => { | |||
if(res.code == 200){ | |||