修复 单据超链接打开编辑页面关闭后 单据错误选中的问题
收料通知单 发货通知单 单据编辑 子表物料 f7打开页面修改为iframe方式打开物料模块
| | |
| | | name: 'IframeGyWarehouse', |
| | | meta: { title: '仓库列表', noCache: true, noLoading: true } |
| | | }, |
| | | |
| | | { |
| | | path: 'GyMaterial', |
| | | component: () => import("@/views/gyMaterial/GyMaterial"), // 物料 |
| | | name: 'IframeGyMaterial', |
| | | meta: { title: '物料列表', noCache: true, noLoading: true } |
| | | }, |
| | | ] |
| | | }, // 客户 |
| | | { |
| | |
| | | close() { |
| | | this.reset(); |
| | | if (window.self != window.top) { |
| | | window.parent.editGyClose; |
| | | // iframe页面 |
| | | window.parent.editGyClose(); |
| | | } else if (!this.OperationType2 && !this.copyType) { |
| | | // this.$router.back() |
| | | window.close(); |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3))" |
| | | @click.stop="handleEdit(row, (OperationType = 3))" |
| | | v-else-if="column.property == '单据号'" |
| | | >{{ row.单据号 }}</el-button |
| | | > |
| | |
| | | @editCloseGy="editGyClose" |
| | | v-if="editShow" |
| | | /> --> |
| | | <div style="height: 80vh" v-if="openEdit"> |
| | | <div style="height: 70vh" v-if="openEdit"> |
| | | <iframe :src="iframeUrl" width="100%" height="100%" frameborder="0"></iframe> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3))" |
| | | @click.stop="handleEdit(row, (OperationType = 3))" |
| | | v-else-if="column.property == '职员代码'" |
| | | >{{ row.职员代码 }}</el-button |
| | | > |
| | |
| | | if (this.openPage) { |
| | | this.$emit("deptEmitDb", row, 4); |
| | | } else { |
| | | this.handleEdit(); |
| | | this.handleEdit(row); |
| | | } |
| | | }, |
| | | // 多选框选中数据 |
| | |
| | | }); |
| | | }, |
| | | //打开修改组件弹窗 |
| | | handleEdit() { |
| | | handleEdit(row) { |
| | | this.rowForm = row |
| | | this.$nextTick(() => { |
| | | this.openEdit = true; |
| | | this.editShow = true; |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3))" |
| | | @click.stop="handleEdit(row, (OperationType = 3))" |
| | | v-else-if="column.property == '仓位代码'" |
| | | >{{ row.仓位代码 }}</el-button |
| | | > |
| | |
| | | if (this.openPage) { |
| | | this.$emit("deptEmitDb", row, 9); |
| | | } else { |
| | | this.handleEdit(); |
| | | this.handleEdit(row); |
| | | } |
| | | }, |
| | | // 多选框选中数据 |
| | |
| | | }); |
| | | }, |
| | | //打开修改组件弹窗 |
| | | handleEdit() { |
| | | handleEdit(row) { |
| | | this.rowForm = row |
| | | this.$nextTick(() => { |
| | | this.openEdit = true; |
| | | this.editShow = true; |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3))" |
| | | @click.stop="handleEdit(row, (OperationType = 3))" |
| | | v-else-if="column.property == '仓库代码'" |
| | | >{{ row.仓库代码 }}</el-button |
| | | > |
| | |
| | | if (this.openPage) { |
| | | this.$emit("deptEmitDb", row, 2); |
| | | } else { |
| | | this.handleEdit(); |
| | | this.handleEdit(row); |
| | | } |
| | | }, |
| | | // 多选框选中数据 |
| | |
| | | }); |
| | | }, |
| | | //打开修改组件弹窗 |
| | | handleEdit() { |
| | | handleEdit(row) { |
| | | this.rowForm = row |
| | | this.$nextTick(() => { |
| | | this.openEdit = true; |
| | | this.editShow = true; |
| | |
| | | }, |
| | | |
| | | // 物料代码点击 |
| | | handleMaterialCodeClick(row) { |
| | | handleMaterialCodeClick(row) { |
| | | this.selectedRow = row; |
| | | this.OperationType = 3; |
| | | this.currentEditId = row.HItemID; |
| | |
| | | |
| | | |
| | | handleRowClick(row, column, event) { |
| | | if (this.checkIsIframe()) { |
| | | // 将当前选中的数据暴露到window中 |
| | | window.selectedRow = row; |
| | | } |
| | | this.$refs.tableData.toggleRowSelection(row); |
| | | this.selectedRow = row; |
| | | this.getFileList(row.物料代码); |
| | |
| | | |
| | | // 双击行 |
| | | handleDblclick(row, column, cell, event) { |
| | | if (this.checkIsIframe()) { |
| | | // IFrame 双击 返回当前双击的数据 |
| | | window.parent.iFrameMaterialCallback(row); |
| | | return; |
| | | } |
| | | this.handleMaterialCodeClick(row); |
| | | }, |
| | | |
| | |
| | | |
| | | getDefaultFilterScheme() { |
| | | this.currentFilterScheme = "当前过滤方案:默认方案"; |
| | | } |
| | | }, |
| | | checkIsIframe() { |
| | | if (window.self == window.top) { |
| | | return false; |
| | | } |
| | | return true; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | v-else-if="column.property == '单据号'" |
| | | >{{ row.单据号 }}</el-button |
| | | > |
| | |
| | | @editCloseGy="editGyClose" |
| | | v-if="editShow" |
| | | /> --> |
| | | <div style="height: 80vh" v-if="openEdit"> |
| | | <div style="height: 70vh" v-if="openEdit"> |
| | | <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | <template> |
| | | <div v-loading="formLoading" v-if="formShow" style="padding: 20px"> |
| | | <div style="margin-bottom: 10px; border-bottom: 1px solid #f6f6f6"> |
| | | <el-button type="primary" @click="handleAdd((OperationType = 1))" v-if="addBtnShow" |
| | | <!-- <el-button type="primary" @click="handleAdd((OperationType = 1))" v-if="addBtnShow" |
| | | >新增</el-button |
| | | > |
| | | <el-button type="primary" @click="submitForm" :disabled="subDisabled" |
| | | >保 存</el-button |
| | | > |
| | | <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button> |
| | | <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button> --> |
| | | <el-button type="primary" @click="close">退 出</el-button> |
| | | <!-- <el-button @click="cancel">取 消</el-button> --> |
| | | </div> |
| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单据号" prop="HBillNo"> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据编号" /> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据编号" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="供应商" prop="HSupName"> |
| | | <el-input v-model="form.HSupName" placeholder="请选择供应商" disabled> |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openDataDialog(1)" |
| | | ></el-button> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="币别" prop="HCurName"> |
| | | <el-input v-model="form.HCurName" placeholder="请输入联系电话"> |
| | | <el-input v-model="form.HCurName" placeholder="请选择币别" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="仓库" prop="HWHName"> |
| | | <el-input v-model="form.HWHName" placeholder="请选择仓库"> |
| | | <el-input v-model="form.HWHName" placeholder="请选择仓库" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | <span>{{ scope.row.HMoney }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="收料仓库" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row['收料仓库'] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="税率" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HTaxRate }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="价税合计" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HTaxMoney }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="备注" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HRemark" placeholder="请输入备注" /> |
| | |
| | | width="1280px" |
| | | append-to-body |
| | | > |
| | | <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" /> |
| | | <!-- <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" /> |
| | | <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" /> |
| | | <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" /> |
| | | <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" /> --> |
| | | <div style="height: 70vh" v-if="openData"> |
| | | <iframe |
| | | :src="iframeUrl" |
| | | frameborder="0" |
| | | width="100%" |
| | | height="100%" |
| | | ref="iframeInstance" |
| | | ></iframe> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="deptClickSub">确 定</el-button> |
| | | <el-button @click="deptClose">取 消</el-button> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogEnabledNum: -1, |
| | | iframeUrl: "", |
| | | iframeInstance: null, |
| | | OperationType2: 1, |
| | | HInterID2: 0, |
| | | CopyType2: 1, |
| | |
| | | // this.fetchData(); |
| | | this.getdata(); |
| | | }, |
| | | mounted() { |
| | | window.iFrameMaterialCallback = (data) => { |
| | | this.iFrameMaterialCallback(data); // 组件内的方法绑定到windows |
| | | }; |
| | | }, |
| | | beforeDestroy() { |
| | | if (window.parent) { |
| | | delete window.iFrameMaterialCallback; |
| | | if (window.parent != window.top) { |
| | | // 通过IFrame打开 |
| | | } else { |
| | | this.$destroy(); |
| | | } |
| | | }, |
| | | methods: { |
| | | iFrameMaterialCallback(data) { |
| | | // 物料列表返回监听函数 |
| | | console.log("iFrameMaterialCallbackData: ", data); |
| | | this.editData[this.zbIndex].HMaterID = data.HItemID; |
| | | this.editData[this.zbIndex].物料代码 = data.物料代码; |
| | | this.editData[this.zbIndex].物料名称 = data.物料名称; |
| | | this.editData[this.zbIndex].HUnitID = data.HUnitID; |
| | | this.editData[this.zbIndex].规格型号 = data.规格型号; |
| | | this.editData[this.zbIndex].计量单位 = data.计量单位名称; |
| | | this.editData[this.zbIndex].HTaxPrice = data.含税成本价; |
| | | this.editData[this.zbIndex].HTaxRate = data.默认税率; |
| | | this.deptClose(); |
| | | }, |
| | | fetchData() { |
| | | axios |
| | | .get(this.baseURL + "/Web/GetOrganizations", {}) |
| | |
| | | HMoney: dataArray[i].金额.toFixed(2), |
| | | HTaxMoney: dataArray[i].价税合计.toFixed(2), |
| | | HWHID: dataArray[i].HWHID, |
| | | 发货仓库: dataArray[i].HWHName, |
| | | 收料仓库: dataArray[i].HWHName, |
| | | HRemark: "", |
| | | HQty_Full: "0", |
| | | HQty_Empty: "0", |
| | |
| | | this.openData = false; |
| | | } else if (num == 2) { |
| | | this.editData[this.zbIndex].HWHID = deptRow.HItemID; |
| | | this.editData[this.zbIndex].发货仓库 = deptRow.仓库名称; |
| | | this.editData[this.zbIndex].收料仓库 = deptRow.仓库名称; |
| | | this.openData = false; |
| | | } else if (num == 3) { |
| | | this.editData[this.zbIndex].HMaterID = deptRow.HItemID; |
| | |
| | | this.deptform = deptRow; |
| | | }, |
| | | deptClickSub() { |
| | | this.dbEmitData(this.deptform, this.dialogTypeNum); |
| | | this.deptform = {}; |
| | | // this.dbEmitData(this.deptform, this.dialogTypeNum); |
| | | // this.deptform = {}; |
| | | let selectedRow = this.$refs.iframeInstance.contentWindow.selectedRow; |
| | | console.log(selectedRow); |
| | | if (this.dialogEnabledNum == 3) { |
| | | // 修改选中物料对应子表数据 |
| | | |
| | | this.editData[this.zbIndex].HMaterID = selectedRow.HItemID; |
| | | this.editData[this.zbIndex].物料代码 = selectedRow.物料代码; |
| | | this.editData[this.zbIndex].物料名称 = selectedRow.物料名称; |
| | | this.editData[this.zbIndex].HUnitID = selectedRow.HUnitID; |
| | | this.editData[this.zbIndex].规格型号 = selectedRow.规格型号; |
| | | this.editData[this.zbIndex].计量单位 = selectedRow.计量单位名称; |
| | | this.editData[this.zbIndex].HTaxPrice = selectedRow.含税成本价; |
| | | this.editData[this.zbIndex].HTaxRate = selectedRow.默认税率; |
| | | } |
| | | |
| | | selectedRow = null; // 手动置空,方便GC回收,防止泄露 |
| | | this.deptClose(); |
| | | }, |
| | | deptClose() { |
| | | this.deptform = {}; |
| | |
| | | HMoney: 0, |
| | | HTaxMoney: 0, |
| | | HWHID: 0, |
| | | 发货仓库: "", |
| | | 收料仓库: "", |
| | | HRemark: "", |
| | | HQty_Full: 0, |
| | | HQty_Empty: 0, |
| | |
| | | if (valid) { |
| | | let fhck = false; |
| | | this.editData.map((item, index) => { |
| | | if (!item.发货仓库) { |
| | | if (!item.收料仓库) { |
| | | fhck = true; |
| | | this.$modal.msgError("第" + (index + 1) + "行:发货仓库未选择!"); |
| | | this.$modal.msgError("第" + (index + 1) + "行:收料仓库未选择!"); |
| | | } |
| | | }); |
| | | this.$nextTick(() => { |
| | |
| | | }, |
| | | // 打开数据列表弹窗 |
| | | openDataDialog(num, row) { |
| | | this.dialogEnabledNum = num; |
| | | if (row) { |
| | | this.zbIndex = row.index - 1; |
| | | } |
| | |
| | | this.openData = true; |
| | | } else if (num == 3) { |
| | | this.dialogTitle = "物料列表"; |
| | | this.iframeUrl = `/iframe/GyMaterial?openType=2`; |
| | | this.materialShow = true; |
| | | this.openData = true; |
| | | } |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | v-else-if="column.property == '单据号'" |
| | | >{{ row.单据号 }}</el-button |
| | | > |
| | |
| | | class="xsckdBox" |
| | | :before-close="close" |
| | | > |
| | | <div style="height: 80vh" v-if="openEdit"> |
| | | <div style="height: 70vh" v-if="openEdit"> |
| | | <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openDataDialog(1)" |
| | | ></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="仓库" prop="HWHName"> |
| | | <el-input v-model="form.HWHName" placeholder="请选择仓库"> |
| | | <el-input v-model="form.HWHName" placeholder="请选择仓库" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="客户" prop="HCusName"> |
| | | <el-input v-model="form.HCusName" placeholder="请选择客户"> |
| | | <el-input v-model="form.HCusName" placeholder="请选择客户" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="备注" prop="HRemark"> |
| | | <el-input v-model="form.HRemark" placeholder=""> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目代码" prop="HProjectNumber"> |
| | | <el-input v-model="form.HProjectNumber" placeholder="请选择项目代码"> |
| | | <el-input v-model="form.HProjectNumber" placeholder="请选择项目代码" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | v-else-if="column.property == '单据号'" |
| | | >{{ row.单据号 }}</el-button |
| | | > |
| | |
| | | @editCloseGy="editGyClose" |
| | | v-if="editShow" |
| | | /> --> |
| | | <div style="height: 80vh"> |
| | | <div style="height: 70vh"> |
| | | <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | >编辑</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-edit" |
| | |
| | | @click="set_CheckBill(2, (form = rowForm))" |
| | | >反审核</el-button |
| | | > |
| | | </el-col> |
| | | </el-col> --> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | |
| | | >反禁用</el-button |
| | | > |
| | | </el-col> --> |
| | | <el-col :span="1.5"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-edit" |
| | |
| | | @click="set_DropBill(2, (form = rowForm))" |
| | | >反作废</el-button |
| | | > |
| | | </el-col> |
| | | </el-col> --> |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | >隐藏列设置</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch" |
| | | >搜 索</el-button |
| | | > |
| | |
| | | <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >重 置</el-button |
| | | > |
| | | </el-col> |
| | | </el-col> --> |
| | | <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> --> |
| | | </el-row> |
| | | <div class="tableBox" v-loading="loading"> |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | v-else-if="column.property == '单据号'" |
| | | >{{ row.单据号 }}</el-button |
| | | > |
| | |
| | | @editCloseGy="editGyClose" |
| | | v-if="editShow" |
| | | /> --> |
| | | <div style="height: 80vh"> |
| | | <div style="height: 70vh" v-if="openEdit"> |
| | | <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | <el-button type="primary" @click="handleAdd((OperationType = 1))" v-if="addBtnShow" |
| | | >新增</el-button |
| | | > |
| | | <el-button type="primary" @click="submitForm" :disabled="subDisabled" |
| | | <!-- <el-button type="primary" @click="submitForm" :disabled="subDisabled" |
| | | >保 存</el-button |
| | | > |
| | | <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button> |
| | | <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button> --> |
| | | <el-button type="primary" @click="close">退 出</el-button> |
| | | <!-- <el-button @click="cancel">取 消</el-button> --> |
| | | </div> |
| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单据编号" prop="HBillNo"> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据编号" /> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据编号" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="仓库" prop="HWHName"> |
| | | <el-input v-model="form.HWHName" placeholder="请选择仓库" disabled> |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openDataDialog(1)" |
| | | ></el-button> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-input v-model="form.HLinkPhone" placeholder="请输入联系电话" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="备注" prop="HRemark"> |
| | | <el-input v-model="form.HRemark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目代码" prop="HProjectNumber"> |
| | | <el-input v-model="form.HProjectNumber" placeholder="请选择项目代码"> |
| | | <el-input |
| | | v-model="form.HProjectNumber" |
| | | placeholder="请选择项目代码" |
| | | disabled |
| | | > |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目名称" prop="HProjectName"> |
| | | <el-form-item label="项目名称" prop="HProjectName" class="zy-hidden"> |
| | | <el-input v-model="form.HProjectName" disabled> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | ></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="当前库存" width="120"> |
| | | <el-table-column align="center" label="当前库存" width="120" v-if="false"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HInventoryQty }}</span> |
| | | </template> |
| | |
| | | width="1280px" |
| | | append-to-body |
| | | > |
| | | <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" /> |
| | | <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" /> |
| | | <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" /> |
| | | <div style="height: 70vh" v-if="openData"> |
| | | <iframe |
| | | :src="iframeUrl" |
| | | frameborder="0" |
| | | width="100%" |
| | | height="100%" |
| | | ref="iframeInstance" |
| | | ></iframe> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="deptClickSub">确 定</el-button> |
| | | <el-button @click="deptClose">取 消</el-button> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogEnabledNum: -1, |
| | | iframeUrl: "", |
| | | iframeInstance: null, |
| | | OperationType2: 1, |
| | | HInterID2: 0, |
| | | CopyType2: 1, |
| | |
| | | this.getdata(); |
| | | this.getHSourceBillType(); |
| | | }, |
| | | mounted() { |
| | | window.iFrameMaterialCallback = (data) => { |
| | | this.iFrameMaterialCallback(data); // 组件内的方法绑定到windows |
| | | }; |
| | | }, |
| | | beforeDestroy() { |
| | | delete window.iFrameMaterialCallback; |
| | | if (window.parent) { |
| | | console.log(window.parent); |
| | | } else { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | iFrameMaterialCallback(data) { |
| | | // 物料列表返回监听函数 |
| | | console.log("iFrameMaterialCallbackData: ", data); |
| | | this.editData[this.zbIndex].HMaterID = data.HItemID; |
| | | this.editData[this.zbIndex].物料代码 = data.物料代码; |
| | | this.editData[this.zbIndex].物料名称 = data.物料名称; |
| | | this.editData[this.zbIndex].HUnitID = data.HUnitID; |
| | | this.editData[this.zbIndex].规格型号 = data.规格型号; |
| | | this.editData[this.zbIndex].计量单位 = data.计量单位名称; |
| | | this.editData[this.zbIndex].HTaxPrice = data.含税成本价; |
| | | this.editData[this.zbIndex].HTaxRate = data.默认税率; |
| | | this.deptClose(); |
| | | }, |
| | | getHSourceBillType() { |
| | | axios |
| | | .get(`${this.baseURL}/Web/GetHSourceBillType`, { |
| | |
| | | this.deptform = deptRow; |
| | | }, |
| | | deptClickSub() { |
| | | this.dbEmitData(this.deptform, this.dialogTypeNum); |
| | | this.deptform = {}; |
| | | // this.dbEmitData(this.deptform, this.dialogTypeNum); |
| | | // this.deptform = {}; |
| | | let selectedRow = this.$refs.iframeInstance.contentWindow.selectedRow; |
| | | console.log(selectedRow); |
| | | if (this.dialogEnabledNum == 3) { |
| | | // 修改选中物料对应子表数据 |
| | | |
| | | this.editData[this.zbIndex].HMaterID = selectedRow.HItemID; |
| | | this.editData[this.zbIndex].物料代码 = selectedRow.物料代码; |
| | | this.editData[this.zbIndex].物料名称 = selectedRow.物料名称; |
| | | this.editData[this.zbIndex].HUnitID = selectedRow.HUnitID; |
| | | this.editData[this.zbIndex].规格型号 = selectedRow.规格型号; |
| | | this.editData[this.zbIndex].计量单位 = selectedRow.计量单位名称; |
| | | this.editData[this.zbIndex].HTaxPrice = selectedRow.含税成本价; |
| | | this.editData[this.zbIndex].HTaxRate = selectedRow.默认税率; |
| | | } |
| | | |
| | | selectedRow = null; // 手动置空,方便GC回收,防止泄露 |
| | | this.deptClose(); |
| | | }, |
| | | deptClose() { |
| | | this.deptform = {}; |
| | |
| | | }, |
| | | // 打开数据列表弹窗 |
| | | openDataDialog(num, row) { |
| | | this.dialogEnabledNum = num; |
| | | if (row) { |
| | | this.zbIndex = row.index - 1; |
| | | } |
| | |
| | | this.openData = true; |
| | | } else if (num == 3) { |
| | | this.dialogTitle = "物料列表"; |
| | | this.iframeUrl = `/iframe/GyMaterial?openType=2`; |
| | | this.materialShow = true; |
| | | this.openData = true; |
| | | } |
| | |
| | | .xsckdBox .el-date-editor.el-input { |
| | | width: 100%; |
| | | } |
| | | |
| | | .zy-hidden { |
| | | display: none; |
| | | } |
| | | </style> |
| | |
| | | }}</span> |
| | | <el-button |
| | | type="text" |
| | | @click="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))" |
| | | v-else-if="column.property == '单据号'" |
| | | >{{ row.单据号 }}</el-button |
| | | > |
| | |
| | | @editCloseGy="editGyClose" |
| | | v-if="editShow" |
| | | /> --> |
| | | <div style="height: 80vh"> |
| | | <div style="height: 70vh" v-if="openEdit"> |
| | | <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe> |
| | | </div> |
| | | </el-dialog> |