| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="销售员" prop="HEmpName"> |
| | | <el-input v-model="form.HEmpName" placeholder="请输入销售员" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" /> |
| | | <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" /> |
| | | <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" /> |
| | | <GyEmployee @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyEmployeeShow" /> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="deptClickSub">确 定</el-button> |
| | | <el-button @click="deptClose">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="隐藏列设置" :visible.sync="openRowHide" width="816px" append-to-body> |
| | | <RowSettings :colName="btResList" HModName="Kf_SellOutBillList" @rowEditClose="rowSetClose" v-if="rowHideShow" /> |
| | | <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import Warehouse from '@/views/component/warehouse' |
| | | import Material from '@/views/component/material' |
| | | import RowSettings from '@/views/component/rowSettings' |
| | | import GyEmployee from '@/views/basic/gyEmployee/gyEmployee.vue' |
| | | import moment from 'moment'; |
| | | |
| | | export default { |
| | | name: 'SellOutBill', |
| | | components: { Dept, Warehouse, Material, RowSettings }, |
| | | name: 'SellOutBillEdit', |
| | | components: { Dept, Warehouse, Material, RowSettings, GyEmployee }, |
| | | props: { |
| | | OperationType: { type: Number, }, |
| | | linterid: { type: Number, }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | HModName: "Kf_SellOutBill", |
| | | formShow: false, |
| | | temp: undefined, |
| | | formLoading: true, |
| | |
| | | deptShow: false,//部门数据组件 |
| | | warehouseShow: false,//仓库数据组件 |
| | | materialShow: false,//物料数据组件 |
| | | gyEmployeeShow: false,//销售员数据组件 |
| | | deptform: {},//弹窗选中数据 |
| | | openData: false,//数据弹窗 |
| | | dialogTitle: '', |
| | |
| | | //部门弹窗赋值 |
| | | dbEmitData(deptRow, num) { |
| | | // num=1部门 num=2出库仓库 |
| | | if (num == 1) { |
| | | this.form.HDeptName = deptRow.部门名称 |
| | | this.form.HDeptID = deptRow.HItemID |
| | | this.form.HEmpID = deptRow.HEmpID |
| | | this.form.HManagerName = deptRow.负责人 |
| | | this.openData = false |
| | | } else if (num == 2) { |
| | | this.editData[this.zbIndex].HWHID = deptRow.HItemID; |
| | | this.editData[this.zbIndex].发货仓库 = deptRow.仓库名称; |
| | | this.openData = false |
| | | console.log(deptRow) |
| | | if (deptRow.HItemID) { |
| | | if (num == 1) { |
| | | this.form.HDeptName = deptRow.部门名称 |
| | | this.form.HDeptID = deptRow.HItemID |
| | | this.form.HManagerName = deptRow.负责人 |
| | | this.deptShow = false |
| | | this.openData = false |
| | | } else if (num == 2) { |
| | | this.editData[this.zbIndex].HWHID = deptRow.HItemID; |
| | | this.editData[this.zbIndex].发货仓库 = deptRow.仓库名称; |
| | | this.warehouseShow = false |
| | | this.openData = false |
| | | } else if (num == 3) { |
| | | this.editData[this.zbIndex].HMaterID = deptRow.HItemID; |
| | | this.editData[this.zbIndex].物料代码 = deptRow.物料代码; |
| | | this.editData[this.zbIndex].物料名称 = deptRow.物料名称; |
| | | this.editData[this.zbIndex].HUnitID = deptRow.HUnitID; |
| | | this.editData[this.zbIndex].规格型号 = deptRow.规格型号 |
| | | this.editData[this.zbIndex].计量单位 = deptRow.计量单位名称 |
| | | this.editData[this.zbIndex].HTaxPrice = deptRow.含税成本价 |
| | | this.editData[this.zbIndex].HTaxRate = deptRow.默认税率 |
| | | this.materialShow = false |
| | | this.openData = false |
| | | } else if (num == 4) { |
| | | this.form.HEmpName = deptRow.职员名称 |
| | | this.form.HEmpID = deptRow.HItemID |
| | | this.gyEmployeeShow = false |
| | | this.openData = false |
| | | } |
| | | } else { |
| | | this.$modal.msgError("请选择单条数据!"); |
| | | } |
| | | else if (num == 3) { |
| | | this.editData[this.zbIndex].HMaterID = deptRow.HItemID; |
| | | this.editData[this.zbIndex].物料代码 = deptRow.物料代码; |
| | | this.editData[this.zbIndex].物料名称 = deptRow.物料名称; |
| | | this.editData[this.zbIndex].HUnitID = deptRow.HUnitID; |
| | | this.editData[this.zbIndex].规格型号 = deptRow.规格型号 |
| | | this.editData[this.zbIndex].计量单位 = deptRow.计量单位名称 |
| | | this.editData[this.zbIndex].HTaxPrice = deptRow.含税成本价 |
| | | this.editData[this.zbIndex].HTaxRate = deptRow.默认税率 |
| | | this.openData = false |
| | | } |
| | | |
| | | }, |
| | | emitData(deptRow, num) { |
| | | this.dialogTypeNum = num |
| | |
| | | this.reset() |
| | | |
| | | if (!this.OperationType && !this.copyType) { |
| | | // this.$router.back() |
| | | window.close() |
| | | const obj = { path: "/sell/sellOut/sellOutBillEdit", name: "SellOutBillEdit" }; |
| | | this.$tab.closePage(obj); |
| | | } else { |
| | | this.formShow = false |
| | | this.$emit('editClose', false) |
| | |
| | | this.deptShow = false |
| | | this.warehouseShow = false |
| | | this.materialShow = false |
| | | this.gyEmployeeShow = false |
| | | }, |
| | | // 打开数据列表弹窗 |
| | | openDataDialog(num, row) { |
| | | //num1部门,2出库仓库,3物料,4销售员 |
| | | if (row) { |
| | | this.zbIndex = row.index - 1 |
| | | } |
| | |
| | | this.dialogTitle = '物料列表' |
| | | this.materialShow = true |
| | | this.openData = true |
| | | } else if (num == 4) { |
| | | this.dialogTitle = '销售员列表' |
| | | this.gyEmployeeShow = true |
| | | this.openData = true |
| | | } |
| | | }, |
| | | } |