|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<div v-loading="loading"> |
|
|
|
|
<!-- 订单详情 --> |
|
|
|
|
<div v-show="!showSelectClient"> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
@ -11,7 +11,7 @@ |
|
|
|
|
<span class="per_back">返回</span> |
|
|
|
|
<span class="per_school">订单处理</span> |
|
|
|
|
</div> |
|
|
|
|
<el-button type="primary" size="small" round class="mag" v-preventReClick @click="saveOrder('form')">确定</el-button> |
|
|
|
|
<el-button type="primary" size="small" round class="mag" v-preventReClick @click="addOrder">确定</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
@ -22,17 +22,18 @@ |
|
|
|
|
<span>基本信息</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
|
|
|
|
<el-col :span="6" :offset="5"> |
|
|
|
|
<el-form-item label="订单编号"> |
|
|
|
|
<el-input v-model="form.orderNumber" disabled placeholder="自动生成"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="订单时间" prop="createTime" required> |
|
|
|
|
<el-form-item label="订单时间" prop="createTime" > |
|
|
|
|
<el-date-picker |
|
|
|
|
disabled |
|
|
|
|
style="width:100%" |
|
|
|
|
v-model="form.createTime" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期"> |
|
|
|
|
placeholder="自动生成"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="省份"> |
|
|
|
@ -40,21 +41,21 @@ |
|
|
|
|
<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 label="联系人" prop="orderContact" required> |
|
|
|
|
<el-form-item label="联系人" prop="orderContact" > |
|
|
|
|
<el-input v-model="form.orderContact" placeholder="请输入联系人姓名"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="邮箱" required> |
|
|
|
|
<el-form-item label="邮箱" prop="email"> |
|
|
|
|
<el-input v-model="form.email" placeholder="请输入邮箱地址"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
|
<el-form-item prop="customerName" label="订单客户" required> |
|
|
|
|
<el-form-item prop="customerName" label="订单客户"> |
|
|
|
|
<div @click="gotoClient" style="cursor: pointer"> |
|
|
|
|
<el-input v-model="form.customerName" clearable placeholder="请选择客户"></el-input> |
|
|
|
|
<el-input v-model="form.customerName" placeholder="请选择客户"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="orderType" label="订单类型" required> |
|
|
|
|
<el-form-item prop="orderType" label="订单类型"> |
|
|
|
|
<el-select v-model="form.orderType" clearable placeholder="请选择订单类型"> |
|
|
|
|
<el-option v-for="(item,index) in orderTypeList" :key="index" :label="item.name" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
@ -69,18 +70,18 @@ |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="电话" prop="phone" required> |
|
|
|
|
<el-form-item label="电话" prop="phone"> |
|
|
|
|
<el-input v-model="form.phone" placeholder="请输入电话号码" maxlength="11"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="订单金额" prop="orderAmount"> |
|
|
|
|
<el-input type="number" v-model="form.orderAmount" placeholder="请输入订单金额"></el-input> |
|
|
|
|
<el-form-item label="订单金额(万)" prop="orderAmount"> |
|
|
|
|
<el-input disabled oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" type="number" v-model="form.orderAmount" placeholder="请输入订单金额"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<!-- 课程 --> |
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="flex-between mgb20 user_header"> |
|
|
|
@ -94,12 +95,12 @@ |
|
|
|
|
<el-table :data="jurisdictionData" class="orderTable" stripe header-align="center" show-summary :summary-method="getSummaries"> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="courseName" label="课程名称" align="center"> |
|
|
|
|
<el-table-column prop="productName" label="课程名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="使用期限" align="center" width="200"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="course-input"> |
|
|
|
|
<el-input @change="deadLine($event,scope.row)" maxlength="10" oninput="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.date" placeholder="输入时间"></el-input> |
|
|
|
|
<el-input @change="deadLine($event,scope.row)" maxlength="4" oninput="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.periodOfUse" placeholder="输入时间"></el-input> |
|
|
|
|
<span>月</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -108,14 +109,14 @@ |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<p v-if="!scope.row.startDate">请输入使用期限,且确认发货</p> |
|
|
|
|
<div v-else style="display:flex;justify-content:center;"> |
|
|
|
|
<p>{{scope.row.startDate}}</p><span> - </span><p>{{scope.row.endDate}}</p> |
|
|
|
|
<p>{{scope.row.startTime}}</p><span> - </span><p>{{scope.row.endTime}}</p> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="剩余期限" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input v-model="scope.row.remainingPeriod" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>天</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -123,7 +124,7 @@ |
|
|
|
|
<el-table-column label="市场价" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input v-model="scope.row.marketValue" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>万</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -131,7 +132,7 @@ |
|
|
|
|
<el-table-column label="成交价 " align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input @change="discount($event,scope.row)" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>万</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -139,7 +140,7 @@ |
|
|
|
|
<el-table-column label="折扣率 " align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input v-model="scope.row.discountRate" placeholder="请输入"type="text"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -151,17 +152,18 @@ |
|
|
|
|
<el-table-column label="发货" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.consignment" |
|
|
|
|
:disabled="scope.row.ship" |
|
|
|
|
v-model="scope.row.ship" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
@change="courseSwitch($event,scope.row)"> |
|
|
|
|
@change="formSwitch($event,scope.row)"> |
|
|
|
|
</el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<!-- 数据平台权限 --> |
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="flex-between mgb20 user_header"> |
|
|
|
@ -169,34 +171,34 @@ |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>数据平台权限</span> |
|
|
|
|
</div> |
|
|
|
|
<el-button type="primary" size="small" round class="mag" @click="getConfig()">添加</el-button> |
|
|
|
|
<el-button type="primary" size="small" round class="mag" @click="addDataJurisdiction()">添加</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table :data="dataPlatform" class="orderTable" stripe header-align="center" show-summary :summary-method="getSummaries"> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="name" label="产品名称" align="center"> |
|
|
|
|
<el-table-column prop="productName" label="产品名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="使用期限" align="center" width="200"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="course-input"> |
|
|
|
|
<el-input maxlength="10" oninput="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.date" placeholder="输入时间"></el-input> |
|
|
|
|
<el-input maxlength="4" @change="deadLine($event,scope.row)" oninput="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.periodOfUse" placeholder="输入时间"></el-input> |
|
|
|
|
<span>月</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="起止日期" align="center" width="200"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<p v-if="!scope.row.startDate">请输入使用期限,且确认状态</p> |
|
|
|
|
<p v-if="!scope.row.startTime">请输入使用期限</p> |
|
|
|
|
<div v-else style="display:flex;justify-content:center;"> |
|
|
|
|
<p>{{scope.row.startDate}}</p><span> - </span><p>{{scope.row.endDate}}</p> |
|
|
|
|
<p>{{scope.row.startTime}}</p><span> - </span><p>{{scope.row.endTime}}</p> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="剩余期限" align="center"> |
|
|
|
|
<el-table-column label="剩余期限" align="center" width="160px"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input disabled v-model="scope.row.remainingPeriod" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>天</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -204,7 +206,7 @@ |
|
|
|
|
<el-table-column label="市场价" align="center" width="165"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input disabled v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input disabled v-model="scope.row.marketValue" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>元 / 账号</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -212,7 +214,7 @@ |
|
|
|
|
<el-table-column label="成交价" align="center" width="165"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input @change="dealComputers($event,scope.row)" v-model="scope.row.bargain" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @change="[dealComputers($event,scope.row),discount($event,scope.row)]" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>元 / 账号</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -220,14 +222,14 @@ |
|
|
|
|
<el-table-column label="折扣率" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input disabled v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input disabled v-model="scope.row.discountRate" placeholder="请输入"type="text"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="账号数" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input @change="dealComputers($event,scope.row)" v-model="scope.row.account" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input @change="dealComputers($event,scope.row)" v-model="scope.row.accountNum" placeholder="请输入"type="text"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -235,7 +237,7 @@ |
|
|
|
|
<el-table-column label="总金额(万)" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.gross" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<el-input @change="[allAmount($event,scope.row),allAmountChange($event,scope.row)]" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.totalAmount" placeholder="请输入"type="text"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -248,10 +250,11 @@ |
|
|
|
|
<el-table-column label="状态" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.platformState" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
@change="platformSwitch($event,scope.row)"> |
|
|
|
|
:disabled="scope.row.ship" |
|
|
|
|
v-model="scope.row.ship" |
|
|
|
|
:active-value="true" |
|
|
|
|
:inactive-value="false" |
|
|
|
|
@change="formSwitch($event,scope.row)"> |
|
|
|
|
</el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -259,7 +262,7 @@ |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<!-- 合同 --> |
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="flex-center mgb20 user_header"> |
|
|
|
@ -268,14 +271,14 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<el-form ref="contractInformation" :model="contractInformation" :rules="rules" label-width="80px" > |
|
|
|
|
<el-form ref="contract" :model="contract" :rules="rules" label-width="80px" > |
|
|
|
|
<el-col :span="8" :offset="4"> |
|
|
|
|
<el-form-item label="合同名称"> |
|
|
|
|
<el-input v-model="contractInformation.contractInformationName" placeholder="请输入合同名称"></el-input> |
|
|
|
|
<el-input v-model="contract.contractName" placeholder="请输入合同名称"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="合同金额" prop="contractInformationSum"> |
|
|
|
|
<el-input v-model="contractInformation.contractInformationSum" |
|
|
|
|
<el-input v-model="contract.contractMoney" |
|
|
|
|
placeholder="请输入合同金额"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -283,15 +286,25 @@ |
|
|
|
|
|
|
|
|
|
<el-col :span="8" :offset="2"> |
|
|
|
|
<el-form-item label="合同编号"> |
|
|
|
|
<el-input v-model="contractInformation.contractInformationNumber" placeholder="请输入合同编号"></el-input> |
|
|
|
|
<el-input v-model="contract.contractNumber" placeholder="请输入合同编号"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="合同编号"> |
|
|
|
|
<el-input v-model="contractInformation.contractInformationNumber" placeholder="请输入合同编号"></el-input> |
|
|
|
|
<el-form-item label="合同期限"> |
|
|
|
|
<div class="contractDate"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="contractTime" |
|
|
|
|
style="wifth:100%" |
|
|
|
|
type="daterange" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
@change="contractTimeChange" |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="4" :offset="4" class="flex-start"> |
|
|
|
|
|
|
|
|
|
<el-col :span="24" :offset="4" class="flex-start"> |
|
|
|
|
<el-form-item label="上传合同"> |
|
|
|
|
<el-upload |
|
|
|
|
class="contract" |
|
|
|
@ -302,15 +315,15 @@ |
|
|
|
|
:before-remove="beforeRemove" |
|
|
|
|
:limit="1" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
:action="api.uploadFiles" |
|
|
|
|
:action="api.upload" |
|
|
|
|
:file-list="uploadList" |
|
|
|
|
> |
|
|
|
|
<el-button size="medium" type="plain" class="uploadTitle">上传</el-button> |
|
|
|
|
</el-upload> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button size="medium" type="plain" style="height:40px" @click="downLoad()">重新上传</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item> |
|
|
|
|
<el-button size="medium" type="plain" style="height:40px">重新上传</el-button> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -364,27 +377,26 @@ |
|
|
|
|
<span>数据产品列表</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" v-model="configSearch" @keyup.enter.native="onSearch" clearable></el-input> |
|
|
|
|
<el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="productName" @keyup.enter.native="addDataJurisdiction('search')" clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-table :data="permissionData" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys"> |
|
|
|
|
<el-table :data="boxDataPlatform" stripe header-align="center" @selection-change="boxDataPlatformSelection" :row-key="getRowKeys"> |
|
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="courseName" label="课程名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="courseType" label="课程类型" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="配置的实训应用" align="center"> |
|
|
|
|
<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="tableNum" label="数据量(表)" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" label="创建人" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="orderNum" label="订单数量" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="market" label="市场价" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
|
|
|
|
<!-- <el-table-column prop="orderNature" label="状态" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span class="ellipsis">{{scope.row.systemName}}</span> |
|
|
|
|
<p>{{scope.row.status ? '上架' : '下架'}}</p> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="courseHours" label="预计课时" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> |
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="platfromTotals" @current-change="platfromCurrentChange" :current-page="pageNo"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
@ -445,7 +457,7 @@ |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
<!-- 选择客户 --> |
|
|
|
|
<select-client @back="backToOrder" v-show="showSelectClient"></select-client> |
|
|
|
|
<select-client @back="backToOrder" v-show="showSelectClient" :refresh="showSelectClient"></select-client> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -457,31 +469,38 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
loading:false,// 页面加载 |
|
|
|
|
showSelectClient:false,// 切换展示选择客户页 |
|
|
|
|
|
|
|
|
|
token: this.$store.state.loginToken, |
|
|
|
|
form: {// 基本信息 |
|
|
|
|
orderNumber: '', |
|
|
|
|
orderDate: '', |
|
|
|
|
provinceId: '', |
|
|
|
|
orderContact: '', |
|
|
|
|
// orderNumber: '',// 编号 |
|
|
|
|
provinceId: '',// 省份id |
|
|
|
|
orderContact: '',// 联系人 |
|
|
|
|
email: '', |
|
|
|
|
customerId: '', |
|
|
|
|
customerId: '',// 客户id |
|
|
|
|
orderType: '', |
|
|
|
|
cityId: '', |
|
|
|
|
phone: '', |
|
|
|
|
orderAmount: '', |
|
|
|
|
orderId: this.$store.state.orderId, |
|
|
|
|
customerName:'' |
|
|
|
|
orderAmount: 0, |
|
|
|
|
// orderId: this.$store.state.orderId, |
|
|
|
|
customerName:'',// 客户名称 |
|
|
|
|
}, |
|
|
|
|
contractInformation: {//合同信息 |
|
|
|
|
contractInformationName: '', |
|
|
|
|
contractInformationNumber: '', |
|
|
|
|
contractInformationSum: '', |
|
|
|
|
contractInformationLink: '', |
|
|
|
|
contractInformationId: '', |
|
|
|
|
orderId: '' |
|
|
|
|
jurisdictionData: [],// 课程权限 |
|
|
|
|
dataPlatform:[],// 数据平台data |
|
|
|
|
|
|
|
|
|
contract:{ // 合同信息 |
|
|
|
|
contractName:'', // 合同名称 |
|
|
|
|
contractFile: '', // 合同文件 |
|
|
|
|
contractMoney: '', // 合同金额 |
|
|
|
|
contractNumber: '',// 合同编号 |
|
|
|
|
startTime: '', // 期限-头 |
|
|
|
|
endTime: '', // 期限-尾 |
|
|
|
|
// orderId: '', // 绑定订单id |
|
|
|
|
}, |
|
|
|
|
contractTime:[],// 合同起止日期绑定值 |
|
|
|
|
|
|
|
|
|
token:'', |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
orderOther:{// 订单其他数据 |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -491,28 +510,37 @@ export default { |
|
|
|
|
{ required: true, message: '请输入订单编号', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
customerName: [ |
|
|
|
|
{ required: true, message: '请选择订单客户', trigger: 'blur' } |
|
|
|
|
{ required: true, message: '请选择订单客户', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
orderContact: [ |
|
|
|
|
{ required: true, message: '请输入联系人姓名', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
createTime: [ |
|
|
|
|
{ required: true, message: '请选择订单时间', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
orderType: [ |
|
|
|
|
{ required: true, message: '请选择订单类型', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
phone: [ |
|
|
|
|
{ required: true, message: '请选择客户获取手机号', trigger: 'blur' }, |
|
|
|
|
{ required: true, message: '请输入手机号', trigger: 'blur' }, |
|
|
|
|
{ |
|
|
|
|
pattern: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/, |
|
|
|
|
message: '请输入正确的手机号', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
email: [ |
|
|
|
|
{ required: true, message: '请输入邮箱地址', trigger: 'blur' }, |
|
|
|
|
{ |
|
|
|
|
pattern: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, |
|
|
|
|
message: '请输入正确的邮箱', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
orderAmount: [ |
|
|
|
|
// { pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
{ pattern: /(?:^[1-9]([0-9]+)?(?:\.[0-9]{1,2})?$)|(?:^(?:0)$)|(?:^[0-9]\.[0-9](?:[0-9])?$)/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
{ required: true, message: '请输入订单金额', trigger: 'blur' }, |
|
|
|
|
|
|
|
|
|
// { pattern: /(?:^[1-9]([0-9]+)?(?:\.[0-9]{1,2})?$)|(?:^(?:0)$)|(?:^[0-9]\.[0-9](?:[0-9])?$)/, message: '请输入正确金额格式,可保留两位小数', trigger: 'blur'} |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
orderTypeList: [{ |
|
|
|
@ -526,29 +554,7 @@ export default { |
|
|
|
|
provinceList: this.$store.state.provinceList, |
|
|
|
|
cityList: [], |
|
|
|
|
schoolList: [], |
|
|
|
|
jurisdictionData: [ |
|
|
|
|
{ name:'1', |
|
|
|
|
date:'', |
|
|
|
|
startDate:'', |
|
|
|
|
endDate:'', |
|
|
|
|
consignment:false, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
],// 课程权限 |
|
|
|
|
|
|
|
|
|
dataPlatform:[ |
|
|
|
|
{ |
|
|
|
|
name:'1', |
|
|
|
|
date:'', |
|
|
|
|
startDate:'', |
|
|
|
|
endDate:'', |
|
|
|
|
platformState:'', |
|
|
|
|
bargain:'', |
|
|
|
|
account:'', |
|
|
|
|
gross:'' |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
],// 数据平台data |
|
|
|
|
permissionData: [], |
|
|
|
|
classVisible: false, |
|
|
|
|
configSearch: '', |
|
|
|
@ -600,11 +606,21 @@ export default { |
|
|
|
|
extranet: '' |
|
|
|
|
}], |
|
|
|
|
curArr: '', |
|
|
|
|
test: [] |
|
|
|
|
test: [], |
|
|
|
|
|
|
|
|
|
// 数据平台权限弹框 |
|
|
|
|
showPlatform:false,// 弹框显示 |
|
|
|
|
platfromTotals:0,// 列表条目 |
|
|
|
|
platfromPage:1,// 页码 |
|
|
|
|
boxDataPlatform:[],// 数据平台弹框 |
|
|
|
|
platformSelect:[],// 数据平台弹框选中 |
|
|
|
|
productName:'',// 搜索产品名称 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
created(){ |
|
|
|
|
console.log(this.$route.query.watch,'route'); |
|
|
|
|
this.token = sessionStorage.getItem('token') |
|
|
|
|
this.getCityData() |
|
|
|
|
if(this.$route.query.watch){ |
|
|
|
|
this.getDetail(this.$route.query.watch) |
|
|
|
@ -613,7 +629,7 @@ export default { |
|
|
|
|
this.getDetail(this.$route.query.edit) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
// mounted() { |
|
|
|
|
// if(this.form.orderId){ |
|
|
|
|
// let data = { |
|
|
|
|
// orderId: this.form.orderId |
|
|
|
@ -641,7 +657,7 @@ export default { |
|
|
|
|
// iconImg.push({'name':'合同文件','url': res.message[0].contractInformations[0].contractInformationLink}); |
|
|
|
|
// this.uploadList = iconImg |
|
|
|
|
// } |
|
|
|
|
// this.contractInformation = { |
|
|
|
|
// this.contract = { |
|
|
|
|
// contractInformationName: res.message[0].contractInformations[0].contractInformationName, |
|
|
|
|
// contractInformationNumber: res.message[0].contractInformations[0].contractInformationNumber, |
|
|
|
|
// contractInformationSum: res.message[0].contractInformations[0].contractInformationSum, |
|
|
|
@ -654,7 +670,7 @@ export default { |
|
|
|
|
// }).catch((res) => { |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
// }, |
|
|
|
|
methods: { |
|
|
|
|
// 读取页面详情 |
|
|
|
|
async getDetail(id){ |
|
|
|
@ -680,10 +696,10 @@ export default { |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 点击订单客户框触发 |
|
|
|
|
// 订单客户框触发选择页面 |
|
|
|
|
gotoClient(){ |
|
|
|
|
// 记录当前页面数据,进入次级页面选择客户 |
|
|
|
|
this.showSelectClient = !this.showSelectClient |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 选择客户返回传值 |
|
|
|
|
backToOrder(val){ |
|
|
|
@ -702,25 +718,187 @@ export default { |
|
|
|
|
// 新增订单 |
|
|
|
|
addOrder(){ |
|
|
|
|
let param = { |
|
|
|
|
contractInformation:{},//合同信息 |
|
|
|
|
order:{},// 订单基本数据 |
|
|
|
|
orderOther:{}//订单其他数据 |
|
|
|
|
contractInformation:this.contract,//合同信息 |
|
|
|
|
order:this.form,// 订单基本数据 |
|
|
|
|
orderOther:[...this.jurisdictionData,...this.dataPlatform.map(e=>e.authority=0)]//订单其他数据 |
|
|
|
|
} |
|
|
|
|
console.log(this.$refs,'refs'); |
|
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
this.loading = true |
|
|
|
|
this.$post(this.api.orderAdd,param).then(res=>{ |
|
|
|
|
console.log(res,'新增订单'); |
|
|
|
|
this.$router.push('/order') |
|
|
|
|
this.loading = false |
|
|
|
|
this.$message.success('添加订单成功!') |
|
|
|
|
}).catch(err=>{ |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.$message('请填上必填项!'); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 课程权限 |
|
|
|
|
addClassJurisdiction(){ |
|
|
|
|
this.classVisible = !this.classVisible |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 数据平台权限 |
|
|
|
|
addDataJurisdiction(){ |
|
|
|
|
addDataJurisdiction(val){ |
|
|
|
|
if(val!=='search'){ |
|
|
|
|
this.showPlatform = !this.showPlatform |
|
|
|
|
} |
|
|
|
|
let param = { |
|
|
|
|
pageSize:10, |
|
|
|
|
pageNum:this.platfromPage, |
|
|
|
|
status:1, |
|
|
|
|
productName:this.productName |
|
|
|
|
} |
|
|
|
|
this.$post(this.api.listByEntity,param).then(res=>{ |
|
|
|
|
console.log(res,'请求成功'); |
|
|
|
|
this.boxDataPlatform = res.pageList.records |
|
|
|
|
this.platfromTotals = res.pageList.total |
|
|
|
|
}).catch(err=>{ |
|
|
|
|
console.log(err,'请求错误'); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 数据平台--弹框列表选中 |
|
|
|
|
boxDataPlatformSelection(val){ |
|
|
|
|
this.platformSelect = val |
|
|
|
|
console.log(val,'数据选中',this.platformSelect); |
|
|
|
|
}, |
|
|
|
|
// 数据平台弹框--确定 |
|
|
|
|
addPlatform(){ |
|
|
|
|
console.log(this.platformSelect,'this.platformSelect'); |
|
|
|
|
if(this.platformSelect.length>0){ |
|
|
|
|
let that = this |
|
|
|
|
let fn = function(e){ |
|
|
|
|
let obj = { |
|
|
|
|
productName:e.productName,// 名称 |
|
|
|
|
periodOfUse:'',// 使用期限 |
|
|
|
|
dataOrCourseId:e.id,// id |
|
|
|
|
accountNum:'',// 账号数 |
|
|
|
|
startTime:'',// 开始 |
|
|
|
|
endTime:'', // 终止 |
|
|
|
|
remainingPeriod:'',// 剩余期限 |
|
|
|
|
marketValue:e.market,// 市场价 |
|
|
|
|
finalPrice:'',// 成交价 |
|
|
|
|
discountRate:'',// 折扣率 |
|
|
|
|
totalAmount:'',// 总价 |
|
|
|
|
ship:false,// 发货否 |
|
|
|
|
authority:0,// 数据平台权限 |
|
|
|
|
} |
|
|
|
|
that.dataPlatform.push(obj) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.platformSelect.map(e=>{// 取得选中的值,进行赋值 |
|
|
|
|
if(this.dataPlatform.length>0){ |
|
|
|
|
// 比对是否存在该id,若存在,不操作,不存在,则进行push操作 |
|
|
|
|
let find = this.dataPlatform.some(i=>e.id === i.dataOrCourseId)// 判断已有的相同的id不进行处理 |
|
|
|
|
if(!find){ |
|
|
|
|
fn(e) |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
fn(e) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.showPlatform = !this.showPlatform |
|
|
|
|
this.platformSelect = [] |
|
|
|
|
}else{ |
|
|
|
|
return this.$message('请选中数据后再确定!') |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 数据平台弹框--页数变更 |
|
|
|
|
platfromCurrentChange(val) { |
|
|
|
|
this.platfromPage = val; |
|
|
|
|
this.addDataJurisdiction(); |
|
|
|
|
}, |
|
|
|
|
// 计算折扣率 |
|
|
|
|
discount(val,row){ |
|
|
|
|
if(val){ |
|
|
|
|
row.discountRate = Math.floor(val/row.marketValue*100).toFixed(3)+'%' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 合同起止日期选择 |
|
|
|
|
contractTimeChange(val){ |
|
|
|
|
if(val.length>0){ |
|
|
|
|
this.contract.startTime = val[0] |
|
|
|
|
this.contract.endTime = val[1] |
|
|
|
|
console.log(this.contract.startTime,this.contract.endTime,'s-e'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 新增数据平台权限时,计算总的金额数目 |
|
|
|
|
allAmount($event,row){ |
|
|
|
|
// 课程权限未完善,没写 |
|
|
|
|
let arr = [] |
|
|
|
|
this.dataPlatform.map(e=>{ |
|
|
|
|
arr.push(+e.totalAmount) |
|
|
|
|
}) |
|
|
|
|
this.form.orderAmount = arr.reduce((a,b)=>a+b) |
|
|
|
|
}, |
|
|
|
|
// 总金额--计算账号,或者市场价 |
|
|
|
|
allAmountChange(val,row){ |
|
|
|
|
if(val){ |
|
|
|
|
let all = val*10000 |
|
|
|
|
if(row.accountNum){// 若有账号 |
|
|
|
|
row.marketValue = all/row.accountNum |
|
|
|
|
} |
|
|
|
|
if(row.marketValue){ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 权限switch切换--计算天数 |
|
|
|
|
formSwitch (e,row) { |
|
|
|
|
this.deadLine(row.periodOfUse,row) |
|
|
|
|
}, |
|
|
|
|
// 使用期限转换以及计算剩余天数 |
|
|
|
|
deadLine(e,row){ |
|
|
|
|
console.log(row.ship,e,'row.consignment'); |
|
|
|
|
if(e==='') { |
|
|
|
|
console.log('進入return'); |
|
|
|
|
row.startTime = '' |
|
|
|
|
row.endTime = '' |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
function completeDate(value) { |
|
|
|
|
return value < 10 ? "0"+value:value; |
|
|
|
|
} |
|
|
|
|
let char = "-"; |
|
|
|
|
let nowDate = new Date() |
|
|
|
|
let day = nowDate.getDate(); |
|
|
|
|
let month = nowDate.getMonth() + 1; |
|
|
|
|
let year = nowDate.getFullYear(); |
|
|
|
|
//补全0,并拼接当前的时间点 |
|
|
|
|
let nowYear = year + char + completeDate(month) + char +completeDate(day); |
|
|
|
|
// 判断结束日期 |
|
|
|
|
console.log(parseInt(e%12),'取余'); |
|
|
|
|
let endYear = +year + parseInt(e/12) + char + completeDate((month+e)%12) + char +completeDate(day); |
|
|
|
|
// 得出起始年月日 |
|
|
|
|
row.startTime = nowYear |
|
|
|
|
row.endTime = endYear |
|
|
|
|
|
|
|
|
|
// 计算剩余天数 |
|
|
|
|
let date1 = Date.parse(endYear); |
|
|
|
|
|
|
|
|
|
let date2 = Date.parse(nowYear); |
|
|
|
|
let ms = Math.abs(date1 - date2) |
|
|
|
|
let days = Math.floor(ms / (24 * 3600 * 1000)); |
|
|
|
|
console.log(Date.parse(endYear),nowYear,date1,date2,days,'剩余期限'); |
|
|
|
|
row.remainingPeriod = days |
|
|
|
|
}, |
|
|
|
|
// 计算成交总额 |
|
|
|
|
dealComputers(e,row){ |
|
|
|
|
if(row.finalPrice&&row.accountNum){ |
|
|
|
|
row.totalAmount = row.finalPrice*row.accountNum/10000; |
|
|
|
|
} |
|
|
|
|
this.allAmount() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 清除省份 |
|
|
|
|
clearprovince(){ |
|
|
|
@ -781,43 +959,6 @@ export default { |
|
|
|
|
this.form.email = res.message[0].email |
|
|
|
|
}).catch(res => {}); |
|
|
|
|
}, |
|
|
|
|
async saveOrder() { |
|
|
|
|
// try { |
|
|
|
|
// await Promise.all([ |
|
|
|
|
// this.$refs.form.validate(), |
|
|
|
|
// this.$refs.contractInformation.validate() |
|
|
|
|
// ]); |
|
|
|
|
// if(this.jurisdictionData.length == 0){ |
|
|
|
|
// this.$message.error('请添加课程配置!'); |
|
|
|
|
// }else{ |
|
|
|
|
// function findCherries(fruit) { |
|
|
|
|
// return fruit.transactionPrice === ''; |
|
|
|
|
// } |
|
|
|
|
// if(this.jurisdictionData.find(findCherries)){ |
|
|
|
|
// this.$message.error('请先填写成交价!'); |
|
|
|
|
// }else{ |
|
|
|
|
// let data = { |
|
|
|
|
// order: this.form, |
|
|
|
|
// coursePermissionss: this.jurisdictionData, |
|
|
|
|
// contractInformation: this.contractInformation |
|
|
|
|
// } |
|
|
|
|
// if(this.form.orderId){ |
|
|
|
|
// this.$post(this.api.updateOrder,data).then((res) => { |
|
|
|
|
// this.$message.success('编辑成功'); |
|
|
|
|
// this.goback() |
|
|
|
|
// }).catch((res) => {}) |
|
|
|
|
// } else { |
|
|
|
|
// this.$post(this.api.addOrder,data).then((res) => { |
|
|
|
|
// this.$message.success('添加成功'); |
|
|
|
|
// this.goback() |
|
|
|
|
// }).catch((res) => {}) |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// } catch (error) { |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// // 获取应用配置 |
|
|
|
|
// getConfig(rows){ |
|
|
|
@ -866,6 +1007,7 @@ export default { |
|
|
|
|
this.pageNo = val; |
|
|
|
|
this.getConfig(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 查询应用权限 |
|
|
|
|
getPermissions(val){ |
|
|
|
|
this.$get(this.api.queryCoursePermissions,val).then(res => { |
|
|
|
@ -899,15 +1041,15 @@ export default { |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
}, |
|
|
|
|
discountChange(row){ |
|
|
|
|
let reg = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/ |
|
|
|
|
if(!(reg.test(row.transactionPrice))){ |
|
|
|
|
this.$message.error('请输入正确金额格式,可保留两位小数!'); |
|
|
|
|
row.transactionPrice = '' |
|
|
|
|
}else{ |
|
|
|
|
row.discount = this.Percentage(row.transactionPrice,row.marketPrice) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// discountChange(row){ |
|
|
|
|
// let reg = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/ |
|
|
|
|
// if(!(reg.test(row.transactionPrice))){ |
|
|
|
|
// this.$message.error('请输入正确金额格式,可保留两位小数!'); |
|
|
|
|
// row.transactionPrice = '' |
|
|
|
|
// }else{ |
|
|
|
|
// row.discount = this.Percentage(row.transactionPrice,row.marketPrice) |
|
|
|
|
// } |
|
|
|
|
// }, |
|
|
|
|
getSummaries(param) { |
|
|
|
|
const { columns, data } = param; |
|
|
|
|
var sums = 0; |
|
|
|
@ -918,16 +1060,18 @@ export default { |
|
|
|
|
return sums; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 上传文件 |
|
|
|
|
// 上传文件超出 |
|
|
|
|
handleExceed(files, fileList) { |
|
|
|
|
this.$message.warning( |
|
|
|
|
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
// 上传成功 |
|
|
|
|
uploadSuccess(response, file, fileList) { |
|
|
|
|
this.uploadList.push({ name: file.name, url: response.message.fileUrl }); |
|
|
|
|
this.contractInformation.contractInformationLink = response.message.fileUrl |
|
|
|
|
this.contract.contractFile = response.filesResult.fileUrl |
|
|
|
|
console.log(this.contract,response,'this.contract'); |
|
|
|
|
}, |
|
|
|
|
// 上传报错 |
|
|
|
|
uploadError(err, file, fileList) { |
|
|
|
|
this.$message({ |
|
|
|
|
message: "上传出错,请重试!", |
|
|
|
@ -935,16 +1079,15 @@ export default { |
|
|
|
|
center: true |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 删除上传合同前的确认 |
|
|
|
|
beforeRemove(file, fileList) { |
|
|
|
|
return this.$confirm(`确定移除 ${file.name}?`); |
|
|
|
|
}, |
|
|
|
|
// 删除文件钩子 |
|
|
|
|
handleRemove(file, fileList) { |
|
|
|
|
this.contractInformation.contractInformationLink = '' |
|
|
|
|
}, |
|
|
|
|
downLoad(){ |
|
|
|
|
let downFile = this.contractInformation.contractInformationLink.replace("http://liuwanr.oss-cn-shenzhen.aliyuncs.com/","") |
|
|
|
|
window.open(`${this.api.downloadFiles}?objectName=${downFile}`) |
|
|
|
|
this.contract.contractFile = '' |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
configure(){ |
|
|
|
|
this.ipVisible = true |
|
|
|
|
}, |
|
|
|
@ -955,50 +1098,6 @@ export default { |
|
|
|
|
this.$router.go(-1) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 课程部分的switch切换 |
|
|
|
|
courseSwitch(e,row){ |
|
|
|
|
this.deadLine(row.date,row) |
|
|
|
|
}, |
|
|
|
|
// 平台权限switch切换 |
|
|
|
|
platformSwitch (e,row) { |
|
|
|
|
this.deadLine(row.date,row) |
|
|
|
|
}, |
|
|
|
|
// 使用期限转换 |
|
|
|
|
deadLine(e,row){ |
|
|
|
|
console.log(row.consignment,e,'row.consignment'); |
|
|
|
|
if(e===''||!row.consignment) { |
|
|
|
|
console.log('進入return'); |
|
|
|
|
row.startDate = '' |
|
|
|
|
row.endDate = '' |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
function completeDate(value) { |
|
|
|
|
return value < 10 ? "0"+value:value; |
|
|
|
|
} |
|
|
|
|
let char = "-"; |
|
|
|
|
let nowDate = new Date() |
|
|
|
|
let day = nowDate.getDate(); |
|
|
|
|
let month = nowDate.getMonth() + 1; |
|
|
|
|
let year = nowDate.getFullYear(); |
|
|
|
|
//补全0,并拼接当前的时间点 |
|
|
|
|
let nowYear = year + char + completeDate(month) + char +completeDate(day); |
|
|
|
|
// 判断结束日期 |
|
|
|
|
let endYear = +year+parseInt(e/12) + char + completeDate(month+e%12) + char +completeDate(day); |
|
|
|
|
// 待接口改 |
|
|
|
|
row.startDate = nowYear |
|
|
|
|
row.endDate = endYear |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
console.log(endYear,nowYear); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 计算成交总额 |
|
|
|
|
dealComputers(e,row){ |
|
|
|
|
if(row.bargain&&row.account){ |
|
|
|
|
row.gross = row.bargain*row.account; |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
console.log(row.gross,'row.gross'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
@ -1010,6 +1109,9 @@ export default { |
|
|
|
|
/deep/ .small .el-input__inner{ |
|
|
|
|
width: 70px; |
|
|
|
|
} |
|
|
|
|
/deep/ .contractDate .el-date-editor--daterange.el-input__inner{ |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
.mag{ |
|
|
|
|
margin-right: 20px; |
|
|
|
|
} |
|
|
|
|