| | |
| | | </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> |
| | |
| | | controls-position="right"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="税率" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-table-column align="center" label="税率" width="120" v-if="false"> |
| | | <template slot-scope="scope" v-if="false"> |
| | | <el-input-number v-model="scope.row.HTaxRate" :min="0" style="width: 90px;" |
| | | controls-position="right"></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"> |
| | | <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"> |
| | | <el-table-column align="center" label="含税单价" width="120" v-if="false"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HPrice * (1 + scope.row.HTaxRate*0.01) }}</span> |
| | | </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.HPrice * scope.row.HQty }}</span> |
| | | </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.HPrice * (1 + scope.row.HTaxRate*0.01)) * scope.row.HQty }}</span> |
| | | </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.HPrice * scope.row.HQty }}</span> |
| | | </template> |
| | |
| | | openPageData:{},//传入弹窗的数据 |
| | | formShow: false, //表单是否显示标记 |
| | | formLoading: true, //表单加载遮罩 |
| | | zzSelDis: false, //组织下拉列表禁用标记 |
| | | zzSelDis: false, |
| | | |
| | | rowHideShow: false, //列设置组件容器显示标记 |
| | | openRowHide: false, //列设置组件显示标记 |
| | |
| | | btResList: [], // 列设置 |
| | | form: {}, // 表单参数 |
| | | rules: { // 表单校验 |
| | | HSupName: [ |
| | | { required: true, message: "客户不能为空", trigger: "blur" } |
| | | ], |
| | | HDate: [ |
| | | { required: true, message: "日期不能为空", trigger: "blur" } |
| | | ], |
| | | HExRate: [ |
| | | { required: true, message: "汇率不能为空", trigger: "blur" } |
| | | ] |
| | | 物料名称: [ |
| | | { required: true, message: "物料名称不能为空", trigger: "blur" } |
| | | ], |
| | | |
| | | }, |
| | | |
| | | checkedSysZb: [], |
| | |
| | | , 'HSCWHName': "" |
| | | , 'HSCSPID': "0" |
| | | , 'HSCSPName': "" |
| | | , 'HBillStatus':"0" |
| | | , 'HBatchNo': "" |
| | | , 'HPOOrderInterID': "0" |
| | | , 'HPOOrderEntryID': "0" |
| | |
| | | , 'HSecUnitName': "" |
| | | , 'HSecUnitRate': "0" |
| | | , 'HEngineNum': "" |
| | | , 'HPRDORGID' :"0" |
| | | , 'HUnderPanNum': "" |
| | | , 'HLeaveFactCard': "" |
| | | , 'HReqBuyQty': "0" |
| | |
| | | }); |
| | | } |
| | | } |
| | | else if (this.OperationType == 5) { |
| | | this.zzSelDis = true |
| | | this.handleAdd() |
| | | let pushData = this.getUrlVars_JSON(); |
| | | let sourceList = pushData.data || []; |
| | | for (let item of sourceList) { |
| | | let hmainid = item.hmainid; |
| | | let hsubid = item.hsubid; |
| | | |
| | | axios.get(this.$baseUrl + '/Cg_POInStockBill/cx1', { |
| | | params: { |
| | | HInterID: hmainid, |
| | | HSubID: hsubid |
| | | } |
| | | }).then(res => { |
| | | let rows = res.data.data || []; |
| | | if (!rows.length) return; |
| | | let first = rows[0]; |
| | | if (this.editData.length === 0) { |
| | | this.form.HSupID = first.HSupID; |
| | | this.form.HSupName = first.供应商; |
| | | this.form.HBillType = first.HBillType; |
| | | } |
| | | this.editData.push({ |
| | | HMaterID: first.HMaterID, |
| | | "物料代码": first.物料代码, |
| | | "物料名称": first.物料名称, |
| | | "规格型号": first.规格型号, |
| | | "计量单位": first.计量单位, |
| | | HQtyMust: first.数量, |
| | | HQty: first.数量, |
| | | HPrice: first.单价, |
| | | HTaxRate: first.税率, |
| | | HRemark: first.表体备注, |
| | | HSourceInterID: hmainid, |
| | | HSourceEntryID: hsubid, |
| | | HSourceBillNo: first.单据号, |
| | | HSourceBillType: first.源单类型, |
| | | HWHID: first.HWHID, |
| | | "收料仓库": first.收料仓库, |
| | | HUnitID:first.HUnitID, |
| | | HInvoiceBillNo:first.发票编码, |
| | | HDeptID : first.HDeptID, |
| | | HDeptName : first.部门, |
| | | HEmpID : first.HEmpID, |
| | | HEmpName : first.业务员, |
| | | HManagerID : first.HManagerID, |
| | | HManagerName : first.主管, |
| | | HMainSourceBillType : first.HBillType, |
| | | HSupID : first.HCusID, |
| | | HSupName : first.客户, |
| | | HLinkMan : first.联系人, |
| | | HLinkPhone : first.联系电话, |
| | | HSellSID : first.HSellSID, |
| | | HSellSName : first.销售方式, |
| | | HCurID : first.HCurID, |
| | | HCurName :first.币别, |
| | | HExRate : first.汇率, |
| | | HWHID: first.主表仓库ID, |
| | | HWHName: first.主表仓库, |
| | | HSecManagerID: first.HSecManagerID, |
| | | HSecManagerName: first.验收员, |
| | | HRemark: first.表头备注, |
| | | HOrgID : first.HOrgID, |
| | | HSTOCKORGID : first.HOrgID, |
| | | HOWNERID : first.HOrgID, |
| | | HPieceQty: 0, HTaxPrice: 0, HMoney: 0, HTaxMoney: 0, |
| | | HQty_Full: 0, HQty_Empty: 0, HQty_Back: 0, HCostPrice: 0, HCostMoney: 0, |
| | | HSalePrice: 0, HSeOrderInterID: 0, HSeOrderEntryID: 0, HSeOrderBillNo: "", |
| | | HRelationQty: 0, HRelationMoney: 0, HSPID: first.HSPID, "仓位名称": first.仓位名称, |
| | | 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 |
| | | }); |
| | | |
| | | this.formShow = true; |
| | | this.formLoading = false; |
| | | }).catch(() => { |
| | | this.$modal.msgError("接口请求失败"); |
| | | this.formShow = true; |
| | | this.formLoading = false; |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | //#endregion |
| | | |
| | |
| | | HInterID: 0, |
| | | HBillNo: " ", |
| | | HDate: new Date(), |
| | | HEmpID: 1, |
| | | HEmpName: " ", |
| | | HDeptID: 1, |
| | | HDeptName: " ", |
| | | HSupID: 1, |
| | | HSupName: " ", |
| | | HInvoiceBillNo: " ", |
| | |
| | | HCloseMan: " ", |
| | | HUpDater: " ", |
| | | HDeleteMan: " ", |
| | | |
| | | HEmpName:sessionStorage["HSellMan"], |
| | | HEmpID:sessionStorage["HSellManID"] , |
| | | //组织下拉列表禁用标记 |
| | | HMakeDate: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HCheckDate: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HCloseDate: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | |
| | | this.reset() |
| | | //新增获取单据号 |
| | | this.getHBillNo() |
| | | this.form.HEmpName = sessionStorage.getItem("HSellMan") || "" |
| | | this.form.HEmpID = sessionStorage.getItem("HSellManID") || "" |
| | | this.form.HDeptID = sessionStorage.getItem("HDeptID") || "" |
| | | this.form.HDeptName = sessionStorage.getItem("HDept") || "" |
| | | |
| | | |
| | | if (this.OperationType == 1) { |
| | | this.handleAddSysZb() |
| | | } |
| | |
| | | this.form.HWHName = deptRow.仓库名称 |
| | | this.form.HWHID = deptRow.HItemID |
| | | this.form.HWHNumber = deptRow.仓库代码 |
| | | for (let i = 0; i < this.editData.length; i++) { |
| | | this.editData[i].HWHID = deptRow.HItemID |
| | | this.editData[i].HWHNumber = deptRow.仓库代码; |
| | | this.editData[i].HWHName = deptRow.仓库名称; |
| | | this.editData[i].收料仓库 = deptRow.仓库名称; |
| | | } |
| | | this.openData = false |
| | | }else{ |
| | | this.editData[this.zbIndex].HWHID = deptRow.HItemID; |
| | |
| | | if (!fhck) { |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType; |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + this.OperationType + ';' + sessionStorage["HUserName"]+';'+this.OperationType; |
| | | axios({ |
| | | method: 'post', |
| | | url: this.$baseUrl + "/Kf_POStockInBill/SaveSellOutBillList", |
| | | url: this.$baseUrl + "/Kf_POStockInBill/POStockInBillEdit", |
| | | data: { |
| | | 'msg': sMainSub |
| | | 'sMainSub': sMainSub |
| | | }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.subDisabled = true//设置保存按钮不可用 |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | // this.get_MAXNum_Task(1);//设置流水号增加 |
| | | this.get_MAXNum_Task(1);//设置流水号增加 |
| | | if (response.data.Verify == "Y") //自动审核 |
| | | { |
| | | this.set_CheckBill(0, this.form); //审核 |
| | |
| | | 规格型号: '', |
| | | HUnitID: 0, |
| | | 计量单位: '', |
| | | HQtyMust: 1, |
| | | HQtyMust: 0, |
| | | HQty: 1, |
| | | HPieceQty: 0, |
| | | HPrice: 0, |
| | |
| | | }, |
| | | //#endregion |
| | | |
| | | // //#region 获取最大单据号 |
| | | // get_MAXNum_Task(Type) { |
| | | // const formatDate = this.form.HDate |
| | | // ? new Date(this.form.HDate).toISOString().split('T')[0] |
| | | // : new Date().toISOString().split('T')[0]; |
| | | // var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1201','${formatDate}',0,0,0,'${Type}','${this.form.HDeptID}'`; |
| | | // axios({ |
| | | // method: 'get', |
| | | // url: this.$baseUrl + "/CommonModel/searchMethod", |
| | | // params: { "sql": sql, "user": sessionStorage["HUserName"], "ModRightNameCheck": "" }, |
| | | // }).then(response => { |
| | | // if (response.data.count == 1) { |
| | | // this.form.HBillNo = response.data.data[0].HBillNo; |
| | | // } else { |
| | | // this.$modal.msgError(response.data.code + response.data.Message); |
| | | // } |
| | | // }).catch(error => { |
| | | // this.$modal.msgError("接口请求失败!"); |
| | | // }); |
| | | // }, |
| | | // #region 获取最大单据号 |
| | | get_MAXNum_Task(Type) { |
| | | const formatDate = this.form.HDate |
| | | ? new Date(this.form.HDate).toISOString().split('T')[0] |
| | | : new Date().toISOString().split('T')[0]; |
| | | var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1201','${formatDate}',0,0,0,'${Type}','${this.form.HDeptID}'`; |
| | | axios({ |
| | | method: 'get', |
| | | url: this.$baseUrl + "/CommonModel/searchMethod", |
| | | params: { "sql": sql, "user": sessionStorage["HUserName"], "ModRightNameCheck": "" }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.form.HBillNo = response.data.data[0].HBillNo; |
| | | } else { |
| | | this.$modal.msgError(response.data.code + response.data.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 根据用户获取对应职员、部门、销售主管 |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single" |
| | | @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">复制</el-button> |
| | | @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)" v-if="false">复制</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除 |
| | |
| | | >删除 |
| | | </el-button> |
| | | </el-col> |
| | | |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-tickets" size="mini" |
| | | @click="handlePush(row = rowForm, OperationType = 4)">下推(采购入库单)</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-download" |
| | |
| | | >隐藏列设置</el-button |
| | | > |
| | | </el-col> |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch" |
| | | >搜 索</el-button |
| | |
| | | <div style="height: 70vh" v-if="openFlag_pushBarCode"> |
| | | <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="下推容采购入库单" :visible.sync="openPush" width="1480px" append-to-body class="xsckdBox" @close="close"> |
| | | <push :OperationType='5' :propsData='pushData' :HSouceBillType=BillType |
| | | @editClose="pushClose" v-if="pushShow" /> |
| | | </el-dialog> |
| | | <!-- 编辑 --> |
| | | <el-dialog |
| | |
| | | <script> |
| | | import axios from "axios"; |
| | | import RowSettings from "@/views/component/rowSettings"; |
| | | import Push from '@/views/CaiGouGuanLi/CaiGouRuKu/Kf_POStockInBillEdit' |
| | | import gySource from "@/views/basic/gySource"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | export default { |
| | | name: "cgPoInStockBill", |
| | | components: { RowSettings, gySource }, |
| | | components: { RowSettings, gySource ,Push}, |
| | | props: { |
| | | openPage: { type: String }, |
| | | }, |
| | |
| | | return { |
| | | iframeUrl: "", |
| | | activeSeach: "", |
| | | pushShow: false, |
| | | dateRange: [], |
| | | HModName: "cgPoInStockBill", |
| | | editShow: false, |
| | |
| | | return { background: "#ecf5ff" }; |
| | | } |
| | | }, |
| | | |
| | | //打开下推组件弹窗 |
| | | handlePush() { |
| | | if (this.rowList && this.rowList.length > 0) { |
| | | var dataArray = []; |
| | | for (var i = 0; i < this.rowList.length; i++) { |
| | | if (this.rowList[i].状态 != "已审核") { |
| | | this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】不为已审核状态,不允许下推!") |
| | | return; |
| | | } |
| | | if (this.rowList[i].HQtyMust <= 0) { |
| | | this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】对应可下推数量必须大于 0 !") |
| | | return; |
| | | } |
| | | var temp = { |
| | | "hmainid": this.rowList[i].hmainid |
| | | , "hsubid": this.rowList[i].hsubid |
| | | , "HBillType": this.rowList[i].HBillType |
| | | } |
| | | dataArray.push(temp); |
| | | } |
| | | var datajson = { |
| | | "data": dataArray |
| | | }; |
| | | this.pushData = JSON.stringify(datajson) |
| | | this.pushShow = true |
| | | this.openPush = true |
| | | } else { |
| | | this.$modal.msgError("请选择数据下推!") |
| | | } |
| | | }, |
| | | //双击行 |
| | | handleDblclick(row, column, cell, event) { |
| | | this.OperationType = 3; |
| | |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | // this.rowForm = {} |
| | | this.rowList = selection; |
| | | this.ids = selection.map((item) => item.hmainid); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | |
| | | this.resetForm("queryForm"); |
| | | this.getList(); |
| | | }, |
| | | //关闭下推页面 |
| | | pushClose(val) { |
| | | this.open = val |
| | | this.pushShow = false |
| | | this.openPush = val |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //清除选中数据的缓存 |
| | | clearData(){ |
| | | this.ids = [] |
| | | this.multiple = true |
| | | this.single = true |
| | | this.OperationType = 0 |
| | | this.copyType = 0 |
| | | }, |
| | | |
| | | //退出 |
| | | close() { |
| | | this.tableShow = true; |
| | | this.openEdit = false; |
| | | this.pushShow = false; |
| | | this.openFlag_pushBarCode = false; |
| | | this.disabledFlag_pushBarCode = true; |
| | | this.getList(); |