瀏覽代碼

合并采购单操作列按钮

lph 1 年之前
父節點
當前提交
63ce6e0417
共有 1 個文件被更改,包括 26 次插入6 次删除
  1. 26 6
      zkqy-ui/src/views/orderMange/purchase/index.vue

+ 26 - 6
zkqy-ui/src/views/orderMange/purchase/index.vue

@@ -170,12 +170,12 @@
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <el-button
+          <!-- <el-button
             type="info"
             size="default"
             @click="printHandler(scope.$index, scope.row)"
             >打印</el-button
-          >
+          > -->
 
           <Menu
             :row="scope.row"
@@ -283,7 +283,7 @@
     </el-dialog>
 
     <!-- print -->
-    <div id="printDom" style="width: 160px;height:160px"></div>
+    <div id="printDom" style="width: 160px; height: 160px"></div>
   </div>
 </template>
 <script>
@@ -536,7 +536,18 @@ export default {
           let allPringtData = [];
           for (let i = 0; i < Number(this.printForm.num); i++) {
             allPringtData.push({
-              codeData: printData.serialNumber+"@"+ printData.materielId+"@"+printData.materielName+"@"+printData.units+"@"+printData.specificationModel+"@"+(i+1),
+              codeData:
+                printData.serialNumber +
+                "@" +
+                printData.materielId +
+                "@" +
+                printData.materielName +
+                "@" +
+                printData.units +
+                "@" +
+                printData.specificationModel +
+                "@" +
+                (i + 1),
               showMsg: [
                 {
                   label: "编号",
@@ -550,7 +561,6 @@ export default {
                   label: "序号",
                   value: i + 1,
                 },
-
               ],
             });
           }
@@ -662,7 +672,7 @@ export default {
     },
     //审计新增
     async addHandler() {
-      this.handleAdd()
+      this.handleAdd();
       // alert("新增采购单")
       // this.isEdit = false;
       // await this.getDropDownData();
@@ -722,6 +732,13 @@ export default {
           });
           // 获取操作列的按钮数据
           this.excuteBtnArr = res.data.resultMap.button;
+          this.excuteBtnArr[0].children.push({
+            btnName: "打印",
+            btnType: "print",
+            btnIcon: "",
+            btnShowCondition: "",
+            children: [],
+          });
           this.queryParams.orderByColumn =
             res.data.resultMap.querySql.orderByColumn;
           this.sortOrder = JSON.parse(res.data.resultMap.querySql.sortOrder);
@@ -1912,6 +1929,9 @@ export default {
         case "DELETE":
           this.handleDelete(row, btnData);
           break;
+        case "print":
+          this.printHandler(1, scope.row);
+          break;
         default:
           break;
       }