|
@@ -925,7 +925,7 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
- @opened="prepareEnd"
|
|
|
+ @opened="prepareEnd"
|
|
|
:visible.sync="dialogVisibleTableBoxs2"
|
|
|
width="800px"
|
|
|
:show-close="false"
|
|
@@ -1314,6 +1314,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
+ <search-box-new
|
|
|
+ ref="searchBox"
|
|
|
+ :formData="formDataBK"
|
|
|
+ :formList="formListBK"
|
|
|
+ @search="getGoodsList(1)"
|
|
|
+ @init="getGoodsList(2)"
|
|
|
+ />
|
|
|
<el-table
|
|
|
ref="multipleTable"
|
|
|
:data="goodsList"
|
|
@@ -1345,14 +1352,24 @@
|
|
|
header-align="center"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row[item.prop] }}</span></template
|
|
|
+ <span v-if="item.scope === 'status'">{{
|
|
|
+ scope.row[item.prop] === 1 ? "上架" : "未上架"
|
|
|
+ }}</span>
|
|
|
+ <span v-else-if="item.scope === 'status1'">{{
|
|
|
+ scope.row[item.prop] === 1 ? "有效" : "无效"
|
|
|
+ }}</span>
|
|
|
+ <span v-else-if="item.scope === 'times'">
|
|
|
+ {{ $methodsTools.onlyForma(scope.row[item.prop1]) }} -
|
|
|
+ {{ $methodsTools.onlyForma(scope.row[item.prop2]) }}
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ scope.row[item.prop] }}</span></template
|
|
|
>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
:total="total5"
|
|
|
- :pageSize="formData.pageSize"
|
|
|
- :currentPage="formData.pageNum"
|
|
|
+ :pageSize="formDataBK.pageSize"
|
|
|
+ :currentPage="formDataBK.pageNum"
|
|
|
@handleSizeChange="handleSizeChange5"
|
|
|
@handleCurrentChange="handleCurrentChange5"
|
|
|
/>
|
|
@@ -1637,14 +1654,36 @@ export default {
|
|
|
{
|
|
|
label: "商品编码",
|
|
|
prop: "code",
|
|
|
+ width: "140px",
|
|
|
},
|
|
|
{
|
|
|
label: "商品名称",
|
|
|
prop: "goodsName",
|
|
|
+ width: "260px",
|
|
|
},
|
|
|
{
|
|
|
label: "标准价格(¥)",
|
|
|
prop: "standPrice",
|
|
|
+ width: "140px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商品状态",
|
|
|
+ prop: "status",
|
|
|
+ scope: "status1",
|
|
|
+ width: "110px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商品有效期",
|
|
|
+ prop1: "validityStartTime",
|
|
|
+ prop2: "validityEndTime",
|
|
|
+ scope: "times",
|
|
|
+ width: "310px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商品可售状态",
|
|
|
+ prop: "goodsStatus",
|
|
|
+ scope: "status",
|
|
|
+ width: "130px",
|
|
|
},
|
|
|
],
|
|
|
total5: 0,
|
|
@@ -1670,6 +1709,19 @@ export default {
|
|
|
placeholder: "请输入讲义标题/讲义编码",
|
|
|
},
|
|
|
],
|
|
|
+ formListBK: [
|
|
|
+ {
|
|
|
+ prop: "searchKey",
|
|
|
+ placeholder: "请输入商品编码/商品名称",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ formDataBK: {
|
|
|
+ searchKey: "",
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ educationTypeId: "",
|
|
|
+ businessId: "",
|
|
|
+ },
|
|
|
// 视频商品表格数据------------------------------------------------------------------------start
|
|
|
tableSetTSB: [
|
|
|
{ label: "排序", prop: "sort", scope: "inputs", width: "100" },
|
|
@@ -1747,7 +1799,7 @@ export default {
|
|
|
aboutJYBox: false,
|
|
|
jYtableSet: [
|
|
|
{ label: "讲义编码", prop: "encoder", width: "150px" },
|
|
|
- { label: "讲义标题", prop: "handoutsName"},
|
|
|
+ { label: "讲义标题", prop: "handoutsName" },
|
|
|
// {
|
|
|
// label: "适合业务层级",
|
|
|
// prop: "courseHandoutsBusinessVo",
|
|
@@ -1756,8 +1808,13 @@ export default {
|
|
|
// prop3: "businessName",
|
|
|
// scope: "eduType",
|
|
|
// },
|
|
|
- { label: "是否可下载", prop: "canDownload", scope: "canDownload",width:"140px" },
|
|
|
- { label: "发布状态", prop: "status", scope: "Status",width:"140px" },
|
|
|
+ {
|
|
|
+ label: "是否可下载",
|
|
|
+ prop: "canDownload",
|
|
|
+ scope: "canDownload",
|
|
|
+ width: "140px",
|
|
|
+ },
|
|
|
+ { label: "发布状态", prop: "status", scope: "Status", width: "140px" },
|
|
|
],
|
|
|
jYtableData: [],
|
|
|
jYactiveBoxs: false,
|
|
@@ -1984,21 +2041,34 @@ export default {
|
|
|
this.goodsNames = "";
|
|
|
this.goodsCode = "";
|
|
|
},
|
|
|
- getGoodsList() {
|
|
|
+ getGoodsList(int) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
if (!this.listData.businessId) {
|
|
|
this.$message.warning("请先选择业务层次");
|
|
|
return;
|
|
|
} else {
|
|
|
- this.formData.businessId = this.listData.businessId;
|
|
|
+ this.formDataBK.businessId = this.listData.businessId;
|
|
|
}
|
|
|
if (this.listData.goodsType === 3) {
|
|
|
- this.formData.filtration = 2;
|
|
|
+ this.formDataBK.filtration = 2;
|
|
|
}
|
|
|
if (this.listData.goodsType === 4) {
|
|
|
- this.formData.filtration = 1;
|
|
|
+ this.formDataBK.filtration = 1;
|
|
|
+ }
|
|
|
+ if (int === 1) {
|
|
|
+ this.formDataBK.pageNum = 1;
|
|
|
}
|
|
|
- this.$api.inquireGoodslistGoods(this.formData).then((res) => {
|
|
|
+ if (int === 2) {
|
|
|
+ this.formDataBK.searchKey = "";
|
|
|
+ this.formDataBK.pageNum = 1;
|
|
|
+ }
|
|
|
+ if (int === 3) {
|
|
|
+ this.formDataBK.searchKey = "";
|
|
|
+ this.formDataBK.pageNum = 1;
|
|
|
+ this.formDataBK.pageSize = 10;
|
|
|
+ }
|
|
|
+ var data = JSON.parse(JSON.stringify(this.formDataBK));
|
|
|
+ this.$api.inquireGoodslistGoods(data).then((res) => {
|
|
|
for (let i = 0; i < res.rows.length; i++) {
|
|
|
if (res.rows[i].goodsId === this.getNewGoodsId) {
|
|
|
res.rows[i].goodsStatus = 1;
|
|
@@ -2011,16 +2081,16 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleSizeChange5(v) {
|
|
|
- this.formData.pageSize = v;
|
|
|
- this.formData.pageNum = 1;
|
|
|
+ this.formDataBK.pageSize = v;
|
|
|
+ this.formDataBK.pageNum = 1;
|
|
|
this.getGoodsList();
|
|
|
},
|
|
|
handleCurrentChange5(v) {
|
|
|
- this.formData.pageNum = v;
|
|
|
+ this.formDataBK.pageNum = v;
|
|
|
this.getGoodsList();
|
|
|
},
|
|
|
async goToActiveGoods() {
|
|
|
- await this.getGoodsList();
|
|
|
+ await this.getGoodsList(3);
|
|
|
this.goodsId = this.listData.makeGoodsId;
|
|
|
this.goodsNames = this.listData.makeGoodsName;
|
|
|
this.goodsCode = this.listData.makeGoodsCode;
|
|
@@ -2930,7 +3000,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
prepareEnd() {
|
|
|
- this.$refs.searchBox.changeEducationType(this.listData.educationTypeId,true);
|
|
|
+ this.$refs.searchBox.changeEducationType(
|
|
|
+ this.listData.educationTypeId,
|
|
|
+ true
|
|
|
+ );
|
|
|
},
|
|
|
submitTab() {
|
|
|
if (this.activeLists.length === 0) {
|
|
@@ -3364,7 +3437,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.checkBix{
|
|
|
+.checkBix {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
}
|