Commit e2e3d6f4 by 王琦琳

Merge branch 'dev_v4.12.1' into 'develop'

Dev v4.12.1

See merge request !9
2 parents 1a000677 c51e8c2b
......@@ -25,3 +25,5 @@ dev_v4.8.0 已上线,合并到 develop 以及 master 主干上
4.11.0 版本上线后需往主干及分支 dev_4.12.0_0927 版本上合并代码
dev_4.12.0_0927 版本上线后已往主干 develop 以及 master 上合并
从 develop 上拉取分支 dev_4.12.1 对应 1010 紧急版本
import request from './request'
import request from "./request"
// const path = 'dj.api.'
const path2 = 'dj.api.smartcarlife.'
const path2 = "dj.api.smartcarlife."
export function getTodayInvite(data) {
data.method = `${path2}workbench.todayToInvite.count`
......@@ -51,7 +51,7 @@ export function getIncomeProductList(data) {
// 获取平台方列表
export function getPlatformMerchantList(data) {
data.method = `${path2}serviceMerchant.platformMerchant.list`
return request(data, 'post')
return request(data, "post")
}
export function getExportDailyReport(data) {
......@@ -68,3 +68,15 @@ export function setMerchantOutputValueTarget(data) {
data.method = `${path2}workbench.inputMerchantOutputValueTarget`
return request(data)
}
// 隐私协议标题查询
export function getPrivacyAgreement(data) {
data.method = `${path2}privacyAgreement.getTitleByModule`
return request(data, "post")
}
// 新增或更新隐私协议
export function insertOrUpdatePrivacyAgreement(data) {
data.method = `${path2}privacyAgreement.insertOrUpdate`
return request(data, "post")
}
<template>
<div>
<div class="d2-mr personal-wrap">
<i class="el-icon-s-tools"
style="marginRight:20px;cursor:pointer"
v-if="userInfo.beSuper"
@click="setTitle" />
<el-popover ref="popover1"
placement="top-start"
width="400"
......@@ -43,7 +47,12 @@
class="btn-text">{{ info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` : '管理员') : '未登录' }}</span>
<span class="btn-text out-txt"
@click="clear">退出</span>
</div>
<!-- 隐私协议 -->
<privacy-agreement-dialog :privacy-visible="privacyVisible"
v-if="privacyVisible"
@dialogClose="privacyClose" />
</div>
</template>
......@@ -54,14 +63,16 @@ import { mapActions, mapState, mapMutations } from 'vuex'
import { getImportResult } from '@api/order'
import { exportExcel, asyncExportExcel } from '@api/sys.base'
import { downLoadFile } from '@/common/util'
import privacyAgreementDialog from './privacyAgreementDialog'
var dowloadTimer = 0
var uploadTimer = 0
export default {
components: {
// PersonalPanel
privacyAgreementDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
show: true,
accountPanelVisible: false,
userVisible: false,
......@@ -82,7 +93,8 @@ export default {
// dowloadTimer: 0,
uploadTimerNum: 0,
redPotShow: false,
isWorking: false
isWorking: false,
privacyVisible: false
}
},
computed: {
......@@ -209,8 +221,8 @@ export default {
const methodLists = ['dj.api.smartcarlife.goodsOrderProfitAllocation.export.async',
'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatement.async'
]
let isOnlyReq = this.pollDownloadList.some((item) => {
let { method } = JSON.parse(item.exportParam)
const isOnlyReq = this.pollDownloadList.some((item) => {
const { method } = JSON.parse(item.exportParam)
return methodLists.includes(method)
})
console.log(isOnlyReq)
......@@ -265,7 +277,8 @@ export default {
result.forEach((ele) => {
if (ele.uuid == item.uuid) {
item = Object.assign(item, ele)
item.ifSuccess = ele.progress == 100
// 新增逻辑 可能progress完成 但这两个数据还没写入 failNum succNum
item.ifSuccess = ele.progress == 100 && (ele.failNum > 0 || ele.succNum > 0)
if (item.ifSuccess) {
flag = true
if (ele.failNum) {
......@@ -435,6 +448,15 @@ export default {
this.$nextTick(() => {
this.show = true
})
},
setTitle() {
this.privacyVisible = !this.privacyVisible
console.log(this.privacyVisible)
},
privacyClose() {
this.privacyVisible = !this.privacyVisible
}
},
beforeDestroy() {
......@@ -528,4 +550,7 @@ export default {
.accout-panel .el-button--text {
color: #606266;
}
.setC {
margin-right: 20px;
}
</style>
<!-- 下载对账单 -->
<template>
<d2-dialog title="用户隐私协议"
:is-visible="privacyVisible"
class="privacyDailog"
width="30%"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<el-form ref="privacyForm"
:model="infoForm"
label-width="120px">
<el-form-item label="协议名称:"
prop="title">
<el-input v-model="infoForm.title"
placeholder="请输入隐私协议名称"
style="width: 400px"
maxlength="20"
clearable />
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { getPrivacyAgreement, insertOrUpdatePrivacyAgreement } from '@api/index'
export default {
name: 'privacyAgreementDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
title: '',
module: 'PrivacyAgreement',
},
// 基本数据
baseData: {
}
}
},
props: {
privacyVisible: {
type: Boolean,
default: false
}
},
watch: {
},
created() {
},
components: {},
computed: {
},
mounted() {
this.getPrivacyAgreement()
},
methods: {
getPrivacyAgreement() {
var params = {}
params.module = this.infoForm.module
getPrivacyAgreement(params).then(res => {
this.infoForm.title = res ? res : ''
})
},
handleAddConfirm() {
// this.$refs.privacyForm.validate(valid => {
// if (valid) {
var params = {}
var infoForm = _.cloneDeep(this.infoForm)
params = infoForm
insertOrUpdatePrivacyAgreement(params).then(res => {
this.notice.okTips()
this.handleClose()
})
// }
// })
},
handleClose() {
this.$emit('dialogClose', true)
}
}
}
</script>
<style>
.privacyDailog .el-dialog {
min-width: 700px;
}
</style>
......@@ -69,7 +69,7 @@ var baseConfig = {
}
// 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取
fetch(
"http://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config"
"https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config"
)
.then(
(response) => {
......
......@@ -46,9 +46,9 @@
<span>{{ scope.row.carBrand || '' }}{{ scope.row.carSeriesName ? ('-' + scope.row.carSeriesName) : '' }}{{ scope.row.carTypeName ? ( '-' + scope.row.carTypeName) : '' }}</span>
</template>
</el-table-column>
<el-table-column label="车架号"
<!-- <el-table-column label="车架号"
align="center"
prop="standNo" />
prop="standNo" /> -->
<el-table-column label="客户状态"
align="center">
<template slot-scope="scope">
......
......@@ -251,18 +251,22 @@ export default {
2: '女'
}[cellValue.customerSex]
}
}, {
label: '手机号码',
prop: 'customerPhone',
width: '100px'
}, {
},
// {
// label: '手机号码',
// prop: 'customerPhone',
// width: '100px'
// },
{
label: '品牌车型',
prop: 'carTypeStr',
width: '100px'
}, {
label: '车架号',
prop: 'standNo'
}, {
},
// {
// label: '车架号',
// prop: 'standNo'
// },
{
label: '钥匙号',
prop: 'carKeyNo'
}, {
......
......@@ -138,10 +138,10 @@
</tr>
<tr>
<td class="lb">
汽车车架号
<!-- 汽车车架号 -->
</td>
<td colspan="3">
{{ detail.standNo }}
<!-- {{ detail.standNo }} -->
</td>
<td class="lb">
转化员
......
......@@ -208,14 +208,14 @@
<span>{{ scope.row.customerName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="customerPhone"
<!-- <el-table-column prop="customerPhone"
label="手机号"
align="center"
width="120px">
<template slot-scope="scope">
<span>{{ scope.row.customerPhone || '-' }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="sellerName"
label="转化员"
align="center">
......
......@@ -150,10 +150,10 @@
<el-table-column prop="customerName"
label="客户姓名"
align="center" />
<el-table-column prop="customerPhone"
<!-- <el-table-column prop="customerPhone"
label="手机号"
align="center"
width="120px" />
width="120px" /> -->
<el-table-column prop="sellerName"
label="转化员"
align="center" />
......
<!-- 表单 -->
<template>
<div class="d2-form d2-container-content">
<el-form
:model="formData"
:rules="rules"
:ref="formRef + 'd2FormRuleForm'"
v-loading="$store.state.d2admin.loading.value"
>
<el-form :model="formData"
:rules="rules"
:ref="formRef + 'd2FormRuleForm'"
v-loading="$store.state.d2admin.loading.value">
<slot name="title" />
<div
v-for="(i, idx) in formList"
:key="idx"
class="d2-form-block"
>
<p
v-show="i.title"
class="edit-sub-title title-backgroud"
>
<div v-for="(i, idx) in formList"
:key="idx"
class="d2-form-block">
<p v-show="i.title"
class="edit-sub-title title-backgroud">
{{ i.title }}
</p>
<span v-if="i.headImg">
<img
v-show="formData[i.headImg.attr]"
class="commodity-img"
:src="formData[i.headImg.attr]"
alt="图片"
>
<img v-show="formData[i.headImg.attr]"
class="commodity-img"
:src="formData[i.headImg.attr]"
alt="图片">
<span v-show="!formData[i.headImg.attr]">
<img
class="commodity-img"
src="./image/no-choice.png"
>
<img class="commodity-img"
src="./image/no-choice.png">
</span>
</span>
<div
:style="{'width': i.headImg ? 'calc(100% - 220px)' : '100%', 'display': 'inline-block'}"
>
<div
v-for="(item, index) in i.formBlock"
:key="index"
:style="{'width': i.width || '100%', 'display': 'inline-block'}"
>
<el-form-item
:prop="item.name"
:label="item.label ? item.label + ':' : ''"
:id="item.name"
:label-width="item.label ? '120px' : '0px'"
class="dis-in-block"
:style="{'margin-bottom': !item.type ? '0px' : '22px'}"
>
<el-input
v-if="item.type === 'input'"
v-model.trim="formData[item.name]"
:placeholder="item.label"
:maxlength="item.maxlength"
:style="{'width': item.width || formItemWidth}"
:disabled="item.isDisabled"
clearable
@input="input($event,item)"
@blur="blur(item)"
>
:style="{'width': i.headImg ? 'calc(100% - 220px)' : '100%', 'display': 'inline-block'}">
<div v-for="(item, index) in i.formBlock"
:key="index"
:style="{'width': i.width || '100%', 'display': 'inline-block'}">
<el-form-item :prop="item.name"
:label="item.label ? item.label + ':' : ''"
:id="item.name"
:label-width="item.label ? '120px' : '0px'"
class="dis-in-block"
:style="{'margin-bottom': !item.type ? '0px' : '22px'}">
<el-input v-if="item.type === 'input'"
v-model.trim="formData[item.name]"
:placeholder="item.label"
:maxlength="item.maxlength"
:style="{'width': item.width || formItemWidth}"
:disabled="item.isDisabled"
clearable
@input="input($event,item)"
@blur="blur(item)">
<!-- @blur="item.handleBlur" -->
<i
slot="suffix"
class="suffix"
>{{ item.unit }}</i>
<i slot="suffix"
class="suffix">{{ item.unit }}</i>
</el-input>
<!-- 选择框 -->
<el-select
v-else-if="item.type === 'select'"
v-model="formData[item.name]"
:clearable="item.isClear"
:placeholder="'请选择' + item.label"
:style="{'width': item.width || formItemWidth}"
@change="selectAddAttr($event, item)"
filterable
:disabled="item.isDisabled"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem[item.optionId]"
:label="subItem[item.optionLabel]"
:value="subItem[item.optionId]"
/>
<el-select v-else-if="item.type === 'select'"
v-model="formData[item.name]"
:clearable="item.isClear"
:placeholder="'请选择' + item.label"
:style="{'width': item.width || formItemWidth}"
@change="selectAddAttr($event, item)"
filterable
:disabled="item.isDisabled">
<el-option v-for="subItem in item.optionList"
:key="subItem[item.optionId]"
:label="subItem[item.optionLabel]"
:value="subItem[item.optionId]" />
</el-select>
<template v-else-if="item.type === 'button'">
<div v-if="item.name === 'linkMerchants'">
<div class="add-btns">
<el-button
type="primary"
@click="handleClick(item.handleName)"
>
<el-button type="primary"
@click="handleClick(item.handleName)">
{{ item.btnTxt }}
</el-button>
<span>已为该商品组合分配<span
class="relate-btn-txt"
>{{ formData[item.name] ? formData[item.name].length : 0 }}</span>家可见店铺</span>
class="relate-btn-txt">{{ formData[item.name] ? formData[item.name].length : 0 }}</span>家可见店铺</span>
</div>
<el-table
:data="formData[item.name]"
style="width: 840px"
border
class="store-table"
>
<el-table-column
label="序号"
align="center"
type="index"
width="64px"
/>
<el-table-column
prop="yqMerchantName"
label="园区店名称"
align="center"
/>
<el-table-column
prop="merchantName"
label="4s店名称"
align="center"
/>
<el-table-column
prop="merchantId"
label="商户编号"
align="center"
/>
<el-table-column
prop="userType"
label="商户类型"
align="center"
>
<el-table :data="formData[item.name]"
style="width: 840px"
border
class="store-table">
<el-table-column label="序号"
align="center"
type="index"
width="64px" />
<el-table-column prop="yqMerchantName"
label="园区店名称"
align="center" />
<el-table-column prop="merchantName"
label="4s店名称"
align="center" />
<el-table-column prop="merchantId"
label="商户编号"
align="center" />
<el-table-column prop="userType"
label="商户类型"
align="center">
<template slot-scope="scope">
<span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span>
</template>
</el-table-column>
<el-table-column
label="删除"
align="center"
>
<el-table-column prop="warrantyType"
label="质保类型"
align="center">
<template slot-scope="scope">
<el-button
class="el-icon-delete"
@click="handleDelete(item, scope.row)"
type="text"
/>
<span>{{ warrantyTypeShow[scope.row.warrantyType] }}</span>
</template>
</el-table-column>
<el-table-column label="删除"
align="center">
<template slot-scope="scope">
<el-button class="el-icon-delete"
@click="handleDelete(item, scope.row)"
type="text" />
</template>
</el-table-column>
</el-table>
......@@ -150,40 +115,31 @@
</template>
<template v-else-if="item.type === 'relatePro'">
<div class="add-btns">
<el-button
type="primary"
:disabled="!formData.goodsCode"
@click="handleAddPro(item)"
>
<el-button type="primary"
:disabled="!formData.goodsCode"
@click="handleAddPro(item)">
添加绑定
</el-button>
<span>已将基础商品绑定<span
class="relate-btn-txt"
>{{ formData[item.name] ? formData[item.name].length : 0 }}</span>件升级商品</span>
class="relate-btn-txt">{{ formData[item.name] ? formData[item.name].length : 0 }}</span>件升级商品</span>
</div>
<div class="subConatiner">
<div
v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex"
class="proDiv"
style="margin-bottom: 30px;"
>
<div v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex"
class="proDiv"
style="margin-bottom: 30px;">
<!-- <span class="pro-delete"
:style="subItem.reviewStatus == '0' || subItem.status != '0' ? 'cursor:no-drop;' : ''"
@click="handleDelete(item, subItem, subIndex)"></span> -->
<span
class="pro-delete"
v-if="!subItem.id || (subItem.status == '0' && subItem.reviewStatus != '0')"
@click="handleDelete(item, subItem, subIndex)"
/>
<span class="pro-delete"
v-if="!subItem.id || (subItem.status == '0' && subItem.reviewStatus != '0')"
@click="handleDelete(item, subItem, subIndex)" />
<!-- <span class="pro-edit"
:style="subItem.reviewStatus == '0' ? 'cursor:no-drop;' : ''"
@click="handleProChange(item, subItem, subIndex)"></span> -->
<span
class="pro-edit"
v-if="!subItem.id || subItem.reviewStatus != '0'"
@click="handleProChange(item, subItem, subIndex)"
/>
<span class="pro-edit"
v-if="!subItem.id || subItem.reviewStatus != '0'"
@click="handleProChange(item, subItem, subIndex)" />
<div class="img">
<img :src="subItem.thumbUrl">
</div>
......@@ -216,8 +172,7 @@
</div>
<div class="tips">
<span
v-if="subItem.reviewInfoList"
>{{ subItem.reviewInfoList[0].reviewMessage }}</span>
v-if="subItem.reviewInfoList">{{ subItem.reviewInfoList[0].reviewMessage }}</span>
</div>
</div>
</div>
......@@ -226,47 +181,36 @@
<p class="photo-top-tips">
{{ item.topTips }}
</p>
<div
v-if="formData[item.name].length < item.maxPhotoNum"
class="activity-img img-w-h"
:class="[disabled ? 'input-bg':'']"
>
<div v-if="formData[item.name].length < item.maxPhotoNum"
class="activity-img img-w-h"
:class="[disabled ? 'input-bg':'']">
<div class="add">
+
</div>
<span class="number">{{ formData[item.name].length }}/{{ item.maxPhotoNum }}</span>
<input
type="file"
name="thumbUrl"
:id="item.name + 'file'"
ref="file"
class="activity-img img-w-h"
accept="image/png, image/jpeg, image/gif, image/jpg"
@change="e => handleImgChange(e, item)"
style="opacity: 0;"
>
<span
class="number">{{ formData[item.name].length }}/{{ item.maxPhotoNum }}</span>
<input type="file"
name="thumbUrl"
:id="item.name + 'file'"
ref="file"
class="activity-img img-w-h"
accept="image/png, image/jpeg, image/gif, image/jpg"
@change="e => handleImgChange(e, item)"
style="opacity: 0;">
</div>
<template>
<div v-if="formData[item.name].length">
<span
v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex"
class="muti-imgs img-w-h"
>
<img
class="img-w-h"
:src="subItem.content"
>
<span v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex"
class="muti-imgs img-w-h">
<img class="img-w-h"
:src="subItem.content">
<span class="img-btns">
<span class="btn-item">
<i
@click="handleImgDelete(item, subIndex)"
class="el-icon-delete"
/>
<i
@click="handleImgLook(subItem.content)"
class="el-icon-zoom-in"
/>
<i @click="handleImgDelete(item, subIndex)"
class="el-icon-delete" />
<i @click="handleImgLook(subItem.content)"
class="el-icon-zoom-in" />
</span>
</span>
</span>
......@@ -275,91 +219,61 @@
</template>
<template v-else-if="item.type === 'descList'">
<el-row class="desc-btns">
<el-button
size="small"
@click="handleAddDesc(2, item)"
>
<el-button size="small"
@click="handleAddDesc(2, item)">
添加文字
</el-button>
<el-button
size="small"
@click="handleAddDesc(1, item)"
>
<el-button size="small"
@click="handleAddDesc(1, item)">
添加图片
</el-button>
</el-row>
<el-row
v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex"
>
<div
style="position: relative;"
v-if="subItem.resType === 2"
>
<el-input
class="desc-input"
type="textarea"
v-model.trim="subItem.content"
:rows="4"
maxlength="256"
placeholder="请输入详情内容"
/>
<i
class="el-icon-delete desc-txt-delete"
@click="handleImgDelete(item, subIndex)"
/>
<el-row v-for="(subItem, subIndex) in formData[item.name]"
:key="subIndex">
<div style="position: relative;"
v-if="subItem.resType === 2">
<el-input class="desc-input"
type="textarea"
v-model.trim="subItem.content"
:rows="4"
maxlength="256"
placeholder="请输入详情内容" />
<i class="el-icon-delete desc-txt-delete"
@click="handleImgDelete(item, subIndex)" />
</div>
<div
class="activity-img muti-imgs img-w-h"
v-else-if="subItem.resType === 1"
>
<div
v-show="!subItem.content"
class="add"
>
<div class="activity-img muti-imgs img-w-h"
v-else-if="subItem.resType === 1">
<div v-show="!subItem.content"
class="add">
+
</div>
<img
v-show="subItem.content"
class="img-w-h"
:src="subItem.content"
>
<span
class="img-btns"
v-show="subItem.content"
>
<img v-show="subItem.content"
class="img-w-h"
:src="subItem.content">
<span class="img-btns"
v-show="subItem.content">
<span class="btn-item">
<i
@click="handleImgDelete(item, subIndex)"
class="el-icon-delete"
/>
<i
@click="handleImgLook(subItem.content)"
class="el-icon-zoom-in"
/>
<i @click="handleImgDelete(item, subIndex)"
class="el-icon-delete" />
<i @click="handleImgLook(subItem.content)"
class="el-icon-zoom-in" />
</span>
</span>
<input
type="file"
class="activity-Input img-w-h"
accept="image/png, image/jpeg, image/gif, image/jpg"
@change="e => handleImgChange(e, item, subIndex)"
style="opacity: 0;"
>
<input type="file"
class="activity-Input img-w-h"
accept="image/png, image/jpeg, image/gif, image/jpg"
@change="e => handleImgChange(e, item, subIndex)"
style="opacity: 0;">
</div>
</el-row>
</template>
<span v-else>{{ item.name ? formData[item.name] : item.value }}</span>
</el-form-item>
<div
v-show="item.tips"
class="item-tips"
>
<div v-show="item.tips"
class="item-tips">
<template v-if="Array.isArray(item.tips)">
<p
v-for="(x, y) in item.tips"
:key="y"
>
<p v-for="(x, y) in item.tips"
:key="y">
{{ x }}
</p>
</template>
......@@ -369,80 +283,62 @@
</div>
</div>
<el-form-item style="margin-top: 40px;">
<el-button
type="primary"
@click="handleUp"
:disabled="$store.state.d2admin.loading.value"
class="ok-btn"
style="marginRight:16px"
>
<el-button type="primary"
@click="handleUp"
:disabled="$store.state.d2admin.loading.value"
class="ok-btn"
style="marginRight:16px">
{{ addOrEdit == 'add' ? '上架' : '提交' }}
</el-button>
<el-button
class="cancel-btn"
@click="handleClose"
>
<el-button class="cancel-btn"
@click="handleClose">
取消
</el-button>
</el-form-item>
</el-form>
<relate-pro-dialog
v-if="relateProVisible"
:relate-pro-visible="relateProVisible"
:pro-list="proList"
:origin-pro-info="originProInfo"
@handleRelateProConfirm="handleRelateProConfirm"
@handleRelateProClose="handleRelateProClose"
/>
<relate-store-dialog
v-if="relateStoreVisible"
ref="formRelateStore"
:relate-store-visible="relateStoreVisible"
:source-page="sourcePage"
:store-api="storeApi"
:store-search-form="storeSearchForm"
:store-selected="storeSelected"
@handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="handleRelateStoreClose"
>
<relate-pro-dialog v-if="relateProVisible"
:relate-pro-visible="relateProVisible"
:pro-list="proList"
:origin-pro-info="originProInfo"
@handleRelateProConfirm="handleRelateProConfirm"
@handleRelateProClose="handleRelateProClose" />
<relate-store-dialog v-if="relateStoreVisible"
ref="formRelateStore"
:relate-store-visible="relateStoreVisible"
:source-page="sourcePage"
:store-api="storeApi"
:store-search-form="storeSearchForm"
:store-selected="storeSelected"
@handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="handleRelateStoreClose">
<el-row slot>
<el-form
:model="storeSearchForm"
:rules="rules"
ref="relate"
:inline="true"
>
<el-form :model="storeSearchForm"
:rules="rules"
ref="relate"
:inline="true">
<el-form-item label="园区店:">
<el-input
v-model.trim="storeSearchForm.yqMerchantName"
placeholder="园区店名称"
@keydown.native="handleStoreInput"
clearable
/>
<el-input v-model.trim="storeSearchForm.yqMerchantName"
placeholder="园区店名称"
@keydown.native="handleStoreInput"
clearable />
</el-form-item>
<el-form-item label="4S店:">
<el-input
v-model.trim="storeSearchForm.merchantName"
placeholder="4S店名称"
@keydown.native="handleStoreInput"
clearable
/>
<el-input v-model.trim="storeSearchForm.merchantName"
placeholder="4S店名称"
@keydown.native="handleStoreInput"
clearable />
</el-form-item>
<el-button
type="primary"
@click="handleSearchStore"
>
<el-button type="primary"
@click="handleSearchStore">
搜索
</el-button>
</el-form>
</el-row>
</relate-store-dialog>
<el-dialog :visible.sync="lookImgVisible">
<img
width="100%"
:src="imageUrl"
alt="图片"
>
<img width="100%"
:src="imageUrl"
alt="图片">
</el-dialog>
</div>
</template>
......@@ -489,7 +385,11 @@ export default {
userTypeList: userType,
ghUserTypeList: ghUserType
},
goodsDefaultImg: require('./image/goodsDefault.png')
goodsDefaultImg: require('./image/goodsDefault.png'),
warrantyTypeShow: {
0: '质保卡',
1: '质保权益卡'
}
}
},
......@@ -996,7 +896,7 @@ export default {
width: 25px;
height: 25px;
cursor: pointer;
background-image: url('./image/proDelIcon.png');
background-image: url("./image/proDelIcon.png");
}
.d2-form .pro-delete:hover {
background-color: #f7f8fa;
......@@ -1008,7 +908,7 @@ export default {
width: 25px;
height: 25px;
cursor: pointer;
background-image: url('./image/proEditIcon.png');
background-image: url("./image/proEditIcon.png");
}
.d2-form .pro-edit:hover {
background-color: #f7f8fa;
......
<!-- 编辑商品弹窗 -->
<template>
<d2-dialog
title="添加绑定升级商品"
:is-visible.sync="relateProVisible"
btn-ok-label="关联"
width="950px"
@confirmDialog="handleRelateProConfirm"
@closeDialog="handleRelateProClose"
class="relatePro"
>
<d2-dialog title="添加绑定升级商品"
:is-visible.sync="relateProVisible"
btn-ok-label="关联"
width="950px"
@confirmDialog="handleRelateProConfirm"
@closeDialog="handleRelateProClose"
class="relatePro">
<div class="relateProDialog flex">
<img
v-show="proInfo.thumbUrl"
:src="proInfo.thumbUrl"
>
<img
v-show="!proInfo.thumbUrl"
src="./image/no-choice.png"
>
<el-form
:model="proInfo"
:rules="rules"
label-width="110px"
ref="proRuleForm1"
style="width: calc(100% - 180px);"
>
<img v-show="proInfo.thumbUrl"
:src="proInfo.thumbUrl">
<img v-show="!proInfo.thumbUrl"
src="./image/no-choice.png">
<el-form :model="proInfo"
:rules="rules"
label-width="110px"
ref="proRuleForm1"
style="width: calc(100% - 180px);">
<div class="w-50">
<el-form-item
label="选择产品"
prop="goodsCode"
>
<el-select
style="width: 98%;"
v-model="proInfo.goodsCode"
placeholder="请选择一款作为升级商品"
value-key="goodsCode"
filterable
@change="handleChangeGood"
>
<el-option
v-for="item in proList"
:key="item.goodsCode"
:label="item.goodsName"
:value="item.goodsCode"
:disabled="item.disabled"
/>
<el-form-item label="选择产品"
prop="goodsCode">
<el-select style="width: 98%;"
v-model="proInfo.goodsCode"
placeholder="请选择一款作为升级商品"
value-key="goodsCode"
filterable
@change="handleChangeGood">
<el-option v-for="item in proList"
:key="item.goodsCode"
:label="item.goodsName"
:value="item.goodsCode"
:disabled="item.disabled" />
</el-select>
</el-form-item>
</div>
<div class="w-50">
<el-form-item label="分类">
<el-input
disabled
placeholder="分类"
:value="proInfo.goodsTypeName"
class="dis-in-block"
/>
<el-input disabled
placeholder="分类"
:value="proInfo.goodsTypeName"
class="dis-in-block" />
</el-form-item>
</div>
<div class="w-50" />
<div class="w-50">
<el-form-item label="编号">
<el-input
disabled
placeholder="编号"
:value="proInfo.sapCode"
class="dis-in-block"
/>
<el-input disabled
placeholder="编号"
:value="proInfo.sapCode"
class="dis-in-block" />
</el-form-item>
</div>
<div class="w-50">
<el-form-item
label="产品成本"
prop="shopPrice"
>
<el-input
v-model="proInfo.shopPrice"
placeholder="请输入建议产品成本"
class="dis-in-block"
@input="handleShopPrice"
@blur="handleShopPriceBlur"
>
<i
slot="suffix"
class="suffix"
>元</i>
<el-form-item label="产品成本"
prop="shopPrice">
<el-input v-model="proInfo.shopPrice"
placeholder="请输入建议产品成本"
class="dis-in-block"
@input="handleShopPrice"
@blur="handleShopPriceBlur">
<i slot="suffix"
class="suffix">元</i>
</el-input>
</el-form-item>
</div>
<div class="w-50">
<el-form-item
label="建议升级价格"
prop="upgradePrice"
>
<el-input
v-model="proInfo.upgradePrice"
placeholder="请输入建议升级价格"
class="dis-in-block"
@input="handleUpgradePrice"
>
<i
slot="suffix"
class="suffix"
>元</i>
<el-form-item label="建议升级价格"
prop="upgradePrice">
<el-input v-model="proInfo.upgradePrice"
placeholder="请输入建议升级价格"
class="dis-in-block"
@input="handleUpgradePrice">
<i slot="suffix"
class="suffix">元</i>
</el-input>
</el-form-item>
</div>
<div class="w-50">
<el-form-item
label="商品最低价"
prop="shopMinPrice"
>
<el-input
v-model="proInfo.shopMinPrice"
placeholder="请输入商品最低价"
class="dis-in-block"
@input="handleShopMinPrice"
>
<i
slot="suffix"
class="suffix"
>元</i>
<el-form-item label="商品最低价"
prop="shopMinPrice">
<el-input v-model="proInfo.shopMinPrice"
placeholder="请输入商品最低价"
class="dis-in-block"
@input="handleShopMinPrice">
<i slot="suffix"
class="suffix">元</i>
</el-input>
</el-form-item>
</div>
<div
class="w-50"
v-show="warrantyProList.includes(proInfo.goodsType)"
>
<el-form-item
label="质保年限"
prop="warrantyPeriod"
>
<el-select
style="width: 98%;"
:class="{ 'select-suffix': !!proInfo.warrantyPeriod }"
v-model="proInfo.warrantyPeriod"
>
<el-option
v-for="item in warrantyPeriodList"
:key="item.confId"
:label="item.confLabel"
:value="item.confId"
/>
</el-select>
<div class="w-50"
v-show="warrantyProList.includes(proInfo.goodsType)">
<el-form-item label="质保年限"
prop="warrantyPeriod">
<!-- <el-select style="width: 98%;"
:class="{ 'select-suffix': !!proInfo.warrantyPeriod }"
v-model="proInfo.warrantyPeriod">
<el-option v-for="item in warrantyPeriodList"
:key="item.confId"
:label="item.confLabel"
:value="item.confId" />
</el-select> -->
<el-input v-model="proInfo.warrantyPeriod"
placeholder="请输入质保年限"
class="dis-in-block"
@input="handleWarrantyPeriod">
<i slot="suffix"
class="suffix">年</i>
</el-input>
</el-form-item>
</div>
</el-form>
......@@ -199,7 +162,8 @@ export default {
oldVal: {
upgradePrice: '',
shopPrice: '',
shopMinPrice: ''
shopMinPrice: '',
warrantyPeriod: ''
},
separateOpt: [{
confId: 1,
......@@ -287,7 +251,11 @@ export default {
var validateObj = (this.proInfo.shopPrice <= this.proInfo.upgradePrice) ? 'clearValidate' : 'validateField'
this.$refs.proRuleForm1[validateObj]('upgradePrice')
}
}
},
handleWarrantyPeriod(newVal) {
this.proInfo.warrantyPeriod = limitPrice(newVal, this.oldVal.warrantyPeriod, 2, 1)
this.oldVal.warrantyPeriod = this.proInfo.warrantyPeriod
},
}
}
......@@ -327,7 +295,7 @@ export default {
}
.relatePro .select-suffix::after {
display: inline-block;
content: '年';
content: "年";
position: absolute;
right: 30px;
top: 0px;
......
......@@ -67,6 +67,21 @@
<el-table-column prop="merchantName"
label="4S店名称"
align="center" />
<el-table-column prop="warrantyType"
label="选择质保"
align="center">
<template slot-scope="scope">
<span>
<el-select style="width: 90%;"
v-model="scope.row.warrantyType">
<el-option v-for="item in warrantyTypeList"
:key="item.confId"
:label="item.confLabel"
:value="item.confId" />
</el-select>
</span>
</template>
</el-table-column>
<el-table-column label="删除"
align="center"
width="50px">
......@@ -93,7 +108,14 @@ export default {
// 分页
total: 0,
currentPage: 1,
pageSize: 20
pageSize: 20,
warrantyTypeList: [{
confId: 0,
confLabel: '质保卡'
}, {
confId: 1,
confLabel: '质保权益卡'
}]
}
},
......@@ -153,7 +175,12 @@ export default {
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.selectingData = res.list
this.selectingData = res.list.map(item => {
if (!item.warrantyType) {
item.warrantyType = 0
}
return item
})
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
......@@ -161,6 +188,7 @@ export default {
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(item => item.merchantId === row.merchantId)
addOrDelete
? this.selectedData.push(row)
......
......@@ -143,6 +143,13 @@
<span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span>
</template>
</el-table-column>
<el-table-column prop="warrantyType"
label="质保类型"
align="center">
<template slot-scope="scope">
<span>{{ warrantyTypeShow[scope.row.warrantyType] }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
......@@ -166,7 +173,11 @@ export default {
ghUserTypeList: ghUserType
},
examineFlag: false, // 是否有审核权限
isExamineOp: false // 是否做了审核操作
isExamineOp: false, // 是否做了审核操作
warrantyTypeShow: {
0: '质保卡',
1: '质保权益卡'
}
}
},
......
......@@ -2,25 +2,21 @@
<template>
<d2-container class="edit-commodity">
<!-- :formItemWidth="formItemWidth" -->
<d2-form-goods
v-if="show"
ref="d2Form"
:store-api="commodityAddSeviceMerchant"
form-name="commodity"
:rules="rules"
:add-or-edit="addOrEdit"
:origin-data="editData"
:form-list="editForm"
:form-ref="comFormRef"
@ydMerchantChange="getGoodsList"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"
>
<p
slot="title"
class="edit-title"
>
{{ addOrEdit === 'add' ? '新增商品' : '编辑商品' }}
<d2-form-goods v-if="show"
ref="d2Form"
:store-api="commodityAddSeviceMerchant"
form-name="commodity"
:rules="rules"
:add-or-edit="addOrEdit"
:origin-data="editData"
:form-list="editForm"
:form-ref="comFormRef"
@ydMerchantChange="getGoodsList"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose">
<p slot="title"
class="edit-title">
{{ addOrEdit === 'add' ? '新增商品' : '编辑商品' }}
</p>
</d2-form-goods>
</d2-container>
......@@ -254,7 +250,7 @@ export default {
retailPrice: data.retailPrice,
maxRetailDiscount: data.maxRetailDiscount,
shopPrice: data.shopPrice,
upgradeGoods: data.upgradeGoods.length
upgradeGoods: data.upgradeGoods.length
? data.upgradeGoods.map(item => {
const tempVal = {}
upgradeGoodsAttr.forEach(i => {
......@@ -263,17 +259,18 @@ export default {
return {
...tempVal
}
})
})
: [],
// linkMerchantIds: data.linkMerchantIds ? data.linkMerchantIds.map(item => String(item.merchantId)) : []
linkMerchants: data.linkMerchants.map(item => {
return {
merchantId: String(item.merchantId),
yqMerchantId: item.yqMerchantId
yqMerchantId: item.yqMerchantId,
warrantyType: item.warrantyType
}
})
}
// console.log(params)
// return console.log(params)
this.$confirm('提交商品需要进入审核', '提示', {
confirmButtonText: '确定',
type: 'warning'
......
......@@ -637,7 +637,7 @@ export default {
}
getOrderProductData(params).then((res) => {
console.log(res)
// console.log(res)
const data = res
const colors = ['rgba(0,110,214,0.4)', 'rgba(0,110,214,0.6)', 'rgba(0,110,214,1)']
......@@ -665,10 +665,10 @@ export default {
}
})
}
console.log(idObj)
// console.log(idObj)
var seriesArr = []
for (const key in idObj) {
console.log(idObj[key].data)
// console.log(idObj[key].data)
seriesArr.push({
name: idObj[key].name,
type: 'bar',
......@@ -687,7 +687,7 @@ export default {
// data: [6, 6.5, 6, 6, 5.5, 6, 6, 6.5, 6, 6, 5.5]
})
}
console.log(seriesArr)
// console.log(seriesArr)
this.orderProductChart.clear()
orderProductOption.series = seriesArr
......
......@@ -68,9 +68,9 @@
<el-form-item label="用户姓名:">
{{ detail.customerName }}
</el-form-item>
<el-form-item label="车架号:">
<!-- <el-form-item label="车架号:">
{{ detail.standNo }}
</el-form-item>
</el-form-item> -->
<el-form-item label="评价:">
{{ detail.customerComment }}
</el-form-item>
......
......@@ -84,10 +84,10 @@
<span>{{ scope.row.customerSex ==1 ? '男' : '女' }}</span>
</template>
</el-table-column>
<el-table-column label="客户手机号"
<!-- <el-table-column label="客户手机号"
align="center"
width="150"
prop="customerPhone" />
prop="customerPhone" /> -->
<el-table-column label="客户车型"
align="center"
width="200"
......@@ -102,10 +102,10 @@
align="center"
width="110"
prop="plateNumber" />
<el-table-column label="客户车架号"
<!-- <el-table-column label="客户车架号"
align="center"
width="150"
prop="standNo" />
prop="standNo" /> -->
<el-table-column label="升级状态"
align="center"
prop="upgradeFlag">
......
......@@ -23,7 +23,8 @@
<img v-if="imgUrl"
:src="imgUrl"
class="rectImg">
<span class="img-btns">
<span class="img-btns"
v-if="imgUrl">
<span class="btn-item">
<i @click.stop="handleRemove()"
class="el-icon-delete" />
......@@ -187,7 +188,11 @@ export default {
// border: none;
// }
.el-icon-plus {
position: relative;
// position: relative;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.icon-text {
position: absolute;
......@@ -220,6 +225,7 @@ export default {
}
.elupload {
margin: auto;
position: relative;
}
.disabled .el-upload--picture-card {
......
......@@ -57,9 +57,10 @@ const cdn = {
`${CDN_DOMAIN}/ua-parser.min.js`,
`${CDN_DOMAIN}/html2canvas.min.js`,
`${CDN_DOMAIN}/element-ui.min.js`,
`${CDN_DOMAIN}/better-scroll.min.js`,
// `${CDN_DOMAIN}/better-scroll.min.js`,
// `https://cdn.bootcdn.net/ajax/libs/better-scroll/2.4.2/better-scroll.min.js`,
`https://img01.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/better-scroll.min.js`,
// `https://img01.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/better-scroll.min.js`,
`${CDN_DOMAIN}/dayjs.min.js`,
`${CDN_DOMAIN}/vue-qr.js`,
`${CDN_DOMAIN}/xlsx.min.js`
......@@ -105,8 +106,8 @@ module.exports = {
dayjs: "dayjs",
"vue-qr": "vue-qr",
xlsx: "XLSX",
// BScroll: 'better-scroll'
"better-scroll": "BScroll"
BScroll: "better-scroll"
// "better-scroll": "BScroll"
}
}
// html2canvas: 'html2canvas',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!