Commit 6ffe61e9 by 肖康

x

parent 0b4918ce
......@@ -11,7 +11,7 @@ import Util from "../tool";
*/
const envs = process.env.NODE_ENV;
let NODE_ENVS = "/";
export let NODE_ENVS = "/";
switch (envs) {
case 'development':
//开发环境
......@@ -52,3 +52,4 @@ export const http = (method, url, param) => {
}
......@@ -55,6 +55,12 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe658;</span>
<div class="name">pdf</div>
<div class="code-name">&amp;#xe658;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe736;</span>
<div class="name">禁止 (2)</div>
<div class="code-name">&amp;#xe736;</div>
......@@ -180,9 +186,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1620699989551') format('woff2'),
url('iconfont.woff?t=1620699989551') format('woff'),
url('iconfont.ttf?t=1620699989551') format('truetype');
src: url('iconfont.woff2?t=1621221730032') format('woff2'),
url('iconfont.woff?t=1621221730032') format('woff'),
url('iconfont.ttf?t=1621221730032') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
......@@ -209,6 +215,15 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont iconpdf"></span>
<div class="name">
pdf
</div>
<div class="code-name">.iconpdf
</div>
</li>
<li class="dib">
<span class="icon iconfont iconjinzhi2"></span>
<div class="name">
禁止 (2)
......@@ -399,6 +414,14 @@
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconpdf"></use>
</svg>
<div class="name">pdf</div>
<div class="code-name">#iconpdf</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconjinzhi2"></use>
</svg>
<div class="name">禁止 (2)</div>
......
@font-face {
font-family: "iconfont"; /* Project id 2537242 */
src: url('iconfont.woff2?t=1620699989551') format('woff2'),
url('iconfont.woff?t=1620699989551') format('woff'),
url('iconfont.ttf?t=1620699989551') format('truetype');
src: url('iconfont.woff2?t=1621221730032') format('woff2'),
url('iconfont.woff?t=1621221730032') format('woff'),
url('iconfont.ttf?t=1621221730032') format('truetype');
}
.iconfont {
......@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.iconpdf:before {
content: "\e658";
}
.iconjinzhi2:before {
content: "\e736";
}
......
......@@ -6,6 +6,13 @@
"description": "猎芯云芯系统前端",
"glyphs": [
{
"icon_id": "21637635",
"name": "pdf",
"font_class": "pdf",
"unicode": "e658",
"unicode_decimal": 58968
},
{
"icon_id": "21511736",
"name": "禁止 (2)",
"font_class": "jinzhi2",
......
.goods{
.goods-con{
background: #FFFFFF;
border-radius: 4px;
border: 1px solid #E5EBF6;
padding:20px;
}
.search-btn{
cursor: pointer;
width: 76px;
height: 37px;
line-height: 37px;
background: #1969F9;
border-radius: 2px;
font-size: 14px;
color:#fff;
text-align: center;
&:hover{
background: #0050E0;
}
}
.btn-nav{
margin-top: 11px;
margin-bottom: 22px;
.dcg{
width: 66px;
height: 26px;
border-radius: 2px;
text-align: center;
line-height: 26px;
border: 1px solid #1969F9;
background: #E5EEFF;;
color:#1969F9;
margin-right: 10px;
font-size: 14px;
transition: all 0.5s;
&:hover{
background: #1969F9;
cursor: pointer;
color:#fff;
}
&.delbtn{
border:1px solid #FC1F00;
background: #FFE7E3;
color:#FC1F00;
&:hover{
background: #FF715D;
color:#fff;
}
}
&.updatex{
}
}
.updatex{
width: 66px;
height: 26px;
line-height: 26px;
text-align: center;
background: #FFEEDD;
border: 1px solid #FF870D;
border-radius: 2px;
color:#FF870D;
font-size: 14px;
cursor: pointer;
width: 66px;
&:hover{
background: #FCA955;
color:#fff;
}
}
}
.brand-img{
width: 80%;
height: 80;
}
}
\ No newline at end of file
.goods .goods-con{background:#FFFFFF;border-radius:4px;border:1px solid #E5EBF6;padding:20px}.goods .search-btn{cursor:pointer;width:76px;height:37px;line-height:37px;background:#1969F9;border-radius:2px;font-size:14px;color:#fff;text-align:center}.goods .search-btn:hover{background:#0050E0}.goods .btn-nav{margin-top:11px;margin-bottom:22px}.goods .btn-nav .dcg{width:66px;height:26px;border-radius:2px;text-align:center;line-height:26px;border:1px solid #1969F9;background:#E5EEFF;color:#1969F9;margin-right:10px;font-size:14px;transition:all .5s}.goods .btn-nav .dcg:hover{background:#1969F9;cursor:pointer;color:#fff}.goods .btn-nav .dcg.delbtn{border:1px solid #FC1F00;background:#FFE7E3;color:#FC1F00}.goods .btn-nav .dcg.delbtn:hover{background:#FF715D;color:#fff}.goods .btn-nav .updatex{height:26px;line-height:26px;text-align:center;background:#FFEEDD;border:1px solid #FF870D;border-radius:2px;color:#FF870D;font-size:14px;cursor:pointer;width:66px}.goods .btn-nav .updatex:hover{background:#FCA955;color:#fff}.goods .brand-img{width:80%;height:80}
\ No newline at end of file
......@@ -150,7 +150,7 @@
if (res.err_code === 0) {
this.tableData = res.data.list || [];
this.total = res.data.total || 0;
this.total = Number(res.data.total) || 0;
} else {
Message(res.err_msg);
}
......
<template>
<div class="goods">
我是商品信息
<Menu/>
<div class="goods pagex">
<div class="goods-con">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="型号">
<el-autocomplete v-model="formInline.goods_name" :trigger-on-focus="false" :fetch-suggestions="querySearchAsync"
placeholder="请输入型号" @select="handleSelectGoodsName" ></el-autocomplete>
</el-form-item>
<el-form-item label="品牌">
<el-autocomplete v-model="formInline.brand_name" :trigger-on-focus="false" :fetch-suggestions="querySearchAsync2"
placeholder="请输入品牌" @select="handleSelectBrandName" ></el-autocomplete>
</el-form-item>
<el-form-item label="关键词">
<el-input v-model="formInline.keyword" placeholder="请输入关键词"></el-input>
</el-form-item>
<el-form-item>
<div @click="submit" class="search-btn">搜索</div>
</el-form-item>
</el-form>
<div class="btn-nav clr">
<div class="fl dcg updatex" @click="updateBrand">修改</div>
<div class="fl dcg " @click="downOut">导出</div>
</div>
<div class="data-box th-all" v-if="tableData">
<el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="37">
</el-table-column>
<el-table-column prop="spu_name" label="型号" min-width="15%">
</el-table-column>
<el-table-column prop="brand_name" label="品牌" min-width="15%">
</el-table-column>
<el-table-column prop="encap" label="封装" min-width="15%">
</el-table-column>
<el-table-column prop="pdf" label="规格书" min-width="15%">
</el-table-column>
<el-table-column prop="images_l" label="图片" min-width="10%">
<template slot-scope="scope" v-if="scope.row.images_l">
<img :src="scope.row.images_l" class="brand-img" alt="">
</template>
</el-table-column>
<el-table-column prop="remark" label="型号量" min-width="10%">
</el-table-column>
<el-table-column prop="remark" label="商品备注" min-width="15%">
</el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="15%">
</el-table-column>
<el-table-column prop="update_time" label="更新时间" min-width="15%">
</el-table-column>
</el-table>
<el-pagination layout="prev, pager, next,jumper" :page-size="limit" :total="total"
@current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div>
<!--修改品牌弹窗-->
<el-dialog title="修改品牌" :visible.sync="dialogVisible" width="1000px">
<div class="kc-mask">
<el-table :data="updateBranddata" border style="width: 100%">
<el-table-column prop="brand_name" label="品牌" width="180">
</el-table-column>
<el-table-column prop="region" label="地区" width="100">
</el-table-column>
<el-table-column prop="brand_logo" label="LOGO" min-width="120">
<template slot-scope="scope" v-if="scope.row.brand_logo">
<img :src="scope.row.brand_logo" class="brand-img" alt="">
</template>
</el-table-column>
<el-table-column prop="internal_standard_name" label="内部标准名称" min-width="170">
<template slot-scope="scope">
<el-input v-model="scope.row.internal_standard_name" placeholder="点击修改"></el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="品牌备注" width="320">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="点击修改"></el-input>
</template>
</el-table-column>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitUpdate">确 定</el-button>
</span>
</el-dialog>
</div>
<Menu />
</div>
</template>
<script>
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import Tool from '../../tool'
import {
Form,
FormItem,
Select,
Option,
Input,
Button,
Message
Table,
TableColumn,
Message,
MessageBox,
Dialog,
Pagination,
Autocomplete
} from 'element-ui'
Vue.use(Button)
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination).use(
Autocomplete)
Vue.use(TableColumn).use(Table)
export default {
name: "goods",
name: "brand",
data() {
return {};
return {
dialogVisible: false,
updateBranddata: [],
total: 0,
limit: 10,
page: 1,
formInline: {
goods_name:'',
brand_name: '',
brand_id: '',
keyword: ''
},
tableData: "",
multipleSelection: []
};
},
watch: {},
created() {
this.getData();
},
computed: {},
methods: {
ceshi() {
//this.$message.error('上传头像图片只能是 JPG 格式!');
Message('这是一条消息提示');
this.$http('get', "/getJoke1", {
page: 1, count: 2, type: 'video'
getData() {
this.$http('get', "/api/spu/get_spu_list", {
page: this.page,
limit: this.limit,
brand_id: this.formInline.brand_id,
brand_name: this.formInline.brand_name,
spu_name:this.formInline.goods_name,
keyword: this.formInline.keyword,
}).then(res => {
if (res.err_code === 0) {
this.tableData = res.data.list || [];
this.total = Number(res.data.count) || 0;
} else {
Message(res.err_msg);
}
})
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err.message);
})
},
updateBrand() {
if (this.multipleSelection.length > 1) {
Message("只能选择一条数据")
return
}
if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据")
return
}
this.updateBranddata = JSON.parse(JSON.stringify(this.multipleSelection));
this.dialogVisible = true
},
submitUpdate() {
var arr_ = {
id:this.updateBranddata[0].id,
remark:this.updateBranddata[0].remark,
internal_standard_name:this.updateBranddata[0].internal_standard_name
}
this.$http('post', "/api/brand/update_brand", arr_).then(res => {
if (res.err_code == 0) {
Message("修改成功");
this.getData()
this.dialogVisible = false
} else {
Message(res.err_msg);
}
})
},
handleSelectGoodsName(item) {
this.formInline.goods_name=item.value
},
handleSelectBrandName(item){
this.formInline.brand_name=item.value;
this.formInline.brand_id=item.brand_id;
},
querySearchAsync(queryString, cb) {
this.$http('get', "/api/search/getspu", {
spu_name: this.formInline.goods_name
}).then(res => {
if (res.err_code == 0) {
var arrlist_=res.data||[];
var arr_=[]
for(var i=0;i<arrlist_.length;i++){
arr_.push({value:arrlist_[i]['spu_name']})
}
cb(arr_);
}
})
},
querySearchAsync2(queryString, cb) {
this.$http('get', "/api/search/getbrand", {
brand_name: this.formInline.brand_name
}).then(res => {
if (res.err_code == 0) {
var arrlist_=res.data||[];
this.brandList=[]
this.formInline.brand_id=""
for(var i=0;i<arrlist_.length;i++){
this.brandList.push({value:arrlist_[i]['brand_name'],brand_id:arrlist_[i]['brand_id']})
}
cb(this.brandList);
}
})
},
submit() {
this.page = 1;
this.getData();
},
downOut() {
this.$http('post', "/api/brand/export_brand", {
brand_id: this.formInline.brand_id,
keyword: this.formInline.keyword,
}).then(res => {})
},
handleCurrentChange(val) {
this.page = val;
this.getData();
},
handleSelectionChange(val) {
this.multipleSelection = val || [];
console.log(this.multipleSelection)
}
},
components: {
Menu
......@@ -47,5 +254,5 @@
};
</script>
<style scoped>
/* @import "../../assets/css/index/index.min.css"; */
@import "../../assets/css/goods/goods.min.css";
</style>
\ No newline at end of file
......@@ -25,7 +25,7 @@
</el-form>
<div class="btn-nav clr">
<div class="fl dcg">导入</div>
<div class="fl dcg long" @click="checkdr">查看导入结果</div>
<div class="fl dcg long" @click="checkdr" >查看导入结果</div>
<div class="fl dcg" @click="downwj">下载模版</div>
<div class="fl dcg delbtn" @click="del">删除</div>
</div>
......@@ -66,6 +66,7 @@
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import Tool from '../../tool'
import {NODE_ENVS} from "../../ajax";
import {
Form,
FormItem,
......@@ -94,6 +95,7 @@
total: 0,
limit: 10,
page: 1,
formInline: {
status: '',
date: ''
......@@ -119,7 +121,7 @@
if (res.err_code === 0) {
this.tableData = res.data.list || [];
this.total =res.data.total||0;
this.total =Number(res.data.total)||0;
} else {
Message(res.err_msg);
}
......@@ -138,14 +140,11 @@
Message("请至少选择一条数据导入")
return
}
this.$http('get', "/api/uploadSku/downResult", {
id: this.multipleSelection[0]['id']
}).then(res => {
})
window.location.href=NODE_ENVS+'/api/uploadSku/downResult?id='+this.multipleSelection[0]['id']
},
downwj() {
this.$http('post', "/api/uploadSku/downUploadCsv", {}).then(res => {
this.$http('get', "/api/uploadSku/downUploadCsv", {}).then(res => {
})
},
......
......@@ -279,7 +279,7 @@
if (res.err_code === 0) {
this.tableData = res.data.list || [];
this.total = res.data.count || 0;
this.total = Number(res.data.count) || 0;
} else {
Message(res.err_msg);
}
......@@ -293,7 +293,7 @@
this.formInline.brand_id=item.brand_id;
},
querySearchAsync(queryString, cb) {
this.$http('get', "/api/search/getsku", {
this.$http('get', "/api/search/getspu", {
spu_name: this.formInline.goods_name
}).then(res => {
if (res.err_code == 0) {
......
......@@ -13,7 +13,7 @@
</div>
<div class="data-box" v-if="tableData">
<el-table :data="tableData" border style="width: 100%">
<el-table-column fixed prop="id" label="ID" width="75">
<el-table-column fixed prop="item_id" label="ID" width="75">
</el-table-column>
<el-table-column prop="status" fixed label="状态" width="75">
<template slot-scope="scope">
......
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 sign in to comment