|  | @@ -1,7 +1,7 @@
 | 
	
		
			
				|  |  |  <!-- 采购管理 -->
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div class="purchase">
 | 
	
		
			
				|  |  | -    <template v-if="!addOrUpdateVisible && !detailVisible && !operateVisible">
 | 
	
		
			
				|  |  | +    <template v-if="!addOrUpdateVisible && !detailVisible && !operateVisible && !inboundVisible">
 | 
	
		
			
				|  |  |        <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
 | 
	
		
			
				|  |  |          <el-form-item label="类别">
 | 
	
		
			
				|  |  |            <el-select
 | 
	
	
		
			
				|  | @@ -205,8 +205,8 @@
 | 
	
		
			
				|  |  |              <el-button v-if="isAuth('purchase:detail:info')" type="text" size="small" @click="detailHandle(scope.row.procurementId)">查看</el-button>
 | 
	
		
			
				|  |  |              <el-button v-if="isAuth('purchase:detail:update') && (Number(scope.row.approvalState) <= 1)" type="text" size="small" @click="addOrUpdateHandle(scope.row.procurementId, false)">编辑</el-button>
 | 
	
		
			
				|  |  |              <el-button v-if="isAuth('purchase:detail:updatePurchaseDetail') && (Number(scope.row.approvalState) === 3)" type="text" size="small" @click="operateHandle(scope.row)">采购</el-button>
 | 
	
		
			
				|  |  | -            <el-button v-if="isAuth('purchase:detail:infoPutIn') && (Number(scope.row.approvalState) === 3)" type="text" size="small" @click="revokeHandle(scope.row.procurementId)">入库</el-button>
 | 
	
		
			
				|  |  | -            <el-button v-if="isAuth('purchase:detail:infoPutInAgain') && (Number(scope.row.purchaseState) === 5)" type="text" size="small" @click="revokeHandle(scope.row.procurementId)">再次入库</el-button>
 | 
	
		
			
				|  |  | +            <el-button v-if="isAuth('purchase:detail:infoPutIn') && (Number(scope.row.approvalState) === 3)" type="text" size="small" @click="inboundHandle(scope.row)">入库</el-button>
 | 
	
		
			
				|  |  | +            <el-button v-if="isAuth('purchase:detail:infoPutInAgain') && (Number(scope.row.purchaseState) === 5)" type="text" size="small" @click="inboundHandle(scope.row.procurementId)">再次入库</el-button>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |        </el-table>
 | 
	
	
		
			
				|  | @@ -225,6 +225,8 @@
 | 
	
		
			
				|  |  |      <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
 | 
	
		
			
				|  |  |      <!-- 采购操作 -->
 | 
	
		
			
				|  |  |      <operate v-if="operateVisible" ref="operate" @onChose="onChose"/>
 | 
	
		
			
				|  |  | +    <!-- 入库 -->
 | 
	
		
			
				|  |  | +    <inbound v-if="inboundVisible" ref="inbound" @onChose="onChose"/>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -232,18 +234,20 @@
 | 
	
		
			
				|  |  |    import AddOrUpdate from './purchase-add-or-update'
 | 
	
		
			
				|  |  |    import Detail from './purchase-detail'
 | 
	
		
			
				|  |  |    import Operate from './purchase-operate'
 | 
	
		
			
				|  |  | +  import Inbound from '../warehouse/stock-order-inbound'
 | 
	
		
			
				|  |  |    import { getDictList } from '@/api/dict'
 | 
	
		
			
				|  |  |    import { getPurchaseList, revokePurchase } from '@/api/sale'
 | 
	
		
			
				|  |  |    export default {
 | 
	
		
			
				|  |  |      name: 'purchase',
 | 
	
		
			
				|  |  |      components: {
 | 
	
		
			
				|  |  | -      AddOrUpdate, Detail, Operate
 | 
	
		
			
				|  |  | +      AddOrUpdate, Detail, Operate, Inbound
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      data () {
 | 
	
		
			
				|  |  |        return {
 | 
	
		
			
				|  |  |          addOrUpdateVisible: false,
 | 
	
		
			
				|  |  |          detailVisible: false,
 | 
	
		
			
				|  |  |          operateVisible: false,
 | 
	
		
			
				|  |  | +        inboundVisible: false,
 | 
	
		
			
				|  |  |          dataForm: {},
 | 
	
		
			
				|  |  |          dataList: [],
 | 
	
		
			
				|  |  |          pageIndex: 1,
 | 
	
	
		
			
				|  | @@ -275,6 +279,7 @@
 | 
	
		
			
				|  |  |          this.addOrUpdateVisible = false
 | 
	
		
			
				|  |  |          this.detailVisible = false
 | 
	
		
			
				|  |  |          this.operateVisible = false
 | 
	
		
			
				|  |  | +        this.inboundVisible = false
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        // 获取采购类别字典
 | 
	
		
			
				|  |  |        getTypeList () {
 | 
	
	
		
			
				|  | @@ -391,6 +396,13 @@
 | 
	
		
			
				|  |  |          this.$nextTick(() => {
 | 
	
		
			
				|  |  |            this.$refs.operate.init(row)
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      // 入库
 | 
	
		
			
				|  |  | +      inboundHandle (row) {
 | 
	
		
			
				|  |  | +        this.inboundVisible = true
 | 
	
		
			
				|  |  | +        this.$nextTick(() => {
 | 
	
		
			
				|  |  | +          this.$refs.inbound.init(0, false, row)
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 |