Commit ca568a50 by 张权

进度条

1 parent 9f01ca10
...@@ -5,7 +5,7 @@ const getWorryBatcnList = params => { ...@@ -5,7 +5,7 @@ const getWorryBatcnList = params => {
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
const addCards = params => { const addCards = params => {
...@@ -14,7 +14,7 @@ const addCards = params => { ...@@ -14,7 +14,7 @@ const addCards = params => {
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
const downLoads = params => { const downLoads = params => {
...@@ -22,7 +22,7 @@ const downLoads = params => { ...@@ -22,7 +22,7 @@ const downLoads = params => {
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
export default { export default {
......
...@@ -269,14 +269,17 @@ const updateOrderApi = params => { ...@@ -269,14 +269,17 @@ const updateOrderApi = params => {
}) })
} }
const uploadImgApi = params => { const uploadImgApi = (params, callback) => {
params.method = 'scrm.api.equity.common.upload.image' params.method = 'scrm.api.equity.common.upload.image'
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
noSignAttr: ['file'] noSignAttr: ['file'],
onUploadProgress: res => {
callback(res)
}
}) })
} }
......
...@@ -20,8 +20,8 @@ Vue.use(GLCombiForm) ...@@ -20,8 +20,8 @@ Vue.use(GLCombiForm)
// Vue.use(GlSearchItem) // Vue.use(GlSearchItem)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig() const { response, request, request_brand, sign, secret } = await fetchConfig()
// request.baseURL = 'https://scrm.test.glsx.com.cn' request.baseURL = 'https://scrm.test.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.test.glsx.com.cn' request_brand.baseURL = 'https://scrm.test.glsx.com.cn'
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
......
...@@ -2,10 +2,30 @@ ...@@ -2,10 +2,30 @@
<div class="report-components"> <div class="report-components">
<div class="title">上传资料</div> <div class="title">上传资料</div>
<div class="material"> <div class="material">
<div v-for="item in materialData" :key="item.name"> <div class="material-item" v-for="item in materialData" :key="item.name">
<div>{{ item.label }}</div> <label :class="{ require: item.label }">{{ item.label }}</label>
<el-upload :file-list="item.imgList" :class="[(item.imgList ? item.limit != item.imgList.length : true) ? '' : 'hidePlusBtn']" :limit="item.limit" action="#" :before-upload="beforeAvatarUpload" list-type="picture-card" :ref="item.name + 'Ref'" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)"> <el-upload :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[(materialForm[item.name] ? item.limit != materialForm[item.name].length : true) ? '' : 'hidePlusBtn']" :limit="item.limit" action="#" :before-upload="beforeAvatarUpload" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<i slot="default" class="el-icon-plus"></i> <i v-if="item.name == 'billInfo'" slot="default" class="el-icon-plus">
<p>上传图片</p>
</i>
<img v-if="item.name === 'idCard'" slot="default" :src="idCard" alt="" />
<img v-if="item.name === 'idCardBack'" slot="default" :src="idCardBack" alt="" />
<el-button v-if="item.name == 'otherInfo'" slot="default" size="small" class="el-icon-plus">上传文件</el-button>
<div class="file-box" v-if="item.name == 'otherInfo'">
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return imgItem.name
}
"
:percentage="imgItem.progress"
></el-progress>
<!-- <div class="file-name">name</div> -->
</div>
</div>
</el-upload> </el-upload>
<el-dialog :visible.sync="dialogVisible"> <el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" /> <img width="100%" :src="dialogImageUrl" alt="" />
...@@ -17,6 +37,8 @@ ...@@ -17,6 +37,8 @@
<script> <script>
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import idCard from '@/assets/images/idCard.png'
import idCardBack from '@/assets/images/idCardBack.png'
export default { export default {
name: '', name: '',
components: { components: {
...@@ -27,30 +49,36 @@ export default { ...@@ -27,30 +49,36 @@ export default {
// }, // },
data() { data() {
return { return {
progress: 0,
progressName: '',
idCard,
idCardBack,
dialogVisible: false, dialogVisible: false,
materialForm: { materialForm: {
cardInfo: '', idCard: [],
billInfo: '', idCardBack: [],
otherInfo: '' billInfo: [],
otherInfo: []
}, },
materialData: [ materialData: [
{ {
label: '身份证', label: '身份证照:',
name: 'cardInfo', name: 'idCard',
limit: 2, limit: 1
imgList: [] },
{
name: 'idCardBack',
limit: 1
}, },
{ {
label: '发票', label: '发票:',
name: 'billInfo', name: 'billInfo',
limit: 10, limit: 10
imgList: []
}, },
{ {
label: '其他', label: '其他:',
name: 'otherInfo', name: 'otherInfo',
limit: 1, listType: 'fileList'
imgList: [{ url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }]
} }
] ]
} }
...@@ -79,11 +107,15 @@ export default { ...@@ -79,11 +107,15 @@ export default {
const arrBase64 = imgFile.split(',') const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.') const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1] const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
this.$apis.ghBeforeSale.uploadImgApi({ file: fileInfo }).then(res => { this.materialForm[fieldName].push({ name: e.name, progress: 0 })
const id = this.materialForm[fieldName].length - 1
this.$apis.ghBeforeSale
.uploadImgApi({ file: fileInfo }, res => {
this.$set(this.materialForm[fieldName][id], 'progress', ((res.loaded / res.total) * 100).toFixed(2))
})
.then(res => {
if (res) { if (res) {
let targetItem = this.materialData.find(item => item.name === fieldName) this.$set(this.materialForm[fieldName][id], 'url', res)
targetItem.imgList.push({ url: res })
this.fieldInfo[fieldName].push(e.uid)
} else { } else {
this.handleRemove(e, fieldName, 1) this.handleRemove(e, fieldName, 1)
} }
...@@ -102,7 +134,8 @@ export default { ...@@ -102,7 +134,8 @@ export default {
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url this.dialogImageUrl = file.url
this.dialogVisible = true this.dialogVisible = true
} },
submitUpload() {}
} }
} }
</script> </script>
...@@ -112,24 +145,128 @@ export default { ...@@ -112,24 +145,128 @@ export default {
display: none; display: none;
} }
} }
// 上传闪屏问题 // 上传闪屏问题
/deep/.el-upload-list__item.is-ready { /deep/.el-upload-list__item.is-ready {
display: none; display: none;
} }
.report-components { .report-components {
background: white; background: white;
margin-top: 20px; margin: 20px 0 64px;
.title { .title {
padding: 0 20px; padding: 0 20px;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
height: 58px; height: 58px;
line-height: 58px; line-height: 58px;
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #d8d8d8;
margin: 0 0; margin: 0 0;
color: #333;
} }
.edit-form-container { .edit-form-container {
margin-top: 20px; margin-top: 20px;
} }
.material {
padding: 32px 20px;
.material-item {
display: flex;
margin-bottom: 20px;
&:nth-child(-n + 3) {
/deep/.el-upload-list__item,
/deep/.el-upload--picture-card {
width: 180px;
height: 104px;
background: rgba(0, 0, 0, 0.04);
border-radius: 4px;
border: 1px dashed rgba(0, 0, 0, 0.15);
img {
width: 100%;
height: 100%;
}
}
}
&:nth-child(1) {
display: inline-block;
position: relative;
padding-left: 118px;
.require {
position: absolute;
left: 0;
top: 0;
}
}
&:nth-child(2) {
margin-left: 20px;
display: inline-block;
}
&:nth-child(3) {
/deep/.el-upload-list__item,
/deep/.el-upload--picture-card {
width: 104px;
p {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
}
}
&:nth-child(4) {
/deep/ .el-upload {
text-align: left;
}
/deep/.el-upload-list--fileList {
display: none;
}
/deep/ .el-button:hover,
.el-button:active {
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
}
}
.file-box {
.bar_outer {
width: 320px;
position: relative;
/deep/ .el-progress-bar__outer {
height: 26px !important;
border-radius: 4px;
background-color: transparent !important;
border: 1px solid #f4f6fc;
.el-progress-bar__inner {
border-radius: 4px;
text-align: left;
.el-progress-bar__innerText {
color: #333;
}
}
}
.file-name {
left: 0;
top: 50%;
transform: translateY(-50%);
position: absolute;
}
}
}
.require {
width: 118px;
text-align: right;
display: inline-block;
white-space: nowrap;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.require::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
}
} }
</style> </style>
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<div class="report-components repair-wrap"> <div class="report-components repair-wrap">
<div class="title">维修信息</div> <div class="title">维修信息</div>
<div class="repair-body"> <div class="repair-body">
<div> <div class="type-wrap">
<label for="">批准金额:</label> <label class="require" for="">批准金额:</label>
<div class="service-wrap"> <div class="service-wrap">
<div class="service-item" v-for="(item, index) in equityList" :key="item.name"> <div class="service-item" v-for="(item, index) in equityList" :key="item.name">
<p class="name">{{ item.name }}</p> <p class="name">{{ item.name }}</p>
<div class="price"> <div class="price-wrap">
<label for="">定损批准金额:</label> <label for="">定损批准金额:</label>
<el-input @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input> <el-input @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input>
<!-- <el-input @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input> --> <!-- <el-input @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input> -->
...@@ -22,10 +22,16 @@ ...@@ -22,10 +22,16 @@
</div> </div>
<div class="total-price"> <div class="total-price">
<label for="">合计:</label> <label for="">合计:</label>
<span>定损批准金额:{{ totalPrice }}元</span> <span>
定损批准金为
<span class="price">
<span class="sign">¥</span>
{{ totalPrice }}
</span>
</span>
</div> </div>
<div> <div class="collecter">
<label for="">收款对象:</label> <label class="require" for="">收款对象:</label>
<el-radio v-model="accountForm.collectOwner" label="business">店面</el-radio> <el-radio v-model="accountForm.collectOwner" label="business">店面</el-radio>
<el-radio v-model="accountForm.collectOwner" label="other">其他</el-radio> <el-radio v-model="accountForm.collectOwner" label="other">其他</el-radio>
</div> </div>
...@@ -207,11 +213,6 @@ export default { ...@@ -207,11 +213,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.repair-wrap {
.repair-body {
padding: 20px;
}
}
.report-components { .report-components {
background: white; background: white;
margin-top: 20px; margin-top: 20px;
...@@ -221,48 +222,93 @@ export default { ...@@ -221,48 +222,93 @@ export default {
font-weight: bold; font-weight: bold;
height: 58px; height: 58px;
line-height: 58px; line-height: 58px;
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #d8d8d8;
margin: 0 0; margin: 0 0;
color: #333;
} }
.edit-form-container { .edit-form-container {
margin-top: 20px; margin-top: 20px;
} }
.require {
width: 115px;
text-align: right;
display: inline-block;
white-space: nowrap;
}
.require::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
} }
.repair-wrap {
.service-wrap { .repair-body {
padding: 32px 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.type-wrap {
display: flex; display: flex;
& > label {
line-height: 20px;
}
.service-wrap {
display: flex;
label {
width: 115px;
height: 16px;
}
.service-item { .service-item {
width: 264px;
padding: 10px; padding: 10px;
width: 180px; background: #ffffff;
border-radius: 5px; border-radius: 4px;
border: 1px solid #909399; border: 1px solid #e8e8ea;
margin-right: 20px; margin-right: 20px;
display: flex;
flex-direction: column;
.name { .name {
color: #333; flex: 1;
font-size: 14px;
} }
.price { .price-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1;
label { label {
font-size: 12px;
white-space: nowrap; white-space: nowrap;
color: red;
} }
/deep/ .el-input__inner { /deep/ .el-input__inner {
height: 25px; height: 25px;
} }
} }
} }
} }
}
.total-price { .total-price {
margin: 20px 0; margin: 16px 0 22px;
} margin-left: 115px;
.price {
/deep/ .account-info { .sign {
font-size: 14px;
}
font-size: 20px;
font-weight: 500;
color: #ff6d00;
}
}
/deep/ .account-info {
margin: 10px 0 0 115px;
padding: 20px 10px 0 20px;
background: #f9f9f9;
display: inline-block;
.el-radio {
margin-right: 40px;
}
.el-form-item { .el-form-item {
display: block; display: block;
} }
}
}
} }
</style> </style>
...@@ -74,20 +74,6 @@ export default { ...@@ -74,20 +74,6 @@ export default {
isClear: true isClear: true
}, },
{ {
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
this.currentAddress = nodesInfo
}
},
{
label: '报案人', label: '报案人',
name: 'reportName', name: 'reportName',
type: 'input', type: 'input',
...@@ -102,6 +88,20 @@ export default { ...@@ -102,6 +88,20 @@ export default {
maxlength: 11, maxlength: 11,
isDisabled, isDisabled,
isClear: true isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
this.currentAddress = nodesInfo
}
} }
] ]
const gh = [ const gh = [
...@@ -137,20 +137,6 @@ export default { ...@@ -137,20 +137,6 @@ export default {
isClear: true isClear: true
}, },
{ {
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
this.editForm.reimbursementAddress = nodesInfo.join('')
}
},
{
label: '报案人', label: '报案人',
name: 'reportName', name: 'reportName',
type: 'input', type: 'input',
...@@ -165,6 +151,21 @@ export default { ...@@ -165,6 +151,21 @@ export default {
maxlength: 11, maxlength: 11,
isDisabled, isDisabled,
isClear: true isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '请选择省/市/区',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
this.editForm.reimbursementAddress = nodesInfo.join('')
}
} }
] ]
this.editFormData = showGh ? gh : dj this.editFormData = showGh ? gh : dj
...@@ -190,11 +191,15 @@ export default { ...@@ -190,11 +191,15 @@ export default {
font-weight: bold; font-weight: bold;
height: 58px; height: 58px;
line-height: 58px; line-height: 58px;
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #d8d8d8;
margin: 0 0; margin: 0 0;
color: #333;
} }
.edit-form-container { .edit-form-container {
margin-top: 20px; padding: 32px 0 12px;
}
/deep/ .el-form-item {
display: flex;
} }
} }
</style> </style>
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn" :beforeSearchFn="beforeSearchFn"></GLCombiForm> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn" :beforeSearchFn="beforeSearchFn"></GLCombiForm>
</div> </div>
<div class="table_widget"> <div class="table_widget">
<el-button style="float:right;margin-bottom:10px;" size="small" type="primary">导出excel</el-button>
<GLTable ref="equityRef" :tableData="tableData" :tableTotal="tableTotal" :pageSizes="sizeList" :searchForm="searchParams" :tableParams="tableParams" :pageConf="pageConf"> <GLTable ref="equityRef" :tableData="tableData" :tableTotal="tableTotal" :pageSizes="sizeList" :searchForm="searchParams" :tableParams="tableParams" :pageConf="pageConf">
<div class="table-btns" slot="table-btns" slot-scope="scope"> <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.serviceStatus)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton> <GLButton v-if="[0].includes(scope.scope.serviceStatus)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
...@@ -69,6 +70,7 @@ export default { ...@@ -69,6 +70,7 @@ export default {
type: 'input', type: 'input',
placeholder: '请输入客户名、核销码、合同号、报案号', placeholder: '请输入客户名、核销码、合同号、报案号',
isClear: true isClear: true
// isHide: true
}, },
{ {
label: '服务状态', label: '服务状态',
...@@ -280,7 +282,7 @@ export default { ...@@ -280,7 +282,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.header_info_widget { .header_info_widget {
box-sizing: border-box; box-sizing: border-box;
margin: 10px 0; margin: 20px 0;
width: 100%; width: 100%;
height: 40px; height: 40px;
display: flex; display: flex;
...@@ -290,7 +292,7 @@ export default { ...@@ -290,7 +292,7 @@ export default {
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
background-color: #e6e9ff; background-color: #e6e9ff;
border: 1px solid #5850ff; border: 1px solid #5850ff;
padding: 0 10px; padding: 0 16px;
border-radius: 4px; border-radius: 4px;
.el-icon-warning { .el-icon-warning {
font-size: 16px; font-size: 16px;
...@@ -308,12 +310,11 @@ export default { ...@@ -308,12 +310,11 @@ export default {
.search_container { .search_container {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px 0; padding: 20px 20px 0;
} }
.table_widget { .table_widget {
padding: 0px 20px 20px 40px; padding: 0px 20px 20px;
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
} }
</style> </style>
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
<report ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report> <report ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report>
<repair ref="repairRef" :isGH="routeInfo.isGH" :equityList.sync="equityList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair> <repair ref="repairRef" :isGH="routeInfo.isGH" :equityList.sync="equityList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :materialForm.sync="materialForm"></material> <material ref="materialRef" :materialForm.sync="materialForm"></material>
<el-button type="primary" size="small" @click="validAccountInfo">校验</el-button> <div class="footer operate-btn">
<el-button size="small" type="primary">确定</el-button>
<el-button size="small">存草稿</el-button>
<el-button size="small">取消</el-button>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -110,4 +114,15 @@ export default { ...@@ -110,4 +114,15 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
.footer {
width: 100%;
position: fixed;
bottom: 0;
height: 64px;
left: 0;
text-align: center;
line-height: 64px;
background: #ffffff;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!