Ver código fonte

完成企业采购,接口对接

linan 4 anos atrás
pai
commit
604f93d1e5

+ 4 - 0
.eslintrc.js

@@ -10,5 +10,9 @@ module.exports = {
   },
   },
   parserOptions: {
   parserOptions: {
     parser: 'babel-eslint'
     parser: 'babel-eslint'
+  },
+  globals: {
+    'AMap': false,
+    'AMapUI': false
   }
   }
 }
 }

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
     "core-js": "^3.3.2",
     "core-js": "^3.3.2",
     "element-ui": "^2.13.2",
     "element-ui": "^2.13.2",
     "vue": "^2.6.10",
     "vue": "^2.6.10",
+    "vue-amap": "^0.5.10",
     "vue-module-loader": "^1.0.3",
     "vue-module-loader": "^1.0.3",
     "vue-router": "^3.1.3",
     "vue-router": "^3.1.3",
     "vuex": "^3.0.1"
     "vuex": "^3.0.1"

+ 20 - 15
public/index.html

@@ -1,17 +1,22 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html lang="en">
 <html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title>慧牧科技——云服务平台</title>
-  </head>
-  <body>
-    <noscript>
-      <strong>We're sorry but admincraft-module doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
-    </noscript>
-    <div id="app"></div>
-    <!-- built files will be auto injected -->
-  </body>
-</html>
+
+<head>
+	<meta charset="utf-8">
+	<meta http-equiv="X-UA-Compatible" content="IE=edge">
+	<meta name="viewport" content="width=device-width,initial-scale=1.0">
+	<link rel="icon" href="<%= BASE_URL %>favicon.ico">
+	<!--引入UI组件库(1.1版本) -->
+	<title>慧牧科技——云服务平台</title>
+</head>
+
+<body>
+	<noscript>
+		<strong>We're sorry but admincraft-module doesn't work properly without JavaScript enabled. Please enable it to
+			continue.</strong>
+	</noscript>
+	<div id="app"></div>
+	<!-- built files will be auto injected -->
+</body>
+
+</html>

+ 6 - 0
src/api/productManagement.js

@@ -0,0 +1,6 @@
+import { ajax } from "../sdk/ajax";
+
+
+/* 登录 */
+export const reqLogin = (data) => ajax("post", "/core/auth/login", data)
+

+ 11 - 0
src/api/slaughterManagment.js

@@ -0,0 +1,11 @@
+import { ajax } from "../sdk/ajax";
+
+
+/* 企业采购 */
+// 企业采购列表
+export const reqFirmBuyList = (data) => ajax("post", "/farm-huyang/enterprise-procurement/list", data)
+
+export const reqAddFirmBuy = (data) => ajax("post", "/farm-huyang/enterprise-procurement/add", data)
+
+export const reqUpdateFirmBuy = (data) => ajax("post", "/farm-huyang/enterprise-procurement/update", data)
+

+ 6 - 0
src/api/storeTransportation.js

@@ -0,0 +1,6 @@
+import { ajax } from "../sdk/ajax";
+
+
+/* 登录 */
+export const reqLogin = (data) => ajax("post", "/core/auth/login", data)
+

+ 194 - 0
src/components/map/Amap.vue

@@ -0,0 +1,194 @@
+<template>
+    <div class="container">
+        <div class="search-box">
+            <el-input
+                v-model="searchKey"
+                @keyup.enter.native="searchByHand"
+                placeholder="请输入内容"
+                class="input-with-select"
+            >
+                <el-button slot="append" icon="el-icon-search" @click="searchByHand"></el-button>
+            </el-input>
+            <!-- <input v-model="searchKey" type="search" id="search" />
+            <button @click="searchByHand">搜索</button>-->
+            <div class="tip-box" id="searchTip"></div>
+        </div>
+        <!--
+          amap-manager: 地图管理对象
+          vid:地图容器节点的ID
+          zooms: 地图显示的缩放级别范围,在PC上,默认范围[3,18],取值范围[3-18];在移动设备上,默认范围[3-19],取值范围[3-19]
+          center: 地图中心点坐标值
+          plugin:地图使用的插件
+          events: 事件
+        -->
+        <el-amap
+            class="amap-box"
+            :amap-manager="amapManager"
+            :vid="'amap-vue'"
+            :zoom="zoom"
+            :plugin="plugin"
+            :center="center"
+            :events="events"
+        >
+            <!-- 标记 -->
+            <el-amap-marker v-for="(marker, index) in markers" :position="marker" :key="index"></el-amap-marker>
+        </el-amap>
+    </div>
+</template>
+
+
+
+<script>
+import { AMapManager, lazyAMapApiLoaderInstance } from "vue-amap";
+
+let amapManager = new AMapManager();
+export default {
+    data() {
+        let _this = this;
+        return {
+            address: null,
+            searchKey: "",
+            amapManager,
+            markers: [],
+            searchOption: {
+                city: "全国",
+                citylimit: true
+            },
+            center: [121.329402, 31.228667],
+            zoom: 17,
+            lng: 0,
+            lat: 0,
+            loaded: false,
+            events: {
+                init() {
+                    lazyAMapApiLoaderInstance.load().then(() => {
+                        _this.initSearch();
+                    });
+                },
+                // 点击获取地址的数据
+                click(e) {
+                    _this.markers = [];
+                    let { lng, lat } = e.lnglat;
+                    _this.lng = lng;
+                    _this.lat = lat;
+                    _this.center = [lng, lat];
+                    _this.markers.push([lng, lat]);
+                    // 这里通过高德 SDK 完成。
+                    let geocoder = new AMap.Geocoder({
+                        radius: 1000,
+                        extensions: "all"
+                    });
+                    console.log(geocoder);
+                    geocoder.getAddress([lng, lat], function(status, result) {
+                        if (status === "complete" && result.info === "OK") {
+                            if (result && result.regeocode) {
+                                _this.address =
+                                    result.regeocode.formattedAddress;
+                                _this.searchKey =
+                                    result.regeocode.formattedAddress;
+                                _this.$nextTick();
+                            }
+                        }
+                    });
+                }
+            },
+            // 一些工具插件
+            plugin: [
+                // {
+                //   pName: 'Geocoder',
+                //   events: {
+                //     init (o) {
+                //       console.log(o.getAddress())
+                //     }
+                //   }
+                // },
+                {
+                    // 定位
+                    pName: "Geolocation",
+                    events: {
+                        init(o) {
+                            // o是高德地图定位插件实例
+                            o.getCurrentPosition((status, result) => {
+                                console.log(result);
+                                if (result && result.position) {
+                                    // 设置经度
+                                    _this.lng = result.position.lng;
+                                    // 设置维度
+                                    _this.lat = result.position.lat;
+                                    // 设置坐标
+                                    _this.center = [_this.lng, _this.lat];
+                                    _this.markers.push([_this.lng, _this.lat]);
+                                    // load
+                                    _this.loaded = true;
+                                    // 页面渲染好后
+                                    _this.$nextTick();
+                                }
+                            });
+                        }
+                    }
+                },
+                {
+                    // 工具栏
+                    pName: "ToolBar",
+                    events: {
+                        init(instance) {
+                            console.log(instance);
+                        }
+                    }
+                },
+                {
+                    // 鹰眼
+                    pName: "OverView",
+                    events: {
+                        init(instance) {
+                            console.log(instance);
+                        }
+                    }
+                },
+                
+                {
+                    // 搜索
+                    pName: "PlaceSearch",
+                    events: {
+                        init(instance) {
+                            console.log(instance);
+                        }
+                    }
+                }
+            ]
+        };
+    },
+    methods: {
+        initSearch() {
+            let vm = this;
+            let map = this.amapManager.getMap();
+            AMapUI.loadUI(
+                [
+                    "overlay/SimpleMarker", //SimpleMarker
+                    "overlay/SimpleInfoWindow" //SimpleInfoWindow
+                ],
+                function(SimpleMarker, SimpleInfoWindow) {
+                    console.dir(SimpleMarker)
+
+                    //....引用加载的UI....
+                }
+            );
+        },
+        searchByHand() {
+            console.log("666");
+            // this.poiPicker.searchByKeyword(this.searchKey)
+        }
+    }
+};
+</script>
+
+
+<style lang="scss" scope>
+.container {
+    width: 100%;
+    height: 100%;
+    .search-box {
+        margin-bottom: 15px;
+    }
+}
+</style>

+ 12 - 4
src/main.js

@@ -1,5 +1,4 @@
 import Vue from 'vue'
 import Vue from 'vue'
-
 import ElementUI from 'element-ui';
 import ElementUI from 'element-ui';
 import '../theme/index.css'
 import '../theme/index.css'
 // import 'element-ui/lib/theme-chalk/index.css';
 // import 'element-ui/lib/theme-chalk/index.css';
@@ -10,13 +9,22 @@ import vueModuleLoader from 'vue-module-loader'
 import localModule from './module'
 import localModule from './module'
 import './assets/css/reset.scss'
 import './assets/css/reset.scss'
 
 
+import VueAMap from 'vue-amap'
 
 
+Vue.use(VueAMap)
 Vue.use(vueModuleLoader, { store }).use(ElementUI);
 Vue.use(vueModuleLoader, { store }).use(ElementUI);
 
 
+VueAMap.initAMapApiLoader({
+	key: '89472e3ecbff0eb8b53bafd80959a480',
+	plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.PlaceSearch', 'AMap.Autocomplete', 'AMap.Geolocation', 'AMap.Geocoder'],
+	v: '1.4.4',
+	uiVersion: '1.0'
+})
+
 const app = new Vue({
 const app = new Vue({
-  router,
-  store,
-  render: h => h(App)
+	router,
+	store,
+	render: h => h(App)
 })
 })
 
 
 app.$moduleLoader(localModule)
 app.$moduleLoader(localModule)

+ 11 - 96
src/views/Home/Home.vue

@@ -2,7 +2,7 @@
     <div class="home">
     <div class="home">
         <header class="header">
         <header class="header">
             <div class="left">
             <div class="left">
-                慧牧科技 
+                湖羊屠宰系统 
                 <el-button
                 <el-button
                     @click="onMenuCollapse"
                     @click="onMenuCollapse"
                     circle
                     circle
@@ -49,9 +49,9 @@
                         :unique-opened="true"
                         :unique-opened="true"
                         :default-openeds="defaultUnfoldedMenu"
                         :default-openeds="defaultUnfoldedMenu"
                         select="1-1"
                         select="1-1"
-                        background-color="rgba(40,44,52)"
-                        text-color="#ddd"
-                        active-text-color="#ff4121"
+                        background-color="#545c64"
+                        text-color="#fff"
+                        active-text-color="#ffd04b"
                     >
                     >
                         <div v-for="(item) in menuData " :key="item.index">
                         <div v-for="(item) in menuData " :key="item.index">
                             <el-submenu
                             <el-submenu
@@ -84,22 +84,13 @@
                         </div>
                         </div>
                     </el-menu>
                     </el-menu>
                 </div>
                 </div>
+
                 <div class="col2">
                 <div class="col2">
-                    <header class="col2_header">
-                        <el-tag
-                            v-for="tag in tags"
-                            :key="tag.routerName"
-                            closable
-                            @close="close(tag)"
-                            @click="clickTag(tag)"
-                            :type="tag.type?tag.type:'info'"
-                            class="item"
-                        >{{tag.name}}</el-tag>
-                    </header>
                     <div class="warp">
                     <div class="warp">
                         <router-view />
                         <router-view />
                     </div>
                     </div>
                 </div>
                 </div>
+
             </div>
             </div>
         </section>
         </section>
     </div>
     </div>
@@ -115,7 +106,6 @@ export default {
             menuData,
             menuData,
             menuCollapse: false, //是否水平折叠收起菜单
             menuCollapse: false, //是否水平折叠收起菜单
             defaultUnfoldedMenu: [menuData[0].index], // 默认展开第一项
             defaultUnfoldedMenu: [menuData[0].index], // 默认展开第一项
-            tags: []
         };
         };
     },
     },
     created() {
     created() {
@@ -123,7 +113,6 @@ export default {
             localStorage.getItem("defaultUnfoldedMenu")
             localStorage.getItem("defaultUnfoldedMenu")
         ];
         ];
         this.menuCollapse = JSON.parse(localStorage.getItem("menuCollapse"));
         this.menuCollapse = JSON.parse(localStorage.getItem("menuCollapse"));
-        this.tags = JSON.parse(localStorage.getItem("tagsNavList")) || [];
     },
     },
     methods: {
     methods: {
         // 收取菜单按钮
         // 收取菜单按钮
@@ -151,65 +140,9 @@ export default {
             this.$router.push({
             this.$router.push({
                 name: item.routerName
                 name: item.routerName
             });
             });
-            // 如果tags中已经存在 return
-            let temp = includes(item.routerName);
-            if (temp) {
-                this.tags.forEach(item => {
-                    item.type = "info";
-                });
-                temp.type = "success";
-                return;
-            }
-            this.tags.forEach(item => {
-                item.type = "info";
-            });
-            this.tags.push({
-                name: item.optionName,
-                routerName: item.routerName,
-                type: "success"
-            });
-
-            this.changeTagColor(item.routerName);
-            localStorage.setItem("tagsNavList", JSON.stringify(this.tags));
-            // 查看当前 tags里有没有传进来的路由,返回 true false
-
-            function includes(routerName) {
-                let tags = _this.tags;
-                return tags.find(item => {
-                    return item.routerName == routerName;
-                });
-            }
-        },
-        // 点击 tag
-        clickTag(tag) {
-            console.log(tag.routerName);
-            if (this.$router.history.current.name == tag.routerName) return;
-            this.$router.push({
-                name: tag.routerName
-            });
-            this.changeTagColor(tag.routerName);
-            localStorage.setItem("tagsNavList", JSON.stringify(this.tags));
-        },
-        // 点击 tag 的小×
-        close(tag) {
-            console.log(tag);
-            let spliceIndex = this.tags.findIndex(item => {
-                return item.routerName == tag.routerName;
-            });
-            console.log(spliceIndex);
-            this.tags.splice(spliceIndex, 1);
-            localStorage.setItem("tagsNavList", JSON.stringify(this.tags));
-        },
-        // 改变tag的颜色 公用的
-        changeTagColor(routerName) {
-            this.tags.forEach(item => {
-                if (item.routerName == routerName) {
-                    item.type = "success";
-                } else {
-                    item.type = "info";
-                }
-            });
         },
         },
+        
+        
         onLogOut() {
         onLogOut() {
             this.$router.push('login')
             this.$router.push('login')
         }
         }
@@ -226,7 +159,7 @@ export default {
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
     >.header {
     >.header {
-        background-color: rgb(48, 57, 75);
+        background-color: #4b545e;
         height: 40px;
         height: 40px;
         padding: 10px 20px;
         padding: 10px 20px;
         margin-bottom: 5px;
         margin-bottom: 5px;
@@ -257,7 +190,7 @@ export default {
             box-sizing: border-box;
             box-sizing: border-box;
             .col1 {
             .col1 {
                 margin-right: 5px;
                 margin-right: 5px;
-                background-color: rgb(40,44,52);
+                background-color: #545c64;
                 // background-image: linear-gradient(to bottom, rgb(85, 70, 148) , rgb(41, 33, 85), rgb(41, 33, 85));
                 // background-image: linear-gradient(to bottom, rgb(85, 70, 148) , rgb(41, 33, 85), rgb(41, 33, 85));
             }
             }
             .col2 {
             .col2 {
@@ -268,27 +201,9 @@ export default {
                 margin-right: 5px;
                 margin-right: 5px;
                 height: 100%;
                 height: 100%;
                 overflow: auto;
                 overflow: auto;
-                .col2_header {
-                    position: relative;
-                    width: 85%;
-                    height: 50px;
-                    overflow: hidden;
-                    border-bottom: 2px solid #eee;
-                    background-color: #fff;
-                    padding: 10px;
-                    display: flex;
-                    align-items: center;
-                    box-sizing: border-box;
-                    z-index: 3;
-                    position: fixed;
-                    .item {
-                        margin-right: 8px;
-                        cursor: pointer;
-                    }
-                }
+                
                 .warp {
                 .warp {
                     margin: 15px;
                     margin: 15px;
-                    padding-top: 55px;
                 }
                 }
             }
             }
         }
         }

+ 7 - 7
src/views/Home/mencCofig.js

@@ -1,12 +1,12 @@
 
 
 export const menuData = [
 export const menuData = [
-    {
-        optionName: "首页",
-        iconClassName: "el-icon-s-home",
-        routerName: "Index",
-        index: '-1',
-        disabled: false
-    },
+    // {
+    //     optionName: "首页",
+    //     iconClassName: "el-icon-s-home",
+    //     routerName: "Index",
+    //     index: '-1',
+    //     disabled: false
+    // },
     {
     {
         optionName: "定点屠宰智能管控",
         optionName: "定点屠宰智能管控",
         iconClassName: "el-icon-setting",
         iconClassName: "el-icon-setting",

+ 3 - 3
src/views/Login/Login.vue

@@ -45,8 +45,8 @@ export default {
     data() {
     data() {
         return {
         return {
             form: {
             form: {
-                userName: "yjj",
-                userPwd: "147414"
+                userName: "huyang",
+                userPwd: "123456"
             },
             },
             isShowDialog: false,
             isShowDialog: false,
             orgList: null,
             orgList: null,
@@ -85,7 +85,7 @@ export default {
                     this.orgList = res;
                     this.orgList = res;
                 } else {
                 } else {
                     console.log("6666")
                     console.log("6666")
-                    // this.setOrganizationId(res[0].id);
+                    this.setOrganizationId(res[0].id);
                 }
                 }
             }).catch(err => {
             }).catch(err => {
                 console.log(err)
                 console.log(err)

+ 6 - 6
src/views/index/Index.vue

@@ -2,10 +2,10 @@
     <div class="Index">
     <div class="Index">
         <header class="header">
         <header class="header">
             <div class="left">
             <div class="left">
-                <chart-a class="chart_a"></chart-a>
+                <!-- <chart-a class="chart_a"></chart-a> -->
             </div>
             </div>
             <div class="right">
             <div class="right">
-                <chart-b></chart-b>
+                <!-- <chart-b></chart-b> -->
             </div>
             </div>
         </header>
         </header>
         <section class="section">
         <section class="section">
@@ -75,14 +75,14 @@
 
 
 <script>
 <script>
 import { mapActions } from "vuex";
 import { mapActions } from "vuex";
-import chart_a from "./charts/chart_a";
-import chart_b from "./charts/chart_b";
+// import chart_a from "./charts/chart_a";
+// import chart_b from "./charts/chart_b";
 
 
 export default {
 export default {
     name: "Index",
     name: "Index",
     components: {
     components: {
-        "chart-a": chart_a,
-        "chart-b": chart_b
+        // "chart-a": chart_a,
+        // "chart-b": chart_b
     },
     },
     data() {
     data() {
         return {};
         return {};

+ 1 - 0
src/views/productManagement/goatBloodLog.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  羊血登记 -->
     <!-- 静态  羊血登记 -->
     <div class="goatBloodLog">
     <div class="goatBloodLog">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">羊血登记</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 0
src/views/productManagement/goatHasletLog.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  羊杂登记 -->
     <!-- 静态  羊杂登记 -->
     <div class="goatBloodLog">
     <div class="goatBloodLog">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">羊杂登记</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 2
src/views/productManagement/productInfo.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  产品档案-->
     <!-- 静态  产品档案-->
     <div class="productInfo">
     <div class="productInfo">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">产品档案</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">
@@ -125,8 +126,6 @@ const tableData = [
                     d: "冷藏仓1",
                     d: "冷藏仓1",
                     e: "180天"
                     e: "180天"
                 },
                 },
-                
-                
             ]
             ]
 
 
 export default {
 export default {

+ 1 - 0
src/views/productManagement/sheepskinLog.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  羊皮登记 -->
     <!-- 静态  羊皮登记 -->
     <div class="goatSkin">
     <div class="goatSkin">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">羊皮登记</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 0
src/views/slaughterManagment/costAccounting.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  成本核算 -->
     <!-- 静态  成本核算 -->
     <div class="costAccounting">
     <div class="costAccounting">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">成本核算</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 113 - 98
src/views/slaughterManagment/firmBuy.vue

@@ -1,31 +1,17 @@
 <template>
 <template>
     <!-- 静态  企业采购-->
     <!-- 静态  企业采购-->
     <div class="firmBuy">
     <div class="firmBuy">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">企业采购</h2>
         <header id="header">
         <header id="header">
-            <el-row type="flex">
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="1区" value="11"></el-option>
-                        <el-option label="2区" value="22"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="1舍" value="13"></el-option>
-                        <el-option label="2舍" value="24"></el-option>
-                    </el-select>
-                </el-col>
+            <el-row type="flex" :gutter="20">
                 <el-col :span="4">
                 <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="可用" value="15"></el-option>
-                        <el-option label="可用" value="26"></el-option>
-                    </el-select>
+                    <el-input v-model="search" placeholder="请选择"></el-input>
                 </el-col>
                 </el-col>
                 <el-col :span="4">
                 <el-col :span="4">
                     <el-button type="primary">查找</el-button>
                     <el-button type="primary">查找</el-button>
                 </el-col>
                 </el-col>
                 <el-col :span="4">
                 <el-col :span="4">
-                    <el-button type="primary">新增</el-button>
+                    <el-button type="primary" @click="add">新增</el-button>
                 </el-col>
                 </el-col>
             </el-row>
             </el-row>
         </header>
         </header>
@@ -36,15 +22,13 @@
                     :data="tableData"
                     :data="tableData"
                     tooltip-effect="dark"
                     tooltip-effect="dark"
                     style="width: 100%"
                     style="width: 100%"
-                    @selection-change="handleSelectionChange"
                 >
                 >
-                    <el-table-column type="selection" width="55"></el-table-column>
-                    <el-table-column prop="id" label="羊只编号" width="180"></el-table-column>
-                    <el-table-column prop="date" label="收购时间" width="180"></el-table-column>
-                    <el-table-column prop="area" label="来源牧场" ></el-table-column>
-                    <el-table-column prop="buyWeight" label="收购重量"></el-table-column>
-                    <el-table-column prop="buyPeople" label="收购人员"></el-table-column>
-                    <el-table-column prop="transportCar" label="运输车辆"></el-table-column>
+                    <el-table-column prop="sheepId" label="羊耳标号" width="180"></el-table-column>
+                    <el-table-column prop="acquisitionTime" label="收购时间" width="180"></el-table-column>
+                    <el-table-column prop="origin" label="来源牧场"></el-table-column>
+                    <el-table-column prop="acquisitionWeight" label="收购重量(kg)"></el-table-column>
+                    <el-table-column prop="acquisitionPerson" label="收购人员"></el-table-column>
+                    <el-table-column prop="transportVehicles" label="运输车辆"></el-table-column>
                     <!-- <el-table-column label="操作" width="150">
                     <!-- <el-table-column label="操作" width="150">
                         <template slot-scope="scope">
                         <template slot-scope="scope">
                             <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
                             <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
@@ -52,13 +36,8 @@
                                 <el-button slot="reference" type="text" size="small">删除</el-button>
                                 <el-button slot="reference" type="text" size="small">删除</el-button>
                             </el-popconfirm>
                             </el-popconfirm>
                         </template>
                         </template>
-                    </el-table-column> -->
+                    </el-table-column>-->
                 </el-table>
                 </el-table>
-                <div style="margin-top: 20px">
-                    <el-button @click="toggleSelection([tableData[1], tableData[2]])">切换第二、第三行的选中状态</el-button>
-                    <el-button @click="toggleSelection()">取消选择</el-button>
-                    <el-button @click="inStore">入待宰栏</el-button>
-                </div>
 
 
                 <el-row type="flex" justify="end">
                 <el-row type="flex" justify="end">
                     <el-col :span="8" class="pagination">
                     <el-col :span="8" class="pagination">
@@ -66,95 +45,131 @@
                             @current-change="pageChange"
                             @current-change="pageChange"
                             background
                             background
                             layout="prev, pager, next"
                             layout="prev, pager, next"
-                            :page-count="10"
+                            :page-count="Number(totalPages)"
                         ></el-pagination>
                         ></el-pagination>
                     </el-col>
                     </el-col>
                 </el-row>
                 </el-row>
             </article>
             </article>
         </section>
         </section>
+
+        <el-dialog title="新增种羊档案" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addFirmBuy" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="羊耳标号">
+                            <el-input v-model="formData.sheepId"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="来源牧场">
+                            <el-input v-model="formData.origin"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="收购日期">
+                            <el-date-picker
+                                v-model="formData.acquisitionTime"
+                                type="date"
+                                value-format="yyyy-MM-dd"
+                                placeholder="选择日期"
+                            ></el-date-picker>
+                        </el-form-item>
+
+                        <el-form-item label="收购人">
+                            <el-input v-model="formData.acquisitionPerson"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="羊只重量(kg)">
+                            <el-input v-model="formData.acquisitionWeight"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="车牌号">
+                            <el-input v-model="formData.transportVehicles"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addFirmBuy')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
     </div>
     </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import {
+    reqFirmBuyList,
+    reqAddFirmBuy,
+    reqUpdateFirmBuy
+} from "@/api/slaughterManagment.js";
 
 
-const pageSize = 10
-const tableData = [
-                {
-                    id: "825",
-                    date: "2020-05-02",
-                    area: "哈斯牧场",
-                    buyWeight: "49kg",
-                    buyPeople: "张小刚",
-                    transportCar: "浙A45154"
-                },
-                {
-                    id: "825",
-                    date: "2020-05-02",
-                    area: "哈斯牧场",
-                    buyWeight: "43kg",
-                    buyPeople: "李小红",
-                    transportCar: "浙A45154"
-                },
-                {
-                    id: "825",
-                    date: "2020-05-02",
-                    area: "哈斯牧场",
-                    buyWeight: "48kg",
-                    buyPeople: "王小明",
-                    transportCar: "浙A45154"
-                },
-                {
-                    id: "825",
-                    date: "2020-05-02",
-                    area: "哈斯牧场",
-                    buyWeight: "51kg",
-                    buyPeople: "周小伟",
-                    transportCar: "浙A45154"
-                },
-                {
-                    id: "825",
-                    date: "2020-05-02",
-                    area: "哈斯牧场",
-                    buyWeight: "48kg",
-                    buyPeople: "李小红",
-                    transportCar: "浙A45154"
-                },
-                {
-                    id: "825",
-                    date: "2020-05-02",
-                    area: "哈斯牧场",
-                    buyWeight: "49kg",
-                    buyPeople: "李小红",
-                    transportCar: "浙A45154"
-                },
-                
-            ]
+const pageSize = 10;
+const rules = {};
 
 
 export default {
 export default {
+    name: "firmBuy",
     data() {
     data() {
         return {
         return {
-            value: "",
-            multipleSelection: [],
+            search: "",
             page: 1,
             page: 1,
-            tableData
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                sheepId: "1008",
+                origin: "xx牧场",
+                acquisitionTime: new Date().toLocaleDateString(),
+                acquisitionPerson: "王炸",
+                acquisitionWeight: "51",
+                transportVehicles: "浙A 1380"
+            },
+            rules
         };
         };
     },
     },
-    created() {},
+    created() {
+        // 企业采购列表
+        this.getfirmBuyList();
+    },
     methods: {
     methods: {
-        toggleSelection(rows) {
-            if (rows) {
-                rows.forEach(row => {
-                    this.$refs.multipleTable.toggleRowSelection(row);
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    reqAddFirmBuy(this.formData)
+                        .then(res => {
+                            console.log(res);
+                            this.$message.success('添加成功!')
+                        })
+                        .catch(err => {
+                            console.log(err);
+                            this.$message.error('添加失败!')
+                        });
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 企业采购列表
+        getfirmBuyList() {
+            reqFirmBuyList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    console.log(res);
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
                 });
                 });
-            } else {
-                this.$refs.multipleTable.clearSelection();
-            }
         },
         },
-        // 入待宰栏
-        inStore() {},
         handleSelectionChange(val) {
         handleSelectionChange(val) {
             this.multipleSelection = val;
             this.multipleSelection = val;
         },
         },
+        add() {
+            this.isShow = true;
+        },
         edit(row) {},
         edit(row) {},
         del(row) {},
         del(row) {},
         pageChange(p) {
         pageChange(p) {

+ 1 - 0
src/views/slaughterManagment/packinghouse.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  屠宰加工-->
     <!-- 静态  屠宰加工-->
     <div class="packinghouse">
     <div class="packinghouse">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">屠宰加工</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 0
src/views/slaughterManagment/productTest.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  分割加工 -->
     <!-- 静态  分割加工 -->
     <div class="segmentation">
     <div class="segmentation">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">分割加工</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 0
src/views/slaughterManagment/refrigerationStorage.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  冷库管理 -->
     <!-- 静态  冷库管理 -->
     <div class="refrigerationStorage">
     <div class="refrigerationStorage">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">冷库管理</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 0
src/views/slaughterManagment/segmentation.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  分割加工 -->
     <!-- 静态  分割加工 -->
     <div class="segmentation">
     <div class="segmentation">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">分割加工</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 0
src/views/slaughterManagment/sell.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  销售管理 -->
     <!-- 静态  销售管理 -->
     <div class="sell">
     <div class="sell">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">销售管理</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 1 - 0
src/views/storeTransportation/dispatching.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  配送管理 -->
     <!-- 静态  配送管理 -->
     <div class="dispatching">
     <div class="dispatching">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">配送管理</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 0 - 160
src/views/storeTransportation/goatBloodLog - 副本 - 副本.vue

@@ -1,160 +0,0 @@
-<template>
-    <!-- 静态  羊血登记 -->
-    <div class="goatBloodLog">
-        <header id="header">
-            <el-row type="flex">
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="1区" value="11"></el-option>
-                        <el-option label="2区" value="22"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="1舍" value="13"></el-option>
-                        <el-option label="2舍" value="24"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="可用" value="15"></el-option>
-                        <el-option label="可用" value="26"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-button type="primary">查找</el-button>
-                </el-col>
-                <el-col :span="4">
-                    <el-button type="primary">新增</el-button>
-                </el-col>
-            </el-row>
-        </header>
-        <section>
-            <article class="table">
-                <el-table
-                    ref="multipleTable"
-                    :data="tableData"
-                    tooltip-effect="dark"
-                    style="width: 100%"
-                    @selection-change="handleSelectionChange"
-                >
-                    <el-table-column type="selection" width="55"></el-table-column>
-                    <el-table-column prop="id" label="羊ID" width="180"></el-table-column>
-                    <el-table-column prop="date" label="放血时间" width="180"></el-table-column>
-                    <el-table-column prop="a" label="屠宰批次"></el-table-column>
-                    <el-table-column prop="b" label="重量"></el-table-column>
-                    <el-table-column prop="d" label="保质期"></el-table-column>
-                    <el-table-column prop="c" label="位置"></el-table-column>
-                    <!-- <el-table-column label="操作" width="150">
-                        <template slot-scope="scope">
-                            <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
-                            <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
-                                <el-button slot="reference" type="text" size="small">删除</el-button>
-                            </el-popconfirm>
-                        </template>
-                    </el-table-column> -->
-                </el-table>
-                <div style="margin-top: 20px">
-                    <el-button @click="toggleSelection([tableData[1], tableData[2]])">切换第二、第三行的选中状态</el-button>
-                    <el-button @click="toggleSelection()">取消选择</el-button>
-                    <el-button @click="inStore">删除所选</el-button>
-                </div>
-
-                <el-row type="flex" justify="end">
-                    <el-col :span="8" class="pagination">
-                        <el-pagination
-                            @current-change="pageChange"
-                            background
-                            layout="prev, pager, next"
-                            :page-count="10"
-                        ></el-pagination>
-                    </el-col>
-                </el-row>
-            </article>
-        </section>
-    </div>
-</template>
-
-<script>
-
-const pageSize = 10
-const tableData = [
-                {
-                    id: "12425",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "525g",
-                    d: "25天",
-                    c: "羊血储存一库"
-                },
-                {
-                    id: "12426",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "425g",
-                    d: "25天",
-                    c: "羊血储存一库"
-                },
-                {
-                    id: "12427",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "425g",
-                    d: "25天",
-                    c: "羊血储存一库"
-                },
-                {
-                    id: "12428",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "525g",
-                    d: "25天",
-                    c: "羊血储存一库"
-                },
-                
-            ]
-
-export default {
-    data() {
-        return {
-            value: "",
-            multipleSelection: [],
-            page: 1,
-            tableData
-        };
-    },
-    created() {},
-    methods: {
-        toggleSelection(rows) {
-            if (rows) {
-                rows.forEach(row => {
-                    this.$refs.multipleTable.toggleRowSelection(row);
-                });
-            } else {
-                this.$refs.multipleTable.clearSelection();
-            }
-        },
-        // 入待宰栏
-        inStore() {},
-        handleSelectionChange(val) {
-            this.multipleSelection = val;
-        },
-        edit(row) {},
-        del(row) {},
-        pageChange(p) {
-            console.log(p);
-        }
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-#header {
-    margin-bottom: 15px;
-}
-.table {
-    .pagination {
-        margin-top: 20px;
-    }
-}
-</style>

+ 1 - 0
src/views/storeTransportation/shopStore.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <!-- 静态  门店管理 -->
     <!-- 静态  门店管理 -->
     <div class="shopstare">
     <div class="shopstare">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">门店管理</h2>
         <header id="header">
         <header id="header">
             <el-row type="flex">
             <el-row type="flex">
                 <el-col :span="4">
                 <el-col :span="4">

+ 85 - 141
src/views/storeTransportation/transportation.vue

@@ -1,166 +1,110 @@
 <template>
 <template>
     <!-- 静态  运输管理 -->
     <!-- 静态  运输管理 -->
     <div class="transportation">
     <div class="transportation">
-        <header id="header">
-            <el-row type="flex">
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="1区" value="11"></el-option>
-                        <el-option label="2区" value="22"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="1舍" value="13"></el-option>
-                        <el-option label="2舍" value="24"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-select v-model="value" placeholder="请选择">
-                        <el-option label="可用" value="15"></el-option>
-                        <el-option label="可用" value="26"></el-option>
-                    </el-select>
-                </el-col>
-                <el-col :span="4">
-                    <el-button type="primary">查找</el-button>
-                </el-col>
-                <el-col :span="4">
-                    <el-button type="primary">新增</el-button>
-                </el-col>
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">运输管理</h2>
+        <div class="map">
+            <!-- <el-input
+                v-model="searchKey"
+                @keyup.enter.native="searchByHand"
+                placeholder="请输入内容"
+                class="input-with-select"
+            >
+                <el-button slot="append" icon="el-icon-search" @click="searchByHand"></el-button>
+            </el-input> -->
+            <vue-a-map></vue-a-map>
+        </div>
+        <aside class="aside">
+            <h5>运输车辆信息</h5>
+            <el-row type="flex" class="row">
+                <el-col class="title">车牌号:</el-col>
+                <el-col class="content">浙A45154</el-col>
             </el-row>
             </el-row>
-        </header>
-        <section>
-            <article class="table">
-                <el-table
-                    ref="multipleTable"
-                    :data="tableData"
-                    tooltip-effect="dark"
-                    style="width: 100%"
-                    @selection-change="handleSelectionChange"
-                >
-                    <el-table-column type="selection" width="55"></el-table-column>
-                    <el-table-column prop="id" label="ID编码" width="180"></el-table-column>
-                    <el-table-column prop="date" label="时间" width="180"></el-table-column>
-                    <el-table-column prop="a" label="配送地址"></el-table-column>
-                    <el-table-column prop="b" label="产品名称"></el-table-column>
-                    <el-table-column prop="c" label="重量"></el-table-column>
-                    <el-table-column prop="d" label="配送员"></el-table-column>
-                    <el-table-column label="状态" width="150">
-                        <template slot-scope="scope">
-                            <div v-if="scope.row.status == 0">
-                                <span>配送中</span>
-                                <el-button @click="edit(scope.row)" type="text" size="small">查看行程</el-button>
-                            </div>
-                            <div v-else-if="scope.row.status == 1">配送完成</div>
-                            <div v-else>错误</div>
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <div style="margin-top: 20px">
-                    <el-button @click="toggleSelection([tableData[1], tableData[2]])">切换第二、第三行的选中状态</el-button>
-                    <el-button @click="toggleSelection()">取消选择</el-button>
-                    <el-button @click="inStore">删除所选</el-button>
-                </div>
-
-                <el-row type="flex" justify="end">
-                    <el-col :span="8" class="pagination">
-                        <el-pagination
-                            @current-change="pageChange"
-                            background
-                            layout="prev, pager, next"
-                            :page-count="10"
-                        ></el-pagination>
-                    </el-col>
-                </el-row>
-            </article>
-        </section>
+            <el-row type="flex" class="row">
+                <el-col class="title">运输批次号:</el-col>
+                <el-col class="content">135498</el-col>
+            </el-row>
+            <el-row type="flex" class="row">
+                <el-col class="title">当前车厢温度:</el-col>
+                <el-col class="content">- 5℃</el-col>
+            </el-row>
+            <el-row type="flex" class="row">
+                <el-col class="title">驾驶员:</el-col>
+                <el-col class="content">张三</el-col>
+            </el-row>
+            <el-row type="flex" class="row">
+                <el-col class="title">联系电话:</el-col>
+                <el-col class="content">13545454862</el-col>
+            </el-row>
+            <el-row type="flex" class="row">
+                <el-col class="title">目的地:</el-col>
+                <el-col class="content">杭州市余杭区xx超市</el-col>
+            </el-row>
+            <el-row type="flex" class="row">
+                <el-col class="title">预计到时间:</el-col>
+                <el-col class="content">2020-07-21 06:45</el-col>
+            </el-row>
+            <div class="footer_link">
+                <el-link type="primary" disabled>查看运输单</el-link>
+            </div>
+        </aside>
     </div>
     </div>
 </template>
 </template>
 
 
 <script>
 <script>
-
-const pageSize = 10
-const tableData = [
-                {
-                    id: "12425",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "525g",
-                    c: "羊血储存一库",
-                    d: "25天",
-                    status: 0
-                },
-                {
-                    id: "12425",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "525g",
-                    c: "羊血储存一库",
-                    d: "25天",
-                    status: 0
-                },
-                {
-                    id: "12425",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "525g",
-                    c: "羊血储存一库",
-                    d: "25天",
-                    status: 1
-                },
-                {
-                    id: "12425",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "525g",
-                    c: "羊血储存一库",
-                    d: "25天",
-                    status: 1
-                },
-                
-                
-            ]
+import VueAMap from "../../components/map/Amap.vue";
 
 
 export default {
 export default {
     data() {
     data() {
         return {
         return {
-            value: "",
-            multipleSelection: [],
-            page: 1,
-            tableData
+            searchKey: ""
         };
         };
     },
     },
+    components: { VueAMap },
     created() {},
     created() {},
     methods: {
     methods: {
-        toggleSelection(rows) {
-            if (rows) {
-                rows.forEach(row => {
-                    this.$refs.multipleTable.toggleRowSelection(row);
-                });
-            } else {
-                this.$refs.multipleTable.clearSelection();
-            }
-        },
-        // 入待宰栏
-        inStore() {},
-        handleSelectionChange(val) {
-            this.multipleSelection = val;
-        },
-        edit(row) {},
-        pageChange(p) {
-            console.log(p);
+        searchByHand() {
+            console.log("666");
         }
         }
     }
     }
 };
 };
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-#header {
-    margin-bottom: 15px;
-}
-.table {
-    .pagination {
-        margin-top: 20px;
+.transportation {
+    display: flex;
+    .map {
+        width: 60%;
+        height: 700px;
+    }
+    .aside {
+        flex-grow: 1;
+        margin: 20px 0 0 30px;
+        border: 1px solid rgb(230, 228, 228);
+        border-radius: 15px;
+        padding: 15px;
+        h5 {
+            font-size: 25px;
+            margin-bottom: 20px;
+        }
+        .row {
+            margin-bottom: 15px;
+            .title {
+                width: 240px;
+                font-size: 20px;
+                color: #555;
+                font-weight: 600;
+            }
+            .content {
+                font-size: 20px;
+                color: #666;
+            }
+        }
+        .footer_link {
+            text-align: right;
+            padding-right: 30%;
+            margin-top: 30px;
+            user-select: none;
+        }
     }
     }
 }
 }
 </style>
 </style>