Переглянути джерело

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

luoxiao 6 днів тому
батько
коміт
56127a4175

+ 1 - 1
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>
 
       <!-- 数量信息 -->

+ 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),

+ 39 - 28
src/views/statistic/report/toPrintTables.vue

@@ -59,12 +59,11 @@ defineExpose({
               <table  style="margin-top:10px">
                 <thead>
                   <tr>
-                    <th rowspan="2" v-if="item.checkList.length===1" style="width: 100px">序号</th>
-                    <th rowspan="2" v-if="item.checkList.length!==1">序号</th>
+                    <th style="width: 60px">序号</th>
 
-                    <th id="lineId" rowspan="2">
-                      <span class="left-text">筛选项目</span>
-                      <span class="right-text">产品型号/检验批号</span>
+                    <th id="lineId" colspan="2">
+                      <span class="left-text">产品型号/检验批号</span>
+                      <span class="right-text">筛选项目</span>
                       <svg xmlns="http://www.w3.org/2000/svg" class="xiexian">
                         <path
                           d="M 0 80 L 250 80 L 0 0 Z"
@@ -87,16 +86,22 @@ defineExpose({
                         />
                       </svg>
                     </th>
-                    <th colspan="2" v-for="(itemCheck, index) in item.checkList">{{itemCheck.materialModel}} {{itemCheck.checkCode}}</th>
+                    <th  v-for="(operationName) in item.operationNames">{{operationName}}</th>
                   </tr>
-                  <tr>
+<!--                  <tr>
                     <th class="vertical-text" v-for="(itemCheck, index) in item.checkNameList">{{itemCheck}}</th>
-                  </tr>
+                  </tr>-->
                 </thead>
-                <tbody>
-                  <tr v-for="(itemOperation, index) in item.filterDetailList" :key="index" >
-                    <td style="text-align: center" v-for="(item, index) in itemOperation">{{ item }}</td>
-
+                <tbody v-for="(itemCheck, index) in item.checkList" :key="index">
+                  <tr  >
+                    <td rowspan="2" style="text-align: center" >{{ index+1}}</td>
+                    <td rowspan="2" style="text-align: center;width:180px" >{{ itemCheck.materialModel}}&nbsp;{{ itemCheck.checkCode}}</td>
+                    <td  style="text-align: center;width:70px" >数量</td>
+                    <td  style="text-align: center;" v-for="(num) in itemCheck.numList" >{{num}}</td>
+                  </tr>
+                  <tr>
+                    <td style="text-align: center">剔除</td>
+                    <td  style="text-align: center;" v-for="(remove) in itemCheck.removeList">{{remove}}</td>
 
                   </tr>
                 </tbody>
@@ -149,9 +154,9 @@ defineExpose({
                 <thead >
 
                   <tr >
-                    <th id="lineId" rowspan="2">
-                      <span class="right-text">产品分类</span>
-                      <span class="left-text">工序</span>
+                    <th id="lineId" colspan="2" >
+                      <span class="right-text">工序</span>
+                      <span class="left-text">产品分类</span>
                       <svg xmlns="http://www.w3.org/2000/svg" class="xiexian">
                         <path
                           d="M 0 80 L 250 80 L 0 0 Z"
@@ -174,25 +179,31 @@ defineExpose({
                         />
                       </svg>
                     </th>
-                    <th  :colspan="index==0?3:4" v-for="(itemModel, index) in item.materialModelList">{{itemModel}}</th>
-                  </tr>
-                  <tr>
-                    <th class="vertical-text" v-for="(itemLine, index) in item.headLine">{{itemLine}}</th>
-
+                    <th   v-for="(itemOperation) in item.operationNameList">{{itemOperation}}</th>
                   </tr>
 
                 </thead>
-                <tbody>
-                  <tr v-for="(itemLine, index) in item.lineList" :key="index">
-                    <td v-for="(itemOp, index) in itemLine">{{itemOp}}</td>
-
+                <tbody v-for="(model,modelIndex) in item.modelList">
+                  <tr>
+                    <td style="width: 160px;text-align: center" rowspan="3">{{model.materialModel}}</td>
+                    <td style="width: 90px;text-align: center">目标%</td>
+                    <td v-for="(modelItem) in model.targetList" style="text-align: center">{{modelItem}}</td>
+                  </tr>
+                  <tr>
+                    <td style="width: 90px;text-align: center">实际%</td>
+                    <td v-for="(modelItem) in model.actualList" style="text-align: center">{{modelItem}}</td>
                   </tr>
                   <tr>
-                    <td>备注</td>
-                    <td :colspan="item.num * 4-1" v-html="item.remark" style="text-align: center"></td>
+                    <td style="width: 90px;text-align: center">增量%</td>
+                    <td v-for="(modelItem) in model.incrementList" style="text-align: center">{{modelItem}}</td>
+                  </tr>
+                  <tr v-if="modelIndex===item.num-1">
+                    <td colspan="2" style="text-align: center">备注</td>
+                    <td :colspan="item.operationNum" v-html="item.remark" style="text-align: center;padding-top: 20px;padding-bottom: 20px"></td>
                   </tr>
                 </tbody>
-              </table></div>
+              </table>
+              </div>
             </div>
             <div class="tableTitle" style="margin-top: 50px">入库</div>
 <!--            <div class="info">
@@ -309,7 +320,7 @@ th {
 }
 .div-header{
   float: left;
-  width: 315px;
+  width: 33%;
   font-size: 15px;
   height: 40px;
   line-height: 40px;

+ 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);