Commit ca568a50 by 张权

进度条

1 parent 9f01ca10
import { http } from '@/main'
const defaultPath = 'scrm.api.equity.'
const getWorryBatcnList = params => {
params.method = `${defaultPath}service.cfcb.pagination.list.get`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
})
params.method = `${defaultPath}service.cfcb.pagination.list.get`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
const addCards = params => {
params.method = `${defaultPath}service.cfcb.create`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll:true
})
params.method = `${defaultPath}service.cfcb.create`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
const downLoads = params => {
params.method = `${defaultPath}service.cfcb.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
})
params.method = `${defaultPath}service.cfcb.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
export default {
getWorryBatcnList,
addCards,
downLoads
getWorryBatcnList,
addCards,
downLoads
}
......@@ -269,14 +269,17 @@ const updateOrderApi = params => {
})
}
const uploadImgApi = params => {
const uploadImgApi = (params, callback) => {
params.method = 'scrm.api.equity.common.upload.image'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
noSignAttr: ['file'],
onUploadProgress: res => {
callback(res)
}
})
}
......@@ -304,4 +307,4 @@ const aduitOrderApi = params => {
})
}
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi }
\ No newline at end of file
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi }
......@@ -20,8 +20,8 @@ Vue.use(GLCombiForm)
// Vue.use(GlSearchItem)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig()
// request.baseURL = 'https://scrm.test.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.test.glsx.com.cn'
request.baseURL = 'https://scrm.test.glsx.com.cn'
request_brand.baseURL = 'https://scrm.test.glsx.com.cn'
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......
......@@ -332,4 +332,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -2,10 +2,30 @@
<div class="report-components">
<div class="title">上传资料</div>
<div class="material">
<div v-for="item in materialData" :key="item.name">
<div>{{ item.label }}</div>
<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)">
<i slot="default" class="el-icon-plus"></i>
<div class="material-item" v-for="item in materialData" :key="item.name">
<label :class="{ require: item.label }">{{ item.label }}</label>
<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 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-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
......@@ -17,6 +37,8 @@
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import idCard from '@/assets/images/idCard.png'
import idCardBack from '@/assets/images/idCardBack.png'
export default {
name: '',
components: {
......@@ -27,30 +49,36 @@ export default {
// },
data() {
return {
progress: 0,
progressName: '',
idCard,
idCardBack,
dialogVisible: false,
materialForm: {
cardInfo: '',
billInfo: '',
otherInfo: ''
idCard: [],
idCardBack: [],
billInfo: [],
otherInfo: []
},
materialData: [
{
label: '身份证',
name: 'cardInfo',
limit: 2,
imgList: []
label: '身份证照:',
name: 'idCard',
limit: 1
},
{
label: '发票',
name: 'idCardBack',
limit: 1
},
{
label: '发票:',
name: 'billInfo',
limit: 10,
imgList: []
limit: 10
},
{
label: '其他',
label: '其他:',
name: 'otherInfo',
limit: 1,
imgList: [{ url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }]
listType: 'fileList'
}
]
}
......@@ -79,15 +107,19 @@ export default {
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
this.$apis.ghBeforeSale.uploadImgApi({ file: fileInfo }).then(res => {
if (res) {
let targetItem = this.materialData.find(item => item.name === fieldName)
targetItem.imgList.push({ url: res })
this.fieldInfo[fieldName].push(e.uid)
} else {
this.handleRemove(e, fieldName, 1)
}
})
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) {
this.$set(this.materialForm[fieldName][id], 'url', res)
} else {
this.handleRemove(e, fieldName, 1)
}
})
}
},
handleRemove(e, fieldName, isDel) {
......@@ -102,7 +134,8 @@ export default {
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
}
},
submitUpload() {}
}
}
</script>
......@@ -112,24 +145,128 @@ export default {
display: none;
}
}
// 上传闪屏问题
/deep/.el-upload-list__item.is-ready {
display: none;
}
.report-components {
background: white;
margin-top: 20px;
margin: 20px 0 64px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #e7eaec;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
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>
......@@ -7,12 +7,12 @@
<div class="report-components repair-wrap">
<div class="title">维修信息</div>
<div class="repair-body">
<div>
<label for="">批准金额:</label>
<div class="type-wrap">
<label class="require" for="">批准金额:</label>
<div class="service-wrap">
<div class="service-item" v-for="(item, index) in equityList" :key="item.name">
<p class="name">{{ item.name }}</p>
<div class="price">
<div class="price-wrap">
<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> -->
......@@ -22,10 +22,16 @@
</div>
<div class="total-price">
<label for="">合计:</label>
<span>定损批准金额:{{ totalPrice }}元</span>
<span>
定损批准金为
<span class="price">
<span class="sign">¥</span>
{{ totalPrice }}
</span>
</span>
</div>
<div>
<label for="">收款对象:</label>
<div class="collecter">
<label class="require" for="">收款对象:</label>
<el-radio v-model="accountForm.collectOwner" label="business">店面</el-radio>
<el-radio v-model="accountForm.collectOwner" label="other">其他</el-radio>
</div>
......@@ -207,11 +213,6 @@ export default {
</script>
<style lang="scss" scoped>
.repair-wrap {
.repair-body {
padding: 20px;
}
}
.report-components {
background: white;
margin-top: 20px;
......@@ -221,48 +222,93 @@ export default {
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #e7eaec;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
margin-top: 20px;
}
.require {
width: 115px;
text-align: right;
display: inline-block;
white-space: nowrap;
}
.require::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
.service-wrap {
display: flex;
.service-item {
padding: 10px;
width: 180px;
border-radius: 5px;
border: 1px solid #909399;
margin-right: 20px;
.name {
color: #333;
font-size: 14px;
}
.price {
.repair-wrap {
.repair-body {
padding: 32px 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.type-wrap {
display: flex;
align-items: center;
label {
font-size: 12px;
white-space: nowrap;
color: red;
& > label {
line-height: 20px;
}
/deep/ .el-input__inner {
height: 25px;
.service-wrap {
display: flex;
label {
width: 115px;
height: 16px;
}
.service-item {
width: 264px;
padding: 10px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-right: 20px;
display: flex;
flex-direction: column;
.name {
flex: 1;
}
.price-wrap {
display: flex;
align-items: center;
flex: 1;
label {
white-space: nowrap;
}
/deep/ .el-input__inner {
height: 25px;
}
}
}
}
}
.total-price {
margin: 16px 0 22px;
margin-left: 115px;
.price {
.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 {
display: block;
}
}
}
}
.total-price {
margin: 20px 0;
}
/deep/ .account-info {
.el-form-item {
display: block;
}
}
</style>
......@@ -74,20 +74,6 @@ export default {
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: '报案人',
name: 'reportName',
type: 'input',
......@@ -102,6 +88,20 @@ export default {
maxlength: 11,
isDisabled,
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 = [
......@@ -137,20 +137,6 @@ export default {
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: '报案人',
name: 'reportName',
type: 'input',
......@@ -165,6 +151,21 @@ export default {
maxlength: 11,
isDisabled,
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
......@@ -190,11 +191,15 @@ export default {
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #e7eaec;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
margin-top: 20px;
padding: 32px 0 12px;
}
/deep/ .el-form-item {
display: flex;
}
}
</style>
......@@ -16,6 +16,7 @@
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn" :beforeSearchFn="beforeSearchFn"></GLCombiForm>
</div>
<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">
<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>
......@@ -69,6 +70,7 @@ export default {
type: 'input',
placeholder: '请输入客户名、核销码、合同号、报案号',
isClear: true
// isHide: true
},
{
label: '服务状态',
......@@ -280,7 +282,7 @@ export default {
<style lang="scss" scoped>
.header_info_widget {
box-sizing: border-box;
margin: 10px 0;
margin: 20px 0;
width: 100%;
height: 40px;
display: flex;
......@@ -290,7 +292,7 @@ export default {
color: rgba(0, 0, 0, 0.65);
background-color: #e6e9ff;
border: 1px solid #5850ff;
padding: 0 10px;
padding: 0 16px;
border-radius: 4px;
.el-icon-warning {
font-size: 16px;
......@@ -308,12 +310,11 @@ export default {
.search_container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px 0;
padding: 20px 20px 0;
}
.table_widget {
padding: 0px 20px 20px 40px;
padding: 0px 20px 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
}
</style>
......@@ -4,7 +4,11 @@
<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>
<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>
</template>
<script>
......@@ -110,4 +114,15 @@ export default {
}
}
</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!