3 Commits 58a9492ecf ... 12eac79a17

Author SHA1 Message Date
  huk 12eac79a17 修改 3 years ago
  huk 3438c51098 tj 3 years ago
  huk 3a2ac7b288 tj 3 years ago

+ 1 - 2
build/utils.js

@@ -16,8 +16,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 let devModules = ['all'];
-// let devModules = ['index','SporadicManage','inward','statisticalReport'];
-// let devModules = ['index','appoint','TMS'];
+// let devModules = ['index','statisticalReport','appoint','RMS'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 2 - 2
config/index.js

@@ -56,9 +56,9 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
+    // target: "http://172.16.33.166:8080",
     // target: "http://172.16.33.162:8019",
-    // target: "http://localhost:8080",
+    target: "http://192.168.1.102:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

BIN
dist.zip


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

@@ -70,7 +70,6 @@ export default {
         }
         //判断是否是带分页查询
         if(this.isKuang){
-          console.log(11111111111111111111111111);
           // 发送请求
           this.axios
           .post(url, data, {
@@ -90,7 +89,6 @@ export default {
             this.isShow = true;
           });
         }else{
-          console.log(2222222222222222222222222);
           // 发送请求
           this.axios
             .post(url, data, {
@@ -107,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,

+ 99 - 57
src/views/RMS/components/addOilPrice.vue

@@ -1,95 +1,137 @@
 <template>
   <!-- 添加油价信息 -->
   <div class="addWagonLoad">
-    <PageTitle>返回</PageTitle>
-    <div class="form-box" style="margin-right: 10rem">
-      <dil-form :formId="357" v-model="form1" ref="from1"></dil-form>
+    <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">
+    <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>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { isNumber } from '@/utils/sharedJsFile'
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
-      value: undefined,
+      isagain:false,
+      loading:false,
+      input:null,
+      dialogVisible:false,
+      form1: {
+        priceOilName:'',
+        priceValue:'',
+        priceDate:new Date(),
+        enableStatus:false,
+      },
     };
   },
-  mounted() {},
   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(this.form1);
-      let RmsOilPrice = {
-        priceOilName:this.form1.priceOilName,
-        priceId:this.form1.priceId,
-        priceDate:this.form1.priceDate,
-        priceValue:this.form1.priceValue,
-      };
-      if(
-        RmsOilPrice.priceOilName ==null ||
-        RmsOilPrice.priceDate ==null ||
-         RmsOilPrice.priceValue ==null
-      )this.$message.error("存在空值!");
-      else
-      this.axios
-        .post(
-          "/api/v1/rms/insertOilPrice" , RmsOilPrice
-        )
+      this.loading = true;
+      let state = false;
+      if(!this.form1.priceOilName){
+        this.$message.warning('请填写油品名称')
+      }else if(!this.form1.priceValue){
+        this.$message.warning('请填写油品价格')
+      }else if(!isNumber(this.form1.priceValue)){
+        this.$message.warning('油品价格必修为整数或者小数')
+      }else{
+        // state = true;            
+      }
+      if(state){
+        let RmsOilPrice = this.form1;
+        this.axios.post("/api/v1/rms/insertOilPrice" , RmsOilPrice)
         .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败,可能存在重复!");
+          if (res.data.code == "200") {
+            this.loading = true;
+            this.$message.success('新增成功');
+            this.cancel();
           }
-        //  this.$refs['table'].resetField();
         });
+      }else{
+        this.loading = true;
+      }
     },
     // 取消
     cancel() {
-      this.$router.go(-1);
+      this.$router.push("/oilPrice");
     },
   },
 };
 </script>
-<style lang='scss' >
- .button-box{
+<style lang='scss'>
+.addWagonLoad{
+  .form_box{
+    margin-left: 35%;
+    padding-top: 30px;
+    width: 470px;
     display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
+    .el-form{
+      .el-form-item{
+        display: flex;
+        align-items: center;
+        .el-form-item__content{
+          .el-input{
+            width: 250px;
+          }
+          .el-switch{
+            margin-left: -250px;
+          }
+        }
+      }
+    }
+    .addbtn{
+      margin-left: 30px;
     }
   }
-.form-box{
-  display: flex;
-  justify-content: center;
-  .el-form-item{
+  .button_box{
+    margin-left: 40%;
+    padding-top: 30px;
+    width: 310px;
     display: flex;
     justify-content: center;
-    .el-form-item__label{
-      display: flex;
-      align-items: center;
-    }
-    .el-form-item__content{
-      .el-input{
-        .el-input__inner{
-          width: 250px;
-        }
-      }
-    }
   }
 }
 </style>

+ 50 - 41
src/views/RMS/components/oilPrice.vue

@@ -7,7 +7,7 @@
         v-model="textInput"
         clearable>
       </el-input>
-      <el-button type="primary" class="btn"  @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">
@@ -15,9 +15,30 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
+      <dilTable 
+        v-bind.sync="options"
+        :isKuang="isKuang"
+        @func="func"
+        :loading="loading"
+      >
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="onEnable(scope)"
+              v-if="enableStatus"
+            >
+              启用
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="onDeactivate(scope)"
+              v-else
+            >
+              停用
+            </el-button>
             <el-button
               type="text"
               size="small"
@@ -43,6 +64,10 @@ export default {
   name:"homeworkPath",
   data(){
     return{
+      loading:false,
+      isKuang:false,
+      //切换是否启用按钮和停用按钮
+      enableStatus:true,
       textInput: "" ,
       restaurants: [],
       options:{
@@ -52,64 +77,48 @@ export default {
     }
   },
   methods:{
+    func(res){
+      console.log(res);
+      this.isKuang = false;
+      this.loading = false;
+    },
     onclick(){
-      this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&con=" +this.textInput;
+      this.isKuang = true;
+      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() {
       this.$router.push("/addOilPrice");
-
     },
     /*这里要改一改*/
     updateOilPrice(scope){
-      console.log(scope.row.priceId)
       this.$router.push("/editOilPrice/"+scope.row.priceId)
     },
     deleteOilPrice(scope){
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          this.axios
-            .post("/api/v1/rms/deleteOilPrice/" + scope.row.priceId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });
-                this.$router.go(0);
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "删除操作已取消!",
-          });
-        });
+      console.log(scope)
     },
   },
-
 }
-
 </script>
 
 <style lang="scss" scode>
 .steel_inbound{
   .sache{
-    padding: 1.25rem 0.375rem;
+    width: 100%;height: 100px;
+    display: flex;
+    align-items: center;
     .el-input {
-      width: 20%;
-      margin-right: 1.25rem;
+      width: 250px;
+      margin-left: 50px;
+      margin-right: 30px;
+    }
+    .btn1{
+      margin-right: 30px;
     }
   }
   }

+ 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");