diff --git a/src/api/knifemold/tool-info.js b/src/api/knifemold/tool-info.js
index f423b18..26277d2 100644
--- a/src/api/knifemold/tool-info.js
+++ b/src/api/knifemold/tool-info.js
@@ -55,3 +55,4 @@ export const itemSaveData = data => createAPI(`toolInfo/itemSaveData`, 'POST', d
export const getItemData = data => createAPI(`toolInfo/getItemData`, 'POST', data)
export const deleteItemModal = data => createAPI(`toolInfo/deleteItemModal`, 'POST', data)
export const checkAssessRecord = data => createAPI(`toolInfo/checkAssessRecord`, 'POST', data)
+export const refreshItemModal = data => createAPI(`toolInfo/refreshItemModal`, 'POST', data)
diff --git a/src/views/modules/knifemold/tool-info.vue b/src/views/modules/knifemold/tool-info.vue
index 0ae5c7e..dcefa6b 100644
--- a/src/views/modules/knifemold/tool-info.vue
+++ b/src/views/modules/knifemold/tool-info.vue
@@ -505,7 +505,8 @@
- 新增
+
+ 刷新属性
编辑
- 删除
@@ -547,12 +547,12 @@
-
- 属性编码
-
+
+
+
-
+
@@ -593,7 +593,7 @@ import {
getItemModal,
itemSaveData,
getItemData,
- deleteItemModal,
+ refreshItemModal,
} from '@/api/knifemold/tool-info.js'
import {printToolData} from '@/api/knifemold/receive.js'
import {searchProcessRouteTool} from '@/api/base/productProcessRoute.js'
@@ -1887,7 +1887,7 @@ export default {
serialNumber: '101013Table2EamPropertiesItemID',
tableId: "101013Table2",
tableName: "点检项目表",
- columnProp: 'toolItemNo',
+ columnProp: 'propertiesItemNo',
headerAlign: "center",
align: "center",
columnLabel: '属性编码',
@@ -1905,7 +1905,7 @@ export default {
serialNumber: '101013Table2EamPropertiesItemDesc',
tableId: "101013Table2",
tableName: "点检项目表",
- columnProp: 'toolItemDesc',
+ columnProp: 'itemDesc',
headerAlign: "center",
align: "center",
columnLabel: '属性名称',
@@ -1976,8 +1976,8 @@ export default {
id:0,
site:'',
toolID:'',
- toolItemNo:'',
- toolItemDesc:'',
+ propertiesItemNo:'',
+ itemDesc:'',
textValue:'',
numValue:'',
},
@@ -2173,11 +2173,11 @@ export default {
if (this.tagNo === 7) {
this.editHeaderData.umid = val.UMID
}
- if (this.tagNo === 1004) {
- this.itemData.toolItemNo = val.ItemNo
- this.itemData.toolItemDesc = val.ItemDesc
- this.changeItemDisable();
- }
+ // if (this.tagNo === 1004) {
+ // this.itemData.itemNo = val.ItemNo
+ // this.itemData.itemDesc = val.ItemDesc
+ // this.changeItemDisable();
+ // }
},
// 获取基础数据列表
getBaseList(val, number) {
@@ -2191,12 +2191,12 @@ export default {
if (val === 70) {
strVal = this.headerData.toolId
}
- if (val === 1004) {
- if(this.itemModalDisableFlag){
- return false
- }
- strVal = this.itemData.toolItemNo
- }
+ // if (val === 1004) {
+ // if(this.itemModalDisableFlag){
+ // return false
+ // }
+ // strVal = this.itemData.itemNo
+ // }
if (val === 23) {
strVal = this.editHeaderData.familyId
}
@@ -2426,7 +2426,6 @@ export default {
},
// 属性模板
searchItemList(){
- debugger
this.itemModalData.site=this.headerData.site
this.itemModalData.toolID=this.headerData.toolId
getItemModal(this.itemModalData).then(({data}) => {
@@ -2437,29 +2436,14 @@ export default {
this.searchItemList();
this.toolItemModelFlag=true;
},
- addItemModal(){
- this.itemData={
- id:0,
- site:this.headerData.site,
- toolID:this.headerData.toolId,
- toolItemNo:'',
- toolItemDesc:'',
- textValue:'',
- numValue:null,
- }
- this.itemTextDisableFlag=true
- this.itemNumberDisableFlag=true
- this.itemModalDisableFlag=false
- this.itemModalFlag=true;
- },
itemSaveData(){
- if(this.itemData.toolID==''||this.itemData.toolID==null){
+ if(this.itemData.partNo==''||this.itemData.partNo==null){
this.$alert('未选择工具!', '错误', {
confirmButtonText: '确定'
})
return false
}
- if(this.itemData.toolItemNo==''||this.itemData.toolItemNo==null){
+ if(this.itemData.propertiesItemNo==''||this.itemData.propertiesItemNo==null){
this.$alert('未选择属性!', '错误', {
confirmButtonText: '确定'
})
@@ -2488,9 +2472,9 @@ export default {
this.itemData={
id:1,
site:row.site,
- toolID:row.toolID,
- toolItemNo:row.toolItemNo,
- toolItemDesc:row.toolItemDesc,
+ partNo:row.partNo,
+ propertiesItemNo:row.propertiesItemNo,
+ itemDesc:row.itemDesc,
textValue:row.textValue,
numValue:row.numValue,
}
@@ -2504,26 +2488,9 @@ export default {
this.itemModalDisableFlag=true
this.itemModalFlag=true;
},
- deleteItemModal(row){
- this.$confirm('确定进行删除操作?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- // 删除工具主记录
- deleteItemModal(row).then(({data}) => {
- if (data.code === 0) {
- this.searchItemList();
- this.$message.success(data.msg)
- } else {
- this.$message.warning(data.msg)
- }
- })
- })
- },
changeItemDisable(){
let inData={
- toolItemNo:this.itemData.toolItemNo
+ itemNo:this.itemData.itemNo
}
getItemData(inData).then(({data}) => {
if (data && data.code === 0) {
@@ -2537,6 +2504,29 @@ export default {
}
})
},
+ refreshItemModal(){
+ let inData={
+ site:this.itemModalData.site,
+ toolId:this.itemModalData.toolID
+ }
+ refreshItemModal(inData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.searchItemList();
+ this.$message({
+ message: '刷新成功',
+ type: 'success',
+ duration: 1500,
+
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
}
}