Commit 9d26f7c9 authored by Jennie Shi's avatar Jennie Shi

需求变更

parent 587b725c
...@@ -106,212 +106,241 @@ ...@@ -106,212 +106,241 @@
<span>合同明细</span> <span>合同明细</span>
</div> </div>
</h-header> </h-header>
<Tab :title="text" @getTabNum="getTabNum" />
<h-content> <h-content>
<div class="userInfo">承租人信息</div> <div v-show="tabNum===0">
<list-item :item-height="44"> <div class="userInfo">承租人信息</div>
<item v-if="!read" :showArrow="true"> <list-item :item-height="44">
<div slot="name">合同号</div> <item v-if="!read" :showArrow="true">
<input <div slot="name">合同号</div>
slot="content" <input
v-model="detail.project_number" slot="content"
placeholder="请选择合同号" v-model="detail.project_number"
@click="selectContruct" placeholder="请选择合同号"
> @click="selectContruct"
</item> >
<item v-if="read"> </item>
<div slot="name">合同号</div> <item v-if="read">
<input <div slot="name">合同号</div>
slot="content" <input
v-model="detail.project_number" slot="content"
readonly v-model="detail.project_number"
placeholder="暂无数据" readonly
> placeholder="暂无数据"
</item> >
<item v-if="!read" :showArrow="true"> </item>
<div slot="name">经销商</div> <item v-if="!read" :showArrow="true">
<input <div slot="name">经销商</div>
slot="content" <input
v-model="detail.bp_agent_name" slot="content"
placeholder="请选择经销商" v-model="detail.bp_agent_name"
@click="selectAgent" placeholder="请选择经销商"
> @click="selectAgent"
</item> >
<item v-if="read"> </item>
<div slot="name"> <item v-if="read">
{{ detail.bp_agent_name ? "经销商" : "办事处" }} <div slot="name">
</div> {{ detail.bp_agent_name ? "经销商" : "办事处" }}
<div slot="content"> </div>
{{ <div slot="content">
detail.bp_agent_name ? detail.bp_agent_name : detail.office_name {{
}} detail.bp_agent_name ? detail.bp_agent_name : detail.office_name
</div> }}
</item> </div>
<item> </item>
<div slot="name">承租人</div> <item>
<input <div slot="name">承租人</div>
slot="content" <input
v-model="detail.bp_name" slot="content"
:placeholder="read ? '暂无数据' : '请输入承租人姓名'" v-model="detail.bp_name"
readonly="read" :placeholder="read ? '暂无数据' : '请输入承租人姓名'"
> readonly="read"
</item> >
<item v-if="!read" :showArrow="true"> </item>
<div slot="name">产品名称</div> <item v-if="!read" :showArrow="true">
<input <div slot="name">产品名称</div>
slot="content" <input
v-model="detail.division_n" slot="content"
placeholder="请选择产品名称" v-model="detail.division_n"
@click="selectProductLine" placeholder="请选择产品名称"
> @click="selectProductLine"
</item> >
<item v-if="read"> </item>
<div slot="name">产品名称</div> <item v-if="read">
<input <div slot="name">产品名称</div>
slot="content" <input
v-model="detail.division_n" slot="content"
readonly v-model="detail.division_n"
placeholder="暂无数据" readonly
> placeholder="暂无数据"
</item> >
<item v-if="read"> </item>
<div slot="name">产品型号</div> <item v-if="read">
<input <div slot="name">产品型号</div>
slot="content" <input
v-model="detail.product_code" slot="content"
readonly v-model="detail.product_code"
placeholder="暂无数据" readonly
> placeholder="暂无数据"
</item> >
<item> </item>
<div slot="name">合同金额</div> <item>
<input <div slot="name">合同金额</div>
slot="content" <input
v-model="detail.total_price" slot="content"
:placeholder="read ? '暂无数据' : '请输入合同金额'" v-model="detail.total_price"
:readonly="read" :placeholder="read ? '暂无数据' : '请输入合同金额'"
> :readonly="read"
</item> >
<item v-if="!read" :showArrow="true"> </item>
<div slot="name">商务政策</div> <item v-if="!read" :showArrow="true">
<input <div slot="name">商务政策</div>
slot="content" <input
v-model="detail.product_plan_id_n" slot="content"
placeholder="请选择合同政策" v-model="detail.product_plan_id_n"
@click="selectProductPlan" placeholder="请选择合同政策"
> @click="selectProductPlan"
</item> >
<item v-if="read"> </item>
<div slot="name">商务政策</div> <item v-if="read">
<input <div slot="name">商务政策</div>
slot="content" <input
v-model="detail.product_plan_id_n" slot="content"
readonly v-model="detail.product_plan_id_n"
placeholder="暂无数据" readonly
> placeholder="暂无数据"
</item> >
<item> </item>
<div slot="name">租赁物数量</div> <item>
<input <div slot="name">租赁物数量</div>
slot="content" <input
v-model="detail.product_num" slot="content"
:readonly="read" v-model="detail.product_num"
placeholder="请输入租赁物数量" :readonly="read"
> placeholder="请输入租赁物数量"
</item> >
<item </item>
v-if="!flag" <item
class="date-check" v-if="!flag"
@click.native="showFirstTime('YYYY-MM-DD', 'Sign')" class="date-check"
> @click.native="showFirstTime('YYYY-MM-DD', 'Sign')"
<div slot="name" class="firstPay">签约日期</div>
<input
slot="content"
v-model="detail.sale_date"
readonly
placeholder="请选择日期 "
class="firstPay"
> >
</item> <div slot="name" class="firstPay">签约日期</div>
<item <input
v-if="flag" slot="content"
> v-model="detail.sale_date"
<div slot="name" class="firstPay">签约日期</div> readonly
<input placeholder="请选择日期 "
slot="content" class="firstPay"
v-model="detail.sale_date" >
readonly </item>
placeholder="请选择日期 " <item
class="firstPay" v-if="flag"
> >
</item> <div slot="name" class="firstPay">签约日期</div>
<item <input
v-if="!flag" slot="content"
class="date-check" v-model="detail.sale_date"
@click.native="showFirstTime('YYYY-MM-DD', 'FirstPay')" readonly
> placeholder="请选择日期 "
<div slot="name" class="firstPay">首次分期付款日</div> class="firstPay"
<input >
slot="content" </item>
v-model="detail.lease_start_date" <item
readonly v-if="!flag"
placeholder="请选择日期 " class="date-check"
class="firstPay" @click.native="showFirstTime('YYYY-MM-DD', 'FirstPay')"
> >
</item> <div slot="name" class="firstPay">首次分期付款日</div>
<item <input
v-if="flag" slot="content"
> v-model="detail.lease_start_date"
<div slot="name" class="firstPay">首次分期付款日</div> readonly
<input placeholder="请选择日期 "
slot="content" class="firstPay"
v-model="detail.lease_start_date" >
readonly </item>
placeholder="请选择日期 " <item
class="firstPay" v-if="flag"
> >
</item> <div slot="name" class="firstPay">首次分期付款日</div>
<input
slot="content"
v-model="detail.lease_start_date"
readonly
placeholder="请选择日期 "
class="firstPay"
>
</item>
<item :showArrow="true" @click.native="goPlan"> <item :showArrow="true" @click.native="goPlan">
<div slot="name">查看还款计划</div> <div slot="name">查看还款计划</div>
<input slot="content" readonly > <input slot="content" readonly >
</item> </item>
</list-item> </list-item>
<div class="userInfo">设备清单</div> <div class="userInfo">设备清单</div>
<div <div
v-for="(item, index) in equip" v-for="(item, index) in equip"
:key="index" :key="index"
class="equipment" class="equipment"
@click=" @click="
downNum = true; downNum = true;
getRent(item.contract_id, item.contract_lease_item_id); getRent(item.contract_id, item.contract_lease_item_id);
" "
> >
<div class="left"> <div class="left">
<span> <span>
<img src="@/assets/contractStart/list.png" > <img src="@/assets/contractStart/list.png" >
</span> </span>
</div> </div>
<div class="center"> <div class="center">
<span>租赁物信息</span> <span>租赁物信息</span>
<span <span
:class="[ :class="[
'status', 'status',
item.lease_status === 'Y' ? 'unMantain' : 'mantain', item.lease_status === 'Y' ? 'unMantain' : 'mantain',
]" ]"
>{{ item.lease_status === "Y" ? "已维护" : "待维护" }}</span >{{ item.lease_status === "Y" ? "已维护" : "待维护" }}</span
> >
<p> <p>
设备识别号 设备识别号
<span>{{ item.product_code }}-{{ (index + 1) | lengthCheck }}</span> <span>{{ item.product_code }}-{{ (index + 1) | lengthCheck }}</span>
</p> </p>
</div> </div>
<div class="right"> <div class="right">
<img src="@/assets/contractStart/into.png" > <img src="@/assets/contractStart/into.png" >
</div>
</div> </div>
</div> </div>
<div v-show="tabNum===1">
<list-item
:item-height="56"
class="contract-text"
style="background-color:rgb(250,250,250);"
>
<item v-for="(item,index) in attachArray" :proportion="[7,1]" :key="index">
<div slot="name" class="aguremrnt-list">
<img src="@/assets/constractSigning/npack.png" alt class="pics" >
<p class="second first">{{ item.attachment_file }}</p>
<img v-if="item.read_status === 'N'" class="unread" src="@/assets/constractSigning/unread.png" >
<img v-if="item.read_status === 'Y'" class="unread" src="@/assets/constractSigning/read.png" >
<div
v-if="item.template_code === 'PRE_ABC_PAYMENT'"
class="wrap-img"
@click="entryInfo"
>
<img src="@/assets/constractSigning/scan.png" >
</div>
</div>
<div slot="content" class="in-detail" @click="goContent(item,index)">
<img src="@/assets/constractSigning/detail.png" alt >
</div>
</item>
</list-item>
</div>
</h-content> </h-content>
<bottom-tab v-if="!flag"> <bottom-tab v-if="!flag">
<!-- <tab-button class="save" @click.native="handSave">同步电子签</tab-button> --> <tab-button class="save" @click.native="generateContract">生成合同文本</tab-button>
<tab-button <tab-button
class="approve" @click.native="checkStatus" class="approve" @click.native="checkStatus"
>融租合同创建</tab-button >融租合同创建</tab-button
...@@ -364,7 +393,11 @@ ...@@ -364,7 +393,11 @@
</h-view> </h-view>
</template> </template>
<script> <script>
import Tab from '@/pages/carConfirm/tab'
export default { export default {
components: {
Tab,
},
filters: { filters: {
lengthCheck: function (value) { lengthCheck: function (value) {
if (value.toString().length === 1) { if (value.toString().length === 1) {
...@@ -390,7 +423,13 @@ export default { ...@@ -390,7 +423,13 @@ export default {
productLine: [], productLine: [],
productPlan: [], productPlan: [],
contract: [], contract: [],
tabNum: 0,
attachArray: [],
agent: [], agent: [],
text: {
first: '合同详情',
second: '合同文本',
},
info: { info: {
contract_id: '', contract_id: '',
frame_number: '', frame_number: '',
...@@ -464,6 +503,7 @@ export default { ...@@ -464,6 +503,7 @@ export default {
vm.read = true vm.read = true
vm.getDetail() vm.getDetail()
vm.getEquipment() vm.getEquipment()
vm.getAttachment()
if ( if (
vm.$route.query.car_start_status === 'REJECTED' || vm.$route.query.car_start_status === 'REJECTED' ||
vm.$route.query.car_start_status === 'NEW' vm.$route.query.car_start_status === 'NEW'
...@@ -495,6 +535,32 @@ export default { ...@@ -495,6 +535,32 @@ export default {
} }
}) })
}, },
goContent (item, index) {
// 详情
// 合同状态更新保存
let vm = this
vm.attachFlag = true
vm.attachUrl = item.attachment_file_path
let url = process.env.basePath + 'prj_content_check_status_save'
let param = {
master: {
content_id: item.content_id,
check_status: 'Y',
},
}
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(res => {
hlsPopup.hideLoading()
if (res.result === 'S') {
let temp = vm.attachArray[index]
temp.read_status = 'Y'
vm.$router.push({name: 'previewPdf', params: {attachUrl: vm.attachUrl}})
vm.attachArray.splice(vm.attachArray[index], 1, temp)
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
},
goPlan () { goPlan () {
let vm = this let vm = this
vm.$router.push({ vm.$router.push({
...@@ -555,6 +621,9 @@ export default { ...@@ -555,6 +621,9 @@ export default {
}, },
}) })
}, },
getTabNum (i) {
this.tabNum = i
},
// ocr识别入口 // ocr识别入口
ocrShow () { ocrShow () {
let vm = this let vm = this
...@@ -870,6 +939,42 @@ export default { ...@@ -870,6 +939,42 @@ export default {
}) })
} }
}, },
generateContract () {
// 生成合同文本
let vm = this
let url = process.env.basePath + 'car_create_all_content'
let param = {
project_id: vm.project_id,
}
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(res => {
hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('提交成功!')
vm.getAttachment()
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
},
// 合同文本详情附件查询
getAttachment () {
let vm = this
let url = process.env.basePath + 'get_content_app_agent'
let param = {
project_id: vm.project_id,
data_class: 'LEASE_ITEM',
}
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(res => {
hlsPopup.hideLoading()
if (res.result === 'S') {
vm.attachArray = res.attachments
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
},
checkStatus () { checkStatus () {
let mantained = this.equip.filter((i) => { let mantained = this.equip.filter((i) => {
return i.lease_status === 'N' return i.lease_status === 'N'
...@@ -1116,6 +1221,111 @@ export default { ...@@ -1116,6 +1221,111 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
#addCar { #addCar {
.aguremrnt-list {
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
width: 100%;
height: 100%;
.unread {
width: 34px;
height: 20px;
margin: 0 10px;
}
.wrap-img {
width: 12%;
height: 100%;
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
justify-content: center;
-webkit-justify-content:center;
background: rgb(254, 251, 233);
img {
width: 22px;
height: 20px;
}
}
.pic {
margin-left: -3px;
}
.pics {
// width: 21px;
height: 30px;
}
.read {
height: 16px;
margin-top: 8px;
margin-left: 6px;
}
.second {
font-family: PingFangSC-Regular;
font-size: 14px;
margin-left: 16px;
color: #383f45;
letter-spacing: 0.43px;
}
.first {
margin-left: 13px;
width: 60%;
}
}
.contract-text {
.border-red {
border: 2px solid rgba(255, 0, 0, 0.4);
}
.hls-item {
margin-top: 8px;
background-color: #fff;
}
.contents {
padding: 0;
}
.in-detail {
background-color: rgba(0, 70, 156, 0.08);
width: 48px;
height: 56px;
text-align: center;
line-height: 65px;
img {
width: 16px;
}
}
.in-all {
//width: 96px;
display: flex;
img {
width: 16px;
}
div {
width: 48px;
height: 56px;
text-align: center;
line-height: 65px;
}
div:first-child {
background-color: rgba(252, 200, 0, 0.1);
}
div:nth-child(2) {
background-color: rgba(0, 70, 156, 0.08);
}
}
}
input::placeholder { input::placeholder {
color: #888c8f; color: #888c8f;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment