Browse Source

Merge branch 'master' of http://192.168.101.4:3000/jiaxiaoqiang/JG-ADMIN-TEMP

jiaxiaoqiang 11 months ago
parent
commit
256fdf8688

+ 18 - 0
src/api/inStock/index.ts

@@ -0,0 +1,18 @@
+import request from "@/utils/request";
+import { AxiosPromise } from "axios";
+
+/**
+ * 成品物料新增入库记录
+ *
+ * @param id
+ * @param data
+ */
+export function addStock(data: Object): AxiosPromise<any> {
+  return request({
+    url: "/api/v1/plan/seq/in/stock/add",
+    method: "post",
+    data:data,
+  });
+}
+
+

+ 9 - 1
src/common/configs/dictDataUtil.ts

@@ -61,7 +61,15 @@ const DictDataUtil = {
     requisition_state:"requisition_state",
     //委外状态
     outsource_state: "outsource_state",
-    work_order_seq_state: "work_order_seq_state"
+    work_order_seq_state: "work_order_seq_state",
+    //报故状态
+    escalation_fault_state:"escalation_fault_state",
+    //报故追踪状态状态
+    fault_current_state:"fault_current_state",
+
+    defect_mana:"defect_mana",
+
+
   },
   EXPAND_FIELD_TABLE: {
     //字段类型

+ 0 - 51
src/views/base/bom/columns.ts

@@ -1,51 +0,0 @@
-import { useDictionaryStoreHook } from "../../../store/index";
-const { dicts } = useDictionaryStoreHook();
-export const columns = [
-
-  {
-    label: "物料编码",
-    prop: "materialCode",
-    hide:true
-  },
-
-  {
-    label: "物料名称",
-    prop: "materialName",
-    overHidden:true,
-    hide:true
-  },
-
-  {
-    label: "物料编码",
-    prop: "bomMaterialCode",
-  },
-  {
-    label: "物料名称",
-    prop: "bomMaterialName",
-    overHidden:true,
-  },
-  {
-    label: "物料属性",
-    prop: "bomMaterialAttribute",
-    type: 'select',
-    dicData:dicts.material_properties,
-    props: { label: "dictLabel", value: "dictValue" },
-  },
-  {
-    label: "物料数量",
-    prop: "bomMaterialNumber",
-    min:0,
-    slot:true,
-    cell: true,
-    type: "number",
-    precision: 2,
-  },
-  {
-    label: "版本号",
-    prop: "bomVersion",
-    type: "number",
-    precision: 1,
-  },
-
-
-];

+ 52 - 2
src/views/base/bom/index.vue

@@ -110,7 +110,6 @@
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "../../../hooks/userCrud";
 import ButtonPermKeys from "../../../common/configs/buttonPermission";
-import { columns } from "./columns";
 import { useCommonStoreHook, useDictionaryStoreHook } from "../../../store/index";
 
 import {
@@ -154,7 +153,9 @@ const version=ref({
     label: '请选择BOM版本',
 });
 const options=ref([]);
+const dataDict=dicts.value;
 const dataBomLists=()=>{
+
   search.value.materialCode=route.params.materialCode;
   dataNoPageList();
 }
@@ -227,6 +228,7 @@ const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 onMounted(() => {
   // console.log("crudRef", crudRef)
+  console.info("1111",dicts);
   getBomVersion(route.params.materialCode).then(
     (data)=>{
       version.value.value=data.data;
@@ -267,7 +269,55 @@ option.value = Object.assign(option.value, {
   editBtn:false,
   saveBtn:false,
   cellBtn: true,
-  column: columns,
+  column: [
+
+    {
+      label: "物料编码",
+      prop: "materialCode",
+      hide:true
+    },
+
+    {
+      label: "物料名称",
+      prop: "materialName",
+      overHidden:true,
+      hide:true
+    },
+
+    {
+      label: "物料编码",
+      prop: "bomMaterialCode",
+    },
+    {
+      label: "物料名称",
+      prop: "bomMaterialName",
+      overHidden:true,
+    },
+    {
+      label: "物料属性",
+      prop: "bomMaterialAttribute",
+      type: 'select',
+      dicData:dicts.material_properties,
+      props: { label: "dictLabel", value: "dictValue" },
+    },
+    {
+      label: "物料数量",
+      prop: "bomMaterialNumber",
+      min:0,
+      slot:true,
+      cell: true,
+      type: "number",
+      precision: 2,
+    },
+    {
+      label: "版本号",
+      prop: "bomVersion",
+      type: "number",
+      precision: 1,
+    },
+
+
+  ],
 });
 const routeBack =()=>{
   router.back();

+ 1 - 1
src/views/base/materials/index.vue

@@ -122,6 +122,7 @@ const binding = (row) => {
   router.push(`/base/bom/${row.materialCode}`);
 };
 onMounted(() => {
+  // 设置表格列或者其他自定义的option
 
     dataList();
 
@@ -142,7 +143,6 @@ const importExcelData = () => {
   }
 };
 
-// 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   selection: true,
   column: [

+ 333 - 0
src/views/base/skill/components/view-skill.vue

@@ -0,0 +1,333 @@
+<template>
+  <div class="mainContentBox">
+    <avue-form
+      ref="formRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data2"
+      :option="option2"
+    >
+    </avue-form>
+    <avue-crud
+      ref="crudRef"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+    >
+
+    </avue-crud>
+    <CommonTable
+      ref="ctableRef"
+      tableTitle="员工选择"
+      tableType="USERS"
+      @selected-sure="onSelectedFinish"
+    />
+  </div>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import ButtonPermKeys from "@/common/configs/buttonPermission";
+import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+import SingleUpload from "@/components/Upload/SingleUpload.vue";
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+import {getPostSkill,addEmployeeSkill,getSkillDetail} from "@/api/system/skill";
+// 数据字典相关
+const { dicts } = useDictionaryStoreHook();
+
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
+const data3=ref([]);
+const data2=ref(null);
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/sys/skillScore",
+  });
+const { dataList, createRow, updateRow, deleteRow, searchChange, dataNoPageList } =
+  Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+// checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
+// const permission = reactive({
+//   delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
+//   addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
+//   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
+//   menu: true,
+// });
+const option2=ref(null);
+const ctableRef = ref(null); //crudRef.value 获取avue-crud对象
+const router = useRouter();
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  getSkillDetail(props.skillId).then(
+    (data)=>{
+      form.value=data.data;
+    }
+  )
+  search.value.employeeSkillId=props.skillId;
+  dataNoPageList();
+
+
+
+});
+
+const skillChange=(row)=>{
+  if(skillValue.value!==undefined&&skillValue.value!==null&&skillValue.value!==""){
+    data.value[row.$index].skillDictValue=skillValue.value;
+  }
+}
+const cancelWindow=()=>{
+  props.viewDialog.visible=false;
+}
+const addSkill = () => {
+  const bom=ref({
+    $cellEdit:true,
+  });
+  data.value.push(bom.value);
+};
+const employeeSkill=ref({});
+const onHandle=()=>{
+  console.info(form.value);
+  if(form.value.userId===null||form.value.userId===undefined||form.value.userId===""){
+    ElMessage({
+      message: "未选择打分用户",
+      type: "error",
+    });
+    return false;
+  }
+  if(form.value.postId===null||form.value.postId===undefined||form.value.postId===""){
+    ElMessage({
+      message: "未选择岗位",
+      type: "error",
+    });
+    return false;
+  }
+  if(data.value.length===0){
+    ElMessage({
+      message: "没有要保存的打分项",
+      type: "error",
+    });
+    return false;
+  }
+  if(data.value.length>0){
+    for(let i=0;i<data.value.length;i++){
+      if(data.value[i].skillDictValue===undefined||data.value[i].skillDictValue===null||data.value[i].skillDictValue===""){
+        ElMessage({
+          message: "第"+(i+1)+"项没有选择技能",
+          type: "error",
+        });
+        return false;
+      }
+      if(data.value[i].score===undefined||data.value[i].score===null||data.value[i].score===""){
+        ElMessage({
+          message: "第"+(i+1)+"项没有打分",
+          type: "error",
+        });
+        return false;
+      }
+    }
+  }
+  employeeSkill.value.userId=form.value.userId;
+  employeeSkill.value.postId=form.value.postId;
+  employeeSkill.value.skillList=Array.from(data.value);
+  employeeSkill.value.id=form.value.id;
+  addEmployeeSkill(employeeSkill.value).then(
+    (data)=>{
+      if(data.code==="200") {
+        ElMessage({
+          message: data.msg,
+          type: "success",
+        });
+        props.viewDialog.visible=false;
+      }
+      else {
+        ElMessage({
+          message: data.msg,
+          type: "error",
+        });
+      }
+    }
+  )
+
+}
+// 设置表格列或者其他自定义的option
+option2.value = {
+  selection: true,
+  submitBtn:false,
+  clearAbleBtn:false,
+  emptyBtn:false,
+  delBtn:false,
+  menu:false,
+  column: [
+    { label: "id", prop: "id", width: 130,overHidden: true,search: true ,
+      filterable: true,
+      width: 100,overHidden: true,
+      disabled:false,
+      display:false,
+
+    },
+
+    { label: "用户id", prop: "userId", width: 130,overHidden: true,search: true ,
+      filterable: true,
+      width: 100,overHidden: true,
+      disabled:true,
+      display:false,
+
+    },
+    { label: "用户名", prop: "userName",disabled:true, width: 140,overHidden: true,search: true },
+    { label: "所属机构", prop: "institution", width: 130,overHidden: true,search: true ,
+      filterable: true,
+      width: 100,overHidden: true,
+      disabled:true,
+
+    },
+    {
+      label: "员工编号",
+      prop: "employeeCode",
+      search: true,
+      disabled:true,
+    },
+    { label: "岗位", prop: "postName",
+      search: true,
+      filterable: true,
+      overHidden: true,
+      disabled:true,
+      dicUrl:dictDataUtil.post_list_url,
+      dicMethod:"post",
+      change:({ value, column })=>{
+       if(value!==undefined) {
+         props.postId = value;
+         skillValue.value=null;
+         optionSkill.value=null;
+         dataNoPageList();
+       }
+      },
+      props: { label: "postName", value: "id" },
+
+    },
+    { label: "部门", prop: "deptName", overHidden: true,
+      disabled:true, },
+
+  ],
+};
+const postIdValue=ref({});
+
+const props = defineProps({
+  viewDialog:{
+    type:Object,
+    default:()=>{
+      return {};
+    }
+  },
+  skillId:{
+    type:String,
+    default:()=>{
+      return "0";
+    }
+  },
+  postId:{
+    type:Number,
+    default:()=>{
+      return "0";
+    }
+  }
+
+})
+const postIdSkill=ref({});
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value,{
+  selection: false,
+  addBtn: false,
+  viewBtn: false,
+  editBtn:false,
+  saveBtn:false,
+  delBtn:false,
+  menu:false,
+
+  cellBtn: true,
+  column: [{
+    label: "技能",
+    prop: "skillDictValue",
+    align: 'center',
+    headerAlign: 'center',
+    span:24,
+    cell: true,
+    type: 'select',
+    dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/postSkill/list/"+props.postId,
+    props: {
+      label: "skillDictLabel", // 下拉菜单显示的字段
+      value: "skillDictValue", // 下拉菜单值的字段
+    },
+  },
+    {
+      label: "分数",
+      prop: "score",
+      align: 'center',
+      headerAlign: 'center',
+      cell: true,
+      type:"number",
+      precision: 2,
+      max:100,
+      min:0,
+      span:24,
+    },],
+});
+const onSelectedFinish=(selectedValue)=>{
+  form.value.userId=selectedValue.id;
+
+  form.value.userName=selectedValue.userName;
+  form.value.deptName=selectedValue.deptName;
+  form.value.employeeCode=selectedValue.employeeCode;
+  form.value.institution=selectedValue.institution;
+
+}
+const skillValue=ref(null);
+const optionSkill=ref([]);
+const getPostSkills=()=>{
+  if(postIdValue.value===undefined||postIdValue.value===null||postIdValue.value===""){
+    ElMessage({
+      message: "未选择岗位",
+      type: "error",
+    });
+    return false;
+  }
+  getPostSkill(postIdValue.value).then(
+    (data)=>{
+      optionSkill.value=Array.from(data.data);
+    }
+  )
+}
+
+</script>
+<style type="text/css">
+  .title-detail{
+    width: 30%;
+    height: 50px;
+    line-height: 50px;
+    margin: 25px 20px 25px 0;
+    float: left;
+  }
+  .detail{
+    margin: 0 auto;
+    width: 100%;
+  }
+  .avue-crud{
+    float: left;
+  }
+  .detail-footer{
+    float: right;
+    margin-top:15px;
+  }
+  .el-select__selection{
+    width: 150px;
+  }
+
+</style>

+ 28 - 3
src/views/base/skill/index.vue

@@ -37,8 +37,14 @@
                      text
                      type="primary"
           >编辑</el-button>
+          <el-button @click="viewSkills(row)"
+                     icon="el-icon-view"
+                     text
+                     type="primary"
+          >查看</el-button>
         </template>
 
+
     </avue-crud>
     <el-dialog
       v-model="dialog.visible"
@@ -59,6 +65,15 @@
     >
       <editSkill   :editDialog="editDialog" :skillId="editUser.id" :postId="editUser.postId"/>
     </el-dialog>
+    <el-dialog
+      v-model="viewDialog.visible"
+      :title="viewDialog.title"
+      width="800px"
+      :destroy-on-close="true"
+      @close="viewDialog.visible=false"
+    >
+      <viewSkill   :viewDialog="viewDialog" :skillId="viewUser.id" :postId="viewUser.postId"/>
+    </el-dialog>
   </div>
 </template>
 <script setup>
@@ -68,6 +83,7 @@ import ButtonPermKeys from "@/common/configs/buttonPermission";
 import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 import editSkill from "@/views/base/skill/components/edit-skill.vue"
+import viewSkill from "@/views/base/skill/components/view-skill.vue"
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
 // 数据字典相关
 const { dicts } = useDictionaryStoreHook();
@@ -85,6 +101,11 @@ const editDialog = reactive({
   title: "编辑",
   visible: false,
 });
+
+const viewDialog = reactive({
+  title: "查看",
+  visible: false,
+});
 const editClose=()=>{
   editDialog.visible = false;
   dataList();
@@ -111,9 +132,7 @@ const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等
 
 const ctableRef = ref(null); //crudRef.value 获取avue-crud对象
 const router = useRouter();
-const binding = (row) => {
-  router.push(`/base/bom/${row.materialCode}`);
-};
+
 onMounted(() => {
   // console.log("crudRef", crudRef)
   dataList();
@@ -136,11 +155,17 @@ const importExcelData = () => {
   }
 };
 const editUser=ref(null);
+const viewUser=ref(null);
 const editSkills=(row)=>{
   editDialog.visible=true;
   editUser.value=row;
 
 }
+const viewSkills=(row)=>{
+  viewDialog.visible=true;
+  viewUser.value=row;
+
+}
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   selection: true,

+ 131 - 0
src/views/plan/finishProduct/components/detail-stock.vue

@@ -0,0 +1,131 @@
+<template>
+
+  <div class="mainContentBox">
+    <avue-crud
+      ref="crudRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @selection-change="selectionChange"
+    >
+
+
+
+    </avue-crud>
+
+  </div>
+
+
+
+</template>
+<script setup lang="ts">
+  import { ref, getCurrentInstance } from "vue";
+  import { useCrud } from "@/hooks/userCrud";
+  import ButtonPermKeys from "@/common/configs/buttonPermission";
+  import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
+  const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+  import {addStock} from "@/api/inStock"
+  import dictDataUtil from "@/common/configs/dictDataUtil";
+  // 数据字典相关
+
+  const test = () => {
+    isShowTable.value = true;
+    tableType.value = tableType.value == 1 ? 2 : 1;
+  };
+  const props = defineProps({
+    workOrderCode: {
+      type: String,
+      default: () => {
+        return 0;
+      }
+    },
+    dialog:{
+      type:Object,
+      default:()=>{
+        return {};
+      }
+    }
+
+  })
+  const crudRef=ref(null);
+  // 传入一个url,后面不带/
+  const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+    useCrud({
+      src: "/api/v1/plan/seq/in/stock",
+    });
+  const { dataNoPageList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+    Methords; //增删改查
+  const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+  const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+  // checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
+  // const permission = reactive({
+  //   delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
+  //   addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
+  //   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
+  //   menu: true,
+  // });
+
+
+
+
+
+  onMounted(() => {
+    search.value.workOrderCode=props.workOrderCode;
+    dataNoPageList();
+
+
+  });
+
+
+  // 设置表格列或者其他自定义的option
+  option.value = Object.assign(option.value, {
+    selection: true,
+    addBtn: false,
+    editBtn:false,
+    delBtn:false,
+    viewBtn:false,
+    menu:false,
+    columnBtn: false,
+    gridBtn: false,
+    column: [
+      {
+        label: "接收人",
+        prop: "recipient",
+      },
+      {
+        label: "入库数量",
+        prop: "inventoryNum",
+      },
+      {
+        label: "流转卡号",
+        prop: "seqNo",
+        overHidden: true,
+      },
+      {
+        label: "备注",
+        prop: "remark",
+        overHidden: true,
+      },
+      {
+        label: "创建人",
+        prop: "creator",
+      },
+      {
+        label: "创建时间",
+        prop: "created",
+      },
+    ],
+  });
+
+</script>
+
+<style>
+  .avue-crud__header{min-height: 0px;}
+</style>

+ 227 - 0
src/views/plan/finishProduct/components/in-stock.vue

@@ -0,0 +1,227 @@
+<template>
+
+  <div class="mainContentBox">
+    <avue-form
+      ref="formRef"
+      v-model="form"
+      :data="data2"
+      :option="option2"
+    >
+    </avue-form>
+    <avue-crud
+      ref="crudRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @selection-change="selectionChanges"
+    >
+
+
+
+    </avue-crud>
+
+  </div>
+  <div style="overflow: hidden">
+    <div class="detail-footer">
+      <el-button type="primary" @click="onHandle"> 确定 </el-button>
+      <el-button @click="cancelWindow">取消</el-button>
+
+    </div>
+  </div>
+  <CommonTable
+    ref="ctableRef"
+    tableTitle="员工选择"
+    tableType="USERS"
+    @selected-sure="onSelectedFinish"
+  />
+
+</template>
+<script setup lang="ts">
+  import { ref, getCurrentInstance } from "vue";
+  import { useCrud } from "@/hooks/userCrud";
+  import ButtonPermKeys from "@/common/configs/buttonPermission";
+  import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
+  const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+  import {addStock} from "@/api/inStock"
+  import dictDataUtil from "@/common/configs/dictDataUtil";
+  // 数据字典相关
+
+  const test = () => {
+    isShowTable.value = true;
+    tableType.value = tableType.value == 1 ? 2 : 1;
+  };
+  const props = defineProps({
+    workOrderCode: {
+      type: String,
+      default: () => {
+        return 0;
+      }
+    },
+    stockDialog:{
+      type:Object,
+      default:()=>{
+        return {};
+      }
+    }
+
+  })
+  const ctableRef=ref(null);
+  const crudRef=ref(null);
+  // 传入一个url,后面不带/
+  const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+    useCrud({
+      src: "/api/v1/plan/seq",
+    });
+  const { dataNoPageList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+    Methords; //增删改查
+  const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+  const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+  // checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
+  // const permission = reactive({
+  //   delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
+  //   addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
+  //   editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
+  //   menu: true,
+  // });
+
+
+  const cancelWindow=()=>{
+    props.stockDialog.visible=false;
+  }
+
+  const onHandle=()=>{
+    if(form.value.recipient==undefined||form.value.recipient==null||form.value.recipient.trim()==""){
+      ElMessage({
+        message: "未输入 接收人",
+        type: "error",
+      });
+      return false;
+    }
+    if(seqList.value.length==0){
+      ElMessage({
+        message: "未选择要入库的流转卡号",
+        type: "error",
+      });
+      return false;
+    }
+
+    form.value.seqList=seqList.value;
+    form.value.workOrderCode=props.workOrderCode;
+    addStock(form.value).then(
+      (data)=>{
+
+        if(data.code=="200"){
+          ElMessage({
+            message: data.msg,
+            type: "success",
+          });
+          props.stockDialog.visible=false;
+        }else {
+          ElMessage({
+            message: data.msg,
+            type: "error",
+          });
+        }
+
+      }
+    )
+
+
+  }
+  onMounted(() => {
+    // console.log("crudRef", crudRef)
+    search.value.workOrderCode=props.workOrderCode;
+    //未入库
+    search.value.isStock="0";
+    //已完工
+    search.value.state="2";
+    dataNoPageList();
+
+
+  });
+  const seqList=ref([]);
+  // 设置selection: true,后监听选中改变事件,将Id存入数组
+  const selectionChanges=(rows) => {
+    seqList.value=[];
+    rows?.forEach((element) => {
+      seqList.value.push({seqId:element.id,seqNo:element.seqNo});
+    });
+
+  }
+  const onSelectedFinish=(selectedValue)=>{
+    form.value.recipient=selectedValue.userName;
+  }
+
+  // 设置表格列或者其他自定义的option
+  option.value = Object.assign(option.value, {
+    selection: true,
+    addBtn: false,
+    editBtn:false,
+    delBtn:false,
+    viewBtn:false,
+    menu:false,
+    columnBtn: false,
+    gridBtn: false,
+    column: [
+      {
+        label: "流转卡号",
+        prop: "seqNo",
+      },
+    ],
+  });
+  const option2=ref({});
+  const data2=ref({});
+  // 设置表格列或者其他自定义的option
+  option2.value = {
+    addBtn: false,
+    editBtn:false,
+    delBtn:false,
+    viewBtn:false,
+    menu:false,
+    submitBtn:false,
+    emptyBtn:false,
+    columnBtn: false,
+    gridBtn: false,
+    refreshBtn:false,
+    column: [
+      {
+        label: "接收人",
+        prop: "recipient",
+        span:24,
+        click: ({ value, column }) => {
+          ctableRef.value.startSelect();
+        },
+        rules: [
+          {
+            required: true,
+            message: "请输入接收人",
+            trigger: "blur",
+          },
+        ],
+      },
+      {
+        label: "备注",
+        prop: "remark",
+        span:24,
+        type: "textarea",
+      },
+
+    ],
+  };
+
+
+</script>
+
+<style>
+  .avue-crud__header{min-height: 0px;}
+  .detail-footer{
+    float: right;
+  }
+</style>

+ 30 - 30
src/views/plan/finishProduct/index.vue

@@ -18,11 +18,16 @@
 
 
         <template #menu="{row,index,type}">
-          <el-button @click="editSkills(row)"
-                     icon="el-icon-edit"
+          <el-button @click="inStock(row)"
+                     icon="el-icon-van"
                      text
                      type="primary"
-          >编辑</el-button>
+          >入库</el-button>
+          <el-button @click="viewStock(row)"
+                     icon="el-icon-view"
+                     text
+                     type="primary"
+          >查看</el-button>
         </template>
 
     </avue-crud>
@@ -33,17 +38,17 @@
       :destroy-on-close="true"
       @close="dialog.visible = false"
     >
-      <user-skill   :dialog="dialog"/>
+      <detailStock   :dialog="dialog" :workOrderCode="stockInfo.workOrderCode"/>
     </el-dialog>
 
     <el-dialog
-      v-model="editDialog.visible"
-      :title="editDialog.title"
+      v-model="stockDialog.visible"
+      :title="stockDialog.title"
       width="800px"
       :destroy-on-close="true"
-      @close="editClose"
+      @close="stockClose"
     >
-      <editSkill   :editDialog="editDialog" :skillId="editUser.id" :postId="editUser.postId"/>
+      <inStocks   :stockDialog="stockDialog" :workOrderCode="stockDetail.workOrderCode"/>
     </el-dialog>
   </div>
 </template>
@@ -53,30 +58,33 @@ import { useCrud } from "@/hooks/userCrud";
 import ButtonPermKeys from "@/common/configs/buttonPermission";
 import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
-import editSkill from "@/views/base/skill/components/edit-skill.vue"
+import inStocks from "@/views/plan/finishProduct/components/in-stock.vue"
+import detailStocks from "@/views/plan/finishProduct/components/detail-stock.vue"
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
 // 数据字典相关
 const { dicts } = useDictionaryStoreHook();
-
+const stockDetail=ref({});
 const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
 };
 const dialog = reactive({
-  title: "员工技能",
+  title: "查看",
   visible: false,
 });
 
-const editDialog = reactive({
-  title: "编辑",
+const stockDialog = reactive({
+  title: "入库",
   visible: false,
 });
-const editClose=()=>{
-  editDialog.visible = false;
+const stockClose=()=>{
+  stockDialog.visible = false;
   dataList();
 }
-const addRow=()=>{
-  dialog.visible=true;
+const stockInfo=ref({});
+const viewStock=(row)=>{
+  stockInfo.value=row;
+  dialog.visible = true;
 }
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
@@ -104,20 +112,11 @@ onMounted(() => {
 
 
 
-/**
- * 上传excel相关
- */
-const uploadRef = ref(null);
-const uploadFinished = () => {
-  // 上传完成后的刷新操作
-  page.currentPage = 1;
-  dataList();
-};
 
-const editUser=ref(null);
-const editSkills=(row)=>{
-  editDialog.visible=true;
-  editUser.value=row;
+
+const inStock=(row)=>{
+  stockDialog.visible=true;
+  stockDetail.value=row;
 
 }
 // 设置表格列或者其他自定义的option
@@ -129,6 +128,7 @@ option.value = Object.assign(option.value, {
   gridBtn: false,
   refreshBtn:false,
   editBtn:false,
+  delBtn:false,
   column: [
 
 

+ 0 - 56
src/views/quality/faultHandle/columns.ts

@@ -1,56 +0,0 @@
-import { useDictionaryStoreHook } from "../../../store/index";
-const { dicts } = useDictionaryStoreHook();
-export const columns = [
-
-  {
-    label: "审理单号",
-    prop: "trackingNumber",
-    overHidden: true,
-    width:120,
-    search: true,
-  },
-  {
-    label: "工单号",
-    prop: "workOrderCode",
-    overHidden: true,
-    width:120,
-    search: true,
-  },
-  {
-    label: "订单号",
-    prop: "orderCode",
-    overHidden: true,
-    width:120,
-    search: true,
-  },
-  {
-    label: "不合格数量",
-    overHidden: true,
-    width:100,
-    prop: "unqualifiedNum",
-  },
-
-  {
-    label: "序列号", prop: "seqNo", overHidden: true,
-
-  },
-  {
-    label: "状态", prop: "state", overHidden: true,
-    width:120,
-    dicData:dicts.escalation_fault_state,
-    props: { label: "dictLabel", value: "dictValue" },
-  },
-  {
-    label: "跟踪状态", prop: "currentState", overHidden: true,
-    width:100,
-    dicData:dicts.fault_current_state,
-    props: { label: "dictLabel", value: "dictValue" },
-  },
-  {
-    label: "报故人", prop: "creator",
-    overHidden: true,
-    width:100,
-    search: true,
-  },
-
-];

+ 34 - 18
src/views/quality/faultHandle/components/fault-detail.vue

@@ -31,15 +31,22 @@
   </div>
   <div class="fault">
     <div class="image-title">图片</div>
-      <div v-for="(image, index) in faultImg1" :key="index" class="fault-image">
-        <!-- 使用v-for循环渲染图片列表 -->
-        <img :src="dictDataUtil.img_url+image.fileUrl" alt="图片" width="150px" class="fault-img">
-      </div>
-
+    <el-image
+      style="width: 100px; height: 100px"
+      :src="url"
+      :zoom-rate="1.2"
+      :max-scale="7"
+      :min-scale="0.2"
+      :preview-src-list="srcList"
+      :initial-index="4"
+      fit="cover"
+    />
   </div>
   <div class="fault" v-if="faultDetails1!=null">
-    <div class="fault-detail" >序列号:&nbsp;&nbsp;{{faultDetails1.seqNo}}</div>
-    <div class="fault-detail">故障描述:&nbsp;&nbsp;{{faultDetails1.remark}}</div>
+    <div class="fault-detail" v-if="faultDetails1.trackingNumber!=null">不合格审理单号 :&nbsp;&nbsp;{{faultDetails1.trackingNumber}}</div>
+    <div class="fault-detail" >序列号 :&nbsp;&nbsp;{{faultDetails1.seqNo}}</div>
+    <div class="fault-detail">故障描述 :&nbsp;&nbsp;{{faultDetails1.remark}}</div>
+    <div class="fault-detail" v-if="faultDetails1.opinion!=null">线长意见 :&nbsp;&nbsp;{{faultDetails1.opinion}}</div>
 
     <div class="title-fault" style="margin-top: 10px">
       报故人:&nbsp;&nbsp;{{faultDetails1.creator}}
@@ -50,8 +57,8 @@
     <div class="title-fault" style="margin-top: 10px">
       报故数量:&nbsp;&nbsp;{{faultDetails1.unqualifiedNum}}
     </div>
-    <div class="title-fault" style="margin-top: 10px">
-      处理结果:&nbsp;&nbsp;{{faultDetails1.disposalMeasures}}
+    <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px" v-if="faultDetails1.result!=undefined&&faultDetails1.result!=''">
+      处理结果:&nbsp;&nbsp;{{faultDetails1.result}}
     </div>
   </div>
   <div class="mainContentBox" v-if="faultDetails1!=null&&faultDetails1.currentState==5">
@@ -93,6 +100,8 @@
       }
     }
   })
+  const url=ref({});
+  const srcList=ref([]);
   const drawingDetail=ref(null);
   const drawing=(row)=>{
     drawingDetail.value=row;
@@ -118,13 +127,12 @@
   const crudRef = ref(null); //crudRef.value 获取avue-crud对象
   const router = useRouter();
 
-  const faultImg1=ref(null);
+
   const formData1=ref({});
   const data2=ref([]);
   const option2=ref([]);
   const formFault=ref({});
   const faultDetails1=ref(null);
-
   onMounted(() => {
     // console.log("crudRef", crudRef)
     search.value.escalationFaultId=props.escalationFaultId;
@@ -133,17 +141,26 @@
     formFault.value.escalationFaultId=props.escalationFaultId;
     getFault(formData1.value).then((data) => {
 
-      faultImg1.value=data.data;
+
+      if(data.data.length>0){
+        url.value=dictDataUtil.img_url+data.data[0].fileUrl;
+        for(let i=0;i<data.data.length;i++){
+          srcList.value[i]=dictDataUtil.img_url+data.data[i].fileUrl;
+        }
+      }
 
     });
     getFaultDetails(props.escalationFaultId).then((data) => {
 
-      faultDetails1.value=data.data;
-      for(let i=0;i<dicts.disposal_measures_type.length;i++){
-        if(faultDetails1.value.disposalMeasures===dicts.disposal_measures_type[i].dictValue){
-          faultDetails1.value.disposalMeasures=dicts.disposal_measures_type[i].dictLabel;
+      faultDetails1.value = data.data;
+      if (dicts.disposal_measures_type.length>0) {
+
+      for (let i = 0; i < dicts.disposal_measures_type.length; i++) {
+        if (faultDetails1.value.disposalMeasures === dicts.disposal_measures_type[i].dictValue) {
+          faultDetails1.value.disposalMeasures = dicts.disposal_measures_type[i].dictLabel;
         }
       }
+    }
       getSeqNoList(formFault.value).then((data) => {
 
         data2.value=data.data;
@@ -151,7 +168,6 @@
           data2.value[i].$cellEdit=true;
         }
       });
-      console.info(faultDetails1.value);
     });
 
 
@@ -172,7 +188,7 @@
       {
         label: "缺陷大类",
         prop: "bugType",
-        dicData:dicts.defect_mana,
+        dicUrl:dictDataUtil.request_url + dictDataUtil.TYPE_CODE.defect_mana,
         props: { label: "dictLabel", value: "dictValue" },
       },
       {

+ 2 - 2
src/views/quality/faultHandle/components/fault-examine.vue

@@ -50,8 +50,8 @@
     <div class="title-fault" style="margin-top: 10px">
       报故数量:&nbsp;&nbsp;{{faultDetails1.unqualifiedNum}}
     </div>
-    <div class="title-fault" style="margin-top: 10px">
-      处理结果:&nbsp;&nbsp;{{faultDetails1.disposalMeasures}}
+    <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px" v-if="faultDetails1.result!=undefined&&faultDetails1.result!=null">
+      处理结果:&nbsp;&nbsp;{{faultDetails1.result}}
     </div>
   </div>
   <div class="fault" v-if="faultDetails1!=null">

+ 16 - 3
src/views/quality/faultHandle/components/fault-handle.vue

@@ -50,8 +50,8 @@
     <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px">
       报故数量:&nbsp;&nbsp;{{faultDetails.unqualifiedNum}}
     </div>
-    <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px" v-if="faultDetails.disposalMeasures!=='0'">
-      处理结果:&nbsp;&nbsp;{{faultDetails.disposalMeasures}}
+    <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px" v-if="faultDetails.result!=undefined&&faultDetails.result!=null">
+      处理结果:&nbsp;&nbsp;{{faultDetails.result}}
     </div>
   </div>
   <avue-form
@@ -155,6 +155,7 @@ const faultHandle=ref({});
    faultHandle.value.id=faultDetails.value.id;
    faultHandle.value.disposalMeasures=radio1.value;
    faultHandle.value.trackingNumber=form.value.trackingNumber;
+   faultHandle.value.result=form.value.result;
    handleEscalationFault(faultHandle.value).then((data)=>{
      if(data.code==="200") {
        ElMessage({
@@ -208,13 +209,25 @@ const faultHandle=ref({});
         label: "不合格审理单号",
         prop: "trackingNumber",
         labelWidth:130,
+        span:24,
         rules: [{
           required: true,
           message: "请输入不合格审理单号",
           trigger: "blur"
         }],
       },
-
+      {
+        label: "处理结果",
+        prop: "result",
+        labelWidth:130,
+        span:24,
+        type:"textarea",
+        rules: [{
+          required: true,
+          message: "请输入处理结果",
+          trigger: "blur"
+        }],
+      },
     ],
   };
   const cancelWindow=()=>{

+ 6 - 4
src/views/quality/faultHandle/components/fault-page.vue

@@ -38,8 +38,10 @@
 
   </div>
   <div class="fault" v-if="faultDetails!=null">
-    <div class="fault-detail" >序列号:&nbsp;&nbsp;{{faultDetails.seqNo}}</div>
-    <div class="fault-detail">故障描述:&nbsp;&nbsp;{{faultDetails.remark}}</div>
+    <div class="fault-detail" v-if="faultDetails.trackingNumber!=null">不合格审理单号 :&nbsp;&nbsp;{{faultDetails.trackingNumber}}</div>
+    <div class="fault-detail" >序列号 :&nbsp;&nbsp;{{faultDetails.seqNo}}</div>
+    <div class="fault-detail">故障描述 :&nbsp;&nbsp;{{faultDetails.remark}}</div>
+    <div class="fault-detail" v-if="faultDetails.opinion!=null">线长意见 :&nbsp;&nbsp;{{faultDetails.opinion}}</div>
 
     <div class="title-fault" style="margin-top: 10px">
       报故人:&nbsp;&nbsp;{{faultDetails.creator}}
@@ -50,8 +52,8 @@
     <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px">
       报故数量:&nbsp;&nbsp;{{faultDetails.unqualifiedNum}}
     </div>
-    <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px" v-if="faultDetails.disposalMeasures!=='0'">
-      处理结果:&nbsp;&nbsp;{{faultDetails.disposalMeasures}}
+    <div class="title-fault" style="margin-top: 10px;margin-bottom: 10px" v-if="faultDetails.result!=undefined&&faultDetails.result!=null">
+      处理结果:&nbsp;&nbsp;{{faultDetails.result}}
     </div>
   </div>
   <div class="mainContentBox">

+ 61 - 5
src/views/quality/faultHandle/index.vue

@@ -38,13 +38,13 @@
         >处理</el-button>
 
         <el-button @click="faultThaw(row)"
-                   icon="el-icon-link"
+                   icon="el-icon-open"
                    text
                    type="primary"
                    v-if="row.currentState==4"
         >解冻</el-button>
         <el-button @click="faultExamine(row)"
-                   icon="el-icon-link"
+                   icon="el-icon-CircleCheck"
                    text
                    type="primary"
                    v-if="row.currentState==1"
@@ -99,7 +99,7 @@
   import { ref, getCurrentInstance } from "vue";
   import { useCrud } from "@/hooks/userCrud";
   import ButtonPermKeys from "@/common/configs/buttonPermission";
-  import { columns } from "./columns";
+  import dictDataUtil from "@/common/configs/dictDataUtil";
   import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
   import FaultExamine from "@/views/quality/faultHandle/components/fault-examine.vue"
   const { isShowTable, tableType } = toRefs(useCommonStoreHook());
@@ -185,8 +185,11 @@
   };
   onMounted(() => {
     // console.log("crudRef", crudRef)
-    search.value.state=radio1.value;
+
+
+    search.value.state = radio1.value;
     dataList();
+
   });
 
   const searchChangeState=()=>{
@@ -202,7 +205,60 @@
     editBtn:false,
     delBtn:false,
     viewBtn:false,
-    column: columns,
+    column: [
+
+      {
+        label: "审理单号",
+        prop: "trackingNumber",
+        overHidden: true,
+        width:120,
+        search: true,
+      },
+      {
+        label: "工单号",
+        prop: "workOrderCode",
+        overHidden: true,
+        width:120,
+        search: true,
+      },
+      {
+        label: "订单号",
+        prop: "orderCode",
+        overHidden: true,
+        width:120,
+        search: true,
+      },
+      {
+        label: "不合格数量",
+        overHidden: true,
+        width:100,
+        prop: "unqualifiedNum",
+      },
+
+      {
+        label: "序列号", prop: "seqNo", overHidden: true,
+
+      },
+      {
+        label: "状态", prop: "state", overHidden: true,
+        width:120,
+        dicUrl:dictDataUtil.request_url + dictDataUtil.TYPE_CODE.escalation_fault_state,
+        props: { label: "dictLabel", value: "dictValue" },
+      },
+      {
+        label: "跟踪状态", prop: "currentState", overHidden: true,
+        width:100,
+        dicUrl:dictDataUtil.request_url + dictDataUtil.TYPE_CODE.fault_current_state,
+        props: { label: "dictLabel", value: "dictValue" },
+      },
+      {
+        label: "报故人", prop: "creator",
+        overHidden: true,
+        width:100,
+        search: true,
+      },
+
+    ],
   });
 
 

+ 1 - 0
src/views/system/dict/index.vue

@@ -192,6 +192,7 @@ onMounted?.(() => {
             v-model="queryParams.keywords"
             placeholder="字典类型名称/编码"
             clearable
+            style="width: 200px"
             @keyup.enter="handleQuery"
           />
         </el-form-item>