Browse Source

2024-12-19

接口更改和配方
master
fengyuan_yang 1 year ago
parent
commit
99a69a32cb
  1. 7
      src/api/part/partInformation.js
  2. 14
      src/api/part/recipeManagement.js
  3. 537
      src/views/modules/part/bomManagement.vue
  4. 270
      src/views/modules/part/locationInformation.vue
  5. 52
      src/views/modules/part/manufacturerInformation.vue
  6. 27
      src/views/modules/part/partInformation.vue
  7. 1614
      src/views/modules/part/recipeManagement.vue

7
src/api/part/partInformation.js

@ -198,11 +198,6 @@ export const queryPartItem = data => createAPI(`/plm/partInformation/queryPartIt
*/
export const queryMasterField = data => createAPI(`/plm/partInformation/queryMasterField`,'post',data)
/**
* 临时物料转为正式物料
*/
export const toBecomeOfficialPart = data => createAPI(`/plm/partInformation/toBecomeOfficialPart`,'post',data)
/**
* 查询物料的bom版本列表
*/
@ -316,3 +311,5 @@ export const getItemExclusionAlreadyExists = data => createAPI(`/plm/partInforma
export const getPartCharacteristicList = data => createAPI(`/plm/partInformation/getPartCharacteristicList`,'post',data)
export const partInformationEdit2 = data => createAPI(`/plm/partInformation/partInformationEdit2`,'post',data)
export const locationInformationSearch = data => createAPI(`/plm/partInformation/locationInformationSearch`,'post',data)

14
src/api/part/recipeManagement.js

@ -189,4 +189,18 @@ export const queryManufStructCostDistribtionTable = data => createAPI(`/plm/reci
*/
export const queryMultiLevelStructureTable = data => createAPI(`/plm/recipeManagement/queryMultiLevelStructureTable`,'post',data)
/**
* 查出可创建Recipe的物料
* @param data
* @returns {*}
*/
export const queryPartListRecipe = data => createAPI(`/plm/recipeManagement/queryPartListRecipe`,'post',data)
/**
* 查出所有类型的物料
* @param data
* @returns {*}
*/
export const queryPartListAll = data => createAPI(`/plm/recipeManagement/queryPartListAll`,'post',data)

537
src/views/modules/part/bomManagement.vue
File diff suppressed because it is too large
View File

270
src/views/modules/part/locationInformation.vue

@ -0,0 +1,270 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'库位编码'">
<el-input v-model="searchData.locationId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'库位名称'">
<el-input v-model="searchData.locationName" clearable style="width: 210px"></el-input>
</el-form-item>
<el-form-item :label="'仓库'">
<el-input v-model="searchData.warehouseId" clearable style="width: 210px"></el-input>
</el-form-item>
<el-form-item :label="'库位类型'">
<el-select clearable v-model="searchData.locationType" style="width: 120px">
<el-option label="Picking" value="Picking"></el-option>
<el-option label="Arrival" value="Arrival"></el-option>
<el-option label="Floor stock" value="Floor stock"></el-option>
<el-option label="Shipment" value="Shipment"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getDataList()">查询</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="dataList"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页栏 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
</template>
<script>
import {
locationInformationSearch, //
} from '@/api/part/partInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.locationId = this.searchData.locationId.toUpperCase()
}
},
},
data () {
return {
//
exportData: [],
exportName: '库位' + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ['库位'],
exportFooter: [],
resultList: [],
// ======== ========
height: 200,
// ======== ========
pageIndex: 1,
pageSize: 50,
totalPage: 0,
//
searchData: {
site: this.$store.state.user.site,
locationId: '',
locationName: '',
warehouseId: '',
locationType: '',
active: '',
page: 1,
limit: 10
},
// ======== ========
dataList: [],
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1LocationId',
tableId: "104009Table1",
tableName: "库位信息表",
columnProp: 'locationId',
headerAlign: "center",
align: "left",
columnLabel: '库位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1LocationName',
tableId: "104009Table1",
tableName: "库位信息表",
columnProp: 'locationName',
headerAlign: "center",
align: "left",
columnLabel: '库位名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1WarehouseId',
tableId: "104009Table1",
tableName: "库位信息表",
columnProp: 'warehouseId',
headerAlign: "center",
align: "left",
columnLabel: '仓库编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1LocationType',
tableId: "104009Table1",
tableName: "库位信息表",
columnProp: 'locationType',
headerAlign: "center",
align: "left",
columnLabel: '库位类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
],
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 170
})
},
created () {
this.getDataList()
},
methods: {
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
locationInformationSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
})
},
//excel
async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await locationInformationSearch(this.searchData).then(({data}) => {
this.exportList= data.page.list
})
return this.exportList
},
startDownload() {},
finishDownload() {},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
// end
}
}
</script>
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
height: 459px;
}
</style>

52
src/views/modules/part/manufacturerInformation.vue

@ -175,9 +175,9 @@ export default {
columnList: [
{
userId: this.$store.state.user.name,
functionId: 100006,
serialNumber: '100006Table1ManufacturerId',
tableId: "100006Table1",
functionId: 104007,
serialNumber: '104007Table1ManufacturerId',
tableId: "104007Table1",
tableName: "制造商信息表",
columnProp: 'manufacturerId',
headerAlign: "center",
@ -193,10 +193,10 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 100006,
serialNumber: '100006Table1ManufacturerName',
tableId: "100006Table1",
tableName: "制造商表",
functionId: 104007,
serialNumber: '104007Table1ManufacturerName',
tableId: "104007Table1",
tableName: "制造商信息表",
columnProp: 'manufacturerName',
headerAlign: "center",
align: "left",
@ -210,9 +210,9 @@ export default {
columnWidth: 300
},
{
functionId: 100006,
serialNumber: '100006Table1Active',
tableId: '100006Table1',
functionId: 104007,
serialNumber: '104007Table1Active',
tableId: '104007Table1',
tableName: '制造商信息表',
columnProp: 'active',
headerAlign: 'center',
@ -228,10 +228,10 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 100006,
serialNumber: '100006Table1CreateDate',
tableId: '100006Table1',
tableName: '制造商表',
functionId: 104007,
serialNumber: '104007Table1CreateDate',
tableId: '104007Table1',
tableName: '制造商信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
@ -246,10 +246,10 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 100006,
serialNumber: '100006Table1CreateBy',
tableId: "100006Table1",
tableName: "制造商表",
functionId: 104007,
serialNumber: '104007Table1CreateBy',
tableId: "104007Table1",
tableName: "制造商信息表",
columnProp: 'createBy',
headerAlign: "center",
align: "center",
@ -264,10 +264,10 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 100006,
serialNumber: '100006Table1UpdateDate',
tableId: "100006Table1",
tableName: "制造商表",
functionId: 104007,
serialNumber: '104007Table1UpdateDate',
tableId: "104007Table1",
tableName: "制造商信息表",
columnProp: 'updateDate',
headerAlign: "center",
align: "center",
@ -282,10 +282,10 @@ export default {
},
{
userId: this.$store.state.user.name,
functionId: 100006,
serialNumber: '100006Table1UpdateBy',
tableId: "100006Table1",
tableName: "制造商表",
functionId: 104007,
serialNumber: '104007Table1UpdateBy',
tableId: "104007Table1",
tableName: "制造商信息表",
columnProp: 'updateBy',
headerAlign: "center",
align: "center",

27
src/views/modules/part/partInformation.vue

@ -1544,13 +1544,12 @@
deleteLocation, // ()
commitItemValue, //
deleteItem, // ,
deleteItem, //
getItemLists, //
addPartItem, //
deletePartItem, //
queryPartItem,
queryMasterField, // masterPart
toBecomeOfficialPart, //
queryPartRevisionList, // bom
saveRevision, //
updateRevision, //
@ -3522,6 +3521,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
row.updateBy = this.$store.state.user.name
deleteRevision(row).then(({data}) => {
if (data && data.code === 0) {
this.queryPartRevisionList()
@ -3541,26 +3541,6 @@
})
},
//
toBecomeOfficialPart () {
toBecomeOfficialPart(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
queryMasterField () {
// masterPart
@ -4633,6 +4613,7 @@
let inData = {
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
updateBy: this.$store.state.user.name,
locationList: this.locationSelections1
}
addDefaultLocation(inData).then(({data}) => {
@ -4662,6 +4643,7 @@
let inData = {
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
updateBy: this.$store.state.user.name,
locationList: this.locationSelections2
}
deleteDefaultLocation(inData).then(({data}) => {
@ -4689,6 +4671,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
row.updateBy = this.$store.state.user.name
deleteLocation(row).then(({data}) => {
if (data && data.code === 0) {
this.getDefaultLocation()

1614
src/views/modules/part/recipeManagement.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save