|
@@ -558,8 +558,18 @@
|
|
|
<el-button type="primary" @click="submit('listData', 1)" size="mini"
|
|
|
>保存</el-button
|
|
|
>
|
|
|
- <el-button type="primary" @click="submit('listData', 2)" size="mini"
|
|
|
- >上架</el-button
|
|
|
+ <el-button
|
|
|
+ v-if="listData.goodsStatus !== 0 || listData.goodsStatus !== 1"
|
|
|
+ type="primary"
|
|
|
+ @click="submit('listData', 2)"
|
|
|
+ size="mini"
|
|
|
+ >{{
|
|
|
+ listData.goodsStatus === 0
|
|
|
+ ? "上架"
|
|
|
+ : listData.goodsStatus === 1
|
|
|
+ ? "下架"
|
|
|
+ : "未知"
|
|
|
+ }}</el-button
|
|
|
>
|
|
|
</div>
|
|
|
<el-dialog
|
|
@@ -1380,9 +1390,10 @@ export default {
|
|
|
search() {
|
|
|
this.$api.obtainGoods(this.$route.query.id).then((res) => {
|
|
|
res.data.standPriceJson = JSON.parse(res.data.standPriceJson);
|
|
|
- if (res.data.auditionList && res.data.goodsType == 1) {
|
|
|
+ if (res.data.goodsAuditionConfig && res.data.goodsType == 1) {
|
|
|
+ var goodsAuditionConfig = JSON.parse(res.data.goodsAuditionConfig);
|
|
|
var arrays = [];
|
|
|
- res.data.auditionList.map((item) => {
|
|
|
+ goodsAuditionConfig.map((item) => {
|
|
|
arrays.push({
|
|
|
TypeId: "3-" + item.sectionId,
|
|
|
menuId: item.sectionId,
|
|
@@ -1392,9 +1403,10 @@ export default {
|
|
|
});
|
|
|
this.auditionList = arrays;
|
|
|
}
|
|
|
- if (res.data.examConfigList && res.data.goodsType == 2) {
|
|
|
+ if (res.data.goodsExamConfig && res.data.goodsType == 2) {
|
|
|
var arrays = [];
|
|
|
- res.data.examConfigList.map((item) => {
|
|
|
+ var goodsExamConfig = JSON.parse(res.data.goodsExamConfig);
|
|
|
+ goodsExamConfig.map((item) => {
|
|
|
var ast = {};
|
|
|
if (item.moduleExamId && item.chapterExamId && item.examId) {
|
|
|
ast.TypeId =
|
|
@@ -1607,7 +1619,12 @@ export default {
|
|
|
rulesTableSumbit(int) {
|
|
|
var datas = JSON.parse(JSON.stringify(this.listData));
|
|
|
if (int === 2) {
|
|
|
- datas.goodsStatus = 1;
|
|
|
+ if (this.listData.goodsStatus === 1) {
|
|
|
+ datas.goodsStatus = 0;
|
|
|
+ }
|
|
|
+ if (this.listData.goodsStatus === 0) {
|
|
|
+ datas.goodsStatus = 1;
|
|
|
+ }
|
|
|
}
|
|
|
this.courTypeOptions.map((item) => {
|
|
|
if (item.id === this.listData.businessId) {
|