提交订单管理、系统配置

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. 726
      src/views/order/AddOrder.vue
  5. 237
      src/views/order/Order.vue
  6. 1
      src/views/serve/Configure.vue

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

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

@ -262,7 +262,7 @@ export default {
getData() { getData() {
this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`) this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`)
.then(res => { .then(res => {
this.chapters = res.data.chapterList; this.chapters = res.chapterList;
}) })
.catch(err => { .catch(err => {
@ -324,11 +324,12 @@ export default {
); );
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
console.log(res);
this.uploading = false; this.uploading = false;
this.fileId = res.data.filesResult.fileId; this.fileId = res.filesResult.fileId;
this.fileType = res.data.filesResult.fileType; this.fileType = res.filesResult.fileType;
this.fileUrl = res.data.filesResult.fileUrl; this.fileUrl = res.filesResult.fileUrl;
this.fileName = res.data.filesResult.ossFileName; this.fileName = res.filesResult.ossFileName;
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.$message({ this.$message({
@ -476,7 +477,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 {
@ -518,7 +519,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

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

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

Loading…
Cancel
Save