Ver Fonte

【修改】bug

莫绍宝 há 3 anos atrás
pai
commit
a053752863

+ 117 - 88
src/components/Common/print-foshan.vue

@@ -1,100 +1,106 @@
 <template>
   <div class="detail-container">
-    <div class="print-form-1">
-      <el-row :gutter="0">
-        <el-col :span="6" class="item">
-          <div class="label">经销商编码:</div>
-          <div class="value">{{detailData.customerId}}</div>
-        </el-col>
-        <el-col :span="6" class="item">
-          <div class="label">出库日期:</div>
-          <div class="value">{{nowDate}}</div>
-        </el-col>
-        <el-col :span="6" class="item">
-          <div class="label">仓库:</div>
-          <div class="value">{{detailData.correspondName}}</div>
-        </el-col>
-        <el-col :span="6" class="item">
-          <div class="label">信息密钥:</div>
-          <div class="value">{{detailData.informationKey}}</div>
-        </el-col>
-        <el-col :span="24" class="item">
-          <div class="label">经销商:</div>
-          <div class="value">{{detailData.customerName}}</div>
-        </el-col>
-      </el-row>
-    </div>
-
-    <div class="print-table-1">
-      <div class="head">
-        <el-row :gutter="20">
-          <el-col :span="4">发货单号/订单号</el-col>
-          <el-col :span="3">销售类型</el-col>
-          <el-col :span="3">文件编号</el-col>
-          <el-col :span="8">规格型号</el-col>
-          <el-col :span="3">单位</el-col>
-          <el-col :span="3">数量</el-col>
+    <div class="print-page" v-for="(item, index) in showData" :key="index">
+      <div class="print-title">
+        <div class="title1">佛山盛世欣兴格力贸易有限公司</div>
+        <div class="title2">商品发货单</div>
+      </div>
+      <div class="print-form-1">
+        <el-row :gutter="0">
+          <el-col :span="6" class="item">
+            <div class="label">经销商编码:</div>
+            <div class="value">{{ item.customerId }}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">出库日期:</div>
+            <div class="value">{{nowDate}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">仓库:</div>
+            <div class="value">{{ item.correspondName }}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">信息密钥:</div>
+            <div class="value">{{ item.informationKey }}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">经销商:</div>
+            <div class="value">{{ item.customerName }}</div>
+          </el-col>
         </el-row>
       </div>
-      <div class="body">
-        <div v-for="(item, index) in detailData.invoicePickBeans" :key="index">
+
+      <div class="print-table-1">
+        <div class="head">
           <el-row :gutter="20">
-            <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
-            <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
-            <el-col :span="3">{{ item.fileNo || '' }}</el-col>
-            <el-col :span="8">{{ item.specification || '' }}</el-col>
-            <el-col :span="3">{{ item.unit || '' }}</el-col>
-            <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
+            <el-col :span="4">发货单号/订单号</el-col>
+            <el-col :span="3">销售类型</el-col>
+            <el-col :span="3">文件编号</el-col>
+            <el-col :span="8">规格型号</el-col>
+            <el-col :span="3">单位</el-col>
+            <el-col :span="3">数量</el-col>
           </el-row>
+        </div>
+        <div class="body">
+          <div v-for="(item, index) in item.invoicePickBeans" :key="index">
+            <el-row :gutter="20">
+              <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
+              <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
+              <el-col :span="3">{{ item.fileNo || '' }}</el-col>
+              <el-col :span="8">{{ item.specification || '' }}</el-col>
+              <el-col :span="3">{{ item.unit || '' }}</el-col>
+              <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
+              <el-col :span="2">发货日期</el-col>
+              <el-col :span="4">{{ item.theTime || '' }}</el-col>
+              <el-col :span="2">工程编号</el-col>
+              <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
+              <el-col :span="2">备注</el-col>
+              <el-col :span="6">{{ item.remark || '' }}</el-col>
+            </el-row>
+          </div>
+        </div>
+        <div class="foot">
           <el-row :gutter="20">
-            <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
-            <el-col :span="2">发货日期</el-col>
-            <el-col :span="4">{{ item.theTime || '' }}</el-col>
-            <el-col :span="2">工程编号</el-col>
-            <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
-            <el-col :span="2">备注</el-col>
-            <el-col :span="6">{{ item.remark || '' }}</el-col>
+            <el-col :span="21">合计</el-col>
+            <el-col :span="3">{{ item.total }}</el-col>
           </el-row>
         </div>
       </div>
-      <div class="foot">
-        <el-row :gutter="20">
-          <el-col :span="21">合计</el-col>
-          <el-col :span="3">{{total}}</el-col>
+
+      <div class="print-form-2">
+        <el-row :gutter="30">
+          <el-col :span="8" class="item">
+            <div class="label">销售公司</div>
+            <div class="value">
+              <el-input readonly></el-input>
+            </div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">仓库</div>
+            <div class="value">
+              <el-input readonly></el-input>
+            </div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商</div>
+            <div class="value">
+              <el-input readonly></el-input>
+            </div>
+          </el-col>
         </el-row>
       </div>
     </div>
 
-    <div class="print-form-2">
-      <el-row :gutter="30">
-        <el-col :span="8" class="item">
-          <div class="label">销售公司</div>
-          <div class="value">
-            <el-input readonly></el-input>
-          </div>
-        </el-col>
-        <el-col :span="8" class="item">
-          <div class="label">仓库</div>
-          <div class="value">
-            <el-input readonly></el-input>
-          </div>
-        </el-col>
-        <el-col :span="8" class="item">
-          <div class="label">经销商</div>
-          <div class="value">
-            <el-input readonly></el-input>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
-
   </div>
 </template>
 
 <script>
 
 export default {
-  name: 'PrintGuangzhou',
+  name: 'PrintFoshan',
   props: {
     detailData: {
       type: Object,
@@ -103,6 +109,24 @@ export default {
   },
 
   computed: {
+    showData() {
+      var showData = [];
+      if(this.detailData && this.detailData.invoicePickBeans) {
+        for(var i=0; i<this.detailData.invoicePickBeans.length; i+=2){
+          let obj = JSON.parse(JSON.stringify(this.detailData));
+          obj.invoicePickBeans = this.detailData.invoicePickBeans.slice(i, i+2);
+          let num = 0;
+          obj.invoicePickBeans.forEach(item => {
+            num = num + item.refundableQty;
+          });
+          obj.total = num;
+          showData.push(obj);
+        }
+      }
+      console.log(showData);
+      return showData;
+    },
+    
     nowDate() {
       var date = new Date();
       var seperator1 = "-";
@@ -118,17 +142,6 @@ export default {
       var currentdate = year + seperator1 + month + seperator1 + strDate;
       return currentdate;
     },
-
-    total() {
-      if(!this.detailData.invoicePickBeans) {
-        return false;
-      }
-      let num = 0;
-      this.detailData.invoicePickBeans.forEach(item => {
-        num = num + item.refundableQty;
-      });
-      return num;
-    }
   },
 
   methods: {
@@ -142,6 +155,22 @@ export default {
     width: 100%;
     height: 100%;
   }
+  .print-page {
+    margin-bottom: 50px;
+    // min-height: 1020px;
+    page-break-after: always;
+  }
+  .print-title {
+    text-align: center;
+    .title1 {
+      font-size: 24px;
+      margin-bottom: 18px;
+    }
+    .title2 {
+      font-size: 18px;
+      margin-bottom: 24px;
+    }
+  }
   .print-form-1 {
     .item {
       display: flex;

+ 1 - 1
src/views/supply/deliver/components/commerce_detail.vue

@@ -113,7 +113,7 @@
       <div class="table">
         <el-table :data="detailData.retreatDocumentOrder" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="enginOrderNo" min-width="180" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品编号" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>

+ 1 - 1
src/views/supply/deliver/components/home_detail.vue

@@ -113,7 +113,7 @@
       <div class="table">
         <el-table :data="detailData.shipDocumentOrders" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="enginOrderNo" min-width="180" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品编号" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>

+ 1 - 1
src/views/supply/engin/components/commerce_detail.vue

@@ -223,7 +223,7 @@
           </el-table-column>
           <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="返利" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="返利" prop="payRebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>

+ 5 - 1
src/views/supply/pickup/check.vue

@@ -59,7 +59,7 @@
 
       <div class="mymain-container">
         <div class="table">
-          <el-table ref="table" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect">
+          <el-table ref="table" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect" @select-all="handleSelectAll">
             <el-table-column align="center" type="selection" width="55"></el-table-column>
             <!-- <el-table-column align="center" label="操作" width="100" fixed="left">
               <template slot-scope="scope">
@@ -319,6 +319,10 @@ export default {
       this.tableSelection = this.$refs.table.selection;
     },
 
+    handleSelectAll(selection) {
+      this.tableSelection = this.$refs.table.selection;
+    },
+
     // 检查是否一致
     isAllEqual(array) {
       if (array.length > 0) {

+ 5 - 1
src/views/supply/pickup/components/pickup_form.vue

@@ -81,7 +81,7 @@
 
     <div class="mymain-container">
       <div class="table">
-        <el-table ref="table" v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect">
+        <el-table ref="table" v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect" @select-all="handleSelectAll">
           <el-table-column align="center" type="selection" width="55"></el-table-column>
           <el-table-column align="center" label="发货申请单" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
@@ -283,6 +283,10 @@ export default {
       this.tableSelection = this.$refs.table.selection;
     },
 
+    handleSelectAll(selection) {
+      this.tableSelection = this.$refs.table.selection;
+    },
+
     clickSubmitForm() {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {