商城联调

dev_202304
yujialong 2 years ago
parent 8229dd1904
commit 247ab13e91
  1. 2
      src/setting.js
  2. 2
      src/utils/api.js
  3. 62
      src/views/order/AddOrder.vue
  4. 15
      src/views/shop/addProduct/index.vue
  5. 8
      src/views/shop/list/market/index.vue
  6. 170
      src/views/shop/list/product/index.vue

@ -11,7 +11,7 @@ if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/' host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/' // host = 'https://huorantech.cn/'
// host = 'http://192.168.31.151:9000/'// 榕 host = 'http://192.168.31.151:9000/'// 榕
host = 'http://192.168.31.116:9000/'// 赓 host = 'http://192.168.31.116:9000/'// 赓
} else if (isPro) { } else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/' jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

@ -452,6 +452,7 @@ export default {
detailsOfGoods: `nakadai/mall/detailsOfGoods`, detailsOfGoods: `nakadai/mall/detailsOfGoods`,
renewalOfGoods: `nakadai/mall/renewalOfGoods`, renewalOfGoods: `nakadai/mall/renewalOfGoods`,
goodsOffTheShelf: `nakadai/mall/goodsOffTheShelf`, goodsOffTheShelf: `nakadai/mall/goodsOffTheShelf`,
goodsSelection: `nakadai/mall/goodsSelection`,
// 营销推广 // 营销推广
delMarketing: `nakadai/nakadai/mall/marketing/promotion/batchDeletion`, delMarketing: `nakadai/nakadai/mall/marketing/promotion/batchDeletion`,
@ -459,4 +460,5 @@ export default {
listMarketing: `nakadai/nakadai/mall/marketing/promotion/pagingQueryList`, listMarketing: `nakadai/nakadai/mall/marketing/promotion/pagingQueryList`,
saveMarketing: `nakadai/nakadai/mall/marketing/promotion/save`, saveMarketing: `nakadai/nakadai/mall/marketing/promotion/save`,
updateMarketing: `nakadai/nakadai/mall/marketing/promotion/update`, updateMarketing: `nakadai/nakadai/mall/marketing/promotion/update`,
bannerEnableOrDisable: `nakadai/nakadai/mall/marketing/promotion/bannerEnableOrDisable`,
}; };

@ -113,7 +113,7 @@
<div class="flex-between mgb20 user_header"> <div class="flex-between mgb20 user_header">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>课程权限</span> <span>实训课程产品权限</span>
</div> </div>
<div> <div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 --> <!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
@ -270,7 +270,7 @@
<div class="flex-between mgb20 user_header"> <div class="flex-between mgb20 user_header">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>数据平台权限</span> <span>数据前瞻平台权限</span>
</div> </div>
<div> <div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 --> <!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
@ -448,7 +448,7 @@
<div class="flex-between mgb20 user_header"> <div class="flex-between mgb20 user_header">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>职站增值模块权限</span> <span>职站增值应用产品权限</span>
</div> </div>
<div> <div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 --> <!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
@ -703,14 +703,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="180"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex-c-c"> <div class="flex-c-c">
<!-- <el-button <el-button
type="text" type="text"
@click="delPracticalCourses(scope.$index)" @click="showShip(scope.row)"
style="margin-right:10px;" >编辑发货内容</el-button>
>删除</el-button> -->
<el-button <el-button
v-if="!editDisabled&&!viewDisabled" v-if="!editDisabled&&!viewDisabled"
type="text" type="text"
@ -1084,20 +1083,11 @@
align="center"></el-table-column> align="center"></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="curriculumName" label="产品名称" align="center"> <el-table-column prop="productName" label="产品名称" align="center"></el-table-column>
</el-table-column> <el-table-column prop="typeName" label="产品类型" align="center"></el-table-column>
<el-table-column label="产品类型" align="center"> <el-table-column prop="supplierName" label="厂商" align="center"></el-table-column>
<template slot-scope="scope"> <el-table-column prop="expectedCourse" label="专业类" align="center"></el-table-column>
<span>{{ curriculumTypeKeys[scope.row.curriculumType] }}</span> <el-table-column prop="expectedCourse" label="专业" align="center"></el-table-column>
</template>
</el-table-column>
<el-table-column label="配置的实训应用" align="center">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sysName }}</span>
</template>
</el-table-column>
<el-table-column prop="expectedCourse" label="预计课时" align="center">
</el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="practicalCourseTotals" <el-pagination background layout="total, prev, pager, next" :total="practicalCourseTotals"
@ -2184,20 +2174,16 @@ export default {
this.practicalCourseVisible = true; this.practicalCourseVisible = true;
this.getPracticalCourses(); this.getPracticalCourses();
}, },
// //
getPracticalCourses() { getPracticalCourses() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
let param = {
pageSize: 10,
pageNum: this.practicalCoursePage,
isShelves: 1, //
curriculumName: this.practicalCourseName,
supplierId: sid ? sid.supplierId : ''
};
this.dataLoading = true; this.dataLoading = true;
this.$post(this.api.curriculumList, param).then(res => { this.$post(this.api.listOfGoods, {
this.practicalCourseList = res.page.records; pageNum: this.practicalCoursePage,
this.practicalCourseTotals = res.page.total; pageSize: 10,
isShelves: 0
}).then(({ page }) => {
this.practicalCourseList = page.records;
this.practicalCourseTotals = page.total;
this.dataLoading = false; this.dataLoading = false;
}).catch(err => { }).catch(err => {
this.dataLoading = false; this.dataLoading = false;
@ -2223,14 +2209,14 @@ export default {
const { orderType } = this.form const { orderType } = this.form
let fn = function(e) { let fn = function(e) {
let obj = { let obj = {
dataOrCourseId: e.cid,// id dataOrCourseId: e.mallId,// id
productName: e.curriculumName,// productName: e.productName,//
periodOfUse: "",// 使 periodOfUse: "",// 使
startTime: new Date(),// startTime: new Date(),//
endTime: "", // endTime: "", //
remainingPeriod: "",// remainingPeriod: "",//
marketValue: '', // marketValue: '', //
marketPrice: e.marketPrice, // marketPrice: '', //
finalPrice: orderType === 2 ? 0 : '',// finalPrice: orderType === 2 ? 0 : '',//
discountRate: "",// discountRate: "",//
accountNum: "",// accountNum: "",//
@ -2468,7 +2454,7 @@ export default {
if(row.ship === 1) { if(row.ship === 1) {
row.isEnable = 1 row.isEnable = 1
} }
if (type == 3 && row.ship) this.shipVisible = true // if (type == 3 && row.ship) this.showShip(row) //
}, },
// 0 // 0
handleNaN(val) { handleNaN(val) {

@ -535,7 +535,8 @@ export default {
curriculumType: active, curriculumType: active,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : '' supplierId: sid ? sid.supplierId : '',
isShelves: 1
}).then(({ page }) => { }).then(({ page }) => {
this.products = page.records this.products = page.records
this.total = page.total this.total = page.total
@ -545,7 +546,8 @@ export default {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
productName: keyword, productName: keyword,
supplierId: '1' supplierId: '1',
status: 1
}).then(res => { }).then(res => {
const list = res.pageList.records const list = res.pageList.records
list.forEach(e => { list.forEach(e => {
@ -569,6 +571,8 @@ export default {
}, },
// //
tabChange(i) { tabChange(i) {
this.page = 1
this.productKeyword = ''
this.productActive = i this.productActive = i
this.getProduct() this.getProduct()
}, },
@ -773,10 +777,9 @@ export default {
}, },
// //
getSubject() { getSubject() {
this.$get(this.api.courseDiscipline).then(res => { this.$get(this.api.courseDiscipline).then(res => {
this.subjectList = res.list; this.subjectList = res.list;
}).catch(err => { }).catch(err => {})
});
}, },
// //
clearClass(item) { clearClass(item) {

@ -154,13 +154,7 @@ export default {
}); });
}, },
switchOff(val, row) { switchOff(val, row) {
this.$post(this.api.disabledTheoreticalCourse, { this.$post(`${this.api.bannerEnableOrDisable}?id=${row.id}&isDisable=${row.isOpen}`).then(res => {}).catch(err => {})
courseId: row.id,
isOpen: val,
type: 0 // (01)
}).then(res => {
val == 1 ? util.warningMsg('禁用成功') : util.successMsg('启用成功')
}).catch(err => {})
} }
} }
}; };

@ -5,27 +5,42 @@
<ul class="filter" style="align-items: flex-start"> <ul class="filter" style="align-items: flex-start">
<li> <li>
<label>学科类</label> <label>学科类</label>
<el-select v-model="form.visibleRange" clearable placeholder="请选择可见范围" @change="getData"> <el-select v-model="form.categoryId" clearable
<el-option v-for="(item,index) in regions" :key="index" :label="item.name" :value="item.id"></el-option> @change="getProfessionalClass()" @clear="clearClass()">
<el-option v-for="(item,index) in subjectList" :key="index"
:label="item.disciplineName"
:value="item.disciplineId"></el-option>
</el-select>
</li>
<li>
<label>专业类</label>
<el-select v-model="form.professionalCategoryId" clearable
:disabled="form.categoryId ? false : true"
@change="getProfessional" @clear="clearProfess()">
<el-option v-for="(item,index) in professionalClassList" :key="index"
:label="item.professionalClassName"
:value="item.professionalClassId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>专业</label> <label>专业</label>
<el-select v-model="form.categoryId" clearable placeholder="请选择课程分类" @change="getData"> <el-select v-model="form.professionalId" clearable
<el-option label="不限" value=""></el-option> :disabled="form.professionalCategoryId ? false : true"
<el-option label="暂无分类" value="0"></el-option> @change="initData">
<el-option v-for="(item,index) in classificationList" :key="index" :label="item.classificationName" :value="item.id"></el-option> <el-option v-for="(item,index) in professionalList" :key="index"
:label="item.professionalName"
:value="item.professionalId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>产品分类</label> <label>产品分类</label>
<el-select v-model="form.courseType" clearable placeholder="请选择课程类型" @change="getData"> <el-select v-model="form.productClassification" clearable placeholder="请选择产品分类" @change="initData">
<el-option v-for="(item,index) in types" :key="index" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item, i) in productCategoryList" :key="i" :label="item.classificationName" :value="item.classificationId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入" suffix-icon="el-icon-search" v-model="keyword" clearable size="small"></el-input> <el-input placeholder="请输入" suffix-icon="el-icon-search" v-model="form.productName" clearable size="small"></el-input>
</li> </li>
</ul> </ul>
<div> <div>
@ -52,7 +67,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="courseName" label="订单量" min-width="150" align="center"></el-table-column> <el-table-column prop="courseName" label="订单量" min-width="150" align="center"></el-table-column>
<el-table-column prop="userName" label="最近编辑人" min-width="150" align="center"></el-table-column> <el-table-column prop="userName" label="最近编辑人" min-width="150" align="center"></el-table-column>
<el-table-column prop="courseName" label="精选" min-width="150" align="center"></el-table-column> <el-table-column prop="courseName" label="精选" min-width="150" align="center">
<template slot-scope="scope">
<i :class="['icon', scope.row.selected ? 'el-icon-check' : 'el-icon-close']" @click="selected(scope.row)"></i>
</template>
</el-table-column>
<el-table-column label="上架/下架" align="center"> <el-table-column label="上架/下架" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
@ -85,52 +104,26 @@ export default {
data() { data() {
return { return {
timer: null, timer: null,
regionName: ['本校内', '全平台可见', '指定院校区域'],
regions: [
{
id: '',
name: '不限'
},
{
id: 1,
name: '全平台'
},
{
id: 2,
name: '指定院校区域'
}
],
types: [
{
id: '',
name: '不限'
},
{
id: 1,
name: '付费'
},
{
id: 0,
name: '免费'
}
],
form: { form: {
visibleRange: '',
categoryId: '', categoryId: '',
courseType: '' productClassification: '',
productName: '',
professionalCategoryId: '',
professionalId: '',
}, },
keyword: "", subjectList: [], //
classificationId: "", professionalClassList: [], //
professionalList: [], //
productCategoryList: [],
list: [], list: [],
multipleSelection: [], multipleSelection: [],
classificationList: [],
page: +this.$route.query.page || 1, // page: +this.$route.query.page || 1, //
pageSize: 10, pageSize: 10,
total: 0 total: 0
}; };
}, },
watch: { watch: {
keyword: function(val) { 'form.productName': function(val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -138,17 +131,15 @@ export default {
} }
}, },
mounted() { mounted() {
this.getClassification(); this.getSubject()
this.initData(); this.getCategory()
this.initData()
}, },
methods: { methods: {
getData() { getData() {
this.$post(this.api.listOfGoods, { this.$post(this.api.listOfGoods, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
// keyWord: this.keyword,
// createPlatform: 0,
// platformSource: Setting.platformSource,
...this.form ...this.form
}).then(({ page }) => { }).then(({ page }) => {
this.list = page.records; this.list = page.records;
@ -160,24 +151,61 @@ export default {
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
getClassification() {
this.$post(this.api.listClassification, {
pageNum: 1, //
pageSize: 1000, getCategory() {
platformSource: Setting.platformSource this.$get(this.api.productCategoryList).then(res => {
}).then(({ page }) => { this.productCategoryList = res.classificationList
this.classificationList = page.records }).catch(err => {})
}).catch(res => {}) },
}, //
changeType(type) { getSubject() {
this.classificationId = type; this.$get(this.api.courseDiscipline).then(res => {
this.subjectList = res.list;
}).catch(err => {
});
},
//
clearClass() {
this.form.professionalCategoryId = "";
this.form.professionalId = "";
},
//
getProfessionalClass() {
this.clearClass();
this.getProfessionalClassData();
this.page = 1;
this.initData(); this.initData();
}, },
preview(row) { getProfessionalClassData() {
this.$router.push(`/previewTheoreticalCourse?id=${row.id}`); let data = {
disciplineId: this.form.categoryId
};
this.$get(this.api.courseProfessionalClass, data).then(res => {
this.professionalClassList = res.list;
}).catch(err => {
});
},
//
clearProfess() {
this.form.professionalId = "";
},
//
getProfessional() {
this.clearProfess();
this.getProfessionalData();
this.page = 1;
this.initData();
}, },
config(row) { getProfessionalData() {
this.$router.push(`/setTheoreticalCourse?id=${row.id}`); let data = {
professionalClassId: this.form.professionalCategoryId
};
this.$get(this.api.courseProfessional, data).then(res => {
this.professionalList = res.list;
}).catch(err => {
});
}, },
addCourse() { addCourse() {
this.$router.push("/shop/addProduct"); this.$router.push("/shop/addProduct");
@ -233,9 +261,14 @@ export default {
changeSwitch(value, row) { changeSwitch(value, row) {
this.$post(`${this.api.goodsOffTheShelf}?mallId=${row.mallId}&isShelves=${value}`).then((res) => { this.$post(`${this.api.goodsOffTheShelf}?mallId=${row.mallId}&isShelves=${value}`).then((res) => {
this.getData(); this.getData();
this.$message.success("修改上下架状态成功!");
}).catch((res) => { }).catch((res) => {
}); });
},
//
selected(row) {
this.$post(`${this.api.goodsSelection}?mallId=${row.mallId}&selected=${row.selected ? 0 : 1}`).then((res) => {
this.getData();
}).catch((res) => {})
} }
} }
}; };
@ -249,4 +282,9 @@ export default {
} }
} }
} }
.icon {
font-size: 16px;
color: #9076FF;
cursor: pointer;
}
</style> </style>
Loading…
Cancel
Save