|  | @@ -70,7 +70,7 @@
 | 
	
		
			
				|  |  |        </trade-card>
 | 
	
		
			
				|  |  |        <trade-card title="入库明细">
 | 
	
		
			
				|  |  |          <avue-crud ref="crud" :data="itemsVOList" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
 | 
	
		
			
				|  |  | -                   @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
 | 
	
		
			
				|  |  | +                   @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate" @selection-change="selectionChange">
 | 
	
		
			
				|  |  |            <template slot="menuLeft">
 | 
	
		
			
				|  |  |              <el-button type="primary" icon="el-icon-plus" size="small" :disabled="detailData.status == 1"
 | 
	
		
			
				|  |  |                         @click.stop="addRow">录入明细
 | 
	
	
		
			
				|  | @@ -79,12 +79,20 @@
 | 
	
		
			
				|  |  |              <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1&&form.id"
 | 
	
		
			
				|  |  |                         @click.stop="excelBox = true">导入
 | 
	
		
			
				|  |  |              </el-button>
 | 
	
		
			
				|  |  | -<!--            <el-button-->
 | 
	
		
			
				|  |  | -<!--                type="success"-->
 | 
	
		
			
				|  |  | -<!--                icon="el-icon-printer"-->
 | 
	
		
			
				|  |  | -<!--                size="small"-->
 | 
	
		
			
				|  |  | -<!--                @click.stop="dialogVisible = true">打印-->
 | 
	
		
			
				|  |  | -<!--            </el-button>-->
 | 
	
		
			
				|  |  | +            <el-button
 | 
	
		
			
				|  |  | +                type="success"
 | 
	
		
			
				|  |  | +                icon="el-icon-printer"
 | 
	
		
			
				|  |  | +                size="small"
 | 
	
		
			
				|  |  | +                :disabled="batchPrinting"
 | 
	
		
			
				|  |  | +                @click.stop="printStackCard()">批量打印{{batchPrinting}}
 | 
	
		
			
				|  |  | +            </el-button>
 | 
	
		
			
				|  |  | +            <el-button
 | 
	
		
			
				|  |  | +                type="danger"
 | 
	
		
			
				|  |  | +                icon="el-icon-printer"
 | 
	
		
			
				|  |  | +                size="small"
 | 
	
		
			
				|  |  | +                :disabled="batchDeletion"
 | 
	
		
			
				|  |  | +                @click.stop="batchDeleteDetails()">批量删除
 | 
	
		
			
				|  |  | +            </el-button>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="headerSerial">
 | 
	
		
			
				|  |  |              <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
 | 
	
	
		
			
				|  | @@ -180,11 +188,45 @@
 | 
	
		
			
				|  |  |          append-to-body
 | 
	
		
			
				|  |  |          width="70%">
 | 
	
		
			
				|  |  |        <div id="printAll">
 | 
	
		
			
				|  |  | -        <div v-for="item in 1000">测试</div>
 | 
	
		
			
				|  |  | +        <div v-for="(item,index) in printList" :key="index" style="page-break-after:always">
 | 
	
		
			
				|  |  | +          <table align="center">
 | 
	
		
			
				|  |  | +            <tr>
 | 
	
		
			
				|  |  | +              <th colspan="5">垛卡</th>
 | 
	
		
			
				|  |  | +            </tr>
 | 
	
		
			
				|  |  | +            <tr>
 | 
	
		
			
				|  |  | +              <td>品名:</td>
 | 
	
		
			
				|  |  | +              <td>{{ item.cname }}</td>
 | 
	
		
			
				|  |  | +              <td>等级:</td>
 | 
	
		
			
				|  |  | +              <td>{{ item.grade }}</td>
 | 
	
		
			
				|  |  | +              <td rowspan="3">
 | 
	
		
			
				|  |  | +                <img style="width: 100px;height: 100px;" :src="item.qrCode" alt="">
 | 
	
		
			
				|  |  | +              </td>
 | 
	
		
			
				|  |  | +            </tr>
 | 
	
		
			
				|  |  | +            <tr>
 | 
	
		
			
				|  |  | +              <td>厚度:</td>
 | 
	
		
			
				|  |  | +              <td>{{ item.thickness }}</td>
 | 
	
		
			
				|  |  | +              <td>长度:</td>
 | 
	
		
			
				|  |  | +              <td>{{item.length}}</td>
 | 
	
		
			
				|  |  | +            </tr>
 | 
	
		
			
				|  |  | +            <tr>
 | 
	
		
			
				|  |  | +              <td>备注:</td>
 | 
	
		
			
				|  |  | +              <td colspan="3">{{ item.remarks }}</td>
 | 
	
		
			
				|  |  | +            </tr>
 | 
	
		
			
				|  |  | +            <tr>
 | 
	
		
			
				|  |  | +              <th>包号:</th>
 | 
	
		
			
				|  |  | +              <th colspan="5">{{item.billNo}}</th>
 | 
	
		
			
				|  |  | +            </tr>
 | 
	
		
			
				|  |  | +            <tr>
 | 
	
		
			
				|  |  | +              <td colspan="5">
 | 
	
		
			
				|  |  | +                <img style="width: 100%;height: 40px;margin: 0 auto" :src="item.oneCode" alt="">
 | 
	
		
			
				|  |  | +              </td>
 | 
	
		
			
				|  |  | +            </tr>
 | 
	
		
			
				|  |  | +          </table>
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <span slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  |          <el-button @click="dialogVisible = false">取 消</el-button>
 | 
	
		
			
				|  |  | -        <el-button type="primary">打 印</el-button>
 | 
	
		
			
				|  |  | +        <el-button type="primary" v-print="'#printAll'">打 印</el-button>
 | 
	
		
			
				|  |  |        </span>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  |    </div>
 | 
	
	
		
			
				|  | @@ -200,7 +242,8 @@ import {
 | 
	
		
			
				|  |  |    getAllgoods,
 | 
	
		
			
				|  |  |    delItem,
 | 
	
		
			
				|  |  |    revokeWarehousing,
 | 
	
		
			
				|  |  | -  withdraw
 | 
	
		
			
				|  |  | +  withdraw,
 | 
	
		
			
				|  |  | +  receiptItemPrint, removeBatch
 | 
	
		
			
				|  |  |  } from "@/api/purchasingManagement/inStock";
 | 
	
		
			
				|  |  |  import tableOption from "./config/customerContact.json";
 | 
	
		
			
				|  |  |  import feeInfo from "@/components/fee-info/main";
 | 
	
	
		
			
				|  | @@ -219,7 +262,10 @@ export default {
 | 
	
		
			
				|  |  |        checkDialog: false,
 | 
	
		
			
				|  |  |        dialogVisible: false,
 | 
	
		
			
				|  |  |        subLoading: false,
 | 
	
		
			
				|  |  | +      batchPrinting:true,
 | 
	
		
			
				|  |  | +      batchDeletion:true,
 | 
	
		
			
				|  |  |        form: {},
 | 
	
		
			
				|  |  | +      printList:[],
 | 
	
		
			
				|  |  |        excelBox: false,
 | 
	
		
			
				|  |  |        excelOption: {
 | 
	
		
			
				|  |  |          submitBtn: false,
 | 
	
	
		
			
				|  | @@ -248,6 +294,7 @@ export default {
 | 
	
		
			
				|  |  |        excelForm: {},
 | 
	
		
			
				|  |  |        checkScheduleDialog: false,
 | 
	
		
			
				|  |  |        tableOption: {},
 | 
	
		
			
				|  |  | +      selectionList:[],
 | 
	
		
			
				|  |  |        option: {
 | 
	
		
			
				|  |  |          disabled: false,
 | 
	
		
			
				|  |  |          menuBtn: false,
 | 
	
	
		
			
				|  | @@ -395,11 +442,27 @@ export default {
 | 
	
		
			
				|  |  |              },
 | 
	
		
			
				|  |  |              span: 6
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | +            label: "是否扫描",
 | 
	
		
			
				|  |  | +            prop: "isScanning",
 | 
	
		
			
				|  |  | +            minRows: 1,
 | 
	
		
			
				|  |  | +            span: 6,
 | 
	
		
			
				|  |  | +            type: "select",
 | 
	
		
			
				|  |  | +            value: "0",
 | 
	
		
			
				|  |  | +            dicData: [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                label: "是",
 | 
	
		
			
				|  |  | +                value: "0"
 | 
	
		
			
				|  |  | +              }, {
 | 
	
		
			
				|  |  | +                label: "否",
 | 
	
		
			
				|  |  | +                value: "1"
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            ],
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  |              label: "备注",
 | 
	
		
			
				|  |  |              prop: "orderRemark",
 | 
	
		
			
				|  |  |              type: "textarea",
 | 
	
		
			
				|  |  |              minRows: 1,
 | 
	
		
			
				|  |  | -            span: 24
 | 
	
		
			
				|  |  | +            span: 18
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |          ]
 | 
	
		
			
				|  |  |        },
 | 
	
	
		
			
				|  | @@ -452,6 +515,54 @@ export default {
 | 
	
		
			
				|  |  |      this.getAllWorkDicts()
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    batchDeleteDetails(){
 | 
	
		
			
				|  |  | +      let data = []
 | 
	
		
			
				|  |  | +      for (let item of this.selectionList){
 | 
	
		
			
				|  |  | +        data.push(item.id)
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      removeBatch({ids:data.join(",")}).then(res=>{
 | 
	
		
			
				|  |  | +      for(let item of data){
 | 
	
		
			
				|  |  | +        for (let i in this.itemsVOList){
 | 
	
		
			
				|  |  | +          if (item === this.itemsVOList[i].id){
 | 
	
		
			
				|  |  | +            this.itemsVOList.splice(i, 1);
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    printStackCard(){
 | 
	
		
			
				|  |  | +      let data = []
 | 
	
		
			
				|  |  | +      for (let item of this.selectionList){
 | 
	
		
			
				|  |  | +        data.push(item.id)
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      receiptItemPrint({ids:data.join(",")}).then(res=>{
 | 
	
		
			
				|  |  | +        this.printList = res.data.data
 | 
	
		
			
				|  |  | +        this.dialogVisible = true
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    selectionChange(list){
 | 
	
		
			
				|  |  | +      this.selectionList = list
 | 
	
		
			
				|  |  | +      if (this.selectionList.length === 0){
 | 
	
		
			
				|  |  | +        this.batchPrinting = true
 | 
	
		
			
				|  |  | +        this.batchDeletion = true
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      for(let item of this.selectionList){
 | 
	
		
			
				|  |  | +        if (item.isIssue == 0 || !item.isIssue) {
 | 
	
		
			
				|  |  | +          this.batchPrinting = true
 | 
	
		
			
				|  |  | +          break
 | 
	
		
			
				|  |  | +        }else {
 | 
	
		
			
				|  |  | +          this.batchPrinting = false
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      for(let item of this.selectionList){
 | 
	
		
			
				|  |  | +        if (item.isIssue > 0 || !item.id) {
 | 
	
		
			
				|  |  | +          this.batchDeletion = true
 | 
	
		
			
				|  |  | +          break
 | 
	
		
			
				|  |  | +        }else {
 | 
	
		
			
				|  |  | +          this.batchDeletion = false
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      check() {
 | 
	
		
			
				|  |  |        this.checkData = this.$route.query.check
 | 
	
		
			
				|  |  |        this.checkDialog = true
 | 
	
	
		
			
				|  | @@ -1142,6 +1253,9 @@ export default {
 | 
	
		
			
				|  |  |          this.$nextTick(() => {
 | 
	
		
			
				|  |  |            this.$refs.crud.doLayout();
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | +        this.tableOption.selectable = (row,index)=>{
 | 
	
		
			
				|  |  | +          return row.status == 0
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          this.$message.success("重置成功");
 | 
	
		
			
				|  |  |          this.getAllWorkDicts()
 | 
	
		
			
				|  |  |          this.getStorage()
 |