qukaidi hace 4 años
padre
commit
112c9c2107

+ 90 - 20
src/views/warehouseBusiness/inStock/index.vue

@@ -364,18 +364,18 @@
       :summary-method="getSum"
     >
       <el-table-column type="selection" width="60" fixed align="center" />
-      <el-table-column type="index" label="行号" align="center" fixed/>
-<!--        <el-table-column-->
-<!--          v-for="(item, index) in getRowList"-->
-<!--          :key="index"-->
-<!--          :label="item.name"-->
-<!--          :width="item.width"-->
-<!--          :prop="item.label"-->
-<!--          align="center"-->
-<!--          :fixed="item.fixed"-->
-<!--          :show-overflow-tooltip="true"-->
-<!--          sortable-->
-<!--        />-->
+      <el-table-column type="index" label="行号" align="center" fixed />
+      <!--        <el-table-column-->
+      <!--          v-for="(item, index) in getRowList"-->
+      <!--          :key="index"-->
+      <!--          :label="item.name"-->
+      <!--          :width="item.width"-->
+      <!--          :prop="item.label"-->
+      <!--          align="center"-->
+      <!--          :fixed="item.fixed"-->
+      <!--          :show-overflow-tooltip="true"-->
+      <!--          sortable-->
+      <!--        />-->
       <el-table-column
         v-for="(item, index) in getRowList"
         :key="index"
@@ -1225,7 +1225,25 @@
                 @click.prevent="withdrawClick"
                 >撤回入库
               </el-button>
-              <el-button
+              <el-dropdown @command="handleCommand">
+                <el-button :disabled="browseStatus" size="small" type="success">
+                  打印单据<i class="el-icon-arrow-down el-icon--right"></i>
+                </el-button>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item command="a">收货单</el-dropdown-item>
+                  <el-dropdown-item command="b">入库单</el-dropdown-item>
+                  <el-dropdown-item command="c">理货单</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                  <el-dropdown-item>吊牌</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+              <!-- <el-button
                 size="small"
                 type="success"
                 :disabled="browseStatus"
@@ -1247,7 +1265,7 @@
                 prop="打印"
                 @click="showEditDialog_s"
                 >入库单
-              </el-button>
+              </el-button> -->
               <el-button
                 size="small"
                 :disabled="browseStatus"
@@ -3236,6 +3254,31 @@
           <el-button @click="editDialogVisible_sss = false">取消 </el-button>
         </div>
       </el-dialog>
+      <el-dialog
+        title="提示"
+        :visible.sync="print_lhd"
+        width="70%"
+        :close-on-click-modal="false"
+        :modal="false"
+      >
+        <div id="print_area1" class="print-div">
+          <div class="print-title" style="display:flex;justify-content: center;font-size:24px">
+            {{ company }}有限公司作业单
+          </div>
+          <div class="print-title2" style="display:flex;justify-content: center;font-size:18px">
+            <div>
+              入库计划单
+            </div>
+            
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" :disabled="browseStatus" @click="addprint"
+            >打印
+          </el-button>
+          <el-button @click="print_lhd = false">取消 </el-button>
+        </span>
+      </el-dialog>
     </el-dialog>
     <el-dialog
       title="选择库位"
@@ -3776,6 +3819,7 @@ export default {
       editDialogClosed_ss: false,
       addOrUpdateVisible: false,
       addOrUpdateVisib: false,
+      print_lhd: false,
       // 新增计划净重
       weightList: false,
       dataList: [],
@@ -4000,6 +4044,16 @@ export default {
     }
   },
   methods: {
+    handleCommand(command) {
+      console.log(command);
+      if (command == "a") {
+        this.showEditDialog_ss();
+      } else if (command == "b") {
+        this.showEditDialog_s();
+      } else if (command == "c") {
+        this.print_lhd = true;
+      }
+    },
     full() {
       this.dialogFull = !this.dialogFull;
     },
@@ -4628,13 +4682,19 @@ export default {
             return false;
           }
           // this.mum = 0
-          console.log(this.mum)
-          console.log(this.planningList)
+          console.log(this.mum);
+          console.log(this.planningList);
           this.fPlaNnumber = this.form.fPlannetweight / this.form.fPlanqty;
           this.fPlangNumber = this.form.fPlangrossweight / this.form.fPlanqty;
-          this.planningList.fPlanqty = Number(this.form.fPlanqty) - Number(this.mum);
-          this.planningList.fPlannetweight = parseFloat(Number(this.fPlaNnumber) * Number(this.planningList.fPlanqty).toFixed(2));
-          this.planningList.fPlangrossweight = parseFloat(Number(this.fPlangNumber) * Number(this.planningList.fPlanqty)).toFixed(2);
+          this.planningList.fPlanqty =
+            Number(this.form.fPlanqty) - Number(this.mum);
+          this.planningList.fPlannetweight = parseFloat(
+            Number(this.fPlaNnumber) *
+              Number(this.planningList.fPlanqty).toFixed(2)
+          );
+          this.planningList.fPlangrossweight = parseFloat(
+            Number(this.fPlangNumber) * Number(this.planningList.fPlanqty)
+          ).toFixed(2);
           this.weightList = true;
         }
       });
@@ -5426,7 +5486,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
-      this.mum = 0
+      this.mum = 0;
       let queryParams = { pageNum: 1, fDc: "C" };
       listFees(queryParams).then((response) => {
         this.fCNameOptions = response.rows;
@@ -6205,6 +6265,16 @@ export default {
         }
       });
     },
+    //打印
+    addprint() {
+      const style ='@page {  } ' +'@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .print-title{display:flex;justify-content: center;font-size:24px}' ;
+      print({
+        printable: "print_area1",
+        type: "html",
+        style: style, // 亦可使用引入的外部css;
+        scanStyles: false,
+      });
+    },
     // 打印作业单
     addList() {
       this.$refs["form"].validate((valid) => {

+ 2 - 2
src/views/warehouseBusiness/outStock/index.vue

@@ -2552,7 +2552,7 @@
             label="品名"
           >
           </el-table-column>
-          <!-- <el-table-column
+          <el-table-column
             prop="fQtyblc"
             header-align="center"
             align="center"
@@ -2569,7 +2569,7 @@
             header-align="center"
             align="center"
             label="净重"
-          /> -->
+          />
           <el-table-column
             prop="fQtyblc"
             header-align="center"