|
|
@ -21,7 +21,7 @@ |
|
|
|
@quicklySearchClick="quicklySearchClick" |
|
|
|
@quicklySearchClear="quicklySearchClear" |
|
|
|
:primarySearchOption="primarySearchOption" |
|
|
|
@overallSearchFormClick="overallSearchFormClick" |
|
|
|
@overallSearchFormClick="(options)=>{overallSearchFormClick(options,overallSearchFormCallback)}" |
|
|
|
:httpOverallSearchData="httpOverallSearchData" |
|
|
|
:tableSelection="true" |
|
|
|
> |
|
|
@ -56,6 +56,22 @@ |
|
|
|
@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> |
|
|
@ -82,6 +98,18 @@ export default { |
|
|
|
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 |
|
|
|
} |
|
|
|
}, |
|
|
|
// 按钮显示 |
|
|
|
hideButton: function () { |
|
|
|
return function (val) { |
|
|
@ -109,6 +137,34 @@ export default { |
|
|
|
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(),//筛选 |
|
|
@ -116,13 +172,47 @@ export default { |
|
|
|
DrawerButtonData: [ |
|
|
|
// ...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("至少选择一条数据") |
|
|
@ -138,26 +228,25 @@ export default { |
|
|
|
this.$errorMsg("所选数据的客户代码必须一致!") |
|
|
|
return |
|
|
|
} |
|
|
|
let _ids = [] |
|
|
|
this.multipleSelection.forEach(select=>{ _ids.push(select.id) }) |
|
|
|
this.$confirm('是否确定批量生成发货单?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
deliverRequestHandleList(_ids) |
|
|
|
.then(res => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
this.$refs.FISDeliverRequestTable_Ref.clearSelection() |
|
|
|
this.paging() |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
}else{ |
|
|
|
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) |
|
|
|
} |
|
|
|
}, |
|
|
@ -219,6 +308,44 @@ export default { |
|
|
|
}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(() => { |
|
|
|
|
|
|
|
// }); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|