Commit af7cf9b1 authored by 华国豪's avatar 华国豪 🙄

商品

parent 12e38e9f
...@@ -37,14 +37,16 @@ ...@@ -37,14 +37,16 @@
<em>{{$t('admin.admin_status')}}</em> <em>{{$t('admin.admin_status')}}</em>
<el-select filterable v-model="msg.Status"> <el-select filterable v-model="msg.Status">
<el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option>
<el-option label="展示" :value="0"></el-option> <el-option label="待完善" :value="1"></el-option>
<el-option label="不展示" :value="1"></el-option> <el-option label="上架" :value="2"></el-option>
<el-option label="下架" :value="3"></el-option>
<el-option label="取消" :value="4"></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<input type="button" @click="getList" class="hollowFixedBtn" :value="$t('pub.searchBtn')"> <input type="button" @click="getList" class="hollowFixedBtn" :value="$t('pub.searchBtn')">
<input type="button" @click="addIntegralMall('addIntegralMall', '', $t('MarketingActi.addComm'))" class="normalBtn" :value="$t('pub.addBtn')"> <input type="button" @click="addIntegralMall('BuyingAdd')" class="normalBtn" :value="$t('pub.addBtn')">
</li> </li>
</ul> </ul>
</div> </div>
...@@ -69,21 +71,27 @@ ...@@ -69,21 +71,27 @@
<td>{{item.Name}}</td> <td>{{item.Name}}</td>
<td>{{item.CategoryName}}</td> <td>{{item.CategoryName}}</td>
<td>{{item.SellTypeName}}</td> <td>{{item.SellTypeName}}</td>
<td>{{item.price}}{{item.priceUnit === 1 ? '人民币' : '积分'}}</td> <td>{{item.CostPrice}}</td>
<td>{{item.marketPrice}}</td> <td>{{item.SellPrice}}</td>
<td>{{item.quota === 0 ? '不限购' : `限购${item.quota}次`}}</td> <td>{{item.LeaderRebate}}</td>
<td>{{item.logistic}}</td> <td>{{item.CompanyRebate}}</td>
<td>{{getHotName(item.ishot)}}</td> <td>{{item.ClientRebate}}</td>
<td>{{item.state === 1 ? '上架' : item.state === 0 ? '下架' : '删除'}}</td> <td>{{item.WeiTuRebate}}</td>
<td> <td>
<el-button-group>
<el-tooltip class="item" effect="dark" :content="$t('active.ld_editInfo')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('active.ld_editInfo')" placement="top">
<el-button <el-button type="primary" size="mini" icon="el-icon-edit" @click="addIntegralMall('BuyingAdd', item.Id, '修改商品')"></el-button>
type="primary"
icon="el-icon-edit"
circle
@click="addIntegralMall('addIntegralMall', item, '修改商品')"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="上架" placement="top">
<el-button type="success" size="mini" class="iconfont icon-shangjia1"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下架" placement="top">
<el-button type="warning" size="mini" class="iconfont icon-xiajia1"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="取消" placement="top">
<el-button type="danger" size="mini" class="iconfont icon-quxiao1"></el-button>
</el-tooltip>
</el-button-group>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -111,7 +119,6 @@ export default { ...@@ -111,7 +119,6 @@ export default {
loading:false, loading:false,
dataList:[], dataList:[],
GoodsTypeList: [], GoodsTypeList: [],
GoodsSeriesList: [],
total:0, total:0,
CommodityTypeList: [], CommodityTypeList: [],
}; };
...@@ -119,7 +126,6 @@ export default { ...@@ -119,7 +126,6 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
this.getGoodsSeries();
this.getCommodityTypeList(); this.getCommodityTypeList();
this.getGoodsTypeManager(); this.getGoodsTypeManager();
}, },
...@@ -131,33 +137,8 @@ export default { ...@@ -131,33 +137,8 @@ export default {
this.msg.pageIndex=val; this.msg.pageIndex=val;
this.getList(); this.getList();
}, },
getHotName: function (id) { addIntegralMall: function( path, proId, tab){
for(let i = 0; i < this.GoodsSeriesList.length; i++ ) { this.$router.push({ name: path,query:{blank: 'y', proId: proId, tab: tab} })
if (this.GoodsSeriesList[i].id === id) {
return this.GoodsSeriesList[i].name
}
}
return '无'
},
getGoodsSeries() {
this.loading = true;
this.apiJavaPost(
"/api/IntegralManager/getGoodsSeries",
{},
res => {
this.loading = false;
if (res.data.resultCode === 1) {
this.GoodsSeriesList = res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
addIntegralMall: function( path, obj, tab){
localStorage.editIntegralMall = JSON.stringify(obj);
this.$router.push({ name: path,query:{blank: 'y', tab: tab} })
}, },
getGoodsTypeManager() { getGoodsTypeManager() {
this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: 0},res => { this.apipost("Shop_post_GetCommodityCategoryList",{Name: "", ParentId: 0},res => {
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
:content="$t('active.ld_editInfo')" content="修改"
placement="top" placement="top"
> >
<el-button <el-button
...@@ -129,6 +129,9 @@ ...@@ -129,6 +129,9 @@
@click="outerVisible=true,dialogTitle='修改商品类型',updateData(item)" @click="outerVisible=true,dialogTitle='修改商品类型',updateData(item)"
></el-button> ></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<el-button @click="Delete(item)" type="danger" class='zidingyiFz' icon="el-icon-delete" circle ></el-button>
</el-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -194,12 +197,6 @@ ...@@ -194,12 +197,6 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="是否展示" prop="state">
<el-select filterable v-model="addMsg.Status">
<el-option label="展示" :value="0"></el-option>
<el-option label="不展示" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button <button
...@@ -269,27 +266,18 @@ export default { ...@@ -269,27 +266,18 @@ export default {
}, },
// 删除 // 删除
Delete(item) { Delete(item) {
this.$confirm("是否删除"+ item.name+"? 删除后不可恢复", "提示", { this.$confirm("是否删除"+ item.Name+"? 删除后不可恢复", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.apiJavaPost( this.updateData(item, 2)
"/api/IntegralManager/goodsTypeManager", this.addAward()
{ reqType: 'delete', id: item.id },
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
},
err => {}
);
}) })
.catch(() => {}); .catch(() => {
this.resetInfo()
});
}, },
//上传图片 //上传图片
uploadTypeImgBtn(file){ uploadTypeImgBtn(file){
...@@ -386,15 +374,17 @@ export default { ...@@ -386,15 +374,17 @@ export default {
); );
}, },
//修改信息 //修改信息
updateData(item) { updateData(item, t) {
if (!t) {
this.outerVisible = true; this.outerVisible = true;
}
this.addMsg.IsShowIndex = item.IsShowIndex; this.addMsg.IsShowIndex = item.IsShowIndex;
this.addMsg.Name = item.Name; this.addMsg.Name = item.Name;
this.addMsg.ParentId = item.ParentId; this.addMsg.ParentId = item.ParentId;
this.addMsg.Sort = item.Sort; this.addMsg.Sort = item.Sort;
this.addMsg.Image = item.Image; this.addMsg.Image = item.Image;
this.addMsg.Id = item.Id; this.addMsg.Id = item.Id;
this.addMsg.Status = item.Status this.addMsg.Status = t ? 1 : item.Status
}, },
//重置信息 //重置信息
resetInfo() { resetInfo() {
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = ''; let domainUrl = '';
domainUrl = "http://192.168.2.214:8082"; domainUrl = "http://192.168.2.214:8082";
// domainUrl = "http://192.168.2.65:8025"; // 吴春 domainUrl = "http://192.168.2.16:8083"; // 吴春
let locationName = window.location.hostname; let locationName = window.location.hostname;
let javaUrldo=""; let javaUrldo="";
......
...@@ -3953,15 +3953,23 @@ export default { ...@@ -3953,15 +3953,23 @@ export default {
{ {
path: '/BuyingType', path: '/BuyingType',
name: 'BuyingType', name: 'BuyingType',
component: resolve => require(['@/components/activity/BuyingType'], resolve), component: resolve => require(['@/components/Buying/BuyingType'], resolve),
meta: { meta: {
title: '代购商品类型' title: '代购商品类型'
} }
}, },
{
path: '/BuyingAdd',
name: 'BuyingAdd',
component: resolve => require(['@/components/Buying/BuyingAdd'], resolve),
meta: {
title: '新增代购商品'
}
},
{ {
path: '/BuyingList', path: '/BuyingList',
name: 'BuyingList', name: 'BuyingList',
component: resolve => require(['@/components/activity/BuyingList'], resolve), component: resolve => require(['@/components/Buying/BuyingList'], resolve),
meta: { meta: {
title: '代购商品列表' title: '代购商品列表'
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment