695593266@qq.com 10 месяцев назад
Родитель
Сommit
9a3bbb76b6

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

@@ -345,3 +345,13 @@ export async function filePageAPI(data) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
+
+//获取工艺文件
+
+export async function fileReleaseAPI(data) {
+  const res = await request.post('/fm/file/page', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 9 - 0
src/api/produceOrder/index.js

@@ -231,3 +231,12 @@ export async function workorderInfo(id) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
+
+// 生产明细
+export async function produceDetail(id) {
+  const res = await request.get(`/pda/mes/workorder/produceDetail/${id}`);
+  if (res.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(data.message);
+}

+ 8 - 0
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -522,6 +522,7 @@
             v-model="batchForm.isQualified"
             v-model="batchForm.isQualified"
             filterable
             filterable
             placeholder="请选择"
             placeholder="请选择"
+            @change="isChange"
           >
           >
             <el-option
             <el-option
               v-for="item in newisQualifiedList"
               v-for="item in newisQualifiedList"
@@ -1334,6 +1335,13 @@
         );
         );
       },
       },
 
 
+      isChange(val) {
+        if (val == 1) {
+          this.batchForm.notType = '';
+          this.batchForm.notReason = '';
+        }
+      },
+
       changeHeatNumber() {
       changeHeatNumber() {
         this.deviceList.forEach((f) => {
         this.deviceList.forEach((f) => {
           this.list.forEach((o, index) => {
           this.list.forEach((o, index) => {

+ 33 - 0
src/views/produce/components/jobBooking/index.vue

@@ -967,6 +967,18 @@
           return this.$message.warning('请选择执行时间');
           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('请到主数据配置包装规格');
+        //   }
+        // }
+
         // if(this.taskObj.type !=6){
         // if(this.taskObj.type !=6){
         //   if(this.reportNeedFeed==1&&!(this.List[0].semiProductList.length>0||this.List[0].pickOutInList.length>0)){
         //   if(this.reportNeedFeed==1&&!(this.List[0].semiProductList.length>0||this.List[0].pickOutInList.length>0)){
         //     this.loading.close();
         //     this.loading.close();
@@ -1398,6 +1410,7 @@
 
 
       checkRecycle() {
       checkRecycle() {
         this.loading.close();
         this.loading.close();
+
         return new Promise((resolve) => {
         return new Promise((resolve) => {
           this.$confirm('是否跳过副产品回收处置!', '提示', {
           this.$confirm('是否跳过副产品回收处置!', '提示', {
             confirmButtonText: '确定',
             confirmButtonText: '确定',
@@ -1411,6 +1424,26 @@
               resolve(false);
               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) {
       checkCache(type) {

+ 21 - 1
src/views/produce/components/picking/wokePopup.vue

@@ -44,7 +44,8 @@
     workorderList,
     workorderList,
     getCode,
     getCode,
     craftFiles,
     craftFiles,
-    filePageAPI
+    filePageAPI,
+    fileReleaseAPI
   } from '@/api/produce/workOrder';
   } from '@/api/produce/workOrder';
   import { typeName } from '../common.js';
   import { typeName } from '../common.js';
   import { batchSave } from '@/api/produce/picking';
   import { batchSave } from '@/api/produce/picking';
@@ -177,6 +178,25 @@
         this.visible = true;
         this.visible = true;
       },
       },
 
 
+      openTwo(req) {
+        console.log(req);
+        fileReleaseAPI({
+          fileType: 0,
+          isQueryAll: 1,
+          jobNumber: '',
+          lcyStatus: '3',
+          loginName: '',
+          name: req.productCode,
+          pageNum: 1,
+          size: 10
+        }).then((res) => {
+          console.log(res, '13123131');
+          this.workList = res.list;
+        });
+
+        this.visible = true;
+      },
+
       async getFilepProcess(ids) {
       async getFilepProcess(ids) {
         await filePageAPI({
         await filePageAPI({
           ids: "'" + ids + "'"
           ids: "'" + ids + "'"

+ 48 - 18
src/views/produce/components/warehousing/components/newJobDdBom.vue

@@ -228,19 +228,34 @@
             let formedWeight = 0;
             let formedWeight = 0;
             let notFormedWeight = 0;
             let notFormedWeight = 0;
 
 
-            newVal.semiProductList.forEach((v) => {
-              // 合格品数量
-              if (v.extInfo.isQualified == 1) {
-                formedNum += 1;
-                formedWeight += Number(v.extInfo.reportWeight) || 0;
+            // newVal.semiProductList.forEach((v) => {
+            //   // 合格品数量
+            //   if (v.extInfo.isQualified == 1) {
+            //     formedNum += 1;
+            //     formedWeight += Number(v.extInfo.reportWeight) || 0;
+            //   } else {
+            //     noFormingNum += 1;
+            //     notFormedWeight += Number(v.extInfo.reportWeight) || 0;
+            //   }
+            // });
+
+            // newVal.workReportInfo.formedNum = formedNum;
+            // newVal.workReportInfo.notFormedNum = noFormingNum;
+
+            newVal.semiProductList.forEach((item) => {
+              if (
+                !item.extInfo.isQualified ||
+                item.extInfo.isQualified == 1 ||
+                item.extInfo.isQualified == 3
+              ) {
+                formedNum = formedNum + Number(item.feedQuantity);
               } else {
               } else {
-                noFormingNum += 1;
-                notFormedWeight += Number(v.extInfo.reportWeight) || 0;
+                noFormingNum = noFormingNum + Number(item.feedQuantity);
               }
               }
             });
             });
 
 
-            newVal.workReportInfo.formedNum = formedNum;
-            newVal.workReportInfo.notFormedNum = noFormingNum;
+            this.$set(this.item.workReportInfo, 'formedNum', formedNum);
+            this.$set(this.item.workReportInfo, 'notFormedNum', noFormingNum);
             newVal.workReportInfo.formedWeight = parseFloat(
             newVal.workReportInfo.formedWeight = parseFloat(
               formedWeight.toFixed(3)
               formedWeight.toFixed(3)
             );
             );
@@ -256,19 +271,34 @@
             let formedWeight = 0;
             let formedWeight = 0;
             let notFormedWeight = 0;
             let notFormedWeight = 0;
 
 
-            newVal.product.forEach((v) => {
-              // 合格品数量
-              if (v.extInfo.isQualified == 1) {
-                formedNum += 1;
-                formedWeight += Number(v.extInfo.reportWeight) || 0;
+            // newVal.product.forEach((v) => {
+            //   // 合格品数量
+            //   if (v.extInfo.isQualified == 1) {
+            //     formedNum += 1;
+            //     formedWeight += Number(v.extInfo.reportWeight) || 0;
+            //   } else {
+            //     noFormingNum += 1;
+            //     notFormedWeight += Number(v.extInfo.reportWeight) || 0;
+            //   }
+            // });
+
+            // newVal.workReportInfo.formedNum = formedNum;
+            // newVal.workReportInfo.notFormedNum = noFormingNum;
+
+            newVal.product.forEach((item) => {
+              if (
+                !item.extInfo.isQualified ||
+                item.extInfo.isQualified == 1 ||
+                item.extInfo.isQualified == 3
+              ) {
+                formedNum = formedNum + Number(item.feedQuantity);
               } else {
               } else {
-                noFormingNum += 1;
-                notFormedWeight += Number(v.extInfo.reportWeight) || 0;
+                noFormingNum = noFormingNum + Number(item.feedQuantity);
               }
               }
             });
             });
 
 
-            newVal.workReportInfo.formedNum = formedNum;
-            newVal.workReportInfo.notFormedNum = noFormingNum;
+            this.$set(this.item.workReportInfo, 'formedNum', formedNum);
+            this.$set(this.item.workReportInfo, 'notFormedNum', noFormingNum);
             newVal.workReportInfo.formedWeight = parseFloat(
             newVal.workReportInfo.formedWeight = parseFloat(
               formedWeight.toFixed(3)
               formedWeight.toFixed(3)
             );
             );

+ 29 - 1
src/views/produce/components/warehousing/index.vue

@@ -3,6 +3,22 @@
 
 
   <div>
   <div>
     <div class="top_fixed">
     <div class="top_fixed">
+      <div
+        style="display: flex; align-items: center; margin-right: 10px"
+        v-if="List.length > 1"
+      >
+        <div class="rx-bc">
+          <div class="name">批量报工时间:</div>
+        </div>
+        <el-date-picker
+          v-model="executorTime"
+          type="datetime"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          placeholder="选择日期"
+          @change="handleCreate"
+        >
+        </el-date-picker>
+      </div>
       <el-button type="primary" size="mini" @click="save">一键报工</el-button>
       <el-button type="primary" size="mini" @click="save">一键报工</el-button>
     </div>
     </div>
 
 
@@ -518,7 +534,8 @@
         isChoose: false,
         isChoose: false,
         isEngrave: false,
         isEngrave: false,
         isDisposal: false,
         isDisposal: false,
-        loading: null
+        loading: null,
+        executorTime: ''
       };
       };
     },
     },
 
 
@@ -760,6 +777,17 @@
         });
         });
       },
       },
 
 
+      handleCreate(e) {
+        if (e) {
+          const list = JSON.parse(JSON.stringify(this.List));
+          console.log(list);
+          list.map((item) => {
+            item.workReportInfo.executorTime = e;
+          });
+          this.$set(this, 'List', list);
+        }
+      },
+
       save() {
       save() {
         for (let i = 0; i < this.List.length; i++) {
         for (let i = 0; i < this.List.length; i++) {
           if (!this.List[i].workReportInfo.executorTime) {
           if (!this.List[i].workReportInfo.executorTime) {

+ 15 - 12
src/views/produce/components/workPlan/components/newQualityContentTabs.vue

@@ -392,7 +392,12 @@
             prop="inspectionName"
             prop="inspectionName"
             align="center"
             align="center"
           ></el-table-column>
           ></el-table-column>
-          <el-table-column label="工艺参数" prop="defaultValue" align="center">
+          <el-table-column
+            label="工艺参数"
+            show-overflow-tooltip
+            prop="defaultValue"
+            align="center"
+          >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div style="display: flex; justify-content: center">
               <div style="display: flex; justify-content: center">
                 <span>{{ scope.row.symbol }}</span>
                 <span>{{ scope.row.symbol }}</span>
@@ -434,7 +439,7 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
-        <el-pagination
+        <!-- <el-pagination
           @size-change="handleSchemeSizeChange"
           @size-change="handleSchemeSizeChange"
           @current-change="handleSchemeCurrentChange"
           @current-change="handleSchemeCurrentChange"
           :current-page="schemePagination.currentPage"
           :current-page="schemePagination.currentPage"
@@ -442,7 +447,7 @@
           :page-size="schemePagination.pageSize"
           :page-size="schemePagination.pageSize"
           layout="total, sizes, prev, pager, next, jumper"
           layout="total, sizes, prev, pager, next, jumper"
           :total="schemeList.length"
           :total="schemeList.length"
-        />
+        /> -->
       </el-tab-pane>
       </el-tab-pane>
     </el-tabs>
     </el-tabs>
   </el-row>
   </el-row>
@@ -472,6 +477,7 @@
       schemeList: {
       schemeList: {
         handler(newVal, oldVal) {
         handler(newVal, oldVal) {
           this.templateList = newVal;
           this.templateList = newVal;
+          // console.log(newVal, 'schemeList');
         },
         },
         deep: true,
         deep: true,
         immediate: true
         immediate: true
@@ -769,18 +775,16 @@
       },
       },
       // 分页后的质检方案列表
       // 分页后的质检方案列表
       paginatedSchemeList() {
       paginatedSchemeList() {
-        const { currentPage, pageSize } = this.schemePagination;
-        const start = (currentPage - 1) * pageSize;
-        const end = start + pageSize;
-        console.log(this.templateList, 'this.templateList');
-        return this.templateList?.slice(start, end);
-        // return this.schemeList?.slice(start, end);
+        // const { currentPage, pageSize } = this.schemePagination;
+        // const start = (currentPage - 1) * pageSize;
+        // const end = start + pageSize;
+        // console.log(this.templateList,'全部数据')
+        // return this.templateList?.slice(start, end);
+        return this.templateList;
       }
       }
     },
     },
 
 
     created() {
     created() {
-      // console.log(this.schemeList, 'schemeList');
-
       this.activeNameKK = this.activeName;
       this.activeNameKK = this.activeName;
       this.reload({ qualityWorkerId: this.ids });
       this.reload({ qualityWorkerId: this.ids });
       let direction = this.$getDirection();
       let direction = this.$getDirection();
@@ -1071,7 +1075,6 @@
         this.$refs.inspectionTemplateRef.open(type);
         this.$refs.inspectionTemplateRef.open(type);
       },
       },
       async inspectionTemplateSuccess(select) {
       async inspectionTemplateSuccess(select) {
-        console.log('222222222222222');
         let data = await getQualityTemplateByIds({
         let data = await getQualityTemplateByIds({
           templateIds: select.map((item) => item.id)
           templateIds: select.map((item) => item.id)
         });
         });

+ 3 - 5
src/views/produce/components/workPlan/edit.vue

@@ -351,10 +351,7 @@
           this.$set(this.form, 'noQualificationRate', '100%');
           this.$set(this.form, 'noQualificationRate', '100%');
           this.$set(this.form, 'qualityResults', 2);
           this.$set(this.form, 'qualityResults', 2);
         }
         }
-        // this.$set(this.form, 'resultsTotal', resultsTotal);
-
-        console.log(sampleQualificationRate, 'sampleQualificationRate');
-        console.log(sampleNoQualificationRate, 'sampleNoQualificationRate');
+   
         this.$set(
         this.$set(
           this.form,
           this.form,
           'sampleQualificationRate',
           'sampleQualificationRate',
@@ -466,10 +463,11 @@
       // 创建计量数量为1的样品清单函数,用于计数类型的
       // 创建计量数量为1的样品清单函数,用于计数类型的
       async createSampleList(list) {
       async createSampleList(list) {
         if (this.form.qualityMode != null) {
         if (this.form.qualityMode != null) {
+          this.$message.closeAll();
           this.$message('正在生成样品清单');
           this.$message('正在生成样品清单');
           const ProductSampleList = [];
           const ProductSampleList = [];
           for (const oldItem of list) {
           for (const oldItem of list) {
-            const count = oldItem.measureQuantity;
+            const count = oldItem.measureQuantity ? oldItem.measureQuantity : 1;
             const newMeasureQuantity = oldItem.measureQuantity / count;
             const newMeasureQuantity = oldItem.measureQuantity / count;
             const newWeight = parseFloat((oldItem.weight / count).toFixed(2));
             const newWeight = parseFloat((oldItem.weight / count).toFixed(2));
 
 

+ 25 - 6
src/views/produce/index.vue

@@ -575,7 +575,7 @@
         this.workPlanType = type;
         this.workPlanType = type;
       },
       },
 
 
-      footBtn(t) {
+      async footBtn(t) {
         this.workPlanType = '';
         this.workPlanType = '';
         // this.operationType = t;
         // this.operationType = t;
         // 新增判断 *** 出现弹窗的时候不然右边数据消失
         // 新增判断 *** 出现弹窗的时候不然右边数据消失
@@ -662,12 +662,31 @@
           if (this.workListIds.length > 1) {
           if (this.workListIds.length > 1) {
             return this.$message.warning('工艺文件只能选择一个工单!');
             return this.$message.warning('工艺文件只能选择一个工单!');
           }
           }
-          let req = {
-            taskId: this.taskObj.id,
-            workOrderId: this.workListIds[0]
-          };
 
 
-          this.$refs.wokePopupRef.open(req);
+          await parameterGetByCode({
+            code: 'mes_craft_file_by_category_code'
+          }).then((res) => {
+            // if (res.value == '1') {
+            //   this.$refs.jobRefs.open(req);
+            // }
+            console.log(this.workData.list, 'this.workData.list');
+            if (res.value == '1') {
+              let req = {
+                taskId: this.taskObj.id,
+                workOrderId: this.workListIds[0],
+                productCode: this.workData.list[0].productCode
+              };
+
+              this.$refs.wokePopupRef.openTwo(req);
+            } else {
+              let req = {
+                taskId: this.taskObj.id,
+                workOrderId: this.workListIds[0]
+              };
+
+              this.$refs.wokePopupRef.open(req);
+            }
+          });
         }
         }
         if (t == 'feed') {
         if (t == 'feed') {
         }
         }

+ 4 - 1
src/views/produceOrder/workReport.vue

@@ -223,6 +223,8 @@
               ></footBtn>
               ></footBtn>
             </el-tab-pane>
             </el-tab-pane>
 
 
+            <el-tab-pane label="生产明细"> </el-tab-pane>
+
             <el-tab-pane label="投料详情">
             <el-tab-pane label="投料详情">
               <feedDetails
               <feedDetails
                 :routeObj="routeObj"
                 :routeObj="routeObj"
@@ -301,7 +303,8 @@
     checkOutsourceMaterial,
     checkOutsourceMaterial,
     listTask,
     listTask,
     factoryworkstationPage,
     factoryworkstationPage,
-    nextTask
+    nextTask,
+    produceDetail
   } from '@/api/produce/index';
   } from '@/api/produce/index';
   import { getTaskInstanceList } from '@/api/produce/job';
   import { getTaskInstanceList } from '@/api/produce/job';
   import { workorderInfo } from '@/api/produceOrder/index.js';
   import { workorderInfo } from '@/api/produceOrder/index.js';