yusheng пре 10 месеци
родитељ
комит
93c0b108b3
1 измењених фајлова са 24 додато и 8 уклоњено
  1. 24 8
      src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

+ 24 - 8
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -9,7 +9,6 @@
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
       :maxHeight="350"
-
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
@@ -25,12 +24,12 @@
             新增
           </el-button>
           <el-button
-            v-if="isShowAdd && needProduce == 4"
             size="small"
             type="primary"
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="handParent()"
+            v-if="isShowAdd && needProduce == 4"
           >
             新增
           </el-button>
@@ -301,6 +300,7 @@
             type="number"
             :min="0"
             @input="changeCount(scope.row, scope.$index)"
+            :disabled="clientEnvironmentId!=4"
           >
           </el-input>
         </el-form-item>
@@ -314,6 +314,8 @@
             v-model="scope.row.saleUnitId"
             style="width: 100%"
             @change="changeCount(scope.row, scope.$index)"
+            :disabled="clientEnvironmentId!=4"
+
           >
             <el-option
               :label="item.conversionUnit"
@@ -492,17 +494,16 @@
         defaultForm,
         warehouseList: [],
         dynamicsColumns: [],
-        columnsVersion:1,
+        columnsVersion: 1,
         form: {
           datasource: []
         },
-        rules: {},
+        rules: {}
       };
     },
     created() {
       this.requestDict('产地');
       this.requestDict('生产类型');
-
     },
     computed: {
       canHandl() {
@@ -515,7 +516,7 @@
         return this.$store.state.user.info.clientEnvironmentId;
       },
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
 
         return [
           {
@@ -638,7 +639,8 @@
             label: '发货数量',
             slot: 'saleCount',
             headerSlot: 'headerTotalCount',
-            align: 'center'
+            align: 'center',
+           
           },
           {
             width: 150,
@@ -685,7 +687,7 @@
             label: '发货块数',
             slot: 'blockCount',
             align: 'center',
-            show: this.clientEnvironmentId == '4'
+            show:this.clientEnvironmentId==4
           },
           {
             width: 120,
@@ -1125,6 +1127,7 @@
             row.totalCount =
               (Number(row.blockCount) * modelLong * modeWide * modeHight) /
               1000000;
+            row.saleCount =row.totalCount
             this.changeCount(row, index);
           }
         }
@@ -1172,7 +1175,20 @@
           this.$set(parasm, 'receiveTotalWeight', 0);
           this.$set(parasm, 'sendTotalWeight', 0);
           this.$set(parasm, 'increaseTotalWeight', 0);
+          this.$set(
+            parasm,
+            'packageDispositionList',
+            item.packageDispositionList
+          );
 
+          if (item.packageDispositionList?.length) {
+            this.$set(parasm, 'saleUnitId', item.packageDispositionList[0].id);
+            this.$set(
+              parasm,
+              'saleUnit',
+              item.packageDispositionList[0].conversionUnit
+            );
+          }
           this.$set(
             parasm,
             'warehouseList',