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="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link> <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-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px"> <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-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 :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNo"> <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>
<el-form-item label="物料描述" prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px"> <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> <el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
@ -1332,7 +1334,7 @@
addPartManufacturer, // addPartManufacturer, //
deletePartManufacturer, // deletePartManufacturer, //
deleteManufacturer, // () deleteManufacturer, // ()
deletePart,
getLocationList, // getLocationList, //
getDefaultLocation, // getDefaultLocation, //
getLocationListBy, // getLocationListBy, //
@ -5014,6 +5016,31 @@
this.modalData.planningMethodDesc = val.planning_method_desc 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