Commit 7eb4f6d8 by cwq0219

权益

1 parent b1474b8c
......@@ -3,6 +3,16 @@ import { http, http_brand } from '@/main'
const defaultPath = 'scrm.api.equity.service.package.'
const orderPath = 'scrm.api.equity.service.order.'
const getUserInfoApi = params => {
params.method = 'scrm.api.equity.common.merchant.current.det'
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
const getListApi = params => {
params.method = `${defaultPath}order.list.get`
return http({
......@@ -13,6 +23,17 @@ const getListApi = params => {
})
}
// 获取门店
const getMerchantApi = params => {
params.method = 'scrm.api.equity.common.under.merchant.list.det'
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
const getExportApi = params => {
params.method = `${defaultPath}order.export.get`
return http({
......@@ -97,6 +118,17 @@ const updateHotlineApi = params => {
})
}
// 获取产品名称(套餐名称)
const getProListApi = params => {
params.method = `${defaultPath}select.get`
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
// 获取无忧卡套餐列表
const getPackageListApi = params => {
params.method = `${defaultPath}list.get`
......@@ -185,4 +217,16 @@ const uploadImgApi = params => {
})
}
export default { getListApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, updateHotlineApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getOrderValueApi, updateOrderApi, uploadImgApi }
// 退保
const backOrderApi = params => {
params.method = `${orderPath}charge.back`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getUserInfoApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, updateHotlineApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getOrderValueApi, updateOrderApi, uploadImgApi, backOrderApi }
......@@ -53,14 +53,14 @@
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" :value-format="item.valueFormat" :style="{ width: item.selectWidth || defaultWidth }" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :placeholder="item.placeholder || '请选择' + item.label" :picker-options="pickerOption[item.pickerOptions]" @change="e => handleDateChange(e, item)"></el-date-picker>
<el-date-picker v-else-if="item.type === 'datePicker'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.selectWidth || defaultWidth }" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :placeholder="item.placeholder || '请选择' + item.label" :picker-options="pickerOption[item.pickerOptions]" @change="e => handleDateChange(e, item)"></el-date-picker>
<template v-else-if="item.type === 'uploadBtn'">
<el-button type="primary">
上传
<input type="file" style="opacity: 0;" :id="item.name + 'file'" ref="file" class="upload-img-btn" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
</el-button>
<!-- <el-button v-show="formObj[item.name]" type="primary">查看</el-button> -->
<el-button type="primary">查看{{ formObj }}</el-button>
<el-button v-show="formObj[item.name]" type="primary" @click="handleImgLook(formObj[item.name], item)">查看</el-button>
</template>
<template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p>
......@@ -411,6 +411,7 @@ export default {
.glsx-combi-form .dialog-look {
text-align: center;
z-index: 999;
}
.glsx-combi-form .dialog-video {
......
......@@ -4,23 +4,23 @@
<div class="container">
<p class="edit-title">车辆信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefCar" labelWidth="140px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar" :formRules="editRuleCar">
<template slot="vehicleBrandId">
<el-select v-model="editForm.vehicle.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width:220px; margin-right: 20px;">
<template slot="vehicleBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width:220px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carBrandOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSubBrandId">
<el-select v-model="editForm.vehicle.vehicleSubBrandId" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width:220px; margin-right: 20px;">
<template slot="vehicleSubBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSubBrandId" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width:220px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carChildOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSeriesId">
<el-select v-model="editForm.vehicle.vehicleSeriesId" placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width:220px; margin-right: 20px;">
<template slot="vehicleSeriesId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSeriesId" placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width:220px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carSeriesOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleShapeId">
<el-select v-model="editForm.vehicle.vehicleShapeId" placeholder="请选择车型" style="width:220px;">
<template slot="vehicleShapeId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleShapeId" placeholder="请选择车型" style="width:220px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carTypeOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
......@@ -50,7 +50,7 @@
</tr>
<tr v-for="(m, n) in scope.scope.tableList" :key="n">
<td v-for="(i, j) in m" :key="j" :style="{ width: 100 / scope.scope.attributeList.length + '%' }">
<el-input :disabled="isDisabled" :class="{ 'border-red': !editFormPro[i.name] }" placeholder="请输入" v-model="editFormPro[i.name]">
<el-input :disabled="i.isDisabled" :class="{ 'border-red': !editFormPro[i.name] }" placeholder="请输入" v-model="editFormPro[i.name]">
<el-popover v-show="!editFormPro[i.name]" slot="suffix" placement="top" title="" width="90" trigger="hover" :content="i.attributeDesc + '是必填项'">
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
......@@ -74,8 +74,8 @@
</div>
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> -->
<div class="footer" :style="{ width: '100%' }">
<el-button type="primary" @click="handleDraft">草稿</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button v-show="!['3', '5'].includes(routeInfo.addOrEdit)" type="primary" @click="handleDraft">草稿</el-button>
<el-button v-show="routeInfo.addOrEdit != 5" type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div>
......@@ -97,8 +97,10 @@ export default {
// footerLeft: '0',
// footerWidth: '0',
editCarChildRef: 'editChildRef',
disabled: false,
successDisable: false,
routeInfo: {
// 1-新增;2-编辑;3-查看
// 1-新增;2-编辑;3-修改;4-重新提单;5-查看
addOrEdit: 1,
contractNo: ''
},
......@@ -176,46 +178,49 @@ export default {
maxlength: 32
},
{
label: '座位数',
name: 'seatesNum',
type: 'select',
noFilter: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'seatesNumList'
},
{
label: '开票日期',
name: 'billingDate',
type: 'datePicker',
dateType: 'date',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions',
handleDateChange: (value, targetItem) => {
console.log(value)
console.log(targetItem)
}
},
{
label: '品牌车型',
name: 'vehicleBrandId',
addHtml: 'vehicleBrandId'
},
{
label: '',
// label: '子品牌',
name: 'vehicleSubBrandId',
addHtml: 'vehicleSubBrandId'
},
{
label: '',
// label: '品牌车系',
name: 'vehicleSeriesId',
addHtml: 'vehicleSeriesId'
},
{
label: '',
// label: '品牌车型',
name: 'vehicleShapeId',
addHtml: 'vehicleShapeId'
},
{
label: '开票日期',
name: 'billingDate',
type: 'datePicker',
dateType: 'date',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions',
handleDateChange: (value, targetItem) => {
console.log(value)
console.log(targetItem)
}
},
{
label: '座位数',
name: 'seatesNum',
type: 'select',
noFilter: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'seatesNumList'
}
],
// 客户信息
......@@ -422,22 +427,46 @@ export default {
glsxCombiForm
},
created() {
this.getAllVehicleBrand()
this.getCarChildList()
},
mounted() {
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.disabled = this.routeInfo.addOrEdit == 5
// 提单成功 - 修改
this.successDisable = this.routeInfo.addOrEdit == 3
this.getOptionsList('editFormDataCar', false)
this.getOptionsList('editFormDataUser', false)
this.getOptionsList('editFormDataOther', false)
this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate'])
// this.title = this.titleObj[this.routeInfo.addOrEdit]
console.log(this.routeInfo, '-------------')
// 获取套餐列表
this.getPackageList()
this.getAllVehicleBrand()
this.getCarChildList()
},
methods: {
setDisabled(partDisabledList = []) {
var list = ['Car', 'User', 'Pro', 'Other']
var flag = true
var errorObjList = []
for (var i = 0; i < list.length; i++) {
this['editFormData' + list[i]].forEach((item, idx) => {
if (!partDisabledList.length) {
this['editFormData' + list[i]][idx].isDisabled = true
} else {
if (partDisabledList.includes(item.name)) {
this['editFormData' + list[i]][idx].isDisabled = true
}
}
})
}
},
getInfo() {
this.$apis.beforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => {
console.log(res)
......@@ -456,6 +485,15 @@ export default {
}
this.editForm.vehicle.billingDate = this.editForm.vehicle.billingDate ? new Date(this.editForm.vehicle.billingDate) : ''
this.editForm.effectiveDate = this.editForm.effectiveDate ? new Date(this.editForm.effectiveDate) : ''
if (this.editForm.vehicle.vehicleBrandId) {
this.getCarChildList(true)
}
if (this.editForm.vehicle.vehicleSubBrandId) {
this.getCarSeriesList(true)
}
if (this.editForm.vehicle.vehicleSeriesId) {
this.getCarTypeList(true)
}
this.editForm.packageCode && this.packageAttr(true)
})
},
......@@ -472,7 +510,7 @@ export default {
if (this.editForm.vehicle.invoicePrice) {
var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2)
console.log(targetItem)
targetItem.servicePackagePrices.forEach(item => {
targetItem && targetItem.servicePackagePrices.forEach(item => {
if (invoicePrice > item.carButtomPrice && invoicePrice < item.carHighestPrice) {
this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2)
}
......@@ -481,7 +519,7 @@ export default {
// console.log(this.editForm)
this.editRulePro = {}
this.editFormPro = {}
targetItem.groupAttributeList.forEach(item => {
targetItem && targetItem.groupAttributeList.forEach(item => {
if (item.attributeList.length == 1) {
this.$set(this.editFormPro, item.attributeList[0].attributeName, '')
if (item.attributeList[0].required == 1) {
......@@ -518,7 +556,8 @@ export default {
tempList.push({
label: k.attributeList[0].attributeDesc,
name: k.attributeList[0].attributeName,
type: k.attributeList[0].attributeType
type: k.attributeList[0].attributeType,
isDisabled: this.disabled || this.successDisable
})
if (k.attributeList[0].attributeType == 'datePicker') {
tempList[idx].dateType = 'date'
......@@ -539,7 +578,8 @@ export default {
sort: i,
attributeGroup: j.attributeGroup,
required: j.required,
attributeType: j.attributeType
attributeType: j.attributeType,
isDisabled: this.disabled || this.successDisable
})
})
}
......@@ -596,7 +636,7 @@ export default {
this.baseData.carBrandOptions = res || []
})
},
handleChangeBrand(brandId) {
handleChangeBrand(brandId, isRecovery = false) {
this.editForm.vehicle.vehicleSubBrandId = ''
this.editForm.vehicle.vehicleSeriesId = ''
this.editForm.vehicle.vehicleShapeId = ''
......@@ -605,17 +645,22 @@ export default {
this.baseData.carTypeOptions = []
},
// 获取子品牌
getCarChildList() {
getCarChildList(isRecovery = false) {
this.$apis.beforeSale.getCarChildListApi({}).then(res => {
this.allCarChildList = res || []
if (isRecovery) {
this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicle.vehicleBrandId).childs
}
})
},
// 获取车系
getCarSeriesList() {
this.editForm.vehicle.vehicleSeriesId = ''
this.editForm.vehicle.vehicleShapeId = ''
this.baseData.carSeriesOptions = []
this.baseData.carTypeOptions = []
getCarSeriesList(isRecovery = false) {
if (!isRecovery) {
this.editForm.vehicle.vehicleSeriesId = ''
this.editForm.vehicle.vehicleShapeId = ''
this.baseData.carSeriesOptions = []
this.baseData.carTypeOptions = []
}
const params = {
brandId: this.editForm.vehicle.vehicleBrandId,
childBrandId: this.editForm.vehicle.vehicleSubBrandId
......@@ -625,11 +670,13 @@ export default {
})
},
// 获取车型
getCarTypeList(value) {
this.editForm.vehicle.vehicleShapeId = ''
this.baseData.carTypeOptions = []
getCarTypeList(isRecovery = false) {
if (!isRecovery) {
this.editForm.vehicle.vehicleShapeId = ''
this.baseData.carTypeOptions = []
}
const params = {
carSeriesId: value
carSeriesId: this.editForm.vehicle.vehicleSeriesId
}
this.$apis.beforeSale.getCarTypeListApi(params).then(res => {
this.baseData.carTypeOptions = res || []
......@@ -651,6 +698,19 @@ export default {
if (this.editForm.actualSalesPrice) {
params.actualSalesPrice = (this.editForm.actualSalesPrice * 100).toFixed(0)
}
// 车品牌
if (this.editForm.vehicle.vehicleBrandId) {
params.vehicle.vehicleBrandName = this.baseData.carBrandOptions.find(item => item.id == this.editForm.vehicle.vehicleBrandId).name
}
if (this.editForm.vehicle.vehicleSubBrandId) {
params.vehicle.vehicleSubBrandName = this.baseData.carChildOptions.find(item => item.id == this.editForm.vehicle.vehicleSubBrandId).name
}
if (this.editForm.vehicle.vehicleSeriesId) {
params.vehicle.vehicleSeriesName = this.baseData.carSeriesOptions.find(item => item.id == this.editForm.vehicle.vehicleSeriesId).name
}
if (this.editForm.vehicle.vehicleShapeId) {
params.vehicle.vehicleBrandName = this.baseData.carTypeOptions.find(item => item.id == this.editForm.vehicle.vehicleShapeId).name
}
var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
// console.log(targetItem)
params.attributeList = []
......@@ -697,12 +757,22 @@ export default {
},
updateEquity(params) {
this.$apis.beforeSale.updateEquityApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleCancel()
this.$message({
message: res.data.code ? '操作成功' : '操作失败',
type: res.data.code ? 'success' : 'error'
})
if (res.data.code) {
this.handleCancel()
} else {
this.whereToGo('licensing')
}
} else {
this.whereToGo('licensing')
this.$message({
message: res.message,
type: 'error'
})
}
})
},
......@@ -711,22 +781,24 @@ export default {
var flag = true
var errorObjList = []
for (var i = 0; i < list.length; i++) {
var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]]
pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
!valid && errorObjList.push(errorObj)
flag && (flag = valid)
})
if(this.$refs['editFormRef' + list[i]]) {
var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]]
pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
!valid && errorObjList.push(errorObj)
flag && (flag = valid)
})
}
}
if (!flag) {
this.whereToGo(Object.keys(errorObjList[0])[0])
return true
}
var params = this.getParams()
if (this.routeInfo.addOrEdit == 2) {
params.contractNo = this.routeInfo.contractNo
}
// if ([2, 3].includes(this.routeInfo.addOrEdit)) {
// params.contractNo = this.routeInfo.contractNo
// }
params.operationType = 1
if (this.routeInfo.addOrEdit == 2) {
if ([2, 3].includes(this.routeInfo.addOrEdit)) {
params.contractNo = this.routeInfo.contractNo
this.updateEquity(params)
} else {
......
......@@ -18,13 +18,13 @@
<!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(4, scope.scope)">查看</el-button>
<el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleUpload(scope.scope)">上传资料</el-button>
<el-button v-if="[0].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(3, scope.scope)">修改</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleDelete(scope.scope)">退保</el-button>
<el-button v-if="[3, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleDelete(scope.scope)">重新提单</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退保</el-button>
<el-button v-if="[3, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(4, scope.scope)">重新提单</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -46,9 +46,11 @@ export default {
data() {
return {
size: 'small',
userInfo: {},
searchForm: {
queryText: '',
orderStatus: '',
packageCode: '',
successDate: [],
effectiveDate: []
},
......@@ -82,11 +84,11 @@ export default {
},
{
label: '产品名称',
name: '',
name: 'packageCode',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionId: 'packageCode',
optionLabel: 'packageName',
optionsName: 'goodsStatusList'
},
{
......@@ -110,7 +112,38 @@ export default {
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'goodsStatusList'
optionsName: 'merchantList',
isHide: true
},
{
label: '大区',
name: 'dqtId',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'dqList',
isHide: true
},
{
label: '片区',
name: 'pqId',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'pqList',
isHide: true
},
{
label: '门店',
name: 'mdId',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'mdList',
isHide: true
}
],
// 表格
......@@ -128,7 +161,10 @@ export default {
},
{
label: '合同号',
prop: ''
prop: 'contractNo',
formatter: cellValue => {
return cellValue.contractNo || '-'
}
},
{
label: '提单成功时间',
......@@ -201,7 +237,10 @@ export default {
},
{
label: '服务期限',
prop: ''
prop: 'servicePeriod',
formatter: cellValue => {
return cellValue.servicePeriod ? '1年' : '-'
}
},
{
label: '生效时间',
......@@ -220,49 +259,54 @@ export default {
},
{
label: '大区',
prop: ''
// formatter: cellValue => {
// return cellValue.packageName || '-'
// }
prop: 'provinceMerchantName',
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
},
{
label: '片区',
prop: ''
// formatter: cellValue => {
// return cellValue.packageName || '-'
// }
prop: 'cityMerchantName',
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
},
{
label: '操作人',
prop: ''
// formatter: cellValue => {
// return cellValue.packageName || '-'
// }
prop: 'updatedBy',
formatter: cellValue => {
return cellValue.updatedBy || '-'
}
}
]
},
pageConf: { pageSize: 'pageCount', pageNum: 'pageSize', totalCount: 'total' },
// 公共数据
baseData: {
goodsStatusList: [],
merchantList: [],
dqList: [],
pqList: [],
mdList: [],
orderStatusList: [
{
confId: '0',
confId: 0,
confName: '初始化'
},
{
confId: '2',
confId: 2,
confName: '提单成功'
},
{
confId: '3',
confId: 3,
confName: '提单失败'
},
{
confId: '4',
confId: 4,
confName: '已退单'
},
{
confId: '5',
confId: 5,
confName: '已过期'
}
]
......@@ -277,10 +321,28 @@ export default {
},
mounted() {
this.getOptionsList('searchFormData')
this.$apis.beforeSale.getProListApi({}).then(res => {
this.baseData.goodsStatusList = res
this.getOptionsList('searchFormData')
})
this.$apis.beforeSale.getUserInfoApi({}).then(res => {
console.log(res)
this.userInfo = res
var levelToShow = {
1: 'merchantIds',
2: 'dqtId',
3: 'pqId',
4: 'mdId'
}
})
// this.getMerchantList('', 'merchantIds', 'merchantList')
},
methods: {
getMerchantList(id, attrName, listName) {
var params = {}
// this.$apis.beforeSearchFn.getMerchantApi()
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.successDate.length) {
......@@ -350,8 +412,16 @@ export default {
}
})
},
// 1-新增;2-编辑
// 1-新增;2-编辑;3-修改;4-重新提单;5-查看
handleEdit(addOrEdit, row) {
if (addOrEdit == 3 && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement
this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交退单申请 ')]),
type: 'error'
})
return true
}
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + -1) : this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + row.contractNo)
},
......@@ -361,10 +431,8 @@ export default {
// 打印
handlePdf(row) {
// this.pdfUrl = 'C:/Users/zhoujj/AppData/Local/Temp/baiduyunguanjia/onlinedit/cache/39d5d49441f9884a432cb59ed2443ef7/2111189f54f808c9e8946e.pdf'
this.handlePdfClose()
this.$apis.beforeSale.getPriteApi({ contractNo: row.contractNo }).then(res => {
console.log(res)
this.pdfUrl = res
})
},
......@@ -377,18 +445,19 @@ export default {
attachmentType: 'IMG'
}
this.$apis.beforeSale.updateOrderApi(params).then(res => {
// this.uploadForm[targetItem.name] = imgUrl
console.log(targetItem)
this.$set(this.uploadForm, targetItem.name, 'https://img0.baidu.com/it/u=1027006618,1872310278&fm=26&fmt=auto')
// this.uploadForm[targetItem.name] = 'https://img0.baidu.com/it/u=1027006618,1872310278&fm=26&fmt=auto'
console.log(this.uploadForm)
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.$set(this.uploadForm, targetItem.name, imgUrl)
}
})
},
// 上传资料
autoGenerate() {
var tempList = []
this.uploadForm = {}
this.uploadFormData = []
this.packageList.forEach(item => {
// item.groupAttributeList.forEach((k, idx) => {
......@@ -427,21 +496,29 @@ export default {
handleUpload(row) {
console.log(row)
this.$apis.beforeSale.getOrderAttrApi({ packageCode: row.packageCode }).then(res => {
console.log(res)
this.packageList = res
this.uploadForm.contractNo = row.contractNo
// this.packageList.forEach(item => {
// this.$apis.beforeSale.getOrderValueApi({ contractNo: row.contractNo, attachmentCode: item.attachmentCode }).then(res => {
// console.log(res)
// this.uploadForm[item.attachmentCode] = res
// })
// })
this.packageList.forEach(item => {
this.$apis.beforeSale.getOrderValueApi({ contractNo: row.contractNo, attachmentCode: item.attachmentCode }).then(subRes => {
this.uploadForm[item.attachmentCode] = subRes || ''
})
})
this.autoGenerate()
})
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { contractNo: row.contractNo })
// 退保
handleBack(row) {
console.log(row)
if (new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement
this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交退单申请 ')]),
type: 'error'
})
return true
}
this.secondConfirm('退保', '是否确认退保?', 'beforeSale', 'backOrderApi', { contractNo: row.contractNo, merchantId: row.merchantId })
},
// 导出
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!