ソースを参照

Merge branch 'V2' of http://47.92.161.104:10080/zq/jp-housekeeper-portal into V2

yanliming 5 年 前
コミット
1d01e6da34

+ 1 - 7
src/views/base/checkinInfo-detail.vue

@@ -71,7 +71,7 @@
             style="width: 300px"
           ></el-input>
         </el-form-item>
-        <el-form-item label="面积" prop="area">
+        <el-form-item label="面积(㎡)" prop="area">
           <el-input
             v-model="formModel.area"
             placeholder="请输入面积"
@@ -142,12 +142,6 @@ export default {
         artificialPerson: [
           { required: true, message: "联系人不能为空", trigger: "blur" },
         ],
-        feeExpirationTime: [
-          { required: true, message: "费用到期时间不能为空", trigger: "blur" },
-        ],
-        contractExpirationTime: [
-          { required: true, message: "合同到期时间不能为空", trigger: "blur" },
-        ],
       },
       showDialog: true,
       loading: false,

+ 31 - 30
src/views/base/checkinInfo-list.vue

@@ -26,9 +26,9 @@
           v-model="queryModel.building"
         ></el-input>
       </el-form-item>
-      <!-- <el-form-item label="企业名称" prop="name">
+      <el-form-item label="企业名称" prop="name">
         <el-input type="text" size="mini" v-model="queryModel.name"></el-input>
-      </el-form-item> -->
+      </el-form-item>
       <el-form-item label="费用到期" prop="feeExpirationTime">
         <el-date-picker v-model="queryModel.feeExpirationTime" value-format="yyyy-MM-dd" type="date" size="mini" placeholder="选择日期"></el-date-picker>
       </el-form-item>
@@ -91,16 +91,17 @@
     >
       <el-table-column type="selection" width="55"></el-table-column>
       <el-table-column
-        prop="building"
-        label="楼栋"
+        prop="companyName"
+        label="企业名称"
         width="180"
+        fixed="left"
       ></el-table-column>
-      <el-table-column prop="room" label="房号" width="180"></el-table-column>
       <el-table-column
-        prop="companyName"
-        label="企业名称"
+        prop="building"
+        label="楼栋"
         width="180"
       ></el-table-column>
+      <el-table-column prop="room" label="房号" width="180"></el-table-column>
       <el-table-column
         prop="boss"
         label="法人"
@@ -116,7 +117,7 @@
         label="联系电话"
         width="180"
       ></el-table-column>
-      <el-table-column prop="area" label="面积" width="180"></el-table-column>
+      <el-table-column prop="area" label="面积(㎡)" width="180"></el-table-column>
       <el-table-column
         prop="checkinTime"
         label="入驻时间"
@@ -137,26 +138,26 @@
         label="租赁期限"
         width="180"
       ></el-table-column>
-      <el-table-column prop="wechatPay"  label="微信支付" width="120">
-                <template slot-scope="{row}">
-                    <el-switch
-                        v-model="row.wechatPay"
-                        active-color="#13ce66"
-                        inactive-color="#ff4949"
-                        @change="handlChange(row)">
-                    </el-switch>
-                </template>
-            </el-table-column>
-            <el-table-column prop="aliPay"  label="支付宝支付" width="120">
-                <template slot-scope="{row}">
-                    <el-switch
-                        v-model="row.aliPay"
-                        active-color="#13ce66"
-                        inactive-color="#ff4949"
-                        @change="handlChange(row)">
-                    </el-switch>
-                </template>
-            </el-table-column>
+      <!-- <el-table-column prop="wechatPay" fixed="right" label="微信支付" width="80">
+          <template slot-scope="{row}">
+              <el-switch
+                  v-model="row.wechatPay"
+                  active-color="#13ce66"
+                  inactive-color="#ff4949"
+                  @change="handlChange(row)">
+              </el-switch>
+          </template>
+      </el-table-column>
+      <el-table-column prop="aliPay" fixed="right" label="支付宝支付" width="90">
+          <template slot-scope="{row}">
+              <el-switch
+                  v-model="row.aliPay"
+                  active-color="#13ce66"
+                  inactive-color="#ff4949"
+                  @change="handlChange(row)">
+              </el-switch>
+          </template>
+      </el-table-column> -->
       <el-table-column label="操作" fixed="right" width="220">
         <template slot-scope="{ row }">
           <el-button size="mini" type="primary" @click="handlePayment(row)"
@@ -201,7 +202,7 @@
       <el-form label-width="150px">
         <el-form-item label="模板下载">
           <el-link
-            href="http://rccs.oss-cn-hangzhou.aliyuncs.com/smart/personInfo/2020/10/小鹏管家人员导入模板.xls"
+            href="http://rccs.oss-cn-hangzhou.aliyuncs.com/smart_school/personInfo/2020/10/%E5%B0%8F%E9%B9%8F%E7%AE%A1%E5%AE%B6%E7%A7%9F%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xls"
             type="primary"
             target="_blank"
             >点击下载模板</el-link
@@ -277,7 +278,7 @@ export default {
       modalTitle: "",
       businessKey: "",
       batchImportVisible: false,
-      uploadUrlXls: Constant.serverUrl + "/base/personInfo/importXls",
+      uploadUrlXls: Constant.serverUrl + "/base/checkinInfo/importXls",
       batchImportFileList: [],
       xlsLoading: false,
       headers: {

+ 70 - 53
src/views/business/billPush-detail.vue

@@ -78,12 +78,17 @@
         :data="formModel.billPushGoodsList" 
         show-summary :summary-method="getSummaries">
             <el-table-column prop="sort" type="index" label="序号" width="50"></el-table-column>
-
             <el-table-column prop="goodsId" label="收费项目" width="150">
               <template slot-scope="scope">
-                  <el-form-item>
-                    <el-input v-model="scope.row.goodTypeId" style="display:none"></el-input>
-                    <el-select v-model="scope.row.goodsId" placeholder="请选择" style="width:150px;" @change="handGoodsChange(scope)" size="mini">
+                  <el-form-item
+                    :prop="'billPushGoodsList.' + scope.$index + '.goodsId'"
+                    :rules="ruleValidate['goodsId']"
+                  >
+                    <el-select 
+                    v-model="scope.row.goodsId" 
+                    placeholder="请选择" 
+                    style="width:150px;" 
+                    @change="handGoodsChange(scope)" size="mini">
                         <el-option
                         v-for="result in goodsList"
                         :key="result.id"
@@ -117,8 +122,8 @@
             <el-table-column prop="numStr" label="数量"  width="320">
                 <template slot-scope="scope">
                     <el-form-item
-                    :prop="'billPushGoodsList.' + scope.$index + '.numStr'"
-                    :rules="ruleValidate['numStr']"
+                    :prop="'billPushGoodsList.' + scope.$index + '.numStr3'"
+                    :rules="ruleValidate['numStr3']"
                     >
                         <template v-if="scope.row.goodTypeId=='7'">
                             <el-input style="width:85px" placeholder="止码" v-model.number="scope.row.numStr2" @change="handStartChange(scope)" size="mini"></el-input>
@@ -148,7 +153,7 @@
                     :prop="'billPushGoodsList.' + scope.$index + '.totalFee'"
                     :rules="ruleValidate['totalFee']"
                     >
-                    <el-input placeholder="合计金额" :value="fmtMoney(scope.row.totalFee)" readonly="readonly" size="mini"></el-input>
+                    <el-input placeholder="合计金额" :value="scope.row.totalFee" readonly="readonly" size="mini"></el-input>
                     </el-form-item>
                 </template>
             </el-table-column>
@@ -197,6 +202,9 @@ export default {
                 companyId: [{ required: true, message: "缴费单位不能为空", trigger: "blur" }],
                 payService: [{ required: true, message: "收费项目不能为空", trigger: "blur" }],
                 // personId: [{ required: true, message: "推送用户不能为空", trigger: "blur" }]
+                beginEndTime:[{ required: true, message: "起止时间不能为空", trigger: "blur" }],
+                numStr3:[{ required: true, message: "数量不能为空", trigger: "blur" }],                
+                goodsId:[{ required: true, message: "收费项目未选择", trigger: "blur" }]
             },
             formModel: {
                 name:"",
@@ -271,56 +279,61 @@ export default {
         handleSubmit() {
             var self = this;
 
-            //增加转型,避免直接修改formModel
-            var requestData = JSON.parse(JSON.stringify(self.formModel));
+            this.$refs["form"].validate(valid => {
+                if (valid) {
+                    //增加转型,避免直接修改formModel
+                    var requestData = JSON.parse(JSON.stringify(self.formModel));
 
-            var billPushGoodsList = requestData.billPushGoodsList;
+                    var billPushGoodsList = requestData.billPushGoodsList;
 
-            for(var i=0;i<billPushGoodsList.length;i++){
-                billPushGoodsList[i].sortNo = i+1;
-                billPushGoodsList[i].beginDate = billPushGoodsList[i].beginEndTime[0];
-                billPushGoodsList[i].endDate = billPushGoodsList[i].beginEndTime[1]
-                billPushGoodsList[i].beginEndTime=null;
-            }
+                    if(billPushGoodsList.length==0) {
+                        this.$message.warning("收费项目不能为空!");
+                        return;
+                    }
 
-            var removeBillPushGoodsList = requestData.removeBillPushGoodsList;
+                    for(var i=0;i<billPushGoodsList.length;i++){
+                        billPushGoodsList[i].sortNo = i+1;
+                        billPushGoodsList[i].beginDate = billPushGoodsList[i].beginEndTime[0];
+                        billPushGoodsList[i].endDate = billPushGoodsList[i].beginEndTime[1]
+                        billPushGoodsList[i].beginEndTime=null;
+                    }
 
-            for(var j=0;j<removeBillPushGoodsList.length;j++){
-                removeBillPushGoodsList[j].sortNo = j+1;
-                removeBillPushGoodsList[j].beginDate = removeBillPushGoodsList[j].beginEndTime[0];
-                removeBillPushGoodsList[j].endDate = removeBillPushGoodsList[j].beginEndTime[1]
-                removeBillPushGoodsList[j].beginEndTime=null;
-            }
+                    var removeBillPushGoodsList = requestData.removeBillPushGoodsList;
 
-            this.$refs["form"].validate(valid => {
-                if (valid) {
-                (function() {
-                    var id = requestData.id;
-                    
-                    if (id == null || id.length == 0) {
-                    return billPushApi.add(requestData);
-                    } else {
-                    return billPushApi.update(requestData);
+                    for(var j=0;j<removeBillPushGoodsList.length;j++){
+                        removeBillPushGoodsList[j].sortNo = j+1;
+                        removeBillPushGoodsList[j].beginDate = removeBillPushGoodsList[j].beginEndTime[0];
+                        removeBillPushGoodsList[j].endDate = removeBillPushGoodsList[j].beginEndTime[1]
+                        removeBillPushGoodsList[j].beginEndTime=null;
                     }
-                })().then(function(response) {
-                    var jsonData = response.data;
-
-                    if (jsonData.result) {
-                        self.$message({
-                            message: "保存成功!",
-                            type: "success"
-                        });
-
-                        self.$emit("close", true);
-                    } else {
-                        self.$message({
-                            message: jsonData.message + "",
-                            type: "warning"
-                        });
-
-                        self.$emit("close", false);
-                    }
-                });
+
+                    (function() {
+                        var id = requestData.id;
+                        
+                        if (id == null || id.length == 0) {
+                        return billPushApi.add(requestData);
+                        } else {
+                        return billPushApi.update(requestData);
+                        }
+                    })().then(function(response) {
+                        var jsonData = response.data;
+
+                        if (jsonData.result) {
+                            self.$message({
+                                message: "保存成功!",
+                                type: "success"
+                            });
+
+                            self.$emit("close", true);
+                        } else {
+                            self.$message({
+                                message: jsonData.message + "",
+                                type: "warning"
+                            });
+
+                            self.$emit("close", false);
+                        }
+                    });
                 }
             });
         },
@@ -434,7 +447,9 @@ export default {
 
             var totalFee = num*1*unit*1;
 
-            this.formModel.billPushGoodsList[scope.$index].totalFee = totalFee;
+            if(totalFee!=null){
+                this.formModel.billPushGoodsList[scope.$index].totalFee = totalFee.toFixed(2);
+            }
         },
         handStartChange(scope){
             var row = scope.row;
@@ -452,7 +467,9 @@ export default {
 
                     var totalFee = num3*1*unit*1;
 
-                    this.formModel.billPushGoodsList[scope.$index].totalFee = totalFee;
+                    if(totalFee!=null){
+                        this.formModel.billPushGoodsList[scope.$index].totalFee = totalFee.toFixed(2);
+                    }
                 }
             },100);
         }