ysy пре 1 година
родитељ
комит
cb3e494015

+ 12 - 4
src/views/produce/components/jobBooking/components/semiProductJobBomPL.vue

@@ -17,9 +17,9 @@
       border
       :default-expand-all="true"
     >
-      <el-table-column type="expand">
+      <el-table-column type="expand"  label="批量"  width="80">
         <template slot-scope="{ row, $index }">
-          <div class="material" :key="$index" v-if="isDetails && row.extInfo.batchReportInfo.length > 0">
+          <div class="material" :key="$index" >
             <div class="btn_end">
               <el-button
                 v-if='!isDetails'
@@ -33,7 +33,7 @@
               <div class="content_table2">
                 <div class="head row rx-sc">
                   <div class="item ww30">合格品数量</div>
-                  <div class="item ww30">报工总重量</div>
+                  <div class="item ww30">报工总重量 /{{row.extInfo.weightUnit}} </div>
                   <div class="item ww30">处置</div>
                   <div class="item ww10">操作</div>
                 </div>
@@ -74,6 +74,7 @@
                         filterable
                         v-model="it.taskId"
                         placeholder="请选择"
+                        @change="(e) => selectName(e, $index, yyIdx)"
                       >
                         <el-option
                           v-for="item in stepsList"
@@ -363,7 +364,14 @@
 
       handDel3(idx, yyIdx) {
         this.list[idx].extInfo.batchReportInfo.splice(yyIdx, 1);
-      }
+      },
+
+      
+      selectName(value, idx, yyIdx) {
+        const taskObj = this.stepsList.find((item) => item.taskId === value);
+        this.$set(this.list[idx].extInfo.batchReportInfo[yyIdx], 'taskName', taskObj.taskTypeName);
+        this.$forceUpdate();
+      },
     },
 
     created() {

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

@@ -18,35 +18,17 @@
         :responsive="false"
         style="height: calc(100vh - 70px - 50px - 80px)"
       >
-        <ele-split-layout
-          space="0px"
-          width="50%"
-          :resizable="true"
-          :vertical="true"
-          :min-size="45"
-          :max-size="-45"
-          :left-style="{
-            background: 'rgba(171, 199, 255, .5)',
-            overflow: 'hidden',
-            height: '100%'
-          }"
-          :right-style="{
-            background: 'rgba(125, 226, 252, .4)',
-            overflow: 'hidden',
-            height: '100%'
-          }"
-          :responsive="false"
-          class="left_main"
-        >
+        <div class="left_main">
           <div class="top">
-            <produceOrder @workSelect="workSelect" @rowClick="rowClick"></produceOrder>
+            <produceOrder
+              @workSelect="workSelect"
+              @rowClick="rowClick"
+            ></produceOrder>
           </div>
-          <template #content>
-            <div class="bottom">
-              <productionResource :BomObj="BomObj"></productionResource>
-            </div>
-          </template>
-        </ele-split-layout>
+          <div class="bottom">
+            <productionResource :BomObj="BomObj"></productionResource>
+          </div>
+        </div>
 
         <template v-slot:content>
           <div class="right_main">
@@ -101,8 +83,8 @@
   import jobBooking from './components/jobBooking/index.vue';
   import warehousing from './components/warehousing/index.vue';
 
-  import { getByTaskId } from   '@/api/produce/index';
- 
+  import { getByTaskId } from '@/api/produce/index';
+
   export default {
     components: {
       Search,
@@ -182,22 +164,21 @@
         this.pickingShow = false;
       },
 
-      rowClick(row,taskId) {
-        console.log(6666,row)
-         if(taskId) {
-          console.log(6666)
+      rowClick(row, taskId) {
+        console.log(6666, row);
+        if (taskId) {
+          console.log(6666);
           let params = {
-            categoryId:row.categoryId,
+            categoryId: row.categoryId,
             taskId: taskId
-           }
-          getByTaskId(params).then(res => {
-        
-            this.BomObj = res.data 
-            this.$forceUpdate()
-
-            console.log(88,  this.BomObj)
-          })
-         }
+          };
+          getByTaskId(params).then((res) => {
+            this.BomObj = res.data;
+            this.$forceUpdate();
+
+            console.log(88, this.BomObj);
+          });
+        }
       }
     },
 
@@ -341,5 +322,6 @@
     min-width: 640px;
     height: calc((100vh - 70px - 50px - 80px - 12px));
     margin-top: 6px;
+    background: #f0f3f3;
   }
 </style>