Commit 54815e36 authored by zhanglw's avatar zhanglw

产品查看

parent 8b70f765
...@@ -150,6 +150,16 @@ export const HttpReq = { ...@@ -150,6 +150,16 @@ export const HttpReq = {
method: 'get' method: 'get'
}) })
}, },
// 客户信息审核
reviewProduct: function(data) {
return request({
url: '/api/bsw/users/reviewCustomer',
method: 'put',
data: data
}).then((res) => {
return res
})
},
xxx: null xxx: null
} }
} }
......
...@@ -255,6 +255,7 @@ export default { ...@@ -255,6 +255,7 @@ export default {
cancelView() { cancelView() {
this.cancelReview() this.cancelReview()
this.hideView() this.hideView()
this.stampImgSrc = ''
}, },
cancelReview() { cancelReview() {
if (this.$refs.formReviewRef) { if (this.$refs.formReviewRef) {
...@@ -373,6 +374,7 @@ export default { ...@@ -373,6 +374,7 @@ export default {
font-size: 14px; font-size: 14px;
text-decoration: underline; //下划线 text-decoration: underline; //下划线
text-underline-offset: 5px; //下划线和文字间距 text-underline-offset: 5px; //下划线和文字间距
text-decoration-color: rgba(100, 100, 100, 0.4);
} }
>>>.el-input__inner { >>>.el-input__inner {
border: 1px solid rgba(100, 100, 100, 0.1); border: 1px solid rgba(100, 100, 100, 0.1);
......
...@@ -469,27 +469,26 @@ export default { ...@@ -469,27 +469,26 @@ export default {
}, },
loadData(productId) { loadData(productId) {
this.showView() this.showView()
if (this.editor) {
return
}
this.$nextTick(() => { this.$nextTick(() => {
const _this = this if (!this.editor) {
const editor = new E(this.$refs.editor) const _this = this
editor.config.zIndex = 5 const editor = new E(this.$refs.editor)
editor.config.customUploadImg = function(files, insert) { editor.config.zIndex = 5
files.forEach(image => { editor.config.customUploadImg = function(files, insert) {
upload(_this.imagesUploadApi, image).then(res => { files.forEach(image => {
const data = res.data upload(_this.imagesUploadApi, image).then(res => {
const url = _this.baseApi + '/file/' + data.type + '/' + data.realName const data = res.data
insert(url) const url = _this.baseApi + '/file/' + data.type + '/' + data.realName
insert(url)
})
}) })
}) }
} editor.config.onchange = (html) => {
editor.config.onchange = (html) => { this.formData.productDescribe = html
this.formData.productDescribe = html }
editor.create()
this.editor = editor
} }
editor.create()
this.editor = editor
// 初始化数据 // 初始化数据
HttpReq.backstageApi.queryProductDetail({ productId }).then((res) => { HttpReq.backstageApi.queryProductDetail({ productId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
...@@ -503,7 +502,7 @@ export default { ...@@ -503,7 +502,7 @@ export default {
if (this.formData.productFeature) { if (this.formData.productFeature) {
this.productFeature = this.formData.productFeature.split(';') this.productFeature = this.formData.productFeature.split(';')
} }
editor.txt.html(this.formData.productDescribe) this.editor.txt.html(this.formData.productDescribe)
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
......
...@@ -119,17 +119,6 @@ export default { ...@@ -119,17 +119,6 @@ export default {
console.log('启用', this.multipleSelection) console.log('启用', this.multipleSelection)
} }
}, },
changeEnabled(data, val) {
this.$confirm('此操作将 "' + this.dict.label.user_status[val] + '" ' + data.username + ', 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).catch(() => {
data.enabled = !data.enabled
})
},
toAdd() { toAdd() {
this.$refs.addPage.loadData() this.$refs.addPage.loadData()
}, },
......
<template> <template>
<!-- 表单渲染 --> <!-- 表单渲染 -->
<el-dialog append-to-body :close-on-click-modal="false" :before-close="cancelView" :visible="visible" :title="title" width="860px"> <el-dialog append-to-body :close-on-click-modal="false" :before-close="cancelView" :visible="visible" :title="title" width="1080px">
<img v-if="stampImgSrc" :src="stampImgSrc" class="stamp-review"> <img v-if="stampImgSrc[0]" :src="stampImgSrc[0]" class="stamp-review">
<el-form ref="formViewRef" :model="formData" :status-icon="true" label-width="240px"> <img v-if="stampImgSrc[1]" :src="stampImgSrc[1]" class="stamp-review" style="top:50%">
<el-form-item label="标识设置:" class="form-cell" prop="supplierLevel"> <el-form ref="formViewRef" :model="formData" :rules="rules" :status-icon="true" label-width="240px">
<el-form-item label="供应商名称:" class="form-cell" prop="enterpriseName">
<div class="cell-box"> <div class="cell-box">
<el-select v-model="formData.supplierLevel" disabled placeholder="无" class="cell-select"> <el-autocomplete
<el-option v-for="item in dict.supplier_rank" :key="item.value" :label="item.label" :value="item.value" /> v-model="formData.enterpriseName"
</el-select> disabled
class="cell-input"
:fetch-suggestions="querySearch"
placeholder="请输入供应商名称"
:trigger-on-focus="false"
@select="handleSelect"
/>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="企业名称:" class="form-cell" prop="enterpriseName"> <el-form-item label="品级标识设置:" class="form-cell" prop="rank">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.enterpriseName" disabled placeholder="请输入企业名称" class="cell-input" /> <el-select v-model="formData.rank" disabled placeholder="产品小类" style="width: 160px">
<el-option v-for="item in dict.product_rank" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="企业联系人:" class="form-cell" prop="enterpriseContactPerson"> <el-form-item label="产品名称:" class="form-cell" prop="productName">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.enterpriseContactPerson" disabled placeholder="请输入联系人" class="cell-input" /> <el-input v-model="formData.productName" disabled placeholder="请输入产品名称" class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="企业联系人手机号:" class="form-cell" prop="enterpriseContactPersonPhone"> <el-form-item label="产品分类:" class="form-cell" style="margin: 0">
<div class="cell-box"> <div class="cell-box" style="display: flex">
<el-input v-model="formData.enterpriseContactPersonPhone" disabled placeholder="请输入手机号" class="cell-input" /> <el-form-item prop="productType">
<el-select v-model="formData.productType" disabled placeholder="产品大类" style="width: 120px" @change="changeProductType">
<el-option v-for="item in dict.product_type" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item prop="productSubType" style="margin-left: 5px">
<el-select v-model="formData.productSubType" disabled placeholder="产品小类" style="width: 160px">
<el-option v-for="item in productSubTypeOpts" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="企业地址:" class="form-cell" prop="enterpriseAddress"> <el-form-item v-if="formData.productType&&formData.productType<5" label="产品属性:" class="form-cell">
<div class="cell-box"> <div class="cell-box" style="max-width: 600px">
<el-input v-model="formData.enterpriseAddress" disabled placeholder="请输入地址" class="cell-input" /> <el-row>
<el-col :span="5" class="grid-content">
<div class="grid-label">品牌</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeBrand" disabled placeholder="品牌" />
</el-col>
<el-col :span="5" class="grid-content">
<div class="grid-label">消耗电流</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeConsumptionCurrent" disabled placeholder="消耗电流" />
</el-col>
</el-row>
<el-row>
<el-col :span="5" class="grid-content">
<div class="grid-label">产品名</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeProductName" disabled placeholder="产品名" />
</el-col>
<el-col :span="5" class="grid-content">
<div class="grid-label">额定功率</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeRatedPower" disabled placeholder="额定功率" />
</el-col>
</el-row>
<el-row>
<el-col :span="5" class="grid-content">
<div class="grid-label">型号</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeModel" disabled placeholder="型号" />
</el-col>
<el-col :span="5" class="grid-content">
<div class="grid-label">反应时间</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeReactionTime" disabled placeholder="反应时间" />
</el-col>
</el-row>
<el-row>
<el-col :span="5" class="grid-content">
<div class="grid-label">工作电压</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeWorkingVoltage" disabled placeholder="工作电压" />
</el-col>
<el-col :span="5" class="grid-content">
<div class="grid-label">封装</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeEncapsulation" disabled placeholder="封装" />
</el-col>
</el-row>
<el-row>
<el-col :span="5" class="grid-content">
<div class="grid-label">质量保证</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeQualityAssurance" disabled placeholder="质量保证" />
</el-col>
<el-col :span="5" class="grid-content">
<div class="grid-label">产地</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeProducingArea" disabled placeholder="产地" />
</el-col>
</el-row>
<el-row>
<el-col :span="5" class="grid-content">
<div class="grid-label">数量</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeNumber" disabled placeholder="数量" />
</el-col>
<el-col :span="5" class="grid-content">
<div class="grid-label">颜色</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeColor" disabled placeholder="颜色" />
</el-col>
</el-row>
<el-row>
<el-col :span="5" class="grid-content">
<div class="grid-label">适用场景</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeApplicableScenarios" disabled placeholder="适用场景" />
</el-col>
<el-col :span="5" class="grid-content">
<div class="grid-label">批号</div>
</el-col>
<el-col :span="7" class="grid-content">
<el-input v-model="formData.attributeBatchNumber" disabled placeholder="批号" />
</el-col>
</el-row>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item disabled label="企业邮箱:" class="form-cell" prop="enterpriseEmail"> <el-form-item label="产品价格区间(元):" class="form-cell" style="margin: 0">
<div class="cell-box" style="display: flex">
<div class="cell-textarea">{{ formData.minPrice }} ~ {{ formData.maxPrice }}</div>
</div>
</el-form-item>
<el-form-item label="产品特点:" class="form-cell" prop="productFeature">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.enterpriseEmail" disabled placeholder="请输入邮箱" class="cell-input" /> <el-tag
v-for="tag in productFeature"
:key="tag"
size="small"
:type="tagTypes[formData.productType||0]"
:disable-transitions="false"
@close="handleClose(tag)"
>
{{ tag }}
</el-tag>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="营业执照:" class="form-cell" prop="businessLicense"> <el-form-item label="产品照片:" class="form-cell" prop="productPic">
<div class="cell-box"> <div class="cell-box">
<ul class="el-upload-list el-upload-list--picture-card"> <ul class="el-upload-list el-upload-list--picture-card" style="float: left">
<li v-for="(item, index) in imgList" :key="index" tabindex="0" class="el-upload-list__item is-success"> <li v-for="(item, index) in imgList" :key="index" tabindex="0" class="el-upload-list__item is-success">
<img :src="imgSrcStart+'/businessLicense/'+item" class="el-upload-list__item-thumbnail"> <img :src="imgSrcStart+'/productPic/'+item" class="el-upload-list__item-thumbnail">
<label class="el-upload-list__item-status-label"><i class="el-icon-upload-success el-icon-check" /></label> <label class="el-upload-list__item-status-label"><i class="el-icon-upload-success el-icon-check" /></label>
<span class="el-upload-list__item-actions"> <span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="dialogImgUrl=item;dialogImgVisible=true"><i class="el-icon-zoom-in" /></span> <span class="el-upload-list__item-preview" @click="dialogImgUrl=item;dialogImgVisible=true"><i class="el-icon-zoom-in" /></span>
...@@ -47,115 +176,33 @@ ...@@ -47,115 +176,33 @@
</li> </li>
</ul> </ul>
<el-dialog append-to-body :visible.sync="dialogImgVisible"> <el-dialog append-to-body :visible.sync="dialogImgVisible">
<img width="100%" :src="imgSrcStart+'/businessLicense/'+dialogImgUrl"> <img width="100%" :src="imgSrcStart+'/productPic/'+dialogImgUrl">
</el-dialog> </el-dialog>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="统一社会信用代码:" class="form-cell" prop="unifiedSocialCreditCode"> <el-form-item label="产品概述:" class="form-cell" prop="productDescribe">
<div class="cell-box">
<el-input v-model="formData.unifiedSocialCreditCode" disabled placeholder="请输入18位统一社会信用代码" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="纳税人识别号:" class="form-cell" prop="taxpayerIdentificationNumber">
<div class="cell-box">
<el-input v-model="formData.taxpayerIdentificationNumber" disabled placeholder="请输入纳税人识别号" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="所属行业:" class="form-cell" prop="industry">
<div class="cell-box">
<el-select v-model="formData.industry" disabled placeholder="无" class="cell-select">
<el-option v-for="item in dict.industry_type" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</el-form-item>
<el-form-item label="登记机关:" class="form-cell" prop="registrationAuthority">
<div class="cell-box">
<el-input v-model="formData.registrationAuthority" disabled placeholder="请输入登记机关" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="法定代表人:" class="form-cell" prop="legalRepresentative">
<div class="cell-box">
<el-input v-model="formData.legalRepresentative" disabled placeholder="请输入法定代表人" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="经营状态:" class="form-cell" prop="businessStatus">
<div class="cell-box">
<el-select v-model="formData.businessStatus" disabled placeholder="无" class="cell-select">
<el-option v-for="item in dict.business_status" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</el-form-item>
<el-form-item label="成立日期:" class="form-cell" prop="establishmentDate">
<div class="cell-box">
<el-date-picker v-model="formData.establishmentDate" disabled type="date" clearable placeholder="请选择日期" />
</div>
</el-form-item>
<el-form-item label="经营期限(年):" class="form-cell" prop="operatingPeriod">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.operatingPeriod" disabled type="number" placeholder="请输入数字" class="cell-input" /> <div v-html="formData.productDescribe" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="审核/年检日期:" class="form-cell" prop="annualInspectionDate"> <el-form-item label="其他说明:" class="form-cell" prop="notes">
<div class="cell-box"> <div class="cell-box">
<el-date-picker v-model="formData.annualInspectionDate" disabled type="date" clearable placeholder="请选择日期" /> <div class="cell-textarea">{{ formData.notes }}</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="企业类型:" class="form-cell" prop="enterpriseType"> <el-form-item label="交易保障承诺:" class="form-cell" prop="letterOfCommitment">
<div class="cell-box"> <div class="cell-box">
<el-select v-model="formData.enterpriseType" disabled placeholder="无" class="cell-select"> <el-checkbox v-model="formData.letterOfCommitment" disabled><em>卖家承诺履约合规诈骗包赔,保障产品交易安全</em></el-checkbox>
<el-option v-for="item in dict.company_type" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</el-form-item>
<el-form-item label="注册资本(万元):" class="form-cell" prop="registeredCapital">
<div class="cell-box">
<el-input v-model="formData.registeredCapital" disabled type="number" placeholder="请输入数字" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="注册地址:" class="form-cell">
<div class="cell-box">
<el-select v-model="formData.registeredAddressProvince" disabled placeholder="省" style="width: 120px" @change="findAreaByCodeAndType(formData.registeredAddressProvince,2, 'cityOpts')">
<el-option v-for="item in provinceOpts" :key="item.id" :label="item.name" :value="item.code" />
</el-select>
<el-select v-model="formData.registeredAddressCity" disabled placeholder="市" style="width: 160px" @change="findAreaByCodeAndType(formData.registeredAddressCity,3, 'countyOpts')">
<el-option v-for="item in cityOpts" :key="item.id" :label="item.name" :value="item.code" />
</el-select>
<el-select v-model="formData.registeredAddressArea" disabled placeholder="区/县" style="width: 160px">
<el-option v-for="item in countyOpts" :key="item.id" :label="item.name" :value="item.code" />
</el-select>
</div>
<div class="cell-box">
<el-input v-model="formData.registeredAddressStreet" disabled placeholder="详细地址(例如:和平路北大街106号)" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="经营范围:" class="form-cell" prop="businessScope">
<div class="cell-box">
<div class="cell-textarea">{{ formData.businessScope }}</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="企业介绍:" class="form-cell" prop="enterpriseIntroduction"> <el-form-item v-if="!isReview && formData.reviewComments" label="审核意见:" class="form-cell">
<div class="cell-box">
<div class="cell-textarea">{{ formData.enterpriseIntroduction }}</div>
</div>
</el-form-item>
<el-form-item label="主营产品介绍:" class="form-cell" prop="mainProductsIntroduction">
<div class="cell-box">
<div class="cell-textarea">{{ formData.mainProductsIntroduction }}</div>
</div>
</el-form-item>
<el-form-item label="业务范围:" class="form-cell" prop="businessScopeIntroduction">
<div class="cell-box">
<div class="cell-textarea">{{ formData.businessScopeIntroduction }}</div>
</div>
</el-form-item>
<el-form-item v-if="!isReview && formData.status!=='3'" label="审核意见:" class="form-cell">
<div class="cell-box"> <div class="cell-box">
<div class="cell-textarea">{{ formData.reviewComments }}</div> <div class="cell-textarea">{{ formData.reviewComments }}</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer">
<el-button @click="cancelView">关闭</el-button> <el-button type="text" @click="cancelView">取消</el-button>
<el-button v-if="isReview" type="primary" @click="submitForm(true)">通过</el-button> <el-button v-if="isReview" type="primary" @click="submitForm(true)">通过</el-button>
<el-button v-if="isReview" type="primary" @click="reviewVisible=true">驳回</el-button> <el-button v-if="isReview" type="primary" @click="reviewVisible=true">驳回</el-button>
</div> </div>
...@@ -176,56 +223,80 @@ ...@@ -176,56 +223,80 @@
<script> <script>
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { HttpReq } from '@/api/common' import { HttpReq } from '@/api/common'
import { mapGetters } from 'vuex'
import review_pass from '@/assets/images/review_pass.png' import review_pass from '@/assets/images/review_pass.png'
import review_await from '@/assets/images/review_await.png' import review_await from '@/assets/images/review_await.png'
import review_failed from '@/assets/images/review_failed.png' import review_failed from '@/assets/images/review_failed.png'
import pd from '@/assets/images/pd.png'
import pu from '@/assets/images/pu.png'
export default { export default {
dicts: ['industry_type', 'supplier_rank', 'company_type', 'business_status'], dicts: ['product_rank', 'product_type', 'product_type_1', 'product_type_2', 'product_type_3', 'product_type_4', 'product_type_5', 'product_type_6', 'product_type_7'],
data() { data() {
const checkPrice = (rule, value, callback) => {
if (!value) {
return callback()
}
if (!Number.isInteger(value)) {
return callback(new Error('请输入数字值'))
}
setTimeout(() => {
if (this.formData.minPrice && value < this.formData.minPrice) {
return callback(new Error('区间值错误'))
}
if (this.formData.maxPrice && value > this.formData.maxPrice) {
return callback(new Error('区间值错误'))
}
return callback()
}, 500)
}
return { return {
uploadHeaders: { 'Authorization': getToken() }, uploadHeaders: { 'Authorization': getToken() },
stampImgSrc: '', stampImgSrc: ['', ''],
isReview: false,
imgSrcStart: process.env.VUE_APP_BASE_API, imgSrcStart: process.env.VUE_APP_BASE_API,
editor: false, // 富文本对象
dialogImageUrl: '',
dialogImageVisible: false,
imgList: [],
dialogImgUrl: '', dialogImgUrl: '',
dialogImgVisible: false, dialogImgVisible: false,
visible: false, visible: false,
title: '客户信息详情', tagTypes: ['', 'primary', 'success', 'warning', 'danger', 'info', 'info', 'info'],
customerId: '', title: '编辑产品信息详情',
isReview: false, productSubTypeOpts: [],
imgList: [], inputVisible: false,
provinceOpts: [], inputValue: '',
cityOpts: [], productFeature: [], // 产品特点tag列表
countyOpts: [],
formData: { formData: {
annualInspectionDate: '', // 审核日期 productId: null,
businessLicense: '', // 营业执照的照片名称 customerId: null, // 供应商id
businessScope: '', // 经营范围 enterpriseName: '', // 供应商名称
businessScopeIntroduction: '', // 业务范围介绍 productName: '', // 产品名称
businessStatus: '', // 经营状态 productType: '1', // 产品大类
enterpriseAddress: '', // 企业地址 productSubType: null, // 产品小类
enterpriseContactPerson: '', // 企业联系人 minPrice: null, // 价格区间-小
enterpriseContactPersonPhone: '', // 企业联系人手机号 maxPrice: null, // 价格区间-大
enterpriseEmail: '', // 企业邮箱 productFeature: null, // 产品特点
enterpriseIntroduction: '', // 企业介绍 productPic: '', // 产品图片
enterpriseName: '', // 企业名称 productDescribe: '', // 产品描述(富文本)
enterpriseType: '', // 企业类型 notes: null, // 其他说明
establishmentDate: '', // 成立日期 letterOfCommitment: false, // 交易保障承诺
industry: '', // 所属行业 attributeBrand: '', // 属性-品牌
legalRepresentative: '', // 法定代表人 attributeConsumptionCurrent: '', // 属性-消耗电流
mainProductsIntroduction: '', // 主营产品介绍 attributeProductName: '', // 属性-产品名称
operatingPeriod: '', // 经营期限 attributeRatedPower: '', // 属性-额定功率
registeredAddressArea: '', // 注册地址-区 attributeModel: '', // 属性-型号
registeredAddressCity: '', // 注册地址-市 attributeReactionTime: '', // 属性-反应时间
registeredAddressProvince: '', // 注册地址-省 attributeWorkingVoltage: '', // 属性-工作电压
registeredAddressStreet: '', // 注册地址-街道 attributeEncapsulation: '', // 属性-封装
registeredCapital: '', // 注册资本 attributeQualityAssurance: '', // 属性-质量保证
registrationAuthority: '', // 登记机关 attributeProducingArea: '', // 属性-产地
supplierLevel: '1', // 供应商级别 attributeNumber: '', // 属性-数量
taxpayerIdentificationNumber: '', // 纳税人识别号 attributeColor: '', // 属性-颜色
unifiedSocialCreditCode: '', // 统一社会信用代码 attributeApplicableScenarios: '', // 属性-品牌
reviewComments: '', // 审核意见 attributeBatchNumber: '', // 属性-批号
sysUserId: null rank: '1' // 产品品级
}, },
reviewVisible: false, reviewVisible: false,
formReview: { formReview: {
...@@ -236,25 +307,118 @@ export default { ...@@ -236,25 +307,118 @@ export default {
} }
} }
}, },
computed: {
...mapGetters([
'imagesUploadApi',
'baseApi'
])
},
mounted() { mounted() {
this.$nextTick(() => { this.productSubTypeOpts = this.dict['product_type_1']
})
}, },
methods: { methods: {
checkEnterpriseName(rule, value, callback) {
this.$nextTick(_ => {
HttpReq.backstageApi.checkEnterpriseName({
name: value, id: this.formData.customerId
}).then((res) => {
if (res.data) {
callback()
} else {
callback(new Error(res.msg))
}
})
})
},
querySearch(queryString, cb) {
HttpReq.backstageApi.associateQueryEnterpriseName({
name: queryString
}).then((res) => {
cb(res.data)
})
},
handleSelect(item) {
this.formData.customerId = item.id
this.$refs.formViewRef.validateField('enterpriseName', valid => {
return valid
})
},
handleClose(tag) {
this.productFeature.splice(this.productFeature.indexOf(tag), 1)
this.formData.productFeature = this.productFeature.join(';')
},
showInput() {
this.inputVisible = true
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus()
})
},
handleInputConfirm() {
const inputValue = this.inputValue
if (inputValue && !this.productFeature.filter(item => { return item === inputValue }).length) {
this.productFeature.push(inputValue)
this.formData.productFeature = this.productFeature.join(';')
}
this.inputValue = ''
this.inputVisible = false
},
handleExceed() {
this.$message({
message: '超出最大上传数量限制',
type: 'info'
})
},
handleRemoveImg(item) {
this.imgList.splice(this.imgList.indexOf(item), 1)
const arr = this.formData.productPic.split(';')
arr.splice(arr.indexOf(item), 1)
this.formData.productPic = arr.join(';')
},
handleRemove(file, fileList) {
HttpReq.backstageApi.deleteProductPic({
productPic: file.response.productPic
}).then((res) => {
this.$notify({
title: res.msg,
type: 'success',
duration: 2500
})
const arr = []
fileList.forEach(item => {
arr.push(item.response.productPic)
})
this.formData.productPic = arr.join(';')
})
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogImageVisible = true
},
handleImported(response, file, fileList) {
this.$nextTick(() => {
const arr = this.formData.productPic ? this.formData.productPic.split(';') : []
arr.push(response.productPic)
this.formData.productPic = arr.join(';')
this.$notify({
title: '上传成功!',
type: 'success',
duration: 2500
})
})
},
showView() { showView() {
this.visible = true this.visible = true
}, },
hideView() { hideView() {
this.$refs.formViewRef.resetFields() this.$refs.formViewRef.resetFields()
this.cityOpts = [] this.productSubTypeOpts = this.dict['product_type_1']
this.countyOpts = [] this.productFeature = []
this.imgList = []
this.visible = false this.visible = false
}, },
cancelView() { cancelView() {
this.cancelReview() this.cancelReview()
this.hideView() this.hideView()
this.stampImgSrc = ['', '']
}, },
cancelReview() { cancelReview() {
if (this.$refs.formReviewRef) { if (this.$refs.formReviewRef) {
...@@ -285,8 +449,8 @@ export default { ...@@ -285,8 +449,8 @@ export default {
} }
this.$refs.formReviewRef.validate((valid, obj) => { this.$refs.formReviewRef.validate((valid, obj) => {
if (valid) { if (valid) {
HttpReq.backstageApi.reviewCustomer({ HttpReq.backstageApi.reviewProduct({
customerId: this.customerId, productId: this.formData.productId,
reviewComments: this.formReview.reviewComments, reviewComments: this.formReview.reviewComments,
type: 0 type: 0
}).then((res) => { }).then((res) => {
...@@ -308,42 +472,54 @@ export default { ...@@ -308,42 +472,54 @@ export default {
} }
}) })
}, },
findAreaByCodeAndType(code, type, optsName, fn) { changeProductType() {
HttpReq.backstageApi.findAreaByCodeAndType({ this.formData.productSubType = null
code, type this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType]
}).then((res) => {
this[optsName] = res
})
}, },
loadData(customerId, isReview) { loadData(productId, isReview) {
this.customerId = customerId
this.isReview = isReview this.isReview = isReview
this.title = `${isReview ? '审核' : '查看'}客户信息详情` this.title = `${isReview ? '审核' : '查看'}产品信息详情`
this.findAreaByCodeAndType(0, 1, 'provinceOpts') this.showView()
HttpReq.backstageApi.queryCustomerDetail({ customerId }).then((res) => { this.$nextTick(() => {
if (res.code === 200) { // 初始化数据
this.formData = res.data HttpReq.backstageApi.queryProductDetail({ productId }).then((res) => {
if (this.formData.businessLicense) { if (res.code === 200) {
this.imgList = this.formData.businessLicense.split(';') this.formData = res.data
} if (this.formData.productPic) {
switch (this.formData.status) { this.imgList = this.formData.productPic.split(';')
case '1': this.stampImgSrc = review_pass }
break if (this.formData.productType) {
case '3': this.stampImgSrc = review_await this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType]
break }
case '4': this.stampImgSrc = review_failed if (this.formData.productFeature) {
break this.productFeature = this.formData.productFeature.split(';')
default: this.stampImgSrc = '' }
switch (this.formData.status) {
case '2': this.stampImgSrc[0] = review_failed
break
case '3': this.stampImgSrc[0] = review_await
break
case '4': this.stampImgSrc[0] = review_pass
break
case '5':
this.stampImgSrc[0] = review_pass
this.stampImgSrc[1] = pu
break
case '6':
this.stampImgSrc[0] = ''
this.stampImgSrc[1] = pd
break
default:
this.stampImgSrc[0] = ''
this.stampImgSrc[1] = ''
}
} else {
this.$message({
message: res.msg,
type: 'error'
})
} }
this.findAreaByCodeAndType(this.formData.registeredAddressProvince, 2, 'cityOpts') })
this.findAreaByCodeAndType(this.formData.registeredAddressCity, 3, 'countyOpts')
this.showView()
} else {
this.$message({
message: res.msg,
type: 'error'
})
}
}) })
} }
} }
...@@ -358,6 +534,30 @@ export default { ...@@ -358,6 +534,30 @@ export default {
top: 40%; top: 40%;
z-index: 99; z-index: 99;
} }
.grid-content {
border: 1px solid rgba(100, 100, 100, 0.3);
padding: 0;
}
.grid-label {
background: #dedede;
padding: 0 10px;
}
.editor{
text-align:left;
width: 680px;
}
.cell-textarea {
min-height: 50px;
color: #777;
font-style: oblique;
font-size: 14px;
text-decoration: underline; //下划线
text-underline-offset: 5px; //下划线和文字间距
text-decoration-color: rgba(100, 100, 100, 0.4);
}
::v-deep .w-e-text-container {
height: 560px !important;
}
.cell-box { .cell-box {
min-width: 120px; min-width: 120px;
.cell-input { .cell-input {
...@@ -366,13 +566,20 @@ export default { ...@@ -366,13 +566,20 @@ export default {
.cell-select { .cell-select {
width: 220px; width: 220px;
} }
.cell-textarea { .el-tag + .el-tag {
min-height: 50px; margin-left: 10px;
color: #777; }
font-style: oblique; .button-new-tag {
font-size: 14px; margin-left: 10px;
text-decoration: underline; //下划线 height: 28px;
text-underline-offset: 5px; //下划线和文字间距 line-height: 24px;
padding: 0 8px;
}
.input-new-tag {
width: 140px;
height: 28px;
margin-left: 10px;
vertical-align: bottom;
} }
>>>.el-input__inner { >>>.el-input__inner {
border: 1px solid rgba(100, 100, 100, 0.1); border: 1px solid rgba(100, 100, 100, 0.1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment