Browse Source

【nev-pc】物料清单信息页面,列表及明细:父物料,子物料双物料,通过前端重新赋值其他基础信息开发

ag_report_nev
安虹睿 11 months ago
parent
commit
f024d4bd8d
  1. 47
      fe/PC/src/components/commonTabel-drawer/index.vue
  2. 22
      fe/PC/src/filters/excelOrReportsOption.js
  3. 10
      fe/PC/src/utils/detailsTableColumns/index.js
  4. 4
      fe/PC/src/utils/tableColumns/index.js
  5. 4
      fe/PC/src/utils/tabsDesTions/index.js
  6. 39
      fe/PC/src/views/basicData/BomManage/Bom.vue
  7. 77
      fe/PC/src/views/materialIssueBP/IssueRequestBP.vue

47
fe/PC/src/components/commonTabel-drawer/index.vue

@ -167,7 +167,9 @@
</el-drawer>
</template>
<script>
import { getListByItemcode,byItem,byProduct,byComponent,bySupplierCode,byLocation,byLocationCode,
import {
getListByItemcode,getPageList,
byItem,byProduct,byComponent,bySupplierCode,byLocation,byLocationCode,
relationByLocationCode,byComponentCJ,purRecNoteCustomInfo,EnumPurchaseReceiptInspect
} from "@/api/wms-api"
import currenButton from "@/components/currenButton"
@ -431,7 +433,8 @@ export default {
delete zdyTableColumnsJSON[0].type
this.zdyTableColumns = zdyTableColumnsJSON
this.otherData = res
parent.tableLoading = false
//
this.getBaseDataInfo(this.otherData,parent)
}).catch(err => {
console.log(err)
parent.tableLoading = false
@ -442,7 +445,8 @@ export default {
delete zdyTableColumnsJSON[0].type
this.zdyTableColumns = zdyTableColumnsJSON
this.otherData = res
parent.tableLoading = false
//
this.getBaseDataInfo(this.otherData,parent)
}).catch(err => {
console.log(err)
parent.tableLoading = false
@ -544,6 +548,43 @@ export default {
}
})
},
//
getBaseDataInfo(ortherData,parent,itemProps = ['product','component']){
let _allItemCode = []
ortherData.forEach(item => {
for(let i in item){
if(itemProps.indexOf(i) >= 0){
_allItemCode.push(item[i])
}
}
});
let _data = {
Sorting: "",
SkipCount: 0,
MaxResultCount: 1000,
condition: {filters: [
{
logic: 'Or',
column: "code",
action: "In",
value: JSON.stringify(_allItemCode)
}
]},
}
getPageList(_data, 'basedata/item-basic').then(res => {
let _itemsConfig = {}
res.items.forEach(item=>{ _itemsConfig[item.code] = item })
ortherData.forEach(item=>{
this.$set(item,'productName',_itemsConfig[item.product].name)
this.$set(item,'productDesc1',_itemsConfig[item.product].desc1)
this.$set(item,'componentName',_itemsConfig[item.component].name)
this.$set(item,'componentDesc1',_itemsConfig[item.component].desc1)
})
parent.tableLoading = false
}).catch(err => {
parent.tableLoading = false
})
},
//
recursion(val){
val.forEach(item => {

22
fe/PC/src/filters/excelOrReportsOption.js

@ -2,6 +2,9 @@
*
* @returns {Array} '导入表格模板字段'
*/
import zh from '@/lang/zh'
let _Names = zh.ColumsNames // 业务字段
// 供货商导入表格
export const supplierAsnExcel = {
// poNumber:"订单号",
@ -29,28 +32,35 @@ export const supplierAsnExcel = {
export const kittingRequestExcel = {
toLocationCode:"目标库位",
qty:"需求数量",
itemCode:"物品代码",
itemCode:_Names.itemCode,
}
// 注塑申请
export const zsRequestExcel = {
toLocationCode:"目标库位",
qty:"需求数量",
itemCode:"物品代码",
itemCode:_Names.itemCode,
}
// 喷涂申请
export const ptRequestExcel = {
toLocationCode:"目标库位",
qty:"需求数量",
itemCode:"物品代码",
itemCode:_Names.itemCode,
}
// 装配申请
export const zpRequestExcel = {
toLocationCode:"目标库位",
qty:"需求数量",
itemCode:"物品代码",
itemCode:_Names.itemCode,
}
// 备品申请
export const bpRequestExcel = {
toLocationCode:"目标库位",
qty:"需求数量",
itemCode:_Names.itemCode,
}
// 报表地址
@ -72,7 +82,7 @@ export const reportsAddress = {
InventorySummary:reportsUrl + 'planNoteSummary',//盘点记录汇总表 planNoteSummary
InventoryAgingSegmentSummary:reportsUrl + 'InventoryAgingsectionSummary',//库存账龄分段汇总表 InventoryAgingsectionSummary
inventoryBalanceReportLocationCode:reportsUrl + 'InventoryBalanceLocation',//库存余额报表按库位 InventoryBalanceLocation
inventoryBalanceReportLocationErpCode:reportsUrl + 'InventoryBalanceERP',//库存余额报表按ERP库位 InventoryBalanceERP
inventoryBalanceReportLocationErpCode:reportsUrl + 'InventoryBalanceERP',//库存余额报表按ERP InventoryBalanceERP
InventoryBookSummaryLocation:reportsUrl + 'InventoryJournalLocation',//库存流水帐汇总(库位) InventoryJournalLocation
InventoryBookSummaryERP_pay:reportsUrl + 'InventoryJournalERP',//库存流水帐汇总(ERP储位) InventoryJournalERP
// 新增
@ -104,7 +114,7 @@ export const reportsAddress = {
// InventorySummary:reportsUrl + '202211300921065163.rdlx',//盘点记录汇总表 planNoteSummary
// InventoryAgingSegmentSummary:reportsUrl + '202211300912101560.rdlx',//库存账龄分段汇总表 InventoryAgingsectionSummary
// inventoryBalanceReportLocationCode:reportsUrl + '202211300922434082.rdlx',//库存余额报表按库位 InventoryBalanceLocation
// inventoryBalanceReportLocationErpCode:reportsUrl + '202211300922434083.rdlx',//库存余额报表按ERP库位 InventoryBalanceERP
// inventoryBalanceReportLocationErpCode:reportsUrl + '202211300922434083.rdlx',//库存余额报表按ERP InventoryBalanceERP
// InventoryBookSummaryLocation:reportsUrl + '202212162112124489.rdlx',//库存流水帐汇总(库位) InventoryJournalLocation
// InventoryBookSummaryERP_pay:reportsUrl + '库存流水帐汇总ERP.rdlx',//库存流水帐汇总(ERP储位)-账期 InventoryJournalERP
// InventoryBookDetail:reportsUrl + '202212162111466911.rdlx',//库存流水帐明细

10
fe/PC/src/utils/detailsTableColumns/index.js

@ -3220,7 +3220,7 @@ export const CountPlan = [
{ label: "库位组", prop: "locationGroup" },
{ label: "库区", prop: "locationArea" },
{ label: "库位", prop: "locationCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "初盘时间", prop: "firstCountTime",type: "dateTime" },
{ label: "初盘描述", prop: "firstCountDescription" },
{ label: "初盘操作员", prop: "firstCountOperator" },
@ -3274,7 +3274,7 @@ export const CountJob = [
{ label: "库位组", prop: 'locationGroup' },
{ label: "库区", prop: 'locationArea' },
{ label: "库位", prop: "locationCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "盘点时间", prop: 'countTime', type: "dateTime" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
{ label: "盘点操作员", prop: "countOperator" },
@ -3315,7 +3315,7 @@ export const CountNote = [
{ label: "库位组", prop: 'locationGroup' },
{ label: "库区", prop: 'locationArea' },
{ label: "库位", prop: "locationCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "初盘时间", prop: "firstCountTime" ,type: "dateTime" },
{ label: "初盘描述", prop: "firstCountDescription" },
{ label: "初盘操作员", prop: "firstCountOperator" },
@ -3369,7 +3369,7 @@ export const CountPlanAdjust = [
{ label: "库位组", prop: 'locationGroup' },
{ label: "库区", prop: 'locationArea' },
{ label: "库位", prop: "locationCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "创建时间", prop: "creationTime", type: "dateTime" },
{ label: "原因代码", prop: "reasonCode", },
{ label: "原因说明", prop:"reasonCode", type: "filter", filters: "getDict" , dictType:"AdjustmentReason" },
@ -3409,7 +3409,7 @@ export const CountPlanAdjust = [
{ label: "库位组", prop: 'locationGroup' },
{ label: "库区", prop: 'locationArea' },
{ label: "库位", prop: "locationCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "ERP位", prop: "locationErpCode" },
{ label: "调整原因代码", prop: "reasonCode" },
{ label: "调整原因说明", prop:"reasonCode", type: "filter", filters: "getDict" , dictType:"AdjustmentReason" },
{ label: "出库/入库", prop: "transInOut",type: "filter", filters: "transInOutStatus" },

4
fe/PC/src/utils/tableColumns/index.js

@ -223,7 +223,11 @@ export const BomInner = [
fixed: "left",
type: "name"
},
{ label: _Names.productName, prop: "productName",showProp:true },
{ label: _Names.productDesc1, prop: "productDesc1",showProp:true },
{ label: _Names.componentCode, prop: "component" },
{ label: _Names.componentName, prop: "componentName",showProp:true },
{ label: _Names.componentDesc1, prop: "componentDesc1",showProp:true },
{ label: _Names.componentQty, prop: 'componentQty',isNumber:true },
{ label: _Names.componentUom, prop: 'componentUom' },
{ label: _Names.erpOp, prop: "erpOp" },

4
fe/PC/src/utils/tabsDesTions/index.js

@ -144,7 +144,11 @@ export const AQL = [
// 物品清单信息 20230328
export const Bom = [
{ label: "父物品号", prop: "product" },
{ label: _Names.productName, prop: "productName",showProp:true },
{ label: _Names.productDesc1, prop: "productDesc1",showProp:true },
{ label: "子物品号", prop: 'component' },
{ label: _Names.componentName, prop: "componentName",showProp:true },
{ label: _Names.componentDesc1, prop: "componentDesc1",showProp:true },
{ label: "子物品用量", prop: 'componentQty' },
{ label: "子物品用量单位", prop: 'componentUom' },
{ label: "开始时间", prop: "beginTime",type: "dateTime" },

39
fe/PC/src/views/basicData/BomManage/Bom.vue

@ -249,7 +249,6 @@ export default {
let _itemProp = ['product','component']
this.tableData.forEach(item => {
for(let i in item){
console.log(i.indexOf(_itemProp) >= 0)
if(_itemProp.indexOf(i) >= 0){
_allItemCode.push(item[i])
}
@ -272,18 +271,44 @@ export default {
let _itemsConfig = {}
res.items.forEach(item=>{ _itemsConfig[item.code] = item })
this.tableData.forEach(item=>{
item.productName = _itemsConfig[item.product].name
item.productDesc1 = _itemsConfig[item.product].desc1
item.componentName = _itemsConfig[item.component].name
item.componentDesc1 = _itemsConfig[item.component].desc1
this.$set(item,'productName',_itemsConfig[item.product].name)
this.$set(item,'productDesc1',_itemsConfig[item.product].desc1)
this.$set(item,'componentName',_itemsConfig[item.component].name)
this.$set(item,'componentDesc1',_itemsConfig[item.component].desc1)
})
this.Loading.tableLoading = false
}).catch(err => {
this.Loading.tableLoading = false
})
},
// todo:
inlineDialogCallback(){}
//
inlineDialogCallback(){
let _allItemCode = [this.propsData.product,this.propsData.component]
let _data = {
Sorting: "",
SkipCount: 0,
MaxResultCount: 1000,
condition: {filters: [
{
logic: 'Or',
column: "code",
action: "In",
value: JSON.stringify(_allItemCode)
}
]},
}
getPageList(_data, 'basedata/item-basic').then(res => {
let _itemsConfig = {}
res.items.forEach(item=>{ _itemsConfig[item.code] = item })
this.$set(this.propsData,'productName',_itemsConfig[this.propsData.product].name)
this.$set(this.propsData,'productDesc1',_itemsConfig[this.propsData.product].desc1)
this.$set(this.propsData,'componentName',_itemsConfig[this.propsData.component].name)
this.$set(this.propsData,'componentDesc1',_itemsConfig[this.propsData.component].desc1)
this.Loading.DrawerLoading = false
}).catch(err => {
this.Loading.DrawerLoading = false
})
}
}
};
</script>

77
fe/PC/src/views/materialIssueBP/IssueRequestBP.vue

@ -26,7 +26,7 @@
</tablePagination>
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
<importFile
<!-- <importFile
:loading="Loading.importLoading"
:show="displayDialog.importDialog"
:URL="URL"
@ -35,7 +35,15 @@
isAllowPartImportValue="1"
@importClick="postImportMergeClick(arguments)"
@postImportDown="importDown"
></importFile>
></importFile> -->
<!-- 表格导入-前端 -->
<UploadExcelByFe
ref="UploadExcelByFe_Ref"
:before-upload="beforeUpload"
:show="displayDialog.importDialog"
@postImportDown="importDown()"
@submitForm="uploadSubmitForm"
/>
<!--抽屉-->
<curren-Drawer
:title="tableColumns"
@ -62,6 +70,12 @@ import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins";
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { mixins } from "@/mixins/mixins";
import UploadExcelByFe from '@/components/UploadExcelByFe/index.vue'
import { bpRequestExcel } from "@/filters/excelOrReportsOption";
import { getNowToT } from '@/utils/formatTime'
import { createImportExcelByFE } from '@/api/wms-api'
import store from '@/store'
export default {
name: "IssueRequestBP",
mixins: [
@ -71,6 +85,7 @@ export default {
TableHeaderMixins,
mixins,
],
components: { UploadExcelByFe },
computed: {
hideButton: function () {
return function (val) {
@ -86,10 +101,10 @@ export default {
},
data() {
return {
URL: "wms/store/spare-part-issue-request",
URL: "wms/store/assemble-issue-request",
//
currenButtonData: [
// this.defaultImportBtn(),//
this.defaultImportBtn(),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
@ -102,7 +117,7 @@ export default {
name: "handleGetIds",
hide: () => { return this.hideButton([1,5,9]) },
size: 'mini',
handleGetJobsUrl:'wms/store/spare-part-issue-job',
handleGetJobsUrl:'wms/store/assemble-issue-job',
// handleRequestUrl:'wms/store/kitting-issue-request',
},
{
@ -127,6 +142,58 @@ export default {
mounted() {
this.paging();
},
methods:{
uploadSubmitForm(index,data){
//
if(index == '1'){
let _result = data.results;
let _data = []
for(let i in _result){
let _item = {
worker: store.getters.name.userName,
remark: "",
extraProperties: {},
activeDate: getNowToT(),
autoSubmit: true,
autoAgree: false,
autoHandle: false,
autoCompleteJob: false,
directCreateNote: true,
issueRequestType: 5,
useOnTheWayLocation: false,
details: [{
remark: "",
qty: _result[i][bpRequestExcel.qty],
itemCode: _result[i][bpRequestExcel.itemCode],
toLocationCode: _result[i][bpRequestExcel.toLocationCode],
itemName:"",
uom:""
}]
}
_data.push(_item)
}
this.$refs.UploadExcelByFe_Ref.loading = true
createImportExcelByFE(this.URL,_data)
.then(res=>{
this.$refs.UploadExcelByFe_Ref.loading = false
this.displayDialog.importDialog = false;
this.displayDialog.detailsDialog = false
this.$successMsg("导入成功")
this.paging()
})
.catch(err=>{
this.$refs.UploadExcelByFe_Ref.loading = false
})
}
//
else{
this.displayDialog.importDialog = false;
}
},
beforeUpload(file) {
return true
}
}
};
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save