Browse Source

Merge branch 'master' of http://git.echepei.com/zhujiawei/Warehouse_management_ui

tong 4 years ago
parent
commit
9ab554cbec

+ 12 - 0
src/api/agreement/agreement.js

@@ -67,6 +67,18 @@ export function updateAgreement(data) {
   })
 }
 
+// 修改仓储费
+export function updateAgreements(fId, fStatus) {
+  return request({
+    url: '/warehouseBusiness/agreementTask',
+    method: 'put',
+    data: {
+      fId:fId,
+      fBillstatus:fStatus
+    }
+  })
+}
+
 // 删除仓储费
 export function delAgreement(fId) {
   return request({

+ 11 - 0
src/api/warehouseBusiness/agreement.js

@@ -59,6 +59,17 @@ export function updateAgreement(data) {
     data: data
   })
 }
+// 修改仓储费
+export function updateAgreement_s(fId, fStatus) {
+  return request({
+    url: '/warehouseBusiness/agreementStorage',
+    method: 'put',
+    data: {
+      fId:fId,
+      fBillstatus:fStatus
+    }
+  })
+}
 
 // 删除仓储费
 export function delAgreement(fId) {

BIN
src/assets/images/login-background.jpg


+ 27 - 1
src/views/agreement/agreementTask/index.vue

@@ -152,7 +152,16 @@
         </template>
       </el-table-column>
       <!--      <el-table-column label="状态" align="center" prop="fId" />-->
-      <el-table-column label="状态" align="center" prop="fBillstatus"/>
+      <el-table-column label="状态" align="center" prop="fBillstatus">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.fBillstatus"
+            active-value="0"
+            inactive-value="1"
+            @change="handleStatusChange(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -374,12 +383,14 @@ import {
   exportAgreement,
   listAgreementitems,
   queryUserVal,
+  updateAgreements
 } from '@/api/agreement/agreement'
 import { listCorps } from '@/api/basicdata/corps'
 import { listGoods } from '@/api/basicdata/goods'
 import { delWarehousebills } from '@/api/warehouseBusiness/warehouseInStock'
 import { listGoodsTransfer } from '@/api/warehouseBusiness/goodsTransfer'
 import { listFees } from '@/api/basicdata/fees'
+import { updateAgreement_s } from '@/api/warehouseBusiness/agreement'
 // import { listUser, queryUserVal } from '@/api/system/user'
 
 export default {
@@ -640,6 +651,21 @@ export default {
         console.log(this.fWbuOptions)
       });
     },
+    // 作业费状态修改
+    handleStatusChange(row) {
+      let text = row.fBillstatus === "0" ? "启用" : "停用";
+      this.$confirm('确认要"' + text + '""' + row.fCorpid + '"用户吗?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return updateAgreements(row.fId, row.fBillstatus);
+      }).then(() => {
+        this.msgSuccess(text + "成功");
+      }).catch(function() {
+        row.fBillstatus = row.fBillstatus === "0" ? "1" : "0";
+      });
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset()

+ 110 - 66
src/views/index.vue

@@ -13,13 +13,13 @@
           <p>出库</p>
         </div>
       </li>
-      <li>
+      <li @click="jump('/basicdata/corps')">
         <div>
           <i class="el-icon-s-custom" style="font-size: 50px;text-align: center"></i>
           <p>新增用户</p>
         </div>
       </li>
-      <li>
+      <li @click="jump('/basicdata/goods')">
         <div>
           <i class="el-icon-s-cooperation" style="font-size: 50px;text-align: center"></i>
           <p>新增商品</p>
@@ -66,7 +66,9 @@
       <div style="display: flex;">
         <div id="box" style="width:100%;height:350px;"></div>
 
-        <el-select v-model="select" slot="prepend" size="mini" :select="query()" placeholder="点击切换仓库" style="position:absolute; width: 8%;right: 1%;">
+        <el-select v-model="select" slot="prepend" size="mini" :select="query()" placeholder="点击切换仓库"
+                   style="position:absolute; width: 8%;right: 1%;"
+        >
           <div v-for="(item, index) in warehouse" :key="index">
             <el-option :label="item.fName" :value="item.fWarehouseid"></el-option>
           </div>
@@ -74,15 +76,24 @@
       </div>
     </div>
     <div style="width: 100%;margin-bottom: 50px">
-      <el-table :data="tableData" :header-cell-style="{borderBottom:'1px dashed #dfe6ec'}" :cell-style="cellStyle" style="width: 65%;float: left;">
+      <el-table :data="tableData" :header-cell-style="{borderBottom:'1px dashed #dfe6ec'}" :cell-style="cellStyle"
+                style="width: 65%;float: left;"
+      >
         <el-table-column prop="name" label="待办事宜" width="360">
         </el-table-column>
         <el-table-column prop="date" label="时间" width="300"></el-table-column>
         <el-table-column prop="address" label="操作"></el-table-column>
       </el-table>
-      <el-table :data="tableData" :header-cell-style="{borderBottom:'1px dashed #dfe6ec'}" :cell-style="cellStyle" style="width: 30%;float: left;margin-left: 20px;margin-right: 20px;">
-        <el-table-column prop="name" label="消息中心" width="220"/>
-        <el-table-column prop="address" label="操作"/>
+      <el-table :data="tableDataTwo" :header-cell-style="{borderBottom:'1px dashed #dfe6ec'}" :cell-style="cellStyle"
+                style="width: 30%;float: left;margin-left: 20px;margin-right: 20px;"
+      >
+        <el-table-column prop="noticeTitle" :show-overflow-tooltip="true" label="消息中心" width="260"/>
+        <el-table-column prop="address" label="操作">
+          <span @click="bug()" style="cursor:pointer">查看详情</span>
+          <template slot-scope="scope">
+            <span @click="bug(scope.row.noticeContent)" style="cursor:pointer">查看详情</span>
+          </template>
+        </el-table-column>
       </el-table>
     </div>
     <div style="width: 100%;float: left;margin-top:20px;">
@@ -91,18 +102,34 @@
         <div id="box_ss" style="width:100%;height:350px;"></div>
       </div>
     </div>
+    <el-dialog
+      title="消息提示"
+      :visible.sync="dialogVisible"
+      width="80%"
+      :before-close="handleClose"
+      :close-on-click-modal="false"
+    >
+      <span v-html="text" class="text" style="max-width: 100%;height: auto;"></span>
+      <span slot="footer" class="dialog-footer">
+<!--    <el-button @click="dialogVisible = false">取 消</el-button>-->
+    <el-button type="primary" @click="dialogVisible = false">关 闭</el-button>
+  </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listCorps , information, warehouse} from "../../src/api/index";
+import { listCorps, information, warehouse } from '../../src/api/index'
+
 export default {
-  name: "index",
+  name: 'index',
   data() {
     return {
       // 版本号
-      version: "3.2.1",
-      select:'',
+      version: '3.2.1',
+      select: '',
+      text: '',
+      dialogVisible: false,
       tableData: [{
         date: '2020-11-20 12:00',
         name: '某客户账单审核',
@@ -116,35 +143,44 @@ export default {
         name: '仓储费审核结算审核',
         address: '查看详情'
       }],
-      chart:[],
-      warehouse:[],
-      master:[],
-      commodity:[],
-      commoditytwo:[],
-      name:[]
-    };
+      chart: [],
+      warehouse: [],
+      master: [],
+      commodity: [],
+      commoditytwo: [],
+      name: [],
+      tableDataTwo: []
+    }
   },
   mounted() {
-    this.drawLine_ss()
+
   },
-  created(){
-    this.getList();
-    this.warehouses();
+  created() {
+    this.getList()
+    this.warehouses()
     this.firstinventory()
   },
   methods: {
-    firstinventory(){
-      information(0).then(response =>{
+    bug(res) {
+      this.dialogVisible = true
+      this.text = res
+    },
+    handleClose(done) {
+      // console.log(done)
+      this.dialogVisible = false
+    },
+    firstinventory() {
+      information(0).then(response => {
         console.log(response)
         this.chart = response.data
-        for (let index of this.chart.corpsListWhouse){
+        for (let index of this.chart.corpsListWhouse) {
           this.master.push({
-            name:index.fName,
-            value:index.fGrossweightD
+            name: index.fName,
+            value: index.fGrossweightD
           })
           this.name.push(index.fName)
         }
-        for (let index of this.chart.goodslistWhouse){
+        for (let index of this.chart.goodslistWhouse) {
           this.commodity.push(index.fName)
           this.commoditytwo.push(index.fGrossweightD)
         }
@@ -154,26 +190,25 @@ export default {
         this.drawLine_ss()
       })
     },
-    query(){
+    query() {
       this.master = []
       this.commodity = []
       this.commoditytwo = []
       this.name = []
-      console.log(this.select)
-      if (this.select === ''){
+      if (this.select === '') {
         return this.select
-      }else {
-        information(this.select).then(response =>{
+      } else {
+        information(this.select).then(response => {
           console.log(response)
           this.chart = response.data
-          for (let index of this.chart.corpsListWhouse){
+          for (let index of this.chart.corpsListWhouse) {
             this.master.push({
-              name:index.fName,
-              value:index.fGrossweightD
+              name: index.fName,
+              value: index.fGrossweightD
             })
             this.name.push(index.fName)
           }
-          for (let index of this.chart.goodslistWhouse){
+          for (let index of this.chart.goodslistWhouse) {
             this.commodity.push(index.fName)
             this.commoditytwo.push(index.fGrossweightD)
           }
@@ -183,34 +218,34 @@ export default {
         })
       }
     },
-    jump(res){
+    jump(res) {
       this.$router.push({ path: res })
     },
     //设置单元格边框
-    cellStyle({row, column, rowIndex, columnIndex}) {
+    cellStyle({ row, column, rowIndex, columnIndex }) {
       return 'border-bottom: 1px dashed rgb(223, 230, 236)'
     },
     //查询消息中心
     getList() {
-      this.loading = true;
+      this.loading = true
       listCorps(this.queryParams).then(response => {
-        console.log(response.rows);
-      });
+        this.tableDataTwo = response.rows
+      })
     },
     //查询仓库
-    warehouses(){
-      warehouse().then(response =>{
+    warehouses() {
+      warehouse().then(response => {
         this.warehouse = []
-        for (let index of response.rows){
+        for (let index of response.rows) {
           this.warehouse.push({
-            fName:index.fName,
-            fWarehouseid:index.fWarehouseid
+            fName: index.fName,
+            fWarehouseid: index.fWarehouseid
           })
         }
       })
     },
     goTarget(href) {
-      window.open(href, "_blank");
+      window.open(href, '_blank')
     },
     //仓库图表
     drawLine() {
@@ -220,7 +255,7 @@ export default {
       myChart.setOption({
         title: {
           text: this.chart.whouseList[0].fName + '统计',
-          subtext: '虚构数据',
+          subtext: '实时数据',
           left: 'center'
         },
         tooltip: {
@@ -235,7 +270,7 @@ export default {
         series: [
           {
             type: 'pie',
-            name: '虚构数据',
+            name: '实时数据',
             radius: '65%',
             center: ['50%', '50%'],
             selectedMode: 'single',
@@ -306,8 +341,8 @@ export default {
                   }
                 }
               },
-              {value: this.chart.whouseList[0].fGrossweightD, name: '占用库容'},
-              {value: this.chart.whouseList[0].fTotalgross - this.chart.whouseList[0].fGrossweightD, name: '空闲库容'},
+              { value: this.chart.whouseList[0].fGrossweightD, name: '占用库容' },
+              { value: parseFloat(this.chart.whouseList[0].fTotalgross - this.chart.whouseList[0].fGrossweightD).toFixed(1), name: '空闲库容' }
             ],
             emphasis: {
               itemStyle: {
@@ -318,7 +353,7 @@ export default {
             }
           }
         ]
-      });
+      })
     },
     drawLinetwo() {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
@@ -327,7 +362,7 @@ export default {
       myChart.setOption({
         title: {
           text: this.chart.whouseList[0].fName + '货权人统计',
-          subtext: '虚构数据',
+          subtext: '实时数据',
           left: 'center'
         },
         tooltip: {
@@ -360,10 +395,10 @@ export default {
               show: false
             },
             data:
-              this.master
+            this.master
           }
         ]
-      });
+      })
     },
     drawLine_ss() {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
@@ -371,8 +406,8 @@ export default {
       // 绘制图表
       myChart.setOption({
         title: {
-          text: '本仓库商品统计',
-          subtext: '虚构数据',
+          text:this.chart.whouseList[0].fName + '商品统计',
+          subtext: '实时数据',
           left: 'center'
         },
         color: ['#3398DB'],
@@ -410,20 +445,21 @@ export default {
             data: this.commoditytwo
           }
         ]
-      });
+      })
     }
-  },
-};
+  }
+}
 </script>
 
 <style scoped lang="scss">
-.block{
+.block {
   width: 70%;
   float: left;
   display: flex;
   flex-wrap: wrap;
   height: 350px;
-  li{
+
+  li {
     width: 18%;
     height: 150px;
     background-color: #1c84c6;
@@ -431,14 +467,17 @@ export default {
     text-align: center;
     color: #FFFFFF;
     border-radius: 10px;
-    div{
+    cursor:pointer;
+    div {
       margin-top: 40px;
-      p{
+
+      p {
         font-size: 20px;
       }
     }
   }
 }
+
 .home {
   blockquote {
     padding: 10px 20px;
@@ -503,4 +542,9 @@ export default {
   }
 }
 </style>
-
+<style>
+.text img {
+  max-width: 100%;
+  height: auto;
+}
+</style>

+ 24 - 9
src/views/login.vue

@@ -4,7 +4,8 @@
       <h3 class="title">大木仓储管理系统</h3>
       <el-form-item prop="username">
         <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
-          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
+<!--          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />-->
+          <i slot="prefix" class="el-icon-user" style="font-size: 20px;padding-top: 11px;padding-left: 2px;color: #565656;"></i>
         </el-input>
       </el-form-item>
       <el-form-item prop="password">
@@ -15,7 +16,9 @@
           placeholder="密码"
           @keyup.enter.native="handleLogin"
         >
-          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+<!--          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />-->
+
+          <i slot="prefix" class="el-icon-lock" style="font-size: 20px;padding-top: 11px;padding-left: 2px;color: #565656;"></i>
         </el-input>
       </el-form-item>
       <el-form-item prop="code">
@@ -26,19 +29,20 @@
           style="width: 63%"
           @keyup.enter.native="handleLogin"
         >
-          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
+<!--          <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />-->
+          <i slot="prefix" class="el-icon-connection" style="font-size: 20px;padding-top: 11px;padding-left: 2px;color: #565656;"></i>
         </el-input>
         <div class="login-code">
           <img :src="codeUrl" @click="getCode" class="login-code-img"/>
         </div>
       </el-form-item>
-      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
+      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;color: rgba(245, 248, 250, 0.8)">记住密码</el-checkbox>
       <el-form-item style="width:100%;">
         <el-button
           :loading="loading"
           size="medium"
           type="primary"
-          style="width:100%;"
+          style="width:100%;border-radius: 200px"
           @click.native.prevent="handleLogin"
         >
           <span v-if="!loading">登 录</span>
@@ -154,24 +158,34 @@ export default {
 .title {
   margin: 0px auto 30px auto;
   text-align: center;
-  color: #707070;
+  font-size: 30px;
+  color: #FFFFFF;
 }
 
 .login-form {
   border-radius: 6px;
-  background: #ffffff;
+  //background: none;
+  background-color: rgba(0,0,0,0.05);
   width: 400px;
   padding: 25px 25px 5px 25px;
   .el-input {
     height: 38px;
     input {
-      height: 38px;
+      height: 40px;
+      border-radius: 200px;
+      color: #000000;
+      background-color: rgba(245,248,250,0.8);
+      border-color:rgba(0,0,0,0.1);
+    }
+    input::placeholder {
+      color: #c1c1c1;
     }
   }
   .input-icon {
     height: 39px;
-    width: 14px;
+    width: 15px;
     margin-left: 2px;
+    color: #565656;
   }
 }
 .login-tip {
@@ -183,6 +197,7 @@ export default {
   width: 33%;
   height: 38px;
   float: right;
+  border-color: #fff;
   img {
     cursor: pointer;
     vertical-align: middle;

+ 30 - 2
src/views/warehouseBusiness/agreement/index.vue

@@ -152,7 +152,16 @@
         </template>
       </el-table-column>
       <!--      <el-table-column label="状态" align="center" prop="fId" />-->
-      <el-table-column label="状态" align="center" prop="fBillstatus"/>
+      <el-table-column label="状态" align="center" prop="fBillstatus">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.fBillstatus"
+            active-value="0"
+            inactive-value="1"
+            @change="handleStatusChange(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -391,6 +400,7 @@ import {
   delAgreement,
   addAgreement,
   updateAgreement,
+  updateAgreement_s,
   exportAgreement,
   listAgreementitems,
   queryUserVal,
@@ -400,6 +410,7 @@ import { listGoods } from '@/api/basicdata/goods'
 import { delWarehousebills } from '@/api/warehouseBusiness/warehouseInStock'
 import { listGoodsTransfer } from '@/api/warehouseBusiness/goodsTransfer'
 import { listFees } from '@/api/basicdata/fees'
+import { changeUserStatus } from '@/api/system/user'
 // import { listUser, queryUserVal } from '@/api/system/user'
 
 export default {
@@ -408,6 +419,7 @@ export default {
   data() {
     return {
       dataList: '',
+      value_s:[],
       // 遮罩层
       loading: true,
       loading_s: false,
@@ -499,6 +511,21 @@ export default {
     });
   },
   methods: {
+    // 仓储费状态修改
+    handleStatusChange(row) {
+      let text = row.fBillstatus === "0" ? "启用" : "停用";
+      this.$confirm('确认要"' + text + '""' + row.fCorpid + '"用户吗?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return updateAgreement_s(row.fId, row.fBillstatus);
+      }).then(() => {
+        this.msgSuccess(text + "成功");
+      }).catch(function() {
+        row.fBillstatus = row.fBillstatus === "0" ? "1" : "0";
+      });
+    },
     test_s(){
       console.log(this.agreementitemsList)
     },
@@ -570,6 +597,7 @@ export default {
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       listFees(queryParams).then((response) => {
+        console.log(this.fWbuOptions)
         // this.fWbuOptions = response.rows;
         let fWbuOptions = this.fWbuOptions.concat(response.rows)
         this.fWbuOptions = Array.from(new Set(fWbuOptions))
@@ -682,7 +710,7 @@ export default {
       this.reset()
       const fId = row.fId || this.ids
       getAgreement(fId).then(response => {
-
+        console.log(response)
         this.deptName = response.data.dept.deptName
         this.form = response.data.tWarehouseAgreement
         this.fMblnoOptions = response.data.corps