|
|
@@ -1,12 +1,12 @@
|
|
|
|
|
|
<template>
|
|
|
<div>
|
|
|
- <basicLayout
|
|
|
- ref="basicLayout"
|
|
|
+ <basicLayout
|
|
|
+ ref="basicLayout"
|
|
|
:oldFormPath="{
|
|
|
add:'HDrpManagement/ProductMag/modules'
|
|
|
}"
|
|
|
- tableName="productManageTable"
|
|
|
+ tableName="productManageTable"
|
|
|
idName="itemid"
|
|
|
ownertable="plm_item"
|
|
|
:apiId="{query:20220923140602,del:20220923152202}"
|
|
|
@@ -26,13 +26,13 @@
|
|
|
<el-button v-if="tool.checkAuth($route.name,'onShelf')" class="inline-16" type="primary" size="small" @click="batchGrounding(1)">批量上架</el-button>
|
|
|
<el-button v-if="tool.checkAuth($route.name,'offShelf')" type="primary" size="small" @click="batchGrounding(0)">批量下架</el-button>
|
|
|
<el-checkbox style="margin-left:10px" :true-label="1" :false-label="0" v-model="isonsalebutnotingroup" @change="specialQuery">查询商品已上架但未上架商品组的商品</el-checkbox>
|
|
|
- <importFile
|
|
|
+ <importFile
|
|
|
v-if="tool.checkAuth($route.name,'export')"
|
|
|
- ref="importFile"
|
|
|
- class="inline-16"
|
|
|
- :bindData="{ownertable:'plm_item',ownerid:$route.query.id,usetype:'default'}"
|
|
|
- :errorUrl="errorUrl"
|
|
|
- @clearUrl="errorUrl = null"
|
|
|
+ ref="importFile"
|
|
|
+ class="inline-16"
|
|
|
+ :bindData="{ownertable:'plm_item',ownerid:$route.query.id,usetype:'default'}"
|
|
|
+ :errorUrl="errorUrl"
|
|
|
+ @clearUrl="errorUrl = null"
|
|
|
@onSuccess="bindImportOrder"
|
|
|
></importFile>
|
|
|
</template>
|
|
|
@@ -70,6 +70,15 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
+ <div class="mt-10">
|
|
|
+ <p class="search__label">营销类别:</p>
|
|
|
+ <el-cascader
|
|
|
+ placeholder="选择分类" size="small"
|
|
|
+ v-model="itemclassids"
|
|
|
+ :options="classList"
|
|
|
+ :props="{ checkStrictly: true,children:'subdep',label:'itemclassname',value:'itemclassid' }"
|
|
|
+ clearable @change="selectChange"></el-cascader>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template v-slot:tbList="scope">
|
|
|
<div>
|
|
|
@@ -135,8 +144,8 @@
|
|
|
* @param {string} formPath 新建,编辑组件所在文件夹名称,以后所有列表新增修改文件统一放入Form文件夹下面,并创建与开发应用相同的名称的子文件夹
|
|
|
* @param {string} tableName 开发端配置的表格名称
|
|
|
* @param {String} idName 数据主id名称
|
|
|
- * @param {object} apiId:{query:查询的接口id,del:删除的接口id}
|
|
|
- * @param {Array} options:{label:描述,value:值}
|
|
|
+ * @param {object} apiId:{query:查询的接口id,del:删除的接口id}
|
|
|
+ * @param {Array} options:{label:描述,value:值}
|
|
|
*/
|
|
|
import previewImage from '@/components/previewImage/index'
|
|
|
import editTemp from './modules/edit.vue'
|
|
|
@@ -173,11 +182,14 @@ export default {
|
|
|
],
|
|
|
selectParam:{
|
|
|
isonsale:'',
|
|
|
- status:''
|
|
|
+ status:'',
|
|
|
+ itemclassid:''
|
|
|
},
|
|
|
+ itemclassids:[],
|
|
|
rowData:[],
|
|
|
errorUrl:null,
|
|
|
- isonsalebutnotingroup:0
|
|
|
+ isonsalebutnotingroup:0,
|
|
|
+ classList:[],
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
|
@@ -241,6 +253,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
selectChange(){
|
|
|
+ this.selectParam.itemclassid = this.itemclassids[this.itemclassids.length-1]
|
|
|
this.$refs.basicLayout.param.content.where = this.selectParam
|
|
|
this.$refs.basicLayout.listData()
|
|
|
},
|
|
|
@@ -281,10 +294,68 @@ export default {
|
|
|
this.tool.showMessage(res,() => {
|
|
|
this.$refs.basicLayout.listData()
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ async getClassList () {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": "20220922110403",
|
|
|
+ "content": {
|
|
|
+ "sa_brandid":0,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ /*this.classList = this.createDeep(res.data[0].ttemclass)*/
|
|
|
+ let arr = []
|
|
|
+ function converTree(node) {
|
|
|
+ var elNode = {
|
|
|
+ isdeep:node["isdeep"],
|
|
|
+ ishide:node["ishide"],
|
|
|
+ istool:node["istool"],
|
|
|
+ itemclassfullname:node["itemclassfullname"],
|
|
|
+ itemclassfullnum:node["itemclassfullnum"],
|
|
|
+ itemclassid:node["itemclassid"],
|
|
|
+ itemclassname:node["itemclassname"],
|
|
|
+ itemclassnum:node["itemclassnum"],
|
|
|
+ num:node["num"],
|
|
|
+ parentid:node["parentid"],
|
|
|
+ rowindex:node["rowindex"],
|
|
|
+ subdep:[]
|
|
|
+ }
|
|
|
+ if (node.subdep.length > 0) {
|
|
|
+ // 如果存在子节点
|
|
|
+ for (var index = 0; index < node.subdep.length; index++) {
|
|
|
+ // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
|
|
|
+ elNode.subdep.push(converTree(node.subdep[index]));
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ elNode = {
|
|
|
+ isdeep:node["isdeep"],
|
|
|
+ ishide:node["ishide"],
|
|
|
+ istool:node["istool"],
|
|
|
+ itemclassfullname:node["itemclassfullname"],
|
|
|
+ itemclassfullnum:node["itemclassfullnum"],
|
|
|
+ itemclassid:node["itemclassid"],
|
|
|
+ itemclassname:node["itemclassname"],
|
|
|
+ itemclassnum:node["itemclassnum"],
|
|
|
+ num:node["num"],
|
|
|
+ parentid:node["parentid"],
|
|
|
+ rowindex:node["rowindex"],
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return elNode;
|
|
|
+ }
|
|
|
+ // this.options.itemclass = arr
|
|
|
+ res.data[0].ttemclass.forEach(e=>{
|
|
|
+ arr.push(converTree(e))
|
|
|
+ });
|
|
|
+
|
|
|
+ this.classList = arr
|
|
|
+ return arr
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
mounted () {
|
|
|
this.fieldData()
|
|
|
+ this.getClassList()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -297,4 +368,4 @@ export default {
|
|
|
width: 38px;
|
|
|
margin-top:0;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|