yujialong 3 years ago
parent 47f6976255
commit bf69f7ff1a
  1. 4
      src/views/course/courseconfig.vue
  2. 1289
      src/views/order/AddOrder.vue
  3. 230
      src/views/order/selectClient.vue

@ -459,7 +459,7 @@ export default {
preview(row) { preview(row) {
if (this.transferType(row.fileType) == "视频") { if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth; this.playAuth = res.playAuth;
if (this.player) { if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else { } else {
@ -501,7 +501,7 @@ export default {
this.isWord = false; this.isWord = false;
this.isExcel = false; this.isExcel = false;
} }
this.iframeSrc = res.data.previewUrl; this.iframeSrc = res.previewUrl;
this.$nextTick(() => { this.$nextTick(() => {
this.iframeOnload(); this.iframeOnload();
}); });

File diff suppressed because it is too large Load Diff

@ -9,8 +9,9 @@
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">选择客户</span> <span class="per_school">选择客户</span>
</div> </div>
<el-button type="primary" size="small" round class="mag" v-preventReClick @click="goback()">确定</el-button> <el-button type="primary" size="small" round class="mag" v-preventReClick @click="goback()">确定
</div> </el-button>
</div>
</el-card> </el-card>
</el-col> </el-col>
@ -26,32 +27,39 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="国家"> <el-form-item label="国家">
<el-select v-model="form.countries" placeholder="请选择国家"> <el-select v-model="form.countries" placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option> <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-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="省份"> <el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity" @clear="clearprovince"> <el-select v-model="form.provinces" clearable placeholder="请选择省份"
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> @change="getCity" @clear="clearprovince">
<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-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="城市"> <el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="initData"> <el-select v-model="form.city" clearable placeholder="请选择城市"
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> :disabled="form.provinces ? false : true" @change="initData">
<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-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入客户名称/联系人姓名/电话" @clear="clearSearch" @keyup.enter.native="getData" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input> <el-input placeholder="请输入客户名称/联系人姓名/电话" @clear="clearSearch"
@keyup.enter.native="getData" prefix-icon="el-icon-search"
v-model="form.keyword" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
@ -69,14 +77,14 @@
<!-- <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> --> <!-- <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 type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.$index + (page - 1) * pageSize + 1}} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="customerName" label="客户名称" align="center"> <el-table-column prop="customerName" label="客户名称" align="center">
</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">
<span class="ellipsis">{{scope.row.industryName}}</span> <span class="ellipsis">{{ scope.row.industryName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="countries" label="国家" align="center"> <el-table-column prop="countries" label="国家" align="center">
@ -91,12 +99,14 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="270" align="center"> <el-table-column label="操作" width="270" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox @change="checkboxChenge(scope.row)" v-model="scope.row.checked"></el-checkbox> <el-checkbox @change="checkboxChenge(scope.row)"
v-model="scope.row.checked"></el-checkbox>
</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" :total="total" @current-change="handleCurrentChange" :current-page="page"> <el-pagination background layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="page">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -107,51 +117,51 @@
</template> </template>
<script> <script>
export default { export default {
props:{ props: {
refresh:{ refresh: {
type:Boolean, type: Boolean,
default:false default: false
} }
}, },
data(){ data() {
return{ return {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 1, total: 1,
countryList: [{ countryList: [{
name:'中国' name: "中国"
}], }],
listData: [], listData: [],
form: { form: {
countries:'中国', countries: "中国",
provinces: '', provinces: "",
city: '', city: "",
keyword: '' keyword: ""
}, },
provinceList:[], provinceList: [],
cityList:[], cityList: [],
checkedID:'',// ID checkedID: "",// ID
checkedName:'',// checkedName: ""//
} };
}, },
created(){ created() {
this.getData() this.getData();
this.getProvince() this.getProvince();
}, },
watch:{ watch: {
refresh:function(val,val2){ refresh: function(val, val2) {
if(val){ if (val) {
this.getData() this.getData();
this.getProvince() this.getProvince();
} }
} }
}, },
methods:{ methods: {
// //
getData(){ getData() {
this.$post(this.api.queryCustomer,{ this.$post(this.api.queryCustomer, {
countries: this.form.countries, countries: this.form.countries,
provinceId: this.form.provinces, provinceId: this.form.provinces,
cityId: this.form.city, cityId: this.form.city,
@ -159,105 +169,111 @@ export default {
page: this.page, page: this.page,
size: this.pageSize size: this.pageSize
}).then(res => { }).then(res => {
res.message.list.map(e=>{ res.message.list.map(e => {
e.checked = false e.checked = false;
if(this.checkedID){ if (this.checkedID) {
if(e.customerId===this.checkedID){ if (e.customerId === this.checkedID) {
e.checked = true e.checked = true;
} }
} }
}) });
this.listData = res.message.list this.listData = res.message.list;
this.total = res.message.totalCount this.total = res.message.totalCount;
}).catch(res => {}) }).catch(res => {
});
}, },
// //
getProvince(){ getProvince() {
this.$get(this.api.queryProvince).then(res => { this.$get(this.api.queryProvince).then(res => {
this.provinceList = res.list this.provinceList = res.list;
this.$store.commit("provinceData", { provinceList : this.provinceList}) this.$store.commit("provinceData", { provinceList: this.provinceList });
}).catch(res => {}) }).catch(res => {
});
}, },
clearprovince(){ clearprovince() {
this.form.city = '' this.form.city = "";
}, },
getCity(){ getCity() {
this.clearprovince() this.clearprovince();
this.getCityData() this.getCityData();
this.page = 1 this.page = 1;
this.initData() this.initData();
}, },
getCityData(){ getCityData() {
let data = { let data = {
provinceId: this.form.provinces provinceId: this.form.provinces
} };
this.$get(this.api.queryCity,data).then(res => { this.$get(this.api.queryCity, data).then(res => {
this.cityList = res.list this.cityList = res.list;
}).catch(res => {}) }).catch(res => {
});
}, },
async goback(val){ async goback(val) {
if(val){ if (val) {
this.$emit('back',{show:true}) this.$emit("back", { show: true });
}else{ } else {
if(!this.checkedName){ if (!this.checkedName) {
return this.$message('请选择客户后再确定!') return this.$message("请选择客户后再确定!");
} }
let param = { let param = {
show:true, show: true,
id:this.checkedID, id: this.checkedID,
name:this.checkedName, name: this.checkedName
} };
await this.$get(this.api.queryCustomerDetails,{customerId:this.checkedID}).then(res=>{ await this.$get(this.api.queryCustomerDetails, { customerId: this.checkedID }).then(res => {
console.log(res,'当前的res'); console.log(res, "当前的res");
let data = res.result.customer let data = res.result.customer;
param.email = data.email param.email = data.email;
param.phone = data.phone param.phone = data.phone;
param.name = data.customerName param.name = data.customerName;
}) });
this.$emit('back',param) this.$emit("back", param);
} }
}, },
initData(){ initData() {
this.page = 1 this.page = 1;
this.getData() this.getData();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val;
this.getData() this.getData();
}, },
// checkbox // checkbox
checkboxChenge(row){ checkboxChenge(row) {
this.listData.map(e=>{ this.listData.map(e => {
e.checked = false e.checked = false;
}) });
row.checked = true row.checked = true;
this.checkedName = row.customerName this.checkedName = row.customerName;
this.checkedID = row.customerId this.checkedID = row.customerId;
}, },
clearSearch(){ clearSearch() {
this.getData() this.getData();
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mag{ .mag {
margin-right: 20px; margin-right: 20px;
} }
/deep/ .el-checkbox__inner{
/deep/ .el-checkbox__inner {
border-radius: 50%; border-radius: 50%;
width: 19px; width: 19px;
height: 19px; height: 19px;
} }
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background: #FFF; background: #FFF;
} }
/deep/ .el-checkbox__inner::after{
/deep/ .el-checkbox__inner::after {
transform: none; transform: none;
transition: all .3s ease-in; transition: all .3s ease-in;
width: 0; width: 0;
@ -268,7 +284,8 @@ export default {
transform: translate(-46%, -48%); transform: translate(-46%, -48%);
border-radius: 50%; border-radius: 50%;
} }
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner::after{
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner::after {
width: 13px; width: 13px;
height: 13px; height: 13px;
background: #9278FF; background: #9278FF;
@ -281,7 +298,8 @@ export default {
transition: all .3s ease-in; transition: all .3s ease-in;
border: 0; border: 0;
} }
/deep/ .el-checkbox__input{
/deep/ .el-checkbox__input {
line-height: 0; line-height: 0;
} }
</style> </style>
Loading…
Cancel
Save