Ver Fonte

修改bug

695593266@qq.com há 9 meses atrás
pai
commit
c1675a41ea

+ 36 - 18
src/views/outsourcing/components/details.vue

@@ -137,43 +137,50 @@
           {
             prop: 'categoryCode',
             label: '编码',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
           {
             prop: 'categoryName',
             label: '名称',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'sourceType',
             slot: 'sourceType',
             label: '类型',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'brandNum',
             label: '牌号',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'specification',
             label: '规格',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'modelType',
             label: '型号',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             slot: 'totalCount',
             label: '数量',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           }
         ];
       },
@@ -193,64 +200,75 @@
           {
             prop: 'categoryCode',
             label: '编码',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
           {
             prop: 'categoryName',
             label: '名称',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'sourceType',
             slot: 'sourceType',
             label: '类型',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'brandNum',
             label: '牌号',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'modelType',
             label: '型号',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             prop: 'specification',
             label: '规格',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             label: '物料代号',
             prop: 'extInfo.materielCode',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
           {
             label: '客户代号',
             prop: 'extInfo.clientCode',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
           {
             label: '刻码',
             prop: 'extInfo.engrave',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
           {
             label: '重量',
             prop: 'totalWeight',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           },
 
           {
             slot: 'totalCount',
             label: '数量',
-            align: 'center'
+            align: 'center',
+            showOverflowTooltip: true
           }
         ];
       },

+ 2 - 2
src/views/produce/components/bom/components/workingProcedure.vue

@@ -669,7 +669,7 @@
             row-key="id"
           >
             <!-- 表头工具栏 -->
-            <template v-slot:toolbar>
+            <!-- <template v-slot:toolbar>
               <el-button
                 size="small"
                 type="primary"
@@ -683,7 +683,7 @@
               <el-link type="primary" @click="handleDel(row, $index)"
                 >删除</el-link
               >
-            </template>
+            </template> -->
           </ele-pro-table>
         </el-tab-pane>
         <el-tab-pane label="工艺文件" name="工艺文件">

+ 0 - 120
src/views/produce/components/bom/detailsPop.vue

@@ -41,37 +41,6 @@
           </el-radio-group>
 
           <div style="margin-left: 100px">
-            <el-button
-              type="primary"
-              size="mini"
-              icon="el-icon-plus"
-              @click="handleAdd"
-              v-if="
-                $hasPermission('main:categoryparam:saveBom') &&
-                currentNodeData.bomType == 1 &&
-                (currentNodeData.parentId == '0' || !currentNodeData.parentId)
-              "
-            >
-              新建
-            </el-button>
-
-            <el-button
-              type="danger"
-              size="mini"
-              icon="el-icon-delete"
-              @click="remove"
-              v-if="
-                (currentNodeData.approvalStatus == 0 ||
-                  currentNodeData.approvalStatus == 3) &&
-                $hasPermission('main:categoryparam:deleteBom') &&
-                (currentNodeData.parentId == '0' ||
-                  !currentNodeData.parentId) &&
-                isNotData
-              "
-            >
-              删除
-            </el-button>
-
             <el-button
               v-if="
                 currentNodeData.bomType == 1 &&
@@ -84,95 +53,6 @@
               >导出</el-button
             >
 
-            <el-button
-              @click="uploadFile"
-              v-if="
-                currentNodeData.bomType == 1 &&
-                (currentNodeData.parentId == '0' || !currentNodeData.parentId)
-              "
-              type="primary"
-              size="mini"
-              icon="el-icon-upload2"
-              plain
-              >导入</el-button
-            >
-            <el-button
-              type="primary"
-              size="mini"
-              icon="el-icon-refresh"
-              plain
-              @click="transformation('P')"
-              :disabled="currentNodeData.approvalStatus != 2"
-              v-if="
-                currentNodeData.bomType == 4 &&
-                (currentNodeData.parentId == '0' ||
-                  !currentNodeData.parentId) &&
-                isNotData
-              "
-              >转换PBOM</el-button
-            >
-
-            <el-button
-              type="primary"
-              size="mini"
-              icon="el-icon-refresh"
-              plain
-              :disabled="currentNodeData.approvalStatus != 2"
-              @click="transformation('E')"
-              v-if="
-                currentNodeData.bomType == 1 &&
-                (currentNodeData.parentId == '0' || !currentNodeData.parentId)
-              "
-              >转换EBOM</el-button
-            >
-
-            <el-button
-              type="primary"
-              size="mini"
-              icon="el-icon-refresh"
-              plain
-              :disabled="currentNodeData.approvalStatus != 2"
-              @click="transformation('M')"
-              v-if="
-                currentNodeData.bomType == 1 &&
-                (searchObj.isProduct ||
-                  ['1', '9'].includes(searchObj.rootPathIdParent)) &&
-                (currentNodeData.parentId == '0' || !currentNodeData.parentId)
-              "
-              >转换MBOM</el-button
-            >
-
-            <el-button
-              type="primary"
-              size="mini"
-              icon="el-icon-refresh"
-              plain
-              :disabled="currentNodeData.approvalStatus != 2"
-              @click="transformation('A')"
-              v-if="
-                currentNodeData.bomType == 1 &&
-                (searchObj.isProduct ||
-                  ['1', '9'].includes(searchObj.rootPathIdParent)) &&
-                (currentNodeData.parentId == '0' || !currentNodeData.parentId)
-              "
-              >转换ABOM</el-button
-            >
-
-            <el-button
-              type="primary"
-              size="mini"
-              @click="handSubmit"
-              v-if="
-                (currentNodeData.approvalStatus == 0 ||
-                  currentNodeData.approvalStatus == 3) &&
-                (currentNodeData.parentId == '0' ||
-                  !currentNodeData.parentId) &&
-                isNotData
-              "
-            >
-              提交发布
-            </el-button>
-
             <el-button
               type="primary"
               size="mini"

+ 1 - 1
src/views/produce/components/inspection/components/oneJobQualityBomPL.vue

@@ -463,7 +463,7 @@
             value: 2
           },
           {
-            name: '让步接',
+            name: '让步接',
             value: 3
           }
         ]

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

@@ -1161,8 +1161,11 @@
           return false;
         }
 
+        const data = this.stepsList.find((it) => it.taskId == this.form.taskId);
+
         this.list.forEach((item, index) => {
           this.$set(this.list[index].extInfo, 'taskId', this.form.taskId);
+          this.$set(this.list[index].extInfo, 'taskName', data.taskTypeName);
         });
 
         this.$forceUpdate();

+ 10 - 0
src/views/produce/components/jobBooking/components/jobBom.vue

@@ -277,6 +277,16 @@
             this.$set(this.item.workReportInfo, 'formedNum', formedNum);
             this.$set(this.item.workReportInfo, 'notFormedNum', notFormedNum);
           }
+
+          // if (
+          //   this.clientEnvironmentId == 3 &&
+          //   this.item.currentTaskDiagram.type == 6
+          // ) {
+          //   if (newVal.semiProductList.length != 0) {
+          //     const semiList = newVal.semiProductList;
+          //     // if(semiList.ba)
+          //   }
+          // }
           // this.set()
           // if(this.taskObj.type == 6 ){
           //   console.log('112334',newVal)

+ 40 - 1
src/views/produce/components/jobBooking/components/oneJobQualityBomPL.vue

@@ -271,6 +271,7 @@
                 placeholder="请选择"
                 style="width: 300px"
                 :disabled="isDetails"
+                @change="qualityChange"
               >
                 <el-option
                   v-for="item in qualityList"
@@ -478,7 +479,7 @@
             value: 2
           },
           {
-            name: '让步接',
+            name: '让步接',
             value: 3
           }
         ]
@@ -502,6 +503,34 @@
         this.list.splice(idx, 1);
       },
 
+      qualityChange() {
+        if (this.item.sampleQuality && this.item.sampleQuality.length != 0) {
+          let formedNum = 0;
+          let notFormedNum = 0;
+          this.item.sampleQuality.forEach((item) => {
+            if (item.extInfo.batchReportInfo.length == 0) {
+              const data = item.extInfo;
+              if (data.appearance == 1 || data.appearance == 3) {
+                formedNum++;
+              }
+
+              if (data.appearance == 2) {
+                notFormedNum++;
+              }
+            } else if (item.extInfo.batchReportInfo.length != 0) {
+              const data = item.extInfo.batchReportInfo;
+              data.forEach((it) => {
+                formedNum += Number(it.allFeedQuantity);
+              });
+            }
+          });
+
+          this.$set(this.item.workReportInfo, 'formedNum', formedNum);
+          this.$set(this.item.workReportInfo, 'notFormedNum', notFormedNum);
+          this.$forceUpdate();
+        }
+      },
+
       blurNum2(it, idx, yyIdx) {
         // console.log(it.sample, 'it.sample');
         let value = it.sample;
@@ -523,6 +552,8 @@
             this.$forceUpdate();
           }
         }
+
+        this.qualityChange();
       },
 
       handSample() {
@@ -533,7 +564,15 @@
         };
 
         sample(param).then((res) => {
+          if (res.length != 0) {
+            res.forEach((it) => {
+              if (it.extInfo.batchReportInfo.length == 0) {
+                it.extInfo.isQuality = 1;
+              }
+            });
+          }
           this.item.sampleQuality = res || [];
+          this.qualityChange();
           this.$forceUpdate();
         });
       },

+ 5 - 2
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -294,7 +294,7 @@
           </el-select>
         </div>
       </template>
-      <!-- <template v-slot:index="{ row, $index }">
+      <template v-slot:index="{ row, $index }">
         <div
           class="tag_box"
           v-if="
@@ -313,7 +313,7 @@
         </div>
 
         <div class="tag_box" v-if="row.isCache">缓</div>
-      </template> -->
+      </template>
       <!-- 操作列 -->
       <template v-slot:action="{ row, $index }" v-if="!isDetails">
         <el-link
@@ -1043,8 +1043,11 @@
           return false;
         }
 
+        const data = this.stepsList.find((it) => it.taskId == this.form.taskId);
+
         this.list.forEach((item, index) => {
           this.$set(this.list[index].extInfo, 'taskId', this.form.taskId);
+          this.$set(this.list[index].extInfo, 'taskName', data.taskTypeName);
         });
 
         this.$forceUpdate();

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

@@ -164,7 +164,7 @@
 
           <oneJobQualityBomPL
             v-if="
-              taskType == 6 &&
+              objData.currentTaskDiagram.type == 6 &&
               clientEnvironmentId == 3 &&
               objData.singleReport == 0
             "

+ 4 - 1
src/views/produce/components/outsourcing/details.vue

@@ -418,7 +418,10 @@
         });
       },
       refresh() {
-        this.getList(this.workListIds);
+        this.$nextTick(() => {
+          this.getList(this.workListIds);
+        });
+        // this.getList(this.workListIds);
       },
 
       handleAdd() {

+ 10 - 3
src/views/produce/components/outsourcing/index.vue

@@ -418,7 +418,8 @@
         activeName: '1',
         textarea2: '',
         gysList: [],
-        factoryList: []
+        factoryList: [],
+        clientEnvironmentId: this.$store.state.user.info.clientEnvironmentId
       };
     },
     props: {
@@ -434,13 +435,19 @@
           console.log(val, 'outsourceForm');
           Object.assign(this.attributeData, val);
 
-          console.log(this.attributeData.newStepsList, 'attributeData');
+          // console.log(this.attributeData.newStepsList, 'attributeData');
 
           // this.newStepsList = this.attributeData.newStepsList.filter(
           //   (item) => item.type != 2 && item.type != 3 && item.type != 6
           // );
+          if (this.clientEnvironmentId == 3) {
+            this.newStepsList = this.attributeData.newStepsList.filter(
+              (item) => item.type != 6
+            );
+          } else {
+            this.newStepsList = this.attributeData.newStepsList;
+          }
 
-          this.newStepsList = this.attributeData.newStepsList;
           this.getWarehouseFn();
           this.produceFn();
         },

+ 138 - 12
src/views/produce/components/outsourcing/outsourceList.vue

@@ -19,6 +19,17 @@
     <el-tabs v-model="activeName">
       <el-tab-pane label="物品清单" name="0">
         <div class="materialList">
+          <div class="u-reset">
+            <el-button
+              type="primary"
+              size="small"
+              class="u-reset-button"
+              @click="openPicking(2, 'goods')"
+              v-if="clientEnvironmentId == 3"
+            >
+              添加
+            </el-button>
+          </div>
           <!--  <div class="u-reset" style="display: flex;" v-if="clientEnvironmentId != 2">
 						<el-checkbox color="#fff" v-model="checkedAll" :checked="seletedAll" @change="_seletedAll">全选
 						</el-checkbox>
@@ -192,9 +203,18 @@
               show-overflow-tooltip
             >
               <template slot-scope="{ row, $index }">
-                {{ row.feedQuantity }}
+                <el-input
+                  v-model="row.feedQuantity"
+                  v-if="row.isSelection == '1'"
+                  @input="inputNum(row, $index)"
+                ></el-input>
+                <span v-else> {{ row.feedQuantity }}</span>
               </template>
+              <!-- <template slot-scope="{ row, $index }" v-else>
+                {{ row.feedQuantity }}
+              </template> -->
             </el-table-column>
+
             <el-table-column
               label="重量"
               type="weightUnit"
@@ -239,7 +259,7 @@
               type="primary"
               size="small"
               class="u-reset-button"
-              @click="openPicking(2)"
+              @click="openPicking(2, 'belting')"
             >
               添加
             </el-button>
@@ -258,6 +278,12 @@
                     <span>编码</span>{{ item.code }}
                   </div>
 
+                  <div v-if="clientEnvironmentId == 3">
+                    <el-button type="text" @click="convertList(item, index)"
+                      >转物品清单</el-button
+                    >
+                  </div>
+
                   <div
                     v-for="(itm, index) in tableH(item.rootCategoryLevelId)"
                     :key="index"
@@ -324,7 +350,7 @@
               type="primary"
               size="small"
               class="u-reset-button"
-              @click="openPicking(3)"
+              @click="openPicking(3, 'output')"
             >
               添加
             </el-button>
@@ -353,10 +379,19 @@
                   <div class="items content_num">
                     <span>数量</span>
                     <input
-                      style="width: 90% !important"
+                      style="width: 30% !important"
                       v-model="item.demandQuantity"
                     />
                   </div>
+
+                  <div>
+                    <el-button
+                      type="text"
+                      @click="deleteOutput(index)"
+                      style="color: red"
+                      >删除</el-button
+                    >
+                  </div>
                 </div>
               </div>
             </label>
@@ -459,7 +494,8 @@
         checkListLen: 0,
 
         warehouseList: [],
-        pickOutInListSelect: []
+        pickOutInListSelect: [],
+        selectionIds: []
       };
     },
 
@@ -499,14 +535,25 @@
       // 	// this.outsourceMaterialFn()
       // 	// this.getWarehouseFn()
       // },
-      allSelection(e, item) {
+      allSelection(e, item, type) {
         if (e == 2) {
-          if (item.length) {
-            item.map((v) => {
-              this.bomMaterialList.push(v);
+          if (type == 'goods') {
+            item.map((it) => {
+              it.isSelection = '1';
+              it.categoryCode = it.code;
+              it.feedQuantity = 1;
+              it.categoryId = it.id;
+              it.newWeight = it.weight;
+              this.pickOutInList.push(this.deepCopy(it));
             });
+            this.selectionData();
+          } else {
+            if (item.length) {
+              item.map((v) => {
+                this.bomMaterialList.push(v);
+              });
+            }
           }
-          console.log(this.bomMaterialList);
         } else if (e == 3) {
           if (item.length) {
             this.standardOutputList = item;
@@ -514,8 +561,34 @@
         }
       },
 
-      openPicking(id) {
-        this.$refs.pickingListRef.open(id);
+      // selectionData(ids) {
+      //   this.$nextTick(() => {
+      //     this.tableData.forEach((row) => {
+      //       if (ids.includes(row.id)) {
+      //         this.$refs.table.toggleRowSelection(row, true);
+      //       }
+      //     });
+      //   });
+      // },
+
+      deepCopy(obj, hash = new WeakMap()) {
+        if (obj === null) return null;
+        if (obj instanceof Date) return new Date(obj);
+        if (obj instanceof RegExp) return new RegExp(obj);
+        if (typeof obj !== 'object' && typeof obj !== 'function') return obj;
+        if (hash.has(obj)) return hash.get(obj);
+
+        const result = Array.isArray(obj) ? [] : {};
+        hash.set(obj, result);
+
+        return Object.keys(obj).reduce((acc, key) => {
+          acc[key] = this.deepCopy(obj[key], hash);
+          return acc;
+        }, result);
+      },
+
+      openPicking(id, type) {
+        this.$refs.pickingListRef.open(id, type);
       },
 
       outsourceMaterialFn(res) {
@@ -525,6 +598,7 @@
         this.pickOutInList = _arr.reduce((acc, item) => {
           const existingItem = acc.find((existing) => existing.id === item.id);
           if (!existingItem) {
+            item.isSelection = '2';
             acc.push(item);
           }
           return acc;
@@ -578,6 +652,19 @@
         });
       },
 
+      inputNum(item, index) {
+        if (item.feedQuantity) {
+          const totalWeight = Number(item.feedQuantity) * Number(item.weight);
+          this.$set(this.pickOutInList[index], 'newWeight', totalWeight);
+          this.$forceUpdate();
+        } else {
+          this.$set(this.pickOutInList[index], 'newWeight', item.weight);
+          this.$forceUpdate();
+        }
+
+        console.log(this.pickOutInList, 'this.pickOutInList');
+      },
+
       // 仓库
       getWarehouseFn() {
         getWarehouseList().then((res) => {
@@ -647,6 +734,30 @@
         this.pickOutInListSelect = val;
       },
 
+      deleteOutput(index) {
+        this.standardOutputList.splice(index, 1);
+      },
+
+      convertList(item, index) {
+        if (item.demandQuantity) {
+          item.categoryCode = item.code;
+          item.feedQuantity = item.demandQuantity;
+          item.isSelection = '2';
+          item.categoryId = item.id;
+          item.newWeight = item.weight;
+          this.pickOutInList.push(item);
+          this.selectionData();
+          this.bomMaterialList.splice(index, 1);
+          this.$forceUpdate();
+        }
+      },
+
+      selectionData() {
+        this.$nextTick(() => {
+          this.$refs.pickOutRef.toggleAllSelection();
+        });
+      },
+
       scrolltolower() {},
 
       addPicking(id) {
@@ -692,6 +803,16 @@
           _pickOutInList = this.pickOutInListSelect;
         }
 
+        for (let i = 0; i < _pickOutInList.length; i++) {
+          if (
+            !_pickOutInList[i].feedQuantity &&
+            _pickOutInList[i].isSelection == '1'
+          ) {
+            this.$message.warning('物品数量不能为空');
+            return;
+          }
+        }
+
         let param = {
           ...this.outObj,
           isRelease: isRelease,
@@ -818,4 +939,9 @@
       background-color: #f7f9fa;
     }
   }
+
+  ::v-deep .el-input--medium .el-input__inner {
+    height: 26px;
+    line-height: 26px;
+  }
 </style>

+ 5 - 3
src/views/produce/components/outsourcing/pickingList.vue

@@ -189,7 +189,8 @@
         selection: [],
 
         allSelection: [],
-        temporaryList: []
+        temporaryList: [],
+        type: ''
       };
     },
 
@@ -575,6 +576,7 @@
             });
           });
         } else if (this.isType == 'weiwai') {
+          this.type = item;
           this.treeIds = '9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22';
           this.visible = true;
         }
@@ -619,7 +621,7 @@
 
             resolve();
           }).then(() => {
-            this.$emit('allSelection', this.id, this.allSelection);
+            this.$emit('allSelection', this.id, this.allSelection, this.type);
             this.handleClose();
           });
         } else {
@@ -627,7 +629,7 @@
             (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
           );
 
-          this.$emit('allSelection', this.id, this.allSelection);
+          this.$emit('allSelection', this.id, this.allSelection, this.type);
           this.handleClose();
         }
       }

+ 146 - 79
src/views/produce/components/productionResource/index.vue

@@ -2,8 +2,14 @@
   <div>
     <el-tabs v-model="activeName" type="border-card" @tab-click="tabsChange">
       <el-tab-pane lazy label="工艺参数" name="工艺参数">
-        <ele-pro-table ref="table" :datasource="newBomObj.produceList" :immediate="true" :need-page="false"
-          :columns="produceColumns" height="260px">
+        <ele-pro-table
+          ref="table"
+          :datasource="newBomObj.produceList"
+          :immediate="true"
+          :need-page="false"
+          :columns="produceColumns"
+          height="260px"
+        >
         </ele-pro-table>
       </el-tab-pane>
       <el-tab-pane lazy label="质检参数" name="质检参数"></el-tab-pane>
@@ -14,12 +20,19 @@
         <normalHoursInfo :normalHours="newBomObj.normalHours"></normalHoursInfo>
       </el-tab-pane>
       <el-tab-pane lazy label="材料定额" name="材料定额">
-        <ele-pro-table ref="materialQuotaTable" :columns="materialQuotaColumns" :datasource="newBomObj.materialQuota"
-          :need-page="false" :immediate="true" height="260px">
+        <ele-pro-table
+          ref="materialQuotaTable"
+          :columns="materialQuotaColumns"
+          :datasource="newBomObj.materialQuota"
+          :need-page="false"
+          :immediate="true"
+          height="260px"
+        >
           <template v-slot:toolbar>
             基本数量:
             <span style="color: rgb(21, 122, 44)">
-              {{ newBomObj.baseCount }} {{ newBomObj.baseCountUnit }}</span>
+              {{ newBomObj.baseCount }} {{ newBomObj.baseCountUnit }}</span
+            >
           </template>
 
           <template v-slot:isReworkBom="{ row }">
@@ -27,36 +40,64 @@
           </template>
 
           <template v-slot:bomArtFiles="{ row }">
-            <el-button size="mini" type="primary" @click="downloadFile(row.bomArtFiles)">下载</el-button>
+            <el-button
+              size="mini"
+              type="primary"
+              @click="downloadFile(row.bomArtFiles)"
+              >下载</el-button
+            >
           </template>
         </ele-pro-table>
       </el-tab-pane>
 
       <el-tab-pane lazy label="关键设备" name="关键设备">
-        <ele-pro-table ref="standardDeviceTable" :columns="standardColumns" :datasource="newBomObj.standardDevice"
-          row-key="id" height="260px">
+        <ele-pro-table
+          ref="standardDeviceTable"
+          :columns="standardColumns"
+          :datasource="newBomObj.standardDevice"
+          row-key="id"
+          height="260px"
+        >
         </ele-pro-table>
       </el-tab-pane>
 
       <el-tab-pane lazy label="制造资源" name="制造资源">
-        <ele-pro-table ref="resourceTable" :columns="materialQuotaColumns" :datasource="newBomObj.resource"
-          :need-page="false" :immediate="true" height="260px">
+        <ele-pro-table
+          ref="resourceTable"
+          :columns="materialQuotaColumns"
+          :datasource="newBomObj.resource"
+          :need-page="false"
+          :immediate="true"
+          height="260px"
+        >
           <template v-slot:isReworkBom="{ row }">
             {{ row.isReworkBom ? '是' : '否' }}
           </template>
 
           <template v-slot:bomArtFiles="{ row }">
-            <el-button size="mini" type="primary" @click="downloadFile(row.bomArtFiles)">下载</el-button>
+            <el-button
+              size="mini"
+              type="primary"
+              @click="downloadFile(row.bomArtFiles)"
+              >下载</el-button
+            >
           </template>
         </ele-pro-table>
       </el-tab-pane>
       <el-tab-pane lazy label="替代料" name="替代料">
-        <ele-pro-table ref="replaceMaterialTable" :columns="materialQuotaColumns"
-          :datasource="newBomObj.replaceMaterial" :need-page="false" :immediate="true" height="260px">
+        <ele-pro-table
+          ref="replaceMaterialTable"
+          :columns="materialQuotaColumns"
+          :datasource="newBomObj.replaceMaterial"
+          :need-page="false"
+          :immediate="true"
+          height="260px"
+        >
           <template v-slot:toolbar>
             基本数量:
             <span style="color: rgb(21, 122, 44)">
-              {{ newBomObj.baseCount2 }} {{ newBomObj.baseCountUnit2 }}</span>
+              {{ newBomObj.baseCount2 }} {{ newBomObj.baseCountUnit2 }}</span
+            >
           </template>
 
           <template v-slot:isReworkBom="{ row }">
@@ -64,26 +105,52 @@
           </template>
 
           <template v-slot:bomArtFiles="{ row }">
-            <el-button size="mini" type="primary" @click="downloadFile(row.bomArtFiles)">下载</el-button>
+            <el-button
+              size="mini"
+              type="primary"
+              @click="downloadFile(row.bomArtFiles)"
+              >下载</el-button
+            >
           </template>
         </ele-pro-table>
       </el-tab-pane>
       <el-tab-pane lazy label="工种" name="工种">
-        <ele-pro-table ref="aptitudeParamTable" :columns="aptitudeParamColumns" :datasource="newBomObj.aptitudeParam"
-          row-key="id" height="260px">
+        <ele-pro-table
+          ref="aptitudeParamTable"
+          :columns="aptitudeParamColumns"
+          :datasource="newBomObj.aptitudeParam"
+          row-key="id"
+          height="260px"
+        >
         </ele-pro-table>
       </el-tab-pane>
       <el-tab-pane lazy label="工艺文件" name="工艺文件">
-        <ele-pro-table ref="fileParamTable" :columns="fileParamColumns" :datasource="newBomObj.fileParam" row-key="id"
-          height="260px">
+        <ele-pro-table
+          ref="fileParamTable"
+          :columns="fileParamColumns"
+          :datasource="newBomObj.fileParam"
+          row-key="id"
+          height="260px"
+        >
           <template v-slot:path="{ row }">
-            <el-button v-if="row.path" size="mini" type="primary" @click="downloadFile(row.path)">下载</el-button>
+            <el-button
+              v-if="row.path"
+              size="mini"
+              type="primary"
+              @click="downloadFile(row.path)"
+              >下载</el-button
+            >
           </template>
         </ele-pro-table>
       </el-tab-pane>
       <el-tab-pane lazy label="标准产出" name="标准产出">
-        <ele-pro-table ref="standardTable" :columns="standardColumns" :datasource="newBomObj.standardOutput"
-          row-key="id" height="260px">
+        <ele-pro-table
+          ref="standardTable"
+          :columns="standardColumns"
+          :datasource="newBomObj.standardOutput"
+          row-key="id"
+          height="260px"
+        >
         </ele-pro-table>
       </el-tab-pane>
     </el-tabs>
@@ -91,69 +158,69 @@
 </template>
 
 <script>
-import {
-  produceColumns,
-  materialQuotaColumns,
-  aptitudeParamColumns,
-  fileParamColumns,
-  standardColumns
-} from './columnsTab.js';
-
-import beatInfo from './components/beatInfo.vue';
-import normalHoursInfo from './components/normalHoursInfo.vue';
-
-import { getFile } from '@/api/system/file';
-export default {
-  components: {
-    beatInfo,
-    normalHoursInfo
-  },
-
-  props: {
-    BomObj: {
-      type: Object
-    }
-  },
+  import {
+    produceColumns,
+    materialQuotaColumns,
+    aptitudeParamColumns,
+    fileParamColumns,
+    standardColumns
+  } from './columnsTab.js';
+
+  import beatInfo from './components/beatInfo.vue';
+  import normalHoursInfo from './components/normalHoursInfo.vue';
+
+  import { getFile } from '@/api/system/file';
+  export default {
+    components: {
+      beatInfo,
+      normalHoursInfo
+    },
+
+    props: {
+      BomObj: {
+        type: Object
+      }
+    },
 
-  watch: {
-    BomObj: {
-      handler(val) {
-        this.newBomObj = JSON.parse(JSON.stringify(val));
+    watch: {
+      BomObj: {
+        handler(val) {
+          this.newBomObj = JSON.parse(JSON.stringify(val));
 
-        this.$forceUpdate();
-      },
-      immediate: true,
-      deep: true
-    }
-  },
-
-  data() {
-    return {
-      activeName: '工艺参数',
-      newBomObj: {},
-
-      produceColumns,
-      materialQuotaColumns,
-      aptitudeParamColumns,
-      fileParamColumns,
-      standardColumns
-    };
-  },
-
-  methods: {
-    tabsChange(tab) {
-      this.activeName = tab.name;
+          this.$forceUpdate();
+        },
+        immediate: true,
+        deep: true
+      }
     },
 
-    downloadFile(url) {
-      getFile({ objectName: url }, '附件');
+    data() {
+      return {
+        activeName: '工艺参数',
+        newBomObj: {},
+
+        produceColumns,
+        materialQuotaColumns,
+        aptitudeParamColumns,
+        fileParamColumns,
+        standardColumns
+      };
+    },
+
+    methods: {
+      tabsChange(tab) {
+        this.activeName = tab.name;
+      },
+
+      downloadFile(url) {
+        getFile({ objectName: url }, '附件');
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss">
-.el-tabs__content {
-  padding: 4px !important;
-}
+  .el-tabs__content {
+    padding: 4px !important;
+  }
 </style>

+ 1 - 1
src/views/produce/components/workPlan/components/term.vue

@@ -114,7 +114,7 @@
             value: 2
           },
           {
-            name: '让步接',
+            name: '让步接',
             value: 3
           }
         ],

+ 121 - 3
src/views/produce/index.vue

@@ -236,6 +236,24 @@
                   v-if="isOutsource"
                 ></outsourceList>
               </div>
+
+              <!-- <div class="menu-container">
+                <div class="main-btn" @click="toggleMenu">
+                  <span>+</span>
+                </div>
+
+                <transition-group name="fan" tag="div">
+                  <div
+                    v-for="(btn, index) in buttons"
+                    :key="btn.label"
+                    class="sub-btn"
+                    :style="getBtnStyle(index)"
+                    v-show="isOpen"
+                  >
+                    {{ btn.label }}
+                  </div>
+                </transition-group>
+              </div> -->
             </div>
           </template>
         </ele-split-layout>
@@ -277,6 +295,9 @@
 
     <!-- 周转车列表 -->
     <turnover ref="turnoverRef" />
+
+    <!-- BOM详情 -->
+    <BomDetailsPop ref="bomDrawer"></BomDetailsPop>
   </div>
 </template>
 
@@ -307,6 +328,7 @@
   import device from './components/device/index.vue';
   import turnover from './components/turnover/index.vue';
   import outsourcingDetails from './components/outsourcing/details.vue';
+  import BomDetailsPop from './components/bom/detailsPop.vue';
   import { parameterGetByCode } from '@/api/system/dictionary-data';
   import {
     getByTaskId,
@@ -340,7 +362,8 @@
       createError,
       device,
       turnover,
-      outsourcingDetails
+      outsourcingDetails,
+      BomDetailsPop
     },
     data() {
       return {
@@ -385,7 +408,15 @@
           taskId: null,
           workOrderId: null,
           bomCategoryId: null
-        }
+        },
+        isOpen: false,
+        buttons: [
+          { label: '按钮1' },
+          { label: '按钮2' },
+          { label: '按钮3' },
+          { label: '按钮4' }
+        ],
+        radius: 120 // 按钮展开的半径
       };
     },
 
@@ -415,6 +446,20 @@
         this.name = '';
         this.seekInput();
       },
+
+      toggleMenu() {
+        this.isOpen = !this.isOpen;
+      },
+      getBtnStyle(index) {
+        // 计算扇形角度分布
+        const angle = Math.PI / 2 / (this.buttons.length - 1); // 90° 扇形
+        const x = Math.cos(angle * index) * this.radius;
+        const y = Math.sin(angle * index) * this.radius;
+        return {
+          transform: `translate(${x}px, ${y}px)`,
+          transitionDelay: `${index * 0.05}s`
+        };
+      },
       // 前端筛选
       seekInput() {
         // console.log(activeName);
@@ -728,8 +773,21 @@
           } else if (this.workListIds.length < 1)
             return this.$message.warning('请选择工单!');
           else {
+            console.log(this.workData);
+            const row = this.workData.list[0];
+            let rowData = {
+              categoryId: row.categoryId,
+              categoryName: row.bomCategoryName,
+              code: row.code,
+              versions: row.bomCategoryVersions,
+              rootPathIdParent: row.categoryLevelPathIdParent || '',
+              isProduct: true,
+              bomType: Number(row.bomType),
+              isTemp: 0
+            };
+            this.$refs.bomDrawer.open(rowData);
             // /
-            console.log(this.workData.list, 'this.workData.list');
+            // console.log(this.workData.list, 'this.workData.list');
           }
           //    let rowData = {
           //   categoryId: row.id,
@@ -770,6 +828,8 @@
             ...res.data
           };
           this.outsourceForm.name = this.taskObj.name + '委外';
+          this.isStep = false;
+          this.isOutsource = false;
 
           if (res.data.outsource) {
             this.isType = '3';
@@ -1024,4 +1084,62 @@
     height: calc((100vh - 70px - 50px - 80px - 12px));
     background: #f0f3f3;
   }
+
+  .menu-container {
+    position: relative;
+    width: 200px;
+    height: 200px;
+    margin: 100px;
+  }
+
+  /* 主按钮 */
+  .main-btn {
+    width: 60px;
+    height: 60px;
+    background: #3498db;
+    border-radius: 50%;
+    color: #fff;
+    font-size: 30px;
+    text-align: center;
+    line-height: 60px;
+    cursor: pointer;
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
+    transition: transform 0.3s;
+  }
+  .main-btn:hover {
+    transform: rotate(90deg);
+  }
+
+  /* 子按钮 */
+  .sub-btn {
+    width: 40px;
+    height: 40px;
+    background: #e74c3c;
+    border-radius: 50%;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 50px;
+    position: absolute;
+    left: 5px;
+    bottom: 5px;
+    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
+    transform: translate(0, 0);
+    transition: all 0.4s ease;
+    opacity: 1;
+  }
+
+  /* 动画进入/离开 */
+  .fan-enter-active,
+  .fan-leave-active {
+    transition: all 0.4s ease;
+  }
+  .fan-enter,
+  .fan-leave-to {
+    opacity: 0;
+    transform: translate(0, 0);
+  }
 </style>

+ 7 - 2
src/views/unacceptedProduct/components/factoryAdd.vue

@@ -423,8 +423,11 @@
     watch: {
       factoryData: {
         handler(val) {
-          console.log(this.form);
-          this.form.productInfoList = val;
+          val.forEach((item, index) => {
+            // item.requiredFormingNum=item.measureQuantity
+            this.$set(item, 'requiredFormingNum', item.measureQuantity);
+          });
+          this.$set(this.form, 'productInfoList', val);
         },
         immediate: true
       }
@@ -1045,6 +1048,8 @@
           if (this.form.productInfoList.length) {
             this.form.productInfoList.map((item, index) => {
               delete item.selectionRowShow;
+              item.productCode = item.categoryCode;
+              item.productName = item.categoryName;
               if (item.bomVersionList && item.bomVersionList.length) {
                 item.bomCategoryName = item.bomVersionList[0].name;
                 item.bomCategoryVersions = item.bomVersionList[0].versions;

+ 26 - 2
src/views/unacceptedProduct/rework/index.vue

@@ -130,8 +130,7 @@
             align: 'center',
             reserveSelection: true,
             selectable: (row, index) => {
-              return true;
-              return row.disposalStatus !== 2; //
+              return row.status == 0; //
             }
           },
           {
@@ -250,6 +249,31 @@
             label: '原因',
             align: 'center'
           },
+          {
+            prop: 'type',
+            label: '处理类型',
+            align: 'center',
+            width: 120,
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1
+                ? '转生产计划'
+                : cellValue == 2
+                ? '转生产订单'
+                : cellValue == 3
+                ? '转生产工单'
+                : cellValue == 4
+                ? '回流'
+                : '';
+            }
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 0 ? '未处理' : cellValue == 1 ? '已处理' : '';
+            }
+          },
 
           {
             prop: 'createTime',

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

@@ -23,7 +23,7 @@
         </template>
 
         <template v-slot:approvalStatus="{ row }">
-          <span :class="{ 'ele-text-danger': row.approvalStatus == 2 }">
+          <span :class="{ 'ele-text-success': row.approvalStatus == 2 }">
             {{ statusFormatter(row.approvalStatus) }}
           </span>
         </template>
@@ -173,6 +173,8 @@
                 ? '生产入库'
                 : cellValue == 8
                 ? '委外入库'
+                : cellValue == 3
+                ? '退料入库'
                 : '';
             }
           },