| xqd
@@ -77,6 +77,7 @@
|
|
|
:showas="false" :plname="'搜索兑换人名称'" @search="searchAcceptor"></uni-data-select>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<view class="listitem">
|
|
|
<text class="lys">出票人</text>
|
|
|
<view class="chosbox" @click="checkldrwIndex(index)">
|
| xqd
@@ -139,7 +140,7 @@
|
|
|
<view class="listitem">
|
|
|
<text class="lys">服务费率</text>
|
|
|
<view class="inbox">
|
|
|
- <input type="digit" v-model="item.serviceRate" placeholder="显示对于费率"
|
|
|
+ <input type="digit" v-model="item.serviceRate+'%'" placeholder="显示对于费率"
|
|
|
placeholder-style="color:#BEBDBB" @blur="getserviceRate"
|
|
|
@input="getserviceRateIndex(index)" disabled="true"/>
|
|
|
</view>
|
| xqd
@@ -157,7 +158,7 @@
|
|
|
<view class="listitem">
|
|
|
<text class="lys">利率</text>
|
|
|
<view class="inbox">
|
|
|
- <input type="digit" v-model="item.interestRate" placeholder="显示对于利率"
|
|
|
+ <input type="digit" v-model="item.interestRate+'%'" placeholder="显示对于利率"
|
|
|
placeholder-style="color:#BEBDBB" @blur="getinterestRate"
|
|
|
@input="getinterestRateIndex(index)" disabled="true"/>
|
|
|
</view>
|
| xqd
@@ -227,15 +228,11 @@
|
|
|
seacept:'',
|
|
|
seadra:'',
|
|
|
form: {
|
|
|
- name: '',
|
|
|
- supplierId: '',
|
|
|
- invoicePics: [],
|
|
|
- pics: [],
|
|
|
- tradePics: [],
|
|
|
+ id:'',
|
|
|
contractDrafts: [{
|
|
|
name: '',
|
|
|
draftNo: '',
|
|
|
- acceptor: '',
|
|
|
+ acceptor:'',
|
|
|
acceptorId: '',
|
|
|
drawersId: '',
|
|
|
drawers: '',
|
| xqd
@@ -263,20 +260,54 @@
|
|
|
sindex: 0,
|
|
|
rindex: 0,
|
|
|
acptIndex:0,
|
|
|
- drwIndex:0
|
|
|
+ drwIndex:0,
|
|
|
+ again:false
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(o) {
|
|
|
that = this
|
|
|
|
|
|
this.form.supplierId = uni.getStorageSync('supplierId')
|
|
|
- // console.log(this.form.supplierId,778)
|
|
|
this.loadTime()
|
|
|
-
|
|
|
+ if(o.obj){
|
|
|
+ this.again=true
|
|
|
+ let obj=JSON.parse((o.obj))
|
|
|
+ let form=obj.contractDrafts
|
|
|
+ console.log(obj,9996)
|
|
|
+ this.form.id=obj.id
|
|
|
+ console.log(form,778)
|
|
|
+ let inform=this.form.contractDrafts[0]
|
|
|
+ inform.name=form[0].name
|
|
|
+ inform.id=form[0].id
|
|
|
+ inform.acceptorId=form[0].acceptorId
|
|
|
+ inform.drawersId=form[0].drawersId
|
|
|
+ inform.money=form[0].money
|
|
|
+ inform.draftNo=form[0].draftNo
|
|
|
+ inform.loanLimit=form[0].loanLimit
|
|
|
+ inform.serviceRate=form[0].serviceRate
|
|
|
+ inform.interestRate=form[0].interestRate
|
|
|
+ inform.interest=form[0].interest
|
|
|
+ inform.serviceMoney=form[0].serviceMoney
|
|
|
+ inform.expectDiscountDate=form[0].expectDiscountDate
|
|
|
+ inform.acceptDate=form[0].acceptDate
|
|
|
+ inform.issueDate=form[0].issueDate
|
|
|
+ inform.expireDate=form[0].expireDate
|
|
|
+ form.forEach(item=>{
|
|
|
+ item.picList.forEach(i=>{
|
|
|
+ item.picUrling=[]
|
|
|
+ item.picUrling.push({"url":i})
|
|
|
+ })
|
|
|
+ })
|
|
|
+ inform.picUrling=form[0].picUrling
|
|
|
+ }
|
|
|
+ // this.initAcceptor()
|
|
|
+ // this.initDrawers()
|
|
|
},
|
|
|
onShow(){
|
|
|
this.initAcceptor()
|
|
|
this.initDrawers()
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
loadTime() {
|
| xqd
@@ -298,11 +329,10 @@
|
|
|
item.limitTime = Math.floor(nTime / 86400000);
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
- initAcceptor(){
|
|
|
+
|
|
|
+ initAcceptor(){
|
|
|
// 承兑人列表
|
|
|
- uni.$u.http.post('/api/Acceptor/search',{
|
|
|
+ uni.$u.http.post('/api/Acceptor/search',{
|
|
|
name:this.seacept
|
|
|
},{
|
|
|
|
| xqd
@@ -313,13 +343,22 @@
|
|
|
}).then((res) => {
|
|
|
uni.hideLoading()
|
|
|
this.range1 = res.result
|
|
|
- // for(let i in this.range1){
|
|
|
-
|
|
|
- // }
|
|
|
this.range1.forEach((item, index) => {
|
|
|
this.range1[index].value = index
|
|
|
this.range1[index].text = item.name
|
|
|
})
|
|
|
+ if(this.again){
|
|
|
+
|
|
|
+ that.range1.forEach((item,index)=>{
|
|
|
+ console.log(that.form.contractDrafts[0],item)
|
|
|
+ if(item.id==that.form.contractDrafts[0].acceptorId){
|
|
|
+ console.log(555555555555555555555555)
|
|
|
+ that.form.contractDrafts[0].acceptor=index
|
|
|
+ console.log(that.form.contractDrafts[0].acceptor)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}).catch((err) => {})
|
|
|
},
|
|
|
initDrawers(){
|
| xqd
@@ -337,6 +376,14 @@
|
|
|
this.range2[index].value = index
|
|
|
this.range2[index].text = item.name
|
|
|
})
|
|
|
+ if(this.again){
|
|
|
+
|
|
|
+ that.range2.forEach((item,index)=>{
|
|
|
+ if(item.id==that.form.contractDrafts[0].drawersId){
|
|
|
+ that.form.contractDrafts[0].drawers=index
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}).catch((err) => {})
|
|
|
},
|
|
|
searchAcceptor(e){
|
| xqd
@@ -425,7 +472,7 @@
|
|
|
upAll() {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
- content: '是否上传合同?',
|
|
|
+ content: '是否上传汇票?',
|
|
|
success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
let form = that.form
|
| xqd
@@ -471,6 +518,7 @@
|
|
|
that.$toast('请输入服务费率')
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
if (i.interestRate.length == 0) {
|
|
|
that.$toast('请输入利率')
|
|
|
return
|
| xqd
@@ -510,7 +558,7 @@
|
|
|
})
|
|
|
})
|
|
|
uni.showLoading()
|
|
|
- uni.$u.http.post('/api/Contract/addContractDraft', form.contractDrafts, {
|
|
|
+ uni.$u.http.post('/api/Contract/addContractDraft', form, {
|
|
|
custom: {
|
|
|
auth: true
|
|
|
}
|
| xqd
@@ -523,6 +571,11 @@
|
|
|
that.form.contractDrafts.forEach(item => {
|
|
|
item.picUrls = []
|
|
|
})
|
|
|
+ setTimeout(()=>{
|
|
|
+ uni.navigateBack({
|
|
|
+ delta:1
|
|
|
+ })
|
|
|
+ },500)
|
|
|
}).catch((err) => {
|
|
|
uni.hideLoading()
|
|
|
that.$toast(err.msg)
|
| xqd
@@ -566,7 +619,6 @@
|
|
|
let myDate = new Date()
|
|
|
// let wk = Date.parse(new Date());
|
|
|
let wk = Date.parse(new Date())
|
|
|
- console.log(wk)
|
|
|
let yy = String(myDate.getFullYear())
|
|
|
// let mm = myDate.getMonth() + 1
|
|
|
let mm = String(myDate.getMonth() + 1 < 10 ? '0' + (myDate.getMonth() + 1) : myDate.getMonth() + 1)
|
| xqd
@@ -585,7 +637,6 @@
|
|
|
this.form.contractDrafts.push(form[0])
|
|
|
},
|
|
|
changeacPerson(e) {
|
|
|
- console.log(e,88)
|
|
|
this.acceptor = e
|
|
|
for(let i in this.range1){
|
|
|
if(i==e){
|
| xqd
@@ -702,7 +753,6 @@
|
|
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
|
|
|
if (event.name >= 4) {
|
|
|
- console.log(2222222222999)
|
|
|
let lists = [].concat(event.file)
|
|
|
let icurls= this.form.contractDrafts[this.allindex].picUrling
|
|
|
let fileListLen = icurls.length
|