From 3b215d048bf49b3019c70e80ff7dbd7ebd5869a4 Mon Sep 17 00:00:00 2001 From: chenjianan Date: Fri, 23 Nov 2018 09:48:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E8=BE=BE=E4=BB=B6=EF=BC=9A=E6=94=B9?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E6=97=A0=E6=95=88=EF=BC=8C?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A2=86=E7=94=A8=E8=80=85=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Inventory/DirectPart.js | 6 ++--- src/views/Inventory/DirectPart/index.vue | 32 ++++++++++-------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/api/Inventory/DirectPart.js b/src/api/Inventory/DirectPart.js index e5719d16..29b413fc 100644 --- a/src/api/Inventory/DirectPart.js +++ b/src/api/Inventory/DirectPart.js @@ -59,14 +59,14 @@ export function searchContractDetail(contractnumber) { }) } // 直达件查询 -export function searchDirectPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group, contract) { +export function searchDirectPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group, contract_check, contract) { return request({ url: '', method: 'post', data: { type: '1', name: '库存管理_直达件_零件查询', - param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group + '&合同流水号=' + contract, + param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group + '&合同流水号_check=' + contract_check + '&合同流水号=' + contract, Pagination: pageCurrent + '&' + pageSize } }) @@ -79,7 +79,7 @@ export function searchPeople() { data: { type: '1', name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', - param: '考核部门编号=' + 18 + param: '考核部门编号=18' } }) } diff --git a/src/views/Inventory/DirectPart/index.vue b/src/views/Inventory/DirectPart/index.vue index 22dcde9c..efda0f78 100644 --- a/src/views/Inventory/DirectPart/index.vue +++ b/src/views/Inventory/DirectPart/index.vue @@ -268,9 +268,8 @@ export default { this.PeopleNumber = this.id }, searchMachine() { // 查询机床 - if (this.ProjectValue === '') { - this.ProjectValue_check = 0 - } + this.Machine = [] + this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0 searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => { for (let i = 0; i < response.data.length; i++) { this.Machine.push({ @@ -281,6 +280,7 @@ export default { }) }, searchGroupList() { // 查询组号 + this.GroupNum = [] searchTeam(this.MachineValue).then(response => { for (let i = 0; i < response.data.length; i++) { this.GroupNum.push({ @@ -291,16 +291,19 @@ export default { }) }, searchPeopleData() { // 查询人员 + this.People = [] searchPeople().then(response => { for (let i = 0; i < response.data.length; i++) { this.People.push({ label: response.data[i].姓名, - value: response.data[i].考勤编号 + value: parseInt(response.data[i].考勤编号) }) } + console.log(this.People) }) }, searchContractData() { // 查询合同 + this.Contract = [] searchContract().then(response => { for (let i = 0; i < response.data.length; i++) { this.Contract.push({ @@ -312,18 +315,10 @@ export default { }, searchPartinfo() { this.tableDataPurchase = [] - if (this.ProjectValue === '') { - this.ProjectValue_check = 0 - } - if (this.MachineValue === '') { - this.MachineValue_check = 0 - } - if (this.GroupNumValue === '') { - this.GroupNumValue_check = 0 - } - if (this.ContractValue === '') { - this.ContractValue_check = 0 - } + this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0 + this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0 + this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0 + this.ContractValue ? this.ContractValue_check = 1 : this.ContractValue_check = 0 this.listLoading = true searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => { this.tableDataPurchase = response.data.rows @@ -349,8 +344,7 @@ export default { // 打开直达件表单 addDirect(row) { this.PeopleValue = '' - this.form = [] - console.log(row) + this.form = {} this.dialogFormVisible = true this.materialNum = row.物料流水号 this.purchaseContractNumber = row.采购合同明细流水号 @@ -367,7 +361,7 @@ export default { this.dialogFormVisible1 = true this.directPartNumber = row.直达件流水号 this.form.DirectNumber = row.到货数量 - this.PeopleValue = row.领用人员流水号 + this.PeopleValue = parseInt(row.领用人员流水号) this.form.DirectNote = row.备注 }, // 修改直达件