Browse Source

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

tong 4 years ago
parent
commit
b074c91f9d

+ 15 - 0
src/api/index.js

@@ -7,3 +7,18 @@ export function listCorps(query) {
     method: 'get'
     method: 'get'
   })
   })
 }
 }
+// 查询客户详情列表
+export function listCorps_s(query) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/wareHouseList',
+    method: 'get'
+  })
+}
+
+// 查询客户详情列表
+export function listCorps_ss(fId) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/goodsList/' + fId,
+    method: 'get'
+  })
+}

+ 5 - 2
src/views/agreement/agreementTask/index.vue

@@ -140,7 +140,7 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="客户名称" align="center" prop="fCorpid"/>
       <el-table-column label="客户名称" align="center" prop="fCorpid"/>
       <el-table-column label="协议编号" align="center" prop="fContractno"/>
       <el-table-column label="协议编号" align="center" prop="fContractno"/>
-      <el-table-column label="费用名称" align="center" prop="fFeeid"/>
+<!--      <el-table-column label="费用名称" align="center" prop="fFeeid"/>-->
       <el-table-column label="有效期起" align="center" prop="fBegindate" width="180">
       <el-table-column label="有效期起" align="center" prop="fBegindate" width="180">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.fBegindate, '{y}-{m}-{d}') }}</span>
           <span>{{ parseTime(scope.row.fBegindate, '{y}-{m}-{d}') }}</span>
@@ -635,7 +635,9 @@ export default {
       }
       }
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       let queryParams = { pageNum: 1, pageSize: 10, fName: name };
       listFees(queryParams).then((response) => {
       listFees(queryParams).then((response) => {
-        this.fWbuOptions = response.rows;
+        let fWbuOptions = this.fWbuOptions.concat(response.rows)
+        this.fWbuOptions = Array.from(new Set(fWbuOptions))
+        console.log(this.fWbuOptions)
       });
       });
     },
     },
     /** 新增按钮操作 */
     /** 新增按钮操作 */
@@ -669,6 +671,7 @@ export default {
         for (let item in this.agreementitemsList) {
         for (let item in this.agreementitemsList) {
           this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
           this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
         }
         }
+        this.fWbuOptions = response.data.feesList
         console.log(JSON.stringify(this.agreementitemsList))
         console.log(JSON.stringify(this.agreementitemsList))
 
 
         this.open = true
         this.open = true

+ 29 - 15
src/views/index.vue

@@ -69,7 +69,8 @@
     </div>
     </div>
     <div style="width: 100%;margin-bottom: 50px">
     <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="name" label="待办事宜" width="360">
+        </el-table-column>
         <el-table-column prop="date" label="时间" width="300"></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-column prop="address" label="操作"></el-table-column>
       </el-table>
       </el-table>
@@ -88,7 +89,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { listCorps } from "../../src/api/index";
+import { listCorps , listCorps_s,listCorps_ss} from "../../src/api/index";
 export default {
 export default {
   name: "index",
   name: "index",
   data() {
   data() {
@@ -97,7 +98,7 @@ export default {
       version: "3.2.1",
       version: "3.2.1",
       tableData: [{
       tableData: [{
         date: '2020-11-20 12:00',
         date: '2020-11-20 12:00',
-        name: '某客户出库单审核',
+        name: '<p>某客户账单审核</p>',
         address: '查看详情'
         address: '查看详情'
       }, {
       }, {
         date: '2020-11-20 12:00',
         date: '2020-11-20 12:00',
@@ -117,6 +118,8 @@ export default {
   },
   },
   created(){
   created(){
     this.getList();
     this.getList();
+    this.getLabel_s();
+    this.getLabel_ss();
   },
   },
   methods: {
   methods: {
     //设置单元格边框
     //设置单元格边框
@@ -130,9 +133,22 @@ export default {
         console.log(response.rows);
         console.log(response.rows);
       });
       });
     },
     },
+    // 仓库图表
+    getLabel_s(){
+      listCorps_s(this.queryParse).then(response =>{
+        console.log(response.rows);
+      })
+    },
+    // 商品图表
+    getLabel_ss(){
+      listCorps_ss(0).then(response =>{
+        console.log(response);
+      })
+    },
     goTarget(href) {
     goTarget(href) {
       window.open(href, "_blank");
       window.open(href, "_blank");
     },
     },
+    //仓库图表
     drawLine() {
     drawLine() {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
       let myChart = this.$echarts.init(document.getElementById('box'))
       let myChart = this.$echarts.init(document.getElementById('box'))
@@ -227,10 +243,8 @@ export default {
                   }
                   }
                 }
                 }
               },
               },
-              {value: 535, name: '荆州'},
-              {value: 510, name: '兖州'},
-              {value: 634, name: '益州'},
-              {value: 735, name: '西凉'}
+              {value: 200, name: '1号仓库'},
+              {value: 500, name: '剩余库容'},
             ],
             ],
             emphasis: {
             emphasis: {
               itemStyle: {
               itemStyle: {
@@ -251,7 +265,7 @@ export default {
         backgroundColor: '#fff',
         backgroundColor: '#fff',
 
 
         title: {
         title: {
-          text: '某某统计',
+          text: '货主库存占比统计',
           left: 'center',
           left: 'center',
           top: 20,
           top: 20,
           textStyle: {
           textStyle: {
@@ -279,11 +293,11 @@ export default {
             radius: '80%',
             radius: '80%',
             center: ['50%', '60%'],
             center: ['50%', '60%'],
             data: [
             data: [
-              {value: 335, name: '某某库存1'},
-              {value: 310, name: '某某库存2'},
-              {value: 274, name: '某某库存3'},
-              {value: 235, name: '某某库存4'},
-              {value: 400, name: '某某库存5'}
+              {value: 335, name: '货主1'},
+              {value: 310, name: '货主2'},
+              {value: 274, name: '货主3'},
+              {value: 235, name: '货主4'},
+              {value: 400, name: '货主5'}
             ].sort(function (a, b) { return a.value - b.value; }),
             ].sort(function (a, b) { return a.value - b.value; }),
             roseType: 'radius',
             roseType: 'radius',
             label: {
             label: {
@@ -318,7 +332,7 @@ export default {
       // 绘制图表
       // 绘制图表
       myChart.setOption({
       myChart.setOption({
         title: {
         title: {
-          text: '某某库存统计',
+          text: '本仓库商品统计',
           subtext: '虚构数据',
           subtext: '虚构数据',
           left: 'center'
           left: 'center'
         },
         },
@@ -338,7 +352,7 @@ export default {
         xAxis: [
         xAxis: [
           {
           {
             type: 'category',
             type: 'category',
-            data: ['1号仓库', '2号仓库', '3号仓库', '4号仓库', '5号仓库', '6号仓库', '7号仓库'],
+            data: ['棉花', '淀粉', '木薯', '冰糖', '麻花', '海盐', '胡椒粉'],
             axisTick: {
             axisTick: {
               alignWithLabel: true
               alignWithLabel: true
             }
             }

+ 23 - 16
src/views/warehouseBusiness/agreement/index.vue

@@ -342,14 +342,14 @@
           header-align="center"
           header-align="center"
           align="center"
           align="center"
           width="180px"
           width="180px"
-          label="费用名称"
+          label="费用名称1"
         >
         >
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-select
             <el-select
               v-model="scope.row.fFeeid"
               v-model="scope.row.fFeeid"
               filterable
               filterable
-              :disabled="browseStatus"
               remote
               remote
+              :disabled="browseStatus"
               :remote-method="fWRemoteMethod"
               :remote-method="fWRemoteMethod"
               placeholder="费用名称"
               placeholder="费用名称"
             >
             >
@@ -386,7 +386,7 @@
 <script>
 <script>
 import moment from 'moment'
 import moment from 'moment'
 import {
 import {
-  listAgreement,
+  listAgreements,
   getAgreement,
   getAgreement,
   delAgreement,
   delAgreement,
   addAgreement,
   addAgreement,
@@ -434,6 +434,7 @@ export default {
       agreementList: [],
       agreementList: [],
       // 弹出层标题
       // 弹出层标题
       title: '',
       title: '',
+      add:'',
       // 是否显示弹出层
       // 是否显示弹出层
       open: false,
       open: false,
       // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典
       // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典
@@ -555,14 +556,27 @@ export default {
     /** 查询仓储费列表 */
     /** 查询仓储费列表 */
     getList() {
     getList() {
       this.loading = true
       this.loading = true
-      listAgreement(this.queryParams).then(response => {
+      listAgreements(this.queryParams).then(response => {
         console.log(response)
         console.log(response)
         this.agreementList = response.rows
         this.agreementList = response.rows
         this.total = response.total
         this.total = response.total
         this.loading = false
         this.loading = false
       })
       })
     },
     },
-
+// 远程模糊查询费用名称
+    fWRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      listFees(queryParams).then((response) => {
+        // this.fWbuOptions = response.rows;
+        // console.log(response)
+        let fWbuOptions = this.fWbuOptions.concat(response.rows)
+        this.fWbuOptions = Array.from(new Set(fWbuOptions))
+        console.log(this.fWbuOptions)
+      });
+    },
     // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典翻译
     // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典翻译
     fStltypeidFormat(row, column) {
     fStltypeidFormat(row, column) {
       return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid)
       return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid)
@@ -648,16 +662,6 @@ export default {
       this.single = selection.length !== 1
       this.single = selection.length !== 1
       this.multiple = !selection.length
       this.multiple = !selection.length
     },
     },
-    // 远程模糊查询费用名称
-    fWRemoteMethod(name) {
-      if (name == null || name === "") {
-        return false;
-      }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
-      listFees(queryParams).then((response) => {
-        this.fWbuOptions = response.rows;
-      });
-    },
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() {
     handleAdd() {
       this.reset()
       this.reset()
@@ -686,9 +690,12 @@ export default {
         this.agreementitemsList = response.data.tWarehouseAgreementitems
         this.agreementitemsList = response.data.tWarehouseAgreementitems
         for (let item in this.agreementitemsList) {
         for (let item in this.agreementitemsList) {
           this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
           this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+          // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
         }
         }
+        // console.log(response.data.feesList)
+        this.fWbuOptions = response.data.feesList
+        this.add = row
         console.log(JSON.stringify(this.agreementitemsList))
         console.log(JSON.stringify(this.agreementitemsList))
-
         this.open = true
         this.open = true
         this.title = '修改仓储费'
         this.title = '修改仓储费'
       })
       })

+ 9 - 3
src/views/warehouseBusiness/inStock/index.vue

@@ -2070,7 +2070,7 @@
               style="padding-bottom: 0px; font-weight: bold; border: none"
               style="padding-bottom: 0px; font-weight: bold; border: none"
               class="zzss"
               class="zzss"
             >
             >
-              
+
             </td> -->
             </td> -->
           </tr>
           </tr>
           <tr v-for="(item,index) in Printinglist" :key="index">
           <tr v-for="(item,index) in Printinglist" :key="index">
@@ -2929,6 +2929,7 @@ export default {
         }
         }
         this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
         this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
         this.$set(this.form, "fEta", Date.parse(this.form.fEta));
         this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+        this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
         this.$set(this.form, "createTime", Date.parse(this.form.createTime));
         this.$set(this.form, "createTime", Date.parse(this.form.createTime));
         this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
         this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
         for (let list in this.dataList) {
         for (let list in this.dataList) {
@@ -2957,7 +2958,6 @@ export default {
           );
           );
         }
         }
         this.userOptions = response.data.sysUser;
         this.userOptions = response.data.sysUser;
-        this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
         this.open = true;
         this.open = true;
         this.title = "修改仓入库";
         this.title = "修改仓入库";
       });
       });
@@ -3289,10 +3289,16 @@ export default {
             this.msgSuccess("提交成功");
             this.msgSuccess("提交成功");
             if(status === 2) {
             if(status === 2) {
               this.open = true;
               this.open = true;
+              this.form = response.data
+              this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+              this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+              this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+              this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+              this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
             }else {
             }else {
               this.open = false;
               this.open = false;
             }
             }
-            
+
             this.getList();
             this.getList();
           });
           });
         }
         }