소스 검색

圣牧饲料备用字段限制去掉

baishaojie 4 달 전
부모
커밋
9dc5d5089f

+ 2 - 2
.env.development

@@ -6,10 +6,10 @@ ENV = 'development'
 #VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 
 # 白少后台本地
-VUE_APP_BASE_API = 'http://192.168.1.59:8081/'
+#VUE_APP_BASE_API = 'http://127.0.0.1:8081/'
 
 线上
-#VUE_APP_BASE_API = 'http://127.0.0.1:8081/'
+VUE_APP_BASE_API = 'http://127.0.0.1:8081/'
 
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.

BIN
dist-250811.zip


BIN
dist250505.zip


BIN
dist250513.zip


+ 174 - 164
src/router/index.js

@@ -38,194 +38,204 @@ import Layout from "@/layout";
  * a base page that does not have permission requirements
  * all roles can be accessed
  */
-export const constantRoutes = [
-  {
-    path: "/login",
-    component: () => import("@/views/login/index"),
-    hidden: true,
-  },
-  {
-    path: "/404",
-    component: () => import("@/views/404"),
-    hidden: true,
-  },
+export const constantRoutes = [{
+        path: "/login",
+        component: () =>
+            import ("@/views/login/index"),
+        hidden: true,
+    },
+    {
+        path: "/404",
+        component: () =>
+            import ("@/views/404"),
+        hidden: true,
+    },
 
-  {
-    path: "/",
-    component: Layout,
-    redirect: "/dashboard",
-    children: [
-      {
-        path: "dashboard",
-        name: "Dashboard",
-        // component: () => import('@/views/dashboard/editor/index'),
-        component: () => import("@/views/dashboard/index"),
-        meta: { title: "首页", icon: "首页", affix: true },
-      },
-    ],
-  },
-  {
-    path: "/changpwd",
-    component: Layout,
-    redirect: "/changpwd",
-    children: [
-      {
-        path: "changpwd",
-        name: "Changpwd",
-        component: () => import("@/views/changpwd/changpwd/index"),
-        meta: { title: "修改密码", icon: "修改密码", affix: false },
-      },
-    ],
-  },
-  // {
-  //   path: "/leftoverUse",
-  //   component: Layout,
-  //   redirect: "/leftoverUse",
-  //   children: [
-  //     {
-  //       path: "leftoverUse",
-  //       name: "leftoverUse",
-  //       component: () => import("@/views/basicData/leftoverUse/index.vue"),
-  //       meta: { title: "剩料使用", icon: "撒料计划" },
-  //     },
-  //   ],
-  // },
-  // {
-  //   path: "/leftoverManagement",
-  //   component: Layout,
-  //   redirect: "/leftoverManagement",
-  //   children: [
-  //     {
-  //       path: "leftoverManagement",
-  //       name: "leftoverManagement",
-  //       component: () =>
-  //         import("@/views/basicData/leftoverManagement/index.vue"),
-  //       meta: { title: "剩料配置", icon: "撒料计划" },
-  //     },
-  //   ],
-  // },
-  // {
-  //   path: '/drawDot',
-  //   component: Layout,
-  //   redirect: '/drawDot',
-  //   children: [{
-  //     path: 'drawDot',
-  //     name: 'drawDot',
-  //     component: () => import('@/views/drawDot/index.vue'),
-  //     meta: { title: '画点图',icon: '撒料计划'}
-  //   }]
-  // },
+    {
+        path: "/",
+        component: Layout,
+        redirect: "/dashboard",
+        children: [{
+            path: "dashboard",
+            name: "Dashboard",
+            // component: () => import('@/views/dashboard/editor/index'),
+            component: () =>
+                import ("@/views/dashboard/index"),
+            meta: { title: "首页", icon: "首页", affix: true },
+        }, ],
+    },
+    {
+        path: "/changpwd",
+        component: Layout,
+        redirect: "/changpwd",
+        children: [{
+            path: "changpwd",
+            name: "Changpwd",
+            component: () =>
+                import ("@/views/changpwd/changpwd/index"),
+            meta: { title: "修改密码", icon: "修改密码", affix: false },
+        }, ],
+    },
+    // {
+    //     path: "/Addboard",
+    //     component: Layout,
+    //     redirect: "/Addboard",
+    //     children: [{
+    //         path: "Addboard",
+    //         name: "Addboard",
+    //         component: () =>
+    //             import ("@/views/customboard/addboard/index"),
+    //         meta: { title: "123", icon: "" },
+    //     }, ],
+    // },
+    // {
+    //   path: "/leftoverUse",
+    //   component: Layout,
+    //   redirect: "/leftoverUse",
+    //   children: [
+    //     {
+    //       path: "leftoverUse",
+    //       name: "leftoverUse",
+    //       component: () => import("@/views/basicData/leftoverUse/index.vue"),
+    //       meta: { title: "剩料使用", icon: "撒料计划" },
+    //     },
+    //   ],
+    // },
+    // {
+    //   path: "/leftoverManagement",
+    //   component: Layout,
+    //   redirect: "/leftoverManagement",
+    //   children: [
+    //     {
+    //       path: "leftoverManagement",
+    //       name: "leftoverManagement",
+    //       component: () =>
+    //         import("@/views/basicData/leftoverManagement/index.vue"),
+    //       meta: { title: "剩料配置", icon: "撒料计划" },
+    //     },
+    //   ],
+    // },
+    // {
+    //   path: '/drawDot',
+    //   component: Layout,
+    //   redirect: '/drawDot',
+    //   children: [{
+    //     path: 'drawDot',
+    //     name: 'drawDot',
+    //     component: () => import('@/views/drawDot/index.vue'),
+    //     meta: { title: '画点图',icon: '撒料计划'}
+    //   }]
+    // },
 ];
 
 /**
  * asyncRoutes
  * the routes that need to be dynamically loaded based on user roles
  */
-export const asyncRoutes = [
-  {
-    path: "/nested",
-    component: Layout,
-    redirect: "/nested/menu1",
-    name: "Nested",
-    meta: {
-      title: "Nested",
-      icon: "nested",
-    },
-    children: [
-      {
-        path: "menu1",
-        component: () => import("@/views/nested/menu1/index"), // Parent router-view
-        name: "Menu1",
-        meta: { title: "Menu1" },
-        children: [
-          {
-            path: "menu1-1",
-            component: () => import("@/views/nested/menu1/menu1-1"),
-            name: "Menu1-1",
-            meta: { title: "Menu1-1" },
-          },
-          {
-            path: "menu1-2",
-            component: () => import("@/views/nested/menu1/menu1-2"),
-            name: "Menu1-2",
-            meta: { title: "Menu1-2" },
-            children: [
-              {
-                path: "menu1-2-1",
+export const asyncRoutes = [{
+        path: "/nested",
+        component: Layout,
+        redirect: "/nested/menu1",
+        name: "Nested",
+        meta: {
+            title: "Nested",
+            icon: "nested",
+        },
+        children: [{
+                path: "menu1",
                 component: () =>
-                  import("@/views/nested/menu1/menu1-2/menu1-2-1"),
-                name: "Menu1-2-1",
-                meta: { title: "Menu1-2-1" },
-              },
-              {
-                path: "menu1-2-2",
+                    import ("@/views/nested/menu1/index"), // Parent router-view
+                name: "Menu1",
+                meta: { title: "Menu1" },
+                children: [{
+                        path: "menu1-1",
+                        component: () =>
+                            import ("@/views/nested/menu1/menu1-1"),
+                        name: "Menu1-1",
+                        meta: { title: "Menu1-1" },
+                    },
+                    {
+                        path: "menu1-2",
+                        component: () =>
+                            import ("@/views/nested/menu1/menu1-2"),
+                        name: "Menu1-2",
+                        meta: { title: "Menu1-2" },
+                        children: [{
+                                path: "menu1-2-1",
+                                component: () =>
+                                    import ("@/views/nested/menu1/menu1-2/menu1-2-1"),
+                                name: "Menu1-2-1",
+                                meta: { title: "Menu1-2-1" },
+                            },
+                            {
+                                path: "menu1-2-2",
+                                component: () =>
+                                    import ("@/views/nested/menu1/menu1-2/menu1-2-2"),
+                                name: "Menu1-2-2",
+                                meta: { title: "Menu1-2-2" },
+                            },
+                        ],
+                    },
+                    {
+                        path: "menu1-3",
+                        component: () =>
+                            import ("@/views/nested/menu1/menu1-3"),
+                        name: "Menu1-3",
+                        meta: { title: "Menu1-3" },
+                    },
+                ],
+            },
+            {
+                path: "menu2",
                 component: () =>
-                  import("@/views/nested/menu1/menu1-2/menu1-2-2"),
-                name: "Menu1-2-2",
-                meta: { title: "Menu1-2-2" },
-              },
-            ],
-          },
-          {
-            path: "menu1-3",
-            component: () => import("@/views/nested/menu1/menu1-3"),
-            name: "Menu1-3",
-            meta: { title: "Menu1-3" },
-          },
+                    import ("@/views/nested/menu2/index"),
+                meta: { title: "menu2" },
+            },
         ],
-      },
-      {
-        path: "menu2",
-        component: () => import("@/views/nested/menu2/index"),
-        meta: { title: "menu2" },
-      },
-    ],
-  },
+    },
 
-  {
-    path: "external-link",
-    component: Layout,
-    children: [
-      {
-        path: "https://panjiachen.github.io/vue-element-admin-site/#/",
-        meta: { title: "External Link", icon: "link" },
-      },
-    ],
-  },
-  // 404 page must be placed at the end !!!
-  { path: "*", redirect: "/404", hidden: true },
+    {
+        path: "external-link",
+        component: Layout,
+        children: [{
+            path: "https://panjiachen.github.io/vue-element-admin-site/#/",
+            meta: { title: "External Link", icon: "link" },
+        }, ],
+    },
+    // 404 page must be placed at the end !!!
+    { path: "*", redirect: "/404", hidden: true },
 ];
 
 const createRouter = () =>
-  new Router({
-    // mode: 'history', // require service support
-    scrollBehavior: () => ({ y: 0 }),
-    routes: constantRoutes,
-  });
+    new Router({
+        // mode: 'history', // require service support
+        scrollBehavior: () => ({ y: 0 }),
+        routes: constantRoutes,
+    });
 
 const router = createRouter();
 
 router.afterEach((to, from) => {
-  // 百度统计:单页面应用手动上报页面访问
-  console.log(window._hmt, "0");
-  if (window._hmt) {
-    console.log(window._hmt, "0->1");
-    const referrer = from.fullPath || "direct";
-    window._hmt.push(["_trackPageview", to.fullPath]);
-    window._hmt.push(["_trackEvent", "Navigation", "Referrer", referrer]);
-  }
+    // 百度统计:单页面应用手动上报页面访问
+    console.log(window._hmt, "0");
+    if (window._hmt) {
+        console.log(window._hmt, "0->1");
+        const referrer = from.fullPath || "direct";
+        window._hmt.push(["_trackPageview", to.fullPath]);
+        window._hmt.push(["_trackEvent", "Navigation", "Referrer", referrer]);
+    }
 });
 
 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
 export function resetRouter() {
-  const newRouter = createRouter();
-  router.matcher = newRouter.matcher; // reset router
+    const newRouter = createRouter();
+    router.matcher = newRouter.matcher; // reset router
 }
 const originalPush = Router.prototype.push;
 Router.prototype.push = function push(location, onResolve, onReject) {
-  if (onResolve || onReject)
-    return originalPush.call(this, location, onResolve, onReject);
-  return originalPush.call(this, location).catch((err) => err);
+    if (onResolve || onReject)
+        return originalPush.call(this, location, onResolve, onReject);
+    return originalPush.call(this, location).catch((err) => err);
 };
 
-export default router;
+export default router;

+ 44 - 2
src/views/basicData/feedTable/index.vue

@@ -583,6 +583,42 @@
                 />
               </el-form-item>
             </el-col>
+
+            <!-- <el-form-item label="是否启用:" prop="enable">
+                <el-select
+                  v-model="create.temp.enable"
+                  filterable
+                  placeholder="是否启用"
+                  class="filter-item"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in enableList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item> -->
+            <el-col :span="6">
+              <el-form-item label="是否可被剩料替代" prop="is_replace">
+                <el-select
+                  v-model="create.temp.is_replace"
+                  filterable
+                  placeholder="是否可被剩料替代"
+                  class="filter-item"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in surplusList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+
           </el-row>
           <el-row>
             <el-col :span="6">
@@ -779,6 +815,7 @@
             <h3 style="width: 160px; text-align: right">备用字段</h3>
           </el-row>
           <el-row>
+            <!-- onkeyup="value=value.replace(/[^\x00-\xff]/g, '')" -->
             <el-col :span="6">
               <el-form-item label="备用字段01:" prop="backup1">
                 <el-input
@@ -787,7 +824,7 @@
                   class="filter-item"
                   placeholder="备用字段01"
                   type="text"
-                  onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
+   
                 />
               </el-form-item>
             </el-col>
@@ -1784,6 +1821,10 @@ export default {
         { id: "1", name: "是" },
         { id: "0", name: "否" },
       ], // 是否启用
+      surplusList: [
+        { id: 1, name: "是" },
+        { id: 0, name: "否" },
+      ], 
       feedSourcesList: [
         { id: "0", name: "系统内置" },
         { id: "1", name: "用户自定义" },
@@ -1858,6 +1899,7 @@ export default {
           confirmstart: "0",
           confirmstartname: "禁用",
           enable: "1",
+          is_replace: 0,
           trgaddress: "",
           backup1: "",
           backup2: "",
@@ -1925,6 +1967,7 @@ export default {
           },
         },
       },
+   
       // 关联
       relation: {
         dialogFormVisible: false,
@@ -2822,7 +2865,6 @@ export default {
         }
       });
     },
-
     // 饲料库
     handleFeedBank() {
       console.log("点击了饲料库");

+ 44 - 1
src/views/basicData/groupColumn/index.vue

@@ -75,6 +75,13 @@
             <el-input v-if="scope.row.Edit" v-model="scope.row.bcode" placeholder="1-32个字符" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:10px 0;" />
           </template>
         </el-table-column>
+
+        <el-table-column label="sap编码" min-width="130px" align="center">
+          <template slot-scope="scope">
+            <span v-if="scope.row.NoEdit">{{ scope.row.sapCode }}</span>
+          </template>
+        </el-table-column>
+
         <el-table-column label="允许误差数(kg)" min-width="150px" align="center">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.allowratio }}</span>
@@ -124,8 +131,9 @@
             <span>{{scope.row.udname}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
+        <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="{row}">
+      
             <!-- 新增 -->
             <el-button v-if="row.isCreate" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="createData(row)" />
             <span v-if="row.isCreate" class="centerSpan">|</span>
@@ -133,7 +141,10 @@
             <!-- 编辑 -->
             <el-button v-if="row.isUpdate && isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
             <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
+            <el-button v-if="row.isUpdate && isRoleEdit" class="miniDanger" icon="el-icon-top" @click="handleRowTop(row)" />
+            <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
             <el-button v-if="row.isUpdate && isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
+
             <!-- 编辑保存 -->
             <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData(row)" />
             <span v-if="row.isUpdateSave" class="centerSpan">|</span>
@@ -256,6 +267,17 @@ export default {
         },
         isSap: false
       },
+      editBarTopSortParm: {
+        name: 'editBarTopSort',
+        page: 1,
+        offset: 1,
+        pagecount: 1,
+        returntype: 'Map',
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          id: "0"
+        }
+      },
       requestParam: {},
       isokDisable: false,
       selectList: [],
@@ -614,6 +636,27 @@ export default {
         this.$message({ type: 'info', message: '已取消删除' })
       })
     },
+
+    handleRowTop(row) {
+
+      MessageBox.confirm('是否置顶此信息?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+        this.editBarTopSortParm.parammaps.id = row.id
+        PostDataByName(this.editBarTopSortParm).then(response => {
+          // console.log('删除保存发送参数', this.requestParam)
+          if (response.msg === 'fail') {
+            this.$notify({ title: '置顶失败', message: response.data, type: 'warning', duration: 2000 })
+          } else {
+            this.$notify({ title: '', message: '置顶成功', type: 'success', duration: 2000 })
+            this.getList()
+          }
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消置顶' })
+      })
+    },
+
     handleSelectionChange(val) {
       console.log('勾选数据', val)
       this.selectList = val

+ 77 - 10
src/views/basicData/leftoverManagement/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <div class="container">
+  <div class="container"> 
     <div class="header-box">
-      <p> 剩料计划</p>
+      <p> 剩料替代方案</p>
       <el-button type="primary" plain class="add-btn" @click="addBtn">新 增</el-button>
     </div>
 
@@ -24,7 +24,7 @@
         <el-table-column
           label="替代方案"
           prop="surplus"
-          width="180">
+          width="600">
         </el-table-column>
         <el-table-column label="操作">
           <template slot-scope="scope">
@@ -58,15 +58,45 @@
         :visible.sync="dialogVisible"
         width="30%"
        >
-        <div>
-          <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
-            <el-form-item label="替代方案" prop="surplus">
+       <!-- <div>
+        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+          <div style="display: flex; align-items: center;">
+            <el-radio v-model="radio" :label="''" style="margin-right: 10px;"></el-radio>
+            <el-form-item label="替代方案" prop="surplus" style="margin-bottom: 0;">
               <el-select v-model="ruleForm.surplus" placeholder="请选择替代方案" @change="getLeftObj">
                 <el-option v-for="item in leftList" :key="item.id" :label="item.fname" :value="item"></el-option>
               </el-select>
             </el-form-item>
-          </el-form>
-        </div>
+          </div>
+        </el-form>
+      </div> -->
+      <!-- <div class="checkbox-group">
+        <el-checkbox  class="circle-checkbox">日粮</el-checkbox>
+        <el-checkbox  class="circle-checkbox">选择替代的剥原料</el-checkbox>
+    </div> -->
+    <el-radio-group v-model="selectedOption">
+  <div class="radio-item">
+    <el-radio label="daily">日粮</el-radio>
+  </div>
+  <div class="radio-item">
+    <el-radio label="alternative">
+      选择替代的剥原料
+      <el-select
+        v-model="alternativeValue"
+        :disabled="selectedOption !== 'alternative'"
+        filterable
+        placeholder="请选择"
+      >
+        <el-option
+          v-for="item in feedList"
+          :key="item.id"
+          :label="item.fname"
+          :value="item.id"
+        />
+      </el-select>
+    </el-radio>
+  </div>
+</el-radio-group>
         <span slot="footer" class="dialog-footer">
           <el-button class="add-btn" @click="dialogVisible = false">取 消</el-button>
           <el-button class="add-btn" type="primary" @click="addLeftData()">确 定</el-button>
@@ -93,6 +123,9 @@
       return {
          pastureId:parseInt(Cookies.get('pastureid')),
          title:"",
+         selectedOption: "", 
+         alternativeValue:"",
+        feedList: [],
          leftgetParams:{ // 获取下拉剩料列表
           name: "getFeedData",          "page": 1,
           offset: 1,
@@ -103,6 +136,14 @@
           fname: ""
           }
         },
+        getFeedSurplusParm: {
+          name: "getFeedSurplus",
+          returntype: "Map",
+          parammaps: {
+            pastureid: Cookies.get("pastureid")
+          },
+       },
+  
         leftList:[],
         tableData: [],
         currentPage1: 1,
@@ -121,7 +162,8 @@
       }
     },
     created() {
-      this.getLeftoverData();
+      this.getFeedSurplus();
+      // this.getLeftoverData();
       this.getLeftTable();
     },
     methods: {
@@ -142,6 +184,16 @@
           feedId: ""
         };
       },
+      getFeedSurplus(){
+        GetDataByName(this.getFeedSurplusParm).then((response) => {
+          console.log("table数据", response.data.list);
+          if (response.data.list !== null) {
+            this.feedList = response.data.list;
+          } else {
+            this.feedList = [];
+          }
+        });
+    },
       // 获取下拉的数据
       getLeftObj(obj){
         this.ruleForm.feedId = obj.id;
@@ -156,6 +208,16 @@
 
       // 剩料新增
       async addLeftData(){
+        console.log(this.selectedOption)
+        console.log(this.alternativeValue)
+        if (this.selectedOption === 'daily'){
+          this.ruleForm.feedId = "0"
+          this.ruleForm.surplus = "日粮"
+        }else{
+          this.ruleForm.feedId = this.alternativeValue
+          // this.ruleForm.surplus =  this.selectedOption
+        }
+
         const { data }  = await addSurplus(this.ruleForm);
         if(data == true){
           this.$message({
@@ -239,4 +301,9 @@
       margin-top:20px;
     }
   }
-</style>
+
+/* 强制将复选框的方框改为圆形 */
+.circle-checkbox /deep/ .el-checkbox__inner {
+  border-radius: 50%;
+}
+</style>

+ 48 - 47
src/views/dashboard/pasture/index.vue

@@ -88,11 +88,11 @@
           <div class="title">
             <div class="img-title" />
             <span class="content">今日计划统计</span>
-          </div>
+          </div>
           <b style="margin-left: 20px;">统计类型:</b>
-          <el-select v-model="row2.value" size="mini" placeholder="请选择" style="width: 100px;" @change="changeType">
-            <el-option v-for="item in row2.typeList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select>
+          <el-select v-model="row2.value" size="mini" placeholder="请选择" style="width: 100px;" @change="changeType">
+            <el-option v-for="item in row2.typeList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <div class="todayPlan">
             <div>
               <div id="row2chartLine1" style="height: 185px;" v-loading="row1.listLoading" />
@@ -450,8 +450,8 @@ export default {
         listLoading: true,
         list: ''
       },
-      row2: {
-        value:0,
+      row2: {
+        value:0,
         typeList:[{id:0,name:'全部'},{id:1,name:'固定式'},{id:2,name:'抛料车'}],
         chart1: {
           chartLine: null,
@@ -706,7 +706,7 @@ export default {
       that.row4.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
     },
     getList() {
-      this.row1.listLoading = true
+      this.row1.listLoading = true
       this.row1.getdataListParm.parammaps.lpplantype = this.row2.value
       GetDataByName(this.row1.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
@@ -745,9 +745,9 @@ export default {
           this.row1.listLoading = false
         }, 100)
       })
-    },
-    changeType(){
-      this.getList()
+    },
+    changeType(){
+      this.getList()
     },
     // 今日计划统计-完成车次
     roadChartLine1(chartLine_data) {
@@ -821,6 +821,7 @@ export default {
       this.row2.chart2.chartLine.setOption(option)
       if (this.row2.chart2.chartLine != null) {
         window.onresize = function() {
+        // console.log(this.row2.chart2.chartLine,"88888888888888888888888888888");
           this.row2.chart2.chartLine.resize()
         }
       }
@@ -887,39 +888,39 @@ export default {
         color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
         grid: {
           bottom: '10%'
-        },
-        legend: [{
-          itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
-          data: [{ name: '设计重量' }, { name: '实际重量'  }]
-        }, {
-          itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
-          data: [
-            { name: '开始重量' },
-            { name: '结束重量' }
-          ]
+        },
+        legend: [{
+          itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
+          data: [{ name: '设计重量' }, { name: '实际重量'  }]
+        }, {
+          itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
+          data: [
+            { name: '开始重量' },
+            { name: '结束重量' }
+          ]
         }],
-        tooltip: {
-          trigger: 'axis',
-          formatter: function(params) {
-            // console.log(params, 'params')
-            var tip = params[0].name
-            for (let i = 0; i < params.length; i++) {
-              if (params[i].seriesName == '设计重量') {
-                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
-              }
-              if (params[i].seriesName == '实际重量') {
-                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
-              }
-              if (params[i].seriesName == '开始重量') {
-                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
-              }
-              if (params[i].seriesName == '结束重量') {
-                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
-              }
-            }
-            return tip
-          }
-        },
+        tooltip: {
+          trigger: 'axis',
+          formatter: function(params) {
+            // console.log(params, 'params')
+            var tip = params[0].name
+            for (let i = 0; i < params.length; i++) {
+              if (params[i].seriesName == '设计重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '实际重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '开始重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
+              }
+              if (params[i].seriesName == '结束重量') {
+                tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
+              }
+            }
+            return tip
+          }
+        },
         calculable: true,
         yAxis: [
           { type: 'value', name: '重量(kg)', splitLine: { show: false }, axisLabel: { show: true, textStyle: { color: '#666' }}}
@@ -941,7 +942,7 @@ export default {
         series: [
           { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
           { symbol: 'none', name: '设计重量', type: 'line',  data: chartLine_data.data2, itemStyle: { normal: { lineStyle: {  width:2}}}},
-          { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
+          { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
           { name: '结束重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
         ]
       }
@@ -1114,8 +1115,8 @@ export default {
       this.row3.chart1.listLoading = true
       GetReportform(this.row3.chart1.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
-          console.log('计划统计数据', response.data.list)
-          if(response.data.data){
+          console.log('计划统计数据', response.data.list)
+          if(response.data.data){
             for (let i = 0; i < response.data.data.length; i++) {
               if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
                 response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
@@ -1342,8 +1343,8 @@ export default {
       this.row4.chart2.listLoading = true
       GetReportform(this.row4.chart2.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
-          console.log('混料实际重量统计数据', response.data.data)
-          if(response.data.data){
+          console.log('混料实际重量统计数据', response.data.data)
+          if(response.data.data){
             for (let i = 0; i < response.data.data.length; i++) {
               if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
                 response.data.data[i].field1 = parseFloat(response.data.data[i].field1)

+ 7 - 1
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -2006,6 +2006,7 @@
                   "
                   v-model="sapUpload.temp.date"
                   :clearable="false"
+                   @change="handleDateChange"
                   class="filter-item"
                   type="date"
                 />
@@ -2528,7 +2529,8 @@ export default {
       const dateObj2 = new Date(date2);
       const differenceInMs = Math.abs(dateObj2 - dateObj1);
       const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24);
-
+    
+      console.log(this.dateRange,'777')
       if (differenceInDays > 7) {
         this.$message.warning("日期范围相隔大于7天,请重新选择!");
         return false;
@@ -2538,12 +2540,16 @@ export default {
     },
     handleDateChange(value) {
       console.log(value, "arr");
+      const date1 = new Date(value);
+      const date2 = new Date(value);
+      this.dateRange = [date1, date2];
       if (value.length === 2) {
         this.checkDateDifference(value[0], value[1]);
       }
     },
     udData7() {
       if (this.dateRange.length >= 2) {
+
         this.sendRequests(
           this.dateRange[0],
           this.dateRange[1],

+ 228 - 0
src/views/formulationPlan/dhedFormula/index.vue

@@ -805,7 +805,17 @@
               icon="el-icon-close"
               @click="updateCancel(row)"
             />
+            <span v-if=" isRoleEdit" class="centerSpan"
+              >|</span
+            >
+            <el-button
+              v-if="isRoleEdit"
+              class="minCancel"
+              icon="el-icon-s-order"
+              @click="ftDetails(row)"
+            />
           </template>
+          
         </el-table-column>
       </el-table>
       <!-- <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" /> -->
@@ -1059,6 +1069,216 @@
       </div>
     </el-dialog>
 
+
+
+
+    <el-dialog
+      :fullscreen="dialogFull"
+      :destroy-on-close="true"
+      :visible.sync="isFtDetails"
+      :close-on-click-modal="false"
+      width="90%"
+    >
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span
+              style="
+                display: inline-block;
+                width: 3px;
+                height: 20px;
+                margin-right: 5px;
+                float: left;
+                margin-top: 2px;
+              "
+            />
+            {{ textMap[history.dialogStatus] }}
+          </span>
+          <div
+            class="avue-crud__dialog__menu"
+            @click="dialogFull ? (dialogFull = false) : (dialogFull = true)"
+          >
+            <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
+            <svg-icon v-else icon-class="fullscreen" />
+          </div>
+        </div>
+      </template>
+      <div class="app-history">
+       
+        <div class="table">
+          <u-table
+            :key="history.tableKey"
+            v-loading="history.listLoading"
+            element-loading-text="给我一点时间"
+            :data="history.list"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable table-fixed"
+            :span-method="objectSpanMethod"
+            :max-height="500"
+          >
+            <u-table-column
+              :key="1"
+              label="序号"
+              align="center"
+              type="index"
+              width="50px"
+              class-name="small-padding fixed-width"
+              fixed="left"
+            />
+       
+            <u-table-column
+              :key="2"
+              label="栏舍名称"
+              prop="barname"
+              min-width="90px"
+              align="center"
+              class-name="small-padding fixed-width"
+              fixed="left"
+            />
+            <u-table-column
+              :key="3"
+              label="班次"
+              prop="times"
+              min-width="90px"
+              align="center"
+              class-name="small-padding fixed-width"
+              fixed="left"
+            />
+            <u-table-column
+              :key="4"
+              label="软件牛头数"
+              prop="softccount"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="5"
+              label="实际牛头数"
+              prop="ccount"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="6"
+              label="系数(%)"
+              prop="ratio"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="7"
+              label="系数头数"
+              prop="ccountratio"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="8"
+              label="配方模板"
+              prop="ptname"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              v-if="table.isPtsfname"
+              :key="9"
+              label="补料配方"
+              prop="ptsname"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="10"
+              label="班次比例"
+              prop="tratio"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="11"
+              label="班次重量"
+              prop="weight"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="12"
+              label="配方重量"
+              prop="pweight"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              v-if="table.isPtsfname"
+              :key="13"
+              label="补料重量"
+              prop="ptweight"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="14"
+              label="配方干物质量"
+              prop="dryweight"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="15"
+              label="饲喂干物质量"
+              prop="swdryw"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="16"
+              label="采样干物质量"
+              prop="cydryw"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="17"
+              label="日投喂量"
+              prop="sumweight"
+              min-width="70px"
+              align="center"
+            />
+            <u-table-column
+              :key="18"
+              label="操作"
+              prop="sumweight"
+              align="center"
+              width="80"
+              class-name="small-padding fixed-width"
+              fixed="right"
+            >
+              <template slot-scope="scope">
+                <span style="color: blue" @click="handleRestore(scope.row)"
+                  >恢复</span
+                >
+              </template>
+            </u-table-column>
+          </u-table>
+          <!-- <pagination2 v-show="history.total>0" :total="history.total" :page.sync="history.getdataListParm.offset" :limit.sync="history.getdataListParm.pagecount" @pagination="getHistoryList" /> -->
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px">
+        <el-button
+          class="cancelClose cancelClose1"
+          @click="
+            history.dialogFormVisible = false;
+            getList();
+          "
+          >关闭</el-button
+        >
+      </div>
+    </el-dialog>
     <!-- 营养评估 -->
     <el-dialog
       :fullscreen="dialogFull"
@@ -2018,6 +2238,8 @@ export default {
           { type: "string", required: true, message: "必填", trigger: "blur" },
         ],
       },
+      isFtDetails:false,
+      isFtId : "",
       table: {
         getdataListParm: {
           name: "getFPList",
@@ -4139,6 +4361,7 @@ export default {
       if (row.feedweight == "") {
         row.feedweight = row.todayweight;
       }
+      console.log(row.feedweight)
       this.table.temp.pastureid = row.pastureid;
       this.table.temp.id = row.id;
       this.table.temp.barname = row.barname;
@@ -4152,6 +4375,7 @@ export default {
       this.table.temp.ptsfname = row.ptsfname;
       this.table.temp.ftweight = row.ftweight;
       this.table.temp.supplyweight = row.supplyweight;
+      
       this.table.temp.feedweight = row.feedweight;
       this.table.temp.owner = row.owner;
       this.table.temp.sumr = row.sumr;
@@ -4552,6 +4776,10 @@ export default {
         }
       });
     },
+    ftDetails(row) {
+      this.isFtDetails = false;
+      this.isFtId = row.ftid;
+    },
     updateCancel(row) {
       console.log("点击了编辑取消");
       // 编辑false,不可编辑true

+ 72 - 6
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -632,7 +632,7 @@
                             <span
                               style="
                                 float: left;
-                                width: 70px;
+                                width: 90px;
                                 overflow: hidden;
                                 text-overflow: ellipsis;
                                 white-space: nowrap;
@@ -668,7 +668,7 @@
                             <span
                               style="
                                 float: left;
-                                width: 70px;
+                                width: 90px;
                                 overflow: hidden;
                                 text-overflow: ellipsis;
                                 white-space: nowrap;
@@ -1117,6 +1117,7 @@ export default {
         total: 0,
         listLoading: false,
       },
+      noticeTimes: 0, 
       frequencyList: [], // 班次
       frequencyList1: [],
       maxTime: {
@@ -1254,9 +1255,10 @@ export default {
     };
   },
   created() {
+   
     this.getButtons();
     this.getIsDisplay();
-    this.getList();
+    this.getList1();
     this.getIsCheck();
   },
   methods: {
@@ -1290,6 +1292,8 @@ export default {
         }
       });
     },
+  
+
     getButtons() {
       const Edit = "MaterialIssuancePlan";
       const isRoleEdit = checkButtons(
@@ -1454,7 +1458,51 @@ export default {
         this.frequencyList1 = [{ id: 0, name: "全部" }, ...this.frequencyList];
       });
     },
+    getList1() {
+
+      const url1 = "authdata/GetDataByName";
+      const data1 = {
+        name: "getLppTimes",
+        page: 1,
+        offset: 1,
+        pagecount: 0,
+        returntype: "Map",
+      };
+      postJson(url1, data1).then((response) => {
+        if (response.data.list !== null) {
+          this.noticeTimes = Number(response.data.list[0].status) ;
+      }
+     
 
+   
+      this.table.listLoading = true;
+      const url = "authdata/spillage";
+      this.table.getdataListParm.parammaps.times=this.noticeTimes;
+      const data = this.table.getdataListParm;
+    
+      postJson(url, data).then((response) => {
+        if (response.data.list !== undefined) {
+          if (response.data.list !== null) {
+            console.log("table数据", response.data.list);
+            for (let i = 0; i < response.data.list.length; i++) {
+              if (response.data.list[i].arrList == null) {
+                this.$set(response.data.list[i], "arrList", []);
+              }
+            }
+            this.table.list = response.data.list;
+            this.table.total = response.data.list.length;
+            setTimeout(() => {
+              this.$refs.table.doLayout();
+            }, 100);
+          } else {
+            this.table.list = [];
+          }
+        }
+        this.table.listLoading = false;
+        this.getIsCheck();
+      });
+    });
+    },
     getList() {
       this.table.listLoading = true;
       const url = "authdata/spillage";
@@ -1483,6 +1531,24 @@ export default {
     },
     changeFrequency(val) {
       console.log("选择了班次", val);
+
+      const url = "authdata/PostDataByName";
+      const data = {
+        name: "editLppTimes",
+        page: 1,
+        offset: 1,
+        pagecount: 0,
+        returntype: "Map",
+        parammaps : {
+          "times":val
+        }
+      };
+      postJson(url, data).then((response) => {
+        if (response.data.list !== null) {
+          this.noticeTimes = Number(response.data.list[0].status) ;
+      }
+    })
+
       this.getList();
     },
     // 行内删除
@@ -3064,10 +3130,10 @@ export default {
         margin: 0 auto;
       }
       .colorBlock {
-        width: 88px;
+        width: 110px;
         float: left;
-        margin: 5px 5px;
-        height: 36px;
+        margin: 10px 10px;
+        height: 50px;
       }
     }
   }

+ 26 - 5
src/views/formulationPlan/recipeTemplate/index.vue

@@ -394,25 +394,34 @@
                 />
               </template>
             </el-table-column>
-            <el-table-column label="替代方案" min-width="130px" align="center">
+            <el-table-column label="剩料替代方案" min-width="130px" align="center">
               <template slot-scope="scope">
                 <span v-if="scope.row.NoEdit">{{ scope.row.surplus }}</span>
+
+
+              
                 <el-select
                   v-if="scope.row.id && scope.row.Edit"
                   v-model="scope.row.surplusId"
                   filterable
                   clearable
-                  placeholder="替代方案"
+                  placeholder="剩料替代方案"
                   class="filter-item"
                   style="width: 95%; padding: 10px 0"
                   @change="(val) => handlegetSurplus(val, scope.row)"
                 >
                   <el-option
-                    v-for="item in tableData"
+                    v-for="item in tableData1"
                     :key="item.id"
                     :label="item.surplus"
                     :value="item.id"
                   />
+                  <!-- <el-option
+                    v-for="item in livestockTypeList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  /> -->
                 </el-select>
               </template>
             </el-table-column>
@@ -2196,6 +2205,7 @@ export default {
       isproportion: false,
       oldList: [],
       tableData: [],
+      tableData1: [],
       chooseTableData: [],
       dialogFull: false,
       predefineColors: [
@@ -2656,7 +2666,8 @@ export default {
     },
     // 获取替代方案的名字
     handlegetSurplus(id, row) {
-      const arr = this.tableData.filter((item) => {
+      console.log(row, "hs");
+      const arr = this.tableData1.filter((item) => {
         if (item.id == id) return item;
       });
       row.surplus = (arr.length && arr[0].surplus) || "";
@@ -2697,7 +2708,17 @@ export default {
     async getLeftTable() {
       const { data } = await getSurplus(Cookies.get("pastureid"));
       this.chooseTableData = JSON.parse(JSON.stringify(data));
-      this.tableData = data;
+      // this.tableData = []; // 初始化tableData数组
+
+      for (var i = 0; i < data.length; i++) {
+  // 创建新对象并添加到数组
+        this.tableData1.push({
+          id: data[i].id,
+          surplus: data[i].surplus,
+          surplusId :data[i].surplusId
+        });
+      }
+
     },
     getButtons() {
       const Edit = "RecipeTemplate";

+ 2 - 2
src/views/formulationPlan/surplusMaterialPlan/index.vue

@@ -357,8 +357,8 @@
         ],
         barsList: [], // 栏舍
         residueDisposalList: [{
-          value: '0',
-          label: '转投剩料'
+          value: '0',         
+          label: '代替日粮或饲料原料'
         }, {
           value: '1',
           label: '继续饲喂'

+ 1 - 1
src/views/statisticalAnalysis/processAnalysis/group/index.vue

@@ -1363,7 +1363,7 @@ export default {
     },
     handleRefresh() {
       console.log("点击了重置");
-      this.table.getdataListParm.parammaps.tmrtname = "";
+      this.table.getdataListParm.parammaps.tmrtname = [];
       this.table.getdataListParm.parammaps.iscompleted = "";
       this.table.getdataListParm.parammaps.lpplantype = "";
       this.table.getdataListParm.parammaps.startTime = "";

+ 6 - 1
src/views/statisticalAnalysis/processAnalysis/pasture/index.vue

@@ -1201,9 +1201,14 @@ export default {
     handleRefresh() {
       console.log('点击了重置')
       this.table.getdataListParm.parammaps.fclassid = ''
-      this.table.getdataListParm.parammaps.tmrtname = ''
+      this.table.getdataListParm.parammaps.tmrtname = []
       this.table.getdataListParm.parammaps.iscompleted = ''
       this.table.getdataListParm.parammaps.lpplantype = ''
+      this.table.getdataListParm.parammaps.error = ''
+      this.ccys = false
+      this.table3.getdataListParm.parammaps.error = ''
+      this.table4.getdataListParm.parammaps.error = ''
+
       this.table.getdataListParm.parammaps.startTime = parseTime(new Date(), '{y}-{m}-{d}')
       this.table.getdataListParm.parammaps.stopTime = parseTime(new Date(), '{y}-{m}-{d}')
       this.table.getdataListParm.parammaps.inputDatetime = [new Date(), new Date()]

+ 4 - 0
src/views/systemManagement/boardEchartManagement/index.vue

@@ -574,7 +574,11 @@ export default {
     },
     jumpSee(row) {
       console.log('点击了查看', row)
+      console.log(this.$router.getRoutes()); 
+      // this.$router.push({ path: '/statisticalAnalysis/FormulationEvaluation', query: { tname: row.tname }})
+      // this.$router.push({ path: '/customboard/addboard', params: { id: row.id, isEdit: 'view', isRoleEdit: this.isRoleEdit }})
       this.$router.push({ name: 'Addboard', params: { id: row.id, isEdit: 'view', isRoleEdit: this.isRoleEdit }})
+      // this.$router.push({path:'/Addboard'}) // 跳转
       Cookies.set('AddboardIsEdit', 'view')
       Cookies.set('AddboardIsEditId', row.id)