|
|
@ -126,6 +126,17 @@ |
|
|
|
<thehomevisitisready v-show="viewState == 2" ref="divSelect" @doback="resetState"/> |
|
|
|
<!-- 查看销售订单 --> |
|
|
|
<saleOrder v-show="viewState == 3" ref="divSale" @doback="resetState"/> |
|
|
|
<!-- 生成合同 --> |
|
|
|
<el-dialog title="生成合同设置" :visible.sync="dialogVisible" width="50%"> |
|
|
|
<el-radio-group style="font-size: 1px" v-model="contract"> |
|
|
|
<el-radio label="001">一车一合同</el-radio> |
|
|
|
<el-radio label="002">一贷款人一合同</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="handleConfirm">确定</el-button> |
|
|
|
<el-button @click="dialogVisible = false">取消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -150,6 +161,7 @@ export default { |
|
|
|
return { |
|
|
|
viewState: 1, |
|
|
|
btndisabled: false, |
|
|
|
dialogVisible: false, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
@ -200,6 +212,7 @@ export default { |
|
|
|
size: 10, |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
contract: '', |
|
|
|
rules: {} |
|
|
|
} |
|
|
|
}, |
|
|
@ -276,10 +289,37 @@ export default { |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
toContract() {}, |
|
|
|
toContract() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
req.initConSetUp(this.sids[0]).then((res) => { |
|
|
|
if (res.data === '003') { |
|
|
|
this.dialogVisible = true |
|
|
|
this.contract = '' |
|
|
|
} else { |
|
|
|
this.saveLoanCon(res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
if (this.contract !== '') { |
|
|
|
this.dialogVisible = false |
|
|
|
this.saveLoanCon(this.contract) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择相应的生成合同设置方式' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
saveLoanCon(val) { |
|
|
|
req.saveLoanCon({ sid: this.sids[0], conSetUpKey: val }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '操作成功'}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleLook(row) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divSale'].showInfo(row.saleOrderSid) |
|
|
|