提交 28452edf 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

上级 7cfbe339
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport><link rel=icon type=image/x-icon href=./static/favicon.ico><link rel=stylesheet href=//at.alicdn.com/t/font_1586872_yhll0m2jcs.css><title>EDS供货商</title><link href=/static/css/app.62556b3d72455819fde5f9ac3c5a980c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.ce6ce250fafdef5a6f4e.js></script><script type=text/javascript src=/static/js/vendor.02a8d01969b52bb78b9a.js></script><script type=text/javascript src=/static/js/app.e647228d38e85cf56243.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport><link rel=icon type=image/x-icon href=./static/favicon.ico><link rel=stylesheet href=//at.alicdn.com/t/font_1586872_yhll0m2jcs.css><title>EDS供货商</title><link href=/static/css/app.43d747e667668ec5e9cd1b139a493cf4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2d26e083c7b7eb381764.js></script><script type=text/javascript src=/static/js/vendor.02a8d01969b52bb78b9a.js></script><script type=text/javascript src=/static/js/app.e647228d38e85cf56243.js></script></body></html>
\ No newline at end of file
因为 它太大了无法显示 源差异 。您可以改为 查看blob
因为 它太大了无法显示 源差异 。您可以改为 查看blob
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={6:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"76ed2655edbf8d3e7509",3:"ca2708494961454b4374",4:"c569c81ffe41d4800bf8",5:"cb7f3344fd930f577a5c"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={6:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"fae18df2c0fe5bee18a6",3:"ca2708494961454b4374",4:"c569c81ffe41d4800bf8",5:"cb7f3344fd930f577a5c"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
<style>
.actHead {
background: #ffe0cc;
padding: 10px 20px;
color: #ff6600;
border-radius: 25px;
margin-right: 10px;
}
</style>
<template>
<div class="goods-list" style="width: 1100px">
<el-dialog
top="3vh"
title="查看活动规则"
width="1040px"
:visible.sync="dialogVisible"
>
<img :src="`https://img.edsmall.com/ROOT/ETao/resource/actHelp730.png?t=${new Date().getTime()}`" alt="">
</el-dialog>
<toptitle name="活动报名">
</toptitle>
<div v-if="zoneList.length!=0">
<div style="display: flex;justify-content: space-between;margin: 10px 15px">
<div style="display: flex">
<div class="actHead" style="padding-right: 6px">
活动报名时间:{{applyEndDate}}&nbsp&nbsp
</div>
<!--<div class="actHead" @click="dialogVisible=true" style="cursor: pointer">-->
<!--查看活动规则-->
<!--</div>-->
<el-button type="primary" @click="goback" v-if="showUpdateBtn">
添加活动商品
<div class="goods-list" v-loading="loading">
<toptitle name="添加活动商品">
<el-button type="primary" @click="goback">
返回
</el-button>
</div>
</div>
<el-tabs v-model="activeStatus" @tab-click="handleClick">
<el-tab-pane :name="item.actId" v-for="item in zoneList" :key="item.actId">
<span slot="label">{{item.actName}}({{item.count}})</span>
</el-tab-pane>
</el-tabs>
</toptitle>
<div style="display: flex;align-items: center;width: 1200px">
<div style="width: 45%">
<p style="margin-bottom: 10px">未参加活动的商品</p>
<div class="search-wrap">
<div class="search-box">
<div class="search-item">
<span class="label">商品编号:</span>
<el-input class="input" @keyup.enter.native="onSearch" clearable v-model="params.search"
<el-input style="width: 220px" clearable v-model="params2.search"
placeholder="请输入商品SPU ID/SKU型号"></el-input>
</div>
<div class="search-item" v-if="isShowPreList">
<span class="label">专区:</span>
<el-select class="input" style="width:120px;" clearable v-model="params.type" placeholder="请选择专区">
<el-option
v-for="item in preList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="search-item">
<el-button type="primary" size="medium " @click="onSearch">搜索</el-button>
<el-button size="medium " @click="onReset">重置</el-button>
<el-button type="primary" @click="onSearch">搜索</el-button>
</div>
</div>
</div>
<div>
<el-table
height="600px"
style="overflow-y: scroll;width: 100%"
border
v-loading="loading"
ref="multipleTable"
:data="actSkuList"
:data="actSkuList2"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
stripe
>
<el-table-column type="selection" width="70" align="center"></el-table-column>
<el-table-column prop="skuImg" label="商品" align="center">
<el-table-column prop="skuImg" label="商品" align="center" width="100">
<template slot-scope="scope">
<div style="display: flex">
<div>
<img style="width:80px" :src="scope.row.mainImg" alt="">
</div>
<div>
<p>SPU:{{scope.row.spuId}}</p>
<p v-if="scope.row.zoneIcon"><img style="width:30px" :src="scope.row.zoneIcon" alt=""></p>
<p>交货期:{{scope.row.deliveryTimeStr}}</p>
</div>
<div class="">
<image-alert showDefaultImg :image="scope.row.mainImg"></image-alert>
</div>
</template>
</el-table-column>
<el-table-column prop="spuModel" label="SPU型号" align="center" width="100"></el-table-column>
<el-table-column prop="skuModel" label="SKU型号" align="center"></el-table-column>
<el-table-column label="库存" align="center" width="180">
<template slot-scope="scope">
<div>库存数量:{{scope.row.stock}}</div>
<div>占用库存:{{scope.row.virtualQty}}</div>
<div>可用库存:{{scope.row.usableStock}}</div>
</template>
</el-table-column>
<el-table-column label="日常价" align="center">
<template slot-scope="scope">
<div>供货价:{{scope.row.supplyPrice}}</div>
<div v-if="!priceformulaId">采购价:{{scope.row.purchasePrice}}</div>
<div v-if="!priceformulaId">优惠价:{{scope.row.salePrice}}</div>
<div v-if="!priceformulaId">零售价:{{scope.row.productPrice}}</div>
</template>
</el-table-column>
<el-table-column prop="actSkuAddDate" label="添加时间" align="center" v-if="activeStatus!='defaultActRegist'"></el-table-column>
<el-table-column label="操作" align="center" width="100px" v-if="showUpdateBtn&&activeStatus!='defaultActRegist'">
</el-table>
</div>
<div class="pagination-box" style="margin-top: 10px">
共{{total2}}条
<el-pagination
:page-size="20"
:current-page="params2.pageNum"
@current-change="eventSizeChange2"
background
layout="prev, pager, next"
:total="total2">
</el-pagination>
</div>
</div>
<div style="width: 10%;text-align: center">
<div style="margin-bottom: 10px">
<el-button type="primary" @click="addActGoods" :loading="otherLoading">确认添加></el-button>
</div>
<div>
<el-button @click="delActGoods" :loading="otherLoading1"> < 确认剔除</el-button>
</div>
</div>
<div style="width: 45%">
<p style="margin-bottom: 10px">参加活动的商品</p>
<div class="search-wrap">
<div class="search-box">
<div class="search-item">
<el-input style="width: 220px" clearable v-model="params.search"
placeholder="请输入商品SPU ID/SKU型号"></el-input>
</div>
<div class="search-item">
<el-button type="primary" @click="onSearch2">搜索</el-button>
</div>
</div>
</div>
<div>
<el-table
border
v-loading="loading"
ref="multipleTable"
:data="actSkuList"
tooltip-effect="dark"
height="600px"
style="overflow-y: scroll;width: 100%"
@selection-change="handleSelectionChange2"
stripe
>
<el-table-column type="selection" width="70" align="center"></el-table-column>
<el-table-column prop="skuImg" label="商品" align="center" width="100">
<template slot-scope="scope">
<div class="edit" @click="passExamineBL(0,scope.row.skuId)">
<span
>剔除</span>
<div class="">
<image-alert showDefaultImg :image="scope.row.mainImg"></image-alert>
</div>
</template>
</el-table-column>
<el-table-column prop="spuModel" label="SPU型号" align="center" width="100"></el-table-column>
<el-table-column prop="skuModel" label="SKU型号" align="center"></el-table-column>
</el-table>
<div class="pagination-box">
<div v-if="showUpdateBtn&&activeStatus!='defaultActRegist'">
<el-button style="margin-right: 20px" @click="toggleSelection()">全选</el-button>
<div>
<span>已选{{selection.length}}个商品</span>
<el-button size="mini" @click="passExamineBL(1)" type="primary">批量剔除</el-button>
</div>
<div class="pagination-box" style="margin-top: 10px">
共{{total}}条
<el-pagination
:page-size="20"
:current-page="params.pageNum"
@current-change="eventSizeChange"
background
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
<pagination
@eventSizeChange="eventSizeChange"
@eventCurrentChange="eventCurrentChange"
:total="total"
:pageSize="params.pageSize"
:currentPage="params.pageNum"
:pagerCount='5'
></pagination>
</div>
</div>
</div>
<div style="text-align: center;margin-top: -10px" v-else>
<img style="width: 600px;height: 400px" src="../../../../static/img/index/noact.png" alt="">
<p style="color: #999999;">暂无相关活动,敬请期待!</p>
</div>
</div>
</template>
<script>
import {_getStorage } from '@/utils/utils'
import pagination from "@/components/common/pagination";
import toptitle from "@/components/common/topTitle";
import imageAlert from "@/components/common/imageAlert";
export default {
name: "list",
components: {
pagination,
toptitle,
toptitle,imageAlert
},
data() {
return {
priceformulaId:null,
showUpdateBtn:true,
isShowPreList:true,
isAct: false,
applyEndDate: "",
dialogVisible: false,
activeStatus: "",
otherLoading: false,
otherLoading1: false,
loading: false,
preList: [
{
value: 99,
label: "全部",
},
// {
// value: 1,
// label: "优选",
// }, {
// value: 2,
// label: "严选",
// },
{
value: 11,
label: "铂金",
}, {
value: 10,
label: "淘淘淘",
},
],
selection: [],
total: 200,
total2: 200,
params2: {
pageSize: 20,
pageNum: 1,
search: "",
type: "",
actType: "",
},
params: {
pageSize: 20,
pageNum: 1,
search: "",
type: 99,
type: "",
actType: "",
},
zoneList: [],
actSkuList: [],
actSkuList2: [],
delSelection: [],
temType:null,
temActId:null,
delSelectionAct:[],
};
},
mounted() {
this.priceformulaId = _getStorage('priceformulaId')
this.init();
if (this.$route.query) {
this.temType = this.$route.query.type;
this.temActId = this.$route.query.actId;
}
this.init()
},
methods: {
toggleSelection() {
this.$refs.multipleTable.toggleAllSelection();
},
async init() {
await this.getZoneList();
init(){
this.getNotRegistsList();
this.getRegisteredList();
},
goback() {
this.$router.push("/marketing/AddActivityProduct");
},
delActGoods() {
this.$axios.post("/actLocalRegist/delActGoods", {
skuIds: this.selection,
"actId": this.activeStatus,
// 未参加活动的商品
getNotRegistsList() {
this.loading = true;
this.$axios.post("/actregist/notRegistsList", {
...this.params2,
"actId":this.temType==2?this.temActId:'f4f15eac-0699-11ed-9da2-7cd30aeb12-7z',
}).then(res => {
let { code, msg } = res.data;
if (code == 200) {
this.getZoneList();
this.$message.success(msg);
this.selection = [];
let { code, data } = res.data;
if (code === 200) {
this.actSkuList2 = data.list;
this.total2 = parseInt(data.total);
} else {
this.$message.error(msg);
this.actSkuList2 = [];
this.total2 = 0;
}
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
passExamineBL(status, skuId) {
var msg = status == 1 ? "批量" : "";
if (status == 1) {
if (this.selection.length == 0) {
this.$message("请选择要" + msg + "剔除的商品");
return false;
}
}
this.$confirm("确定要" + msg + "剔除商品?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (status == 0) {
this.selection = [skuId];
}
this.delActGoods();
})
.catch(() => {
});
},
getActSkuList() {
this.$axios.post("/actLocalRegist/actSkuList", {
// 参加活动的商品
getRegisteredList() {
this.loading = true;
this.$axios.post("/actregist/registered", {
...this.params,
"actId": this.activeStatus,
"actId":this.temType==2?this.temActId:'f4f15eac-0699-11ed-9da2-7cd30aeb12-7z',
}).then(res => {
let { code, data } = res.data;
if (code === 200) {
this.total = parseInt(data.total);
this.actSkuList = data.list;
}else {
this.actSkuList=[]
this.total=0
} else {
this.actSkuList = [];
this.total = 0;
}
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
getZoneList() {
this.$axios.get("/actLocalRegist/zoneList").then(res => {
let { code, data } = res.data;
if (code === 200) {
this.showUpdateBtn=data.showUpdateBtn
this.applyEndDate = data.applyEndDate;
this.zoneList = data.list;
if(data.list[0].actType==1||data.list[0].actType==2){
this.isShowPreList=false
delActGoods() {
if (this.delSelection.length == 0) {
this.$message.warning("请选择要剔除的商品");
return;
}
if(this.activeStatus==0||!this.activeStatus){
this.activeStatus = data.list[0].actId;
let params = {
id:this.delSelectionAct,
skuIds: this.delSelection,
actId:this.temType==2?this.temActId:'f4f15eac-0699-11ed-9da2-7cd30aeb12-7z',
}
// if(this.temType==2){
// params={
// id:this.delSelection
// }
// }
this.otherLoading1 = true;
this.$axios.post("/actregist/delActGoods",params).then(res => {
let { code, msg } = res.data;
if (code == 200) {
if(this.actSkuList.length-this.delSelection.length==0){
this.params.pageNum=1
}
this.getActSkuList();
this.init()
this.$message.success(msg);
this.otherLoading1 = false;
} else {
this.isAct = true;
this.$message.error(msg);
this.otherLoading1 = false;
}
}).catch(() => {
this.otherLoading1 = false;
});
},
handleClick(e) {
let actType = this.zoneList[Number(e.index)].actType;
if(actType==1||actType==2){
this.isShowPreList=false
}else {
this.isShowPreList=true
addActGoods() {
if (this.selection.length == 0) {
this.$message.warning("请选择要添加的商品");
return;
}
this.params.pageNum = 1;
this.getActSkuList();
this.otherLoading = true;
this.$axios.post("/actregist/addActGoods", {
skuIds: this.selection,
"actId":this.temType==2?this.temActId:'f4f15eac-0699-11ed-9da2-7cd30aeb12-7z',
}).then(res => {
let { code, msg } = res.data;
if (code == 200) {
if (this.actSkuList2.length - this.selection.length == 0) {
this.params2.pageNum = 1;
}
this.init()
this.$message.success(msg);
this.otherLoading = false;
} else {
this.otherLoading = false;
this.$message.error(msg);
}
}).catch(() => {
this.otherLoading = false;
});
},
onSearch() {
this.params.pageNum = 1;
this.getActSkuList();
this.params2.pageNum = 1;
this.getNotRegistsList();
},
onReset() {
this.params = {
pageSize: 20,
pageNum: 1,
search: "",
type: 99,
};
this.getActSkuList();
onSearch2() {
this.params.pageNum = 1;
this.getRegisteredList();
},
handleSelectionChange(e) {
this.selection = [...new Set(e.map(t => t.skuId))];
this.selection = [...new Set(e.map(t => this.temType==2?t.skuId: t.skuId))];
},
eventSizeChange(e) {
this.params.pageSize = e;
this.getActSkuList();
handleSelectionChange2(e) {
this.delSelectionAct = [...new Set(e.map(t =>t.skuActId))];
this.delSelection = [...new Set(e.map(t => t.skuId))];
},
eventSizeChange2(e) {
this.params2.pageNum = e;
this.getNotRegistsList();
},
eventCurrentChange(e) {
eventSizeChange(e) {
this.params.pageNum = e;
this.getActSkuList();
this.getRegisteredList();
},
goback(){
this.$router.push("/marketing/activityMall-act");
},
},
};
......@@ -376,6 +357,7 @@
.pagination-box {
display: flex;
align-items: center;
justify-content: center;
// justify-content: space-between;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册