You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
202 lines
6.4 KiB
202 lines
6.4 KiB
<template>
|
|
<div class="page-box" v-loading="Loading.appMainLoading">
|
|
<tablePagination
|
|
:currenButtonData="currenButtonData"
|
|
:tableData="tableData"
|
|
:tableLoading="Loading.tableLoading"
|
|
:tableColumns="tableColumns"
|
|
@rowDrop="rowDrop"
|
|
:totalCount="totalCount"
|
|
:multipleSelection="multipleSelection"
|
|
:MaxResultCount="PageListParams.MaxResultCount"
|
|
@topbutton="topbutton"
|
|
@inlineDialog="inlineDialog"
|
|
@sortChange="sortChange"
|
|
@alertoldSkipCount="alertoldSkipCount"
|
|
@alterResultCount="alterResultCount"
|
|
@handleSelectionChange="handleSelectionChange"
|
|
:currentPageProps="oldSkipCount"
|
|
:quicklySearchOption="quicklySearchOption"
|
|
@quicklySearchClick="quicklySearchClick"
|
|
@quicklySearchClear="quicklySearchClear"
|
|
:primarySearchOption="primarySearchOption"
|
|
@overallSearchFormClick="overallSearchFormClick"
|
|
:httpOverallSearchData="httpOverallSearchData"
|
|
>
|
|
</tablePagination>
|
|
<curren-Drawer
|
|
:title="tableColumns"
|
|
:DrawerLoading="Loading.DrawerLoading"
|
|
:drawer="displayDialog.detailsDialog"
|
|
:propsData="propsData"
|
|
:Butttondata="DrawerButtonData"
|
|
:tabsDesTions="tabsDesTions"
|
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
|
|
@drawerbutton="drawerbutton"
|
|
@handleCommand="drawerHandle"
|
|
@close-value="closeValue"
|
|
:tableColumns="detailsTableColumns"
|
|
:totalCount="totalCountDetails"
|
|
:MaxResultCount="MaxResultCountDetails"
|
|
@alterResultCountDetails="alterResultCountDetails"
|
|
@alertoldSkipCountDetails="alertoldSkipCountDetails"
|
|
></curren-Drawer>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { getPageListWip, confirm, getDetailed,postCancel } from "@/api/wms-api"
|
|
import { tableMixins } from "@/mixins/TableMixins"
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins"
|
|
import { drawerMixins } from "@/mixins/drawerMixins"
|
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
|
|
import { mixins } from "@/mixins/mixins"
|
|
export default {
|
|
name: "lineSideWarehouseAllocationConfirm",
|
|
mixins: [
|
|
tableMixins,
|
|
LoadingMixins,
|
|
drawerMixins,
|
|
TableHeaderMixins,
|
|
mixins,
|
|
],
|
|
computed: {
|
|
hideButton: function () {
|
|
return function (val) {
|
|
// 2023-01-03 增加确认人,在导入模板增加一列“确认人”,系统判断,只有该账户能确认调拨数据
|
|
// 获取当前用户名称 判断是否与后端给的确认人一致,如果一致显示按钮
|
|
// console.log(this.$store.getters.name.name)
|
|
let data = true
|
|
val.forEach(key => {
|
|
if (this.propsData.confirmed == key) {
|
|
data = false
|
|
}
|
|
})
|
|
return data
|
|
}
|
|
},
|
|
},
|
|
data () {
|
|
return {
|
|
URL: 'wms/store/transfer-note',
|
|
//常用按钮数据
|
|
currenButtonData: [
|
|
this.defaultFieldSettingBtn(),//字段设置
|
|
this.defaultFreshBtn(),//刷新
|
|
this.defaultFilterBtn(),//筛选
|
|
],
|
|
DrawerButtonData: [
|
|
{
|
|
type: 'primary',
|
|
icon: 'el-icon-circle-check',
|
|
label: '确认',
|
|
name: "handle",
|
|
hide: () => { return this.hideButton([false]) },
|
|
size: 'mini'
|
|
},
|
|
{
|
|
type: 'danger',
|
|
icon: 'el-icon-circle-close',
|
|
label: '取消',
|
|
name: "cancel",
|
|
hide: () => { return this.hideButton([false]) },
|
|
size: 'mini'
|
|
},
|
|
// {
|
|
// type: 'danger',
|
|
// icon: 'el-icon-delete-solid',
|
|
// label: '作废',
|
|
// name: "invalid",
|
|
// hide: () => { return this.hideButton([1]) },
|
|
// size: 'mini'
|
|
// }
|
|
],
|
|
};
|
|
},
|
|
mounted () {
|
|
this.paging();
|
|
},
|
|
methods: {
|
|
//抽屉常用按钮
|
|
drawerbutton (val) {
|
|
if (val == 'handle') {
|
|
this.$confirm('您确定要确认吗, 是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.Loading.appMainLoading = true
|
|
let data = {
|
|
id: this.propsData.id
|
|
}
|
|
confirm(this.propsData.id, this.URL).then(res => {
|
|
this.$successMsg('已确认')
|
|
getDetailed(this.propsData.id, this.URL).then(res => {
|
|
this.propsData = res
|
|
})
|
|
this.paging()
|
|
this.Loading.appMainLoading = false
|
|
}).catch(err => {
|
|
console.log(err)
|
|
this.Loading.appMainLoading = false
|
|
})
|
|
}).catch(() => {
|
|
|
|
});
|
|
}
|
|
else if(val == 'cancel'){
|
|
this.$confirm('您确定要取消吗, 是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.Loading.appMainLoading = true
|
|
let data = {
|
|
id: this.propsData.id
|
|
}
|
|
postCancel(this.propsData.id, this.URL).then(res => {
|
|
this.$successMsg('已取消')
|
|
this.displayDialog.detailsDialog = false
|
|
this.paging()
|
|
this.Loading.appMainLoading = false
|
|
}).catch(err => {
|
|
console.log(err)
|
|
this.Loading.appMainLoading = false
|
|
})
|
|
}).catch(() => {
|
|
|
|
});
|
|
}
|
|
// else if(val == 'invalid'){
|
|
// let data = {
|
|
// id: this.propsData.id
|
|
// }
|
|
// this.Loading.appMainLoading = true
|
|
// transferRequestCancel(this.URL, data).then(res=>{
|
|
// this.displayDialog.detailsDialog = false
|
|
// this.$successMsg('已作废!')
|
|
// this.paging()
|
|
// this.Loading.appMainLoading = false
|
|
// }).catch(err=>{
|
|
// console.log(err)
|
|
// this.Loading.appMainLoading = false
|
|
// })
|
|
// }
|
|
},
|
|
//渲染数据
|
|
paging(callback) {
|
|
this.Loading.tableLoading = true;
|
|
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount,
|
|
getPageListWip(this.PageListParams, 'wms/store/transfer-note/get-wip-list').then(res => {
|
|
this.tableData = res.items
|
|
this.totalCount = res.totalCount
|
|
this.pagingCallback(callback)
|
|
}).catch(err => {
|
|
this.Loading.tableLoading = false
|
|
})
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
@import "../../../styles/basicData.scss";
|
|
</style>
|