Просмотр исходного кода

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dev

lucw 9 месяцев назад
Родитель
Сommit
d48289dd66

+ 10 - 0
src/api/produce/picking.js

@@ -78,3 +78,13 @@ export async function getOutindetailtwo(params) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+//出库单详情
+
+export async function getOutboundDetail(params) {
+  const res = await request.get(`/mes/pickorder/outStorageDetail`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 43 - 16
src/views/produce/components/feeding/components/workOrderBom.vue

@@ -3,30 +3,34 @@
     <div class="material">
       <div class="content_table">
         <div class="item rx-sc">
-          <div class="rx ww50">
+          <div class="rx ww33">
             <div class="lable rx-cc">工单编号</div>
-            <div class="content">
+            <div class="content" :title="item.code">
               {{ item.code }}
             </div>
           </div>
 
-          <div class="rx ww30">
+          <div class="rx ww33">
             <div class="lable rx-cc">产品编码</div>
-            <div class="content">{{ item.productCode }}</div>
+            <div class="content" :title="item.productCode">{{
+              item.productCode
+            }}</div>
           </div>
 
-          <div class="rx ww20">
-            <div class="lable rx-cc">批次号</div>
-            <div class="content">{{ item.batchNo }}</div>
+          <div class="rx ww33">
+            <div class="lable rx-cc ww60">批次号</div>
+            <div class="content" :title="item.batchNo">{{ item.batchNo }}</div>
           </div>
         </div>
 
         <div class="item rx-sc">
-          <div class="rx ww50">
+          <div class="rx ww33">
             <div class="lable rx-cc">产品名称</div>
-            <div class="content">{{ item.productName }}</div>
+            <div class="content" :title="item.productName">{{
+              item.productName
+            }}</div>
           </div>
-          <div class="rx ww30">
+          <div class="rx ww33">
             <div class="lable rx-cc">生产数量</div>
             <div class="content rx-sc">
               <div>{{ item.formingNum }}</div>
@@ -34,7 +38,7 @@
             </div>
           </div>
 
-          <div class="rx ww20">
+          <div class="rx ww33">
             <div class="lable rx-cc ww60">重量</div>
             <div class="content content_num">
               <div>{{ item.formingWeight }}</div>
@@ -44,7 +48,7 @@
         </div>
 
         <div class="item rx-sc">
-          <div class="rx ww50">
+          <div class="rx ww33">
             <div class="lable rx-cc">生产编号</div>
             <div class="content" :title="item.productionCodes">{{
               item.productionCodes
@@ -57,7 +61,7 @@
             </div>
           </div> -->
 
-          <div class="rx ww30">
+          <div class="rx ww33">
             <div class="lable rx-cc">委外状态</div>
             <div v-if="item.outsourceStatus">
               <div class="content" v-if="item.outsourceStatus == 1">未委外</div>
@@ -74,7 +78,7 @@
             </div>
           </div>
 
-          <div class="rx ww20">
+          <div class="rx ww33">
             <div class="lable rx-cc ww60">报工类型</div>
             <div class="content content_num">
               <div>{{ item.singleReport == 1 ? '单个报工' : '批量报工' }}</div>
@@ -86,13 +90,32 @@
             <span v-if="row.outsourceStatus == 2">委外中</span>
             <span v-if="row.outsourceStatus == 3">完成委外-未质检</span> -->
 
-        <div class="item rx-sc" v-if="!isDetails">
-          <div class="rx ww50">
+        <div class="item rx-sc">
+          <div class="rx ww33" v-if="!isDetails">
             <div class="lable rx-cc">最新工单状态</div>
             <div class="content rx-sc">
               <div>{{ sumStatus(item) }}</div>
             </div>
           </div>
+
+          <div class="rx ww33" v-if="item.model">
+            <div class="lable rx-cc">型号</div>
+            <div class="content" :title="item.model">{{ item.model }}</div>
+          </div>
+
+          <div class="rx ww33" v-else>
+            <div class="lable rx-cc">型号</div>
+            <div class="content" :title="item.modelType">{{
+              item.modelType
+            }}</div>
+          </div>
+
+          <div class="rx ww33">
+            <div class="lable rx-cc ww60">规格</div>
+            <div class="content" :title="item.specification">{{
+              item.specification
+            }}</div>
+          </div>
         </div>
       </div>
     </div>
@@ -119,6 +142,10 @@
       return {};
     },
 
+    mounted() {
+      console.log(this.item, 'item的数据');
+    },
+
     methods: {
       sumStatus(row) {
         if (row.reportStatus === 1) {

+ 14 - 4
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -532,10 +532,14 @@
         label-position="right"
       >
         <el-form-item label="批次号">
-          <el-input v-model="batchForm.batchNo"></el-input>
+          <el-input v-model="batchForm.batchNo" style="width: 220px"></el-input>
         </el-form-item>
         <el-form-item label="拆批数">
-          <el-input v-model="batchForm.quantity"></el-input>
+          <el-input
+            v-model="batchForm.quantity"
+            style="width: 220px"
+          ></el-input>
+          {{ batchForm.unit }}
         </el-form-item>
         <el-form-item label="是否合格">
           <el-select
@@ -1022,7 +1026,6 @@
       this.clientEnvironmentId =
         this.$store.state.user.info.clientEnvironmentId;
 
-      this.getPrintData();
       this.getisJuRen();
     },
 
@@ -1126,7 +1129,8 @@
           batchNo: '',
           isQualified: 1,
           notType: '',
-          notReason: ''
+          notReason: '',
+          unit: ''
         },
         itemData: {},
         itemIndex: '',
@@ -1197,6 +1201,9 @@
       async getisJuRen() {
         await isJuRen().then((res) => {
           this.printStyle = res.data.printStyle;
+          if (this.printStyle != 'notExist') {
+            this.getPrintData();
+          }
         });
       },
 
@@ -1291,7 +1298,9 @@
       },
 
       openBatch(item, index) {
+        console.log(item, '需要拆批的数据');
         this.batchForm.quantity = '';
+        this.batchForm.unit = '';
         this.batchForm.batchNo = '';
         this.batchForm.isQualified = 1;
         this.batchForm.notType = '';
@@ -1299,6 +1308,7 @@
         this.itemData = item;
         this.itemIndex = index;
         this.batchForm.batchNo = item.batchNo;
+        this.batchForm.unit = item.unit;
         this.batchVisible = true;
       },
 

+ 4 - 1
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -958,7 +958,7 @@
       this.clientEnvironmentId =
         this.$store.state.user.info.clientEnvironmentId;
 
-      this.getPrintData();
+      // this.getPrintData();
       this.getisJuRen();
     },
 
@@ -1032,6 +1032,9 @@
       async getisJuRen() {
         await isJuRen().then((res) => {
           this.printStyle = res.data.printStyle;
+          if (this.printStyle != 'notExist') {
+            this.getisJuRen();
+          }
         });
       },
 

+ 1 - 0
src/views/produce/components/juRenPack.vue

@@ -127,6 +127,7 @@
     font-size: 10px;
     color: green;
     margin: 0 auto;
+    font-weight: 700;
   }
 
   .label-title {

+ 1 - 2
src/views/produce/components/juRenPackOne.vue

@@ -125,8 +125,7 @@
     font-size: 12px;
     color: green;
     margin: 0 auto;
-    // line-height: 1.8;
-    // font-family: "SimSun", "宋体", sans-serif;
+    font-weight: 700;
 
     .ju_ren_one_level {
       display: flex;

+ 196 - 2
src/views/produce/components/picking/detailed.vue

@@ -60,21 +60,75 @@
           <template v-slot:demandQuantity="{ row }">
             {{ row.demandQuantity }} {{ row.unit }}
           </template>
+
+          <!-- 操作列 -->
+          <!-- <template v-slot:action="{ row, $index }">
+            <el-link
+              type="text"
+              @click="outboundDetails(row, $index)"
+              v-if="dataObj.status == 2"
+              >出库详情</el-link
+            >
+          </template> -->
+        </ele-pro-table>
+      </div>
+
+      <div class="card_box" v-if="outboundDetailList.length != 0">
+        <div class="rx-bc">
+          <div class="item_box rx-bc">
+            <div class="time">出库单详情 </div>
+          </div>
+        </div>
+        <ele-pro-table
+          ref="table"
+          :columns="columnsTwo"
+          max-height="320px"
+          :datasource="outboundDetailList"
+          cache-key="detailed"
+          highlight-current-row
+          :need-page="false"
+        >
+          <template v-slot:empty>
+            <div class="empty">暂无领料数据</div>
+          </template>
+
+          <template v-slot:index="{ row, $index }">
+            {{ $index + 1 }}
+          </template>
+
+          <template v-slot:status="{ row }">
+            <el-tag>已出库</el-tag>
+          </template>
+
+          <!-- <template v-slot:action="{ row, $index }">
+            <el-link
+              type="text"
+              @click="outboundDetails(row, $index)"
+              v-if="dataObj.status == 2"
+              >出库详情</el-link
+            >
+          </template> -->
         </ele-pro-table>
       </div>
     </el-dialog>
+
+    <outboundDetail ref="outboundDetailRef" />
   </div>
 </template>
 <script>
+  import outboundDetail from './outboundDetail.vue';
+  import { getOutboundDetail } from '@/api/produce/picking.js';
+
   export default {
-    components: {},
+    components: { outboundDetail },
     props: {
       detailedObj: {}
     },
     data() {
       return {
         visible: true,
-        dataObj: null
+        dataObj: null,
+        outboundDetailList: []
       };
     },
 
@@ -169,17 +223,122 @@
             align: 'center',
             showOverflowTooltip: true
           }
+          // {
+          //   prop: 'action',
+          //   label: '操作',
+          //   align: 'center',
+          //   fixed: 'right',
+          //   slot: 'action',
+          //   resizable: false,
+          //   showOverflowTooltip: true
+          // }
         ];
       },
 
       taskObj() {
         return this.$store.state.user.taskObj;
+      },
+      columnsTwo() {
+        let columnsVersion = this.columnsVersion;
+        return [
+          ...[
+            {
+              width: 55,
+              type: 'index',
+              columnKey: 'index',
+              align: 'center',
+              label: '序号',
+              fixed: 'left'
+            },
+            {
+              minWidth: 120,
+              prop: 'code',
+              label: '编码',
+              align: 'center',
+              fixed: 'left',
+              showOverflowTooltip: true
+            },
+            {
+              width: 100,
+              prop: 'batchNo',
+              label: '批次号',
+              slot: 'batchNo',
+              align: 'center'
+            },
+            {
+              minWidth: 140,
+              prop: 'name',
+              label: '名称',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              width: 150,
+              prop: 'feedQuantity',
+              label: '数量',
+              slot: 'feedQuantity',
+              align: 'center'
+            },
+            {
+              width: 150,
+              prop: 'unit',
+              label: '单位',
+              slot: 'unit',
+              align: 'center'
+            },
+            {
+              width: 150,
+              prop: 'modelType',
+              label: '型号',
+              slot: 'modelType',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              width: 150,
+              prop: 'specification',
+              label: '规格',
+              slot: 'specification',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              width: 150,
+              prop: 'brandNum',
+              label: '牌号',
+              slot: 'brandNum',
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              width: 150,
+              prop: 'status',
+              label: '状态',
+              slot: 'status',
+              align: 'center',
+              showOverflowTooltip: true
+            }
+          ]
+        ];
       }
     },
 
     methods: {
       handleClose() {
         this.$emit('detailedClose');
+      },
+
+      outboundDetails(item, index) {
+        console.log(item, index, 'item, index');
+        this.$refs.outboundDetailRef.open(item);
+      },
+
+      async getOutboundDetailList() {
+        await getOutboundDetail({
+          pickOrderId: this.dataObj.id
+        }).then((res) => {
+          this.outboundDetailList = res;
+        });
       }
     },
 
@@ -196,6 +355,8 @@
       });
 
       this.dataObj = obj;
+
+      // this.getOutboundDetailList();
     }
   };
 </script>
@@ -261,4 +422,37 @@
       margin: 0 4px;
     }
   }
+
+  .rx-bc {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin-top: 10px;
+  }
+
+  .item_box {
+    margin-top: 5px;
+    margin-bottom: 6px;
+    padding: 0 10px;
+
+    .round {
+      width: 20px;
+      height: 20px;
+      line-height: 20px;
+      border-radius: 50%;
+      background: #157a2c;
+      color: #fff;
+      text-align: center;
+      font-size: 12px;
+    }
+
+    .time {
+      color: #157a2c;
+      font-family: PingFang HK;
+      font-size: 14px;
+      font-style: normal;
+      font-weight: 500;
+      margin-left: 8px;
+    }
+  }
 </style>

+ 171 - 0
src/views/produce/components/picking/outboundDetail.vue

@@ -0,0 +1,171 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-if="visible"
+    title="出库单详情"
+    width="60vw"
+    append-to-body
+    @close="closeOuboundDetail"
+  >
+    <div class="main_container">
+      <el-descriptions
+        title=""
+        :column="3"
+        size="medium"
+        border
+        label-class-name="title-col"
+        content-class-name="title-col"
+      >
+        <el-descriptions-item>
+          <template slot="label"> 批次号 </template>
+          {{ outboundData.batchNo }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label"> 牌号 </template>
+          {{ outboundData.brandNo }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label"> 编码 </template>
+          {{ outboundData.categoryCode }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label"> 名称 </template>
+          {{ outboundData.name }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label"> 类型</template>
+          {{ typeName[Number(outboundData.rootCategoryLevelId)] }}
+        </el-descriptions-item>
+
+        <!-- <el-descriptions-item>
+          <template slot="label"> 牌号 </template>
+          {{}}
+        </el-descriptions-item> -->
+        <el-descriptions-item>
+          <template slot="label"> 型号 </template>
+          {{ outboundData.modelType }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label"> 规格 </template>
+          {{ outboundData.specification }}
+        </el-descriptions-item>
+        <!-- <el-descriptions-item>
+          <template slot="label"> 领料类型 </template>
+          <span v-if="outboundData.type"></span>
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item>
+          <template slot="label"> 销售单数量 </template>
+          {{}}
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item>
+          <template slot="label"> 生产类型 </template>
+          {{}}
+        </el-descriptions-item> -->
+
+        <!-- <el-descriptions-item>
+          <template slot="label"> 工艺路线 </template>
+          {{}}
+        </el-descriptions-item> -->
+
+        <el-descriptions-item>
+          <template slot="label"> 订单数量 </template>
+          {{ outboundData.feedQuantity }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label"> 单位 </template>
+          {{ outboundData.unit }}
+        </el-descriptions-item>
+
+        <el-descriptions-item>
+          <template slot="label"> 仓库名称 </template>
+          {{ outboundData.warehouseName }}
+        </el-descriptions-item>
+        <!-- <el-descriptions-item>
+          <template slot="label"> 订单重量 </template>
+          {{}}
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item>
+          <template slot="label"> 要求生产数量 </template>
+          {{}}
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item>
+          <template slot="label"> 要求生产重量 </template>
+          {{}}
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item>
+          <template slot="label"> 要求完成日期 </template>
+          {{}}
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item>
+          <template slot="label"> 所属工厂 </template>
+          {{}}
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item :span="3">
+          <template slot="label"> </template>
+        </el-descriptions-item> -->
+      </el-descriptions>
+    </div>
+    <div slot="footer" class="footer">
+      <div>
+        <el-button @click="cancel">关闭</el-button>
+      </div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import { getOutboundDetail } from '@/api/produce/picking.js';
+  import { typeName } from '../common.js';
+
+  export default {
+    mixins: [dictMixins],
+    props: {
+      info: Object,
+      type: String
+    },
+    data() {
+      return {
+        visible: false,
+        loading: false,
+        tableList: [],
+        outboundData: {},
+        typeName
+      };
+    },
+    computed: {},
+    created() {},
+    methods: {
+      open(item) {
+        this.visible = true;
+        this.getOutboundDetailData(item.pickOrderId, item.categoryCode);
+      },
+      cancel() {
+        this.visible = false;
+      },
+
+      closeOuboundDetail() {
+        this.visible = false;
+      },
+
+      async getOutboundDetailData(pickOrderId, categoryCode) {
+        await getOutboundDetail({ pickOrderId, categoryCode }).then((res) => {
+          this.outboundData = res[0];
+          console.log(this.outboundData, 'this.outboundData');
+        });
+      }
+    }
+  };
+</script>
+<style lang="scss">
+  .basic-details-title {
+    margin: 10px 0;
+  }
+
+  .title-col {
+    color: #000000 !important;
+    background-color: #fff;
+  }
+</style>

+ 8 - 3
src/views/produce/components/workPlan/components/inspectionTemplateDialog.vue

@@ -13,10 +13,12 @@
       :columns="columns"
       :datasource="datasource"
       height="calc(100vh - 605px)"
+      full-height="calc(100vh -120px)"
       tool-class="ele-toolbar-form"
       row-key="qualityLevelId"
       v-if="equipmentdialog"
       :selection.sync="selection"
+      :initLoad="false"
     >
       <template v-slot:status="{ row }">
         {{ row.status ? '启用' : '停用' }}
@@ -103,17 +105,20 @@
         return getList({
           ...where,
           pageNum: page,
-          size: limit,
-          type: this.type
+          size: limit
         });
       },
       open(type) {
-        this.type = type;
         this.equipmentdialog = true;
+        this.$nextTick(() => {
+          this.$refs.search.setWhere(type);
+          this.$refs.search.search();
+        });
       },
       handleClose() {
         this.equipmentdialog = false;
       },
+
       // 选择
       selected() {
         if (!this.selection.length) {

+ 35 - 19
src/views/produce/components/workPlan/components/search.vue

@@ -1,45 +1,57 @@
 <!-- 搜索表单 -->
-
 <template>
   <el-form
-    label-width="77px"
+    label-width="100px"
     class="ele-form-search"
     @keyup.enter.native="search"
     @submit.native.prevent
   >
     <el-row :gutter="15">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
-        <el-form-item label="编码:">
-          <el-input clearable v-model="where.code" placeholder="请输入" />
+        <el-form-item label="质检方案名称:">
+          <el-input
+            clearable
+            v-model="where.qualitySchemeTemplateName"
+            placeholder="请输入"
+          />
         </el-form-item>
       </el-col>
 
       <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
-        <el-form-item label="工序:">
+        <el-form-item label="质检方案编码:">
           <el-input
             clearable
-            v-model="where.produceTaskName"
+            v-model="where.qualitySchemeTemplateCode"
             placeholder="请输入"
           />
         </el-form-item>
       </el-col>
-      <!--
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6}">
-        <el-form-item label="状态:" >
-          <el-select v-model="where.status" class="m-2" placeholder="请选择" size="large" style="width: 100%">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
+        <el-form-item label="状态:">
+          <el-select
+            v-model="where.status"
+            class="m-2"
+            placeholder="请选择"
+            size="large"
+            style="width: 100%"
+          >
             <el-option label="停用" :value="0" />
             <el-option label="启用" :value="1" />
           </el-select>
         </el-form-item>
-      </el-col> -->
-      <!-- <el-col v-bind="styleResponsive ?{ lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="组织机构:">
-          <auth-selection data-type="Array" v-model="where.deptIds" style="width: 100%"></auth-selection>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
+        <el-form-item label="质检方案类型:">
+          <DictSelection
+            dictName="质检计划类型"
+            v-model="where.type"
+          ></DictSelection>
         </el-form-item>
-      </el-col> -->
+      </el-col>
+
       <el-col
         style="display: flex; justify-content: flex-end"
-        v-bind="styleResponsive ? { lg: 12, md: 6 } : { span: 12 }"
+        v-bind="styleResponsive ? { lg: 6, md: 18 } : { span: 6 }"
       >
         <div class="ele-form-actions">
           <el-button
@@ -62,9 +74,10 @@
     data() {
       // 默认表单数据
       const defaultWhere = {
-        code: '',
-        produceTaskName: '',
-        deptIds: ''
+        name: '',
+        standardCode: '',
+        status: '',
+        type: ''
       };
       return {
         defaultWhere,
@@ -83,6 +96,9 @@
       search() {
         this.$emit('search', this.where);
       },
+      setWhere(type) {
+        this.where.type = type;
+      },
       /*  重置 */
       reset() {
         this.where = { ...this.defaultWhere };

+ 1 - 2
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
-        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
@@ -43,7 +43,6 @@ module.exports = {
         // target: 'http://192.168.1.33:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
-        target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''