| | |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchDelete(0)">批量作废 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchDelete(1)">批量反作废 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchLosingBar(0)">条码实物丢失批量标记 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchLosingBar(1)">条码实物丢失批量反标记 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | if (this.queryParams.HBarCode) { |
| | | this.sWhere += " and 条码编号 like ''%" + this.queryParams.HBarCode + "%''"; |
| | | } |
| | | if (this.queryParams.HSupName) { |
| | | if (this.queryParams.HSourceBillNo) { |
| | | this.sWhere += " and 源单单号 like ''%" + this.queryParams.HSourceBillNo + "%''"; |
| | | } |
| | | if (this.queryParams.HMaterNumber) { |
| | |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 批量作废 |
| | | handleBatchDelete(num) { |
| | | if (this.checkDataList.length == 0) { |
| | | this.$modal.msgError("请选择数据"); |
| | | } |
| | | else if(this.checkDataList.length >100){ |
| | | this.$modal.msgError("选择数据不可大于100条!"); |
| | | } |
| | | else { |
| | | var HInterIDListStr = ""; |
| | | for(var i=0;i<this.checkDataList.length;i++){ |
| | | if(i==this.checkDataList.length-1){ |
| | | HInterIDListStr += this.checkDataList[i].hmainid.toString(); |
| | | }else{ |
| | | HInterIDListStr += this.checkDataList[i].hmainid.toString() + ","; |
| | | } |
| | | } |
| | | // 列表查询 |
| | | axios.get(this.$baseUrl + '/Gy_BarCodeBillList/DeleteBatchGy_BarCodeBillList', { |
| | | params: { |
| | | "HInterID": HInterIDListStr, |
| | | "IsAudit": num, |
| | | "CurUserName": sessionStorage["HUserName"], |
| | | }, |
| | | }).then(response => { |
| | | let data1 = response.data |
| | | if (data1.count == 1) { |
| | | this.handleQuery(); |
| | | }else{ |
| | | this.$modal.msgError(data1.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 条码实物丢失批量 标记/反标记 |
| | | handleBatchLosingBar(num) { |
| | | if (this.checkDataList.length == 0) { |
| | | this.$modal.msgError("请选择数据"); |
| | | } |
| | | else if(this.checkDataList.length >100){ |
| | | this.$modal.msgError("选择数据不可大于100条!"); |
| | | } |
| | | else { |
| | | var HInterIDListStr = ""; |
| | | for(var i=0;i<this.checkDataList.length;i++){ |
| | | if(num == 0 && this.checkDataList[i]["条码状态"]!="正常"){ |
| | | this.$message.error('条码【' + this.checkDataList[i]["条码编号"] + "】:当前条码的条码状态不为【正常】,标记失败!!"); |
| | | return; |
| | | }else if(num == 1 && this.checkDataList[i]["条码状态"]!="条码实物丢失"){ |
| | | this.$message.error('条码【' + this.checkDataList[i]["条码编号"] + "】:当前条码的条码状态不为【条码实物丢失】,反标记失败!!"); |
| | | return; |
| | | } |
| | | |
| | | if(i==this.checkDataList.length-1){ |
| | | HInterIDListStr += this.checkDataList[i].hmainid.toString(); |
| | | }else{ |
| | | HInterIDListStr += this.checkDataList[i].hmainid.toString() + ","; |
| | | } |
| | | } |
| | | |
| | | try{ |
| | | var sql = ""; |
| | | if(num == 0){ |
| | | sql = "update Gy_BarCodeBill set HBarCodeStatus = '条码实物丢失' where HItemID in (" + HInterIDListStr + ") select * from Gy_BarCodeBill where HItemID in (" + HInterIDListStr + ")"; |
| | | }else if(num == 1){ |
| | | sql = "update Gy_BarCodeBill set HBarCodeStatus = '正常' where HItemID in (" + HInterIDListStr + ") select * from Gy_BarCodeBill where HItemID in (" + HInterIDListStr + ")"; |
| | | } |
| | | |
| | | var ModRightNameCheck = ""; |
| | | axios.get(this.$baseUrl + "/CommonModel/searchMethod", { |
| | | params: { |
| | | "sql": sql |
| | | , "user": sessionStorage["HUserName"] |
| | | , "ModRightNameCheck": ModRightNameCheck |
| | | } |
| | | }).then(response => { |
| | | var data1 = response.data |
| | | if (data1.count == 1) { |
| | | if(data1.data.length>0){ |
| | | this.$message.error('操作成功!!'); |
| | | this.handleQuery(); |
| | | }else{ |
| | | this.$message.error('操作失败!!未查询到条码记录!!'); |
| | | } |
| | | } |
| | | else { |
| | | this.$message.error('操作失败!!' + data1.Message ); |
| | | } |
| | | }); |
| | | }catch(error){ |
| | | this.$message.error('接口请求失败!!' + error ); |
| | | } |
| | | } |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 列设置 |
| | | handleRowHide() { |
| | | this.rowHideShow = true |