huk 3 年 前
コミット
12eac79a17

+ 0 - 1
src/components/DilCommonUI/packages/table/src/table.js

@@ -105,7 +105,6 @@ export default {
               //执行成功的回调
               this.$emit('func',response.data.data);
               this.refreshColumnData(d.columnData);
-
               this.isShow = true;
               //若父组件存在要合计的值
               if(this.$parent.totalNumber>=0){

+ 6 - 1
src/components/DilCommonUI/packages/table/src/table.vue

@@ -16,6 +16,9 @@
       @selection-change="selectionChange"
       @filter-change="filterChange"
       @row-click="rowClick"
+      v-loading="loading"
+      element-loading-text="玩命加载中"
+      element-loading-spinner="el-icon-loading"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -200,7 +203,9 @@ export default {
         return ({ row, rowIndex }) => "";
       },
     },
-
+    loading:{
+      default:false,
+    },
     // 是否启用分页器
     isPagination: {
       default: true,

+ 45 - 3
src/views/RMS/components/addOilPrice.vue

@@ -4,11 +4,25 @@
     <page-title>返回</page-title>
     <div class="form_box" style="margin-right: 10rem">
       <dil-form :formId="357" v-model="form1" ref="from1" @change="onchang"></dil-form>
+      <div class="addbtn">
+        <el-button type="primary" @click="dialogVisible = true">新增油品名称</el-button>
+      </div>
     </div>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
     </div>
+    <el-dialog
+      title="新增油品名称"
+      :visible.sync="dialogVisible"
+      width="30%"
+    >
+      <el-input v-model="input" placeholder="请输入内容"></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogCancel">取 消</el-button>
+        <el-button type="primary" @click="dialogMakeSure">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -19,6 +33,10 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isagain:false,
+      loading:false,
+      input:null,
+      dialogVisible:false,
       form1: {
         priceOilName:'',
         priceValue:'',
@@ -28,13 +46,30 @@ export default {
     };
   },
   methods: {
+    dialogCancel(){
+
+    },
     onchang(val){
       if(val.enableStatus){
         this.$message.warning('确认启用后将停用现在正在执行的油品价格')
       }
     },
+    dialogMakeSure(){
+      // this.loading = true;
+      // if(this.input){
+      //   this.axios.post('',{text:this.input}).then((res)=>{
+      //     if(res.data.code == "200"){
+      //       this.loading = false;
+      //       this.$message.success('新增成功')
+            this.dialogVisible = false;
+      //     }
+      //   })
+      // }else{
+      //   this.$message.warning('请输入油品名称')
+      // } 
+    },
     makeSure() {
-      console.log(!isNumber(this.form1.priceValue));
+      this.loading = true;
       let state = false;
       if(!this.form1.priceOilName){
         this.$message.warning('请填写油品名称')
@@ -50,10 +85,13 @@ export default {
         this.axios.post("/api/v1/rms/insertOilPrice" , RmsOilPrice)
         .then((res) => {
           if (res.data.code == "200") {
+            this.loading = true;
             this.$message.success('新增成功');
             this.cancel();
           }
         });
+      }else{
+        this.loading = true;
       }
     },
     // 取消
@@ -66,9 +104,10 @@ export default {
 <style lang='scss'>
 .addWagonLoad{
   .form_box{
-    margin-left: 40%;
+    margin-left: 35%;
     padding-top: 30px;
-    width: 310px;
+    width: 470px;
+    display: flex;
     .el-form{
       .el-form-item{
         display: flex;
@@ -83,6 +122,9 @@ export default {
         }
       }
     }
+    .addbtn{
+      margin-left: 30px;
+    }
   }
   .button_box{
     margin-left: 40%;

+ 10 - 2
src/views/RMS/components/oilPrice.vue

@@ -7,7 +7,7 @@
         v-model="textInput"
         clearable>
       </el-input>
-      <el-button type="primary" class="btn1"  @click="onclick">
+      <el-button type="primary" class="btn1"  @click="onclick" :loading="loading">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="toInsert">
@@ -19,6 +19,7 @@
         v-bind.sync="options"
         :isKuang="isKuang"
         @func="func"
+        :loading="loading"
       >
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
@@ -63,6 +64,7 @@ export default {
   name:"homeworkPath",
   data(){
     return{
+      loading:false,
       isKuang:false,
       //切换是否启用按钮和停用按钮
       enableStatus:true,
@@ -78,10 +80,16 @@ export default {
     func(res){
       console.log(res);
       this.isKuang = false;
+      this.loading = false;
     },
     onclick(){
       this.isKuang = true;
-      this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&con=" +this.textInput;
+      this.loading = true;
+      if(this.textInput){
+        this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&con=" +this.textInput+"&i="+ new Date();
+      }else{
+        this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
+      }
     },
     //跳转到新增页面
     toInsert() {

+ 6 - 6
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -130,7 +130,7 @@
           <i class="el-icon-search"></i>查询
         </el-button>
       </div>
-      <div v-if="onDrawerNumber == 1">
+      <div v-show="onDrawerNumber == 1">
         <dilTable
           v-bind.sync="frist"
           @radio-change="currentRadioChange1"
@@ -139,7 +139,7 @@
           :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-else-if="onDrawerNumber == 2">
+      <div v-show="onDrawerNumber == 2">
         <dilTable
           v-bind.sync="secend"
           @radio-change="currentRadioChange2"
@@ -148,7 +148,7 @@
           :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-else-if="onDrawerNumber == 3">
+      <div v-show="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
@@ -157,7 +157,7 @@
           :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-else-if="onDrawerNumber == 4">
+      <div v-show="onDrawerNumber == 4">
         <dilTable
           v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
@@ -166,7 +166,7 @@
           :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-else-if="onDrawerNumber == 5">
+      <div v-show="onDrawerNumber == 5">
         <dilTable
           v-bind.sync="line"
           @radio-change="currentRadioChange5"
@@ -175,7 +175,7 @@
           :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-else-if="onDrawerNumber == 6">
+      <div v-show="onDrawerNumber == 6">
         <dilTable
           v-bind.sync="purchaseOrder"
           @radio-change="currentRadioChange6"

+ 15 - 7
src/views/appoint/components/saleContract/transportPrice.vue

@@ -3,17 +3,15 @@
   <div class="salePlan">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+      <el-button type="primary" class="btn" @click="onclick" :loading="loading">
         <i class="el-icon-search"></i>查询
       </el-button>
-      
-
       <el-button type="primary" @click="btnclick(0)">
         <i class="el-icon-plus"></i>新增
       </el-button>
        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
-    <dilTable ref="excelDom" v-bind.sync="option">
+    <dilTable ref="excelDom" v-bind.sync="option" :loading="loading" :isKuang="isKuang" @func="func">
       <el-table-column fixed="right" label="操作" width="200">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
@@ -35,6 +33,8 @@ export default {
   name: "TransportPrice",
   data() {
     return {
+      isKuang:false,
+      loading:false,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -45,10 +45,18 @@ export default {
     };
   },
   methods: {
+    func(){
+      this.loading = false;
+      this.isKuang = false;
+    },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/ams/getAmsContractTransportPrice?apiId=109&con=" +
-        this.input;
+      this.loading = true;
+      this.isKuang = true;
+      if(this.input){
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&con=" +this.input;
+      }else{
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&i="+new Date();
+      }
     },
     btnclick() {
       this.$router.push("/addTransportPrice");