quwangxin há 2 anos atrás
pai
commit
a4157cbe51

+ 390 - 209
src/components/print/OrderPrint.vue

@@ -5,174 +5,271 @@
         <el-col :span="6">
           <div class="bg"> 生产工单号 </div>
           <div class="code">条码区</div>
-          <div class="value">21122403906633005</div>
+          <div class="value">{{ infoData.code }}</div>
         </el-col>
         <el-col :span="5">
           <div class="bg">生产版本</div>
-          <div class="value">X011 挤压</div>
+          <div class="value">{{ infoData.produceVersionName }}</div>
           <div class="bg">产品编码</div>
-          <div class="value">W05363955011</div>
+          <div class="value">{{ infoData.productCode }}</div>
         </el-col>
         <el-col :span="5">
           <div class="bg">计划编号</div>
-          <div class="value">YU21122400039</div>
+          <div class="value">{{ infoData.productionPlanCode }}</div>
           <div class="bg">产品名称</div>
-          <div class="value">木工刀</div>
+          <div class="value">{{ infoData.productName }}</div>
         </el-col>
         <el-col :span="4">
           <div class="bg">计划类型</div>
-          <div class="value">内销计划</div>
+          <div class="value">{{ typeList[infoData.planType] }}</div>
           <div class="bg">要求成型数量</div>
-          <div class="value">1000 PCS</div>
+          <div class="value">{{ infoData.formingNum }}PCS</div>
         </el-col>
         <el-col :span="4">
-          <div class="bg">要求成型日期</div>
-          <div class="value">2023/08/20</div>
+          <!-- <div class="bg">要求成型日期</div>
+          <div class="value">2023/08/20</div> -->
           <div class="bg">要求成型重量</div>
-          <div class="value">850.5 KG</div>
+          <div class="value">{{ infoData.formingWeight }}KG</div>
         </el-col>
       </el-row>
 
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">10 挤压成型</div></el-col
+      <template v-for="(item, index) in processList">
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-if="item.taskTypeName === '挤压成型'"
         >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in extrusion"
-          :key="item.label"
-        >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">20 自然干燥</div></el-col
-        >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in drying"
-          :key="item.label"
-        >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">30 升温干燥</div></el-col
-        >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in temperature"
-          :key="item.label"
-        >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">40 半加定长</div></el-col
-        >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in halflong"
-          :key="item.label"
-        >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">50 备炉</div></el-col
-        >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in furnace"
-          :key="item.label"
-        >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">60 烧结</div></el-col
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 挤压成型</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in extrusion"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-else-if="item.taskTypeName === '自然干燥'"
         >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in sinter"
-          :key="item.label"
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 自然干燥</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in drying"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-else-if="item.taskTypeName === '升温干燥'"
         >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">70 质检</div></el-col
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 升温干燥</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in temperature"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-else-if="item.taskTypeName.includes('定长')"
         >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in quality"
-          :key="item.label"
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 半加定长</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in halflong"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-else-if="item.taskTypeName === '备炉'"
         >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">80 深加工(精磨)</div></el-col
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 备炉</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in furnace"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-else-if="item.taskTypeName === '烧结'"
         >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in deepProcesse"
-          :key="item.label"
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 烧结</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in sinter"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-else-if="item.taskTypeName === '质检'"
         >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">90 包装</div></el-col
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 质检</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in quality"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row
+          class="processes-data"
+          :key="index"
+          v-else-if="item.taskTypeName === '包装'"
         >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in packageOpt"
-          :key="item.label"
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 包装</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in packageOpt"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row
+          :key="index"
+          class="processes-data"
+          v-else-if="item.taskTypeName.includes('库')"
         >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
-      <el-row class="processes-data">
-        <el-col :span="14" class="bg top"
-          ><div class="title">110 预缴库</div></el-col
-        >
-        <el-col :span="10" class="bg top">备注:</el-col>
-        <el-col
-          :span="item.span"
-          :class="item.class"
-          v-for="item in preStorage"
-          :key="item.label"
-        >
-          {{ item.label }}:{{ item.key }}
-        </el-col>
-      </el-row>
+          <el-col :span="14" class="bg top"
+            ><div class="title">{{ index + 1 }}0 预缴库</div></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in preStorage"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+        <el-row class="processes-data" :key="index" v-else>
+          <el-col :span="14" class="bg top"
+            ><div class="title"
+              >{{ index + 1 }}0
+              {{
+                item.taskTypeName === '深加工'
+                  ? '深加工(精磨)'
+                  : item.taskTypeName
+              }}</div
+            ></el-col
+          >
+          <el-col :span="10" class="bg top">备注:</el-col>
+          <template v-for="(itm, idx) in item.list || []">
+            <el-col
+              :span="t.span"
+              :class="t.class"
+              v-for="(t, i) in deepProcesse"
+              :key="i + '-' + idx"
+            >
+              {{ t.label }}:{{ itm[t.key] }}
+            </el-col>
+          </template>
+          <el-col :span="24" v-if="!(item.list && item.list.length)">
+            <div class="no-data">暂无数据</div>
+          </el-col>
+        </el-row>
+      </template>
     </div>
     <div slot="footer">
       <el-button type="primary" @click="handlePrint">打印</el-button>
@@ -183,15 +280,35 @@
 
 <script>
   import { downloadPDF } from '@/utils/pdf.js';
+  import { reportPage } from '@/api/produceOrder/index.js';
   export default {
-    data() {
+    props: {
+      infoData: {
+        type: Object,
+        default: () => ({})
+      },
+      processList: {
+        type: Array,
+        default: () => []
+      },
+      workOrderId: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
       return {
         visible: false,
+        typeList: {
+          1: '内销订单',
+          2: '外销订单',
+          3: '预制订单'
+        },
         // 挤压成型
         extrusion: [
           {
             label: '原料牌号',
-            key: 'xxx',
+            key: 'brandNo',
             span: 8,
             class: 'border-dashed-right border-dashed-bottom'
           },
@@ -202,27 +319,27 @@
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
-            label: '投料量(KG)',
-            key: 'xxx',
+            label: '投料量(KG)',
+            key: 'feedingWeight',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '合格数',
-            key: 'xxx',
+            key: 'standardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '不合格数',
-            key: 'xxx',
+            key: 'noStandardNum',
             span: 4,
             class: 'border-dashed-bottom'
           },
 
           {
             label: '设备号',
-            key: 'xxx',
+            key: 'deviceCode',
             span: 8,
             class: 'border-dashed-right border-dashed-bottom'
           },
@@ -240,58 +357,64 @@
           },
           {
             label: '舟皿数量',
-            key: 'xxx',
+            key: 'boatNum',
             span: 4,
             class: 'border-dashed-bottom'
           },
 
           {
             label: '冲压次数',
-            key: 'xxx',
+            key: 'stampingTimes',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 4,
             class: 'border-dashed-right'
           },
           {
-            label: '清缸时长',
-            key: 'xxx',
-            span: 8
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
+          // {
+          //   label: '清缸时长',
+          //   key: 'xxx',
+          //   span: 8
+          // }
         ],
         // 自然干燥
         drying: [
           {
             label: '干燥时长(分钟)',
-            key: 'xxx',
+            key: 'dryingDuration',
             span: 8,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '合格数',
-            key: 'xxx',
+            key: 'standardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '不合格数',
-            key: 'xxx',
+            key: 'noStandardNum',
             span: 4,
             class: ' border-dashed-right border-dashed-bottom'
           },
           {
             label: '区域编号',
-            key: 'xxx',
+            key: 'areaCode',
             span: 8,
             class: 'border-dashed-bottom'
           },
@@ -304,21 +427,27 @@
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right '
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 8
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 升温燥
         temperature: [
           {
             label: '升温曲线',
-            key: 'xxx',
+            key: 'temperatureRamp',
             span: 8,
             class: 'border-dashed-right border-dashed-bottom'
           },
@@ -330,19 +459,19 @@
           },
           {
             label: '合格数',
-            key: 'xxx',
+            key: 'standardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '不合格数',
-            key: 'xxx',
+            key: 'noStandardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '设备号',
-            key: 'xxx',
+            key: 'deviceCode',
             span: 4,
             class: ' border-dashed-bottom'
           },
@@ -355,14 +484,20 @@
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 8
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 半加定长
@@ -375,19 +510,19 @@
           },
           {
             label: '合格数',
-            key: 'xxx',
+            key: 'standardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '不合格数',
-            key: 'xxx',
+            key: 'noStandardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '设备号',
-            key: 'xxx',
+            key: 'deviceCode',
             span: 8,
             class: ' border-dashed-bottom'
           },
@@ -400,20 +535,26 @@
           },
           {
             label: '舟皿数量',
-            key: 'xxx',
+            key: 'boatNum',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 8
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 备炉
@@ -426,66 +567,72 @@
           },
           {
             label: '设备号',
-            key: 'xxx',
+            key: 'deviceCode',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 8,
             class: ' '
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 烧结
         sinter: [
           {
             label: '烧结曲线',
-            key: 'xxx',
+            key: 'sinteringCurve',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '合格数',
-            key: 'xxx',
-            span: 4,
-            class: 'border-dashed-right border-dashed-bottom'
-          },
-          {
-            label: '合格数',
-            key: 'xxx',
+            key: 'standardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '不合格数',
-            key: 'xxx',
+            key: 'noStandardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '设备号',
-            key: 'xxx',
+            key: 'deviceCode',
             span: 8,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 8,
             class: ''
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 质检
@@ -498,13 +645,13 @@
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 8,
             class: 'border-dashed-bottom'
           },
@@ -516,13 +663,13 @@
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 8,
             class: 'border-dashed-bottom'
           },
@@ -582,13 +729,13 @@
           },
           {
             label: '合格数',
-            key: 'xxx',
+            key: 'standardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '合格数',
-            key: 'xxx',
+            key: 'noStandardNum',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
@@ -612,48 +759,60 @@
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 12,
             class: 'border-dashed-bottom'
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 深加工
         deepProcesse: [
           {
             label: '合格数',
-            key: 'xxx',
+            key: 'standardNum',
             span: 8,
             class: 'border-dashed-right'
           },
           {
             label: '不合格数',
-            key: 'xxx',
+            key: 'noStandardNum',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '设备号',
-            key: 'xxx',
+            key: 'deviceCode',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 4,
             class: ' '
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 包装
@@ -738,15 +897,21 @@
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 8,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 4,
             class: 'border-dashed-bottom'
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ],
         // 预缴库
@@ -759,31 +924,47 @@
           },
           {
             label: '员工号',
-            key: 'xxx',
+            key: 'reportingOperator',
             span: 4,
             class: 'border-dashed-right border-dashed-bottom'
           },
           {
             label: '日期',
-            key: 'xxx',
+            key: 'reportWorkTime',
             span: 16,
             class: ' border-dashed-bottom'
+          },
+          {
+            label: '备注',
+            key: 'remark',
+            span: 4,
+            class: 'border-dashed-right'
           }
         ]
       };
     },
 
     methods: {
-      open() {
+      open () {
         this.visible = true;
         this.init();
       },
-      init() {},
-      cancel() {
+      init () {
+        for (const p of this.processList) {
+          reportPage({
+            size: -1,
+            workOrderId: this.workOrderId,
+            taskCode: p.taskCode
+          }).then((res) => {
+            this.$set(p, 'list', res.list || []);
+          });
+        }
+      },
+      cancel () {
         this.visible = false;
       },
       //打印
-      handlePrint() {
+      handlePrint () {
         this.PrintLoading = true;
         downloadPDF(this.$refs.pagesRef).then(() => {
           this.PrintLoading = false;

+ 3 - 2
src/views/produceOrder/components/report/Common.vue

@@ -87,9 +87,10 @@
               class="w100"
               :value="
                 (categoryMsg.totalWeight =
-                  categoryMsg.number * (infoData.productUnitWeight || 1))
+                  categoryMsg.number === ''
+                    ? ''
+                    : categoryMsg.number * (infoData.productUnitWeight || 1))
               "
-              :min="0"
               clearable
             ></el-input>
           </el-form-item>

+ 0 - 3
src/views/produceOrder/components/report/Drying.vue

@@ -90,7 +90,6 @@
                 (categoryMsg.totalWeight =
                   categoryMsg.number * (infoData.productUnitWeight || 1))
               "
-              :min="0"
               clearable
             ></el-input>
           </el-form-item>
@@ -149,7 +148,6 @@
             ><el-input
               readonly
               class="w100"
-              :controls="false"
               :value="
                 (workReport.productInfo.standardWeight =
                   workReport.productInfo.standardNum === ''
@@ -157,7 +155,6 @@
                     : workReport.productInfo.standardNum *
                       (infoData.productUnitWeight || 1))
               "
-              :min="0"
               clearable
             ></el-input> </el-form-item
         ></el-descriptions-item>

+ 0 - 2
src/views/produceOrder/components/report/Heating.vue

@@ -150,7 +150,6 @@
             ><el-input
               readonly
               class="w100"
-              :controls="false"
               :value="
                 (workReport.productInfo.standardWeight =
                   workReport.productInfo.standardNum === ''
@@ -158,7 +157,6 @@
                     : workReport.productInfo.standardNum *
                       (infoData.productUnitWeight || 1))
               "
-              :min="0"
               clearable
             ></el-input> </el-form-item
         ></el-descriptions-item>

+ 6 - 1
src/views/produceOrder/detail.vue

@@ -226,7 +226,12 @@
     </el-card>
     <otherMission ref="otherMissionRef" />
     <bomList ref="bomListRef" />
-    <OrderPrint ref="orderPrintRef" />
+    <OrderPrint
+      ref="orderPrintRef"
+      :workOrderId="workOrderId"
+      :infoData="infoData"
+      :processList="tabList"
+    />
   </div>
 </template>
 

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

@@ -27,7 +27,7 @@
           <!-- <el-button type="primary">工单刷新</el-button> -->
           <el-button type="success" @click="handlePicking">领料</el-button>
           <el-button type="success" @click="toEnd()">批量完结</el-button>
-          <el-button type="success" @click="handleCreate">创建工单</el-button>
+          <!-- <el-button type="success" @click="handleCreate">创建工单</el-button> -->
           <!-- <el-button type="success">工单操作控制</el-button> -->
         </template>
         <template v-slot:code="{ row }">

+ 2 - 2
vue.config.js

@@ -31,8 +31,8 @@ module.exports = {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
-        target: 'http://192.168.3.51:18086', // 测试
-        // target: 'http://192.168.3.35:8080', // kang杨威
+        // target: 'http://192.168.3.51:18086', // 测试
+        target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.41:8080', // 何江鹏
         // target: 'http://192.168.3.33:8080', // 谢一平