10 changed files with 749 additions and 3 deletions
@ -0,0 +1,309 @@ |
|||
<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" |
|||
@FormSubmit="handleFormSubmit" |
|||
></handelFrom> |
|||
<curren-Drawer |
|||
:title="tableColumns" |
|||
:DrawerLoading="Loading.DrawerLoading" |
|||
:drawer="displayDialog.detailsDialog" |
|||
:propsData="propsData" |
|||
:tabsDesTions="tabsDesTions" |
|||
:Butttondata="[]" |
|||
@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 { getDetailed, handle, accept, Invalid } 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 detailsRules from '@/utils/rules'; |
|||
export default { |
|||
name: "completDumpJob", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
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/purchase-return-job', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
this.defaultFieldSettingBtn(),//字段设置 |
|||
this.defaultFreshBtn(),//刷新 |
|||
this.defaultFilterBtn(),//筛选 |
|||
], |
|||
DrawerButtonData: [ |
|||
{ |
|||
type: 'primary', |
|||
icon: 'el-icon-circle-check', |
|||
label: '承接', |
|||
name: "accept", |
|||
hide: () => { return this.hideButton([1]) }, |
|||
size: 'mini' |
|||
}, |
|||
{ |
|||
type: 'warning', |
|||
icon: 'el-icon-circle-check', |
|||
label: '执行', |
|||
name: "handle", |
|||
hide: () => { return this.hideButton([2]) }, |
|||
size: 'mini' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
icon: 'el-icon-delete-solid', |
|||
label: '作废', |
|||
name: "invalid", |
|||
hide: () => { return this.hideButton([1,2]) }, |
|||
size: 'mini' |
|||
} |
|||
], |
|||
handleDetailsTableColumns: [ |
|||
{ |
|||
label: "箱标签", |
|||
prop: "handledPackingCode", |
|||
}, |
|||
{ label: "物品代码", prop: "itemCode", }, |
|||
{ label: "物品名称", prop: "itemName" }, |
|||
{ type: "objectInput", valueType: Number, rules: detailsRules.numberInput, label: "收货数量", prop: "handledQty", showProp: "qty", }, |
|||
{ label: "包装数量", prop: "stdPackQty", }, |
|||
{ type: "input", rules: detailsRules.detailsRules, label: "实际库位", prop: "handledLocationCode", }, |
|||
{ label: "推荐库位", prop: "recommendLocationCode", }, |
|||
{ label: "包装单位", prop: "stdPackUom", }, |
|||
{ type: "object", label: "收货单位", prop: "handledQty", showProp: "uom", }, |
|||
{ label: "订单号", prop: "poNumber", }, |
|||
{ label: "订单行", prop: "poLine", }, |
|||
{ label: "备注", prop: 'remark', }, |
|||
], |
|||
editOptions: { |
|||
}, |
|||
handleFormData: { |
|||
"id": null, |
|||
"creationTime": null, |
|||
"lastModificationTime": null, |
|||
"remark": null, |
|||
"concurrencyStamp": null, |
|||
"company": null, |
|||
"number": null, |
|||
"upStreamJobNumber": null, |
|||
"arriveNoticeNumber": null, |
|||
"purchaseReceiptNumber": null, |
|||
"asnNumber": null, |
|||
"poNumber": null, |
|||
"supplierCode": null, |
|||
"jobType": 1, |
|||
"jobStatus": 1, |
|||
"priority": 0, |
|||
"priorityIncrement": 0, |
|||
"wlgCode": "123", |
|||
"isAutoComplete": true, |
|||
"details": [], |
|||
"acceptTime": null, |
|||
"completeTime": null |
|||
}, |
|||
childTableData: [ |
|||
{ |
|||
"id": null, |
|||
"creationTime": null, |
|||
"lastModificationTime": null, |
|||
"remark": null, |
|||
"concurrencyStamp": null, |
|||
"masterID": null, |
|||
"packingCode": null, |
|||
"containerCode": null, |
|||
"item": { |
|||
"id": null, |
|||
"name": null, |
|||
"desc1": null, |
|||
"desc2": null |
|||
}, |
|||
"itemCode": null, |
|||
"batch": { |
|||
"supplierBatch": null, |
|||
"produceDate": null |
|||
}, |
|||
"lot": null, |
|||
"stdPack": { |
|||
"packUom": null, |
|||
"packQty": 0 |
|||
}, |
|||
"recommendLocationCode": null, |
|||
"recomendQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
}, |
|||
"handledLocationCode": null, |
|||
"handledQty": { |
|||
"uom": null, |
|||
"qty": 0 |
|||
} |
|||
} |
|||
], |
|||
handleForm: [ |
|||
{ type: "input", label: "任务编号", prop: "number", colSpan: 12, disabled: "true" }, |
|||
{ type: "input", label: "到货编号", prop: "arriveNoticeNumber", 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: "input", label: "订单号", prop: "poNumber", colSpan: 12, }, |
|||
{ type: "dateTime", label: "接收时间", prop: "acceptTime", colSpan: 12, }, |
|||
{ type: "input", label: "备注", prop: "remark", colSpan: 12, }, |
|||
], |
|||
editRules: { |
|||
handleRule: { |
|||
number: [{ required: true, trigger: ["blur", "change"], message: "不可为空" }], |
|||
jobType: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
poNumber: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
jobStatus: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
priority: [{ required: true, trigger: "blur", message: "不可为空" }], |
|||
} |
|||
}, |
|||
}; |
|||
}, |
|||
mounted () { |
|||
this.paging(); |
|||
}, |
|||
methods: { |
|||
// //抽屉常用按钮 |
|||
drawerbutton (val) { |
|||
if (val == 'accept') { |
|||
let data = { |
|||
id: this.propsData.id |
|||
} |
|||
this.Loading.appMainLoading = true |
|||
accept(this.URL, data).then(res => { |
|||
this.$successMsg('已承接任务!') |
|||
this.Loading.appMainLoading = false |
|||
getDetailed(this.propsData.id, this.URL).then(res => { |
|||
this.propsData = res |
|||
// this.displayDialog.detailsDialog = true; |
|||
}) |
|||
this.paging(); |
|||
}).catch(err => { |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
} else if (val == 'handle') { |
|||
this.Loading.appMainLoading = true |
|||
let propsData = JSON.parse(JSON.stringify(this.propsData)); |
|||
this.$listAssign(this.handleFormData, propsData) |
|||
this.handleFormData.details = [] |
|||
// let data = JSON.parse(JSON.stringify(...this.childTableData)) |
|||
propsData.details.forEach(item => { |
|||
let data = JSON.parse(JSON.stringify(...this.childTableData)) |
|||
this.$listAssign(data, item) |
|||
this.handleFormData.details.push(data) |
|||
// delete item.arriveNumber |
|||
// delete item.supplierPack |
|||
// delete item.convertRate |
|||
}) |
|||
this.Loading.appMainLoading = false |
|||
this.formTitle = "执行" + this.$route.meta.title; |
|||
this.displayDialog.handleFromDialog = true |
|||
}else if(val == 'invalid'){ |
|||
let data = { |
|||
id: this.propsData.id |
|||
} |
|||
this.Loading.appMainLoading = true |
|||
Invalid(this.URL, data).then(res=>{ |
|||
this.displayDialog.detailsDialog = false |
|||
this.$successMsg('已作废任务!') |
|||
this.paging() |
|||
this.Loading.appMainLoading = false |
|||
}).catch(err=>{ |
|||
this.Loading.appMainLoading = false |
|||
}) |
|||
} |
|||
}, |
|||
handleFormSubmit (val) { |
|||
return new Promise((resolve, reject) => { |
|||
let data = { |
|||
id: this.propsData.id |
|||
} |
|||
handle(this.handleFormData, data, this.URL).then(res => { |
|||
this.displayDialog.handleFromDialog = false; |
|||
this.$successMsg('已生成采购退货记录!') |
|||
getDetailed(this.propsData.id, this.URL).then(res => { |
|||
this.propsData = res |
|||
// this.displayDialog.detailsDialog = true; |
|||
}) |
|||
this.paging() |
|||
this.FormRemove(val) |
|||
resolve() |
|||
}).catch(err => { |
|||
reject(); |
|||
}) |
|||
}) |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
</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" |
|||
:tabsDesTions="tabsDesTions" |
|||
:Butttondata="DrawerButtonData" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@close-value="closeValue" |
|||
@drawerbutton="drawerbutton" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { getPageListWip,getOneSupplierInfoByCode } 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: "completDumpNote", |
|||
mixins: [ |
|||
tableMixins, |
|||
LoadingMixins, |
|||
drawerMixins, |
|||
TableHeaderMixins, |
|||
mixins, |
|||
], |
|||
data () { |
|||
return { |
|||
URL: 'wms/store/purchase-return-note', |
|||
//常用按钮数据 |
|||
currenButtonData: [ |
|||
//导出 |
|||
this.defaultExportBtn({ |
|||
url:"wms/store/purchase-return-note/export-after-puton" |
|||
}), |
|||
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, |
|||
getPageListWip(this.PageListParams, 'wms/store/purchase-return-note/list-after-puton') |
|||
.then(res => { |
|||
this.tableData = res.items |
|||
this.totalCount = res.totalCount |
|||
this.pagingCallback(callback) |
|||
}) |
|||
.catch(err => { |
|||
this.Loading.tableLoading = false |
|||
}) |
|||
}, |
|||
//抽屉常用按钮 |
|||
drawerbutton (val) { |
|||
// 打印 |
|||
if(val == 'print'){ |
|||
if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){ |
|||
getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => { |
|||
if(res){this.propsData.supplierShortName = res.shortName || res.name} |
|||
let data = initPrintAllData(this.tableDataDetails,'thd.rdlx','PurReturnReason'); |
|||
this.Print(data) |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}else{ |
|||
let data = initPrintAllData(this.tableDataDetails,'thd.rdlx','PurReturnReason'); |
|||
this.Print(data) |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../../styles/mainbasicData.scss"; |
|||
</style> |
@ -0,0 +1,108 @@ |
|||
<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" |
|||
@drawerbutton="drawerbutton" |
|||
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|||
@close-value="closeValue" |
|||
:tableColumns="detailsTableColumns" |
|||
:totalCount="totalCountDetails" |
|||
:MaxResultCount="MaxResultCountDetails" |
|||
@alterResultCountDetails="alterResultCountDetails" |
|||
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|||
></curren-Drawer> |
|||
</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: "completDumpRequest", |
|||
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/purchase-return-request', |
|||
//常用按钮数据 |
|||
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> |
Loading…
Reference in new issue