<template>
    <div class="SuppliesInventory-all">
        <el-dialog custom-class="batchcollectiondialog" top="10vh" width="1200px" title="批量领用"
            :visible.sync="BatchCollection">
            <el-tabs v-model="activeIndex" @tab-click="handleSelect">
                <el-tab-pane label="批量领用申请" name="1">
                    <div class="batchcollection-search">
                        <div class="batchcollection-search-li">
                            <label>关联团组:</label>
                            <el-select filterable style="width: 300px" size="small" v-model="BatchRequestinfo.groupId"
                                placeholder="请选择">
                                <el-option :style="item.id == 0 || item.id == -1 ? 'color:#67c23a;' : ''"
                                    v-for="item in groupNameData" :key="item.id" :label="item.groupName"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="batchcollection-search-li">
                            <label>领用原因:</label>
                            <el-input size="small" style="width: 300px" placeholder="请输入领用原因"
                                v-model="BatchRequestinfo.reason"></el-input>
                        </div>
                        <div class="batchcollection-search-li">
                            <label>备注:</label>
                            <el-input size="small" style="width: 300px" placeholder="请输入备注"
                                v-model="BatchRequestinfo.remark"></el-input>
                        </div>
                    </div>
                    <div class="batchcollection-table">
                        <div class="batchcollection-table-btn">
                            <el-button @click="batchcollectionadd" size="small" type="primary">新增</el-button>
                        </div>
                        <el-table height="513px" :data="BatchRequestParameters" border style="width: 100%">
                            <el-table-column label="物品名称" width="300">
                                <template slot-scope="scope">
                                    <el-select filterable style="width: 100%" size="small" v-model="scope.row.goodsId"
                                        placeholder="请选择">
                                        <el-option :disabled="item.stockQuantity <= 0"
                                            v-for="item in batchcollectiontabledata" :key="item.id" :label="item.name"
                                            :value="item.id">
                                        </el-option>
                                    </el-select>
                                </template>
                            </el-table-column>
                            <el-table-column label="领用数量" width="120">
                                <template slot-scope="scope">
                                    <el-input-number size="small" style="width: 100%" :precision="2" :controls="false"
                                        v-model="scope.row.quantity"></el-input-number>
                                </template>
                            </el-table-column>
                            <el-table-column label="备注">
                                <template slot-scope="scope">
                                    <el-input size="small" style="width: 100%" placeholder="请输入备注"
                                        v-model="scope.row.remark"></el-input>
                                </template>
                            </el-table-column>
                            <el-table-column prop="address" label="操作" width="100">
                                <template slot-scope="scope">
                                    <el-button @click="batchcollectiondel(scope.$index, BatchRequestParameters)"
                                        size="small" type="danger">删除</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                        <div class="batchcollection-save-btn">
                            <el-button @click="GoodsReceiveBatchOp" size="small" type="primary">保存</el-button>
                        </div>
                    </div>
                </el-tab-pane>
                <el-tab-pane label="批量领用记录" name="2">
                    <el-table height="600" :data="batchrecordingdata" border style="width: 100%">
                        <el-table-column prop="goodsName" label="物品名称">
                        </el-table-column>
                        <el-table-column prop="accumQty" label="数量" width="80">
                        </el-table-column>
                        <el-table-column prop="reason" label="原因">
                        </el-table-column>
                        <el-table-column prop="remark" label="备注">
                        </el-table-column>
                        <el-table-column prop="statusText" label="状态" width="150">
                        </el-table-column>
                        <el-table-column label="操作" width="100">
                            <template slot-scope="scope">
                                <el-button :disabled="scope.row.status!=0" @click="batchrecordingrevamp(scope.row)"
                                    size="small" type="primary">修改</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div style="text-align: center;">
                        <el-pagination
                          @size-change="batchrecordingSizeChange"
                          @current-change="batchrecordingCurrentChange"
                          :current-page="batchrecordingIndex"
                          :page-sizes="[1, 8, 10, 20]"
                          :page-size="batchrecordingSize"
                          layout="total, sizes, prev, pager, next, jumper"
                          :total="batchrecordingamount">
                        </el-pagination>
                    </div>
                </el-tab-pane>
            </el-tabs>
        </el-dialog>
        <el-dialog top="10vh" width="1200px" title="入库审核" :visible.sync="Warehousingaudit">
            <div class="warehousingaudit-search">
                <!-- <div class="warehousingaudit-search-li">
                    <label>物品类型:</label>
                    <el-select @change="Warehousingchange" clearable   filterable style="width: 180px;" size="small" v-model="WarehousingTypes" placeholder="请选择">
                        <el-option
                          v-for="item in RSAuditTypearr"
                          :key="item.id"
                          :label="item.name"
                          :value="item.id">
                        </el-option>
                    </el-select>
                </div> -->
                <div class="warehousingaudit-search-li">
                    <label>审核状态:</label>
                    <el-select @change="Warehousingchange" style="width: 120px;" size="small"
                        v-model="WarehousingStatus" placeholder="请选择">
                        <el-option v-for="item in WarehousingStatusarr" :key="item.value" :label="item.text"
                            :value="item.value">
                        </el-option>
                    </el-select>
                </div>
                <div class="warehousingaudit-search-li">
                    <label>物品名称:</label>
                    <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="Warehousingname"
                        clearable></el-input>
                </div>
                <el-button @click="Warehousingchange" style="margin-left: 10px;" size="small"
                    type="primary">查询</el-button>
            </div>
            <div class="warehousingaudit-table">
                <el-table height="590px" :data="WarehousingData" border style="width: 100%">
                    <el-table-column prop="goodsName" label="物品名称" width="200">
                    </el-table-column>
                    <el-table-column prop="quantity" label="数量" width="50">
                    </el-table-column>
                    <el-table-column prop="createTime" label="入库时间" width="150">
                    </el-table-column>
                    <el-table-column prop="createUserName" label="入库人" width="70">
                    </el-table-column>
                    <el-table-column prop="statusDesc" label="审核情况" width='200'>
                        <template slot-scope="scope">
                            <el-popover placement="top" width="450" trigger="hover">
                                <!-- {{scope.row.statusDesc}} -->
                                <span v-html="scope.row.statusDesc"></span>
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.statusDesc}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="confirmStatusText" label="审核状态" width="100">
                    </el-table-column>
                    <el-table-column prop="remark" label="备注" width='200'>
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                <span v-html="scope.row.remark"></span>
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.remark}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column label="操作">
                        <template slot-scope="scope">
                            <el-button size="mini" type="primary" title="通过"
                                @click="GoodsStorageConfirmStatusChange(scope.row,2)">通过</el-button>
                            <el-button size="mini" title="不通过" type="danger"
                                @click="GoodsStorageConfirmStatusChange(scope.row,3)">不通过</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <div class="block">
                    <el-pagination @size-change="WarehousingSizeChange" @current-change="WarehousingCurrentChange"
                        :current-page="WarehousingcurrentPage" :page-sizes="[10, 15, 20, 40]"
                        :page-size="Warehousingpagesize" layout="total, sizes, prev, pager, next, jumper"
                        :total="Warehousingcount">
                    </el-pagination>
                </div>
            </div>
        </el-dialog>
        <el-dialog top="10vh" width="1740px" title="领用记录" :visible.sync="ReceiptRecord">
            <div class="ReceiptRecord-search">
                <div class="ReceiptRecord-search-li">
                    <label style="margin-left: 0px;">关联团组:</label>
                    <el-select multiple collapse-tags filterable style="width: 235px;" size="small" v-model="groupID"
                        placeholder="请选择">
                        <el-option :style="item.id==0||item.id==-1?'color:#67c23a;':''" v-for="item in groupNameData"
                            :key="item.id" :label="item.groupName" :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="ReceiptRecord-search-li">
                    <label>物品类型:</label>
                    <el-select multiple collapse-tags filterable style="width: 180px;" size="small"
                        v-model="RSAuditTypes" placeholder="请选择">
                        <el-option v-for="item in RSAuditTypearr" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="ReceiptRecord-search-li">
                    <label>领用人员:</label>
                    <el-select multiple collapse-tags filterable style="width: 180px;" size="small"
                        v-model="personnelID" placeholder="请选择">
                        <el-option v-for="item in userNameData" :key="item.id" :label="item.userName" :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="ReceiptRecord-search-li">
                    <label>审核状态:</label>
                    <el-select style="width: 120px;" size="small" v-model="RSAuditStatus" placeholder="请选择">
                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                        </el-option>
                    </el-select>
                </div>
                <div class="ReceiptRecord-search-li">
                    <label>物品名称:</label>
                    <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="RSAuditname"
                        clearable></el-input>
                </div>
                <div class="ReceiptRecord-search-li">
                    <label>领用时间段:</label>
                    <el-date-picker size="small" style="width: 240px;" v-model="RSAudittime" type="daterange"
                        align="right" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                        :picker-options="pickerOptionss">
                    </el-date-picker>
                </div>
                <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(false)" size="small"
                    type="primary">查询</el-button>
                <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(true)" size="small"
                    type="primary">导出</el-button>
            </div>
            <div class="ReceiptRecord-table">
                <el-table height="530px" :data="RSAuditData" border style="width: 100%">
                    <el-table-column prop="goodsName" label="物品名称" width="200">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.groupName}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.goodsName}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="quantity" label="数量" width="50">
                    </el-table-column>
                    <el-table-column prop="createTime" label="申请时间" width="150">
                    </el-table-column>
                    <el-table-column prop="createUserName" label="申请人" width="70">
                    </el-table-column>
                    <el-table-column prop="reason" label="申请原因">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.reason}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.reason}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="remark" label="备注">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.remark}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.remark}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="auditUserName" label="审核人" width="100">
                        <template slot-scope="scope">
                            {{ scope.row.auditStatus==0?"":scope.row.auditUserName }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="auditTime" label="审核时间" width="150">
                        <template slot-scope="scope">
                            {{ scope.row.auditStatus==0?"":scope.row.auditTime }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="auditStatusText" label="审核状态" width="100">
                    </el-table-column>
                </el-table>
                <div v-if="RSAuditcount>RSAuditpagesize" class="block">
                    <el-pagination @size-change="RSAuditSizeChange" @current-change="RSAuditCurrentChange"
                        :current-page="RSAuditcurrentPage" :page-sizes="[10, 15, 20, 40]" :page-size="RSAuditpagesize"
                        layout="total, sizes, prev, pager, next, jumper" :total="RSAuditcount">
                    </el-pagination>
                </div>
            </div>
        </el-dialog>
        <el-dialog top="10vh" class="Approval-dialog" width="1350px" title="领用审核" :visible.sync="ApprovalVisible">
            <div>
                <el-select @change="typevaluechange" style="width: 150px;margin-bottom: 10px;" size="small"
                    v-model="typevalue" placeholder="请选择">
                    <el-option v-for="item in receiveStatus" :key="item.value" :label="item.text" :value="item.value">
                    </el-option>
                </el-select>
                <el-input clearable size="small" style="width:200px" v-model="Approvalinput"
                    placeholder="请输入内容"></el-input>
                <el-button @click="typevaluechange" size="small" type="primary">查 询</el-button>
            </div>
            <div class="Approval-table">
                <el-table :data="ApprovalData" border style="width: 100%">
                    <el-table-column prop="goodsName" label="物品名称" width="180">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                <p v-html="scope.row.goodsDetails"></p>
                                <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.goodsName}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="quantity" label="数量" width="50">
                    </el-table-column>
                    <el-table-column prop="createTime" label="申请时间" width="150">
                    </el-table-column>
                    <el-table-column prop="createUserName" label="申请人" width="70">
                    </el-table-column>
                    <el-table-column prop="reason" label="申请原因" width="80">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.reason}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.reason}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="remark" label="备注">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.remark}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.remark}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="auditStatusText" label="审核状态" width="100">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                <span v-html="scope.row.statusDesc"></span>
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.auditStatusText}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column label="操作" width="450">
                        <template slot-scope="scope">
                            <el-button :disabled="!scope.row.isAuditPer" size="mini" type="primary" title="通过"
                                @click="GoodsReceiveAudit(scope.row,1)">通过</el-button>
                            <el-button size="mini" type="info" title="不通过"
                                @click="GoodsReceiveAudit(scope.row,2)">不通过</el-button>
                            <!-- <el-button v-if="scope.row.auditStatus==0||scope.row.auditStatus==2" size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row,1)" >通过</el-button>
                        <el-button v-if="scope.row.auditStatus==0" size="mini" type="info" title="不通过" @click="GoodsReceiveAudit(scope.row,2)">不通过</el-button>
                        <el-button v-if="scope.row.auditStatus==1" size="mini" type="warning" title="取消通过" @click="GoodsReceiveAudit(scope.row,0)">取消通过</el-button> -->
                            <!-- <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceives(scope.row)">删除</el-button> -->
                            <!-- <el-button size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row,5)" >出库</el-button>
                        <el-button size="mini" title="拒绝出库" type="danger" @click="GoodsReceiveAudit(scope.row,6)">拒绝出库</el-button> -->
                        </template>
                    </el-table-column>
                </el-table>
                <div v-if="Approvalcount>Approvalpagesize" class="block">
                    <el-pagination @size-change="ApprovalhandleSizeChange" @current-change="ApprovalhandleCurrentChange"
                        :current-page="ApprovalcurrentPage" :page-sizes="[6, 10, 15, 40]" :page-size="Approvalpagesize"
                        layout="total, sizes, prev, pager, next, jumper" :total="Approvalcount">
                    </el-pagination>
                </div>
            </div>
        </el-dialog>
        <el-dialog top="10vh" width="1200px" title="入库物品" :visible.sync="warehousingsVisible">
            <el-form :model="warehousingsruleForm" :rules="warehousingsrules" ref="warehousingsruleForm"
                label-width="100px" class="demo-ruleForm">
                <div class="warehousingsrule-input">
                    <el-form-item label="入库数量" prop="quantity">
                        <el-input-number @blur="Sumup" size="small" :precision="2" :controls="false"
                            v-model="warehousingsruleForm.quantity"></el-input-number>
                    </el-form-item>
                    <el-form-item label="物品单价" prop="unitPrice">
                        <el-input-number @blur="Sumup" size="small" :precision="1" :controls="false"
                            v-model="warehousingsruleForm.unitPrice"></el-input-number>
                    </el-form-item>
                    <el-form-item label="物品总价" prop="totalPrice">
                        <el-input-number size="small" :precision="2" :controls="false"
                            v-model="warehousingsruleForm.totalPrice"></el-input-number>
                    </el-form-item>
                    <el-form-item label="供应商名称" prop="supplierName">
                        <el-input size="small" placeholder="请输入物资名称" v-model="warehousingsruleForm.supplierName"
                            clearable></el-input>
                    </el-form-item>
                    <el-form-item label="供应商电话" prop="supplierTel">
                        <el-input size="small" placeholder="请输入供应商电话" v-model="warehousingsruleForm.supplierTel"
                            clearable></el-input>
                    </el-form-item>
                    <el-form-item label="供应商地址" prop="supplierAddress">
                        <el-input size="small" placeholder="请输入供应商地址" v-model="warehousingsruleForm.supplierAddress"
                            clearable></el-input>
                    </el-form-item>
                    <el-form-item label="供应商来源" prop="supplierSource">
                        <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.supplierSource"
                            clearable></el-input>
                    </el-form-item>
                    <el-form-item label="入库人员" prop="storageUserId">
                        <el-select size="small" v-model="warehousingsruleForm.storageUserId" clearable filterable
                            placeholder="请选择">
                            <el-option v-for="item in userNameData" :key="item.id" :label="item.userName"
                                :value="item.id">
                            </el-option>
                        </el-select>
                        <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageUserId" clearable></el-input> -->
                    </el-form-item>
                    <el-form-item label="入库时间" prop="storageTime">
                        <el-date-picker size="small" style="width:100%" v-model="warehousingsruleForm.storageTime"
                            type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions">
                        </el-date-picker>
                        <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageTime" clearable></el-input> -->
                    </el-form-item>
                    <el-form-item style="width:100%;" label="备注" prop="remark">
                        <el-input size="small" placeholder="请输入备注称" v-model="warehousingsruleForm.remark"
                            clearable></el-input>
                    </el-form-item>
                </div>
                <el-form-item style="text-align: right;">
                    <el-button size="small" @click="resetForm('warehousingsruleForm')">清空</el-button>
                    <el-button size="small" type="primary" @click="submitForm('warehousingsruleForm')">保存</el-button>
                </el-form-item>
            </el-form>
            <div class="warehousingsrule-table">
                <el-table height="400" :data="warehousingslist" border style="width: 100%">
                    <el-table-column prop="unitPrice" label="物品单价" width="80">
                        <template slot-scope="scope">
                            {{townum(scope.row.unitPrice)}}
                        </template>
                    </el-table-column>
                    <el-table-column prop="quantity" label="物品数量" width="70">
                    </el-table-column>
                    <el-table-column prop="totalPrice" label="物品总价" width="80">
                        <template slot-scope="scope">
                            {{townum(scope.row.totalPrice)}}
                        </template>
                    </el-table-column>
                    <el-table-column prop="supplierName" label="供应商名称">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.supplierName}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.supplierName}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="supplierTel" label="供应商电话">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.supplierTel}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.supplierTel}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="supplierAddress" label="供应商地址">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.supplierAddress}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.supplierAddress}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="supplierSource" label="供应商来源">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.supplierSource}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.supplierSource}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="storageTime" label="入库时间" width="150">
                    </el-table-column>
                    <el-table-column prop="storageUserName" label="入库人" width="80">
                    </el-table-column>
                    <el-table-column label="操作" width="155">
                        <template slot-scope="scope">
                            <el-button size="mini" title="编辑" @click="Editentry(scope.row)">编辑</el-button>
                            <el-button size="mini" title="删除" type="danger"
                                @click="Deleteintolibrary(scope.row)">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <div v-if="WScount>WSpagesize" class="block">
                    <el-pagination @size-change="WShandleSizeChange" @current-change="WShandleCurrentChange"
                        :current-page="WScurrentPage" :page-sizes="[6, 10, 15, 40]" :page-size="WSpagesize"
                        layout="total, sizes, prev, pager, next, jumper" :total="WScount">
                    </el-pagination>
                </div>
            </div>
        </el-dialog>
        <el-dialog width="400px" title="添加物品" :visible.sync="AddItemsVisible">
            <div class="additems-ul">
                <div class="additems-li">
                    <label>所属公司:</label>
                    <el-select style="width:250px" @change="AddMaterialTypechange(0)" v-model="AddMaterialType"
                        clearable filterable placeholder="请选择">
                        <el-option v-for="item in AddMaterialTypearr" :key="item.id" :label="item.name"
                            :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="additems-li">
                    <label>物资类型:</label>
                    <el-select style="width:250px" v-model="AddMaterialinfoType" clearable filterable placeholder="请选择">
                        <el-option v-for="item in AddMaterialinfoTypearr" :key="item.id" :label="item.name"
                            :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="additems-li">
                    <label>物资名称:</label>
                    <el-input style="width:250px" placeholder="请输入物资名称" v-model="AdditemsName" clearable>
                    </el-input>
                </div>
                <div class="additems-li">
                    <label>单位:</label>
                    <el-input style="width:250px" placeholder="请输入单位" v-model="unit" clearable>
                    </el-input>
                </div>
            </div>
            <div>
                <label>备注:</label>
                <el-input style="width:100%;" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容"
                    v-model="Additemstextarea">
                </el-input>
            </div>
            <div class="additems-btn">
                <el-button @click="AddItemsVisible=false">取消</el-button>
                <el-button @click="GoodsOP" type="primary">保存</el-button>
            </div>
        </el-dialog>
        <el-dialog top="10vh" title="领用物品" width="1000px" :visible.sync="ClaimitemVisible">
            <label style="display: inline-block;margin-left: 32px;margin-bottom: 10px;">{{Claimitemlabel}}</label>
            <el-form :model="ClaimsruleForm" :rules="Claimrules" ref="ClaimsruleForm" label-width="100px"
                class="demo-ruleForm">
                <div class="Claimitem-input">
                    <el-form-item label="关联团组" prop="groupId">
                        <el-select size="small" v-model="ClaimsruleForm.groupId" clearable filterable placeholder="请选择">
                            <el-option :style="item.id==0||item.id==-1||item.id==-2?'color:#67c23a;':''"
                                v-for="item in groupNameData" :key="item.id" :label="item.groupName" :value="item.id">
                            </el-option>
                        </el-select>
                        <!-- <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.groupId"></el-input-number> -->
                    </el-form-item>
                    <el-form-item label="领用数量" prop="quantity">
                        <el-input-number size="small" :precision="2" :controls="false"
                            v-model="ClaimsruleForm.quantity"></el-input-number>
                    </el-form-item>
                    <el-form-item label="领用原因" prop="reason">
                        <el-input size="small" placeholder="请输入领用原因" v-model="ClaimsruleForm.reason"></el-input>
                    </el-form-item>
                </div>
                <el-form-item label="备注" prop="remark">
                    <el-input size="small" placeholder="请输入备注" v-model="ClaimsruleForm.remark"></el-input>
                </el-form-item>
                <el-form-item style="text-align: right;">
                    <el-button size="small" @click="ClaimresetForm('ClaimsruleForm')">清空</el-button>
                    <el-button size="small" type="primary" @click="ClaimsubmitForm('ClaimsruleForm')">保存</el-button>
                </el-form-item>
            </el-form>
            <div class="claimitem-table">
                <el-table height="400" :data="ClaimitemData" border style="width: 100%">
                    <el-table-column prop="goodsName" label="物品名称" width="180">
                    </el-table-column>
                    <el-table-column prop="quantity" label="数量" width="45">
                    </el-table-column>
                    <el-table-column prop="createTime" label="申请时间" width="150">
                    </el-table-column>
                    <el-table-column prop="createUserName" label="申请人" width="70">
                    </el-table-column>
                    <el-table-column prop="reason" label="申请原因" width="80">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.reason}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.reason}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="remark" label="备注">
                        <template slot-scope="scope">
                            <el-popover placement="top" width="300" trigger="hover">
                                {{scope.row.remark}}
                                <span
                                    style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;"
                                    slot="reference">{{scope.row.remark}}</span>
                            </el-popover>
                        </template>
                    </el-table-column>
                    <el-table-column prop="auditStatusText" label="审核状态" width="80">
                    </el-table-column>
                    <el-table-column label="操作" width="200">
                        <template slot-scope="scope">
                            <el-button size="mini" title="编辑" @click="Editentryreceive(scope.row)">编辑</el-button>
                            <el-button size="mini" title="删除" type="danger"
                                @click="Deleteintolibraryreceive(scope.row)">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <div v-if="Claimitemcount>Claimitempagesize" class="block">
                    <el-pagination @size-change="ClaimitemhandleSizeChange"
                        @current-change="ClaimitemhandleCurrentChange" :current-page="ClaimitemcurrentPage"
                        :page-sizes="[6, 10, 15, 40]" :page-size="Claimitempagesize"
                        layout="total, sizes, prev, pager, next, jumper" :total="Claimitemcount">
                    </el-pagination>
                </div>
            </div>
        </el-dialog>
        <div class="SuppliesInventory-head">
            <div class="SuppliesInventory-head-ul">
                <div class="SuppliesInventory-head-li">
                    <label>所属公司:</label>
                    <el-select size="small" style="width:220px" @change="MaterialTypechange" v-model="MaterialType"
                        clearable filterable placeholder="请选择">
                        <el-option v-for="item in MaterialTypearr" :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="SuppliesInventory-head-li">
                    <label>物资类型:</label>
                    <el-select size="small" @change="MaterialinfoTypechange" style="width:220px" multiple collapse-tags
                        v-model="MaterialinfoType" clearable filterable placeholder="请选择">
                        <el-option v-for="item in MaterialinfoTypearr" :key="item.id" :label="item.name"
                            :value="item.id">
                        </el-option>
                    </el-select>
                </div>
                <div class="SuppliesInventory-head-li">
                    <label>物资名称:</label>
                    <el-input size="small" style="width:220px" placeholder="请输入内容" v-model="Materialname" clearable>
                    </el-input>
                </div>
                <div class="SuppliesInventory-head-li">
                    <el-button size="small" @click="GoodsList" type="primary">查 询</el-button>
                </div>
            </div>
            <div>
                <el-button size="small" @click="batchcollectionclick" type="primary">批量领用</el-button>
                <el-button size="small" v-if="Auditauthority" @click="GoodsStorageExcelDownload"
                    type="primary">入库记录导出</el-button>
                <el-button size="small" v-if="Auditauthority" @click="inquireRecords" type="primary">领用记录</el-button>
                <el-button size="small" v-if="Auditauthority" @click="Warehousingwicket" type="primary">入库审核</el-button>
                <el-button size="small" v-if="Auditauthority" @click="GoodsReceiveLists" type="primary">审核</el-button>
                <el-button size="small" v-if="Addpermission" @click="addbtnclick" type="primary">新增物品</el-button>
            </div>
        </div>
        <div class="SuppliesInventory-table">
            <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="name" label="物品名称" width="180">
                </el-table-column>
                <el-table-column prop="typeName" label="物品类型" width="180">
                </el-table-column>
                <el-table-column prop="stockQuantity" label="物品数量" width="80">
                </el-table-column>
                <el-table-column prop="unit" label="单位" width="60">
                </el-table-column>
                <el-table-column prop="lastUpdateUserName" label="最后录入人" width="90">
                </el-table-column>
                <el-table-column prop="lastUpdateTime" label="最后录入时间" width="180">
                </el-table-column>
                <el-table-column prop="stockQuantityLabel" label="状态描述">
                </el-table-column>
                <el-table-column prop="remark" label="备注">
                </el-table-column>
                <el-table-column label="操作" width="300">
                    <template slot-scope="scope">
                        <el-button v-if="Editpermission" size="mini" title="编辑"
                            @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                        <el-button v-if="Addpermission" size="mini" @click="instorage(scope.row)"
                            type="primary">入库</el-button>
                        <el-button size="mini" @click="GoodsReceiveList(scope.row)" type="success">领用</el-button>
                        <el-button v-if="Deletepermission" size="mini" title="删除" type="danger"
                            @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <div v-if="count>pagesize" class="block">
                <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                    :current-page="currentPage" :page-sizes="[10, 15, 30, 40]" :page-size="pagesize"
                    layout="total, sizes, prev, pager, next, jumper" :total="count">
                </el-pagination>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            pickerOptionss: {
                shortcuts: [{
                    text: '最近一周',
                    onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                    picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一个月',
                    onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                    picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近三个月',
                    onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                    picker.$emit('pick', [start, end]);
                    }
                }]
            },
            pickerOptions: {
            shortcuts: [{
                text: '今天',
                onClick(picker) {
                picker.$emit('pick', new Date());
                }
            }, {
                text: '昨天',
                onClick(picker) {
                const date = new Date();
                date.setTime(date.getTime() - 3600 * 1000 * 24);
                picker.$emit('pick', date);
                }
            }, {
                text: '一周前',
                onClick(picker) {
                const date = new Date();
                date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
                picker.$emit('pick', date);
                }
            }]
            },
            Userid:'',
            token:"",
            MaterialType:'',
            MaterialTypearr:[],
            MaterialinfoType:[],
            MaterialinfoTypes:'',
            MaterialinfoTypearr:[],
            Materialname:'',
            tableData:[],
            AddItemsVisible:false,
            currentPage:1,
            pagesize:10,
            count:0,
            WScurrentPage:1,
            WSpagesize:6,
            WScount:0,
            ClaimitemcurrentPage:1,
            Claimitempagesize:6,
            Claimitemcount:0,
            ApprovalcurrentPage:1,
            Approvalpagesize:6,
            Approvalcount:0,
            //新增物品参数
            AddMaterialType:"",
            AddMaterialTypearr:[],
            AddMaterialinfoType:"",
            AddMaterialinfoTypearr:[],
            AdditemsName:"",
            unit:"",
            Additemstextarea:"",
            ID:0,
            groupNameData:[],
            //入库参数
            userNameData:[],
            warehousingslist:[],
            warehousingsVisible:false,
            warehousingsruleForm: {
                id:0,
                quantity: 0,
                unitPrice: 0,
                totalPrice: 0,
                supplierName: '',
                supplierTel: '',
                supplierAddress: '',
                supplierSource: '',
                storageUserId:'',
                storageTime:'',
                remark: ''
            },
            warehousingsrules: {
                quantity: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                unitPrice: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                totalPrice: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                supplierName: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                supplierTel: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                supplierAddress: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                supplierSource: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                storageUserId: [
                    { required: true, message: '请选择', trigger: 'change' },
                ],
                storageTime: [
                    { required: true, message: '请选择', trigger: 'blur' },
                ],
                remark: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
            },
            typevalue:-1,
            //领用参数
            ClaimitemVisible:false,
            ClaimitemData:[],
            ClaimsruleForm:{
                id:0,
                groupId:'',
                quantity:0,
                reason:'',
                remark:'',
            },
            Claimrules:{
                groupId: [
                    { required: true, message: '请选择', trigger: 'change' },
                ],
                quantity: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                reason: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                remark: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
            },
            Claimitemlabel:'',
            //审核参数
            options:[
                {
                    value: '',
                    label: '全部'
                },
                {
                    value: 0,
                    label: '待审核'
                },
                {
                    value: 1,
                    label: '审核通过'
                },
                {
                    value: 2,
                    label: '未通过'
                },
            ],
            ApprovalVisible:false,
            ApprovalData:[],
            Approvalinput:'',
            receiveStatus:[],
            //shqx
            Auditauthority:false,
            Editpermission:false,
            Addpermission:false,
            Deletepermission:false,
            //领用记录
            ReceiptRecord:false,
            groupID:[],
            groupIDarr:[],
            personnelID:[],
            personnelIDarr:[],
            RSAuditStatus:'',
            RSAuditname:'',
            RSAudittime:'',
            RSAuditTypes:[],
            RSAuditTypearr:[],
            RSAuditData:[],
            RSAuditcurrentPage:1,
            RSAuditpagesize:10,
            RSAuditcount:0,
            //入库审核
            Warehousingaudit:false,
            WarehousingTypes:'',
            WarehousingStatus:-1,
            WarehousingStatusarr:[],
            Warehousingname:'',
            WarehousingData:[],
            WarehousingcurrentPage:1,
            Warehousingpagesize:10,
            Warehousingcount:0,
            //批量领用
            batchcollectiontabledata:[],
            BatchCollection:false,
            BatchRequestinfo:{
                id:0,
                groupId:'',
                reason:'',
                remark:'',
            },
            BatchRequestParameters:[
                {
                    id:0,
                    goodsId:'',
                    quantity:0, 
                    remark:"", 
                }
            ],
            activeIndex: '1',
            batchrecordingdata:[],
            batchrecordingamount:0,
            batchrecordingIndex:1,
            batchrecordingSize:8,
            
        }
    },
    methods:{
        //保留两位小数
        townum(val){
            val=Number(val);
            return val.toFixed(2);
        },
        //处理日期
        datetimes(val){
            var date=new Date(val);
            var y=date.getFullYear();
            var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
            var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
            var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
            var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
            var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
            return y+'-'+m+'-'+d
        },
        //处理日期
        datetime(val){
            var date=new Date(val);
            var y=date.getFullYear();
            var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
            var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
            var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
            var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
            var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
            return y+'-'+m+'-'+d+" "+s+':'+f+':'+mm
        },
        //获取
        GoodsInitDataSource() {
            var url = "/api/PersonnelModule/GoodsInitDataSource"
            var that = this
            this.$axios({
                method: 'get',
                url: url,
                headers: {
                    Authorization: 'Bearer '
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.MaterialTypearr=res.data.data.goodsTypeData;
                    that.AddMaterialTypearr=res.data.data.goodsTypeData;
                    that.userNameData=res.data.data.userNameData;
                    that.groupNameData=res.data.data.groupNameData;
                    that.WarehousingStatusarr=res.data.data.stockStatus;
                    that.receiveStatus=res.data.data.receiveStatus;
                    // that.groupNameData.unshift(
                    //     {
                    //         id:0,
                    //         groupName:"其他物资(公司内部物资)"
                    //     },
                    //     {
                    //         id:-1,
                    //         groupName:"拜访客户所使用的物资"
                    //     }
                    // )
                    // that.MaterialType=that.MaterialTypearr[0].id;
                    that.MaterialTypechange();
                    for (let k = 0; k < that.MaterialTypearr.length; k++) {
                        for (let l = 0; l < that.MaterialTypearr[k].subTypeItems.length; l++) {
                            that.RSAuditTypearr.push(that.MaterialTypearr[k].subTypeItems[l])
                        }
                    }
                } else {
                    that.$message.error(res.data.msg);
                }
            })
        },
        //物资类型切换
        MaterialTypechange(val){
            this.MaterialinfoType="";
            this.MaterialinfoTypearr=[];
            for(let i=0;i<this.MaterialTypearr.length;i++){
                if(this.MaterialType==this.MaterialTypearr[i].id){
                    this.MaterialinfoTypearr=this.MaterialTypearr[i].subTypeItems;
                }
            }
            if(val==undefined){
                this.GoodsList();
            }
        },
        //物资详情选择
        MaterialinfoTypechange(){
            this.MaterialinfoTypes=""
            for(let i=0;i<this.MaterialinfoType.length;i++){
                this.MaterialinfoTypes+=this.MaterialinfoType[i]+','
            }
            this.MaterialinfoTypes=this.MaterialinfoTypes.substring(0, this.MaterialinfoTypes.length - 1);
        },
        //入库
        Warehousingchange(){
            this.WarehousingcurrentPage=1;
            this.GoodsStorageList();
        },
        //入库审核列表
        GoodsStorageList(val){
            var url = "/api/PersonnelModule/GoodsStorageList"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer '+ that.token 
                },
                data:{
                    portType:1,
                    pageIndex:that.WarehousingcurrentPage,
                    pageSize:that.Warehousingpagesize,
                    goodsId:that.WarehousingTypes==""?0:that.WarehousingTypes,
                    currUserId:that.Userid,
                    auditLabel:that.WarehousingStatus+'',
                    goodsName:that.Warehousingname,
                    batchNo:'',
                }
            }).then(function (res) {
                that.WarehousingData=[];
                if (res.data.code == 200) {
                    that.WarehousingData=res.data.data;
                    that.Warehousingcount=res.data.count;
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
        //add物资类型切换
        AddMaterialTypechange(val){
            if(val==0){
                this.AddMaterialinfoType="";
            }
            this.AddMaterialinfoTypearr=[];
            for(let i=0;i<this.AddMaterialTypearr.length;i++){
                if(this.AddMaterialType==this.AddMaterialTypearr[i].id){
                    this.AddMaterialinfoTypearr=this.AddMaterialTypearr[i].subTypeItems;
                }
            }
        },
        //入库导出
        GoodsStorageExcelDownload(){
            var url = "/api/PersonnelModule/GoodsStorageExcelDownload"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer '+ that.token 
                },
            }).then(function (res) {
                if (res.data.code == 200) {
                    window.open(res.data.data.url);
                    that.$message({
                        type: 'success',
                        message: res.data.msg
                    });
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
        //获取列表
        GoodsList() {
            var url = "/api/PersonnelModule/GoodsList"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                },
                data: {
                    portType: 1,
                    pageIndex: that.currentPage,
                    pageSize: that.pagesize,
                    typeIds: that.MaterialinfoTypes,
                    goodsName: that.Materialname,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.count=res.data.count;
                    that.tableData=res.data.data;
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
        //分页
        handleSizeChange(val) {
            this.currentPage=1;
            this.pagesize=val;
            this.GoodsList();
        },
        handleCurrentChange(val) {
            this.currentPage=val;
            this.GoodsList();
        },
        WShandleSizeChange(val) {
            this.WScurrentPage=1;
            this.WSpagesize=val;
            this.instorage({'id':this.ID});
        },
        WShandleCurrentChange(val) {
            this.WScurrentPage=val;
            this.instorage({'id':this.ID});
        },
        ClaimitemhandleSizeChange(val) {
            this.ClaimitemcurrentPage=1;
            this.Claimitempagesize=val;
            this.GoodsReceiveList({'id':this.ID});
        },
        ClaimitemhandleCurrentChange(val) {
            this.ClaimitemcurrentPage=val;
            this.GoodsReceiveList({'id':this.ID});
        },
        ApprovalhandleSizeChange(val) {
            this.ApprovalcurrentPage=1;
            this.Approvalpagesize=val;
            this.GoodsReceiveLists();
        },
        ApprovalhandleCurrentChange(val) {
            this.ApprovalcurrentPage=val;
            this.GoodsReceiveLists();
        },
        RSAuditSizeChange(val) {
            this.RSAuditcurrentPage=1;
            this.RSAuditpagesize=val;
            this.RecordsGoodsReceiveList(false);
        },
        RSAuditCurrentChange(val) {
            this.RSAuditcurrentPage=val;
            this.RecordsGoodsReceiveList(false);
        },
        WarehousingSizeChange(val) {
            this.WarehousingcurrentPage=1;
            this.Warehousingpagesize=val;
            this.GoodsStorageList();
        },
        WarehousingCurrentChange(val) {
            this.WarehousingcurrentPage=val;
            this.GoodsStorageList();
        },
        Warehousingwicket(){
            this.Warehousingaudit=true;
            this.GoodsStorageList();
        },
        batchrecordingSizeChange(val) {
            this.batchrecordingIndex=1;
            this.batchrecordingSize=val;
            this.GoodsReceiveBatchList();
        },
        batchrecordingCurrentChange(val) {
            this.batchrecordingIndex=val;
            this.GoodsReceiveBatchList();
        },
        //新增按钮
        addbtnclick(){
            this.ID=0;
            this.AdditemsName="";
            this.AddMaterialType="";
            this.AddMaterialinfoType="";
            this.Additemstextarea="";
            this.unit="";
            this.AddItemsVisible=true;
        },
    
        //入库审核
        GoodsStorageConfirmStatusChange(val,type){
            var auditDep=0
            for (let i = 0; i < val.auditPers.length; i++) {
                if (val.auditPers[i].auditPer==true) {
                    auditDep=val.auditPers[i].auditDep
                }
            }
            if (auditDep==0) {
                return this.$message.error('没有审核权限');
            }
            var url = "/api/PersonnelModule/GoodsStorageConfirmStatusChange"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data:{
                    id:val.id,
                    auditDep:auditDep,
                    confirmStatus:type,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        type: 'success',
                        message: res.data.msg
                    });
                    that.GoodsStorageList();
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //编辑
        handleEdit(index,row){
            console.log(row);
            this.ID=row.id;
            var url = "/api/PersonnelModule/GoodsInfo?portType=1&id="+this.ID
            var that = this
            this.$axios({
                method: 'get',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    var datainfo=res.data.data;
                    that.Additemstextarea=datainfo.remark;
                    that.AdditemsName=datainfo.name;
                    that.AddMaterialType=datainfo.parentType;
                    that.unit=datainfo.unit;
                    that.AddMaterialinfoType=datainfo.type;
                    that.AddItemsVisible=true;
                    that.AddMaterialTypechange(2);
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //删除
        handleDelete(index,row){
            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                var url = "/api/PersonnelModule/GoodsDel/"+row.id
                var that = this
                this.$axios({
                    method: 'delete',
                    url: url,
                    headers: {
                        Authorization: 'Bearer ' +that.token
                    }
                }).then(function (res) {
                    if (res.data.code == 200) {
                        that.$message({
                            type: 'success',
                            message: res.data.msg
                        });
                        that.GoodsList();
                    }else{
                        that.$message.error(res.data.msg);
                    }
                }).catch(function (error) {
                    that.$message.error("操作错误，联系信息部!");
                });
                
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });          
            });
        },
        //计算总价
        Sumup(){
            console.log(123);
            this.warehousingsruleForm.totalPrice=this.warehousingsruleForm.quantity*this.warehousingsruleForm.unitPrice;
        },
        //新增物品api
        GoodsOP() {
            var url = "/api/PersonnelModule/GoodsOP"
            var that = this
            console.log(that.AdditemsName,that.AddMaterialinfoType,that.AddMaterialTypearr,that.unit);
            
            if (that.AdditemsName==""||that.AddMaterialinfoType==""||that.AddMaterialType==""||that.unit=="") {
                that.$message.error("检查是否填写完全！");
                return
            }
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data: {
                    currUserId:that.Userid,
                    id:that.ID,
                    name:that.AdditemsName,
                    type:that.AddMaterialinfoType,
                    unit:that.unit,
                    remark:that.Additemstextarea,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        message:res.data.msg ,
                        type: 'success',
                        offset:50
                    });
                    that.AddItemsVisible=false;
                    that.GoodsList();
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
        //入库数据初始化
        rkcsh(){
            this.warehousingsruleForm={
                id:0,
                quantity: 0,
                unitPrice: 0,
                totalPrice: 0,
                supplierName: '',
                supplierTel: '',
                supplierAddress: '',
                supplierSource: '',
                storageUserId:'',
                storageTime:'',
                remark: ''
            }
        },
        //入库列表
        instorage(row){
            this.rkcsh();
            this.ID=row.id;
            this.warehousingsVisible=true;
            var url = "/api/PersonnelModule/GoodsStorageList"
            var that = this
            this.$axios({
                method: 'POST',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                },
                data:{
                    portType:1,
                    pageIndex:that.WScurrentPage,
                    pageSize:that.WSpagesize,
                    goodsId:row.id,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.WScount=res.data.count;
                    that.warehousingslist=res.data.data;
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //入库api
        GoodsStorageOP(){
            var url = "/api/PersonnelModule/GoodsStorageOP"
            var that = this
            this.$axios({
                method: 'POST',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data:{
                    id:that.warehousingsruleForm.id,
                    goodsId:that.ID,
                    quantity:that.warehousingsruleForm.quantity,
                    unitPrice:that.warehousingsruleForm.unitPrice,
                    totalPrice:that.warehousingsruleForm.totalPrice,
                    supplierName:that.warehousingsruleForm.supplierName,
                    supplierTel:that.warehousingsruleForm.supplierTel,
                    supplierAddress:that.warehousingsruleForm.supplierAddress,
                    supplierSource:that.warehousingsruleForm.supplierSource,
                    storageUserId:that.warehousingsruleForm.storageUserId,
                    storageTime:that.datetime(that.warehousingsruleForm.storageTime),
                    remark:that.warehousingsruleForm.remark,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        message:res.data.msg ,
                        type: 'success'
                    });
                    that.instorage({'id':that.ID});
                    that.resetForm('warehousingsruleForm');
                    that.GoodsList();
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //编辑入库
        Editentry(val){
            var url = "/api/PersonnelModule/GoodsStorageInfo/"+val.id+"?portType=1"
            var that = this
            this.$axios({
                method: 'get',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    var datainfo=res.data.data;
                    that.warehousingsruleForm.id=datainfo.id;
                    that.warehousingsruleForm.quantity=datainfo.quantity;
                    that.warehousingsruleForm.unitPrice=datainfo.unitPrice;
                    that.warehousingsruleForm.totalPrice=datainfo.totalPrice;
                    that.warehousingsruleForm.supplierName=datainfo.supplierName;
                    that.warehousingsruleForm.supplierTel=datainfo.supplierTel;
                    that.warehousingsruleForm.supplierAddress=datainfo.supplierAddress;
                    that.warehousingsruleForm.supplierSource=datainfo.supplierSource;
                    that.warehousingsruleForm.storageUserId=datainfo.storageUserId;
                    that.warehousingsruleForm.storageTime=datainfo.storageTime;
                    that.warehousingsruleForm.remark=datainfo.remark;
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //删除入裤
        Deleteintolibrary(row){
            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                var url = "/api/PersonnelModule/GoodsStorageDel/"+row.id
                var that = this
                this.$axios({
                    method: 'delete',
                    url: url,
                    headers: {
                        Authorization: 'Bearer ' +that.token
                    }
                }).then(function (res) {
                    if (res.data.code == 200) {
                        that.$message({
                            type: 'success',
                            message: res.data.msg
                        });
                        that.instorage({'id':that.ID});
                    }else{
                        that.$message.error(res.data.msg);
                    }
                }).catch(function (error) {
                    that.$message.error("操作错误，联系信息部!");
                });
                
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });          
            });
        },
        //入库
        submitForm(formName) {
            this.$refs[formName].validate((valid) => {
            if (valid) {
                this.GoodsStorageOP();
            } else {
                return false;
            }
            });
        },
        resetForm(formName) {
            this.warehousingsruleForm.id=0;
            this.$refs[formName].resetFields();
        },
        //领用
        ClaimsubmitForm(formName) {
            this.$refs[formName].validate((valid) => {
            if (valid) {
                this.GoodsReceiveOP();
            } else {
                console.log('error submit!!');
                return false;
            }
            });
        },

        ClaimresetForm(formName) {
            this.Claimitemlabel="";
            this.ClaimsruleForm.id=0;
            this.$refs[formName].resetFields();
        },
        //审核状态切换
        typevaluechange(){
            this.ApprovalcurrentPage=1;
            this.GoodsReceiveLists();
        },
        //领用审核列表
        GoodsReceiveLists(){
            this.ApprovalData=[];
            this.ApprovalVisible=true
            var url = "/api/PersonnelModule/GoodsReceiveAuditList"
            var that = this
            this.$axios({
                method: 'POST',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data:{
                    portType:1,
                    pageIndex:that.ApprovalcurrentPage,
                    pageSize:that.Approvalpagesize,
                    goodsId:0,
                    userLabel:'',
                    goodsName:that.Approvalinput,
                    beginDt:'',
                    endDt:'',
                    groupLabel:'',
                    typeLabel:'',
                    auditLabel:that.typevalue+'',
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.ApprovalData=res.data.data;
                    that.Approvalcount=res.data.count;
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //查询领用记录
        inquireRecords(){
            this.ReceiptRecord=true;
            this.RecordsGoodsReceiveList(false);
        },
        //领用记录
        RecordsGoodsReceiveList(isExcelDownload){
            let groupID="";
            for(let g=0;g<this.groupID.length;g++){
                groupID+=this.groupID[g]+',';
            }
            groupID=groupID.substring(0, groupID.length - 1);
            let personnelID="";
            for (let p = 0; p < this.personnelID.length; p++) {
                personnelID += this.personnelID[p]+',';
            }
            personnelID=personnelID.substring(0, personnelID.length - 1);
            let RSAuditTypes="";
            for (let r = 0; r < this.RSAuditTypes.length; r++) {
                RSAuditTypes +=  this.RSAuditTypes[r]+",";
            }
            RSAuditTypes=RSAuditTypes.substring(0, RSAuditTypes.length - 1);
            var url = "/api/PersonnelModule/GoodsReceiveList"
            var that = this
            this.$axios({
                method: 'POST',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data:{
                    portType:1,
                    pageIndex:that.RSAuditcurrentPage,
                    pageSize:that.RSAuditpagesize,
                    goodsId:0,
                    userLabel:personnelID,
                    goodsName:that.RSAuditname,
                    beginDt:that.RSAudittime?that.datetimes(that.RSAudittime[0]):'',
                    endDt:that.RSAudittime?that.datetimes(that.RSAudittime[1]):'',
                    groupLabel:groupID,
                    typeLabel:RSAuditTypes,
                    auditLabel:that.RSAuditStatus+"",
                    isExcelDownload:isExcelDownload,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    let Datalist=res.data;
                    if (isExcelDownload==true) {
                        window.open(Datalist.data.url)
                        return
                    }
                    that.RSAuditData=Datalist.data;
                    that.RSAuditcount=Datalist.count;
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //领用列表
        GoodsReceiveList(row){
            this.Claimitemlabel="";
            if(row.stockQuantity<=0){
                this.$message.error("已无库存！");
                return
            }
            this.bjcsh();
            this.ClaimitemData=[];
            this.ID=row.id;
            this.ClaimitemVisible=true;
            var url = "/api/PersonnelModule/GoodsReceiveList"
            var that = this
            this.$axios({
                method: 'POST',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data:{
                    portType:1,
                    pageIndex:that.ClaimitemcurrentPage,
                    pageSize:that.Claimitempagesize,
                    goodsId:row.id,
                    userLabel:that.Userid+'',
                    goodsName:'',
                    beginDt:'',
                    endDt:'',
                    groupLabel:'',
                    typeLabel:'',
                    auditLabel:'',
                    isExcelDownload:false,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.ClaimitemData=res.data.data;
                    that.Claimitemcount=res.data.count;
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //领用api
        GoodsReceiveOP(){
            var url = "/api/PersonnelModule/GoodsReceiveOP"
            var that = this
            this.$axios({
                method: 'POST',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data:{
                    id:that.ClaimsruleForm.id,
                    groupId:that.ClaimsruleForm.groupId,
                    goodsId:that.ID,
                    quantity:that.ClaimsruleForm.quantity,
                    reason:that.ClaimsruleForm.reason,
                    remark:that.ClaimsruleForm.remark,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        type: 'success',
                        message: res.data.msg
                    });
                    that.ClaimresetForm("ClaimsruleForm");
                    that.GoodsReceiveList({'id':that.ID});
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //编辑初始化
        bjcsh(){
            this.ClaimsruleForm={
                id:0,
                groupId:'',
                quantity:0,
                reason:'',
                remark:'',
            }
        },
        //编辑领用
        Editentryreceive(val){
            var url = "/api/PersonnelModule/GoodsReceiveInfo/"+val.id+"?portType=1"
            var that = this
            this.$axios({
                method: 'get',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    var datainfo=res.data.data;
                    that.ClaimsruleForm.id=datainfo.id;
                    that.ClaimsruleForm.groupId=datainfo.groupId;
                    that.ClaimsruleForm.quantity=datainfo.quantity;
                    that.ClaimsruleForm.reason=datainfo.reason;
                    that.ClaimsruleForm.remark=datainfo.remark;
                    that.Claimitemlabel=datainfo.goodsStorageInfoStr;
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //审核列表删除
        Deleteintolibraryreceives(row){
            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
                var that = this
                this.$axios({
                    method: 'delete',
                    url: url,
                    headers: {
                        Authorization: 'Bearer ' +that.token
                    }
                }).then(function (res) {
                    if (res.data.code == 200) {
                        that.$message({
                            type: 'success',
                            message: res.data.msg
                        });
                        that.GoodsReceiveLists();
                    }else{
                        that.$message.error(res.data.msg);
                    }
                }).catch(function (error) {
                    that.$message.error("操作错误，联系信息部!");
                });
                
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });          
            });
        },
        //删除领用
        Deleteintolibraryreceive(row){
            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
                var that = this
                this.$axios({
                    method: 'delete',
                    url: url,
                    headers: {
                        Authorization: 'Bearer ' +that.token
                    }
                }).then(function (res) {
                    if (res.data.code == 200) {
                        that.$message({
                            type: 'success',
                            message: res.data.msg
                        });
                        that.GoodsReceiveList({'id':that.ID});
                    }else{
                        that.$message.error(res.data.msg);
                    }
                }).catch(function (error) {
                    that.$message.error("操作错误，联系信息部!");
                });
                
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });          
            });
        },
        //审核领用
        GoodsReceiveAudit(row,val){
            var auditDep=0
            for (let i = 0; i < row.auditPers.length; i++) {
                if (row.auditPers[i].auditPer==true) {
                    auditDep=row.auditPers[i].auditDep
                }
            }
            if (auditDep==0) {
                return this.$message.error('没有审核权限');
            }
            var url = "/api/PersonnelModule/GoodsReceiveAuditNew"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' +that.token
                },
                data:{
                    label:row.id+'',
                    auditEnum:val,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        type: 'success',
                        message: res.data.msg
                    });
                    that.GoodsReceiveLists();
                    if(that.tableData.length>0){
                        that.GoodsList();
                    }
                    
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部!");
            });
        },
        //获取列表
        batchcollectionGoodsList() {
            var url = "/api/PersonnelModule/GoodsList"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                },
                data: {
                    portType: 1,
                    pageIndex: 1,
                    pageSize: 9999,
                    typeIds: '',
                    goodsName:'',
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.batchcollectiontabledata=res.data.data;
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
         //获取记录
         GoodsReceiveBatchList() {
            this.batchrecordingdata=[];
            var url = "/api/PersonnelModule/GoodsReceiveBatchList"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                },
                data: {
                    portType: 1,
                    pageIndex: that.batchrecordingIndex,
                    pageSize: that.batchrecordingSize,
                    currUserId: that.Userid,
                    goodsName:'',
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.batchrecordingdata=res.data.data;
                    that.batchrecordingamount=res.data.count;
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
        //初始化批量领用数据
        batchcollectionInitialization(){
            this.BatchRequestinfo={
                id:0,
                groupId:'',
                reason:'',
                remark:'',
            }
            this.BatchRequestParameters=[
                {
                    id:0,
                    goodsId:'',
                    quantity:0, 
                    remark:"", 
                }
            ]
        },
        //获取记录详情
        GoodsReceiveBatchInfo(val) {
            this.batchcollectionInitialization();
            var url = "/api/PersonnelModule/GoodsReceiveBatchInfo/"+val
            var that = this
            this.$axios({
                method: 'get',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                },
            }).then(function (res) {
                if (res.data.code == 200) {
                    var GoodsReceiveBatchInfos=res.data.data;
                    that.BatchRequestinfo.id=GoodsReceiveBatchInfos.id;
                    that.BatchRequestinfo.groupId=GoodsReceiveBatchInfos.groupId;
                    that.BatchRequestinfo.reason=GoodsReceiveBatchInfos.reason;
                    that.BatchRequestinfo.remark=GoodsReceiveBatchInfos.remark;
                    that.BatchRequestParameters=GoodsReceiveBatchInfos.receiveDetails;
                    that.activeIndex='1';
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
        batchcollectionclick(){
            this.BatchCollection=true;
            this.batchcollectionInitialization();
            this.batchcollectionGoodsList();
            this.GoodsReceiveBatchList();
        },
        //修改
        batchrecordingrevamp(val){
            this.GoodsReceiveBatchInfo(val.id)
        },
        //Pilianglingyongbaocun
        GoodsReceiveBatchOp() {
            var url = "/api/PersonnelModule/GoodsReceiveBatchOp"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' 
                },
                data: {
                    id: that.BatchRequestinfo.id,
                    groupId: that.BatchRequestinfo.groupId,
                    receiveDetails: that.BatchRequestParameters,
                    reason: that.BatchRequestinfo.reason,
                    remark:that.BatchRequestinfo.remark,
                    currUserId:that.Userid,
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.$message({
                        type: 'success',
                        message: res.data.msg
                    });
                    that.batchcollectionInitialization();
                    that.GoodsReceiveBatchList();
                    that.activeIndex='2';
                }else{
                    that.$message.error(res.data.msg);
                }
            }).catch(function (error) {
                that.$message.error("操作错误，联系信息部！");
            });
        },
        handleSelect(key, keyPath) {
            console.log(key, keyPath);
        },
        //批量领用添加
        batchcollectionadd(){
            this.BatchRequestParameters.push(
                {
                    id:0,
                    goodsId:'', 
                    quantity:0, 
                    remark:"",  
                }
            )
        },
        batchcollectiondel(index, rows) {
            rows.splice(index, 1);
            console.log(this.BatchRequestParameters);
            
        }

    },

    mounted(){
        //权限
        let authData=JSON.parse(localStorage.getItem('userinif')).authData;
        let Permissions=[];
        for(let k=0;k<authData.length;k++){
            for(let m=0;m<authData[k].pageList.length;m++){
                if (authData[k].pageList[m].webUrl=='/SuppliesInventory') {
                    Permissions=authData[k].pageList[m].pageAuth;
                }
            }
        }
        for (let r = 0; r < Permissions.length; r++) {
            if (Permissions[r].funid==12) {
                this.Auditauthority=true;
            }
            if (Permissions[r].funid==3) {
                this.Editpermission=true;
            }
            if (Permissions[r].funid==11) {
                this.Addpermission=true;
            }
            if (Permissions[r].funid==2) {
                this.Deletepermission=true;
            }
        }

        this.Userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
        this.token=JSON.parse(localStorage.getItem('userinif')).token;
        this.GoodsInitDataSource();
    }
}
</script>
<style>
.SuppliesInventory-all {
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 0 5px #0005;
    border-radius: 10px;
    min-height: 830px;
    min-width: 1545px;
}
.SuppliesInventory-head{
    display: flex;
    justify-content: space-between;
}
.SuppliesInventory-head-li{
    margin-right: 15px;
}
.SuppliesInventory-head-li label{
    font-size: 14px;
    color: #555;
}
.SuppliesInventory-table{
    margin-top: 15px;
}
.SuppliesInventory-head-ul{
    display: flex;
}
.additems-li{
    margin-bottom: 10px;
}
.additems-btn{
    text-align: right;
    margin-top: 20px;
}
.warehousingsrule-input{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.warehousingsrule-input .el-form-item{
    width: 33%;
}
.warehousingsrule-input .el-input-number{
    width: 100%;
}
.warehousingsrule-input .el-form-item{
    margin-bottom: 10px;
}
.warehousingsrule-input .el-form-item__error{
    top: 82%;
}
.warehousingsrule-input .el-select{
    width: 100%;
}
.warehousingsrule-table .el-table th.el-table__cell>.cell{
    text-align: center;
    font-size: 12px;
}
.warehousingsrule-table .el-table td.el-table__cell div{
    font-size: 12px;
}
.SuppliesInventory-table .block{
    text-align: center;
    margin-top: 10px;
}
.warehousingsrule-table .block{
    text-align: center;
    margin-top: 10px;
}
.additems-li label{
    display: inline-block;
    width: 105px;
}
.Claimitem-input{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.Claimitem-input .el-form-item{
    width: 33%;
}
.Claimitem-input .el-input-number{
    width: 100%;
}
.Claimitem-input .el-form-item{
    margin-bottom: 10px;
}
.Claimitem-input .el-form-item__error{
    top: 82%;
}
.claimitem-table .el-table th.el-table__cell>.cell{
    text-align: center;
    font-size: 12px;
}
.claimitem-table .el-table td.el-table__cell div{
    font-size: 12px;
}
.claimitem-table .block{
    text-align: center;
    margin-top: 10px;
}
.Approval-table .el-table th.el-table__cell>.cell{
    text-align: center;
    font-size: 12px;
}
.Approval-table .el-table td.el-table__cell div{
    font-size: 12px;
}
.Approval-table .block{
    text-align: center;
    margin-top: 10px;
}
.ReceiptRecord-table .el-table th.el-table__cell>.cell{
    text-align: center;
    font-size: 12px;
}
.ReceiptRecord-table .el-table td.el-table__cell div{
    font-size: 12px;
}
.ReceiptRecord-table .block{
    text-align: center;
    margin-top: 10px;
}
.Approval-dialog .el-dialog__body{
    padding-top: 0px;
    
}
.ReceiptRecord-search{
    display: flex;
}
.ReceiptRecord-search-li label{
    margin-left: 10px;
}
.ReceiptRecord-table{
    margin-top: 15px;
}
.ReceiptRecord-search .el-range-editor.el-input__inner{
    margin-bottom:0;
}
.warehousingaudit-search{
    display: flex;
}
.warehousingaudit-search-li label{
    margin-left: 10px;
}
.warehousingaudit-search .el-range-editor.el-input__inner{
    margin-bottom:0;
}
.warehousingaudit-table{
    margin-top: 15px;
}
.warehousingaudit-table .block{
    text-align: center;
}
.batchcollection-table-btn{
    text-align: right;
    margin-bottom: 10px;
}
.batchcollection-save-btn{
    text-align: right;
    margin-top: 10px;
}
.batchcollection-search{
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}
.batchcollectiondialog .el-dialog__body{
    padding-top: 0;
}
</style>


