Commit b5c81ee2 by LJM

库存导入页面-增加字段

parent 134523ff
Showing with 25 additions and 11 deletions
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </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_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="count_error" label="导入失败" width="160" align="center"></el-table-column>
<el-table-column prop="create_time" 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 @@ ...@@ -59,7 +60,7 @@
<div class="dialog-text"> <div class="dialog-text">
<p class="tt row" style="margin-bottom: 5px;"> <p class="tt row" style="margin-bottom: 5px;">
<span style="white-space: nowrap">主营品牌:</span> <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>
<p style="color: #ff7e11;font-size: 12px;margin-bottom: 5px;"> <p style="color: #ff7e11;font-size: 12px;margin-bottom: 5px;">
上传型号的品牌,必须是以上的主营品牌才允许上传成功<br/> 上传型号的品牌,必须是以上的主营品牌才允许上传成功<br/>
...@@ -77,8 +78,9 @@ ...@@ -77,8 +78,9 @@
</div> </div>
<div slot="footer" class="dialog-footer row" style="text-align: right;justify-content: flex-end;"> <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-button @click="dialogVisible = false" style="margin-right: 10px;">取 消</el-button>
<el-upload :data="fileData" :action="uploadUrl" :on-success="handleChange" multiple> <el-upload :data="fileData" :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleChange" :on-progress="handleProgress">
<el-button type="primary">确 定</el-button> <el-button type="primary" :loading="uploading">确 定</el-button>
<el-progress v-if="uploading" :percentage="progress"/>
</el-upload> </el-upload>
</div> </div>
</div> </div>
...@@ -92,17 +94,19 @@ import Vue from 'vue'; ...@@ -92,17 +94,19 @@ 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 {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.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(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 { export default {
name: "enter", name: "enter",
data() { data() {
return { return {
brand:[], uploading: false,
sku_user_name:'', progress: 0,
brand: [],
sku_user_name: '',
total: 0, total: 0,
limit: 10, limit: 10,
page: 1, page: 1,
...@@ -132,19 +136,27 @@ export default { ...@@ -132,19 +136,27 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
handleBeforeUpload() {
this.uploading = true
},
handleProgress(event, file, fileList) {
this.progress = event.percent
},
importChange() { importChange() {
this.dialogVisible = true; this.dialogVisible = true;
this.progress = 0;
this.uploading=false;
this.getSupplierBrand(); this.getSupplierBrand();
}, },
/** /**
* 获取品牌数据 * 获取品牌数据
*/ */
getSupplierBrand(){ getSupplierBrand() {
this.$http('get', "/api/system/getSupplierBrand", {}).then(res => { this.$http('get', "/api/system/getSupplierBrand", {}).then(res => {
if (res.code === 0) { if (res.code === 0) {
if(res.data.brand.length > 0){ if (res.data.brand.length > 0) {
this.brand=res.data.brand.join(','); this.brand = res.data.brand.join(',');
this.sku_user_name=res.data.sku_user_name; this.sku_user_name = res.data.sku_user_name;
} }
} else { } else {
this.$message({ this.$message({
...@@ -207,6 +219,8 @@ export default { ...@@ -207,6 +219,8 @@ export default {
} }
}); });
} else { } else {
this.progress = 0;
this.uploading=false;
this.$message({ this.$message({
message: file.msg, message: file.msg,
type: 'warning' type: 'warning'
......
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