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