| | |
| | | <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> |