695593266@qq.com hai 10 meses
pai
achega
b6e1659f60

+ 11 - 0
src/api/login/index.js

@@ -32,6 +32,17 @@ export async function getCode(code) {
   return Promise.reject(new Error(res.data.message));
 }
 
+// 批量生产编码
+export async function getCodeList(code, params) {
+  const res = await request.get(`/main/codemanage/getCodeList/` + code, {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 /**
  * 获取验证码
  */

+ 233 - 227
src/views/beEntrusted/index.vue

@@ -9,6 +9,7 @@
         :current.sync="current"
         highlight-current-row
         row-key="id"
+        cache-key="beEntrusted"
       >
         <template v-slot:toolbar>
           <el-button type="primary" @click="salesToProductionOpen(1)"
@@ -60,7 +61,12 @@
     </el-card>
     <Create ref="create" @refresh="reload" />
     <SalesToProduction ref="salesToProductionRef" @success="reload" />
-    <ele-modal :visible.sync="visible" width="20vw" append-to-body :maxable="true">
+    <ele-modal
+      :visible.sync="visible"
+      width="20vw"
+      append-to-body
+      :maxable="true"
+    >
       <el-form label-width="100px">
         <el-form-item label="入库仓库:" prop="warehouseId">
           <el-select v-model="warehouseId">
@@ -80,240 +86,240 @@
     </ele-modal>
   </div>
 </template>
-  
-  <script>
-import OrderSearch from '@/views/entrust/components/order-search.vue';
-import dictMixins from '@/mixins/dictMixins';
-import Create from './components/create';
-import SalesToProduction from '@/views/unacceptedProduct/components/salesToProduction.vue';
 
-import { getList, warehouseEntry, update } from '@/api/beEntrusted/index';
-import {
-  getWarehouseList
+<script>
+  import OrderSearch from '@/views/entrust/components/order-search.vue';
+  import dictMixins from '@/mixins/dictMixins';
+  import Create from './components/create';
+  import SalesToProduction from '@/views/unacceptedProduct/components/salesToProduction.vue';
 
-  // queryKilnXCH
-} from '@/api/mes';
-export default {
-  components: {
-    OrderSearch,
-    Create,
-    SalesToProduction
-  },
-  mixins: [dictMixins],
-  data() {
-    return {
-      visible: false,
-      loading: false,
-      id: '',
-      current: null,
-      warehouseId: '',
-      warehouseList: []
-    };
-  },
-  computed: {
-    // 表格列配置
-    columns() {
-      return [
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'type',
-          label: '类型',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          slot: 'type'
-        },
-        {
-          prop: 'priority',
-          label: '紧急程度',
-          width: 90,
-          align: 'center',
-          showOverflowTooltip: true,
-          formatter: (row, column, cellValue) => {
-            return cellValue == 1 ? '一般' : cellValue == 2 ? '紧急' : '';
-          }
-        },
-        {
-          prop: 'code',
-          label: '编码',
-          align: 'center',
-          width: 160,
-          showOverflowTooltip: true,
-          slot: 'code'
-        },
-        {
-          prop: 'name',
-          label: '名称',
-          width: 130,
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          prop: 'workOrderCode',
-          label: '工单编码',
-          width: 160,
-          showOverflowTooltip: true,
-          align: 'center'
-        },
-        {
-          prop: 'procedureList',
-          width: 130,
-          showOverflowTooltip: true,
-
-          label: '工序',
-          align: 'center',
-          formatter: (row, column, cellValue) => {
-            return cellValue.map((item) => item.produceTaskName).toString();
-          }
-        },
-
-        // {
-        //   prop: 'a',
-        //   label: '关联名称',
-        //   align: 'center'
-        // },
-        {
-          prop: 'factoriesName',
-          label: '请托工厂',
-          align: 'center',
-          width: 130,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'pleaseEntrustDeptName',
-          label: '请托部门',
-          align: 'center',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'pleaseEntrustUserName',
-          label: '请托人',
-          align: 'center',
-          width: 80,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'beEntrustedFactoriesName',
-          label: '受托工厂',
-          align: 'center',
-          width: 130,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'beEntrustedDeptName',
-          label: '受托部门',
-          align: 'center',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'finishTime',
-          label: '完成时间',
-          align: 'center',
-          width: 150,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'describes',
-          label: '需求描述',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'status',
-          label: '状态',
-          align: 'center',
-          slot: 'status',
-          width: 80,
-          showOverflowTooltip: true,
-          formatter: (row, column, cellValue) => {
-            return cellValue == 0
-              ? '未接收'
-              : cellValue == 1
-              ? '已接收'
-              : cellValue == 2
-              ? '申请入库'
-              : '';
-          }
-        },
+  import { getList, warehouseEntry, update } from '@/api/beEntrusted/index';
+  import {
+    getWarehouseList
 
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 220,
-          align: 'center',
-          resizable: false,
-          fixed: 'right',
-          slot: 'action',
-          showOverflowTooltip: true
-        }
-      ];
-    }
-  },
-  created() {
-    this.requestDict('请托类型');
-    getWarehouseList().then((res) => {
-      this.warehouseList = res;
-    });
-  },
-  filters: {},
-  methods: {
-    /* 表格数据源 */
-    datasource({ page, limit, where }) {
-      return getList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
+    // queryKilnXCH
+  } from '@/api/mes';
+  export default {
+    components: {
+      OrderSearch,
+      Create,
+      SalesToProduction
     },
-    open(type, row) {
-      this.$refs.create.open(type, row);
+    mixins: [dictMixins],
+    data() {
+      return {
+        visible: false,
+        loading: false,
+        id: '',
+        current: null,
+        warehouseId: '',
+        warehouseList: []
+      };
     },
-    salesToProductionOpen(type) {
-      this.$refs.salesToProductionRef.open(
-        this.current.pleaseEntrustObjList,
-        type
-      );
+    computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'type',
+            label: '类型',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            slot: 'type'
+          },
+          {
+            prop: 'priority',
+            label: '紧急程度',
+            width: 90,
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1 ? '一般' : cellValue == 2 ? '紧急' : '';
+            }
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            width: 160,
+            showOverflowTooltip: true,
+            slot: 'code'
+          },
+          {
+            prop: 'name',
+            label: '名称',
+            width: 130,
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            prop: 'workOrderCode',
+            label: '工单编码',
+            width: 160,
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            prop: 'procedureList',
+            width: 130,
+            showOverflowTooltip: true,
+
+            label: '工序',
+            align: 'center',
+            formatter: (row, column, cellValue) => {
+              return cellValue.map((item) => item.produceTaskName).toString();
+            }
+          },
+
+          // {
+          //   prop: 'a',
+          //   label: '关联名称',
+          //   align: 'center'
+          // },
+          {
+            prop: 'factoriesName',
+            label: '请托工厂',
+            align: 'center',
+            width: 130,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'pleaseEntrustDeptName',
+            label: '请托部门',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'pleaseEntrustUserName',
+            label: '请托人',
+            align: 'center',
+            width: 80,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'beEntrustedFactoriesName',
+            label: '受托工厂',
+            align: 'center',
+            width: 130,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'beEntrustedDeptName',
+            label: '受托部门',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'finishTime',
+            label: '完成时间',
+            align: 'center',
+            width: 150,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'describes',
+            label: '需求描述',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            slot: 'status',
+            width: 80,
+            showOverflowTooltip: true,
+            formatter: (row, column, cellValue) => {
+              return cellValue == 0
+                ? '未接收'
+                : cellValue == 1
+                ? '已接收'
+                : cellValue == 2
+                ? '申请入库'
+                : '';
+            }
+          },
+
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 220,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ];
+      }
     },
-    update(id) {
-      update({ id, status: 1 }).then((res) => {
-        this.reload();
+    created() {
+      this.requestDict('请托类型');
+      getWarehouseList().then((res) => {
+        this.warehouseList = res;
       });
     },
-    openWarehouseEntry(id) {
-      this.id = id;
-      this.visible = true;
-    },
-    warehouseEntry() {
-      if (!this.warehouseId) {
-        this.$message.error('请选择仓库');
-        return;
+    filters: {},
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return getList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      open(type, row) {
+        this.$refs.create.open(type, row);
+      },
+      salesToProductionOpen(type) {
+        this.$refs.salesToProductionRef.open(
+          this.current.pleaseEntrustObjList,
+          type
+        );
+      },
+      update(id) {
+        update({ id, status: 1 }).then((res) => {
+          this.reload();
+        });
+      },
+      openWarehouseEntry(id) {
+        this.id = id;
+        this.visible = true;
+      },
+      warehouseEntry() {
+        if (!this.warehouseId) {
+          this.$message.error('请选择仓库');
+          return;
+        }
+        warehouseEntry({
+          id: this.id,
+          warehouseId: this.warehouseId
+        }).then((res) => {
+          this.reload();
+          this.visible = false;
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
       }
-      warehouseEntry({
-        id: this.id,
-        warehouseId: this.warehouseId
-      }).then((res) => {
-        this.reload();
-        this.visible = false;
-      });
-    },
-    /* 刷新表格 */
-    reload(where) {
-      this.$nextTick(() => {
-        this.$refs.table.reload({ page: 1, where });
-      });
     }
-  }
-};
+  };
 </script>
-  
-  <style lang="scss" scoped></style>
+
+<style lang="scss" scoped></style>

+ 40 - 42
src/views/emiFinished/index.vue

@@ -1,36 +1,37 @@
 <template>
-    <div class="ele-body">
-      <el-card shadow="never" v-loading="loading">
-        <order-search @search="reload" ref="searchRef"> </order-search>
-        <ele-pro-table
-          ref="table"
-          :columns="columns"
-          :datasource="datasource"
-          :selection.sync="selection"
-        >
-          <template v-slot:action="{ row }">
-            <el-popconfirm
-              class="ele-action"
-              title="确定要删除吗?"
-              @confirm="remove(row)"
-            >
-              <template v-slot:reference>
-                <el-link type="danger" :underline="false" icon="el-icon-delete">
-                  删除
-                </el-link>
-              </template>
-            </el-popconfirm>
-          </template>
-        </ele-pro-table>
-      </el-card>
-    </div>
-  </template>
-  
-  <script>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading">
+      <order-search @search="reload" ref="searchRef"> </order-search>
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :selection.sync="selection"
+        cache-key="emiFinished"
+      >
+        <template v-slot:action="{ row }">
+          <el-popconfirm
+            class="ele-action"
+            title="确定要删除吗?"
+            @confirm="remove(row)"
+          >
+            <template v-slot:reference>
+              <el-link type="danger" :underline="false" icon="el-icon-delete">
+                删除
+              </el-link>
+            </template>
+          </el-popconfirm>
+        </template>
+      </ele-pro-table>
+    </el-card>
+  </div>
+</template>
+
+<script>
   import OrderSearch from './components/search.vue';
   import dictMixins from '@/mixins/dictMixins';
-  
-  import { deleteLine,getList } from '@/api/emiFinished/index';
+
+  import { deleteLine, getList } from '@/api/emiFinished/index';
   export default {
     components: {
       OrderSearch
@@ -41,7 +42,7 @@
         loading: false,
         dialogVisible: false,
         current: null,
-        selection: [],
+        selection: []
       };
     },
     computed: {
@@ -83,7 +84,7 @@
             label: '型号',
             align: 'center'
           },
-       
+
           {
             prop: 'packingUnit',
             label: '包装单位',
@@ -93,7 +94,7 @@
             prop: 'produceRoutingName',
             label: '工艺路线名称',
             align: 'center',
-            width: 160,
+            width: 160
           },
           {
             prop: 'rootCategoryLevelName',
@@ -105,21 +106,21 @@
             label: '规格',
             align: 'center',
             width: 160,
-            showOverflowTooltip: true,
+            showOverflowTooltip: true
           },
           {
             prop: 'unit',
             label: '计量单位',
             align: 'center'
           },
-  
+
           {
             prop: 'createTime',
             label: '创建时间',
             align: 'center',
             width: 160
           },
-  
+
           {
             columnKey: 'action',
             label: '操作',
@@ -143,8 +144,6 @@
           size: limit,
           ...where
         });
-
-
       },
       remove(row) {
         let ids = row ? [row.id] : this.selection.map((item) => item.id);
@@ -161,7 +160,6 @@
       }
     }
   };
-  </script>
-  
-  <style lang="scss" scoped></style>
-  
+</script>
+
+<style lang="scss" scoped></style>

+ 200 - 188
src/views/exceptionManagement/exceptionList/index.vue

@@ -8,13 +8,14 @@
         :datasource="datasource"
         :selection.sync="selection"
         row-key="id"
+        cache-key="eceptionList"
       >
         <template v-slot:type="{ row }">
           <span> {{ getDictValue('异常类型', row.type + '') }}</span>
         </template>
         <template v-slot:approvalStatus="{ row }">
           <span
-          v-if="row.exceptionClose==2||!row.exceptionClose"
+            v-if="row.exceptionClose == 2 || !row.exceptionClose"
             :style="{
               color:
                 row.approvalStatus == 1
@@ -128,7 +129,7 @@
             type="primary"
             :underline="false"
             icon="el-icon-circle-plus-outline"
-            v-if="row.approvalStatus == 2&&row.exceptionClose==2"
+            v-if="row.approvalStatus == 2 && row.exceptionClose == 2"
             @click="dispose(row)"
           >
             处置
@@ -137,7 +138,10 @@
             type="primary"
             :underline="false"
             icon="el-icon-circle-plus-outline"
-            v-if="(row.approvalStatus == 0 || row.approvalStatus == 3)&&(!row.exceptionClose||row.exceptionClose==2)"
+            v-if="
+              (row.approvalStatus == 0 || row.approvalStatus == 3) &&
+              (!row.exceptionClose || row.exceptionClose == 2)
+            "
             @click="submit(row.id)"
           >
             提交
@@ -147,8 +151,13 @@
     </el-card>
     <Create ref="create" @refresh="reload" />
     <dispose ref="dispose" @refresh="reload" />
-    
-    <ele-modal :visible.sync="visible" width="20vw" append-to-body :maxable="true">
+
+    <ele-modal
+      :visible.sync="visible"
+      width="20vw"
+      append-to-body
+      :maxable="true"
+    >
       <el-form ref="form" label-width="100px" class="create-form">
         <el-form-item
           label="审核人"
@@ -177,199 +186,202 @@
     >
   </div>
 </template>
-  
-  <script>
-import OrderSearch from '../components/order-search.vue';
-import dictMixins from '@/mixins/dictMixins';
-import Create from '../components/create';
-import dispose from '../components/dispose';
 
-import { getList, remove,submit } from '@/api/exceptionManagement/index';
-import { listAllUserBind } from '@/api/bpm/index';
-import { btnList } from '../components/transition';
+<script>
+  import OrderSearch from '../components/order-search.vue';
+  import dictMixins from '@/mixins/dictMixins';
+  import Create from '../components/create';
+  import dispose from '../components/dispose';
 
-export default {
-  components: {
-    OrderSearch,
-    Create,dispose
-  },
-  mixins: [dictMixins],
-  data() {
-    return {
-      visible: false,
-      loading: false,
-      releasParams: {
-        teamId: '',
-        id: ''
-      },
-      selection:[],
-      userOptions: [],
-      viewId: '',
-      qualityInspector: ''
-    };
-  },
-  computed: {
-    // 表格列配置
-    columns() {
-      return [
-        {
-          columnKey: 'selection',
-          type: 'selection',
-          width: 45,
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'type',
-          label: '类型',
-          align: 'center',
-          slot: 'type'
-        },
-        {
-          prop: 'code',
-          label: '编码',
-          align: 'center',
-          slot: 'code'
-        },
-        {
-          prop: 'name',
-          label: '名称',
-          align: 'center'
-        },
-        {
-          prop: 'describes',
-          label: '异常描述',
-          align: 'center'
-        },
-        {
-          prop: 'disposalStatus',
-          label: '处置类型',
-          align: 'center',
-          formatter: (row, column, cellValue) => {
-            return btnList.find(item=>item.type==cellValue)?.name
-          }
-        },
-        {
-          prop: 'relationType',
-          label: '关联类型',
-          align: 'center',
-          formatter: (row, column, cellValue) => {
-            return cellValue == 1
-              ? '生产计划'
-              : cellValue == 2
-              ? '生产订单'
-              : '生产工单';
-          }
-        },
-        {
-          prop: 'relationCode',
-          label: '关联编码',
-          align: 'center'
-        },
-        // {
-        //   prop: 'a',
-        //   label: '关联名称',
-        //   align: 'center'
-        // },
+  import { getList, remove, submit } from '@/api/exceptionManagement/index';
+  import { listAllUserBind } from '@/api/bpm/index';
+  import { btnList } from '../components/transition';
 
-        {
-          prop: 'createUserName',
-          label: '创建人',
-          align: 'center'
+  export default {
+    components: {
+      OrderSearch,
+      Create,
+      dispose
+    },
+    mixins: [dictMixins],
+    data() {
+      return {
+        visible: false,
+        loading: false,
+        releasParams: {
+          teamId: '',
+          id: ''
         },
+        selection: [],
+        userOptions: [],
+        viewId: '',
+        qualityInspector: ''
+      };
+    },
+    computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'type',
+            label: '类型',
+            align: 'center',
+            slot: 'type'
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            slot: 'code'
+          },
+          {
+            prop: 'name',
+            label: '名称',
+            align: 'center'
+          },
+          {
+            prop: 'describes',
+            label: '异常描述',
+            align: 'center'
+          },
+          {
+            prop: 'disposalStatus',
+            label: '处置类型',
+            align: 'center',
+            formatter: (row, column, cellValue) => {
+              return btnList.find((item) => item.type == cellValue)?.name;
+            }
+          },
+          {
+            prop: 'relationType',
+            label: '关联类型',
+            align: 'center',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1
+                ? '生产计划'
+                : cellValue == 2
+                ? '生产订单'
+                : '生产工单';
+            }
+          },
+          {
+            prop: 'relationCode',
+            label: '关联编码',
+            align: 'center'
+          },
+          // {
+          //   prop: 'a',
+          //   label: '关联名称',
+          //   align: 'center'
+          // },
 
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center'
-        },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center'
+          },
 
-        {
-          prop: 'approvalStatus',
-          label: '状态',
-          align: 'center',
-          slot: 'approvalStatus'
-        },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center'
+          },
 
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 240,
-          align: 'center',
-          resizable: false,
-          fixed: 'right',
-          slot: 'action',
-          showOverflowTooltip: true
-        }
-      ];
-    }
-  },
-  created() {
-    this.requestDict('异常类型');
-    this.userOptions = [];
-    listAllUserBind().then((data) => {
-      this.userOptions.push(...data);
-    });
-  },
-  filters: {},
-  methods: {
-    //处置
-    dispose(row) {
-      this.$refs.dispose.open(row);
-    },
-    /* 表格数据源 */
-    datasource({ page, limit, where }) {
-      return getList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-    open(type, row) {
-      this.$refs.create.open(type, row);
+          {
+            prop: 'approvalStatus',
+            label: '状态',
+            align: 'center',
+            slot: 'approvalStatus'
+          },
+
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 240,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ];
+      }
     },
-    remove(id) {
-      let ids = id || this.selection.map((item) => item.id);
-      remove(ids).then((res) => {
-        this.$message.success('删除' + res);
-        this.reload();
+    created() {
+      this.requestDict('异常类型');
+      this.userOptions = [];
+      listAllUserBind().then((data) => {
+        this.userOptions.push(...data);
       });
     },
-    
-    submit(id) {
-      if(id){
-        this.visible=true
-        this.viewId=id
-        return;
-      }
-      if (!this.qualityInspector) {
-        this.$message.error('审核人不能为空');
-        return;
+    filters: {},
+    methods: {
+      //处置
+      dispose(row) {
+        this.$refs.dispose.open(row);
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return getList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      open(type, row) {
+        this.$refs.create.open(type, row);
+      },
+      remove(id) {
+        let ids = id || this.selection.map((item) => item.id);
+        remove(ids).then((res) => {
+          this.$message.success('删除' + res);
+          this.reload();
+        });
+      },
+
+      submit(id) {
+        if (id) {
+          this.visible = true;
+          this.viewId = id;
+          return;
+        }
+        if (!this.qualityInspector) {
+          this.$message.error('审核人不能为空');
+          return;
+        }
+        submit({
+          businessId: this.viewId,
+          approvalUserId: this.qualityInspector
+        }).then((res) => {
+          this.$message.success('提交' + res.message);
+          this.reload();
+          this.visible = false;
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
       }
-      submit({businessId: this.viewId,approvalUserId:this.qualityInspector}).then((res) => {
-        this.$message.success('提交' + res.message);
-        this.reload();
-        this.visible=false
-      });
-      
-    },
-    /* 刷新表格 */
-    reload(where) {
-      this.$nextTick(() => {
-        this.$refs.table.reload({ page: 1, where });
-      });
     }
-  }
-};
+  };
 </script>
-  
-  <style lang="scss" scoped></style>
+
+<style lang="scss" scoped></style>

+ 1 - 1
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -979,7 +979,7 @@
         newList: [],
         stepsList: [],
         selection: [],
-        cacheKeyUrl: 'mes_produce_jobBooking_semiProductJobBom',
+        cacheKeyUrl: 'mes_produce_jobBooking_BatchSemiProductJobBom',
         weight: 0,
         reportWeight: 0,
 

+ 28 - 284
src/views/produce/components/jobBooking/index.vue

@@ -967,17 +967,15 @@
           return this.$message.warning('请选择执行时间');
         }
 
-        // for (let i = 0; i < this.List.length; i++) {
-        //   console.log('1231321313');
-        //   console.log(this.List[i].packInfo, '1231321313');
-        //   if (
-        //     this.List[i].packInfo &&
-        //     Object.keys(this.List[i].packInfo).length === 0
-        //   ) {
-        //     this.loading.close();
-        //     return this.$message.warning('请到主数据配置包装规格');
-        //   }
-        // }
+        for (let i = 0; i < this.List.length; i++) {
+          if (
+            this.List[i].packInfo &&
+            Object.keys(this.List[i].packInfo).length === 0
+          ) {
+            this.loading.close();
+            return this.$message.warning('请到主数据配置包装规格');
+          }
+        }
 
         // if(this.taskObj.type !=6){
         //   if(this.reportNeedFeed==1&&!(this.List[0].semiProductList.length>0||this.List[0].pickOutInList.length>0)){
@@ -1052,16 +1050,26 @@
         // }
 
         if (this.clientEnvironmentId != 2) {
-          let succ = this.List.some((L) => {
-            return L.productRecycleList.length > 0;
-          });
-
-          if (succ) {
-            const isRecycle = await this.checkRecycle();
-            if (!isRecycle) {
-              return false;
+          for (let i = 0; i < this.List.length; i++) {
+            for (let j = 0; j < this.List[i].productRecycleList.length; j++) {
+              if (!this.List[i].productRecycleList[j].warehouseId) {
+                const isRecycle = await this.checkRecycle();
+                if (!isRecycle) {
+                  return false;
+                }
+              }
             }
           }
+
+          // let succ = this.List.some((L) => {
+          //   return L.productRecycleList.length > 0;
+          // });
+          // if (succ) {
+          //   const isRecycle = await this.checkRecycle();
+          //   if (!isRecycle) {
+          //     return false;
+          //   }
+          // }
         }
 
         console.log(this.item, '9999999999');
@@ -1164,252 +1172,8 @@
         // });
       },
 
-      async checkChooseData(dataList, type, chooseType) {
-        if (chooseType == 'choose') {
-          for (let i = 0; i < dataList.length; i++) {
-            if (!dataList[i].extInfo.engrave) {
-              this.$message.warning('请输入刻码!');
-              return;
-            }
-          }
-        } else {
-          for (let i = 0; i < dataList.length; i++) {
-            if (dataList[i].semiProductList.length > 0) {
-              for (let j = 0; j < dataList[i].semiProductList.length; j++) {
-                if (!dataList[i].semiProductList[j].extInfo.engrave) {
-                  this.$message.warning('请输入刻码!');
-                  return;
-                }
-              }
-            }
-          }
-
-          if (chooseType == 'choose') {
-            dataList.forEach((item) => {
-              this.List.forEach((it) => {
-                it.semiProductList.forEach((fitem) => {
-                  if (fitem.extInfo.id == item.extInfo.id) {
-                    fitem.extInfo.engrave = item.extInfo.engrave;
-                    fitem.extInfo.confirm = item.extInfo.confirm;
-                  }
-                });
-              });
-            });
-          }
-
-          // for (let i = 0; i < this.List[0].semiProductList.length; i++) {
-          //   if (!this.List[0].semiProductList[i].extInfo.engrave) {
-          //     this.$message.warning('请输入刻码!');
-          //     return;
-          //   }
-          // }
-        }
-        // for (let i = 0; i < dataList.length; i++) {
-        //   if (!dataList[i].extInfo.engrave) {
-        //     this.$message.warning('请输入刻码!');
-        //     return;
-        //   }
-        // }
-
-        // this.List[0].semiProductList = dataList;
-
-        console.log('465646546', this.List);
-
-        this.loading = this.$loading({
-          lock: true,
-          text: '加载中',
-          background: 'rgba(0, 0, 0, 0.7)'
-        });
-
-        let arr = this.List.filter((L) => L.workReportInfo.executorTime);
-        if (!arr.length) {
-          this.loading.close();
-          return this.$message.warning('请选择执行时间');
-        }
-
-        // if(this.taskObj.type !=6){
-        //   if(this.reportNeedFeed==1&&!(this.List[0].semiProductList.length>0||this.List[0].pickOutInList.length>0)){
-        //     this.loading.close();
-        //     return this.$message.warning('请先投料再报工');
-        //   }
-        // }
-
-        let bol2;
-        bol2 = this.List.every((e) => {
-          return (
-            // e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
-            e.workReportInfo['formedNum'] != ''
-          );
-        });
-
-        // if (!bol2) {
-        //   this.$message.warning('请输入合格品数量');
-        //   this.loading.close();
-        //   return false;
-        // }
-
-        // 预制体
-
-        let wId;
-        let bol = true;
-        let _i;
-        this.List.forEach((L) => {
-          if (
-            L.semiProductList.length > 0 &&
-            this.taskObj.type != 4 &&
-            L.singleReport == 1
-          ) {
-            bol = L.semiProductList.every((e, i) => {
-              _i = i + 1;
-              wId = L.code;
-
-              if (this.taskObj.type == 6) {
-                return (
-                  Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
-                  e.extInfo.taskId
-                );
-              } else {
-                if (e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
-                  return (
-                    Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
-                    e.extInfo.taskId &&
-                    e.extInfo.reportWeight
-                  );
-                } else {
-                  return (
-                    Object.prototype.hasOwnProperty.call(
-                      e.extInfo,
-                      'notType'
-                    ) && e.extInfo.notType
-                  );
-                }
-              }
-            });
-          }
-        });
-
-        // if (!bol) {
-        //   this.$message.warning(`请完善工单${wId}第${_i}处置方式`);
-        //   this.loading.close();
-
-        //   return false;
-        // }
-
-        if (this.clientEnvironmentId != 2) {
-          let succ = this.List.some((L) => {
-            return L.productRecycleList.length > 0;
-          });
-
-          if (succ) {
-            const isRecycle = await this.checkRecycle();
-            if (!isRecycle) {
-              return false;
-            }
-          }
-        }
-
-        console.log(this.item, '9999999999');
-
-        return;
-        if (
-          this.taskObj.type == 4 &&
-          this.clientEnvironmentId != 3 &&
-          this.clientEnvironmentId != 2 &&
-          this.List[0].singleReport !== 1
-        ) {
-          this.checkPack();
-
-          // if (!isPack) {
-          // 	return false
-          // }
-        }
-        console.log('4444444444', this.List);
-        if (this.taskObj.type == 1) {
-          const isCache = await this.checkCache(type);
-
-          if (!isCache) {
-            return false;
-          }
-        }
-
-        if (
-          this.clientEnvironmentId == 3 &&
-          type == 2 &&
-          this.taskObj.type == 6
-        ) {
-          this.List.forEach((L) => {
-            if (L.singleReport == 0) {
-              L.semiProductList = [];
-            }
-          });
-          console.log('ashsaoghaoghoasg');
-        }
-        let isSemiProduct = false;
-        this.List.map((semi) => {
-          if (
-            semi.semiProductList.length == 0 &&
-            semi.singleReport == 1 &&
-            semi.currentTaskDiagram.isFirstTask == 1 &&
-            this.clientEnvironmentId != 3
-          ) {
-            isSemiProduct = true;
-            this.loading.close();
-            setTimeout(() => {
-              this.$message.warning({
-                message: '请工单编号:' + semi.code + '先创建在制品',
-                key: semi.code // 使用当前时间作为key,确保唯一性
-              });
-            }, 500);
-          }
-
-          if (semi.semiProductList.length == 0 && semi.singleReport == 0) {
-            semi.semiProductList.map((ditem) => {
-              if (ditem.extInfo.batchReportInfo) {
-                ditem.extInfo.batchReportInfo.map((baItem) => {
-                  let idvalue = baItem.deviceId
-                    ? baItem.deviceId.split('/')
-                    : '';
-                  baItem.deviceId = idvalue ? idvalue[0] : '';
-                });
-              }
-              if (ditem.extInfo.notBatchReportInfo) {
-                ditem.extInfo.notBatchReportInfo.map((noItem) => {
-                  let idvalue = noItem.deviceId
-                    ? noItem.deviceId.split('/')
-                    : '';
-                  noItem.deviceId = idvalue ? idvalue[0] : '';
-                });
-              }
-            });
-          }
-        });
-        if (isSemiProduct) {
-          this.loading.close();
-          return;
-        }
-
-        console.log(this.List, 'this.List');
-        // this.loadingBtn = true;
-        // jobSave(this.List)
-        //   .then((res) => {
-        //     this.loadingBtn = false;
-        //     this.loading.close();
-        //     this.$message.success('报工成功');
-        //     this.getList(this.idsList);
-        //   })
-        //   .catch(() => {
-        //     this.loadingBtn = false;
-        //     this.loading.close();
-        //   })
-        //   .finally(() => {
-        //     setTimeout(function () {
-        //       // this.loading.close();
-        //     }, 3000);
-        //   });
-      },
-
       checkRecycle() {
-        this.loading.close();
+        // this.loading.close();
 
         return new Promise((resolve) => {
           this.$confirm('是否跳过副产品回收处置!', '提示', {
@@ -1424,26 +1188,6 @@
               resolve(false);
             });
         });
-
-        // for (let i = 0; i < this.List.length; i++) {
-        //   for (let j = 0; j < this.List[i].productRecycleList.length; j++) {
-        //     if (!this.List[i].productRecycleList[j].warehouseId) {
-        //       return new Promise((resolve) => {
-        //         this.$confirm('是否跳过副产品回收处置!', '提示', {
-        //           confirmButtonText: '确定',
-        //           cancelButtonText: '取消',
-        //           type: 'warning'
-        //         })
-        //           .then(() => {
-        //             resolve(true);
-        //           })
-        //           .catch(() => {
-        //             resolve(false);
-        //           });
-        //       });
-        //     }
-        //   }
-        // }
       },
 
       checkCache(type) {

+ 1 - 0
src/views/produce/components/workPlan/components/sampleListDialog.vue

@@ -234,6 +234,7 @@
         this.tableData = [];
         this.rowIndex = index;
         this.type = type;
+        console.log(this.type, '13213113');
         // console.log(list, 'lklllllllllllllllllkkkkkkkkkkkkkkkkkkkkk', list[0].qualityResults);
         //如果质检项qualitySampleTemplateList只有一条数据且质检结果是让步接收
         if (list[0].qualitySampleTemplateList.length == 1) {

+ 2 - 1
src/views/produce/components/workPlan/components/toolList.vue

@@ -187,7 +187,8 @@
           //     showOverflowTooltip: true
           // },
         ],
-        data: []
+        data: [],
+        type: ''
       };
     },
     methods: {

+ 50 - 16
src/views/produce/components/workPlan/edit.vue

@@ -152,7 +152,7 @@
   // import QualityContentTabs from './components/QualityContentTabs.vue';
   import QualityContentTabs from './components/newQualityContentTabs.vue';
 
-  import { getCode } from '@/api/login';
+  import { getCode, getCodeList } from '@/api/login';
   import {
     save,
     update,
@@ -277,11 +277,21 @@
       // 样品清单
       sampleList: {
         handler(newVal) {
+          if (!newVal || newVal.length == 0) {
+            return;
+          }
           // 计算重量跟数量
           this.calculate(newVal);
         },
         deep: true,
         immediate: true
+      },
+      'form.qualityResults': {
+        handler(newVal, oldVal) {
+          if (!newVal && oldVal) {
+            this.form.qualityResults = oldVal;
+          }
+        }
       }
     },
 
@@ -351,7 +361,7 @@
           this.$set(this.form, 'noQualificationRate', '100%');
           this.$set(this.form, 'qualityResults', 2);
         }
-   
+
         this.$set(
           this.form,
           'sampleQualificationRate',
@@ -534,8 +544,11 @@
         let currentNum = sampleCount - list.length;
         let currentNum1 = sampleCount;
         // console.log(this.selectedList);
-
-        for (const item of list) {
+        let count = list ? list.length : 0;
+        const codeList = await this.batchCodes(count);
+        for (const [index, item] of list.entries()) {
+          console.log(index, 'index');
+          console.log(item, 'item');
           const qualitySampleTemplateList = item.qualitySampleTemplateList
             ?.length
             ? JSON.parse(JSON.stringify(item.qualitySampleTemplateList))
@@ -552,7 +565,8 @@
             dataList.push({
               ...item,
               measureQuantity: item.measureQuantity, //作为计量数量
-              sampleCode: await this.getSampleCode(),
+              // sampleCode: await this.getSampleCode(),
+              sampleCode: codeList[index],
               qualitySampleTemplateList
             });
           }
@@ -563,16 +577,18 @@
       },
       // 切换检验方式为全检后生成样品
       changeGetSampleList(list) {
+        this.$message.closeAll();
         this.$message('正在生成样品清单');
 
-        // 计量类型1是数量,2是重量
-        if (this.form.inspectionStandards == 1) {
-          this.createSampleList(list);
-        }
-        if (this.form.inspectionStandards == 2) {
-          this.updatePackingList(list, this.form.total);
-          // this.handleWeightFullSample(this.form.total);
-        }
+        // // 计量类型1是数量,2是重量
+        // if (this.form.inspectionStandards == 1) {
+        //   this.createSampleList(list);
+        // }
+        // if (this.form.inspectionStandards == 2) {
+        //   this.updatePackingList(list, this.form.total);
+        //   // this.handleWeightFullSample(this.form.total);
+        // }
+        this.updatePackingList(list, this.form.total);
       },
 
       //输入取样数量
@@ -889,6 +905,7 @@
               return; // 若计量单位为重量,还需验证总重量是否足够
             await this.getNewFullSampleList(
               Math.ceil(sampleCount),
+              // sampleCount,
               measureQ,
               unit,
               specifications
@@ -1458,7 +1475,10 @@
 
         const result = [];
         let remainingCount = sampleCount;
-
+        console.log(remainingCount, 'remainingCount ========');
+        let count = Math.ceil(remainingCount);
+        const codeList = await this.batchCodes(count);
+        let codeIdx = 0;
         // 尽可能均匀地从各条目取样
         while (remainingCount > 0) {
           // 按剩余可取样比例排序
@@ -1471,6 +1491,7 @@
           let distributed = false;
 
           for (const item of items) {
+            // let values = remainingCount > 1 ? 1 : remainingCount;
             if (
               !isUnitMismatch ||
               (item.remainingQuantity >= sampleQuantity && remainingCount > 0)
@@ -1488,13 +1509,16 @@
                 qualitySampleTemplateList = item.qualitySampleTemplateList;
               }
               // 添加到结果数组
-              let sampleCode = await this.getSampleCode();
+              // let sampleCode = await this.getSampleCode();
+              let sampleCode = codeList[codeIdx];
               if (
                 this.form.conditionType == 1 &&
                 this.form.inspectionStandards == 1
               ) {
+                // console.log('进来1', values);
                 result.push({
                   ...item,
+                  // measureQuantity: values,
                   measureQuantity: 1,
                   sampleCode,
                   qualitySampleTemplateList
@@ -1504,6 +1528,7 @@
                 (this.form.inspectionStandards == 1 ||
                   this.form.inspectionStandards == 2)
               ) {
+                console.log('进来2');
                 let weight = (item.weight / item.maxPossible).toFixed(2);
                 result.push({
                   ...item,
@@ -1518,7 +1543,8 @@
               if (!isUnitMismatch) {
                 item.remainingQuantity -= sampleQuantity;
               }
-              remainingCount--;
+              remainingCount = (remainingCount - 1).toFixed(2);
+              codeIdx++;
               distributed = true;
             }
           }
@@ -1744,6 +1770,14 @@
         this.sampleNumber = this.sampleList.length;
       },
 
+      // 批量生成编码 4444444 getCodeList
+      async batchCodes(count) {
+        if (count <= 0) return;
+        let params = { count };
+        const res = await getCodeList('sample_code', params);
+        return res;
+      },
+
       //计算合格率
       countQualityResults() {
         let sampleList = this.sampleList; //样品清单

+ 19 - 10
src/views/produce/components/workPlan/index.vue

@@ -50,8 +50,11 @@
           <!--          <div v-else><el-tag size="mini">自建</el-tag></div>-->
           <!--        </template>-->
           <template v-slot:sourceCode="{ row }">
-            <div v-if="row.qualityType == 1">{{ row.qualityPlanCode }}</div>
-            <div v-if="row.qualityType == 2">{{ row.workOrderCode }}</div>
+            <div>{{
+              row.qualityPlanCode ? row.qualityPlanCode : row.workOrderCode
+            }}</div>
+            <!-- <div v-if="row.qualityType == 1">{{ row.qualityPlanCode }}</div>
+            <div v-if="row.qualityType == 2">{{ row.workOrderCode }}</div> -->
           </template>
 
           <template v-slot:files="scope">
@@ -219,7 +222,13 @@
             label: '质检人',
             align: 'center',
             width: 120,
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            formatter: (row) => {
+              if (row.qualityName) {
+                return row.qualityName;
+              }
+              return row.qualityNames || '';
+            }
           },
           {
             prop: 'qualityTime',
@@ -481,13 +490,13 @@
       },
 
       async openEdit(type, row) {
-        // if (type == 'edit') {
-        //   const code = await verificationQualityInspector(row.id);
-        //   if (code == '-1') {
-        //     console.log('不是报工人');
-        //     return;
-        //   }
-        // }
+        if (type == 'edit') {
+          const code = await verificationQualityInspector(row.id);
+          if (code == '-1') {
+            console.log('不是报工人');
+            return;
+          }
+        }
 
         const req = {
           workOrderId: row.id,

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

@@ -30,6 +30,7 @@
         autoAmendPage
         :parse-data="parseData"
         @columns-change="handleColumnChange"
+        cache-key="productOrder"
       >
         <template v-slot:toolbar>
           <!-- <el-button type="success">新建</el-button> -->

+ 11 - 5
src/views/produceOrder/workReport.vue

@@ -223,7 +223,11 @@
               ></footBtn>
             </el-tab-pane>
 
-            <el-tab-pane label="生产明细"> </el-tab-pane>
+            <el-tab-pane label="生产明细">
+              <productionDetails
+                :workOrderInfo="workOrderInfo"
+              ></productionDetails>
+            </el-tab-pane>
 
             <el-tab-pane label="投料详情">
               <feedDetails
@@ -295,6 +299,7 @@
   import outsourceList from '@/views/produce/components/outsourcing/outsourceList.vue';
   import workStep from '@/views/produce/components/workStep/index.vue';
   import createError from '@/views/produce/components/createError.vue';
+  import productionDetails from '../workOrderList/components/productionDetails.vue';
   import { parameterGetByCode } from '@/api/system/dictionary-data';
   import {
     getByTaskId,
@@ -303,8 +308,7 @@
     checkOutsourceMaterial,
     listTask,
     factoryworkstationPage,
-    nextTask,
-    produceDetail
+    nextTask
   } from '@/api/produce/index';
   import { getTaskInstanceList } from '@/api/produce/job';
   import { workorderInfo } from '@/api/produceOrder/index.js';
@@ -333,7 +337,8 @@
       createError,
       Info,
       feedDetails,
-      jobDetails
+      jobDetails,
+      productionDetails
     },
     data() {
       return {
@@ -389,7 +394,8 @@
           bomCategoryId: null
         },
         newId: '',
-        curTaskObj: null
+        curTaskObj: null,
+        produceList: []
       };
     },
 

+ 14 - 6
src/views/sample/index.vue

@@ -17,6 +17,7 @@
         :columns="columns"
         :datasource="datasource"
         :pageSize="20"
+        cache-key="sample"
       >
         <!-- 表头工具栏 -->
 
@@ -40,6 +41,9 @@
             >{{ row.sampleCode }}</el-link
           >
         </template>
+        <template v-slot:status="{ row }">
+          <span>{{ getStatusLabel(row) }}</span>
+        </template>
 
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
@@ -235,13 +239,9 @@
           {
             label: '状态:',
             value: 'status',
+            slot: 'status',
             type: 'select',
-            placeholder: '',
-            planList: [
-              { value: 0, label: '待处置' },
-              { value: 1, label: '部分处置' },
-              { value: 2, label: '处置完成' }
-            ]
+            placeholder: ''
           }
         ];
       }
@@ -271,6 +271,14 @@
         this.reload(where);
       },
 
+      getStatusLabel(row) {
+        const res = this.disposeStatusList.filter(
+          (item) => item.value == row.status
+        );
+
+        return res && res.length != 0 ? res[0].label : '';
+      },
+
       reload(where = {}) {
         this.$nextTick(() => {
           where.conditionType =

+ 6 - 1
src/views/warehousing/index.vue

@@ -4,7 +4,12 @@
       <search @search="reload" ref="searchRef"> </search>
 
       <!-- 数据表格 -->
-      <ele-pro-table ref="table" :columns="columns" :datasource="datasource">
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="warehouseIndex"
+      >
         <template v-slot:totalCount="{ row }">
           {{ row.totalCount }} {{ row.measuringUnit }}
         </template>

+ 92 - 100
src/views/workOrderList/components/productionDetails.vue

@@ -1,121 +1,121 @@
 <template>
-    <div class="bottom_box">
-
-        <div v-for="(item, index) in produceList" :key="index" class="detail-list">
-            <div class="name">{{ item.taskName }} <span v-if="index == 0" style="color: #157A2C; font-size: 32rpx;">
-                    (首工序)</span> </div>
-            <div style="display: flex;">
-                <div class="list rx-bc" @click="handDetails(item)">
-                    <div class="lable rx-cc">
-                        待投料数量
-                    </div>
-                    
-                    <div class="rx-ec" v-if="item.firstTaskDetails.length > 0">
-                        <span style="color: #157A2C; font-size: 24rpx;"> 明细</span>
-                        <image class="arrow_right2" src="~@/static/pda/arrow_right2.svg"></image>
-                    </div>
-
-                    <div class="rx-ec" v-else>
-                        {{ item.waitFeedNum }}
-                        <image class="arrow_right2" src="~@/static/pda/arrow_right2.svg"></image>
-                    </div>
-                </div>
-
-                <div class="list rx-bc" @click="handDetails(item)">
-                    <div class="lable rx-cc">
-                        <!-- <image class="icon" src="~@/static/pda/check-square.svg"></image> -->
-                        已投料数量
-                    </div>
-
-                    <div class="rx-ec" v-if="item.firstTaskDetails.length > 0">
-                        <span style="color: #157A2C; font-size: 24rpx;"> 明细</span>
-                    </div>
+  <div class="bottom_box">
+    <div v-for="(item, index) in produceList" :key="index" class="detail-list">
+      <div class="name"
+        >{{ item.taskName }}
+        <span v-if="index == 0" style="color: #157a2c; font-size: 32rpx">
+          (首工序)</span
+        >
+      </div>
+      <div style="display: flex">
+        <div class="list rx-bc" @click="handDetails(item)">
+          <div class="lable rx-cc"> 待投料数量 </div>
+
+          <div class="rx-ec" v-if="item.firstTaskDetails.length > 0">
+            <span style="color: #157a2c; font-size: 24rpx"> 明细</span>
+            <image
+              class="arrow_right2"
+              src="~@/static/pda/arrow_right2.svg"
+            ></image>
+          </div>
+
+          <div class="rx-ec" v-else>
+            {{ item.waitFeedNum }}
+            <image
+              class="arrow_right2"
+              src="~@/static/pda/arrow_right2.svg"
+            ></image>
+          </div>
+        </div>
 
-                    <div class="rx-ec" v-else>
-                        {{ item.feedNum }}
+        <div class="list rx-bc" @click="handDetails(item)">
+          <div class="lable rx-cc">
+            <!-- <image class="icon" src="~@/static/pda/check-square.svg"></image> -->
+            已投料数量
+          </div>
 
-                    </div>
-                </div>
+          <div class="rx-ec" v-if="item.firstTaskDetails.length > 0">
+            <span style="color: #157a2c; font-size: 24rpx"> 明细</span>
+          </div>
 
+          <div class="rx-ec" v-else>
+            {{ item.feedNum }}
+          </div>
+        </div>
 
-                <div class="list rx-bc">
-                    <div class="lable rx-cc">
-                        <!-- <image class="icon" src="~@/static/pda/target.svg"></image> -->
-                        已报工数量
-                    </div>
+        <div class="list rx-bc">
+          <div class="lable rx-cc">
+            <!-- <image class="icon" src="~@/static/pda/target.svg"></image> -->
+            已报工数量
+          </div>
 
-                    <div class="rx-ec">
-                        {{ item.reportedNum }}
-                    </div>
-                </div>
-            </div>
+          <div class="rx-ec">
+            {{ item.reportedNum }}
+          </div>
         </div>
-
+      </div>
     </div>
+  </div>
 </template>
 
 <script>
-import { produceDetail } from "@/api/workOrderList";
-export default {
+  import { produceDetail } from '@/api/workOrderList';
+  export default {
     data() {
-        return {
-
-            produceList: [],
-            id:''
-        }
+      return {
+        produceList: [],
+        id: ''
+      };
     },
     props: {
-        workOrderInfo: {
-            type: Object,
-            default: () => { }
-        },
+      workOrderInfo: {
+        type: Object,
+        default: () => {}
+      }
     },
     // created() {
     //     this.produce();
     // },
     watch: {
-        workOrderInfo: {
-            handler(newVal, oldVal) {
-                this.id =newVal.id;
-                this.produce()
-            },
-            deep: true,
-            immediate: true
-        }
+      workOrderInfo: {
+        handler(newVal, oldVal) {
+          this.id = newVal.id;
+          this.produce();
+        },
+        deep: true,
+        immediate: true
+      }
     },
     methods: {
-        produce() {
-            // console.log(this.workOrderInfo,99999999);
-
-            produceDetail(this.id).then(res => {
-                console.log(res, 'res');
-                this.produceList = res.produceDetail
-            })
-        },
-
-
+      produce() {
+        // console.log(this.workOrderInfo,99999999);
+
+        produceDetail(this.id).then((res) => {
+          console.log(res, 'res');
+          this.produceList = res.produceDetail;
+        });
+      }
     }
-}
+  };
 </script>
 
 <style lang="scss" scoped>
-.bottom_box {
+  .bottom_box {
     // display: flex;
     // justify-content: space-between;
     // background: #fff;
-}
-.list{
+  }
+  .list {
     width: 33%;
     border: 1px solid #e3e5e5;
-
-}
-.rx-bc{
+  }
+  .rx-bc {
     justify-content: flex-start;
-}
-.rx-ec{
+  }
+  .rx-ec {
     padding-left: 20px;
-}
-.lable {
+  }
+  .lable {
     width: 98px;
     height: 32px;
     text-align: center;
@@ -123,24 +123,16 @@ export default {
     font-size: 12px;
     border-right: 1px solid #e3e5e5;
     flex-shrink: 0;
-}
+  }
 
-.detail-list{
+  .detail-list {
     width: 100%;
-}
+  }
 
-.name{
+  .name {
     padding: 10px 0;
     font-size: 14px;
     font-weight: bold;
     color: #157a2c;
-}
-
-
-
-
-
-
-
-
-</style>
+  }
+</style>