Commit fdc06738 authored by 罗超's avatar 罗超

1

parent 27c137cb
......@@ -147,14 +147,22 @@
</div>
</q-td>
</template> -->
<template v-slot:body-cell-Money="props">
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<span v-if="props.row.PaymentWay == 6"
>星星支付:{{ props.row.TotalPoint }}</span
>
<span v-if="props.row.PaymentWay == 1"
>现金支付:{{ props.row.Money }}</span
>
<span v-if="props.row.Status===0">正常</span>
<span v-if="props.row.Status===1">删除</span>
</q-td>
</template>
<template v-slot:body-cell-OrderStatus="props">
<q-td :props="props">
<span v-if="props.row.OrderStatus===0">未支付</span>
<span v-if="props.row.OrderStatus===1">已支付</span>
</q-td>
</template>
<template v-slot:body-cell-IsApplyForCancel="props">
<q-td :props="props">
<span v-if="props.row.IsApplyForCancel===1"></span>
<span v-if="props.row.IsApplyForCancel===2"></span>
</q-td>
</template>
<!-- <template v-slot:body-cell-optioned="props">
......@@ -186,14 +194,14 @@
data: [],
loading: true,
msg: {
// pageIndex: 1,
// pageSize: 10,
LinkMan: '',
EnrollState: 1,
ActivityId: 0
pageIndex: 1,
pageSize: 10,
ActivityName:""
},
pageCount: 0,
columns: [{
columns: [
{
name: "LinkMan",
label: "联系人",
field: "LinkMan",
......@@ -206,16 +214,47 @@
align: "left"
},
{
name: "PeopleNum",
required: true,
label: "人数",
field:"PeopleNum",
name: "UnitPrice",
label: "单价",
field:"UnitPrice",
align: "left",
},
{
{
name: "Money",
label: "付款方式",
label: "应收",
field:"Money",
align: "left",
},
{
name: "Status",
label: "状态",
field:"Status",
align: "left"
},
{
name: "OrderNo",
required: true,
label: "订单号",
field:"OrderNo",
align: "left",
},
{
name: "OrderStatus",
required: true,
label: "订单状态",
field:"OrderStatus",
align: "left",
},
{
name: "PaymentTime",
label: "支付时间",
field:"PaymentTime",
align: "left"
},
{
name: " IsApplyForCancel",
label: "是否申请取消",
field:" IsApplyForCancel",
align: "left"
},
{
......@@ -224,12 +263,8 @@
field:"Remark",
align: "left"
},
{
name: "CreateTimeStr",
label: "报名时间",
field:"CreateTimeStr",
align: "left"
},
// {
// name: 'optioned',
// label: '操作',
......@@ -242,15 +277,15 @@
},
mounted() {
if(this.$route.query.Id){
this.msg.ActivityId = this.$route.query.Id;
if(this.$route.query.ActivityName){
this.msg.ActivityName = this.$route.query.name;
}
this.getList();
},
methods: {
getList(){
this.loading = true;
this.apipostDS("/api/Education/GetCommerceConsultPage",this.msg,(res)=>{
this.apipostDS("/api/Education/GetCommerceConsultAndFinancePage",this.msg,(res)=>{
this.loading = false
if(res.data.resultCode===1){
this.data = res.data.data;
......
......@@ -199,7 +199,7 @@
color="accent" style="font-weight:400" label="删除" @click="delActive(props.row)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup @click="goUrl('/activity/activeSignUpList',props.row)">
<q-item clickable v-close-popup @click="goUrl('/activity/activeSignUpList',props.row,1)">
<q-item-section>
<q-item-label>报名列表</q-item-label>
</q-item-section>
......@@ -473,13 +473,23 @@ import ActiveForm from '../../components/activity/active-from'
closeruleset() {
this.showForm = false;
},
goUrl(url,item){
this.$router.push({
goUrl(url,item,type=0){
if(type===1){
this.$router.push({
path:url,
query:{
name:item.ActivityName
}
})
}else{
this.$router.push({
path:url,
query:{
Id:item.Id
}
})
}
}
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -675,6 +675,11 @@ const routes = [{
component: () =>
import("pages/activity/materialMan.vue")
},
{
path: "/activity/payment", //活动 活动收支
component: () =>
import("pages/activity/payment.vue")
},
{
path: "/sale/appointManagement", //销售 约课管理
component: () =>
......
......@@ -83,15 +83,21 @@ export default {
let domainUrl = 'http://192.168.20.24';
let viewFileUrl = 'http://192.168.20.214:8120';
let mallUrl = "http://192.168.20.17:8014";
let vtUploadUrl = "http://192.168.20.214:8120";
let vtViewUrl = "http://192.168.20.214:8130";
let locationName = window.location.hostname;
if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com";
viewFileUrl = "http://upload.oytour.com";
mallUrl = "https://mallapi.oytour.com";
vtUploadUrl = "http://upload.oytour.com";
vtViewUrl = "https://imgfile.oytour.com";
} else if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com";
viewFileUrl = "http://upload.oytour.com";
mallUrl = "https://mallapi.oytour.com";
vtUploadUrl = "http://upload.oytour.com";
vtViewUrl = "https://imgfile.oytour.com";
}
var obj = {
//主地址
......@@ -106,7 +112,9 @@ export default {
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
//文件预览地址
ViewFileUrl: viewFileUrl,
mallUrl: mallUrl
mallUrl: mallUrl,
VTUploadUrl: vtUploadUrl,
vtViewUrl: vtViewUrl
};
return obj;
},
......@@ -390,6 +398,125 @@ export default {
});
window.open(newUrl.href, '_blank');
},
//文件类型数组
Vue.prototype.FileType = function () {
var fileTypeJson = {
//主地址npm
UserImg: "User", //用户相图片
//常用提交数据URL
GoodsImg: "Goods", //素材相关文件
SetImg: "Set", //用户相图片
Video: "Video", //视频
};
return fileTypeJson;
},
//上传文件到云存储
Vue.prototype.UploadFileToTencent = function (path, fileObj, callback) {
// debugger;
var upInfo = JSON.parse(localStorage.uploadInfo);
let maxSize = 500 * 1024
if ((fileObj.type == "image/png" || fileObj.type == "image/jpeg") && fileObj.size > maxSize) {
let that = this
lrz(fileObj, {
width: 750,
quality: 0.8
})
.then(function (rst) {
//成功时执行
var arr = rst.base64.split(',');
var mime = arr[0].match(/:(.*?);/)[1];
var bstr = atob(arr[1]);
var n = bstr.length;
var u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
var newFile = new File([u8arr], fileObj.name, {
type: mime
});
if (upInfo && upInfo.IsDefault == 1) {
if (upInfo.StoreType == 1) {
that.uploadStart(path, newFile, callback)
}
if (upInfo.StoreType == 2) {
that.uploadToAli(path, newFile, callback)
}
} else {
that.Error('请先配置上传');
}
}).catch(function (error) {
if (upInfo && upInfo.IsDefault == 1) {
if (upInfo.StoreType == 1) {
that.uploadStart(path, fileObj, callback)
}
if (upInfo.StoreType == 2) {
that.uploadToAli(path, fileObj, callback)
}
} else {
that.Error('请先配置上传');
}
}).always(function () {
//不管成功或失败,都会执行
})
} else {
if (upInfo && upInfo.IsDefault == 1) {
if (upInfo.StoreType == 1) {
this.uploadStart(path, fileObj, callback)
}
if (upInfo.StoreType == 2) {
this.uploadToAli(path, fileObj, callback)
}
} else {
this.Error('请先配置上传');
}
}
},
Vue.prototype.uploadStart = function (path, fileObj, callback) {
var upInfo = JSON.parse(localStorage.uploadInfo);
//获取文件扩展名
var filename = fileObj.name;
var index = filename.lastIndexOf(".");
var suffix = filename.substr(index);
var timestamp1 = Date.parse(new Date()) + "_" + (Math.ceil(Math.random() * 1000));
let str = '';
if (this.isOnline()) {
str = "/Test"
}
var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
var uploadMsg = {
Bucket: upInfo.Bucket,
Region: upInfo.Region,
SecretId: upInfo.SecretId,
SecretKey: upInfo.SecretKey,
};
var COS = require('cos-js-sdk-v5');
var cos = new COS({
SecretId: uploadMsg.SecretId,
SecretKey: uploadMsg.SecretKey,
});
cos.putObject({
Bucket: uploadMsg.Bucket,
Region: uploadMsg.Region, //存储桶所在地域,必须字段
Key: newFileName, //文件名
StorageClass: 'STANDARD',
Body: fileObj, // 上传文件对象
onProgress: function (progressData) { }
}, function (err, data) {
if (data && data.statusCode == 200) {
var uploadResult = {
resultCode: 1,
FileName: fileObj.name,
FileUrl: "https://" + data.Location
}
if (callback) {
callback(uploadResult);
}
} else {
/*上传文件异常*/
console.log(err || data);
}
});
},
//公用判断图片地址 判断是否包含http
Vue.prototype.getIconLink = function (url) {
let str = ''
......@@ -401,6 +528,35 @@ export default {
}
return str;
}
},
//是否是线上环境【发布时修改为true】
Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development';
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFile = function (path, file, callback) {
var that = this;
that.Info('上传中...')
var newPath = '/Upload/' + path + "/";
var formData = new FormData();
var uploadUrl = that.domainManager().VTUploadUrl + "/Upload?filePath=" + newPath + "&isCreateCover=1";
formData.append("myfile", file);
that.$http.post(uploadUrl, formData, {})
.then(res => {
if (res && res.status == 200 && res.data && res.data.FilePath) {
var uploadResult = {
resultCode: 1,
FileName: file.name,
FileUrl: that.domainManager().VTViewUrl + res.data.FilePath,
VideoCoverImg: that.domainManager().VTViewUrl + res.data.VideoCoverImg
}
if (callback) {
callback(uploadResult);
}
}
}).catch(function (reason) {
console.log(reason)
});
}
}
}
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