商城联调

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/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/'
// 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/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

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

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

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

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