Forráskód Böngészése

Merge branch 'master' of http://113.44.0.55:8014/jiaxiaoqiang/qingban-SPC

lupeng 6 napja
szülő
commit
ae27bab5bf

+ 9 - 26
src/views/statistic/inspectionReport/DetailCom.vue

@@ -43,7 +43,7 @@
         <td></td>
         <td colspan="2"></td>
         <td>检验日期</td>
-        <td colspan="2">{{ saleModel.created }}</td>
+        <td colspan="2">{{ saleModel.created && saleModel.created.split(' ')[0] }}</td>
       </tr>
 
       <!-- 数量信息 -->
@@ -79,33 +79,16 @@
         <td colspan="6" style="text-align: left">检验情况:</td>
       </tr>
       <tr>
-        <td style="height: 70px">检验项目</td>
-        <td colspan="2" style="height: 70px">检验要求</td>
-        <td colspan="3" style="height: 70px">检验结果/实测数据</td>
+        <td>检验项目</td>
+        <td colspan="2">检验要求</td>
+        <td colspan="3">检验结果/实测数据</td>
       </tr>
-      <tr>
-        <td style="height: 200px; white-space: pre-line; vertical-align: top">
-          <div v-for="(item, index) in projectItems" :key="'project-' + index">
-            项目{{ index + 1 }}:{{ item.checkProject }}
-          </div>
-          <div v-if="projectItems.length === 0" style="color: #999">无数据</div>
-        </td>
-        <td
-          colspan="2"
-          style="height: 200px; white-space: pre-line; vertical-align: top"
-        >
-          <div v-for="(item, index) in projectItems" :key="'required-' + index">
-            项目{{ index + 1 }}:{{ item.checkRequired }}
-          </div>
-        </td>
-        <td
-          colspan="3"
-          style="height: 200px; white-space: pre-line; vertical-align: top"
-        >
-          <div v-for="(item, index) in projectItems" :key="'result-' + index">
-            项目{{ index + 1 }}:{{ item.checkResult }}
-          </div>
+      <tr v-for="(item, index) in projectItems" :key="'project-row-' + index">
+        <td style="height: 50px">
+          {{ item.checkProject }}
         </td>
+        <td colspan="2" style="height: 50px">{{ item.checkRequired }}</td>
+        <td colspan="3" style="height: 50px">{{ item.checkResult }}</td>
       </tr>
 
       <!-- 签名区域 -->

+ 9 - 4
src/views/statistic/inspectionReport/FillCom.vue

@@ -17,8 +17,8 @@
             :rules="rules"
             style="max-width: 600px"
           >
-            <el-form-item label="抽样数量" prop="seqNum">
-              <el-input v-model="saleForm.seqNum" />
+            <el-form-item label="批号" prop="workOrderCode">
+              <el-input :placeholder="workCode" v-model="saleForm.workOrderCode"/>
             </el-form-item>
             <el-form-item label="温度" prop="temperature">
               <el-input v-model="saleForm.temperature"></el-input>
@@ -184,6 +184,7 @@ const levelTypes = ref([
 const baseInfoRef = ref(null);
 const saleForm = reactive({
   id: "",
+  workOrderCode: "",
   seqNum: "",
   temperature: "",
   humidity: "",
@@ -240,7 +241,6 @@ const remark1 = reactive({
 });
 
 const rules = {
-  seqNum: [{ required: true, message: "请输入抽样数量", trigger: "blur" }],
   temperature: [{ required: true, message: "请输入温度", trigger: "blur" }],
   humidity: [{ required: true, message: "请输入湿度", trigger: "blur" }],
   pursuant: [{ required: true, message: "请输入检验依据", trigger: "blur" }],
@@ -295,6 +295,7 @@ const seqList = ref([]);
 
 // 用户信息
 const userInfo = ref({});
+const workCode = ref({});
 const userList = ref([]);
 const getUserInfo = async () => {
   getUserTree().then((data) => {
@@ -306,8 +307,9 @@ const showDrawer = (row) => {
   getUserInfo();
   getInspectionDetail(row.id).then((res) => {
     saleForm.id = res.data.id;
+    workCode.value = res.data.workOrderCode;
     saleForm.batchNum = res.data.batchNum;
-    saleForm.seqNum = res.data.seqNum;
+    saleForm.seqNum = res.data.batchNum;
     saleForm.temperature = res.data.temperature;
     saleForm.humidity = res.data.humidity;
     saleForm.pursuant = res.data.pursuant;
@@ -398,6 +400,9 @@ const confirmClick = () => {
 
         let p = {
           ...saleForm,
+          workOrderCode: (saleForm.workOrderCode == null || saleForm.workOrderCode === "")
+            ? workCode.value
+            : saleForm.workOrderCode,
           state: 1, // 待处理
           currentUserName: remark1.nextRemarkUser,
           remark3: JSON.stringify(remark1Copy),

+ 10 - 2
src/views/statistic/inspectionReport/index.vue

@@ -20,12 +20,20 @@
         <el-table-column prop="orderName" label="订单名称" />
         <el-table-column prop="materialCode" label="物料编号" />
         <el-table-column prop="materialName" label="物料名称" />
+        <el-table-column prop="batchNum" label="批量"/>
         <el-table-column
           prop="currentUserName"
           label="审核人"
           overhidden="true"
         />
-        <el-table-column prop="form_type" label="随工单类型" />
+        <el-table-column prop="formType" label="随工单类型">
+          <template #default="{ row }">
+            {{
+              (formTypeDictionary.find(item => item.dictValue === String(row.formType)) || {}).dictLabel
+              || row.formType
+            }}
+          </template>
+        </el-table-column>
         <el-table-column prop="state" label="审核状态">
           <template #default="{ row }">
             <div :style="{ color: getColorByState(row.state) }">
@@ -98,7 +106,7 @@ defineOptions({
 const userStore = useUserStore();
 const auditTypes = dicts.unqualified_audit_type;
 const fillRef = ref(null);
-
+const formTypeDictionary = dicts.excel_type;
 const currentOption = reactive({
   total: 0,
   page: 1,

+ 1 - 1
src/views/statistic/statistic/index.vue

@@ -161,7 +161,7 @@ const currentOption = ref({
   total: 0,
   page: 1,
   limit: 10,
-  pageSizes: [10, 20],
+  pageSizes: [10, 20, 50, 100],
 });
 
 const maxHeight = ref(null);