|
|
|
@ -27,7 +27,7 @@ |
|
|
|
|
<el-form-item label="订单编号"> |
|
|
|
|
<el-input v-model="form.orderNumber" disabled placeholder="自动生成"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="订单时间" required> |
|
|
|
|
<el-form-item label="订单时间" prop="createTime" required> |
|
|
|
|
<el-date-picker |
|
|
|
|
style="width:100%" |
|
|
|
|
v-model="form.createTime" |
|
|
|
@ -69,7 +69,7 @@ |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="电话" required> |
|
|
|
|
<el-form-item label="电话" prop="phone" required> |
|
|
|
|
<el-input v-model="form.phone" placeholder="请输入电话号码" maxlength="11"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="订单金额" prop="orderAmount"> |
|
|
|
@ -88,7 +88,7 @@ |
|
|
|
|
<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="addClassJurisdiction()">添加</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table :data="jurisdictionData" class="orderTable" stripe header-align="center" show-summary :summary-method="getSummaries"> |
|
|
|
@ -268,8 +268,8 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<el-form ref="contractInformation" :model="contractInformation" :rules="rules" label-width="80px" class="flex-start"> |
|
|
|
|
<el-col :span="6" :offset="5"> |
|
|
|
|
<el-form ref="contractInformation" :model="contractInformation" :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-form-item> |
|
|
|
@ -281,11 +281,17 @@ |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
|
<el-col :span="8" :offset="2"> |
|
|
|
|
<el-form-item label="合同编号"> |
|
|
|
|
<el-input v-model="contractInformation.contractInformationNumber" placeholder="请输入合同编号"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="合同编号"> |
|
|
|
|
<el-input v-model="contractInformation.contractInformationNumber" placeholder="请输入合同编号"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="4" :offset="4" class="flex-start"> |
|
|
|
|
|
|
|
|
|
<el-form-item label="上传合同"> |
|
|
|
|
<el-upload |
|
|
|
|
class="contract" |
|
|
|
@ -301,13 +307,9 @@ |
|
|
|
|
> |
|
|
|
|
<el-button size="medium" type="plain" class="uploadTitle">上传</el-button> |
|
|
|
|
</el-upload> |
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="2" class="downcol"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button size="medium" type="plain" class="down" @click="downLoad()">下载</el-button> |
|
|
|
|
<el-button size="medium" type="plain" style="height:40px" @click="downLoad()">重新上传</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
@ -317,8 +319,8 @@ |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 添加应用 --> |
|
|
|
|
<el-dialog :visible.sync="curVisible" width="50%" center> |
|
|
|
|
<!-- 添加课程权限弹框--> |
|
|
|
|
<el-dialog :visible.sync="classVisible" width="50%" center> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
@ -349,11 +351,48 @@ |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="curVisible = false">取 消</el-button> |
|
|
|
|
<el-button @click="classVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="addSystem()">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 添加平台权限弹框 --> |
|
|
|
|
<el-dialog :visible.sync="showPlatform" width="50%" center> |
|
|
|
|
<div class="flex-between mgb20"> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>数据产品列表</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" v-model="configSearch" @keyup.enter.native="onSearch" clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-table :data="permissionData" stripe header-align="center" @selection-change="handleSelectionChange" :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"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span class="ellipsis">{{scope.row.systemName}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="courseHours" label="预计课时" align="center"> |
|
|
|
|
</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> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button @click="showPlatform = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" v-preventReClick @click="addPlatform()">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 选择IP --> |
|
|
|
|
<el-dialog :visible.sync="ipVisible" width="70%" center> |
|
|
|
|
<div class="flex-center mgb20"> |
|
|
|
@ -421,7 +460,7 @@ export default { |
|
|
|
|
showSelectClient:false,// 切换展示选择客户页 |
|
|
|
|
|
|
|
|
|
token: this.$store.state.loginToken, |
|
|
|
|
form: { |
|
|
|
|
form: {// 基本信息 |
|
|
|
|
orderNumber: '', |
|
|
|
|
orderDate: '', |
|
|
|
|
provinceId: '', |
|
|
|
@ -435,55 +474,45 @@ export default { |
|
|
|
|
orderId: this.$store.state.orderId, |
|
|
|
|
customerName:'' |
|
|
|
|
}, |
|
|
|
|
contractInformation: { |
|
|
|
|
contractInformation: {//合同信息 |
|
|
|
|
contractInformationName: '', |
|
|
|
|
contractInformationNumber: '', |
|
|
|
|
contractInformationSum: '', |
|
|
|
|
contractInformationLink: '', |
|
|
|
|
contractInformationId: '', |
|
|
|
|
orderId: '' |
|
|
|
|
}, |
|
|
|
|
orderOther:{// 订单其他数据 |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
uploadList: [], |
|
|
|
|
rules: { |
|
|
|
|
orderNumber: [ |
|
|
|
|
{ required: true, message: '请输入订单编号', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
orderAmount: [ |
|
|
|
|
{ required: true, message: '请输入课程成交价计算订单金额', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
customerName: [ |
|
|
|
|
{ required: true, message: '请选择订单客户', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
provinceId: [ |
|
|
|
|
{ required: true, message: '请选择省份', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
cityId: [ |
|
|
|
|
{ required: true, message: '请选择城市', trigger: 'change' } |
|
|
|
|
orderContact: [ |
|
|
|
|
{ required: true, message: '请输入联系人姓名', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
customerId: [ |
|
|
|
|
{ required: true, message: '请选择客户名称', trigger: 'change' } |
|
|
|
|
createTime: [ |
|
|
|
|
{ required: true, message: '请选择订单时间', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
orderType: [ |
|
|
|
|
{ required: true, message: '请选择订单类型', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
// phone: [ |
|
|
|
|
// { required: true, message: '请选择客户获取手机号', trigger: 'blur' }, |
|
|
|
|
// { |
|
|
|
|
// pattern: /^1[3456789]\d{9}$/, |
|
|
|
|
// message: '请输入正确的手机号', |
|
|
|
|
// trigger: 'blur' |
|
|
|
|
// } |
|
|
|
|
// ], |
|
|
|
|
// contractInformationName: [ |
|
|
|
|
// { required: true, message: '请输入合同名称', trigger: 'blur' } |
|
|
|
|
// ], |
|
|
|
|
contractInformationSum: [ |
|
|
|
|
// { required: true, message: '请输入合同金额', trigger: 'blur' }, |
|
|
|
|
{ pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
phone: [ |
|
|
|
|
{ required: true, message: '请选择客户获取手机号', trigger: 'blur' }, |
|
|
|
|
{ |
|
|
|
|
pattern: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/, |
|
|
|
|
message: '请输入正确的手机号', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
transactionPrice: [ |
|
|
|
|
{ required: true, message: '请输入成交价', trigger: 'blur' }, |
|
|
|
|
{ pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
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: '请输入正确金额格式,可保留两位小数' } |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
orderTypeList: [{ |
|
|
|
@ -521,7 +550,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
],// 数据平台data |
|
|
|
|
permissionData: [], |
|
|
|
|
curVisible: false, |
|
|
|
|
classVisible: false, |
|
|
|
|
configSearch: '', |
|
|
|
|
yearList: [{ |
|
|
|
|
name: '1个月', |
|
|
|
@ -654,12 +683,10 @@ export default { |
|
|
|
|
// 点击订单客户框触发 |
|
|
|
|
gotoClient(){ |
|
|
|
|
// 记录当前页面数据,进入次级页面选择客户 |
|
|
|
|
console.log('下拉框触发A'); |
|
|
|
|
this.showSelectClient = !this.showSelectClient |
|
|
|
|
}, |
|
|
|
|
// 选择客户返回传值 |
|
|
|
|
backToOrder(val){ |
|
|
|
|
console.log(val,'接受传值'); |
|
|
|
|
this.showSelectClient = !this.showSelectClient |
|
|
|
|
if(val.id){ |
|
|
|
|
this.form.customerName = val.name |
|
|
|
@ -672,6 +699,29 @@ export default { |
|
|
|
|
this.$forceUpdate() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 新增订单 |
|
|
|
|
addOrder(){ |
|
|
|
|
let param = { |
|
|
|
|
contractInformation:{},//合同信息 |
|
|
|
|
order:{},// 订单基本数据 |
|
|
|
|
orderOther:{}//订单其他数据 |
|
|
|
|
} |
|
|
|
|
this.$post(this.api.orderAdd,param).then(res=>{ |
|
|
|
|
console.log(res,'新增订单'); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 课程权限 |
|
|
|
|
addClassJurisdiction(){ |
|
|
|
|
this.classVisible = !this.classVisible |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 数据平台权限 |
|
|
|
|
addDataJurisdiction(){ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 清除省份 |
|
|
|
|
clearprovince(){ |
|
|
|
|
this.form.cityId = '', |
|
|
|
@ -732,64 +782,65 @@ export default { |
|
|
|
|
}).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){ |
|
|
|
|
this.multipleSelection = [] |
|
|
|
|
let data = { |
|
|
|
|
courseId: this.curArr, |
|
|
|
|
searchContent: this.configSearch, |
|
|
|
|
pageNo: this.pageNo, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.queryCourseList,data).then(res => { |
|
|
|
|
res.message.rows.forEach(e => { |
|
|
|
|
e.courseType = this.courseTypeStatus(e.courseType) |
|
|
|
|
e.courseHours = this.hoursStatus(e.courseHours) |
|
|
|
|
}) |
|
|
|
|
this.permissionData = res.message.rows |
|
|
|
|
this.totals = res.message.total |
|
|
|
|
this.curVisible = true |
|
|
|
|
}).catch(res => {}); |
|
|
|
|
}, |
|
|
|
|
onSearch(){ |
|
|
|
|
this.getConfig() |
|
|
|
|
// 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){ |
|
|
|
|
// this.multipleSelection = [] |
|
|
|
|
// let data = { |
|
|
|
|
// courseId: this.curArr, |
|
|
|
|
// searchContent: this.configSearch, |
|
|
|
|
// pageNo: this.pageNo, |
|
|
|
|
// pageSize: this.pageSize, |
|
|
|
|
// } |
|
|
|
|
// this.$get(this.api.queryCourseList,data).then(res => { |
|
|
|
|
// res.message.rows.forEach(e => { |
|
|
|
|
// e.courseType = this.courseTypeStatus(e.courseType) |
|
|
|
|
// e.courseHours = this.hoursStatus(e.courseHours) |
|
|
|
|
// }) |
|
|
|
|
// this.permissionData = res.message.rows |
|
|
|
|
// this.totals = res.message.total |
|
|
|
|
// this.classVisible = true |
|
|
|
|
// }).catch(res => {}); |
|
|
|
|
// }, |
|
|
|
|
// onSearch(){ |
|
|
|
|
// this.getConfig() |
|
|
|
|
// }, |
|
|
|
|
getRowKeys(row) { |
|
|
|
|
return row.courseId; |
|
|
|
|
}, |
|
|
|
@ -797,20 +848,20 @@ export default { |
|
|
|
|
handleSelectionChange(val) { |
|
|
|
|
this.multipleSelection = val; |
|
|
|
|
}, |
|
|
|
|
// 绑定实训配置 |
|
|
|
|
addSystem() { |
|
|
|
|
this.curVisible = false |
|
|
|
|
let arr = this.multipleSelection |
|
|
|
|
let result = arr.map(e => e.courseId).join() |
|
|
|
|
this.curArr = this.curArr.concat(`,${result}`) |
|
|
|
|
if (this.curArr.substr(0,1)==','){ |
|
|
|
|
this.curArr = this.curArr.substr(1); |
|
|
|
|
} |
|
|
|
|
let data = { |
|
|
|
|
courseId: result, |
|
|
|
|
} |
|
|
|
|
this.getPermissions(data) |
|
|
|
|
}, |
|
|
|
|
// // 绑定实训配置 |
|
|
|
|
// addSystem() { |
|
|
|
|
// this.classVisible = false |
|
|
|
|
// let arr = this.multipleSelection |
|
|
|
|
// let result = arr.map(e => e.courseId).join() |
|
|
|
|
// this.curArr = this.curArr.concat(`,${result}`) |
|
|
|
|
// if (this.curArr.substr(0,1)==','){ |
|
|
|
|
// this.curArr = this.curArr.substr(1); |
|
|
|
|
// } |
|
|
|
|
// let data = { |
|
|
|
|
// courseId: result, |
|
|
|
|
// } |
|
|
|
|
// this.getPermissions(data) |
|
|
|
|
// }, |
|
|
|
|
handleCurrentChange(val) { |
|
|
|
|
this.pageNo = val; |
|
|
|
|
this.getConfig(); |
|
|
|
@ -818,7 +869,7 @@ export default { |
|
|
|
|
// 查询应用权限 |
|
|
|
|
getPermissions(val){ |
|
|
|
|
this.$get(this.api.queryCoursePermissions,val).then(res => { |
|
|
|
|
this.curVisible = false |
|
|
|
|
this.classVisible = false |
|
|
|
|
var arritem = { |
|
|
|
|
usePeriod: 30, |
|
|
|
|
transactionPrice: '', |
|
|
|
@ -977,7 +1028,7 @@ export default { |
|
|
|
|
margin-left: 0!important; |
|
|
|
|
} |
|
|
|
|
.down{ |
|
|
|
|
margin-top: 60px; |
|
|
|
|
// margin-top: 60px; |
|
|
|
|
height: 40px; |
|
|
|
|
} |
|
|
|
|
/* 选择IP */ |
|
|
|
|