| | |
| | | <template> |
| | | <div v-loading="formLoading" v-if="formShow"> |
| | | <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;"> |
| | | <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="close">退 出</el-button> |
| | | <!-- <el-button @click="cancel">取 消</el-button> --> |
| | | </div> |
| | | <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">器具档案编辑</div> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="140px"> |
| | | <el-tabs v-model="activeName" type="card"> |
| | | <el-tab-pane label="基本信息" name="first"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单据编号" prop="HBillNo"> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据编号" /> |
| | | <el-form-item label="单据号" prop="HBillNo"> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="日期" prop="HDate"> |
| | | <el-date-picker v-model="form.HDate" type="date" placeholder="选择日期" value-format="yyyy-MM-ddT"> |
| | | <el-date-picker v-model="form.HDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="源单类型" prop="BillType"> |
| | | <el-select v-model="form.BillType" placeholder="请选择"> |
| | | <el-option label="销售订单" value="1401" /> |
| | | <el-option label="发货通知单" value="1402" /> |
| | | <el-form-item label="货主类型" prop="HMouldOWNER"> |
| | | <el-select v-model="form.HMouldOWNER" placeholder="请选择"> |
| | | <el-option label="自费" value="自费" /> |
| | | <el-option label="客供" value="客供" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="源单号" prop="HMainSourceBillNo"> |
| | | <el-input v-model="form.HMainSourceBillNo" placeholder="请输入源单号" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | <el-form-item label="器具编号" prop="HMouldNo"> |
| | | <el-input v-model="form.HMouldNo" placeholder="请输入器具编号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <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" @click="openDataDialog(4)"></el-button> |
| | | <el-form-item label="器具名称" prop="HName"> |
| | | <el-input v-model="form.HName" placeholder="请输入器具名称" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="器具规格" prop="HModel"> |
| | | <el-input v-model="form.HModel" placeholder="请输入器具规格" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="器具型号" prop="HModel2"> |
| | | <el-input v-model="form.HModel2" placeholder="请输入器具型号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="直径" prop="HDiameter"> |
| | | <el-input v-model="form.HDiameter" placeholder="请输入直径" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="辅助属性" prop="HSubjoin"> |
| | | <el-input v-model="form.HSubjoin" placeholder="请输入辅助属性" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="辅助属性2" prop="HSubjoin2"> |
| | | <el-input v-model="form.HSubjoin2" placeholder="请输入辅助属性2" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="图号" prop="HPICNo"> |
| | | <el-input v-model="form.HPICNo" placeholder="请输入图号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="生产产品型号" prop="HWorkMaterModel"> |
| | | <el-input v-model="form.HWorkMaterModel" placeholder="请输入生产产品型号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="对应ERP物料" prop="HMaterNumber"> |
| | | <el-input v-model="form.HMaterNumber" placeholder="请输入对应ERP物料" disabled> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(3)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="销售部门" prop="HDeptName"> |
| | | <el-input v-model="form.HDeptName" placeholder="请输入销售部门" disabled> |
| | | <el-form-item label="器具分类" prop="HMouleTypeName"> |
| | | <el-input v-model="form.HMouleTypeName" 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="HUnitName"> |
| | | <el-input v-model="form.HUnitName" 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="HOutComDate"> |
| | | <el-date-picker v-model="form.HOutComDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="出厂编号" prop="HOutComNo"> |
| | | <el-input v-model="form.HOutComNo" placeholder="请输入出厂编号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="使用部门" prop="HDeptName"> |
| | | <el-input v-model="form.HDeptName" placeholder="请输入使用部门" disabled> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(1)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="主管" prop="HManagerName"> |
| | | <el-input v-model="form.HManagerName" placeholder="请输入主管" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | <el-form-item label="供应商" prop="HSupName"> |
| | | <el-input v-model="form.HSupName" placeholder="请输入供应商" disabled> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(6)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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"></el-button> |
| | | <el-form-item label="器具状态" prop="HMouldStatus"> |
| | | <el-select v-model="form.HMouldStatus" placeholder="请选择"> |
| | | <el-option label="在库" value="在库" /> |
| | | <el-option label="上机" value="上机" /> |
| | | <el-option label="出库" value="出库" /> |
| | | <el-option label="在途" value="在途" /> |
| | | <el-option label="丢失" value="丢失" /> |
| | | <el-option label="锁定" value="锁定" /> |
| | | <el-option label="领出" value="领出" /> |
| | | <el-option label="报废" value="报废" /> |
| | | <el-option label="未启用" value="未启用" /> |
| | | <el-option label="作废" value="作废" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="安全寿命" prop="HSaveLife"> |
| | | <el-input v-model="form.HSaveLife" placeholder="请输入安全寿命" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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(2, ckType = 1)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="版本号" prop="HVersion"> |
| | | <el-input v-model="form.HVersion" placeholder="请输入版本号" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="默认仓位" prop="HSPName"> |
| | | <el-input v-model="form.HSPName" placeholder="请输入默认仓位" disabled> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(9, cwType = 1)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系人" prop="HLinkMan"> |
| | | <el-input v-model="form.HLinkMan" placeholder="请输入联系人" disabled /> |
| | | <el-form-item label="设计寿命" prop="HDesignLife"> |
| | | <el-input v-model="form.HDesignLife" placeholder="请输入设计寿命" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系电话" prop="HLinkPhone"> |
| | | <el-input v-model="form.HLinkPhone" placeholder="请输入联系电话" disabled /> |
| | | <el-form-item label="使用寿命" prop="HUseLife"> |
| | | <el-input v-model="form.HUseLife" placeholder="请输入使用寿命" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="领料人" prop="HSecManagerName"> |
| | | <el-input v-model="form.HSecManagerName" placeholder="请输入领料人"> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | <el-form-item label="剩余寿命" prop="HLeaveLife"> |
| | | <el-input v-model="form.HLeaveLife" placeholder="请输入剩余寿命" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="仓管" prop="HKeeperName"> |
| | | <el-input v-model="form.HKeeperName" placeholder="请输入仓管"> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | <el-form-item label="已生产数量" prop="HProdQty"> |
| | | <el-input v-model="form.HProdQty" placeholder="请输入已生产数量" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="备注" prop="HRemark"> |
| | | <el-input v-model="form.HRemark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目代码" prop="HProjectNumber"> |
| | | <el-input v-model="form.HProjectNumber" placeholder="请输入项目代码" disabled> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | |
| | | </el-input> |
| | | <el-form-item label="已生产重量" prop="HProdWeight"> |
| | | <el-input v-model="form.HProdWeight" placeholder="请输入已生产重量" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目名称" prop="HProjectName"> |
| | | <el-input v-model="form.HProjectName" placeholder="请输入项目名称" disabled /> |
| | | <el-form-item label="穴数" prop="HCaveQty"> |
| | | <el-input v-model="form.HCaveQty" placeholder="请输入穴数" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="班组" prop="HGroupName"> |
| | | <el-input v-model="form.HGroupName" placeholder="请输入班组" disabled> |
| | | <el-form-item label="默认保养规程" prop="HMouldMaintainRuleInterName"> |
| | | <el-input v-model="form.HMouldMaintainRuleInterName" 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="HWHName"> |
| | | <el-input v-model="form.HWHName" placeholder="请输入出库仓库"> |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | <el-form-item label="条码编号" prop="HBarCode"> |
| | | <el-input v-model="form.HBarCode" placeholder="请输入条码编号" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="其他信息" name="second"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="组织" prop="HOrgID"> |
| | | <el-select v-model="form.HOrgID" placeholder="请选择组织" @change="organizationChange" :disabled="zzSelDis"> |
| | | <el-form-item label="制造厂商" prop="HMadeSupName"> |
| | | <el-input v-model="form.HMadeSupName" 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="HNextMainDate"> |
| | | <el-date-picker v-model="form.HNextMainDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="器具类型" prop="HMouldClass"> |
| | | <el-select v-model="form.HMouldClass" placeholder="请选择"> |
| | | <el-option label="模具" value="模具" /> |
| | | <el-option label="工装" value="工装" /> |
| | | <el-option label="夹具" value="夹具" /> |
| | | <el-option label="刀具" value="刀具" /> |
| | | <el-option label="检具" value="检具" /> |
| | | <el-option label="周转器具" value="周转器具" /> |
| | | <el-option label="其他" value="其他" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="上线初始化寿命" prop="HInitLife"> |
| | | <el-input v-model="form.HInitLife" placeholder="请输入上线初始化寿命" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="当前仓库" prop="HNowWHName"> |
| | | <el-input v-model="form.HNowWHName" placeholder="请输入当前仓库" disabled> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2, ckType = 2)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="当前仓位" prop="HNowSPName"> |
| | | <el-input v-model="form.HNowSPName" placeholder="请输入当前仓库" disabled> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(9, cwType = 2)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="器具可用状态" prop="HMouldUseStatus"> |
| | | <el-select v-model="form.HMouldUseStatus" placeholder="请选择"> |
| | | <el-option label="正常" value="正常" /> |
| | | <el-option label="异常" value="异常" /> |
| | | <el-option label="保养" value="保养" /> |
| | | <el-option label="维修" value="维修" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="使用组织" prop="HCREATEORGID"> |
| | | <el-select v-model="form.HCREATEORGID" placeholder="请选择组织使用" @change="organizationChange" |
| | | :disabled="zzSelDis"> |
| | | <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="币别" prop="HCurName"> |
| | | <el-input v-model="form.HCurName" placeholder="请输入币别" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="汇率" prop="HExRate"> |
| | | <el-input v-model="form.HExRate" placeholder="请输入汇率" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="销售方式" prop="HSellSName"> |
| | | <el-input v-model="form.HSellSName" placeholder="请输入销售方式" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单价类型" prop="HPriceType"> |
| | | <el-select v-model="form.HPriceType" placeholder="请选择单价类型" @change="organizationChange"> |
| | | <el-option v-for="(item, index) in hPriceTypeList" :key="index" :label="item" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="客户余额" prop="HCusBalance"> |
| | | <el-input v-model="form.HCusBalance" placeholder="请输入客户余额" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="信用额度" prop="HCreditRating_Now"> |
| | | <el-input v-model="form.HCreditRating_Now" placeholder="请输入信用额度" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="可用额度" prop="HAvailableBalance"> |
| | | <el-input v-model="form.HAvailableBalance" placeholder="请输入可用额度" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="制单信息" name="third"> |
| | | <el-row> |
| | |
| | | </el-row> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <div style="margin-bottom: 10px;"> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb()" size="mini">增加一行</el-button> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb(zbIndex, 1)" |
| | | size="mini">插入一行</el-button> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleCopyZbRow" size="mini">复制一行</el-button> |
| | | <el-button type="success" plain icon="el-icon-arrow-up" @click="handleMoveRowUp(zbSelForm)" |
| | | size="mini">上移</el-button> |
| | | <el-button type="success" plain icon="el-icon-arrow-down" @click="handleMoveRowDown(zbSelForm)" |
| | | size="mini">下移</el-button> |
| | | </div> |
| | | <el-table :data="editData" style="width: 100%" height="300" width="100%" ref="zbTable" |
| | | @selection-change="handleTableZbEdit" :row-class-name="rowSysZbIndex" show-summary border> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column align="center" label="序号" type="index" width="80" /> |
| | | <el-table-column align="center" label="物料编码" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.物料代码" placeholder="请输入物料编码" @keyup.native.f7="openDataDialog(3, scope.row)" |
| | | @dblclick.native="openDataDialog(3, scope.row)" /> |
| | | </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.规格型号 }}</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"> |
| | | <el-input-number v-model="scope.row.HQty" :min="1" style="width: 90px;" |
| | | controls-position="right"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="单价" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.HPrice" :min="0" style="width: 90px;" |
| | | controls-position="right"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="含税单价" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HTaxPrice }}</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.HPrice * scope.row.HQty }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="价税合计" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HTaxPrice * scope.row.HQty }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="发货仓库" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.发货仓库" placeholder="请输入发货仓库" @keyup.native.f7="openDataDialog(2, scope.row)" |
| | | @dblclick.native="openDataDialog(2, scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="备注" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HRemark" placeholder="请输入备注" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="采购数量" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HReqBuyQty }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="申请出库数量" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HReqOutQty }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="当前库存" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HCurrentInventory }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="操作" width="55" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="danger" icon="el-icon-delete" size="mini" circle |
| | | @click="handleDeleteSysZb(scope.row)"></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-tabs type="border-card"> |
| | | <el-tab-pane label="子器具"> |
| | | <div style="margin-bottom: 10px;"> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb(type = 'edit')" |
| | | size="mini">增加一行</el-button> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleCopyZbRow(type = 'edit')" |
| | | size="mini">复制一行</el-button> |
| | | </div> |
| | | <el-table :data="editData" style="width: 100%" height="300" width="100%" ref="zbTable" |
| | | @selection-change="handleTableZbEdit" :row-class-name="rowSysZbIndex" show-summary border> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column align="center" label="序号" type="index" width="80" /> |
| | | <el-table-column align="center" label="子器具"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HMouldFileName" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="组装日期"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker v-model="scope.row.HUnionDate" type="date" placeholder="选择组装日期"> |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="备注"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HRemark" placeholder="请输入备注" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="danger" icon="el-icon-delete" size="mini" circle |
| | | @click="handleDeleteSysZb(scope.row)"></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="保养规程"> |
| | | <div style="margin-bottom: 10px;"> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb(type = 'maintain')" |
| | | size="mini">增加一行</el-button> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleCopyZbRow(type = 'maintain')" |
| | | size="mini">复制一行</el-button> |
| | | </div> |
| | | <el-table :data="maintainData" style="width: 100%" height="300" width="100%" ref="zbByTable" |
| | | @selection-change="handleTableZbByEdit" :row-class-name="rowSysZbByIndex" show-summary border> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column align="center" label="序号" type="index" width="80" /> |
| | | <el-table-column align="center" label="保养规程单据号"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.保养规程单据号" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="备注"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HRemark" placeholder="请输入备注" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="默认标记"> |
| | | <template slot-scope="scope"> |
| | | <el-checkbox v-model="scope.row.HStdFlag"></el-checkbox> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="danger" icon="el-icon-delete" size="mini" circle |
| | | @click="handleDeleteSysZbBy(scope.row)"></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="点检规程"> |
| | | <div style="margin-bottom: 10px;"> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb(type = 'dotCheck')" |
| | | size="mini">增加一行</el-button> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleCopyZbRow(type = 'dotCheck')" |
| | | size="mini">复制一行</el-button> |
| | | </div> |
| | | <el-table :data="dotCheckData" style="width: 100%" height="300" width="100%" ref="zbDjTable" |
| | | @selection-change="handleTableZbDjEdit" :row-class-name="rowSysZbDjIndex" show-summary border> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column align="center" label="序号" type="index" width="80" /> |
| | | <el-table-column align="center" label="点检规程单据号"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.点检规程单据号" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="备注"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HRemark" placeholder="请输入备注" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="默认标记"> |
| | | <template slot-scope="scope"> |
| | | <el-checkbox v-model="scope.row.HStdFlag"></el-checkbox> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="danger" icon="el-icon-delete" size="mini" circle |
| | | @click="handleDeleteSysZbDj(scope.row)"></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | |
| | | </el-form> |
| | | <!-- 部门弹窗 --> |
| | | <el-dialog :title="dialogTitle" :visible.sync="openData" 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" /> |
| | | <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="deptShow" /> |
| | | <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="warehouseShow" /> |
| | | <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="materialShow" /> |
| | | <GyEmployee @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyEmployeeShow" /> |
| | | <GySource @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySourceShow" /> |
| | | <GySupplier @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySupplierShow" /> |
| | | <GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" /> |
| | | <GyStockPlace @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyStockPlaceShow" /> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="deptClickSub">确 定</el-button> |
| | | <el-button @click="deptClose">取 消</el-button> |
| | |
| | | |
| | | <script> |
| | | import axios from 'axios' |
| | | import Dept from '@/views/component/dept' |
| | | import Warehouse from '@/views/component/warehouse' |
| | | import Material from '@/views/component/material' |
| | | import Dept from '@/views/basic/gy/gyDepartment.vue' |
| | | import Warehouse from '@/views/basic/gyWarehouse/gyWarehouse.vue' |
| | | import Material from '@/views/gyMaterial/GyMaterial.vue' |
| | | import RowSettings from '@/views/component/rowSettings' |
| | | import GyEmployee from '@/views/basic/gyEmployee/gyEmployee.vue' |
| | | import GySource from '@/views/basic/production/gySource.vue' |
| | | import GySupplier from '@/views/basic/gy/gySupplier.vue' |
| | | import GyCustomer from '@/views/GyCustomer' |
| | | import GyStockPlace from '@/views/basic/gyStockPlace/gyStockPlace.vue' |
| | | import moment from 'moment'; |
| | | |
| | | export default { |
| | | name: 'SellOutBillEdit', |
| | | components: { Dept, Warehouse, Material, RowSettings, GyEmployee }, |
| | | name: 'Gy_MouldFile', |
| | | components: { Dept, Warehouse, Material, RowSettings, GyEmployee, GySource, GySupplier, GyCustomer, GyStockPlace }, |
| | | props: { |
| | | OperationType: { type: Number, }, |
| | | linterid: { type: Number, }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | HModName: "Kf_SellOutBill", |
| | | HModName: "Gy_MouldFile", |
| | | ckType: null, |
| | | cwType: null, |
| | | formShow: false, |
| | | temp: undefined, |
| | | formLoading: true, |
| | |
| | | addBtnShow: false, |
| | | zbIndex: null, |
| | | zbSelForm: {},//子表选中数据 |
| | | zbByIndex: null, |
| | | zbBySelForm: {},//子表选中数据 |
| | | zbDjIndex: null, |
| | | zbDjSelForm: {},//子表选中数据 |
| | | dialogTypeNum: null,//部门弹窗1,仓库弹窗2 |
| | | deptShow: false,//部门数据组件 |
| | | warehouseShow: false,//仓库数据组件 |
| | | materialShow: false,//物料数据组件 |
| | | gyEmployeeShow: false,//销售员数据组件 |
| | | gySourceShow: false, |
| | | gySupplierShow: false, |
| | | gyCustomerShow: false, |
| | | gyStockPlaceShow: false, |
| | | deptform: {},//弹窗选中数据 |
| | | openData: false,//数据弹窗 |
| | | dialogTitle: '', |
| | | organizationList: [],//组织列表 |
| | | organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//组织列表 |
| | | subDisabled: false,//编辑页面保存按钮是否禁用(true禁用,false可用) |
| | | // OperationType: this.$route.query.OperationType,//保存类型(新增1修改3) |
| | | HInterID: null, |
| | | baseURL: process.env.VUE_APP_BASE_API, |
| | | checkedSysZb: [], |
| | | editData: [],//销售出库单子表 |
| | | checkedSysZbBy: [], |
| | | checkedSysZbDj: [], |
| | | editData: [],//子表 |
| | | maintainData: [], |
| | | dotCheckData: [], |
| | | editBtData: [],//子表表头 |
| | | activeName: 'first', |
| | | // 弹出层标题 |
| | |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | HSupName: [ |
| | | { required: true, message: "客户不能为空", trigger: "blur" } |
| | | ], |
| | | HDate: [ |
| | | { required: true, message: "日期不能为空", trigger: "blur" } |
| | | ], |
| | | HExRate: [ |
| | | { required: true, message: "汇率不能为空", trigger: "blur" } |
| | | ] |
| | | // HSupName: [ |
| | | // { required: true, message: "客户不能为空", trigger: "blur" } |
| | | // ], |
| | | // HDate: [ |
| | | // { required: true, message: "日期不能为空", trigger: "blur" } |
| | | // ], |
| | | // HExRate: [ |
| | | // { required: true, message: "汇率不能为空", trigger: "blur" } |
| | | // ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.fetchData() |
| | | this.getdata() |
| | | }, |
| | | methods: { |
| | | fetchData() { |
| | | axios.get(this.baseURL + "/Web/GetOrganizations", { |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.organizationList = response.data.data;//组织列表 |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | getdata() { |
| | | console.log(this.copyType, this.OperationType) |
| | | this.formShow = false |
| | |
| | | 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.仓库名称; |
| | | if (this.ckType == 1) { |
| | | this.form.HWHName = deptRow.仓库名称; |
| | | this.form.HWHID = deptRow.HItemID; |
| | | } else if (this.ckType == 2) { |
| | | this.form.HNowWHName = deptRow.仓库名称; |
| | | this.form.HNowWHID = deptRow.HItemID; |
| | | } |
| | | 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.form.HName = deptRow.物料名称; |
| | | this.form.HMaterNumber = deptRow.物料代码; |
| | | this.form.HMaterID = deptRow.HItemID; |
| | | 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 if (num == 5) { |
| | | this.form.HSourceName = deptRow.生产资源名称 |
| | | this.form.HSourceID = deptRow.HItemID |
| | | this.gySourceShow = false |
| | | this.openData = false |
| | | } else if (num == 6) { |
| | | this.form.HSupName = deptRow.供应商名称 |
| | | this.form.HSupID = deptRow.HItemID |
| | | this.gySupplierShow = false |
| | | this.openData = false |
| | | } else if (num == 7) { |
| | | console.log(deptRow) |
| | | this.form.HCusName = deptRow.客户名称 |
| | | this.form.HCusID = deptRow.HItemID |
| | | this.gyCustomerShow = false |
| | | this.openData = false |
| | | } else if (num == 9) { |
| | | if (this.cwType == 1) { |
| | | this.form.HSPName = deptRow.仓位名称; |
| | | this.form.HSPID = deptRow.HMainID; |
| | | } else if (this.cwType == 2) { |
| | | this.form.HNowSPName = deptRow.仓位名称; |
| | | this.form.HNowSPID = deptRow.HMainID; |
| | | } |
| | | this.gyStockPlaceShow = false |
| | | this.openData = false |
| | | } |
| | | } else { |
| | |
| | | this.openData = false |
| | | }, |
| | | |
| | | //销售出库单新增编辑表单初始化 |
| | | reset() { |
| | | this.form = { |
| | | BillType: '1402', |
| | | HBillNo: '', |
| | | HInterID: '', |
| | | HBillSubType: '1205', |
| | | HDate: new Date(), |
| | | HMainSourceInterID: 0, |
| | | HMainSourceEntryID: 0, |
| | | HMainSourceBillType: '', |
| | | HMainSourceBillNo: '', |
| | | HEmpName: '', |
| | | HEmpID: 0, |
| | | HDeptName: '', |
| | | HDeptID: 0, |
| | | HManagerName: '', |
| | | HManagerID: 0, |
| | | HSupName: sessionStorage["HSupName"], |
| | | HSupID: sessionStorage["HSupID"], |
| | | HLinkMan: '', |
| | | HLinkPhone: '', |
| | | HSecManagerName: '', |
| | | HSecManagerID: 0, |
| | | HKeeperName: '', |
| | | HKeeperID: 0, |
| | | HRemark: '', |
| | | HProjectNumber: '', |
| | | HProjectID: 0, |
| | | HProjectName: '', |
| | | HGroupName: '', |
| | | HGroupID: 0, |
| | | HWHName: '', |
| | | HWHID: 0, |
| | | HConveyCompName: '', |
| | | HConveyCompID: 0, |
| | | HConveyTypeName: '', |
| | | HConveyTypeID: 0, |
| | | HConveyMoney: '0', |
| | | HCarriage: '0', |
| | | HSTOCKORGID: sessionStorage["OrganizationID"] - 0,//组织id |
| | | HOWNERID: sessionStorage["OrganizationID"] - 0, |
| | | HSCWHName: '', |
| | | HSCWHID: 0, |
| | | HCheckStatusMan: '', |
| | | HExplanation: '', |
| | | HInnerBillNo: '', |
| | | HCurName: '人民币', |
| | | HCurID: 1, |
| | | HExRate: '1', |
| | | HSellSName: '', |
| | | HSellSID: 0, |
| | | HCusBalance: '0', |
| | | HCreditRating_Now: '0', |
| | | HAvailableBalance: '0', |
| | | HPriceType: '成本价', |
| | | HOrgID: sessionStorage["OrganizationID"] - 0, |
| | | HMaker: '', |
| | | HUpDater: '', |
| | | HChecker: '', |
| | | HMakeDate: new Date(), |
| | | HUpDateDate: '', |
| | | HCheckDate: '', |
| | | HCloseMan: '', |
| | | HDeleteMan: '', |
| | | HCloseDate: '', |
| | | HDeleteDate: '', |
| | | } |
| | | this.editData = [] |
| | | this.editBtData = [] |
| | | this.ids = [] |
| | | this.subDisabled = false |
| | | this.addBtnShow = false |
| | | // this.$refs.tableData.clearSelection() |
| | | this.activeName = 'first' |
| | | this.resetForm("form"); |
| | | }, |
| | | //退出 |
| | | close() { |
| | | this.reset() |
| | | console.log(1111) |
| | | console.log(this.$route.path) |
| | | if (!this.OperationType && !this.copyType) { |
| | | console.log(this.$route.path) |
| | |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | |
| | | //新增编辑表单初始化 |
| | | reset() { |
| | | this.form = { |
| | | HInterID: 0, |
| | | HBillNo: '', |
| | | HDate: moment(new Date()).format('YYYY-MM-DDTHH:mm:ss'), |
| | | HMouldOWNER: '', |
| | | HMouldNo: '', |
| | | HName: '', |
| | | HModel: '', |
| | | HModel2: '', |
| | | HDiameter: '', |
| | | HSubjoin: '', |
| | | HSubjoin2: '', |
| | | HPICNo: '', |
| | | HWorkMaterModel: '', |
| | | HMaterID: 0, |
| | | HMaterNumber: '', |
| | | HMouleTypeID: 0, |
| | | HMouleTypeName: '', |
| | | HUnitID: 0, |
| | | HUnitName: '', |
| | | HOutComDate: moment(new Date()).format('YYYY-MM-DDTHH:mm:ss'), |
| | | HOutComNo: '', |
| | | HDeptID: 0, |
| | | HDeptName: '', |
| | | HSupID: 0, |
| | | HSupName: '', |
| | | HMouldStatus: '', |
| | | HSaveLife: 0, |
| | | HWHID: 0, |
| | | HWHName: '', |
| | | HVersion: '', |
| | | HSPID: 0, |
| | | HSPName: '', |
| | | HDesignLife: 0, |
| | | HUseLife: 0, |
| | | HLeaveLife: 0, |
| | | HInitLife: 0, |
| | | HCaveQty: 0, |
| | | HProdQty: 0, |
| | | HProdWeight: 0, |
| | | HMouldDotCheckRuleInterName: '', |
| | | HMouldDotCheckRuleInterID: 0, |
| | | HMouldMaintainRuleInterName: '', |
| | | HMouldMaintainRuleInterID: 0, |
| | | HBarCode: '', |
| | | HMadeSupID: 0, |
| | | HMadeSupName: '', |
| | | HMouldClass: '', |
| | | HNowWHID: 0, |
| | | HNowWHName: '', |
| | | HNowSPID: 0, |
| | | HNowSPName: '', |
| | | HMouldUseStatus: '', |
| | | HNextMainDate: '', |
| | | HUSEORGID: sessionStorage["OrganizationID"], |
| | | HCREATEORGID: sessionStorage["OrganizationID"], |
| | | HMaker: sessionStorage["HUserName"], |
| | | HMakeDate: '', |
| | | HChecker: '', |
| | | HCheckDate: '', |
| | | HUpDater: '', |
| | | HUpDateDate: '', |
| | | HCloseMan: '', |
| | | HCloseDate: '', |
| | | HDeleteMan: '', |
| | | HDeleteDate: '', |
| | | } |
| | | this.editData = [] |
| | | this.editBtData = [] |
| | | this.maintainData = [] |
| | | this.dotCheckData = [] |
| | | this.ids = [] |
| | | this.subDisabled = false |
| | | this.addBtnShow = false |
| | | // this.$refs.tableData.clearSelection() |
| | | this.activeName = 'first' |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset() |
| | | //新增获取单据号 |
| | | this.getHBillNo() |
| | | let date = new Date() |
| | | this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss') |
| | | if (this.OperationType == 1) { |
| | | this.handleAddSysZb() |
| | | } |
| | |
| | | }) |
| | | }, |
| | | getHBillNo() { |
| | | axios.get(this.baseURL + "/WEBSController/GetMaxBillNoAndID_Json", { |
| | | axios.get(this.baseURL + "/Web/GetMAXNum", { |
| | | params: { |
| | | HBillType: '1205' |
| | | HBillType: '3899' |
| | | } |
| | | }).then(response => { |
| | | this.form.HMaker = sessionStorage["HUserName"] |
| | | this.form.HBillNo = response.data.data[0].HBillNo |
| | | this.form.HInterID = response.data.data[0].HInterID |
| | | // this.copyType = 0 |
| | | // this.getCzyglByUser() |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | //获取销售出库单对应的条码明细 |
| | | //获取对应的条码明细 |
| | | getBarCodeNoteBySellOutBill(rowHmainid) { |
| | | axios.get(this.baseURL + '/Kf_SellOutBill/BarCodeNote', { |
| | | params: { "HInterID": rowHmainid } |
| | |
| | | handleUpdate() { |
| | | this.reset() |
| | | let rowHmainid = this.linterid |
| | | console.log(this.linterid) |
| | | axios.get(this.baseURL + "/Kf_SellOutBill/cx", { |
| | | axios.get(this.baseURL + "/Gy_Mould_Edit/xg", { |
| | | params: { 'HInterID': rowHmainid } |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | |
| | | this.form.BillType = data.HSourceBillType |
| | | if (this.copyType == 1) { |
| | | this.getHBillNo() |
| | | let date = new Date() |
| | | this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss') |
| | | } else { |
| | | this.form.HBillNo = data.单据号 |
| | | this.form.HInterID = data.hmainid |
| | |
| | | this.form.HCloseDate = data.关闭日期 |
| | | this.form.HDeleteDate = data.作废日期 |
| | | } |
| | | this.form.HBillSubType = data.HBillSubType |
| | | this.form.HMainSourceInterID = data.HMainSourceInterID |
| | | this.form.HMainSourceEntryID = data.HMainSourceEntryID |
| | | this.form.HMainSourceBillType = data.HMainSourceBillType |
| | | this.form.HMainSourceBillNo = data.HMainSourceBillNo |
| | | this.form.HEmpName = data.业务员 |
| | | this.form.HEmpID = data.HEmpID |
| | | this.form.HDeptName = data.部门 |
| | | this.form.HMouldOWNER = data.货主类型 |
| | | this.form.HMouldNo = data.模具编号 |
| | | this.form.HName = data.模具名称 |
| | | this.form.HModel = data.当前模具规格 |
| | | this.form.HModel2 = data.模具型号 |
| | | this.form.HDiameter = data.直径 |
| | | this.form.HSubjoin = data.辅助属性 |
| | | this.form.HSubjoin2 = data.辅助属性2 |
| | | this.form.HPICNo = data.图号 |
| | | this.form.HWorkMaterModel = data.生产产品型号 |
| | | this.form.HMaterID = data.HMaterID |
| | | this.form.HMaterNumber = data.对应ERP物料编码 |
| | | this.form.HMouleTypeID = data.HMouldTypeID |
| | | this.form.HMouleTypeName = data.模具品类 |
| | | this.form.HUnitID = data.HUnitID |
| | | this.form.HUnitName = data.计量单位 |
| | | this.form.HOutComDate = data.出厂日期 |
| | | this.form.HOutComNo = data.出厂编号 |
| | | this.form.HDeptID = data.HDeptID |
| | | this.form.HManagerName = data.主管 |
| | | this.form.HManagerID = data.HManagerID |
| | | this.form.HSupName = data.客户 |
| | | this.form.HDeptName = data.使用部门 |
| | | this.form.HSupID = data.HSupID |
| | | this.form.HLinkMan = data.联系人 |
| | | this.form.HLinkPhone = data.联系电话 |
| | | this.form.HSecManagerName = data.发货人 |
| | | this.form.HSecManagerID = data.HSecManagerID |
| | | this.form.HKeeperName = data.保管员 |
| | | this.form.HKeeperID = data.HKeeperID |
| | | this.form.HRemark = data.表头备注 |
| | | this.form.HProjectNumber = data.项目编码 |
| | | this.form.HProjectID = data.HProjectID |
| | | this.form.HProjectName = data.项目名称 |
| | | this.form.HGroupName = data.班组 |
| | | this.form.HGroupID = data.HGroupID |
| | | this.form.HWHName = data.主表仓库 |
| | | this.form.HWHID = data.HWHID_Main |
| | | this.form.HConveyCompName = data.运输公司 |
| | | this.form.HConveyCompID = data.HConveyCompID |
| | | this.form.HConveyTypeName = data.运输方式 |
| | | this.form.HConveyTypeID = data.HConveyTypeID |
| | | this.form.HConveyMoney = data.HConveyMoney |
| | | this.form.HCarriage = data.运费 |
| | | this.form.HSTOCKORGID = data.HSTOCKORGID |
| | | this.form.HOWNERID = data.HOWNERID |
| | | this.form.HSCWHName = data.主表调出仓库 |
| | | this.form.HSCWHID = data.HSCWHID |
| | | this.form.HCheckStatusMan = data.核销人 |
| | | this.form.HExplanation = data.摘要 |
| | | this.form.HInnerBillNo = data.内部单据号 |
| | | this.form.HCurName = data.币别 |
| | | this.form.HCurID = data.HCurID |
| | | this.form.HExRate = data.汇率 |
| | | this.form.HSellSName = data.销售方式 |
| | | this.form.HSellSID = data.HSellSID |
| | | // this.form.HCusBalance=data |
| | | // this.form.HCreditRating_Now=HConveyMoney |
| | | // this.form.HAvailableBalance=data |
| | | this.form.HPriceType = data.单价类型 |
| | | this.form.HOrgID = data.HOrgID |
| | | this.getCustomerByCusID(response.data.data[0].HSupID)//根据客户获取联系人,联系人电话 |
| | | this.getBarCodeNoteBySellOutBill(rowHmainid)//获取销售出库单对应的条码明细是否可编辑 |
| | | this.form.HSupName = data.供应商 |
| | | this.form.HMouldStatus = data.模具状态 |
| | | this.form.HSaveLife = data.安全寿命 |
| | | this.form.HWHID = data.HWhID |
| | | this.form.HWHName = data.默认仓库 |
| | | this.form.HVersion = data.版本 |
| | | this.form.HSPID = data.HSPID |
| | | this.form.HSPName = data.默认仓位 |
| | | this.form.HDesignLife = data.初始设计寿命 |
| | | this.form.HUseLife = data.使用寿命 |
| | | this.form.HLeaveLife = data.剩余寿命 |
| | | this.form.HInitLife = data.上线初始化寿命 == null ? 0 : data.上线初始化寿命 |
| | | this.form.HCaveQty = data.穴数 |
| | | this.form.HProdQty = data.已生产数量 |
| | | this.form.HProdWeight = data.已生产重量 |
| | | this.form.HMouldDotCheckRuleInterName = data.点检规程单号 |
| | | this.form.HMouldDotCheckRuleInterID = data.HMouldDotCheckRuleInterID |
| | | this.form.HMouldMaintainRuleInterName = data.保养规程单号 |
| | | this.form.HMouldMaintainRuleInterID = data.HMouldMaintainRuleInterID |
| | | this.form.HBarCode = data.条码编号 |
| | | this.form.HMadeSupID = data.HMadeSupID |
| | | this.form.HMadeSupName = data.制造厂商 |
| | | this.form.HMouldClass = data.器具分类 |
| | | this.form.HNowWHID = data.当前仓库ID |
| | | this.form.HNowWHName = data.当前仓库 |
| | | this.form.HNowSPID = data.当前仓位ID |
| | | this.form.HNowSPName = data.当前仓位 |
| | | this.form.HMouldUseStatus = data.模具可用状态 |
| | | this.form.HNextMainDate = data.校正日期 |
| | | this.form.HUSEORGID = data.HUSEORGID |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | this.editData.push( |
| | | { |
| | | "HMaterID": result.data[i].HMaterID |
| | | , "物料代码": result.data[i].物料代码 |
| | | , "物料名称": result.data[i].物料名称 |
| | | , "规格型号": result.data[i].规格型号 |
| | | , "HUnitID": result.data[i].HUnitID |
| | | , "计量单位": result.data[i].计量单位 |
| | | , "HQtyMust": result.data[i].应发数量.toFixed(6) |
| | | , "HQty": result.data[i].数量.toFixed(6) |
| | | , "HPieceQty": result.data[i].件数.toFixed(0) |
| | | , "HPrice": result.data[i].单价.toFixed(4) |
| | | , "HTaxPrice": result.data[i].含税单价.toFixed(4) |
| | | , "HTaxRate": result.data[i].税率 |
| | | , "HMoney": (result.data[i].数量 * result.data[i].单价).toFixed(2) |
| | | , "HTaxMoney": (result.data[i].数量 * result.data[i].含税单价, 2).toFixed(2) |
| | | , "HWHID": result.data[i].hwhid |
| | | , "发货仓库": result.data[i].发货仓库 |
| | | , "HRemark": result.data[i].表体备注 |
| | | , "HQty_Full": result.data[i].满车重量 |
| | | , "HQty_Empty": result.data[i].空车重量 |
| | | , "HQty_Back": result.data[i].回车重量 |
| | | , "HCostPrice": result.data[i].成本单价 |
| | | , "HCostMoney": result.data[i].成本金额 |
| | | , "HSalePrice": result.data[i].销售单价 |
| | | , "HSeOrderInterID": result.data[i].HSeOrderInterID |
| | | , "HSeOrderEntryID": result.data[i].HSeOrderEntryID |
| | | , "HSeOrderBillNo": result.data[i].销售订单号 |
| | | , "HSourceInterID": result.data[i].HSourceInterID |
| | | , "HSourceEntryID": result.data[i].HSourceEntryID |
| | | , "HSourceBillNo": result.data[i].源单单号 |
| | | , "HSourceBillType": result.data[i].HSourceBillType |
| | | , "HRelationQty": result.data[i].关联数量 |
| | | , "HRelationMoney": result.data[i].关联金额 |
| | | , 'HSPID': result.data[i].HSPID |
| | | , 'HSPName': result.data[i].仓位 |
| | | , 'HSPGroupID': result.data[i].HSPGroupID |
| | | , "HSPGroupName": result.data[i].仓位组 |
| | | , 'HSCWHID': result.data[i].HSCWHID |
| | | , 'HSCWHName': result.data[i].调出仓库 |
| | | , 'HSCSPID': result.data[i].HSCSPID |
| | | , 'HSCSPName': result.data[i].调出仓位 |
| | | , 'HBatchNo': result.data[i].批次 |
| | | , 'HPOOrderInterID': result.data[i].采购订单内码 |
| | | , 'HPOOrderEntryID': result.data[i].采购订单子内码 |
| | | , 'HPOOrderBillNo': result.data[i].采购订单号 |
| | | , 'HPropertyID': result.data[i].HPropertyID |
| | | , 'HPropertyName': result.data[i].辅助属性 |
| | | , 'HSecUnitID': result.data[i].HSecUnitID |
| | | , 'HSecUnitName': result.data[i].辅助计量单位 |
| | | , 'HSecUnitRate': result.data[i].换算率 |
| | | , 'HEngineNum': result.data[i].发动机号 |
| | | , 'HUnderPanNum': result.data[i].地盘号 |
| | | , 'HLeaveFactCard': result.data[i].出厂证 |
| | | , 'HReqBuyQty': result.data[i].申请采购数量 |
| | | , 'HReqOutQty': result.data[i].申请出库数量 |
| | | , 'HCurrentInventory': result.data[i].当前库存 |
| | | "HMouldFileID": result.data[i]["HMouldFileID"], |
| | | "HMouldFileName": result.data[i]["子器具"], |
| | | "HUnionDate": result.data[i]["组装日期"], |
| | | "HRemark": result.data[i]["表体备注"] |
| | | } |
| | | ); |
| | | } |
| | | if (data.状态 != '创建' && this.copyType != 1) { |
| | | this.$modal.msgError("此条数据不是创建状态,不能修改"); |
| | | this.subDisabled = true |
| | | var HCycleUnit = data.周期单位; |
| | | var HCheckCycle = data.保养周期; |
| | | if (!(HCycleUnit == null || HCheckCycle == null)) { |
| | | this.calculateHNextMainDate(data.hmainid, HCycleUnit, HCheckCycle); |
| | | } |
| | | this.formShow = true |
| | | this.formLoading = false |
| | | |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | axios.get(this.baseURL + "/Gy_MouldFileMain/Gy_MouldFileSubDetai", { |
| | | params: { 'HInterID': rowHmainid } |
| | | }).then(response => { |
| | | if (response.data.code == 1) { |
| | | let data = response.data |
| | | var dataMaintainRule = data.data[0]; |
| | | var dataDotCheckRule = data.data[1]; |
| | | console.log(dataMaintainRule) |
| | | //子表1赋值 |
| | | for (var i = 0; i < dataMaintainRule.length; i++) { |
| | | this.maintainData.push( |
| | | { |
| | | "HMaintainRuleID": dataMaintainRule[i].HMaintainRuleID, |
| | | "保养规程单据号": dataMaintainRule[i].HBillNo, |
| | | "HStdFlag": dataMaintainRule[i].HStdFlag, |
| | | "HRemark": dataMaintainRule[i].HRemark, |
| | | "HSourceInterID": dataMaintainRule[i].HSourceInterID, |
| | | "HSourceEntryID": dataMaintainRule[i].HSourceEntryID, |
| | | "HSourceBillNo": dataMaintainRule[i].HSourceBillNo, |
| | | "HSourceBillType": dataMaintainRule[i].HSourceBillType |
| | | } |
| | | ) |
| | | } |
| | | for (var i = 0; i < dataDotCheckRule.length; i++) { |
| | | this.dotCheckData.push( |
| | | { |
| | | "HDotCheckRuleID": dataDotCheckRule[i].HDotCheckRuleID, |
| | | "点检规程单据号": dataDotCheckRule[i].HBillNo, |
| | | "HStdFlag": dataDotCheckRule[i].HStdFlag, |
| | | "HRemark": dataDotCheckRule[i].HRemark, |
| | | "HSourceInterID": dataDotCheckRule[i].HSourceInterID, |
| | | "HSourceEntryID": dataDotCheckRule[i].HSourceEntryID, |
| | | "HSourceBillNo": dataDotCheckRule[i].HSourceBillNo, |
| | | "HSourceBillType": dataDotCheckRule[i].HSourceBillType |
| | | } |
| | | ) |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | //#region 计算-下次保养/校正日期 |
| | | calculateHNextMainDate(HInterID, HCycleUnit, HCheckCycle) { |
| | | axios.get(this.baseURL + "/Gy_Mould_Edit/calculateHNextMainDate", { |
| | | params: { 'HInterID': HInterID } |
| | | }).then(response => { |
| | | let d = response.data |
| | | var HDate = this.form.HDate |
| | | var HEndDate = d.data[0].保养记录结束日期 == null ? moment(HDate).format('YYYY-MM-DD') : moment(d.data[0].保养记录结束日期).format('YYYY-MM-DD'); |
| | | if (HCycleUnit == "天") { |
| | | var time = HCheckCycle * 1000 * 60 * 60 * 24; |
| | | time += Date.parse(new Date(HEndDate)); |
| | | var HNextMainDate = moment(time).format('YYYY-MM-DD') |
| | | this.form.HNextMainDate = HNextMainDate |
| | | } else if (HCycleUnit == "周") { |
| | | var time = HCheckCycle * 7 * 1000 * 60 * 60 * 24; |
| | | time += Date.parse(new Date(HEndDate)); |
| | | var HNextMainDate = moment(time).format('YYYY-MM-DD') |
| | | this.form.HNextMainDate = HNextMainDate |
| | | } else if (HCycleUnit == "月") { |
| | | var year = HEndDate.split("-")[0] * 1; |
| | | var month = HEndDate.split("-")[1] * 1; |
| | | var day = HEndDate.split("-")[2] * 1; |
| | | if ((month + HCheckCycle) % 12 == 0) { |
| | | year += parseInt(((month + HCheckCycle) / 12 - 1)); |
| | | month = 12; |
| | | } else { |
| | | year += parseInt((month + HCheckCycle) / 12); |
| | | month = (month + HCheckCycle) % 12; |
| | | } |
| | | var HNextMainDate = year + "-" + month + "-" + day; |
| | | this.form.HNextMainDate = HNextMainDate |
| | | } |
| | | }) |
| | | }, |
| | | //根据客户带出联系人、联系电话 |
| | | getCustomerByCusID(HCusID) { |
| | |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | /** 销售出库子表明细序号 */ |
| | | rowSysZbIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | |
| | | /** 编辑页子表添加按钮操作 */ |
| | | handleAddSysZb(index, num) { |
| | | if (num == 1 && !index) { |
| | | this.$modal.msgError("请选择一行数据编辑!"); |
| | | } else { |
| | | let obj = { |
| | | HMaterID: 0, |
| | | 物料代码: '', |
| | | 物料名称: '', |
| | | 规格型号: '', |
| | | HUnitID: 0, |
| | | 计量单位: '', |
| | | HQtyMust: 1, |
| | | HQty: 1, |
| | | HPieceQty: 0, |
| | | HPrice: 0, |
| | | HTaxPrice: 0, |
| | | HTaxRate: 0, |
| | | HMoney: 0, |
| | | HTaxMoney: 0, |
| | | HWHID: 0, |
| | | 发货仓库: '', |
| | | HRemark: '', |
| | | HQty_Full: 0, |
| | | HQty_Empty: 0, |
| | | HQty_Back: 0, |
| | | HCostPrice: 0, |
| | | HCostMoney: 0, |
| | | HSalePrice: 0, |
| | | HSeOrderInterID: 741, |
| | | HSeOrderEntryID: 18, |
| | | HSeOrderBillNo: 'XSFH00000747', |
| | | HSourceInterID: 741, |
| | | HSourceEntryID: 18, |
| | | HSourceBillNo: 'XSFH00000747', |
| | | HSourceBillType: 1402, |
| | | HRelationQty: 0, |
| | | HRelationMoney: 0, |
| | | HSPID: 0, |
| | | HSPName: '', |
| | | HSPGroupID: 0, |
| | | HSPGroupName: '', |
| | | HSCWHID: 0, |
| | | HSCWHName: '', |
| | | HSCSPID: 0, |
| | | HSCSPName: '', |
| | | HBatchNo: '', |
| | | HPOOrderInterID: 0, |
| | | HPOOrderEntryID: 0, |
| | | HPOOrderBillNo: '', |
| | | HPropertyID: 0, |
| | | HPropertyName: '', |
| | | HSecUnitID: 0, |
| | | HSecUnitName: '', |
| | | HSecUnitRate: 0, |
| | | HEngineNum: '', |
| | | HUnderPanNum: '', |
| | | HLeaveFactCard: '', |
| | | HReqBuyQty: 0, |
| | | HReqOutQty: 0, |
| | | HCurrentInventory: 0, |
| | | } |
| | | if (index) { |
| | | this.editData.splice(index, 0, obj); |
| | | this.$set(this.editData, index, obj) |
| | | handleAddSysZb(type) { |
| | | let obj1 = { |
| | | "HMouldFileID": "0", |
| | | "HMouldFileName": "", |
| | | "HUnionDate": moment(new Date()).format('YYYY-MM-DD'), |
| | | "HRemark": "", |
| | | "HSourceInterID": "0", |
| | | "HSourceEntryID": "0", |
| | | "HSourceBillNo": "", |
| | | "HSourceBillType": "" |
| | | } |
| | | let obj2 = { |
| | | "HMaintainRuleID": "0", |
| | | "保养规程单据号": '', |
| | | "HStdFlag": false, |
| | | "HRemark": '', |
| | | "HSourceInterID": "0", |
| | | "HSourceEntryID": "0", |
| | | "HSourceBillNo": "", |
| | | "HSourceBillType": "" |
| | | } |
| | | let obj3 = { |
| | | "HDotCheckRuleID": "0", |
| | | "点检规程单据号": '', |
| | | "HStdFlag": false, |
| | | "HRemark": '', |
| | | "HSourceInterID": "0", |
| | | "HSourceEntryID": "0", |
| | | "HSourceBillNo": "", |
| | | "HSourceBillType": "" |
| | | } |
| | | if (type == 'edit') { |
| | | this.editData.push(obj1) |
| | | } else if (type == 'maintain') { |
| | | this.maintainData.push(obj2) |
| | | } else if (type == 'dotCheck') { |
| | | this.dotCheckData.push(obj3) |
| | | } else if (!type) { |
| | | this.editData.push(obj1) |
| | | this.maintainData.push(obj2) |
| | | this.dotCheckData.push(obj3) |
| | | } |
| | | }, |
| | | handleCopyZbRow(type) { |
| | | let indexNum = null |
| | | if (type == 'edit') { |
| | | indexNum = this.zbIndex |
| | | if (!indexNum) { |
| | | this.$modal.msgError("请选择一行数据") |
| | | } else { |
| | | this.editData.push(obj); |
| | | let copyRow = JSON.parse(JSON.stringify(this.zbSelForm)) |
| | | this.editData.push(copyRow) |
| | | } |
| | | } else if (type == 'maintain') { |
| | | indexNum = this.zbByIndex |
| | | if (!indexNum) { |
| | | this.$modal.msgError("请选择一行数据") |
| | | } else { |
| | | let copyRow = JSON.parse(JSON.stringify(this.zbBySelForm)) |
| | | this.maintainData.push(copyRow) |
| | | } |
| | | } else if (type == 'dotCheck') { |
| | | indexNum = this.zbDjIndex |
| | | if (!indexNum) { |
| | | this.$modal.msgError("请选择一行数据") |
| | | } else { |
| | | let copyRow = JSON.parse(JSON.stringify(this.zbDjSelForm)) |
| | | this.dotCheckData.push(copyRow) |
| | | } |
| | | } |
| | | }, |
| | | handleCopyZbRow() { |
| | | if (!this.zbIndex) { |
| | | this.$modal.msgError("请选择一行数据") |
| | | } else { |
| | | let copyRow = JSON.parse(JSON.stringify(this.zbSelForm)) |
| | | this.editData.push(copyRow); |
| | | } |
| | | }, |
| | | handleMoveRowUp(zbSelForm) { |
| | | if (!this.zbIndex) { |
| | | this.$modal.msgError("请选择一行数据") |
| | | } else { |
| | | if (zbSelForm.index == 1) { |
| | | this.$modal.msgError("第一行数据无法上移"); |
| | | } else { // 确保不是第一行 |
| | | let num = zbSelForm.index - 1 |
| | | const record = this.editData.splice(num, 1)[0]; |
| | | this.editData.splice(num - 1, 0, record); |
| | | } |
| | | } |
| | | }, |
| | | handleMoveRowDown(zbSelForm) { |
| | | if (!this.zbIndex) { |
| | | this.$modal.msgError("请选择一行数据") |
| | | } else { |
| | | if (zbSelForm.index == this.editData.length) { |
| | | this.$modal.msgError("最后一行数据无法下移"); |
| | | } else { // 确保不是第一行 |
| | | let num = zbSelForm.index - 1 |
| | | const record = this.editData.splice(num, 1)[0]; |
| | | this.editData.splice(num + 1, 0, record); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | /** 编辑页子表删除按钮操作 */ |
| | | handleDeleteSysZb(row) { |
| | | this.checkedSysZb = [] |
| | | this.checkedSysZb.push(row.index) |
| | | if (this.checkedSysZb.length == 0) { |
| | | this.$modal.msgError("请先选择要删除的商品订单明细数据"); |
| | | this.$modal.msgError("请先选择要删除数据"); |
| | | } else { |
| | | const editData = this.editData; |
| | | const checkedSysZb = this.checkedSysZb; |
| | |
| | | const del_row = selection.shift() |
| | | this.$refs.zbTable.toggleRowSelection(del_row, false) //设置这一行取消选中 |
| | | } |
| | | }, |
| | | /** 子表明细序号 */ |
| | | rowSysZbIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | /** 编辑页子表删除按钮操作 */ |
| | | handleDeleteSysZbBy(row) { |
| | | this.checkedSysZbBy = [] |
| | | this.checkedSysZbBy.push(row.index) |
| | | if (this.checkedSysZbBy.length == 0) { |
| | | this.$modal.msgError("请先选择要删除数据"); |
| | | } else { |
| | | const editData = this.maintainData; |
| | | const checkedSysZb = this.checkedSysZbBy; |
| | | this.maintainData = editData.filter(function (item) { |
| | | return checkedSysZb.indexOf(item.index) == -1 |
| | | }); |
| | | } |
| | | }, |
| | | /** 编辑页子表复选框选中数据 */ |
| | | handleTableZbByEdit(selection) { |
| | | this.checkedSysZbBy = selection.map(item => item.index) |
| | | this.zbBySelForm = selection[0] |
| | | this.zbByIndex = this.checkedSysZbBy[0] |
| | | if (selection.length > 1) { |
| | | const del_row = selection.shift() |
| | | this.$refs.zbByTable.toggleRowSelection(del_row, false) //设置这一行取消选中 |
| | | } |
| | | }, |
| | | /** 保养子表明细序号 */ |
| | | rowSysZbByIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | /** 编辑页子表删除按钮操作 */ |
| | | handleDeleteSysZbDJ(row) { |
| | | this.checkedSysZbDJ = [] |
| | | this.checkedSysZbDJ.push(row.index) |
| | | if (this.checkedSysZbDJ.length == 0) { |
| | | this.$modal.msgError("请先选择要删除数据"); |
| | | } else { |
| | | const editData = this.dotCheckData; |
| | | const checkedSysZb = this.checkedSysZbDJ; |
| | | this.dotCheckData = editData.filter(function (item) { |
| | | return checkedSysZb.indexOf(item.index) == -1 |
| | | }); |
| | | } |
| | | }, |
| | | /** 编辑页子表复选框选中数据 */ |
| | | handleTableZbDjEdit(selection) { |
| | | this.checkedSysZbDy = selection.map(item => item.index) |
| | | this.zbDjSelForm = selection[0] |
| | | this.zbDjIndex = this.checkedSysZbDy[0] |
| | | if (selection.length > 1) { |
| | | const del_row = selection.shift() |
| | | this.$refs.zbDjTable.toggleRowSelection(del_row, false) //设置这一行取消选中 |
| | | } |
| | | }, |
| | | /** 点检子表明细序号 */ |
| | | rowSysZbDjIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | //获取最大单据号_任务类(Type为0时只获取不新增流水号,为1时新增且获取流水号) |
| | | get_MAXNum_Task(Type) { |
| | |
| | | }, |
| | | // 编辑提交保存 |
| | | submitForm() { |
| | | console.log(1) |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | let fhck = false |
| | | this.editData.map((item, index) => { |
| | | if (!item.发货仓库) { |
| | | fhck = true |
| | | this.$modal.msgError("第" + (index + 1) + "行:发货仓库未选择!"); |
| | | let url = null |
| | | var user = sessionStorage["HUserName"] |
| | | var ModRightNameAdd = 'Gy_MouldFile_Edit' |
| | | if (!this.form.HNextMainDate) { |
| | | this.form.HNextMainDate = moment(new Date()).format('YYYY-MM-DD'); |
| | | } |
| | | if (this.OperationType == 3) { |
| | | this.form.HUpDater = sessionStorage["HUserName"] |
| | | url = '/Gy_Mould_Edit/AddBill1' |
| | | } else ( |
| | | url = '/Gy_Mould_Edit/AddBill' |
| | | ) |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | var mainTableMaintainRuleStr = JSON.stringify(this.maintainData); |
| | | var mainTableDotCheckRuleStr = JSON.stringify(this.dotCheckData); |
| | | var oMain = sMainStr + ";" + ModRightNameAdd + ";" + user + ";" + sSubStr + ";" + mainTableMaintainRuleStr + ";" + mainTableDotCheckRuleStr; |
| | | axios({ |
| | | method: 'post', |
| | | url: this.baseURL + url, |
| | | data: { |
| | | 'oMain': oMain |
| | | }, |
| | | }).then(response => { |
| | | console.log(response) |
| | | |
| | | if (response.data.count == 1) { |
| | | // this.subDisabled = true//设置保存按钮不可用 |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | // this.addBtnShow = true |
| | | this.formShow = false |
| | | this.$emit('editClose', false) |
| | | } |
| | | }) |
| | | this.$nextTick(() => { |
| | | if (!fhck) { |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType; |
| | | axios({ |
| | | method: 'post', |
| | | url: this.baseURL + "/Kf_SellOutBill/SaveSellOutBillList", |
| | | data: { |
| | | 'msg': sMainSub |
| | | }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.subDisabled = true//设置保存按钮不可用 |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | this.get_MAXNum_Task(1);//设置流水号增加 |
| | | if (response.data.Verify == "Y") //自动审核 |
| | | { |
| | | this.set_CheckBill(0, this.form); //审核 |
| | | } |
| | | this.addBtnShow = true |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } |
| | | }) |
| | | }).catch(error => { |
| | | console.log(error) |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // 反审核/审核数据 |
| | | set_CheckBill(num, form) { |
| | | var InterID = form.hmainid || form.HInterID |
| | | //逻辑审核方法 |
| | | axios.get(this.baseURL + "/Kf_SellOutBill/AuditKf_SellOutBill", { |
| | | params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | | if (result.code == 1) { |
| | | this.$modal.msgSuccess('操作成功'); |
| | | } |
| | | else { |
| | | this.$modal.msgError("错误:" + result.code + result.Message,); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | |
| | | }); |
| | | }, |
| | | showReset() { |
| | |
| | | this.warehouseShow = false |
| | | this.materialShow = false |
| | | this.gyEmployeeShow = false |
| | | this.gySourceShow = false |
| | | this.gySupplierShow = false |
| | | this.gyCustomerShow = false |
| | | this.gyStockPlaceShow = false |
| | | }, |
| | | // 打开数据列表弹窗 |
| | | openDataDialog(num, row) { |
| | |
| | | this.deptShow = true |
| | | this.openData = true |
| | | } else if (num == 2) { |
| | | this.dialogTitle = '出库仓库列表' |
| | | this.dialogTitle = '仓库列表' |
| | | this.warehouseShow = true |
| | | this.openData = true |
| | | } else if (num == 3) { |
| | |
| | | this.dialogTitle = '销售员列表' |
| | | this.gyEmployeeShow = true |
| | | this.openData = true |
| | | } else if (num == 5) { |
| | | this.dialogTitle = '生产资源列表' |
| | | this.gySourceShow = true |
| | | this.openData = true |
| | | } else if (num == 6) { |
| | | this.dialogTitle = '供应商列表' |
| | | this.gySupplierShow = true |
| | | this.openData = true |
| | | } else if (num == 7) { |
| | | this.dialogTitle = '客户列表' |
| | | this.gyCustomerShow = true |
| | | this.openData = true |
| | | } else if (num == 9) { |
| | | this.dialogTitle = '仓位列表' |
| | | this.gyStockPlaceShow = true |
| | | this.openData = true |
| | | } |
| | | }, |
| | | } |