|
@@ -20,6 +20,21 @@
|
|
|
<el-tag v-else type="info">未绑定</el-tag>
|
|
|
</template>
|
|
|
|
|
|
+ <template #productManager-form="{ row }">
|
|
|
+ <el-select
|
|
|
+ v-model="form.productManager"
|
|
|
+ placeholder="产品负责人"
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in userList"
|
|
|
+ :key="item.userName"
|
|
|
+ :label="item.userName"
|
|
|
+ :value="item.userName"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- :disabled="row.usable == '1' ? false : true" -->
|
|
|
<!--<template #menu-right="{}">
|
|
|
<el-dropdown split-button
|
|
@@ -49,6 +64,14 @@
|
|
|
>
|
|
|
<el-button
|
|
|
link
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ v-else
|
|
|
+ @click="showProductManager(row, index)"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
type="danger"
|
|
|
icon="el-icon-edit"
|
|
|
v-if="row.usable === 0"
|
|
@@ -108,6 +131,26 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ v-model="productManagerVisible"
|
|
|
+ title="编辑产品负责人"
|
|
|
+ width="500"
|
|
|
+ align-center
|
|
|
+ >
|
|
|
+ <el-form :model="form" label-width="auto" style="max-width: 800px">
|
|
|
+ <el-form-item label="工艺路线编号" prop="productManager">
|
|
|
+ <el-input v-model="form.productManager" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="productManagerVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="sureToEditProductManager">
|
|
|
+ 确定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
@@ -115,8 +158,8 @@ import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
import { useDictionaryStore } from "@/store";
|
|
|
-import { copyRoute } from "@/api/craft/route/index";
|
|
|
-
|
|
|
+import { copyRoute, editRouteWith } from "@/api/craft/route/index";
|
|
|
+import { getUserList } from "@/api/system/user/index";
|
|
|
// 数据字典相关
|
|
|
const { dicts } = useDictionaryStore();
|
|
|
|
|
@@ -140,9 +183,28 @@ let centerDialogVisible = ref(false);
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
const tmpForm = ref({});
|
|
|
|
|
|
+// 产品负责人相关
|
|
|
+const userList = ref([]);
|
|
|
+const currentPMRow = ref({});
|
|
|
+const productManagerVisible = ref(false);
|
|
|
+const showProductManager = (row, index) => {
|
|
|
+ productManagerVisible.value = true;
|
|
|
+ currentPMRow.value = row;
|
|
|
+ form.value = row;
|
|
|
+};
|
|
|
+const sureToEditProductManager = () => {
|
|
|
+ editRouteWith(currentPMRow.value).then(() => {
|
|
|
+ dataList();
|
|
|
+ productManagerVisible.value = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
// console.log("crudRef", crudRef)
|
|
|
dataList();
|
|
|
+ getUserList({}).then((data) => {
|
|
|
+ userList.value = data.data;
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
/**
|
|
@@ -378,6 +440,19 @@ option.value = Object.assign(option.value, {
|
|
|
disabled: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: "产品负责人",
|
|
|
+ prop: "productManager",
|
|
|
+ width: 120,
|
|
|
+ slot: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "工艺路线类型不能为空",
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "产品型号",
|
|
|
prop: "prodtModel",
|
|
|
overHidden: true,
|