yujialong 3 years ago
parent 47f6976255
commit bf69f7ff1a
  1. 4
      src/views/course/courseconfig.vue
  2. 837
      src/views/order/AddOrder.vue
  3. 138
      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,7 +9,8 @@
<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()">确定
</el-button>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
@ -26,27 +27,34 @@
<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>
@ -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>
@ -119,31 +129,31 @@ export default {
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();
} }
} }
@ -160,103 +170,109 @@ export default {
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;
@ -268,6 +284,7 @@ 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;
@ -281,6 +298,7 @@ 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;
} }

Loading…
Cancel
Save