Browse Source

工具的代码

master
DouDou 1 year ago
parent
commit
352d88b46d
  1. 4
      src/api/tool/tool_info.js
  2. 36
      src/views/modules/tooling/manuf_tool.vue

4
src/api/tool/tool_info.js

@ -5,3 +5,7 @@ export const getToolInfoList = data => createAPI('plm/tool/getToolInfoList', 'PO
// 获取 // 获取
export const getToolInstanceList = data => createAPI('plm/tool/getToolInstanceList', 'POST', data) export const getToolInstanceList = data => createAPI('plm/tool/getToolInstanceList', 'POST', data)
// 删除
export const removeToolInfo = data => createAPI('plm/tool/removeToolInfo', 'POST', data)

36
src/views/modules/tooling/manuf_tool.vue

@ -134,17 +134,12 @@
import { import {
getToolInfoList, // getToolInfoList, //
getToolInstanceList, // getToolInstanceList, //
removeToolInfo,/*删除工具信息*/
} from '@/api/tool/tool_info.js' } from '@/api/tool/tool_info.js'
/*组件*/ /*组件*/
import Chooselist from '@/views/modules/common/Chooselist'; /*选择组件*/ import Chooselist from '@/views/modules/common/Chooselist'; /*选择组件*/
import toolInfoAddUpdate from "./components/com_tool_info_add_update"; /*工具新增和修改组件*/ import toolInfoAddUpdate from "./components/com_tool_info_add_update"; /*工具新增和修改组件*/
import {
deleteProjectFile,
getFileContentList,
downLoadProjectFile,
getProjectUserRole,
} from "@/api/project/project.js"
/*組件*/ /*組件*/
export default { export default {
@ -166,17 +161,6 @@ export default {
startDate:'', startDate:'',
endDate:'', endDate:'',
}, },
modelData:{
site:'',
applyNo:'',
prNo:'',
remark1:'',
poNo:'',
supplierName:'',
allCost:'',
remark2:'',
},
modelFlag:false,
currentRow:{}, currentRow:{},
height: 200, height: 200,
dataList:[], dataList:[],
@ -688,6 +672,24 @@ export default {
}); });
}, },
/*删除工具的确认选项*/
deleteToolInfoConfirm(toolInfo) {
this.$confirm('是否删除工具标识号:'+ toolInfo.toolId+'?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeToolInfo(toolInfo).then(({data}) => {
if (data.code === 200) {
this.$message.success('操作成功!');
this.refreshTooInfoData();
} else {
this.$message.error(data.msg);
}
})
})
},
// //
changeData(row) { changeData(row) {
this.currentRow = JSON.parse(JSON.stringify(row)); this.currentRow = JSON.parse(JSON.stringify(row));

Loading…
Cancel
Save