19 changed files with 4516 additions and 161 deletions
@ -0,0 +1,111 @@ |
|||
<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" |
|||
:tabsDesTions="tabsDesTions" |
|||
:Butttondata="DrawerButtonData" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbutton" |
|||
@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" |
|||
></importFile> |
|||
</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 { requestData } from "@/utils/processButtonData" |
|||
export default { |
|||
name: "FISDeliverJob", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
computed: { |
|||
// 按钮显示 |
|||
hideButton: function () { |
|||
return function (val) { |
|||
let data = true |
|||
val.forEach(key => { |
|||
if (this.propsData.requestStatus == key) { |
|||
data = false |
|||
} |
|||
}) |
|||
return data |
|||
} |
|||
}, |
|||
}, |
|||
data () { |
|||
return { |
|||
URL: 'wms/store/deliver-request-fis', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultImportBtn(),//导入 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
...requestData(this) |
|||
], |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
</style> |
@ -0,0 +1,548 @@ |
|||
<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> |
|||
<!-- 执行 --> |
|||
<handelFrom |
|||
:formTitle="formTitle" |
|||
:displayDialog.sync="displayDialog.handleFromDialog" |
|||
:CreateFormData="handleFormData" |
|||
:CreateForm="handleForm" |
|||
:Rules="editRules.handleRule" |
|||
:Options="editOptions" |
|||
:detailsTableColumns="handleDetailsTableColumns" |
|||
:isShowIndex="true" |
|||
:selectionTable="true" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@FormSubmit="handleFormSubmit" |
|||
></handelFrom> |
|||
<curren-Drawer |
|||
:title="tableColumns" |
|||
:DrawerLoading="Loading.DrawerLoading" |
|||
:drawer="displayDialog.detailsDialog" |
|||
:propsData="propsData" |
|||
:tabsDesTions="tabsDesTions" |
|||
:Butttondata="DrawerButtonData" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbutton" |
|||
@close-value="closeValue" |
|||
:currenButtonData="currenButtonData" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { getPageList, createAndHandle } from "@/api/wms-api" |
|||
import { materialRequestByType, handle} from "@/api/wms-job" |
|||
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 store from '@/store' |
|||
import { initPrintAllData } from "@/mixins/printMixin" |
|||
export default { |
|||
name: "LibraryShiftJob", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
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/issue-job', |
|||
tableLoading: false, |
|||
handleMultipleSelection: [], |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
// this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: 'info', |
|||
icon: 'el-icon-printer', |
|||
label: '打印', |
|||
hide: false, |
|||
name: "print", |
|||
size: 'mini' |
|||
}, |
|||
], |
|||
handleDetailsTableColumns: [ |
|||
{ label: "物品代码", prop: "itemCode", }, |
|||
{ label: "物品名称", prop: "itemName" }, |
|||
{ label: "实际库位", prop: "handledLocationCode", }, |
|||
{ label: "推荐库位", prop: "recommendLocationCode", }, |
|||
{ label: "实际箱标签", prop: "handledPackingCode", }, |
|||
{ label: "推荐箱标签", prop: "recommendPackingCode", }, |
|||
{ label: "实际批次", prop: "handledLot", }, |
|||
{ label: "推荐批次", prop: "recommendLot", }, |
|||
{ type: "object", label: "实际数量", prop: "handledQty", showProp: "qty", }, |
|||
{ type: "object", label: "实际单位", prop: "handledQty", showProp: "uom", }, |
|||
{ type: "object", label: "推荐数量", prop: "recommendQty", showProp: "qty", }, |
|||
{ type: "object", label: "推荐单位", prop: "recommendQty", showProp: "uom", }, |
|||
], |
|||
editOptions: { |
|||
|
|||
}, |
|||
handleFormData: { |
|||
id: null, |
|||
creationTime: null, |
|||
IssueNoteNumber: "123", |
|||
lastModificationTime: null, |
|||
remark: null, |
|||
concurrencyStamp: null, |
|||
company: null, |
|||
number: null, |
|||
upStreamJobNumber: null, |
|||
materialRequestNumber: null, |
|||
jobType: 1, |
|||
jobStatus: 1, |
|||
priority: 0, |
|||
priorityIncrement: 0, |
|||
wlgCode: "123", |
|||
isAutoComplete: true, |
|||
details: [], |
|||
acceptTime: null, |
|||
completeTime: null, |
|||
prodLine: null, |
|||
toLocationCode: null, |
|||
}, |
|||
childTableData: [ |
|||
{ |
|||
"id": null, |
|||
"creationTime": null, |
|||
// "creatorId": null, |
|||
"lastModificationTime": null, |
|||
// "lastModifierId": null, |
|||
"remark": null, |
|||
"concurrencyStamp": null, |
|||
"masterID": null, |
|||
"packingCode": null, |
|||
"containerCode": null, |
|||
"item": { |
|||
"id": null, |
|||
"name": null, |
|||
"desc1": null, |
|||
"desc2": null |
|||
}, |
|||
"itemCode": null, |
|||
"stdPack": { |
|||
"packUom": null, |
|||
"packQty": 0 |
|||
}, |
|||
"recommendBatch": { |
|||
"supplierBatch": null, |
|||
"produceDate": null |
|||
}, |
|||
"recommendLot": "", |
|||
"recommendLocationCode": "", |
|||
"recomendQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
}, |
|||
"handledBatch": { |
|||
"supplierBatch": null, |
|||
"produceDate": null |
|||
}, |
|||
"handledLot": "", |
|||
"handledLocationCode": "", |
|||
"handledQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
}, |
|||
"fromLocation": "", |
|||
"toLocation": "", |
|||
"workshop": null, |
|||
"prodLine": null, |
|||
"workCenter": null, |
|||
} |
|||
], |
|||
handleForm: [ |
|||
{ type: "input", label: "任务编号", prop: "number", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "到货编号", prop: "arriveNumber", colSpan: 12, disabled: "true" }, |
|||
{ type: "select", label: "任务类型", prop: "jobType", options: "taskType", colSpan: 12, disabled: "true" }, |
|||
{ type: "select", label: "任务状态", prop: "jobStatus", options: "jobStatus", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "优先级", prop: "priority", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "工作组", prop: "wlgCode", colSpan: 12, disabled: "true" }, |
|||
{ type: "dateTime", label: "接收时间", prop: "acceptTime", colSpan: 12, }, |
|||
{ type: "input", label: "备注", prop: "remark", colSpan: 12, }, |
|||
{ type: "input", label: "生产线", prop: "prodLine", disabled: "true", colSpan: 12, }, |
|||
// { type: "autocomplete", label: "目标库位", prop: "toLocationCode", optionsLabel: "itemCode", optionsValue: "locationCode", focus: (val) => { return this.getSelectList(val, "wms/inventory/Inventory-Balance") }, click: (val) => { this.filterTable(val, 'wms/inventory/Inventory-Balance', 'InventoryBalance-PullForm', '库位选择') }, colSpan: 12 }, |
|||
{ type: "autocomplete", label: "目标库位", prop: "toLocationCode", optionsLabel: "name", optionsValue: "code", focus: (val) => { return this.getSelectList(val, "basedata/Location") }, click: (val) => { this.filterTable(val, 'basedata/Location', 'InventoryBalance-PullForm', '库位选择') }, colSpan: 12 }, |
|||
], |
|||
editRules: { |
|||
handleRule: { |
|||
number: [ |
|||
{ required: true, trigger: "blur", message: "不可为空" }, |
|||
], |
|||
jobType: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
jobStatus: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
priority: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
wlgCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
}, |
|||
cerateRule: { |
|||
itemCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
toLocationCode: [{ required: false, trigger: "blur", message: "不可为空" }], |
|||
numberInput: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
} |
|||
}, |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
requestType: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params) |
|||
.then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
handleFormSubmit (val) { |
|||
let that = this |
|||
return new Promise((resolve, reject) => { |
|||
if (that.handleMultipleSelection.length == 0) { |
|||
that.$errorMsg('请先择提交的数据!') |
|||
reject() |
|||
} else { |
|||
if (that.handleMultipleSelection[0].requestLocationCode != that.handleFormData.toLocationCode) { |
|||
that.$confirm('目标库位与需求库位不一致,是否要将所有物品发到目标库位?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.checkHandleSubmit(resolve, reject) |
|||
}).catch(() => { |
|||
reject() |
|||
}) |
|||
} else { |
|||
that.$confirm('是否要将物品发到目标库位:[' + that.handleFormData.toLocationCode + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.checkHandleSubmit(resolve, reject) |
|||
}).catch(() => { |
|||
reject() |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
checkHandleSubmit(resolve, reject) { |
|||
let that = this |
|||
|
|||
let items = that.handleMultipleSelection.filter(r => { |
|||
return (r.handledPackingCode === null || r.handledPackingCode === '') |
|||
}) |
|||
|
|||
if (items.length > 0) { |
|||
let packingCodes = ''; |
|||
items.forEach(r => { |
|||
packingCodes += r.recommendPackingCode + ',' |
|||
}) |
|||
that.$confirm('以下箱码对应的实际箱码为空,是否要继续发料?:[' + packingCodes + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.finshIssueJobHandle(resolve, reject) |
|||
}).catch(() => { |
|||
return reject() |
|||
}) |
|||
} else { |
|||
that.finshIssueJobHandle(resolve, reject) |
|||
} |
|||
}, |
|||
finshIssueJobHandle(resolve, reject) { |
|||
let that = this |
|||
let data = { |
|||
id: that.propsData.id |
|||
} |
|||
that.handleMultipleSelection.forEach(item => { |
|||
item.toLocationCode = that.handleFormData.toLocationCode |
|||
item.handledContainerCode = item.recommendContainerCode; |
|||
item.handledPackingCode = item.recommendPackingCode; |
|||
item.handledBatch = item.recommendBatch; |
|||
item.handledLot = item.recommendLot; |
|||
item.handledLocationCode = item.recommendLocationCode; |
|||
}) |
|||
let params = JSON.parse(JSON.stringify(that.handleFormData)) |
|||
delete params.details |
|||
params.details = that.handleMultipleSelection |
|||
handle(params, data, that.URL).then(res => { |
|||
that.displayDialog.handleFromDialog = false; |
|||
that.$successMsg('已生成发料记录!') |
|||
that.paging() |
|||
return resolve() |
|||
}).catch(err => { |
|||
return reject(); |
|||
}) |
|||
}, |
|||
// 输入框 变更 |
|||
changeInput(prop, val) { |
|||
let that = this |
|||
if (prop == 'numberInput' ) { |
|||
this.$confirm('是否要将以下所有零件的需求数量更改为[' + val + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.CreateFormData.details.forEach(item => { |
|||
item.numberDetails = parseInt(val) |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
}, |
|||
//新增——删除table |
|||
deleteRow(index, rows) { |
|||
rows.splice(index, 1); |
|||
}, |
|||
//新增-按钮 |
|||
FormClick(val) { |
|||
let that = this |
|||
if (val[0] == 0) { |
|||
} else if (val[0] == 1) { |
|||
// 查询 |
|||
this.editRules.cerateRule.toLocationCode[0].required = false |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
this.tableLoading = true |
|||
let params = { |
|||
condition: { |
|||
filters: [ |
|||
{ |
|||
logic: "And", |
|||
column: "code", |
|||
action: "==", |
|||
value: that.CreateFormData.itemCode |
|||
} |
|||
] |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100 |
|||
} |
|||
getPageList(params, 'basedata/item-basic').then(res => { |
|||
if (res.items.length == 0) { |
|||
this.$errorMsg('未查询到该物品信息!') |
|||
} else { |
|||
let findRs = that.CreateFormData.details.find(item => ( |
|||
item.code == that.CreateFormData.itemCode |
|||
)) |
|||
if (!findRs) { |
|||
res.items.forEach(item => { |
|||
item.numberDetails = 0 |
|||
that.CreateFormData.details.push(item) |
|||
}) |
|||
} |
|||
} |
|||
this.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.tableLoading = false |
|||
}) |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} else { |
|||
this.editRules.cerateRule.toLocationCode[0].required = true |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
if (this.CreateFormData.details.length > 0) { |
|||
let params = { |
|||
worker: store.getters.name.userName, |
|||
company: localStorage.getItem("company"), |
|||
details: [], |
|||
} |
|||
for (var i = 0; i < this.CreateFormData.details.length; i++) { |
|||
if (this.CreateFormData.details[i].numberDetails <= 0) { |
|||
this.$errorMsg('物品[' + this.CreateFormData.details[i].code + ']的数量应该大于0') |
|||
return |
|||
} else { |
|||
params.details.push({ |
|||
itemCode: this.CreateFormData.details[i].code, |
|||
item: { |
|||
id: this.CreateFormData.details[i].id, |
|||
name: this.CreateFormData.details[i].name, |
|||
desc1: this.CreateFormData.details[i].desc1, |
|||
desc2: this.CreateFormData.details[i].desc2, |
|||
}, |
|||
qty: { |
|||
uom: this.CreateFormData.details[i].basicUom, |
|||
qty: this.CreateFormData.details[i].numberDetails |
|||
}, |
|||
prodLine: '', |
|||
status: this.CreateFormData.details[i].status, |
|||
toLocationCode: this.CreateFormData.toLocationCode, |
|||
worker: store.getters.name.userName, |
|||
}) |
|||
} |
|||
} |
|||
this.Loading.newAndEdiLoading = true |
|||
createAndHandle(params).then( res => { |
|||
this.displayDialog.newDialog = false |
|||
this.Loading.newAndEdiLoading = false |
|||
this.$successMsg("发料任务创建成功!") |
|||
this.paging() |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.newAndEdiLoading = false |
|||
}) |
|||
} else { |
|||
this.$errorMsg('无数据可提交!') |
|||
} |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
drawerbutton (val) { |
|||
// 打印 |
|||
if(val == 'print'){ |
|||
let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) |
|||
_propsData.title = "线边仓领料单" |
|||
_propsData.details.forEach(item=>{ |
|||
item.recommendLot = item.recommendLot + " " |
|||
}) |
|||
let _option = { |
|||
details:{ |
|||
fromLocationCode:"recommendFromLocationCode", |
|||
qty:"handledQty", |
|||
fromLot:"recommendLot", |
|||
fromLocationErpCode:"recommendFromLocationErpCode", |
|||
} |
|||
} |
|||
let data = initPrintAllData(_propsData,'xbcll.rdlx',false,_option); |
|||
this.Print(data) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
}, |
|||
// drawerbutton(val) { |
|||
// if (val == 'handleJob') { |
|||
// this.Loading.appMainLoading = true |
|||
// let propsData = JSON.parse(JSON.stringify(this.propsData)); |
|||
// this.$listAssign(this.handleFormData, propsData) |
|||
// this.handleFormData.toLocationCode = this.handleFormData.details[0].toLocationCode |
|||
// this.handleMultipleSelection = [] |
|||
// this.Loading.appMainLoading = false |
|||
// this.formTitle = "执行" + this.$route.meta.title; |
|||
// this.displayDialog.handleFromDialog = true |
|||
// } else { |
|||
// drawerMixins.methods.drawerbutton(val, this) |
|||
// } |
|||
// }, |
|||
handleSelectionChange(val) { |
|||
this.handleMultipleSelection = val |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
::v-deep .newAndEdiDialog { |
|||
display: flex; |
|||
flex-direction: column; |
|||
width: 100%; |
|||
height: 100%; |
|||
.el-form { |
|||
flex: 1; |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
align-content: flex-start; |
|||
flex-wrap: wrap; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
} |
|||
.screen-push { |
|||
color: rgb(64, 158, 255); |
|||
span { |
|||
cursor: pointer; |
|||
&:hover { |
|||
color: blue; |
|||
} |
|||
} |
|||
} |
|||
.formButton { |
|||
padding: 20px 20px 20px 0; |
|||
} |
|||
.formTable-box { |
|||
height: 70% !important; |
|||
|
|||
.el-form-item__content { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
overflow: hidden; |
|||
margin: 0 !important; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,129 @@ |
|||
<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 { materialRequestByType } 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 { initPrintAllData } from "@/mixins/printMixin" |
|||
export default { |
|||
name: "LibraryShiftNote", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
data () { |
|||
return { |
|||
URL: 'wms/store/issue-note', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: 'info', |
|||
icon: 'el-icon-printer', |
|||
label: '打印', |
|||
hide: false, |
|||
name: "print", |
|||
size: 'mini' |
|||
}, |
|||
] |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
requestType: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params).then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
drawerbutton (val) { |
|||
// 打印 |
|||
if(val == 'print'){ |
|||
let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) |
|||
// _propsData.title = "送货单" |
|||
_propsData.title = "线边仓领料单" |
|||
_propsData.details.forEach(item=>{ |
|||
item.fromLot = item.fromLot + " " |
|||
}) |
|||
let _option = { |
|||
number:"requestNumber", |
|||
} |
|||
let data = initPrintAllData(_propsData,'xbcll.rdlx',false,_option); |
|||
this.Print(data) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/basicData.scss"; |
|||
</style> |
@ -0,0 +1,228 @@ |
|||
<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> |
|||
<!-- 新导入 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" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbutton" |
|||
@close-value="closeValue" |
|||
:currenButtonData="currenButtonData" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { materialRequestByType,processRequest,getDetailed } 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 requestDataNames from "@/utils/processButtonData" |
|||
export default { |
|||
name: "LibraryShiftRequest", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
computed: { |
|||
editDialog: { |
|||
get: function () { |
|||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|||
}, |
|||
}, |
|||
}, |
|||
data () { |
|||
let _this = this; |
|||
return { |
|||
URL: 'wms/store/material-request', |
|||
tableLoading: false, |
|||
handleMultipleSelection: [], |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultImportBtn(),//导入 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
//执行前获取记录数据暂存 |
|||
oldIssueJobIds: [], |
|||
DrawerButtonData: [ |
|||
// ...requestData(this), |
|||
{ |
|||
type: 'primary', |
|||
icon: 'el-icon-circle-check', |
|||
label: '完成', |
|||
hide: () => { return this.completeRequestInit([2,6])}, |
|||
name: "completeRequest", |
|||
size: 'mini' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
icon: 'el-icon-circle-check', |
|||
label: '执行', |
|||
name: "IssueRequest-zx", |
|||
hide: () => { return this.againHandleRequestInit([9])}, |
|||
size: 'mini' |
|||
}, |
|||
...requestData(this,false,false,[requestDataNames.againHandle]), |
|||
], |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging() |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
type: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params).then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
// 重新定义【完成按钮】显示判断 除了2(待审批) 和 6(完成状态)都显示(abortRequestRequestInit) |
|||
completeRequestInit(val){ |
|||
let data = false |
|||
val.forEach(key => { |
|||
if (this.propsData.requestStatus == key) { |
|||
data = true |
|||
} |
|||
}) |
|||
return data |
|||
}, |
|||
// 定义【执行按钮】显示判断 ==9时候显示 |
|||
againHandleRequestInit(val){ |
|||
let data = true |
|||
val.forEach(key => { |
|||
if (this.propsData.requestStatus == key) { |
|||
data = false |
|||
} |
|||
}) |
|||
return data |
|||
}, |
|||
// 执行成功后处理 |
|||
handleResult(){ |
|||
getDetailed(this.propsData.id, this.URL).then(res => { |
|||
this.propsData = res |
|||
}) |
|||
this.paging() |
|||
this.Loading.appMainLoading = false |
|||
}, |
|||
//抽屉常用按钮 |
|||
drawerbutton (val) { |
|||
// 执行 |
|||
if(val == 'IssueRequest-zx'){ |
|||
this.Loading.appMainLoading = true |
|||
// 获取记录数据暂存 |
|||
processRequest(this.propsData.number,'wms/store/issue-job/by-request-number/').then(resFirst=>{ |
|||
this.oldIssueJobIds = [] |
|||
resFirst.forEach(item=>{ |
|||
this.oldIssueJobIds.push(item.id) |
|||
}) |
|||
// 执行操作 |
|||
processRequest(this.propsData.id, this.URL + '/handle/').then(resHandle => { |
|||
// 重新获取记录对比 |
|||
processRequest(this.propsData.number,'wms/store/issue-job/by-request-number/').then(resNew=>{ |
|||
// 重新获取的记录为空(未生成任务) |
|||
if(!resNew || resNew.length <= 0){ |
|||
this.$errorMsg('没有可用库存,未生成新任务') |
|||
this.handleResult() |
|||
return |
|||
} |
|||
// 当前有记录 |
|||
if(resNew && resNew.length > 0){ |
|||
let _newIds = [] |
|||
resNew.forEach(item=>{ |
|||
_newIds.push(item.id) |
|||
}) |
|||
if(this.oldIssueJobIds.sort().toString() === _newIds.sort().toString()){ |
|||
let mes = '未生成任务原因: ' + `<br/>` + '1、该请求中的【物品】的【实际发货数量】小于【请求数量】,请确认数量后点击【完成】。' + `<br/>` + '2、该请求中的【库存余额】小于【请求数量】,请确认数量后点击【执行】' |
|||
this.$alert(mes, |
|||
'错误提示', { |
|||
confirmButtonText: '确定', |
|||
dangerouslyUseHTMLString: true |
|||
}) |
|||
}else{ |
|||
this.$successMsg('执行成功,已生成新任务') |
|||
} |
|||
this.handleResult() |
|||
} |
|||
}) |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
</style> |
@ -0,0 +1,548 @@ |
|||
<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> |
|||
<!-- 执行 --> |
|||
<handelFrom |
|||
:formTitle="formTitle" |
|||
:displayDialog.sync="displayDialog.handleFromDialog" |
|||
:CreateFormData="handleFormData" |
|||
:CreateForm="handleForm" |
|||
:Rules="editRules.handleRule" |
|||
:Options="editOptions" |
|||
:detailsTableColumns="handleDetailsTableColumns" |
|||
:isShowIndex="true" |
|||
:selectionTable="true" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@FormSubmit="handleFormSubmit" |
|||
></handelFrom> |
|||
<curren-Drawer |
|||
:title="tableColumns" |
|||
:DrawerLoading="Loading.DrawerLoading" |
|||
:drawer="displayDialog.detailsDialog" |
|||
:propsData="propsData" |
|||
:tabsDesTions="tabsDesTions" |
|||
:Butttondata="DrawerButtonData" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbutton" |
|||
@close-value="closeValue" |
|||
:currenButtonData="currenButtonData" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { getPageList, createAndHandle } from "@/api/wms-api" |
|||
import { materialRequestByType, handle} from "@/api/wms-job" |
|||
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 store from '@/store' |
|||
import { initPrintAllData } from "@/mixins/printMixin" |
|||
export default { |
|||
name: "IssueJobPT", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
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/issue-job', |
|||
tableLoading: false, |
|||
handleMultipleSelection: [], |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
// this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: 'info', |
|||
icon: 'el-icon-printer', |
|||
label: '打印', |
|||
hide: false, |
|||
name: "print", |
|||
size: 'mini' |
|||
}, |
|||
], |
|||
handleDetailsTableColumns: [ |
|||
{ label: "物品代码", prop: "itemCode", }, |
|||
{ label: "物品名称", prop: "itemName" }, |
|||
{ label: "实际库位", prop: "handledLocationCode", }, |
|||
{ label: "推荐库位", prop: "recommendLocationCode", }, |
|||
{ label: "实际箱标签", prop: "handledPackingCode", }, |
|||
{ label: "推荐箱标签", prop: "recommendPackingCode", }, |
|||
{ label: "实际批次", prop: "handledLot", }, |
|||
{ label: "推荐批次", prop: "recommendLot", }, |
|||
{ type: "object", label: "实际数量", prop: "handledQty", showProp: "qty", }, |
|||
{ type: "object", label: "实际单位", prop: "handledQty", showProp: "uom", }, |
|||
{ type: "object", label: "推荐数量", prop: "recommendQty", showProp: "qty", }, |
|||
{ type: "object", label: "推荐单位", prop: "recommendQty", showProp: "uom", }, |
|||
], |
|||
editOptions: { |
|||
|
|||
}, |
|||
handleFormData: { |
|||
id: null, |
|||
creationTime: null, |
|||
IssueNoteNumber: "123", |
|||
lastModificationTime: null, |
|||
remark: null, |
|||
concurrencyStamp: null, |
|||
company: null, |
|||
number: null, |
|||
upStreamJobNumber: null, |
|||
materialRequestNumber: null, |
|||
jobType: 1, |
|||
jobStatus: 1, |
|||
priority: 0, |
|||
priorityIncrement: 0, |
|||
wlgCode: "123", |
|||
isAutoComplete: true, |
|||
details: [], |
|||
acceptTime: null, |
|||
completeTime: null, |
|||
prodLine: null, |
|||
toLocationCode: null, |
|||
}, |
|||
childTableData: [ |
|||
{ |
|||
"id": null, |
|||
"creationTime": null, |
|||
// "creatorId": null, |
|||
"lastModificationTime": null, |
|||
// "lastModifierId": null, |
|||
"remark": null, |
|||
"concurrencyStamp": null, |
|||
"masterID": null, |
|||
"packingCode": null, |
|||
"containerCode": null, |
|||
"item": { |
|||
"id": null, |
|||
"name": null, |
|||
"desc1": null, |
|||
"desc2": null |
|||
}, |
|||
"itemCode": null, |
|||
"stdPack": { |
|||
"packUom": null, |
|||
"packQty": 0 |
|||
}, |
|||
"recommendBatch": { |
|||
"supplierBatch": null, |
|||
"produceDate": null |
|||
}, |
|||
"recommendLot": "", |
|||
"recommendLocationCode": "", |
|||
"recomendQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
}, |
|||
"handledBatch": { |
|||
"supplierBatch": null, |
|||
"produceDate": null |
|||
}, |
|||
"handledLot": "", |
|||
"handledLocationCode": "", |
|||
"handledQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
}, |
|||
"fromLocation": "", |
|||
"toLocation": "", |
|||
"workshop": null, |
|||
"prodLine": null, |
|||
"workCenter": null, |
|||
} |
|||
], |
|||
handleForm: [ |
|||
{ type: "input", label: "任务编号", prop: "number", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "到货编号", prop: "arriveNumber", colSpan: 12, disabled: "true" }, |
|||
{ type: "select", label: "任务类型", prop: "jobType", options: "taskType", colSpan: 12, disabled: "true" }, |
|||
{ type: "select", label: "任务状态", prop: "jobStatus", options: "jobStatus", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "优先级", prop: "priority", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "工作组", prop: "wlgCode", colSpan: 12, disabled: "true" }, |
|||
{ type: "dateTime", label: "接收时间", prop: "acceptTime", colSpan: 12, }, |
|||
{ type: "input", label: "备注", prop: "remark", colSpan: 12, }, |
|||
{ type: "input", label: "生产线", prop: "prodLine", disabled: "true", colSpan: 12, }, |
|||
// { type: "autocomplete", label: "目标库位", prop: "toLocationCode", optionsLabel: "itemCode", optionsValue: "locationCode", focus: (val) => { return this.getSelectList(val, "wms/inventory/Inventory-Balance") }, click: (val) => { this.filterTable(val, 'wms/inventory/Inventory-Balance', 'InventoryBalance-PullForm', '库位选择') }, colSpan: 12 }, |
|||
{ type: "autocomplete", label: "目标库位", prop: "toLocationCode", optionsLabel: "name", optionsValue: "code", focus: (val) => { return this.getSelectList(val, "basedata/Location") }, click: (val) => { this.filterTable(val, 'basedata/Location', 'InventoryBalance-PullForm', '库位选择') }, colSpan: 12 }, |
|||
], |
|||
editRules: { |
|||
handleRule: { |
|||
number: [ |
|||
{ required: true, trigger: "blur", message: "不可为空" }, |
|||
], |
|||
jobType: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
jobStatus: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
priority: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
wlgCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
}, |
|||
cerateRule: { |
|||
itemCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
toLocationCode: [{ required: false, trigger: "blur", message: "不可为空" }], |
|||
numberInput: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
} |
|||
}, |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
requestType: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params) |
|||
.then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
handleFormSubmit (val) { |
|||
let that = this |
|||
return new Promise((resolve, reject) => { |
|||
if (that.handleMultipleSelection.length == 0) { |
|||
that.$errorMsg('请先择提交的数据!') |
|||
reject() |
|||
} else { |
|||
if (that.handleMultipleSelection[0].requestLocationCode != that.handleFormData.toLocationCode) { |
|||
that.$confirm('目标库位与需求库位不一致,是否要将所有物品发到目标库位?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.checkHandleSubmit(resolve, reject) |
|||
}).catch(() => { |
|||
reject() |
|||
}) |
|||
} else { |
|||
that.$confirm('是否要将物品发到目标库位:[' + that.handleFormData.toLocationCode + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.checkHandleSubmit(resolve, reject) |
|||
}).catch(() => { |
|||
reject() |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
checkHandleSubmit(resolve, reject) { |
|||
let that = this |
|||
|
|||
let items = that.handleMultipleSelection.filter(r => { |
|||
return (r.handledPackingCode === null || r.handledPackingCode === '') |
|||
}) |
|||
|
|||
if (items.length > 0) { |
|||
let packingCodes = ''; |
|||
items.forEach(r => { |
|||
packingCodes += r.recommendPackingCode + ',' |
|||
}) |
|||
that.$confirm('以下箱码对应的实际箱码为空,是否要继续发料?:[' + packingCodes + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.finshIssueJobHandle(resolve, reject) |
|||
}).catch(() => { |
|||
return reject() |
|||
}) |
|||
} else { |
|||
that.finshIssueJobHandle(resolve, reject) |
|||
} |
|||
}, |
|||
finshIssueJobHandle(resolve, reject) { |
|||
let that = this |
|||
let data = { |
|||
id: that.propsData.id |
|||
} |
|||
that.handleMultipleSelection.forEach(item => { |
|||
item.toLocationCode = that.handleFormData.toLocationCode |
|||
item.handledContainerCode = item.recommendContainerCode; |
|||
item.handledPackingCode = item.recommendPackingCode; |
|||
item.handledBatch = item.recommendBatch; |
|||
item.handledLot = item.recommendLot; |
|||
item.handledLocationCode = item.recommendLocationCode; |
|||
}) |
|||
let params = JSON.parse(JSON.stringify(that.handleFormData)) |
|||
delete params.details |
|||
params.details = that.handleMultipleSelection |
|||
handle(params, data, that.URL).then(res => { |
|||
that.displayDialog.handleFromDialog = false; |
|||
that.$successMsg('已生成发料记录!') |
|||
that.paging() |
|||
return resolve() |
|||
}).catch(err => { |
|||
return reject(); |
|||
}) |
|||
}, |
|||
// 输入框 变更 |
|||
changeInput(prop, val) { |
|||
let that = this |
|||
if (prop == 'numberInput' ) { |
|||
this.$confirm('是否要将以下所有零件的需求数量更改为[' + val + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.CreateFormData.details.forEach(item => { |
|||
item.numberDetails = parseInt(val) |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
}, |
|||
//新增——删除table |
|||
deleteRow(index, rows) { |
|||
rows.splice(index, 1); |
|||
}, |
|||
//新增-按钮 |
|||
FormClick(val) { |
|||
let that = this |
|||
if (val[0] == 0) { |
|||
} else if (val[0] == 1) { |
|||
// 查询 |
|||
this.editRules.cerateRule.toLocationCode[0].required = false |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
this.tableLoading = true |
|||
let params = { |
|||
condition: { |
|||
filters: [ |
|||
{ |
|||
logic: "And", |
|||
column: "code", |
|||
action: "==", |
|||
value: that.CreateFormData.itemCode |
|||
} |
|||
] |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100 |
|||
} |
|||
getPageList(params, 'basedata/item-basic').then(res => { |
|||
if (res.items.length == 0) { |
|||
this.$errorMsg('未查询到该物品信息!') |
|||
} else { |
|||
let findRs = that.CreateFormData.details.find(item => ( |
|||
item.code == that.CreateFormData.itemCode |
|||
)) |
|||
if (!findRs) { |
|||
res.items.forEach(item => { |
|||
item.numberDetails = 0 |
|||
that.CreateFormData.details.push(item) |
|||
}) |
|||
} |
|||
} |
|||
this.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.tableLoading = false |
|||
}) |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} else { |
|||
this.editRules.cerateRule.toLocationCode[0].required = true |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
if (this.CreateFormData.details.length > 0) { |
|||
let params = { |
|||
worker: store.getters.name.userName, |
|||
company: localStorage.getItem("company"), |
|||
details: [], |
|||
} |
|||
for (var i = 0; i < this.CreateFormData.details.length; i++) { |
|||
if (this.CreateFormData.details[i].numberDetails <= 0) { |
|||
this.$errorMsg('物品[' + this.CreateFormData.details[i].code + ']的数量应该大于0') |
|||
return |
|||
} else { |
|||
params.details.push({ |
|||
itemCode: this.CreateFormData.details[i].code, |
|||
item: { |
|||
id: this.CreateFormData.details[i].id, |
|||
name: this.CreateFormData.details[i].name, |
|||
desc1: this.CreateFormData.details[i].desc1, |
|||
desc2: this.CreateFormData.details[i].desc2, |
|||
}, |
|||
qty: { |
|||
uom: this.CreateFormData.details[i].basicUom, |
|||
qty: this.CreateFormData.details[i].numberDetails |
|||
}, |
|||
prodLine: '', |
|||
status: this.CreateFormData.details[i].status, |
|||
toLocationCode: this.CreateFormData.toLocationCode, |
|||
worker: store.getters.name.userName, |
|||
}) |
|||
} |
|||
} |
|||
this.Loading.newAndEdiLoading = true |
|||
createAndHandle(params).then( res => { |
|||
this.displayDialog.newDialog = false |
|||
this.Loading.newAndEdiLoading = false |
|||
this.$successMsg("发料任务创建成功!") |
|||
this.paging() |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.newAndEdiLoading = false |
|||
}) |
|||
} else { |
|||
this.$errorMsg('无数据可提交!') |
|||
} |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
drawerbutton (val) { |
|||
// 打印 |
|||
if(val == 'print'){ |
|||
let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) |
|||
_propsData.title = "线边仓领料单" |
|||
_propsData.details.forEach(item=>{ |
|||
item.recommendLot = item.recommendLot + " " |
|||
}) |
|||
let _option = { |
|||
details:{ |
|||
fromLocationCode:"recommendFromLocationCode", |
|||
qty:"handledQty", |
|||
fromLot:"recommendLot", |
|||
fromLocationErpCode:"recommendFromLocationErpCode", |
|||
} |
|||
} |
|||
let data = initPrintAllData(_propsData,'xbcll.rdlx',false,_option); |
|||
this.Print(data) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
}, |
|||
// drawerbutton(val) { |
|||
// if (val == 'handleJob') { |
|||
// this.Loading.appMainLoading = true |
|||
// let propsData = JSON.parse(JSON.stringify(this.propsData)); |
|||
// this.$listAssign(this.handleFormData, propsData) |
|||
// this.handleFormData.toLocationCode = this.handleFormData.details[0].toLocationCode |
|||
// this.handleMultipleSelection = [] |
|||
// this.Loading.appMainLoading = false |
|||
// this.formTitle = "执行" + this.$route.meta.title; |
|||
// this.displayDialog.handleFromDialog = true |
|||
// } else { |
|||
// drawerMixins.methods.drawerbutton(val, this) |
|||
// } |
|||
// }, |
|||
handleSelectionChange(val) { |
|||
this.handleMultipleSelection = val |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
::v-deep .newAndEdiDialog { |
|||
display: flex; |
|||
flex-direction: column; |
|||
width: 100%; |
|||
height: 100%; |
|||
.el-form { |
|||
flex: 1; |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
align-content: flex-start; |
|||
flex-wrap: wrap; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
} |
|||
.screen-push { |
|||
color: rgb(64, 158, 255); |
|||
span { |
|||
cursor: pointer; |
|||
&:hover { |
|||
color: blue; |
|||
} |
|||
} |
|||
} |
|||
.formButton { |
|||
padding: 20px 20px 20px 0; |
|||
} |
|||
.formTable-box { |
|||
height: 70% !important; |
|||
|
|||
.el-form-item__content { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
overflow: hidden; |
|||
margin: 0 !important; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,129 @@ |
|||
<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 { materialRequestByType } 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 { initPrintAllData } from "@/mixins/printMixin" |
|||
export default { |
|||
name: "IssueNotePT", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
data () { |
|||
return { |
|||
URL: 'wms/store/issue-note', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: 'info', |
|||
icon: 'el-icon-printer', |
|||
label: '打印', |
|||
hide: false, |
|||
name: "print", |
|||
size: 'mini' |
|||
}, |
|||
] |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
requestType: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params).then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
drawerbutton (val) { |
|||
// 打印 |
|||
if(val == 'print'){ |
|||
let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) |
|||
// _propsData.title = "送货单" |
|||
_propsData.title = "线边仓领料单" |
|||
_propsData.details.forEach(item=>{ |
|||
item.fromLot = item.fromLot + " " |
|||
}) |
|||
let _option = { |
|||
number:"requestNumber", |
|||
} |
|||
let data = initPrintAllData(_propsData,'xbcll.rdlx',false,_option); |
|||
this.Print(data) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/basicData.scss"; |
|||
</style> |
@ -0,0 +1,228 @@ |
|||
<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> |
|||
<!-- 新导入 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" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbutton" |
|||
@close-value="closeValue" |
|||
:currenButtonData="currenButtonData" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { materialRequestByType,processRequest,getDetailed } 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 requestDataNames from "@/utils/processButtonData" |
|||
export default { |
|||
name: "IssueRequestPT", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
computed: { |
|||
editDialog: { |
|||
get: function () { |
|||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|||
}, |
|||
}, |
|||
}, |
|||
data () { |
|||
let _this = this; |
|||
return { |
|||
URL: 'wms/store/material-request', |
|||
tableLoading: false, |
|||
handleMultipleSelection: [], |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultImportBtn(),//导入 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
//执行前获取记录数据暂存 |
|||
oldIssueJobIds: [], |
|||
DrawerButtonData: [ |
|||
// ...requestData(this), |
|||
{ |
|||
type: 'primary', |
|||
icon: 'el-icon-circle-check', |
|||
label: '完成', |
|||
hide: () => { return this.completeRequestInit([2,6])}, |
|||
name: "completeRequest", |
|||
size: 'mini' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
icon: 'el-icon-circle-check', |
|||
label: '执行', |
|||
name: "IssueRequest-zx", |
|||
hide: () => { return this.againHandleRequestInit([9])}, |
|||
size: 'mini' |
|||
}, |
|||
...requestData(this,false,false,[requestDataNames.againHandle]), |
|||
], |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging() |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
type: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params).then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
// 重新定义【完成按钮】显示判断 除了2(待审批) 和 6(完成状态)都显示(abortRequestRequestInit) |
|||
completeRequestInit(val){ |
|||
let data = false |
|||
val.forEach(key => { |
|||
if (this.propsData.requestStatus == key) { |
|||
data = true |
|||
} |
|||
}) |
|||
return data |
|||
}, |
|||
// 定义【执行按钮】显示判断 ==9时候显示 |
|||
againHandleRequestInit(val){ |
|||
let data = true |
|||
val.forEach(key => { |
|||
if (this.propsData.requestStatus == key) { |
|||
data = false |
|||
} |
|||
}) |
|||
return data |
|||
}, |
|||
// 执行成功后处理 |
|||
handleResult(){ |
|||
getDetailed(this.propsData.id, this.URL).then(res => { |
|||
this.propsData = res |
|||
}) |
|||
this.paging() |
|||
this.Loading.appMainLoading = false |
|||
}, |
|||
//抽屉常用按钮 |
|||
drawerbutton (val) { |
|||
// 执行 |
|||
if(val == 'IssueRequest-zx'){ |
|||
this.Loading.appMainLoading = true |
|||
// 获取记录数据暂存 |
|||
processRequest(this.propsData.number,'wms/store/issue-job/by-request-number/').then(resFirst=>{ |
|||
this.oldIssueJobIds = [] |
|||
resFirst.forEach(item=>{ |
|||
this.oldIssueJobIds.push(item.id) |
|||
}) |
|||
// 执行操作 |
|||
processRequest(this.propsData.id, this.URL + '/handle/').then(resHandle => { |
|||
// 重新获取记录对比 |
|||
processRequest(this.propsData.number,'wms/store/issue-job/by-request-number/').then(resNew=>{ |
|||
// 重新获取的记录为空(未生成任务) |
|||
if(!resNew || resNew.length <= 0){ |
|||
this.$errorMsg('没有可用库存,未生成新任务') |
|||
this.handleResult() |
|||
return |
|||
} |
|||
// 当前有记录 |
|||
if(resNew && resNew.length > 0){ |
|||
let _newIds = [] |
|||
resNew.forEach(item=>{ |
|||
_newIds.push(item.id) |
|||
}) |
|||
if(this.oldIssueJobIds.sort().toString() === _newIds.sort().toString()){ |
|||
let mes = '未生成任务原因: ' + `<br/>` + '1、该请求中的【物品】的【实际发货数量】小于【请求数量】,请确认数量后点击【完成】。' + `<br/>` + '2、该请求中的【库存余额】小于【请求数量】,请确认数量后点击【执行】' |
|||
this.$alert(mes, |
|||
'错误提示', { |
|||
confirmButtonText: '确定', |
|||
dangerouslyUseHTMLString: true |
|||
}) |
|||
}else{ |
|||
this.$successMsg('执行成功,已生成新任务') |
|||
} |
|||
this.handleResult() |
|||
} |
|||
}) |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
</style> |
@ -0,0 +1,548 @@ |
|||
<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> |
|||
<!-- 执行 --> |
|||
<handelFrom |
|||
:formTitle="formTitle" |
|||
:displayDialog.sync="displayDialog.handleFromDialog" |
|||
:CreateFormData="handleFormData" |
|||
:CreateForm="handleForm" |
|||
:Rules="editRules.handleRule" |
|||
:Options="editOptions" |
|||
:detailsTableColumns="handleDetailsTableColumns" |
|||
:isShowIndex="true" |
|||
:selectionTable="true" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@FormSubmit="handleFormSubmit" |
|||
></handelFrom> |
|||
<curren-Drawer |
|||
:title="tableColumns" |
|||
:DrawerLoading="Loading.DrawerLoading" |
|||
:drawer="displayDialog.detailsDialog" |
|||
:propsData="propsData" |
|||
:tabsDesTions="tabsDesTions" |
|||
:Butttondata="DrawerButtonData" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbutton" |
|||
@close-value="closeValue" |
|||
:currenButtonData="currenButtonData" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { getPageList, createAndHandle } from "@/api/wms-api" |
|||
import { materialRequestByType, handle} from "@/api/wms-job" |
|||
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 store from '@/store' |
|||
import { initPrintAllData } from "@/mixins/printMixin" |
|||
export default { |
|||
name: "IssueJobZS", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
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/issue-job', |
|||
tableLoading: false, |
|||
handleMultipleSelection: [], |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
// this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: 'info', |
|||
icon: 'el-icon-printer', |
|||
label: '打印', |
|||
hide: false, |
|||
name: "print", |
|||
size: 'mini' |
|||
}, |
|||
], |
|||
handleDetailsTableColumns: [ |
|||
{ label: "物品代码", prop: "itemCode", }, |
|||
{ label: "物品名称", prop: "itemName" }, |
|||
{ label: "实际库位", prop: "handledLocationCode", }, |
|||
{ label: "推荐库位", prop: "recommendLocationCode", }, |
|||
{ label: "实际箱标签", prop: "handledPackingCode", }, |
|||
{ label: "推荐箱标签", prop: "recommendPackingCode", }, |
|||
{ label: "实际批次", prop: "handledLot", }, |
|||
{ label: "推荐批次", prop: "recommendLot", }, |
|||
{ type: "object", label: "实际数量", prop: "handledQty", showProp: "qty", }, |
|||
{ type: "object", label: "实际单位", prop: "handledQty", showProp: "uom", }, |
|||
{ type: "object", label: "推荐数量", prop: "recommendQty", showProp: "qty", }, |
|||
{ type: "object", label: "推荐单位", prop: "recommendQty", showProp: "uom", }, |
|||
], |
|||
editOptions: { |
|||
|
|||
}, |
|||
handleFormData: { |
|||
id: null, |
|||
creationTime: null, |
|||
IssueNoteNumber: "123", |
|||
lastModificationTime: null, |
|||
remark: null, |
|||
concurrencyStamp: null, |
|||
company: null, |
|||
number: null, |
|||
upStreamJobNumber: null, |
|||
materialRequestNumber: null, |
|||
jobType: 1, |
|||
jobStatus: 1, |
|||
priority: 0, |
|||
priorityIncrement: 0, |
|||
wlgCode: "123", |
|||
isAutoComplete: true, |
|||
details: [], |
|||
acceptTime: null, |
|||
completeTime: null, |
|||
prodLine: null, |
|||
toLocationCode: null, |
|||
}, |
|||
childTableData: [ |
|||
{ |
|||
"id": null, |
|||
"creationTime": null, |
|||
// "creatorId": null, |
|||
"lastModificationTime": null, |
|||
// "lastModifierId": null, |
|||
"remark": null, |
|||
"concurrencyStamp": null, |
|||
"masterID": null, |
|||
"packingCode": null, |
|||
"containerCode": null, |
|||
"item": { |
|||
"id": null, |
|||
"name": null, |
|||
"desc1": null, |
|||
"desc2": null |
|||
}, |
|||
"itemCode": null, |
|||
"stdPack": { |
|||
"packUom": null, |
|||
"packQty": 0 |
|||
}, |
|||
"recommendBatch": { |
|||
"supplierBatch": null, |
|||
"produceDate": null |
|||
}, |
|||
"recommendLot": "", |
|||
"recommendLocationCode": "", |
|||
"recomendQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
}, |
|||
"handledBatch": { |
|||
"supplierBatch": null, |
|||
"produceDate": null |
|||
}, |
|||
"handledLot": "", |
|||
"handledLocationCode": "", |
|||
"handledQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
}, |
|||
"fromLocation": "", |
|||
"toLocation": "", |
|||
"workshop": null, |
|||
"prodLine": null, |
|||
"workCenter": null, |
|||
} |
|||
], |
|||
handleForm: [ |
|||
{ type: "input", label: "任务编号", prop: "number", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "到货编号", prop: "arriveNumber", colSpan: 12, disabled: "true" }, |
|||
{ type: "select", label: "任务类型", prop: "jobType", options: "taskType", colSpan: 12, disabled: "true" }, |
|||
{ type: "select", label: "任务状态", prop: "jobStatus", options: "jobStatus", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "优先级", prop: "priority", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "工作组", prop: "wlgCode", colSpan: 12, disabled: "true" }, |
|||
{ type: "dateTime", label: "接收时间", prop: "acceptTime", colSpan: 12, }, |
|||
{ type: "input", label: "备注", prop: "remark", colSpan: 12, }, |
|||
{ type: "input", label: "生产线", prop: "prodLine", disabled: "true", colSpan: 12, }, |
|||
// { type: "autocomplete", label: "目标库位", prop: "toLocationCode", optionsLabel: "itemCode", optionsValue: "locationCode", focus: (val) => { return this.getSelectList(val, "wms/inventory/Inventory-Balance") }, click: (val) => { this.filterTable(val, 'wms/inventory/Inventory-Balance', 'InventoryBalance-PullForm', '库位选择') }, colSpan: 12 }, |
|||
{ type: "autocomplete", label: "目标库位", prop: "toLocationCode", optionsLabel: "name", optionsValue: "code", focus: (val) => { return this.getSelectList(val, "basedata/Location") }, click: (val) => { this.filterTable(val, 'basedata/Location', 'InventoryBalance-PullForm', '库位选择') }, colSpan: 12 }, |
|||
], |
|||
editRules: { |
|||
handleRule: { |
|||
number: [ |
|||
{ required: true, trigger: "blur", message: "不可为空" }, |
|||
], |
|||
jobType: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
jobStatus: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
priority: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
wlgCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
}, |
|||
cerateRule: { |
|||
itemCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
toLocationCode: [{ required: false, trigger: "blur", message: "不可为空" }], |
|||
numberInput: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
} |
|||
}, |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
requestType: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params) |
|||
.then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
handleFormSubmit (val) { |
|||
let that = this |
|||
return new Promise((resolve, reject) => { |
|||
if (that.handleMultipleSelection.length == 0) { |
|||
that.$errorMsg('请先择提交的数据!') |
|||
reject() |
|||
} else { |
|||
if (that.handleMultipleSelection[0].requestLocationCode != that.handleFormData.toLocationCode) { |
|||
that.$confirm('目标库位与需求库位不一致,是否要将所有物品发到目标库位?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.checkHandleSubmit(resolve, reject) |
|||
}).catch(() => { |
|||
reject() |
|||
}) |
|||
} else { |
|||
that.$confirm('是否要将物品发到目标库位:[' + that.handleFormData.toLocationCode + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.checkHandleSubmit(resolve, reject) |
|||
}).catch(() => { |
|||
reject() |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
checkHandleSubmit(resolve, reject) { |
|||
let that = this |
|||
|
|||
let items = that.handleMultipleSelection.filter(r => { |
|||
return (r.handledPackingCode === null || r.handledPackingCode === '') |
|||
}) |
|||
|
|||
if (items.length > 0) { |
|||
let packingCodes = ''; |
|||
items.forEach(r => { |
|||
packingCodes += r.recommendPackingCode + ',' |
|||
}) |
|||
that.$confirm('以下箱码对应的实际箱码为空,是否要继续发料?:[' + packingCodes + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.finshIssueJobHandle(resolve, reject) |
|||
}).catch(() => { |
|||
return reject() |
|||
}) |
|||
} else { |
|||
that.finshIssueJobHandle(resolve, reject) |
|||
} |
|||
}, |
|||
finshIssueJobHandle(resolve, reject) { |
|||
let that = this |
|||
let data = { |
|||
id: that.propsData.id |
|||
} |
|||
that.handleMultipleSelection.forEach(item => { |
|||
item.toLocationCode = that.handleFormData.toLocationCode |
|||
item.handledContainerCode = item.recommendContainerCode; |
|||
item.handledPackingCode = item.recommendPackingCode; |
|||
item.handledBatch = item.recommendBatch; |
|||
item.handledLot = item.recommendLot; |
|||
item.handledLocationCode = item.recommendLocationCode; |
|||
}) |
|||
let params = JSON.parse(JSON.stringify(that.handleFormData)) |
|||
delete params.details |
|||
params.details = that.handleMultipleSelection |
|||
handle(params, data, that.URL).then(res => { |
|||
that.displayDialog.handleFromDialog = false; |
|||
that.$successMsg('已生成发料记录!') |
|||
that.paging() |
|||
return resolve() |
|||
}).catch(err => { |
|||
return reject(); |
|||
}) |
|||
}, |
|||
// 输入框 变更 |
|||
changeInput(prop, val) { |
|||
let that = this |
|||
if (prop == 'numberInput' ) { |
|||
this.$confirm('是否要将以下所有零件的需求数量更改为[' + val + ']', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
that.CreateFormData.details.forEach(item => { |
|||
item.numberDetails = parseInt(val) |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
}, |
|||
//新增——删除table |
|||
deleteRow(index, rows) { |
|||
rows.splice(index, 1); |
|||
}, |
|||
//新增-按钮 |
|||
FormClick(val) { |
|||
let that = this |
|||
if (val[0] == 0) { |
|||
} else if (val[0] == 1) { |
|||
// 查询 |
|||
this.editRules.cerateRule.toLocationCode[0].required = false |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
this.tableLoading = true |
|||
let params = { |
|||
condition: { |
|||
filters: [ |
|||
{ |
|||
logic: "And", |
|||
column: "code", |
|||
action: "==", |
|||
value: that.CreateFormData.itemCode |
|||
} |
|||
] |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100 |
|||
} |
|||
getPageList(params, 'basedata/item-basic').then(res => { |
|||
if (res.items.length == 0) { |
|||
this.$errorMsg('未查询到该物品信息!') |
|||
} else { |
|||
let findRs = that.CreateFormData.details.find(item => ( |
|||
item.code == that.CreateFormData.itemCode |
|||
)) |
|||
if (!findRs) { |
|||
res.items.forEach(item => { |
|||
item.numberDetails = 0 |
|||
that.CreateFormData.details.push(item) |
|||
}) |
|||
} |
|||
} |
|||
this.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.tableLoading = false |
|||
}) |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} else { |
|||
this.editRules.cerateRule.toLocationCode[0].required = true |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
if (this.CreateFormData.details.length > 0) { |
|||
let params = { |
|||
worker: store.getters.name.userName, |
|||
company: localStorage.getItem("company"), |
|||
details: [], |
|||
} |
|||
for (var i = 0; i < this.CreateFormData.details.length; i++) { |
|||
if (this.CreateFormData.details[i].numberDetails <= 0) { |
|||
this.$errorMsg('物品[' + this.CreateFormData.details[i].code + ']的数量应该大于0') |
|||
return |
|||
} else { |
|||
params.details.push({ |
|||
itemCode: this.CreateFormData.details[i].code, |
|||
item: { |
|||
id: this.CreateFormData.details[i].id, |
|||
name: this.CreateFormData.details[i].name, |
|||
desc1: this.CreateFormData.details[i].desc1, |
|||
desc2: this.CreateFormData.details[i].desc2, |
|||
}, |
|||
qty: { |
|||
uom: this.CreateFormData.details[i].basicUom, |
|||
qty: this.CreateFormData.details[i].numberDetails |
|||
}, |
|||
prodLine: '', |
|||
status: this.CreateFormData.details[i].status, |
|||
toLocationCode: this.CreateFormData.toLocationCode, |
|||
worker: store.getters.name.userName, |
|||
}) |
|||
} |
|||
} |
|||
this.Loading.newAndEdiLoading = true |
|||
createAndHandle(params).then( res => { |
|||
this.displayDialog.newDialog = false |
|||
this.Loading.newAndEdiLoading = false |
|||
this.$successMsg("发料任务创建成功!") |
|||
this.paging() |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.newAndEdiLoading = false |
|||
}) |
|||
} else { |
|||
this.$errorMsg('无数据可提交!') |
|||
} |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
drawerbutton (val) { |
|||
// 打印 |
|||
if(val == 'print'){ |
|||
let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) |
|||
_propsData.title = "线边仓领料单" |
|||
_propsData.details.forEach(item=>{ |
|||
item.recommendLot = item.recommendLot + " " |
|||
}) |
|||
let _option = { |
|||
details:{ |
|||
fromLocationCode:"recommendFromLocationCode", |
|||
qty:"handledQty", |
|||
fromLot:"recommendLot", |
|||
fromLocationErpCode:"recommendFromLocationErpCode", |
|||
} |
|||
} |
|||
let data = initPrintAllData(_propsData,'xbcll.rdlx',false,_option); |
|||
this.Print(data) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
}, |
|||
// drawerbutton(val) { |
|||
// if (val == 'handleJob') { |
|||
// this.Loading.appMainLoading = true |
|||
// let propsData = JSON.parse(JSON.stringify(this.propsData)); |
|||
// this.$listAssign(this.handleFormData, propsData) |
|||
// this.handleFormData.toLocationCode = this.handleFormData.details[0].toLocationCode |
|||
// this.handleMultipleSelection = [] |
|||
// this.Loading.appMainLoading = false |
|||
// this.formTitle = "执行" + this.$route.meta.title; |
|||
// this.displayDialog.handleFromDialog = true |
|||
// } else { |
|||
// drawerMixins.methods.drawerbutton(val, this) |
|||
// } |
|||
// }, |
|||
handleSelectionChange(val) { |
|||
this.handleMultipleSelection = val |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
::v-deep .newAndEdiDialog { |
|||
display: flex; |
|||
flex-direction: column; |
|||
width: 100%; |
|||
height: 100%; |
|||
.el-form { |
|||
flex: 1; |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
align-content: flex-start; |
|||
flex-wrap: wrap; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
} |
|||
.screen-push { |
|||
color: rgb(64, 158, 255); |
|||
span { |
|||
cursor: pointer; |
|||
&:hover { |
|||
color: blue; |
|||
} |
|||
} |
|||
} |
|||
.formButton { |
|||
padding: 20px 20px 20px 0; |
|||
} |
|||
.formTable-box { |
|||
height: 70% !important; |
|||
|
|||
.el-form-item__content { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
overflow: hidden; |
|||
margin: 0 !important; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,129 @@ |
|||
<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 { materialRequestByType } 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 { initPrintAllData } from "@/mixins/printMixin" |
|||
export default { |
|||
name: "IssueNoteZS", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
data () { |
|||
return { |
|||
URL: 'wms/store/issue-note', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultExportBtn(),//导出 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: 'info', |
|||
icon: 'el-icon-printer', |
|||
label: '打印', |
|||
hide: false, |
|||
name: "print", |
|||
size: 'mini' |
|||
}, |
|||
] |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
requestType: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params).then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
drawerbutton (val) { |
|||
// 打印 |
|||
if(val == 'print'){ |
|||
let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) |
|||
// _propsData.title = "送货单" |
|||
_propsData.title = "线边仓领料单" |
|||
_propsData.details.forEach(item=>{ |
|||
item.fromLot = item.fromLot + " " |
|||
}) |
|||
let _option = { |
|||
number:"requestNumber", |
|||
} |
|||
let data = initPrintAllData(_propsData,'xbcll.rdlx',false,_option); |
|||
this.Print(data) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/basicData.scss"; |
|||
</style> |
@ -0,0 +1,228 @@ |
|||
<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> |
|||
<!-- 新导入 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" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@drawerbutton="drawerbutton" |
|||
@close-value="closeValue" |
|||
:currenButtonData="currenButtonData" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { materialRequestByType,processRequest,getDetailed } 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 requestDataNames from "@/utils/processButtonData" |
|||
export default { |
|||
name: "IssueRequestZS", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
computed: { |
|||
editDialog: { |
|||
get: function () { |
|||
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|||
}, |
|||
}, |
|||
}, |
|||
data () { |
|||
let _this = this; |
|||
return { |
|||
URL: 'wms/store/material-request', |
|||
tableLoading: false, |
|||
handleMultipleSelection: [], |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultImportBtn(),//导入 |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
//执行前获取记录数据暂存 |
|||
oldIssueJobIds: [], |
|||
DrawerButtonData: [ |
|||
// ...requestData(this), |
|||
{ |
|||
type: 'primary', |
|||
icon: 'el-icon-circle-check', |
|||
label: '完成', |
|||
hide: () => { return this.completeRequestInit([2,6])}, |
|||
name: "completeRequest", |
|||
size: 'mini' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
icon: 'el-icon-circle-check', |
|||
label: '执行', |
|||
name: "IssueRequest-zx", |
|||
hide: () => { return this.againHandleRequestInit([9])}, |
|||
size: 'mini' |
|||
}, |
|||
...requestData(this,false,false,[requestDataNames.againHandle]), |
|||
], |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging() |
|||
}, |
|||
methods: { |
|||
//渲染数据 |
|||
paging(callback) { |
|||
this.Loading.tableLoading = true; |
|||
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|||
// 叫料请求类型: 人工拉动:Issue_Manual; 线边拉动:Issue_WIP; 直接发料:Direct_Issue |
|||
let params = { |
|||
type: 'Issue_Manual' |
|||
} |
|||
materialRequestByType(this.PageListParams, this.URL + '/by-type', params).then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}).catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
// 重新定义【完成按钮】显示判断 除了2(待审批) 和 6(完成状态)都显示(abortRequestRequestInit) |
|||
completeRequestInit(val){ |
|||
let data = false |
|||
val.forEach(key => { |
|||
if (this.propsData.requestStatus == key) { |
|||
data = true |
|||
} |
|||
}) |
|||
return data |
|||
}, |
|||
// 定义【执行按钮】显示判断 ==9时候显示 |
|||
againHandleRequestInit(val){ |
|||
let data = true |
|||
val.forEach(key => { |
|||
if (this.propsData.requestStatus == key) { |
|||
data = false |
|||
} |
|||
}) |
|||
return data |
|||
}, |
|||
// 执行成功后处理 |
|||
handleResult(){ |
|||
getDetailed(this.propsData.id, this.URL).then(res => { |
|||
this.propsData = res |
|||
}) |
|||
this.paging() |
|||
this.Loading.appMainLoading = false |
|||
}, |
|||
//抽屉常用按钮 |
|||
drawerbutton (val) { |
|||
// 执行 |
|||
if(val == 'IssueRequest-zx'){ |
|||
this.Loading.appMainLoading = true |
|||
// 获取记录数据暂存 |
|||
processRequest(this.propsData.number,'wms/store/issue-job/by-request-number/').then(resFirst=>{ |
|||
this.oldIssueJobIds = [] |
|||
resFirst.forEach(item=>{ |
|||
this.oldIssueJobIds.push(item.id) |
|||
}) |
|||
// 执行操作 |
|||
processRequest(this.propsData.id, this.URL + '/handle/').then(resHandle => { |
|||
// 重新获取记录对比 |
|||
processRequest(this.propsData.number,'wms/store/issue-job/by-request-number/').then(resNew=>{ |
|||
// 重新获取的记录为空(未生成任务) |
|||
if(!resNew || resNew.length <= 0){ |
|||
this.$errorMsg('没有可用库存,未生成新任务') |
|||
this.handleResult() |
|||
return |
|||
} |
|||
// 当前有记录 |
|||
if(resNew && resNew.length > 0){ |
|||
let _newIds = [] |
|||
resNew.forEach(item=>{ |
|||
_newIds.push(item.id) |
|||
}) |
|||
if(this.oldIssueJobIds.sort().toString() === _newIds.sort().toString()){ |
|||
let mes = '未生成任务原因: ' + `<br/>` + '1、该请求中的【物品】的【实际发货数量】小于【请求数量】,请确认数量后点击【完成】。' + `<br/>` + '2、该请求中的【库存余额】小于【请求数量】,请确认数量后点击【执行】' |
|||
this.$alert(mes, |
|||
'错误提示', { |
|||
confirmButtonText: '确定', |
|||
dangerouslyUseHTMLString: true |
|||
}) |
|||
}else{ |
|||
this.$successMsg('执行成功,已生成新任务') |
|||
} |
|||
this.handleResult() |
|||
} |
|||
}) |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
} else { |
|||
drawerMixins.methods.drawerbutton(val, this) |
|||
} |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
</style> |
Loading…
Reference in new issue