| | |
| | | <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 { |
| | |
| | | } |
| | | }) |
| | | if(pipeline){ |
| | | await savePurchaseProductConfirm(arr).then((res)=>{ |
| | | await savePurchaseProductConfirm(this.productTableList.tableData).then((res)=>{ |
| | | if(res.code===200){ |
| | | this.editConfig.visible=false |
| | | this.$parent.getData() |
| | |
| | | } |
| | | }, |
| | | // 全部合格入库 |
| | | 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() { |