物料台账修改

This commit is contained in:
17630416519 2026-01-13 16:14:27 +08:00
parent 82f9ababce
commit 960407a990

View File

@ -45,11 +45,11 @@
v-if="columns.showColumn('id')" />
<el-table-column prop="fkMaterialTypeCode" label="类别编号" align="center"
v-if="columns.showColumn('type_Code')" />
<el-table-column prop="fkMaterialTypeName" label="类别名称" align="center"
v-if="columns.showColumn('type_Name')" />
<!-- <el-table-column prop="fkMaterialTypeName" label="类别名称" align="center"
v-if="columns.showColumn('type_Name')" /> -->
<el-table-column prop="code" label="物料编码" align="center" :show-overflow-tooltip="true"
v-if="columns.showColumn('code')" />
<el-table-column prop="name" label="物料名称" min-width="300" align="center" :show-overflow-tooltip="true"
<el-table-column prop="name" label="物料名称" align="center" :show-overflow-tooltip="true"
v-if="columns.showColumn('name')" />
<el-table-column prop="specification" label="规格" align="center" :show-overflow-tooltip="true"
v-if="columns.showColumn('specification')" />
@ -57,8 +57,10 @@
v-if="columns.showColumn('unit')" />
<el-table-column label="操作" width="150" align="center">
<template #default="scope">
<el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-button type="success" size="small" icon="edit" title="编辑" v-hasPermi="['business:plantplciopoint:edit']"
@click="handleEdit(scope.row)"></el-button>
<el-button type="danger" size="small" icon="delete" title="删除"
v-hasPermi="['business:plantplciopoint:delete']" @click="handleDelete(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
@ -324,13 +326,26 @@ const state = reactive({
})
const { form, rules, options, single, multiple } = toRefs(state)
function handleDelete(row) {
const Ids = row.id || ids.value
proxy
.$confirm(`是否确认删除数据?`)
.then(function () {
return delBaseMaterialList(Ids)
})
.then(() => {
getList()
proxy.$modal.msgSuccess('删除成功')
WorkOrderLog({ workorder: row.workorder, log: '删除' })
})
}
function submitForm() {
proxy.$refs["formRef"].validate((valid) => {
if (valid) {
if (form.value.id != undefined && opertype.value === 2) {
updateMaterialType(form.value).then((res) => {
updateBaseMaterialList(form.value).then((res) => {
proxy.$modal.msgSuccess("修改成功")
open.value = false
getList()