From 282a0123a942e93969492937d4c74b91bb50afc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Wed, 20 Mar 2024 15:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90NEV-PC=E3=80=91=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/StepsFormNotView/index.vue | 5 +- .../StepsFormNotView/style/index.scss | 3 +- fe/PC/src/components/currenTable/index.vue | 3 +- fe/PC/src/mixins/TableMixins.js | 1 + .../dismantle/customerDismantleJob.vue | 160 +++++++++++------- .../purchaseReceipt/PurchaseOrderHigher.vue | 2 +- 6 files changed, 110 insertions(+), 64 deletions(-) diff --git a/fe/PC/src/components/StepsFormNotView/index.vue b/fe/PC/src/components/StepsFormNotView/index.vue index 8518582cb..1d625d895 100644 --- a/fe/PC/src/components/StepsFormNotView/index.vue +++ b/fe/PC/src/components/StepsFormNotView/index.vue @@ -10,7 +10,7 @@ :modal-append-to-body="false" :show-close="false" > -
+
{{ item.label }} + 退出 diff --git a/fe/PC/src/components/StepsFormNotView/style/index.scss b/fe/PC/src/components/StepsFormNotView/style/index.scss index 0dd5fe2c2..1c719cc13 100644 --- a/fe/PC/src/components/StepsFormNotView/style/index.scss +++ b/fe/PC/src/components/StepsFormNotView/style/index.scss @@ -1,4 +1,4 @@ -#stepsForm { +#StepsFormNotView { width: 100%; height: 100%; display: flex; @@ -38,6 +38,7 @@ ::v-deep .el-form { flex: 1; display: flex; + justify-content: center; height: 100%; .el-row { display: none; diff --git a/fe/PC/src/components/currenTable/index.vue b/fe/PC/src/components/currenTable/index.vue index 8475b38bc..b8faf9faf 100644 --- a/fe/PC/src/components/currenTable/index.vue +++ b/fe/PC/src/components/currenTable/index.vue @@ -36,7 +36,7 @@ @@ -66,6 +69,7 @@ import { LoadingMixins } from "@/mixins/LoadingMixins" import { drawerMixins } from "@/mixins/drawerMixins" import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" import { mixins } from "@/mixins/mixins" +import { filterSelectMixins } from '@/mixins/filter-Select' export default { name: "customerDismantleJob", mixins: [ @@ -74,6 +78,7 @@ export default { drawerMixins, TableHeaderMixins, mixins, + filterSelectMixins, ], data () { return { @@ -81,6 +86,7 @@ export default { detailURL: 'wms/store/product-recycle-note/note-and-back-flush', //常用按钮数据 currenButtonData: [ + this.defaultAddBtn(),//新增 //导出 this.defaultExportBtn({ url:"wms/store/product-recycle-note/export-note-and-back-flush" @@ -108,7 +114,17 @@ export default { details:[] }, CreateForm: [ - { type: "inputNumber", label: "数量", prop: "qty",colSpan: 12,min:1 }, + { type: "inputNumber", label: "数量", prop: "qty",colSpan: 12,min:1, + validator: (rule, value, callback) => { + //todo:数量小于库存数 + let _qty = Number(this.propsData.InventoryQty) + if(_qty < value){ + return callback(new Error(`数量不能大于库存数量${_qty}`)) + }else{ + callback() + } + } + }, ], editRules: { cerateRule: { @@ -117,11 +133,11 @@ export default { }, AddDetailsTableColumns: [ { label: "物料代码", prop: "partCode",width:"auto" }, - { label: "数量", prop: 'qty',width:"auto" },//todo:可能需要计算 + { label: "数量", prop: 'qty',width:"auto" }, { type: "filterSelect", label: "库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code", focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location",this.isFilter("type", "5"))}, - searchButton: (val) => { this.showSerarchPage(val, 'basedata/Location', 'InventoryBalance', '库位选择', this.CreateFormData) }, - width:"auto", searchButton:false + // searchButton: (val) => { this.showSerarchPage(val, 'basedata/Location', 'InventoryBalance', '库位选择', this.CreateFormData) }, + width:"auto", }, ], childTableData:[{ @@ -129,65 +145,93 @@ export default { qty:undefined, locationCode:undefined }], + successHandle:[ + { + label:"下载", + click:(()=>{ + this.downloadReport() + }) + } + ] }; }, mounted () { this.paging(); }, - methods: {//渲染数据 - paging(callback) { - this.Loading.tableLoading = true; - this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount, - getPageList(this.PageListParams, this.URL,true) - .then(res => { - this.tableData = res.items - this.totalCount = res.totalCount - this.tableData.forEach(item=>{ - item.itemCode = item.noteAndBackFlushDetails[0].itemCode - item.locationCode = item.noteAndBackFlushDetails[0].locationCode - item.qty = item.noteAndBackFlushDetails[0].qty - item.rawLocationCode = item.noteAndBackFlushDetails[0].rawLocationCode - item.preStartTime = item.noteAndBackFlushDetails[0].preStartTime - item.workHour = item.noteAndBackFlushDetails[0].workHour - }) - this.pagingCallback(callback) - }) - .catch(err => { - this.Loading.tableLoading = false - }) + methods: { + //过滤查询条件 + isFilter (val, data) { + let filter = [ + { + logic: "And", + column: val, + action: "==", + value: data + } + ] + return filter + }, + detailsDataPush(data){ + console.log(data) + }, + detailsClear(data){ + console.log(data) + }, + //导出存储-新 + blob(res, fileName) { + let blob = new Blob([res], { + type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8', + }) + const href = URL.createObjectURL(blob) //创建新的URL表示指定的blob对象 + const a = document.createElement('a') //创建a标签 + a.style.display = 'none' + a.href = href // 指定下载链接 + a.download = fileName //指定下载文件名 + a.click() //触发下载 + URL.revokeObjectURL(a.href) //释放URL对象 + }, + // 成功后按钮操作 + downloadReport(){ + // 下载 + // todo:下载获取接口 + console.log(241) + // this.blob(res, menuName + '报告') + }, + stepsSubmit (val) { + return new Promise((resolve, reject) => { + resolve() + // todo:提交 + // postUpdate(this.CreateFormData, this.propsData.id, this.URL).then(res => { + // this.propsData = res + // resolve(); + // }).catch(err => { + // reject(); + // }) + }); + }, + stepsCloseHandle(data){ + // todo:关闭详情弹窗 + this.displayDialog.detailsDialog = false + this.stepsClose(data) }, - //点击Table行内名称 - inlineDialog(val) { - this.firstTabs = 'xq' - //打开抽屉 - this.Loading.DrawerLoading = true - this.displayDialog.detailsDialog = true; - getDetailed(val.id, 'wms/store/product-recycle-note/note-and-back-flush') - .then(res => { - if (res.details) { - // 前端分页处理 - this.tableDataDetails = JSON.parse(JSON.stringify(res)) - let linshiTableDataDetails = JSON.parse(JSON.stringify(this.tableDataDetails)) - this.totalCountDetails = res.details.length - // 删除除当前页面最大数以外数据 - linshiTableDataDetails.details.splice(this.MaxResultCountDetails,this.totalCountDetails); - this.propsData = linshiTableDataDetails - } else { - this.propsData = res - } - if (this.propsData.noteAndBackFlushDetails.length > 0) { - this.propsData.itemCode = this.propsData.noteAndBackFlushDetails[0].itemCode - this.propsData.locationCode = this.propsData.noteAndBackFlushDetails[0].locationCode - this.propsData.qty = this.propsData.noteAndBackFlushDetails[0].qty - this.propsData.rawLocationCode = this.propsData.noteAndBackFlushDetails[0].rawLocationCode - this.propsData.preStartTime = this.propsData.noteAndBackFlushDetails[0].preStartTime - this.propsData.workHour = this.propsData.noteAndBackFlushDetails[0].workHour - } - this.inlineDialogCallback() - }) - .catch(err => { - this.Loading.DrawerLoading = false - }) + PalletlFunction (val) { + return new Promise((resolve, reject) => { + if(val == 0){ + console.log(this.CreateFormData.qty) + // todo:1、获取接口生成bom列表 + this.CreateFormData.details = [{ + partCode:"CS20231220001D", + qty:2, + locationCode:'WZSX' + }] + // todo:2、details的qty是否要乘以主表的qty值 + resolve(); + } + // 提交 + if(val == 1){ + resolve() + } + }); }, } }; diff --git a/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseOrderHigher.vue b/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseOrderHigher.vue index 99c649b4f..3330de9af 100644 --- a/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseOrderHigher.vue +++ b/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseOrderHigher.vue @@ -66,7 +66,7 @@ import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" import { mixins } from "@/mixins/mixins" import { processRequest, getDetailed } from '@/api/wms-api' export default { - name: "PurchaseOrder", + name: "PurchaseOrderHigher", mixins: [ tableMixins, LoadingMixins,