Commit 6ffe61e9 by 肖康

x

parent 0b4918ce
...@@ -11,7 +11,7 @@ import Util from "../tool"; ...@@ -11,7 +11,7 @@ import Util from "../tool";
*/ */
const envs = process.env.NODE_ENV; const envs = process.env.NODE_ENV;
let NODE_ENVS = "/"; export let NODE_ENVS = "/";
switch (envs) { switch (envs) {
case 'development': case 'development':
//开发环境 //开发环境
...@@ -52,3 +52,4 @@ export const http = (method, url, param) => { ...@@ -52,3 +52,4 @@ export const http = (method, url, param) => {
} }
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <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> <span class="icon iconfont">&#xe736;</span>
<div class="name">禁止 (2)</div> <div class="name">禁止 (2)</div>
<div class="code-name">&amp;#xe736;</div> <div class="code-name">&amp;#xe736;</div>
...@@ -180,9 +186,9 @@ ...@@ -180,9 +186,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1620699989551') format('woff2'), src: url('iconfont.woff2?t=1621221730032') format('woff2'),
url('iconfont.woff?t=1620699989551') format('woff'), url('iconfont.woff?t=1621221730032') format('woff'),
url('iconfont.ttf?t=1620699989551') format('truetype'); url('iconfont.ttf?t=1621221730032') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
...@@ -209,6 +215,15 @@ ...@@ -209,6 +215,15 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <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> <span class="icon iconfont iconjinzhi2"></span>
<div class="name"> <div class="name">
禁止 (2) 禁止 (2)
...@@ -399,6 +414,14 @@ ...@@ -399,6 +414,14 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <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> <use xlink:href="#iconjinzhi2"></use>
</svg> </svg>
<div class="name">禁止 (2)</div> <div class="name">禁止 (2)</div>
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2537242 */ font-family: "iconfont"; /* Project id 2537242 */
src: url('iconfont.woff2?t=1620699989551') format('woff2'), src: url('iconfont.woff2?t=1621221730032') format('woff2'),
url('iconfont.woff?t=1620699989551') format('woff'), url('iconfont.woff?t=1621221730032') format('woff'),
url('iconfont.ttf?t=1620699989551') format('truetype'); url('iconfont.ttf?t=1621221730032') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.iconpdf:before {
content: "\e658";
}
.iconjinzhi2:before { .iconjinzhi2:before {
content: "\e736"; content: "\e736";
} }
......
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
"description": "猎芯云芯系统前端", "description": "猎芯云芯系统前端",
"glyphs": [ "glyphs": [
{ {
"icon_id": "21637635",
"name": "pdf",
"font_class": "pdf",
"unicode": "e658",
"unicode_decimal": 58968
},
{
"icon_id": "21511736", "icon_id": "21511736",
"name": "禁止 (2)", "name": "禁止 (2)",
"font_class": "jinzhi2", "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 @@ ...@@ -150,7 +150,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = res.data.total || 0; this.total = Number(res.data.total) || 0;
} else { } else {
Message(res.err_msg); Message(res.err_msg);
} }
......
<template> <template>
<div class="goods"> <div class="goods pagex">
我是商品信息 <div class="goods-con">
<Menu/> <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> </div>
<Menu />
</div>
</template> </template>
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import Menu from "@/components/menu.vue"; import Menu from "@/components/menu.vue";
import Tool from '../../tool' import Tool from '../../tool'
import { import {
Form,
FormItem,
Select,
Option,
Input,
Button, Button,
Message Table,
TableColumn,
Message,
MessageBox,
Dialog,
Pagination,
Autocomplete
} from 'element-ui' } 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 { export default {
name: "goods", name: "brand",
data() { data() {
return {}; return {
dialogVisible: false,
updateBranddata: [],
total: 0,
limit: 10,
page: 1,
formInline: {
goods_name:'',
brand_name: '',
brand_id: '',
keyword: ''
},
tableData: "",
multipleSelection: []
};
}, },
watch: {}, watch: {},
created() { created() {
this.getData();
}, },
computed: {}, computed: {},
methods: { methods: {
ceshi() { getData() {
//this.$message.error('上传头像图片只能是 JPG 格式!'); this.$http('get', "/api/spu/get_spu_list", {
Message('这是一条消息提示'); page: this.page,
this.$http('get', "/getJoke1", { limit: this.limit,
page: 1, count: 2, type: 'video' 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) updateBrand() {
}) if (this.multipleSelection.length > 1) {
.catch(err => { Message("只能选择一条数据")
console.log(err.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: { components: {
Menu Menu
...@@ -47,5 +254,5 @@ ...@@ -47,5 +254,5 @@
}; };
</script> </script>
<style scoped> <style scoped>
/* @import "../../assets/css/index/index.min.css"; */ @import "../../assets/css/goods/goods.min.css";
</style> </style>
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
<div class="fl dcg">导入</div> <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" @click="downwj">下载模版</div>
<div class="fl dcg delbtn" @click="del">删除</div> <div class="fl dcg delbtn" @click="del">删除</div>
</div> </div>
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Menu from "@/components/menu.vue"; import Menu from "@/components/menu.vue";
import Tool from '../../tool' import Tool from '../../tool'
import {NODE_ENVS} from "../../ajax";
import { import {
Form, Form,
FormItem, FormItem,
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
total: 0, total: 0,
limit: 10, limit: 10,
page: 1, page: 1,
formInline: { formInline: {
status: '', status: '',
date: '' date: ''
...@@ -119,7 +121,7 @@ ...@@ -119,7 +121,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total =res.data.total||0; this.total =Number(res.data.total)||0;
} else { } else {
Message(res.err_msg); Message(res.err_msg);
} }
...@@ -138,14 +140,11 @@ ...@@ -138,14 +140,11 @@
Message("请至少选择一条数据导入") Message("请至少选择一条数据导入")
return return
} }
this.$http('get', "/api/uploadSku/downResult", { window.location.href=NODE_ENVS+'/api/uploadSku/downResult?id='+this.multipleSelection[0]['id']
id: this.multipleSelection[0]['id']
}).then(res => {
})
}, },
downwj() { downwj() {
this.$http('post', "/api/uploadSku/downUploadCsv", {}).then(res => { this.$http('get', "/api/uploadSku/downUploadCsv", {}).then(res => {
}) })
}, },
......
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = res.data.count || 0; this.total = Number(res.data.count) || 0;
} else { } else {
Message(res.err_msg); Message(res.err_msg);
} }
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
this.formInline.brand_id=item.brand_id; this.formInline.brand_id=item.brand_id;
}, },
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
this.$http('get', "/api/search/getsku", { this.$http('get', "/api/search/getspu", {
spu_name: this.formInline.goods_name spu_name: this.formInline.goods_name
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div class="data-box" v-if="tableData"> <div class="data-box" v-if="tableData">
<el-table :data="tableData" border style="width: 100%"> <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>
<el-table-column prop="status" fixed label="状态" width="75"> <el-table-column prop="status" fixed label="状态" width="75">
<template slot-scope="scope"> <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