|
@@ -15,10 +15,15 @@
|
|
|
@addClick="addClick"
|
|
|
:loading="loading"
|
|
|
@editInfo="editInfo"
|
|
|
+ @openClassNum="openClassNum"
|
|
|
>
|
|
|
<template slot="btn" slot-scope="props">
|
|
|
<el-button
|
|
|
- v-if="props.scope.row.goodsType == 1 && props.scope.row.courseNum && props.scope.row.courseNum > 0"
|
|
|
+ v-if="
|
|
|
+ props.scope.row.goodsType == 1 &&
|
|
|
+ props.scope.row.courseNum &&
|
|
|
+ props.scope.row.courseNum > 0
|
|
|
+ "
|
|
|
type="text"
|
|
|
@click="setTeacher(props.scope.row)"
|
|
|
>双师制设置</el-button
|
|
@@ -39,6 +44,34 @@
|
|
|
@handleSizeChange="handleSizeChange"
|
|
|
@handleCurrentChange="handleCurrentChange"
|
|
|
/>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="1000px"
|
|
|
+ :show-close="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <div slot="title" class="hearders">
|
|
|
+ <div class="leftTitle">关联商品规格</div>
|
|
|
+ <div class="rightBoxs">
|
|
|
+ <img
|
|
|
+ src="@/assets/images/Close@2x.png"
|
|
|
+ alt=""
|
|
|
+ @click="dialogVisible = false"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <table-list
|
|
|
+ :tableSets="dialogTableSet"
|
|
|
+ :tableData="dialogTableData"
|
|
|
+ :navText="dialogNavText"
|
|
|
+ :radio.sync="tableRadio"
|
|
|
+ >
|
|
|
+ </table-list>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submit">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -46,6 +79,7 @@
|
|
|
import searchBoxNew from "@/components/searchBoxNew";
|
|
|
import tableList from "@/components/tableList";
|
|
|
import pagination from "@/components/pagination";
|
|
|
+import { getGoodsSpecList, goodsUpdateSpec } from "@/api/resource/good";
|
|
|
export default {
|
|
|
name: "CommodityManageMent",
|
|
|
components: { searchBoxNew, tableList, pagination },
|
|
@@ -198,6 +232,12 @@ export default {
|
|
|
prop: "subjectNames",
|
|
|
hidden: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "关联商品规格",
|
|
|
+ prop: "specTemplateNumber",
|
|
|
+ hidden: true,
|
|
|
+ scope: "aboutClassNum",
|
|
|
+ },
|
|
|
{
|
|
|
label: "业务层次",
|
|
|
prop1: "projectName",
|
|
@@ -283,6 +323,49 @@ export default {
|
|
|
],
|
|
|
tableData: [], //表单数据
|
|
|
total: 0, //一共多少条
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogTableSet: [
|
|
|
+ {
|
|
|
+ label: "教育类型",
|
|
|
+ prop: "educationName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "业务层次",
|
|
|
+ prop: "businessName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商品规格模板名称",
|
|
|
+ prop: "name",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商品规格数量",
|
|
|
+ prop: "specNumber",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ dialogTableData: [{}],
|
|
|
+ dialogNavText: {
|
|
|
+ index: 0,
|
|
|
+ num: false,
|
|
|
+ border: true,
|
|
|
+ choice: false,
|
|
|
+ choiceRadio: true,
|
|
|
+ radioKey: "specTemplateId",
|
|
|
+ radioFixed: false,
|
|
|
+ addHide: !false,
|
|
|
+ tableHide: true,
|
|
|
+ dontNum: true,
|
|
|
+ headShow: false,
|
|
|
+ backFatherBtn: {
|
|
|
+ status: false,
|
|
|
+ title: "未定义",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ tableRadio: "",
|
|
|
+ activeGoodsId: {},
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -292,6 +375,15 @@ export default {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ openClassNum(id) {
|
|
|
+ this.activeGoodsId = id;
|
|
|
+ let { specTemplateId } = this.tableData.find((e) => e.goodsId == id);
|
|
|
+ this.tableRadio = specTemplateId || "";
|
|
|
+ getGoodsSpecList(id).then((res) => {
|
|
|
+ this.dialogTableData = res.data;
|
|
|
+ });
|
|
|
+ this.dialogVisible = true;
|
|
|
+ },
|
|
|
editInfo(v) {
|
|
|
this.addClick(v, 0);
|
|
|
},
|
|
@@ -444,6 +536,21 @@ export default {
|
|
|
this.search();
|
|
|
});
|
|
|
},
|
|
|
+ submit() {
|
|
|
+ if (!this.tableRadio) {
|
|
|
+ return this.$message({
|
|
|
+ message: "请选择关联商品规格",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ goodsUpdateSpec({
|
|
|
+ goodsId: this.activeGoodsId,
|
|
|
+ specTemplateId: this.tableRadio,
|
|
|
+ }).then((res) => {
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.search();
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|