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){
this.modalData = {
flag: '2',
site: this.$store.state.user.site,
site: row.site,
itemNo: row.itemNo,
itemDesc: row.itemDesc,
valueTypeDb: row.valueTypeDb,

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

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

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

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

Loading…
Cancel
Save