Procházet zdrojové kódy

档案获取数据-参数更改

jingbb před 11 měsíci
rodič
revize
970676fbf8

+ 2 - 1
src/views/production/Popup/OperatorsPopup.vue

@@ -103,7 +103,8 @@
                     this.handleCancel()
                 }
             },
-            getData(){
+            getData(data){
+                this.queryParam.Org = data
                 getAction('/production/safetyStock/selectOperators',this.queryParam).then(res=>{
                         if(res.success){
                           this.dataSource = res.result.records

+ 2 - 1
src/views/production/Popup/deparmentPopup.vue

@@ -103,7 +103,8 @@
                     this.handleCancel()
                 }
             },
-            getData(){
+            getData(data){
+                this.queryParam.Org = data
                 getAction('/production/safetyStock/selectDepartment',this.queryParam).then(res=>{
                         if(res.success){
                           this.dataSource = res.result.records

+ 2 - 1
src/views/production/Popup/inventoryPopup.vue

@@ -124,8 +124,9 @@
                     this.handleCancel()
                 }
             },
-            getData(){
+            getData(data){
                 this.loading = true 
+                this.queryParam.Org = data
                 getAction('/production/safetyStock/selectItemMaster',this.queryParam).then(res=>{
                         if(res.success){
                           this.dataSource = res.result.records

+ 2 - 2
src/views/production/Popup/inventoryTypePopup.vue

@@ -90,8 +90,8 @@
                     this.handleCancel()
                 }
             },
-            getData(){
-                getAction('/production/safetyStock/selectCategory').then(res=>{
+            getData(data){
+                getAction('/production/safetyStock/selectCategory',{Org:data}).then(res=>{
                         if(res){
                           this.dataSource = res
                         }else{

+ 2 - 1
src/views/production/Popup/projectPopup.vue

@@ -109,7 +109,8 @@
                     this.handleCancel()
                 }
             },
-            getData(){
+            getData(data){
+                this.queryParam.Org = data
                 getAction('/production/safetyStock/selectProject',this.queryParam).then(res=>{
                         if(res.success){
                           this.dataSource = res.result.records

+ 36 - 15
src/views/production/materialprocurement/modules/materialProcurementAdd.vue

@@ -14,7 +14,7 @@
                 <a-row :gutter="24">
                     <a-col :md="4" :sm="24">
                         <a-form-item label="生产组织">
-                            <a-input-search placeholder="请输入" v-model="form.productionOrg" @search="onSearchPlanOrg" readOnly></a-input-search>
+                            <a-input-search placeholder="请输入" v-model="form.orgName" @search="onSearchPlanOrg" readOnly></a-input-search>
                         </a-form-item>
                     </a-col>
                     <a-col  :md="4" :sm="24">
@@ -29,7 +29,7 @@
                     </a-col>
                    <a-col :md="4" :sm="24">
                         <a-form-item label="单据状态">
-                            <a-select v-model="form.state"  style='width:100%' >
+                            <a-select v-model="form.state"  style='width:100%' disabled>
                                 <a-select-option value='开立'> 开立</a-select-option>
                                 <a-select-option value='审核'> 审核</a-select-option>
                                 <a-select-option value='已运算'> 已运算</a-select-option>
@@ -359,7 +359,6 @@
                     align:"center",
                     dataIndex: 'attribute',
                     ellipsis: true,
-                    scopedSlots: { customRender: 'attribute' } 
                 },
                 {
                     title: '计量单位',
@@ -406,7 +405,6 @@
                     align:"center",
                     dataIndex: 'model',
                     ellipsis: true,
-                    scopedSlots: { customRender: 'model' } 
                 },
                 {
                     title: '颜色',
@@ -652,21 +650,38 @@
                 this.dataSource.unshift({rowNo: this.dataSource.length+1,projectCode:this.form.projectCode,projectName:this.form.projectName,rate:''})
             },
             onSearchProject(){
-                this.$refs.projectPopup.visible = true
-                this.$refs.projectPopup.getData()
+                if(this.form.orgName&&this.form.orgName!==''){
+                    this.$refs.projectPopup.visible = true
+                    this.$refs.projectPopup.getData(this.form.planOrg)
+                }else{
+                    this.$message.warning("请选择组织!")
+                }
             },
             onSearchDept(){
-                this.$refs.deparmentPopup.visible = true
-                this.$refs.deparmentPopup.getData()
+                if(this.form.orgName&&this.form.orgName!==''){
+                    this.$refs.deparmentPopup.visible = true
+                    this.$refs.deparmentPopup.getData(this.form.planOrg)
+                }else{
+                    this.$message.warning("请选择组织!")
+                }
+                
             },
             onSearchPerson(){
-                this.$refs.OperatorsPopup.visible = true
-                this.$refs.OperatorsPopup.getData()
+                if(this.form.orgName&&this.form.orgName!==''){
+                    this.$refs.OperatorsPopup.visible = true
+                    this.$refs.OperatorsPopup.getData(this.form.planOrg)
+                }else{
+                    this.$message.warning("请选择组织!")
+                }
             },
             onSearchInventory(record){
-                this.$refs.inventoryPopup.visible = true
-                this.$refs.inventoryPopup.getData()
-                this.$refs.inventoryPopup.record=record
+                if(this.form.orgName&&this.form.orgName!==''){
+                    this.$refs.inventoryPopup.visible = true
+                    this.$refs.inventoryPopup.getData(this.form.planOrg )
+                    this.$refs.inventoryPopup.record=record
+                }else{
+                    this.$message.warning("请选择组织!")
+                }
             },
             okData(data){
                 this.$set(this.form,'projectCode',data.Code)
@@ -690,18 +705,24 @@
               this.$set(recoerd,'inventoryCode',data.Code)
               this.$set(recoerd,'inventoryName',data.Name)
               this.$set(recoerd,'specs',data.SPECS)
-              this.$set(recoerd,'unit',data.unit)
+              this.$set(recoerd,'attribute',data.Code1 )
+              this.$set(recoerd,'unit',data.unit )
               this.$set(recoerd,'auxiliaryUnit',data.auxiliaryUnit )
               this.$set(recoerd,'inventory',data.ID )
+              
             },
             okDataDeparment(data){
                 this.$set(this.form,'planDept',data.Name)
+                this.$set(this.form,'planDeptId',data.ID)
             },
             okDataOperators(data){
                 this.$set(this.form,'salesperson',data.Name)
+                this.$set(this.form,'salespersonId',data.ID)
             },
             okDataOrganization(data){
-                this.$set(this.form,'productionOrg',data.Name)
+                this.$set(this.form,'orgName',data.Name)
+                this.$set(this.form,'orgCode',data.Code)
+                this.$set(this.form,'planOrg',data.ID)
             },
             delectRow(){
                 if( this.selectedRowKeys.length==0){

+ 4 - 4
src/views/production/safetyStock/modules/safetyStockListAdd.vue

@@ -14,7 +14,7 @@
               <a-row :gutter="24">
                 <a-col :md="8" :sm="24">
                   <a-form-model-item label="组织"  prop='pkOrg' :labelCol="{offset: 2}">
-                    <a-input-search placeholder="请输入" v-model="form.pkOrg" @search="onSearchPlanOrg" readOnly></a-input-search>
+                    <a-input-search placeholder="请输入" v-model="form.orgName" @search="onSearchPlanOrg" readOnly></a-input-search>
                   </a-form-model-item>
                 </a-col>
                 <a-col :md="8" :sm="24">
@@ -151,8 +151,8 @@
                 this.$refs.organizationPopup.getData()
             },
             okDataOrganization(data){
-                this.$set(this.form,'pkOrg',data.Name)
-                this.$set(this.form,'Org',data.ID)
+                this.$set(this.form,'orgName',data.Name)
+                this.$set(this.form,'pkOrg',data.ID)
                 this.$set(this.form,'orgCode',data.Code)
                 this.$refs.form.clearValidate()
                 console.log(this.form);
@@ -170,7 +170,7 @@
             onSearchInvebtory(){
               if(this.form.pkOrg&&this.form.pkOrg!==''){
                 this.$refs.inventoryPopup.visible = true
-                this.$refs.inventoryPopup.getData()
+                this.$refs.inventoryPopup.getData(this.form.pkOrg)
               }else{
                 this.$message.warning('请选择组织!')
               }