14 changed files with 622 additions and 66 deletions
@ -0,0 +1,197 @@ |
|||||
|
<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="[]" |
||||
|
:tabsDesTions="tabsDesTions" |
||||
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
|
@drawerbutton="drawerbutton" |
||||
|
@handleCommand="drawerHandle" |
||||
|
@close-value="closeValue" |
||||
|
:tableColumns="detailsTableColumns" |
||||
|
:totalCount="totalCountDetails" |
||||
|
:MaxResultCount="MaxResultCountDetails" |
||||
|
@alterResultCountDetails="alterResultCountDetails" |
||||
|
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
||||
|
:dropdownTabsData="dropdownTabsData" |
||||
|
:firstTabs="firstTabs" |
||||
|
></curren-Drawer> |
||||
|
<!--编辑--> |
||||
|
<StepsFormNotView |
||||
|
:formTitle="formTitle" |
||||
|
:displayDialog="displayDialog" |
||||
|
:CreateFormData="CreateFormData" |
||||
|
:CreateForm="CreateForm" |
||||
|
:Rules="editRules.cerateRule" |
||||
|
:Options="editOptions" |
||||
|
:detailsTableColumns="AddDetailsTableColumns" |
||||
|
:childTableData="childTableData" |
||||
|
@close="stepsClose(arguments)" |
||||
|
@detailsDataPush="detailsDataPush" |
||||
|
@detailsClear="detailsClear" |
||||
|
></StepsFormNotView> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { getDetailed, getPageList } 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: "customerDismantleJob", |
||||
|
mixins: [ |
||||
|
tableMixins, |
||||
|
LoadingMixins, |
||||
|
drawerMixins, |
||||
|
TableHeaderMixins, |
||||
|
mixins, |
||||
|
], |
||||
|
data () { |
||||
|
return { |
||||
|
URL: 'wms/store/product-recycle-note', |
||||
|
detailURL: 'wms/store/product-recycle-note/note-and-back-flush', |
||||
|
//常用按钮数据 |
||||
|
currenButtonData: [ |
||||
|
//导出 |
||||
|
this.defaultExportBtn({ |
||||
|
url:"wms/store/product-recycle-note/export-note-and-back-flush" |
||||
|
}), |
||||
|
this.defaultFieldSettingBtn(),//字段设置 |
||||
|
this.defaultFreshBtn(),//刷新 |
||||
|
this.defaultFilterBtn(),//筛选 |
||||
|
], |
||||
|
// 自定义详情明细汇总等table页 |
||||
|
dropdownTabsData: [ |
||||
|
{ |
||||
|
label: "详情", |
||||
|
name: 'xq' |
||||
|
}, |
||||
|
{ |
||||
|
label: "明细", |
||||
|
name: 'hcjl', |
||||
|
tableColumns: 'customerDismantleBackFlushNote',//tableColumns/index.js |
||||
|
functionName: 'customerDismantleBackFlushNote'//wms-api.js |
||||
|
}, |
||||
|
], |
||||
|
//新增 |
||||
|
CreateFormData: { |
||||
|
qty:null, |
||||
|
details:[] |
||||
|
}, |
||||
|
CreateForm: [ |
||||
|
{ type: "inputNumber", label: "数量", prop: "qty",colSpan: 12,min:1 }, |
||||
|
], |
||||
|
editRules: { |
||||
|
cerateRule: { |
||||
|
qty: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
}, |
||||
|
}, |
||||
|
AddDetailsTableColumns: [ |
||||
|
{ label: "物料代码", prop: "partCode",width:"auto" }, |
||||
|
{ label: "数量", prop: 'qty',width:"auto" },//todo:可能需要计算 |
||||
|
{ type: "filterSelect", label: "库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code", |
||||
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location",this.isFilter("type", "5"))}, |
||||
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Location', 'InventoryBalance', '库位选择', this.CreateFormData) }, |
||||
|
width:"auto", searchButton:false |
||||
|
}, |
||||
|
], |
||||
|
childTableData:[{ |
||||
|
partCode:undefined, |
||||
|
qty:undefined, |
||||
|
locationCode:undefined |
||||
|
}], |
||||
|
}; |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.paging(); |
||||
|
}, |
||||
|
methods: {//渲染数据 |
||||
|
paging(callback) { |
||||
|
this.Loading.tableLoading = true; |
||||
|
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount, |
||||
|
getPageList(this.PageListParams, this.URL,true) |
||||
|
.then(res => { |
||||
|
this.tableData = res.items |
||||
|
this.totalCount = res.totalCount |
||||
|
this.tableData.forEach(item=>{ |
||||
|
item.itemCode = item.noteAndBackFlushDetails[0].itemCode |
||||
|
item.locationCode = item.noteAndBackFlushDetails[0].locationCode |
||||
|
item.qty = item.noteAndBackFlushDetails[0].qty |
||||
|
item.rawLocationCode = item.noteAndBackFlushDetails[0].rawLocationCode |
||||
|
item.preStartTime = item.noteAndBackFlushDetails[0].preStartTime |
||||
|
item.workHour = item.noteAndBackFlushDetails[0].workHour |
||||
|
}) |
||||
|
this.pagingCallback(callback) |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.Loading.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
//点击Table行内名称 |
||||
|
inlineDialog(val) { |
||||
|
this.firstTabs = 'xq' |
||||
|
//打开抽屉 |
||||
|
this.Loading.DrawerLoading = true |
||||
|
this.displayDialog.detailsDialog = true; |
||||
|
getDetailed(val.id, 'wms/store/product-recycle-note/note-and-back-flush') |
||||
|
.then(res => { |
||||
|
if (res.details) { |
||||
|
// 前端分页处理 |
||||
|
this.tableDataDetails = JSON.parse(JSON.stringify(res)) |
||||
|
let linshiTableDataDetails = JSON.parse(JSON.stringify(this.tableDataDetails)) |
||||
|
this.totalCountDetails = res.details.length |
||||
|
// 删除除当前页面最大数以外数据 |
||||
|
linshiTableDataDetails.details.splice(this.MaxResultCountDetails,this.totalCountDetails); |
||||
|
this.propsData = linshiTableDataDetails |
||||
|
} else { |
||||
|
this.propsData = res |
||||
|
} |
||||
|
if (this.propsData.noteAndBackFlushDetails.length > 0) { |
||||
|
this.propsData.itemCode = this.propsData.noteAndBackFlushDetails[0].itemCode |
||||
|
this.propsData.locationCode = this.propsData.noteAndBackFlushDetails[0].locationCode |
||||
|
this.propsData.qty = this.propsData.noteAndBackFlushDetails[0].qty |
||||
|
this.propsData.rawLocationCode = this.propsData.noteAndBackFlushDetails[0].rawLocationCode |
||||
|
this.propsData.preStartTime = this.propsData.noteAndBackFlushDetails[0].preStartTime |
||||
|
this.propsData.workHour = this.propsData.noteAndBackFlushDetails[0].workHour |
||||
|
} |
||||
|
this.inlineDialogCallback() |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.Loading.DrawerLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "../../../styles/basicData.scss"; |
||||
|
</style> |
Loading…
Reference in new issue