Ver código fonte

Merge branch '打单' into 测试

lxf 1 ano atrás
pai
commit
0b379d3108

+ 7 - 50
src/views/production/shipment/print-order/packTotal.vue

@@ -6,20 +6,14 @@
       <div style="box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1); margin-bottom: 20px" v-for="(item, index) in formData.data.orderEncasementList" :key="index">
         <div style="background-color: #edf0f5; padding: 4px">
           <el-row :gutter="4" class="row-top">
-            <el-col :span="5">单包裹规格格(cm)</el-col>
-            <el-col :span="4">单包裹净重(kg)</el-col>
-            <el-col :span="4">单包裹体积(m³)</el-col>
-            <el-col :span="3">总包裹数</el-col>
-            <el-col :span="4">总净重(kg)</el-col>
-            <el-col :span="4">总体积(m³)</el-col>
+            <el-col :span="8">包裹规格格(cm)</el-col>
+            <el-col :span="8">包裹净重(kg)</el-col>
+            <el-col :span="8">包裹体积(m³)</el-col>
           </el-row>
           <el-row :gutter="4" class="row-bottom">
-            <el-col :span="5">{{ `${item.length}*${item.width}*${item.height}` }}</el-col>
-            <el-col :span="4">{{ item.netWeight / 1000 }}</el-col>
-            <el-col :span="4">{{ (item.length * item.width * item.height) / 1000000 }}</el-col>
-            <el-col :span="3">{{ item.total }}</el-col>
-            <el-col :span="4">{{ (item.netWeight / 1000) * item.total }}</el-col>
-            <el-col :span="4">{{ ((item.length * item.width * item.height) / 1000000) * item.total }}</el-col>
+            <el-col :span="8">{{ `${item.length}*${item.width}*${item.height}` }}</el-col>
+            <el-col :span="8">{{ item.netWeight / 1000 }}</el-col>
+            <el-col :span="8">{{ (item.length * item.width * item.height) / 1000000 }}</el-col>
           </el-row>
         </div>
         <div style="background-color: white; border: 1px solid #ebeef5">
@@ -28,8 +22,7 @@
             :data="item.orderEncasementDetailList"
             :row-style="{ height: '35px' }"
             :cell-style="{ padding: '0' }"
-            header-row-class-name="tableHeaderTwo"
-            :span-method="arraySpanMethod">
+            header-row-class-name="tableHeaderTwo">
             <el-table-column label="产品品号" prop="skuSpecCode" width="150" />
             <el-table-column label="产品品名" prop="skuSpecName" />
             <el-table-column label="打包数量" align="center" width="120">
@@ -39,11 +32,6 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="总包裹数" align="center" width="120">
-              <template #default="{ row }">
-                <div>x {{ item.total }}</div>
-              </template>
-            </el-table-column>
           </el-table>
         </div>
       </div>
@@ -75,22 +63,6 @@ const getDetails = () => {
   loading.value = true;
   proxy.post("/issueBill/assemblyDetail", { id: props.rowData.id }).then(
     (res) => {
-      if (res.orderEncasementList && res.orderEncasementList.length > 0) {
-        res.orderEncasementList = res.orderEncasementList.map((item) => {
-          if (item.orderEncasementDetailList && item.orderEncasementDetailList.length > 0) {
-            item.orderEncasementDetailList = item.orderEncasementDetailList.map((itemTwo, index) => {
-              return {
-                ...itemTwo,
-                rowspan: item.orderEncasementDetailList.length,
-                rowIndex: index,
-              };
-            });
-          }
-          return {
-            ...item,
-          };
-        });
-      }
       formData.data = res;
       loading.value = false;
     },
@@ -100,21 +72,6 @@ const getDetails = () => {
     }
   );
 };
-const arraySpanMethod = ({ row, columnIndex }) => {
-  if (columnIndex === 3) {
-    if (row.rowIndex === 0) {
-      return {
-        rowspan: row.rowspan,
-        colspan: 1,
-      };
-    } else {
-      return {
-        rowspan: 0,
-        colspan: 0,
-      };
-    }
-  }
-};
 const emit = defineEmits(["clickCancel"]);
 const clickCancel = () => {
   emit("clickCancel", false);

+ 9 - 52
src/views/production/shipment/print-order/unpack.vue

@@ -84,22 +84,16 @@
               :key="index">
               <div style="background-color: #edf0f5; padding: 4px">
                 <el-row :gutter="4" class="row-top">
-                  <el-col :span="5">单包裹规格格(cm)</el-col>
-                  <el-col :span="4">单包裹净重(kg)</el-col>
-                  <el-col :span="4">单包裹体积(m³)</el-col>
-                  <el-col :span="2">总包裹数</el-col>
-                  <el-col :span="3">总净重(kg)</el-col>
-                  <el-col :span="3">总体积(m³)</el-col>
-                  <el-col :span="3">操作</el-col>
+                  <el-col :span="8">包裹规格格(cm)</el-col>
+                  <el-col :span="6">包裹净重(kg)</el-col>
+                  <el-col :span="6">包裹体积(m³)</el-col>
+                  <el-col :span="4">操作</el-col>
                 </el-row>
                 <el-row :gutter="4" class="row-bottom">
-                  <el-col :span="5">{{ `${item.length}*${item.width}*${item.height}` }}</el-col>
-                  <el-col :span="4">{{ item.netWeight / 1000 }}</el-col>
-                  <el-col :span="4">{{ (item.length * item.width * item.height) / 1000000 }}</el-col>
-                  <el-col :span="2">{{ item.total }}</el-col>
-                  <el-col :span="3">{{ (item.netWeight / 1000) * item.total }}</el-col>
-                  <el-col :span="3">{{ ((item.length * item.width * item.height) / 1000000) * item.total }}</el-col>
-                  <el-col :span="3">
+                  <el-col :span="8">{{ `${item.length}*${item.width}*${item.height}` }}</el-col>
+                  <el-col :span="6">{{ item.netWeight / 1000 }}</el-col>
+                  <el-col :span="6">{{ (item.length * item.width * item.height) / 1000000 }}</el-col>
+                  <el-col :span="4">
                     <el-button type="primary" @click="copyPack(item)" text>复制包裹</el-button>
                     <el-button type="danger" @click="deletePack(item)" text>删除</el-button>
                   </el-col>
@@ -111,8 +105,7 @@
                   :data="item.orderEncasementDetailList"
                   :row-style="{ height: '35px' }"
                   :cell-style="{ padding: '0' }"
-                  header-row-class-name="tableHeaderTwo"
-                  :span-method="arraySpanMethod">
+                  header-row-class-name="tableHeaderTwo">
                   <el-table-column label="产品品号" prop="skuSpecCode" width="150" />
                   <el-table-column label="产品品名" prop="skuSpecName" />
                   <el-table-column label="打包数量" align="center" width="120">
@@ -122,11 +115,6 @@
                       </div>
                     </template>
                   </el-table-column>
-                  <el-table-column label="总包裹数" align="center" width="120">
-                    <template #default="{ row }">
-                      <div>x {{ item.total }}</div>
-                    </template>
-                  </el-table-column>
                 </el-table>
               </div>
             </div>
@@ -183,22 +171,6 @@ const getDetails = () => {
   loading.value = true;
   proxy.post("/issueBill/assemblyDetail", { id: route.query.id }).then(
     (res) => {
-      if (res.orderEncasementList && res.orderEncasementList.length > 0) {
-        res.orderEncasementList = res.orderEncasementList.map((item) => {
-          if (item.orderEncasementDetailList && item.orderEncasementDetailList.length > 0) {
-            item.orderEncasementDetailList = item.orderEncasementDetailList.map((itemTwo, index) => {
-              return {
-                ...itemTwo,
-                rowspan: item.orderEncasementDetailList.length,
-                rowIndex: index,
-              };
-            });
-          }
-          return {
-            ...item,
-          };
-        });
-      }
       formData.data = res;
       loading.value = false;
     },
@@ -238,21 +210,6 @@ const submitPack = () => {
     }
   });
 };
-const arraySpanMethod = ({ row, columnIndex }) => {
-  if (columnIndex === 3) {
-    if (row.rowIndex === 0) {
-      return {
-        rowspan: row.rowspan,
-        colspan: 1,
-      };
-    } else {
-      return {
-        rowspan: 0,
-        colspan: 0,
-      };
-    }
-  }
-};
 const openCopy = ref(false);
 const formCopy = reactive({
   data: {