17 changed files with 555 additions and 292 deletions
@ -0,0 +1,203 @@ |
|||||
|
<template> |
||||
|
<div class="padListPageOuter isPadForOutStockFinishPage"> |
||||
|
<p class="pageTitle">{{pageTitle}}</p> |
||||
|
<div class="bottomBox"> |
||||
|
<el-form class="formBox" :inline="true" :model="formData" size="small"> |
||||
|
<el-form-item label="出库物品条码"> |
||||
|
<el-input ref="itemCode_Ref" clearable v-model="formData.itemCode" placeholder="请扫描出库物品条码"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="sureItem">确定</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="isScanCodeBox"> |
||||
|
<div class="isScanCodeTitle"> |
||||
|
已扫描数据 ({{scanCodes.length}}条) |
||||
|
<el-button size="mini" class="btn-clear-all" type="danger" @click="deleteAllHandel">清除全部</el-button> |
||||
|
</div> |
||||
|
<ul class="isScanCodeList"> |
||||
|
<li |
||||
|
v-for="(item,key) in scanCodes" |
||||
|
:key="key" |
||||
|
> |
||||
|
<span @click="deleteHandel(item,key)" class="del-button el-icon-circle-close"></span> |
||||
|
<span>{{item}}</span> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="btnBox"><el-button size="small" type="success" @click="onSubmit">提交</el-button></div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { outStockFinishCommit } from "@/api/wms-pad"; |
||||
|
export default { |
||||
|
name: 'isPadForOutStockFinish', |
||||
|
data () { |
||||
|
return { |
||||
|
pageTitle:'出库任务完成', |
||||
|
formData:{ |
||||
|
itemCode:null |
||||
|
}, |
||||
|
scanCodes:[] |
||||
|
} |
||||
|
}, |
||||
|
mounted(){ |
||||
|
this.$nextTick(()=>{ |
||||
|
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus() |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
sureItem(){ |
||||
|
if(!this.formData.itemCode){ |
||||
|
this.$warningMsg("请先扫描"); |
||||
|
this.$nextTick(()=>{ |
||||
|
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus() |
||||
|
}) |
||||
|
}else{ |
||||
|
if(this.scanCodes.indexOf(this.formData.itemCode) < 0){ |
||||
|
this.scanCodes.push(this.formData.itemCode) |
||||
|
this.$nextTick(()=>{ |
||||
|
this.formData.itemCode = null; |
||||
|
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus() |
||||
|
}) |
||||
|
}else{ |
||||
|
this.$warningMsg("当前扫描项已存在") |
||||
|
this.$nextTick(()=>{ |
||||
|
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
onSubmit(){ |
||||
|
if(!this.scanCodes || this.scanCodes.length <= 0){ |
||||
|
this.$warningMsg("请先扫描") |
||||
|
return |
||||
|
} |
||||
|
this.$confirm('您是否确定提交?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
outStockFinishCommit(this.scanCodes) |
||||
|
.then((res) => { |
||||
|
if(res.Code == 0){ |
||||
|
this.$successMsg("提交成功") |
||||
|
this.scanCodes = [] |
||||
|
}else{ |
||||
|
this.$errorMsg(res.Message || '提交失败') |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.$errorMsg("提交失败") |
||||
|
}); |
||||
|
}).catch(() => { |
||||
|
|
||||
|
}); |
||||
|
}, |
||||
|
deleteHandel(item,key){ |
||||
|
this.$confirm('您确定删除吗, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.scanCodes.splice(key, 1) |
||||
|
}).catch(() => { |
||||
|
|
||||
|
}); |
||||
|
}, |
||||
|
deleteAllHandel(){ |
||||
|
if(!this.scanCodes || this.scanCodes.length <= 0){return} |
||||
|
this.$confirm('您确定要清除所有已扫描项吗, 是否继续?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.scanCodes = []; |
||||
|
}).catch(() => { |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/padMain.scss"; |
||||
|
.isPadForOutStockFinishPage{ |
||||
|
background:#fff; |
||||
|
|
||||
|
.pageTitle{ |
||||
|
text-align:center; |
||||
|
height:40px; |
||||
|
line-height:40px; |
||||
|
overflow:hidden; |
||||
|
font-weight:bold; |
||||
|
box-shadow: 1px 1px 5px #ddd; |
||||
|
margin:0; |
||||
|
border-bottom: #efefef solid 1px; |
||||
|
} |
||||
|
|
||||
|
.bottomBox{ |
||||
|
padding:10px 20px 0 20px; |
||||
|
height:calc(100% - 90px); |
||||
|
padding-top: 10px; |
||||
|
background:#f8f8f8; |
||||
|
|
||||
|
.formBox{ |
||||
|
height:45px; |
||||
|
overflow:hidden |
||||
|
} |
||||
|
|
||||
|
.isScanCodeBox{ |
||||
|
height: calc(100% - 60px); |
||||
|
background: #fff; |
||||
|
padding: 15px; |
||||
|
box-shadow: 1px 1px 5px #ddd; |
||||
|
|
||||
|
.isScanCodeTitle{ |
||||
|
height:30px; |
||||
|
color:#666; |
||||
|
position:relative; |
||||
|
|
||||
|
.btn-clear-all{ |
||||
|
position:absolute; |
||||
|
right:20px; |
||||
|
top:0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.isScanCodeList{ |
||||
|
height:calc(100% - 30px); |
||||
|
overflow:auto; |
||||
|
list-style:none; |
||||
|
margin:0; |
||||
|
padding:0; |
||||
|
|
||||
|
li{ |
||||
|
margin-bottom:10px; |
||||
|
padding:10px; |
||||
|
border-bottom:dashed 1px #ddd; |
||||
|
|
||||
|
.del-button{ |
||||
|
color:#999; |
||||
|
margin-right:8px; |
||||
|
cursor: pointer; |
||||
|
font-size:18px |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.btnBox{ |
||||
|
height:50px; |
||||
|
text-align:right; |
||||
|
padding-right:20px; |
||||
|
padding-top:8px; |
||||
|
border-top: #efefef solid 1px; |
||||
|
.el-button{ |
||||
|
width:100px |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,138 @@ |
|||||
|
<template> |
||||
|
<div class="padListPageOuter isPadForOutStockFinishPage"> |
||||
|
<p class="pageTitle">{{pageTitle}}</p> |
||||
|
<div class="bottomBox" v-loading="pageLoading"> |
||||
|
<el-form class="formBox" ref="form_Ref" :rules="rules" :model="formData" size="small"> |
||||
|
<el-form-item label="位置码" prop="site"> |
||||
|
<el-input ref="site_Ref" @change="positionChange" clearable v-model="formData.site" placeholder="请扫描位置码"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="库位码" prop="locationCode"> |
||||
|
<el-input disabled v-model="formData.locationCode"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="托盘号" prop="code"> |
||||
|
<el-input ref="code_Ref" clearable v-model="formData.code" placeholder="请扫描托盘号"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<div class="btnBox"><el-button size="small" type="success" @click="onSubmit">提交</el-button></div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getLocationCodeByPosition,receiveBackStockAction } from "@/api/wms-pad"; |
||||
|
import { generateUUID } from "@/utils/index" |
||||
|
|
||||
|
export default { |
||||
|
name: 'isPadForReceiveBackStock', |
||||
|
data () { |
||||
|
return { |
||||
|
pageLoading:false, |
||||
|
pageTitle:'回库器具或空器具AGV搬运', |
||||
|
formData:{ |
||||
|
site:null,//位置码 |
||||
|
code:null,//托盘号 |
||||
|
locationCode:null,//转换后的locationCode |
||||
|
}, |
||||
|
rules: { |
||||
|
site: [{ required: true, message: '请扫描位置码', trigger: 'change' }], |
||||
|
code: [{ required: true, message: '请扫描托盘号', trigger: 'change' }], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted(){ |
||||
|
this.$nextTick(()=>{ |
||||
|
if(this.$refs.site_Ref)this.$refs.site_Ref.focus() |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
positionChange(){ |
||||
|
this.pageLoading = true |
||||
|
getLocationCodeByPosition(this.formData.site) |
||||
|
.then((res) => { |
||||
|
this.pageLoading = false |
||||
|
this.formData.locationCode = res.locationCode; |
||||
|
this.$nextTick(()=>{ |
||||
|
if(this.$refs.code_Ref)this.$refs.code_Ref.focus() |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
this.pageLoading = false |
||||
|
this.$errorMsg("位置码转换失败!") |
||||
|
}); |
||||
|
}, |
||||
|
onSubmit(){ |
||||
|
this.$refs.form_Ref.validate((valid) => { |
||||
|
if (valid) { |
||||
|
if(!this.formData.locationCode){ |
||||
|
this.$errorMsg("未查到位置码相关信息,请检查位置码!") |
||||
|
return |
||||
|
} |
||||
|
this.$confirm('您是否确定提交?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}) |
||||
|
.then(() => { |
||||
|
let _data = { |
||||
|
uuid: generateUUID(), |
||||
|
operatorName: this.$store.getters.name.userName, |
||||
|
data:{ |
||||
|
site: this.formData.locationCode, |
||||
|
code: this.formData.code |
||||
|
} |
||||
|
} |
||||
|
receiveBackStockAction(_data) |
||||
|
.then((res) => { |
||||
|
if(res.Code == 0){ |
||||
|
this.$successMsg("提交成功") |
||||
|
}else{ |
||||
|
this.$errorMsg(res.Message || '提交失败') |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.$errorMsg("提交失败") |
||||
|
}); |
||||
|
}).catch(() => { |
||||
|
|
||||
|
}); |
||||
|
} else { |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/padMain.scss"; |
||||
|
.isPadForOutStockFinishPage{ |
||||
|
background:#fff; |
||||
|
|
||||
|
.pageTitle{ |
||||
|
text-align:center; |
||||
|
height:40px; |
||||
|
line-height:40px; |
||||
|
overflow:hidden; |
||||
|
font-weight:bold; |
||||
|
box-shadow: 1px 1px 5px #ddd; |
||||
|
margin:0; |
||||
|
border-bottom: #efefef solid 1px; |
||||
|
} |
||||
|
|
||||
|
.bottomBox{ |
||||
|
padding:10px 20px 0 20px; |
||||
|
height:calc(100% - 90px); |
||||
|
padding-top: 10px; |
||||
|
background:#f8f8f8; |
||||
|
} |
||||
|
|
||||
|
.btnBox{ |
||||
|
height:50px; |
||||
|
text-align:right; |
||||
|
padding-right:20px; |
||||
|
padding-top:8px; |
||||
|
border-top: #efefef solid 1px; |
||||
|
.el-button{ |
||||
|
width:100px |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,80 @@ |
|||||
|
<template> |
||||
|
<div class="padListPageOuter" v-loading="pageLoading"> |
||||
|
<padListPage |
||||
|
:pageTitle="pageTitle" |
||||
|
:listUrl="listUrl" |
||||
|
ref="padListPage_Ref" |
||||
|
:padListData="padListData" |
||||
|
:padMainColumn="padMainColumn" |
||||
|
:padListLoading="padListLoading" |
||||
|
:padListPager="padListPager" |
||||
|
:getPadList="getPadList" |
||||
|
:padMainStaColumn="[{prop:'taskNo'}]" |
||||
|
:noPager="true" |
||||
|
></padListPage> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { padListPageMixins } from "@/mixins/padListPageMixins" |
||||
|
import padListPage from "./components/padListPage/index" |
||||
|
import { getPageListForOuter } from "@/api/wms-pad"; |
||||
|
|
||||
|
export default { |
||||
|
name: 'isPadForReceiveTractorAction', |
||||
|
mixins: [ |
||||
|
padListPageMixins, |
||||
|
], |
||||
|
components: { padListPage }, |
||||
|
data () { |
||||
|
return { |
||||
|
// listUrl:'wms/store/transfer-lib-job', |
||||
|
outerListUrl:localStorage.getItem('supplierOuterURL') + '/zozocnApi/custom/receiveTractorAction', |
||||
|
padMainColumn:[ |
||||
|
{ label: "产品名称", prop: "yGoodsName" }, |
||||
|
{ label:'产品编号',prop:'productNo'}, |
||||
|
{ label: "产品颜色", prop: "productColor" }, |
||||
|
{ label: "产品类型", prop: "yPostion" }, |
||||
|
{ label: "车型", prop: "yCarType" }, |
||||
|
{ label: "托盘号", prop: "codeNo" }, |
||||
|
{ label: "需求工位", prop: "needSite" }, |
||||
|
{ label: "所在库口", prop: "outSite" }, |
||||
|
{ label: "数量", prop: "count" }, |
||||
|
], |
||||
|
pageTitle:this.$route.meta.title, |
||||
|
pageLoading:false |
||||
|
} |
||||
|
}, |
||||
|
mounted(){ |
||||
|
this.initPage() |
||||
|
}, |
||||
|
methods: { |
||||
|
getPadList(page=1){ |
||||
|
if(this.pageLoading)return |
||||
|
this.padListLoading = true |
||||
|
this.pageLoading = true |
||||
|
getPageListForOuter(this.outerListUrl).then(res => { |
||||
|
// 无数据 |
||||
|
if(res.Code == 0 && (!res.Data || res.Data == "" || res.Data == null || res.Data.length < 0)){ |
||||
|
this.padListData = [] |
||||
|
this.padListPager.totalCount = 0 |
||||
|
}else{ |
||||
|
this.padListData = res.Data |
||||
|
this.padListPager.totalCount = res.Data.length |
||||
|
} |
||||
|
this.padListPager.totalPage = 1 |
||||
|
this.pageLoading = false |
||||
|
this.padListLoading = false |
||||
|
this.padListPager.currentPage = 1 |
||||
|
}).catch(err => { |
||||
|
this.pageLoading = false |
||||
|
this.padListLoading = false |
||||
|
console.log(err) |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/padMain.scss"; |
||||
|
</style> |
@ -1,278 +0,0 @@ |
|||||
<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="topbuttonHandle" |
|
||||
@inlineDialog="inlineDialog" |
|
||||
@sortChange="sortChange" |
|
||||
@alertoldSkipCount="alertoldSkipCount" |
|
||||
@alterResultCount="alterResultCount" |
|
||||
@handleSelectionChange="handleSelectionChange" |
|
||||
:currentPageProps="oldSkipCount" |
|
||||
:quicklySearchOption="quicklySearchOption" |
|
||||
@quicklySearchClick="quicklySearchClick" |
|
||||
@quicklySearchClear="quicklySearchClear" |
|
||||
:primarySearchOption="primarySearchOption" |
|
||||
@overallSearchFormClick="overallSearchFormClick" |
|
||||
:httpOverallSearchData="httpOverallSearchData" |
|
||||
:setUTableHeight="140" |
|
||||
> |
|
||||
</tablePagination> |
|
||||
<!-- 新导入 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" |
|
||||
></importFile> |
|
||||
<!--抽屉--> |
|
||||
<curren-Drawer |
|
||||
:title="tableColumns" |
|
||||
:DrawerLoading="Loading.DrawerLoading" |
|
||||
:drawer="displayDialog.detailsDialog" |
|
||||
:propsData="propsData" |
|
||||
:tabsDesTions="tabsDesTions" |
|
||||
:Butttondata="DrawerButtonData" |
|
||||
@drawerbutton="drawerbutton" |
|
||||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|
||||
@handleCommand="drawerHandle" |
|
||||
@close-value="closeValue" |
|
||||
:tableColumns="detailsTableColumns" |
|
||||
:totalCount="totalCountDetails" |
|
||||
:MaxResultCount="MaxResultCountDetails" |
|
||||
@alterResultCountDetails="alterResultCountDetails" |
|
||||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|
||||
></curren-Drawer> |
|
||||
<!-- 新增与编辑 --> |
|
||||
<newAndEdiDialog |
|
||||
:loading="Loading.newAndEdiLoading" |
|
||||
:active="active" |
|
||||
:pageStatus="pageStatus" |
|
||||
:formReveal="formReveal" |
|
||||
:formTitle="formTitle" |
|
||||
:displayDialog="editDialog" |
|
||||
:FormData="formReveal ? CreateFormData : editFormData" |
|
||||
:Form="formReveal ? CreateForm : editForm" |
|
||||
:Options="editOptions" |
|
||||
:Handle="editHandle" |
|
||||
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
|
||||
@FormSubmit="FormSubmitHandle" |
|
||||
@close="FormCloseHandle" |
|
||||
@goBack="goBack" |
|
||||
> |
|
||||
<template> |
|
||||
<curren-descriptions |
|
||||
v-if="this.displayDialog.newDialog" |
|
||||
:border="true" |
|
||||
:column="3" |
|
||||
:direction="'horizontal'" |
|
||||
:colon="false" |
|
||||
:tabsDesTions="detailsTableColumns" |
|
||||
:propsData="propsData.details[0]" |
|
||||
class="drawerDescriptionsFirst" |
|
||||
style="width:100%;padding-top:20px" |
|
||||
> |
|
||||
</curren-descriptions> |
|
||||
</template> |
|
||||
</newAndEdiDialog> |
|
||||
<!-- 搜索按钮——窗体组件 --> |
|
||||
<searchPage |
|
||||
ref="searchTable" |
|
||||
:tableLoading="Loading.autoTableLoading" |
|
||||
:advancedFilter="advancedFilter()" |
|
||||
:filterPageListParams="filterPageListParams" |
|
||||
:formTitle="searchTitle" |
|
||||
:displayDialog="displayDialog.AddNewDialog" |
|
||||
:searchTableData="searchData" |
|
||||
:searchTableColumns="searchColumns" |
|
||||
:searchTotalCount="searchTotalCount" |
|
||||
:supplierItemPage="searchPageListParams" |
|
||||
@handleSelectionChange="prepareFormData" |
|
||||
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
|
||||
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
|
||||
@tableButtonClick="searchSubmit(arguments)" |
|
||||
></searchPage> |
|
||||
</div> |
|
||||
</template> |
|
||||
<script> |
|
||||
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 { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
|
||||
import { filterSelectMixins } from '@/mixins/filter-Select' |
|
||||
import { transferLibJobHandel } from '@/api/wms-job' |
|
||||
import { getInventoryByPackingCode,getDetailed } from '@/api/wms-api' |
|
||||
import currenDescriptions from "@/components/currenDescriptions" |
|
||||
export default { |
|
||||
name: "isPadForTransferLibJob", |
|
||||
components: { |
|
||||
currenDescriptions, |
|
||||
}, |
|
||||
mixins: [ |
|
||||
tableMixins, |
|
||||
LoadingMixins, |
|
||||
drawerMixins, |
|
||||
TableHeaderMixins, |
|
||||
mixins, |
|
||||
filterSelectMixins, |
|
||||
newAndEdiDialogMixins |
|
||||
], |
|
||||
computed: { |
|
||||
editDialog: { |
|
||||
get: function () { |
|
||||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|
||||
}, |
|
||||
}, |
|
||||
//按钮显示 |
|
||||
hideButton: function () { |
|
||||
return function (val) { |
|
||||
let data = true |
|
||||
val.forEach(key => { |
|
||||
if (this.propsData.jobStatus == key) { |
|
||||
data = false |
|
||||
} |
|
||||
}) |
|
||||
return data |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
URL: "wms/store/transfer-lib-job", |
|
||||
//常用按钮数据 |
|
||||
currenButtonData: [ |
|
||||
// this.defaultImportBtn(),//导入 |
|
||||
{ |
|
||||
type: 'warning', |
|
||||
label: '查看待执行数据', |
|
||||
name: "showCanHandle", |
|
||||
size: 'mini' |
|
||||
}, |
|
||||
{ |
|
||||
type: 'success', |
|
||||
label: '查看所有数据', |
|
||||
name: "showAllData", |
|
||||
size: 'mini' |
|
||||
}, |
|
||||
this.defaultFieldSettingBtn(),//字段设置 |
|
||||
this.defaultFreshBtn(),//刷新 |
|
||||
this.defaultFilterBtn(),//筛选 |
|
||||
], |
|
||||
DrawerButtonData:[ |
|
||||
{ |
|
||||
type:'success', |
|
||||
label: '完成库移', |
|
||||
name: "handle", |
|
||||
hide: () => { return this.hideButton([1,2,4]) }, |
|
||||
size:"mini" |
|
||||
}, |
|
||||
], |
|
||||
CreateFormData: { |
|
||||
packingCode:"", |
|
||||
fromLocationCode:"", |
|
||||
toLocationCode:"", |
|
||||
}, |
|
||||
CreateForm: [ |
|
||||
{ type: "input", label: "箱码", prop: 'packingCode', colSpan: 12, }, |
|
||||
{ type: "input", label: "来源库位", prop: 'fromLocationCode', colSpan: 12, }, |
|
||||
{ type: "input", label: "目标库位", prop: 'toLocationCode', colSpan: 12, }, |
|
||||
], |
|
||||
editRules: { |
|
||||
cerateRule: { |
|
||||
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
||||
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
||||
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.paging(); |
|
||||
}, |
|
||||
methods:{ |
|
||||
topbuttonHandle(val,item){ |
|
||||
if(val == 'showCanHandle'){ |
|
||||
this.PageListParams.condition.filters.push({ |
|
||||
logic:"And", |
|
||||
column:"jobStatus", |
|
||||
action:"In", |
|
||||
value: JSON.stringify([1,2,4,30]) |
|
||||
}) |
|
||||
this.paging(); |
|
||||
} |
|
||||
else if(val == 'showAllData'){ |
|
||||
this.PageListParams.condition.filters = this.PageListParams.condition.filters.filter(obj => obj.column != 'jobStatus'); |
|
||||
this.paging(); |
|
||||
} |
|
||||
else{ |
|
||||
this.topbutton(val,item) |
|
||||
} |
|
||||
}, |
|
||||
drawerbutton(val){ |
|
||||
// 完成库移 |
|
||||
if(val == "handle"){ |
|
||||
this.formTitle = "完成库移"; |
|
||||
this.formReveal = true |
|
||||
this.theEvent = "newly" |
|
||||
this.displayDialog.newDialog = true; |
|
||||
} |
|
||||
}, |
|
||||
FormSubmitHandle(val){ |
|
||||
this.Loading.newAndEdiLoading = true |
|
||||
// 先获取库存余额进行部分项赋值 |
|
||||
getInventoryByPackingCode(this.CreateFormData.packingCode).then(inventory => { |
|
||||
// 目前定的需求为:details中只有一条明细,所以按钮写在最外层,默认赋值第一位 |
|
||||
let _data = this.propsData |
|
||||
_data.details[0].handledFromPackingCode = this.CreateFormData.packingCode |
|
||||
_data.details[0].handledToPackingCode = this.CreateFormData.packingCode |
|
||||
_data.details[0].handledFromLocationCode = this.CreateFormData.fromLocationCode |
|
||||
_data.details[0].handledToLocationCode = this.CreateFormData.toLocationCode |
|
||||
_data.details[0].handledToLot = inventory.lot |
|
||||
_data.details[0].handledFromLot = inventory.lot |
|
||||
_data.details[0].handledFromSupplierBatch = inventory.supplierBatch |
|
||||
_data.details[0].handledToSupplierBatch = inventory.supplierBatch |
|
||||
_data.details[0].handledFromQty = inventory.qty |
|
||||
_data.details[0].handledToQty = inventory.qty |
|
||||
transferLibJobHandel(this.propsData.id, _data).then(res => { |
|
||||
this.Loading.newAndEdiLoading = false |
|
||||
this.FormResult("success") |
|
||||
}).catch(err => { |
|
||||
this.Loading.newAndEdiLoading = false |
|
||||
this.FormResult("error") |
|
||||
}) |
|
||||
}).catch(err => { |
|
||||
this.Loading.newAndEdiLoading = false |
|
||||
}) |
|
||||
}, |
|
||||
FormCloseHandle(val){ |
|
||||
this.FormClose(val) |
|
||||
this.Loading.appMainLoading = true |
|
||||
getDetailed(this.propsData.id, this.URL) |
|
||||
.then(res => { |
|
||||
this.propsData = res |
|
||||
this.Loading.appMainLoading = false |
|
||||
}) |
|
||||
.catch(err=>{ |
|
||||
this.Loading.appMainLoading = false |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
<style lang="scss" scoped> |
|
||||
@import "@/styles/mainbasicData.scss"; |
|
||||
</style> |
|
Loading…
Reference in new issue