fixLog V2.4.8
yujialong 1 year ago
parent 7f1c4ef666
commit 117dcd2537
  1. 4
      src/components/Header.vue
  2. 54
      src/components/codemirror.vue
  3. 2
      src/setting.js
  4. 1
      src/utils/api.js
  5. 568
      src/views/customer/AddCustomer.vue
  6. 98
      src/views/order/AddOrder.vue
  7. 512
      src/views/parnerOperation/schemeSet.vue

@ -74,8 +74,8 @@ export default {
},
initSocket ({ id, account }) {
// socket
// this.socket = new WebSocket(`ws://${Setting.isDev ? '192.168.31.51' : location.host}:9100/nakadai/websocket/${id}/${account}`)
this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`)
this.socket = new WebSocket(`wss://${Setting.isDev ? '192.168.31.51' : location.host}/nakadai/websocket/${id}/${account}`)
// this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`)
// socket
this.socket.onopen = this.open;
// socket

@ -1,37 +1,45 @@
<template>
<div class="wrap">
<div class="left">
<codemirror
v-model="codeVal"
<codemirror v-model="codeVal"
:options="cmOption"
class="code-mirror"
@ready="ready"
ref="codemirror"
></codemirror>
<el-button
class="run btn"
ref="codemirror"></codemirror>
<el-button class="run btn"
type="primary"
@click="runCode"
>运行</el-button>
@click="runCode">运行</el-button>
</div>
<div class="code-right answer">
<p class="text-wrapper">{{ runResult }}</p>
<div class="pic-wrap" v-if="picSrcList.length">
<div class="pic-item" v-for="(img, i) in picSrcList" :key="i">
<el-image
class="pic"
<div class="pic-wrap"
v-if="picSrcList.length">
<div class="pic-item"
v-for="(img, i) in picSrcList"
:key="i">
<el-image class="pic"
:src="img"
:preview-src-list="picSrcList">
</el-image>
<el-button class="download-btn btn" type="primary" size="mini" @click="downloadPic(i)">下载图片</el-button>
<a :ref="'picLink' + i" style="display: none;" download="运行结果.png" :href="img">下载图片</a>
<el-button class="download-btn btn"
type="primary"
size="mini"
@click="downloadPic(i)">下载图片</el-button>
<a :ref="'picLink' + i"
style="display: none;"
download="运行结果.png"
:href="img">下载图片</a>
</div>
</div>
<div class="result-right t-color" v-show="isError">
<img src="@/assets/img/yes.png" alt />运行成功
<div class="result-right t-color"
v-show="isError">
<img src="@/assets/img/yes.png"
alt />运行成功
</div>
<div class="result-wrong" v-show="isError === 0">
<img src="@/assets/img/error.png" alt />
<div class="result-wrong"
v-show="isError === 0">
<img src="@/assets/img/error.png"
alt />
{{errLine}}行出现错误
</div>
</div>
@ -217,7 +225,7 @@ export default {
::-webkit-scrollbar-thumb {
width: 5px;
border-radius: 6px;
background: rgba(173,173,173,.7);
background: rgba(173, 173, 173, 0.7);
}
.wrap {
display: flex;
@ -226,6 +234,9 @@ export default {
position: relative;
width: calc(100% - 400px);
}
.code-mirror {
line-height: 30px;
}
.text-wrapper {
white-space: pre-wrap;
}
@ -286,11 +297,6 @@ export default {
}
}
}
/deep/.CodeMirror-wrap pre.CodeMirror-line,
.CodeMirror-wrap pre.CodeMirror-line-like {
height: 30px;
line-height: 30px;
}
.result-right {
background-color: rgba(43, 40, 22, 1);
}

@ -11,7 +11,7 @@ if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
host = 'http://192.168.31.152:9000/'// 榕
// host = 'http://192.168.31.152:9000/'// 榕
// host = 'http://192.168.31.51:9000/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

@ -44,6 +44,7 @@ export default {
getProductsSubscribedByCustomers: `nakadai/nakadai/customer/getProductsSubscribedByCustomers`,
orderBulkDisableEnable: `nakadai/nakadai/orderOther/orderBulkDisableEnable`,
exportSubscribedRecords: `nakadai/nakadai/order/exportSubscribedRecords`,
addNewCustomersByOneself: `nakadai/nakadai/school/addNewCustomersByOneself`,
resetPwdCustomer: `nakadai/nakadai/customer/resetPwd`,
queryCustomerIsExists: `nakadai/nakadai/customer/queryCustomerIsExists`,

@ -1,84 +1,173 @@
<template>
<div>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-between">
<div class="per_title" v-preventReClick @click="goback(0)">
<div class="per_title"
v-preventReClick
@click="goback(0)">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span v-if="form.customerName || !customerId" class="per_school" v-text="isDetail ? form.customerName + '/查看' : (customerId ? form.customerName + '/编辑' : '新增')"></span>
<span v-if="form.customerName || !customerId"
class="per_school"
v-text="isDetail ? form.customerName + '/查看' : (customerId ? form.customerName + '/编辑' : '新增')"></span>
</div>
</div>
</el-card>
<el-card shadow="hover" class="card">
<div class="tabs" v-if="customerId">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{active: i == curTab}" @click="tabChange(i)">{{ item }}</a>
<el-card shadow="hover"
class="card">
<div class="tabs"
v-if="customerId">
<a class="item"
v-for="(item, i) in tabs"
:key="i"
:class="{active: i == curTab}"
@click="tabChange(i)">{{ item }}</a>
</div>
<div v-show="curTab === 'tab1'">
<el-form :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around info" :disabled="isDetail">
<el-col :span="6" style="margin-right: 60px;">
<el-form-item prop="countries" label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option>
<el-form :model="form"
:rules="rules"
ref="form"
label-width="120px"
class="flex-start-around info"
:disabled="isDetail">
<el-col :span="6"
style="margin-right: 60px;">
<el-form-item prop="countries"
label="国家">
<el-select v-model="form.countries"
clearable
placeholder="请选择国家">
<el-option v-for="(item,index) in countryList"
:key="index"
:label="item.name"
:value="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="schoolId" label="客户名称">
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" :disabled="!!customerId" @change="SchoolChange" @clear="clearSchool">
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>
<el-form-item prop="schoolId"
label="客户名称">
<div class="flex a-center">
<el-select v-model="form.schoolId"
filterable
clearable
placeholder="请选择学校"
:disabled="!!customerId"
@change="SchoolChange"
@clear="clearSchool">
<el-option v-for="(item,index) in schoolList"
:key="index"
:label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
<i class="el-icon-circle-plus-outline plus-cus"
@click="addCustomer"></i>
</div>
</el-form-item>
<el-form-item prop="cityId" label="城市">
<el-select v-model="form.cityId" placeholder="" disabled>
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
<el-form-item prop="cityId"
label="城市">
<el-select v-model="form.cityId"
placeholder=""
disabled>
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="industryId" label="行业">
<el-select v-model="form.industryId" clearable placeholder="请选择行业" :disabled="form.industryClassId ? false : true">
<el-option v-for="(item,index) in industryList" :key="index" :label="item.industryName" :value="item.industryId"></el-option>
<el-form-item prop="industryId"
label="行业">
<el-select v-model="form.industryId"
clearable
placeholder="请选择行业"
:disabled="form.industryClassId ? false : true">
<el-option v-for="(item,index) in industryList"
:key="index"
:label="item.industryName"
:value="item.industryId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="account" label="账号">
<el-input placeholder="请输入账号" v-model="form.account"></el-input>
<el-form-item prop="account"
label="账号">
<el-input placeholder="请输入账号"
v-model="form.account"></el-input>
</el-form-item>
<el-form-item label="职务">
<el-input placeholder="请输入职务名称" v-model="form.position" maxlength="11"></el-input>
<el-input placeholder="请输入职务名称"
v-model="form.position"
maxlength="11"></el-input>
</el-form-item>
<el-form-item label="产品到期时间">
<el-date-picker type="date" disabled v-model="form.expireDate" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date"
disabled
v-model="form.expireDate"
style="width: 100%;"
value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6" style="margin-left: 60px;">
<el-col :span="6"
style="margin-left: 60px;">
<el-form-item label="客户类型">
<el-select v-model="form.customerType" placeholder="下单后客户类型自动补充" disabled>
<el-option v-for="(item,index) in customerTypeList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-select v-model="form.customerType"
placeholder="下单后客户类型自动补充"
disabled>
<el-option v-for="(item,index) in customerTypeList"
:key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="provinceId" label="省份">
<el-select v-model="form.provinceId" placeholder="" disabled>
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
<el-form-item prop="provinceId"
label="省份">
<el-select v-model="form.provinceId"
placeholder=""
disabled>
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="industryClassId" label="行业类型">
<el-select v-model="form.industryClassId" clearable placeholder="请选择行业类型" @change="changIndustry" @clear="clearIndustry()">
<el-option v-for="(item,index) in IndustryClassList" :key="index" :label="item.industryClassName" :value="item.industryClassId"></el-option>
<el-form-item prop="industryClassId"
label="行业类型">
<el-select v-model="form.industryClassId"
clearable
placeholder="请选择行业类型"
@change="changIndustry"
@clear="clearIndustry()">
<el-option v-for="(item,index) in IndustryClassList"
:key="index"
:label="item.industryClassName"
:value="item.industryClassId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="name" label="联系人姓名">
<el-input placeholder="请输入联系人姓名" v-model="form.name"></el-input>
<el-form-item prop="name"
label="联系人姓名">
<el-input placeholder="请输入联系人姓名"
v-model="form.name"></el-input>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input placeholder="请输入联系人手机号" v-model="form.phone" maxlength="11"></el-input>
<el-form-item prop="phone"
label="手机号">
<el-input placeholder="请输入联系人手机号"
v-model="form.phone"
maxlength="11"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input placeholder="请输入邮箱" v-model="form.email"></el-input>
<el-form-item prop="email"
label="邮箱">
<el-input placeholder="请输入邮箱"
v-model="form.email"></el-input>
</el-form-item>
</el-col>
</el-form>
<div v-if="!isDetail" style="margin-top: 20px;text-align: center">
<el-button type="primary" v-preventReClick @click="saveAdd(0)">确定</el-button>
<el-button v-preventReClick @click="$router.back()">取消</el-button>
<div v-if="!isDetail"
style="margin-top: 20px;text-align: center">
<el-button type="primary"
v-preventReClick
@click="saveAdd(0)">确定</el-button>
<el-button v-preventReClick
@click="$router.back()">取消</el-button>
</div>
</div>
@ -87,34 +176,69 @@
<ul class="filter">
<li>
<label>产品分类</label>
<el-select v-model="form2.productType" placeholder="请选择产品类型" clearable @change="filterForm2">
<el-option v-for="(item,index) in productTypeList" :key="index" :label="item.classificationName" :value="item.classificationId"></el-option>
<el-select v-model="form2.productType"
placeholder="请选择产品类型"
clearable
@change="filterForm2">
<el-option v-for="(item,index) in productTypeList"
:key="index"
:label="item.classificationName"
:value="item.classificationId"></el-option>
</el-select>
</li>
<li>
<label>订阅状态</label>
<el-select v-model="form2.status" placeholder="请选择订阅状态" @change="filterForm2">
<el-option v-for="(item,index) in subStatusList" :key="index" :label="item.name" :value="item.name"></el-option>
<el-select v-model="form2.status"
placeholder="请选择订阅状态"
@change="filterForm2">
<el-option v-for="(item,index) in subStatusList"
:key="index"
:label="item.name"
:value="item.name"></el-option>
</el-select>
</li>
<li>
<el-input style="width: 250px;" placeholder="请输入产品名称" prefix-icon="el-icon-search" clearable v-model="form2.keyword"></el-input>
<el-input style="width: 250px;"
placeholder="请输入产品名称"
prefix-icon="el-icon-search"
clearable
v-model="form2.keyword"></el-input>
</li>
</ul>
<div>
<el-button type="primary" @click="exportList">导出列表</el-button>
<el-button type="primary"
@click="exportList">导出列表</el-button>
</div>
</div>
<el-table :data="products" class="orderTable" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<el-table :data="products"
class="orderTable"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column>
<el-table-column prop="productTypeName" label="产品分类" align="center"></el-table-column>
<el-table-column label="起止日期" align="center">
<el-table-column prop="goodsName"
label="产品名称"
align="center"></el-table-column>
<el-table-column prop="productTypeName"
label="产品分类"
align="center"></el-table-column>
<el-table-column label="起止日期"
align="center">
<template slot-scope="scope">
{{ scope.row.status === '已过期' ? '' : scope.row.startAndEndTime }}
<el-tooltip v-if="scope.row.other" class="item" effect="dark" placement="top">
<el-tooltip v-if="scope.row.other"
class="item"
effect="dark"
placement="top">
<div slot="content">
还有<span v-html="scope.row.other"></span><br>的订单还未生效
</div>
@ -122,20 +246,34 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="剩余期限" align="center">
<el-table-column label="剩余期限"
align="center">
<template slot-scope="scope">
{{scope.row.remain}}&nbsp;&nbsp;
</template>
</el-table-column>
<el-table-column prop="status" label="订阅状态" align="center"></el-table-column>
<el-table-column label="产品状态" align="center">
<el-table-column prop="status"
label="订阅状态"
align="center"></el-table-column>
<el-table-column label="产品状态"
align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" :active-text="scope.row.isEnable ? '启用' : '禁用'" :disabled="scope.row.status === '已过期'" @change="switchOff($event,scope.row,scope.$index)"></el-switch>
<el-switch v-model="scope.row.isEnable"
:active-value="1"
:inactive-value="0"
:active-text="scope.row.isEnable ? '启用' : '禁用'"
:disabled="scope.row.status === '已过期'"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChangeProduct" :current-page="pageProduct" :page-size="pageSizeProduct" :total="totalProduct"></el-pagination>
<el-pagination background
layout="total, prev, pager, next"
@current-change="handleCurrentChangeProduct"
:current-page="pageProduct"
:page-size="pageSizeProduct"
:total="totalProduct"></el-pagination>
</div>
</div>
@ -144,32 +282,68 @@
<ul class="filter">
<li>
<label>订单类型</label>
<el-select v-model="form3.orderType" clearable placeholder="请选择订单类型" @change="getOrder">
<el-option v-for="(item,index) in orderTypeList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-select v-model="form3.orderType"
clearable
placeholder="请选择订单类型"
@change="getOrder">
<el-option v-for="(item,index) in orderTypeList"
:key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select>
</li>
<li>
<label>订单状态</label>
<el-select v-model="form3.orderStatus" clearable placeholder="请选择订单状态" @change="getOrder">
<el-option v-for="(item,index) in orderStatusList" :key="index" :label="item.name" :value="item.id"></el-option>
<el-select v-model="form3.orderStatus"
clearable
placeholder="请选择订单状态"
@change="getOrder">
<el-option v-for="(item,index) in orderStatusList"
:key="index"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</li>
</ul>
<div>
<el-input style="width: 250px;" placeholder="请输入订单编号、内容" prefix-icon="el-icon-search" clearable v-model="form3.keyword"></el-input>
<el-input style="width: 250px;"
placeholder="请输入订单编号、内容"
prefix-icon="el-icon-search"
clearable
v-model="form3.keyword"></el-input>
</div>
</div>
<el-table :data="orders" class="orderTable" stripe header-align="center" @selection-change="handleSelectionChange" row-key="orderId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<el-table :data="orders"
class="orderTable"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="orderId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
</el-table-column>
<el-table-column prop="orderNumber" label="订单编号" align="center"></el-table-column>
<el-table-column prop="orderContent" label="订单内容" align="center">
<el-table-column prop="orderNumber"
label="订单编号"
align="center"></el-table-column>
<el-table-column prop="orderContent"
label="订单内容"
align="center">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top" style='width: 500px' v-if='scope.row.orderContent.length >14'>
<el-popover trigger="hover"
placement="top"
style='width: 500px'
v-if='scope.row.orderContent.length >14'>
<p> {{ scope.row.orderContent }}</p>
<div slot="reference" class="name-wrapper">
<el-tag size="medium" class='tags'>{{ scope.row.orderContent }}</el-tag>
<div slot="reference"
class="name-wrapper">
<el-tag size="medium"
class='tags'>{{ scope.row.orderContent }}</el-tag>
</div>
</el-popover>
<span v-else>
@ -177,50 +351,89 @@
</span>
</template>
</el-table-column>
<el-table-column prop="orderAmount" label="订单金额(元)" align="center"></el-table-column>
<el-table-column prop="createTime" label="订单日期" align="center"></el-table-column>
<el-table-column prop="orderType" label="订单类型" align="center"></el-table-column>
<el-table-column prop="orderStatus" label="订单状态" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<el-table-column prop="orderAmount"
label="订单金额(元)"
align="center"></el-table-column>
<el-table-column prop="createTime"
label="订单日期"
align="center"></el-table-column>
<el-table-column prop="orderType"
label="订单类型"
align="center"></el-table-column>
<el-table-column prop="orderStatus"
label="订单状态"
align="center"></el-table-column>
<el-table-column label="操作"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="toOrderDetail(scope.row)">订单详情</el-button>
<el-button type="text"
@click="toOrderDetail(scope.row)">订单详情</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChangeOrder" :current-page="pageOrder" :page-size="pageSizeOrder" :total="totalOrder"></el-pagination>
<el-pagination background
layout="total, prev, pager, next"
@current-change="handleCurrentChangeOrder"
:current-page="pageOrder"
:page-size="pageSizeOrder"
:total="totalOrder"></el-pagination>
</div>
</div>
<div v-show="curTab === 'tab4'">
<div class="tool">
<div>
<el-input style="width: 350px;" placeholder="请输入订单编号、合同名称、合同编号、产品内容" prefix-icon="el-icon-search" clearable></el-input>
<el-input style="width: 350px;"
placeholder="请输入订单编号、合同名称、合同编号、产品内容"
prefix-icon="el-icon-search"
clearable></el-input>
</div>
</div>
<el-table :data="contractInformations" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
<el-table :data="contractInformations"
class="table"
stripe
header-align="center">
<el-table-column type="index"
width="100"
label="序号"
align="center">
</el-table-column>
<el-table-column prop="contractNumber" label="订单号" align="center"></el-table-column>
<el-table-column prop="contractNumber" label="合同编号" align="center"></el-table-column>
<el-table-column prop="contractName" label="合同名称" align="center">
<el-table-column prop="contractNumber"
label="订单号"
align="center"></el-table-column>
<el-table-column prop="contractNumber"
label="合同编号"
align="center"></el-table-column>
<el-table-column prop="contractName"
label="合同名称"
align="center">
</el-table-column>
<el-table-column prop="endTime" label="合同期限" align="center">
<el-table-column prop="endTime"
label="合同期限"
align="center">
<template slot-scope="scope">
{{scope.row.startTime?scope.row.startTime.split(' ').shift():''}}&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;{{scope.row.endTime?scope.row.endTime.split(' ').shift():''}}
</template>
</el-table-column>
<el-table-column prop="dataOrCourseName" label="产品内容" align="center">
<el-table-column prop="dataOrCourseName"
label="产品内容"
align="center">
</el-table-column>
<el-table-column prop="contractMoney" label="合同金额" align="center">
<el-table-column prop="contractMoney"
label="合同金额"
align="center">
<template slot-scope="scope">
{{scope.row.contractMoney}}&nbsp;&nbsp;
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="showContract(scope.row)">查看</el-button>
<el-button type="text" @click="showContract(scope.row)">下载</el-button>
<el-button type="text"
@click="showContract(scope.row)">查看</el-button>
<el-button type="text"
@click="showContract(scope.row)">下载</el-button>
</template>
</el-table-column>
</el-table>
@ -229,41 +442,122 @@
<div v-show="curTab === 'tab5'">
<div class="tool">
<div>
<el-input style="width: 300px;" placeholder="请输入商务经理、手机号" prefix-icon="el-icon-search" clearable v-model="bmsKeyword"></el-input>
<el-input style="width: 300px;"
placeholder="请输入商务经理、手机号"
prefix-icon="el-icon-search"
clearable
v-model="bmsKeyword"></el-input>
</div>
</div>
<el-table :data="bms" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" width="200" align="center">
<el-table :data="bms"
class="table"
stripe
header-align="center">
<el-table-column type="index"
width="100"
label="序号"
align="center"></el-table-column>
<el-table-column prop="userName"
label="姓名"
width="200"
align="center">
<template slot-scope="scope">
{{ scope.row.userName }}{{ scope.row.peopleDel ? '(已被删除)' : '' }}
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号" width="150" align="center"></el-table-column>
<el-table-column prop="bmName" label="所属团队" align="center">
<el-table-column prop="phone"
label="手机号"
width="150"
align="center"></el-table-column>
<el-table-column prop="bmName"
label="所属团队"
align="center">
<template slot-scope="scope">
<div v-html="scope.row.bmName"></div>
</template>
</el-table-column>
<el-table-column prop="quantityOfOrder" label="订单数量" width="100" align="center"></el-table-column>
<el-table-column prop="latestTime" label="最近下单时间" width="200" align="center"></el-table-column>
<el-table-column prop="productName" label="产品" align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120" align="center">
<el-table-column prop="quantityOfOrder"
label="订单数量"
width="100"
align="center"></el-table-column>
<el-table-column prop="latestTime"
label="最近下单时间"
width="200"
align="center"></el-table-column>
<el-table-column prop="productName"
label="产品"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column label="操作"
width="120"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="toOrder(scope.row)">查看</el-button>
<el-button type="text"
@click="toOrder(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChangeBm" :current-page="pageBm" :page-size="pageSizeBm" :total="totalBm"></el-pagination>
<el-pagination background
layout="total, prev, pager, next"
@current-change="handleCurrentChangeBm"
:current-page="pageBm"
:page-size="pageSizeBm"
:total="totalBm"></el-pagination>
</div>
</div>
</el-card>
<el-dialog :visible.sync="showImg" width="70%" center>
<img :src="fileSrc" width="100%" alt="">
<el-dialog :visible.sync="showImg"
width="70%"
center>
<img :src="fileSrc"
width="100%"
alt="">
</el-dialog>
<pdf :visible.sync="pdfVisible" :src.sync="fileSrc"></pdf>
<el-dialog title="创建客户"
:visible.sync="customerVisible"
width="300px"
class="dialog"
:close-on-click-modal="false">
<el-form label-width="70px">
<el-form-item label="客户名称">
<el-input v-model="customerForm.schoolName"
placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item prop="userName"
label="省份">
<el-select v-model="customerForm.provinceName"
placeholder="请选择省份"
@change="provinceChange">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
:value="item.provinceName"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="userName"
label="城市">
<el-select v-model="customerForm.cityName"
placeholder="请选择城市"
:disabled="customerForm.provinceName ? false : true">
<el-option v-for="(item,index) in cities"
:key="index"
:label="item.cityName"
:value="item.cityName"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button @click="customerVisible = false">取消</el-button>
<el-button type="primary"
@click="submitCustomer">确定</el-button>
</span>
</el-dialog>
<pdf :visible.sync="pdfVisible"
:src.sync="fileSrc"></pdf>
</div>
</template>
@ -482,7 +776,14 @@ export default {
phoneRepeat: false,
emailRepeat: false,
submiting: false, //
updateTime: 0
updateTime: 0,
customerVisible: false,
cities: [],
customerForm: {
schoolName: '',
provinceName: '',
cityName: '',
}
};
},
watch: {
@ -665,6 +966,37 @@ export default {
this.handlePage()
this.$router.push(`addcustomer?id=${this.customerId}&type=tab2&page=${val}`)
},
//
addCustomer () {
this.customerVisible = true
},
//
provinceChange (name) {
this.$get(this.api.queryCity, {
provinceId: this.provinceList.find(e => e.provinceName == name).provinceId
}).then(({ list }) => {
this.cities = list
this.customerForm.cityName = ''
}).catch(res => { });
},
//
submitCustomer () {
if (this.submiting) return false
const form = this.customerForm
if (!form.schoolName) return this.$message.warning('请输入客户名称')
if (!form.provinceName) return this.$message.warning('请选择省份')
if (!form.cityName) return this.$message.warning('请选择城市')
this.submiting = true
this.$get(this.api.addNewCustomersByOneself, form).then(res => {
this.customerVisible = false
this.submiting = false
this.$message.success('添加成功')
this.form.schoolId = res.schoolId
this.getSchoolData()
}).catch((res) => {
this.submiting = false
})
},
//
getCategory () {
this.$get(this.api.productCategoryList).then(res => {
@ -675,7 +1007,7 @@ export default {
filterForm2 () {
const list = this.productAll
const { productType, status, keyword } = this.form2
this.products = list.filter(e => (productType === '' || productType === e.productType) && (e.status === status || status === '全部') && e.productName.includes(keyword))
this.products = list.filter(e => (productType === '' || productType === e.productType) && (e.status === status || status === '全部') && (!e.goodsName || (e.goodsName && e.goodsName.includes(keyword))))
},
//
exportList () {
@ -790,10 +1122,9 @@ export default {
},
//
getCityData () {
let data = {
this.$get(this.api.queryCity, {
provinceId: this.form.provinceId
}
this.$get(this.api.queryCity,data).then(res => {
}).then(res => {
this.cityList = res.list
}).catch(res => { });
},
@ -1023,15 +1354,16 @@ export default {
}
.radio_icon {
font-size: 26px;
color: #9278FF;
color: #9278ff;
}
/deep/.warning {
margin-left: 5px;
color: #9278FF;
color: #9278ff;
}
.tags {
border: none;
background: none;color: #000;
background: none;
color: #000;
white-space: pre-wrap;
overflow: hidden;
text-overflow: ellipsis;
@ -1046,4 +1378,10 @@ export default {
width: 100%;
}
}
.plus-cus {
margin-left: 10px;
font-size: 18px;
color: #666;
cursor: pointer;
}
</style>

@ -187,7 +187,7 @@
round
@click="batchDeliver(0, 0)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled"
<el-button v-if="!viewDisabled&&!isEdit&&!renewDisabled"
type="primary"
round
@click="addCourseJurisdiction(1)">添加</el-button>
@ -216,7 +216,7 @@
<div class="small">
<el-input class="time-input"
:class="!scope.row.periodOfUse&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
maxlength="4"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
@input="scope.row.periodOfUse = scope.row.periodOfUse.replace(/[^0-9.]/g,'')"
@ -224,7 +224,7 @@
placeholder="输入时间"></el-input>
<el-select class="time-select"
v-model="scope.row.options"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
placeholder="请选择"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)">
<el-option label="日"
@ -246,7 +246,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -256,7 +256,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -341,7 +341,7 @@
width="180">
<template slot-scope="scope">
<div class="flex-c-c">
<el-button v-if="!editDisabled&&!viewDisabled"
<el-button v-if="!isEdit&&!viewDisabled"
type="text"
@click="delCourseForm(scope.$index, scope.row)"
style="margin-right:10px;">删除</el-button>
@ -399,7 +399,7 @@
round
@click="batchDeliver(0, 5)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled"
<el-button v-if="!viewDisabled&&!isEdit&&!renewDisabled"
type="primary"
round
@click="addCourseJurisdiction(2)">添加</el-button>
@ -428,7 +428,7 @@
<div class="small">
<el-input class="time-input"
:class="!scope.row.periodOfUse&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
maxlength="4"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
@input="scope.row.periodOfUse = scope.row.periodOfUse.replace(/[^0-9.]/g,'')"
@ -436,7 +436,7 @@
placeholder="输入时间"></el-input>
<el-select class="time-select"
v-model="scope.row.options"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
placeholder="请选择"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)">
<el-option label="日"
@ -458,7 +458,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -468,7 +468,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -553,7 +553,7 @@
width="180">
<template slot-scope="scope">
<div class="flex-c-c">
<el-button v-if="!editDisabled&&!viewDisabled"
<el-button v-if="!isEdit&&!viewDisabled"
type="text"
@click="delCourseDataForm(scope.$index, scope.row)"
style="margin-right:10px;">删除</el-button>
@ -611,7 +611,7 @@
round
@click="batchDeliver(0, 1)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled"
<el-button v-if="!viewDisabled&&!isEdit&&!renewDisabled"
type="primary"
round
class="mag"
@ -641,7 +641,7 @@
<div class="small">
<el-input class="time-input"
:class="!scope.row.periodOfUse&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
maxlength="4"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options)"
@input="scope.row.periodOfUse = scope.row.periodOfUse.replace(/[^0-9.]/g,'')"
@ -650,7 +650,7 @@
<span style="margin-left:5px">
<el-select class="time-select"
v-model="scope.row.options"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
placeholder="请选择"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options)">
<el-option label="日"
@ -673,7 +673,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -683,7 +683,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -794,7 +794,7 @@
width="180">
<template slot-scope="scope">
<div class="flex-c-c">
<el-button v-if="!editDisabled&&!viewDisabled"
<el-button v-if="!isEdit&&!viewDisabled"
type="text"
@click="delDataForm(scope.$index, scope.row)"
style="margin-right:10px;">删除</el-button>
@ -845,7 +845,7 @@
round
@click="batchDeliver(0, 2)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled"
<el-button v-if="!viewDisabled&&!isEdit&&!renewDisabled"
type="primary"
round
class="mag"
@ -875,7 +875,7 @@
<div class="small">
<el-input class="time-input"
:class="!scope.row.periodOfUse&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
maxlength="4"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options)"
@input="scope.row.periodOfUse = scope.row.periodOfUse.replace(/[^0-9.]/g,'')"
@ -884,7 +884,7 @@
<span style="margin-left:5px">
<el-select class="time-select"
v-model="scope.row.options"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
placeholder="请选择"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options)">
<el-option label="日"
@ -907,7 +907,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
placeholder="请选择使用日期">
</el-date-picker>
</p>
@ -916,7 +916,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -994,7 +994,7 @@
width="180">
<template slot-scope="scope">
<div class="flex-c-c">
<el-button v-if="!editDisabled&&!viewDisabled"
<el-button v-if="!isEdit&&!viewDisabled"
type="text"
@click="delDataFormList(scope.$index, scope.row)"
style="margin-right:10px;">删除</el-button>
@ -1045,7 +1045,7 @@
round
@click="batchDeliver(0, 3)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled"
<el-button v-if="!viewDisabled&&!isEdit&&!renewDisabled"
type="primary"
round
class="mag"
@ -1076,7 +1076,7 @@
<div class="small">
<el-input class="time-input"
:class="!scope.row.periodOfUse&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
maxlength="4"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
@input="scope.row.periodOfUse = scope.row.periodOfUse.replace(/[^0-9.]/g,'')"
@ -1084,7 +1084,7 @@
placeholder="输入时间"></el-input>
<el-select class="time-select"
v-model="scope.row.options"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
placeholder="请选择"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)">
<el-option label="日"
@ -1106,7 +1106,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -1116,7 +1116,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -1197,7 +1197,7 @@
<el-button style="margin-right: 10px;"
type="text"
@click="showShip(scope.row)">{{ viewDisabled ? '' : '编辑' }}发货内容</el-button>
<el-button v-if="!editDisabled&&!viewDisabled"
<el-button v-if="!isEdit&&!viewDisabled"
type="text"
@click="delPracticalCourses(scope.$index, scope.row)"
style="margin: 0 10px;">删除</el-button>
@ -1255,7 +1255,7 @@
round
@click="batchDeliver(0, 4)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled&&!editDisabled&&!renewDisabled"
<el-button v-if="!viewDisabled&&!isEdit&&!renewDisabled"
type="primary"
round
class="mag"
@ -1286,7 +1286,7 @@
<div class="small">
<el-input class="time-input"
:class="!scope.row.periodOfUse&&whetherSubmit?'red':''"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
maxlength="4"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
@input="scope.row.periodOfUse = scope.row.periodOfUse.replace(/[^0-9.]/g,'')"
@ -1294,7 +1294,7 @@
placeholder="输入时间"></el-input>
<el-select class="time-select"
v-model="scope.row.options"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
placeholder="请选择"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)">
<el-option label="日"
@ -1316,7 +1316,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -1326,7 +1326,7 @@
style="width:130px"
v-model="scope.row.startTime"
type="date"
:disabled="viewDisabled||editDisabled"
:disabled="viewDisabled||isEdit"
@change="deadLine(scope.row.periodOfUse,scope.row,scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
@ -1407,7 +1407,7 @@
<el-button style="margin-right: 10px;"
type="text"
@click="showShip(scope.row)">{{ viewDisabled ? '' : '编辑' }}发货内容</el-button>
<el-button v-if="!editDisabled&&!viewDisabled"
<el-button v-if="!isEdit&&!viewDisabled"
type="text"
@click="delExpTool(scope.$index, scope.row)"
style="margin-right:10px;">删除</el-button>
@ -1743,11 +1743,12 @@ export default {
loading: false,//
isAdd: false, //
viewDisabled: false,//
editDisabled: false,//
editDisabled: false,//
isEdit: false, //
renewDisabled: false,//
dataLoading: false,//
whetherSubmit: false,/* 提交否 */
dispose: false,
dispose: false, //
showSelectClient: false,//
form: {//
// orderNumber: '',//
@ -1954,6 +1955,7 @@ export default {
this.dispose = true;
} else {
this.titlesw = '修改订单'
this.isEdit = true
}
this.editDisabled = true;
await this.getDetail(this.$route.query.orderId);
@ -2031,8 +2033,7 @@ export default {
this.$post(this.api.renew, {
authority: 1,
customerId,
productId: orderOther.filter(e => e.authority === 1).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => e.authority === 1).map(e => e.mallId),
productId: orderOther.filter(e => e.authority === 1).map(e => e.mallId),
}).then(({ orderOthers }) => {
list.push(...orderOthers)
resolve()
@ -2044,8 +2045,7 @@ export default {
this.$post(this.api.renew, {
authority: 0,
customerId,
productId: orderOther.filter(e => !e.authority).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => !e.authority).map(e => e.mallId),
productId: orderOther.filter(e => !e.authority).map(e => e.mallId),
}).then(({ orderOthers }) => {
list.push(...orderOthers)
resolve()
@ -2057,8 +2057,7 @@ export default {
this.$post(this.api.renew, {
authority: 2,
customerId,
productId: orderOther.filter(e => e.authority === 2).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => e.authority === 2).map(e => e.mallId),
productId: orderOther.filter(e => e.authority === 2).map(e => e.mallId),
}).then(({ orderOthers }) => {
list.push(...orderOthers)
resolve()
@ -2070,8 +2069,7 @@ export default {
this.$post(this.api.renew, {
authority: 3,
customerId,
productId: orderOther.filter(e => e.authority === 3).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => e.authority === 3).map(e => e.mallId),
productId: orderOther.filter(e => e.authority === 3).map(e => e.mallId),
}).then(({ orderOthers }) => {
list.push(...orderOthers)
resolve()
@ -2084,8 +2082,7 @@ export default {
authority: 4,
// authority: 3,
customerId,
productId: orderOther.filter(e => e.authority === 4).map(e => e.dataOrCourseId),
mallId: orderOther.filter(e => e.authority === 4).map(e => e.mallId),
productId: orderOther.filter(e => e.authority === 4).map(e => e.mallId),
}).then(({ orderOthers }) => {
list.push(...orderOthers)
resolve()
@ -2580,10 +2577,8 @@ export default {
})
};
const productId = []
const mallId = []
this.practicalCoursesSelect.map(e => {//
e.associatedProduct && productId.push(+e.associatedProduct);
mallId.push(e.mallId)
productId.push(e.mallId)
let find = this[name].some(i => e.mallId === i.mallId);// id
if (!find) {
//
@ -2605,7 +2600,6 @@ export default {
authority,
customerId: this.form.customerId,
productId,
mallId
}).then(res => {
this[name].map(e => {
res.orderOthers.map(el => {

@ -1,112 +1,148 @@
<template>
<div>
<el-card shadow="hover" class="mgb20">
<el-card shadow="hover"
class="mgb20">
<div class="flex-between">
<div class="per_title" v-preventReClick @click="back">
<div class="per_title"
v-preventReClick
@click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school" v-text="form.id ? '编辑方案' : '新建方案'"></span>
<span class="per_school"
v-text="form.id ? '编辑方案' : '新建方案'"></span>
</div>
</div>
</el-card>
<div class="page">
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<el-form :model="form"
:rules="rules"
class="input-form model"
label-width="140px">
<div class="item-line">
<el-form-item prop="title" label="标题">
<el-input
placeholder="请输入标题"
<el-form-item prop="title"
label="标题">
<el-input placeholder="请输入标题"
v-model.trim="form.title"
clearable
maxlength="30"
class="inline-input"
></el-input>
class="inline-input"></el-input>
</el-form-item>
<el-form-item prop="classificationId" label="所属分类">
<el-select style="width: 234px;" v-model="form.classificationId">
<el-form-item prop="classificationId"
label="所属分类">
<el-select style="width: 234px;"
v-model="form.classificationId">
<template v-for="item in classifications">
<el-option
v-if="item.id"
<el-option v-if="item.id"
:key="item.id"
:label="item.classificationName"
:value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button>
<el-button class="set-btn"
type="primary"
@click="setClass">设置</el-button>
</el-form-item>
</div>
<el-form-item prop="applicableMajor" label="适用专业">
<el-input
style="width: 940px"
<el-form-item prop="applicableMajor"
label="适用专业">
<el-input style="width: 940px"
type="textarea"
v-model.trim="form.applicableMajor"
:rows="3"
clearable
></el-input>
clearable></el-input>
</el-form-item>
<el-form-item prop="schemeIntroduction" label="方案简介">
<el-input
style="width: 940px"
<el-form-item prop="schemeIntroduction"
label="方案简介">
<el-input style="width: 940px"
type="textarea"
v-model.trim="form.schemeIntroduction"
:rows="3"
clearable
></el-input>
clearable></el-input>
</el-form-item>
<el-form-item prop="product" label="产品">
<el-input
style="width: 940px"
type="textarea"
v-model.trim="form.product"
:rows="3"
clearable
></el-input>
<el-form-item prop="product"
label="产品">
<el-button style="margin-bottom: 5px"
type="primary"
@click="showProduct">请选择</el-button>
<div>
<el-tag v-for="(tag, i) in form.productList"
:key="i"
class="tag"
closable
@close="delCheckedProduct(i)">
{{tag.productName}}
</el-tag>
</div>
</el-form-item>
<el-form-item prop="schemeFile" label="方案文件">
<el-upload
:before-upload="fileBeforeUpload"
<el-form-item prop="schemeFile"
label="方案文件">
<el-upload :before-upload="fileBeforeUpload"
:on-success="uploadSuccessFile"
:action="this.api.fileUploadNakadai"
:file-list="fileList"
:limit="1"
:on-exceed="handleExceed"
:headers="headers"
>
:headers="headers">
<el-button>上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button>
<el-button type="primary"
@click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button>
</div>
</div>
<el-dialog title="所属分类设置" :visible.sync="classVisible" width="500px" :close-on-click-modal="false" class="manage-dia" :before-close="closeClass">
<el-dialog title="所属分类设置"
:visible.sync="classVisible"
width="500px"
:close-on-click-modal="false"
class="manage-dia"
:before-close="closeClass">
<div class="plus">
<i class="el-icon-circle-plus-outline" @click="addClass"></i>
<i class="el-icon-circle-plus-outline"
@click="addClass"></i>
</div>
<el-table :data="classifications" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="classificationName" label="分类名称" align="center" min-width="130">
<el-table :data="classifications"
ref="table"
header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="classificationName"
label="分类名称"
align="center"
min-width="130">
<template slot-scope="scope">
<el-input
v-if="scope.row.edit"
<el-input v-if="scope.row.edit"
placeholder="请输入分类名称"
v-model="scope.row.classificationName"
clearable
maxlength="30"
></el-input>
maxlength="30"></el-input>
<span v-else>{{ scope.row.classificationName }}</span>
</template>
</el-table-column>
<el-table-column prop="updateTime1" label="是否引用" align="center" min-width="60"></el-table-column>
<el-table-column label="操作" align="center" min-width="60">
<el-table-column prop="updateTime1"
label="是否引用"
align="center"
min-width="60"></el-table-column>
<el-table-column label="操作"
align="center"
min-width="60">
<template slot-scope="scope">
<i v-if="scope.row.edit" class="el-icon-check edit" @click="submitClass(scope.row)"></i>
<i v-else class="el-icon-edit edit" @click="editClass(scope.row)"></i>
<i class="el-icon-delete del" @click="delClass(scope.row, scope.$index)"></i>
<i v-if="scope.row.edit"
class="el-icon-check edit"
@click="submitClass(scope.row)"></i>
<i v-else
class="el-icon-edit edit"
@click="editClass(scope.row)"></i>
<i class="el-icon-delete del"
@click="delClass(scope.row, scope.$index)"></i>
</template>
</el-table-column>
</el-table>
@ -114,6 +150,112 @@
<el-button @click="closeClass">返回</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="productVisible"
width="1200px"
center
custom-class="product-dia">
<div class="product-wrap">
<div class="item type">
<div class="title-wrap flex-center">
<p class="addhr_tag"></p>
<span>产品分类</span>
</div>
<ul class="types">
<li v-for="(item, i) in productCategories"
:key="i"
:class="{active: curType == item.classificationId}"
@click="typeClick(item)">
{{ item.classificationName }}
</li>
</ul>
</div>
<div class="item products">
<div class="title-wrap flex-center">
<p class="addhr_tag"></p>
<span>产品列表</span>
</div>
<el-input class="mgb10"
placeholder="请输入产品名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
<el-table :data="products"
class="table"
ref="table"
stripe
header-align="center"
max-height="470"
@selection-change="handleSelectionChange"
row-key="mallId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="55"
label="序号"
align="center"></el-table-column>
<el-table-column prop="productName"
label="产品名称"
align="center"></el-table-column>
<el-table-column prop="supplierName"
label="厂商"
align="center"></el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
</div>
</div>
<div class="item checked">
<div class="title-wrap flex-center">
<p class="addhr_tag"></p>
<span>已选择产品{{ checkeds.length }}</span>
</div>
<el-table :data="checkeds"
class="table"
stripe
header-align="center"
max-height="470">
<el-table-column type="index"
width="55"
label="序号"
align="center"></el-table-column>
<el-table-column prop="productName"
label="产品名称"
align="center"></el-table-column>
<el-table-column prop="supplierName"
label="厂商"
align="center"></el-table-column>
<el-table-column prop="typeName"
label="产品类型"
align="center"></el-table-column>
<el-table-column label="操作"
align="center"
width="55">
<template slot-scope="scope">
<i :class="['el-icon-delete rm', {disabled: scope.row.disabled}]"
@click="delProduct(scope.$index, scope.row)"></i>
</template>
</el-table-column>
</el-table>
</div>
</div>
<span slot="footer"
class="dialog-footer">
<el-button @click="productVisible = false"> </el-button>
<el-button type="primary"
@click="productSubmit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
@ -134,7 +276,7 @@ export default {
id: this.$route.query.id || '',
applicableMajor: '',
classificationId: '',
product: '',
productList: [],
fileName: '',
schemeFile: '',
title: '',
@ -173,7 +315,19 @@ export default {
classifications: [],
classVisible: false,
labels: [],
labelVisible: false
labelVisible: false,
productVisible: false,
productCategories: [],
curType: 1,
checkeds: [],
total: 0,
page: 1,
pageSize: 10,
products: [],
multipleSelection: [],
keyword: '',
loading: false,
};
},
components: {
@ -187,6 +341,12 @@ export default {
this.updateTime++
},
deep: true
},
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
//
@ -219,6 +379,7 @@ export default {
const { id } = this.form
id ? this.$post(`${this.api.findByIdScheme}?id=${id}`).then(({ data }) => {
if (data.schemeFile) this.fileList = [{ name: data.fileName, url: data.schemeFile }]
if (!data.productList) data.productList = []
this.form = data
this.getClassification(1)
}).catch(err => { }) : this.getClassification(1)
@ -303,6 +464,91 @@ export default {
if (!list.find(e => e.id == this.form.classificationId)) this.form.classificationId = ''
},
//
showProduct () {
// this.multipleSelection = this.form.productList
this.getCategory()
this.checkeds = []
// debugger
this.productVisible = true
this.page = 1
this.getProduct(1)
},
//
async getCategory () {
const res = await this.$get(this.api.productCategoryList)
this.productCategories = res.classificationList
},
//
typeClick (item) {
// this.$refs.table.clearSelection()
this.curType = item.classificationId
console.log("🚀 ~ file: schemeSet.vue:472 ~ typeClick ~ curType:", this.checkeds)
this.initData()
},
//
async getProduct (set) {
const { page } = await this.$post(this.api.listOfGoods, {
pageNum: this.page,
pageSize: this.pageSize,
productClassification: this.curType,
hotTag: 1,
sort: 0,
isShelves: 0,
productName: this.keyword
})
this.products = page.records
this.total = page.total
if (set) {
const { table } = this.$refs
table.clearSelection()
this.form.productList.forEach(e => {
table.toggleRowSelection(e, true)
})
}
},
initData () {
this.page = 1
this.getProduct()
},
handleCurrentChange (val) {
this.page = val;
this.getData();
},
handleSelectionChange (val) {
console.log("🚀 ~ file: schemeSet.vue:516 ~ handleSelectionChange ~ val:", val)
this.checkeds = JSON.parse(JSON.stringify(val))
this.multipleSelection = val
},
//
delProduct (i, row) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.checkeds.splice(i, 1)
}).catch(() => { })
},
//
productSubmit () {
const result = []
this.checkeds.map(e => {
result.push({
mallId: e.mallId,
productName: e.productName,
schemeId: this.form.id
})
})
this.form.productList = result
this.productVisible = false
},
//
delCheckedProduct (i) {
this.form.productList.splice(i, 1)
},
//
fileBeforeUpload (file) {
this.uploading++
@ -355,7 +601,7 @@ export default {
if (!form.classificationId) return Util.errorMsg('请选择所属分类')
if (!form.applicableMajor) return Util.errorMsg('请输入适用专业')
if (!form.schemeIntroduction) return Util.errorMsg('请输入方案简介')
if (!form.product) return Util.errorMsg('请输入产品')
if (!form.productList.length) return Util.errorMsg('请选择产品')
if (!form.schemeFile) return Util.errorMsg('请上传方案文件')
}
// if (this.uploading) return Util.errorMsg('')
@ -383,112 +629,10 @@ export default {
</script>
<style lang="scss" scoped>
$upload-width: 220px;
$upload-height: 102px;
$upload-lg-height: 102px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
width: $upload-width;
height: $upload-height;
border: 1px solid #DCDEE0;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
display: flex;
height: $upload-height;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background: #FAFAFA;
p {
margin-top: 10px;
font-size: 14px;
color: #333;
line-height: 20px;
}
}
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
max-width: 820px;
height: $upload-lg-height;
.uploader-default {
height: $upload-lg-height;
}
}
}
.avatar {
display: block;
width: $upload-width;
height: $upload-height;
}
.avatar-lg {
display: block;
width: 100%;
height: $upload-lg-height;
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 12px;
color: #333;
}
}
}
.style-wrap {
display: flex;
margin-top: 10px;
.label {
margin-right: 30px;
}
}
.styles {
display: flex;
flex-wrap: wrap;
width: 955px;
// height: 320px;
margin-top: 20px;
overflow: auto;
li {
margin: 0 20px 10px 0;
text-align: center;
cursor: pointer;
&:hover .review {
border-color: #2962FF;
}
}
.review {
display: flex;
justify-content: center;
align-items: center;
width: 170px;
height: 112px;
margin-bottom: 10px;
border: 1px solid #DCDEE0;
border-radius: 2px;
img {
width: 80px;
}
.is-link {
width: 50px;
}
}
}
.info {
position: absolute;
top: 8px;
left: -32px;
cursor: pointer;
}
.plus {
margin-bottom: 10px;
font-size: 18px;
color: #9278FF;
color: #9278ff;
text-align: right;
cursor: pointer;
}
@ -496,7 +640,8 @@ $upload-lg-height: 102px;
margin-left: 10px !important;
}
.manage-dia {
.edit, .del {
.edit,
.del {
font-size: 14px;
cursor: pointer;
}
@ -524,12 +669,13 @@ $upload-lg-height: 102px;
}
.line {
margin-bottom: 24px;
border-bottom: 1px dashed #C2C2C2;
border-bottom: 1px dashed #c2c2c2;
}
.el-form-item--small.el-form-item {
margin-bottom: 24px;
}
.el-input, .el-select {
.el-input,
.el-select {
width: 300px;
}
.el-select .el-input {
@ -538,16 +684,56 @@ $upload-lg-height: 102px;
.el-textarea {
width: 550px;
}
.auto, .auto .el-input {
.auto,
.auto .el-input {
width: auto;
}
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
font-size: 18px;
vertical-align: -4px;
color: #F5222D;
color: #f5222d;
}
}
.btns {
text-align: center;
}
.tag {
margin: 0 5px 5px 0;
}
/deep/.product-dia {
.product-wrap {
display: flex;
}
.title-wrap {
margin-bottom: 15px;
}
.item {
width: 130px;
max-height: 600px;
margin-right: 20px;
overflow: hidden;
}
.types {
li {
margin: 10px 0;
cursor: pointer;
&.active {
color: #9278ff;
}
}
}
.products {
width: 400px;
}
.checked {
flex: 1;
.el-table .cell {
font-size: 12px;
}
}
.rm {
font-size: 16px;
cursor: pointer;
}
}
</style>
Loading…
Cancel
Save