Jelajahi Sumber

Merge branch 'qingban' into qingban-flow-dev

# Conflicts:
#	src/views/quality/reject/index.vue
#	src/views/quality/replace/index.vue
#	src/views/quality/rework/index.vue
qinhb 2 bulan lalu
induk
melakukan
b7b09ffcff

+ 2 - 2
src/views/base/craftManagement/route/components/groupSort.vue

@@ -62,9 +62,9 @@ watch(
           <el-form-item :label="'排序值:'">
             <div class="formLine">
               <template v-if="editState">
-                <el-input v-model="form[index].lineTageSort" />
+                <el-input v-model="form[index].lineTagSort" />
               </template>
-              <template v-else> {{ item.lineTageSort }} </template>
+              <template v-else> {{ item.lineTagSort }} </template>
             </div>
           </el-form-item>
         </template>

+ 54 - 9
src/views/quality/reject/index.vue

@@ -18,6 +18,9 @@
       v-if="!examineStatus"
     >
       <template #menu="{ row }">
+        <el-button  link  @click="showSeq(row.seqNoList)">
+          查看管号
+        </el-button>
         <el-button
             link
             icon="el-icon-copy-document"
@@ -44,12 +47,24 @@
       <Process :key="proccessKey" @get-list="getList" />
     </div>
     <ShowVue v-model="showState" :tableData="tableData" />
-    <LookFlowStep ref="LookFlowStepRef"></LookFlowStep>
+<el-dialog
+        v-model="dialog2.visible"
+        :title="dialog2.title"
+        width="950px"
+        @close="dialog2.visible = false"
+    >
+      <el-card
+          style="cursor: pointer; font-size: 20px"
+          shadow="always"
+          :key="item"
+          v-for="item in showSeqList"
+      >{{ item }}</el-card
+      >
+    </el-dialog><LookFlowStep ref="LookFlowStepRef"></LookFlowStep>
     <work-flow-check
         ref="workFlowCheckRef"
         @sureToSave="onWFSave"
-    ></work-flow-check>
-  </div>
+    ></work-flow-check>  </div>
 </template>
 <script setup>
 import { useCrud } from "@/hooks/userCrud";
@@ -69,6 +84,7 @@ const toShow = (row) => {
   tableData.value = setJson(row);
   showState.value = true;
 };
+const showSeqList =ref([]);
 const tableData = ref();
 const proccessKey = ref(false);
 const examineStatus = ref(false);
@@ -116,6 +132,14 @@ const showFlowSteps = (row) => {
 const getList = () => {
   dataList();
 };
+const dialog2 = reactive({
+  title: "管号列表",
+  visible: false,
+});
+const showSeq = (seqs) => {
+  showSeqList.value = seqs;
+  dialog2.visible = true;
+};
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   searchEnter: true,
@@ -143,10 +167,7 @@ option.value = Object.assign(option.value, {
       label: "阶段",
       prop: "stage",
     },
-    {
-      label: "创建时间",
-      prop: "created",
-    },
+
     {
       label: "状态",
       prop: "state",
@@ -175,10 +196,34 @@ option.value = Object.assign(option.value, {
         },
       ],
     },
-    {
+      {
+          label: "问题描述",
+          prop: "remark1",
+          overHidden: true,
+          formatter: (val) => {
+              if(val.remark1){
+                  return JSON.parse(val.remark1).content;
+              }
+
+          }
+      },
+      {
       label: "备注",
       prop: "remark",
-    }
+    },
+
+    {
+      label: "创建人",
+      prop: "creator",
+      editDisplay: false,
+    },
+      {
+          label: "创建时间",
+          prop: "created",
+          overHidden: true,
+          width:160
+      },
+
   ],
 });
 const setJson = (row1) => {

+ 83 - 14
src/views/quality/replace/index.vue

@@ -159,18 +159,37 @@
               <el-checkbox v-model="checkAll" @change="handleCheckAll">
                 全选
               </el-checkbox>
+              <span
+                style="
+                  margin: auto 10px auto 10px;
+                  vertical-align: 2px;
+                  font-weight: 200;
+                "
+              >
+                管号总数: {{ options.length }}
+              </span>
               <el-input
-                v-model="toSelectCount"
-                placeholder="请输入选中前面数量"
+                v-model="toSelectStartCount"
+                placeholder="请输入开始区间"
+                class="selectInput"
+                size="small"
+              />
+              <span style="margin: 0 0 0 10px">-</span>
+              <el-input
+                v-model="toSelectEndCount"
+                placeholder="请输入结束区间"
                 class="selectInput"
                 size="small"
               >
-                <template #append>
-                  <el-button type="primary" @click="startToSelectAheads"
-                    >选择</el-button
-                  >
-                </template>
               </el-input>
+              <el-button
+                type="primary"
+                @click="startToSelectAheads"
+                size="small"
+                class="confirmBtn"
+              >
+                确定
+              </el-button>
             </template>
             <el-option
               v-for="item in options"
@@ -255,6 +274,8 @@ const ExDataObj = ref({});
 const workOderShow = ref(false);
 const showProList = ref([]);
 const showSeqList = ref([]);
+const toSelectStartCount = ref(null);
+const toSelectEndCount = ref(null);
 const showSeq = (seqs) => {
   showSeqList.value = seqs;
   dialog2.visible = true;
@@ -317,6 +338,8 @@ const submit = async () => {
       ElMessage.warning("请检查表单选项");
     }
   });
+  toSelectStartCount.value = null;
+  toSelectEndCount.value = null;
 };
 const closeShow = () => {
   workOderShow.value = false;
@@ -326,6 +349,8 @@ const resetForm = () => {
   formSeq.value.seqNoList = [];
   formSeq.value.workOrderCode = "";
   formSeq.value.operationId = "";
+  options.value = [];
+  operations.value = [];
 };
 const toAdd = async () => {
   const { code } = await addReplace({ ...formSeq.value });
@@ -396,7 +421,6 @@ const setOperationList = async () => {
   });
 };
 
-const seqListlength = ref(null);
 const setSeqList = async () => {
   formSeq.value.seqNoList = [];
   const { data } = await getSeqList(
@@ -422,16 +446,57 @@ const add = () => {
 const cancel = () => {
   resetForm();
   dialog.visible = false;
+  toSelectStartCount.value = null;
+  toSelectEndCount.value = null;
 };
 
-const toSelectCount = ref(null);
 const startToSelectAheads = () => {
-  if (Number(toSelectCount.value)) {
-    const count = Number(toSelectCount.value);
+
+if (!Number(toSelectCount.value)) {
+ElMessage.error("请输入正确的数字");
+ 	return;
+}
+ const count = Number(toSelectCount.value);
     const seqNoList = options.value.map((item) => item.value);
     formSeq.value.seqNoList = seqNoList.slice(0, count);
-  } else {
-    ElMessage.error("请输入数字");
+if (options.value.length === 0) {
+    ElMessage.error("请先选择工单和工序");
+    toSelectStartCount.value = null;
+    toSelectEndCount.value = null;
+    return;
+  }
+  const start = Number(toSelectStartCount.value);
+  const end = Number(toSelectEndCount.value);
+  const seqNoList = options.value.map((item) => item.value);
+  const seqListlength = seqNoList.length;
+  if (Number.isInteger(start) && start > 0 && end === 0) {
+    form.value.seqNoList = seqNoList.slice(start - 1, seqListlength);
+    isAllChecked(form.value.seqNoList.length, seqNoList.length);
+    return;
+  }
+  if (Number.isInteger(end) && end > 0 && start === 0) {
+    form.value.seqNoList = seqNoList.slice(0, end);
+    isAllChecked(form.value.seqNoList.length, seqNoList.length);
+    return;
+  }
+  if (
+    Number.isInteger(start) &&
+    Number.isInteger(end) &&
+    start > 0 &&
+    end > 0
+  ) {
+    form.value.seqNoList = seqNoList.slice(start - 1, end);
+    isAllChecked(form.value.seqNoList.length, seqNoList.length);
+    return;
+  }
+  resetInput();
+  ElMessage.error("请输入正确的数字");
+};
+
+const isAllChecked = (choseLength, seqLength) => {
+  if (choseLength === seqLength) {
+    checkAll.value = true;  } else {
+    checkAll.value = false;
   }
 };
 onMounted(() => {
@@ -514,7 +579,11 @@ option.value = Object.assign(option.value, {
   margin-bottom: 10px;
 }
 .selectInput {
-  width: 30%;
+  width: 20%;
+  margin: 0 0 8px 10px;
+}
+.confirmBtn {
   margin: 0 0 8px 10px;
+  height: 22px;
 }
 </style>

+ 55 - 29
src/views/quality/rework/index.vue

@@ -19,51 +19,63 @@
       <template #menu="{ row, index, type }">
         <el-button
           @click="showTable(row)"
-          icon="el-icon-view"
-          text
+          link
           type="primary"
+          size="small"
           >查看</el-button
         >
         <el-button
-          icon="el-icon-edit"
-          text
+            type="primary"
+            size="small"
+            link
+            @click="showSeq(row.seqList)"
+        >查看管号</el-button
+        >
+        <el-button
+            link
           @click="doEdit(row, index)"
           type="primary"
-          v-if="(row.state === 0 || row.state === 1)&&row.flowState!=='1'&&row.flowState!=='3'"
+          v-if="row.state === 0 || row.state === 1"
           :size="size"
           >编辑</el-button
         >
         <el-button
           @click="operation(row)"
-          icon="el-icon-link"
-          text
+          link
+          size="small"
           type="primary"
           >返工工序</el-button
         >
         <el-button
-          icon="el-icon-edit"
-          text
+            link
           @click="handle(row, index, 2)"
           type="primary"
           v-if="row.state === 0"
+            size="small"
           >驳回</el-button
         >
         <el-button
-          icon="el-icon-edit"
-          text
+            link
           @click="handle(row, index, 1)"
           type="primary"
           v-if="row.state === 0"
+            size="small"
           >确认返工</el-button
         >
-
 <!--        <el-button
-          icon="el-icon-edit"
-          text
+            link
           v-if="row.state === 1"
           @click="handle(row, index, 3)"
           type="primary"
-          :size="size"
+            size="small"
+          >返工完成</el-button
+        >-->
+        <el-button
+            link
+          v-if="row.state === 1"
+          @click="handle(row, index, 3)"
+          type="primary"
+            size="small"
         >返工完成</el-button
         >-->
 
@@ -132,6 +144,20 @@
         :status="record.state"
       />
     </el-dialog>
+    <el-dialog
+        v-model="dialog2.visible"
+        :title="dialog2.title"
+        width="950px"
+        @close="dialog2.visible = false"
+    >
+      <el-card
+          style="cursor: pointer; font-size: 20px"
+          shadow="always"
+          :key="item"
+          v-for="item in showSeqList"
+      >{{ item }}</el-card
+      >
+    </el-dialog>
     <ReworkShow v-model="showState" :tableData="tableData" />
     <LookFlowStep ref="LookFlowStepRef"></LookFlowStep>
     <work-flow-check
@@ -139,7 +165,6 @@
         @sureToSave="onWFSave"
     ></work-flow-check>
   </div>
-
 </template>
 <script setup>
 import { useCrud } from "@/hooks/userCrud";
@@ -159,7 +184,7 @@ import { cancelFlow,submitFlow } from "@/api/flow";
 
 // 数据字典相关
 const { dicts } = useDictionaryStore();
-
+const showSeqList = ref([]);
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
@@ -179,6 +204,14 @@ const dialog1 = ref({
   title: "领料单",
   visible: false,
 });
+const dialog2 = reactive({
+  title: "管号列表",
+  visible: false,
+});
+const showSeq = (seqs) => {
+  showSeqList.value = seqs;
+  dialog2.visible = true;
+};
 const LookFlowStepRef=ref(null);
 const showFlowSteps = (row) => {
   LookFlowStepRef.value && LookFlowStepRef.value.openFlowStepDrawer(row.flowIns);
@@ -272,8 +305,8 @@ option.value = Object.assign(option.value, {
       label: "生产批号",
       prop: "workOrderCode",
       editDisabled: true,
-      width: 160,
       overHidden: true,
+      width: 120,
       search: true,
     },
     {
@@ -289,11 +322,6 @@ option.value = Object.assign(option.value, {
     },
     {
       label: "管号",
-      prop: "seqNos",
-      editDisabled: true,
-    },
-    {
-      label: "管号",
       prop: "seqNo",
       search: true,
       editDisabled: true,
@@ -348,17 +376,15 @@ option.value = Object.assign(option.value, {
     },
 
     {
-      label: "返工提出者",
+      label: "创建人",
       prop: "creator",
       editDisplay: false,
     },
     {
-      label: "日期",
+      label: "创建日期",
       prop: "created",
       type: "date",
       width: 160,
-      format: "YYYY-MM-DD HH:mm:ss",
-      valueFormat: "YYYY-MM-DD HH:mm:ss",
       editDisplay: false,
       overHidden: true,
     },
@@ -372,8 +398,8 @@ option.value = Object.assign(option.value, {
       hide: true,
       startPlaceholder: "开始范围",
       endPlaceholder: "结束范围",
-      format: "YYYY-MM-DD HH:mm:ss",
-      valueFormat: "YYYY-MM-DD HH:mm:ss",
+      format: "YYYY-MM-DD",
+      valueFormat: "YYYY-MM-DD",
       overHidden: true,
       search: true,
     },