Commit b9c87e60 by zhangquan

保险字段

1 parent 4328f39d
...@@ -21,8 +21,8 @@ export const fetchConfig = function(common) { ...@@ -21,8 +21,8 @@ export const fetchConfig = function(common) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.dev.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config') // return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.dev.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=services') return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=services')
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// return common.utils.getConfig(params) // return common.utils.getConfig(params)
......
...@@ -28,8 +28,14 @@ ...@@ -28,8 +28,14 @@
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]"> <div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]">
<div>
<label class="required" for="">预估损失金额/元:</label> <label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input> <el-input maxlength="10" @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
</div>
<div v-if="item.lossAssessmentFlag" style="margin-top: 10px;">
<label class="required" for="">保险公司定损金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入保险定损金额" v-model="item.lossAssessmentAmount"></el-input>
</div>
</div> </div>
</div> </div>
<div class="lump-sum"> <div class="lump-sum">
...@@ -242,8 +248,8 @@ export default { ...@@ -242,8 +248,8 @@ export default {
const Item = this.editFormData.find(item => item.name === key) const Item = this.editFormData.find(item => item.name === key)
this.$set(Item.customPickerOptions, 'selectableRange', limitTime) this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
}, },
validPrice(e, id) { validPrice(e, id, key) {
let checkPlan = '' + this.itemList[id].applyAmount let checkPlan = '' + this.itemList[id][key]
checkPlan = checkPlan checkPlan = checkPlan
.replace(/[^\d.]/g, '') .replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.') .replace(/\.{2,}/g, '.')
...@@ -256,23 +262,23 @@ export default { ...@@ -256,23 +262,23 @@ export default {
} else if (checkPlan.indexOf('.') >= 0) { } else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
this.$set(this.itemList[id], 'applyAmount', checkPlan) this.$set(this.itemList[id], key, checkPlan)
this.getTotal() this.getTotal()
}, },
changePrice(e, id) { changePrice(e, id, key) {
if (!e.target.value) return if (!e.target.value) return
const len = e.target.value.length const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1) let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') { if (lastStr === '.') {
this.$set(this.itemList[id], 'applyAmount', e.target.value.substr(0, len - 1)) this.$set(this.itemList[id], key, e.target.value.substr(0, len - 1))
} }
const minPrice = 1 const minPrice = 1
if (Number(e.target.value) < minPrice) { if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], 'applyAmount', 1) this.$set(this.itemList[id], key, 1)
} }
const maxPrice = 200000 const maxPrice = 200000
if (Number(e.target.value) > maxPrice) { if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], 'applyAmount', maxPrice) this.$set(this.itemList[id], key, maxPrice)
} }
this.getTotal() this.getTotal()
}, },
...@@ -327,11 +333,12 @@ export default { ...@@ -327,11 +333,12 @@ export default {
.unit-price { .unit-price {
background: #f9f9f9; background: #f9f9f9;
padding: 20px; padding: 20px;
display: flex; // display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
margin-bottom: 10px; margin-bottom: 10px;
.required { .required {
width: 154px; width: 154px;
display: inline-block;
text-align: right; text-align: right;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
......
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
<div class="ms_lab">预估损失金额/元:</div> <div class="ms_lab">预估损失金额/元:</div>
<el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input> <el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input>
</div> </div>
<div v-if="item.lossAssessmentFlag" class="ms flex_sc">
<div class="ms_lab">保险公司定损金额/元:</div>
<el-input @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" v-model="item.lossAssessmentAmount" size="mini" class="w432" maxlength="10"></el-input>
</div>
<div class="ms flex_sc ma20"> <div class="ms flex_sc ma20">
<div class="ms_lab">定损批准金额/元:</div> <div class="ms_lab">定损批准金额/元:</div>
<el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input> <el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input>
...@@ -415,7 +419,7 @@ export default { ...@@ -415,7 +419,7 @@ export default {
} }
} }
} }
.ms_txt{ .ms_txt {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
<span>预估损失金额/元:</span> <span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span> <span class="price">{{ item.applyAmount || 0 }}</span>
</div> </div>
<div v-if="item.lossAssessmentFlag" class="ms">
<span>保险公司定损金额/元:</span>
<span class="price">{{ item.lossAssessmentAmount || 0 }}</span>
</div>
<div class="ms"> <div class="ms">
<span>定损批准金额:</span> <span>定损批准金额:</span>
<span class="price">{{ item.approveAmount || 0 }}</span> <span class="price">{{ item.approveAmount || 0 }}</span>
...@@ -561,7 +565,7 @@ export default { ...@@ -561,7 +565,7 @@ export default {
.text_wrap { .text_wrap {
white-space: pre-wrap !important; white-space: pre-wrap !important;
} }
.ms_txt{ .ms_txt {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
......
...@@ -282,6 +282,7 @@ export default { ...@@ -282,6 +282,7 @@ export default {
res.itemsList.map(item => { res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount
item.lossAssessmentAmount = item.lossAssessmentAmount ? (item.lossAssessmentAmount / 100).toFixed(2) : item.lossAssessmentAmount
item.lossTypeList = [] item.lossTypeList = []
if (item.serviceItemCode == 'SC0006' && item.lossType) { if (item.serviceItemCode == 'SC0006' && item.lossType) {
item.lossTypeList = item.lossType.split(',') item.lossTypeList = item.lossType.split(',')
...@@ -737,6 +738,7 @@ export default { ...@@ -737,6 +738,7 @@ export default {
let contractNo = `itemsList[${index}].contractNo` let contractNo = `itemsList[${index}].contractNo`
let approveAmount = `itemsList[${index}].approveAmount` let approveAmount = `itemsList[${index}].approveAmount`
let applyAmount = `itemsList[${index}].applyAmount` let applyAmount = `itemsList[${index}].applyAmount`
let lossAssessmentAmount = `itemsList[${index}].lossAssessmentAmount`
let claimsId = `itemsList[${index}].claimsId` let claimsId = `itemsList[${index}].claimsId`
let lossType = `itemsList[${index}].lossType` let lossType = `itemsList[${index}].lossType`
let temp = { let temp = {
...@@ -747,6 +749,7 @@ export default { ...@@ -747,6 +749,7 @@ export default {
[contractNo]: this.repotData.contractNo, [contractNo]: this.repotData.contractNo,
[approveAmount]: item.approveAmount ? (Number(item.approveAmount) * 10 * 10).toFixed(0) : 0, [approveAmount]: item.approveAmount ? (Number(item.approveAmount) * 10 * 10).toFixed(0) : 0,
[applyAmount]: item.applyAmount ? (Number(item.applyAmount) * 10 * 10).toFixed(0) : 0, [applyAmount]: item.applyAmount ? (Number(item.applyAmount) * 10 * 10).toFixed(0) : 0,
[lossAssessmentAmount]: item.lossAssessmentAmount ? (Number(item.lossAssessmentAmount) * 10 * 10).toFixed(0) : 0,
[claimsId]: this.orderMsg.id, [claimsId]: this.orderMsg.id,
[lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType [lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!