| | |
| | | <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-width="78px"> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleQuery"> 搜 索</el-button> |
| | | <el-button icon="el-icon-circle-close" @click="resetQuery">重 置</el-button> |
| | | <el-button type="primary" icon="el-icon-search" @click="set_ResCnz">重新同步</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-search" @click="set_ResCnz">重新同步</el-button> --> |
| | | </el-form-item> |
| | | <el-collapse v-model="activeSeach"> |
| | | <el-collapse-item title="更多" name="1"> |
| | |
| | | <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-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single" |
| | | @click="set_CheckBill(1, form = rowForm)">审核</el-button> |
| | | @click="set_CheckBill(0, form = rowForm)">审核</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single" |
| | | @click="set_CheckBill(2, form = rowForm)">返审核</el-button> |
| | | @click="set_CheckBill(1, form = rowForm)">返审核</el-button> |
| | | </el-col> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> |
| | |
| | | </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, }, |
| | | propHBeginAddrName:{}, |
| | | propHBeginHEndAddrName:{}, |
| | | propHCarTypeName:{}, |
| | | }, |
| | | data() { |
| | | return { |
| | | HModName: "Cg_ContractTransportBillMainList", |
| | |
| | | // 查询参数 |
| | | queryParams: { |
| | | HBillNo: '', |
| | | HBillno2:'', |
| | | HInitTimeCycle: 29, |
| | | HDeptID:'', |
| | | HBillno2: '', |
| | | HInitTimeCycle: 0, |
| | | HDeptID: '', |
| | | |
| | | HSourceBillNo:'', |
| | | Warehouse:'', |
| | | Hmaker:'', |
| | | HSourceBillNo: '', |
| | | Warehouse: '', |
| | | Hmaker: '', |
| | | ColName1: '', |
| | | ColName2: '', |
| | | ColName: '', |
| | |
| | | methods: { |
| | | //重新同步 |
| | | set_ResCnz(){ |
| | | axios.get(this.baseURL + "/Cg_POOrderBill/Resynchronize", { |
| | | axios.get(this.$baseUrl + "/Cg_POOrderBill/Resynchronize", { |
| | | params: { "HBillNo": '', "HBillType": 1117 } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.sTime + "'" |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + this.eTime + "'" |
| | | } |
| | | if (this.propHBeginAddrName) { |
| | | this.sWhere += " and 始发地 = '" + this.propHBeginAddrName + "'" |
| | | } |
| | | if (this.propHBeginHEndAddrName) { |
| | | this.sWhere += " and 目的地 = '" + this.propHBeginHEndAddrName + "'" |
| | | } |
| | | if (this.propHCarTypeName) { |
| | | this.sWhere += " and 运输方式 = '" + this.propHCarTypeName + "'" |
| | | } |
| | | console.log(this.sWhere) |
| | | if (this.pageSize == 0) { |
| | | this.pageSize = 50 |
| | | } |
| | | axios.get(this.baseURL + '/Cg_ContractTransportBillListController/get%EF%BB%BFList', { |
| | | axios.get(this.$baseUrl + '/Cg_ContractTransportBillListController/get%EF%BB%BFList', { |
| | | params: { |
| | | "sWhere": this.sWhere, |
| | | "user": sessionStorage["HUserName"], |
| | |
| | | //获取不需要显示的列(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; |
| | | } |
| | | } |
| | | //在列表左边添加勾选框 |
| | |
| | | }, |
| | | DisPlay_HideColumn(HModName, user, option, dataOption) { |
| | | this.totalNameList = [] |
| | | axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', { |
| | | axios.get(this.$baseUrl + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', { |
| | | params: { |
| | | "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 }) { |
| | | if (this.ids.includes(row.hmainid)) { |
| | | // 使用 HInterID 判断 |
| | | if (this.ids.includes(row.HInterID)) { |
| | | return { "background": "#ecf5ff" } |
| | | } |
| | | }, |
| | | //双击行 |
| | | handleDblclick(row, column, cell, event) { |
| | | this.OperationType = 3 |
| | | this.handleEdit() |
| | | if (this.openPage) { |
| | | this.$emit('deptEmitDb', row, 6) |
| | | } else { |
| | | this.handleEdit() |
| | | } |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | // this.rowForm = {} |
| | | this.ids = selection.map(item => item.hmainid) |
| | | this.ids = selection.map(item => item.HInterID) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | | if (!this.single) { |
| | |
| | | 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: '', |
| | |
| | | this.getList() |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | //Delete%EF%BB%BFBill |
| | | handleDelete() { |
| | | console.log("删除", this.rowForm.HInterID.toString()) |
| | | this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => { |
| | | axios.get(this.baseURL + "/Cg_ContractTransportBillListController/Delete%EF%BB%BFBill", { |
| | | params: { 'HInterID': this.rowForm.hmainid.toString() } |
| | | axios.get(this.$baseUrl + "/Cg_ContractTransportBillListController/Delete%EF%BB%BFBill", { |
| | | params: { 'HInterID': this.rowForm.HInterID.toString(), 'user': sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.getList() |
| | |
| | | }, |
| | | // 反审核/审核数据 |
| | | set_CheckBill(num, form) { |
| | | var InterID = form.hmainid || form.HInterID |
| | | var InterID = this.rowForm.HInterID.toString() |
| | | //逻辑审核方法 |
| | | axios.get(this.baseURL + "/Cg_ContractTransportBillEdit/AuditCg_ContractTransportBillEdit", { |
| | | params: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] } |
| | | axios.get(this.$baseUrl + "/Cg_ContractTransportBillEdit/AuditCg_ContractTransportBillEdit", { |
| | | params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | | if (result.count == 1) { |
| | |
| | | } else if (this.rowForm.状态 != "已审核" && !this.defaintOperationByCompanyName()) { |
| | | this.$modal.msgError("打印失败!原因:单据状态不为'已审核'状态!!"); |
| | | } else { |
| | | axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", { |
| | | axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", { |
| | | params: { "HInterID": this.rowForm.hmainid } |
| | | }).then(response => { |
| | | var result = response.data |
| | |
| | | //#region 获取公司名,根据公司进行定制化开发 |
| | | defaintOperationByCompanyName() { |
| | | var result = false; |
| | | axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => { |
| | | axios.get(this.$baseUrl + '/Xt_getInfo/getCompanyName').then(response => { |
| | | var data1 = response.data |
| | | if (data1.count == 1) { |
| | | if (data1.data == "水务") { |