编码入库
This commit is contained in:
		
							parent
							
								
									b72fb1c1c4
								
							
						
					
					
						commit
						2598daaa9a
					
				| 
						 | 
				
			
			@ -17,4 +17,14 @@ export function purchaseWarehouse(data) {
 | 
			
		|||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// 查询入库编码列表
 | 
			
		||||
export function getMachineById(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/material/purchase/storage/getMachineById',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -307,7 +307,7 @@
 | 
			
		|||
    <!-- 验收弹窗 -->
 | 
			
		||||
    <el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px">
 | 
			
		||||
      <div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;">
 | 
			
		||||
        <div style="width:12%;">验收结论:</div>
 | 
			
		||||
        <div style="width:15%;">验收结论:</div>
 | 
			
		||||
        <el-input
 | 
			
		||||
          type="textarea"
 | 
			
		||||
          :rows="3" style="width:80%;"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -65,7 +65,7 @@
 | 
			
		|||
          </el-col> -->
 | 
			
		||||
      </el-row>
 | 
			
		||||
 | 
			
		||||
    <el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @selection-change="handleSelectionChange">
 | 
			
		||||
    <el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="typeId" @selection-change="handleSelectionChange">
 | 
			
		||||
      <el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/>
 | 
			
		||||
      <el-table-column label="序号" align="center" width="80" type="index">
 | 
			
		||||
        
 | 
			
		||||
| 
						 | 
				
			
			@ -161,14 +161,23 @@
 | 
			
		|||
    <el-dialog title="编码入库" :visible.sync="openCode" width="1000px" append-to-body> 
 | 
			
		||||
        <el-row :gutter="10" class="mb8">
 | 
			
		||||
            <el-col :span="1.5">
 | 
			
		||||
                <el-button type="primary" size="mini" >入库</el-button>
 | 
			
		||||
                <el-button type="primary" size="mini" @click="codeWarehouse">入库</el-button>
 | 
			
		||||
            </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
        <el-table :data="codeTableData" width="100%" height="450px">
 | 
			
		||||
        <el-table :data="codeTableData" width="100%" height="450px" row-key="id" @selection-change="codeSelection">
 | 
			
		||||
            <el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/>
 | 
			
		||||
            <el-table-column label="序号" type="index" width="55" align="center"/>
 | 
			
		||||
            <el-table-column label="类型名称" prop="typeName" align="center" :show-overflow-tooltip="true"></el-table-column>
 | 
			
		||||
            <el-table-column label="规格型号" prop="type" align="center" :show-overflow-tooltip="true"></el-table-column> 
 | 
			
		||||
            <el-table-column label="设备编码" prop="code" align="center" :show-overflow-tooltip="true"></el-table-column>
 | 
			
		||||
            <el-table-column label="类型名称" prop="typeName" align="center" :show-overflow-tooltip="true">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                   <span>{{ codeRowData.maTypeName }}</span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column label="规格型号" prop="type" align="center" :show-overflow-tooltip="true">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                   <span>{{ codeRowData.typeName }}</span>
 | 
			
		||||
              </template>
 | 
			
		||||
            </el-table-column> 
 | 
			
		||||
            <el-table-column label="设备编码" prop="maCode" align="center" :show-overflow-tooltip="true"></el-table-column>
 | 
			
		||||
            <!-- <el-table-column label="操作" align="center"  width="300px">
 | 
			
		||||
              <template slot-scope="scope">
 | 
			
		||||
                  <el-button size="mini" type="warning" @click="openInnerDialog(scope.row)">内部维修</el-button> 
 | 
			
		||||
| 
						 | 
				
			
			@ -188,7 +197,7 @@
 | 
			
		|||
import { getDeviceType} from "@/api/ma/device";
 | 
			
		||||
import { getManufacturerSelect} from "@/api/ma/supplier";
 | 
			
		||||
import { getPurchaseDetailsList,getPurchaseFileList,uploadPurchaseFile } from "@/api/purchase/goodsAccept";
 | 
			
		||||
import { purchaseWarehouse } from "@/api/purchase/goodsEntry";
 | 
			
		||||
import { purchaseWarehouse,getMachineById } from "@/api/purchase/goodsEntry";
 | 
			
		||||
import { downloadFile } from '@/utils/download'
 | 
			
		||||
import { getToken } from '@/utils/auth'
 | 
			
		||||
export default {
 | 
			
		||||
| 
						 | 
				
			
			@ -248,7 +257,9 @@ export default {
 | 
			
		|||
      },
 | 
			
		||||
      //编码入库
 | 
			
		||||
      openCode:false,
 | 
			
		||||
      codeTableData:[]
 | 
			
		||||
      codeRowData:{},
 | 
			
		||||
      codeTableData:[],
 | 
			
		||||
      inPutList:[],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
| 
						 | 
				
			
			@ -302,12 +313,13 @@ export default {
 | 
			
		|||
          this.loading = true;
 | 
			
		||||
          this.queryParams.id=this.Id
 | 
			
		||||
          this.queryParams.taskId=this.taskId
 | 
			
		||||
          this.queryParams.statusList=[4,14,19]
 | 
			
		||||
          this.queryParams.statusList=[3,13,4,14,19]
 | 
			
		||||
          getPurchaseDetailsList(this.queryParams).then(response => {
 | 
			
		||||
              this.tableList = response.data.purchaseCheckDetailsList;
 | 
			
		||||
              this.tableList.forEach((item) => {
 | 
			
		||||
                  item.fixCodeStr = this.fixCodeList[Number(item.fixCode)]
 | 
			
		||||
              })
 | 
			
		||||
              console.log(this.tableList)
 | 
			
		||||
              // this.total = response.total;
 | 
			
		||||
              this.loading = false;
 | 
			
		||||
          });
 | 
			
		||||
| 
						 | 
				
			
			@ -332,27 +344,62 @@ export default {
 | 
			
		|||
      //入库
 | 
			
		||||
      pass(row) {
 | 
			
		||||
        if(row.manageType==0){//编码
 | 
			
		||||
 | 
			
		||||
          this.codeRowData=row
 | 
			
		||||
          let param={
 | 
			
		||||
            taskId:this.taskId,
 | 
			
		||||
            typeId:this.codeRowData.typeId
 | 
			
		||||
          }
 | 
			
		||||
          getMachineById(param).then((res)=>{
 | 
			
		||||
            this.codeTableData=res.data
 | 
			
		||||
          })
 | 
			
		||||
          this.openCode=true
 | 
			
		||||
        }else{
 | 
			
		||||
            this.$modal.confirm('是否确认新购入库该物资类型?').then(function() {
 | 
			
		||||
              let obj = {
 | 
			
		||||
                purchaseId: row.id
 | 
			
		||||
              };
 | 
			
		||||
        }else{  
 | 
			
		||||
            let obj = {
 | 
			
		||||
              taskId: this.taskId,
 | 
			
		||||
              typeId:row.typeId,
 | 
			
		||||
              purchaseId: row.id
 | 
			
		||||
            };
 | 
			
		||||
            this.$modal.confirm('是否确认新购入库该物资类型?')
 | 
			
		||||
            .then(function() {
 | 
			
		||||
              console.log(obj)
 | 
			
		||||
              return purchaseWarehouse(obj)
 | 
			
		||||
            }).then((res) => {
 | 
			
		||||
              if(res.code==200){
 | 
			
		||||
            }).then(() => { 
 | 
			
		||||
                  this.$modal.msgSuccess('入库成功')
 | 
			
		||||
                  this.getList()
 | 
			
		||||
                }
 | 
			
		||||
                  this.getList() 
 | 
			
		||||
            }).catch(() => {});
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      //编码勾选
 | 
			
		||||
      codeSelection(selection){
 | 
			
		||||
        this.inPutList = selection.map(item => item.maCode)
 | 
			
		||||
      },
 | 
			
		||||
      //编码入库
 | 
			
		||||
      codeWarehouse(){
 | 
			
		||||
        let obj = {
 | 
			
		||||
          taskId: this.taskId,
 | 
			
		||||
          typeId:row.typeId,
 | 
			
		||||
          purchaseId: row.id,
 | 
			
		||||
          inPutList: this.inPutList
 | 
			
		||||
        };
 | 
			
		||||
        this.$modal.confirm('是否确认新购入库勾选的编码?')
 | 
			
		||||
        .then(function() { 
 | 
			
		||||
          return purchaseWarehouse(obj)
 | 
			
		||||
        }).then(() => {  
 | 
			
		||||
            let param={
 | 
			
		||||
              taskId:this.taskId,
 | 
			
		||||
              typeId:this.codeRowData.typeId
 | 
			
		||||
            }
 | 
			
		||||
            getMachineById(param).then((res)=>{
 | 
			
		||||
              this.codeTableData=res.data
 | 
			
		||||
            })
 | 
			
		||||
            this.$modal.msgSuccess('入库成功')
 | 
			
		||||
        }).catch(() => {});
 | 
			
		||||
        
 | 
			
		||||
      },
 | 
			
		||||
      //不合格
 | 
			
		||||
      reject(row) {
 | 
			
		||||
         
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      //文件管理
 | 
			
		||||
      openFileDialog(row){
 | 
			
		||||
        this.rowData=row;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -390,7 +390,7 @@ export default {
 | 
			
		|||
                this.queryParams.startTime = undefined
 | 
			
		||||
                this.queryParams.endTime = undefined
 | 
			
		||||
            }
 | 
			
		||||
            this.queryParams.statusList=[4,14,19]
 | 
			
		||||
            this.queryParams.statusList=[3,13,4,14,19]
 | 
			
		||||
            //   this.queryParams.modelName="新购验收"
 | 
			
		||||
            getPurchaseList(this.queryParams).then((response) => {
 | 
			
		||||
                this.tableList = response.rows
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue