8 changed files with 543 additions and 28 deletions
@ -0,0 +1,452 @@ |
|||
<template> |
|||
<div class="page-box" v-loading="Loading.appMainLoading"> |
|||
<tablePagination |
|||
ref="FISDeliverRequestTable_Ref" |
|||
:currenButtonData="currenButtonData" |
|||
:tableData="tableData" |
|||
:tableLoading="Loading.tableLoading" |
|||
:tableColumns="tableColumns" |
|||
@rowDrop="rowDrop" |
|||
:totalCount="totalCount" |
|||
:multipleSelection="multipleSelection" |
|||
:MaxResultCount="PageListParams.MaxResultCount" |
|||
@topbutton="topbuttonHandle" |
|||
@inlineDialog="inlineDialog" |
|||
@sortChange="sortChange" |
|||
@alertoldSkipCount="alertoldSkipCount" |
|||
@alterResultCount="alterResultCount" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
:currentPageProps="oldSkipCount" |
|||
:quicklySearchOption="quicklySearchOption" |
|||
@quicklySearchClick="quicklySearchClick" |
|||
@quicklySearchClear="quicklySearchClear" |
|||
:primarySearchOption="primarySearchOption" |
|||
@overallSearchFormClick="(options)=>{overallSearchFormClick(options,overallSearchFormCallback)}" |
|||
:httpOverallSearchData="httpOverallSearchData" |
|||
:tableSelection="true" |
|||
> |
|||
<!-- <template v-slot:beforeTableColumn> |
|||
<u-table-column type="expand" fixed="left"> |
|||
<template slot-scope="props"> |
|||
<el-table |
|||
maxHeight="300px" |
|||
:data="tableData2" |
|||
:border="true" |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
prop="code" |
|||
label="ERP料号" |
|||
width="180"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="date" |
|||
label="日期" |
|||
width="230"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="qty" |
|||
width="260" |
|||
label="数量"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="number" |
|||
width="260" |
|||
label="底盘号"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="chkw" |
|||
width="260" |
|||
label="出货库位"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="chkw2" |
|||
width="260" |
|||
label="出货ERP储位"> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
</u-table-column> |
|||
</template> --> |
|||
</tablePagination> |
|||
<!--抽屉--> |
|||
<curren-Drawer |
|||
:title="tableColumns" |
|||
:DrawerLoading="Loading.DrawerLoading" |
|||
:drawer="displayDialog.detailsDialog" |
|||
:propsData="propsData" |
|||
:tabsDesTions="tabsDesTions" |
|||
:Butttondata="DrawerButtonData" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbuttonHandle" |
|||
@handleCommand="drawerHandle" |
|||
@close-value="closeValue" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
|||
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
|||
<importFile |
|||
:loading="Loading.importLoading" |
|||
:show="displayDialog.importDialog" |
|||
:URL="URL" |
|||
:disabledMethod = {method1:false,method2:false,method3:false} |
|||
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false} |
|||
isAllowPartImportValue="1" |
|||
@importClick="postImportMergeClick(arguments)" |
|||
@postImportDown="importDown('wms/store/deliver-request')" |
|||
></importFile> |
|||
<!-- 批量生成发货单弹窗 --> |
|||
<el-dialog |
|||
title="批量生成发货单" |
|||
:visible="creatDeliverShow" |
|||
:append-to-body="true" |
|||
> |
|||
<el-form :model="creatDeliverForm" :rules="creatDeliverRules" ref="creatDeliverRef"> |
|||
<el-form-item label="车牌号" prop="truckNumber"> |
|||
<el-input v-model="creatDeliverForm.truckNumber"></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer"> |
|||
<el-button @click="creatDeliverClose()">取 消</el-button> |
|||
<el-button type="primary" @click="creatDeliverSure()">确 定</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { |
|||
processRequest, |
|||
getDetailed, |
|||
getPageListWip, |
|||
deliverRequestHandleList, |
|||
deliverRequestDelete |
|||
} 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" |
|||
import { requestData } from "@/utils/processButtonData" |
|||
import { initPrintAllData } from '@/mixins/printMixin' |
|||
export default { |
|||
name: "FISDeliverRequest", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
computed: { |
|||
// 头部按钮显隐控制(普通发货) |
|||
hideButton_normalSta: function () { |
|||
return function (val) { |
|||
return this.showFilterSta_normal == val |
|||
} |
|||
}, |
|||
// 头部按钮显隐控制(FIS发货) |
|||
hideButton_FISSta: function () { |
|||
return function (val) { |
|||
return this.showFilterSta_fis == val |
|||
} |
|||
}, |
|||
// 按钮显示 |
|||
hideDelButton: function () { |
|||
return function () { |
|||
return this.propsData.deliverRequestType != 1 |
|||
} |
|||
}, |
|||
}, |
|||
data () { |
|||
return { |
|||
tableData2: [{ |
|||
code:'CA130D0A012AA', |
|||
date: '2016-05-02', |
|||
qty: '20', |
|||
number: '111', |
|||
chkw:'WIP', |
|||
chkw2:'WIP' |
|||
},{ |
|||
code:'CA130D0A013AA', |
|||
date: '2016-05-02', |
|||
qty: '5', |
|||
number: '222', |
|||
chkw:'WIP', |
|||
chkw2:'WIP' |
|||
},{ |
|||
code:'CA130D0A013AA', |
|||
date: '2016-05-02', |
|||
qty: '15', |
|||
number: '333', |
|||
chkw:'WIP', |
|||
chkw2:'WIP' |
|||
},{ |
|||
code:'CA130D0A013AA', |
|||
date: '2016-05-02', |
|||
qty: '12', |
|||
number: '444', |
|||
chkw:'WIP', |
|||
chkw2:'WIP' |
|||
},], |
|||
URL: 'wms/store/deliver-request-fis', |
|||
importUploadURL:'wms/store/deliver-request/import', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultImportBtn(),//导入 |
|||
{ |
|||
type: "success", |
|||
icon: "el-icon-d-arrow-right", |
|||
label: "批量生成发货单", |
|||
name: "creatDeliver", |
|||
size: "mini", |
|||
}, |
|||
{ |
|||
type: "primary", |
|||
label: "筛选[普通发货]", |
|||
name: "normalSta", |
|||
size: "mini", |
|||
hide: () => { return this.hideButton_normalSta(true) }, |
|||
}, |
|||
{ |
|||
type: "danger", |
|||
label: "重置[普通发货]", |
|||
name: "normalSta-reset", |
|||
size: "mini", |
|||
hide: () => { return this.hideButton_normalSta(false) }, |
|||
}, |
|||
{ |
|||
type: "warning", |
|||
label: "筛选[FIS发货]", |
|||
name: "FISSta", |
|||
size: "mini", |
|||
hide: () => { return this.hideButton_FISSta(true) }, |
|||
}, |
|||
{ |
|||
type: "danger", |
|||
label: "重置[FIS发货]", |
|||
name: "normalSta-reset", |
|||
size: "mini", |
|||
hide: () => { return this.hideButton_FISSta(false) }, |
|||
}, |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: "danger", |
|||
label: "删除", |
|||
name: "delete", |
|||
size: "mini", |
|||
hide: () => { return this.hideDelButton() }, |
|||
}, |
|||
// ...requestData(this) |
|||
], |
|||
showFilterSta_normal:false,//查看普通发货 |
|||
showFilterSta_fis:false,//查看fis发货 |
|||
// 批量生成发货单弹窗 |
|||
creatDeliverShow:false, |
|||
creatDeliverForm:{ |
|||
truckNumber:"" |
|||
}, |
|||
creatDeliverRules:{ |
|||
truckNumber: [{ required: true, trigger: "blur", message: "不可为空" }] |
|||
} |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods:{ |
|||
overallSearchFormCallback(){ |
|||
this.showFilterSta_normal = false |
|||
this.showFilterSta_fis = false |
|||
}, |
|||
// 查看普通发货、fis发货 |
|||
fasterSearchHandle(type){ |
|||
this.PageListParams.condition.filters = [{ |
|||
logic: "And", |
|||
column: "deliverRequestType", |
|||
action: "==", |
|||
value: String(type) |
|||
}] |
|||
this.paging() |
|||
this.httpOverallSearchData = null |
|||
}, |
|||
// 重置普通发货、fis发货 |
|||
resetSearchHandle(){ |
|||
this.showFilterSta_normal = false |
|||
this.showFilterSta_fis = false |
|||
this.PageListParams.condition.filters = [] |
|||
this.paging() |
|||
this.httpOverallSearchData = null |
|||
}, |
|||
topbuttonHandle(val,item){ |
|||
// 批量生成发货单 |
|||
if(val == "creatDeliver"){ |
|||
if(!this.multipleSelection || this.multipleSelection.length <= 0){ |
|||
this.$warningMsg("至少选择一条数据") |
|||
return |
|||
} |
|||
let _hasNoSame = 0 |
|||
for(let i = 0;i<this.multipleSelection.length;i++){ |
|||
if(this.multipleSelection[i].customerCode != this.multipleSelection[0].customerCode){ |
|||
_hasNoSame ++ |
|||
} |
|||
} |
|||
if(_hasNoSame != 0){ |
|||
this.$errorMsg("所选数据的客户代码必须一致!") |
|||
return |
|||
} |
|||
this.creatDeliverShow = true |
|||
} |
|||
// 查看普通发货 |
|||
else if(val == 'normalSta'){ |
|||
this.showFilterSta_normal = true |
|||
this.showFilterSta_fis = false |
|||
this.fasterSearchHandle('1') |
|||
} |
|||
// 查看fis发货 |
|||
else if(val == 'FISSta'){ |
|||
this.showFilterSta_fis = true |
|||
this.showFilterSta_normal = false |
|||
this.fasterSearchHandle('2') |
|||
} |
|||
// 重置状态 |
|||
else if(val == 'normalSta-reset' || val == 'FISSta-reset'){ |
|||
this.resetSearchHandle() |
|||
} |
|||
else{ |
|||
this.topbutton(val,item) |
|||
} |
|||
}, |
|||
printHandle(){ |
|||
this.Loading.appMainLoading = true |
|||
let param = { |
|||
maxResultCount: 1000, |
|||
condition: { |
|||
filters: [{ |
|||
logic: "And", |
|||
column: "deliverRequestNumber", |
|||
action: "==", |
|||
value: this.propsData.number |
|||
}] |
|||
}, |
|||
sorting: "", |
|||
skipCount: 0 |
|||
} |
|||
// 获取记录 |
|||
this.Loading.appMainLoading = true |
|||
getPageListWip(param, 'wms/store/deliver-note/list-for-fis',true) |
|||
.then(async res => { |
|||
let _option = { |
|||
details:{ |
|||
packingCode:"toPackingCode", |
|||
} |
|||
} |
|||
let data = await initPrintAllData(res.items[0],'chdmxb.rdlx',false,_option); |
|||
this.Print(data) |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
.catch(err=>{ |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
drawerbuttonHandle(val){ |
|||
// 审批 |
|||
// if (val == 'agreeRequest') { |
|||
// this.Loading.appMainLoading = true |
|||
// processRequest(this.propsData.id, this.URL + '/agree/').then(res => { |
|||
// getDetailed(this.propsData.id, this.URL).then(res => { |
|||
// this.propsData = res |
|||
// }) |
|||
// this.paging() |
|||
// this.$confirm('审批成功,是否需要打印发货单', '提示', { |
|||
// confirmButtonText: '确定', |
|||
// cancelButtonText: '取消', |
|||
// type: 'warning' |
|||
// }).then(() => { |
|||
// // 打印发货单 |
|||
// this.printHandle() |
|||
// }).catch(() => { |
|||
|
|||
// }); |
|||
// this.Loading.appMainLoading = false |
|||
// }).catch(err => { |
|||
// this.Loading.appMainLoading = false |
|||
// }) |
|||
// } |
|||
if(val == 'delete'){ |
|||
this.$confirm('您确定删除吗, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.Loading.appMainLoading = true; |
|||
deliverRequestDelete(this.propsData.id) |
|||
.then(res=>{ |
|||
this.$successMsg("删除成功!") |
|||
this.paging() |
|||
this.displayDialog.detailsDialog = false |
|||
this.Loading.appMainLoading = false; |
|||
}).catch(() => { |
|||
this.Loading.appMainLoading = false; |
|||
}); |
|||
}).catch(() => { |
|||
|
|||
}); |
|||
} |
|||
else{ |
|||
this.drawerbutton(val) |
|||
} |
|||
}, |
|||
// 批量操作弹窗-关闭 |
|||
creatDeliverClose(){ |
|||
this.creatDeliverForm.truckNumber = "" |
|||
this.creatDeliverShow = false |
|||
}, |
|||
// 批量操作弹窗-确定 |
|||
creatDeliverSure(){ |
|||
this.$refs.creatDeliverRef.validate((valid) => { |
|||
if (valid) { |
|||
this.Loading.appMainLoading = true |
|||
let _params = {truckNumber:String(this.creatDeliverForm.truckNumber)} |
|||
this.creatDeliverClose() |
|||
let _ids = [] |
|||
this.multipleSelection.forEach(select=>{ _ids.push(select.id) }) |
|||
deliverRequestHandleList(_ids,_params) |
|||
.then(res => { |
|||
this.Loading.appMainLoading = false |
|||
this.$refs.FISDeliverRequestTable_Ref.clearSelection() |
|||
this.paging() |
|||
this.$successMsg('操作成功!') |
|||
}).catch(err => { |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
} else { |
|||
console.log('error submit!!'); |
|||
return false; |
|||
} |
|||
}); |
|||
// this.$confirm('是否确定批量生成发货单?', '提示', { |
|||
// confirmButtonText: '确定', |
|||
// cancelButtonText: '取消', |
|||
// type: 'warning' |
|||
// }).then(() => { |
|||
|
|||
// }).catch(() => { |
|||
|
|||
// }); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
::v-deep .el-table__expanded-cell{ |
|||
padding:20px 120px !important |
|||
} |
|||
</style> |
Loading…
Reference in new issue