Commit 6030efcb authored by 黄奎's avatar 黄奎

页面修改

parent c5024339
...@@ -94,9 +94,9 @@ ...@@ -94,9 +94,9 @@
</div> </div>
<div class="row wrap"> <div class="row wrap">
<div class="col-6"> <div class="col-6">
<q-select filled stack-label option-value="Id" disable option-label="SubjectName" v-model="objOption.CourseSubject" <q-select filled stack-label option-value="Id" disable option-label="SubjectName"
ref="CourseSubject" :options="courseSubjectList" label="所属科目" class="col-6 q-pr-lg q-pb-lg" emit-value v-model="objOption.CourseSubject" ref="CourseSubject" :options="courseSubjectList" label="所属科目"
map-options /> class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.CourseRate" <q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.CourseRate"
...@@ -106,22 +106,15 @@ ...@@ -106,22 +106,15 @@
</div> </div>
<div class="row wrap"> <div class="row wrap">
<div class="col-6"> <div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="CourseEmphasis" multiple use-chips <q-select filled stack-label option-value="Id" option-label="Name" v-model="CourseEmphasis" multiple
ref="CourseEmphasis" :options="keynoteList" label="课程重点" class="col-6 q-pr-lg q-pb-lg" emit-value use-chips ref="CourseEmphasis" :options="keynoteList" label="课程重点" class="col-6 q-pr-lg q-pb-lg"
map-options /> emit-value map-options />
</div> </div>
<div class="col-6 q-pb-lg q-pr-lg"> <div class="col-6 q-pb-lg q-pr-lg">
<q-uploader :style="{ backgroundImage: 'url(' + objOption.B2BIcon + ')' }" <q-uploader :style="{ backgroundImage: 'url(' + objOption.B2BIcon + ')' }" style="width: auto; " flat
style="width: auto; " flat hide-upload-btn max-files="1" label="图标" accept=".jpg, image/*" hide-upload-btn max-files="1" label="图标" accept=".jpg, image/*" :factory="uploadFile2" auto-upload>
:factory="uploadFile2" auto-upload>
</q-uploader> </q-uploader>
<q-input <q-input filled label="背景颜色" v-model="objOption.B2BBackground" :rules="['anyColor']" class="my-input">
filled
label="背景颜色"
v-model="objOption.B2BBackground"
:rules="['anyColor']"
class="my-input"
>
<template v-slot:append> <template v-slot:append>
<q-icon name="colorize" class="cursor-pointer"> <q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy transition-show="scale" transition-hide="scale"> <q-popup-proxy transition-show="scale" transition-hide="scale">
...@@ -130,7 +123,8 @@ ...@@ -130,7 +123,8 @@
</q-icon> </q-icon>
</template> </template>
</q-input> </q-input>
<img id="background" :src="objOption.B2BIcon" height="100" width="100" crossorigin="anonymous" style="display:none"/> <img id="background" :src="objOption.B2BIcon" height="100" width="100" crossorigin="anonymous"
style="display:none" />
</div> </div>
</div> </div>
<div class="text-caption q-my-md q-px-xs text-grey-6">课程介绍</div> <div class="text-caption q-my-md q-px-xs text-grey-6">课程介绍</div>
...@@ -221,11 +215,11 @@ ...@@ -221,11 +215,11 @@
CategoryList: [], CategoryList: [],
CourseRate: "", //课程等级 CourseRate: "", //课程等级
CourseSubject: "", //课程科目 CourseSubject: "", //课程科目
B2BIcon:'',//图标 B2BIcon: '', //图标
B2BBackground:'',//背景 B2BBackground: '', //背景
CourseEmphasis:[],//课程重点 多选 英文逗号分隔 CourseEmphasis: [], //课程重点 多选 英文逗号分隔
}, },
CourseEmphasis:[],//数据临时存放 CourseEmphasis: [], //数据临时存放
optionTitle: "", optionTitle: "",
defaultArray: [], defaultArray: [],
ladderPriceList: [], //阶梯定价数组 ladderPriceList: [], //阶梯定价数组
...@@ -241,7 +235,7 @@ ...@@ -241,7 +235,7 @@
modifyClassifyList: [], //修改时返回的分类列表 modifyClassifyList: [], //修改时返回的分类列表
courseLevelList: [], //课程等级列表 courseLevelList: [], //课程等级列表
courseSubjectList: [], //课程科目列表 courseSubjectList: [], //课程科目列表
keynoteList:[],//重点枚举列表 keynoteList: [], //重点枚举列表
}; };
}, },
created() { created() {
...@@ -249,7 +243,7 @@ ...@@ -249,7 +243,7 @@
this.getSaleplat(); this.getSaleplat();
this.getGoodsClassify(); this.getGoodsClassify();
this.getCourseRateList(); this.getCourseRateList();
this.getCourseEmphasisList();//获取课程重点枚举列表 this.getCourseEmphasisList(); //获取课程重点枚举列表
this.initObj(); this.initObj();
}, },
...@@ -272,8 +266,7 @@ ...@@ -272,8 +266,7 @@
return false; return false;
}, },
}), }),
mounted() { mounted() {},
},
methods: { methods: {
//根据系列改变获取所属科目 //根据系列改变获取所属科目
getCourseSubject(Id) { getCourseSubject(Id) {
...@@ -303,11 +296,11 @@ ...@@ -303,11 +296,11 @@
} }
}) })
}, },
getCourseEmphasisList(){ getCourseEmphasisList() {
getCourseEmphasisEnumList({}).then((res) => { getCourseEmphasisEnumList({}).then((res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.keynoteList = res.Data; this.keynoteList = res.Data;
this.keynoteList.map((x)=>{ this.keynoteList.map((x) => {
this.CourseEmphasis.push(x.Id) this.CourseEmphasis.push(x.Id)
}) })
} }
...@@ -345,7 +338,7 @@ ...@@ -345,7 +338,7 @@
} }
}); });
}, },
uploadFile2(files){ uploadFile2(files) {
UploadSelfFile("course", files[0], (res) => { UploadSelfFile("course", files[0], (res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.objOption.B2BIcon = res.FileUrl; this.objOption.B2BIcon = res.FileUrl;
...@@ -353,47 +346,42 @@ ...@@ -353,47 +346,42 @@
} }
}); });
}, },
ImgColor() {//获取图标上传的主色 ImgColor() { //获取图标上传的主色
let domImg = document.querySelector('#background'); let domImg = document.querySelector('#background');
let colorthief = new ColorThief(); let colorthief = new ColorThief();
domImg.addEventListener('load', () => { domImg.addEventListener('load', () => {
// console.log('加载好了并取色', colorthief.getPalette(domImg,2));//第二个参数可选(1~10) let color = colorthief.getColor(domImg, 2)
// console.log('加载好了并取色', colorthief.getColor(domImg));//第二个参数可选(1~10) this.objOption.B2BBackground = this.rgb2Hex(`RGB(${color[0]}, ${color[1]}, ${color[2]})`)
let color = colorthief.getColor(domImg,2)
this.objOption.B2BBackground = this.rgb2Hex( `RGB(${color[0]}, ${color[1]}, ${color[2]})` )
console.log(this.objOption.B2BBackground)
}) })
}, },
rgb2Hex(string){//rgb转化为16进制 rgb2Hex(string) { //rgb转化为16进制
console.log(string)
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
if(/^(rgb|RGB)/.test(string)){ if (/^(rgb|RGB)/.test(string)) {
var aColor = string.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(","); var aColor = string.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
var strHex = "#"; var strHex = "#";
for(var i=0; i<aColor.length; i++){ for (var i = 0; i < aColor.length; i++) {
var hex = Number(aColor[i]).toString(16); var hex = Number(aColor[i]).toString(16);
if(hex === "0"){ if (hex === "0") {
hex += hex; hex += hex;
} }
strHex += hex; strHex += hex;
} }
if(strHex.length !== 7){ if (strHex.length !== 7) {
strHex = string; strHex = string;
} }
return strHex; return strHex;
}else if(reg.test(string)){ } else if (reg.test(string)) {
var aNum = string.replace(/#/,"").split(""); var aNum = string.replace(/#/, "").split("");
if(aNum.length === 6){ if (aNum.length === 6) {
return string; return string;
}else if(aNum.length === 3){ } else if (aNum.length === 3) {
var numHex = "#"; var numHex = "#";
for(var i=0; i<aNum.length; i+=1){ for (var i = 0; i < aNum.length; i += 1) {
numHex += (aNum[i]+aNum[i]); numHex += (aNum[i] + aNum[i]);
} }
return numHex; return numHex;
} }
}else{ } else {
return string; return string;
} }
...@@ -456,19 +444,19 @@ ...@@ -456,19 +444,19 @@
this.objOption.IsKCourse = res.Data.IsKCourse; this.objOption.IsKCourse = res.Data.IsKCourse;
this.objOption.CourseRate = res.Data.CourseRate; this.objOption.CourseRate = res.Data.CourseRate;
this.objOption.CourseSubject = res.Data.CourseSubject; this.objOption.CourseSubject = res.Data.CourseSubject;
this.objOption.B2BIcon = res.Data.B2BIcon ; this.objOption.B2BIcon = res.Data.B2BIcon;
this.objOption.B2BBackground = res.Data.B2BBackground; this.objOption.B2BBackground = res.Data.B2BBackground;
this.CourseEmphasis=[] this.CourseEmphasis = []
setTimeout(()=>{//Todo 暂时不知道什么原因 偶尔会出现2个 所以加了一个延迟 setTimeout(() => { //Todo 暂时不知道什么原因 偶尔会出现2个 所以加了一个延迟
if(res.Data.CourseEmphasis && res.Data.CourseEmphasis!=''){ if (res.Data.CourseEmphasis && res.Data.CourseEmphasis != '') {
this.CourseEmphasis=res.Data.CourseEmphasis.split(",").map(Number) this.CourseEmphasis = res.Data.CourseEmphasis.split(",").map(Number)
}else{ } else {
this.keynoteList.map((x)=>{ this.keynoteList.map((x) => {
this.CourseEmphasis.push(x.Id) this.CourseEmphasis.push(x.Id)
}) })
} }
},100) }, 100)
if (res.Data.StepPriceList && res.Data.StepPriceList.length > 0) { if (res.Data.StepPriceList && res.Data.StepPriceList.length > 0) {
this.ladderPriceList = res.Data.StepPriceList; this.ladderPriceList = res.Data.StepPriceList;
...@@ -550,10 +538,10 @@ ...@@ -550,10 +538,10 @@
this.objOption.StepPriceList = this.ladderPriceList; this.objOption.StepPriceList = this.ladderPriceList;
this.objOption.Teacher_Ids = Teacher_Ids; this.objOption.Teacher_Ids = Teacher_Ids;
this.objOption.Saleplat = salePlat; this.objOption.Saleplat = salePlat;
if(this.CourseEmphasis.length>0){ if (this.CourseEmphasis.length > 0) {
this.objOption.CourseEmphasis = this.CourseEmphasis.join(',') this.objOption.CourseEmphasis = this.CourseEmphasis.join(',')
}else{ } else {
this.objOption.CourseEmphasis ='' this.objOption.CourseEmphasis = ''
} }
saveCourseInfo(this.objOption) saveCourseInfo(this.objOption)
.then((res) => { .then((res) => {
...@@ -641,5 +629,4 @@ ...@@ -641,5 +629,4 @@
}, },
}, },
}; };
</script> </script>
\ No newline at end of file
...@@ -81,7 +81,14 @@ ...@@ -81,7 +81,14 @@
}, },
data() { data() {
return { return {
columns: [{ columns: [
{
name: 'CustomerId',
label: '客户编号',
field: 'CustomerId',
align: 'left'
},
{
name: 'CustomerName', name: 'CustomerName',
label: '姓名', label: '姓名',
field: 'CustomerName', field: 'CustomerName',
......
...@@ -205,7 +205,6 @@ ...@@ -205,7 +205,6 @@
CustomerId: this.customerObj.CustomerId CustomerId: this.customerObj.CustomerId
}).then(res => { }).then(res => {
var tempData = res.Data; var tempData = res.Data;
console.log("tempData", tempData);
this.objOption = tempData; this.objOption = tempData;
this.AuditMsg.CustomerId = tempData.CustomerId; this.AuditMsg.CustomerId = tempData.CustomerId;
this.AuditMsg.ApproveState = tempData.ApproveState; this.AuditMsg.ApproveState = tempData.ApproveState;
......
...@@ -158,7 +158,6 @@ ...@@ -158,7 +158,6 @@
//获取国家列表 //获取国家列表
getCountryList() { getCountryList() {
queryCountryList({}).then(res => { queryCountryList({}).then(res => {
console.log("res", res);
if (res.Code == 1) { if (res.Code == 1) {
this.CountryList=res.Data; this.CountryList=res.Data;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-col-gutter-md"> <div class="col row wrap q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.TaskName" label="任务名称" /> <q-input @input="resetSearch" clearable filled v-model="msg.Description" label="关键字" />
</div> </div>
</div> </div>
</div> </div>
...@@ -82,9 +82,9 @@ ...@@ -82,9 +82,9 @@
align: 'left', align: 'left',
}, },
{ {
name: 'UpdateTime', name: 'UpdateTimeStr',
label: '更新时间', label: '更新时间',
field: 'UpdateTime', field: 'UpdateTimeStr',
align: 'left', align: 'left',
}, },
], ],
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
RebateType: 1, RebateType: 1,
Description:"",
}, },
pageCount: 0, pageCount: 0,
taskOption: null, taskOption: null,
...@@ -104,7 +105,7 @@ ...@@ -104,7 +105,7 @@
}, },
created() { created() {
if (this.$route.query && this.$route.query.CustomerId) { if (this.$route.query && this.$route.query.CustomerId) {
//this.msg.CustomerId = this.$route.query.CustomerId this.msg.CustomerId = this.$route.query.CustomerId
} }
}, },
mounted() { mounted() {
...@@ -128,7 +129,6 @@ ...@@ -128,7 +129,6 @@
getList() { getList() {
this.loading = true; this.loading = true;
GetCustomerBalanceDetailPage(this.msg).then(res => { GetCustomerBalanceDetailPage(this.msg).then(res => {
console.log(res, '数据');
this.loading = false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-col-gutter-md"> <div class="col row wrap q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.TaskName" label="任务名称" /> <q-input @input="resetSearch" clearable filled v-model="msg.Description" label="关键字" />
</div> </div>
</div> </div>
</div> </div>
...@@ -81,9 +81,9 @@ ...@@ -81,9 +81,9 @@
align: 'left', align: 'left',
}, },
{ {
name: 'UpdateTime', name: 'UpdateTimeStr',
label: '更新时间', label: '更新时间',
field: 'UpdateTime', field: 'UpdateTimeStr',
align: 'left', align: 'left',
}, },
], ],
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
RebateType: 2, RebateType: 2,
Description:"",
}, },
pageCount: 0, pageCount: 0,
taskOption: null, taskOption: null,
...@@ -103,7 +104,7 @@ ...@@ -103,7 +104,7 @@
}, },
created() { created() {
if (this.$route.query && this.$route.query.CustomerId) { if (this.$route.query && this.$route.query.CustomerId) {
//this.msg.CustomerId = this.$route.query.CustomerId this.msg.CustomerId = this.$route.query.CustomerId
} }
}, },
mounted() { mounted() {
...@@ -128,7 +129,6 @@ ...@@ -128,7 +129,6 @@
getList() { getList() {
this.loading = true; this.loading = true;
GetCustomerBalanceDetailPage(this.msg).then(res => { GetCustomerBalanceDetailPage(this.msg).then(res => {
console.log(res, '数据');
this.loading = false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment