| | |
| | | <template> |
| | | <div style="padding: 10px;"> |
| | | <div style="padding: 10px; position: relative;"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="78px" class="searchBox"> |
| | | <el-form-item label="开始日期" style="margin-left: 100px;"> |
| | | <el-date-picker v-model="sTime" type="date" placeholder="开始日期" style="width: 150px;"> |
| | |
| | | <el-form-item label="部门" prop="HDeptID"> |
| | | <el-input v-model="queryParams.HDeptID" placeholder="请输入" @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | |
| | | |
| | | <div slot="header" class="clearfix"><span>过滤</span></div> |
| | | <div> |
| | | <el-row> |
| | |
| | | </el-table-column> |
| | | </template> |
| | | </el-table> |
| | | <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" @pagination="getList" /> |
| | | <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" |
| | | @pagination="getList" /> |
| | | <el-dialog title="隐藏列设置" :visible.sync="openRowHide" width="816px" append-to-body> |
| | | <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" |
| | | v-if="rowHideShow" /> |
| | | <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" /> |
| | | </el-dialog> |
| | | <!-- 编辑 --> |
| | | <el-dialog title="编辑" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close"> |
| | | <edit :OperationType=OperationType :linterid=this.rowForm.hmainid||this.rowForm.HInterID :HSouceBillType=this.rowForm.HSourceBillType |
| | | :copyType="copyType" @editClose="editClose" v-if="editShow" /> |
| | | <edit :OperationType=OperationType :linterid=this.rowForm.HInterID||this.rowForm.hmainid |
| | | :HSouceBillType=this.rowForm.HSourceBillType :copyType="copyType" @editClose="editClose" v-if="editShow" /> |
| | | </el-dialog> |
| | | <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body> |
| | | <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName' |
| | | :HModName='HModName' @rowEditClose="rowSetClose" v-if="printListShow" /> |
| | | <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName' :HModName='HModName' |
| | | @rowEditClose="rowSetClose" v-if="printListShow" /> |
| | | <!-- <div>111</div> --> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | export default { |
| | | name: 'Cg_ContractTransportBillMainList', |
| | | components: { RowSettings, Edit, PrintList }, |
| | | props: { |
| | | openPage: { type: String, }, |
| | | }, |
| | | data() { |
| | | return { |
| | | HModName: "Cg_ContractTransportBillMainList", |
| | |
| | | // 查询参数 |
| | | queryParams: { |
| | | HBillNo: '', |
| | | HBillno2:'', |
| | | HBillno2: '', |
| | | HInitTimeCycle: 29, |
| | | HDeptID:'', |
| | | HDeptID: '', |
| | | |
| | | HSourceBillNo:'', |
| | | Warehouse:'', |
| | | Hmaker:'', |
| | | HSourceBillNo: '', |
| | | Warehouse: '', |
| | | Hmaker: '', |
| | | ColName1: '', |
| | | ColName2: '', |
| | | ColName: '', |
| | |
| | | //获取不需要显示的列(H开头的列不显示) |
| | | var patrn = new RegExp(/^h/i); |
| | | if (patrn.test(data1.list[key].ColmCols)) { |
| | | this.titleData[key] = data1.list[key].ColmCols; |
| | | this.titleData[key] = data1.list[key].ColmCols; |
| | | } |
| | | } |
| | | //在列表左边添加勾选框 |
| | |
| | | "HModName": HModName, |
| | | "user": user, |
| | | }, |
| | | }).then(res => { |
| | | }).then(res => { |
| | | let data1 = res.data |
| | | if (data1.data.length != 0) { |
| | | if (data1.data.length != 0) { |
| | | var dataCol = [];//数据库查询出的列数据 |
| | | var newCols = [[]];//对应数据库列顺序col |
| | | newCols[0].push(option.cols[0][0]);//放入第一个checkbox |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | //列设置列数与页面列数是否一致 |
| | | if (dataCol.length == option.cols[0].length - 1) { |
| | | if (dataCol.length == option.cols[0].length - 1) { |
| | | //遍历寻找列设置对应列按顺序插入 |
| | | for (var j = 0; j < option.cols[0].length - 1; j++) { |
| | | for (var i = 0; i < option.cols[0].length - 1; i++) { |
| | |
| | | this.selectedRow = row; // 记录当前选中的行 |
| | | this.lastSelectedRowIndex = this.tableData.indexOf(row); |
| | | this.$refs.tableData.toggleRowSelection(row); |
| | | if (this.openPage) { |
| | | this.$emit('deptEmit', row, 16) |
| | | } |
| | | }, |
| | | //选中行高亮样式 |
| | | rowStyle({ row, rowIndex }) { |
| | |
| | | //双击行 |
| | | handleDblclick(row, column, cell, event) { |
| | | this.OperationType = 3 |
| | | this.handleEdit() |
| | | if (this.openPage) { |
| | | this.$emit('deptEmitDb', row, 6) |
| | | } else { |
| | | this.handleEdit() |
| | | } |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | |
| | | this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'"; |
| | | } |
| | | if (this.queryParams.HDeptID) { |
| | | this.sWhere += " and 部门 like '%" + this.queryParams.HDeptID + "%'"; |
| | | this.sWhere += " and 部门 like '%" + this.queryParams.HDeptID + "%'"; |
| | | } |
| | | console.log("danjuhao1",this.queryParams.HBillNo) |
| | | console.log("danjuhao1", this.queryParams.HBillNo) |
| | | this.getList() |
| | | }, |
| | | /** 重置按钮操作 */ |
| | |
| | | this.queryParams = { |
| | | HBillNo: '', |
| | | HInitTimeCycle: 29, |
| | | HDeptID:'', |
| | | HSourceBillNo:'', |
| | | HDeptID: '', |
| | | HSourceBillNo: '', |
| | | |
| | | Hmaker:'', |
| | | Hmaker: '', |
| | | ColName1: '', |
| | | ColName2: '', |
| | | ColName: '', |