| | |
| | | data |
| | | }) |
| | | } |
| | | // 全部合格入库 |
| | | export function allProductInWarehouse(data) { |
| | | return request({ |
| | | url: "/api/purchase/allProductInWarehouse", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | <el-button size="small" v-if="this.editConfig.title != '查看'" @click="editConfig.visible = false">取消</el-button> |
| | | <el-button type="primary" size="small" |
| | | @click="saveClick('form')">确认收货</el-button> |
| | | <!-- <el-button type="primary" size="small" |
| | | @click="saveOkClickAll('form')">全部合格入库</el-button> --> |
| | | <el-button type="primary" size="small" |
| | | @click="saveOkClickAll('form')">全部合格入库</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | <script> |
| | | import { |
| | | getPurchaseProductConfirmInfo, |
| | | savePurchaseProductConfirm |
| | | savePurchaseProductConfirm, |
| | | allProductInWarehouse |
| | | } from "@/api/purchaseManage/purchase" |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | export default { |
| | |
| | | } |
| | | }, |
| | | // 全部合格入库 |
| | | saveOkClickAll(){ |
| | | async saveOkClickAll(){ |
| | | let pipeline=false // 是否有大于0的收货数量 |
| | | // let rule1=false // 本次收货是否大于未收货数量 |
| | | // let arr=[] |
| | | this.productTableList.tableData.map((item)=>{ |
| | | if(item.nowReceiveAmount>0&&item.nowReceiveAmount<=item.notReceiveAmount){ |
| | | pipeline=true |
| | | // arr.push(item) |
| | | } |
| | | }) |
| | | if(pipeline){ |
| | | await allProductInWarehouse(this.productTableList.tableData).then((res)=>{ |
| | | if(res.code===200){ |
| | | this.editConfig.visible=false |
| | | this.$parent.getData() |
| | | this.$message.success("确认入库质检成功!") |
| | | } |
| | | }) |
| | | }else{ |
| | | this.$message.warning("本次收货数量不能为0且不能超出未收货数量 ") |
| | | } |
| | | |
| | | }, |
| | | saveParams() { |
| | |
| | | <div class="add-quotation"> |
| | | <el-dialog :visible.sync="editConfig.visible" width="70%" append-to-body custom-class="iframe-dialog"> |
| | | <el-header> |
| | | <el-button type="primary" v-if="this.editConfig.title != '查看'" size="small" |
| | | <el-button type="primary" :disabled="isDisabled" size="small" |
| | | @click="saveClick()">批量合格入库</el-button> |
| | | <el-button type="primary" v-if="this.editConfig.title != '查看'" size="small" |
| | | <el-button type="primary" :disabled="isDisabled" size="small" |
| | | @click="saveNoClick()">批量不合格</el-button> |
| | | </el-header> |
| | | <el-form ref="form" :model="editConfig.infomation" label-position="right" label-width="130px" size="mini" |
| | |
| | | |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="saveClick(scope.row)" |
| | | <template slot-scope="scope" v-if="scope.row.status==1" > |
| | | <el-button type="text" size="small" @click="saveClick(scope.row)" |
| | | style="margin-right: 5px">合格</el-button> |
| | | <el-button type="text" size="small" @click="saveNoClick(scope.row)" |
| | | style="margin-right: 5px">不合格</el-button> |
| | |
| | | thatTimes: [], |
| | | selectList: [], |
| | | qualityStatusList: getDataByType("qualityStatus"), |
| | | isDisabled:false, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | async getPurchaseQualityInspectionInfo(params) { |
| | | await getPurchaseQualityInspectionInfo(params).then((res) => { |
| | | this.timeList = [] |
| | | this.isDisabled=true // 判断有没有待质检的 |
| | | res.data.map((item) => { |
| | | this.timeList.push({ id: item.createTime, name: item.createTime }) |
| | | if(item.status===1){ |
| | | this.isDisabled=false |
| | | } |
| | | }) |
| | | this.setTableForm() |
| | | this.productTableList.tableData = res.data |
| | |
| | | data() { |
| | | // 产品信息 |
| | | const productColumn = [ |
| | | { label: "产品编号", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "name" }, |
| | | { label: "规格", prop: "specifications" }, |
| | | { label: "产品编号", prop: "productId", default: true }, |
| | | { label: "产品名称", prop: "productName" }, |
| | | { label: "规格", prop: "specs" }, |
| | | { label: "型号", prop: "modelNumber" }, |
| | | { label: "采购数量", prop: "amount" }, |
| | | { label: "已发货数量", prop: "sendAmount" }, |
| | |
| | | showCol: ["采购单号", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"], |
| | | tableBottomColumn: [], |
| | | showBottomCol: [], |
| | | TabsIndex: "0", |
| | | TabsIndex: 0, |
| | | productTableList: {}, |
| | | // 产品信息 |
| | | productColumn: productColumn, |
| | |
| | | this.pagerOptions.totalCount = res.data.total |
| | | if (res.data.total > 0) { |
| | | this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {} |
| | | this.tableRowClick(this.selectRow) |
| | | // this.tableRowClick(this.selectRow) |
| | | this.getProductInventoryInfo(this.selectRow) |
| | | } |
| | | } |
| | | }) |
| | |
| | | }) |
| | | } else if (this.TabsIndex == 1 && row.status == 1) { |
| | | this.productTableList.tableInfomation = [] |
| | | } else if(this.TabsIndex==1 && row.status==7||row.status==8){ |
| | | } else if(this.TabsIndex==1 && row.status==7||this.TabsIndex==1&&row.status==8){ |
| | | getPurchaseQualityInspectionInfo({ |
| | | purchaseNumber: row.number, |
| | | }).then((res)=>{ |