Pārlūkot izejas kodu

Merge branch 'master' of git.echepei.com:wengyuwen/anpinjingyuan-ui

caojunjie 4 gadi atpakaļ
vecāks
revīzija
060e54a255

+ 2 - 2
src/combination/listComponent.vue

@@ -191,8 +191,8 @@ export default {
   },
   methods: {
     //下拉数据变动时触发
-    change(){
-      this.$emit('change')
+    change(scope){
+      this.$emit('change',scope)
     },
     //输入框数据变动时触发
     totalAmount(scope){

+ 3 - 0
src/views/basicdata/fees/index.vue

@@ -594,6 +594,8 @@ export default {
       rules: {
         fNo: [{ required: true, message: "编号不能为空", trigger: "blur" }],
         fName: [{ required: true, message: "名称不能为空", trigger: "blur" }],
+        fFeetype: [{ required: true, message: "物料类别不能为空", trigger: "blur" }],
+        fFeeunitid: [{ required: true, message: "计量单位不能为空", trigger: "blur" }],
       },
       showSetting: false,
       drag: false,
@@ -676,6 +678,7 @@ export default {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
     this.getDicts("data_cost_attribute").then((response) => {
+      console.log(response)
       this.fFeetypeOptions = response.data;
     });
     this.getDicts("document_status").then((response) => {

+ 10 - 1
src/views/project/index1.vue

@@ -466,7 +466,7 @@
             :fixed="item.fixed"
           >
             <template slot-scope="scope">
-              <el-select v-if="item.label == 'fMaterial'" :disabled="doNot" v-model="scope.row.fMaterial" placehoder="111请输入">
+              <el-select v-if="item.label == 'fMaterial'" @change="change" :disabled="doNot" v-model="scope.row.fMaterial" placehoder="111请输入">
                 <el-option
                 v-for="item in materialOption"
                 :key="item.fId"
@@ -822,6 +822,15 @@ export default {
 
   },
   methods: {
+    change(scope){
+      for(let item in this.detailList){
+        for(let li in this.materialOption){
+          if(this.detailList[item].fMaterial == this.materialOption[li].fId){
+            this.$set(this.detailList[item],'fMeasure',JSON.stringify(this.materialOption[li].fFeeunitid))
+          }
+        }
+      }
+    },
     addOrUpdateHand() {
       this.addOrUpdateVisib = true;
       this.$nextTick(() => {

+ 18 - 8
src/views/purchaseIssue/index.vue

@@ -64,6 +64,7 @@
         @getList="getList"
         @deletRows="deletRows"
         @totalAmount="totalAmount"
+        @change="change"
         :tatolLabel="tatolLabel"
         :isItHidden="isItHidden"
         :customButton="contentButton"
@@ -417,7 +418,8 @@ export default {
           size: 'mini',
           icon: 'el-icon-edit',
           name: '新增',
-          disabled: false
+          disabled: false,
+          hasPermi:['warehouseBusiness:inStock:export']
         },
         // {
         //   type:'warning',
@@ -431,13 +433,15 @@ export default {
           size: 'mini',
           icon: 'el-icon-upload2',
           name: '导出',
-          disabled: false
+          disabled: false,
+          hasPermi:['warehouseBusiness:inStock:export']
         }, {
           type: 'success',
           size: 'mini',
           icon: 'el-icon-c-scale-to-original',
           name: '复制新增',
-          disabled: false
+          disabled: false,
+          hasPermi:['warehouseBusiness:inStock:export']
         }
       ],
       contentButton: [
@@ -671,11 +675,13 @@ export default {
     this.getRow(data)
     this.query(this.formDataList)
     productName().then(res => {
+      console.log(res)
       if (res.code === 200) {
         for (let item in res.rows) {
           this.listData.fFeeid.push({
             label: res.rows[item].fName,
-            value: res.rows[item].fId
+            value: res.rows[item].fId,
+            fFeeunitid: res.rows[item].fFeeunitid
           })
         }
       }
@@ -728,10 +734,14 @@ export default {
     this.fCompany(2)
   },
   methods: {
-    change(){
-      // if(){
-      //
-      // }
+    change(scope){
+      for(let item in this.contentList){
+        for(let li in this.listData.fFeeid){
+          if(this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
+            this.$set(this.contentList[item],'fFeeunitid',this.listData.fFeeid[li].fFeeunitid)
+          }
+        }
+      }
     },
     homePage(){
       let date = this.$route.query

+ 14 - 1
src/views/purchaseRequest/index.vue

@@ -64,6 +64,7 @@
         @getList="getList"
         @deletRows="deletRows"
         @totalAmount="totalAmount"
+        @change="change"
         :hasPermi="hasPermi"
         :tatolLabel="tatolLabel"
         :isItHidden="isItHidden"
@@ -712,7 +713,8 @@ export default {
         for (let item in res.rows) {
           this.listData.fFeeid.push({
             label: res.rows[item].fName,
-            value: res.rows[item].fId
+            value: res.rows[item].fId,
+            fFeeunitid: res.rows[item].fFeeunitid
           })
         }
         console.log(this.listData)
@@ -762,6 +764,17 @@ export default {
     this.fCompany(2)
   },
   methods: {
+    change(scope){
+      console.log(this.contentList)
+      for(let item in this.contentList){
+        for(let li in this.listData.fFeeid){
+          if(this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
+            console.log("111")
+            this.$set(this.contentList[item],'fFeeunitid',this.listData.fFeeid[li].fFeeunitid)
+          }
+        }
+      }
+    },
     homePage(){
       let date = this.$route.query
       console.log(date)

+ 29 - 10
src/views/warehouse/inStock/index.vue

@@ -63,6 +63,7 @@
         @deletRows="deletRows"
         @feedback="feedback"
         @totalAmount="totalAmount"
+        @change="change"
         :seachButton="confirmButton"
         :customButton="detailButton"
         :listStyle="detailStyle"
@@ -627,7 +628,7 @@ export default {
           index:'6',
           span:6,
           label: 'fSbu',
-          name:"出票单位",
+          name:"开票公司",
           form:1,
           width:200,
           labelSize:'80',
@@ -666,19 +667,22 @@ export default {
           icon:'el-icon-plus',
           name:'新增',
           disabled:false,
+          hasPermi:['warehouseBusiness:inStock:export']
         },{
           type:'success',
           size:'mini',
           icon:'el-icon-edit',
           name:'修改',
           res:0,
-          disabled:true
+          disabled:true,
+          hasPermi:['warehouseBusiness:inStock:export']
         },{
           type:'info',
           size:'mini',
           icon:'el-icon-plus',
           name:'复制新增',
-          disabled:true
+          disabled:true,
+          hasPermi:['warehouseBusiness:inStock:export']
         },
       ],
       seachButton:[
@@ -784,6 +788,15 @@ export default {
     this.selectMethods()
   },
   methods:{
+    change(scope){
+      for(let item in this.detailData){
+        for(let li in this.listData.fFeeid){
+          if(this.detailData[item].fFeeid == this.listData.fFeeid[li].value){
+            this.$set(this.detailData[item],'fFeeunitid',JSON.stringify(this.listData.fFeeid[li].fFeeunitid))
+          }
+        }
+      }
+    },
     //确认打印
     Printing(){
       this.$print(this.$refs.print)
@@ -880,7 +893,8 @@ export default {
 
             }
           })
-        }else if(this.detailOption[li].name == '供应商'){
+        }
+        if(this.detailOption[li].name == '供应商'){
           //获取供应商
           let queryParams = { pageNum: 1, fTypeid: 1}
           getustomer(queryParams).then(res => {
@@ -891,10 +905,12 @@ export default {
               })
             }
           })
-        }else if(this.detailOption[li].name == '付款单位'){
+        }
+        if(this.detailOption[li].name == '开票公司'){
           //获取付款单位
-          let queryParams = { pageNum: 1, fTypeid: 1}
+          let queryParams = { pageNum: 1, fTypeid: 2}
           getustomer(queryParams).then(res => {
+            console.log(res)
             for(let item in res.data){
               this.detailOption[li].data.push({
                 label:res.data[item].fName,
@@ -902,7 +918,8 @@ export default {
               })
             }
           })
-        }else if(this.detailOption[li].name == '库管员'){
+        }
+        if(this.detailOption[li].name == '库管员'){
           let queryParams = { pageNum: 1,roleName:'库管'}
           getWarehousekeeper(queryParams).then(res=>{
             for(let item in res.rows){
@@ -912,7 +929,8 @@ export default {
               })
             }
           })
-        }else if(this.detailOption[li].name == '采购人'){
+        }
+        if(this.detailOption[li].name == '采购人'){
           getliable().then((res) => {
             console.log(res)
             for(let item in res.rows){
@@ -973,7 +991,8 @@ export default {
         for(let item in res.rows){
           this.listData.fFeeid.push({
             label:res.rows[item].fName,
-            value:res.rows[item].fId
+            value:res.rows[item].fId,
+            fFeeunitid: res.rows[item].fFeeunitid
           })
         }
       })
@@ -1194,7 +1213,7 @@ export default {
           fFeeid:null,
           fUnitprice:null,
           fQty:null,
-          fFeeunitid:'1',
+          fFeeunitid:null,
           fWarehouseid:null,
           fAmount:null,
           fStltypeid:'1',

+ 20 - 6
src/views/warehouse/outStock/index.vue

@@ -63,6 +63,7 @@
         @deletRows="deletRows"
         @feedback="feedback"
         @totalAmount="totalAmount"
+        @change="change"
         :seachButton="confirmButton"
         :customButton="detailButton"
         :listStyle="detailStyle"
@@ -627,7 +628,7 @@ export default {
           index:'6',
           span:6,
           label: 'fSbu',
-          name:"付款单位",
+          name:"开票公司",
           form:1,
           width:200,
           labelSize:'80',
@@ -666,19 +667,22 @@ export default {
           icon:'el-icon-plus',
           name:'新增',
           disabled:false,
+          hasPermi:['warehouseBusiness:inStock:export']
         },{
           type:'success',
           size:'mini',
           icon:'el-icon-edit',
           name:'修改',
           res:0,
-          disabled:true
+          disabled:true,
+          hasPermi:['warehouseBusiness:inStock:export']
         },{
           type:'info',
           size:'mini',
           icon:'el-icon-plus',
           name:'复制新增',
-          disabled:true
+          disabled:true,
+          hasPermi:['warehouseBusiness:inStock:export']
         },
       ],
       seachButton:[
@@ -784,6 +788,15 @@ export default {
     this.selectMethods()
   },
   methods:{
+    change(scope){
+      for(let item in this.detailData){
+        for(let li in this.listData.fFeeid){
+          if(this.detailData[item].fFeeid == this.listData.fFeeid[li].value){
+            this.$set(this.detailData[item],'fFeeunitid',JSON.stringify(this.listData.fFeeid[li].fFeeunitid))
+          }
+        }
+      }
+    },
     //确认打印
     Printing(){
       this.$print(this.$refs.print)
@@ -891,7 +904,7 @@ export default {
               })
             }
           })
-        }else if(this.detailOption[li].name == '付款单位'){
+        }else if(this.detailOption[li].name == '开票公司'){
           //获取付款单位
           let queryParams = { pageNum: 1, fTypeid: 1}
           getustomer(queryParams).then(res => {
@@ -974,7 +987,8 @@ export default {
         for(let item in res.rows){
           this.listData.fFeeid.push({
             label:res.rows[item].fName,
-            value:res.rows[item].fId
+            value:res.rows[item].fId,
+            fFeeunitid: res.rows[item].fFeeunitid
           })
         }
       })
@@ -1195,7 +1209,7 @@ export default {
           fFeeid:null,
           fUnitprice:null,
           fQty:null,
-          fFeeunitid:'1',
+          fFeeunitid:null,
           fWarehouseid:null,
           fAmount:null,
           fStltypeid:'1',