| | |
| | | <template> |
| | | <div style="padding: 10px"> |
| | | <div style="padding: 10px; position: relative"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | |
| | | class="searchBox" |
| | | > |
| | | <el-row> |
| | | <el-form-item label="仓位代码" prop="HNumber"> |
| | | <el-form-item label="仓位代码" prop="HNumber" style="padding-left: 100px"> |
| | | <el-input |
| | | v-model="queryParams.HNumber" |
| | | placeholder="请输入仓位代码" |
| | |
| | | @keyup.enter.native="handleQuery" |
| | | class="ForFilteringSchemes" |
| | | /> |
| | | </el-form-item><el-form-item label="仓库名称" prop="HWHName"> |
| | | <el-input |
| | | v-model="queryParams.HWHName" |
| | | placeholder="请输入仓库名称" |
| | | @keyup.enter.native="handleQuery" |
| | | class="ForFilteringSchemes" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="组织"> |
| | | <el-select |
| | | v-model="queryParams.HOrgName" |
| | | v-model="queryParams.HOrgID" |
| | | placeholder="请选择" |
| | | class="ForFilteringSchemes" |
| | | > |
| | |
| | | v-for="(item, index) in organizationList" |
| | | :key="index" |
| | | :label="item.Name" |
| | | :value="item.Name" |
| | | :value="item.ID.toString()" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"><span>过滤</span></div> |
| | | <div> |
| | | <el-form-item label-width="0"> |
| | | <el-row> |
| | | <el-row> |
| | | <el-form-item label-width="0"> |
| | | <el-col :span="7"> |
| | | <el-select |
| | | v-model="queryParams.ColName1" |
| | |
| | | class="ForFilteringSchemes" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item label-width="0"> |
| | | <el-row> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form-item label-width="0"> |
| | | <el-col :span="7"> |
| | | <el-select |
| | | v-model="queryParams.ColName2" |
| | |
| | | class="ForFilteringSchemes" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item label-width="0"> |
| | | <el-row> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form-item label-width="0"> |
| | | <el-col :span="7"> |
| | | <el-select |
| | | v-model="queryParams.ColName" |
| | |
| | | class="ForFilteringSchemes" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | </el-row> |
| | | </div> |
| | | </el-card> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="get_PrintReport" |
| | | id="btn-printer" |
| | | >库位码打印</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | >隐藏列设置</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-col :span="1.5" class="zy-hidden"> |
| | | <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch" |
| | | >搜 索</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-col :span="1.5" class="zy-hidden"> |
| | | <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >重 置</el-button |
| | | > |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3))" |
| | | v-else-if="column.property == '单据号'" |
| | | >{{ row.单据号 }}</el-button |
| | | @click.stop="handleEdit(row, (OperationType = 3))" |
| | | v-else-if="column.property == '仓位代码'" |
| | | >{{ row.仓位代码 }}</el-button |
| | | > |
| | | <span v-else>{{ row[column.label] }}</span> |
| | | </div> |
| | |
| | | append-to-body |
| | | class="xsckdBox" |
| | | :before-close="close" |
| | | @close="beforeEditCloseHandler" |
| | | > |
| | | <edit |
| | | :OperationType="OperationType" |
| | |
| | | :copyType="copyType" |
| | | @editCloseGy="editGyClose" |
| | | v-if="editShow" |
| | | ref="editRef" |
| | | /> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | <el-dialog |
| | | title="打印模板选择" |
| | | :visible.sync="openPrintList" |
| | | width="800px" |
| | | append-to-body |
| | | > |
| | | <PrintList |
| | | :linterid="encodeURI(rowSel.toString())" |
| | | :MyMsg="rowSel.toString()" |
| | | Type="HGyStockPlaceBarCode" |
| | | HModName="HGyStockPlaceBarCode" |
| | | @rowEditClose="rowSetClose" |
| | | v-if="printListShow" |
| | | /> |
| | | <!-- <div>111</div> --> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import RowSettings from "@/views/component/rowSettings"; |
| | | import Edit from "@/views/basic/gyStockPlace/gyStockPlaceEdit"; |
| | | import GyStockPlace from "@/views/basic/gyStockPlace/gyStockPlace"; |
| | | import PrintList from "@/views/component/printList"; |
| | | |
| | | export default { |
| | | name: "GyStockPlace", |
| | | components: { RowSettings, Edit, GyStockPlace }, |
| | | components: { RowSettings, Edit, GyStockPlace, PrintList }, |
| | | props: { |
| | | openPage: { type: String }, |
| | | }, |
| | | data() { |
| | | return { |
| | | HModName: "Gy_Warehouse", |
| | | rowSel: [], |
| | | danganSelList: [], |
| | | editRef: null, |
| | | activeSeach: "", |
| | | HModName: "Gy_StockPlace", |
| | | editShow: false, |
| | | openEdit: false, |
| | | totalNameList: [], |
| | |
| | | openData: false, //数据弹窗 |
| | | dialogTitle: "", |
| | | zuzhiId: "", |
| | | organizationList: [], //组织列表 |
| | | organizationList: JSON.parse(sessionStorage["organizationList"]), //组织列表 |
| | | subDisabled: false, //编辑页面保存按钮是否禁用(true禁用,false可用) |
| | | OperationType: null, //保存类型(新增1修改3) |
| | | HInterID: null, |
| | | baseURL: "http://localhost:81/API/", |
| | | user: "admin", |
| | | baseURL: process.env.VUE_APP_BASE_API, |
| | | currentRow: [], |
| | | lastSelectedRowIndex: null, // 用于记录上次点击的行索引 |
| | | lastSelectedRow: null, // 上一次选中的行 |
| | |
| | | dateRange: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | HOrgID: null, |
| | | HOrgID: sessionStorage["OrganizationID"], |
| | | HName: null, |
| | | HNumber: null, |
| | | Comparator1: "", |
| | |
| | | btResList: [], |
| | | tableData: [], //销售出库列表(分页显示) |
| | | dataList: [], |
| | | titleData: ["HItemID", "HParentID"], //不需要显示的字段 可扩展 |
| | | titleData: ["HItemID", "HParentID", "选择"], //不需要显示的字段 可扩展 |
| | | pageSizes: [50, 100, 500, 5000, 50000], |
| | | page: 1, |
| | | pageSize: 50, |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.fetchData(); |
| | | this.handleQuery(); |
| | | this.riqiChange(); |
| | | }, |
| | | methods: { |
| | | beforeEditCloseHandler() { |
| | | this.$refs.editRef.close(); |
| | | }, |
| | | // 仓位同步(API中暂时没有对应的API) |
| | | async handleSync() { |
| | | try { |
| | |
| | | } |
| | | } catch (err) { |
| | | this.$modal.msgError(`接口请求失败: ${err}`); |
| | | } |
| | | }, |
| | | get_PrintReport() { |
| | | if (this.danganSelList.length == 0) { |
| | | this.$modal.msgError("请选择数据"); |
| | | } else { |
| | | this.rowSel = []; |
| | | for (var i = 0; i < this.danganSelList.length; i++) { |
| | | this.rowSel.push(`'${this.danganSelList[i]['条码编号'].toString()}'`); |
| | | } |
| | | this.printListShow = true; |
| | | this.openPrintList = true; |
| | | // axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", { |
| | | // params: { HInterID: this.rowForm.hmainid }, |
| | | // }) |
| | | // .then((response) => { |
| | | // var result = response.data; |
| | | // if (result.count == 1) { |
| | | // this.printListShow = true; |
| | | // this.openPrintList = true; |
| | | // } else { |
| | | // this.$modal.msgError(result.code + result.Message); |
| | | // } |
| | | // }) |
| | | // .catch((error) => { |
| | | // this.$modal.msgError("接口请求失败!"); |
| | | // }); |
| | | } |
| | | }, |
| | | getSummaries(param) { |
| | |
| | | this.dbEmitData(this.deptform, this.dialogTypeNum); |
| | | this.deptform = {}; |
| | | }, |
| | | fetchData() { |
| | | //登录用户信息 |
| | | axios |
| | | .get( |
| | | "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038" |
| | | ) |
| | | .then((response) => { |
| | | let data = response.data.data[0]; |
| | | this.zuzhiId = data.HUSEORGID; //根据登录用户获取默认的组织ID |
| | | this.queryParams.HOrgID = data.HUSEORGID; |
| | | |
| | | this.user = data.Czymc; |
| | | axios |
| | | .get(this.baseURL + "/Web/GetOrganizations", {}) |
| | | .then((response) => { |
| | | if (response.data.count == 1) { |
| | | this.organizationList = response.data.data; //组织列表 |
| | | this.queryParams.HOrgName = response.data.data.find( |
| | | (e) => e.ID == data.HUSEORGID |
| | | )?.Name; |
| | | } |
| | | this.getList(); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | getList() { |
| | | this.tableShow = false; |
| | | this.loading = true; |
| | |
| | | this.sWhere += ""; |
| | | //仓位列表 |
| | | axios |
| | | .get(this.baseURL + "/Gy_StockPlace/list1page", { |
| | | .get(this.baseURL + "/Gy_StockPlace/list2Page", { |
| | | params: { |
| | | sWhere: `${this.sWhere}`, |
| | | user: this.user, |
| | | Organization: "浙江智云迈思", |
| | | user: sessionStorage["HUserName"], |
| | | page: this.page, |
| | | size: this.pageSize, |
| | | }, |
| | |
| | | } |
| | | } |
| | | option.data = result; |
| | | this.DisPlay_HideColumn(this.HModName, this.user, option, this.dataList); |
| | | this.DisPlay_HideColumn( |
| | | this.HModName, |
| | | sessionStorage["HUserName"], |
| | | option, |
| | | this.dataList |
| | | ); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | |
| | | this.selectedRow = row; // 记录当前选中的行 |
| | | this.lastSelectedRowIndex = this.tableData.indexOf(row); |
| | | this.$refs.tableData.toggleRowSelection(row); |
| | | if (this.openPage) { |
| | | this.$emit("deptEmit", row, 9); |
| | | } |
| | | }, |
| | | //选中行高亮样式 |
| | | rowStyle({ row, rowIndex }) { |
| | |
| | | //双击行 |
| | | handleDblclick(row, column, cell, event) { |
| | | this.OperationType = 3; |
| | | this.handleEdit(); |
| | | if (this.openPage) { |
| | | this.$emit("deptEmitDb", row, 9); |
| | | } else { |
| | | this.handleEdit(row); |
| | | } |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | console.log(selection) |
| | | this.danganSelList = selection; |
| | | |
| | | // this.rowForm = {} |
| | | this.ids = selection.map((item) => item.HItemID); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | if (!this.single) { |
| | | if (this.openPage) { |
| | | //列表单选 |
| | | if (selection.length > 1) { |
| | | const del_row = selection.shift(); |
| | | this.$refs.tableData.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | | } |
| | | this.rowForm = {}; |
| | | this.ids = selection.map((item) => item.HItemID); |
| | | this.rowForm = selection[0]; |
| | | } else { |
| | | //多选 |
| | | this.ids = selection.map((item) => item.HItemID); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | if (!this.single) { |
| | | this.rowForm = selection[0]; |
| | | } |
| | | } |
| | | }, |
| | | //打开侧边搜索弹窗 |
| | |
| | | if (this.queryParams.HName) { |
| | | this.sWhere += " and 仓位名称 like '%" + this.queryParams.HName + "%'"; |
| | | } |
| | | if (this.queryParams.HOrgName) { |
| | | this.sWhere += " and 组织名称 = '" + this.queryParams.HOrgName + "'"; |
| | | if (this.queryParams.HWHName) { |
| | | this.sWhere += " and 仓库名称 like '%" + this.queryParams.HWHName + "%'"; |
| | | } |
| | | if (this.queryParams.HOrgID) { |
| | | let OrgName = this.organizationList.find((e) => e.ID == this.queryParams.HOrgID) |
| | | ?.Name; |
| | | this.sWhere += " and 组织名称 = '" + OrgName + "'"; |
| | | } |
| | | // this.sWhere += this.addSWhereByOpenType() |
| | | // this.sWhere += this.getOrgIDByUser() |
| | |
| | | .get(this.baseURL + "/Xt_User/getOrgIDListByUser", { |
| | | params: { |
| | | HModName: this.HModName, |
| | | user: this.user, |
| | | user: sessionStorage["HUserName"], |
| | | HOrgID: this.zuzhiId, |
| | | }, |
| | | }) |
| | |
| | | this.queryParams = { |
| | | HNumber: "", |
| | | HName: "", |
| | | HWHName: "", |
| | | HBillNo: "", |
| | | HInitTimeCycle: 29, |
| | | HProjectNumber: "", |
| | |
| | | }); |
| | | }, |
| | | //打开修改组件弹窗 |
| | | handleEdit() { |
| | | handleEdit(row) { |
| | | this.rowForm = row; |
| | | this.$nextTick(() => { |
| | | this.openEdit = true; |
| | | this.editShow = true; |
| | |
| | | if (!this.rowForm.审核人) { |
| | | axios |
| | | .get(this.baseURL + "Deltet_Gy_StockPlace", { |
| | | params: { HItemID: this.rowForm.HItemID.toString(), user: this.user }, |
| | | params: { |
| | | HItemID: this.rowForm.HItemID.toString(), |
| | | user: sessionStorage["HUserName"], |
| | | }, |
| | | }) |
| | | .then((response) => { |
| | | if (response.data.count == 1) { |
| | |
| | | } |
| | | } |
| | | var sSubStr = JSON.stringify(num); |
| | | var sMainSub = sSubStr + "&和" + this.user; |
| | | var sMainSub = sSubStr + "&和" + sessionStorage["HUserName"]; |
| | | axios({ |
| | | method: "post", |
| | | url: this.baseURL + "/Gy_Warehouse/Gy_Process_Excel", |
| | |
| | | flex-direction: row; |
| | | width: 60%; |
| | | } |
| | | .zy-hidden { |
| | | display: none; |
| | | } |
| | | </style> |