Browse Source

新增收付方向

wengyuwen 4 năm trước cách đây
mục cha
commit
c798dfd517

+ 19 - 2
src/views/agreement/agreementTask/index.vue

@@ -317,7 +317,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="费用类型" prop="fDc">
-          <el-select v-model="form.fDc" placeholder="请选择费用类型" :disabled="browseStatus">
+          <el-select v-model="form.fDc" @change="changefDc" placeholder="请选择费用类型" :disabled="browseStatus">
             <el-option label="收" value="D"></el-option>
             <el-option label="付" value="C"></el-option>
           </el-select>
@@ -601,6 +601,21 @@ export default {
     this.adoPt()
   },
   methods: {
+    changefDc(){
+      if(this.form.fDc === 'D'){
+        console.log("111")
+        let queryParams = { pageNum: 1, pageSize: 10, fDc:'D'};
+        listFees(queryParams).then((response) => {
+          this.fWbuOptions = response.rows;
+        });
+      }else if(this.form.fDc === 'C'){
+        console.log("222")
+        let queryParams = { pageNum: 1, pageSize: 10, fDc:'C'};
+        listFees(queryParams).then((response) => {
+          this.fWbuOptions = response.rows;
+        });
+      }
+    },
     // 默认录入人
     register() {
       queryUserVal().then((response)=>{
@@ -930,7 +945,8 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      let fDc = this.form.fDc
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name, fDc:fDc};
       listFees(queryParams).then((response) => {
         this.fWbuOptions = response.rows
       });
@@ -971,6 +987,7 @@ export default {
         this.deptName = response.dept.deptName
         this.form.fDeptid = response.dept.deptId
       });
+      this.changefDc()
     },
     /** 修改按钮操作 */
     handleUpdate(row,num) {

+ 17 - 4
src/views/basicdata/corps/index.vue

@@ -109,7 +109,7 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column
         :show-overflow-tooltip="true"
-        label="客户类别" align="center" prop="fTypeid" :formatter="fTypeidFormat" />
+        label="客户类别" align="center" prop="fTypename"  />
       <el-table-column label="编号" align="center" prop="fNo" />
       <el-table-column
         :show-overflow-tooltip="true"
@@ -184,7 +184,7 @@
         <el-row>
           <el-col :span="8">
             <el-form-item label="客户类别" prop="fTypeid">
-              <el-select style="width: 250px" v-model="form.fTypeid" multiple placeholder="请选择客户类别">
+              <el-select style="width: 250px" v-model="form.fTypeid" :multiple="true" placeholder="请选择客户类别">
                 <el-option
                   v-for="dict in fTypeidOptions"
                   :key="dict.dictValue"
@@ -468,6 +468,7 @@
 <script>
   import { listCorps, getCorps, delCorps, addCorps, updateCorps, changeCorpsStatus,exportCorps } from "@/api/basicdata/corps";
   import {queryUserVal} from "@/api/system/user";
+  import { isArray } from '@/utils/validate'
 
   export default {
     name: "Corps",
@@ -700,10 +701,9 @@
         this.reset();
         const fId = row.fId || this.ids
         getCorps(fId).then(response => {
-          console.log(this.form)
           this.form = response.data["corp"];
-          console.log(this.form)
           var contactList1=response.data["customerContact"];
+          this.form.fTypeid = this.form.fTypeid.replace(/\[|]/g,'').replace(/\"/g, "").split(",")
           if(contactList1!=null){
             this.contactList=contactList1;
           }else {
@@ -715,10 +715,23 @@
       },
       /** 提交按钮 */
       submitForm() {
+        this.form.fTypename = ''
         this.$refs["form"].validate(valid => {
           if (valid) {
             if (this.form.fId != null) {
               let formDate= new FormData()
+              console.log(this.fTypeidOptions)
+            for (let index in this.fTypeidOptions){
+              for (let item in this.form.fTypeid){
+                if (this.fTypeidOptions[index].dictValue == this.form.fTypeid[item]){
+                  console.log(this.form.fTypename)
+                  console.log(this.fTypeidOptions[index].dictValue,this.form.fTypeid[item])
+                  this.form.fTypename += this.fTypeidOptions[item].dictLabel + ','
+                }
+              }
+            }
+              this.form.fTypename = this.form.fTypename.substring(0,this.form.fTypename.length-1)
+            console.log(this.form)
               formDate.append('corps',JSON.stringify(this.form));
               formDate.append('customerContacts',JSON.stringify(this.contactList));
               addCorps(formDate).then(response => {

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

@@ -122,6 +122,13 @@
       <el-table-column label="编号" align="center" prop="fNo" :show-overflow-tooltip="true" />
       <el-table-column label="名称" align="center" prop="fName" :show-overflow-tooltip="true" />
       <el-table-column label="费用属性" align="center" prop="fFeetype" :formatter="fFeetypeFormat"  />
+      <el-table-column label="收付方向" align="center" prop="fDc">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fDc === 'D'">收</span>
+          <span v-if="scope.row.fDc === 'C'">付</span>
+          <span v-if="scope.row.fDc === 'DC'">收付</span>
+        </template>
+      </el-table-column>
       <el-table-column label="计量单位" align="center" prop="fFeeunitid" :formatter="fFeeunitidFormat" />
       <el-table-column label="币种" align="center" prop="fCurrency" :show-overflow-tooltip="true"  />
       <el-table-column label="状态" align="center" prop="fStatus" :formatter="statusFormat" />
@@ -216,6 +223,15 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="收付方向">
+              <el-select v-model="form.fDc" placeholder="">
+                <el-option label="收" value="D"/>
+                <el-option label="付" value="C"/>
+                <el-option label="收付" value="DC"/>
+              </el-select>
+            </el-form-item>
+          </el-col>
         </el-row>
 
         <el-form-item label="备注" prop="remark">

+ 1 - 2
src/views/reportManagement/Statistics/index.vue

@@ -463,7 +463,6 @@ export default {
     /** 查询库存总账列表 */
     getList() {
       this.loading = true;
-      console.log(this.queryParams)
       listWhgenleg(this.queryParams).then(response => {
         this.whgenlegList = response.rows;
         this.total = response.total;
@@ -544,7 +543,7 @@ export default {
         fMarks: null,
         fBusinessType:null,
         fBusinessTypes:null,
-        fBilltype:null,
+        fBilltype:'SJRK',
         fwarehouseid:null
       }
       // this.resetForm("queryForm");

+ 14 - 2
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -1086,7 +1086,7 @@
               placeholder="费用名称"
             >
               <el-option
-                v-for="(dict, index) in fWbuOptions"
+                v-for="(dict, index) in fDNameOptions"
                 :key="index.fId"
                 :label="dict.fName"
                 :value="dict.fId"
@@ -1393,7 +1393,7 @@
               placeholder="费用名称"
             >
               <el-option
-                v-for="(dict, index) in fWbuOptions"
+                v-for="(dict, index) in fCNameOptions"
                 :key="index.fId"
                 :label="dict.fName"
                 :value="dict.fId"
@@ -1777,6 +1777,8 @@
     },
     data() {
       return {
+        fDNameOptions:[],
+        fCNameOptions:[],
         activeNames:['1'],
         //仓库树状图
         warehousesOptions:[],
@@ -2359,6 +2361,10 @@
           fProductName:this.form.fProductName,
           fMarks:this.form.fMarks
         })
+        let queryParams = { pageNum: 1, pageSize: 10, fDc:'D' }
+        listFees(queryParams).then((response) => {
+          this.fDNameOptions = response.rows;
+        })
       },
       addpayment() {
         // 获取明细件数
@@ -2384,6 +2390,10 @@
           fProductName:this.form.fProductName,
           fMarks:this.form.fMarks
         })
+        let queryParams = { pageNum: 1, pageSize: 10, fDc:'C' }
+        listFees(queryParams).then((response) => {
+          this.fCNameOptions = response.rows;
+        })
       },
       queryUser() {
         queryUserVal().then((response) => {
@@ -3240,6 +3250,8 @@
         let queryParams = { pageNum: 1, pageSize: 10, fName: name }
         listFees(queryParams).then((response) => {
           this.fWbuOptions = response.rows
+          this.fDNameOptions = response.rows;
+          this.fCNameOptions = response.rows;
         })
       },
       /* 远程模糊查询经营单位 */

+ 13 - 8
src/views/warehouseBusiness/inStock/index.vue

@@ -1743,7 +1743,7 @@
                   placeholder="费用名称"
                 >
                   <el-option
-                    v-for="(dict, index) in fWbuOptions"
+                    v-for="(dict, index) in fDNameOptions"
                     :key="index.fId"
                     :label="dict.fName"
                     :value="dict.fId"
@@ -2086,7 +2086,7 @@
                   placeholder="费用名称"
                 >
                   <el-option
-                    v-for="(dict, index) in fWbuOptions"
+                    v-for="(dict, index) in fCNameOptions"
                     :key="index.fId"
                     :label="dict.fName"
                     :value="dict.fId"
@@ -3048,6 +3048,8 @@ export default {
   },
   data() {
     return {
+      fDNameOptions:[],
+      fCNameOptions:[],
       businessType:'',
       dataListFaddr:'',
       information:'',
@@ -3971,9 +3973,9 @@ export default {
           fBusinessType:this.form.fBusinessType
         });
           this.fWbuOptions = []
-          let queryParams = { pageNum: 1, pageSize: 10};
+          let queryParams = { pageNum: 1, pageSize: 10, fDc:'D'};
           listFees(queryParams).then((response) => {
-            this.fWbuOptions = response.rows;
+            this.fDNameOptions = response.rows;
           });
       }
     },
@@ -4001,9 +4003,9 @@ export default {
           fBusinessType: this.form.fBusinessType
         });
         this.fWbuOptions = []
-        let queryParams = { pageNum: 1, pageSize: 10};
+        let queryParams = { pageNum: 1, pageSize: 10,fDc:'C'};
         listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          this.fCNameOptions = response.rows;
         });
       }
     },
@@ -4460,7 +4462,8 @@ export default {
     handleAdd(status) {
       let queryParams = {pageNum: 1, pageSize: 10};
       listFees(queryParams).then((response) => {
-        this.fWbuOptions = response.rows;
+        this.fDNameOptions = response.rows;
+        this.fCNameOptions = response.rows;
       });
       this.reset()
       this.form = {
@@ -5559,7 +5562,9 @@ export default {
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       listFees(queryParams).then((response) => {
-        this.fWbuOptions = response.rows;
+        this.fDNameOptions = response.rows;
+        this.fCNameOptions = response.rows;
+        this.fWbuOptions = response.rows
       });
     },
     /* 远程模糊查询劳务公司 */

+ 11 - 19
src/views/warehouseBusiness/outStock/index.vue

@@ -1551,7 +1551,7 @@
                   placeholder="费用名称"
                 >
                   <el-option
-                    v-for="(dict, index) in fWbuOptions"
+                    v-for="(dict, index) in fDNameOptions"
                     :key="index.fId"
                     :label="dict.fName"
                     :value="dict.fId"
@@ -1897,7 +1897,7 @@
                   placeholder="费用名称"
                 >
                   <el-option
-                    v-for="(dict, index) in fWbuOptions"
+                    v-for="(dict, index) in fCNameOptions"
                     :key="index.fId"
                     :label="dict.fName"
                     :value="dict.fId"
@@ -2818,6 +2818,8 @@ export default {
   },
   data() {
     return {
+      fDNameOptions:[],
+      fCNameOptions:[],
       closeButton:true,
       businessType:'',
       fCartype:'',
@@ -3675,10 +3677,6 @@ export default {
             }
           }
         }
-        // if (!haveGoods) {
-        //   console.log("111")
-        //
-        // }
         getFees(feeId).then((response) => {
           this.fWbuOptions = []
           let queryParams = { pageNum: 1, pageSize: 10 };
@@ -4064,9 +4062,9 @@ export default {
           fBusinessType: this.form.fBusinessType
         });
         this.fWbuOptions = []
-        let queryParams = { pageNum: 1, pageSize: 10};
+        let queryParams = { pageNum: 1, pageSize: 10,fDc:'D'};
         listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          this.fDNameOptions = response.rows;
         });
       }
     },
@@ -4101,9 +4099,9 @@ export default {
           fBusinessType: this.form.fBusinessType
         });
         this.fWbuOptions = []
-        let queryParams = { pageNum: 1, pageSize: 10};
+        let queryParams = { pageNum: 1, pageSize: 10, fDc:'C'};
         listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          this.fCNameOptions = response.rows;
         });
       }
     },
@@ -4152,7 +4150,6 @@ export default {
       this.whgenlegParams.fWarehouseid = this.form.fWarehouseid;
       this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
       listWhgenleg(this.whgenlegParams).then((response) => {
-        console.log(response)
         this.whgenlegList = response.rows;
         this.whgenlegTotal = response.total;
       });
@@ -4650,8 +4647,6 @@ export default {
         if (valid) {
           let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
           let formData = new window.FormData();
-          console.log(this.dataListSelection)
-          console.log(this.form)
           formData.append("warehouseBills", JSON.stringify(this.form));
           formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
           formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
@@ -4809,7 +4804,6 @@ export default {
           this.$refs.tableList.clearSelection();
           if (dataList.length !== 0) {
             let formData = new window.FormData();
-            console.log(this.form)
             formData.append("warehouseBills", JSON.stringify(this.form));
             formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
             formData.append("warehousebillsitems", JSON.stringify(this.dataList));
@@ -4914,7 +4908,6 @@ export default {
         if (valid) {
           let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
           let formData = new window.FormData()
-          console.log(this.form)
           formData.append("warehouseBills", JSON.stringify(this.form));
           formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
           formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
@@ -5054,7 +5047,6 @@ export default {
               }
             })
           }, 200);
-          console.log(this.form)
         }
       })
     },
@@ -5106,9 +5098,7 @@ export default {
         for(let item in this.warehouseDrList) {
           if (!this.warehouseDrList[item].fCorpid) {
             if (item === 'fBusinessType') {
-              console.log(item)
             } else {
-              console.log(this.warehouseDrList[item].fCorpid)
               this.$message.error("请维护收款信息第" + (Number(item) + 1) + "行客户名称")
               return false
             }
@@ -5329,7 +5319,9 @@ export default {
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       listFees(queryParams).then((response) => {
-        this.fWbuOptions = response.rows;
+        this.fDNameOptions = response.rows;
+        this.fCNameOptions = response.rows;
+        this.fWbuOptions = response.rows
       });
     },
     /* 远程模糊查询经营单位 */

+ 10 - 6
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -1502,7 +1502,7 @@
                   placeholder="费用名称"
                 >
                   <el-option
-                    v-for="(dict, index) in fWbuOptions"
+                    v-for="(dict, index) in fDNameOptions"
                     :key="index.fId"
                     :label="dict.fName"
                     :value="dict.fId"
@@ -1841,7 +1841,7 @@
                   placeholder="费用名称"
                 >
                   <el-option
-                    v-for="(dict, index) in fWbuOptions"
+                    v-for="(dict, index) in fCNameOptions"
                     :key="index.fId"
                     :label="dict.fName"
                     :value="dict.fId"
@@ -2695,6 +2695,8 @@ export default {
   },
   data() {
     return {
+      fCNameOptions:[],
+      fDNameOptions:[],
       businessType:'',
       fBstime:'',
       fPackagespecs: "",
@@ -3779,9 +3781,9 @@ export default {
           fBusinessType: this.form.fBusinessType
         });
         this.fWbuOptions = []
-        let queryParams = { pageNum: 1, pageSize: 10};
+        let queryParams = { pageNum: 1, pageSize: 10,fDc:'D'};
         listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          this.fDNameOptions = response.rows;
         });
       }
     },
@@ -3807,9 +3809,9 @@ export default {
           fBusinessType: this.form.fBusinessType
         });
         this.fWbuOptions = []
-        let queryParams = { pageNum: 1, pageSize: 10};
+        let queryParams = { pageNum: 1, pageSize: 10,fDc:'C'};
         listFees(queryParams).then((response) => {
-          this.fWbuOptions = response.rows;
+          this.fCNameOptions = response.rows;
         });
       }
     },
@@ -5150,6 +5152,8 @@ export default {
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       listFees(queryParams).then((response) => {
         this.fWbuOptions = response.rows;
+        this.fCNameOptions = response.rows;
+        this.fDNameOptions = response.rows;
       });
     },
     /* 远程模糊查询经营单位 */