| | |
| | | <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" @pagination="handleQuery" /> |
| | | <!-- 列设置 --> |
| | | <el-dialog title="隐藏列设置" :visible.sync="openRowHide" width="816px" append-to-body> |
| | | <RowSettings :colName="btResList" HModName="Kf_POStockInBillList" @rowEditClose="rowSetClose" |
| | | <RowSettings :colName="btResList" HModName="Gy_BarCodeBillList" @rowEditClose="rowSetClose" |
| | | v-if="rowHideShow" /> |
| | | </el-dialog> |
| | | <!-- 打印 --> |
| | |
| | | |
| | | //#region 快速过滤 |
| | | handleQuery() { |
| | | var params = this.get_UrlVars(); |
| | | var HSourceInterID = params[params[1]]; |
| | | var HSourceEntryID = params[params[2]]; |
| | | var HSEQ = params[params[3]]; |
| | | this.sWhere = '' |
| | | if (this.queryParams.ColName && this.queryParams.Comparator) { |
| | | var com = ""; |
| | |
| | | if (this.queryParams.HMaterName) { |
| | | this.sWhere += " and 物料名称 like ''%" + this.queryParams.HMaterName + "%''"; |
| | | } |
| | | if(HSEQ!=''&&HSEQ!=null){ |
| | | this.sWhere += " and 源单行号 = ''" + HSEQ + "''"; |
| | | } |
| | | if(HSourceInterID!=''&&HSourceInterID!=null){ |
| | | this.sWhere += " and HSourceInterID = ''" + HSourceInterID + "''"; |
| | | } |
| | | if(HSourceEntryID!=''&&HSourceEntryID!=null){ |
| | | this.sWhere += " and HSourceEntryID = ''" + HSourceEntryID + "''"; |
| | | } |
| | | if (this.queryParams.HOrgID) { |
| | | this.sWhere += " and HStockOrgID = ''" + this.queryParams.HOrgID + "''"; |
| | | } |
| | | if(sessionStorage["HMainSourceBillNo"] &&sessionStorage["HMainSourceBillNo"].length>0){ |
| | | this.sWhere += " and 源单单号 like ''%" + sessionStorage["HMainSourceBillNo"] + "%''"; |
| | | } |
| | | if (sessionStorage["HSourceBillSEQ"] &&sessionStorage["HSourceBillSEQ"].length>0) { |
| | | this.sWhere += " and 源单行号 = ''" + sessionStorage["HSourceBillSEQ"] + "''"; |
| | | } |
| | | //如果是自动登录,则只能查看供应商自己的条码。 |
| | | if (sessionStorage["HAutoLogin"] == "1") { |
| | |
| | | let HModName = "Gy_BarCodeBillList" |
| | | this.DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, this.dataList); |
| | | } |
| | | else{ |
| | | if(data1.list){ |
| | | this.btResList = data1.list //列表表头数据 |
| | | this.total = data1.count; |
| | | var data = [];//列字段数据 |
| | | var col = []; |
| | | var totalArray = []; |
| | | //给空的数组赋值 |
| | | for (var key in data1.list) {//循序遍历数组 |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//从每个对象中提取数据 |
| | | } |
| | | //在列表左边添加勾选框 |
| | | col.push({ type: 'checkbox', fixed: 'left', totalRowText: '合计' }); |
| | | for (var i = 0; i < data.length; i++) {//遍历data数组重的数据 |
| | | if (this.titleData.indexOf(data[i].name) > -1) {//检查data【i】.name是否在数组中 //计算列 |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列 |
| | | } else if (totalArray.indexOf(data[i].name) > -1 || (data[i].Type == "Decimal" || data[i].Type == "Int32")) { //计算列 |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 }); |
| | | } |
| | | else { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | option.cols = [col] |
| | | this.dataList = option |
| | | option.data = data1.data; |
| | | var result = data1.data; |
| | | option.data = result; |
| | | this.checkDataList = []; |
| | | let HModName = "Gy_BarCodeBillList" |
| | | this.DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, this.dataList); |
| | | } |
| | | else{ |
| | | this.tableShow = true |
| | | this.loading = false |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | |
| | | |
| | | //#endregion |
| | | |
| | | //#region 获取参数 |
| | | get_UrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | }, |
| | | //#endregion |
| | | //#region 删除 |
| | | handleDrop() { |
| | | }, |