Commit 2a38fe9d by 肖康

x

parent 7ea16fd5
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
Dialog, Dialog,
Button Button
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Menu).use(MenuItem).use(MenuItemGroup).use(Submenu).use(Form).use(FormItem).use(Dialog).use(Button).use( Vue.use(Menu).use(MenuItem).use(MenuItemGroup).use(Submenu).use(Form).use(FormItem).use(Dialog).use(Button).use(
Input); Input);
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
if (valid) { if (valid) {
this.$http('post', "/api/user/setpasswd", this.ruleForm).then(res => { this.$http('post', "/api/user/setpasswd", this.ruleForm).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message('修改成功'); this.$message('修改成功');
setTimeout(() => { setTimeout(() => {
Util.delCookie('token'); Util.delCookie('token');
window.location.href = '/#/login'; window.location.href = '/#/login';
...@@ -342,7 +342,7 @@ ...@@ -342,7 +342,7 @@
history.go(0); history.go(0);
}, 2000) }, 2000)
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}).catch(err => { }).catch(err => {
console.log(err.message); console.log(err.message);
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
Pagination, Pagination,
Autocomplete Autocomplete
} from 'element-ui' } 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( Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination).use(
Autocomplete) Autocomplete)
Vue.use(TableColumn).use(Table) Vue.use(TableColumn).use(Table)
...@@ -155,17 +156,17 @@ ...@@ -155,17 +156,17 @@
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = Number(res.data.total) || 0; this.total = Number(res.data.total) || 0;
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
updateBrand() { updateBrand() {
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
Message("只能选择一条数据") this.$message("只能选择一条数据")
return return
} }
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据") this.$message("请至少选择一条数据")
return return
} }
this.updateBranddata = JSON.parse(JSON.stringify(this.multipleSelection)); this.updateBranddata = JSON.parse(JSON.stringify(this.multipleSelection));
...@@ -179,11 +180,11 @@ ...@@ -179,11 +180,11 @@
} }
this.$http('post', "/api/brand/update_brand", arr_).then(res => { this.$http('post', "/api/brand/update_brand", arr_).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
Message("修改成功"); this.$message("修改成功");
this.getData() this.getData()
this.dialogVisible = false this.dialogVisible = false
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -216,7 +217,7 @@ ...@@ -216,7 +217,7 @@
downOut() { downOut() {
if (this.disabled) { if (this.disabled) {
Message("正在导出中,请不要重复点击"); this.$message("正在导出中,请不要重复点击");
return return
} }
this.$http('post', "/api/brand/export_brand", { this.$http('post', "/api/brand/export_brand", {
...@@ -226,7 +227,7 @@ ...@@ -226,7 +227,7 @@
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
this.disabled = true this.disabled = true
Message("正在导出中,请耐心等待") this.$message("正在导出中,请耐心等待")
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.disabled) { if (!this.disabled) {
clearInterval(this.timer) clearInterval(this.timer)
...@@ -243,25 +244,25 @@ ...@@ -243,25 +244,25 @@
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
this.disabled = false this.disabled = false
Message("导出成功") this.$message("导出成功")
this.downHref = res.data this.downHref = res.data
setTimeout(() => { setTimeout(() => {
this.$refs.downs.click() this.$refs.downs.click()
}, 10) }, 10)
} else if (res.err_code == -1) { } else if (res.err_code == -1) {
//导出失败 //导出失败
Message(res.data) this.$message(res.data)
this.disabled = false this.disabled = false
} }
}, error => { }, error => {
Message('网络出现问题,请检查网络'); this.$message('网络出现问题,请检查网络');
this.disabled = false this.disabled = false
}) })
}, },
del() { del() {
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据") this.$message("请至少选择一条数据")
return return
} }
var arr = []; var arr = [];
...@@ -277,10 +278,10 @@ ...@@ -277,10 +278,10 @@
id: arr.join(",") id: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("删除成功"); this.$message("删除成功");
this.getData() this.getData()
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}) })
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
Autocomplete, Autocomplete,
Cascader Cascader
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination) Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination)
Vue.use(TableColumn).use(Table).use(Cascader).use(Autocomplete) Vue.use(TableColumn).use(Table).use(Cascader).use(Autocomplete)
export default { export default {
...@@ -180,7 +181,7 @@ ...@@ -180,7 +181,7 @@
}) })
} }
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -201,17 +202,17 @@ ...@@ -201,17 +202,17 @@
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = Number(res.data.count) || 0; this.total = Number(res.data.count) || 0;
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
updateBrand() { updateBrand() {
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
Message("只能选择一条数据") this.$message("只能选择一条数据")
return return
} }
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据") this.$message("请至少选择一条数据")
return return
} }
this.updateGoodsdata = JSON.parse(JSON.stringify(this.multipleSelection)); this.updateGoodsdata = JSON.parse(JSON.stringify(this.multipleSelection));
...@@ -224,11 +225,11 @@ ...@@ -224,11 +225,11 @@
} }
this.$http('post', "/api/spu/update_spu", arr_).then(res => { this.$http('post', "/api/spu/update_spu", arr_).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
Message("修改成功"); this.$message("修改成功");
this.getData() this.getData()
this.dialogVisible = false this.dialogVisible = false
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -280,7 +281,7 @@ ...@@ -280,7 +281,7 @@
downOut() { downOut() {
if (this.disabled) { if (this.disabled) {
Message("正在导出中,请不要重复点击"); this.$message("正在导出中,请不要重复点击");
return return
} }
this.$http('post', "/api/spu/export_spu", { this.$http('post', "/api/spu/export_spu", {
...@@ -293,7 +294,7 @@ ...@@ -293,7 +294,7 @@
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
this.disabled = true this.disabled = true
Message("正在导出中,请耐心等待") this.$message("正在导出中,请耐心等待")
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.disabled) { if (!this.disabled) {
clearInterval(this.timer) clearInterval(this.timer)
...@@ -311,18 +312,18 @@ ...@@ -311,18 +312,18 @@
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
this.disabled = false this.disabled = false
Message("导出成功") this.$message("导出成功")
this.downHref = res.data this.downHref = res.data
setTimeout(() => { setTimeout(() => {
this.$refs.downs.click() this.$refs.downs.click()
}, 10) }, 10)
} else if (res.err_code == -1) { } else if (res.err_code == -1) {
//导出失败 //导出失败
Message(res.data) this.$message(res.data)
this.disabled = false this.disabled = false
} }
}, error => { }, error => {
Message('网络出现问题,请检查网络'); this.$message('网络出现问题,请检查网络');
this.disabled = false this.disabled = false
}) })
......
...@@ -225,6 +225,7 @@ ...@@ -225,6 +225,7 @@
Message, Message,
DatePicker DatePicker
} from 'element-ui'; } from 'element-ui';
Vue.prototype.$message=Message
Vue.use(Form).use(FormItem).use(DatePicker); Vue.use(Form).use(FormItem).use(DatePicker);
...@@ -341,7 +342,7 @@ ...@@ -341,7 +342,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
this.data = res.data this.data = res.data
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
} }
......
...@@ -91,22 +91,21 @@ ...@@ -91,22 +91,21 @@
contacts_name: this.userinfo.contacts_name contacts_name: this.userinfo.contacts_name
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("提交成功"); this.$message("提交成功");
sessionStorage.removeItem('userInfox') sessionStorage.removeItem('userInfox')
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
if (res.err_code === 0) { if (res.err_code === 0) {
console.log(66)
this.$message("设置成功") this.$message("设置成功")
this.userinfo.avatar = URL.createObjectURL(file.raw); this.userinfo.avatar = URL.createObjectURL(file.raw);
sessionStorage.removeItem('userInfox') sessionStorage.removeItem('userInfox')
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}, },
...@@ -115,10 +114,10 @@ ...@@ -115,10 +114,10 @@
const isLt2M = file.size / 1024 / 1024 < 5; const isLt2M = file.size / 1024 / 1024 < 5;
if (!isJPG) { if (!isJPG) {
Message('上传头像图片只能是 JPG、PNG、GIF 格式!'); this.$message('上传头像图片只能是 JPG、PNG、GIF 格式!');
} }
if (!isLt2M) { if (!isLt2M) {
Message('上传头像图片大小不能超过 5MB!'); this.$message('上传头像图片大小不能超过 5MB!');
} }
return isJPG && isLt2M; return isJPG && isLt2M;
} }
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
Pagination, Pagination,
Autocomplete Autocomplete
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination);
Vue.use(VueClipboard); Vue.use(VueClipboard);
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = res.data.total; this.total = res.data.total;
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -138,12 +138,12 @@ ...@@ -138,12 +138,12 @@
detail() { detail() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条询价信息"); this.$message("请至少选择一条询价信息");
return; return;
} }
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
Message("请选择一条询价信息"); this.$message("请选择一条询价信息");
return; return;
} }
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
}) })
} else { } else {
Message("该订单不可报价"); this.$message("该订单不可报价");
return; return;
} }
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
exportChange() { exportChange() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据"); this.$message("请至少选择一条数据");
return; return;
} }
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
del() { del() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据"); this.$message("请至少选择一条数据");
return; return;
} }
...@@ -194,10 +194,10 @@ ...@@ -194,10 +194,10 @@
ids: arr.join(",") ids: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("删除成功"); this.$message("删除成功");
this.getData(); this.getData();
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}) })
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
}) })
}, },
onCopy(e) { onCopy(e) {
Message('复制成功'); this.$message('复制成功');
}, },
}, },
components: { components: {
......
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
Loading, Loading,
Tooltip Tooltip
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete).use(Loading) Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete).use(Loading)
.use(Tooltip); .use(Tooltip);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination);
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
this.ruleForm.inquiry_items_id = res.data.inquiry_info.id; this.ruleForm.inquiry_items_id = res.data.inquiry_info.id;
this.getSkulist(); this.getSkulist();
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}); });
}, },
...@@ -425,7 +425,7 @@ ...@@ -425,7 +425,7 @@
} }
this.checkBind(id_arr.join(",")) this.checkBind(id_arr.join(","))
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
} }
this.checkBind(id_arr.join(",")) this.checkBind(id_arr.join(","))
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -540,25 +540,25 @@ ...@@ -540,25 +540,25 @@
}); });
this.$http('post', "/api/quote/save", this.ruleForm).then(res => { this.$http('post', "/api/quote/save", this.ruleForm).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
Message('操作成功'); this.$message('操作成功');
this.$http('post', "/api/quote/pin", { this.$http('post', "/api/quote/pin", {
inquiry_items_id:this.ruleForm.inquiry_items_id, inquiry_items_id:this.ruleForm.inquiry_items_id,
pin_type:(this.active == 1 ? 1 : 2), pin_type:(this.active == 1 ? 1 : 2),
pin_obj_id:this.currentDataId pin_obj_id:this.currentDataId
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
Message('操作成功'); this.$message('操作成功');
setTimeout(() => { setTimeout(() => {
window.location.reload(); window.location.reload();
}, 2000) }, 2000)
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
loadingInstance.close(); loadingInstance.close();
}) })
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
loadingInstance.close(); loadingInstance.close();
} }
...@@ -618,13 +618,13 @@ ...@@ -618,13 +618,13 @@
modify() { modify() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条询价信息"); this.$message("请至少选择一条询价信息");
return; return;
} }
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
Message("请选择一条询价信息"); this.$message("请选择一条询价信息");
return; return;
} }
...@@ -676,12 +676,12 @@ ...@@ -676,12 +676,12 @@
this.ruleForm.brand_s = JSON.stringify(brand_ss); this.ruleForm.brand_s = JSON.stringify(brand_ss);
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
} else { } else {
Message("该订单不可修改"); this.$message("该订单不可修改");
return; return;
} }
...@@ -690,7 +690,7 @@ ...@@ -690,7 +690,7 @@
del() { del() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据"); this.$message("请至少选择一条数据");
return; return;
} }
...@@ -705,17 +705,17 @@ ...@@ -705,17 +705,17 @@
ids: arr.join(",") ids: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("删除成功"); this.$message("删除成功");
this.getData(); this.getData();
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}) })
}, },
handle(index, row) { handle(index, row) {
if(row.disabled){ if(row.disabled){
Message('已绑定,不能重复操作') this.$message('已绑定,不能重复操作')
return return
} }
this.currentDataId=row.id this.currentDataId=row.id
...@@ -762,7 +762,7 @@ ...@@ -762,7 +762,7 @@
this.ruleForm.brand_s = JSON.stringify(brand_ss); this.ruleForm.brand_s = JSON.stringify(brand_ss);
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
} }
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
Autocomplete, Autocomplete,
Tooltip Tooltip
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete).use(Tooltip); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Autocomplete).use(Tooltip);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination);
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = res.data.total; this.total = res.data.total;
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
exportChange() { exportChange() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据"); this.$message("请至少选择一条数据");
return; return;
} }
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
close() { close() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据"); this.$message("请至少选择一条数据");
return; return;
} }
...@@ -206,10 +206,10 @@ ...@@ -206,10 +206,10 @@
ids: arr.join(",") ids: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("关闭成功"); this.$message("关闭成功");
this.getData(); this.getData();
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
del() { del() {
var arr = []; var arr = [];
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据"); this.$message("请至少选择一条数据");
return; return;
} }
...@@ -232,10 +232,10 @@ ...@@ -232,10 +232,10 @@
ids: arr.join(",") ids: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("删除成功"); this.$message("删除成功");
this.getData(); this.getData();
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}) })
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
Upload, Upload,
Pagination Pagination
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination) Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination)
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Upload) Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Upload)
export default { export default {
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = Number(res.data.total) || 0; this.total = Number(res.data.total) || 0;
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -148,21 +149,21 @@ ...@@ -148,21 +149,21 @@
return return
} }
if (file.response.err_code === 0) { if (file.response.err_code === 0) {
Message("导入成功") this.$message("导入成功")
this.page = 1; this.page = 1;
this.getData(); this.getData();
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}, },
checkdr() { checkdr() {
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
Message("只能选择一条数据导入") this.$message("只能选择一条数据导入")
return return
} }
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据导入") this.$message("请至少选择一条数据导入")
return return
} }
this.downHref = NODE_ENVS + '/api/uploadSku/downResult?id=' + this.multipleSelection[0]['id']+'&token='+Tool.getCookie('token') this.downHref = NODE_ENVS + '/api/uploadSku/downResult?id=' + this.multipleSelection[0]['id']+'&token='+Tool.getCookie('token')
...@@ -173,7 +174,7 @@ ...@@ -173,7 +174,7 @@
}, },
del() { del() {
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据") this.$message("请至少选择一条数据")
return return
} }
var arr = []; var arr = [];
...@@ -189,10 +190,10 @@ ...@@ -189,10 +190,10 @@
log_ids: arr.join(",") log_ids: arr.join(",")
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("删除成功"); this.$message("删除成功");
this.getData() this.getData()
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}) })
......
...@@ -231,6 +231,7 @@ ...@@ -231,6 +231,7 @@
Autocomplete Autocomplete
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete) Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete)
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination) Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination)
export default { export default {
...@@ -287,7 +288,7 @@ ...@@ -287,7 +288,7 @@
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
this.total = Number(res.data.count) || 0; this.total = Number(res.data.count) || 0;
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -334,7 +335,7 @@ ...@@ -334,7 +335,7 @@
}, },
downOut() { downOut() {
if (this.disabled) { if (this.disabled) {
Message("正在导出中,请不要重复点击"); this.$message("正在导出中,请不要重复点击");
return return
} }
this.$http('get', "/api/sku/exportSku", { this.$http('get', "/api/sku/exportSku", {
...@@ -349,7 +350,7 @@ ...@@ -349,7 +350,7 @@
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
this.disabled = true this.disabled = true
Message("正在导出中,请耐心等待") this.$message("正在导出中,请耐心等待")
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.disabled) { if (!this.disabled) {
clearInterval(this.timer) clearInterval(this.timer)
...@@ -366,7 +367,7 @@ ...@@ -366,7 +367,7 @@
}).then(res => { }).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
this.disabled = false this.disabled = false
Message("导出成功") this.$message("导出成功")
this.downHref = res.data this.downHref = res.data
setTimeout(() => { setTimeout(() => {
this.$refs.downs.click() this.$refs.downs.click()
...@@ -375,11 +376,11 @@ ...@@ -375,11 +376,11 @@
//window.location.href = res.data //window.location.href = res.data
} else if (res.err_code == -1) { } else if (res.err_code == -1) {
//导出失败 //导出失败
Message(res.data) this.$message(res.data)
this.disabled = false this.disabled = false
} }
}, error => { }, error => {
Message('网络出现问题,请检查网络'); this.$message('网络出现问题,请检查网络');
this.disabled = false this.disabled = false
}) })
...@@ -397,7 +398,7 @@ ...@@ -397,7 +398,7 @@
}, },
handleCommand(command) { handleCommand(command) {
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据") this.$message("请至少选择一条数据")
return return
} }
this.selectData = JSON.parse(JSON.stringify(this.multipleSelection)); this.selectData = JSON.parse(JSON.stringify(this.multipleSelection));
...@@ -425,11 +426,11 @@ ...@@ -425,11 +426,11 @@
console.log(arr_) console.log(arr_)
this.$http('post', "/api/sku/updateSku", arr_).then(res => { this.$http('post', "/api/sku/updateSku", arr_).then(res => {
if (res.err_code == 0) { if (res.err_code == 0) {
Message("修改成功"); this.$message("修改成功");
this.getData() this.getData()
this.dialogVisible2 = false this.dialogVisible2 = false
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
...@@ -446,18 +447,18 @@ ...@@ -446,18 +447,18 @@
console.log(arr_) console.log(arr_)
this.$http('post', "/api/sku/updateSku", arr_).then(res => { this.$http('post', "/api/sku/updateSku", arr_).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("修改成功"); this.$message("修改成功");
this.getData() this.getData()
this.dialogVisible = false this.dialogVisible = false
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
changeStatus(status) { changeStatus(status) {
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
Message("请至少选择一条数据") this.$message("请至少选择一条数据")
return return
} }
var arr = []; var arr = [];
...@@ -469,10 +470,10 @@ ...@@ -469,10 +470,10 @@
status: status == 1 ? 'passed' : 'offshelf' status: status == 1 ? 'passed' : 'offshelf'
}).then(res => { }).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
Message("操作成功"); this.$message("操作成功");
this.getData() this.getData()
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
} }
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
Message, Message,
Pagination Pagination
} from 'element-ui' } from 'element-ui'
Vue.prototype.$message=Message
Vue.use(Pagination).use(TableColumn).use(Table) Vue.use(Pagination).use(TableColumn).use(Table)
export default { export default {
name: "listDetail", name: "listDetail",
...@@ -109,7 +110,7 @@ ...@@ -109,7 +110,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
this.detailInfo = res.data this.detailInfo = res.data
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
...@@ -137,7 +138,7 @@ ...@@ -137,7 +138,7 @@
this.maxPrice.push(g) this.maxPrice.push(g)
} }
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
}, },
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
import Vue from 'vue'; import Vue from 'vue';
import {Loading, Message} from 'element-ui'; import {Loading, Message} from 'element-ui';
import Util from "../../tool"; import Util from "../../tool";
Vue.prototype.$message=Message
export default { export default {
name: "index", name: "index",
data() { data() {
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
window.location.href = res.data.wx_login_url; window.location.href = res.data.wx_login_url;
} else { } else {
Message(res.err_msg); this.$message(res.err_msg);
} }
}) })
} else { } else {
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="http://yunxin.liexindev.net/favicon.ico"> <link rel="icon" href="http://yunxin.liexindev.net/favicon.ico">
<title>cloudsystem</title> <title>cloudsystem</title>
<link href="http://yunxin.liexindev.net/js/0.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/1.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/10.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/11.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/12.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/13.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/14.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/15.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/16.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/17.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/18.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/19.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/2.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/20.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/21.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/22.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/23.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/24.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/25.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/3.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/4.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/5.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/6.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/7.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/8.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/9.js" rel="prefetch"><link href="http://yunxin.liexindev.net/app.d798c12a0562670b797e.js" rel="preload" as="script"></head> <link href="http://yunxin.liexindev.net/js/0.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/1.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/10.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/11.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/12.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/13.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/14.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/15.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/16.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/17.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/18.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/19.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/2.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/20.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/21.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/22.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/23.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/24.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/25.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/3.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/4.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/5.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/6.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/7.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/8.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/9.js" rel="prefetch"><link href="http://yunxin.liexindev.net/app.d8cc6b26c012e569520d.js" rel="preload" as="script"></head>
<body> <body>
<noscript> <noscript>
<strong>网络异常,请稍后加载</strong> <strong>网络异常,请稍后加载</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script type="text/javascript" src="http://yunxin.liexindev.net/app.d798c12a0562670b797e.js"></script></body> <script type="text/javascript" src="http://yunxin.liexindev.net/app.d8cc6b26c012e569520d.js"></script></body>
</html> </html>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_pagination2.default).use(_tableColumn2.default).use(_table2.default);\n\nvar _default = {\n name: \"listDetail\",\n\n data() {\n return {\n detailInfo: \"\",\n total: 0,\n limit: 10,\n page: 1,\n tableData: \"\",\n maxPrice: []\n };\n },\n\n watch: {},\n\n created() {\n this.getInfo();\n this.getList();\n },\n\n computed: {},\n methods: {\n getInfo() {\n this.$http('get', \"/api/uploadSku/info\", {\n id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.detailInfo = res.data;\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n getList() {\n this.$http('get', \"/api/uploadSku/itemList\", {\n page: this.page,\n limit: this.limit,\n up_sn: this.$route.query.sn\n }).then(res => {\n if (res.err_code === 0) {\n var arr = res.data.list || [];\n\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]['ladder_price']) {\n for (var j = 0; j < arr[i]['ladder_price'].length; j++) {\n arr[i]['purchases' + (j + 1)] = arr[i]['ladder_price'][j]['purchases'];\n arr[i]['price_cn' + (j + 1)] = arr[i]['ladder_price'][j]['price_cn'];\n arr[i]['price_us' + (j + 1)] = arr[i]['ladder_price'][j]['price_us'];\n }\n }\n }\n\n this.tableData = arr;\n this.total = res.data.total || 0;\n var max_ = res.data.max_price_count || 0;\n\n for (var g = 0; g < max_; g++) {\n this.maxPrice.push(g);\n }\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getList();\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/listDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_pagination2.default).use(_tableColumn2.default).use(_table2.default);\n\nvar _default = {\n name: \"listDetail\",\n\n data() {\n return {\n detailInfo: \"\",\n total: 0,\n limit: 10,\n page: 1,\n tableData: \"\",\n maxPrice: []\n };\n },\n\n watch: {},\n\n created() {\n this.getInfo();\n this.getList();\n },\n\n computed: {},\n methods: {\n getInfo() {\n this.$http('get', \"/api/uploadSku/info\", {\n id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.detailInfo = res.data;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n getList() {\n this.$http('get', \"/api/uploadSku/itemList\", {\n page: this.page,\n limit: this.limit,\n up_sn: this.$route.query.sn\n }).then(res => {\n if (res.err_code === 0) {\n var arr = res.data.list || [];\n\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]['ladder_price']) {\n for (var j = 0; j < arr[i]['ladder_price'].length; j++) {\n arr[i]['purchases' + (j + 1)] = arr[i]['ladder_price'][j]['purchases'];\n arr[i]['price_cn' + (j + 1)] = arr[i]['ladder_price'][j]['price_cn'];\n arr[i]['price_us' + (j + 1)] = arr[i]['ladder_price'][j]['price_us'];\n }\n }\n }\n\n this.tableData = arr;\n this.total = res.data.total || 0;\n var max_ = res.data.max_price_count || 0;\n\n for (var g = 0; g < max_; g++) {\n this.maxPrice.push(g);\n }\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getList();\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/listDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }), /***/ }),
......
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