Commit 3741487c by liangjianmin

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

修复多个组件中的代码格式问题,包括:
1. 统一缩进为2个空格
2. 修复对象和数组声明中的多余空格
3. 保持组件导入和使用的格式一致
4. 移除多余空行和注释
parent 0e018907
Showing with 1816 additions and 1831 deletions
......@@ -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>
</div>
</div>
<Menu/>
<Menu />
<el-dialog title="消息详情" :close-on-click-modal="false" :visible.sync="dialogVisible" width="1000px">
<el-descriptions size="medium" border :column="2">
<el-descriptions-item>
......@@ -58,92 +58,90 @@
</section>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "news",
data() {
return {
total: 0,
page: 1,
limit: 10,
list: [],
dialogVisible: false,
msgDetail: {},
formParam: {
msg_type: '',
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'
});
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);
export default {
name: "news",
data() {
return {
total: 0,
page: 1,
limit: 10,
list: [],
dialogVisible: false,
msgDetail: {},
formParam: {
msg_type: '',
date: ''
}
})
},
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();
created() {
this.getData()
},
resetForm(formName) {
this.formParam.date = '';
this.$refs[formName].resetFields();
},
handleSizeChange(val) {
this.limit = val;
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() {
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) {
this.page = val;
this.getData();
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -24,7 +24,7 @@
<div class="notice-content" v-html="noticeMsg.content"></div>
<div class="enclosure row verCenter">
<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 class="notice-bottom row bothSide verCenter">
<span>发件人:深圳市猎芯科技有限公司</span>
......@@ -32,71 +32,69 @@
</div>
</el-dialog>
</div>
<Menu/>
<Menu />
</section>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "notice",
data() {
return {
noticeMsg: [],//系统公告消息
dialogNoticeVisible: false,
total: 0,
page: 1,
limit: 10,
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'
});
}
})
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);
export default {
name: "notice",
data() {
return {
noticeMsg: [],//系统公告消息
dialogNoticeVisible: false,
total: 0,
page: 1,
limit: 10,
list: []
};
},
view(row) {
this.dialogNoticeVisible = true;
this.noticeMsg = row;
created() {
this.getData()
},
handleSizeChange(val) {
this.limit = val;
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) {
this.dialogNoticeVisible = true;
this.noticeMsg = row;
},
handleSizeChange(val) {
this.limit = val;
this.getData();
},
handleCurrentChange(val) {
this.page = val;
this.getData();
}
},
handleCurrentChange(val) {
this.page = val;
this.getData();
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<style scoped lang="less"></style>
\ No newline at end of file
......@@ -64,138 +64,138 @@
</section>
</template>
<script>
import Vue from '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 Vue from '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'
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(TableColumn).use(Table).use(Cascader).use(Autocomplete);
export default {
name: "orderTrackPurAdd",
data() {
return {
purOrderDetail: {},//基本信息,发货信息
purchase_uid: '',
multipleSelection: [],//选中的数据
pickerOption: {
disabledDate(time) {
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
})
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(TableColumn).use(Table).use(Cascader).use(Autocomplete);
export default {
name: "orderTrackPurAdd",
data() {
return {
purOrderDetail: {},//基本信息,发货信息
purchase_uid: '',
multipleSelection: [],//选中的数据
pickerOption: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
} else {
this.$message({
message: res.msg,
type: 'warning'
});
},
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: []
}
})
};
},
handleCurrentChange(val) {
this.page = val;
created() {
this.purchase_uid = this.$route.query.purchase_id;
this.getData();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
submit(formName) {
var self = this;
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.multipleSelection.length <= 0) {
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({
message: "请选择发货信息",
message: res.msg,
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 {
})
},
handleCurrentChange(val) {
this.page = val;
this.getData();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
submit(formName) {
var self = this;
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.multipleSelection.length <= 0) {
this.$message({
message: res.msg,
type: 'error'
message: "请选择发货信息",
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 {
console.log('error submit!!');
return false;
}
});
}, 1000)
}
},
canel() {
document.querySelector('.item-boxs a.act .iconfont').click();
setTimeout(() => {
this.$router.push({
path: "/orderTrackGoods"
})
}, 1000)
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
@import "../../assets/css/goods/goods.min.css";
@import "../../assets/css/goods/goods.min.css";
</style>
\ No newline at end of file
......@@ -39,113 +39,113 @@
</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>
</div>
<Menu/>
<Menu />
</div>
</template>
<script>
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import {Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip} from 'element-ui'
import {NODE_ENVS} from "@/ajax";
import Tool from "@/tool";
import { Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip } from 'element-ui'
import { NODE_ENVS } from "@/ajax";
import Tool from "@/tool";
Vue.prototype.$message = Message;
Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip);
export default {
name: "goodDetail",
data() {
return {
total: 0,
limit: 10,
page: 1,
importDetail: {},
tableData: [],
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'
});
}
})
Vue.prototype.$message = Message;
Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip);
export default {
name: "goodDetail",
data() {
return {
total: 0,
limit: 10,
page: 1,
importDetail: {},
tableData: [],
multipleSelection: []
};
},
/**
* 导出文件
*/
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);
watch: {
$route(to, from) {
if (to.path == '/goodDetail') {
this.getData();
}
}
},
handleSizeChange(val) {
this.limit = val;
this.getList();
created() {
this.getData()
},
handleCurrentChange(val) {
this.page = val;
this.getList();
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'
});
}
})
},
/**
* 导出文件
*/
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: {
Menu
}
};
components: {
Menu
}
};
</script>
<style scoped>
@import "../../assets/css/store/listDetail.min.css";
@import "../../assets/css/store/listDetail.min.css";
.btn-nav {
background: #FFFFFF;
padding: 0 0 20px 20px;
}
.btn-nav {
background: #FFFFFF;
padding: 0 0 20px 20px;
}
::v-deep .el-descriptions-item__label {
white-space: nowrap;
}
::v-deep .el-descriptions-item__label {
white-space: nowrap;
}
::v-deep .el-descriptions-item__content {
white-space: nowrap;
}
::v-deep .el-descriptions-item__content {
white-space: nowrap;
}
.downTemplateExport {
width: 92px;
height: 28px;
text-align: center;
line-height: 28px;
color: #FFF;
background-color: #409EFF;
border-color: #409EFF;
font-size: 12px;
border-radius: 3px;
margin-right: 10px;
display: block;
cursor: pointer;
}
.downTemplateExport {
width: 92px;
height: 28px;
text-align: center;
line-height: 28px;
color: #FFF;
background-color: #409EFF;
border-color: #409EFF;
font-size: 12px;
border-radius: 3px;
margin-right: 10px;
display: block;
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -31,28 +31,28 @@
watch: {},
created() {
this.getData();
var code_=this.$route.query.err_type
if(code_==1){
this.text='微信授权失败'
}else if(code_==2){
this.text='芯链token校验失败'
var code_ = this.$route.query.err_type
if (code_ == 1) {
this.text = '微信授权失败'
} else if (code_ == 2) {
this.text = '芯链token校验失败'
}
else if(code_==3){
this.text='请求access_token失败'
else if (code_ == 3) {
this.text = '请求access_token失败'
}
else if(code_==4){
this.text='open_id已绑定其他账号,不能重复绑定'
else if (code_ == 4) {
this.text = 'open_id已绑定其他账号,不能重复绑定'
}
else if(code_==5){
this.text='更新绑定关系失败'
else if (code_ == 5) {
this.text = '更新绑定关系失败'
}
else if(code_==6){
this.text='添加绑定关系失败'
else if (code_ == 6) {
this.text = '添加绑定关系失败'
}
else if(code_==7){
this.text='获取微信信息失败'
else if (code_ == 7) {
this.text = '获取微信信息失败'
}
},
computed: {},
methods: {
......@@ -60,7 +60,7 @@
this.$http('get', "/api/login/getwxqrcode").then(res => {
if (res.code === 0) {
this.hrefs = res.data.wx_login_url;
}
}
})
}
......
<template>
<div class="notfound">
<img src="../../assets/images/notfound.png" alt="">
</div>
<div class="notfound">
<img src="../../assets/images/notfound.png" alt="">
</div>
</template>
<script>
export default {
name: "notfound",
data() {
......@@ -14,14 +14,14 @@
};
</script>
<style>
.notfound {
width: 100%;
margin: 0 auto;
text-align: center;
}
.notfound {
width: 100%;
margin: 0 auto;
text-align: center;
}
.notfound img {
display: block;
margin: 0 auto;
}
.notfound img {
display: block;
margin: 0 auto;
}
</style>
\ No newline at end of file
......@@ -56,121 +56,119 @@
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "allPayableBills",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
goods_name: '',
type: '',
status: '',
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'
});
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "allPayableBills",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
goods_name: '',
type: '',
status: '',
create_time: []
}
})
};
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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 {
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'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]);
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();
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;
}
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -23,136 +23,134 @@
</div>
</template>
<script>
import Vue from '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 {NODE_ENVS} from "@/ajax";
import Tool from "@/tool";
import Vue from '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 { NODE_ENVS } from "@/ajax";
import Tool from "@/tool";
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "fileManagement",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
bill_sn: '',
status: '',
goods_name: '',
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'
});
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "fileManagement",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
bill_sn: '',
status: '',
goods_name: '',
create_time: []
}
})
};
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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 {
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'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]);
return;
}
}).catch(() => {
cb([]);
});
},
/**
* 操作按钮监听
*/
handleCommand(command) {
let bill_id = this.multipleSelection.map(item => item.bill_id).join(',');
if (!bill_id) {
this.$message({
message: '请选择账单',
type: 'warning'
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([]);
});
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();
},
/**
* 重置表单
* @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
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -41,7 +41,7 @@
<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">
<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>
</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 @@
</div>
</template>
<script>
import Vue from '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 {NODE_ENVS} from "@/ajax";
import Tool from "@/tool";
import Vue from '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 { NODE_ENVS } from "@/ajax";
import Tool from "@/tool";
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "reconciledBill",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
bill_sn: '',
status: '',
goods_name: '',
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'
});
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "reconciledBill",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
bill_sn: '',
status: '',
goods_name: '',
create_time: []
}
})
};
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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 {
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'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]);
return;
}
}).catch(() => {
cb([]);
});
},
/**
* 操作按钮监听
*/
handleCommand(command) {
let bill_id = this.multipleSelection.map(item => item.bill_id).join(',');
if (!bill_id) {
this.$message({
message: '请选择账单',
type: 'warning'
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([]);
});
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();
},
/**
* 重置表单
* @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
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -41,113 +41,111 @@
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "reconciledBillDetail",
data() {
return {
multipleSelection: [],
recall_id: '',
detailData: {},
total: 0,
page: 1,
limit: 10,
list: [],
bill_id: '',
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);
}
})
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "reconciledBillDetail",
data() {
return {
multipleSelection: [],
recall_id: '',
detailData: {},
total: 0,
page: 1,
limit: 10,
list: [],
bill_id: '',
bill_sn: ''
};
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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 {
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);
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]);
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();
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;
}
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -36,117 +36,115 @@
<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="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>
<Menu ref="menu"></Menu>
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "batchRecall",
data() {
return {
total: 0,
page: 1,
limit: 10,
list: [],
recall_upload_sn: '',//上传编号
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 || '上传失败');
}
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "batchRecall",
data() {
return {
total: 0,
page: 1,
limit: 10,
list: [],
recall_upload_sn: '',//上传编号
is_flag: false
};
},
/**
* 上传失败
* @param err
* @param file
* @param fileList
*/
handleUploadError(err, file, fileList) {
this.$message.error('上传失败,请重试');
created() {
},
/**
* 批量召回-提交
*/
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 => {
methods: {
/**
* 上传成功
* @param res
* @param file
* @param fileList
*/
handleUploadSuccess(res, file, fileList) {
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);
}
});
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 || '操作失败');
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: () => {
},
/**
* 上传失败
* @param err
* @param file
* @param fileList
*/
handleUploadError(err, file, fileList) {
this.$message.error('上传失败,请重试');
},
/**
* 批量召回-提交
*/
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 {
this.$message.error(res.msg || '操作失败');
}
})
}
});
} else {
this.$message.error(res.msg || '操作失败');
}
})
}
},
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -48,124 +48,122 @@
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentApplicationDetail",
data() {
return {
multipleSelection: [],
consignment_id: '',
detailData: {},
total: 0,
page: 1,
limit: 10,
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();
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentApplicationDetail",
data() {
return {
multipleSelection: [],
consignment_id: '',
detailData: {},
total: 0,
page: 1,
limit: 10,
list: []
};
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
created() {
this.consignment_id = this.$route.query.consignment_id;
this.getData()
},
/**
* 删除寄售明细
*/
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 => {
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.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.getData();
}
});
this.detailData = res.data;
this.list = res.data.items.list;
this.total = res.data.items.total || 0;
} 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);
},
/**
* 列表分页条数筛选监听
* @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;
},
/**
* 删除寄售明细
*/
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>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -45,90 +45,88 @@
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentContract",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
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'
});
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentContract",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
status: ''
}
})
},
/**
* 搜索
*/
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();
created() {
this.getData()
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
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();
},
/**
* 列表分页条数筛选监听
* @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;
}
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -25,10 +25,10 @@
<el-table-column fixed type="selection" width="40"></el-table-column>
<el-table-column prop="status" fixed label="状态" width="100" align="center">
<template slot-scope="scope">
<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==3" type="success">上传成功</el-tag>
<el-tag v-else-if="scope.row.status==4" type="warning">审核未通过</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 == 3" type="success">上传成功</el-tag>
<el-tag v-else-if="scope.row.status == 4" type="warning">审核未通过</el-tag>
</template>
</el-table-column>
<el-table-column prop="error_msg" label="失败原因" min-width="150" :show-overflow-tooltip="true"></el-table-column>
......@@ -64,157 +64,155 @@
</div>
</template>
<script>
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import {Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip, Upload} from 'element-ui'
import {NODE_ENVS} from "@/ajax";
import Tool from "@/tool";
import { Descriptions, DescriptionsItem, Message, Pagination, Table, TableColumn, Tag, Tooltip, Upload } from 'element-ui'
import { NODE_ENVS } from "@/ajax";
import Tool from "@/tool";
Vue.prototype.$message = Message;
Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip).use(Upload);
export default {
name: "consignmentImportDetail",
data() {
return {
detailData: {},
itemListObj: {},//明细数据
dialogVisible_1: false,
total: 0,
limit: 10,
page: 1,
list: [],
maxPrice: [],
id: '',
up_sn: '',
multipleSelection: [],
uploadUrl: NODE_ENVS + '/api/uploadSku/import',
remark: '',
sku_apply_num_json: [],
fileData: {
token: Tool.getCookie('token'),
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);
Vue.prototype.$message = Message;
Vue.use(Pagination).use(TableColumn).use(Table).use(Tag).use(Descriptions).use(DescriptionsItem).use(Tooltip).use(Upload);
export default {
name: "consignmentImportDetail",
data() {
return {
detailData: {},
itemListObj: {},//明细数据
dialogVisible_1: false,
total: 0,
limit: 10,
page: 1,
list: [],
maxPrice: [],
id: '',
up_sn: '',
multipleSelection: [],
uploadUrl: NODE_ENVS + '/api/uploadSku/import',
remark: '',
sku_apply_num_json: [],
fileData: {
token: Tool.getCookie('token'),
type: 2//1覆盖 2新增
}
})
};
},
/**
* 导出失败文件
*/
exportErrorItemList() {
let url = NODE_ENVS + '/api/uploadSku/exportErrorItemList?up_sn=' + this.up_sn + '&token=' + Tool.getCookie('token') + '&source=12';
Tool.openNewWindow(url);
created() {
this.id = this.$route.query.id;
this.up_sn = this.$route.query.up_sn;
this.getInfo()
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;
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'
});
}
this.sku_apply_num_json = this.multipleSelection.map(item => {
return {
sku_id: item.sku_id,
apply_num: item.consignment_apply_stock
}
});
this.dialogVisible_1 = true;
break;
}
},
/**
* 提交寄售审核
*/
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: () => {
this.dialogVisible_1 = false;
this.remark = '';
this.getList();
})
},
/**
* 获取列表数据
*/
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);
}
})
},
/**
* 导出失败文件
*/
exportErrorItemList() {
let url = NODE_ENVS + '/api/uploadSku/exportErrorItemList?up_sn=' + this.up_sn + '&token=' + Tool.getCookie('token') + '&source=12';
Tool.openNewWindow(url);
},
/**
* 弹窗事件
*/
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;
}
});
} else {
this.$message.error(res.msg || '操作失败');
this.sku_apply_num_json = this.multipleSelection.map(item => {
return {
sku_id: item.sku_id,
apply_num: item.consignment_apply_stock
}
});
this.dialogVisible_1 = true;
break;
}
})
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange(val) {
this.limit = val;
this.getList();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange(val) {
this.page = val;
this.getList();
},
/**
* 提交寄售审核
*/
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: () => {
this.dialogVisible_1 = false;
this.remark = '';
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;
}
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -306,7 +306,7 @@
* 作废
*/
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) {
this.$message({
message: '操作成功',
......
......@@ -35,138 +35,139 @@
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentRecallDetail",
data() {
return {
multipleSelection: [],
recall_id: '',
detailData: {},
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
status: '',
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);
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentRecallDetail",
data() {
return {
multipleSelection: [],
recall_id: '',
detailData: {},
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
status: '',
date: ''
}
})
};
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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 {
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);
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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) {
// 一键添加全部库存
this.recall_json = this.list;
} else {
// 添加选中的库存
this.recall_json = this.multipleSelection;
}
if (type) {
// 一键添加全部库存
this.recall_json = this.list;
} else {
// 添加选中的库存
this.recall_json = this.multipleSelection;
}
this.dialogVisible_1 = false; // 关闭弹窗
this.$message.success('添加成功');
this.dialogVisible_1 = false; // 关闭弹窗
this.$message.success('添加成功');
}
},
components: {
Menu
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
.remark-content {
min-width: 200px;
word-break: break-all; /* 防止文字溢出 */
}
.remark-content {
min-width: 200px;
word-break: break-all;
/* 防止文字溢出 */
}
</style>
\ No newline at end of file
......@@ -42,137 +42,135 @@
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentReplenishment",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
sku_id: '',
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'
});
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentReplenishment",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
sku_id: '',
goods_name: ''
}
})
};
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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 {
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'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]);
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;
},
/**
* 提交补货申请
*/
addConsignmentReplenishment() {
if (!this.multipleSelection.length) {
this.$message.warning('请选择数据');
return;
}
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 || '操作失败');
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;
},
/**
* 提交补货申请
*/
addConsignmentReplenishment() {
if (!this.multipleSelection.length) {
this.$message.warning('请选择数据');
return;
}
})
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>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
\ No newline at end of file
......@@ -55,161 +55,161 @@
</div>
</template>
<script>
import Vue from '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 Vue from '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'
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "inOutStockLog",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
goods_name: '',
types: [],
start_time: '',
end_time: ''
},
activeTimeBtn: 7
};
},
created() {
this.handleTimeFilter(7);
},
methods: {
getData() {
const params = {
...this.formParam,
page: this.page,
limit: this.limit,
types: this.formParam.types?.join(',') || ''
Vue.prototype.$message = Message
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(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "inOutStockLog",
data() {
return {
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
goods_name: '',
types: [],
start_time: '',
end_time: ''
},
activeTimeBtn: 7
};
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'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
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 {
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'
});
}
})
},
/**
* 型号监听
* @param queryString
* @param cb
*/
querySearchAsync(queryString, cb) {
if (!queryString) {
cb([]);
return;
}
}).catch(() => {
cb([]);
});
},
/**
* 搜索
*/
onSubmit() {
this.page = 1;
this.getData();
},
/**
* 重置表单
* @param formName
*/
resetForm(formName) {
this.activeTimeBtn = '';
this.formParam.start_time = '';
this.formParam.end_time = '';
this.$refs[formName].resetFields();
this.getData();
},
/**
* 列表分页条数筛选监听
* @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;
},
/**
* 添加时间筛选处理方法
*/
handleTimeFilter() {
const days = this.activeTimeBtn;
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.activeTimeBtn = '';
this.formParam.start_time = '';
this.formParam.end_time = '';
this.$refs[formName].resetFields();
this.getData();
},
/**
* 列表分页条数筛选监听
* @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;
},
/**
* 添加时间筛选处理方法
*/
handleTimeFilter() {
const days = this.activeTimeBtn;
// 计算开始时间和结束时间
const end = new Date();
const start = new Date();
start.setDate(start.getDate() - days);
// 计算开始时间和结束时间
const end = new Date();
const start = new Date();
start.setDate(start.getDate() - days);
// 格式化日期
this.formParam.start_time = this.formatDate(start);
this.formParam.end_time = this.formatDate(end);
// 格式化日期
this.formParam.start_time = this.formatDate(start);
this.formParam.end_time = this.formatDate(end);
// 重新获取数据
this.page = 1;
this.getData();
// 重新获取数据
this.page = 1;
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}`;
}
},
/**
* 格式化日期的辅助方法
* @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
}
},
components: {
Menu
}
};
};
</script>
<style scoped>
.time-filter {
margin: 15px 0;
}
.time-filter {
margin: 15px 0;
}
.filter-btns .el-radio-group {
margin-left: 0px !important;
}
.filter-btns .el-radio-group {
margin-left: 0px !important;
}
</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