ソースを参照

Merge branch 'master' of http://kpt.kptyun.cn:3000/duanxiaoduan/tmr-admin

duanxiaoduan 3 年 前
コミット
c4f98ee81b

+ 170 - 160
src/api/common.js

@@ -1,14 +1,24 @@
 import request from '@/utils/request'
 import parseTime from '@/utils/index.js'
 
+export function checkDates(data) {
+  return request({
+    url: '/authdata/checkDates',
+    method: 'post',
+    data
+  })
+}
+
+
 export function GetDataByName(data) {
   return request({
     url: '/authdata/GetDataByName',
     method: 'post',
     data
   })
-}
-
+}
+
+
 export function processAnalysist(data) {
   return request({
     url: '/authdata/processAnalysist',
@@ -42,7 +52,7 @@ export function updateDashboardJiade(data) {
 export function GetReportform(data) {
   return request({
     url: '/authdata/GetReportform',
-    method: 'post',
+    method: 'post',
     timeout: 600000,
     data
   })
@@ -93,23 +103,23 @@ export function GetAccount(data) {
     timeout: 600000,
     data
   })
-}
-
-
+}
+
+
 export function postJson(url,data) {
   return request({
     url: process.env.VUE_APP_BASE_API + url,
     method: 'post',
     data
   })
-}
-
+}
+
 export function getJson(url,data) {
   return request({
     url: process.env.VUE_APP_BASE_API + url + data,
     method: 'get'
   })
-}
+}
 
 export function PostDataByNames(data) {
   return request({
@@ -125,12 +135,12 @@ export function ExecDataByConfig(data) {
     method: 'post',
     data
   })
-}
-
+}
+
 export function getDorm(data) {
   return request({
     url: '/authdata/getDorm',
-    method: 'post',
+    method: 'post',
     timeout: 6000000,
     data
   })
@@ -240,156 +250,156 @@ export function DownloadExcel(data, filename) {
   } else { // IE10+下载
     navigator.msSaveBlob(blob, fileName)
   }
-}
+}
 // 取小数
 export function formatNum(f, digit) {
   var m = Math.pow(10, digit);
   return parseInt(f * m, 10) / m;
-}
-
-export function compareSort(property){
-  return function(a,b){
-    var value1 = a[property];
-    var value2 = b[property];
-    return value1 - value2;
-  }
-}
-
-
-//将日期转换成一年中的第几周
-export function getYearWeek(date) {
-  //按照国际标准
-  let time,
-    week,
-    checkDate = new Date(date);
-  checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
-  time = checkDate.getTime();
-  checkDate.setMonth(0);
-  checkDate.setDate(1);
-  week = Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
-  return week;
-}
-
-//返回格式 2019年第23周,特别注意跨年一周的问题
-export function getYearAndWeek(date, anotherDate) {
-  let week = getYearWeek(date);
-  let year = date.substring(0, 4);
-  let anotherYear = anotherDate.substring(0, 4);
-  //处理跨年特殊日期
-  if (anotherDate > date) {
-    let betweenDay = getBetweenDay(new Date(date), new Date(anotherDate));
-    if (betweenDay == 7 && anotherYear != year) {
-      if (week == 1) {
-        year = parseInt(year) + 1;
-      }
-    }
-  } else {
-    let betweenDay = getBetweenDay(new Date(anotherDate), new Date(date));
-    if (betweenDay == 7 && anotherYear != year) {
-      if (week != 1) {
-        year = parseInt(year) - 1;
-      }
-    }
-  }
-  return `${year}年第${week}周`;
-}
-export function getBetweenDay(beginDate, endDate) {
-  let dateSpan = endDate - beginDate;
-  dateSpan = Math.abs(dateSpan);
-  let days = Math.floor(dateSpan / (24 * 3600 * 1000));
-  return days + 1;
-}
-//获取当前count个周的起止日期,如:count=0 ,就是当前周,-1就是上周,以此类推
-export function getWeekStartAndEnd(count, currentDate) {
-  //起止日期数组
-  let resultArr = new Array();
-  let millisecond = 1000 * 60 * 60 * 24;
-  currentDate = new Date(currentDate.getTime() + millisecond * 7 * count);
-  let week = currentDate.getDay();
-
-  //减去的天数
-  let minusDay = week != 0 ? week - 1 : 6;
-  //获得当前周的第一天
-  let currentWeekFirstDay = new Date(
-    currentDate.getTime() - millisecond * minusDay
-  );
-  //获得当前周的最后一天
-  let currentWeekLastDay = new Date(
-    currentWeekFirstDay.getTime() + millisecond * 6
-  );
-
-  resultArr.push(currentWeekFirstDay.format());
-  resultArr.push(currentWeekLastDay.format());
-  return resultArr;
-}
-Date.prototype.format = function() {
-  let s = "";
-  let mouth =
-    this.getMonth() + 1 >= 10
-      ? this.getMonth() + 1
-      : "0" + (this.getMonth() + 1);
-  let day = this.getDate() >= 10 ? this.getDate() : "0" + this.getDate();
-  s += this.getFullYear() + "-"; // 获取年份。
-  s += mouth + "-"; // 获取月份。
-  s += day; // 获取日。
-  return s; // 返回日期。
-};
-
-/**
- * @param date 传入的日期
- * @param num 加减的天数,加为正,减为负
- * @returns 格式化后的日期
- */
-export function addDays(date, num) {
-  date.setDate(date.getDate() + num);
-  return date.format();
-}
-
-export function yearDay(long) {
-  var time = new Date(long * 1000)
-  var year = time.getFullYear()
-  var month = (time.getMonth() + 1) < 10 ? '0' + (time.getMonth() + 1) : (time.getMonth() + 1)
-  var date = time.getDate() < 10 ? '0' + time.getDate() : time.getDate()
-  var yearday = { year, month, date }
-  return yearday
-}
-
-// 计算一年中的每一周都是从几号到几号
-// 第一周为1月1日到 本年的 第一个周日
-// 第二周为 本年的 第一个周一 往后推到周日
-// 以此类推 再往后推52周。。。
-// 如果最后一周在12月31日之前,则本年有垮了54周,反之53周
-// 12月31 日不论是周几,都算为本周的最后一天
-// 参数年份 ,函数返回一个数组,数组里的对象包含 这一周的开始日期和结束日期
-export function whichWeek(year) {
-      var d = new Date(year, 0, 1)
-      while (d.getDay() != 1) {
-        d.setDate(d.getDate() + 1)
-      }
-      const arr = []
-      const longnum = d.setDate(d.getDate())
-      if (longnum > +new Date(year, 0, 1)) {
-        const obj = yearDay(+new Date(year, 0, 1) / 1000)
-        obj.last = yearDay(longnum / 1000 - 86400)
-        arr.push(obj)
-      }
-      const oneitem = yearDay(longnum / 1000)
-      oneitem.last = yearDay(longnum / 1000 + 86400 * 6)
-      arr.push(oneitem)
-      var lastStr
-      for (var i = 0; i < 51; i++) {
-        const long = d.setDate(d.getDate() + 7)
-        const obj = yearDay(long / 1000)
-        obj.last = yearDay(long / 1000 + 86400 * 6)
-        lastStr = long + 86400000 * 6
-        arr.push(obj)
-      }
-      if (lastStr < +new Date(year + 1, 0, 1)) {
-        const obj = yearDay(lastStr / 1000 + 86400)
-        obj.last = yearDay(+new Date(year + 1, 0, 1) / 1000 - 86400)
-        arr.push(obj)
-      } else {
-        arr[arr.length - 1].last = yearDay(+new Date(year + 1, 0, 1) / 1000 - 86400)
-      }
-      return arr
+}
+
+export function compareSort(property){
+  return function(a,b){
+    var value1 = a[property];
+    var value2 = b[property];
+    return value1 - value2;
+  }
+}
+
+
+//将日期转换成一年中的第几周
+export function getYearWeek(date) {
+  //按照国际标准
+  let time,
+    week,
+    checkDate = new Date(date);
+  checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
+  time = checkDate.getTime();
+  checkDate.setMonth(0);
+  checkDate.setDate(1);
+  week = Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
+  return week;
+}
+
+//返回格式 2019年第23周,特别注意跨年一周的问题
+export function getYearAndWeek(date, anotherDate) {
+  let week = getYearWeek(date);
+  let year = date.substring(0, 4);
+  let anotherYear = anotherDate.substring(0, 4);
+  //处理跨年特殊日期
+  if (anotherDate > date) {
+    let betweenDay = getBetweenDay(new Date(date), new Date(anotherDate));
+    if (betweenDay == 7 && anotherYear != year) {
+      if (week == 1) {
+        year = parseInt(year) + 1;
+      }
+    }
+  } else {
+    let betweenDay = getBetweenDay(new Date(anotherDate), new Date(date));
+    if (betweenDay == 7 && anotherYear != year) {
+      if (week != 1) {
+        year = parseInt(year) - 1;
+      }
+    }
+  }
+  return `${year}年第${week}周`;
+}
+export function getBetweenDay(beginDate, endDate) {
+  let dateSpan = endDate - beginDate;
+  dateSpan = Math.abs(dateSpan);
+  let days = Math.floor(dateSpan / (24 * 3600 * 1000));
+  return days + 1;
+}
+//获取当前count个周的起止日期,如:count=0 ,就是当前周,-1就是上周,以此类推
+export function getWeekStartAndEnd(count, currentDate) {
+  //起止日期数组
+  let resultArr = new Array();
+  let millisecond = 1000 * 60 * 60 * 24;
+  currentDate = new Date(currentDate.getTime() + millisecond * 7 * count);
+  let week = currentDate.getDay();
+
+  //减去的天数
+  let minusDay = week != 0 ? week - 1 : 6;
+  //获得当前周的第一天
+  let currentWeekFirstDay = new Date(
+    currentDate.getTime() - millisecond * minusDay
+  );
+  //获得当前周的最后一天
+  let currentWeekLastDay = new Date(
+    currentWeekFirstDay.getTime() + millisecond * 6
+  );
+
+  resultArr.push(currentWeekFirstDay.format());
+  resultArr.push(currentWeekLastDay.format());
+  return resultArr;
+}
+Date.prototype.format = function() {
+  let s = "";
+  let mouth =
+    this.getMonth() + 1 >= 10
+      ? this.getMonth() + 1
+      : "0" + (this.getMonth() + 1);
+  let day = this.getDate() >= 10 ? this.getDate() : "0" + this.getDate();
+  s += this.getFullYear() + "-"; // 获取年份。
+  s += mouth + "-"; // 获取月份。
+  s += day; // 获取日。
+  return s; // 返回日期。
+};
+
+/**
+ * @param date 传入的日期
+ * @param num 加减的天数,加为正,减为负
+ * @returns 格式化后的日期
+ */
+export function addDays(date, num) {
+  date.setDate(date.getDate() + num);
+  return date.format();
+}
+
+export function yearDay(long) {
+  var time = new Date(long * 1000)
+  var year = time.getFullYear()
+  var month = (time.getMonth() + 1) < 10 ? '0' + (time.getMonth() + 1) : (time.getMonth() + 1)
+  var date = time.getDate() < 10 ? '0' + time.getDate() : time.getDate()
+  var yearday = { year, month, date }
+  return yearday
+}
+
+// 计算一年中的每一周都是从几号到几号
+// 第一周为1月1日到 本年的 第一个周日
+// 第二周为 本年的 第一个周一 往后推到周日
+// 以此类推 再往后推52周。。。
+// 如果最后一周在12月31日之前,则本年有垮了54周,反之53周
+// 12月31 日不论是周几,都算为本周的最后一天
+// 参数年份 ,函数返回一个数组,数组里的对象包含 这一周的开始日期和结束日期
+export function whichWeek(year) {
+      var d = new Date(year, 0, 1)
+      while (d.getDay() != 1) {
+        d.setDate(d.getDate() + 1)
+      }
+      const arr = []
+      const longnum = d.setDate(d.getDate())
+      if (longnum > +new Date(year, 0, 1)) {
+        const obj = yearDay(+new Date(year, 0, 1) / 1000)
+        obj.last = yearDay(longnum / 1000 - 86400)
+        arr.push(obj)
+      }
+      const oneitem = yearDay(longnum / 1000)
+      oneitem.last = yearDay(longnum / 1000 + 86400 * 6)
+      arr.push(oneitem)
+      var lastStr
+      for (var i = 0; i < 51; i++) {
+        const long = d.setDate(d.getDate() + 7)
+        const obj = yearDay(long / 1000)
+        obj.last = yearDay(long / 1000 + 86400 * 6)
+        lastStr = long + 86400000 * 6
+        arr.push(obj)
+      }
+      if (lastStr < +new Date(year + 1, 0, 1)) {
+        const obj = yearDay(lastStr / 1000 + 86400)
+        obj.last = yearDay(+new Date(year + 1, 0, 1) / 1000 - 86400)
+        arr.push(obj)
+      } else {
+        arr[arr.length - 1].last = yearDay(+new Date(year + 1, 0, 1) / 1000 - 86400)
+      }
+      return arr
     }

+ 195 - 76
src/views/formulationPlan/pushMaterialPlan/index.vue

@@ -167,9 +167,9 @@
         <el-form ref="temp" :rules="create2.rules" :model="create2.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
         
           <el-row>
-              <el-col :span="6">
-              <el-form-item label="允许误差时间(分钟):" prop="time">
-                <el-input ref="time" v-model="create2.temp.time" class="filter-item" placeholder="请输入" type="text" />
+              <el-col :span="12">
+              <el-form-item label="允许误差时间(分钟):" prop="allowableerror">
+                <el-input ref="time" v-model="create2.temp.allowableerror" class="filter-item" placeholder="请输入" type="text" />
               </el-form-item>
             </el-col>
 
@@ -180,7 +180,7 @@
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button class="cancelClose" @click="create2.dialogFormVisible = false;getList()">关闭</el-button>
-          <el-button class="save"  @click="handleCreate2">确认</el-button>
+          <el-button class="save"  @click="create_sure2">确认</el-button>
         </div>
       </div>
     </el-dialog>
@@ -189,9 +189,14 @@
    <!-- 校验 -->
     <el-dialog title="提示" :destroy-on-close="true" :visible.sync="check.dialogFormVisible" :close-on-click-modal="false" width="30%">
       <div class="check">
-        <p v-if="check.temp.isDistribution == '0'">当前有栏舍未分配,建议及时进行分配,未分配栏舍如下:</p>
-        <p v-else>已分配完:当前栏舍已分配完善</p>
-        {{ check.temp.bnames }}
+        <p v-if="check.temp.isDistribution1 == '0'">未启用分配如下:</p>
+        <p v-else>当前栏舍已分配完</p>
+        {{ check.temp.banme1 }}
+
+
+        <p v-if="check.temp.isDistribution2 == '0'">未启用栏舍如下:</p>
+        <p v-else>当前栏舍已全部启用</p>
+        {{ check.temp.banme2 }}
       </div>
       <div slot="footer" class="dialog-footer" style="bottom: 10px;">
         <el-button class="save" @click="check.dialogFormVisible=false;">确认</el-button>
@@ -204,7 +209,7 @@
 </template>
 
 <script>
-import { GetDataByName, postJson, GetDataByNames, compareSort, ExecDataByConfig, failproccess, PostDataByName, formatNum, checkButtons } from '@/api/common'
+import { GetDataByName, postJson, GetDataByNames, compareSort, ExecDataByConfig, failproccess, PostDataByName, formatNum, checkButtons, checkDates } from '@/api/common'
 import Pagination from '@/components/Pagination'
 import Pagination2 from '@/components/Pagination2'
 import { parseTime, json2excel, handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
@@ -261,7 +266,7 @@ export default {
       create2: {
         dialogFormVisible: false,
         dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), time: ''},
+        temp: { pastureid: Cookies.get('pastureid'), allowableerror: ''},
         rules: {
           // fname: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
           // fclassid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
@@ -284,7 +289,8 @@ export default {
         },
         temp: {
           bnames: '',
-          isDistribution: ''
+          isDistribution1: '',
+          isDistribution2: ''
         }
       },
 
@@ -393,6 +399,8 @@ export default {
           response.data.list.forEach(function(item){
             if(item.times !== ""){
               item.timesArr = item.times.split(',')
+            }else{
+              item.timesArr = []
             }
           })
 
@@ -430,29 +438,125 @@ export default {
      // 新增
     handleCreate1() {
       console.log('点击了新增')
-      this.resetTemp1()
-      this.dialogFull = false
-      this.create1.dialogStatus = 'create'
-      this.create1.dialogFormVisible = true
+
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
+      } else {
+        this.resetTemp1()
+        this.dialogFull = false
+        this.create1.dialogStatus = 'create'
+        this.create1.dialogFormVisible = true
+      }
+    
+
     },
      resetTemp1() {
-      this.create1.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
+      this.timetags1 = []
     },
     
 
     create_sure1(){
-        console.log(this.timetags1)
+        console.log('timetags1-----',this.timetags1)
+        console.log('selectList-----',this.selectList)
+
+            var timeArrRea = this.timetags1
+
+            var selectArr = this.selectList
+            var idsArr = []
+            selectArr.forEach(function(item){
+              idsArr.push(item.id)
+            })
+
+            var timeIdArr = []
+
+
+            idsArr.forEach(function(item){
+              timeArrRea.forEach(function(items){
+                timeIdArr.push({"time":items,"id":item})
+              }) 
+            })
+
+
+            console.log("timeIdArr",timeIdArr)
+
+
+
+
+            var send_data2 = {
+              "common":{"returnmap":"0"},
+              "data":[
+                {
+                  "name":"delPushingDetailByIds",
+                  "type":"e",
+                  "parammaps":{"ids":idsArr.join(",")}
+                },
+								{
+                  "name":"insertPushingDetail",
+                  "resultmaps":{
+                    "list":timeIdArr
+                  },
+										 "children":[{"name":"insertPushingDetailByPushingId","type":"e","parammaps":
+										 {"pastureid":Cookies.get('pastureid'),"id":"@insertPushingDetail.id","time":"@insertPushingDetail.time","type":0}}]}
+										 ]} 
+
+   
+
+          ExecDataByConfig(send_data2).then(response => {
+              console.log('设置推料', send_data2)
+              console.log('设置推料', response)
+              if (response.msg === 'fail') {
+                this.$notify({ title: '设置失败', message: response.data, type: 'warning', duration: 2000 })
+              } else {
+                
+                this.$notify({ title: '设置成功', message: '设置成功', type: 'success', duration: 2000 })
+                this.create1.dialogFormVisible = false
+                this.getList()
+                
+              }
+            })
     },
 
     handleCreate2() {
-      console.log('点击了新增')
-      this.resetTemp2()
-      this.dialogFull = false
-      this.create2.dialogStatus = 'create'
-      this.create2.dialogFormVisible = true
+ 
+
+      if (this.selectList.length == 0) {
+        this.$message({ type: 'error', message: '请选择推料信息', duration: 2000 })
+      } else {
+        console.log('点击了新增')
+        this.resetTemp2()
+        this.dialogFull = false
+        this.create2.dialogStatus = 'create'
+        this.create2.dialogFormVisible = true
+      }
     },
      resetTemp2() {
-      this.create2.temp = { pastureid: Cookies.get('pastureid'), 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': "", 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'rtime': '', barid: '', 'treatmethod': '', 'useinbar': '', 'useinbarid': '' }
+      this.create2.temp = { pastureid: Cookies.get('pastureid'),  'allowableerror': '' }
+    },
+
+
+    create_sure2(){
+      console.log(this.selectList)
+      var allowableerror = this.create2.temp.allowableerror
+
+      var selectArr = this.selectList
+      var idsArr = []
+      selectArr.forEach(function(item){
+              idsArr.push(item.id)
+      })
+
+      var send_data = {"name":"updateAllowableerrorByIds","parammaps":{"allowableerror":allowableerror,"ids":idsArr.join(",")}}
+
+      PostDataByName(send_data).then(response => {
+        if (response.msg === 'fail') {
+                this.$notify({ title: '设置失败', message: response.data, type: 'warning', duration: 2000 })
+              } else {
+                
+                this.$notify({ title: '设置成功', message: '设置成功', type: 'success', duration: 2000 })
+                this.create2.dialogFormVisible = false
+                this.getList()
+                
+              }
+      })
     },
 
 
@@ -506,13 +610,22 @@ export default {
       this.getCheckList()
     },
     getCheckList() {
-      GetDataByName(this.check.getCheckParm).then(response => {
-        if (response.data.list[0].bnames !== undefined) {
-          this.check.temp.isDistribution = 0
-          this.check.temp.bnames = response.data.list[0].bnames
+      var check_data = {"name":"checkPushingBar","offset":0,"pagecount":0,"parammaps":{"pastureid":Cookies.get('pastureid')}}
+
+      GetDataByName(check_data).then(response => {
+        console.log(response)
+        if (response.data.list[0].banme1 !== undefined) {
+          this.check.temp.isDistribution1 = 0
+          this.check.temp.banme1 = response.data.list[0].banme1
         } else {
-          this.check.temp = {}
-          this.check.temp.isDistribution = 1
+          this.check.temp.isDistribution1 = 1
+        }
+
+        if (response.data.list[0].banme2 !== undefined) {
+          this.check.temp.isDistribution2 = 0
+          this.check.temp.banme2 = response.data.list[0].banme2
+        } else {
+          this.check.temp.isDistribution2 = 1
         }
       })
     },
@@ -657,10 +770,10 @@ export default {
        row.pastureid =  Cookies.get('pastureid')
        
  
-      // if (this.table.temp.ccount === '') {
-      //   this.$message({ type: 'error', message: '实际牛头数不能为空', duration: 2000 })
-      //   return false
-      // }
+      if (row.tmrname === '') {
+        this.$message({ type: 'error', message: '推料车名称不能为空', duration: 2000 })
+        return false
+      }
      
       // const positiveInteger = /^[0-9]\d*$/
       // if (!positiveInteger.test(parseFloat(this.table.temp.ccount))) {
@@ -690,7 +803,7 @@ export default {
             "name":"checkPushing","resultmaps":{"list":timesTempArr},
 						"children":[
               {
-                "name":"checkPushing","type":"e",
+                "name":"checkPushing","type":"v",
                 "parammaps": {
                   "tmrname":row.tmrname,
                   "tmrid":row.tmrid,
@@ -704,31 +817,18 @@ export default {
         ]
       }
 
-      PostDataByName(send_data).then(response => {
-        console.log(response)
-          if (response.msg === 'fail') {
-            this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
-          
-          }
-        })
-
-      
-
+    
 
-      if(id == 0){
-         var send_data =  {
+      if(row.id == 0){
+         var send_data2 =  {
            "common":{"returnmap":"0"},
            "data":[
               {"name":"insertPushing","type":"e",
                "parammaps": row
-               },
+              },
 							{"name":"insertPushingDetail",
               "resultmaps":{
-                "list":[
-										 {"time":"10:00"},{"time":"12:00"}
-                     ]
+                "list":timesTempArr
               },
 							"children":[
                 {
@@ -739,33 +839,51 @@ export default {
 										 ]}
       }else {
 
+        var send_data2 = {
+          "common":{"returnmap":"0"},
+          "data":[
+            {"name":"updatePushing","type":"e",
+            "parammaps":row
+            },
+						{"name": "delPushingDetail","type": "e",
+            "parammaps": {"id": row.id }
+            }, 
+						{"name":"insertPushingDetail",
+            "resultmaps":{"list":timesTempArr},
+						"children":[
+              {"name":"insertPushingDetail","type":"e",
+              "parammaps":
+										 {"pastureid":Cookies.get('pastureid'),
+                       "barid":row.barid,"time":"@insertPushingDetail.time","type":0}}]}
+					]}
+
       }
+
+
+        checkDates(send_data).then(response => {
+        console.log(response)
+          if (response.data === ture) {
+              ExecDataByConfig(send_data2).then(response => {
+                console.log('编辑保存发送参数', send_data2)
+                console.log('编辑保存', response)
+                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()
+                  
+                }
+              })
+          } else {
+             this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+          
+          }
+        })
+
        
-      // ExecDataByConfig(this.requestParam).then(response => {
-      //   console.log('编辑保存发送参数', this.requestParam)
-      //   if (response.msg === 'fail') {
-      //     this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-      //   } else {
-      //     if(obj.data.length>0){
-      //       const url = 'authdata/fpdetail/edit'
-      //       const data = obj
-      //       postJson(url, data).then(response => {
-      //         if(response.msg !== 'fail'){
-      //           this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-      //         }
-      //       })
-      //     }else{
-      //       this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-      //     }
-      //     this.getList()
-      //     for (let i = 0; i < this.headerList.length; i++) {
-      //       if (this.headerList[i].target.className == 'el-icon-lock') {
-      //         this.headerList[i].target.className = 'el-icon-unlock'
-      //         this.$set(this.headerList[i].target, 'className', 'el-icon-unlock')
-      //       }
-      //     }
-      //   }
-      // })
+     
     },
     updateCancel(row) {
       console.log('点击了编辑取消')
@@ -885,6 +1003,7 @@ export default {
   .table {
     margin-top: 10px;
   }
+  .el-tag{margin-right: 5px;}
 </style>
 <style lang="scss">
   .red-row{

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

@@ -796,7 +796,7 @@ export default {
           this.table3.listLoading = false
           this.table4.listLoading = false
           this.chart1.listLoading = false
-        }
+        }
         this.getDownList()
         setTimeout(() => {
           this.table.listLoading = false

+ 56 - 7
src/views/systemManagement/dataSynchronization/index.vue

@@ -3,15 +3,49 @@
 
     <el-form ref="form" :model="form" label-width="180px">
         <el-form-item label="每日自动同步:">
-          <el-switch v-model="form.delivery"></el-switch>
+          
+
+          <el-col :span="20">
+            <el-switch v-model="form.delivery"></el-switch>
+          </el-col>
+       
+          <el-col :span="4">
+           <el-select v-model="form.cmo"  >
+            <el-option  v-for="item in companyArr" :key="item.id" :label="item.name" :value="item.name"/> 
+          </el-select>
+ 
+          </el-col>
+
+
+
         </el-form-item>
 
+
+   
+
+
+
+        
+
         <el-form-item label="">
-          <el-select v-model="form.region" placeholder="">
-            <el-option label="定时更新" value="shanghai"></el-option>
-            <el-option label="指定时间" value="beijing"></el-option>
-            <el-option label="间隔时间" value="beijing"></el-option>
-          </el-select>
+          <el-col :span="6">
+            <el-select v-model="form.region" placeholder=""  @change="change_select">
+              <el-option v-for="item in selectArr"  :key="item.id" :label="item.name" :value="item.id" /> 
+            </el-select>
+
+          
+          </el-col>
+          <el-col :span="6">
+              <el-time-picker
+                v-model="time1"
+                :picker-options="{
+                  selectableRange: '00:00:00 - 23:59:59'
+                }"
+                @change = "change_time1"
+                placeholder="任意时间点">
+              </el-time-picker>
+
+          </el-col>
         </el-form-item>
         <!-- <el-form-item label="活动时间">
           <el-col :span="11">
@@ -71,7 +105,11 @@ export default {
   data() {
     return {
       isRoleEdit: [],
-      enableList: [{ id: 1, name: '是' }, { id: 0, name: '否' }],
+      companyArr: [
+        { id: '公司1', name: '公司1' }, 
+        { id: '公司2', name: '公司2' },
+        { id: '公司3', name: '公司3' } 
+      ],
       autoArr1: [
         { id: '栏舍', name: '栏舍' }, 
         { id: '配方', name: '配方' },
@@ -96,6 +134,9 @@ export default {
         { id: '准确率', name: '准确率' },
       ],
 
+      time1:"",
+time2:"",
+time3:"",
        form: {
           name: '',
           region: '',
@@ -172,6 +213,14 @@ export default {
       this.arrowDown = true
       this.arrowUp = false
     },
+
+    change_time1(){
+      console.log(this.time1)
+    },
+
+    change_select(){
+      console.log(this.time1)
+    },
  
   }
 }