| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single" |
| | | @click="handleEdit(row = rowForm, OperationType = 2)">复制</el-button> |
| | | @click="handleEdit(row = rowForm, copyType = 1)">复制</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除 |
| | |
| | | } |
| | | // this.sWhere += this.addSWhereByOpenType() |
| | | // this.sWhere += this.getOrgIDByUser() |
| | | this.clearData() |
| | | this.getList() |
| | | |
| | | }, |
| | |
| | | ColContent2: '', |
| | | ColContent: '', |
| | | } |
| | | this.clearData() |
| | | this.resetForm("queryForm") |
| | | this.getList() |
| | | }, |
| | | |
| | | clearData() { |
| | | this.single = true |
| | | this.multiple = true |
| | | this.OperationType = 0 |
| | | this.copyType = 0 |
| | | this.ids = [] |
| | | }, |
| | | //退出 |
| | | close() { |
| | | this.tableShow = true |
| | | this.single = true |
| | | this.openEdit = false |
| | | this.editShow = false |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //打开新增组件弹窗 |
| | |
| | | editGyClose(val) { |
| | | this.editShow = false |
| | | this.openEdit = false |
| | | this.single = true |
| | | this.multiple = true |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | /** 删除按钮操作 */ |
| | |
| | | else { |
| | | this.$modal.msgError("错误:" + result.code + result.Message,); |
| | | } |
| | | this.clearData() |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | // 反禁用/禁用数据 |
| | | set_De_Stop(num, form) { |
| | | var InterID = form.HItemID || form.HInterID |
| | | var InterID = form.HItemID.toString() || form.HInterID.toString() |
| | | //逻辑审核方法 |
| | | axios.get(this.baseURL + "/Gy_Source/StopGy_Source", { |
| | | axios.get(this.baseURL + "/Gy_Department/StopGy_Department", { |
| | | params: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | else { |
| | | this.$modal.msgError("错误:" + result.code + result.Message,); |
| | | } |
| | | this.clearData() |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | |
| | | openData: false, //数据弹窗 |
| | | dialogTitle: "", |
| | | zuzhiId: 0, |
| | | organizationList: [], //组织列表 |
| | | organizationList: JSON.parse(sessionStorage.getItem('organizationList')), //组织列表 |
| | | subDisabled: false, //编辑页面保存按钮是否禁用(true禁用,false可用) |
| | | CheckBillDisabled: true, |
| | | // OperationType: this.$route.query.OperationType,//保存类型(新增1修改3) |
| | | HInterID: null, |
| | | baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/", |
| | | user: "admin", |
| | | currentRow: [], |
| | | lastSelectedRowIndex: null, // 用于记录上次点击的行索引 |
| | | lastSelectedRow: null, // 上一次选中的行 |
| | |
| | | }, |
| | | created() { |
| | | this.reset(); |
| | | this.fetchData(); |
| | | this.getdata(); |
| | | }, |
| | | activated() { |
| | | this.reset(); |
| | | this.fetchData(); |
| | | this.getdata(); |
| | | }, |
| | | methods: { |
| | | fetchData() { |
| | | //登录用户信息 |
| | | axios |
| | | .get( |
| | | "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038" |
| | | ) |
| | | .then((response) => { |
| | | let data = response.data.data[0]; |
| | | this.zuzhiId = data.HUSEORGID; //根据登录用户获取默认的组织ID |
| | | this.user = data.Czymc; |
| | | axios |
| | | .get(this.baseURL + "/Web/GetOrganizations", {}) |
| | | .then((response) => { |
| | | if (response.data.count == 1) { |
| | | this.organizationList = response.data.data; //组织列表 |
| | | this.getdata(); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | getdata() { |
| | | this.reset(); |
| | | console.log(this.OperationType); |
| | | console.log(this.OperationType,this.copyType); |
| | | if (this.OperationType != 1) { |
| | | this.zzSelDis = true; |
| | | axios |
| | | .get(this.baseURL + "/Gy_Department/cx", { |
| | | params: { |
| | | HInterID: this.linterid, |
| | | }, |
| | | }) |
| | | .then((response) => { |
| | | console.log(response); |
| | | let result = response.data; |
| | | if (result.code == 1) { |
| | | // 说明验证成功了, |
| | | var data = result.data[0]; |
| | | Object.assign(this.form, { |
| | | HNumber: data.部门代码, |
| | | HItemID: data.HItemID, |
| | | HName: data.部门名称, |
| | | HHelpCode: data.HHelpCode, |
| | | HEmpID: data.HEmpID, |
| | | HEmpName: data.HEmpName, |
| | | HBarCode: data.条形码, |
| | | HStopflag: data.禁用标记, |
| | | HRemark: data.HRemark, |
| | | HUSEORGID: data.HUSEORGID, |
| | | HRemark: data.备注, |
| | | HMakeEmp: data["创建人"], |
| | | HMakeDate: |
| | | data["创建日期"] == null |
| | | ? "" |
| | | : dayjs(new Date(data["创建日期"])).format("yyyy-MM-dd"), |
| | | HCheckEmp: data["审核人"], |
| | | HCheckDate: |
| | | data["审核日期"] == null |
| | | ? "" |
| | | : dayjs(new Date(data["审核日期"])).format("yyyy-MM-dd"), |
| | | HStopEmp: data["禁用人"], |
| | | HStopDate: |
| | | data["禁用日期"] == null |
| | | ? "" |
| | | : dayjs(new Date(data["禁用日期"])).format("yyyy-MM-dd"), |
| | | }); |
| | | if (!data.HCheckEmp) { |
| | | this.CheckBillDisabled = false; |
| | | } |
| | | } |
| | | this.$nextTick(() => { |
| | | this.formShow = true; |
| | | this.formLoading = false; |
| | | axios.get(this.baseURL + "/Gy_Department/cx", { |
| | | params: { |
| | | HInterID: this.linterid, |
| | | }, |
| | | }).then((response) => { |
| | | let result = response.data; |
| | | if (result.code == 1) { |
| | | // 说明验证成功了, |
| | | var data = result.data[0]; |
| | | Object.assign(this.form, { |
| | | HNumber: data.部门代码, |
| | | HItemID: data.HItemID, |
| | | HName: data.部门名称, |
| | | HHelpCode: data.HHelpCode, |
| | | HEmpID: data.HEmpID, |
| | | HEmpName: data.HEmpName, |
| | | HBarCode: data.条形码, |
| | | HStopflag: data.禁用标记, |
| | | HRemark: data.HRemark, |
| | | HUSEORGID: data.HUSEORGID, |
| | | HRemark: data.备注, |
| | | HMakeEmp: data["创建人"], |
| | | HMakeDate: data["创建日期"] == null ? "" : dayjs(new Date(data["创建日期"])).format("yyyy-MM-dd"), |
| | | HCheckEmp: data["审核人"], |
| | | HCheckDate: data["审核日期"] == null ? "" : dayjs(new Date(data["审核日期"])).format("yyyy-MM-dd"), |
| | | HStopEmp: data["禁用人"], |
| | | HStopDate: data["禁用日期"] == null ? "" : dayjs(new Date(data["禁用日期"])).format("yyyy-MM-dd"), |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | if (!data.HCheckEmp) { |
| | | this.CheckBillDisabled = false; |
| | | } |
| | | if (this.copyType == 1) { |
| | | this.form.HItemID = 0 |
| | | this.form.HMakeEmp = sessionStorage["HUserName"] |
| | | this.form.HMakeDate = moment(new Date()).format("YYYY-MM-DDTHH:mm:ss") |
| | | this.form.HCheckEmp = '' |
| | | this.form.HCheckDate = '' |
| | | this.form.HStopEmp = '' |
| | | this.form.HStopDate = '' |
| | | } |
| | | } |
| | | this.$nextTick(() => { |
| | | this.formShow = true; |
| | | this.formLoading = false; |
| | | }); |
| | | }).catch((error) => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } else if (this.OperationType == 1) { |
| | | let date = new Date(); |
| | | this.form.HMakeDate = moment(date).format("YYYY-MM-DDTHH:mm:ss"); |
| | |
| | | reset() { |
| | | this.form = { |
| | | HNumber: '', |
| | | HItemID:0, |
| | | HItemID: 0, |
| | | HName: '', |
| | | HHelpCode: '', |
| | | HEmpID: 0, |
| | | HEmpName: '', |
| | | HBarCode: '', |
| | | HStopflag: false, |
| | | HRemark:'', |
| | | HUSEORGID:sessionStorage["OrganizationID"], |
| | | HRemark: '', |
| | | HMakeEmp:sessionStorage["HUserName"], |
| | | HUSEORGID: sessionStorage["OrganizationID"] - 0, |
| | | HRemark: '', |
| | | HMakeEmp: sessionStorage["HUserName"], |
| | | HMakeTime: null, |
| | | HStopEmp: null, |
| | | HStopTime: null, |
| | |
| | | if (this.rowForm.状态 == "创建") { |
| | | axios |
| | | .get(this.baseURL + "/Kf_SellOutBill/DeltetSellOutBill", { |
| | | params: { HInterID: this.rowForm.hmainid.toString(), user: this.user }, |
| | | params: { HInterID: this.rowForm.hmainid.toString(), user: sessionStorage["HUserName"] }, |
| | | }) |
| | | .then((response) => { |
| | | if (response.data.count == 1) { |
| | |
| | | }, |
| | | // 反审核/审核数据 |
| | | set_CheckBill(num, form) { |
| | | var InterID = form.HItemID || form.HInterID; |
| | | var InterID = this.form.HItemID.toString(); |
| | | //逻辑审核方法 |
| | | axios |
| | | .get(this.baseURL + "/Gy_Department/StopGy_Department", { |
| | | params: { HInterID: InterID, IsAudit: num, CurUserName: this.user }, |
| | | .get(this.baseURL + "/Gy_Department/AuditGy_Department", { |
| | | params: { HInterID: InterID, IsAudit: num, CurUserName: sessionStorage["HUserName"] }, |
| | | }) |
| | | .then((response) => { |
| | | let result = response.data; |
| | |
| | | </el-form-item> |
| | | <el-form-item label="组织"> |
| | | <el-select v-model="queryParams.HUSEORGID" placeholder="请选择"> |
| | | <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.ID"> |
| | | <el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name" :value="item.Name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | open: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | HUSEORGID: sessionStorage["OrganizationID"] - 0, |
| | | HUSEORGID: sessionStorage["Organization"], |
| | | HName: null, |
| | | HNumber: null, |
| | | HSupTypeID: null, |
| | |
| | | params: { |
| | | "sWhere": this.sWhere, |
| | | "user": sessionStorage["HUserName"], |
| | | "Organization": sessionStorage["Organization"], |
| | | "Organization": this.queryParams.HUSEORGID, |
| | | "page": this.page, |
| | | "size": this.pageSize |
| | | }, |
| | |
| | | this.selectedRow = row; // 记录当前选中的行 |
| | | this.lastSelectedRowIndex = this.tableData.indexOf(row); |
| | | this.$refs.tableData.toggleRowSelection(row); |
| | | if (this.openPage) { |
| | | if (this.openPage) { |
| | | this.$emit('deptEmit', row, 6) |
| | | } |
| | | }, |
| | |
| | | if (this.queryParams.HName) { |
| | | this.sWhere += " and 供应商名称 like '%" + this.queryParams.HName + "%'"; |
| | | } |
| | | if (this.queryParams.HUSEORGID) { |
| | | this.sWhere += " and HUSEORGID = '" + this.queryParams.HUSEORGID + "'" |
| | | } |
| | | // if (this.queryParams.HUSEORGID) { |
| | | // this.sWhere += " and HUSEORGID = '" + this.queryParams.HUSEORGID + "'" |
| | | // } |
| | | // this.sWhere += this.addSWhereByOpenType() |
| | | // this.sWhere += this.getOrgIDByUser() |
| | | this.clearData() |
| | | this.getList() |
| | | |
| | | }, |
| | |
| | | resetQuery() { |
| | | this.sWhere = '' |
| | | this.queryParams = { |
| | | HUSEORGID: null, |
| | | HUSEORGID:sessionStorage["Organization"], |
| | | HName: null, |
| | | HNumber: null, |
| | | Comparator1: '', |
| | |
| | | ColContent: '', |
| | | } |
| | | this.resetForm("queryForm") |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | |
| | | clearData() { |
| | | this.single = true |
| | | this.multiple = true |
| | | this.OperationType = 0 |
| | | this.copyType = 0 |
| | | this.ids = [] |
| | | }, |
| | | //退出 |
| | | close() { |
| | | this.tableShow = true |
| | | this.openEdit = false |
| | | this.editShow = false |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //打开新增组件弹窗 |
| | |
| | | editGyClose(val) { |
| | | this.editShow = false |
| | | this.openEdit = false |
| | | this.multiple = true, |
| | | this.getList() |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete() { |
| | |
| | | set_CheckBill(num, form) { |
| | | var InterID = form.HItemID || form.HInterID |
| | | //逻辑审核方法 |
| | | axios.get(this.baseURL + "/Gy_Source/AuditGy_Source", { |
| | | axios.get(this.baseURL + "/Gy_Supplier/AuditGy_Supplier", { |
| | | params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | else { |
| | | this.$modal.msgError("错误:" + result.code + result.Message,); |
| | | } |
| | | this.clearData() |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | |
| | | set_De_Stop(num, form) { |
| | | var InterID = form.HItemID || form.HInterID |
| | | //逻辑审核方法 |
| | | axios.get(this.baseURL + "/Gy_Source/StopGy_Source", { |
| | | axios.get(this.baseURL + "/Gy_Supplier/StopGy_Supplier", { |
| | | params: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | else { |
| | | this.$modal.msgError("错误:" + result.code + result.Message,); |
| | | } |
| | | this.clearData() |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | |
| | | this.sWhere += " and 物料代码 like '%" + this.queryParams.MaterialCode + "%'"; |
| | | } |
| | | if (this.queryParams.MaterialName) { |
| | | this.sWhere += " and 物料名称 like '%" + MaterialName + "%'"; |
| | | this.sWhere += " and 物料名称 like '%" + this.queryParams.MaterialName + "%'"; |
| | | } |
| | | if (this.queryParams.SpecificationModel) { |
| | | this.sWhere += " and 规格型号 like '%" + SpecificationModel + "%'"; |
| | | this.sWhere += " and 规格型号 like '%" + this.queryParams.SpecificationModel + "%'"; |
| | | } |
| | | if (this.queryParams.HSourceBillNo) { |
| | | this.sWhere += " and 源单单号 like '%" + HSourceBillNo + "%'"; |
| | | this.sWhere += " and 源单单号 like '%" + this.queryParams.HSourceBillNo + "%'"; |
| | | } |
| | | if (this.queryParams.Warehouse) { |
| | | this.sWhere += " and 发货仓库 like '%" + Warehouse + "%'"; |
| | | this.sWhere += " and 发货仓库 like '%" + this.queryParams.Warehouse + "%'"; |
| | | } |
| | | if (this.queryParams.Hmaker) { |
| | | this.sWhere += " and 制单人 like '%" + Hmaker + "%'"; |
| | | this.sWhere += " and 制单人 like '%" + this.queryParams.Hmaker + "%'"; |
| | | } |
| | | if (this.queryParams.HUSEORGID) { |
| | | this.sWhere += " and HOrgID like '%" + HUSEORGID + "%'"; |
| | | this.sWhere += " and HOrgID like '%" + this.queryParams.HUSEORGID + "%'"; |
| | | } |
| | | this.getList(); |
| | | }, |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="长" prop="HMouldLength"> |
| | | <el-input v-model="form.HMouldLength" placeholder="请输入长" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="宽" prop="HMouldWidth"> |
| | | <el-input v-model="form.HMouldWidth" placeholder="请输入宽" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="高" prop="HMouldHeight"> |
| | | <el-input v-model="form.HMouldHeight" placeholder="请输入高" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="折叠高度" prop="HMouldFoldHeight"> |
| | | <el-input v-model="form.HMouldFoldHeight" placeholder="请输入折叠高度" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="周转容器标记" prop="HTransPackFlag"> |
| | | <el-checkbox v-model="form.HTransPackFlag"></el-checkbox> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="发货容器标记" prop="HSendPackFlag"> |
| | | <el-checkbox v-model="form.HSendPackFlag"></el-checkbox> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="制单信息" name="third"> |
| | | <el-row> |
| | |
| | | HNowSPName: '', |
| | | HMouldUseStatus: '', |
| | | HNextMainDate: '', |
| | | HUSEORGID: sessionStorage["OrganizationID"], |
| | | HCREATEORGID: sessionStorage["OrganizationID"], |
| | | HUSEORGID: sessionStorage["OrganizationID"] - 0, |
| | | HCREATEORGID: sessionStorage["OrganizationID"] - 0, |
| | | HMouldLength: '', |
| | | HMouldWidth: '', |
| | | HMouldHeight: '', |
| | | HMouldFoldHeight: '', |
| | | HTransPackFlag: 0, |
| | | HSendPackFlag: 0, |
| | | HMaker: sessionStorage["HUserName"], |
| | | HMakeDate: '', |
| | | HChecker: '', |
| | |
| | | this.form.HMouldUseStatus = data.模具可用状态 |
| | | this.form.HNextMainDate = data.校正日期 |
| | | this.form.HUSEORGID = data.HUSEORGID |
| | | this.form.HMouldLength = data.HMouldLength |
| | | this.form.HMouldWidth = data.HMouldWidth |
| | | this.form.HMouldHeight = data.HMouldHeight |
| | | this.form.HMouldFoldHeight = data.HMouldFoldHeight |
| | | this.form.HTransPackFlag = data.HTransPackFlag == 0 ? false : true |
| | | this.form.HSendPackFlag = data.HSendPackFlag == 0 ? false : true |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | this.editData.push( |
| | | { |
| | |
| | | }, |
| | | // 编辑提交保存 |
| | | submitForm() { |
| | | console.log(1) |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | let url = null |
| | |
| | | } else ( |
| | | url = '/Gy_Mould_Edit/AddBill' |
| | | ) |
| | | this.form.HTransPackFlag = this.form.HTransPackFlag == false ? 0 : 1 |
| | | this.form.HSendPackFlag = this.form.HSendPackFlag == false ? 0 : 1 |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | var mainTableMaintainRuleStr = JSON.stringify(this.maintainData); |
| | |
| | | }, |
| | | //选中行高亮样式 |
| | | rowStyle({ row, rowIndex }) { |
| | | if (this.ids.includes(row.HEmpID)) { |
| | | if (this.ids.includes(row.用户编码)) { |
| | | return { "background": "#ecf5ff" } |
| | | } |
| | | }, |
| | |
| | | Czybm: [ |
| | | { required: true, message: "编码不能为空!", trigger: "blur" } |
| | | ], |
| | | Czmm: [ |
| | | Czymc: [ |
| | | { required: true, message: "用户名不能为空!", trigger: "blur" } |
| | | ], |
| | | Czmm: [ |
| | | { required: true, message: "密码不能为空!", trigger: "blur" } |
| | | ], |
| | | Czyyz: [ |
| | | { required: true, message: "确认密码不能为空!", trigger: "blur" }, |
| | | { required: true, validator: equalToPassword, trigger: "blur" } |
| | | ], |
| | | HDept: [ |
| | | { required: true, message: "对应部门不能为空!", trigger: "blur" } |
| | | ], |
| | | HWHName: [ |
| | | { validator: equalToHWHName, trigger: "blur" } |
| | |
| | | this.formShow = false |
| | | this.$emit('editClose', false) |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | } else { |
| | | this.$modal.msgError(response.data.Message) |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |