提交订单管理、系统配置

dev
yujialong 3 years ago
parent bf69f7ff1a
commit cb97962dda
  1. 9
      src/setting.js
  2. 4
      src/utils/api.js
  3. 15
      src/views/course/assetConfig.vue
  4. 660
      src/views/order/AddOrder.vue
  5. 211
      src/views/order/Order.vue
  6. 1
      src/views/serve/Configure.vue

@ -3,19 +3,18 @@
* */
const url = location.host;
const isDev = process.env.NODE_ENV === 'development'; // 开发环境
const isTest = url.includes('10.196.131.73'); //测试服
const isTest = url.includes('39.108.250.202'); //测试服
const isPro = url.includes('120.78.127.12'); //正式服
let jumpPath = "";
let host = "";
if (isDev) {
jumpPath = "http://192.168.31.154:8087/";
// host = 'http://192.168.31.216:9000'// 榕
host = 'http://192.168.31.125:9000'// 坤
// host = 'http://192.168.31.137:9000'// 陈
// host = 'http://192.168.31.125:9000'// 坤
host = 'http://192.168.31.137:9000'//
} else if (isTest) {
jumpPath = "";
jumpPath = "http://39.108.250.202/judgmentPoint/";
host = "http://39.108.250.202:9000";
} else if (isPro) {
jumpPath = "";

@ -1,9 +1,7 @@
import Setting from '@/setting';
// let host = Setting.host;
let host = Setting.host;
let uploadURL = "http://8.134.8.197:8001";
let host = "http://192.168.31.151:9000"; // 榕
export default {
logins: `${host}/users/users/user/login`, //登录

@ -262,7 +262,7 @@ export default {
getData() {
this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`)
.then(res => {
this.chapters = res.data.chapterList;
this.chapters = res.chapterList;
})
.catch(err => {
@ -324,11 +324,12 @@ export default {
);
},
uploadSuccess(res, file, fileList) {
console.log(res);
this.uploading = false;
this.fileId = res.data.filesResult.fileId;
this.fileType = res.data.filesResult.fileType;
this.fileUrl = res.data.filesResult.fileUrl;
this.fileName = res.data.filesResult.ossFileName;
this.fileId = res.filesResult.fileId;
this.fileType = res.filesResult.fileType;
this.fileUrl = res.filesResult.fileUrl;
this.fileName = res.filesResult.ossFileName;
},
uploadError(err, file, fileList) {
this.$message({
@ -476,7 +477,7 @@ export default {
preview(row) {
if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth;
this.playAuth = res.playAuth;
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
@ -518,7 +519,7 @@ export default {
this.isWord = false;
this.isExcel = false;
}
this.iframeSrc = res.data.previewUrl;
this.iframeSrc = res.previewUrl;
this.$nextTick(() => {
this.iframeOnload();
});

File diff suppressed because it is too large Load Diff

@ -12,35 +12,44 @@
<el-form label-width="80px">
<el-col :span="5">
<el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity()" @clear="clearprovince()">
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
<el-select v-model="form.provinces" clearable placeholder="请选择省份"
@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-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="getData()">
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
<el-select v-model="form.city" clearable placeholder="请选择城市"
:disabled="form.provinces ? false : true" @change="getData()">
<el-option v-for="(item,index) in cityList" :key="index"
:label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="订单类型">
<el-select v-model="form.orderType" clearable placeholder="请选择订单类型" @change="getData()">
<el-option v-for="(item,index) in orderTypeList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-select v-model="form.orderType" clearable placeholder="请选择订单类型"
@change="getData()">
<el-option v-for="(item,index) in orderTypeList" :key="index"
:label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="订单状态">
<el-select v-model="form.orderStatus" clearable placeholder="请选择订单状态" @change="getData()">
<el-option v-for="(item,index) in orderStatusList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-select v-model="form.orderStatus" clearable placeholder="请选择订单状态"
@change="getData()">
<el-option v-for="(item,index) in orderStatusList" :key="index"
:label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-input placeholder="请输入订单号/客户名称/订单名称" prefix-icon="el-icon-search" v-model="keyword" @keyup.enter.native="onSearch" clearable></el-input>
<el-input placeholder="请输入订单号/客户名称/订单名称" prefix-icon="el-icon-search"
v-model="keyword" @keyup.enter.native="onSearch" clearable></el-input>
</el-form-item>
</el-col>
</el-form>
@ -57,12 +66,15 @@
<span>订单列表</span>
</div>
<div>
<el-button type="primary" size="small" round class="mag" @click="addOrder()">新建订单</el-button>
<el-button type="primary" size="small" round class="mag" @click="addOrder()">新建订单
</el-button>
<el-button type="primary" size="small" round @click="delAllSelection">批量删除</el-button>
</div>
</div>
<el-table :data="orderData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table :data="orderData" class="table" stripe header-align="center"
@selection-change="handleSelectionChange" :row-key="getRowKeys">
<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>
<el-table-column prop="orderNumber" label="订单编号" align="center">
@ -83,15 +95,20 @@
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.isDel!==1" @click="handle('edit',scope.row)">{{scope.row.orderStatus==='已完成'?'修改':'处理'}}</el-button>
<el-button type="text" v-if="scope.row.isDel!==1" @click="handle('edit',scope.row)">
{{ scope.row.orderStatus === "已完成" ? "修改" : "处理" }}
</el-button>
<el-button type="text" @click="handle('watch',scope.row)">查看</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-button type="text" v-if="scope.row.orderStatus==='已完成'&&scope.row.isDel!==1" @click="handle('renew',scope.row)">续费</el-button>
<el-button type="text" v-if="scope.row.orderStatus==='已完成'&&scope.row.isDel!==1"
@click="handle('renew',scope.row)">续费
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange" :current-page="pageNo" :total="totals">
<el-pagination background layout="total, prev, pager, next"
@current-change="handleCurrentChange" :current-page="pageNo" :total="totals">
</el-pagination>
</div>
</el-card>
@ -105,170 +122,176 @@ export default {
data() {
return {
form: {
provinces: '',
city: '',
orderType: '',
orderStatus: ''
provinces: "",
city: "",
orderType: "",
orderStatus: ""
},
keyword: '',
orderData:[],
keyword: "",
orderData: [],
multipleSelection: [],
provinceList: this.$store.state.provinceList,
cityList: [],
orderTypeList: [{
name: '正式',
name: "正式",
value: 1
},
{
name: '试用',
name: "试用",
value: 2
}],
orderStatusList: [{
name: '待发货',
name: "待发货",
value: 0
},
{
name: '已完成',
name: "已完成",
value: 1
},
{
name: '已取消',
name: "已取消",
value: 2
}],
pageNo: 1,
pageSize: 10,
totals: 1,
setTime:'',
setTime: ""
};
},
watch: {
keyword: function(val) {
clearTimeout(this.setTime)
this.setTime = setTimeout(()=>{
this.onSearch()
},500)
},
clearTimeout(this.setTime);
this.setTime = setTimeout(() => {
this.onSearch();
}, 500);
}
},
created() {
this.getData()
this.getData();
},
methods: {
test(val){
if(val.length>5){
val = 5
test(val) {
if (val.length > 5) {
val = 5;
}
},
getData() {
let data = {
cityId: this.form.city,
customerName:this.keyword,
customerName: this.keyword,
orderStatus: this.form.orderStatus,
orderType: this.form.orderType,
pageNo: this.pageNo,
pageSize: this.pageSize,
provinceId: this.form.provinces,
}
this.$post(this.api.orderList,data).then(res => {
provinceId: this.form.provinces
};
this.$post(this.api.orderList, data).then(res => {
res.orderPage.orders.forEach(e => {
e.orderType = this.orderTypeFn(e.orderType)
e.orderStatus = this.orderStatusFn(e.orderStatus)
e.orderNature = this.orderNatureFn(e.orderNature)
})
this.orderData = res.orderPage.orders
this.totals =res.orderPage.total
}).catch(res => {});
e.orderType = this.orderTypeFn(e.orderType);
e.orderStatus = this.orderStatusFn(e.orderStatus);
e.orderNature = this.orderNatureFn(e.orderNature);
});
this.orderData = res.orderPage.orders;
this.totals = res.orderPage.total;
}).catch(res => {
});
},
//
clearprovince(){
this.form.city = ''
clearprovince() {
this.form.city = "";
},
//
getCity(){
this.clearprovince()
this.getCityData()
this.pageNo = 1
this.getData()
getCity() {
this.clearprovince();
this.getCityData();
this.pageNo = 1;
this.getData();
},
getCityData(){
getCityData() {
let data = {
provinceId: this.form.provinces
}
this.$get(this.api.queryCity,data).then(res => {
this.cityList = res.list
}).catch(res => {});
};
this.$get(this.api.queryCity, data).then(res => {
this.cityList = res.list;
}).catch(res => {
});
},
addOrder(){
this.$store.commit("systemData", { order_id : ''});
this.$router.push('/addorder');
addOrder() {
this.$store.commit("systemData", { order_id: "" });
this.$router.push("/addorder");
},
handle(val,row){
this.$router.push('/addorder?'+val+'='+row.orderId);
handle(val, row) {
this.$router.push("/addorder?" + val + "=" + row.orderId);
},
//
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
var arr = []
arr.push(row.orderId)
this.$post(this.api.orderDelete,{ids:arr}).then(res => {
this.$message.success('删除成功');
this.getData()
}).catch(res => {});
var arr = [];
arr.push(row.orderId);
this.$post(this.api.orderDelete, { ids: arr }).then(res => {
this.$message.success("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {});
.catch(() => {
});
},
//
handleRenew(row){
handleRenew(row) {
},
getRowKeys(row) {
return row.orderId;
},
handleSelectionChange(val) {
if(val.length>0){
this.multipleSelection = val.map(e=>e.orderId);
}else{
this.multipleSelection = []
if (val.length > 0) {
this.multipleSelection = val.map(e => e.orderId);
} else {
this.multipleSelection = [];
}
},
delAllSelection() {
if(this.multipleSelection.length != ''){
if (this.multipleSelection.length != "") {
//
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(this.api.orderDelete,{ids:this.multipleSelection}).then(res => {
this.$post(this.api.orderDelete, { ids: this.multipleSelection }).then(res => {
this.multipleSelection = [];
this.$message.success('删除成功');
this.getData()
}).catch(err => {});
}).catch(err => {});
}else{
this.$message.error('请先选择订单 !');
this.$message.success("删除成功");
this.getData();
}).catch(err => {
});
}).catch(err => {
});
} else {
this.$message.error("请先选择订单 !");
}
},
onSearch(){
this.pageNo = 1
this.getData()
onSearch() {
this.pageNo = 1;
this.getData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
},
//
gotoClient(){
this.$router.push('')
gotoClient() {
this.$router.push("");
}
}
};
</script>
<style scoped>
.mag{
.mag {
margin-right: 20px;
}
</style>

@ -188,6 +188,7 @@ export default {
this.$router.push(`/projectList/?systemId=${row.systemId}&show=1`)
},
getIntoJudgement(row) {
// console.log(`${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`);
location.href = `${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`;
},
setCookie(name, value) {

Loading…
Cancel
Save