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