Shan9312 1 vuosi sitten
vanhempi
commit
956f833fae
38 muutettua tiedostoa jossa 13506 lisäystä ja 4896 poistoa
  1. 1 1
      src/lang/en/langModule/InventoryManagement.js
  2. 3 3
      src/lang/en/langModule/dashboard.js
  3. 1 1
      src/lang/en/langModule/defaultParameter.js
  4. 1 1
      src/lang/en/langModule/dhedFormula.js
  5. 5 5
      src/lang/en/langModule/errorAnalysis.js
  6. 2 2
      src/lang/en/langModule/feedChart.js
  7. 5 5
      src/lang/en/langModule/feedingEfficiency.js
  8. 8 8
      src/lang/en/langModule/formulationEvaluation.js
  9. 22 3
      src/lang/en/langModule/message.js
  10. 3 3
      src/lang/en/langModule/premixedPlan.js
  11. 1 1
      src/lang/zn/langModule/defaultParameter.js
  12. 1 1
      src/lang/zn/langModule/feedingEfficiency.js
  13. 24 3
      src/lang/zn/langModule/message.js
  14. 11 11
      src/utils/index.js
  15. 600 220
      src/views/basicData/defaultParameter/function/index.vue
  16. 404 129
      src/views/basicData/defaultParameter/index2.vue
  17. 704 119
      src/views/basicData/feedTable/index.vue
  18. 1 1
      src/views/basicData/groupColumn/index.vue
  19. 453 120
      src/views/basicData/livestockCategory/index.vue
  20. 535 159
      src/views/dashboard/pasture/index.vue
  21. 1647 631
      src/views/formulationPlan/dailyExecutionPlan/index.vue
  22. 98 38
      src/views/formulationPlan/dailyExecutionPlan/revisePlan.vue
  23. 577 153
      src/views/formulationPlan/dailyExecutionPlan/typePage/materialIssuancePlan.vue
  24. 319 89
      src/views/formulationPlan/dailyExecutionPlan/typePage/premixedPlan.vue
  25. 506 198
      src/views/formulationPlan/dailyExecutionPlan/typePage/surplusMaterialPlan.vue
  26. 435 99
      src/views/formulationPlan/dhedFormula/dryMatterRegulation.vue
  27. 981 146
      src/views/formulationPlan/dhedFormula/index.vue
  28. 191 85
      src/views/formulationPlan/formulaDistribution/index.vue
  29. 690 134
      src/views/formulationPlan/materialIssuancePlan/index.vue
  30. 623 118
      src/views/formulationPlan/premixedPlan/index.vue
  31. 4 4
      src/views/formulationPlan/recipeTemplate/index.vue
  32. 2050 1671
      src/views/formulationPlan/surplusMaterialPlan/index.vue
  33. 23 23
      src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue
  34. 1103 193
      src/views/statisticalAnalysis/formulationEvaluation/index.vue
  35. 384 163
      src/views/statisticalAnalysis/inventoryManagement/group/index.vue
  36. 519 177
      src/views/statisticalAnalysis/inventoryManagement/pasture/index.vue
  37. 36 17
      src/views/statisticalChart/formulaStatistics/index.vue
  38. 535 161
      src/views/systemManagement/role/index.vue

+ 1 - 1
src/lang/en/langModule/InventoryManagement.js

@@ -29,7 +29,7 @@ export default{
   sj: "Actual",
   sj: "Actual",
 
 
     multiHeader:[['Feed Name', 'Beginning of Period', '', 'Usage', '', '', '', 'End of Period', '']],
     multiHeader:[['Feed Name', 'Beginning of Period', '', 'Usage', '', '', '', 'End of Period', '']],
-    multiHeader2 : [['', 'Initial Inventory(kg)', 'Initial Amount (Yuan)', 'Inbound Weight (kg)', 'System Outbound Weight (kg)', 'Manual Material Usage Weight (kg)', 'Waste Weight', 'Final Inventory (kg)', 'Final Amount (Yuan)']]
+    multiHeader2 : [['', 'Initial Inventory(kg)', 'Initial Amount ($)', 'Inbound Weight (kg)', 'System Outbound Weight (kg)', 'Manual Material Usage Weight (kg)', 'Waste Weight', 'Final Inventory (kg)', 'Final Amount ($)']]
 
 
 
 
 
 

+ 3 - 3
src/lang/en/langModule/dashboard.js

@@ -17,7 +17,7 @@ export default {
   spreadAc:'Spreading Accuracy',
   spreadAc:'Spreading Accuracy',
   SpreadingCR:'Spreading Correctness Rate',
   SpreadingCR:'Spreading Correctness Rate',
   yestday:'Yesterday',
   yestday:'Yesterday',
-  yestday30:'Blending Accuracy of Mixed Feed in the Last 30 Days',
+  yestday30:'Mixture Accuracy of Mixed Feed in the Last 30 Days',
   yestday30S:'Spreading Correctness Rate Over the Last 30 Days',
   yestday30S:'Spreading Correctness Rate Over the Last 30 Days',
   yestday30SD:'Spreading Deviation Over the Last 30 Days',
   yestday30SD:'Spreading Deviation Over the Last 30 Days',
   spreadSD:'Spreading Deviation',
   spreadSD:'Spreading Deviation',
@@ -97,8 +97,8 @@ export default {
   tHeader1: ['Date', 'Planned Execution Weight(kg)', 'Formula Theoretical Weight(kg)', 'Planning Accuracy Rate', 'Planned Cancellation Weight(kg)', 'Planning Accuracy Rate (Excluding Canceled Weight)', 'Correct Number in Plan”', 'Planned Number', 'Planning Correctness Rate'],
   tHeader1: ['Date', 'Planned Execution Weight(kg)', 'Formula Theoretical Weight(kg)', 'Planning Accuracy Rate', 'Planned Cancellation Weight(kg)', 'Planning Accuracy Rate (Excluding Canceled Weight)', 'Correct Number in Plan”', 'Planned Number', 'Planning Correctness Rate'],
   sheetName1: 'Planned Statistics',
   sheetName1: 'Planned Statistics',
 
 
-  tHeader2: ['Date', 'Dry Matter Intake (DMI) of Lactating Cows(kg)', 'Milk Yield of Lactating Cows(kg)'],
-  sheetName2: 'Dry Matter Intake (DMI) of Lactating Cows',
+  tHeader2: ['Date', 'Feed Intake of Lactating Cows(kg)', 'Milk Yield of Lactating Cows(kg)'],
+  sheetName2: 'DMI of Lactating Cows',
 
 
   tHeader3: ['Date', 'Weight'],
   tHeader3: ['Date', 'Weight'],
   sheetName3: 'Actual Weight Statistics'
   sheetName3: 'Actual Weight Statistics'

+ 1 - 1
src/lang/en/langModule/defaultParameter.js

@@ -20,7 +20,7 @@ slfbfs: "Leftover feed allocation method:",
 slfbzbyl: "Leftover feed allocation ratio to raw material (%):",
 slfbzbyl: "Leftover feed allocation ratio to raw material (%):",
 xlsfcz: "Does minor feed need to be weighed:",
 xlsfcz: "Does minor feed need to be weighed:",
 sfqysjtb: "Enable data synchronization:",
 sfqysjtb: "Enable data synchronization:",
-rycsl: "Any number of vehicles:",
+rycsl: "Number of Spare Vehicles:",
 hlzql: "Mixing accuracy rate:",
 hlzql: "Mixing accuracy rate:",
 yxslsjwc: "Allowed error in spreading time (minutes):",
 yxslsjwc: "Allowed error in spreading time (minutes):",
 jtymip: "Group Domain Name or IP",
 jtymip: "Group Domain Name or IP",

+ 1 - 1
src/lang/en/langModule/dhedFormula.js

@@ -44,7 +44,7 @@ dycbfb3:"Third Layer Percentage",
 dycbfb4:"Fourth Layer Percentage",
 dycbfb4:"Fourth Layer Percentage",
 
 
 swtwl:"feeding amount",
 swtwl:"feeding amount",
-swpfzl:'eeding formula weight',
+swpfzl:'Feeding formula weight',
 blpfzl:'Supplementary Feed Formula Weight',
 blpfzl:'Supplementary Feed Formula Weight',
 bltwl:"Supplement Feed Amount",
 bltwl:"Supplement Feed Amount",
 yypg:"Nutritional Assessment",
 yypg:"Nutritional Assessment",

+ 5 - 5
src/lang/en/langModule/errorAnalysis.js

@@ -43,8 +43,8 @@ sxlb:'Livestock categories',
 jshlczs:'Planned mixing operands',
 jshlczs:'Planned mixing operands',
 yhlczs:'Operands that have been blended',
 yhlczs:'Operands that have been blended',
 hlczl:'Mixing operation rate',
 hlczl:'Mixing operation rate',
-hlzdtzcs:'Automatic blending transition count' ,
-hlsdzdtzcs:'Manual blending transition count',
+hlzdtzcs:'Automatic Mixture transition count' ,
+hlsdzdtzcs:'Manual Mixture transition count',
 hlzqs:'Correct number of mixed materials',
 hlzqs:'Correct number of mixed materials',
 yclczs:'The count of operations for feed that has been spread',
 yclczs:'The count of operations for feed that has been spread',
 
 
@@ -76,7 +76,7 @@ clzql:'Vehicle Accuracy Rate(weight)',
 jhzl:"Planned weight(kg)",
 jhzl:"Planned weight(kg)",
 skzl:'Actual Weight(kg)',
 skzl:'Actual Weight(kg)',
 zql:"Accuracy rate",
 zql:"Accuracy rate",
-hlqxcs:"Planned blending cancellation count",
+hlqxcs:"Planned Mixture cancellation count",
 lsslsjtj:"Feed spreading time statistics in pens",
 lsslsjtj:"Feed spreading time statistics in pens",
 tmrnames:'TMR Name',
 tmrnames:'TMR Name',
 
 
@@ -134,14 +134,14 @@ tzcs:'Transition count',
 
 
 ccxx: "Train Information",
 ccxx: "Train Information",
 zdrq: "Scheduling Date",
 zdrq: "Scheduling Date",
-hlxx: "Blending Information",
+hlxx: "Mixture Information",
 jhzl: "Planned Weight",
 jhzl: "Planned Weight",
 wcsj: "Completion Time",
 wcsj: "Completion Time",
 gcsj: "Process Time",
 gcsj: "Process Time",
 ksdqzl: "Initial Reading Weight",
 ksdqzl: "Initial Reading Weight",
 zhdqzl: "Final Reading Weight",
 zhdqzl: "Final Reading Weight",
 qlfs: "Material Collection Method",
 qlfs: "Material Collection Method",
-slxx: "Dosing Information",
+slxx: "Feed Spreading Information",
 kzt: "Monitoring Chart",
 kzt: "Monitoring Chart",
 
 
 sjzl:"Designed Weight",
 sjzl:"Designed Weight",

+ 2 - 2
src/lang/en/langModule/feedChart.js

@@ -46,10 +46,10 @@ zgslh: "China Feed Number",
 price: "Price",
 price: "Price",
 ypsm: "Sample Description",
 ypsm: "Sample Description",
 wgz: "Dry Matter (DM%)",
 wgz: "Dry Matter (DM%)",
-cdb: "Crude Protein (CP%DM)",
+cdb1: "Crude Protein (CP%DM)",
 gai: "Calcium (Ca%DM)",
 gai: "Calcium (Ca%DM)",
 lin: "Phosphorus (P%DM)",
 lin: "Phosphorus (P%DM)",
-cnjn: "Milk Net Energy (%DM)",
+cnjn: "Milk production net energy ",
 chf: "Crude Ash (%)",
 chf: "Crude Ash (%)",
 cl: "Coarse Material",
 cl: "Coarse Material",
 glzt: "Association Status",
 glzt: "Association Status",

+ 5 - 5
src/lang/en/langModule/feedingEfficiency.js

@@ -15,9 +15,9 @@ export default{
   pfgwzcsl:"Formulated dry matter intake(kg/head)",
   pfgwzcsl:"Formulated dry matter intake(kg/head)",
   sjgwzcsl:"Actual DMI(kg/head)",
   sjgwzcsl:"Actual DMI(kg/head)",
   csl:"Feed Intake Rate(%)",
   csl:"Feed Intake Rate(%)",
-  pfllcb:"Formula Theoretical Cost (per head/yuan)",
-  pfcb:"Formulation cost (per head/yuan)",
-  sjcb:"Actual cost(per head/yuan)",
+  pfllcb:"Formula Theoretical Cost (per head/$)",
+  pfcb:"Formulacost (per head/$)",
+  sjcb:"Actual cost(per head/$)",
   cnl:"Milk yield(kg/head)",
   cnl:"Milk yield(kg/head)",
   slzhl:"FCR(%)",
   slzhl:"FCR(%)",
   gjnclcb:"Cost of feed per kilogram of milk",
   gjnclcb:"Cost of feed per kilogram of milk",
@@ -28,7 +28,7 @@ export default{
   zhl:"Conversion Rate",
   zhl:"Conversion Rate",
   cbfx:"Cost Analysis",
   cbfx:"Cost Analysis",
   zhdmb:"Best Template",
   zhdmb:"Best Template",
-  gjnclcb1:"cost of feed per kilogram of milk(yuan)",
+  gjnclcb1:"cost of feed per kilogram of milk($)",
   cxlb:"Livestock Categories",
   cxlb:"Livestock Categories",
   bzsfx:"PSPS",
   bzsfx:"PSPS",
 
 
@@ -85,7 +85,7 @@ xltj5:'Feeding Efficiency - Herd Assessment',
 fbs:"Fecal Sieve",
 fbs:"Fecal Sieve",
 
 
 slls:"Leftover Feed",
 slls:"Leftover Feed",
-slls1:"Feed Distribution Quantity",
+slls1:"Feed Spreading Quantity",
   zql: "Accuracy Rate",
   zql: "Accuracy Rate",
   cnl2:"Milk yield(kg)",
   cnl2:"Milk yield(kg)",
 
 

+ 8 - 8
src/lang/en/langModule/formulationEvaluation.js

@@ -27,12 +27,12 @@ export default{
    slzhl:"(4.0)Feed Conversion Efficiency(kg/DM)",
    slzhl:"(4.0)Feed Conversion Efficiency(kg/DM)",
 
 
 
 
-   rlcb:"Feed Cost(yuan)",
-   gwzcb:"Cost per Dry Matter(yuan/kg)",
-   rgjncb:"Cost per Kilogram of Milk per Day(yuan)",
+   rlcb:"Daily Feed Cost($)",
+   gwzcb:"Cost per Dry Matter($/kg)",
+   rgjncb:"Cost per Kilogram of Milk per Day($)",
    lssjjl:"History Log Time",
    lssjjl:"History Log Time",
    pfmbb:"Formula Template Table",
    pfmbb:"Formula Template Table",
-   pflx:"Formulation type",
+   pflx:"Formula type",
    sfqy:"Is Enabled",
    sfqy:"Is Enabled",
    ly:"source",
    ly:"source",
    pfmc:"Formula Name",
    pfmc:"Formula Name",
@@ -47,15 +47,15 @@ outmb:"Export Template",
 outsj:"Export Data",
 outsj:"Export Data",
 pfjl:"Formula Records",
 pfjl:"Formula Records",
 xh:"Serial Number",
 xh:"Serial Number",
-pfbm:"Formulation code",
+pfbm:"Formula code",
 rl:"Bulk Density(kg/m³)",
 rl:"Bulk Density(kg/m³)",
-pfys:"Formulation color",
+pfys:"Formula color",
 
 
 bbh:'version number',
 bbh:'version number',
 nqlb:"Cattle Herd Categories",
 nqlb:"Cattle Herd Categories",
 tzzly:"Transition Weight Range(kg)",
 tzzly:"Transition Weight Range(kg)",
 pfbqb:"Formula Detail Table",
 pfbqb:"Formula Detail Table",
-pfmc:"Formulation name",
+pfmc:"Formula name",
 cclx:"Livestock Category",
 cclx:"Livestock Category",
 
 
 del:"Delete",
 del:"Delete",
@@ -84,7 +84,7 @@ slmcdw:"Feed Name(kg)",
 slzhl1:"(3.5)Feed Conversion Efficiency(kg/DM)",
 slzhl1:"(3.5)Feed Conversion Efficiency(kg/DM)",
 shi:'Yes',
 shi:'Yes',
 fou:"No",
 fou:"No",
-tHeader:['Formula Name', 'Formula Code配方编码', 'Livestock Category', 'Formula Type', 'Source', 'Remarks', 'Is Enabled', 'Feed Group', 'Feed Name', 'Weight (kg)', 'Mixing Delay (min)', 'Is the Ratio of Cattle Heads Locked', 'Order'],
+tHeader:['Formula Name', 'Formula Code', 'Livestock Category', 'Formula Type', 'Source', 'Remarks', 'Is Enabled', 'Feed Group', 'Feed Name', 'Weight (kg)', 'Mixing Delay (min)', 'Is the Ratio of Cattle Heads Locked', 'Order'],
 tHeader1:[
 tHeader1:[
   'Formula Name', 'Livestock Category', 'Formula Type', 'Remarks', 'Feed Group', 'Feed Name', 'Weight (kg)', 'Mixing Delay (min)', 'Is the Ratio of Cattle Heads Locked', 'Error Message'
   'Formula Name', 'Livestock Category', 'Formula Type', 'Remarks', 'Feed Group', 'Feed Name', 'Weight (kg)', 'Mixing Delay (min)', 'Is the Ratio of Cattle Heads Locked', 'Error Message'
 ]
 ]

+ 22 - 3
src/lang/en/langModule/message.js

@@ -92,9 +92,11 @@ msg88: "Please select the pen formula",
 msg89: "Fresh weight (g)",
 msg89: "Fresh weight (g)",
 msg90: "Dried weight (g)",
 msg90: "Dried weight (g)",
 msg91: "Theoretical dry matter",
 msg91: "Theoretical dry matter",
-msg92: "Actual dry matter",
+  msg92: "Actual dry matter",
+// msg94:"Operator",
 msg93: "Operation date",
 msg93: "Operation date",
-msq95: "Previous step" ,
+
+msg95: "Previous step" ,
 msg96: "Next step",
 msg96: "Next step",
 msg97: "Shift weight before adjustment",
 msg97: "Shift weight before adjustment",
 msg98: "Shift weight after adjustment",
 msg98: "Shift weight after adjustment",
@@ -350,8 +352,25 @@ msg328: "Material Number",
 msg329: "Material Group",
 msg329: "Material Group",
 msg330: "Material Description",
 msg330: "Material Description",
 msg331: "Last Modified Date",
 msg331: "Last Modified Date",
-msg332: "Feed Information"
+msg332: "Feed Information",
+msg333:'Do you want to restore?',
+msg334:"Restore",
+
+msg335: ' Executing this operation will clear all the feeding pens that have been assigned to the existing train number. Are you sure you want to proceed with this operation?',
+
+msg336: "Do you want to change the TMR equipment?",
+msg337: "Note: Changing the TMR spreading equipment will result in different loading ,weights. Please select the processing method.",
+msg338: "1. The excess feed is evenly deducted from each pen that has been allocated.",
+msg339: "2. The excess feed is deducted from the last pen going forward.",
+  msg340: "3. Clear the allocated spreader truck.",
+msg341: "There are pens that have not been allocated. It is recommended to allocate them in a timely manner. The unallocated pens are as follows:",
+msg342: "Allocation is complete: The current pens have been fully allocated.",
+  msg343: 'Do you want to obtain the UD pens?',
+
+  msg344: "Are you sure you want to restore the default settings?",
+msg345: "Are you sure you want to synchronize the data?",
 
 
+msg346:'Enable'
 
 
 
 
 
 

+ 3 - 3
src/lang/en/langModule/premixedPlan.js

@@ -3,16 +3,16 @@ export default{
 xzcc:"Add",
 xzcc:"Add",
 jscc:"Delete",
 jscc:"Delete",
 sx:"Take Effect",
 sx:"Take Effect",
-jy1:"Disable",
+jy:"Disable",
 tmrbh:"TMR Number",
 tmrbh:"TMR Number",
 sljhccgs:"Feed Distribution Plan with Batch Following",
 sljhccgs:"Feed Distribution Plan with Batch Following",
-zdjbl:"Maximum Mixing Quantity(KG)",
+zdjbl:"Maximum Mixing Quantity(KG)",
 hlzl:"Mixed Material Weight",
 hlzl:"Mixed Material Weight",
 fljhcsgs:" Material Issuance Plan with Train Number Following",
 fljhcsgs:" Material Issuance Plan with Train Number Following",
 time:"Time",
 time:"Time",
 
 
 
 
-jy:"Verification",
+jy1:"Verification",
 zdsc:"Auto-generated",
 zdsc:"Auto-generated",
 save:"Save",
 save:"Save",
 qkyfls:"Clear Assigned Pens",
 qkyfls:"Clear Assigned Pens",

+ 1 - 1
src/lang/zn/langModule/defaultParameter.js

@@ -100,7 +100,7 @@ emsg12:"12、超出平均公斤奶饲料成本:平均公斤奶饲料成本高
 emsg13:" 13、牛栏剩料率超出预警值:牛栏剩料率高于此预警值则统计在统计报告中",
 emsg13:" 13、牛栏剩料率超出预警值:牛栏剩料率高于此预警值则统计在统计报告中",
   emsg14: "14、库存预警天数:库存预警模块根据设置天数进行统计。限制正整数。",
   emsg14: "14、库存预警天数:库存预警模块根据设置天数进行统计。限制正整数。",
 
 
-config:'是否确认恢复默认设置?'
+  config:'是否确认恢复默认设置?'
 
 
 
 
 
 

+ 1 - 1
src/lang/zn/langModule/feedingEfficiency.js

@@ -84,7 +84,7 @@ fbs:"粪便筛",
 
 
 slls:"剩料量",
 slls:"剩料量",
 slls1:"撒料量", // “Leftover Feed” 剩料量
 slls1:"撒料量", // “Leftover Feed” 剩料量
-//“Feed Distribution Quantity” 撒料量
+//“Feed Spreading Quantity” 撒料量
 
 
   zql: "准确率",
   zql: "准确率",
 cnl2:'产奶量(kg)'
 cnl2:'产奶量(kg)'

+ 24 - 3
src/lang/zn/langModule/message.js

@@ -264,7 +264,7 @@ msg238:'请选择TMR设备信息',
 
 
 //
 //
 msg239:'设备类型/设备编号/设备名称/数据采集卡编号不能为空',
 msg239:'设备类型/设备编号/设备名称/数据采集卡编号不能为空',
-mag240:'设备编号/设备名称/数据采集卡编号不能为空',
+msg240:'设备编号/设备名称/数据采集卡编号不能为空',
 msg241:'设备名称/数据采集卡编号不能为空',
 msg241:'设备名称/数据采集卡编号不能为空',
 msg242:'设备编号不能为空',
 msg242:'设备编号不能为空',
 msg243:'设备编号不可输入特殊字符',
 msg243:'设备编号不可输入特殊字符',
@@ -359,8 +359,29 @@ msg327:'原料名称',
 msg328:"物料号",
 msg328:"物料号",
 msg329:"物料组",
 msg329:"物料组",
 msg330:"物料描述",
 msg330:"物料描述",
-  msg331: "最后修改日期",
-msg332:'饲料信息',
+msg331: "最后修改日期",
+msg332: '饲料信息',
+msg333:'是否进行恢复?',
+  msg334: "恢复",
+  //
+  msg335:'执行该操作会将现有车次已分配的撒料栏舍全部清空,是否要执行该操作?',
+  msg336: '是否要改变TMR设备?',
+  msg337: "注:更换TMR撒料设备,变更后的装载重量不同,请选择处理方式",
+  msg338: "1、多出的饲料平均从已分配的各栏舍中扣减。",
+  msg339: "2、多出的饲料从最后一个栏舍依次往前扣减。",
+  msg340: "3、清空已分配的撒料车。",
+
+  msg341: " 当前有栏舍未分配,建议及时进行分配,未分配栏舍如下:",
+  msg342:"已分配完:当前栏舍已分配完善",
+  msg343:'是否获取UD栏舍?',
+  
+  msg344: '是否确认恢复默认设置?',
+  msg345: '是否确认同步数据?',
+  msg346: '启用',
+  
+  
+
+
 
 
 
 
 
 

+ 11 - 11
src/utils/index.js

@@ -388,15 +388,15 @@ function formatJson(filterVal, jsonData) {
       }
       }
     })
     })
   )
   )
-}
-
-
-export function upload(file){
-    return new Promise(resolve=>{
-        let reader = new FileReader()
-        reader.readAsBinaryString(file);
-        reader.onload = ev=>{
-            resolve(ev.target.result)
-        }
-    })
+}
+
+
+export function upload(file){
+    return new Promise(resolve=>{
+        let reader = new FileReader()
+        reader.readAsBinaryString(file);
+        reader.onload = ev=>{
+            resolve(ev.target.result)
+        }
+    })
 }
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 600 - 220
src/views/basicData/defaultParameter/function/index.vue


+ 404 - 129
src/views/basicData/defaultParameter/index2.vue

@@ -1,20 +1,55 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
-    <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="250px" style="margin-top: 40px;margin-bottom:30px;">
+    <el-form
+      ref="createTemp"
+      :rules="rules"
+      :model="createTemp"
+      label-position="right"
+      label-width="250px"
+      style="margin-top: 40px; margin-bottom: 30px"
+    >
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item
           <el-form-item
-:label="$t('defaultParameter.sfkqqytjh')" prop="isGetLastPlan">
-            <el-select v-model="createTemp.isGetLastPlan" :disabled="isRoleEdit==false" filterable placeholder="是否可取前一天计划" class="filter-item" style="width:100%">
-              <el-option v-for="item in planBeforeDayList" :key="item.id" :label="item.name" :value="item.id" />
+            :label="$t('defaultParameter.sfkqqytjh')"
+            prop="isGetLastPlan"
+          >
+            <el-select
+              v-model="createTemp.isGetLastPlan"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="是否可取前一天计划"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in planBeforeDayList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item
           <el-form-item
-:label="$t('defaultParameter.sfkqqytjh1')" prop="isGetNextPlan">
-            <el-select v-model="createTemp.isGetNextPlan" :disabled="isRoleEdit==false" filterable placeholder="是否可取后一天计划" class="filter-item" style="width:100%">
-              <el-option v-for="item in planNextDayList" :key="item.id" :label="item.name" :value="item.id" />
+            :label="$t('defaultParameter.sfkqqytjh1')"
+            prop="isGetNextPlan"
+          >
+            <el-select
+              v-model="createTemp.isGetNextPlan"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="是否可取后一天计划"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in planNextDayList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
@@ -22,17 +57,45 @@
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item
           <el-form-item
-:label="$t('defaultParameter.sfqybl')" prop="isEnableSupplyFeed">
-            <el-select v-model="createTemp.isEnableSupplyFeed" :disabled="isRoleEdit==false" filterable placeholder="是否启用补料" class="filter-item" style="width:100%">
-              <el-option v-for="item in isSupplementList" :key="item.id" :label="item.name" :value="item.id" />
+            :label="$t('defaultParameter.sfqybl')"
+            prop="isEnableSupplyFeed"
+          >
+            <el-select
+              v-model="createTemp.isEnableSupplyFeed"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="是否启用补料"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in isSupplementList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item
           <el-form-item
-:label="$t('defaultParameter.sfqysl')" prop="isEnableRemainFeed">
-            <el-select v-model="createTemp.isEnableRemainFeed" :disabled="isRoleEdit==false" filterable placeholder="是否启用剩料" class="filter-item" style="width:100%">
-              <el-option v-for="item in isLeftoverMaterialList" :key="item.id" :label="item.name" :value="item.id" />
+            :label="$t('defaultParameter.sfqysl')"
+            prop="isEnableRemainFeed"
+          >
+            <el-select
+              v-model="createTemp.isEnableRemainFeed"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="是否启用剩料"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in isLeftoverMaterialList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
@@ -40,78 +103,193 @@
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item label="日计划报表小数点位数:" prop="reportDigit">
           <el-form-item label="日计划报表小数点位数:" prop="reportDigit">
-            <el-select v-model="createTemp.reportDigit" :disabled="isRoleEdit==false" filterable placeholder="日计划报表小数点位数" class="filter-item" style="width:100%">
-              <el-option v-for="item in decimalPlacesList" :key="item.id" :label="item.name" :value="item.id" />
+            <el-select
+              v-model="createTemp.reportDigit"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="日计划报表小数点位数"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in decimalPlacesList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item
           <el-form-item
-:label="$t('defaultParameter.qyslsdnts')" prop="isLockCount">
-            <el-select v-model="createTemp.isLockCount" :disabled="isRoleEdit==false" filterable placeholder="启用饲料锁定牛头数" class="filter-item" style="width:100%">
-              <el-option v-for="item in isLockBullsList" :key="item.id" :label="item.name" :value="item.id" />
+            :label="$t('defaultParameter.qyslsdnts')"
+            prop="isLockCount"
+          >
+            <el-select
+              v-model="createTemp.isLockCount"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="启用饲料锁定牛头数"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in isLockBullsList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
-          <el-form-item
-:label="$t('defaultParameter.slclxx')" prop="remainOpt">
-            <el-select v-model="createTemp.remainOpt" :disabled="isRoleEdit==false" filterable placeholder="剩料处理选项" class="filter-item" style="width:100%">
-              <el-option v-for="item in disposalList" :key="item.id" :label="item.fname" :value="item.id" />
+          <el-form-item :label="$t('defaultParameter.slclxx')" prop="remainOpt">
+            <el-select
+              v-model="createTemp.remainOpt"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="剩料处理选项"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in disposalList"
+                :key="item.id"
+                :label="item.fname"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item label="水分调节选项:" prop="waterOpt">
           <el-form-item label="水分调节选项:" prop="waterOpt">
-            <el-select v-model="createTemp.waterOpt" :disabled="isRoleEdit==false" filterable placeholder="水分调节选项" class="filter-item" style="width:100%">
-              <el-option v-for="item in waterConditioningList" :key="item.id" :label="item.name" :value="item.id" />
+            <el-select
+              v-model="createTemp.waterOpt"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="水分调节选项"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in waterConditioningList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
-          <el-form-item label="默认撒料超出重量提醒比例:" prop="overweightWarnRate">
-            <el-input ref="overweightWarnRate" v-model="createTemp.overweightWarnRate" :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入超出比例" type="text" />
+          <el-form-item
+            label="默认撒料超出重量提醒比例:"
+            prop="overweightWarnRate"
+          >
+            <el-input
+              ref="overweightWarnRate"
+              v-model="createTemp.overweightWarnRate"
+              :disabled="isRoleEdit == false"
+              class="filter-item"
+              placeholder="请输入超出比例"
+              type="text"
+            />
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
-          <el-form-item label="默认撒料超出重量禁止比例:" prop="overweightBanRate">
-            <el-input ref="overweightBanRate" v-model="createTemp.overweightBanRate" :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入禁止比例" type="text" />
+          <el-form-item
+            label="默认撒料超出重量禁止比例:"
+            prop="overweightBanRate"
+          >
+            <el-input
+              ref="overweightBanRate"
+              v-model="createTemp.overweightBanRate"
+              :disabled="isRoleEdit == false"
+              class="filter-item"
+              placeholder="请输入禁止比例"
+              type="text"
+            />
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
-          <el-form-item  
-:label="$t('defaultParameter.kcyjts')"  prop="repertoryWarn">
-            <el-input ref="repertoryWarn" v-model="createTemp.repertoryWarn" :disabled="isRoleEdit==false" class="filter-item" placeholder="请输入库存预警天数" type="text" />
+          <el-form-item
+            :label="$t('defaultParameter.kcyjts')"
+            prop="repertoryWarn"
+          >
+            <el-input
+              ref="repertoryWarn"
+              v-model="createTemp.repertoryWarn"
+              :disabled="isRoleEdit == false"
+              class="filter-item"
+              placeholder="请输入库存预警天数"
+              type="text"
+            />
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item label="是否启用库存管理:" prop="isfeedstorage">
           <el-form-item label="是否启用库存管理:" prop="isfeedstorage">
-            <el-select v-model="createTemp.isfeedstorage" :disabled="isRoleEdit==false" filterable placeholder="水分调节选项" class="filter-item" style="width:100%">
-              <el-option v-for="item in priceCalculationList" :key="item.id" :label="item.name" :value="item.id" />
+            <el-select
+              v-model="createTemp.isfeedstorage"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="水分调节选项"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in priceCalculationList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
-          <el-form-item
-:label="$t('defaultParameter.bcsl')" prop="times">
-            <el-select v-model="createTemp.times" :disabled="isRoleEdit==false" filterable placeholder="水分调节选项" class="filter-item" style="width:100%">
-              <el-option v-for="item in numberList" :key="item.id" :label="item.name" :value="item.name" />
+          <el-form-item :label="$t('defaultParameter.bcsl')" prop="times">
+            <el-select
+              v-model="createTemp.times"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="水分调节选项"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in numberList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.name"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item
           <el-form-item
-:label="$t('defaultParameter.sfqyslht')" prop="isEnableContract">
-            <el-select v-model="createTemp.isEnableContract" :disabled="isRoleEdit==false" filterable placeholder="启用饲料合同" class="filter-item" style="width:100%">
-              <el-option v-for="item in feedontractList" :key="item.id" :label="item.name" :value="item.id" />
+            :label="$t('defaultParameter.sfqyslht')"
+            prop="isEnableContract"
+          >
+            <el-select
+              v-model="createTemp.isEnableContract"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="启用饲料合同"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in feedontractList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
@@ -119,32 +297,69 @@
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item
           <el-form-item
-:label="$t('defaultParameter.slfbfs')" prop="remainOptDis">
-            <el-select v-model="createTemp.remainOptDis" :disabled="isRoleEdit==false" filterable placeholder="剩料分配方式" class="filter-item" style="width:100%">
-              <el-option v-for="item in leftoverMaterialList" :key="item.id" :label="item.name" :value="item.name" />
+            :label="$t('defaultParameter.slfbfs')"
+            prop="remainOptDis"
+          >
+            <el-select
+              v-model="createTemp.remainOptDis"
+              :disabled="isRoleEdit == false"
+              filterable
+              placeholder="剩料分配方式"
+              class="filter-item"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in leftoverMaterialList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.name"
+              />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item label="剩料分配占比原混料(%):" prop="remainOptRate">
           <el-form-item label="剩料分配占比原混料(%):" prop="remainOptRate">
-            <el-input ref="remainOptRate" v-model="createTemp.remainOptRate" :disabled="isRoleEdit==false" class="filter-item"  
-:placeholder="$t('defaultParameter.slfpzb')" type="text" />
+            <el-input
+              ref="remainOptRate"
+              v-model="createTemp.remainOptRate"
+              :disabled="isRoleEdit == false"
+              class="filter-item"
+              :placeholder="$t('defaultParameter.slfpzb')"
+              type="text"
+            />
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
     </el-form>
     </el-form>
-    <div slot="footer" class="dialog-footer" style="bottom: 0;">
-      <el-button v-if="isRoleEdit" class="success" :disabled="isokDisable" @click="handleSave">{{$t('formulationEvaluation.save')}}</el-button>
-      <el-button v-if="isRoleEdit" class="warning" :disabled="isokDisable" @click="handleRecovery"> 
- 
-{{$t('defaultParameter.hfmr')}}</el-button>
+    <div slot="footer" class="dialog-footer" style="bottom: 0">
+      <el-button
+        v-if="isRoleEdit"
+        class="success"
+        :disabled="isokDisable"
+        @click="handleSave"
+        >{{ $t('formulationEvaluation.save') }}</el-button
+      >
+      <el-button
+        v-if="isRoleEdit"
+        class="warning"
+        :disabled="isokDisable"
+        @click="handleRecovery"
+      >
+        {{ $t('defaultParameter.hfmr') }}</el-button
+      >
     </div>
     </div>
   </div>
   </div>
-
 </template>
 </template>
 
 
 <script>
 <script>
-import { GetDataByName, PostDataByName, GetDataByNames, failproccess, checkButtons, ExecDataByConfig } from '@/api/common'
+import {
+  GetDataByName,
+  PostDataByName,
+  GetDataByNames,
+  failproccess,
+  checkButtons,
+  ExecDataByConfig
+} from '@/api/common'
 import Cookies from 'js-cookie'
 import Cookies from 'js-cookie'
 import { MessageBox } from 'element-ui'
 import { MessageBox } from 'element-ui'
 export default {
 export default {
@@ -152,42 +367,63 @@ export default {
   data() {
   data() {
     return {
     return {
       isRoleEdit: [],
       isRoleEdit: [],
-      planBeforeDayList: [{ id: '1',
-name:this.$t('supplier.yes')}, { id: '0',  
-name:this.$t('supplier.no') }], // 是否可取前一天计划
-      planNextDayList: [{ id: '1',
-name:this.$t('supplier.yes')}, { id: '0',  
-name:this.$t('supplier.no') }], // 是否可取后一天计划
-      isSupplementList: [{ id: '1',
-name:this.$t('supplier.yes')}, { id: '0',  
-name:this.$t('supplier.no') }], // 是否启用补料
-      isLeftoverMaterialList: [{ id: '1',
-name:this.$t('supplier.yes')}, { id: '0',  
-name:this.$t('supplier.no') }], // 是否启用剩料
-      decimalPlacesList: [{ id: '0',  
-name:this.$t('supplier.zs') }, { id: '1',  
-name:this.$t('supplier.xs1') }, { id: '2', 
-name:this.$t('supplier.xs2') }, { id: '3', 
-name:this.$t('supplier.xs3') }], // 日计划报表小数点位数
-      isLockBullsList: [{ id: '1',
-name:this.$t('supplier.yes')}, { id: '0',  
-name:this.$t('supplier.no') }], // 启用饲料锁定牛头数
+      planBeforeDayList: [
+        { id: '1', name: this.$t('supplier.yes') },
+        { id: '0', name: this.$t('supplier.no') }
+      ], // 是否可取前一天计划
+      planNextDayList: [
+        { id: '1', name: this.$t('supplier.yes') },
+        { id: '0', name: this.$t('supplier.no') }
+      ], // 是否可取后一天计划
+      isSupplementList: [
+        { id: '1', name: this.$t('supplier.yes') },
+        { id: '0', name: this.$t('supplier.no') }
+      ], // 是否启用补料
+      isLeftoverMaterialList: [
+        { id: '1', name: this.$t('supplier.yes') },
+        { id: '0', name: this.$t('supplier.no') }
+      ], // 是否启用剩料
+      decimalPlacesList: [
+        { id: '0', name: this.$t('supplier.zs') },
+        { id: '1', name: this.$t('supplier.xs1') },
+        { id: '2', name: this.$t('supplier.xs2') },
+        { id: '3', name: this.$t('supplier.xs3') }
+      ], // 日计划报表小数点位数
+      isLockBullsList: [
+        { id: '1', name: this.$t('supplier.yes') },
+        { id: '0', name: this.$t('supplier.no') }
+      ], // 启用饲料锁定牛头数
       disposalList: [], // 剩料处理选项
       disposalList: [], // 剩料处理选项
-      waterConditioningList: [{ id: '0',  
-name:this.$t('defaultParameter.qz')}, { id: '1',  
-name:this.$t('defaultParameter.bcl') }, { id: '2',  
-name:this.$t('defaultParameter.bcl') }], // 水分调节选项
-      priceCalculationList: [{ id: '1',
-name:this.$t('supplier.yes')}, { id: '0',  
-name:this.$t('supplier.no') }], // 是否启用库存管理
-      numberList: [{ id: '0', name: '1' }, { id: '1', name: '2' }, { id: '2', name: '3' }, { id: '3', name: '4' }], // 班次数量
-      feedontractList: [{ id: '1',
-name:this.$t('supplier.yes')}, { id: '0',  
-name:this.$t('supplier.no') }], // 是否启用饲料合同
-      leftoverMaterialList: [{ id: '0',  
-name:this.$t('supplier.defb') }, { id: '1', name: '平均分配' }],
+      waterConditioningList: [
+        { id: '0', name: this.$t('defaultParameter.qz') },
+        { id: '1', name: this.$t('defaultParameter.bcl') },
+        { id: '2', name: this.$t('defaultParameter.bcl') }
+      ], // 水分调节选项
+      priceCalculationList: [
+        { id: '1', name: this.$t('supplier.yes') },
+        { id: '0', name: this.$t('supplier.no') }
+      ], // 是否启用库存管理
+      numberList: [
+        { id: '0', name: '1' },
+        { id: '1', name: '2' },
+        { id: '2', name: '3' },
+        { id: '3', name: '4' }
+      ], // 班次数量
+      feedontractList: [
+        { id: '1', name: this.$t('supplier.yes') },
+        { id: '0', name: this.$t('supplier.no') }
+      ], // 是否启用饲料合同
+      leftoverMaterialList: [
+        { id: '0', name: this.$t('supplier.defb') },
+        { id: '1', name: '平均分配' }
+      ],
       requestParams: [
       requestParams: [
-        { name: 'getRemainFeedList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }}
+        {
+          name: 'getRemainFeedList',
+          offset: 0,
+          pagecount: 0,
+          parammaps: { pastureid: Cookies.get('pastureid') }
+        }
       ],
       ],
       getdataListParm: {
       getdataListParm: {
         name: 'getysoptList',
         name: 'getysoptList',
@@ -205,7 +441,6 @@ name:this.$t('supplier.defb') }, { id: '1', name: '平均分配' }],
       rules: {},
       rules: {},
       isokDisable: false,
       isokDisable: false,
       requestParam: {}
       requestParam: {}
-
     }
     }
   },
   },
   created() {
   created() {
@@ -217,17 +452,20 @@ name:this.$t('supplier.defb') }, { id: '1', name: '平均分配' }],
   methods: {
   methods: {
     getButtons() {
     getButtons() {
       const Edit = 'DefaultParameter'
       const Edit = 'DefaultParameter'
-      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
+      const isRoleEdit = checkButtons(
+        JSON.parse(sessionStorage.getItem('buttons')),
+        Edit
+      )
       this.isRoleEdit = isRoleEdit
       this.isRoleEdit = isRoleEdit
     },
     },
     getDownList() {
     getDownList() {
-      GetDataByNames(this.requestParams).then(response => {
+      GetDataByNames(this.requestParams).then((response) => {
         this.disposalList = response.data.getRemainFeedList.list
         this.disposalList = response.data.getRemainFeedList.list
       })
       })
     },
     },
     getList() {
     getList() {
       this.listLoading = true
       this.listLoading = true
-      GetDataByName(this.getdataListParm).then(response => {
+      GetDataByName(this.getdataListParm).then((response) => {
         console.log('table1数据', response.data.list)
         console.log('table1数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.createTemp = response.data.list[0]
           this.createTemp = response.data.list[0]
@@ -245,38 +483,56 @@ name:this.$t('supplier.defb') }, { id: '1', name: '平均分配' }],
       setTimeout(() => {
       setTimeout(() => {
         this.isokDisable = false
         this.isokDisable = false
       }, 1000)
       }, 1000)
-      this.requestParam.common = { 'returnmap': '0' }
+      this.requestParam.common = { returnmap: '0' }
       this.requestParam.data = []
       this.requestParam.data = []
-      this.requestParam.data[0] = { 'name': 'updatesysopt', 'type': 'e', 'parammaps': {
-        pastureid: this.createTemp.pastureid,
-        isGetLastPlan: this.createTemp.isGetLastPlan,
-        isGetNextPlan: this.createTemp.isGetNextPlan,
-        isEnableSupplyFeed: this.createTemp.isEnableSupplyFeed,
-        isEnableRemainFeed: this.createTemp.isEnableRemainFeed,
-        reportDigit: this.createTemp.reportDigit,
-        isLockCount: this.createTemp.isLockCount,
-        remainOpt: this.createTemp.remainOpt,
-        waterOpt: this.createTemp.waterOpt,
-        overweightWarnRate: this.createTemp.overweightWarnRate,
-        overweightBanRate: this.createTemp.overweightBanRate,
-        repertoryWarn: this.createTemp.repertoryWarn,
-        isfeedstorage: this.createTemp.isfeedstorage,
-        times: this.createTemp.times,
-        isEnableContract: this.createTemp.isEnableContract,
-        remainOptDis: this.createTemp.remainOptDis,
-        remainOptRate: this.createTemp.remainOptRate
-      }}
-      this.requestParam.data[1] = { 'name': 'updateFPbyFTChangeALL', 'type': 'e', 'parammaps': {
-        pastureid: this.createTemp.pastureid
-      }}
+      this.requestParam.data[0] = {
+        name: 'updatesysopt',
+        type: 'e',
+        parammaps: {
+          pastureid: this.createTemp.pastureid,
+          isGetLastPlan: this.createTemp.isGetLastPlan,
+          isGetNextPlan: this.createTemp.isGetNextPlan,
+          isEnableSupplyFeed: this.createTemp.isEnableSupplyFeed,
+          isEnableRemainFeed: this.createTemp.isEnableRemainFeed,
+          reportDigit: this.createTemp.reportDigit,
+          isLockCount: this.createTemp.isLockCount,
+          remainOpt: this.createTemp.remainOpt,
+          waterOpt: this.createTemp.waterOpt,
+          overweightWarnRate: this.createTemp.overweightWarnRate,
+          overweightBanRate: this.createTemp.overweightBanRate,
+          repertoryWarn: this.createTemp.repertoryWarn,
+          isfeedstorage: this.createTemp.isfeedstorage,
+          times: this.createTemp.times,
+          isEnableContract: this.createTemp.isEnableContract,
+          remainOptDis: this.createTemp.remainOptDis,
+          remainOptRate: this.createTemp.remainOptRate
+        }
+      }
+      this.requestParam.data[1] = {
+        name: 'updateFPbyFTChangeALL',
+        type: 'e',
+        parammaps: {
+          pastureid: this.createTemp.pastureid
+        }
+      }
 
 
-      ExecDataByConfig(this.requestParam).then(response => {
+      ExecDataByConfig(this.requestParam).then((response) => {
         console.log('保存发送参数', this.requestParam)
         console.log('保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
         if (response.msg !== 'fail') {
-          this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+          this.$notify({
+            title: this.$t('common.succes'),
+            message: this.$t('driver.saveSuccess'),
+            type: 'success',
+            duration: 2000
+          })
           this.getList()
           this.getList()
         } else {
         } else {
-          this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+          this.$notify({
+            title: this.$t('driver.saveFail'),
+            message: response.data,
+            type: 'warning',
+            duration: 2000
+          })
         }
         }
       })
       })
     },
     },
@@ -286,25 +542,45 @@ name:this.$t('supplier.defb') }, { id: '1', name: '平均分配' }],
       setTimeout(() => {
       setTimeout(() => {
         this.isokDisable = false
         this.isokDisable = false
       }, 1000)
       }, 1000)
-      MessageBox.confirm('是否确认恢复默认设置?', {
-        confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
+      MessageBox.confirm(this.$t('message.msg344'), {
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        type: 'warning'
       }).then(() => {
       }).then(() => {
-        this.requestParam.common = { 'returnmap': '0' }
+        this.requestParam.common = { returnmap: '0' }
         this.requestParam.data = []
         this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'updatesysoptinit', 'type': 'e', 'parammaps': {
-          pastureid: this.createTemp.pastureid
-        }}
-        this.requestParam.data[1] = { 'name': 'updateFPbyFTChangeALL', 'type': 'e', 'parammaps': {
-          pastureid: this.createTemp.pastureid
-        }}
+        this.requestParam.data[0] = {
+          name: 'updatesysoptinit',
+          type: 'e',
+          parammaps: {
+            pastureid: this.createTemp.pastureid
+          }
+        }
+        this.requestParam.data[1] = {
+          name: 'updateFPbyFTChangeALL',
+          type: 'e',
+          parammaps: {
+            pastureid: this.createTemp.pastureid
+          }
+        }
 
 
-        ExecDataByConfig(this.requestParam).then(response => {
+        ExecDataByConfig(this.requestParam).then((response) => {
           console.log('保存发送参数', this.requestParam)
           console.log('保存发送参数', this.requestParam)
           if (response.msg !== 'fail') {
           if (response.msg !== 'fail') {
-            this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+            this.$notify({
+              title: this.$t('common.succes'),
+              message: this.$t('driver.saveSuccess'),
+              type: 'success',
+              duration: 2000
+            })
             this.getList()
             this.getList()
           } else {
           } else {
-            this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+            this.$notify({
+              title: this.$t('driver.saveFail'),
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
           }
           }
         })
         })
       })
       })
@@ -313,5 +589,4 @@ name:this.$t('supplier.defb') }, { id: '1', name: '平均分配' }],
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-
 </style>
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 704 - 119
src/views/basicData/feedTable/index.vue


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

@@ -767,7 +767,7 @@ name:this.$t('supplier.no') }],
       })
       })
     },
     },
     handleGetUd(){
     handleGetUd(){
-      MessageBox.confirm('是否获取UD栏舍?', {
+      MessageBox.confirm(this.$t('message.msg343'), {
         confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
         confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
       }).then(() => {
       }).then(() => {
         let url = 'authdata/gm/udbar'
         let url = 'authdata/gm/udbar'

+ 453 - 120
src/views/basicData/livestockCategory/index.vue

@@ -1,19 +1,64 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
     <div class="search">
     <div class="search">
-      <el-select v-model="table.getdataListParm.parammaps.parentname" filterable :placeholder="$t('driver.scfl')" class="filter-item" style="width: 160px;" clearable>
-        <el-option v-for="item in parentList" :key="item.value" :label=" selectLabel(item.label)" :value="item.label" />
+      <el-select
+        v-model="table.getdataListParm.parammaps.parentname"
+        filterable
+        :placeholder="$t('driver.scfl')"
+        class="filter-item"
+        style="width: 160px"
+        clearable
+      >
+        <el-option
+          v-for="item in parentList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.label"
+        />
       </el-select>
       </el-select>
-      <el-input v-model="table.getdataListParm.parammaps.classname" :placeholder="$t('feedingEfficiency.cxlb')" style="width: 180px;" class="filter-item" clearable />
-      <el-select v-model="table.getdataListParm.parammaps.enable" :placeholder="$t('formulationEvaluation.sfqy')" class="filter-item" style="width: 120px;" clearable>
-        <el-option v-for="item in enableList" :key="item.id" :label="item.name" :value="item.id" />
+      <el-input
+        v-model="table.getdataListParm.parammaps.classname"
+        :placeholder="$t('feedingEfficiency.cxlb')"
+        style="width: 180px"
+        class="filter-item"
+        clearable
+      />
+      <el-select
+        v-model="table.getdataListParm.parammaps.enable"
+        :placeholder="$t('formulationEvaluation.sfqy')"
+        class="filter-item"
+        style="width: 120px"
+        clearable
+      >
+        <el-option
+          v-for="item in enableList"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        />
       </el-select>
       </el-select>
-      <el-button class="successBorder" @click="form_search">{{$t('common.query')}}</el-button>
-      <el-button class="successBorder" @click="handleRefresh">{{$t('common.reset')}}</el-button>
+      <el-button class="successBorder" @click="form_search">{{
+        $t('common.query')
+      }}</el-button>
+      <el-button class="successBorder" @click="handleRefresh">{{
+        $t('common.reset')
+      }}</el-button>
     </div>
     </div>
     <div class="operation">
     <div class="operation">
-      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">{{$t('formulationEvaluation.add')}}</el-button>
-      <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="form_delete">{{$t('formulationEvaluation.del')}}</el-button>
+      <el-button
+        v-if="isRoleEdit"
+        class="success"
+        icon="el-icon-plus"
+        @click="handleCreate"
+        >{{ $t('formulationEvaluation.add') }}</el-button
+      >
+      <el-button
+        v-if="isRoleEdit"
+        class="danger"
+        icon="el-icon-delete"
+        @click="form_delete"
+        >{{ $t('formulationEvaluation.del') }}</el-button
+      >
     </div>
     </div>
     <div class="table">
     <div class="table">
       <el-form ref="form" :rules="table.rules" :model="table">
       <el-form ref="form" :rules="table.rules" :model="table">
@@ -25,71 +70,181 @@
           border
           border
           fit
           fit
           highlight-current-row
           highlight-current-row
-          style="width: 100%;"
+          style="width: 100%"
           :row-style="rowStyle"
           :row-style="rowStyle"
           :cell-style="cellStyle"
           :cell-style="cellStyle"
           class="elTable table-fixed"
           class="elTable table-fixed"
           @selection-change="handleSelectionChange"
           @selection-change="handleSelectionChange"
         >
         >
           <el-table-column type="selection" align="center" width="50" />
           <el-table-column type="selection" align="center" width="50" />
-          <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px">
+          <el-table-column
+            :label="$t('formulationEvaluation.xh')"
+            align="center"
+            type="index"
+            width="50px"
+          >
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <span v-if="table.pageNum">{{ scope.$index + (table.pageNum-1) * table.pageSize + 1 }}</span>
+              <span v-if="table.pageNum">{{
+                scope.$index + (table.pageNum - 1) * table.pageSize + 1
+              }}</span>
               <span v-else>1</span>
               <span v-else>1</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column :label="$t('driver.scfl')" min-width="200px" align="center">
+          <el-table-column
+            :label="$t('driver.scfl')"
+            min-width="200px"
+            align="center"
+          >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <span v-if="scope.row.NoEdit">{{ scope.row.parentname }}</span>
               <span v-if="scope.row.NoEdit">{{ scope.row.parentname }}</span>
-              <el-select v-if="scope.row.Edit" v-model="scope.row.parentid" filterable :placeholder="$t('driver.sclbfl')" class="filter-item" style="width:95%;padding:10px 0;" @change="changeParent">
-                <el-option v-for="item in parentList" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-if="scope.row.Edit"
+                v-model="scope.row.parentid"
+                filterable
+                :placeholder="$t('driver.sclbfl')"
+                class="filter-item"
+                style="width: 95%; padding: 10px 0"
+                @change="changeParent"
+              >
+                <el-option
+                  v-for="item in parentList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
               </el-select>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column :label="$t('errorAnalysis.sxlb')" min-width="200px" align="center">
+          <el-table-column
+            :label="$t('errorAnalysis.sxlb')"
+            min-width="200px"
+            align="center"
+          >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <span v-if="scope.row.NoEdit">{{ scope.row.classname }}</span>
               <span v-if="scope.row.NoEdit">{{ scope.row.classname }}</span>
-              <el-input v-if="scope.row.Edit" v-model="scope.row.classname" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:95%;padding:0 10px;" maxlength="32" />
+              <el-input
+                v-if="scope.row.Edit"
+                v-model="scope.row.classname"
+                type="textarea"
+                :autosize="{ minRows: 1.3, maxRows: 4 }"
+                style="width: 95%; padding: 0 10px"
+                maxlength="32"
+              />
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column :label="$t('driver.scflcode')" min-width="200px" align="center">
+          <el-table-column
+            :label="$t('driver.scflcode')"
+            min-width="200px"
+            align="center"
+          >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <span v-if="scope.row.NoEdit">{{ scope.row.classcode }}</span>
               <span v-if="scope.row.NoEdit">{{ scope.row.classcode }}</span>
-              <el-input v-if="scope.row.Edit" v-model="scope.row.classcode"
-:placeholder="$t('supplier.zf1')" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" maxlength="32" style="width:95%;padding:0 10px;" />
+              <el-input
+                v-if="scope.row.Edit"
+                v-model="scope.row.classcode"
+                :placeholder="$t('supplier.zf1')"
+                type="textarea"
+                :autosize="{ minRows: 1.3, maxRows: 4 }"
+                maxlength="32"
+                style="width: 95%; padding: 0 10px"
+              />
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column :label="$t('formulationEvaluation.sfqy')" min-width="110px" align="center">
+          <el-table-column
+            :label="$t('formulationEvaluation.sfqy')"
+            min-width="110px"
+            align="center"
+          >
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
+              <el-switch
+                v-model="scope.row.enable"
+                :disabled="scope.row.NoEdit == true"
+                active-color="#13ce66"
+                inactive-color="#ff4949"
+                :active-value="1"
+                :inactive-value="0"
+                @change="handleEnableChange(scope.$index, scope.row)"
+              />
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column  :label="$t('errorAnalysis.cz')" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
-            <template slot-scope="{row}">
+          <el-table-column
+            :label="$t('errorAnalysis.cz')"
+            align="center"
+            width="80"
+            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)" />
+              <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>
               <span v-if="row.isCreate" class="centerSpan">|</span>
-              <el-button v-if="row.isCreate" class="minCancel" icon="el-icon-close" @click="createCancel(row)" />
+              <el-button
+                v-if="row.isCreate"
+                class="minCancel"
+                icon="el-icon-close"
+                @click="createCancel(row)"
+              />
               <!-- 编辑 -->
               <!-- 编辑 -->
-              <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-delete" @click="handleRowDelete(row)" />
+              <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-delete"
+                @click="handleRowDelete(row)"
+              />
               <!-- 编辑保存 -->
               <!-- 编辑保存 -->
-              <el-button v-if="row.isUpdateSave" :disabled="isokDisable" icon="el-icon-folder-checked" class="miniSuccess" @click="updateData(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>
               <span v-if="row.isUpdateSave" class="centerSpan">|</span>
-              <el-button v-if="row.isUpdateSave" class="minCancel" icon="el-icon-close" @click="updateCancel(row)" />
+              <el-button
+                v-if="row.isUpdateSave"
+                class="minCancel"
+                icon="el-icon-close"
+                @click="updateCancel(row)"
+              />
             </template>
             </template>
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
       </el-form>
       </el-form>
-      <pagination v-show="table.total>=0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
+      <pagination
+        v-show="table.total >= 0"
+        :total="table.total"
+        :page.sync="table.getdataListParm.offset"
+        :limit.sync="table.getdataListParm.pagecount"
+        @pagination="getList"
+      />
     </div>
     </div>
   </div>
   </div>
-
 </template>
 </template>
 
 
 <script>
 <script>
-import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
+import {
+  GetDataByName,
+  GetDataByNames,
+  PostDataByName,
+  failproccess,
+  ExecDataByConfig,
+  checkButtons
+} from '@/api/common'
 import Cookies from 'js-cookie'
 import Cookies from 'js-cookie'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import { MessageBox } from 'element-ui'
 import { MessageBox } from 'element-ui'
@@ -102,14 +257,20 @@ export default {
       requestParams: [
       requestParams: [
         { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] }
         { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] }
       ],
       ],
-      enableList: [{ id: 1,
-name:this.$t('supplier.yes')}, { id: 0,  
-name:this.$t('supplier.no') }],
+      enableList: [
+        { id: 1, name: this.$t('supplier.yes') },
+        { id: 0, name: this.$t('supplier.no') }
+      ],
       parentList: [],
       parentList: [],
 
 
       table: {
       table: {
         rules: {
         rules: {
-          name: { type: 'string', required: true, message:  this.$t('message.msg159'), trigger: 'change' }
+          name: {
+            type: 'string',
+            required: true,
+            message: this.$t('message.msg159'),
+            trigger: 'change'
+          }
         },
         },
         getdataListParm: {
         getdataListParm: {
           name: 'getCowclassList',
           name: 'getCowclassList',
@@ -135,7 +296,6 @@ name:this.$t('supplier.no') }],
       selectList: [],
       selectList: [],
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' }
       cellStyle: { padding: 0 + 'px' }
-
     }
     }
   },
   },
 
 
@@ -147,25 +307,28 @@ name:this.$t('supplier.no') }],
 
 
   methods: {
   methods: {
     // 翻译筛选
     // 翻译筛选
-   selectLabel(item) {
+    selectLabel(item) {
       if (this.$t('selectList.' + item)) {
       if (this.$t('selectList.' + item)) {
-      return this.$t('selectList.' + item)
-    }
+        return this.$t('selectList.' + item)
+      }
       return item
       return item
     },
     },
     getButtons() {
     getButtons() {
       const Edit = 'LivestockCategory'
       const Edit = 'LivestockCategory'
-      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
+      const isRoleEdit = checkButtons(
+        JSON.parse(sessionStorage.getItem('buttons')),
+        Edit
+      )
       this.isRoleEdit = isRoleEdit
       this.isRoleEdit = isRoleEdit
     },
     },
     getDownList() {
     getDownList() {
-      GetDataByNames(this.requestParams).then(response => {
+      GetDataByNames(this.requestParams).then((response) => {
         this.parentList = response.data.getDictByName.list
         this.parentList = response.data.getDictByName.list
       })
       })
     },
     },
     getList() {
     getList() {
       this.table.listLoading = true
       this.table.listLoading = true
-      GetDataByName(this.table.getdataListParm).then(response => {
+      GetDataByName(this.table.getdataListParm).then((response) => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           for (let i = 0; i < response.data.list.length; i++) {
           for (let i = 0; i < response.data.list.length; i++) {
@@ -206,9 +369,11 @@ name:this.$t('supplier.no') }],
 
 
     changeParent(val) {
     changeParent(val) {
       console.log('点击了牲畜类别父类', val)
       console.log('点击了牲畜类别父类', val)
-      console.log(this.parentList.find(obj => obj.value == val).label)
+      console.log(this.parentList.find((obj) => obj.value == val).label)
       this.table.temp.parentid = val
       this.table.temp.parentid = val
-      this.table.temp.parentname = this.parentList.find(obj => obj.value == val).label
+      this.table.temp.parentname = this.parentList.find(
+        (obj) => obj.value == val
+      ).label
       this.$forceUpdate()
       this.$forceUpdate()
     },
     },
     handleCreate() {
     handleCreate() {
@@ -217,11 +382,26 @@ name:this.$t('supplier.no') }],
       // 新增操true,编辑false,编辑保存false
       // 新增操true,编辑false,编辑保存false
       for (let i = 0; i < this.table.list.length; i++) {
       for (let i = 0; i < this.table.list.length; i++) {
         if (this.table.list[i].Edit == true) {
         if (this.table.list[i].Edit == true) {
-          this.$message({ type: 'error', message: this.$t('driver.messageNote'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('driver.messageNote'),
+            duration: 2000
+          })
           return false
           return false
         }
         }
       }
       }
-      this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'parentid': '', 'classname': '', 'classcode': '' })
+      this.table.list.unshift({
+        myId: new Date().valueOf(),
+        Edit: true,
+        NoEdit: false,
+        isCreate: true,
+        isUpdate: false,
+        isUpdateSave: false,
+        enable: 1,
+        parentid: '',
+        classname: '',
+        classcode: ''
+      })
     },
     },
     createData(row) {
     createData(row) {
       console.log('点击了新增保存')
       console.log('点击了新增保存')
@@ -231,29 +411,66 @@ name:this.$t('supplier.no') }],
       this.table.temp.parentid = row.parentid
       this.table.temp.parentid = row.parentid
       this.table.temp.enable = row.enable
       this.table.temp.enable = row.enable
       // 牲畜父类/牲畜类别/牲畜类别编号是否为空
       // 牲畜父类/牲畜类别/牲畜类别编号是否为空
-      if (this.table.temp.parentid == '' && this.table.temp.classname == '' && this.table.temp.classcode == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg247'), duration: 2000 })
+      if (
+        this.table.temp.parentid == '' &&
+        this.table.temp.classname == '' &&
+        this.table.temp.classcode == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg247'),
+          duration: 2000
+        })
         return false
         return false
-      } else if (this.table.temp.classname == '' && this.table.temp.classcode == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg249'), duration: 2000 })
+      } else if (
+        this.table.temp.classname == '' &&
+        this.table.temp.classcode == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg249'),
+          duration: 2000
+        })
         return false
         return false
       } else if (this.table.temp.parentid == '') {
       } else if (this.table.temp.parentid == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg248'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg248'),
+          duration: 2000
+        })
         return false
         return false
       } else if (this.table.temp.classname == '') {
       } else if (this.table.temp.classname == '') {
-        this.$message({ type: 'error',message:this.$t('message.msg19'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg19'),
+          duration: 2000
+        })
         return false
         return false
       } else if (this.table.temp.classcode == '') {
       } else if (this.table.temp.classcode == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg250'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg250'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
-      const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
+      const pattern = new RegExp(
+        "[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"
+      )
       if (pattern.test(this.table.temp.classname)) {
       if (pattern.test(this.table.temp.classname)) {
-        this.$message({ type: 'error', message: this.$t('message.msg251'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg251'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
       if (pattern.test(this.table.temp.classcode)) {
       if (pattern.test(this.table.temp.classcode)) {
-        this.$message({ type: 'error', message: this.$t('message.msg252'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg252'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
 
 
@@ -263,13 +480,23 @@ name:this.$t('supplier.no') }],
       }, 1000)
       }, 1000)
       this.requestParam.name = 'insertCowclass'
       this.requestParam.name = 'insertCowclass'
       this.requestParam.parammaps = this.table.temp
       this.requestParam.parammaps = this.table.temp
-      PostDataByName(this.requestParam).then(response => {
+      PostDataByName(this.requestParam).then((response) => {
         console.log('新增保存发送参数', this.requestParam)
         console.log('新增保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
         if (response.msg !== 'fail') {
-          this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+          this.$notify({
+            title: this.$t('common.succes'),
+            message: this.$t('driver.saveSuccess'),
+            type: 'success',
+            duration: 2000
+          })
           this.getList()
           this.getList()
         } else {
         } else {
-          this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+          this.$notify({
+            title: this.$t('driver.saveFail'),
+            message: response.data,
+            type: 'warning',
+            duration: 2000
+          })
         }
         }
       })
       })
     },
     },
@@ -289,7 +516,11 @@ name:this.$t('supplier.no') }],
       console.log('点击了编辑', row)
       console.log('点击了编辑', row)
       for (let i = 0; i < this.table.list.length; i++) {
       for (let i = 0; i < this.table.list.length; i++) {
         if (this.table.list[i].Edit == true) {
         if (this.table.list[i].Edit == true) {
-          this.$message({ type: 'error', message: this.$t('driver.messageNote'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('driver.messageNote'),
+            duration: 2000
+          })
           return false
           return false
         }
         }
       }
       }
@@ -320,29 +551,66 @@ name:this.$t('supplier.no') }],
       this.table.temp.enable = row.enable
       this.table.temp.enable = row.enable
       this.table.temp.id = row.id
       this.table.temp.id = row.id
       // 牲畜父类/牲畜类别/牲畜类别编号是否为空
       // 牲畜父类/牲畜类别/牲畜类别编号是否为空
-      if (this.table.temp.parentid == '' && this.table.temp.classname == '' && this.table.temp.classcode == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg247'), duration: 2000 })
+      if (
+        this.table.temp.parentid == '' &&
+        this.table.temp.classname == '' &&
+        this.table.temp.classcode == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg247'),
+          duration: 2000
+        })
         return false
         return false
-      } else if (this.table.temp.classname == '' && this.table.temp.classcode == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg249'), duration: 2000 })
+      } else if (
+        this.table.temp.classname == '' &&
+        this.table.temp.classcode == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg249'),
+          duration: 2000
+        })
         return false
         return false
       } else if (this.table.temp.parentid == '') {
       } else if (this.table.temp.parentid == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg248'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg248'),
+          duration: 2000
+        })
         return false
         return false
       } else if (this.table.temp.classname == '') {
       } else if (this.table.temp.classname == '') {
-        this.$message({ type: 'error',message:this.$t('message.msg19'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg19'),
+          duration: 2000
+        })
         return false
         return false
       } else if (this.table.temp.classcode == '') {
       } else if (this.table.temp.classcode == '') {
-        this.$message({ type: 'error', message: this.$t('message.msg250'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg250'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
-      const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
+      const pattern = new RegExp(
+        "[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"
+      )
       if (pattern.test(this.table.temp.classname)) {
       if (pattern.test(this.table.temp.classname)) {
-        this.$message({ type: 'error', message: this.$t('message.msg251'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg251'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
       if (pattern.test(this.table.temp.classcode)) {
       if (pattern.test(this.table.temp.classcode)) {
-        this.$message({ type: 'error', message: this.$t('message.msg252'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg252'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
 
 
@@ -352,13 +620,23 @@ name:this.$t('supplier.no') }],
       }, 1000)
       }, 1000)
       this.requestParam.name = 'updateCowclass'
       this.requestParam.name = 'updateCowclass'
       this.requestParam.parammaps = this.table.temp
       this.requestParam.parammaps = this.table.temp
-      PostDataByName(this.requestParam).then(response => {
+      PostDataByName(this.requestParam).then((response) => {
         console.log('新增保存发送参数', this.requestParam)
         console.log('新增保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
         if (response.msg !== 'fail') {
-          this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+          this.$notify({
+            title: this.$t('common.succes'),
+            message: this.$t('driver.saveSuccess'),
+            type: 'success',
+            duration: 2000
+          })
           this.getList()
           this.getList()
         } else {
         } else {
-          this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+          this.$notify({
+            title: this.$t('driver.saveFail'),
+            message: response.data,
+            type: 'warning',
+            duration: 2000
+          })
         }
         }
       })
       })
     },
     },
@@ -375,33 +653,55 @@ name:this.$t('supplier.no') }],
     },
     },
     handleRowDelete(row) {
     handleRowDelete(row) {
       console.log('点击了行内删除')
       console.log('点击了行内删除')
-      MessageBox.confirm( this.$t('common.delMsg'), {
-        confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
-      }).then(() => {
-        this.selectList = []
-        this.requestParam = {}
-        this.requestParam.common = { 'returnmap': '0' }
-        this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'checkDeleteCC', 'type': 'v', 'parammaps': {
-          'pastureid': row.pastureid,
-          'id': row.id
-        }}
-        this.requestParam.data[1] = { 'name': 'deleteCowclass', 'type': 'e', 'parammaps': {
-          'pastureid': row.pastureid,
-          'id': row.id
-        }}
-        ExecDataByConfig(this.requestParam).then(response => {
-          console.log('删除保存发送参数', this.requestParam)
-          if (response.msg === 'fail') {
-            this.$notify({ title: this.$t('common.delfail'), message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.$notify({ title: '',message: this.$t('common.delSuccess'), type: 'success', duration: 2000 })
-            this.getList()
+      MessageBox.confirm(this.$t('common.delMsg'), {
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        type: 'warning'
+      })
+        .then(() => {
+          this.selectList = []
+          this.requestParam = {}
+          this.requestParam.common = { returnmap: '0' }
+          this.requestParam.data = []
+          this.requestParam.data[0] = {
+            name: 'checkDeleteCC',
+            type: 'v',
+            parammaps: {
+              pastureid: row.pastureid,
+              id: row.id
+            }
           }
           }
+          this.requestParam.data[1] = {
+            name: 'deleteCowclass',
+            type: 'e',
+            parammaps: {
+              pastureid: row.pastureid,
+              id: row.id
+            }
+          }
+          ExecDataByConfig(this.requestParam).then((response) => {
+            console.log('删除保存发送参数', this.requestParam)
+            if (response.msg === 'fail') {
+              this.$notify({
+                title: this.$t('common.delfail'),
+                message: response.data,
+                type: 'warning',
+                duration: 2000
+              })
+            } else {
+              this.$notify({
+                title: '',
+                message: this.$t('common.delSuccess'),
+                type: 'success',
+                duration: 2000
+              })
+              this.getList()
+            }
+          })
+        })
+        .catch(() => {
+          this.$message({ type: 'info', message: this.$t('common.cancelMsg') })
         })
         })
-      }).catch(() => {
-        this.$message({ type: 'info', message: this.$t('common.cancelMsg') })
-      })
     },
     },
     handleSelectionChange(val) {
     handleSelectionChange(val) {
       console.log('勾选数据', val)
       console.log('勾选数据', val)
@@ -410,31 +710,63 @@ name:this.$t('supplier.no') }],
     form_delete() {
     form_delete() {
       console.log('点击了删除')
       console.log('点击了删除')
       if (this.selectList.length == 0) {
       if (this.selectList.length == 0) {
-        this.$message({ type: 'error', message: this.$t('message.msg253'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg253'),
+          duration: 2000
+        })
       } else {
       } else {
-        MessageBox.confirm(this.$t('message.msg29')+ this.selectList.length + this.$t('message.msg31'), {
-          confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
-        }).then(() => {
+        MessageBox.confirm(
+          this.$t('message.msg29') +
+            this.selectList.length +
+            this.$t('message.msg31'),
+          {
+            confirmButtonText: this.$t('common.confirm'),
+            cancelButtonText: this.$t('common.cancel'),
+            type: 'warning'
+          }
+        ).then(() => {
           console.log(this.selectList)
           console.log(this.selectList)
           this.requestParam = {}
           this.requestParam = {}
-          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.common = { returnmap: '0' }
           this.requestParam.data = []
           this.requestParam.data = []
-          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
+          this.requestParam.data[0] = {
+            name: 'insertSpotList',
+            resultmaps: { list: this.selectList }
+          }
           this.requestParam.data[0].children = []
           this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = { 'name': 'checkDeleteCC', 'type': 'v', 'parammaps': {
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid'
-          }}
-          this.requestParam.data[0].children[1] = { 'name': 'deleteCowclass', 'type': 'e', 'parammaps': {
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid'
-          }}
-          ExecDataByConfig(this.requestParam).then(response => {
+          this.requestParam.data[0].children[0] = {
+            name: 'checkDeleteCC',
+            type: 'v',
+            parammaps: {
+              id: '@insertSpotList.id',
+              pastureid: '@insertSpotList.pastureid'
+            }
+          }
+          this.requestParam.data[0].children[1] = {
+            name: 'deleteCowclass',
+            type: 'e',
+            parammaps: {
+              id: '@insertSpotList.id',
+              pastureid: '@insertSpotList.pastureid'
+            }
+          }
+          ExecDataByConfig(this.requestParam).then((response) => {
             console.log('删除保存发送参数', this.requestParam)
             console.log('删除保存发送参数', this.requestParam)
             if (response.msg === 'fail') {
             if (response.msg === 'fail') {
-              this.$notify({ title: this.$t('common.delfail'), message: response.data, type: 'warning', duration: 2000 })
+              this.$notify({
+                title: this.$t('common.delfail'),
+                message: response.data,
+                type: 'warning',
+                duration: 2000
+              })
             } else {
             } else {
-              this.$notify({ title: '',message: this.$t('common.delSuccess'), type: 'success', duration: 2000 })
+              this.$notify({
+                title: '',
+                message: this.$t('common.delSuccess'),
+                type: 'success',
+                duration: 2000
+              })
               this.getList()
               this.getList()
             }
             }
           })
           })
@@ -445,6 +777,7 @@ name:this.$t('supplier.no') }],
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-  .search{margin-top:10px;}
-
+.search {
+  margin-top: 10px;
+}
 </style>
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 535 - 159
src/views/dashboard/pasture/index.vue


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1647 - 631
src/views/formulationPlan/dailyExecutionPlan/index.vue


+ 98 - 38
src/views/formulationPlan/dailyExecutionPlan/revisePlan.vue

@@ -1,37 +1,78 @@
 <template>
 <template>
   <div v-if="visible">
   <div v-if="visible">
-    <el-dialog id="reviseplanDialog" :title="title" :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="visible" :close-on-click-modal="false" :modal-append-to-body="false" :append-to-body="true" :before-close="closeDialog" width="90%">
+    <el-dialog
+      id="reviseplanDialog"
+      :title="title"
+      :fullscreen="dialogFull"
+      :destroy-on-close="true"
+      :visible.sync="visible"
+      :close-on-click-modal="false"
+      :modal-append-to-body="false"
+      :append-to-body="true"
+      :before-close="closeDialog"
+      width="90%"
+    >
       <template slot="title">
       <template slot="title">
         <div class="avue-crud__dialog__header">
         <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
           <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            <span
+              style="
+                display: inline-block;
+                width: 3px;
+                height: 20px;
+                margin-right: 5px;
+                float: left;
+                margin-top: 2px;
+              "
+            />
             {{ title }}
             {{ title }}
           </span>
           </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+          <div
+            class="avue-crud__dialog__menu"
+            @click="dialogFull ? (dialogFull = false) : (dialogFull = true)"
+          >
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
           </div>
           </div>
         </div>
         </div>
       </template>
       </template>
       <el-row class="dialogMinHeight">
       <el-row class="dialogMinHeight">
-        <el-button class="successBorder" size="medium" style="position: absolute;z-index: 1;right: 2px;top: 2px;" @click="saveData()">{{$t('message.msg304')}}</el-button>
-        <el-tabs v-model="parentActiveName" type="border-card" @tab-click="handleClick">
+        <el-button
+          class="successBorder"
+          size="medium"
+          style="position: absolute; z-index: 1; right: 2px; top: 2px"
+          @click="saveData()"
+          >{{ $t('message.msg304') }}</el-button
+        >
+        <el-tabs
+          v-model="parentActiveName"
+          type="border-card"
+          @tab-click="handleClick"
+        >
           <el-tab-pane :label="$t('message.msg305')" name="栏舍配方">
           <el-tab-pane :label="$t('message.msg305')" name="栏舍配方">
             <DhedFormula ref="DhedFormula" :parent-date="date" />
             <DhedFormula ref="DhedFormula" :parent-date="date" />
           </el-tab-pane>
           </el-tab-pane>
           <el-tab-pane :label="$t('message.msg306')" name="撒料计划">
           <el-tab-pane :label="$t('message.msg306')" name="撒料计划">
-            <MaterialIssuancePlan ref="MaterialIssuancePlan" :parent-date="date" />
+            <MaterialIssuancePlan
+              ref="MaterialIssuancePlan"
+              :parent-date="date"
+            />
           </el-tab-pane>
           </el-tab-pane>
           <el-tab-pane :label="$t('message.msg307')" name="预混计划">
           <el-tab-pane :label="$t('message.msg307')" name="预混计划">
             <PremixedPlan ref="PremixedPlan" :parent-date="date" />
             <PremixedPlan ref="PremixedPlan" :parent-date="date" />
           </el-tab-pane>
           </el-tab-pane>
           <el-tab-pane :label="$t('message.msg308')" name="剩料计划">
           <el-tab-pane :label="$t('message.msg308')" name="剩料计划">
-            <SurplusMaterialPlan ref="SurplusMaterialPlan" :parent-date="date" />
+            <SurplusMaterialPlan
+              ref="SurplusMaterialPlan"
+              :parent-date="date"
+            />
           </el-tab-pane>
           </el-tab-pane>
         </el-tabs>
         </el-tabs>
       </el-row>
       </el-row>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
-        <el-button class="cancelClose cancelClose1" @click="closeDialog()">{{$t('common.closed')}}</el-button>
+        <el-button class="cancelClose cancelClose1" @click="closeDialog()">{{
+          $t('common.closed')
+        }}</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
@@ -48,17 +89,24 @@ import Cookies from 'js-cookie'
 export default {
 export default {
   name: 'RevisePlan',
   name: 'RevisePlan',
   components: {
   components: {
-    DhedFormula, MaterialIssuancePlan, PremixedPlan,SurplusMaterialPlan
+    DhedFormula,
+    MaterialIssuancePlan,
+    PremixedPlan,
+    SurplusMaterialPlan
   },
   },
   props: {
   props: {
     show: { type: Boolean, default: false }, // 弹框可见标志
     show: { type: Boolean, default: false }, // 弹框可见标志
-    parentActiveName: { type: String, defalut: ''},
+    parentActiveName: { type: String, defalut: '' },
     parentDate: { type: String, defalut: '' }
     parentDate: { type: String, defalut: '' }
   },
   },
   data() {
   data() {
     return {
     return {
       dialogFull: false,
       dialogFull: false,
-      typeList: [{ id: '1', effect: 'dark', label: this.$t('message.msg193') }, { id: '2', effect: 'plain', label: this.$t('message.msg306') }, { id: '3', effect: 'plain', label: this.$t('message.msg307') }],
+      typeList: [
+        { id: '1', effect: 'dark', label: this.$t('dailyExecutionPlan.lspf') },
+        { id: '2', effect: 'plain', label: this.$t('message.msg306') },
+        { id: '3', effect: 'plain', label: this.$t('message.msg307') }
+      ],
       visible: this.show,
       visible: this.show,
       dialogFormVisible: false,
       dialogFormVisible: false,
       dialogStatus: '',
       dialogStatus: '',
@@ -91,7 +139,7 @@ export default {
       handler(newVal, oldVal) {
       handler(newVal, oldVal) {
         console.log('newVal-date', newVal)
         console.log('newVal-date', newVal)
         this.date = newVal
         this.date = newVal
-        this.title = this.$t('message.msg220')+ this.date
+        this.title = this.$t('message.msg220') + this.date
       }
       }
     },
     },
     parentActiveName: {
     parentActiveName: {
@@ -103,36 +151,48 @@ export default {
       }
       }
     }
     }
   },
   },
-  created() {
-
-  },
+  created() {},
   methods: {
   methods: {
     closeDialog() {
     closeDialog() {
       this.dialogFull = false
       this.dialogFull = false
       this.$emit('update:show', false) // 子组件更新弹框隐藏
       this.$emit('update:show', false) // 子组件更新弹框隐藏
-      this.$emit('activeName','栏舍配方'  )
+      this.$emit('activeName', '栏舍配方')
     },
     },
     saveData() {
     saveData() {
       console.log('点击了应用')
       console.log('点击了应用')
       MessageBox.confirm(this.$t('message.msg309') + this.date, {
       MessageBox.confirm(this.$t('message.msg309') + this.date, {
-        confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
-      }).then(() => {
-        this.requestParam.name = 'updatedownloadedplanDone'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
-        this.requestParam.parammaps.date = this.date
-        PostDataByName(this.requestParam).then(response => {
-          if (response.msg === 'fail') {
-            this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
-            this.closeDialog()
-            this.$parent.getList()
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: this.$t('message.msg41') })
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        type: 'warning'
       })
       })
+        .then(() => {
+          this.requestParam.name = 'updatedownloadedplanDone'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
+          this.requestParam.parammaps.date = this.date
+          PostDataByName(this.requestParam).then((response) => {
+            if (response.msg === 'fail') {
+              this.$notify({
+                title: this.$t('driver.saveFail'),
+                message: response.data,
+                type: 'warning',
+                duration: 2000
+              })
+            } else {
+              this.$notify({
+                title: this.$t('common.succes'),
+                message: this.$t('driver.saveSuccess'),
+                type: 'success',
+                duration: 2000
+              })
+              this.closeDialog()
+              this.$parent.getList()
+            }
+          })
+        })
+        .catch(() => {
+          this.$message({ type: 'info', message: this.$t('message.msg41') })
+        })
     },
     },
     handleClick(item) {
     handleClick(item) {
       console.log(item.name)
       console.log(item.name)
@@ -143,11 +203,11 @@ export default {
       } else if (item.name == '栏舍配方') {
       } else if (item.name == '栏舍配方') {
         this.$refs.DhedFormula.getIsDisplay()
         this.$refs.DhedFormula.getIsDisplay()
         this.$refs.DhedFormula.getDownList()
         this.$refs.DhedFormula.getDownList()
-      } else if (item.name == '栏舍配方'){
+      } else if (item.name == '栏舍配方') {
         this.$refs.PremixedPlan.getDownList()
         this.$refs.PremixedPlan.getDownList()
         this.$refs.PremixedPlan.getIsDisplay()
         this.$refs.PremixedPlan.getIsDisplay()
         this.$refs.PremixedPlan.getList()
         this.$refs.PremixedPlan.getList()
-      }else if (item.name == '剩料计划'){
+      } else if (item.name == '剩料计划') {
         this.$refs.SurplusMaterialPlan.getButtons()
         this.$refs.SurplusMaterialPlan.getButtons()
         this.$refs.SurplusMaterialPlan.getDownList()
         this.$refs.SurplusMaterialPlan.getDownList()
         this.$refs.SurplusMaterialPlan.getIsDisplay()
         this.$refs.SurplusMaterialPlan.getIsDisplay()
@@ -159,7 +219,7 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-  // #reviseplanDialog {
-  //    margin-top: -10vh !important
-  // }
+// #reviseplanDialog {
+//    margin-top: -10vh !important
+// }
 </style>
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 577 - 153
src/views/formulationPlan/dailyExecutionPlan/typePage/materialIssuancePlan.vue


+ 319 - 89
src/views/formulationPlan/dailyExecutionPlan/typePage/premixedPlan.vue

@@ -70,7 +70,7 @@
         <el-table-column :label="$t('premixedPlan.time')"   min-width="130px" align="center">
         <el-table-column :label="$t('premixedPlan.time')"   min-width="130px" align="center">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span v-if="scope.row.NoEdit">{{ scope.row.ptime }}</span>
             <span v-if="scope.row.NoEdit">{{ scope.row.ptime }}</span>
-            <el-time-picker v-if="scope.row.Edit" v-model="scope.row.ptime" type="datetime" :placeholder="$t('dhedFormula.xzrq')" format="HH:mm" value-format="HH:mm" style="display: inline-block;width: 95%;" />
+            <el-time-picker v-if="scope.row.Edit" v-model="scope.row.ptime" type="datetime" :placeholder="$t('dailyExecutionPlan.xzrq')" format="HH:mm" value-format="HH:mm" style="display: inline-block;width: 95%;" />
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column :label="$t('dailyExecutionPlan.dcczzd')" min-width="80px" align="center">
         <el-table-column :label="$t('dailyExecutionPlan.dcczzd')" min-width="80px" align="center">
@@ -104,7 +104,13 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig } from '@/api/common'
+import {
+  GetDataByName,
+  GetDataByNames,
+  PostDataByName,
+  failproccess,
+  ExecDataByConfig
+} from '@/api/common'
 import Sortable from 'sortablejs'
 import Sortable from 'sortablejs'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import Cookies from 'js-cookie'
 import Cookies from 'js-cookie'
@@ -120,8 +126,18 @@ export default {
     return {
     return {
       date: '',
       date: '',
       requestParams: [
       requestParams: [
-        { name: 'getTMRYHList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
-        { name: 'getFTYHList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }}
+        {
+          name: 'getTMRYHList',
+          offset: 0,
+          pagecount: 0,
+          parammaps: { pastureid: Cookies.get('pastureid') }
+        },
+        {
+          name: 'getFTYHList',
+          offset: 0,
+          pagecount: 0,
+          parammaps: { pastureid: Cookies.get('pastureid') }
+        }
       ],
       ],
       formulaNameList: [], // 配方名称
       formulaNameList: [], // 配方名称
       TMRNumberList: [], // TMR编号
       TMRNumberList: [], // TMR编号
@@ -199,28 +215,40 @@ export default {
   },
   },
   methods: {
   methods: {
     getDownList() {
     getDownList() {
-      GetDataByNames(this.requestParams).then(response => {
+      GetDataByNames(this.requestParams).then((response) => {
         this.TMRNumberList = response.data.getTMRYHList.list
         this.TMRNumberList = response.data.getTMRYHList.list
         this.formulaNameList = response.data.getFTYHList.list
         this.formulaNameList = response.data.getFTYHList.list
       })
       })
     },
     },
     getIsDisplay() {
     getIsDisplay() {
-      GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
+      GetDataByName(this.maxTime.getMaxTimesParm).then((response) => {
         if (response.data.list[0].inforvalue == 1) {
         if (response.data.list[0].inforvalue == 1) {
-          this.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }]
+          this.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one') }]
         } else if (response.data.list[0].inforvalue == 2) {
         } else if (response.data.list[0].inforvalue == 2) {
-          this.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }]
+          this.frequencyList = [
+            { id: '1', name: this.$t('errorAnalysis.one') },
+            { id: '2', name: this.$t('errorAnalysis.two') }
+          ]
         } else if (response.data.list[0].inforvalue == 3) {
         } else if (response.data.list[0].inforvalue == 3) {
-          this.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }]
+          this.frequencyList = [
+            { id: '1', name: this.$t('errorAnalysis.one') },
+            { id: '2', name: this.$t('errorAnalysis.two') },
+            { id: '3', name: this.$t('errorAnalysis.three') }
+          ]
         } else if (response.data.list[0].inforvalue == 4) {
         } else if (response.data.list[0].inforvalue == 4) {
-          this.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }, { id: '4', name: this.$t('errorAnalysis.four'), }]
+          this.frequencyList = [
+            { id: '1', name: this.$t('errorAnalysis.one') },
+            { id: '2', name: this.$t('errorAnalysis.two') },
+            { id: '3', name: this.$t('errorAnalysis.three') },
+            { id: '4', name: this.$t('errorAnalysis.four') }
+          ]
         }
         }
       })
       })
     },
     },
     getList() {
     getList() {
       this.table.listLoading = true
       this.table.listLoading = true
       this.table.getdataListParm.parammaps.date = this.date
       this.table.getdataListParm.parammaps.date = this.date
-      GetDataByName(this.table.getdataListParm).then(response => {
+      GetDataByName(this.table.getdataListParm).then((response) => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           for (let i = 0; i < response.data.list.length; i++) {
           for (let i = 0; i < response.data.list.length; i++) {
@@ -248,19 +276,21 @@ export default {
     },
     },
     // 配方名称
     // 配方名称
     changeformulaName(item, row) {
     changeformulaName(item, row) {
-      row.ftname = this.formulaNameList.find(obj => obj.id == item).tname
+      row.ftname = this.formulaNameList.find((obj) => obj.id == item).tname
     },
     },
     // TMR编号
     // TMR编号
     changeTMRNumber(item, row) {
     changeTMRNumber(item, row) {
-      row.tmrcode = this.TMRNumberList.find(obj => obj.id == item).tname
-      row.maxweight = this.TMRNumberList.find(obj => obj.id == item).maxstirfeed
+      row.tmrcode = this.TMRNumberList.find((obj) => obj.id == item).tname
+      row.maxweight = this.TMRNumberList.find(
+        (obj) => obj.id == item
+      ).maxstirfeed
     },
     },
     // 撒料计划车次跟随列表
     // 撒料计划车次跟随列表
     changeCarFollow(item, row) {
     changeCarFollow(item, row) {
       if (item == '') {
       if (item == '') {
         row.lppcode = ''
         row.lppcode = ''
       } else {
       } else {
-        row.lppcode = this.carFollowList.find(obj => obj.id == item).lppcode
+        row.lppcode = this.carFollowList.find((obj) => obj.id == item).lppcode
       }
       }
     },
     },
     // 班次
     // 班次
@@ -272,7 +302,7 @@ export default {
     // 撒料计划车次跟随列表
     // 撒料计划车次跟随列表
     getCarFollowList(row) {
     getCarFollowList(row) {
       this.getCarFollowParm.parammaps.date = this.date
       this.getCarFollowParm.parammaps.date = this.date
-      GetDataByName(this.getCarFollowParm).then(response => {
+      GetDataByName(this.getCarFollowParm).then((response) => {
         console.log('撒料计划车次跟随列表数据', response.data.list)
         console.log('撒料计划车次跟随列表数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.carFollowList = response.data.list
           this.carFollowList = response.data.list
@@ -286,8 +316,12 @@ export default {
     },
     },
     // 行拖拽
     // 行拖拽
     rowDrop() {
     rowDrop() {
-      console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
-      const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
+      console.log(
+        document.querySelector('#table .el-table__body-wrapper tbody')
+      )
+      const tbody = document.querySelector(
+        '#table .el-table__body-wrapper tbody'
+      )
       const that = this
       const that = this
       var sortable = Sortable.create(tbody, {
       var sortable = Sortable.create(tbody, {
         disabled: that.dropState,
         disabled: that.dropState,
@@ -316,7 +350,11 @@ export default {
       for (let i = 0; i < this.table.list.length; i++) {
       for (let i = 0; i < this.table.list.length; i++) {
         if (this.table.list[i].Edit === true) {
         if (this.table.list[i].Edit === true) {
           console.log(123)
           console.log(123)
-          this.$message({ type: 'error', message: this.$t('driver.messageNote'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('driver.messageNote'),
+            duration: 2000
+          })
           return false
           return false
         }
         }
       }
       }
@@ -326,44 +364,118 @@ export default {
       } else {
       } else {
         sort = 1
         sort = 1
       }
       }
-      this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': sort, 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'ptime': '', 'maxweight': '', 'operateweight': '' })
+      this.table.list.unshift({
+        myId: new Date().valueOf(),
+        Edit: true,
+        NoEdit: false,
+        isCreate: true,
+        isUpdate: false,
+        isUpdateSave: false,
+        enable: 1,
+        sort: sort,
+        ftid: '',
+        ftname: '',
+        tmrcode: '',
+        tmrid: '',
+        times: '',
+        lppcode: '',
+        lppid: '',
+        ptime: '',
+        maxweight: '',
+        operateweight: ''
+      })
     },
     },
     createData(row) {
     createData(row) {
       console.log('点击了新增保存', row)
       console.log('点击了新增保存', row)
 
 
-      if (row.sort == '' && row.ftid == '' && row.tmrid == '' && row.times == '' && row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg142'), duration: 2000 })
+      if (
+        row.sort == '' &&
+        row.ftid == '' &&
+        row.tmrid == '' &&
+        row.times == '' &&
+        row.operateweight == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg142'),
+          duration: 2000
+        })
         return false
         return false
-      } else if (row.ftid == '' && row.tmrid == '' && row.times == '' && row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg143'), duration: 2000 })
+      } else if (
+        row.ftid == '' &&
+        row.tmrid == '' &&
+        row.times == '' &&
+        row.operateweight == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg143'),
+          duration: 2000
+        })
         return false
         return false
-      } else if (row.tmrid == '' && row.times == '' && row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg144'), duration: 2000 })
+      } else if (
+        row.tmrid == '' &&
+        row.times == '' &&
+        row.operateweight == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg144'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.times == '' && row.operateweight == '') {
       } else if (row.times == '' && row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg145'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg145'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.sort == '' || row.sort == 0) {
       } else if (row.sort == '' || row.sort == 0) {
-        this.$message({ type: 'error', message:  this.$t('message.msg146'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg146'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.ftid == '') {
       } else if (row.ftid == '') {
-        this.$message({ type: 'error',message:this.$t('message.msg18'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg18'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.tmrid == '') {
       } else if (row.tmrid == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg147'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg147'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.times == '') {
       } else if (row.times == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg148'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg148'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.operateweight == '') {
       } else if (row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg149'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg149'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
       for (let i = 0; i < this.table.list.length; i++) {
       for (let i = 0; i < this.table.list.length; i++) {
         if (row.sort !== '') {
         if (row.sort !== '') {
           if (row.sort == this.table.list[i].sort) {
           if (row.sort == this.table.list[i].sort) {
             if (row.myId !== this.table.list[i].myId) {
             if (row.myId !== this.table.list[i].myId) {
-              this.$message({ type: 'error', message:  this.$t('message.msg150'), duration: 2000 })
+              this.$message({
+                type: 'error',
+                message: this.$t('message.msg150'),
+                duration: 2000
+              })
               return false
               return false
             }
             }
           }
           }
@@ -372,7 +484,11 @@ export default {
       var isInteger = /^\d+$/
       var isInteger = /^\d+$/
       if (row.sort !== '') {
       if (row.sort !== '') {
         if (!isInteger.test(parseFloat(row.sort))) {
         if (!isInteger.test(parseFloat(row.sort))) {
-          this.$message({ type: 'error', message:  this.$t('message.msg151'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('message.msg151'),
+            duration: 2000
+          })
           return false
           return false
         }
         }
       }
       }
@@ -384,14 +500,24 @@ export default {
       row.date = this.date
       row.date = this.date
       this.requestParam.parammaps = row
       this.requestParam.parammaps = row
       this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
       this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
-      PostDataByName(this.requestParam).then(response => {
+      PostDataByName(this.requestParam).then((response) => {
         console.log('新增保存发送参数', this.requestParam)
         console.log('新增保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
         if (response.msg !== 'fail') {
-          this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+          this.$notify({
+            title: this.$t('common.succes'),
+            message: this.$t('driver.saveSuccess'),
+            type: 'success',
+            duration: 2000
+          })
           this.getList()
           this.getList()
           this.dropState = false
           this.dropState = false
         } else {
         } else {
-          this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+          this.$notify({
+            title: this.$t('driver.saveFail'),
+            message: response.data,
+            type: 'warning',
+            duration: 2000
+          })
         }
         }
       })
       })
     },
     },
@@ -413,7 +539,11 @@ export default {
     handleUpdate(row) {
     handleUpdate(row) {
       for (let i = 0; i < this.table.list.length; i++) {
       for (let i = 0; i < this.table.list.length; i++) {
         if (this.table.list[i].Edit == true) {
         if (this.table.list[i].Edit == true) {
-          this.$message({ type: 'error', message: this.$t('driver.messageNote'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('driver.messageNote'),
+            duration: 2000
+          })
           return false
           return false
         }
         }
       }
       }
@@ -439,7 +569,7 @@ export default {
         row.times = '4'
         row.times = '4'
       }
       }
       console.log(row)
       console.log(row)
-      GetDataByName(this.getCarFollowParm).then(response => {
+      GetDataByName(this.getCarFollowParm).then((response) => {
         console.log('撒料计划车次跟随列表数据', response.data.list)
         console.log('撒料计划车次跟随列表数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.carFollowList = response.data.list
           this.carFollowList = response.data.list
@@ -449,32 +579,73 @@ export default {
     },
     },
     updateData(row) {
     updateData(row) {
       console.log('点击了编辑保存', row)
       console.log('点击了编辑保存', row)
-      if (row.ftid == '' && row.tmrid == '' && row.times == '' && row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg143'), duration: 2000 })
+      if (
+        row.ftid == '' &&
+        row.tmrid == '' &&
+        row.times == '' &&
+        row.operateweight == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg143'),
+          duration: 2000
+        })
         return false
         return false
-      } else if (row.tmrid == '' && row.times == '' && row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg144'), duration: 2000 })
+      } else if (
+        row.tmrid == '' &&
+        row.times == '' &&
+        row.operateweight == ''
+      ) {
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg144'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.times == '' && row.operateweight == '') {
       } else if (row.times == '' && row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg145'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg145'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.ftid == '') {
       } else if (row.ftid == '') {
-        this.$message({ type: 'error',message:this.$t('message.msg18'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg18'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.tmrid == '') {
       } else if (row.tmrid == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg147'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg147'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.times == '') {
       } else if (row.times == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg148'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg148'),
+          duration: 2000
+        })
         return false
         return false
       } else if (row.operateweight == '') {
       } else if (row.operateweight == '') {
-        this.$message({ type: 'error', message:  this.$t('message.msg149'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg149'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
       for (let i = 0; i < this.table.list.length; i++) {
       for (let i = 0; i < this.table.list.length; i++) {
         if (row.sort == this.table.list[i].sort) {
         if (row.sort == this.table.list[i].sort) {
           if (row.id !== this.table.list[i].id) {
           if (row.id !== this.table.list[i].id) {
-            this.$message({ type: 'error', message:  this.$t('message.msg150'), duration: 2000 })
+            this.$message({
+              type: 'error',
+              message: this.$t('message.msg150'),
+              duration: 2000
+            })
             return false
             return false
           }
           }
         }
         }
@@ -482,12 +653,20 @@ export default {
       var isInteger = /^\d+$/
       var isInteger = /^\d+$/
       if (row.sort !== '') {
       if (row.sort !== '') {
         if (!isInteger.test(parseFloat(row.sort))) {
         if (!isInteger.test(parseFloat(row.sort))) {
-          this.$message({ type: 'error', message:  this.$t('message.msg151'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('message.msg151'),
+            duration: 2000
+          })
           return false
           return false
         }
         }
       }
       }
       if (row.sort == '' || row.sort == 0) {
       if (row.sort == '' || row.sort == 0) {
-        this.$message({ type: 'error', message:  this.$t('message.msg146'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg146'),
+          duration: 2000
+        })
         return false
         return false
       }
       }
       this.isokDisable = true
       this.isokDisable = true
@@ -497,14 +676,24 @@ export default {
       this.requestParam.name = 'updatePremixplandate'
       this.requestParam.name = 'updatePremixplandate'
       row.date = this.date
       row.date = this.date
       this.requestParam.parammaps = row
       this.requestParam.parammaps = row
-      PostDataByName(this.requestParam).then(response => {
+      PostDataByName(this.requestParam).then((response) => {
         console.log('新增保存发送参数', this.requestParam)
         console.log('新增保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
         if (response.msg !== 'fail') {
-          this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+          this.$notify({
+            title: this.$t('common.succes'),
+            message: this.$t('driver.saveSuccess'),
+            type: 'success',
+            duration: 2000
+          })
           this.getList()
           this.getList()
           this.dropState = false
           this.dropState = false
         } else {
         } else {
-          this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+          this.$notify({
+            title: this.$t('driver.saveFail'),
+            message: response.data,
+            type: 'warning',
+            duration: 2000
+          })
         }
         }
       })
       })
     },
     },
@@ -528,59 +717,100 @@ export default {
     // 行内删除
     // 行内删除
     handleRowDelete(row) {
     handleRowDelete(row) {
       console.log(row, '点击了行删除')
       console.log(row, '点击了行删除')
-      MessageBox.confirm( this.$t('common.delMsg'), {
-        confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
-      }).then(() => {
-        this.selectList = []
-        this.requestParam = {}
-        this.requestParam.name = 'deletePremixplandate'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps.pastureid = row.pastureid
-        this.requestParam.parammaps.id = row.id
-        this.requestParam.parammaps.date = this.date
-        PostDataByName(this.requestParam).then(response => {
-          if (response.msg === 'fail') {
-            this.$notify({ title: this.$t('common.delfail'), message: response.data, type: 'warning', duration: 2000 })
-          } else {
-            this.$notify({ title: this.$t('common.succes'),message: this.$t('common.delSuccess'), type: 'success', duration: 2000 })
-            this.getList()
-          }
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: this.$t('common.cancelMsg') })
+      MessageBox.confirm(this.$t('common.delMsg'), {
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        type: 'warning'
       })
       })
+        .then(() => {
+          this.selectList = []
+          this.requestParam = {}
+          this.requestParam.name = 'deletePremixplandate'
+          this.requestParam.parammaps = {}
+          this.requestParam.parammaps.pastureid = row.pastureid
+          this.requestParam.parammaps.id = row.id
+          this.requestParam.parammaps.date = this.date
+          PostDataByName(this.requestParam).then((response) => {
+            if (response.msg === 'fail') {
+              this.$notify({
+                title: this.$t('common.delfail'),
+                message: response.data,
+                type: 'warning',
+                duration: 2000
+              })
+            } else {
+              this.$notify({
+                title: this.$t('common.succes'),
+                message: this.$t('common.delSuccess'),
+                type: 'success',
+                duration: 2000
+              })
+              this.getList()
+            }
+          })
+        })
+        .catch(() => {
+          this.$message({ type: 'info', message: this.$t('common.cancelMsg') })
+        })
     },
     },
     // 减少车次
     // 减少车次
     form_delete() {
     form_delete() {
       if (this.selectList.length == 0) {
       if (this.selectList.length == 0) {
-        this.$message({ type: 'error',message:this.$t('message.msg12'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg12'),
+          duration: 2000
+        })
       } else {
       } else {
-        MessageBox.confirm(this.$t('message.msg29')+ this.selectList.length + this.$t('message.msg31'), {
-          confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
-        }).then(() => {
+        MessageBox.confirm(
+          this.$t('message.msg29') +
+            this.selectList.length +
+            this.$t('message.msg31'),
+          {
+            confirmButtonText: this.$t('common.confirm'),
+            cancelButtonText: this.$t('common.cancel'),
+            type: 'warning'
+          }
+        ).then(() => {
           console.log(this.selectList)
           console.log(this.selectList)
-          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.common = { returnmap: '0' }
           this.requestParam.data = []
           this.requestParam.data = []
-          this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
+          this.requestParam.data[0] = {
+            name: 'insertSpotList',
+            resultmaps: { list: this.selectList }
+          }
           this.requestParam.data[0].children = []
           this.requestParam.data[0].children = []
-          this.requestParam.data[0].children[0] = { 'name': 'deletePremixplandate', 'type': 'e', 'parammaps': {
-            id: '@insertSpotList.id',
-            pastureid: '@insertSpotList.pastureid',
-            date: this.date
-          }}
-          ExecDataByConfig(this.requestParam).then(response => {
+          this.requestParam.data[0].children[0] = {
+            name: 'deletePremixplandate',
+            type: 'e',
+            parammaps: {
+              id: '@insertSpotList.id',
+              pastureid: '@insertSpotList.pastureid',
+              date: this.date
+            }
+          }
+          ExecDataByConfig(this.requestParam).then((response) => {
             console.log('删除保存发送参数', this.requestParam)
             console.log('删除保存发送参数', this.requestParam)
             if (response.msg === 'fail') {
             if (response.msg === 'fail') {
-              this.$notify({ title: this.$t('common.delfail'), message: response.data, type: 'warning', duration: 2000 })
+              this.$notify({
+                title: this.$t('common.delfail'),
+                message: response.data,
+                type: 'warning',
+                duration: 2000
+              })
             } else {
             } else {
-              this.$notify({ title: '',message: this.$t('common.delSuccess'), type: 'success', duration: 2000 })
+              this.$notify({
+                title: '',
+                message: this.$t('common.delSuccess'),
+                type: 'success',
+                duration: 2000
+              })
               this.getList()
               this.getList()
             }
             }
           })
           })
         })
         })
       }
       }
     }
     }
-
   }
   }
 }
 }
 </script>
 </script>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 506 - 198
src/views/formulationPlan/dailyExecutionPlan/typePage/surplusMaterialPlan.vue


+ 435 - 99
src/views/formulationPlan/dhedFormula/dryMatterRegulation.vue

@@ -1,42 +1,97 @@
 <template>
 <template>
   <div v-if="visible">
   <div v-if="visible">
     <!--{{$t('message.msg87')}} -->
     <!--{{$t('message.msg87')}} -->
-    <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="visible" :close-on-click-modal="false" append-to-body :before-close="closeDialog" width="35%">
+    <el-dialog
+      :fullscreen="dialogFull"
+      :destroy-on-close="true"
+      :visible.sync="visible"
+      :close-on-click-modal="false"
+      append-to-body
+      :before-close="closeDialog"
+      width="35%"
+    >
       <template slot="title">
       <template slot="title">
         <div class="avue-crud__dialog__header">
         <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
           <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
-           {{$t('message.msg88')}}
+            <span
+              style="
+                display: inline-block;
+                width: 3px;
+                height: 20px;
+                margin-right: 5px;
+                float: left;
+                margin-top: 2px;
+              "
+            />
+            {{ $t('message.msg87') }}
           </span>
           </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+          <div
+            class="avue-crud__dialog__menu"
+            @click="dialogFull ? (dialogFull = false) : (dialogFull = true)"
+          >
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
           </div>
           </div>
         </div>
         </div>
       </template>
       </template>
-      <div style="min-height:200px;justify-content:center;align-items:center;display:flex;">
+      <div
+        style="
+          min-height: 200px;
+          justify-content: center;
+          align-items: center;
+          display: flex;
+        "
+      >
         <div>
         <div>
-          <span style="margin-right: 10px;">{{$t('message.msg89')}}</span>
+          <span style="margin-right: 10px">{{ $t('message.msg88') }}</span>
           <el-select v-model="temp.ftid" filterable class="filter-item">
           <el-select v-model="temp.ftid" filterable class="filter-item">
-            <el-option v-for="item in balconicFormulaList" :key="item.id" :label="item.tname" :value="item.id" />
+            <el-option
+              v-for="item in balconicFormulaList"
+              :key="item.id"
+              :label="item.tname"
+              :value="item.id"
+            />
           </el-select>
           </el-select>
         </div>
         </div>
       </div>
       </div>
-      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
-        <el-button class="cancelClose" @click="closeDialog()">{{$t('formulationEvaluation.cancel')}}</el-button>
-        <el-button class="save" @click="handleNextSamplingSelection()">{{$t('message.msg96')}}</el-button>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px">
+        <el-button class="cancelClose" @click="closeDialog()">{{
+          $t('formulationEvaluation.cancel')
+        }}</el-button>
+        <el-button class="save" @click="handleNextSamplingSelection()">{{
+          $t('message.msg96')
+        }}</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
 
 
     <!-- 干物质调节—采样选择 -->
     <!-- 干物质调节—采样选择 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="samplingSelection.dialogFormVisible" append-to-body :close-on-click-modal="false" :before-close="closeDialog" width="80%">
+    <el-dialog
+      :fullscreen="dialogFull"
+      :visible.sync="samplingSelection.dialogFormVisible"
+      append-to-body
+      :close-on-click-modal="false"
+      :before-close="closeDialog"
+      width="80%"
+    >
       <template slot="title">
       <template slot="title">
         <div class="avue-crud__dialog__header">
         <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
           <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            <span
+              style="
+                display: inline-block;
+                width: 3px;
+                height: 20px;
+                margin-right: 5px;
+                float: left;
+                margin-top: 2px;
+              "
+            />
             {{ textMap[samplingSelection.dialogStatus] }}
             {{ textMap[samplingSelection.dialogStatus] }}
           </span>
           </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+          <div
+            class="avue-crud__dialog__menu"
+            @click="dialogFull ? (dialogFull = false) : (dialogFull = true)"
+          >
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
           </div>
           </div>
@@ -44,18 +99,55 @@
       </template>
       </template>
       <div class="dialogMinHeight">
       <div class="dialogMinHeight">
         <div class="search filter-item">
         <div class="search filter-item">
-          <el-select v-model="samplingSelection.getdataListParm.parammaps.date" filterable :placeholder="$t('InventoryManagement.rq')"    class="filter-item" style="width: 150px;">
-            <el-option v-for="item in samplingSelection.dateList" :key="item.id" :label="item.date" :value="item.date" />
+          <el-select
+            v-model="samplingSelection.getdataListParm.parammaps.date"
+            filterable
+            :placeholder="$t('InventoryManagement.rq')"
+            class="filter-item"
+            style="width: 150px"
+          >
+            <el-option
+              v-for="item in samplingSelection.dateList"
+              :key="item.id"
+              :label="item.date"
+              :value="item.date"
+            />
           </el-select>
           </el-select>
-          <el-select v-model="samplingSelection.getdataListParm.parammaps.barid" filterable :placeholder="$t('errorAnalysis.isHouseName')"  class="filter-item" style="width: 120px;" clearable>
-            <el-option v-for="item in samplingSelection.houseNameList" :key="item.id" :label="item.bname" :value="item.id" />
+          <el-select
+            v-model="samplingSelection.getdataListParm.parammaps.barid"
+            filterable
+            :placeholder="$t('errorAnalysis.isHouseName')"
+            class="filter-item"
+            style="width: 120px"
+            clearable
+          >
+            <el-option
+              v-for="item in samplingSelection.houseNameList"
+              :key="item.id"
+              :label="item.bname"
+              :value="item.id"
+            />
           </el-select>
           </el-select>
-          <el-select v-model="samplingSelection.getdataListParm.parammaps.times" filterable :placeholder="$t('errorAnalysis.isTrainNumber')"  class="filter-item" style="width: 120px;" clearable>
-            <el-option v-for="item in samplingSelection.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
+          <el-select
+            v-model="samplingSelection.getdataListParm.parammaps.times"
+            filterable
+            :placeholder="$t('errorAnalysis.isTrainNumber')"
+            class="filter-item"
+            style="width: 120px"
+            clearable
+          >
+            <el-option
+              v-for="item in samplingSelection.frequencyList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            />
           </el-select>
           </el-select>
-          <el-button class="successBorder" @click="form_search">{{$t('common.query')}}</el-button>
+          <el-button class="successBorder" @click="form_search">{{
+            $t('common.query')
+          }}</el-button>
         </div>
         </div>
-        <div class="table" style="margin-top: 10px;">
+        <div class="table" style="margin-top: 10px">
           <el-table
           <el-table
             :key="samplingSelection.tableKey"
             :key="samplingSelection.tableKey"
             v-loading="samplingSelection.listLoading"
             v-loading="samplingSelection.listLoading"
@@ -64,41 +156,116 @@
             border
             border
             fit
             fit
             highlight-current-row
             highlight-current-row
-            style="width: 100%;"
+            style="width: 100%"
             :row-style="rowStyle"
             :row-style="rowStyle"
             :cell-style="cellStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
             class="elTable table-fixed"
             @selection-change="handleSelectionChange"
             @selection-change="handleSelectionChange"
           >
           >
             <el-table-column type="selection" align="center" width="50" />
             <el-table-column type="selection" align="center" width="50" />
-            <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
-            <el-table-column  :label="$t('errorAnalysis.isHouseName')"  prop="barname" min-width="110px" align="center" />
-            <el-table-column :label="$t('errorAnalysis.isTrainNumber')"  prop="times" min-width="110px" align="center" />
-            <el-table-column :label="$t('message.msg90')" prop="freshweight" min-width="110px" align="center" />
-            <el-table-column :label="$t('message.msg91')" prop="dryweight" min-width="110px" align="center" />
-            <el-table-column :label="$t('message.msg92')" prop="thoweight" min-width="110px" align="center" />
-            <el-table-column :label="$t('message.msg93')"  prop="actweight" min-width="110px" align="center" />
-            <el-table-column  :label="$t('performance.czr')" prop="emp" min-width="110px" align="center" />
-            <el-table-column :label="$t('message.msg94')"  prop="operatetime" min-width="110px" align="center" />
+            <el-table-column
+              :label="$t('formulationEvaluation.xh')"
+              align="center"
+              type="index"
+              width="50px"
+            />
+            <el-table-column
+              :label="$t('errorAnalysis.isHouseName')"
+              prop="barname"
+              min-width="110px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('errorAnalysis.isTrainNumber')"
+              prop="times"
+              min-width="110px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg89')"
+              prop="freshweight"
+              min-width="110px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg90')"
+              prop="dryweight"
+              min-width="110px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg91')"
+              prop="thoweight"
+              min-width="110px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg92')"
+              prop="actweight"
+              min-width="110px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('performance.czr')"
+              prop="emp"
+              min-width="110px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg93')"
+              prop="operatetime"
+              min-width="110px"
+              align="center"
+            />
           </el-table>
           </el-table>
         </div>
         </div>
       </div>
       </div>
-      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
-        <el-button class="cancelClose" @click="closeDialog();">{{$t('formulationEvaluation.cancel')}}</el-button>
-        <el-button class="save" @click="samplingSelection.dialogFormVisible=false; samplingSelection.frequencyList = []">{{$t('message.msg95')}}</el-button>
-        <el-button class="save" @click="handleNextChangeDetails()">{{$t('message.msg96')}}</el-button>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px">
+        <el-button @click="closeDialog()">{{
+          $t('formulationEvaluation.cancel')
+        }}</el-button>
+        <el-button
+          class="saves"
+          @click="
+            samplingSelection.dialogFormVisible = false
+            samplingSelection.frequencyList = []
+          "
+          >{{ $t('message.msg95') }}</el-button
+        >
+        <el-button class="saves" @click="handleNextChangeDetails()">{{
+          $t('message.msg96')
+        }}</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
 
 
     <!-- 干物质调节-变化详情 -->
     <!-- 干物质调节-变化详情 -->
-    <el-dialog :fullscreen="dialogFull" :visible.sync="changeDetails.dialogFormVisible" append-to-body :close-on-click-modal="false" :before-close="closeDialog" width="80%">
+    <el-dialog
+      :fullscreen="dialogFull"
+      :visible.sync="changeDetails.dialogFormVisible"
+      append-to-body
+      :close-on-click-modal="false"
+      :before-close="closeDialog"
+      width="80%"
+    >
       <template slot="title">
       <template slot="title">
         <div class="avue-crud__dialog__header">
         <div class="avue-crud__dialog__header">
           <span class="el-dialog__title">
           <span class="el-dialog__title">
-            <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
+            <span
+              style="
+                display: inline-block;
+                width: 3px;
+                height: 20px;
+                margin-right: 5px;
+                float: left;
+                margin-top: 2px;
+              "
+            />
             {{ textMap[changeDetails.dialogStatus] }}
             {{ textMap[changeDetails.dialogStatus] }}
           </span>
           </span>
-          <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+          <div
+            class="avue-crud__dialog__menu"
+            @click="dialogFull ? (dialogFull = false) : (dialogFull = true)"
+          >
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
             <svg-icon v-else icon-class="fullscreen" />
           </div>
           </div>
@@ -114,38 +281,106 @@
             border
             border
             fit
             fit
             highlight-current-row
             highlight-current-row
-            style="width: 100%;"
+            style="width: 100%"
             :row-style="rowStyle"
             :row-style="rowStyle"
             :cell-style="cellStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
             class="elTable table-fixed"
             :span-method="objectSpanMethod"
             :span-method="objectSpanMethod"
           >
           >
-            <el-table-column :label="$t('errorAnalysis.pen')" prop="barname" min-width="70px" align="center" class-name="small-padding fixed-width" fixed="left" />
-            <el-table-column :label="$t('errorAnalysis.isTrainNumber')"  prop="times" min-width="70px" align="center" class-name="small-padding fixed-width" fixed="left" />
-            <el-table-column :label="$t('message.msg97')"  prop="weight" min-width="70px" align="center" />
-            <el-table-column :label="$t('message.msg98')" prop="weightafter" min-width="100px" align="center" />
-            <el-table-column :label="$t('message.msg99')" prop="ftweight" min-width="70px" align="center" />
-            <el-table-column :label="$t('message.msg100')" prop="ftweightafter" min-width="90px" align="center" />
-            <el-table-column :label="$t('message.msg101')"  prop="cyweight" min-width="70px" align="center" />
-            <el-table-column :label="$t('message.msg102')" prop="cyweightafter" min-width="90px" align="center" />
-            <el-table-column :label="$t('message.msg103')" prop="totalweight" min-width="70px" align="center" />
-            <el-table-column :label="$t('message.msg104')" prop="totalweightafter" min-width="100px" align="center" />
+            <el-table-column
+              :label="$t('errorAnalysis.pen')"
+              prop="barname"
+              min-width="70px"
+              align="center"
+              class-name="small-padding fixed-width"
+              fixed="left"
+            />
+            <el-table-column
+              :label="$t('errorAnalysis.isTrainNumber')"
+              prop="times"
+              min-width="70px"
+              align="center"
+              class-name="small-padding fixed-width"
+              fixed="left"
+            />
+            <el-table-column
+              :label="$t('message.msg97')"
+              prop="weight"
+              min-width="70px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg98')"
+              prop="weightafter"
+              min-width="100px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg99')"
+              prop="ftweight"
+              min-width="70px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg100')"
+              prop="ftweightafter"
+              min-width="90px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg101')"
+              prop="cyweight"
+              min-width="70px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg102')"
+              prop="cyweightafter"
+              min-width="90px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg103')"
+              prop="totalweight"
+              min-width="70px"
+              align="center"
+            />
+            <el-table-column
+              :label="$t('message.msg104')"
+              prop="totalweightafter"
+              min-width="100px"
+              align="center"
+            />
           </el-table>
           </el-table>
         </div>
         </div>
       </div>
       </div>
-      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
-        <el-button class="cancelClose" @click="closeDialog();">{{$t('formulationEvaluation.cancel')}}</el-button>
-        <el-button class="save" @click="changeDetails.dialogFormVisible=false;samplingSelection.frequencyList = []">{{$t('message.msg95')}}</el-button>
-        <el-button class="save" @click="handleNextLast()">{{$t('message.msg96')}}</el-button>
+      <div slot="footer" class="dialog-footer" style="bottom: 10px">
+        <el-button class="cancelClose" @click="closeDialog()">{{
+          $t('formulationEvaluation.cancel')
+        }}</el-button>
+        <el-button
+          class="saves"
+          @click="
+            changeDetails.dialogFormVisible = false
+            samplingSelection.frequencyList = []
+          "
+          >{{ $t('message.msg95') }}</el-button
+        >
+        <el-button @click="handleNextLast()" class="saves">{{
+          $t('message.msg96')
+        }}</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
-
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import { GetDataByName, GetDataByNames, ExecDataByConfig } from '@/api/common'
 import { GetDataByName, GetDataByNames, ExecDataByConfig } from '@/api/common'
-import { parseTime, handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
+import {
+  parseTime,
+  handleTableSpan,
+  handleObjectSpanMethod
+} from '@/utils/index.js'
 import Cookies from 'js-cookie'
 import Cookies from 'js-cookie'
 import { MessageBox } from 'element-ui'
 import { MessageBox } from 'element-ui'
 export default {
 export default {
@@ -186,8 +421,21 @@ export default {
           parammaps: { pastureid: Cookies.get('pastureid') }
           parammaps: { pastureid: Cookies.get('pastureid') }
         },
         },
         requestParams: [
         requestParams: [
-          { name: 'getBarListEnable', offset: 0, pagecount: 0, parammaps: { 'pastureid': Cookies.get('pastureid') }},
-          { name: 'getSysoptEnable', offset: 0, pagecount: 0, parammaps: { 'pastureid': Cookies.get('pastureid'), 'inforname': 'times' }}
+          {
+            name: 'getBarListEnable',
+            offset: 0,
+            pagecount: 0,
+            parammaps: { pastureid: Cookies.get('pastureid') }
+          },
+          {
+            name: 'getSysoptEnable',
+            offset: 0,
+            pagecount: 0,
+            parammaps: {
+              pastureid: Cookies.get('pastureid'),
+              inforname: 'times'
+            }
+          }
         ],
         ],
         houseNameList: [], // 栏舍名称
         houseNameList: [], // 栏舍名称
         frequencyList: [], // 班次
         frequencyList: [], // 班次
@@ -231,12 +479,20 @@ export default {
         total: 0,
         total: 0,
         listLoading: true,
         listLoading: true,
         spanObj: {},
         spanObj: {},
-        mergekeys: ['barname', 'ftweight', 'ftweightafter', 'cyweight', 'cyweightafter', 'totalweight', 'totalweightafter']
+        mergekeys: [
+          'barname',
+          'ftweight',
+          'ftweightafter',
+          'cyweight',
+          'cyweightafter',
+          'totalweight',
+          'totalweightafter'
+        ]
       },
       },
 
 
       textMap: {
       textMap: {
         samplingSelection: this.$t('message.msg105'),
         samplingSelection: this.$t('message.msg105'),
-        changeDetails: this.$t('message.msg106'), 
+        changeDetails: this.$t('message.msg106')
       },
       },
       selectionList: [],
       selectionList: [],
       isokDisable: false,
       isokDisable: false,
@@ -254,15 +510,13 @@ export default {
       }
       }
     }
     }
   },
   },
-  created() {
-
-  },
+  created() {},
   methods: {
   methods: {
     restTemp() {
     restTemp() {
       this.temp.ftid = ''
       this.temp.ftid = ''
     },
     },
     getBalconicFormula() {
     getBalconicFormula() {
-      GetDataByName(this.balconicFormulaListParm).then(response => {
+      GetDataByName(this.balconicFormulaListParm).then((response) => {
         console.log('栏舍配方数据', response.data.list)
         console.log('栏舍配方数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.balconicFormulaList = response.data.list
           this.balconicFormulaList = response.data.list
@@ -286,17 +540,38 @@ export default {
         this.getSamplingDateList()
         this.getSamplingDateList()
         this.getSamplingSelectionDownList()
         this.getSamplingSelectionDownList()
       } else {
       } else {
-        this.$message({ type: 'error', message: this.$t('message.msg107'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg107'),
+          duration: 2000
+        })
       }
       }
     },
     },
     getSamplingSelectionDownList() {
     getSamplingSelectionDownList() {
-      GetDataByNames(this.samplingSelection.requestParams).then(response => {
-        this.samplingSelection.houseNameList = response.data.getBarListEnable.list
+      GetDataByNames(this.samplingSelection.requestParams).then((response) => {
+        this.samplingSelection.houseNameList =
+          response.data.getBarListEnable.list
         if (response.data.getSysoptEnable.list !== null) {
         if (response.data.getSysoptEnable.list !== null) {
-          for (let i = 1; i <= response.data.getSysoptEnable.list[0].inforvalue; i++) {
+          for (
+            let i = 1;
+            i <= response.data.getSysoptEnable.list[0].inforvalue;
+            i++
+          ) {
             const obj = {}
             const obj = {}
             obj.id = String(i)
             obj.id = String(i)
-            if (i == 1) { obj.name = '第一班' } else if (i == 2) { obj.name = '第二班' } else if (i == 3) { obj.name = '第三班' } else if (i == 4) { obj.name = '第四班' }else if (i == 5) { obj.name = '第五班' }else if (i == 6) { obj.name = '第六班' }
+            if (i == 1) {
+              obj.name = '第一班'
+            } else if (i == 2) {
+              obj.name = '第二班'
+            } else if (i == 3) {
+              obj.name = '第三班'
+            } else if (i == 4) {
+              obj.name = '第四班'
+            } else if (i == 5) {
+              obj.name = '第五班'
+            } else if (i == 6) {
+              obj.name = '第六班'
+            }
             this.samplingSelection.frequencyList.push(obj)
             this.samplingSelection.frequencyList.push(obj)
           }
           }
         } else {
         } else {
@@ -306,10 +581,11 @@ export default {
     },
     },
     getSamplingDateList() {
     getSamplingDateList() {
       this.samplingSelection.getdateListParm.parammaps.ftid = this.temp.ftid
       this.samplingSelection.getdateListParm.parammaps.ftid = this.temp.ftid
-      GetDataByName(this.samplingSelection.getdateListParm).then(response => {
+      GetDataByName(this.samplingSelection.getdateListParm).then((response) => {
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.samplingSelection.dateList = response.data.list
           this.samplingSelection.dateList = response.data.list
-          this.samplingSelection.getdataListParm.parammaps.date = response.data.list[0].date
+          this.samplingSelection.getdataListParm.parammaps.date =
+            response.data.list[0].date
         } else {
         } else {
           this.samplingSelection.dateList = []
           this.samplingSelection.dateList = []
           this.samplingSelection.getdataListParm.parammaps.date = ''
           this.samplingSelection.getdataListParm.parammaps.date = ''
@@ -326,7 +602,7 @@ export default {
     getListSamplingSelection() {
     getListSamplingSelection() {
       this.samplingSelection.listLoading = true
       this.samplingSelection.listLoading = true
       this.samplingSelection.getdataListParm.parammaps.ftid = this.temp.ftid
       this.samplingSelection.getdataListParm.parammaps.ftid = this.temp.ftid
-      GetDataByName(this.samplingSelection.getdataListParm).then(response => {
+      GetDataByName(this.samplingSelection.getdataListParm).then((response) => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.samplingSelection.list = response.data.list
           this.samplingSelection.list = response.data.list
@@ -349,9 +625,17 @@ export default {
         this.getListChangeDetails()
         this.getListChangeDetails()
       } else {
       } else {
         if (this.selectionList.length == 0) {
         if (this.selectionList.length == 0) {
-          this.$message({ type: 'error', message: this.$t('message.msg108'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('message.msg108'),
+            duration: 2000
+          })
         } else {
         } else {
-          this.$message({ type: 'error', message: this.$t('message.msg109'), duration: 2000 })
+          this.$message({
+            type: 'error',
+            message: this.$t('message.msg109'),
+            duration: 2000
+          })
         }
         }
       }
       }
     },
     },
@@ -359,10 +643,12 @@ export default {
     getListChangeDetails() {
     getListChangeDetails() {
       this.changeDetails.listLoading = true
       this.changeDetails.listLoading = true
       this.changeDetails.getdataListParm.parammaps.ftid = this.temp.ftid
       this.changeDetails.getdataListParm.parammaps.ftid = this.temp.ftid
-      this.changeDetails.getdataListParm.parammaps.actweight = this.selectionList[0].actweight
-      this.changeDetails.getdataListParm.parammaps.thoweight = this.selectionList[0].thoweight
+      this.changeDetails.getdataListParm.parammaps.actweight =
+        this.selectionList[0].actweight
+      this.changeDetails.getdataListParm.parammaps.thoweight =
+        this.selectionList[0].thoweight
       console.log(this.changeDetails.getdataListParm.parammaps)
       console.log(this.changeDetails.getdataListParm.parammaps)
-      GetDataByName(this.changeDetails.getdataListParm).then(response => {
+      GetDataByName(this.changeDetails.getdataListParm).then((response) => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.changeDetails.list = response.data.list
           this.changeDetails.list = response.data.list
@@ -379,7 +665,7 @@ export default {
       })
       })
     },
     },
     handleSpan() {
     handleSpan() {
-      this.changeDetails.mergekeys.forEach(key => {
+      this.changeDetails.mergekeys.forEach((key) => {
         this.changeDetails.spanObj[key] = []
         this.changeDetails.spanObj[key] = []
         let position = 0
         let position = 0
         this.changeDetails.list.forEach((item, index) => {
         this.changeDetails.list.forEach((item, index) => {
@@ -387,8 +673,20 @@ export default {
             this.changeDetails.spanObj[key].push(1)
             this.changeDetails.spanObj[key].push(1)
             position = 0
             position = 0
           } else {
           } else {
-            if (key == 'ftweight' || key == 'ftweightafter' || key == 'cyweight' || key == 'cyweightafter' || key == 'totalweight' || key == 'totalweightafter') {
-              if (this.changeDetails.list[index][key] === this.changeDetails.list[index - 1][key] && this.changeDetails.list[index]['barname'] === this.changeDetails.list[index - 1]['barname']) {
+            if (
+              key == 'ftweight' ||
+              key == 'ftweightafter' ||
+              key == 'cyweight' ||
+              key == 'cyweightafter' ||
+              key == 'totalweight' ||
+              key == 'totalweightafter'
+            ) {
+              if (
+                this.changeDetails.list[index][key] ===
+                  this.changeDetails.list[index - 1][key] &&
+                this.changeDetails.list[index]['barname'] ===
+                  this.changeDetails.list[index - 1]['barname']
+              ) {
                 this.changeDetails.spanObj[key][position] += 1
                 this.changeDetails.spanObj[key][position] += 1
                 this.changeDetails.spanObj[key].push(0)
                 this.changeDetails.spanObj[key].push(0)
               } else {
               } else {
@@ -396,7 +694,10 @@ export default {
                 position = index
                 position = index
               }
               }
             } else {
             } else {
-              if (this.changeDetails.list[index][key] === this.changeDetails.list[index - 1][key]) {
+              if (
+                this.changeDetails.list[index][key] ===
+                this.changeDetails.list[index - 1][key]
+              ) {
                 this.changeDetails.spanObj[key][position] += 1
                 this.changeDetails.spanObj[key][position] += 1
                 this.changeDetails.spanObj[key].push(0)
                 this.changeDetails.spanObj[key].push(0)
               } else {
               } else {
@@ -411,7 +712,10 @@ export default {
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       for (let i = 0; i < this.changeDetails.mergekeys.length; i++) {
       for (let i = 0; i < this.changeDetails.mergekeys.length; i++) {
         if (column.property === this.changeDetails.mergekeys[i]) {
         if (column.property === this.changeDetails.mergekeys[i]) {
-          const _row = this.changeDetails.spanObj[this.changeDetails.mergekeys[i]][rowIndex]
+          const _row =
+            this.changeDetails.spanObj[this.changeDetails.mergekeys[i]][
+              rowIndex
+            ]
           const _col = _row > 0 ? 1 : 0
           const _col = _row > 0 ? 1 : 0
           return {
           return {
             rowspan: _row,
             rowspan: _row,
@@ -422,7 +726,9 @@ export default {
     },
     },
     handleNextLast() {
     handleNextLast() {
       MessageBox.confirm(this.$t('message.msg110'), this.$t('message.msg111'), {
       MessageBox.confirm(this.$t('message.msg110'), this.$t('message.msg111'), {
-        confirmButtonText: this.$t('common.confirm'), cancelButtonText: this.$t('common.cancel'), type: 'warning'
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        type: 'warning'
         // beforeClose: (action, instance, done) => {
         // beforeClose: (action, instance, done) => {
         //   console.log(action, instance, done)
         //   console.log(action, instance, done)
         //   this.closeDialog()
         //   this.closeDialog()
@@ -432,7 +738,9 @@ export default {
         var duplicateRemovalList = []
         var duplicateRemovalList = []
         for (let i = 0; i < this.changeDetails.list.length; i++) {
         for (let i = 0; i < this.changeDetails.list.length; i++) {
           for (var j = i + 1; j < this.changeDetails.list.length; j++) {
           for (var j = i + 1; j < this.changeDetails.list.length; j++) {
-            if (this.changeDetails.list[i].id == this.changeDetails.list[j].id) {
+            if (
+              this.changeDetails.list[i].id == this.changeDetails.list[j].id
+            ) {
               ++i
               ++i
             }
             }
           }
           }
@@ -440,26 +748,47 @@ export default {
         }
         }
         console.log(duplicateRemovalList, '=duplicateRemovalList')
         console.log(duplicateRemovalList, '=duplicateRemovalList')
         this.requestParam = {}
         this.requestParam = {}
-        this.requestParam.common = { 'returnmap': '0' }
+        this.requestParam.common = { returnmap: '0' }
         this.requestParam.data = []
         this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'saveFPFTdryChange', 'type': 'e', 'parammaps': {
-          pastureid: Cookies.get('pastureid'),
-          ftid: this.temp.ftid,
-          actweight: this.selectionList[0].actweight,
-          thoweight: this.selectionList[0].thoweight
-        }}
-        this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': duplicateRemovalList }}
+        this.requestParam.data[0] = {
+          name: 'saveFPFTdryChange',
+          type: 'e',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            ftid: this.temp.ftid,
+            actweight: this.selectionList[0].actweight,
+            thoweight: this.selectionList[0].thoweight
+          }
+        }
+        this.requestParam.data[1] = {
+          name: 'insertSpotList',
+          resultmaps: { list: duplicateRemovalList }
+        }
         this.requestParam.data[1].children = []
         this.requestParam.data[1].children = []
-        this.requestParam.data[1].children[0] = { 'name': 'updateLPPbyFPChange', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList.pastureid',
-          fpid: '@insertSpotList.id'
-        }}
-        ExecDataByConfig(this.requestParam).then(response => {
+        this.requestParam.data[1].children[0] = {
+          name: 'updateLPPbyFPChange',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList.pastureid',
+            fpid: '@insertSpotList.id'
+          }
+        }
+        ExecDataByConfig(this.requestParam).then((response) => {
           console.log('新生成保存发送参数', this.requestParam)
           console.log('新生成保存发送参数', this.requestParam)
           if (response.msg === 'fail') {
           if (response.msg === 'fail') {
-            this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+            this.$notify({
+              title: this.$t('driver.saveFail'),
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
           } else {
           } else {
-            this.$notify({ title: '', message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+            this.$notify({
+              title: '',
+              message: this.$t('driver.saveSuccess'),
+              type: 'success',
+              duration: 2000
+            })
             this.closeDialog()
             this.closeDialog()
             this.$emit('getIsDisplay')
             this.$emit('getIsDisplay')
           }
           }
@@ -471,5 +800,12 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-
+.el-button {
+  padding: 12px 16px;
+}
+.saves {
+  background: #009a69;
+  border-color: #009a69;
+  color: #fff;
+}
 </style>
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 981 - 146
src/views/formulationPlan/dhedFormula/index.vue


+ 191 - 85
src/views/formulationPlan/formulaDistribution/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
     <div class="operation">
     <div class="operation">
-      <el-button class="successBorder" @click="handleFormulaDistribution">{{$t('message.mag70')}}</el-button>
+      <el-button class="successBorder" @click="handleFormulaDistribution">{{$t('message.msg70')}}</el-button>
     </div>
     </div>
     <div class="search">
     <div class="search">
       <el-input v-model="table.getdataListParm.parammaps.fname" :placeholder="$t('formulationEvaluation.pfmc')" style="width: 180px;" class="filter-item" clearable />
       <el-input v-model="table.getdataListParm.parammaps.fname" :placeholder="$t('formulationEvaluation.pfmc')" style="width: 180px;" class="filter-item" clearable />
@@ -201,7 +201,12 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { GetDataByName, GetDataByNames, postJson, ExecDataByConfig } from '@/api/common'
+import {
+  GetDataByName,
+  GetDataByNames,
+  postJson,
+  ExecDataByConfig
+} from '@/api/common'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import { parseTime } from '@/utils/index.js'
 import { parseTime } from '@/utils/index.js'
 import Cookies from 'js-cookie'
 import Cookies from 'js-cookie'
@@ -214,8 +219,18 @@ export default {
       formulaTypeList: [],
       formulaTypeList: [],
       livestockList: [],
       livestockList: [],
       requestParams: [
       requestParams: [
-        { name: 'getDictByName2', offset: 0, pagecount: 0, params: ['配方类型'] },
-        { name: 'getCowclassListEnable', offset: 0, pagecount: 0, parammaps: { 'pastureid': Cookies.get('pastureid') }}
+        {
+          name: 'getDictByName2',
+          offset: 0,
+          pagecount: 0,
+          params: ['配方类型']
+        },
+        {
+          name: 'getCowclassListEnable',
+          offset: 0,
+          pagecount: 0,
+          parammaps: { pastureid: Cookies.get('pastureid') }
+        }
       ],
       ],
       table: {
       table: {
         getdataListParm: {
         getdataListParm: {
@@ -360,7 +375,7 @@ export default {
 
 
   methods: {
   methods: {
     getDownList() {
     getDownList() {
-      GetDataByNames(this.requestParams).then(response => {
+      GetDataByNames(this.requestParams).then((response) => {
         this.livestockList = response.data.getCowclassListEnable.list
         this.livestockList = response.data.getCowclassListEnable.list
         this.formulaTypeList = response.data.getDictByName2.list
         this.formulaTypeList = response.data.getDictByName2.list
         console.log(this.formulaTypeList)
         console.log(this.formulaTypeList)
@@ -368,7 +383,7 @@ export default {
     },
     },
     getList() {
     getList() {
       this.table.listLoading = true
       this.table.listLoading = true
-      GetDataByName(this.table.getdataListParm).then(response => {
+      GetDataByName(this.table.getdataListParm).then((response) => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.table.list = response.data.list
           this.table.list = response.data.list
@@ -405,26 +420,36 @@ export default {
     },
     },
     getFormulaDistributionList() {
     getFormulaDistributionList() {
       this.formulaDistribution.table.listLoading = true
       this.formulaDistribution.table.listLoading = true
-      GetDataByName(this.formulaDistribution.table.getdataListParm).then(response => {
-        console.log('table数据', response.data.list)
-        if (response.data.list !== null) {
-          this.formulaDistribution.table.list = response.data.list
-        } else {
-          this.formulaDistribution.table.list = []
+      GetDataByName(this.formulaDistribution.table.getdataListParm).then(
+        (response) => {
+          console.log('table数据', response.data.list)
+          if (response.data.list !== null) {
+            this.formulaDistribution.table.list = response.data.list
+          } else {
+            this.formulaDistribution.table.list = []
+          }
+          setTimeout(() => {
+            this.formulaDistribution.table.listLoading = false
+          }, 100)
         }
         }
-        setTimeout(() => {
-          this.formulaDistribution.table.listLoading = false
-        }, 100)
-      })
+      )
     },
     },
     nextData() {
     nextData() {
       if (this.formulaDistribution.selectList.length == 0) {
       if (this.formulaDistribution.selectList.length == 0) {
-        this.$message({ type: 'error', message: this.$t('message.msg67'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.msg67'),
+          duration: 2000
+        })
         return false
         return false
       } else {
       } else {
         for (let i = 0; i < this.formulaDistribution.selectList.length; i++) {
         for (let i = 0; i < this.formulaDistribution.selectList.length; i++) {
           if (this.formulaDistribution.selectList[i].enable == 0) {
           if (this.formulaDistribution.selectList[i].enable == 0) {
-            this.$message({ type: 'error', message: this.$t('message.msg68'), duration: 2000 })
+            this.$message({
+              type: 'error',
+              message: this.$t('message.msg68'),
+              duration: 2000
+            })
             return false
             return false
           }
           }
         }
         }
@@ -434,83 +459,146 @@ export default {
       }
       }
     },
     },
     getPastureList() {
     getPastureList() {
-      GetDataByName(this.formulaDistribution.pasture.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.formulaDistribution.pasture.list = response.data.list
-        } else {
-          this.formulaDistribution.pasture.list = []
+      GetDataByName(this.formulaDistribution.pasture.getdataListParm).then(
+        (response) => {
+          if (response.data.list !== null) {
+            this.formulaDistribution.pasture.list = response.data.list
+          } else {
+            this.formulaDistribution.pasture.list = []
+          }
         }
         }
-      })
+      )
     },
     },
     handleCheckAllChange(val) {
     handleCheckAllChange(val) {
-      this.formulaDistribution.pasture.checkedList = val ? this.formulaDistribution.pasture.list : []
+      this.formulaDistribution.pasture.checkedList = val
+        ? this.formulaDistribution.pasture.list
+        : []
       this.formulaDistribution.pasture.isIndeterminate = false
       this.formulaDistribution.pasture.isIndeterminate = false
     },
     },
     handlePastureChange(value) {
     handlePastureChange(value) {
       const checkedCount = value.length
       const checkedCount = value.length
-      this.formulaDistribution.pasture.checkAll = checkedCount === this.formulaDistribution.pasture.list.length
-      this.formulaDistribution.pasture.isIndeterminate = checkedCount > 0 && checkedCount < this.formulaDistribution.pasture.list.length
+      this.formulaDistribution.pasture.checkAll =
+        checkedCount === this.formulaDistribution.pasture.list.length
+      this.formulaDistribution.pasture.isIndeterminate =
+        checkedCount > 0 &&
+        checkedCount < this.formulaDistribution.pasture.list.length
     },
     },
     formulaDistributionData() {
     formulaDistributionData() {
       if (this.formulaDistribution.pasture.checkedList.length == 0) {
       if (this.formulaDistribution.pasture.checkedList.length == 0) {
-        this.$message({ type: 'error', message: this.$t('message.mag69'), duration: 2000 })
+        this.$message({
+          type: 'error',
+          message: this.$t('message.mag69'),
+          duration: 2000
+        })
         return false
         return false
       } else {
       } else {
         this.isokDisable = true
         this.isokDisable = true
         setTimeout(() => {
         setTimeout(() => {
           this.isokDisable = false
           this.isokDisable = false
         }, 1000)
         }, 1000)
-        this.requestParam.common = { 'returnmap': '0' }
+        this.requestParam.common = { returnmap: '0' }
         this.requestParam.data = []
         this.requestParam.data = []
-        this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.formulaDistribution.selectList }}
+        this.requestParam.data[0] = {
+          name: 'insertSpotList',
+          resultmaps: { list: this.formulaDistribution.selectList }
+        }
         this.requestParam.data[0].children = []
         this.requestParam.data[0].children = []
-        this.requestParam.data[0].children[0] = { 'name': 'insertfeedtemplet_issue', 'type': 'e', 'parammaps': {
-          pastureid: Cookies.get('pastureid'),
-          ftid: '@insertSpotList.id'
-        }}
-        this.requestParam.data[0].children[1] = { 'name': 'insertftdetail_issue', 'type': 'e', 'parammaps': {
-          pastureid: Cookies.get('pastureid'),
-          ftid: '@insertSpotList.id'
-        }}
-        this.requestParam.data[1] = { 'name': 'insertSpotList2', 'resultmaps': { 'list': this.formulaDistribution.pasture.checkedList }}
+        this.requestParam.data[0].children[0] = {
+          name: 'insertfeedtemplet_issue',
+          type: 'e',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            ftid: '@insertSpotList.id'
+          }
+        }
+        this.requestParam.data[0].children[1] = {
+          name: 'insertftdetail_issue',
+          type: 'e',
+          parammaps: {
+            pastureid: Cookies.get('pastureid'),
+            ftid: '@insertSpotList.id'
+          }
+        }
+        this.requestParam.data[1] = {
+          name: 'insertSpotList2',
+          resultmaps: { list: this.formulaDistribution.pasture.checkedList }
+        }
         this.requestParam.data[1].children = []
         this.requestParam.data[1].children = []
-        this.requestParam.data[1].children[0] = { 'name': 'deleteFTissue', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList2.id',
-          groupsid: Cookies.get('pastureid')
-        }}
-        this.requestParam.data[1].children[1] = { 'name': 'insertfeedtempletISS', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList2.id',
-          groupsid: Cookies.get('pastureid')
-        }}
-        this.requestParam.data[1].children[2] = { 'name': 'insertftdetailISS', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList2.id',
-          groupsid: Cookies.get('pastureid')
-        }}
-        this.requestParam.data[1].children[3] = { 'name': 'insertfeedtemplet_pastureISS', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList2.id',
-          pasturename: '@insertSpotList2.pasturename',
-          groupsid: Cookies.get('pastureid')
-        }}
-        this.requestParam.data[1].children[4] = { 'name': 'deleteFeedissue', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList2.id',
-          groupsid: Cookies.get('pastureid')
-        }}
+        this.requestParam.data[1].children[0] = {
+          name: 'deleteFTissue',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList2.id',
+            groupsid: Cookies.get('pastureid')
+          }
+        }
+        this.requestParam.data[1].children[1] = {
+          name: 'insertfeedtempletISS',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList2.id',
+            groupsid: Cookies.get('pastureid')
+          }
+        }
+        this.requestParam.data[1].children[2] = {
+          name: 'insertftdetailISS',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList2.id',
+            groupsid: Cookies.get('pastureid')
+          }
+        }
+        this.requestParam.data[1].children[3] = {
+          name: 'insertfeedtemplet_pastureISS',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList2.id',
+            pasturename: '@insertSpotList2.pasturename',
+            groupsid: Cookies.get('pastureid')
+          }
+        }
+        this.requestParam.data[1].children[4] = {
+          name: 'deleteFeedissue',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList2.id',
+            groupsid: Cookies.get('pastureid')
+          }
+        }
 
 
-        this.requestParam.data[1].children[5] = { 'name': 'insertFeedissue', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList2.id',
-          groupsid: Cookies.get('pastureid')
-        }}
-        this.requestParam.data[1].children[6] = { 'name': 'insertFeednurissue', 'type': 'e', 'parammaps': {
-          pastureid: '@insertSpotList2.id',
-          groupsid: Cookies.get('pastureid')
-        }}
-        let url = "authdata/formulaissued"
-        postJson(url,this.requestParam).then(response => {
+        this.requestParam.data[1].children[5] = {
+          name: 'insertFeedissue',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList2.id',
+            groupsid: Cookies.get('pastureid')
+          }
+        }
+        this.requestParam.data[1].children[6] = {
+          name: 'insertFeednurissue',
+          type: 'e',
+          parammaps: {
+            pastureid: '@insertSpotList2.id',
+            groupsid: Cookies.get('pastureid')
+          }
+        }
+        let url = 'authdata/formulaissued'
+        postJson(url, this.requestParam).then((response) => {
           console.log('配方下发保存发送参数', this.requestParam)
           console.log('配方下发保存发送参数', this.requestParam)
           if (response.msg === 'fail') {
           if (response.msg === 'fail') {
-            this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
+            this.$notify({
+              title: this.$t('driver.saveFail'),
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
           } else {
           } else {
-            this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
+            this.$notify({
+              title: this.$t('common.succes'),
+              message: this.$t('driver.saveSuccess'),
+              type: 'success',
+              duration: 2000
+            })
             this.formulaDistribution.dialogFormVisible = false
             this.formulaDistribution.dialogFormVisible = false
             this.formulaDistribution.pasture.dialogFormVisible = false
             this.formulaDistribution.pasture.dialogFormVisible = false
             this.getList()
             this.getList()
@@ -535,8 +623,9 @@ export default {
     getSeeTab1List() {
     getSeeTab1List() {
       this.see.tab1.table.listLoading = true
       this.see.tab1.table.listLoading = true
       this.see.tab1.table.getdataListParm.parammaps.ftid = this.see.temp.id
       this.see.tab1.table.getdataListParm.parammaps.ftid = this.see.temp.id
-      this.see.tab1.table.getdataListParm.parammaps.pastureid = this.see.temp.pastureid
-      GetDataByName(this.see.tab1.table.getdataListParm).then(response => {
+      this.see.tab1.table.getdataListParm.parammaps.pastureid =
+        this.see.temp.pastureid
+      GetDataByName(this.see.tab1.table.getdataListParm).then((response) => {
         console.log('下发记录数据', response.data.list)
         console.log('下发记录数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.see.tab1.table.list = response.data.list
           this.see.tab1.table.list = response.data.list
@@ -559,7 +648,7 @@ export default {
       this.see.tab2.table.getdataListParm.parammaps.ftid = this.see.temp.id
       this.see.tab2.table.getdataListParm.parammaps.ftid = this.see.temp.id
       const url = 'authdata/GetArrList'
       const url = 'authdata/GetArrList'
       const data = this.see.tab2.table.getdataListParm
       const data = this.see.tab2.table.getdataListParm
-      postJson(url, data).then(response => {
+      postJson(url, data).then((response) => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           for (let i = 0; i < response.data.list.length; i++) {
           for (let i = 0; i < response.data.list.length; i++) {
@@ -569,12 +658,23 @@ export default {
             } else {
             } else {
               if (response.data.list[i].arrList.length > 0) {
               if (response.data.list[i].arrList.length > 0) {
                 for (let j = 0; j < response.data.list[i].arrList.length; j++) {
                 for (let j = 0; j < response.data.list[i].arrList.length; j++) {
-                  if (response.data.list[i].arrList[j].nowweight == response.data.list[i].arrList[j].fweight) {
+                  if (
+                    response.data.list[i].arrList[j].nowweight ==
+                    response.data.list[i].arrList[j].fweight
+                  ) {
                     this.$set(response.data.list[i].arrList[j], 'color', '#333')
                     this.$set(response.data.list[i].arrList[j], 'color', '#333')
                   } else if (response.data.list[i].arrList[j].nowweight == -1) {
                   } else if (response.data.list[i].arrList[j].nowweight == -1) {
                     console.log(response.data.list[i].arrList[j])
                     console.log(response.data.list[i].arrList[j])
-                    this.$set(response.data.list[i].arrList[j], 'color', 'orange')
-                  } else if (response.data.list[i].arrList[j].nowweight !== response.data.list[i].arrList[j].fweight && parseFloat(response.data.list[i].arrList[j].nowweight) > 0) {
+                    this.$set(
+                      response.data.list[i].arrList[j],
+                      'color',
+                      'orange'
+                    )
+                  } else if (
+                    response.data.list[i].arrList[j].nowweight !==
+                      response.data.list[i].arrList[j].fweight &&
+                    parseFloat(response.data.list[i].arrList[j].nowweight) > 0
+                  ) {
                     this.$set(response.data.list[i].arrList[j], 'color', 'red')
                     this.$set(response.data.list[i].arrList[j], 'color', 'red')
                   }
                   }
                 }
                 }
@@ -595,14 +695,15 @@ export default {
     },
     },
     form_seeTab2Search() {
     form_seeTab2Search() {
       if (this.see.tab2.table.getdataListParm.parammaps.date == '') {
       if (this.see.tab2.table.getdataListParm.parammaps.date == '') {
-        this.see.tab2.table.getdataListParm.parammaps.date = this.see.tab2.date.list[0].date
+        this.see.tab2.table.getdataListParm.parammaps.date =
+          this.see.tab2.date.list[0].date
       }
       }
       this.see.tab2.table.list = []
       this.see.tab2.table.list = []
       this.getSeeTab2List()
       this.getSeeTab2List()
     },
     },
     getSeeTab2DateList() {
     getSeeTab2DateList() {
       this.see.tab2.date.getdataListParm.parammaps.ftid = this.see.temp.id
       this.see.tab2.date.getdataListParm.parammaps.ftid = this.see.temp.id
-      GetDataByName(this.see.tab2.date.getdataListParm).then(response => {
+      GetDataByName(this.see.tab2.date.getdataListParm).then((response) => {
         console.log('table数据', response.data.list)
         console.log('table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.see.tab2.date.list = response.data.list
           this.see.tab2.date.list = response.data.list
@@ -614,7 +715,7 @@ export default {
 
 
     dateSearch(queryString, cb) {
     dateSearch(queryString, cb) {
       this.see.tab2.date.getdataListParm.parammaps['date'] = queryString
       this.see.tab2.date.getdataListParm.parammaps['date'] = queryString
-      GetDataByName(this.see.tab2.date.getdataListParm).then(response => {
+      GetDataByName(this.see.tab2.date.getdataListParm).then((response) => {
         console.log('模糊查询搜索data', response.data.list)
         console.log('模糊查询搜索data', response.data.list)
         if (response.data.list == null) {
         if (response.data.list == null) {
           cb([])
           cb([])
@@ -630,7 +731,8 @@ export default {
       if (this.see.activeName == 'first') {
       if (this.see.activeName == 'first') {
         this.getSeeTab1List()
         this.getSeeTab1List()
       } else {
       } else {
-        this.see.tab2.table.getdataListParm.parammaps.date = this.see.tab2.date.list[0].date
+        this.see.tab2.table.getdataListParm.parammaps.date =
+          this.see.tab2.date.list[0].date
         this.getSeeTab2List()
         this.getSeeTab2List()
       }
       }
     },
     },
@@ -640,11 +742,15 @@ export default {
       this.see.tab2.table.getdataListParm.parammaps.date = row.date
       this.see.tab2.table.getdataListParm.parammaps.date = row.date
       this.getSeeTab2List()
       this.getSeeTab2List()
     }
     }
-
   }
   }
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-  .search { clear: both;margin-top:10px; }
-  .table { margin-top: 10px; }
+.search {
+  clear: both;
+  margin-top: 10px;
+}
+.table {
+  margin-top: 10px;
+}
 </style>
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 690 - 134
src/views/formulationPlan/materialIssuancePlan/index.vue


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 623 - 118
src/views/formulationPlan/premixedPlan/index.vue


+ 4 - 4
src/views/formulationPlan/recipeTemplate/index.vue

@@ -1920,10 +1920,10 @@ export default {
           } else {
           } else {
             this.download.list = []
             this.download.list = []
           }
           }
-          const table = this.$refs.table1;
-          const columns = table.columns;
-          const labels = columns.map(column => column.label);
-           console.log(table,labels);
+          // const table = this.$refs.table1;
+          // const columns = table.columns;
+          // const labels = columns.map(column => column.label);
+          //  console.log(table,labels);
           var excelDatas = [
           var excelDatas = [
             {
             {
               tHeader:this.$t('formulationEvaluation.tHeader') ,
               tHeader:this.$t('formulationEvaluation.tHeader') ,

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2050 - 1671
src/views/formulationPlan/surplusMaterialPlan/index.vue


+ 23 - 23
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -83,7 +83,7 @@
             :cell-style="cellStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
             class="elTable table-fixed"
             :max-height="myHeight2"
             :max-height="myHeight2"
-            empty-text="No more data"
+            empty-text="No  Data"
           >
           >
 
 
             <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
             <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
@@ -150,11 +150,11 @@
               :cell-style="cellStyle"
               :cell-style="cellStyle"
               class="elTable table-fixed"
               class="elTable table-fixed"
               :max-height="myHeight2"
               :max-height="myHeight2"
-              empty-text="No more data"
+              empty-text="No  Data"
             >
             >
                 <!-- <u-table-column >
                 <!-- <u-table-column >
                  <template slot="empty">
                  <template slot="empty">
-                  <span style="color: #969799;">No more data</span>
+                  <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
                 </u-table-column> -->
                 </u-table-column> -->
               <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
               <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
@@ -284,10 +284,10 @@
                     :row-style="rowStyle"
                     :row-style="rowStyle"
                     :cell-style="cellStyle"
                     :cell-style="cellStyle"
                     class="elTable table-fixed"
                     class="elTable table-fixed"
-                    empty-text="No more data"
+                    empty-text="No  Data"
                   >
                   >
                   <!-- <template slot="empty">
                   <!-- <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template> -->
                 </template> -->
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="85px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="85px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.jhzxzl')" sortable min-width="80px" align="center" prop="实际量" />
                     <el-table-column :label="$t('errorAnalysis.jhzxzl')" sortable min-width="80px" align="center" prop="实际量" />
@@ -354,7 +354,7 @@
                     class="elTable table-fixed"
                     class="elTable table-fixed"
                   >
                   >
                   <template slot="empty">
                   <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
                     <el-table-column  :label="$t('errorAnalysis.feedName')"  sortable min-width="90px" align="center" prop="名称" />
                     <el-table-column  :label="$t('errorAnalysis.feedName')"  sortable min-width="90px" align="center" prop="名称" />
@@ -417,10 +417,10 @@
                     :row-style="rowStyle"
                     :row-style="rowStyle"
                     :cell-style="cellStyle"
                     :cell-style="cellStyle"
                     class="elTable table-fixed"
                     class="elTable table-fixed"
-                    empty-text="No more data"
+                    empty-text="No  Data"
                   >
                   >
                   <!-- <template slot="empty">
                   <!-- <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template> -->
                 </template> -->
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.sxlb')" sortable min-width="90px" align="center" prop="名称" />
                     <el-table-column :label="$t('errorAnalysis.sxlb')" sortable min-width="90px" align="center" prop="名称" />
@@ -483,7 +483,7 @@
                     class="elTable table-fixed"
                     class="elTable table-fixed"
                   >
                   >
                   <template slot="empty">
                   <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.projname')" sortable min-width="90px" align="center" prop="名称" />
                     <el-table-column :label="$t('errorAnalysis.projname')" sortable min-width="90px" align="center" prop="名称" />
@@ -548,7 +548,7 @@
                     class="elTable table-fixed"
                     class="elTable table-fixed"
                   >
                   >
                   <template slot="empty">
                   <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="100px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="100px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.zdtzcs')" sortable min-width="130px" align="center" prop="field1" />
                     <el-table-column :label="$t('errorAnalysis.zdtzcs')" sortable min-width="130px" align="center" prop="field1" />
@@ -614,7 +614,7 @@
                     class="elTable table-fixed"
                     class="elTable table-fixed"
                   >
                   >
                   <template slot="empty">
                   <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                  </template>
                  </template>
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.hlqxcs')" sortable min-width="110px" align="center" prop="field1" />
                     <el-table-column :label="$t('errorAnalysis.hlqxcs')" sortable min-width="110px" align="center" prop="field1" />
@@ -685,7 +685,7 @@
                     class="elTable table-fixed"
                     class="elTable table-fixed"
                   >
                   >
                   <template slot="empty">
                   <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
                     <el-table-column :label="$t('errorAnalysis.pen')" sortable min-width="110px" align="center" prop="fname" />
                     <el-table-column :label="$t('errorAnalysis.pen')" sortable min-width="110px" align="center" prop="fname" />
@@ -754,11 +754,11 @@
             :cell-style="cellStyle"
             :cell-style="cellStyle"
             class="elTable table-fixed"
             class="elTable table-fixed"
             :height="myHeightSecond"
             :height="myHeightSecond"
-            empty-text="No more data"
+            empty-text="No  Data"
           >
           >
           <!-- <u-table-column >
           <!-- <u-table-column >
             <template slot="empty">
             <template slot="empty">
-                  <span style="color: #969799;">No more data</span>
+                  <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
              </u-table-column> -->
              </u-table-column> -->
             <u-table-column  :key="Math.random()" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="日期" />
             <u-table-column  :key="Math.random()" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="日期" />
@@ -849,7 +849,7 @@
             class="elTable table-fixed"
             class="elTable table-fixed"
             :height="myHeightThird"
             :height="myHeightThird"
 
 
-           empty-text="No more data"
+           empty-text="No  Data"
           >
           >
           <!-- <u-table-column >
           <!-- <u-table-column >
             <template slot="empty">
             <template slot="empty">
@@ -924,7 +924,7 @@
             :max-height="450"
             :max-height="450"
           >
           >
           <template slot="empty">
           <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
             <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
             <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
             <el-table-column :label="$t('formulationEvaluation.xgsj')" width="130px" align="center" prop="createdate" />
             <el-table-column :label="$t('formulationEvaluation.xgsj')" width="130px" align="center" prop="createdate" />
@@ -1019,7 +1019,7 @@
 
 
           >
           >
           <template slot="empty">
           <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
             <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
             <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
             <el-table-column :label="$t('formulationEvaluation.slz')" width="130px" align="center" prop="feedgroup" />
             <el-table-column :label="$t('formulationEvaluation.slz')" width="130px" align="center" prop="feedgroup" />
@@ -1068,7 +1068,7 @@
 
 
           >
           >
           <template slot="empty">
           <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
             <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px">
             <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px">
               <template slot-scope="scope">
               <template slot-scope="scope">
@@ -1119,7 +1119,7 @@
 
 
                 >
                 >
                 <template slot="empty">
                 <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
                   <u-table-column :label="$t('formulationEvaluation.xh')" width="50px" align="center" type="index" />
                   <u-table-column :label="$t('formulationEvaluation.xh')" width="50px" align="center" type="index" />
                   <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
                   <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
@@ -1182,7 +1182,7 @@
                   :row-style="rowStyle"
                   :row-style="rowStyle"
                   class="elTable table-fixed"
                   class="elTable table-fixed"
                   :span-method="objectSpanMethod2"
                   :span-method="objectSpanMethod2"
-                   empty-text="No more data"
+                   empty-text="No  Data"
                   >
                   >
                   <u-table-column :label="$t('formulationEvaluation.xh')" width="50px"  :key="Math.random()" align="center" type="index" />
                   <u-table-column :label="$t('formulationEvaluation.xh')" width="50px"  :key="Math.random()" align="center" type="index" />
                   <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
                   <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
@@ -1237,7 +1237,7 @@
               class="elTable table-fixed"
               class="elTable table-fixed"
               show-summary
               show-summary
               :summary-method="getSummaries1"
               :summary-method="getSummaries1"
-              empty-text="No more data"
+              empty-text="No  Data"
             >
             >
               <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
               <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
               <el-table-column :label="$t('InventoryManagement.silc')"    min-width="90px" align="center" prop="fname" />
               <el-table-column :label="$t('InventoryManagement.silc')"    min-width="90px" align="center" prop="fname" />
@@ -1278,11 +1278,11 @@
               :cell-style="cellStyle"
               :cell-style="cellStyle"
               class="elTable table-fixed"
               class="elTable table-fixed"
               show-summary
               show-summary
-              empty-text="No more data"
+              empty-text="No  Data"
               :summary-method="getSummaries2"
               :summary-method="getSummaries2"
             >
             >
             <!-- <template slot="empty">
             <!-- <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template> -->
                 </template> -->
               <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
               <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
               <el-table-column :label="$t('InventoryManagement.silc')"    min-width="90px" align="center" prop="fname" />
               <el-table-column :label="$t('InventoryManagement.silc')"    min-width="90px" align="center" prop="fname" />

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1103 - 193
src/views/statisticalAnalysis/formulationEvaluation/index.vue


+ 384 - 163
src/views/statisticalAnalysis/inventoryManagement/group/index.vue

@@ -31,7 +31,7 @@
             ref="elTable1"
             ref="elTable1"
           >
           >
           <template slot="empty">
           <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
 
 
             <el-table-column sortable :label="$t('InventoryManagement.silc')"    min-width="130px" align="center">
             <el-table-column sortable :label="$t('InventoryManagement.silc')"    min-width="130px" align="center">
@@ -98,7 +98,7 @@
           ref="elTable2"
           ref="elTable2"
         >
         >
         <template slot="empty">
         <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
           <el-table-column v-for="item in tab2.table.tableConfig" align="center" :label="item.label" :prop="item.prop">
           <el-table-column v-for="item in tab2.table.tableConfig" align="center" :label="item.label" :prop="item.prop">
             <el-table-column v-for="item1 in item.children"  v-if="item.children || item.children.length>0" align="center" :label="item1.label" :prop="item1.prop">
             <el-table-column v-for="item1 in item.children"  v-if="item.children || item.children.length>0" align="center" :label="item1.label" :prop="item1.prop">
@@ -146,7 +146,7 @@
           ref="elTable3"
           ref="elTable3"
         >
         >
         <template slot="empty">
         <template slot="empty">
-                    <span style="color: #969799;">No more data</span>
+                    <span style="color: #969799;">No  Data</span>
                 </template>
                 </template>
           <el-table-column v-for="item in tab3.table.tableConfig" align="center" :label="item.label" :prop="item.prop">
           <el-table-column v-for="item in tab3.table.tableConfig" align="center" :label="item.label" :prop="item.prop">
             <el-table-column v-for="item1 in item.children" v-if="item.children || item.children.length>0" align="center" :label="item1.label" :prop="item1.prop">
             <el-table-column v-for="item1 in item.children" v-if="item.children || item.children.length>0" align="center" :label="item1.label" :prop="item1.prop">
@@ -200,10 +200,20 @@ export default {
         }
         }
       },
       },
       requestParams: [
       requestParams: [
-        { name: 'getPastureListJT', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid'), pasturename: '' }}
+        {
+          name: 'getPastureListJT',
+          offset: 0,
+          pagecount: 0,
+          parammaps: { pastureid: Cookies.get('pastureid'), pasturename: '' }
+        }
       ],
       ],
       pastureList: [], // 牧场
       pastureList: [], // 牧场
-      fileComment: [{ 'label': '商务文件评分', 'children': [{ 'label': '1' }, { 'label': '2' }, { 'label': '管理员' }] }],
+      fileComment: [
+        {
+          label: '商务文件评分',
+          children: [{ label: '1' }, { label: '2' }, { label: '管理员' }]
+        }
+      ],
       activeName: 'first',
       activeName: 'first',
       tab: {
       tab: {
         chartDate: [],
         chartDate: [],
@@ -291,7 +301,7 @@ export default {
       },
       },
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       cellStyle: { padding: 0 + 'px' },
-      myHeight2:document.documentElement.clientHeight - 85-200
+      myHeight2: document.documentElement.clientHeight - 85 - 200
     }
     }
   },
   },
   updated() {
   updated() {
@@ -305,9 +315,10 @@ export default {
 
 
   methods: {
   methods: {
     getDownList() {
     getDownList() {
-      GetDataByNames(this.requestParams).then(response => {
+      GetDataByNames(this.requestParams).then((response) => {
         this.pastureList = response.data.getPastureListJT.list
         this.pastureList = response.data.getPastureListJT.list
-        this.tab.table.getdataListParm.parammaps.pastureid = response.data.getPastureListJT.list[0].pastureid
+        this.tab.table.getdataListParm.parammaps.pastureid =
+          response.data.getPastureListJT.list[0].pastureid
         this.getTabList()
         this.getTabList()
       })
       })
     },
     },
@@ -319,18 +330,36 @@ export default {
       end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
       end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
       that.tab.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
       that.tab.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
       that.tab.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
       that.tab.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
-      that.tab.table.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
-      that.tab.table.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
+      that.tab.table.getdataListParm.parammaps.startTime = parseTime(
+        start,
+        '{y}-{m}-{d}'
+      )
+      that.tab.table.getdataListParm.parammaps.stopTime = parseTime(
+        end,
+        '{y}-{m}-{d}'
+      )
       that.tab.table.getdataListParm.parammaps.inputDatetime = [start, end]
       that.tab.table.getdataListParm.parammaps.inputDatetime = [start, end]
       that.tab2.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
       that.tab2.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
       that.tab2.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
       that.tab2.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
-      that.tab2.table.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
-      that.tab2.table.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
+      that.tab2.table.getdataListParm.parammaps.startTime = parseTime(
+        start,
+        '{y}-{m}-{d}'
+      )
+      that.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
+        end,
+        '{y}-{m}-{d}'
+      )
       that.tab2.table.getdataListParm.parammaps.inputDatetime = [start, end]
       that.tab2.table.getdataListParm.parammaps.inputDatetime = [start, end]
       that.tab3.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
       that.tab3.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
       that.tab3.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
       that.tab3.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
-      that.tab3.table.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
-      that.tab3.table.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
+      that.tab3.table.getdataListParm.parammaps.startTime = parseTime(
+        start,
+        '{y}-{m}-{d}'
+      )
+      that.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
+        end,
+        '{y}-{m}-{d}'
+      )
       that.tab3.table.getdataListParm.parammaps.inputDatetime = [start, end]
       that.tab3.table.getdataListParm.parammaps.inputDatetime = [start, end]
     },
     },
     handleTabClick() {
     handleTabClick() {
@@ -348,7 +377,8 @@ export default {
         start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
         start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
         end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
         end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
         this.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
         this.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
-        this.tab2.table.getdataListParm.parammaps.pastureid = this.pastureList[0].pastureid
+        this.tab2.table.getdataListParm.parammaps.pastureid =
+          this.pastureList[0].pastureid
         this.getTab2List()
         this.getTab2List()
       } else if (this.activeName == 'third') {
       } else if (this.activeName == 'third') {
         const start3 = new Date()
         const start3 = new Date()
@@ -356,13 +386,14 @@ export default {
         start3.setTime(start3.getTime() - 3600 * 1000 * 24 * 1)
         start3.setTime(start3.getTime() - 3600 * 1000 * 24 * 1)
         end3.setTime(end3.getTime() - 3600 * 1000 * 24 * 1)
         end3.setTime(end3.getTime() - 3600 * 1000 * 24 * 1)
         this.tab3.table.getdataListParm.parammaps.inputDatetime = [start3, end3]
         this.tab3.table.getdataListParm.parammaps.inputDatetime = [start3, end3]
-        this.tab3.table.getdataListParm.parammaps.pastureid = this.pastureList[0].pastureid
+        this.tab3.table.getdataListParm.parammaps.pastureid =
+          this.pastureList[0].pastureid
         this.getTab3List()
         this.getTab3List()
       }
       }
     },
     },
     getTabList() {
     getTabList() {
       this.tab.table.listLoading = true
       this.tab.table.listLoading = true
-      GetDataByName(this.tab.table.getdataListParm).then(response => {
+      GetDataByName(this.tab.table.getdataListParm).then((response) => {
         console.log('库存统计table数据', response.data.list)
         console.log('库存统计table数据', response.data.list)
         if (response.data.list !== null) {
         if (response.data.list !== null) {
           this.tab.table.list = response.data.list
           this.tab.table.list = response.data.list
@@ -377,9 +408,18 @@ export default {
     },
     },
     form_search(item) {
     form_search(item) {
       if (item == 'first') {
       if (item == 'first') {
-        if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
-          this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-          this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+        if (
+          this.tab.table.getdataListParm.parammaps.inputDatetime !== '' &&
+          this.tab.table.getdataListParm.parammaps.inputDatetime !== null
+        ) {
+          this.tab.table.getdataListParm.parammaps.startTime = parseTime(
+            this.tab.table.getdataListParm.parammaps.inputDatetime[0],
+            '{y}-{m}-{d}'
+          )
+          this.tab.table.getdataListParm.parammaps.stopTime = parseTime(
+            this.tab.table.getdataListParm.parammaps.inputDatetime[1],
+            '{y}-{m}-{d}'
+          )
         } else {
         } else {
           this.tab.table.getdataListParm.parammaps.inputDatetime = ''
           this.tab.table.getdataListParm.parammaps.inputDatetime = ''
           this.tab.table.getdataListParm.parammaps.startTime = ''
           this.tab.table.getdataListParm.parammaps.startTime = ''
@@ -387,9 +427,18 @@ export default {
         }
         }
         this.getTabList()
         this.getTabList()
       } else if (item == 'second') {
       } else if (item == 'second') {
-        if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
-          this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-          this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+        if (
+          this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' &&
+          this.tab2.table.getdataListParm.parammaps.inputDatetime !== null
+        ) {
+          this.tab2.table.getdataListParm.parammaps.startTime = parseTime(
+            this.tab2.table.getdataListParm.parammaps.inputDatetime[0],
+            '{y}-{m}-{d}'
+          )
+          this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
+            this.tab2.table.getdataListParm.parammaps.inputDatetime[1],
+            '{y}-{m}-{d}'
+          )
         } else {
         } else {
           this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
           this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
           this.tab2.table.getdataListParm.parammaps.startTime = ''
           this.tab2.table.getdataListParm.parammaps.startTime = ''
@@ -397,9 +446,18 @@ export default {
         }
         }
         this.getTab2List()
         this.getTab2List()
       } else if (item == 'third') {
       } else if (item == 'third') {
-        if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
-          this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-          this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+        if (
+          this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' &&
+          this.tab3.table.getdataListParm.parammaps.inputDatetime !== null
+        ) {
+          this.tab3.table.getdataListParm.parammaps.startTime = parseTime(
+            this.tab3.table.getdataListParm.parammaps.inputDatetime[0],
+            '{y}-{m}-{d}'
+          )
+          this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
+            this.tab3.table.getdataListParm.parammaps.inputDatetime[1],
+            '{y}-{m}-{d}'
+          )
         } else {
         } else {
           this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
           this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
           this.tab3.table.getdataListParm.parammaps.startTime = ''
           this.tab3.table.getdataListParm.parammaps.startTime = ''
@@ -419,13 +477,17 @@ export default {
         var exportTitle2 = [] // 二级标题
         var exportTitle2 = [] // 二级标题
         for (let i = 0; i < this.tab2.table.tableConfig.length; i++) {
         for (let i = 0; i < this.tab2.table.tableConfig.length; i++) {
           exportTitle1.push(this.tab2.table.tableConfig[i].label)
           exportTitle1.push(this.tab2.table.tableConfig[i].label)
-          for (let j = 0; j < this.tab2.table.tableConfig[i].children.length; j++) {
+          for (
+            let j = 0;
+            j < this.tab2.table.tableConfig[i].children.length;
+            j++
+          ) {
             exportTitle2.push(this.tab2.table.tableConfig[i].children[j].label)
             exportTitle2.push(this.tab2.table.tableConfig[i].children[j].label)
           }
           }
         }
         }
         console.log('一级标题exportTitle1', exportTitle1)
         console.log('一级标题exportTitle1', exportTitle1)
         console.log('二级标题exportTitle2', exportTitle2)
         console.log('二级标题exportTitle2', exportTitle2)
-        var headerArr = []// 处理一级标题
+        var headerArr = [] // 处理一级标题
         for (let i = 0; i < exportTitle1.length; i++) {
         for (let i = 0; i < exportTitle1.length; i++) {
           if (i > 0) {
           if (i > 0) {
             headerArr.push(exportTitle1[i], '', '', '')
             headerArr.push(exportTitle1[i], '', '', '')
@@ -444,21 +506,28 @@ export default {
         }
         }
         console.log('对应字段valueArr', valueArr)
         console.log('对应字段valueArr', valueArr)
         if (headerArr.length > 0) {
         if (headerArr.length > 0) {
-            import('@/vendor/Export3Excel').then((excel) => {
-              const multiHeader = [
-                headerArr
-              ]
-              const multiHeader2 = []
-              const tHeader = exportTitle2
-              const filterVal = valueArr// 表头所对应的字段,这里未填写
-              const data = this.tab2.table.list.map(v => filterVal.map(j => v[j]))
-              // const data = [];
-              // 进行所有表头的单元格合并
-              // const merges = ['A1:A1', 'B1:E1','F1:J1' ];
-              const merges = ['A1:A1']
+          import('@/vendor/Export3Excel').then((excel) => {
+            const multiHeader = [headerArr]
+            const multiHeader2 = []
+            const tHeader = exportTitle2
+            const filterVal = valueArr // 表头所对应的字段,这里未填写
+            const data = this.tab2.table.list.map((v) =>
+              filterVal.map((j) => v[j])
+            )
+            // const data = [];
+            // 进行所有表头的单元格合并
+            // const merges = ['A1:A1', 'B1:E1','F1:J1' ];
+            const merges = ['A1:A1']
 
 
-              excel.export_json_to_excel({ multiHeader, multiHeader2, header: tHeader, data, filename: '用料分析', merges })
+            excel.export_json_to_excel({
+              multiHeader,
+              multiHeader2,
+              header: tHeader,
+              data,
+              filename: '用料分析',
+              merges
             })
             })
+          })
         }
         }
       } else if (item == 'tab3') {
       } else if (item == 'tab3') {
         console.log('价格分析导出')
         console.log('价格分析导出')
@@ -469,13 +538,17 @@ export default {
         var exportTitle2 = [] // 二级标题
         var exportTitle2 = [] // 二级标题
         for (let i = 0; i < this.tab3.table.tableConfig.length; i++) {
         for (let i = 0; i < this.tab3.table.tableConfig.length; i++) {
           exportTitle1.push(this.tab3.table.tableConfig[i].label)
           exportTitle1.push(this.tab3.table.tableConfig[i].label)
-          for (let j = 0; j < this.tab3.table.tableConfig[i].children.length; j++) {
+          for (
+            let j = 0;
+            j < this.tab3.table.tableConfig[i].children.length;
+            j++
+          ) {
             exportTitle2.push(this.tab3.table.tableConfig[i].children[j].label)
             exportTitle2.push(this.tab3.table.tableConfig[i].children[j].label)
           }
           }
         }
         }
         console.log('一级标题exportTitle1', exportTitle1)
         console.log('一级标题exportTitle1', exportTitle1)
         console.log('二级标题exportTitle2', exportTitle2)
         console.log('二级标题exportTitle2', exportTitle2)
-        var headerArr = []// 处理一级标题
+        var headerArr = [] // 处理一级标题
         for (let i = 0; i < exportTitle1.length; i++) {
         for (let i = 0; i < exportTitle1.length; i++) {
           if (i > 0) {
           if (i > 0) {
             headerArr.push(exportTitle1[i], '')
             headerArr.push(exportTitle1[i], '')
@@ -494,25 +567,33 @@ export default {
         }
         }
         console.log('对应字段valueArr', valueArr)
         console.log('对应字段valueArr', valueArr)
         if (headerArr.length > 0) {
         if (headerArr.length > 0) {
-            import('@/vendor/Export3Excel').then((excel) => {
-              const multiHeader = [
-                headerArr
-              ]
-              const multiHeader2 = []
-              const tHeader = exportTitle2
-              const filterVal = valueArr// 表头所对应的字段,这里未填写
-              const data = this.tab3.table.list.map(v => filterVal.map(j => v[j]))
-              // const data = [];
-              // 进行所有表头的单元格合并
-              // const merges = ['A1:A1', 'B1:E1','F1:J1' ];
-              const merges = ['A1:A1']
+          import('@/vendor/Export3Excel').then((excel) => {
+            const multiHeader = [headerArr]
+            const multiHeader2 = []
+            const tHeader = exportTitle2
+            const filterVal = valueArr // 表头所对应的字段,这里未填写
+            const data = this.tab3.table.list.map((v) =>
+              filterVal.map((j) => v[j])
+            )
+            // const data = [];
+            // 进行所有表头的单元格合并
+            // const merges = ['A1:A1', 'B1:E1','F1:J1' ];
+            const merges = ['A1:A1']
 
 
-              excel.export_json_to_excel({ multiHeader, multiHeader2, header: tHeader, data, filename: '价格分析', merges })
+            excel.export_json_to_excel({
+              multiHeader,
+              multiHeader2,
+              header: tHeader,
+              data,
+              filename: '价格分析',
+              merges
             })
             })
+          })
         }
         }
       }
       }
     },
     },
-    format(jsonData) { // 数据处理
+    format(jsonData) {
+      // 数据处理
       const dataList = []
       const dataList = []
       for (let i = 0; i < jsonData.length; i++) {
       for (let i = 0; i < jsonData.length; i++) {
         const list = []
         const list = []
@@ -530,8 +611,12 @@ export default {
     // 用料分析
     // 用料分析
     getTab2List() {
     getTab2List() {
       this.tab2.table.listLoading = true
       this.tab2.table.listLoading = true
-      GetReportform(this.tab2.table.getdataListParm).then(response => {
-        if (response.data !== null && response.data.data !== null && response.data.data1 !== null) {
+      GetReportform(this.tab2.table.getdataListParm).then((response) => {
+        if (
+          response.data !== null &&
+          response.data.data !== null &&
+          response.data.data1 !== null
+        ) {
           console.log('库存统计-用料分析', response.data.list)
           console.log('库存统计-用料分析', response.data.list)
           this.tab2.table.list = response.data.list.data1
           this.tab2.table.list = response.data.list.data1
           this.tab2.table.tableConfig = response.data.list.data2
           this.tab2.table.tableConfig = response.data.list.data2
@@ -547,63 +632,63 @@ export default {
     changeRadio2() {
     changeRadio2() {
       console.log(this.tab2.radio)
       console.log(this.tab2.radio)
       if (this.tab2.radio == '1') {
       if (this.tab2.radio == '1') {
-        this.tab2.isRadio1 = true,
-        this.tab2.isRadio2 = false,
-        this.tab2.isRadio3 = false,
-        this.tab2.isRadio4 = false,
-        this.tab2.isRadio5 = false,
-        this.tab2.isRadio6 = false,
-        this.tab2.table.getdataListParm.name = 'getMaterialAnalysisSC'
+        ;(this.tab2.isRadio1 = true),
+          (this.tab2.isRadio2 = false),
+          (this.tab2.isRadio3 = false),
+          (this.tab2.isRadio4 = false),
+          (this.tab2.isRadio5 = false),
+          (this.tab2.isRadio6 = false),
+          (this.tab2.table.getdataListParm.name = 'getMaterialAnalysisSC')
         this.tab2.table.getdataListParm.offset = 1
         this.tab2.table.getdataListParm.offset = 1
         this.getTab2List()
         this.getTab2List()
       } else if (this.tab2.radio == '2') {
       } else if (this.tab2.radio == '2') {
-        this.tab2.isRadio1 = false,
-        this.tab2.isRadio2 = true,
-        this.tab2.isRadio3 = false,
-        this.tab2.isRadio4 = false,
-        this.tab2.isRadio5 = false,
-        this.tab2.isRadio6 = false,
-        this.tab2.table.getdataListParm.name = 'getMaterialAnalysisLS'
+        ;(this.tab2.isRadio1 = false),
+          (this.tab2.isRadio2 = true),
+          (this.tab2.isRadio3 = false),
+          (this.tab2.isRadio4 = false),
+          (this.tab2.isRadio5 = false),
+          (this.tab2.isRadio6 = false),
+          (this.tab2.table.getdataListParm.name = 'getMaterialAnalysisLS')
         this.tab2.table.getdataListParm.offset = 1
         this.tab2.table.getdataListParm.offset = 1
         this.getTab2List()
         this.getTab2List()
       } else if (this.tab2.radio == '3') {
       } else if (this.tab2.radio == '3') {
-        this.tab2.isRadio1 = false,
-        this.tab2.isRadio2 = false,
-        this.tab2.isRadio3 = true,
-        this.tab2.isRadio4 = false,
-        this.tab2.isRadio5 = false,
-        this.tab2.isRadio6 = false,
-        this.tab2.table.getdataListParm.name = 'getMaterialAnalysisRQ'
+        ;(this.tab2.isRadio1 = false),
+          (this.tab2.isRadio2 = false),
+          (this.tab2.isRadio3 = true),
+          (this.tab2.isRadio4 = false),
+          (this.tab2.isRadio5 = false),
+          (this.tab2.isRadio6 = false),
+          (this.tab2.table.getdataListParm.name = 'getMaterialAnalysisRQ')
         this.tab2.table.getdataListParm.offset = 1
         this.tab2.table.getdataListParm.offset = 1
         this.getTab2List()
         this.getTab2List()
       } else if (this.tab2.radio == '4') {
       } else if (this.tab2.radio == '4') {
-        this.tab2.isRadio1 = false,
-        this.tab2.isRadio2 = false,
-        this.tab2.isRadio3 = false,
-        this.tab2.isRadio4 = true,
-        this.tab2.isRadio5 = false,
-        this.tab2.isRadio6 = false,
-        this.tab2.table.getdataListParm.name = 'getMaterialAnalysisTMR'
+        ;(this.tab2.isRadio1 = false),
+          (this.tab2.isRadio2 = false),
+          (this.tab2.isRadio3 = false),
+          (this.tab2.isRadio4 = true),
+          (this.tab2.isRadio5 = false),
+          (this.tab2.isRadio6 = false),
+          (this.tab2.table.getdataListParm.name = 'getMaterialAnalysisTMR')
         this.tab2.table.getdataListParm.offset = 1
         this.tab2.table.getdataListParm.offset = 1
         this.getTab2List()
         this.getTab2List()
       } else if (this.tab2.radio == '5') {
       } else if (this.tab2.radio == '5') {
-        this.tab2.isRadio1 = false,
-        this.tab2.isRadio2 = false,
-        this.tab2.isRadio3 = false,
-        this.tab2.isRadio4 = false,
-        this.tab2.isRadio5 = true,
-        this.tab2.isRadio6 = false,
-        this.tab2.table.getdataListParm.name = 'getMaterialAnalysisBC'
+        ;(this.tab2.isRadio1 = false),
+          (this.tab2.isRadio2 = false),
+          (this.tab2.isRadio3 = false),
+          (this.tab2.isRadio4 = false),
+          (this.tab2.isRadio5 = true),
+          (this.tab2.isRadio6 = false),
+          (this.tab2.table.getdataListParm.name = 'getMaterialAnalysisBC')
         this.tab2.table.getdataListParm.offset = 1
         this.tab2.table.getdataListParm.offset = 1
         this.getTab2List()
         this.getTab2List()
       } else if (this.tab2.radio == '6') {
       } else if (this.tab2.radio == '6') {
-        this.tab2.isRadio1 = false,
-        this.tab2.isRadio2 = false,
-        this.tab2.isRadio3 = false,
-        this.tab2.isRadio4 = false,
-        this.tab2.isRadio5 = false,
-        this.tab2.isRadio6 = true,
-        this.tab2.table.getdataListParm.name = 'getMaterialAnalysisCC'
+        ;(this.tab2.isRadio1 = false),
+          (this.tab2.isRadio2 = false),
+          (this.tab2.isRadio3 = false),
+          (this.tab2.isRadio4 = false),
+          (this.tab2.isRadio5 = false),
+          (this.tab2.isRadio6 = true),
+          (this.tab2.table.getdataListParm.name = 'getMaterialAnalysisCC')
         this.tab2.table.getdataListParm.offset = 1
         this.tab2.table.getdataListParm.offset = 1
         this.getTab2List()
         this.getTab2List()
       }
       }
@@ -611,8 +696,12 @@ export default {
     // 价格分析
     // 价格分析
     getTab3List() {
     getTab3List() {
       this.tab3.table.listLoading = true
       this.tab3.table.listLoading = true
-      GetReportform(this.tab3.table.getdataListParm).then(response => {
-        if (response.data !== null && response.data.list.data1 !== null && response.data.list.data2 !== null) {
+      GetReportform(this.tab3.table.getdataListParm).then((response) => {
+        if (
+          response.data !== null &&
+          response.data.list.data1 !== null &&
+          response.data.list.data2 !== null
+        ) {
           console.log('库存统计-价格分析', response.data.list)
           console.log('库存统计-价格分析', response.data.list)
           this.tab3.table.list = response.data.list.data1
           this.tab3.table.list = response.data.list.data1
           this.tab3.table.tableConfig = response.data.list.data2
           this.tab3.table.tableConfig = response.data.list.data2
@@ -628,44 +717,57 @@ export default {
     changeRadio3() {
     changeRadio3() {
       console.log(this.tab3.radio)
       console.log(this.tab3.radio)
       if (this.tab3.radio == '1') {
       if (this.tab3.radio == '1') {
-        this.tab3.isRadio1 = true,
-        this.tab3.isRadio2 = false,
-        this.tab3.isRadio3 = false,
-        this.tab3.isRadio4 = false,
-        this.tab3.table.getdataListParm.name = 'getPriceAnalysisSC'
+        ;(this.tab3.isRadio1 = true),
+          (this.tab3.isRadio2 = false),
+          (this.tab3.isRadio3 = false),
+          (this.tab3.isRadio4 = false),
+          (this.tab3.table.getdataListParm.name = 'getPriceAnalysisSC')
         this.tab3.table.getdataListParm.offset = 1
         this.tab3.table.getdataListParm.offset = 1
         this.getTab3List()
         this.getTab3List()
       } else if (this.tab3.radio == '2') {
       } else if (this.tab3.radio == '2') {
-        this.tab3.isRadio1 = false,
-        this.tab3.isRadio2 = true,
-        this.tab3.isRadio3 = false,
-        this.tab3.isRadio4 = false,
-        this.tab3.table.getdataListParm.name = 'getPriceAnalysisLS'
+        ;(this.tab3.isRadio1 = false),
+          (this.tab3.isRadio2 = true),
+          (this.tab3.isRadio3 = false),
+          (this.tab3.isRadio4 = false),
+          (this.tab3.table.getdataListParm.name = 'getPriceAnalysisLS')
         this.tab3.table.getdataListParm.offset = 1
         this.tab3.table.getdataListParm.offset = 1
         this.getTab3List()
         this.getTab3List()
       } else if (this.tab3.radio == '3') {
       } else if (this.tab3.radio == '3') {
-        this.tab3.isRadio1 = false,
-        this.tab3.isRadio2 = false,
-        this.tab3.isRadio3 = true,
-        this.tab3.isRadio4 = false,
-        this.tab3.table.getdataListParm.name = 'getPriceAnalysisRQ'
+        ;(this.tab3.isRadio1 = false),
+          (this.tab3.isRadio2 = false),
+          (this.tab3.isRadio3 = true),
+          (this.tab3.isRadio4 = false),
+          (this.tab3.table.getdataListParm.name = 'getPriceAnalysisRQ')
         this.tab3.table.getdataListParm.offset = 1
         this.tab3.table.getdataListParm.offset = 1
         this.getTab3List()
         this.getTab3List()
       } else if (this.tab3.radio == '4') {
       } else if (this.tab3.radio == '4') {
-        this.tab3.isRadio1 = false,
-        this.tab3.isRadio2 = false,
-        this.tab3.isRadio3 = false,
-        this.tab3.isRadio4 = true,
-        this.tab3.table.getdataListParm.name = 'getPriceAnalysisTMR'
+        ;(this.tab3.isRadio1 = false),
+          (this.tab3.isRadio2 = false),
+          (this.tab3.isRadio3 = false),
+          (this.tab3.isRadio4 = true),
+          (this.tab3.table.getdataListParm.name = 'getPriceAnalysisTMR')
         this.tab3.table.getdataListParm.offset = 1
         this.tab3.table.getdataListParm.offset = 1
         this.getTab3List()
         this.getTab3List()
       }
       }
     },
     },
 
 
     handleBefore() {
     handleBefore() {
-      if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
-        var start = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
-        var stop = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
+      if (
+        this.tab.table.getdataListParm.parammaps.inputDatetime !== '' &&
+        this.tab.table.getdataListParm.parammaps.inputDatetime !== null
+      ) {
+        var start = new Date(
+          this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(
+            this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() -
+              1
+          )
+        )
+        var stop = new Date(
+          this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(
+            this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() -
+              1
+          )
+        )
         if (stop > Date.now() - 8.64e7) {
         if (stop > Date.now() - 8.64e7) {
           this.Nextdisabled = true
           this.Nextdisabled = true
           this.Beforedisabled = false
           this.Beforedisabled = false
@@ -677,14 +779,33 @@ export default {
         this.tab.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
         this.tab.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
         this.$forceUpdate()
         this.$forceUpdate()
       }
       }
-      this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-      this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+      this.tab.table.getdataListParm.parammaps.startTime = parseTime(
+        this.tab.table.getdataListParm.parammaps.inputDatetime[0],
+        '{y}-{m}-{d}'
+      )
+      this.tab.table.getdataListParm.parammaps.stopTime = parseTime(
+        this.tab.table.getdataListParm.parammaps.inputDatetime[1],
+        '{y}-{m}-{d}'
+      )
       this.getTabList()
       this.getTabList()
     },
     },
     handleNext() {
     handleNext() {
-      if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
-        var start2 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
-        var stop2 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
+      if (
+        this.tab.table.getdataListParm.parammaps.inputDatetime !== '' &&
+        this.tab.table.getdataListParm.parammaps.inputDatetime !== null
+      ) {
+        var start2 = new Date(
+          this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(
+            this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() +
+              1
+          )
+        )
+        var stop2 = new Date(
+          this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(
+            this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() +
+              1
+          )
+        )
         if (stop2 > Date.now() - 8.64e7) {
         if (stop2 > Date.now() - 8.64e7) {
           this.Nextdisabled = true
           this.Nextdisabled = true
           this.Beforedisabled = false
           this.Beforedisabled = false
@@ -693,17 +814,39 @@ export default {
           this.Beforedisabled = false
           this.Beforedisabled = false
         }
         }
         this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
         this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
-        this.tab.table.getdataListParm.parammaps.inputDatetime.push(start2, stop2)
+        this.tab.table.getdataListParm.parammaps.inputDatetime.push(
+          start2,
+          stop2
+        )
         this.$forceUpdate()
         this.$forceUpdate()
       }
       }
-      this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-      this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+      this.tab.table.getdataListParm.parammaps.startTime = parseTime(
+        this.tab.table.getdataListParm.parammaps.inputDatetime[0],
+        '{y}-{m}-{d}'
+      )
+      this.tab.table.getdataListParm.parammaps.stopTime = parseTime(
+        this.tab.table.getdataListParm.parammaps.inputDatetime[1],
+        '{y}-{m}-{d}'
+      )
       this.getTabList()
       this.getTabList()
     },
     },
     handleBefore2() {
     handleBefore2() {
-      if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
-        var start3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
-        var stop3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
+      if (
+        this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' &&
+        this.tab2.table.getdataListParm.parammaps.inputDatetime !== null
+      ) {
+        var start3 = new Date(
+          this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(
+            this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() -
+              1
+          )
+        )
+        var stop3 = new Date(
+          this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(
+            this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() -
+              1
+          )
+        )
         if (stop3 > Date.now() - 8.64e7) {
         if (stop3 > Date.now() - 8.64e7) {
           this.Nextdisabled2 = true
           this.Nextdisabled2 = true
           this.Beforedisabled2 = false
           this.Beforedisabled2 = false
@@ -712,17 +855,39 @@ export default {
           this.Beforedisabled2 = false
           this.Beforedisabled2 = false
         }
         }
         this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
         this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
-        this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start3, stop3)
+        this.tab2.table.getdataListParm.parammaps.inputDatetime.push(
+          start3,
+          stop3
+        )
         this.$forceUpdate()
         this.$forceUpdate()
       }
       }
-      this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-      this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+      this.tab2.table.getdataListParm.parammaps.startTime = parseTime(
+        this.tab2.table.getdataListParm.parammaps.inputDatetime[0],
+        '{y}-{m}-{d}'
+      )
+      this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
+        this.tab2.table.getdataListParm.parammaps.inputDatetime[1],
+        '{y}-{m}-{d}'
+      )
       this.getTab2List()
       this.getTab2List()
     },
     },
     handleNext2() {
     handleNext2() {
-      if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
-        var start4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
-        var stop4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
+      if (
+        this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' &&
+        this.tab2.table.getdataListParm.parammaps.inputDatetime !== null
+      ) {
+        var start4 = new Date(
+          this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(
+            this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() +
+              1
+          )
+        )
+        var stop4 = new Date(
+          this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(
+            this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() +
+              1
+          )
+        )
         if (stop4 > Date.now() - 8.64e7) {
         if (stop4 > Date.now() - 8.64e7) {
           this.Nextdisabled2 = true
           this.Nextdisabled2 = true
           this.Beforedisabled2 = false
           this.Beforedisabled2 = false
@@ -731,17 +896,39 @@ export default {
           this.Beforedisabled2 = false
           this.Beforedisabled2 = false
         }
         }
         this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
         this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
-        this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start4, stop4)
+        this.tab2.table.getdataListParm.parammaps.inputDatetime.push(
+          start4,
+          stop4
+        )
         this.$forceUpdate()
         this.$forceUpdate()
       }
       }
-      this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-      this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+      this.tab2.table.getdataListParm.parammaps.startTime = parseTime(
+        this.tab2.table.getdataListParm.parammaps.inputDatetime[0],
+        '{y}-{m}-{d}'
+      )
+      this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
+        this.tab2.table.getdataListParm.parammaps.inputDatetime[1],
+        '{y}-{m}-{d}'
+      )
       this.getTab2List()
       this.getTab2List()
     },
     },
     handleBefore3() {
     handleBefore3() {
-      if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
-        var start5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
-        var stop5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
+      if (
+        this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' &&
+        this.tab3.table.getdataListParm.parammaps.inputDatetime !== null
+      ) {
+        var start5 = new Date(
+          this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(
+            this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() -
+              1
+          )
+        )
+        var stop5 = new Date(
+          this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(
+            this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() -
+              1
+          )
+        )
         if (stop5 > Date.now() - 8.64e7) {
         if (stop5 > Date.now() - 8.64e7) {
           this.Nextdisabled3 = true
           this.Nextdisabled3 = true
           this.Beforedisabled3 = false
           this.Beforedisabled3 = false
@@ -750,17 +937,39 @@ export default {
           this.Beforedisabled3 = false
           this.Beforedisabled3 = false
         }
         }
         this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
         this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
-        this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start5, stop5)
+        this.tab3.table.getdataListParm.parammaps.inputDatetime.push(
+          start5,
+          stop5
+        )
         this.$forceUpdate()
         this.$forceUpdate()
       }
       }
-      this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-      this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+      this.tab3.table.getdataListParm.parammaps.startTime = parseTime(
+        this.tab3.table.getdataListParm.parammaps.inputDatetime[0],
+        '{y}-{m}-{d}'
+      )
+      this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
+        this.tab3.table.getdataListParm.parammaps.inputDatetime[1],
+        '{y}-{m}-{d}'
+      )
       this.getTab3List()
       this.getTab3List()
     },
     },
     handleNext3() {
     handleNext3() {
-      if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
-        var start6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
-        var stop6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
+      if (
+        this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' &&
+        this.tab2.table.getdataListParm.parammaps.inputDatetime !== null
+      ) {
+        var start6 = new Date(
+          this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(
+            this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() +
+              1
+          )
+        )
+        var stop6 = new Date(
+          this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(
+            this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() +
+              1
+          )
+        )
         if (stop6 > Date.now() - 8.64e7) {
         if (stop6 > Date.now() - 8.64e7) {
           this.Nextdisabled3 = true
           this.Nextdisabled3 = true
           this.Beforedisabled3 = false
           this.Beforedisabled3 = false
@@ -769,21 +978,33 @@ export default {
           this.Beforedisabled3 = false
           this.Beforedisabled3 = false
         }
         }
         this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
         this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
-        this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start6, stop6)
+        this.tab3.table.getdataListParm.parammaps.inputDatetime.push(
+          start6,
+          stop6
+        )
         this.$forceUpdate()
         this.$forceUpdate()
       }
       }
-      this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
-      this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+      this.tab3.table.getdataListParm.parammaps.startTime = parseTime(
+        this.tab3.table.getdataListParm.parammaps.inputDatetime[0],
+        '{y}-{m}-{d}'
+      )
+      this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
+        this.tab3.table.getdataListParm.parammaps.inputDatetime[1],
+        '{y}-{m}-{d}'
+      )
       this.getTab3List()
       this.getTab3List()
     }
     }
-
   }
   }
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-  .search{
-    margin-bottom:10px;
-    .el-radio{margin-right: 10px;}
-    .filter-item1{margin-top: 10px;}
+.search {
+  margin-bottom: 10px;
+  .el-radio {
+    margin-right: 10px;
+  }
+  .filter-item1 {
+    margin-top: 10px;
   }
   }
+}
 </style>
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 519 - 177
src/views/statisticalAnalysis/inventoryManagement/pasture/index.vue


+ 36 - 17
src/views/statisticalChart/formulaStatistics/index.vue

@@ -7,26 +7,37 @@
             <el-table
             <el-table
               ref="table"
               ref="table"
               :data="tableData"
               :data="tableData"
-              style="width: 100%;margin-bottom: 20px;"
+              style="width: 100%; margin-bottom: 20px"
               row-key="id"
               row-key="id"
               border
               border
               :indent="10"
               :indent="10"
               :select-on-indeterminate="true"
               :select-on-indeterminate="true"
               :default-expand-all="false"
               :default-expand-all="false"
               show-checkbox
               show-checkbox
-              :tree-props="{children: 'childList', hasChildren: 'hasChildren'}"
+              :tree-props="{
+                children: 'childList',
+                hasChildren: 'hasChildren'
+              }"
             >
             >
-              <el-table-column prop="name" :label="$t('role.ym')"/>
+              <el-table-column prop="name" :label="$t('role.ym')" />
               <el-table-column :label="$t('role.ck')">
               <el-table-column :label="$t('role.ck')">
                 <template slot-scope="scope">
                 <template slot-scope="scope">
                   <!-- <el-checkbox v-if="scope.row.fnList.includes(this.$t('pushingplan.watch'))" v-model="scope.row.fnCheck.see" :label="$t('role.ck')" @change="fnCheckEv(scope, 'see')" /> -->
                   <!-- <el-checkbox v-if="scope.row.fnList.includes(this.$t('pushingplan.watch'))" v-model="scope.row.fnCheck.see" :label="$t('role.ck')" @change="fnCheckEv(scope, 'see')" /> -->
-                  <el-checkbox v-model="scope.row.fnCheck.see" :label="$t('role.ck')" @change="fnCheckEv(scope, 'see')" />
+                  <el-checkbox
+                    v-model="scope.row.fnCheck.see"
+                    :label="$t('role.ck')"
+                    @change="fnCheckEv(scope, 'see')"
+                  />
                 </template>
                 </template>
               </el-table-column>
               </el-table-column>
               <el-table-column :label="$t('role.bj')">
               <el-table-column :label="$t('role.bj')">
                 <template slot-scope="scope">
                 <template slot-scope="scope">
                   <!-- <el-checkbox v-if="scope.row.fnList.includes('编辑')" v-model="scope.row.fnCheck.edit" :label="$t('role.bj')" @change="fnCheckEv(scope, 'edit')" /> -->
                   <!-- <el-checkbox v-if="scope.row.fnList.includes('编辑')" v-model="scope.row.fnCheck.edit" :label="$t('role.bj')" @change="fnCheckEv(scope, 'edit')" /> -->
-                  <el-checkbox v-model="scope.row.fnCheck.edit" :label="$t('role.bj')" @change="fnCheckEv(scope, 'edit')" />
+                  <el-checkbox
+                    v-model="scope.row.fnCheck.edit"
+                    :label="$t('role.bj')"
+                    @change="fnCheckEv(scope, 'edit')"
+                  />
                 </template>
                 </template>
               </el-table-column>
               </el-table-column>
             </el-table>
             </el-table>
@@ -45,33 +56,44 @@ export default {
       msg: '',
       msg: '',
       tableData: [
       tableData: [
         {
         {
-          id: 1, name: '配方计划',
+          id: 1,
+          name: '配方计划',
           // fnList: [this.$t('pushingplan.watch'), '编辑'],
           // fnList: [this.$t('pushingplan.watch'), '编辑'],
           fnCheck: { see: false, edit: false },
           fnCheck: { see: false, edit: false },
           childList: [
           childList: [
             {
             {
-              p_id: 1, id: 31, name: '配方模板',
+              p_id: 1,
+              id: 31,
+              name: '配方模板',
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               fnCheck: { see: false, edit: false }
               fnCheck: { see: false, edit: false }
             },
             },
             {
             {
-              p_id: 1, id: 32, name: this.$t('message.msg193'),
+              p_id: 1,
+              id: 32,
+              name: this.$t('dailyExecutionPlan.lspf'),
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               fnCheck: { see: false, edit: false }
               fnCheck: { see: false, edit: false }
             }
             }
           ]
           ]
-        }, {
-          id: 2, name: '栏舍生产',
+        },
+        {
+          id: 2,
+          name: '栏舍生产',
           // fnList: [this.$t('pushingplan.watch'), '编辑'],
           // fnList: [this.$t('pushingplan.watch'), '编辑'],
           fnCheck: { see: false, edit: false },
           fnCheck: { see: false, edit: false },
           childList: [
           childList: [
             {
             {
-              p_id: 2, id: 33, name: '栏舍产奶量',
+              p_id: 2,
+              id: 33,
+              name: '栏舍产奶量',
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               fnCheck: { see: false, edit: false }
               fnCheck: { see: false, edit: false }
             },
             },
             {
             {
-              p_id: 2, id: 34, name: '栏舍剩料量',
+              p_id: 2,
+              id: 34,
+              name: '栏舍剩料量',
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               // fnList: [this.$t('pushingplan.watch'), '编辑'],
               fnCheck: { see: false, edit: false }
               fnCheck: { see: false, edit: false }
             }
             }
@@ -80,9 +102,7 @@ export default {
       ]
       ]
     }
     }
   },
   },
-  mounted() {
-
-  },
+  mounted() {},
   methods: {
   methods: {
     // 查找父级函数
     // 查找父级函数
     getParent(data2, nodeId2) {
     getParent(data2, nodeId2) {
@@ -198,7 +218,6 @@ export default {
         })
         })
       }
       }
     }
     }
-
   }
   }
 }
 }
 </script>
 </script>
@@ -211,7 +230,7 @@ export default {
 .inside-base-main {
 .inside-base-main {
   width: 100%;
   width: 100%;
   background: #ffffff;
   background: #ffffff;
-  box-shadow: 0px 0px 10px 0px rgba(231,232,238,1);
+  box-shadow: 0px 0px 10px 0px rgba(231, 232, 238, 1);
   border-radius: 4px;
   border-radius: 4px;
   margin-bottom: 30px;
   margin-bottom: 30px;
 }
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 535 - 161
src/views/systemManagement/role/index.vue


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä