Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

肖康 / cloudSystem

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit b5c81ee2 authored a year ago by LJM's avatar LJM
Browse files
Options
  • _('Browse Files')
  • Download
  • Email Patches
  • Plain Diff

库存导入页面-增加字段

parent 134523ff
Hide whitespace changes
Inline Side-by-side
Showing with 25 additions and 11 deletions
  • src/views/Store/enter.vue
src/views/Store/enter.vue
View file @ b5c81ee2
......@@ -48,6 +48,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="import_way" label="导入方式" width="120" align="center"></el-table-column>
<el-table-column prop="count_success" label="导入成功" width="160" align="center"></el-table-column>
<el-table-column prop="count_error" label="导入失败" width="160" align="center"></el-table-column>
<el-table-column prop="create_time" label="上传时间" width="160" align="center"></el-table-column>
......@@ -59,7 +60,7 @@
<div class="dialog-text">
<p class="tt row" style="margin-bottom: 5px;">
<span style="white-space: nowrap">主营品牌:</span>
<span style="color: #606266;font-size: 12px;font-weight: normal;">{{brand}}{{brand}}{{brand}}</span>
<span style="color: #606266;font-size: 12px;font-weight: normal;">{{ brand }}{{ brand }}{{ brand }}</span>
</p>
<p style="color: #ff7e11;font-size: 12px;margin-bottom: 5px;">
上传型号的品牌,必须是以上的主营品牌才允许上传成功<br/>
......@@ -77,8 +78,9 @@
</div>
<div slot="footer" class="dialog-footer row" style="text-align: right;justify-content: flex-end;">
<el-button @click="dialogVisible = false" style="margin-right: 10px;">取 消</el-button>
<el-upload :data="fileData" :action="uploadUrl" :on-success="handleChange" multiple>
<el-button type="primary">确 定</el-button>
<el-upload :data="fileData" :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleChange" :on-progress="handleProgress">
<el-button type="primary" :loading="uploading">确 定</el-button>
<el-progress v-if="uploading" :percentage="progress"/>
</el-upload>
</div>
</div>
......@@ -92,17 +94,19 @@ import Vue from 'vue';
import Menu from "@/components/menu.vue";
import Tool from '../../tool'
import {NODE_ENVS} from "../../ajax";
import {Button, DatePicker, Dialog, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Radio, Select, Table, TableColumn, Tag, Tooltip, Upload} from 'element-ui'
import {Button, DatePicker, Dialog, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Progress, Radio, Select, Table, TableColumn, Tag, Tooltip, Upload} from 'element-ui'
Vue.prototype.$message = Message
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination).use(Tag).use(Tooltip);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Upload).use(Radio);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Upload).use(Radio).use(Progress);
export default {
name: "enter",
data() {
return {
brand:[],
sku_user_name:'',
uploading: false,
progress: 0,
brand: [],
sku_user_name: '',
total: 0,
limit: 10,
page: 1,
......@@ -132,19 +136,27 @@ export default {
this.getData();
},
methods: {
handleBeforeUpload() {
this.uploading = true
},
handleProgress(event, file, fileList) {
this.progress = event.percent
},
importChange() {
this.dialogVisible = true;
this.progress = 0;
this.uploading=false;
this.getSupplierBrand();
},
/**
* 获取品牌数据
*/
getSupplierBrand(){
getSupplierBrand() {
this.$http('get', "/api/system/getSupplierBrand", {}).then(res => {
if (res.code === 0) {
if(res.data.brand.length > 0){
this.brand=res.data.brand.join(',');
this.sku_user_name=res.data.sku_user_name;
if (res.data.brand.length > 0) {
this.brand = res.data.brand.join(',');
this.sku_user_name = res.data.sku_user_name;
}
} else {
this.$message({
......@@ -207,6 +219,8 @@ export default {
}
});
} else {
this.progress = 0;
this.uploading=false;
this.$message({
message: file.msg,
type: 'warning'
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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