Browse Source

完成 分割加工 成本核算Echarts 及销售管理下 7 个模块

linan 4 năm trước cách đây
mục cha
commit
1e56bc10dd
30 tập tin đã thay đổi với 1893 bổ sung864 xóa
  1. 2 0
      package.json
  2. 61 0
      src/api/sellManagement.js
  3. 11 1
      src/api/slaughterManagment.js
  4. 8 3
      src/main.js
  5. 8 26
      src/router/routes.js
  6. 2 17
      src/views/Home/mencCofig.js
  7. 1 1
      src/views/Login/Login.vue
  8. 6 6
      src/views/index/Index.vue
  9. 222 2
      src/views/sellManagement/carcassSell.vue
  10. 210 3
      src/views/sellManagement/client.vue
  11. 221 3
      src/views/sellManagement/directSell.vue
  12. 228 2
      src/views/sellManagement/elseSell.vue
  13. 210 3
      src/views/sellManagement/price.vue
  14. 0 3
      src/views/sellManagement/segmentationSell.vue
  15. 210 3
      src/views/sellManagement/sellRegister.vue
  16. 226 0
      src/views/sellManagement/splitSell.vue
  17. 9 158
      src/views/slaughterManagment/costAccounting.vue
  18. 96 0
      src/views/slaughterManagment/cost_echarts/E-Cost.vue
  19. 1 1
      src/views/slaughterManagment/firmBuy.vue
  20. 1 1
      src/views/slaughterManagment/inButcherHurdle.vue
  21. 2 2
      src/views/slaughterManagment/inStore.vue
  22. 1 2
      src/views/slaughterManagment/outStore.vue
  23. 1 1
      src/views/slaughterManagment/packinghouse.vue
  24. 0 171
      src/views/slaughterManagment/productTest.vue
  25. 0 185
      src/views/slaughterManagment/refrigerationStorage.vue
  26. 1 1
      src/views/slaughterManagment/regisSlaughter.vue
  27. 1 1
      src/views/slaughterManagment/reportQuarantine.vue
  28. 152 89
      src/views/slaughterManagment/segmentation.vue
  29. 0 177
      src/views/slaughterManagment/sell.vue
  30. 2 2
      src/views/slaughterManagment/slaughterWeight.vue

+ 2 - 0
package.json

@@ -10,7 +10,9 @@
   "dependencies": {
     "cnpm": "^6.1.1",
     "core-js": "^3.3.2",
+    "echarts": "^4.8.0",
     "element-ui": "^2.13.2",
+    "moment": "^2.27.0",
     "vue": "^2.6.10",
     "vue-amap": "^0.5.10",
     "vue-module-loader": "^1.0.3",

+ 61 - 0
src/api/sellManagement.js

@@ -0,0 +1,61 @@
+import { ajax } from "../sdk/ajax";
+
+
+/* 客户管理  Client*/
+export const reqClientList = (data) => ajax("post", "/farm-huyang/customer-management/list", data)
+
+export const reqAddClient = (data) => ajax("post", "/farm-huyang/customer-management/add", data)
+
+export const reqUpdateClient = (data) => ajax("post", "/farm-huyang/customer-management/update", data)
+
+export const reqDelClient = (id) => ajax("post", "/farm-huyang/customer-management/delete", {id})
+
+
+/* 价格管理  Price*/
+export const reqPriceList = (data) => ajax("post", "/farm-huyang/price-management/list", data)
+
+export const reqAddPrice = (data) => ajax("post", "/farm-huyang/price-management/add", data)
+
+export const reqUpdatePrice = (data) => ajax("post", "/farm-huyang/price-management/update", data)
+
+export const reqDelPrice = (id) => ajax("post", "/farm-huyang/price-management/delete", {id})
+
+
+/* 屠宰直销  DirectSell*/
+export const reqDirectSellList = (data) => ajax("post", "/farm-huyang/slaughter-sales/list", data)
+
+export const reqAddDirectSell = (data) => ajax("post", "/farm-huyang/slaughter-sales/add", data)
+
+export const reqUpdateDirectSell = (data) => ajax("post", "/farm-huyang/slaughter-sales/update", data)
+
+export const reqDelDirectSell = (id) => ajax("post", "/farm-huyang/slaughter-sales/delete", {id})
+
+
+/* 胴体销售  Carcass*/
+export const reqCarcassList = (data) => ajax("post", "/farm-huyang/carcass-sales/list", data)
+
+export const reqAddCarcass = (data) => ajax("post", "/farm-huyang/carcass-sales/add", data)
+
+export const reqUpdateCarcass = (data) => ajax("post", "/farm-huyang/carcass-sales/update", data)
+
+export const reqDelCarcass = (id) => ajax("post", "/farm-huyang/carcass-sales/delete", {id})
+
+
+/* 分割销售  SplitSell*/
+export const reqSplitSellList = (data) => ajax("post", "/farm-huyang/split-sales/list", data)
+
+export const reqAddSplitSell = (data) => ajax("post", "/farm-huyang/split-sales/add", data)
+
+export const reqUpdateSplitSell = (data) => ajax("post", "/farm-huyang/split-sales/update", data)
+
+export const reqDelSplitSell = (id) => ajax("post", "/farm-huyang/split-sales/delete", {id})
+
+
+/* 其他销售  ElseSell*/
+export const reqElseSellList = (data) => ajax("post", "/farm-huyang/other-sales/list", data)
+
+export const reqAddElseSell = (data) => ajax("post", "/farm-huyang/other-sales/add", data)
+
+export const reqUpdateElseSell = (data) => ajax("post", "/farm-huyang/other-sales/update", data)
+
+export const reqDelElseSell = (id) => ajax("post", "/farm-huyang/other-sales/delete", {id})

+ 11 - 1
src/api/slaughterManagment.js

@@ -72,4 +72,14 @@ export const reqAddOutStore = (data) => ajax("post", "/farm-huyang/warehouse-out
 
 export const reqUpdateOutStore = (data) => ajax("post", "/farm-huyang/warehouse-out-manage/update", data)
 
-export const reqDelOutStore = (id) => ajax("post", "/farm-huyang/warehouse-out-manage/delete", {id})
+export const reqDelOutStore = (id) => ajax("post", "/farm-huyang/warehouse-out-manage/delete", {id})
+
+
+/* 分割加工  Segmentation*/
+export const reqSegmentationList = (data) => ajax("post", "/farm-huyang/segmentation-processing/list", data)
+
+export const reqAddSegmentation = (data) => ajax("post", "/farm-huyang/segmentation-processing/add", data)
+
+export const reqUpdateSegmentation = (data) => ajax("post", "/farm-huyang/segmentation-processing/update", data)
+
+export const reqDelSegmentation = (id) => ajax("post", "/farm-huyang/segmentation-processing/delete", {id})

+ 8 - 3
src/main.js

@@ -1,16 +1,21 @@
 import Vue from 'vue'
 import ElementUI from 'element-ui';
-import '../theme/index.css'
-// import 'element-ui/lib/theme-chalk/index.css';
+// import '../theme/index.css'
+import 'element-ui/lib/theme-chalk/index.css';
 import App from './App.vue'
 import router from './router'
 import store from './store'
 import vueModuleLoader from 'vue-module-loader'
 import localModule from './module'
 import './assets/css/reset.scss'
-
+import echarts from "echarts";
+import moment from 'moment'
 import VueAMap from 'vue-amap'
 
+moment.locale('zh-cn');  // 汉化
+Vue.prototype.$echarts = echarts
+Vue.prototype.$moment = moment;
+
 Vue.use(VueAMap)
 Vue.use(vueModuleLoader, { store }).use(ElementUI);
 

+ 8 - 26
src/router/routes.js

@@ -1,6 +1,6 @@
 import Home from '../views/Home/Home.vue'
 /* 首页  */
-import Index from '@/views/index/Index.vue'
+import index from '@/views/index/Index.vue'
 /* 定点屠宰智能管控 */
 import firmBuy from '@/views/slaughterManagment/firmBuy.vue'
 import inButcherHurdle from '@/views/slaughterManagment/inButcherHurdle.vue'
@@ -11,17 +11,14 @@ import inStore from '@/views/slaughterManagment/inStore.vue'
 import outStore from '@/views/slaughterManagment/outStore.vue'
 
 import segmentation from '@/views/slaughterManagment/segmentation.vue'
-import productTest from '@/views/slaughterManagment/productTest.vue'
-import sell from '@/views/slaughterManagment/sell.vue'
 import costAccounting from '@/views/slaughterManagment/costAccounting.vue'
-import refrigerationStorage from '@/views/slaughterManagment/refrigerationStorage.vue'
 /* 销售管理 */
 import client from '@/views/sellManagement/client.vue'
 import price from '@/views/sellManagement/price.vue'
 import sellRegister from '@/views/sellManagement/sellRegister.vue'
 import directSell from '@/views/sellManagement/directSell.vue'
 import carcassSell from '@/views/sellManagement/carcassSell.vue'
-import segmentationSell from '@/views/sellManagement/segmentationSell.vue'
+import splitSell from '@/views/sellManagement/splitSell.vue'
 import elseSell from '@/views/sellManagement/elseSell.vue'
 /* 产品制作智能监控 */
 import productInfo from '@/views/productManagement/productInfo.vue'
@@ -49,9 +46,9 @@ export default [
 		component: Home,
 		children: [
 			{
-				path: 'Index',
-				name: 'Index',
-				component: Index
+				path: 'index',
+				name: 'index',
+				component: index
 			},
 			// 产床管理
 			{
@@ -96,25 +93,10 @@ export default [
 				component: segmentation
 			},
 			{
-				path: 'productTest',
-				name: 'productTest',
-				component: productTest
-			},
-			{
-				path: 'sell',
-				name: 'sell',
-				component: sell
-			},
-			{
 				path: 'costAccounting',
 				name: 'costAccounting',
 				component: costAccounting
 			},
-			{
-				path: 'refrigerationStorage',
-				name: 'refrigerationStorage',
-				component: refrigerationStorage
-			},
 			/* 销售管理 */
 			{
 				path: 'client',
@@ -142,9 +124,9 @@ export default [
 				component: carcassSell
 			},
 			{
-				path: 'segmentationSell',
-				name: 'segmentationSell',
-				component: segmentationSell
+				path: 'splitSell',
+				name: 'splitSell',
+				component: splitSell
 			},
 			{
 				path: 'elseSell',

+ 2 - 17
src/views/Home/mencCofig.js

@@ -55,25 +55,10 @@ export const menuData = [
                 routerName: "segmentation"
             },
             {
-                optionName: '产品检测',
-                index: '1-6',
-                routerName: "productTest"
-            },
-            {
-                optionName: '销售管理',
-                index: '1-7',
-                routerName: "sell"
-            },
-            {
                 optionName: '成本核算',
                 index: '1-8',
                 routerName: "costAccounting"
-            },
-            {
-                optionName: '冷库管理',
-                index: '1-9',
-                routerName: "refrigerationStorage"
-            },
+            }
         ]
     },
     {
@@ -110,7 +95,7 @@ export const menuData = [
             {
                 optionName: '分割销售',
                 index: '2-6',
-                routerName: "segmentationSell"
+                routerName: "splitSell"
             },
             {
                 optionName: '其他销售',

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

@@ -101,7 +101,7 @@ export default {
             reqOrganizationId({orgId: id}).then(res => {
                 this.isShowDialog = false;
                     //导航到 正式页面
-                    this.$router.replace("/home/Index");
+                    this.$router.replace("/home/firmBuy");
             }).catch(err => {
                 if (err.errMsg) this.$message.error(err.errMsg);
                     else this.$message.error("服务器发生异常");

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

@@ -2,10 +2,10 @@
     <div class="Index">
         <header class="header">
             <div class="left">
-                <!-- <chart-a class="chart_a"></chart-a> -->
+                <chart-a class="chart_a"></chart-a>
             </div>
             <div class="right">
-                <!-- <chart-b></chart-b> -->
+                <chart-b></chart-b>
             </div>
         </header>
         <section class="section">
@@ -75,14 +75,14 @@
 
 <script>
 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 {
     name: "Index",
     components: {
-        // "chart-a": chart_a,
-        // "chart-b": chart_b
+        "chart-a": chart_a,
+        "chart-b": chart_b
     },
     data() {
         return {};

+ 222 - 2
src/views/sellManagement/carcassSell.vue

@@ -1,3 +1,223 @@
 <template>
-    <div>胴体销售</div>
-</template>
+    <div class="Carcass">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">胴体销售</h2>
+        <header id="header">
+            <el-row type="flex" :gutter="20">
+                <el-col :span="4">
+                    <el-input v-model="search" placeholder="请选择"></el-input>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="getCarcassList">查找</el-button>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="add">新增</el-button>
+                </el-col>
+            </el-row>
+        </header>
+        <section>
+            <article class="table">
+                <el-table
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    style="width: 100%"
+                >
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="carcassCode" label="胴体编码" width="100"></el-table-column>
+                    <el-table-column prop="sellingTime" label="出售时间" width="180"></el-table-column>
+                    <el-table-column prop="batchNumber" label="批次号"></el-table-column>
+                    <el-table-column prop="carcassWeight" label="胴体重量(kg)"></el-table-column>
+                    <el-table-column prop="buyer" label="购买人(企业)"></el-table-column>
+                    <el-table-column prop="remarks" 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>
+
+                <el-row type="flex" justify="end">
+                    <el-col :span="8" class="pagination">
+                        <el-pagination
+                            @current-change="pageChange"
+                            background
+                            layout="prev, pager, next"
+                            :page-count="Number(totalPages)"
+                        ></el-pagination>
+                    </el-col>
+                </el-row>
+            </article>
+        </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addCarcass" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="胴体编码">
+                            <el-input v-model="formData.carcassCode"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="出售时间">
+                            <el-date-picker
+                                v-model="formData.sellingTime"
+                                type="date"
+                                value-format="yyyy-MM-dd"
+                                placeholder="选择日期"
+                            ></el-date-picker>
+                        </el-form-item>
+
+                        <el-form-item label="批次号">
+                            <el-input v-model="formData.batchNumber"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="胴体重量(kg)">
+                            <el-input v-model="formData.carcassWeight"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="购买人(企业)">
+                            <el-input v-model="formData.buyer"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="备注">
+                            <el-input type="textarea" v-model="formData.remarks"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addCarcass')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import {
+    reqCarcassList,
+    reqAddCarcass,
+    reqUpdateCarcass,
+    reqDelCarcass
+} from "@/api/sellManagement.js";
+
+const pageSize = 10;
+const rules = {};
+
+export default {
+    name: "Carcass",
+    data() {
+        return {
+            search: "",
+            page: 1,
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                carcassCode: "1688",
+                sellingTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
+                batchNumber: "2678",
+                carcassWeight: "26",
+                buyer: "张小刚",
+                remarks: "暂无备注"
+            },
+            isAdd: false,
+            rules
+        };
+    },
+    created() {
+        // 出仓管理列表
+        this.getCarcassList();
+    },
+    methods: {
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddCarcass(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getCarcassList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdateCarcass(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getCarcassList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getCarcassList() {
+            reqCarcassList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
+                });
+        },
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelCarcass(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getCarcassList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getCarcassList();
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+#header {
+    margin-bottom: 15px;
+}
+.table {
+    .pagination {
+        margin-top: 20px;
+    }
+}
+</style>

+ 210 - 3
src/views/sellManagement/client.vue

@@ -1,5 +1,212 @@
 <template>
-    <div>
-        客户管理
+    <div class="clientManagement">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">客户管理</h2>
+        <header id="header">
+            <el-row type="flex" :gutter="20">
+                <el-col :span="4">
+                    <el-input v-model="search" placeholder="请选择"></el-input>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="getClientList">查找</el-button>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="add">新增</el-button>
+                </el-col>
+            </el-row>
+        </header>
+        <section>
+            <article class="table">
+                <el-table
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    style="width: 100%"
+                >
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="company" label="公司(单位)" width="180"></el-table-column>
+                    <el-table-column prop="customerName" label="客户姓名" width="180"></el-table-column>
+                    <el-table-column prop="contactInformation" label="联系方式"></el-table-column>
+                    <el-table-column prop="address" label="地址"></el-table-column>
+                    <el-table-column prop="remarks" 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>
+
+                <el-row type="flex" justify="end">
+                    <el-col :span="8" class="pagination">
+                        <el-pagination
+                            @current-change="pageChange"
+                            background
+                            layout="prev, pager, next"
+                            :page-count="Number(totalPages)"
+                        ></el-pagination>
+                    </el-col>
+                </el-row>
+            </article>
+        </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addClient" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="公司(单位)">
+                            <el-input v-model="formData.company"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="客户姓名">
+                            <el-input v-model="formData.customerName"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="联系方式">
+                            <el-input v-model="formData.contactInformation"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="地址">
+                            <el-input v-model="formData.address"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="备注">
+                            <el-input type="textarea" v-model="formData.remarks"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addClient')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
     </div>
-</template>
+</template>
+
+<script>
+import {
+    reqClientList,
+    reqAddClient,
+    reqUpdateClient,
+    reqDelClient
+} from "@/api/sellManagement.js";
+
+const pageSize = 10;
+const rules = {};
+
+export default {
+    name: "clientManagement",
+    data() {
+        return {
+            search: "",
+            page: 1,
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                company: "深圳大蒜食品有限公司",
+                customerName: "张小刚",
+                contactInformation: "13456255464",
+                address: "深圳新思路1242号",
+                remarks: "未添加备注信息"
+            },
+            isAdd: false,
+            rules
+        };
+    },
+    created() {
+        // 出仓管理列表
+        this.getClientList();
+    },
+    methods: {
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddClient(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getClientList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdateClient(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getClientList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getClientList() {
+            reqClientList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
+                });
+        },
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelClient(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getClientList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getClientList();
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+#header {
+    margin-bottom: 15px;
+}
+.table {
+    .pagination {
+        margin-top: 20px;
+    }
+}
+</style>

+ 221 - 3
src/views/sellManagement/directSell.vue

@@ -1,5 +1,223 @@
 <template>
-    <div>
-        屠宰直销
+    <div class="DirectSell">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">屠宰直销</h2>
+        <header id="header">
+            <el-row type="flex" :gutter="20">
+                <el-col :span="4">
+                    <el-input v-model="search" placeholder="请选择"></el-input>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="getDirectSellList">查找</el-button>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="add">新增</el-button>
+                </el-col>
+            </el-row>
+        </header>
+        <section>
+            <article class="table">
+                <el-table
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    style="width: 100%"
+                >
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="code" label="ID编码" width="180"></el-table-column>
+                    <el-table-column prop="saleTime" label="出售时间" width="180"></el-table-column>
+                    <el-table-column prop="buyer" label="购买人(企业)"></el-table-column>
+                    <el-table-column prop="weight" label="重量(kg)"></el-table-column>
+                    <el-table-column prop="remarks" label="备注"></el-table-column>
+                    <el-table-column prop="transactionNo" 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>
+
+                <el-row type="flex" justify="end">
+                    <el-col :span="8" class="pagination">
+                        <el-pagination
+                            @current-change="pageChange"
+                            background
+                            layout="prev, pager, next"
+                            :page-count="Number(totalPages)"
+                        ></el-pagination>
+                    </el-col>
+                </el-row>
+            </article>
+        </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addDirectSell" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="ID编码">
+                            <el-input v-model="formData.code"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="出售时间">
+                            <el-date-picker
+                                v-model="formData.saleTime"
+                                type="date"
+                                value-format="yyyy-MM-dd"
+                                placeholder="选择日期"
+                            ></el-date-picker>
+                        </el-form-item>
+
+                        <el-form-item label="购买人(企业)">
+                            <el-input v-model="formData.buyer"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="重量(kg)">
+                            <el-input v-model="formData.weight"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="备注">
+                            <el-input type="textarea" v-model="formData.remarks"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="交易单号">
+                            <el-input v-model="formData.transactionNo"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addDirectSell')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
     </div>
-</template>
+</template>
+
+<script>
+import {
+    reqDirectSellList,
+    reqAddDirectSell,
+    reqUpdateDirectSell,
+    reqDelDirectSell
+} from "@/api/sellManagement.js";
+
+const pageSize = 10;
+const rules = {};
+
+export default {
+    name: "DirectSell",
+    data() {
+        return {
+            search: "",
+            page: 1,
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                code: "1688",
+                saleTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
+                buyer: "张小刚",
+                weight: "6",
+                remarks: "好吃的大羊排",
+                transactionNo: "AF652AC456"
+            },
+            isAdd: false,
+            rules
+        };
+    },
+    created() {
+        // 出仓管理列表
+        this.getDirectSellList();
+    },
+    methods: {
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddDirectSell(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getDirectSellList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdateDirectSell(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getDirectSellList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getDirectSellList() {
+            reqDirectSellList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
+                });
+        },
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelDirectSell(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getDirectSellList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getDirectSellList();
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+#header {
+    margin-bottom: 15px;
+}
+.table {
+    .pagination {
+        margin-top: 20px;
+    }
+}
+</style>

+ 228 - 2
src/views/sellManagement/elseSell.vue

@@ -1,3 +1,229 @@
 <template>
-    <div>其他销售</div>
-</template>
+    <div class="ElseSell">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">其他销售</h2>
+        <header id="header">
+            <el-row type="flex" :gutter="20">
+                <el-col :span="4">
+                    <el-input v-model="search" placeholder="请选择"></el-input>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="getElseSellList">查找</el-button>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="add">新增</el-button>
+                </el-col>
+            </el-row>
+        </header>
+        <section>
+            <article class="table">
+                <el-table
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    style="width: 100%"
+                >
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="productName" label="产品名称" width="100"></el-table-column>
+                    <el-table-column prop="weight" label="重量(kg)" width="100"></el-table-column>
+                    <el-table-column prop="salesTime" label="销售时间" width="180"></el-table-column>
+                    <el-table-column prop="buyer" label="购买人(企业)"></el-table-column>
+                    <el-table-column prop="seller" label="销售人(企业)"></el-table-column>
+                    <el-table-column prop="price" label="价格(元)"></el-table-column>
+                    <el-table-column prop="transportVehicle" 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>
+
+                <el-row type="flex" justify="end">
+                    <el-col :span="8" class="pagination">
+                        <el-pagination
+                            @current-change="pageChange"
+                            background
+                            layout="prev, pager, next"
+                            :page-count="Number(totalPages)"
+                        ></el-pagination>
+                    </el-col>
+                </el-row>
+            </article>
+        </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addElseSell" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="产品名称">
+                            <el-input v-model="formData.productName"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="重量(kg)">
+                            <el-input v-model="formData.weight"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="销售时间">
+                            <el-date-picker
+                                v-model="formData.salesTime"
+                                type="date"
+                                value-format="yyyy-MM-dd"
+                                placeholder="选择日期"
+                            ></el-date-picker>
+                        </el-form-item>
+
+                        <el-form-item label="购买人(企业)">
+                            <el-input v-model="formData.buyer"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="销售人(企业)">
+                            <el-input v-model="formData.seller"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="价格">
+                            <el-input v-model="formData.price"></el-input>
+                        </el-form-item>
+                        
+                        <el-form-item label="运输车辆">
+                            <el-input type="textarea" v-model="formData.transportVehicle"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addElseSell')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import {
+    reqElseSellList,
+    reqAddElseSell,
+    reqUpdateElseSell,
+    reqDelElseSell
+} from "@/api/sellManagement.js";
+
+const pageSize = 10;
+const rules = {};
+
+export default {
+    name: "ElseSell",
+    data() {
+        return {
+            search: "",
+            page: 1,
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                productName: "羊腿",
+                weight: "2678",
+                salesTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
+                buyer: "张小刚",
+                seller: "王小五",
+                price: "198",
+                transportVehicle: "浙A45154"
+            },
+            isAdd: false,
+            rules
+        };
+    },
+    created() {
+        // 出仓管理列表
+        this.getElseSellList();
+    },
+    methods: {
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddElseSell(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getElseSellList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdateElseSell(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getElseSellList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getElseSellList() {
+            reqElseSellList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
+                });
+        },
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelElseSell(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getElseSellList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getElseSellList();
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+#header {
+    margin-bottom: 15px;
+}
+.table {
+    .pagination {
+        margin-top: 20px;
+    }
+}
+</style>

+ 210 - 3
src/views/sellManagement/price.vue

@@ -1,5 +1,212 @@
 <template>
-    <div>
-        价格管理
+    <div class="price">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">价格管理</h2>
+        <header id="header">
+            <el-row type="flex" :gutter="20">
+                <el-col :span="4">
+                    <el-input v-model="search" placeholder="请选择"></el-input>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="getPriceList">查找</el-button>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="add">新增</el-button>
+                </el-col>
+            </el-row>
+        </header>
+        <section>
+            <article class="table">
+                <el-table
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    style="width: 100%"
+                >
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="productName" label="产品名称" width="180"></el-table-column>
+                    <el-table-column prop="specificModel" label="规格型号" width="180"></el-table-column>
+                    <el-table-column prop="category" label="所属类别"></el-table-column>
+                    <el-table-column prop="price" label="价格(元)"></el-table-column>
+                    <el-table-column prop="operation" 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>
+
+                <el-row type="flex" justify="end">
+                    <el-col :span="8" class="pagination">
+                        <el-pagination
+                            @current-change="pageChange"
+                            background
+                            layout="prev, pager, next"
+                            :page-count="Number(totalPages)"
+                        ></el-pagination>
+                    </el-col>
+                </el-row>
+            </article>
+        </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addPrice" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="产品名称">
+                            <el-input v-model="formData.productName"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="规格型号">
+                            <el-input v-model="formData.specificModel"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="所属类别">
+                            <el-input v-model="formData.category"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="价格(元)">
+                            <el-input v-model="formData.price"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="操作">
+                            <el-input v-model="formData.operation"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addPrice')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
     </div>
-</template>
+</template>
+
+<script>
+import {
+    reqPriceList,
+    reqAddPrice,
+    reqUpdatePrice,
+    reqDelPrice
+} from "@/api/sellManagement.js";
+
+const pageSize = 10;
+const rules = {};
+
+export default {
+    name: "price",
+    data() {
+        return {
+            search: "",
+            page: 1,
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                productName: "大羊排",
+                specificModel: "2500g/袋",
+                category: "成品",
+                price: "198",
+                operation: 1
+            },
+            isAdd: false,
+            rules
+        };
+    },
+    created() {
+        // 出仓管理列表
+        this.getPriceList();
+    },
+    methods: {
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddPrice(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getPriceList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdatePrice(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getPriceList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getPriceList() {
+            reqPriceList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
+                });
+        },
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelPrice(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getPriceList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getPriceList();
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+#header {
+    margin-bottom: 15px;
+}
+.table {
+    .pagination {
+        margin-top: 20px;
+    }
+}
+</style>

+ 0 - 3
src/views/sellManagement/segmentationSell.vue

@@ -1,3 +0,0 @@
-<template>
-    <div>分割销售</div>
-</template>

+ 210 - 3
src/views/sellManagement/sellRegister.vue

@@ -1,5 +1,212 @@
 <template>
-    <div>
-        销售统计
+    <div class="price">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">销售统计</h2>
+        <header id="header">
+            <el-row type="flex" :gutter="20">
+                <el-col :span="4">
+                    <el-input v-model="search" placeholder="请选择"></el-input>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="getPriceList">查找</el-button>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="add">新增</el-button>
+                </el-col>
+            </el-row>
+        </header>
+        <section>
+            <article class="table">
+                <el-table
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    style="width: 100%"
+                >
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="productName" label="产品名称" width="180"></el-table-column>
+                    <el-table-column prop="specificModel" label="规格型号" width="180"></el-table-column>
+                    <el-table-column prop="category" label="所属类别"></el-table-column>
+                    <el-table-column prop="price" label="价格(元)"></el-table-column>
+                    <el-table-column prop="operation" 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>
+
+                <el-row type="flex" justify="end">
+                    <el-col :span="8" class="pagination">
+                        <el-pagination
+                            @current-change="pageChange"
+                            background
+                            layout="prev, pager, next"
+                            :page-count="Number(totalPages)"
+                        ></el-pagination>
+                    </el-col>
+                </el-row>
+            </article>
+        </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addPrice" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="产品名称">
+                            <el-input v-model="formData.productName"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="规格型号">
+                            <el-input v-model="formData.specificModel"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="所属类别">
+                            <el-input v-model="formData.category"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="价格(元)">
+                            <el-input v-model="formData.price"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="操作">
+                            <el-input v-model="formData.operation"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addPrice')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
     </div>
-</template>
+</template>
+
+<script>
+import {
+    reqPriceList,
+    reqAddPrice,
+    reqUpdatePrice,
+    reqDelPrice
+} from "@/api/sellManagement.js";
+
+const pageSize = 10;
+const rules = {};
+
+export default {
+    name: "price",
+    data() {
+        return {
+            search: "",
+            page: 1,
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                productName: "大羊排",
+                specificModel: "2500g/袋",
+                category: "成品",
+                price: "198",
+                operation: 1
+            },
+            isAdd: false,
+            rules
+        };
+    },
+    created() {
+        // 出仓管理列表
+        this.getPriceList();
+    },
+    methods: {
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddPrice(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getPriceList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdatePrice(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getPriceList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getPriceList() {
+            reqPriceList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
+                });
+        },
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelPrice(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getPriceList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getPriceList();
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+#header {
+    margin-bottom: 15px;
+}
+.table {
+    .pagination {
+        margin-top: 20px;
+    }
+}
+</style>

+ 226 - 0
src/views/sellManagement/splitSell.vue

@@ -0,0 +1,226 @@
+<template>
+    <div class="SplitSell">
+        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">分割销售</h2>
+        <header id="header">
+            <el-row type="flex" :gutter="20">
+                <el-col :span="4">
+                    <el-input v-model="search" placeholder="请选择"></el-input>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="getSplitSellList">查找</el-button>
+                </el-col>
+                <el-col :span="4">
+                    <el-button type="primary" @click="add">新增</el-button>
+                </el-col>
+            </el-row>
+        </header>
+        <section>
+            <article class="table">
+                <el-table
+                    ref="multipleTable"
+                    :data="tableData"
+                    tooltip-effect="dark"
+                    style="width: 100%"
+                >
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="productName" label="产品名称"></el-table-column>
+                    <el-table-column prop="specificModel" label="规格型号"></el-table-column>
+                    <el-table-column prop="category" label="所属类别"></el-table-column>
+                    <el-table-column prop="price" label="价格(元)"></el-table-column>
+                    <el-table-column prop="weight" label="重量(kg)"></el-table-column>
+                    <el-table-column prop="buyer" label="购买人(企业)"></el-table-column>
+                    <el-table-column prop="seller" 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>
+
+                <el-row type="flex" justify="end">
+                    <el-col :span="8" class="pagination">
+                        <el-pagination
+                            @current-change="pageChange"
+                            background
+                            layout="prev, pager, next"
+                            :page-count="Number(totalPages)"
+                        ></el-pagination>
+                    </el-col>
+                </el-row>
+            </article>
+        </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addSplitSell" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="产品名称">
+                            <el-input v-model="formData.productName"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="规格型号">
+                            <el-input v-model="formData.specificModel"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="所属类别">
+                            <el-input v-model="formData.category"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="价格">
+                            <el-input v-model="formData.price"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="销售重量(kg)">
+                            <el-input v-model="formData.weight"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="购买人(企业)">
+                            <el-input v-model="formData.buyer"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="销售人(企业)">
+                            <el-input v-model="formData.seller"></el-input>
+                        </el-form-item>
+
+                        
+                        
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addSplitSell')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import {
+    reqSplitSellList,
+    reqAddSplitSell,
+    reqUpdateSplitSell,
+    reqDelSplitSell
+} from "@/api/sellManagement.js";
+
+const pageSize = 10;
+const rules = {};
+
+export default {
+    name: "SplitSell",
+    data() {
+        return {
+            search: "",
+            page: 1,
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                productName: "羊腿",
+                specificModel: "AAAA",
+                category: "羊腿",
+                price: "198",
+                weight: "8",
+                buyer: "张小刚",
+                seller: "王小五",
+            },
+            isAdd: false,
+            rules
+        };
+    },
+    created() {
+        // 出仓管理列表
+        this.getSplitSellList();
+    },
+    methods: {
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddSplitSell(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getSplitSellList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdateSplitSell(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getSplitSellList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getSplitSellList() {
+            reqSplitSellList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
+                });
+        },
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelSplitSell(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getSplitSellList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
+        },
+        pageChange(p) {
+            console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getSplitSellList();
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+#header {
+    margin-bottom: 15px;
+}
+.table {
+    .pagination {
+        margin-top: 20px;
+    }
+}
+</style>

+ 9 - 158
src/views/slaughterManagment/costAccounting.vue

@@ -2,175 +2,26 @@
     <!-- 静态  成本核算 -->
     <div class="costAccounting">
         <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">成本核算</h2>
-        <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="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 prop="e" label="排酸后重量"></el-table-column>
-                    <el-table-column prop="f" label="排酸损耗"></el-table-column>
-                    <el-table-column prop="g" 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>
+        <E-Cost></E-Cost>
     </div>
 </template>
 
 <script>
-
-const pageSize = 10
-const tableData = [
-                {
-                    a: "15463",
-                    b: "胴体",
-                    c: "2020-07-14",
-                    d: "49kg",
-                    e: "48kg",
-                    f: "1.6%",
-                    g: "张小刚",
-                },
-                {
-                    a: "15463",
-                    b: "带骨羊前腿",
-                    c: "2020-07-14",
-                    d: "49kg",
-                    e: "48kg",
-                    f: "1.6%",
-                    g: "张小刚",
-                },
-                {
-                    a: "15463",
-                    b: "羔羊肉卷",
-                    c: "2020-07-14",
-                    d: "49kg",
-                    e: "48kg",
-                    f: "1.6%",
-                    g: "张小刚",
-                },
-                {
-                    a: "15463",
-                    b: "胴体",
-                    c: "2020-07-14",
-                    d: "49kg",
-                    e: "48kg",
-                    f: "1.6%",
-                    g: "张小刚",
-                },
-                {
-                    a: "15463",
-                    b: "羔羊肉卷",
-                    c: "2020-07-14",
-                    d: "49kg",
-                    e: "48kg",
-                    f: "1.6%",
-                    g: "张小刚",
-                },
-                
-                
-            ]
+import ECost from './cost_echarts/E-Cost'
 
 export default {
+    name: 'costAccounting',
     data() {
-        return {
-            value: "",
-            multipleSelection: [],
-            page: 1,
-            tableData
-        };
+        return {};
+    },
+    components: {
+        'E-Cost': ECost
     },
     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);
-        }
-    }
+    methods: {}
 };
 </script>
 
 <style lang="scss" scoped>
-#header {
-    margin-bottom: 15px;
-}
-.table {
-    .pagination {
-        margin-top: 20px;
-    }
-}
+
 </style>

+ 96 - 0
src/views/slaughterManagment/cost_echarts/E-Cost.vue

@@ -0,0 +1,96 @@
+<template>
+    <div class="E-Cost">
+        <div id="E-Cost" style="height:400px;"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "E-Cost",
+    props: ["tagId"],
+    data() {
+        return {};
+    },
+    mounted() {
+        this.drawChart();
+    },
+    methods: {
+        drawChart() {
+            // 基于准备好的dom,初始化echarts实例
+            let myChart = this.$echarts.init(document.getElementById("E-Cost"));
+            // 指定图表的配置项和数据
+            let option = {
+                tooltip: {
+                    trigger: "item",
+                    formatter: "{b}: {c} ({d}%)"
+                },
+                legend: {
+                    orient: "horizontal",
+                    bottom: 10,
+                    textStyle: {
+                        fontSize: 15
+                    },
+                    itemWidth: 15,
+                    itemHeight: 15,
+                    data: [
+                        "购买成本",
+                        "运输成本",
+                        "饲料成本",
+                        "人工成本",
+                        "消毒成本",
+                        "折旧成本",
+                        "水电费",
+                        "排酸损耗"
+                    ]
+                },
+                color: [
+                    "#FF6A26",
+                    "#3BFFDF",
+                    "#FFB2FF",
+                    "#3FCCFF",
+                    "#5C7CFF",
+                    "#DA37B0",
+                    "#FF8686",
+                    "#A550F4"
+                ],
+                series: [
+                    {
+                        type: "pie",
+                        // 内外圈厚度
+                        radius: ["0%", "60%"],
+                        label: {
+                            formatter: "{bStyle|{b}:}{c}  ({d}%)  ",
+                            fontSize: 15,
+                            rich: {
+                                bStyle: {
+                                    fontSize: 16
+                                }
+                            }
+                        },
+                        data: [
+                            { value: 626, name: "购买成本" },
+                            { value: 337, name: "运输成本" },
+                            { value: 459, name: "饲料成本" },
+                            { value: 200, name: "人工成本" },
+                            { value: 46, name: "消毒成本" },
+                            { value: 200, name: "折旧成本" },
+                            { value: 212, name: "水电费" },
+                            { value: 123, name: "排酸损耗" }
+                        ]
+                    }
+                ]
+            };
+            // 使用刚指定的配置项和数据显示图表。
+            myChart.setOption(option);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.E-Cost {
+    .chart {
+        width: 100%;
+    }
+}
+</style>

+ 1 - 1
src/views/slaughterManagment/firmBuy.vue

@@ -119,7 +119,7 @@ export default {
             formData: {
                 sheepId: "1008",
                 origin: "xx牧场",
-                acquisitionTime: new Date().toJSON().substr(0, 10),
+                acquisitionTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 acquisitionPerson: "王炸",
                 acquisitionWeight: "51",
                 transportVehicles: "浙A 1380"

+ 1 - 1
src/views/slaughterManagment/inButcherHurdle.vue

@@ -114,7 +114,7 @@ export default {
             isShow: false,
             formData: {
                 sheepId: "1008",
-                entryTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
+                entryTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 operator: "王炸",
                 currentPosition: "待宰栏一舍01",
                 batchNo: '1396'

+ 2 - 2
src/views/slaughterManagment/inStore.vue

@@ -130,9 +130,9 @@ export default {
             isShow: false,
             formData: {
                 carcassCode: "1006",
-                storageTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
+                storageTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 storageLocation: "15206",
-                slaughterTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
+                slaughterTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 storageWeight: "48",
                 operator: "李小红",
                 slaughterBatch: "16546"

+ 1 - 2
src/views/slaughterManagment/outStore.vue

@@ -1,5 +1,4 @@
 <template>
-    <!-- 静态  出仓管理 outStore-->
     <div class="outStore">
         <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">出仓管理</h2>
         <header id="header">
@@ -120,7 +119,7 @@ export default {
             isShow: false,
             formData: {
                 carcassCode: "1010",
-                deliveryTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
+                deliveryTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 currentStatus: "3",
                 deliveryWeight: "48",
                 operator: "王三喜",

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

@@ -114,7 +114,7 @@ export default {
             isShow: false,
             formData: {
                 sheepId: "1008",
-                entryTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
+                entryTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 operator: "王炸",
                 currentPosition: "待宰栏一舍01",
                 batchNo: '1396'

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

@@ -1,171 +0,0 @@
-<template>
-    <!-- 静态  分割加工 -->
-    <div class="segmentation">
-        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">分割加工</h2>
-        <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="羊只编号" 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 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: "12457",
-                    date: "2020-07-14 14:35",
-                    a: "待宰栏一舍01",
-                    b: "张小刚",
-                    c: "12456"
-                },
-                {
-                    id: "12457",
-                    date: "2020-07-14 14:35",
-                    a: "待宰栏一舍01",
-                    b: "李小红",
-                    c: "12456"
-                },
-                {
-                    id: "12457",
-                    date: "2020-07-14 14:35",
-                    a: "待宰栏一舍01",
-                    b: "王小明",
-                    c: "12456"
-                },
-                {
-                    id: "12457",
-                    date: "2020-07-14 14:35",
-                    a: "待宰栏一舍01",
-                    b: "周小伟",
-                    c: "12456"
-                },
-                {
-                    id: "12457",
-                    date: "2020-07-14 14:35",
-                    a: "待宰栏一舍01",
-                    b: "张小刚",
-                    c: "12456"
-                },
-                {
-                    id: "12457",
-                    date: "2020-07-14 14:35",
-                    a: "待宰栏一舍01",
-                    b: "李小红",
-                    c: "12456"
-                },
-               
-                
-            ]
-
-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>

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

@@ -1,185 +0,0 @@
-<template>
-    <!-- 静态  冷库管理 -->
-    <div class="refrigerationStorage">
-        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">冷库管理</h2>
-        <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="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 prop="e" label="入库重量"></el-table-column>
-                    <el-table-column prop="f" label="操作人员"></el-table-column>
-                    <el-table-column prop="g" 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 = [
-                {
-                    a: "12425",
-                    b: "2020-07-14",
-                    c: "一号仓",
-                    d: "2020-07-21",
-                    e: "49kg",
-                    f: "张小刚",
-                    g: "15464"
-                },
-                {
-                    a: "12425",
-                    b: "2020-07-14",
-                    c: "一号仓",
-                    d: "2020-07-21",
-                    e: "49kg",
-                    f: "王小明",
-                    g: "15464"
-                },
-                {
-                    a: "12425",
-                    b: "2020-07-14",
-                    c: "一号仓",
-                    d: "2020-07-21",
-                    e: "49kg",
-                    f: "周小伟",
-                    g: "15464"
-                },
-                {
-                    a: "12425",
-                    b: "2020-07-14",
-                    c: "一号仓",
-                    d: "2020-07-21",
-                    e: "49kg",
-                    f: "王小明",
-                    g: "15464"
-                },
-                {
-                    a: "12425",
-                    b: "2020-07-14",
-                    c: "一号仓",
-                    d: "2020-07-21",
-                    e: "49kg",
-                    f: "张小刚",
-                    g: "15464"
-                },
-                {
-                    a: "12425",
-                    b: "2020-07-14",
-                    c: "一号仓",
-                    d: "2020-07-21",
-                    e: "49kg",
-                    f: "周小伟",
-                    g: "15464"
-                },
-                
-                
-            ]
-
-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 - 1
src/views/slaughterManagment/regisSlaughter.vue

@@ -121,7 +121,7 @@ export default {
             isShow: false,
             formData: {
                 sheepId: "1006",
-                registrationTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
+                registrationTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 slaughterBatch: "12489",
                 entryWeight: "48",
                 operator: "李小红",

+ 1 - 1
src/views/slaughterManagment/reportQuarantine.vue

@@ -119,7 +119,7 @@ export default {
             isShow: false,
             formData: {
                 sheepId: "1008",
-                inspectionDate: new Date().toJSON().substr(0, 10),
+                inspectionDate: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 inspectionPerson: "王炸",
                 status: "1",
                 quarantineNo: "88255662380",

+ 152 - 89
src/views/slaughterManagment/segmentation.vue

@@ -1,32 +1,16 @@
 <template>
-    <!-- 静态  分割加工 -->
     <div class="segmentation">
         <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">分割加工</h2>
         <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-row type="flex" :gutter="20">
                 <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-input v-model="search" placeholder="请选择"></el-input>
                 </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-button type="primary" @click="getSegmentationList">查找</el-button>
                 </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-button type="primary" @click="add">新增</el-button>
                 </el-col>
             </el-row>
         </header>
@@ -37,29 +21,23 @@
                     :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="筒体编号" 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">
+                    <el-table-column prop="id" label="序号" width="80"></el-table-column>
+                    <el-table-column prop="carcassCode" label="胴体编码" width="180"></el-table-column>
+                    <el-table-column prop="processingTime" label="加工时间" width="180"></el-table-column>
+                    <el-table-column prop="slaughterBatch" label="屠宰批次"></el-table-column>
+                    <el-table-column prop="weightBefore" label="加工前重量(kg)" width="180"></el-table-column>
+                    <el-table-column prop="confirmPeople" label="确认人"></el-table-column>
+                    <el-table-column prop="remarks" 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-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">
@@ -67,83 +45,168 @@
                             @current-change="pageChange"
                             background
                             layout="prev, pager, next"
-                            :page-count="10"
+                            :page-count="Number(totalPages)"
                         ></el-pagination>
                     </el-col>
                 </el-row>
             </article>
         </section>
+
+        <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
+            <el-row type="flex">
+                <el-col :span="20">
+                    <el-form ref="addSegmentation" :model="formData" :rules="rules" label-width="140px">
+                        <el-form-item label="胴体编码">
+                            <el-input v-model="formData.carcassCode"></el-input>
+                        </el-form-item>
+
+
+                        <el-form-item label="加工时间">
+                            <el-date-picker
+                                v-model="formData.processingTime"
+                                type="date"
+                                value-format="yyyy-MM-dd"
+                                placeholder="选择日期"
+                            ></el-date-picker>
+                        </el-form-item>
+
+                        <el-form-item label="屠宰批次">
+                            <el-input v-model="formData.slaughterBatch"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="加工前重量(kg)">
+                            <el-input v-model="formData.weightBefore"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="确认人">
+                            <el-input v-model="formData.confirmPeople"></el-input>
+                        </el-form-item>
+
+                        <el-form-item label="备注">
+                            <el-input type="textarea" v-model="formData.remarks"></el-input>
+                        </el-form-item>
+
+                        <el-form-item>
+                            <el-button @click="isShow=false">取 消</el-button>
+                            <el-button type="primary" @click="submitForm('addSegmentation')">保 存</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-col>
+            </el-row>
+        </el-dialog>
     </div>
 </template>
 
 <script>
+import {
+    reqSegmentationList,
+    reqAddSegmentation,
+    reqUpdateSegmentation,
+    reqDelSegmentation
+} from "@/api/slaughterManagment.js";
 
-const pageSize = 10
-const tableData = [
-                {
-                    id: "12425",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "52kg",
-                    c: "张小刚",
-                    d: "暂无备注"
-                },
-                {
-                    id: "12426",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "49kg",
-                    c: "张小刚",
-                    d: "暂无备注"
-                },
-                {
-                    id: "12427",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "46kg",
-                    c: "张小刚",
-                    d: "暂无备注"
-                },
-                {
-                    id: "12428",
-                    date: "2020-07-14",
-                    a: "24563",
-                    b: "50kg",
-                    c: "张小刚",
-                    d: "暂无备注"
-                },
-                
-            ]
+const pageSize = 10;
+const rules = {};
 
 export default {
+    name: "segmentation",
     data() {
         return {
-            value: "",
-            multipleSelection: [],
+            search: "",
             page: 1,
-            tableData
+            tableData: [],
+            totalPages: 0,
+            isShow: false,
+            formData: {
+                carcassCode: "1010",
+                processingTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
+                slaughterBatch: "3244",
+                weightBefore: "48",
+                confirmPeople: "王三喜",
+                remarks: "暂无备注"
+            },
+            isAdd: false,
+            rules
         };
     },
-    created() {},
+    created() {
+        // 出仓管理列表
+        this.getSegmentationList();
+    },
     methods: {
-        toggleSelection(rows) {
-            if (rows) {
-                rows.forEach(row => {
-                    this.$refs.multipleTable.toggleRowSelection(row);
+        submitForm(formName) {
+            this.$refs[formName].validate(valid => {
+                if (valid) {
+                    if (this.isAdd) {
+                        reqAddSegmentation(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getSegmentationList();
+                                this.$message.success("添加成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("添加失败!");
+                            });
+                    } else {
+                        reqUpdateSegmentation(this.formData)
+                            .then(res => {
+                                // 出仓管理列表
+                                this.getSegmentationList();
+                                this.$message.success("编辑成功!");
+                            })
+                            .catch(err => {
+                                console.log(err);
+                                this.$message.error("编辑失败!");
+                            });
+                    }
+                } else {
+                    return false;
+                }
+            });
+        },
+        // 出仓管理列表 
+        getSegmentationList() {
+            reqSegmentationList({
+                searchStr: this.search,
+                pageSize,
+                pageNum: this.page
+            })
+                .then(res => {
+                    this.tableData = res.content;
+                    this.totalPages = res.totalPages;
+                })
+                .catch(err => {
+                    console.log(err);
                 });
-            } else {
-                this.$refs.multipleTable.clearSelection();
-            }
         },
-        // 入待宰栏
-        inStore() {},
-        handleSelectionChange(val) {
-            this.multipleSelection = val;
+        add() {
+            this.isShow = true;
+            this.isAdd = true
+        },
+        edit(row) {
+            this.formData = row;
+            this.isShow = true;
+            this.isAdd = false
+        },
+        del(row) {
+            reqDelSegmentation(row.id)
+                .then(res => {
+                    console.log(res);
+                    // 出仓管理列表
+                    this.getSegmentationList();
+                    this.$message.success("删除成功!");
+                })
+                .catch(err => {
+                    console.log(err);
+                    this.$message.error("删除失败!");
+                });
         },
-        edit(row) {},
-        del(row) {},
         pageChange(p) {
             console.log(p);
+            this.page = p;
+            // 出仓管理列表
+            this.getSegmentationList();
         }
     }
 };

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

@@ -1,177 +0,0 @@
-<template>
-    <!-- 静态  销售管理 -->
-    <div class="sell">
-        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">销售管理</h2>
-        <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="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 prop="e" 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 = [
-                {
-                    a: "广州广泛食品有限公司",
-                    b: "张小刚",
-                    c: "13456255464",
-                    d: "深圳新思路1242号",
-                    e: "未添加备注信息"
-                },
-                {
-                    a: "广州广泛食品有限公司",
-                    b: "李小红",
-                    c: "13456255464",
-                    d: "湖北省武汉市武昌区高架路135号",
-                    e: "未添加备注信息"
-                },
-                {
-                    a: "广州广泛食品有限公司",
-                    b: "王小明",
-                    c: "13456255464",
-                    d: "金华市淮海路12号",
-                    e: "未添加备注信息"
-                },
-                {
-                    a: "广州广泛食品有限公司",
-                    b: "李小红",
-                    c: "13456255464",
-                    d: "湖北省武汉市武昌区高架路135号",
-                    e: "未添加备注信息"
-                },
-                {
-                    a: "广州广泛食品有限公司",
-                    b: "王小明",
-                    c: "13456255464",
-                    d: "金华市淮海路12号",
-                    e: "未添加备注信息"
-                },
-                {
-                    a: "广州广泛食品有限公司",
-                    b: "张小刚",
-                    c: "13456255464",
-                    d: "深圳新思路1242号",
-                    e: "未添加备注信息"
-                },
-                {
-                    a: "广州广泛食品有限公司",
-                    b: "张小刚",
-                    c: "13456255464",
-                    d: "深圳新思路1242号",
-                    e: "未添加备注信息"
-                },
-                
-            ]
-
-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>

+ 2 - 2
src/views/slaughterManagment/slaughterWeight.vue

@@ -125,8 +125,8 @@ export default {
             formData: {
                 carcassCode: "1006",
                 slaughterBatch: "15206",
-                slaughterTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
-                weighingTime: new Date().toJSON().substr(0, 10) + ' ' + new Date().toJSON().substr(11, 8),
+                slaughterTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
+                weighingTime: this.$moment().format("YYYY-MM-DD 00:00:00"),
                 carcassWeight: "48",
                 operator: "李小红"
             },