Browse Source

Merge remote-tracking branch 'origin/master'

master
qiezi 9 months ago
parent
commit
2f47be34fb
  1. 133
      src/api/part/partInformation.js
  2. 2
      src/views/modules/customer/customerInformationManagement.vue
  3. 280
      src/views/modules/part/partInformation.vue

133
src/api/part/partInformation.js

@ -1,154 +1,78 @@
import { createAPI } from "@/utils/httpRequest.js";
/**
* 材料信息列表查询
* @param data
* @returns {*}
*/
// 材料信息列表查询
export const partInformationSearch = data => createAPI(`/plm/partInformation/partInformationSearch`,'post',data)
/**
* 材料信息新增
* @param data
* @returns {*}
*/
export const partInformationSearch2 = data => createAPI(`/plm/partInformation/partInformationSearch2`,'post',data)
// 材料信息新增
export const partInformationSave = data => createAPI(`/plm/partInformation/partInformationSave`,'post',data)
/**
* 材料信息编辑
* @param data
* @returns {*}
*/
// 材料信息编辑
export const partInformationEdit = data => createAPI(`/plm/partInformation/partInformationEdit`,'post',data)
/**
* 材料信息删除
* @param data
* @returns {*}
*/
// 材料信息删除
export const partInformationDelete = data => createAPI(`/plm/partInformation/partInformationDelete`,'post',data)
/**
* 查询材料属性
* @param data
* @returns {*}
*/
// 查询材料属性
export const getPartItem = data => createAPI(`/plm/partInformation/getPartItem`,'post',data)
/**
* 保存材料属性
* @param data
* @returns {*}
*/
// 保存材料属性
export const savePartItemValue = data => createAPI(`/plm/partInformation/savePartItemValue`,'post',data)
/**
* 编辑材料属性
*/
// 编辑材料属性
export const updateItemModal = data => createAPI(`/plm/partInformation/updateItemModal`,'post',data)
/**
* 获取代理商列表
* @param data
* @returns {*}
*/
// 获取代理商列表
export const getAgentList = data => createAPI(`/plm/partInformation/getAgentList`,'post',data)
/**
* 获取材料代理商
* @param data
* @returns {*}
*/
// 获取材料代理商
export const getPartAgent = data => createAPI(`/plm/partInformation/getPartAgent`,'post',data)
/**
* 新增物料代理商
* @param data
* @returns {*}
*/
// 新增物料代理商
export const addPartAgent = data => createAPI(`/plm/partInformation/addPartAgent`,'post',data)
/**
* 删除物料代理商
* @param data
* @returns {*}
*/
// 删除物料代理商
export const deletePartAgent = data => createAPI(`/plm/partInformation/deletePartAgent`,'post',data)
/**
* 根据条件查询可选代理商
* @param data
* @returns {*}
*/
// 根据条件查询可选代理商
export const getAgentListBy = data => createAPI(`/plm/partInformation/getAgentListBy`,'post',data)
/**
* 删除物料代理商
* @param data
* @returns {*}
*/
// 删除物料代理商
export const deleteAgent = data => createAPI(`/plm/partInformation/deleteAgent`,'post',data)
/**
* 查询材料信息
* @param data
* @returns {*}
*/
// 查询材料信息
export const searchPartList = (data) => createAPI(`/plm/partInformation/searchPartList/${data.no}/${data.size}`,'post',data);
export const searchPart = (data) => createAPI(`/plm/partInformation/searchPart`,'get',data);
/**
* 获取制造商列表
*/
// 获取制造商列表
export const getManufacturerList = data => createAPI(`/plm/partInformation/getManufacturerList`,'post',data)
/**
* 获取材料制造商
*/
// 获取材料制造商
export const getPartManufacturer = data => createAPI(`/plm/partInformation/getPartManufacturer`,'post',data)
/**
* 根据条件查询可选制造商
*/
// 根据条件查询可选制造商
export const getManufacturerListBy = data => createAPI(`/plm/partInformation/getManufacturerListBy`,'post',data)
/**
* 新增物料制造商
* @param data
*/
// 新增物料制造商
export const addPartManufacturer = data => createAPI(`/plm/partInformation/addPartManufacturer`,'post',data)
/**
* 删除物料制造商
*/
// 删除物料制造商
export const deletePartManufacturer = data => createAPI(`/plm/partInformation/deletePartManufacturer`,'post',data)
/**
* 删除物料制造商(单删)
*/
// 删除物料制造商(单删)
export const deleteManufacturer = data => createAPI(`/plm/partInformation/deleteManufacturer`,'post',data)
/**
* 获取库位列表
*/
// 获取库位列表
export const getLocationList = data => createAPI(`/plm/partInformation/getLocationList`,'post',data)
/**
* 获取材料库位
*/
// 获取材料库位
export const getDefaultLocation = data => createAPI(`/plm/partInformation/getDefaultLocation`,'post',data)
/**
* 根据条件查询可选库位
*/
// 根据条件查询可选库位
export const getLocationListBy = data => createAPI(`/plm/partInformation/getLocationListBy`,'post',data)
/**
* 新增物料库位
* @param data
*/
// 新增物料库位
export const addDefaultLocation = data => createAPI(`/plm/partInformation/addDefaultLocation`,'post',data)
/**
@ -161,8 +85,6 @@ export const deleteDefaultLocation = data => createAPI(`/plm/partInformation/del
*/
export const deleteLocation = data => createAPI(`/plm/partInformation/deleteLocation`,'post',data)
/**
* 修改物料属性值
*/
@ -268,7 +190,6 @@ export const addProjectPart2 = data => createAPI(`/plm/partInformation/addProjec
*/
export const getChangeRecordByPartNo = data => createAPI(`/plm/partInformation/getChangeRecordByPartNo`,'post',data)
/**
* 查询变更记录
*/
@ -313,3 +234,5 @@ export const getPartCharacteristicList = data => createAPI(`/plm/partInformation
export const partInformationEdit2 = data => createAPI(`/plm/partInformation/partInformationEdit2`,'post',data)
export const locationInformationSearch = data => createAPI(`/plm/partInformation/locationInformationSearch`,'post',data)
export const queryOfficialPartList = data => createAPI(`/plm/partInformation/queryOfficialPartList`,'post',data)

2
src/views/modules/customer/customerInformationManagement.vue

@ -75,7 +75,7 @@
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="isAuth('101001001:update')" @click="updateModal(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" @click="detailModal(scope.row)">详情</el-link>
</template>
</el-table-column>

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

@ -156,7 +156,10 @@
<el-button type="primary" @click="toCopyPartModal">Copy</el-button>
</el-form-item>
<el-form-item v-if="modalData.flag === '3'" label="IFS物料编码" prop="ifsPartNo" :rules="[{required: true,message: ' ',trigger: ['blur','change']}]" style="margin-left: -10px">
<el-input v-model="modalData.ifsPartNo" clearable style="width: 330px"></el-input>
<el-input v-model="modalData.ifsPartNo" clearable style="width: 130px"></el-input>
</el-form-item>
<el-form-item v-if="modalData.flag === '3'" :label="' '">
<el-button type="primary" @click="toCopyPartModal">Copy</el-button>
</el-form-item>
<el-form-item v-if="modalData.flag === '3'" :label="' '">
<el-button type="primary" @click="nextPartNo">Next Part No</el-button>
@ -1412,13 +1415,23 @@
<el-dialog title="Copy Part" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="480px">
<fieldset style="width: 456px">
<legend>Part No To Copy</legend>
<el-form :inline="true" label-position="top" style="margin-left: 7px">
<el-form v-if="modalData.flag === '3'" :inline="true" label-position="top" style="margin-left: 7px">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="queryPartModal"><a>From Part</a></span>
<el-input v-model="copyPartData.fromPartNo" readonly style="width: 135px"></el-input>
<el-input v-model="copyPartData.fromPartDesc" readonly style="width: 200px"></el-input>
</el-form-item>
<el-form-item label="From Site">
<el-input v-model="copyPartData.fromPartSite" readonly style="width: 60px"></el-input>
</el-form-item>
</el-form>
<el-form v-else :inline="true" label-position="top" style="margin-left: 7px">
<el-form-item label="From Part">
<el-input v-model="modalData.partNo" readonly style="width: 135px"></el-input>
<el-input v-model="modalData.partDesc" readonly style="width: 200px"></el-input>
<el-input v-model="copyPartData.fromPartNo" readonly style="width: 135px"></el-input>
<el-input v-model="copyPartData.fromPartDesc" readonly style="width: 200px"></el-input>
</el-form-item>
<el-form-item label="From Site">
<el-input v-model="modalData.site" readonly style="width: 60px"></el-input>
<el-input v-model="copyPartData.fromPartSite" readonly style="width: 60px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px">
@ -1509,6 +1522,57 @@
</el-footer>
</el-dialog>
<!-- 子明细物料模态框 -->
<el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="fromPartModelFlag" width="940px">
<el-form :inline="true" label-position="top" :model="fromPartData">
<el-form-item label="物料编码">
<el-input v-model="fromPartData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="fromPartData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="queryFromPartList">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="250"
:data="fromPartList"
@row-dblclick="getFromRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in fromPartColumnList" :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: 5px"
@size-change="sizeChangeHandle2"
@current-change="currentChangeHandle2"
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:35px;margin-top:10px;text-align:center">
<el-button type="primary" @click="fromPartModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -1522,6 +1586,7 @@
<script>
import {
partInformationSearch, //
partInformationSearch2,
partInformationSave, //
partInformationEdit, //
partInformationDelete, //
@ -1568,6 +1633,7 @@
getItemListByCodeNo, //
getItemExclusionAlreadyExists, //
getPartCharacteristicList, //
queryOfficialPartList, //
} from '@/api/part/partInformation.js'
import {
getFileContentList, //
@ -1618,7 +1684,6 @@
this.modalData.ifsPartNo = this.modalData.ifsPartNo.toUpperCase()
}
},
itemData: {
deep: true,
handler: function (newV, oldV) {
@ -1664,6 +1729,9 @@
pageIndex: 1,
pageSize: 50,
totalPage: 0,
pageIndex2: 1,
pageSize2: 50,
totalPage2: 0,
locationPageIndex: 1,
locationPageSize: 50,
locationTotalPage: 0,
@ -1856,7 +1924,19 @@
copySPLanguageDescription: '',
previousVersion: {},
createBy: '',
ifsPartNo: ''
ifsPartNo: '',
fromPartSite: '',
fromPartNo: '',
fromPartDesc: '',
copyFlag: ''
},
fromPartData: {
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
status: '',
page: 1,
limit: 10
},
// ======== ========
dataList: [],
@ -1896,6 +1976,7 @@
copyAttributeList: [],
fileList: [],
characteristicList: [],
fromPartList: [],
// ======== ========
columnList: [
{
@ -3197,6 +3278,85 @@
columnWidth: 60,
},
],
fromPartColumnList: [
{
columnProp: 'partNo',
headerAlign: "center",
align: "center",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 120
},
{
columnProp: 'partDesc',
headerAlign: "center",
align: "left",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 200
},
{
columnProp: 'familyName',
headerAlign: "center",
align: "center",
columnLabel: '物料分类',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
columnProp: 'printUnit',
headerAlign: "center",
align: "left",
columnLabel: '计量单位',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
columnProp: 'spec',
headerAlign: "center",
align: "left",
columnLabel: '规格型号',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
columnProp: 'partType',
headerAlign: "center",
align: "center",
columnLabel: '零件类型',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 130
},
{
columnProp: 'partStatusDesc',
headerAlign: "center",
align: "left",
columnLabel: '零件状态',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 120
}
],
// ======== ========
rules: {
partNo: [
@ -3312,7 +3472,8 @@
copyPartModelFlag: false,
attributeDialog: true,
uploadDialog: false,
saveItemModelFlag: false
saveItemModelFlag: false,
fromPartModelFlag: false
}
},
@ -3331,8 +3492,8 @@
activated() {
if (this.$route.params.partNo) {
this.searchData.partNo = this.$route.params.partNo
this.getDataList2()
}
this.getDataList()
},
methods: {
@ -3588,9 +3749,7 @@
}
},
/**
* 编辑物料属性
*/
//
updateItemValue () {
this.loading = true
let tempData = {
@ -3789,6 +3948,17 @@
this.locationPageIndex = val
this.getLocationList()
},
//
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.queryFromPartList()
},
//
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.queryFromPartList()
},
// ======== ========
//
@ -3932,6 +4102,32 @@
this.partClickRow(this.dataList[0])
} else {
this.partCurrentRow = {}
this.refreshCurrentTabTable()
}
}
})
},
// IFS
getDataList2 () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
partInformationSearch2(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
this.$refs.selectDiv.setLengthAll( this.dataList.length)
//
if (this.dataList.length > 0) {
//
this.$refs.partTable.setCurrentRow(this.dataList[0])
this.partClickRow(this.dataList[0])
this.searchData.partNo = this.dataList[0].partNo
} else {
this.partCurrentRow = {}
this.refreshCurrentTabTable()
}
}
})
@ -4413,7 +4609,6 @@
})
}
})
}).catch(() => {
})
},
@ -4883,13 +5078,25 @@
copySPLanguageDescription: 'Y',
previousVersion: this.modalData,
createBy: this.$store.state.user.name,
ifsPartNo: ''
ifsPartNo: '',
fromPartSite: this.modalData.site,
fromPartNo: this.modalData.partNo,
fromPartDesc: this.modalData.partDesc,
copyFlag: ''
}
this.copyPartModelFlag = true
},
//
copyPart () {
if (this.copyPartData.fromPartSite === '' || this.copyPartData.fromPartSite == null) {
this.$message.warning('From Site 不能为空!')
return
}
if (this.copyPartData.fromPartNo === '' || this.copyPartData.fromPartNo == null) {
this.$message.warning('From Part 不能为空!')
return
}
if (this.copyPartData.partNo === '' || this.copyPartData.partNo == null) {
this.$message.warning('请输入物料编码!')
return
@ -4902,11 +5109,17 @@
this.$message.warning('General信息必选!')
return
}
if (this.modalData.flag === '3') { // copyPart
this.copyPartData.copyFlag = 'Y'
}
this.copyLoading = true
copyPart(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.copyPartModelFlag = false
if (this.modalData.flag === '3') {
this.modalFlag = false
}
this.$message({
message: '操作成功',
type: 'success',
@ -5337,6 +5550,45 @@
})
},
//
queryPartModal () {
this.fromPartData.limit = this.pageSize2
this.fromPartData.page = this.pageIndex2
queryOfficialPartList(this.fromPartData).then(({data}) => {
if (data && data.code === 0) {
this.fromPartList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.fromPartModelFlag = true
} else {
this.fromPartList = []
}
})
},
queryFromPartList () {
this.fromPartData.limit = this.pageSize2
this.fromPartData.page = this.pageIndex2
queryOfficialPartList(this.fromPartData).then(({data}) => {
if (data && data.code === 0) {
this.fromPartList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
} else {
this.fromPartList = []
}
})
},
//
getFromRowData (row) {
this.copyPartData.fromPartNo = row.partNo
this.copyPartData.fromPartDesc = row.partDesc
this.fromPartModelFlag = false
},
// ======== ========
//
getFileContentData () {

Loading…
Cancel
Save