Browse Source

发料

master
ruanqi 2 years ago
parent
commit
75572496dd
  1. 2
      src/api/part/partInformation.js
  2. 31
      src/views/modules/base/partInformation.vue

2
src/api/part/partInformation.js

@ -285,4 +285,4 @@ export const partInformationToOfficial = data => createAPI(`/partInformation/par
export const deletePart = data => createAPI(`/partInformation/deletePart`,'post',data)

31
src/views/modules/base/partInformation.vue

@ -87,6 +87,8 @@
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" @click="deletePart(scope.row)">删除</el-link>
<el-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px">
更多
@ -120,7 +122,7 @@
<el-dialog :title="modalData.title" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1000px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
<el-input v-model="modalData.partNo" style="width: 128px" @blur="queryMasterField" ></el-input>
<el-input v-model="modalData.partNo" style="width: 128px" @blur="queryMasterField" :disabled="modalDisableFlag" ></el-input>
</el-form-item>
<el-form-item label="物料描述" prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px">
<el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
@ -1332,7 +1334,7 @@
addPartManufacturer, // 新增物料制造商
deletePartManufacturer, // 删除物料制造商
deleteManufacturer, // 删除物料制造商(单删)
deletePart,
getLocationList, // 获取库位列表
getDefaultLocation, // 获取物料库位
getLocationListBy, // 根据条件查询可选库位
@ -5014,6 +5016,31 @@
this.modalData.planningMethodDesc = val.planning_method_desc
}
},
deletePart(row){
this.$confirm(`是否删除这个物料?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deletePart(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
// ======== 导出相关方法 ========
/**

Loading…
Cancel
Save