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 }) { initSocket ({ id, account }) {
// socket // socket
// this.socket = new WebSocket(`ws://${Setting.isDev ? '192.168.31.51' : location.host}: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}`) // this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`)
// socket // socket
this.socket.onopen = this.open; this.socket.onopen = this.open;
// socket // socket

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

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

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

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

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

@ -1,112 +1,148 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div class="flex-between"> <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> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <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>
</div> </div>
</el-card> </el-card>
<div class="page"> <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"> <div class="item-line">
<el-form-item prop="title" label="标题"> <el-form-item prop="title"
<el-input label="标题">
placeholder="请输入标题" <el-input placeholder="请输入标题"
v-model.trim="form.title" v-model.trim="form.title"
clearable clearable
maxlength="30" maxlength="30"
class="inline-input" class="inline-input"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="classificationId" label="所属分类"> <el-form-item prop="classificationId"
<el-select style="width: 234px;" v-model="form.classificationId"> label="所属分类">
<el-select style="width: 234px;"
v-model="form.classificationId">
<template v-for="item in classifications"> <template v-for="item in classifications">
<el-option <el-option v-if="item.id"
v-if="item.id"
:key="item.id" :key="item.id"
:label="item.classificationName" :label="item.classificationName"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</template> </template>
</el-select> </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> </el-form-item>
</div> </div>
<el-form-item prop="applicableMajor" label="适用专业"> <el-form-item prop="applicableMajor"
<el-input label="适用专业">
style="width: 940px" <el-input style="width: 940px"
type="textarea" type="textarea"
v-model.trim="form.applicableMajor" v-model.trim="form.applicableMajor"
:rows="3" :rows="3"
clearable clearable></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="schemeIntroduction" label="方案简介"> <el-form-item prop="schemeIntroduction"
<el-input label="方案简介">
style="width: 940px" <el-input style="width: 940px"
type="textarea" type="textarea"
v-model.trim="form.schemeIntroduction" v-model.trim="form.schemeIntroduction"
:rows="3" :rows="3"
clearable clearable></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="product" label="产品"> <el-form-item prop="product"
<el-input label="产品">
style="width: 940px" <el-button style="margin-bottom: 5px"
type="textarea" type="primary"
v-model.trim="form.product" @click="showProduct">请选择</el-button>
:rows="3" <div>
clearable <el-tag v-for="(tag, i) in form.productList"
></el-input> :key="i"
class="tag"
closable
@close="delCheckedProduct(i)">
{{tag.productName}}
</el-tag>
</div>
</el-form-item> </el-form-item>
<el-form-item prop="schemeFile" label="方案文件"> <el-form-item prop="schemeFile"
<el-upload label="方案文件">
:before-upload="fileBeforeUpload" <el-upload :before-upload="fileBeforeUpload"
:on-success="uploadSuccessFile" :on-success="uploadSuccessFile"
:action="this.api.fileUploadNakadai" :action="this.api.fileUploadNakadai"
:file-list="fileList" :file-list="fileList"
:limit="1" :limit="1"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers">
>
<el-button>上传</el-button> <el-button>上传</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btns"> <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="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button> <el-button @click="back">取消</el-button>
</div> </div>
</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"> <div class="plus">
<i class="el-icon-circle-plus-outline" @click="addClass"></i> <i class="el-icon-circle-plus-outline"
@click="addClass"></i>
</div> </div>
<el-table :data="classifications" ref="table" header-align="center" row-key="id"> <el-table :data="classifications"
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> ref="table"
<el-table-column prop="classificationName" label="分类名称" align="center" min-width="130"> 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"> <template slot-scope="scope">
<el-input <el-input v-if="scope.row.edit"
v-if="scope.row.edit"
placeholder="请输入分类名称" placeholder="请输入分类名称"
v-model="scope.row.classificationName" v-model="scope.row.classificationName"
clearable clearable
maxlength="30" maxlength="30"></el-input>
></el-input>
<span v-else>{{ scope.row.classificationName }}</span> <span v-else>{{ scope.row.classificationName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime1" label="是否引用" align="center" min-width="60"></el-table-column> <el-table-column prop="updateTime1"
<el-table-column label="操作" align="center" min-width="60"> label="是否引用"
align="center"
min-width="60"></el-table-column>
<el-table-column label="操作"
align="center"
min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<i v-if="scope.row.edit" class="el-icon-check edit" @click="submitClass(scope.row)"></i> <i v-if="scope.row.edit"
<i v-else class="el-icon-edit edit" @click="editClass(scope.row)"></i> class="el-icon-check edit"
<i class="el-icon-delete del" @click="delClass(scope.row, scope.$index)"></i> @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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -114,6 +150,112 @@
<el-button @click="closeClass">返回</el-button> <el-button @click="closeClass">返回</el-button>
</span> </span>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
@ -134,7 +276,7 @@ export default {
id: this.$route.query.id || '', id: this.$route.query.id || '',
applicableMajor: '', applicableMajor: '',
classificationId: '', classificationId: '',
product: '', productList: [],
fileName: '', fileName: '',
schemeFile: '', schemeFile: '',
title: '', title: '',
@ -173,7 +315,19 @@ export default {
classifications: [], classifications: [],
classVisible: false, classVisible: false,
labels: [], labels: [],
labelVisible: false labelVisible: false,
productVisible: false,
productCategories: [],
curType: 1,
checkeds: [],
total: 0,
page: 1,
pageSize: 10,
products: [],
multipleSelection: [],
keyword: '',
loading: false,
}; };
}, },
components: { components: {
@ -187,6 +341,12 @@ export default {
this.updateTime++ this.updateTime++
}, },
deep: true deep: true
},
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
} }
}, },
// //
@ -219,6 +379,7 @@ export default {
const { id } = this.form const { id } = this.form
id ? this.$post(`${this.api.findByIdScheme}?id=${id}`).then(({ data }) => { id ? this.$post(`${this.api.findByIdScheme}?id=${id}`).then(({ data }) => {
if (data.schemeFile) this.fileList = [{ name: data.fileName, url: data.schemeFile }] if (data.schemeFile) this.fileList = [{ name: data.fileName, url: data.schemeFile }]
if (!data.productList) data.productList = []
this.form = data this.form = data
this.getClassification(1) this.getClassification(1)
}).catch(err => { }) : 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 = '' 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) { fileBeforeUpload (file) {
this.uploading++ this.uploading++
@ -355,7 +601,7 @@ export default {
if (!form.classificationId) return Util.errorMsg('请选择所属分类') if (!form.classificationId) return Util.errorMsg('请选择所属分类')
if (!form.applicableMajor) return Util.errorMsg('请输入适用专业') if (!form.applicableMajor) return Util.errorMsg('请输入适用专业')
if (!form.schemeIntroduction) 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 (!form.schemeFile) return Util.errorMsg('请上传方案文件')
} }
// if (this.uploading) return Util.errorMsg('') // if (this.uploading) return Util.errorMsg('')
@ -383,112 +629,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <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 { .plus {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 18px; font-size: 18px;
color: #9278FF; color: #9278ff;
text-align: right; text-align: right;
cursor: pointer; cursor: pointer;
} }
@ -496,7 +640,8 @@ $upload-lg-height: 102px;
margin-left: 10px !important; margin-left: 10px !important;
} }
.manage-dia { .manage-dia {
.edit, .del { .edit,
.del {
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
} }
@ -524,12 +669,13 @@ $upload-lg-height: 102px;
} }
.line { .line {
margin-bottom: 24px; margin-bottom: 24px;
border-bottom: 1px dashed #C2C2C2; border-bottom: 1px dashed #c2c2c2;
} }
.el-form-item--small.el-form-item { .el-form-item--small.el-form-item {
margin-bottom: 24px; margin-bottom: 24px;
} }
.el-input, .el-select { .el-input,
.el-select {
width: 300px; width: 300px;
} }
.el-select .el-input { .el-select .el-input {
@ -538,16 +684,56 @@ $upload-lg-height: 102px;
.el-textarea { .el-textarea {
width: 550px; width: 550px;
} }
.auto, .auto .el-input { .auto,
.auto .el-input {
width: auto; width: auto;
} }
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before { .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
font-size: 18px; font-size: 18px;
vertical-align: -4px; vertical-align: -4px;
color: #F5222D; color: #f5222d;
} }
} }
.btns { .btns {
text-align: center; 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> </style>
Loading…
Cancel
Save