|
|
|
@ -24,7 +24,14 @@ |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
|
|
<el-col :span="6" :offset="5"> |
|
|
|
|
<el-form-item label="订单编号"> |
|
|
|
|
<el-input v-model="form.orderNumber" disabled placeholder="请输入订单编号"></el-input> |
|
|
|
|
<el-input v-model="form.orderNumber" disabled placeholder="自动生成"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="订单时间"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.orderNumber" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="provinceId" label="省份"> |
|
|
|
@ -32,18 +39,14 @@ |
|
|
|
|
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="customerId" label="客户名称"> |
|
|
|
|
<el-select v-model="form.customerId" clearable placeholder="请选择客户" |
|
|
|
|
:disabled="form.cityId ? false : true" @change="getcustomer" @clear="clearcustomer()"> |
|
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.customerName" :value="item.customerId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="联系人" prop="orderContact"> |
|
|
|
|
<el-input v-model="form.orderContact" disabled placeholder="请输入联系人姓名"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="邮箱"> |
|
|
|
|
<el-input v-model="form.email" disabled placeholder="请输入邮箱地址"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
@ -51,23 +54,32 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
|
<el-form-item label="订单时间"> |
|
|
|
|
<el-input v-model="form.orderDate" disabled placeholder="请输入订单时间"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="cityId" label="城市"> |
|
|
|
|
<el-select v-model="form.cityId" clearable placeholder="请选择城市" @clear="clearcity()" |
|
|
|
|
:disabled="form.provinceId ? false : true" @change="getSchool()"> |
|
|
|
|
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
|
<el-form-item prop="customerId" label="订单客户"> |
|
|
|
|
<el-select v-model="form.customerId" clearable placeholder="请选择客户" |
|
|
|
|
:disabled="form.cityId ? false : true" @change="getcustomer" @clear="clearcustomer()"> |
|
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.customerName" :value="item.customerId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<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> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item prop="cityId" label="城市"> |
|
|
|
|
<el-select v-model="form.orderType" placeholder="请选择"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item,index) in form.city" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item" |
|
|
|
|
:value="item"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="电话"> |
|
|
|
|
<el-input v-model="form.phone" disabled placeholder="请输入电话号码" maxlength="11"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
@ -94,29 +106,53 @@ |
|
|
|
|
<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="courseName" label="课程名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="使用期限" align="center" width="300"> |
|
|
|
|
<el-table-column label="使用期限" align="center" width="200"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-select v-model="scope.row.usePeriod" placeholder="请选择"> |
|
|
|
|
<el-option v-for="(item,index) in yearList" :key="index" :label="item.name" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<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> |
|
|
|
|
<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> |
|
|
|
|
<div v-else style="display:flex;justify-content:center;"> |
|
|
|
|
<p>{{scope.row.startDate}}</p><span> - </span><p>{{scope.row.endDate}}</p> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="市场价(万)" align="center"> |
|
|
|
|
<el-table-column label="剩余期限" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input v-model="scope.row.marketPrice" disabled placeholder="请输入"></el-input> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>天</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="成交价(万)" align="center"> |
|
|
|
|
<el-table-column label="市场价" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入" |
|
|
|
|
type="text" oninput="value=value.replace(/[^\d.]/g,'')" @change="discountChange(scope.row)"></el-input> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>万</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="折扣率(%)" align="center"> |
|
|
|
|
<el-table-column label="成交价 " align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input v-model="scope.row.discount" disabled></el-input> |
|
|
|
|
<div class="small"> |
|
|
|
|
<el-input v-model="scope.row.transactionPrice" placeholder="请输入"type="text"></el-input> |
|
|
|
|
<span>万</span> |
|
|
|
|
</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> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="端口地址 " align="center"> |
|
|
|
@ -127,18 +163,111 @@ |
|
|
|
|
<el-table-column label="发货" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.isDeliverGoods" |
|
|
|
|
v-model="scope.row.consignment" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
@change="changeSwitch($event,scope.row,scope.$index)"> |
|
|
|
|
@change="courseSwitch($event,scope.row)"> |
|
|
|
|
</el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
|
<div> |
|
|
|
|
<div class="flex-between mgb20 user_header"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>数据平台权限</span> |
|
|
|
|
</div> |
|
|
|
|
<el-button type="primary" size="small" round class="mag" @click="getConfig()">添加</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> |
|
|
|
|
<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> |
|
|
|
|
<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> |
|
|
|
|
<div v-else style="display:flex;justify-content:center;"> |
|
|
|
|
<p>{{scope.row.startDate}}</p><span> - </span><p>{{scope.row.endDate}}</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> |
|
|
|
|
<span>天</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<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> |
|
|
|
|
<span>元 / 账号</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<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> |
|
|
|
|
<span>元 / 账号</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<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> |
|
|
|
|
</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> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- 金额自动计算,计算方式:账号数*成交价,且可以手动修改,保留两位小数 --> |
|
|
|
|
<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> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="端口地址 " align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button type="text" @click="deljur(scope.$index,scope.row)">删除</el-button> |
|
|
|
|
<el-button @click="configure(scope.row)">配置</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<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)"> |
|
|
|
|
</el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
@ -367,7 +496,29 @@ export default { |
|
|
|
|
provinceList: this.$store.state.provinceList, |
|
|
|
|
cityList: [], |
|
|
|
|
schoolList: [], |
|
|
|
|
jurisdictionData: [], |
|
|
|
|
jurisdictionData: [ |
|
|
|
|
{ name:'1', |
|
|
|
|
date:'', |
|
|
|
|
startDate:'', |
|
|
|
|
endDate:'', |
|
|
|
|
consignment:false, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
],// 课程权限 |
|
|
|
|
|
|
|
|
|
dataPlatform:[ |
|
|
|
|
{ |
|
|
|
|
name:'1', |
|
|
|
|
date:'', |
|
|
|
|
startDate:'', |
|
|
|
|
endDate:'', |
|
|
|
|
platformState:'', |
|
|
|
|
bargain:'', |
|
|
|
|
account:'', |
|
|
|
|
gross:'' |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
],// 数据平台data |
|
|
|
|
permissionData: [], |
|
|
|
|
curVisible: false, |
|
|
|
|
configSearch: '', |
|
|
|
@ -422,6 +573,7 @@ export default { |
|
|
|
|
test: [] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
if(this.form.orderId){ |
|
|
|
|
let data = { |
|
|
|
@ -465,6 +617,9 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
testfn(event){ |
|
|
|
|
console.log(event,'ev'); |
|
|
|
|
}, |
|
|
|
|
// 清除省份 |
|
|
|
|
clearprovince(){ |
|
|
|
|
this.form.cityId = '', |
|
|
|
@ -658,11 +813,7 @@ export default { |
|
|
|
|
this.form.orderAmount = sums |
|
|
|
|
return sums; |
|
|
|
|
}, |
|
|
|
|
changeSwitch (e,row,index) { |
|
|
|
|
let newData = row; |
|
|
|
|
newData.status = newData.status === 1 ? 1 : 0; |
|
|
|
|
this.jurisdictionData[index] = newData; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 上传文件 |
|
|
|
|
handleExceed(files, fileList) { |
|
|
|
|
this.$message.warning( |
|
|
|
@ -698,12 +849,63 @@ export default { |
|
|
|
|
}, |
|
|
|
|
goback(){ |
|
|
|
|
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> |
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
/deep/.course-input .el-input__inner { |
|
|
|
|
width: 120px; |
|
|
|
|
} |
|
|
|
|
/deep/ .small .el-input__inner{ |
|
|
|
|
width: 70px; |
|
|
|
|
} |
|
|
|
|
.mag{ |
|
|
|
|
margin-right: 20px; |
|
|
|
|
} |
|
|
|
|