Commit 3741487c by liangjianmin

style: 统一代码格式并修复空格问题

修复多个组件中的代码格式问题,包括:
1. 统一缩进为2个空格
2. 修复对象和数组声明中的多余空格
3. 保持组件导入和使用的格式一致
4. 移除多余空行和注释
parent 0e018907
Showing with 1816 additions and 1831 deletions
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page"></el-pagination> <el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div> </div>
</div> </div>
<Menu/> <Menu />
<el-dialog title="消息详情" :close-on-click-modal="false" :visible.sync="dialogVisible" width="1000px"> <el-dialog title="消息详情" :close-on-click-modal="false" :visible.sync="dialogVisible" width="1000px">
<el-descriptions size="medium" border :column="2"> <el-descriptions size="medium" border :column="2">
<el-descriptions-item> <el-descriptions-item>
...@@ -58,92 +58,90 @@ ...@@ -58,92 +58,90 @@
</section> </section>
</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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "news", name: "news",
data() { data() {
return { return {
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
dialogVisible: false, dialogVisible: false,
msgDetail: {}, msgDetail: {},
formParam: { formParam: {
msg_type: '', msg_type: '',
date: '' date: ''
}
};
},
created() {
this.getData()
},
methods: {
getData() {
var params = Object.assign({},
{page: this.page, limit: this.limit},
this.formParam,
{start_time: this.formParam.date ? this.formParam.date[0] : ''},
{end_time: this.formParam.date ? this.formParam.date[1] : ''}
);
this.$http('GET', "/api/message/getMsgList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
} }
}) };
},
getMsgDetail(msg_id) {
this.$http('GET', "/api/message/getMsgDetail", {msg_id: msg_id}).then(res => {
if (res.code === 0) {
this.msgDetail = res.data;
this.dialogVisible = true;
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
viewChange(index, row) {
this.getMsgDetail(row.id);
}, },
onSubmit() { created() {
this.page = 1; this.getData()
this.getData();
}, },
resetForm(formName) { methods: {
this.formParam.date = ''; getData() {
this.$refs[formName].resetFields(); var params = Object.assign({},
}, { page: this.page, limit: this.limit },
handleSizeChange(val) { this.formParam,
this.limit = val; { start_time: this.formParam.date ? this.formParam.date[0] : '' },
this.getData(); { end_time: this.formParam.date ? this.formParam.date[1] : '' }
);
this.$http('GET', "/api/message/getMsgList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
getMsgDetail(msg_id) {
this.$http('GET', "/api/message/getMsgDetail", { msg_id: msg_id }).then(res => {
if (res.code === 0) {
this.msgDetail = res.data;
this.dialogVisible = true;
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
viewChange(index, row) {
this.getMsgDetail(row.id);
},
onSubmit() {
this.page = 1;
this.getData();
},
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
handleSizeChange(val) {
this.limit = val;
this.getData();
},
handleCurrentChange(val) {
this.page = val;
this.getData();
}
}, },
handleCurrentChange(val) { components: {
this.page = val; Menu
this.getData();
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="notice-content" v-html="noticeMsg.content"></div> <div class="notice-content" v-html="noticeMsg.content"></div>
<div class="enclosure row verCenter"> <div class="enclosure row verCenter">
<span>附件:</span> <span>附件:</span>
<a class="down" :href="noticeMsg.attachment_url " target="_blank">{{ noticeMsg.attachment_name || '暂无附件' }}</a> <a class="down" :href="noticeMsg.attachment_url" target="_blank">{{ noticeMsg.attachment_name || '暂无附件' }}</a>
</div> </div>
<div class="notice-bottom row bothSide verCenter"> <div class="notice-bottom row bothSide verCenter">
<span>发件人:深圳市猎芯科技有限公司</span> <span>发件人:深圳市猎芯科技有限公司</span>
...@@ -32,71 +32,69 @@ ...@@ -32,71 +32,69 @@
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
<Menu/> <Menu />
</section> </section>
</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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "notice", name: "notice",
data() { data() {
return { return {
noticeMsg: [],//系统公告消息 noticeMsg: [],//系统公告消息
dialogNoticeVisible: false, dialogNoticeVisible: false,
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [] list: []
}; };
},
created() {
this.getData()
},
methods: {
getData() {
this.$http('get', "/api/system/getNoticeList", {
page: this.page,
limit: this.limit,
}).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.list = res.data.list;
this.total = Number(res.data.count) || 0;
}
} else {
this.$message({
message: res.msg,
type: 'warning'
});
}
})
}, },
view(row) { created() {
this.dialogNoticeVisible = true; this.getData()
this.noticeMsg = row;
}, },
handleSizeChange(val) { methods: {
this.limit = val; getData() {
this.getData(); this.$http('get', "/api/system/getNoticeList", {
page: this.page,
limit: this.limit,
}).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.list = res.data.list;
this.total = Number(res.data.count) || 0;
}
} else {
this.$message({
message: res.msg,
type: 'warning'
});
}
})
},
view(row) {
this.dialogNoticeVisible = true;
this.noticeMsg = row;
},
handleSizeChange(val) {
this.limit = val;
this.getData();
},
handleCurrentChange(val) {
this.page = val;
this.getData();
}
}, },
handleCurrentChange(val) { components: {
this.page = val; Menu
this.getData();
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped lang="less"> <style scoped lang="less"></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -64,138 +64,138 @@ ...@@ -64,138 +64,138 @@
</section> </section>
</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 {Autocomplete, Button, Cascader, DatePicker, Dialog, Form, FormItem, Input, Message, Option, Pagination, Select, Table, TableColumn} from 'element-ui' import { Autocomplete, Button, Cascader, DatePicker, Dialog, Form, FormItem, Input, Message, Option, Pagination, Select, Table, TableColumn } 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(DatePicker); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination).use(DatePicker);
Vue.use(TableColumn).use(Table).use(Cascader).use(Autocomplete); Vue.use(TableColumn).use(Table).use(Cascader).use(Autocomplete);
export default { export default {
name: "orderTrackPurAdd", name: "orderTrackPurAdd",
data() { data() {
return { return {
purOrderDetail: {},//基本信息,发货信息 purOrderDetail: {},//基本信息,发货信息
purchase_uid: '', purchase_uid: '',
multipleSelection: [],//选中的数据 multipleSelection: [],//选中的数据
pickerOption: { pickerOption: {
disabledDate(time) { disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7; return time.getTime() < Date.now() - 8.64e7;
}
},
rules: {
shipping_id: [
{required: true, message: '请选择物流公司', trigger: 'change'}
],
shipment_number: [
{required: true, message: '请输入物流单号', trigger: 'change'}
]
},
itemlist: [],
formParam: {
company_id: '',
shipping_id: '',
shipment_number: '',
delivery_time: '',
itemlist: []
}
};
},
created() {
this.purchase_uid = this.$route.query.purchase_id;
this.getData();
},
methods: {
getData() {
this.$http('POST', "/api/purchase/purOrderDetail", {
id: this.purchase_uid
}).then(res => {
if (res.code === 0) {
this.purOrderDetail = res.data;
this.formParam.company_id = res.data.purchase_info.company_id;
//组装formParam
for (let i = 0; i < res.data.purchase_item_list.length; i++) {
this.itemlist.push({
"purchase_item_id": res.data.purchase_item_list[i].purchase_item_id,
"purchase_id": res.data.purchase_item_list[i].purchase_id,
"out_qty": res.data.purchase_item_list[i].purchase_qty - res.data.purchase_item_list[i].out_qty
})
} }
} else { },
this.$message({ rules: {
message: res.msg, shipping_id: [
type: 'warning' { required: true, message: '请选择物流公司', trigger: 'change' }
}); ],
shipment_number: [
{ required: true, message: '请输入物流单号', trigger: 'change' }
]
},
itemlist: [],
formParam: {
company_id: '',
shipping_id: '',
shipment_number: '',
delivery_time: '',
itemlist: []
} }
}) };
}, },
handleCurrentChange(val) { created() {
this.page = val; this.purchase_uid = this.$route.query.purchase_id;
this.getData(); this.getData();
}, },
handleSelectionChange(val) { methods: {
this.multipleSelection = val; getData() {
}, this.$http('POST', "/api/purchase/purOrderDetail", {
submit(formName) { id: this.purchase_uid
var self = this; }).then(res => {
this.$refs[formName].validate((valid) => { if (res.code === 0) {
if (valid) { this.purOrderDetail = res.data;
if (this.multipleSelection.length <= 0) { this.formParam.company_id = res.data.purchase_info.company_id;
//组装formParam
for (let i = 0; i < res.data.purchase_item_list.length; i++) {
this.itemlist.push({
"purchase_item_id": res.data.purchase_item_list[i].purchase_item_id,
"purchase_id": res.data.purchase_item_list[i].purchase_id,
"out_qty": res.data.purchase_item_list[i].purchase_qty - res.data.purchase_item_list[i].out_qty
})
}
} else {
this.$message({ this.$message({
message: "请选择发货信息", message: res.msg,
type: 'warning' type: 'warning'
}); });
return false;
} }
let filterArr = []; })
for (let i = 0; i < this.itemlist.length; i++) { },
for (let j = 0; j < this.multipleSelection.length; j++) { handleCurrentChange(val) {
if (this.multipleSelection[j].purchase_item_id == this.itemlist[i].purchase_item_id) { this.page = val;
filterArr.push(this.itemlist[i]) this.getData();
} },
} handleSelectionChange(val) {
} this.multipleSelection = val;
this.formParam.itemlist = filterArr; },
this.$http('POST', "/api/purchase/addSupDelivery", this.formParam).then(res => { submit(formName) {
if (res.code === 0) { var self = this;
this.$message({ this.$refs[formName].validate((valid) => {
message: res.msg, if (valid) {
type: 'success', if (this.multipleSelection.length <= 0) {
duration: 2000,
onClose() {
document.querySelector('.item-boxs a.act .iconfont').click();
self.$router.push({
path: "/orderTrackGoods"
})
}
});
} else {
this.$message({ this.$message({
message: res.msg, message: "请选择发货信息",
type: 'error' type: 'warning'
}); });
return false;
} }
let filterArr = [];
for (let i = 0; i < this.itemlist.length; i++) {
for (let j = 0; j < this.multipleSelection.length; j++) {
if (this.multipleSelection[j].purchase_item_id == this.itemlist[i].purchase_item_id) {
filterArr.push(this.itemlist[i])
}
}
}
this.formParam.itemlist = filterArr;
this.$http('POST', "/api/purchase/addSupDelivery", this.formParam).then(res => {
if (res.code === 0) {
this.$message({
message: res.msg,
type: 'success',
duration: 2000,
onClose() {
document.querySelector('.item-boxs a.act .iconfont').click();
self.$router.push({
path: "/orderTrackGoods"
})
}
});
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
} else {
console.log('error submit!!');
return false;
}
});
},
canel() {
document.querySelector('.item-boxs a.act .iconfont').click();
setTimeout(() => {
this.$router.push({
path: "/orderTrackGoods"
}) })
} else { }, 1000)
console.log('error submit!!'); }
return false;
}
});
}, },
canel() { components: {
document.querySelector('.item-boxs a.act .iconfont').click(); Menu
setTimeout(() => {
this.$router.push({
path: "/orderTrackGoods"
})
}, 1000)
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped>
@import "../../assets/css/goods/goods.min.css"; @import "../../assets/css/goods/goods.min.css";
</style> </style>
\ No newline at end of file
...@@ -39,113 +39,113 @@ ...@@ -39,113 +39,113 @@
</el-table> </el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page"></el-pagination> <el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div> </div>
<Menu/> <Menu />
</div> </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 {Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip } from 'element-ui'
import {NODE_ENVS} from "@/ajax"; import { NODE_ENVS } from "@/ajax";
import Tool from "@/tool"; import Tool from "@/tool";
Vue.prototype.$message = Message; Vue.prototype.$message = Message;
Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip); Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip);
export default { export default {
name: "goodDetail", name: "goodDetail",
data() { data() {
return { return {
total: 0, total: 0,
limit: 10, limit: 10,
page: 1, page: 1,
importDetail: {}, importDetail: {},
tableData: [], tableData: [],
multipleSelection: [] multipleSelection: []
}; };
},
watch: {
$route(to, from) {
if (to.path == '/goodDetail') {
this.getData();
}
}
},
created() {
this.getData()
},
methods: {
/**
* 获取列表数据
*/
getData() {
this.$http('GET', "/api/bestgoods/importDetail", {
page: this.page,
limit: this.limit,
import_sn: this.$route.query.import_sn
}).then(res => {
if (res.code === 0) {
this.importDetail = res.data;
this.tableData = res.data.list;
this.total = res.data.count || 0;
} else {
this.$message({
message: res.msg,
type: 'warning'
});
}
})
}, },
/** watch: {
* 导出文件 $route(to, from) {
*/ if (to.path == '/goodDetail') {
exportChange() { this.getData();
var url = NODE_ENVS + '/api/bestgoods/exportFailedGoods?import_sn=' + this.$route.query.import_sn + '&token=' + Tool.getCookie('token'); }
const newsUrl = this.$router.resolve(url); }
window.open(url);
}, },
handleSizeChange(val) { created() {
this.limit = val; this.getData()
this.getList();
}, },
handleCurrentChange(val) { methods: {
this.page = val; /**
this.getList(); * 获取列表数据
*/
getData() {
this.$http('GET', "/api/bestgoods/importDetail", {
page: this.page,
limit: this.limit,
import_sn: this.$route.query.import_sn
}).then(res => {
if (res.code === 0) {
this.importDetail = res.data;
this.tableData = res.data.list;
this.total = res.data.count || 0;
} else {
this.$message({
message: res.msg,
type: 'warning'
});
}
})
},
/**
* 导出文件
*/
exportChange() {
var url = NODE_ENVS + '/api/bestgoods/exportFailedGoods?import_sn=' + this.$route.query.import_sn + '&token=' + Tool.getCookie('token');
const newsUrl = this.$router.resolve(url);
window.open(url);
},
handleSizeChange(val) {
this.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.page = val;
this.getList();
},
}, },
}, components: {
components: { Menu
Menu }
} };
};
</script> </script>
<style scoped> <style scoped>
@import "../../assets/css/store/listDetail.min.css"; @import "../../assets/css/store/listDetail.min.css";
.btn-nav { .btn-nav {
background: #FFFFFF; background: #FFFFFF;
padding: 0 0 20px 20px; padding: 0 0 20px 20px;
} }
::v-deep .el-descriptions-item__label { ::v-deep .el-descriptions-item__label {
white-space: nowrap; white-space: nowrap;
} }
::v-deep .el-descriptions-item__content { ::v-deep .el-descriptions-item__content {
white-space: nowrap; white-space: nowrap;
} }
.downTemplateExport { .downTemplateExport {
width: 92px; width: 92px;
height: 28px; height: 28px;
text-align: center; text-align: center;
line-height: 28px; line-height: 28px;
color: #FFF; color: #FFF;
background-color: #409EFF; background-color: #409EFF;
border-color: #409EFF; border-color: #409EFF;
font-size: 12px; font-size: 12px;
border-radius: 3px; border-radius: 3px;
margin-right: 10px; margin-right: 10px;
display: block; display: block;
cursor: pointer; cursor: pointer;
} }
</style> </style>
\ No newline at end of file
...@@ -31,28 +31,28 @@ ...@@ -31,28 +31,28 @@
watch: {}, watch: {},
created() { created() {
this.getData(); this.getData();
var code_=this.$route.query.err_type var code_ = this.$route.query.err_type
if(code_==1){ if (code_ == 1) {
this.text='微信授权失败' this.text = '微信授权失败'
}else if(code_==2){ } else if (code_ == 2) {
this.text='芯链token校验失败' this.text = '芯链token校验失败'
} }
else if(code_==3){ else if (code_ == 3) {
this.text='请求access_token失败' this.text = '请求access_token失败'
} }
else if(code_==4){ else if (code_ == 4) {
this.text='open_id已绑定其他账号,不能重复绑定' this.text = 'open_id已绑定其他账号,不能重复绑定'
} }
else if(code_==5){ else if (code_ == 5) {
this.text='更新绑定关系失败' this.text = '更新绑定关系失败'
} }
else if(code_==6){ else if (code_ == 6) {
this.text='添加绑定关系失败' this.text = '添加绑定关系失败'
} }
else if(code_==7){ else if (code_ == 7) {
this.text='获取微信信息失败' this.text = '获取微信信息失败'
} }
}, },
computed: {}, computed: {},
methods: { methods: {
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
this.$http('get', "/api/login/getwxqrcode").then(res => { this.$http('get', "/api/login/getwxqrcode").then(res => {
if (res.code === 0) { if (res.code === 0) {
this.hrefs = res.data.wx_login_url; this.hrefs = res.data.wx_login_url;
} }
}) })
} }
......
<template> <template>
<div class="notfound"> <div class="notfound">
<img src="../../assets/images/notfound.png" alt=""> <img src="../../assets/images/notfound.png" alt="">
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "notfound", name: "notfound",
data() { data() {
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
}; };
</script> </script>
<style> <style>
.notfound { .notfound {
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
} }
.notfound img { .notfound img {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
</style> </style>
\ No newline at end of file
...@@ -56,121 +56,119 @@ ...@@ -56,121 +56,119 @@
</div> </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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "allPayableBills", name: "allPayableBills",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
formParam: { formParam: {
goods_name: '', goods_name: '',
type: '', type: '',
status: '', status: '',
create_time: [] create_time: []
}
};
},
created() {
this.getData()
},
methods: {
getData() {
// 处理日期范围
let params = Object.assign({}, this.formParam);
if (params.create_time && params.create_time.length === 2) {
params.create_time = params.create_time.join(' ~ ');
}
params = Object.assign(params, {page: this.page, limit: this.limit});
this.$http('GET', "/api/bill/getUnPayBillList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
} }
}) };
}, },
/** created() {
* 型号监听 this.getData()
* @param queryString },
* @param cb methods: {
*/ getData() {
querySearchAsync(queryString, cb) { // 处理日期范围
if (!queryString) { let params = Object.assign({}, this.formParam);
cb([]); if (params.create_time && params.create_time.length === 2) {
return; params.create_time = params.create_time.join(' ~ ');
} }
this.$http('GET', "/api/search/getspu", {spu_name: queryString}).then(res => { params = Object.assign(params, { page: this.page, limit: this.limit });
if (res.code == 0 && res.data.list?.length) { this.$http('GET', "/api/bill/getUnPayBillList", params).then(res => {
const arr = res.data.list.map(item => ({ if (res.code === 0) {
value: item.spu_name this.list = res.data.list || [];
})); this.total = Number(res.data.total) || 0;
cb(arr); } else {
} else { this.$message({
message: res.msg,
type: 'error'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]); cb([]);
return;
} }
}).catch(() => { this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => {
cb([]); if (res.code == 0 && res.data.list?.length) {
}); const arr = res.data.list.map(item => ({
}, value: item.spu_name
/** }));
* 搜索 cb(arr);
*/ } else {
onSubmit() { cb([]);
this.page = 1; }
this.getData(); }).catch(() => {
}, cb([]);
/** });
* 重置表单 },
* @param formName /**
*/ * 搜索
resetForm(formName) { */
this.formParam.date = ''; onSubmit() {
this.$refs[formName].resetFields(); this.page = 1;
}, this.getData();
/** },
* 列表分页条数筛选监听 /**
* @param val * 重置表单
*/ * @param formName
handleSizeChange(val) { */
this.limit = val; resetForm(formName) {
this.getData(); this.formParam.date = '';
}, this.$refs[formName].resetFields();
/** },
* 列表分页输入页码监听 /**
* @param val * 列表分页条数筛选监听
*/ * @param val
handleCurrentChange(val) { */
this.page = val; handleSizeChange(val) {
this.getData(); this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
}
}, },
/** components: {
* chebox 选择监听 Menu
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -23,136 +23,134 @@ ...@@ -23,136 +23,134 @@
</div> </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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
import {NODE_ENVS} from "@/ajax"; import { NODE_ENVS } from "@/ajax";
import Tool from "@/tool"; import Tool from "@/tool";
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "fileManagement", name: "fileManagement",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
formParam: { formParam: {
bill_sn: '', bill_sn: '',
status: '', status: '',
goods_name: '', goods_name: '',
create_time: [] create_time: []
}
};
},
created() {
this.getData()
},
methods: {
getData() {
this.$http('GET', "/api/fileManage/getFileList", {}).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
} }
}) };
}, },
/** created() {
* 型号监听 this.getData()
* @param queryString },
* @param cb methods: {
*/ getData() {
querySearchAsync(queryString, cb) { this.$http('GET', "/api/fileManage/getFileList", {}).then(res => {
if (!queryString) { if (res.code === 0) {
cb([]); this.list = res.data.list || [];
return; this.total = Number(res.data.total) || 0;
} } else {
this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => { this.$message({
if (res.code == 0 && res.data.list?.length) { message: res.msg,
const arr = res.data.list.map(item => ({ type: 'error'
value: item.spu_name });
})); }
cb(arr); })
} else { },
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]); cb([]);
return;
} }
}).catch(() => { this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => {
cb([]); if (res.code == 0 && res.data.list?.length) {
}); const arr = res.data.list.map(item => ({
}, value: item.spu_name
/** }));
* 操作按钮监听 cb(arr);
*/ } else {
handleCommand(command) { cb([]);
let bill_id = this.multipleSelection.map(item => item.bill_id).join(','); }
if (!bill_id) { }).catch(() => {
this.$message({ cb([]);
message: '请选择账单',
type: 'warning'
}); });
return; },
} /**
if (this.multipleSelection.length > 1) { * 操作按钮监听
this.$message.warning('不支持批量导出操作'); */
return; handleCommand(command) {
let bill_id = this.multipleSelection.map(item => item.bill_id).join(',');
if (!bill_id) {
this.$message({
message: '请选择账单',
type: 'warning'
});
return;
}
if (this.multipleSelection.length > 1) {
this.$message.warning('不支持批量导出操作');
return;
}
let url = NODE_ENVS + '/api/bill/exportVerifiedBill?bill_id=' + bill_id + '&token=' + Tool.getCookie('token') + '&type=' + command;
Tool.openNewWindow(url);
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
},
/**
* 重置表单
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
} }
let url = NODE_ENVS + '/api/bill/exportVerifiedBill?bill_id=' + bill_id + '&token=' + Tool.getCookie('token') + '&type=' + command;
Tool.openNewWindow(url);
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
}, },
/** components: {
* 重置表单 Menu
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<el-table-column type="index" label="序号" width="50" align="center" fixed></el-table-column> <el-table-column type="index" label="序号" width="50" align="center" fixed></el-table-column>
<el-table-column prop="bill_sn" label="账单号" width="120" :show-overflow-tooltip="true" align="center"> <el-table-column prop="bill_sn" label="账单号" width="120" :show-overflow-tooltip="true" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" :underline="false" @click="$router.push({path: '/reconciledBillDetail', query: {bill_id: scope.row.bill_id,bill_sn:scope.row.bill_sn}})" style="font-size: 12px;">{{ scope.row.bill_sn }}</el-link> <el-link type="primary" :underline="false" @click="$router.push({ path: '/reconciledBillDetail', query: { bill_id: scope.row.bill_id, bill_sn: scope.row.bill_sn } })" style="font-size: 12px;">{{ scope.row.bill_sn }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bill_name" label="账单名称" min-width="170" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="bill_name" label="账单名称" min-width="170" :show-overflow-tooltip="true" align="center"></el-table-column>
...@@ -62,151 +62,149 @@ ...@@ -62,151 +62,149 @@
</div> </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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
import {NODE_ENVS} from "@/ajax"; import { NODE_ENVS } from "@/ajax";
import Tool from "@/tool"; import Tool from "@/tool";
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "reconciledBill", name: "reconciledBill",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
formParam: { formParam: {
bill_sn: '', bill_sn: '',
status: '', status: '',
goods_name: '', goods_name: '',
create_time: [] create_time: []
}
};
},
created() {
this.getData()
},
methods: {
getData() {
// 处理日期范围
let params = Object.assign({}, this.formParam);
if (params.create_time && params.create_time.length === 2) {
params.create_time = params.create_time.join(' ~ ');
}
params = Object.assign(params, {page: this.page, limit: this.limit});
this.$http('GET', "/api/bill/getVerifiedBillList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
} }
}) };
}, },
/** created() {
* 型号监听 this.getData()
* @param queryString },
* @param cb methods: {
*/ getData() {
querySearchAsync(queryString, cb) { // 处理日期范围
if (!queryString) { let params = Object.assign({}, this.formParam);
cb([]); if (params.create_time && params.create_time.length === 2) {
return; params.create_time = params.create_time.join(' ~ ');
} }
this.$http('GET', "/api/search/getspu", {spu_name: queryString}).then(res => { params = Object.assign(params, { page: this.page, limit: this.limit });
if (res.code == 0 && res.data.list?.length) {
const arr = res.data.list.map(item => ({ this.$http('GET', "/api/bill/getVerifiedBillList", params).then(res => {
value: item.spu_name if (res.code === 0) {
})); this.list = res.data.list || [];
cb(arr); this.total = Number(res.data.total) || 0;
} else { } else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]); cb([]);
return;
} }
}).catch(() => { this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => {
cb([]); if (res.code == 0 && res.data.list?.length) {
}); const arr = res.data.list.map(item => ({
}, value: item.spu_name
/** }));
* 操作按钮监听 cb(arr);
*/ } else {
handleCommand(command) { cb([]);
let bill_id = this.multipleSelection.map(item => item.bill_id).join(','); }
if (!bill_id) { }).catch(() => {
this.$message({ cb([]);
message: '请选择账单',
type: 'warning'
}); });
return; },
} /**
if (this.multipleSelection.length > 1) { * 操作按钮监听
this.$message.warning('不支持批量导出操作'); */
return; handleCommand(command) {
let bill_id = this.multipleSelection.map(item => item.bill_id).join(',');
if (!bill_id) {
this.$message({
message: '请选择账单',
type: 'warning'
});
return;
}
if (this.multipleSelection.length > 1) {
this.$message.warning('不支持批量导出操作');
return;
}
let url = NODE_ENVS + '/api/bill/exportVerifiedBill?bill_id=' + bill_id + '&token=' + Tool.getCookie('token') + '&type=' + command;
Tool.openNewWindow(url);
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
},
/**
* 重置表单
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 已对账账单-导出(待采购系统确认)
*/
exportVerifiedBill() {
let bill_id = this.multipleSelection.map(item => item.bill_id).join(',');
let url = NODE_ENVS + '/api/bill/exportVerifiedBill?type=2&bill_id=' + bill_id + '&token=' + Tool.getCookie('token');
Tool.openNewWindow(url);
} }
let url = NODE_ENVS + '/api/bill/exportVerifiedBill?bill_id=' + bill_id + '&token=' + Tool.getCookie('token') + '&type=' + command;
Tool.openNewWindow(url);
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
}, },
/** components: {
* 重置表单 Menu
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 已对账账单-导出(待采购系统确认)
*/
exportVerifiedBill() {
let bill_id = this.multipleSelection.map(item => item.bill_id).join(',');
let url = NODE_ENVS + '/api/bill/exportVerifiedBill?type=2&bill_id=' + bill_id + '&token=' + Tool.getCookie('token');
Tool.openNewWindow(url);
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -41,113 +41,111 @@ ...@@ -41,113 +41,111 @@
</div> </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 {Autocomplete, Button, Col, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Row, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, Col, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Row, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(Row).use(Col); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(Row).use(Col);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "reconciledBillDetail", name: "reconciledBillDetail",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
recall_id: '', recall_id: '',
detailData: {}, detailData: {},
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
bill_id: '', bill_id: '',
bill_sn: '' bill_sn: ''
}; };
},
created() {
this.bill_id = this.$route.query.bill_id;
this.bill_sn = this.$route.query.bill_sn;
this.getData()
},
methods: {
getData() {
this.$http('GET', "/api/bill/getVerifiedBillDetail", {bill_id: this.bill_id, bill_sn: this.bill_sn, page: this.page, limit: this.limit}).then(res => {
if (res.code === 0) {
this.detailData = res.data.bill_info;
this.list = res.data.list;
this.total = res.data.total || 0;
} else {
this.$message.error(res.msg);
}
})
}, },
/** created() {
* 型号监听 this.bill_id = this.$route.query.bill_id;
* @param queryString this.bill_sn = this.$route.query.bill_sn;
* @param cb this.getData()
*/ },
querySearchAsync(queryString, cb) { methods: {
if (!queryString) { getData() {
cb([]); this.$http('GET', "/api/bill/getVerifiedBillDetail", { bill_id: this.bill_id, bill_sn: this.bill_sn, page: this.page, limit: this.limit }).then(res => {
return; if (res.code === 0) {
} this.detailData = res.data.bill_info;
this.$http('GET', "/api/search/getspu", {spu_name: queryString}).then(res => { this.list = res.data.list;
if (res.code == 0 && res.data.list?.length) { this.total = res.data.total || 0;
const arr = res.data.list.map(item => ({ } else {
value: item.spu_name this.$message.error(res.msg);
})); }
cb(arr); })
} else { },
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]); cb([]);
return;
} }
}).catch(() => { this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => {
cb([]); if (res.code == 0 && res.data.list?.length) {
}); const arr = res.data.list.map(item => ({
}, value: item.spu_name
/** }));
* 搜索 cb(arr);
*/ } else {
onSubmit() { cb([]);
this.page = 1; }
this.getData(); }).catch(() => {
}, cb([]);
/** });
* 重置表单 },
* @param formName /**
*/ * 搜索
resetForm(formName) { */
this.formParam.date = ''; onSubmit() {
this.$refs[formName].resetFields(); this.page = 1;
}, this.getData();
/** },
* 列表分页条数筛选监听 /**
* @param val * 重置表单
*/ * @param formName
handleSizeChange(val) { */
this.limit = val; resetForm(formName) {
this.getData(); this.formParam.date = '';
}, this.$refs[formName].resetFields();
/** },
* 列表分页输入页码监听 /**
* @param val * 列表分页条数筛选监听
*/ * @param val
handleCurrentChange(val) { */
this.page = val; handleSizeChange(val) {
this.getData(); this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
}
}, },
/** components: {
* chebox 选择监听 Menu
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -36,117 +36,115 @@ ...@@ -36,117 +36,115 @@
<div v-if="is_flag" style="margin-top: 20px;"> <div v-if="is_flag" style="margin-top: 20px;">
<el-button size="small" type="primary" @click="batchRecallSubmit">提交</el-button> <el-button size="small" type="primary" @click="batchRecallSubmit">提交</el-button>
<el-button size="small" type="primary" @click="batchRecallExportFailed">导出失败数据</el-button> <el-button size="small" type="primary" @click="batchRecallExportFailed">导出失败数据</el-button>
<el-button size="small" @click="$router.push({path: '/consignmentRecall'})">取 消</el-button> <el-button size="small" @click="$router.push({ path: '/consignmentRecall' })">取 消</el-button>
</div> </div>
</div> </div>
<Menu ref="menu"></Menu> <Menu ref="menu"></Menu>
</div> </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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip, Upload} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip, Upload } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Upload).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Link).use(Form).use(Upload).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "batchRecall", name: "batchRecall",
data() { data() {
return { return {
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
recall_upload_sn: '',//上传编号 recall_upload_sn: '',//上传编号
is_flag: false is_flag: false
}; };
},
created() {
},
methods: {
/**
* 上传成功
* @param res
* @param file
* @param fileList
*/
handleUploadSuccess(res, file, fileList) {
if (res.code === 0) {
this.$message.success('上传成功');
if (res.data.list.length > 0) {
this.is_flag = true;
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
}
} else {
this.$message.error(res.msg || '上传失败');
}
}, },
/** created() {
* 上传失败
* @param err
* @param file
* @param fileList
*/
handleUploadError(err, file, fileList) {
this.$message.error('上传失败,请重试');
}, },
/** methods: {
* 批量召回-提交 /**
*/ * 上传成功
batchRecallSubmit() { * @param res
this.recall_upload_sn = this.list.filter(item => item.status === 1).map(item => item.recall_upload_sn); * @param file
this.$http('POST', "/api/consignmentRecall/batchRecallSubmit", {recall_upload_sn: this.recall_upload_sn}).then(res => { * @param fileList
*/
handleUploadSuccess(res, file, fileList) {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message.success('上传成功');
message: '操作成功', if (res.data.list.length > 0) {
type: 'success', this.is_flag = true;
onClose: () => { this.list = res.data.list || [];
this.$refs.menu.closetab(this.$route.path); this.total = Number(res.data.total) || 0;
setTimeout(() => { }
if (this.$route.path !== '/consignmentRecall') {
this.$router.push({path: '/consignmentRecall'}).catch(err => {
if (err.name !== 'NavigationDuplicated') {
throw err;
}
});
}
}, 0);
}
});
} else { } else {
this.$message.error(res.msg || '操作失败'); this.$message.error(res.msg || '上传失败');
} }
}) },
}, /**
/** * 上传失败
* 批量召回-导出失败数据 * @param err
*/ * @param file
batchRecallExportFailed() { * @param fileList
this.recall_upload_sn = this.list.filter(item => item.status === 0).map(item => item.recall_upload_sn); */
this.$http('POST', "/api/consignmentRecall/batchRecallExportFailed", {recall_upload_sn: this.recall_upload_sn}).then(res => { handleUploadError(err, file, fileList) {
if (res.code === 0) { this.$message.error('上传失败,请重试');
this.$message({ },
message: '操作成功', /**
type: 'success', * 批量召回-提交
onClose: () => { */
batchRecallSubmit() {
this.recall_upload_sn = this.list.filter(item => item.status === 1).map(item => item.recall_upload_sn);
this.$http('POST', "/api/consignmentRecall/batchRecallSubmit", { recall_upload_sn: this.recall_upload_sn }).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.$refs.menu.closetab(this.$route.path);
setTimeout(() => {
if (this.$route.path !== '/consignmentRecall') {
this.$router.push({ path: '/consignmentRecall' }).catch(err => {
if (err.name !== 'NavigationDuplicated') {
throw err;
}
});
}
}, 0);
}
});
} else {
this.$message.error(res.msg || '操作失败');
}
})
},
/**
* 批量召回-导出失败数据
*/
batchRecallExportFailed() {
this.recall_upload_sn = this.list.filter(item => item.status === 0).map(item => item.recall_upload_sn);
this.$http('POST', "/api/consignmentRecall/batchRecallExportFailed", { recall_upload_sn: this.recall_upload_sn }).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
} }
}); });
} else { } else {
this.$message.error(res.msg || '操作失败'); this.$message.error(res.msg || '操作失败');
} }
}) })
}
},
components: {
Menu
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -48,124 +48,122 @@ ...@@ -48,124 +48,122 @@
</div> </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 {Autocomplete, Button, Col, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Row, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, Col, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Row, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(Row).use(Col); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(Row).use(Col);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "consignmentApplicationDetail", name: "consignmentApplicationDetail",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
consignment_id: '', consignment_id: '',
detailData: {}, detailData: {},
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [] list: []
}; };
},
created() {
this.consignment_id = this.$route.query.consignment_id;
this.getData()
},
methods: {
getData() {
this.$http('GET', "/api/consignment/getConsignmentDetail", { consignment_id: this.consignment_id, page: this.page, limit: this.limit }).then(res => {
if (res.code === 0) {
this.detailData = res.data;
this.list = res.data.items.list;
this.total = res.data.items.total || 0;
} else {
this.$message.error(res.msg);
}
})
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
}, },
/** created() {
* chebox 选择监听 this.consignment_id = this.$route.query.consignment_id;
* @param val this.getData()
*/
handleSelectionChange(val) {
this.multipleSelection = val;
}, },
/** methods: {
* 删除寄售明细 getData() {
*/ this.$http('GET', "/api/consignment/getConsignmentDetail", { consignment_id: this.consignment_id, page: this.page, limit: this.limit }).then(res => {
deleteConsignmentItems() {
if (this.multipleSelection.length === 0) {
this.$message.warning('请选择要删除的数据');
return;
}
// 提交审核:校验待提审状态
if (this.detailData.consignment_status != 0) {
this.$message.warning('只能选择待提审状态的数据');
return;
}
this.$confirm('确定删除已选择的商品明细?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let consignment_item_ids = this.multipleSelection.map(item => item.consignment_item_id).join(',');
this.$http('POST', "/api/consignment/deleteConsignmentItems", { consignment_item_ids: consignment_item_ids }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.detailData = res.data;
message: '操作成功', this.list = res.data.items.list;
type: 'success', this.total = res.data.items.total || 0;
onClose: () => {
this.getData();
}
});
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
}).catch(() => { },
console.log('已取消删除'); /**
}); * 列表分页条数筛选监听
}, * @param val
/** */
* 更新明细寄售数量 handleSizeChange(val) {
*/ this.limit = val;
updateConsignmentItems(consignment_item_id, apply_num) { this.getData();
if (!apply_num || apply_num <= 0) { },
this.$message.warning('请输入有效的数量'); /**
return; * 列表分页输入页码监听
} * @param val
this.$http('POST', "/api/consignment/updateConsignmentItems", { consignment_item_id: consignment_item_id, apply_num: apply_num }).then(res => { */
if (res.code === 0) { handleCurrentChange(val) {
this.page = val;
} else { this.getData();
this.$message.error(res.msg); },
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 删除寄售明细
*/
deleteConsignmentItems() {
if (this.multipleSelection.length === 0) {
this.$message.warning('请选择要删除的数据');
return;
}
// 提交审核:校验待提审状态
if (this.detailData.consignment_status != 0) {
this.$message.warning('只能选择待提审状态的数据');
return;
}
this.$confirm('确定删除已选择的商品明细?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let consignment_item_ids = this.multipleSelection.map(item => item.consignment_item_id).join(',');
this.$http('POST', "/api/consignment/deleteConsignmentItems", { consignment_item_ids: consignment_item_ids }).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.getData();
}
});
} else {
this.$message.error(res.msg);
}
})
}).catch(() => {
console.log('已取消删除');
});
},
/**
* 更新明细寄售数量
*/
updateConsignmentItems(consignment_item_id, apply_num) {
if (!apply_num || apply_num <= 0) {
this.$message.warning('请输入有效的数量');
return;
} }
}) this.$http('POST', "/api/consignment/updateConsignmentItems", { consignment_item_id: consignment_item_id, apply_num: apply_num }).then(res => {
if (res.code === 0) {
} else {
this.$message.error(res.msg);
}
})
}
},
components: {
Menu
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -45,90 +45,88 @@ ...@@ -45,90 +45,88 @@
</div> </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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "consignmentContract", name: "consignmentContract",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
formParam: { formParam: {
status: '' status: ''
}
};
},
created() {
this.getData()
},
methods: {
getData() {
var params = Object.assign({}, this.formParam, {page: this.page, limit: this.limit});
this.$http('GET', "/api/consignmentContract/getConsignmentContractList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
} }
}) };
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
},
/**
* 重置表单
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
}, },
/** created() {
* 列表分页条数筛选监听 this.getData()
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
}, },
/** methods: {
* 列表分页输入页码监听 getData() {
* @param val var params = Object.assign({}, this.formParam, { page: this.page, limit: this.limit });
*/ this.$http('GET', "/api/consignmentContract/getConsignmentContractList", params).then(res => {
handleCurrentChange(val) { if (res.code === 0) {
this.page = val; this.list = res.data.list || [];
this.getData(); this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
},
/**
* 重置表单
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
}
}, },
/** components: {
* chebox 选择监听 Menu
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<el-table-column fixed type="selection" width="40"></el-table-column> <el-table-column fixed type="selection" width="40"></el-table-column>
<el-table-column prop="status" fixed label="状态" width="100" align="center"> <el-table-column prop="status" fixed label="状态" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status==1" type="danger">审核前失败</el-tag> <el-tag v-if="scope.row.status == 1" type="danger">审核前失败</el-tag>
<el-tag v-else-if="scope.row.status==2" type="info">待审核</el-tag> <el-tag v-else-if="scope.row.status == 2" type="info">待审核</el-tag>
<el-tag v-else-if="scope.row.status==3" type="success">上传成功</el-tag> <el-tag v-else-if="scope.row.status == 3" type="success">上传成功</el-tag>
<el-tag v-else-if="scope.row.status==4" type="warning">审核未通过</el-tag> <el-tag v-else-if="scope.row.status == 4" type="warning">审核未通过</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="error_msg" label="失败原因" min-width="150" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="error_msg" label="失败原因" min-width="150" :show-overflow-tooltip="true"></el-table-column>
...@@ -64,157 +64,155 @@ ...@@ -64,157 +64,155 @@
</div> </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 {Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip, Upload} from 'element-ui' import { Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip, Upload } from 'element-ui'
import {NODE_ENVS} from "@/ajax"; import { NODE_ENVS } from "@/ajax";
import Tool from "@/tool"; import Tool from "@/tool";
Vue.prototype.$message = Message; Vue.prototype.$message = Message;
Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip).use(Upload); Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip).use(Upload);
export default { export default {
name: "consignmentImportDetail", name: "consignmentImportDetail",
data() { data() {
return { return {
detailData: {}, detailData: {},
itemListObj: {},//明细数据 itemListObj: {},//明细数据
dialogVisible_1: false, dialogVisible_1: false,
total: 0, total: 0,
limit: 10, limit: 10,
page: 1, page: 1,
list: [], list: [],
maxPrice: [], maxPrice: [],
id: '', id: '',
up_sn: '', up_sn: '',
multipleSelection: [], multipleSelection: [],
uploadUrl: NODE_ENVS + '/api/uploadSku/import', uploadUrl: NODE_ENVS + '/api/uploadSku/import',
remark: '', remark: '',
sku_apply_num_json: [], sku_apply_num_json: [],
fileData: { fileData: {
token: Tool.getCookie('token'), token: Tool.getCookie('token'),
type: 2//1覆盖 2新增 type: 2//1覆盖 2新增
}
};
},
created() {
this.id = this.$route.query.id;
this.up_sn = this.$route.query.up_sn;
this.getInfo()
this.getList()
},
methods: {
/**
* 获取详情
*/
getInfo() {
this.$http('GET', "/api/uploadSku/info", {id: this.id}).then(res => {
if (res.code === 0) {
this.detailData = res.data
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
/**
* 获取列表数据
*/
getList() {
this.$http('GET', "/api/uploadSku/itemList", {page: this.page, limit: this.limit, up_sn: this.up_sn, source: 12}).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = res.data.total || 0;
this.itemListObj = res.data;//明细数据
} else {
this.$message(res.msg);
} }
}) };
}, },
/** created() {
* 导出失败文件 this.id = this.$route.query.id;
*/ this.up_sn = this.$route.query.up_sn;
exportErrorItemList() { this.getInfo()
let url = NODE_ENVS + '/api/uploadSku/exportErrorItemList?up_sn=' + this.up_sn + '&token=' + Tool.getCookie('token') + '&source=12'; this.getList()
Tool.openNewWindow(url);
}, },
/** methods: {
* 弹窗事件 /**
*/ * 获取详情
popupEvent(type) { */
if (!this.multipleSelection.length) { getInfo() {
this.$message.warning('请选择数据'); this.$http('GET', "/api/uploadSku/info", { id: this.id }).then(res => {
return; if (res.code === 0) {
} this.detailData = res.data
switch (type) { } else {
case 1: this.$message({
// 提交审核:校验待提审状态 message: res.msg,
const invalidVerify = this.multipleSelection.filter(item => item.status != 3); type: 'error'
if (invalidVerify.length) { });
this.$message.warning('上传成功的才可提交寄售审核');
return;
} }
this.sku_apply_num_json = this.multipleSelection.map(item => { })
return { },
sku_id: item.sku_id, /**
apply_num: item.consignment_apply_stock * 获取列表数据
} */
}); getList() {
this.dialogVisible_1 = true; this.$http('GET', "/api/uploadSku/itemList", { page: this.page, limit: this.limit, up_sn: this.up_sn, source: 12 }).then(res => {
break; if (res.code === 0) {
} this.list = res.data.list || [];
}, this.total = res.data.total || 0;
/** this.itemListObj = res.data;//明细数据
* 提交寄售审核 } else {
*/ this.$message(res.msg);
submitConsignmentAudit() { }
this.$http('POST', "/api/sku/submitConsignmentAudit", {sku_apply_num_json: JSON.stringify(this.sku_apply_num_json), remark: this.remark}).then(res => { })
if (res.code === 0) { },
this.$message({ /**
message: '操作成功', * 导出失败文件
type: 'success', */
onClose: () => { exportErrorItemList() {
this.dialogVisible_1 = false; let url = NODE_ENVS + '/api/uploadSku/exportErrorItemList?up_sn=' + this.up_sn + '&token=' + Tool.getCookie('token') + '&source=12';
this.remark = ''; Tool.openNewWindow(url);
this.getList(); },
/**
* 弹窗事件
*/
popupEvent(type) {
if (!this.multipleSelection.length) {
this.$message.warning('请选择数据');
return;
}
switch (type) {
case 1:
// 提交审核:校验待提审状态
const invalidVerify = this.multipleSelection.filter(item => item.status != 3);
if (invalidVerify.length) {
this.$message.warning('上传成功的才可提交寄售审核');
return;
} }
}); this.sku_apply_num_json = this.multipleSelection.map(item => {
} else { return {
this.$message.error(res.msg || '操作失败'); sku_id: item.sku_id,
apply_num: item.consignment_apply_stock
}
});
this.dialogVisible_1 = true;
break;
} }
}) },
}, /**
/** * 提交寄售审核
* 列表分页条数筛选监听 */
* @param val submitConsignmentAudit() {
*/ this.$http('POST', "/api/sku/submitConsignmentAudit", { sku_apply_num_json: JSON.stringify(this.sku_apply_num_json), remark: this.remark }).then(res => {
handleSizeChange(val) { if (res.code === 0) {
this.limit = val; this.$message({
this.getList(); message: '操作成功',
}, type: 'success',
/** onClose: () => {
* 列表分页输入页码监听 this.dialogVisible_1 = false;
* @param val this.remark = '';
*/ this.getList();
handleCurrentChange(val) { }
this.page = val; });
this.getList(); } else {
this.$message.error(res.msg || '操作失败');
}
})
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getList();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getList();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
}
}, },
/** components: {
* chebox 选择监听 Menu
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
* 作废 * 作废
*/ */
cancelConsignmentRecall() { cancelConsignmentRecall() {
this.$http('POST', "/api/consignmentRecall/cancelConsignmentRecall", { recall_id: this.recall_ids}).then(res => { this.$http('POST', "/api/consignmentRecall/cancelConsignmentRecall", { recall_id: this.recall_ids }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
......
...@@ -35,138 +35,139 @@ ...@@ -35,138 +35,139 @@
</div> </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 {Autocomplete, Button, Col, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Row, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, Col, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Row, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(Row).use(Col); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(Row).use(Col);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "consignmentRecallDetail", name: "consignmentRecallDetail",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
recall_id: '', recall_id: '',
detailData: {}, detailData: {},
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
formParam: { formParam: {
status: '', status: '',
date: '' date: ''
}
};
},
created() {
this.recall_id = this.$route.query.recall_id;
this.getData()
},
methods: {
getData() {
this.$http('GET', "/api/consignmentRecall/getConsignmentRecallDetail", {recall_id: this.recall_id, page: this.page, limit: this.limit}).then(res => {
if (res.code === 0) {
this.detailData = res.data;
this.list = res.data.items.list;
this.total = res.data.items.total || 0;
} else {
this.$message.error(res.msg);
} }
}) };
}, },
/** created() {
* 型号监听 this.recall_id = this.$route.query.recall_id;
* @param queryString this.getData()
* @param cb },
*/ methods: {
querySearchAsync(queryString, cb) { getData() {
if (!queryString) { this.$http('GET', "/api/consignmentRecall/getConsignmentRecallDetail", { recall_id: this.recall_id, page: this.page, limit: this.limit }).then(res => {
cb([]); if (res.code === 0) {
return; this.detailData = res.data;
} this.list = res.data.items.list;
this.$http('GET', "/api/search/getspu", {spu_name: queryString}).then(res => { this.total = res.data.items.total || 0;
if (res.code == 0 && res.data.list?.length) { } else {
const arr = res.data.list.map(item => ({ this.$message.error(res.msg);
value: item.spu_name }
})); })
cb(arr); },
} else { /**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]); cb([]);
return;
}
this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => {
if (res.code == 0 && res.data.list?.length) {
const arr = res.data.list.map(item => ({
value: item.spu_name
}));
cb(arr);
} else {
cb([]);
}
}).catch(() => {
cb([]);
});
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
},
/**
* 重置表单
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 添加库存
* @param {number} type - 0:添加选中 1:一键添加全部
*/
addInventory(type) {
if (!this.multipleSelection.length) {
this.$message.warning('请选择数据');
return;
} }
}).catch(() => {
cb([]);
});
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
},
/**
* 重置表单
* @param formName
*/
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getData();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getData();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 添加库存
* @param {number} type - 0:添加选中 1:一键添加全部
*/
addInventory(type) {
if (!this.multipleSelection.length) {
this.$message.warning('请选择数据');
return;
}
if (type) { if (type) {
// 一键添加全部库存 // 一键添加全部库存
this.recall_json = this.list; this.recall_json = this.list;
} else { } else {
// 添加选中的库存 // 添加选中的库存
this.recall_json = this.multipleSelection; this.recall_json = this.multipleSelection;
} }
this.dialogVisible_1 = false; // 关闭弹窗 this.dialogVisible_1 = false; // 关闭弹窗
this.$message.success('添加成功'); this.$message.success('添加成功');
}
},
components: {
Menu
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped>
.remark-content { .remark-content {
min-width: 200px; min-width: 200px;
word-break: break-all; /* 防止文字溢出 */ word-break: break-all;
} /* 防止文字溢出 */
}
</style> </style>
\ No newline at end of file
...@@ -42,137 +42,135 @@ ...@@ -42,137 +42,135 @@
</div> </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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "consignmentReplenishment", name: "consignmentReplenishment",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
formParam: { formParam: {
sku_id: '', sku_id: '',
goods_name: '' goods_name: ''
}
};
},
created() {
this.getData()
},
methods: {
getData() {
var params = Object.assign({}, this.formParam, {page: this.page, limit: this.limit});
this.$http('GET', "/api/consignmentReplenishment/getConsignmentReplenishmentList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
} }
}) };
}, },
/** created() {
* 型号监听 this.getData()
* @param queryString },
* @param cb methods: {
*/ getData() {
querySearchAsync(queryString, cb) { var params = Object.assign({}, this.formParam, { page: this.page, limit: this.limit });
if (!queryString) { this.$http('GET', "/api/consignmentReplenishment/getConsignmentReplenishmentList", params).then(res => {
cb([]); if (res.code === 0) {
return; this.list = res.data.list || [];
} this.total = Number(res.data.total) || 0;
this.$http('GET', "/api/search/getspu", {spu_name: queryString}).then(res => { } else {
if (res.code == 0 && res.data.list?.length) { this.$message({
const arr = res.data.list.map(item => ({ message: res.msg,
value: item.spu_name type: 'error'
})); });
cb(arr); }
} else { })
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]); cb([]);
return;
} }
}).catch(() => { this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => {
cb([]); if (res.code == 0 && res.data.list?.length) {
}); const arr = res.data.list.map(item => ({
}, value: item.spu_name
/** }));
* 搜索 cb(arr);
*/ } else {
onSubmit() { cb([]);
this.page = 1; }
this.getData(); }).catch(() => {
}, cb([]);
/** });
* 重置表单 },
* @param formName /**
*/ * 搜索
resetForm(formName) { */
this.formParam.date = ''; onSubmit() {
this.$refs[formName].resetFields(); this.page = 1;
}, this.getData();
/** },
* 列表分页条数筛选监听 /**
* @param val * 重置表单
*/ * @param formName
handleSizeChange(val) { */
this.limit = val; resetForm(formName) {
this.getData(); this.formParam.date = '';
}, this.$refs[formName].resetFields();
/** },
* 列表分页输入页码监听 /**
* @param val * 列表分页条数筛选监听
*/ * @param val
handleCurrentChange(val) { */
this.page = val; handleSizeChange(val) {
this.getData(); this.limit = val;
}, this.getData();
/** },
* chebox 选择监听 /**
* @param val * 列表分页输入页码监听
*/ * @param val
handleSelectionChange(val) { */
this.multipleSelection = val; handleCurrentChange(val) {
}, this.page = val;
/** this.getData();
* 提交补货申请 },
*/ /**
addConsignmentReplenishment() { * chebox 选择监听
if (!this.multipleSelection.length) { * @param val
this.$message.warning('请选择数据'); */
return; handleSelectionChange(val) {
} this.multipleSelection = val;
let sku_ids = this.multipleSelection.map(item => item.sku_id).join(','); },
this.$http('POST', "/api/consignmentReplenishment/addConsignmentReplenishment", {sku_ids: sku_ids}).then(res => { /**
if (res.code === 0) { * 提交补货申请
this.$message({ */
message: '操作成功', addConsignmentReplenishment() {
type: 'success', if (!this.multipleSelection.length) {
onClose: () => { this.$message.warning('请选择数据');
this.getData(); return;
}
});
} else {
this.$message.error(res.msg || '操作失败');
} }
}) let sku_ids = this.multipleSelection.map(item => item.sku_id).join(',');
this.$http('POST', "/api/consignmentReplenishment/addConsignmentReplenishment", { sku_ids: sku_ids }).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.getData();
}
});
} else {
this.$message.error(res.msg || '操作失败');
}
})
}
},
components: {
Menu
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -55,161 +55,161 @@ ...@@ -55,161 +55,161 @@
</div> </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 {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, RadioButton, RadioGroup, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import { Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, RadioButton, RadioGroup, Select, Table, TableColumn, Tag, Tooltip } from 'element-ui'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(RadioGroup).use(RadioButton); Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider).use(RadioGroup).use(RadioButton);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem); Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default { export default {
name: "inOutStockLog", name: "inOutStockLog",
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
total: 0, total: 0,
page: 1, page: 1,
limit: 10, limit: 10,
list: [], list: [],
formParam: { formParam: {
goods_name: '', goods_name: '',
types: [], types: [],
start_time: '', start_time: '',
end_time: '' end_time: ''
}, },
activeTimeBtn: 7 activeTimeBtn: 7
};
},
created() {
this.handleTimeFilter(7);
},
methods: {
getData() {
const params = {
...this.formParam,
page: this.page,
limit: this.limit,
types: this.formParam.types?.join(',') || ''
}; };
this.$http('GET', "/api/consignmentWmsLog/getConsignmentWmsLogList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
}, },
/** created() {
* 型号监听 this.handleTimeFilter(7);
* @param queryString },
* @param cb methods: {
*/ getData() {
querySearchAsync(queryString, cb) { const params = {
if (!queryString) { ...this.formParam,
cb([]); page: this.page,
return; limit: this.limit,
} types: this.formParam.types?.join(',') || ''
this.$http('GET', "/api/search/getspu", {spu_name: queryString}).then(res => { };
if (res.code == 0 && res.data.list?.length) {
const arr = res.data.list.map(item => ({ this.$http('GET', "/api/consignmentWmsLog/getConsignmentWmsLogList", params).then(res => {
value: item.spu_name if (res.code === 0) {
})); this.list = res.data.list || [];
cb(arr); this.total = Number(res.data.total) || 0;
} else { } else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]); cb([]);
return;
} }
}).catch(() => { this.$http('GET', "/api/search/getspu", { spu_name: queryString }).then(res => {
cb([]); if (res.code == 0 && res.data.list?.length) {
}); const arr = res.data.list.map(item => ({
}, value: item.spu_name
/** }));
* 搜索 cb(arr);
*/ } else {
onSubmit() { cb([]);
this.page = 1; }
this.getData(); }).catch(() => {
}, cb([]);
/** });
* 重置表单 },
* @param formName /**
*/ * 搜索
resetForm(formName) { */
this.activeTimeBtn = ''; onSubmit() {
this.formParam.start_time = ''; this.page = 1;
this.formParam.end_time = ''; this.getData();
this.$refs[formName].resetFields(); },
this.getData(); /**
}, * 重置表单
/** * @param formName
* 列表分页条数筛选监听 */
* @param val resetForm(formName) {
*/ this.activeTimeBtn = '';
handleSizeChange(val) { this.formParam.start_time = '';
this.limit = val; this.formParam.end_time = '';
this.getData(); this.$refs[formName].resetFields();
}, this.getData();
/** },
* 列表分页输入页码监听 /**
* @param val * 列表分页条数筛选监听
*/ * @param val
handleCurrentChange(val) { */
this.page = val; handleSizeChange(val) {
this.getData(); this.limit = val;
}, this.getData();
/** },
* chebox 选择监听 /**
* @param val * 列表分页输入页码监听
*/ * @param val
handleSelectionChange(val) { */
this.multipleSelection = val; handleCurrentChange(val) {
}, this.page = val;
/** this.getData();
* 添加时间筛选处理方法 },
*/ /**
handleTimeFilter() { * chebox 选择监听
const days = this.activeTimeBtn; * @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 添加时间筛选处理方法
*/
handleTimeFilter() {
const days = this.activeTimeBtn;
// 计算开始时间和结束时间 // 计算开始时间和结束时间
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setDate(start.getDate() - days); start.setDate(start.getDate() - days);
// 格式化日期 // 格式化日期
this.formParam.start_time = this.formatDate(start); this.formParam.start_time = this.formatDate(start);
this.formParam.end_time = this.formatDate(end); this.formParam.end_time = this.formatDate(end);
// 重新获取数据 // 重新获取数据
this.page = 1; this.page = 1;
this.getData(); this.getData();
},
/**
* 格式化日期的辅助方法
* @param date
*/
formatDate(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
}, },
/** components: {
* 格式化日期的辅助方法 Menu
* @param date
*/
formatDate(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
} }
}, };
components: {
Menu
}
};
</script> </script>
<style scoped> <style scoped>
.time-filter { .time-filter {
margin: 15px 0; margin: 15px 0;
} }
.filter-btns .el-radio-group { .filter-btns .el-radio-group {
margin-left: 0px !important; margin-left: 0px !important;
} }
</style> </style>
\ No newline at end of file
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