Browse Source

2025-01-22

优化
master
fengyuan_yang 1 year ago
parent
commit
6af4ae31ae
  1. 2
      src/views/modules/base/propertiesItem/propertiesItem.vue
  2. 3
      src/views/modules/base/propertiesItem/propertiesModel.vue
  3. 127
      src/views/modules/part/partCatalogInformation.vue

2
src/views/modules/base/propertiesItem/propertiesItem.vue

@ -666,7 +666,7 @@
updateModal(row){ updateModal(row){
this.modalData = { this.modalData = {
flag: '2', flag: '2',
site: this.$store.state.user.site,
site: row.site,
itemNo: row.itemNo, itemNo: row.itemNo,
itemDesc: row.itemDesc, itemDesc: row.itemDesc,
valueTypeDb: row.valueTypeDb, valueTypeDb: row.valueTypeDb,

3
src/views/modules/base/propertiesItem/propertiesModel.vue

@ -1100,7 +1100,7 @@ export default {
updateModal(row) { updateModal(row) {
this.modalData = { this.modalData = {
site: this.$store.state.user.site,
site: row.site,
flag: '2', flag: '2',
codeNo: row.codeNo, codeNo: row.codeNo,
codeDesc: row.codeDesc, codeDesc: row.codeDesc,
@ -1211,6 +1211,7 @@ export default {
}, },
// //
detailModal(row) { detailModal(row) {
this.detailData.site = row.site
this.detailData.codeNo = row.codeNo this.detailData.codeNo = row.codeNo
this.detailData.codeDesc = row.codeDesc this.detailData.codeDesc = row.codeDesc
this.detailData.functionType = row.functionType this.detailData.functionType = row.functionType

127
src/views/modules/part/partCatalogInformation.vue

@ -44,7 +44,6 @@
type="selection" type="selection"
header-align="center" header-align="center"
align="center" align="center"
:selectable="selectFlag"
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -342,7 +341,6 @@
type="selection" type="selection"
header-align="center" header-align="center"
align="center" align="center"
:selectable="selectFlag"
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -384,7 +382,6 @@
type="selection" type="selection"
header-align="center" header-align="center"
align="center" align="center"
:selectable="selectFlag"
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -490,6 +487,7 @@
// ======== ======== // ======== ========
modalData: { modalData: {
flag: '', flag: '',
site: '',
title: '', title: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
@ -1153,9 +1151,7 @@
} }
}, },
/**
* 编辑物料属性
*/
//
updateItemValue () { updateItemValue () {
this.loading = true this.loading = true
let tempData = { let tempData = {
@ -1183,9 +1179,7 @@
}) })
}, },
/**
* 新增/删除物料属性
*/
// /
addOrDelItem () { addOrDelItem () {
if (!this.attributeDialog) { if (!this.attributeDialog) {
this.$message.warning('请保存更改!') this.$message.warning('请保存更改!')
@ -1207,20 +1201,25 @@
}) })
this.fastAddFlag = true this.fastAddFlag = true
}, },
// //
itemClickRow1 (row) { itemClickRow1 (row) {
this.$refs.itemTable1.toggleRowSelection(row) this.$refs.itemTable1.toggleRowSelection(row)
}, },
// //
itemClickRow2 (row) { itemClickRow2 (row) {
this.$refs.itemTable2.toggleRowSelection(row) this.$refs.itemTable2.toggleRowSelection(row)
}, },
selectionItem1 (val) { selectionItem1 (val) {
this.itemSelections1 = val this.itemSelections1 = val
}, },
selectionItem2 (val) { selectionItem2 (val) {
this.itemSelections2 = val this.itemSelections2 = val
}, },
// //
addItem () { addItem () {
if (this.itemSelections1 == null || this.itemSelections1.length === 0) { if (this.itemSelections1 == null || this.itemSelections1.length === 0) {
@ -1250,6 +1249,7 @@
} }
}) })
}, },
// //
deleteItem () { deleteItem () {
if (this.itemSelections2 == null || this.itemSelections2.length === 0) { if (this.itemSelections2 == null || this.itemSelections2.length === 0) {
@ -1281,6 +1281,7 @@
} }
}) })
}, },
// //
queryMasterPartItem () { queryMasterPartItem () {
this.itemData.partNo = this.partCurrentRow.partNo this.itemData.partNo = this.partCurrentRow.partNo
@ -1319,46 +1320,27 @@
}, },
// ======== ======== // ======== ========
/**
* 每页数
* @param val
*/
//
sizeChangeHandle (val) { sizeChangeHandle (val) {
this.pageSize = val this.pageSize = val
this.pageIndex = 1 this.pageIndex = 1
this.getDataList() this.getDataList()
}, },
/**
* 当前页
* @param val
*/
//
currentChangeHandle (val) { currentChangeHandle (val) {
this.pageIndex = val this.pageIndex = val
this.getDataList() this.getDataList()
}, },
// ======== ======== // ======== ========
/**
* 未知
* @returns {boolean}
*/
selectFlag () {
return true
},
/**
* 列表表格选择替换
* @param tab
* @param event
*/
//
tabClick (tab, event) { tabClick (tab, event) {
// //
this.refreshCurrentTabTable() this.refreshCurrentTabTable()
}, },
/**
* 当前值发生变化的时候修改
* @param row
* @param oldRow
*/
//
changeCurrentRow (row, oldRow) { changeCurrentRow (row, oldRow) {
// //
if (row) { if (row) {
@ -1367,9 +1349,8 @@
this.refreshCurrentTabTable() this.refreshCurrentTabTable()
} }
}, },
/**
* 刷新页签的table数据
*/
// table
refreshCurrentTabTable () { refreshCurrentTabTable () {
if (this.activeTable === 'part_item') { if (this.activeTable === 'part_item') {
this.getMasterPartItem() this.getMasterPartItem()
@ -1377,9 +1358,7 @@
}, },
// ======== ======== // ======== ========
/**
* 查询物料属性
*/
//
getMasterPartItem () { getMasterPartItem () {
let tempData = { let tempData = {
site: '*', site: '*',
@ -1395,10 +1374,9 @@
} }
}) })
}, },
// ======== ======== // ======== ========
/**
* 获取数据列表
*/
//
getDataList () { getDataList () {
this.searchData.site = this.$store.state.user.site this.searchData.site = this.$store.state.user.site
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
@ -1425,14 +1403,13 @@
}, },
// ======== / ======== // ======== / ========
/**
* 物料信息新增模态框
*/
//
addModal () { addModal () {
getProjectPartNo(this.searchData).then(({data}) => { getProjectPartNo(this.searchData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.modalData = { this.modalData = {
flag: '1', flag: '1',
site: '*',
title: '物料新增', title: '物料新增',
partNo: data.partNo, partNo: data.partNo,
partDesc: '', partDesc: '',
@ -1462,12 +1439,9 @@
this.$message.error(data.msg) this.$message.error(data.msg)
} }
}) })
}, },
/**
* 物料信息编辑模态框
* @param row
*/
//
updateModal (row) { updateModal (row) {
this.modalData = { this.modalData = {
flag: '2', flag: '2',
@ -1498,20 +1472,9 @@
this.modalDisableFlag = true this.modalDisableFlag = true
this.modalFlag = true this.modalFlag = true
}, },
/**
* 返回列表唯一值
* @param row
* @returns {string|[{trigger: string, message: string, required: boolean}]|*}
*/
getRowKeys (row) {
// id
return row.agentId
},
// ======== // ======== // ======== // ========
/**
* 物料信息新增/编辑
*/
// /
saveData () { saveData () {
if (this.modalData.partNo === '' || this.modalData.partNo == null) { if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请填写物料编码!') this.$message.warning('请填写物料编码!')
@ -1525,10 +1488,6 @@
this.$message.warning('请选择计量单位!') this.$message.warning('请选择计量单位!')
return return
} }
// if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
// this.$message.warning('')
// return
// }
if (this.modalData.flag === '1') { if (this.modalData.flag === '1') {
masterPartInformationSave(this.modalData).then(({data}) => { masterPartInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -1565,9 +1524,8 @@
}) })
} }
}, },
/**
* 物料信息删除
*/
//
delModal () { delModal () {
if (this.partSelections.length === 0) { if (this.partSelections.length === 0) {
this.$message.warning('请勾选要删除的物料信息!') this.$message.warning('请勾选要删除的物料信息!')
@ -1597,23 +1555,17 @@
}) })
} }
}) })
}).catch(() => {
}) })
}, },
// ======== ======== // ======== ========
/**
* 单机选中物料信息
* @param row
*/
//
partClickRow (row) { partClickRow (row) {
// this.$refs.partTable.toggleRowSelection(row) // this.$refs.partTable.toggleRowSelection(row)
this.partCurrentRow = JSON.parse(JSON.stringify(row)) this.partCurrentRow = JSON.parse(JSON.stringify(row))
}, },
/**
* 复选物料信息
* @param val
*/
//
selectionPart (val) { selectionPart (val) {
this.partSelections = val this.partSelections = val
this.$refs.selectDiv.setLengthselected(this.partSelections.length) this.$refs.selectDiv.setLengthselected(this.partSelections.length)
@ -1640,11 +1592,7 @@
}, },
// ======== chooseList ======== // ======== chooseList ========
/**
* 获取基础数据列表S
* @param val
* @param type
*/
// S
getBaseList (val, type) { getBaseList (val, type) {
this.tagNo = val this.tagNo = val
this.tempCodeNo = this.modalData.codeNo this.tempCodeNo = this.modalData.codeNo
@ -1660,10 +1608,8 @@
this.$refs.baseList.init(val, strVal) this.$refs.baseList.init(val, strVal)
}) })
}, },
/**
* 列表方法的回调
* @param val
*/
//
getBaseData (val) { getBaseData (val) {
if (this.tagNo === 1007) { if (this.tagNo === 1007) {
this.modalData.umId = val.um_id this.modalData.umId = val.um_id
@ -1751,11 +1697,8 @@
this.modalData.codeDesc = '' this.modalData.codeDesc = ''
}, },
// ======== ======== // ======== ========
/**
* 导出excel
*/
// excel
async createExportData () { async createExportData () {
this.searchData.limit = -1 this.searchData.limit = -1
this.searchData.page = 1 this.searchData.page = 1

Loading…
Cancel
Save