Przeglądaj źródła

客户前端代码提交

mashengyi 3 lat temu
rodzic
commit
258a5f5f0a
2 zmienionych plików z 77 dodań i 85 usunięć
  1. 3 3
      src/views/customer/Customer.vue
  2. 74 82
      src/views/platform/check/check.vue

+ 3 - 3
src/views/customer/Customer.vue

@@ -279,7 +279,7 @@
             <el-row :span="24">
               <el-col :span="12">
                  <el-form-item  label-width=120px label="协议类型" prop="serviceType">
-                    <el-select v-model="customerRec.serviceType" placeholder="运营范围" :disabled=disable  style="width: 100%">
+                    <el-select v-model="customerRec.serviceType" placeholder="运营范围"   style="width: 100%">
                         <el-option
                            v-for="item in serviceTypeList"
                           :key="item.id"
@@ -835,7 +835,7 @@ import XLSX from "xlsx";
             if (response.data.code === 0) {
               this.customerRec = response.data.data;
             
-              this.disable = !((this.customerRec.interType ==3) && (this.customerRec.recStatus ==2 || this.customerRec.recStatus ==0));
+              this.disable = !((this.customerRec.interType ==1) && (this.customerRec.recStatus ==2 || this.customerRec.recStatus ==0));
 
             }
           },
@@ -846,7 +846,7 @@ import XLSX from "xlsx";
             const response = await this.$http.post(`lowerService/customeRecQuery`, {"customerName":recoder.customerName,"companyName":recoder.companyName});
             if (response.data.code === 0) {
               this.customerRec = response.data.data;
-              this.disable = !((this.customerRec.interType ==3) && (this.customerRec.recStatus ==2));
+              this.disable = !((this.customerRec.interType ==1) && (this.customerRec.recStatus ==2));
             }
           },
           stopUse(recoder){

+ 74 - 82
src/views/platform/check/check.vue

@@ -5,20 +5,11 @@
       <el-row>
         <el-col :span="24">
           <div class="top">
-            <el-input  placeholder="用户名" class="input-demo" v-model="userName"></el-input>
-            <el-input  placeholder="联系电话" class="input-demo" v-model="phone"></el-input>
-            <el-input  placeholder="税号" class="input-demo" v-model="dutyParagraph"></el-input>
-          </div>
-        </el-col>
-      </el-row>
-
-      <el-row>
-        <el-col :span="24">
-          <div class="top">
-            <el-input  placeholder="发票抬头" class="input-demo" v-model="company"></el-input>
+            <el-input  placeholder="联系电话" class="input-demo" v-model="companyLeaderPhone"></el-input>
+            <el-input  placeholder="税号" class="input-demo" v-model="companyReferencenum"></el-input>
+             <el-input  placeholder="发票抬头" class="input-demo" v-model="companyName"></el-input>
             <el-button type="success" style="margin-left: 1%;" @click="addList = true;">新增</el-button>
             <el-button type="success" style="margin-left: 1%;" @click="queryLook">查询</el-button>
-            <!-- <el-button type="info" style="margin-left: 1%;">重置</el-button> -->
           </div>
         </el-col>
       </el-row>
@@ -36,46 +27,46 @@
         tooltip-effect="dark">
         <el-table-column
           label="用户名"
-          prop="userName"
+          prop="customerName"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
           label="用户手机号"
-          prop="userPhone"
+          prop="companyLeaderPhone"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="userCompany"
+          prop="companyName"
           label="用户所在公司"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="buyerTel"
+          prop="companyPhone"
           label="联系电话"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="dutyParagraph"
+          prop="companyReferencenum"
           label="税号"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="company"
+          prop="companyName"
           label="发票抬头"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="bankNumber"
+          prop="companyOpenbankAcc"
           label="银行账号"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="bankAddress"
+          prop="companyOpenbank"
           label="开户行"
           show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="address"
+          prop="companyAdress"
           label="公司地址"
           show-overflow-tooltip>
         </el-table-column>
@@ -110,39 +101,39 @@
         ref="ruleForm"
         :model="formUserList">
         <el-form-item label="用户名">
-          <el-input v-model="formUserList.userName" :disabled="true" auto-complete="off" placeholder="请输入用户名"></el-input>
+          <el-input v-model="formUserList.customerName" :disabled="true" auto-complete="off" placeholder="请输入用户名"></el-input>
         </el-form-item>
 
-        <el-form-item label="税号" prop="dutyParagraph">
-          <el-input v-model="formUserList.dutyParagraph" auto-complete="off" placeholder="税号"></el-input>
+        <el-form-item label="税号" prop="companyReferencenum">
+          <el-input v-model="formUserList.companyReferencenum" auto-complete="off" placeholder="税号"></el-input>
         </el-form-item>
 
-        <el-form-item label="发票抬头" prop="company">
-          <el-input v-model="formUserList.company" auto-complete="off" placeholder="发票抬头"></el-input>
+        <el-form-item label="发票抬头" prop="companyName">
+          <el-input v-model="formUserList.companyName" auto-complete="off" placeholder="发票抬头"></el-input>
         </el-form-item>
 
-        <el-form-item label="开户行" prop="bankAddress">
-          <el-input v-model="formUserList.bankAddress" auto-complete="off" placeholder="开户行"></el-input>
+        <el-form-item label="开户行" prop="companyOpenbank">
+          <el-input v-model="formUserList.companyOpenbank" auto-complete="off" placeholder="开户行"></el-input>
         </el-form-item>
 
-        <el-form-item label="银行账号" prop="bankNumber">
-          <el-input v-model="formUserList.bankNumber" auto-complete="off" placeholder="银行账号"></el-input>
+        <el-form-item label="银行账号" prop="companyOpenbankAcc">
+          <el-input v-model="formUserList.companyOpenbankAcc" auto-complete="off" placeholder="银行账号"></el-input>
         </el-form-item>
 
-        <el-form-item label="购方电话" prop="buyerTel">
-          <el-input v-model="formUserList.buyerTel" auto-complete="off" placeholder="购方电话"></el-input>
+        <el-form-item label="购方电话" prop="companyPhone">
+          <el-input v-model="formUserList.companyPhone" auto-complete="off" placeholder="购方电话"></el-input>
         </el-form-item>
 
-        <el-form-item label="公司地址" prop="address">
-          <el-input v-model="formUserList.address" auto-complete="off" placeholder="公司地址"></el-input>
+        <el-form-item label="公司地址" prop="companyAdress">
+          <el-input v-model="formUserList.companyAdress" auto-complete="off" placeholder="公司地址"></el-input>
         </el-form-item>
 
-        <el-form-item label="联系人" prop="contact">
-          <el-input v-model="formUserList.contact" auto-complete="off" placeholder="联系人"></el-input>
+        <el-form-item label="联系人" prop="companyLeader">
+          <el-input v-model="formUserList.companyLeader" auto-complete="off" placeholder="联系人"></el-input>
         </el-form-item>
 
-        <el-form-item label="联系电话" prop="contactTel">
-          <el-input v-model="formUserList.contactTel" auto-complete="off" placeholder="联系电话"></el-input>
+        <el-form-item label="联系电话" prop="companyLeaderPhone">
+          <el-input v-model="formUserList.companyLeaderPhone" auto-complete="off" placeholder="联系电话"></el-input>
         </el-form-item>
 
         <el-form-item label="经营范围" prop="operatingRangeType">
@@ -174,33 +165,33 @@
       return {
         loading: false,
         rules: {
-          bankNumber: [
+          companyOpenbankAcc: [
             { required: true, message: '请输入银行账号', trigger: 'blur' },
             { min: 9, max: 30, message: '长度在 9 到 30 个字符', trigger: 'blur' }
           ],
-          address: [
+          companyAdress: [
             { required: true, message: '请输入公司地址', trigger: 'blur' },
           ],
-          bankAddress : [
+          companyOpenbank : [
             { required: true, message: '请输入开户行', trigger: 'blur' },
           ],
-          contactTel: [
+          companyLeaderPhone: [
             { required: true, message: '请输入正确联系方式', trigger: 'blur' },
           ],
-          dutyParagraph:[
+          companyReferencenum:[
             { required: true, message: '请输入税号', trigger: 'blur' },
             { min: 15, max: 30, message: '长度在 15 到 30 个字符', trigger: 'blur' }
           ],
-          company: [
+          companyName: [
             { required: true, message: '请输入发票抬头', trigger: 'blur' },
           ],
           operatingRangeType: [
             { required: true, message: '请选择经营范围', trigger: 'change' }
           ],
-          contact: [
+          companyLeader: [
             {required: true, message: '请输入联系人', trigger: 'blur'},
           ],
-          buyerTel: [
+          companyPhone: [
             {required: true, message: '请输入正确的购方电话', trigger: 'blur'},
           ],
         },
@@ -228,24 +219,23 @@
         pagesize: 8,
         total: 0,
         usertable: [],
-        userName: "",
-        phone: "",
-        dutyParagraph: "",
-        company: "",
+        customerName: "",
+        companyLeaderPhone: "",
+        companyReferencenum: "",
+        companyName: "",
         formUserList: {
-          "userName":"",
-          "phone": "",
-          "dutyParagraph":"",
-          "company":"",
-          "bankNumber":"",
-          "bankAddress":"",
-          "address":"",
+          "customerName":"",
+          "companyReferencenum":"",
+          "companyName":"",
+          "companyOpenbankAcc":"",
+          "companyOpenbank":"",
+          "companyAdress":"",
           "userId":"",
           "operatingRangeType": "",
-          "roleId": "",
-          "contact": "",
-          "contactTel": "",
-          "buyerTel": ""
+          "bussinessType": "",
+          "companyLeader": "",
+          "companyLeaderPhone": "",
+          "companyPhone": ""
         },
       }
     },
@@ -255,14 +245,16 @@
     methods: {
       // 列表展示
       async loadData() {
-        this.formUserList.userName = sessionStorage.getItem('userName');
+        this.customerName = sessionStorage.getItem('userName');
+        this.formUserList.customerName = sessionStorage.getItem('userName');
         this.formUserList.userId = sessionStorage.getItem('userId');
-        this.formUserList.roleId = sessionStorage.getItem('roleId');
-        if(this.formUserList.roleId == 1) {
+        this.formUserList.bussinessType = sessionStorage.getItem('roleId');
+        debugger
+        if(this.formUserList.bussinessType == 1) {
           const formData = new FormData();
           formData.append('current', this.current);
           formData.append('size', this.pagesize);
-          const response = await this.$http.post(`invoice/list`, formData);
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
           if (response.data.code === 0) {
             this.loading = false;
             this.usertable = response.data.data.records;
@@ -272,8 +264,8 @@
           const formData = new FormData();
           formData.append('current', this.current);
           formData.append('size', this.pagesize);
-          formData.append('userId', this.formUserList.userId);
-          const response = await this.$http.post(`invoice/list`, formData);
+          formData.append('customerName', this.formUserList.customerName);
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
           if (response.data.code === 0) {
             this.loading = false;
             this.usertable = response.data.data.records;
@@ -283,15 +275,15 @@
       },
 
       async queryLook(){
-        if(this.formUserList.roleId == 1) {
+        if(this.formUserList.bussinessType == 1) {
           const formData = new FormData();
           formData.append('current', this.current);
           formData.append('size', this.pagesize);
-          formData.append('userName', this.userName);
-          formData.append('phone', this.phone);
-          formData.append('dutyParagraph', this.dutyParagraph);
-          formData.append('company', this.company);
-          const response = await this.$http.post(`invoice/list`, formData);
+          formData.append('customerName', this.customerName);
+          formData.append('companyLeaderPhone', this.companyLeaderPhone);
+          formData.append('companyReferencenum', this.companyReferencenum);
+          formData.append('companyName', this.companyName);
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
           if (response.data.code === 0) {
             this.loading = false;
             this.usertable = response.data.data.records;
@@ -303,11 +295,11 @@
           formData.append('current', this.current);
           formData.append('size', this.pagesize);
           formData.append('userId', this.formUserList.userId);
-          formData.append('userName', this.userName);
-          formData.append('phone', this.phone);
-          formData.append('dutyParagraph', this.dutyParagraph);
-          formData.append('company', this.company);
-          const response = await this.$http.post(`invoice/list`, formData);
+          formData.append('customerName', this.customerName);
+          formData.append('companyLeaderPhone', this.companyLeaderPhone);
+          formData.append('companyReferencenum', this.companyReferencenum);
+          formData.append('companyName', this.companyName);
+          const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
           if (response.data.code === 0) {
             this.loading = false;
             this.usertable = response.data.data.records;
@@ -319,7 +311,7 @@
       addData(formName) {
         this.$refs[formName].validate(async (valid) => {
           if(valid) {
-            const response = await this.$http.post(`invoice/add`, this.formUserList);
+            const response = await this.$http.post(`customer/customerRecAdd`, this.formUserList);
             if(response.data.code === 0) {
               this.loadData();
               this.addList = false;
@@ -348,12 +340,12 @@
         for (var key in this.formUserList) {
           this.formUserList[key] = '';
         };
-        this.formUserList.userName = sessionStorage.getItem('userName');
+        this.formUserList.customerName = sessionStorage.getItem('userName');
       },
       // 分页方法
       handleSizeChange(val) {
         this.pagesize = val;
-        if(this.userName !== '' || this.phone !== '' || this.dutyParagraph !== '' || this.company !== '') {
+        if(this.customerName !== '' || this.companyLeaderPhone !== '' || this.companyReferencenum !== '' || this.companyName !== '') {
           this.queryLook();
         }else{
           this.loadData();
@@ -362,7 +354,7 @@
       },
       handleCurrentChange(val) {
         this.current = val;
-        if(this.userName !== '' || this.phone !== '' || this.dutyParagraph !== '' || this.company !== '') {
+        if(this.customerName !== '' || this.companyLeaderPhone !== '' || this.companyReferencenum !== '' || this.companyName !== '') {
           this.queryLook();
         }else{
           this.loadData();