提交 77b2a879 authored 作者: huaxinzhu's avatar huaxinzhu

1

上级 293e3320
......@@ -18,7 +18,7 @@ export function GetCategory(query) {
})
}
// 经营类目
// 经营类目-12-23-bak
export function NewGetCategory(query) {
return request({
url: '/system/goodsNew/businessList',
......@@ -26,6 +26,16 @@ export function NewGetCategory(query) {
params: query
})
}
// 营业类目
export function NewGetCategoryData(data) {
return request({
url: '/local/getCategoryList',
method: 'post',
data: data
})
}
// 查询运费模板
export function GetFreight(query) {
return request({
......
......@@ -39,7 +39,7 @@ service.interceptors.request.use(config => {
if (getToken() && !isToken) {
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
//config.headers['Authorization'] = 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbk5hbWUiOiIxNTcxMTEzOTg5NSIsInVpZCI6NTI4MjgsImNoYW5uZWxJZCI6MCwiZXhwIjoxNjE5ODMzMzk3LCJpc3MiOiJnaW4tYmxvZyJ9.rh-WXSaFqgqY611Tm5dhba532OYEZvm06vUmgZknoy4'
config.headers['Authorization'] = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbk5hbWUiOiIxODIzMzExODAzNyIsInVpZCI6ODU0MCwic3ViaWQiOjAsImNoYW5uZWxJZCI6MTEzMzcsIm5hbWUiOiLotbXpm6rlpoIiLCJleHAiOjE2NDAyNTE0MTh9.6m_DqSkThyTw3n7xYhIr6njEwIVmP0RLpiTFH4dLLJI'
return config
}, error => {
console.log("25reject");
......
......@@ -10,7 +10,8 @@
<p class="goods-type-tip">为商品设置正确的类目,能让商品快速的被搜索到</p>
</div>
<div class="goods-type-options">
<el-cascader-panel v-model="SSQList" :props='props' @change="SSQChange" ref="ssqCascader"></el-cascader-panel>
<!-- <el-cascader-panel v-model="SSQList" :props='props' @change="SSQChange" ref="ssqCascader"></el-cascader-panel>-->
<el-cascader-panel v-model="SSQList" :props='propsOptions' @change="SSQChange" ref="ssqCascader"></el-cascader-panel>
</div>
<el-button type="primary" class="next-step" :disabled="isNextStep" @click="nextStep">下一步</el-button>
</div>
......@@ -78,7 +79,7 @@
</template>
<script>
import { NewGetCategory,addGoods,getGoodsNew,updateGoodsNew } from '@/api/module/goods';
import { NewGetCategory,NewGetCategoryData,addGoods,getGoodsNew,updateGoodsNew } from '@/api/module/goods';
import Goodsinfomation from './components/goodsinfomation';
import GoodsSpecifications from './components/goodsspecifications';
import GoodsParameter from './components/goodsparameter';
......@@ -105,12 +106,12 @@
goodsLoading: false,
SSQList: [], // 省市区
SSQStr: '', // 省市区 拼接
props: {
propsOptions: {
expandTrigger: 'click',
lazy: true,
lazyLoad: this.lazyLoad,
value: "id",
label: 'label',
label: 'title',
leaf: 'leaf'
},
isNextStep: true,
......@@ -330,16 +331,16 @@
const level = node.level;
let limboNode = {};
if(level === 0) {
limboNode = {id: 0}
limboNode = {parent_id: 0}
}
if(level === 1) {
limboNode = { id: node.value };
limboNode = { parent_id: node.value };
}
if(level === 2) {
limboNode = { id: node.value };
limboNode = { parent_id: node.value };
}
NewGetCategory(limboNode).then(res => {
NewGetCategoryData(limboNode).then(res => {
let result = {};
if (level === 0) {
result = res.data
......
......@@ -274,7 +274,7 @@
<script>
import goodDetail from './components/goodsdetail'
import editGood from '@/views/system/goods/add/index'
import { GetFreight } from '@/api/module/goods'
import { GetFreight,getGoodsNew } from '@/api/module/goods'
import { getlistGoods, shelvesStatus, delgoodsStatus,cancelOnsale,cancelOnsaleAllData,saveHotEditGoodsData } from '@/api/module/goodsgement'
import {dateFormat} from '@/utils'
......@@ -655,15 +655,22 @@
},
/** 不下架 编辑部分商品信息 */
hotEditGoods(row) {
let goodsId = 0;
if (!row.goods_id) {
let data = {
goodsId: row.goods_id
};
if (!data.goodsId) {
return
}
goodsId = row.goods_id;
this.isHotEditGoods = true;
// 获取运费模板
this.getFreightData();
getGoodsNew(data).then(res=> {
if (res.code == 1 && res.data) {
this.isHotEditGoods = true;
console.log(667,res.data);
}
});
},
/** 保存 不下架 编辑商品 */
saveHotEditGoods() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论