397ed1c292654fbaffbe600324c73762da1ed5e5.svn-base 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. <template>
  2. <div class="app-container">
  3. <div class="operation">
  4. <el-date-picker v-model="table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;margin-right: 10px;" />
  5. <el-button class="el-icon-arrow-left elIconArrowLeft" @click="handleBefore" />
  6. <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext" />
  7. </div>
  8. <div class="search" />
  9. <div class="table">
  10. <el-table
  11. :key="table.tableKey"
  12. v-loading="table.listLoading"
  13. element-loading-text="给我一点时间"
  14. :data="table.list"
  15. border
  16. fit
  17. highlight-current-row
  18. style="width: 100%;"
  19. :row-style="rowStyle"
  20. :cell-style="tableCellStyle"
  21. class="elTable table-fixed"
  22. >
  23. <el-table-column label="配方模板/指标" min-width="110px" align="center">
  24. <template slot-scope="{row}">
  25. <a @click="clickFormulaTemplateIndex(row)">{{ row.tname }}</a>
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="牛头数" prop="ccount" min-width="110px" align="center" />
  29. <el-table-column label="干物质(kg)" min-width="130px" align="center">
  30. <el-table-column prop="dry" label="配方量" min-width="70" align="center" />
  31. <el-table-column label="TMR料" min-width="70" align="center">
  32. <template slot-scope="scope">
  33. <span>{{ (scope.row.Hrate * scope.row.dry) | keepTreeNum }}</span>
  34. </template>
  35. </el-table-column>
  36. <el-table-column label="采食量" min-width="70" align="center">
  37. <template slot-scope="scope">
  38. <span>{{ (scope.row.Srate * scope.row.dry) | keepTreeNum }}</span>
  39. </template>
  40. </el-table-column>
  41. </el-table-column>
  42. <el-table-column label="产奶净能(MJ)" min-width="130px" align="center">
  43. <el-table-column prop="nm" label="配方量" min-width="70" align="center" />
  44. <el-table-column label="TMR料" min-width="70" align="center">
  45. <template slot-scope="scope">
  46. <span>{{ (scope.row.Hrate * scope.row.nm) | keepTreeNum }}</span>
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="采食量" min-width="70" align="center">
  50. <template slot-scope="scope">
  51. <span>{{ (scope.row.Srate * scope.row.nm) | keepTreeNum }}</span>
  52. </template>
  53. </el-table-column>
  54. </el-table-column>
  55. <el-table-column label="奶牛能量单位(NND)" min-width="130px" align="center">
  56. <el-table-column prop="nuint" label="配方量" min-width="70" align="center" />
  57. <el-table-column label="TMR料" min-width="70" align="center">
  58. <template slot-scope="scope">
  59. <span>{{ (scope.row.Hrate * scope.row.nuint) | keepTreeNum }}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="采食量" min-width="70" align="center">
  63. <template slot-scope="scope">
  64. <span>{{ (scope.row.Srate * scope.row.nuint) | keepTreeNum }}</span>
  65. </template>
  66. </el-table-column>
  67. </el-table-column>
  68. <el-table-column label="粗蛋白(g)" min-width="130px" align="center">
  69. <el-table-column prop="cpd" label="配方量" min-width="70" align="center" />
  70. <el-table-column label="TMR料" min-width="70" align="center">
  71. <template slot-scope="scope">
  72. <span>{{ (scope.row.Hrate * scope.row.cpd) | keepTreeNum }}</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column label="采食量" min-width="70" align="center">
  76. <template slot-scope="scope">
  77. <span>{{ (scope.row.Srate * scope.row.cpd) | keepTreeNum }}</span>
  78. </template>
  79. </el-table-column>
  80. </el-table-column>
  81. <el-table-column label="磷(g)" min-width="130px" align="center">
  82. <el-table-column prop="p" label="配方量" min-width="70" align="center" />
  83. <el-table-column label="TMR料" min-width="70" align="center">
  84. <template slot-scope="scope">
  85. <span>{{ (scope.row.Hrate * scope.row.p) | keepTreeNum }}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column label="采食量" min-width="70" align="center">
  89. <template slot-scope="scope">
  90. <span>{{ (scope.row.Srate * scope.row.p) | keepTreeNum }}</span>
  91. </template>
  92. </el-table-column>
  93. </el-table-column>
  94. <el-table-column label="产奶净能(MCal/DM)" min-width="130px" align="center">
  95. <el-table-column prop="nmd" label="配方量" min-width="70" align="center" />
  96. <el-table-column label="TMR料" min-width="70" align="center">
  97. <template slot-scope="scope">
  98. <span>{{ (scope.row.Hrate * scope.row.nmd) | keepTreeNum }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="采食量" min-width="70" align="center">
  102. <template slot-scope="scope">
  103. <span>{{ (scope.row.Srate * scope.row.nmd) | keepTreeNum }}</span>
  104. </template>
  105. </el-table-column>
  106. </el-table-column>
  107. <el-table-column label="粗蛋白(%DM)" min-width="130px" align="center">
  108. <el-table-column prop="cpd" label="配方量" min-width="70" align="center" />
  109. <el-table-column label="TMR料" min-width="70" align="center">
  110. <template slot-scope="scope">
  111. <span>{{ (scope.row.Hrate * scope.row.cpd) | keepTreeNum }}</span>
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="采食量" min-width="70" align="center">
  115. <template slot-scope="scope">
  116. <span>{{ (scope.row.Srate * scope.row.cpd) | keepTreeNum }}</span>
  117. </template>
  118. </el-table-column>
  119. </el-table-column>
  120. <el-table-column label="脂肪(%DM)" min-width="130px" align="center">
  121. <el-table-column prop="fat" label="配方量" min-width="70" align="center" />
  122. <el-table-column label="TMR料" min-width="70" align="center">
  123. <template slot-scope="scope">
  124. <span>{{ (scope.row.Hrate * scope.row.fat) | keepTreeNum }}</span>
  125. </template>
  126. </el-table-column>
  127. <el-table-column label="采食量" min-width="70" align="center">
  128. <template slot-scope="scope">
  129. <span>{{ (scope.row.Srate * scope.row.fat) | keepTreeNum }}</span>
  130. </template>
  131. </el-table-column>
  132. </el-table-column>
  133. <el-table-column label="淀粉(%DM)" min-width="130px" align="center">
  134. <el-table-column prop="starch" label="配方量" min-width="70" align="center" />
  135. <el-table-column label="TMR料" min-width="70" align="center">
  136. <template slot-scope="scope">
  137. <span>{{ (scope.row.Hrate * scope.row.starch) | keepTreeNum }}</span>
  138. </template>
  139. </el-table-column>
  140. <el-table-column label="采食量" min-width="70" align="center">
  141. <template slot-scope="scope">
  142. <span>{{ (scope.row.Srate * scope.row.starch) | keepTreeNum }}</span>
  143. </template>
  144. </el-table-column>
  145. </el-table-column>
  146. <el-table-column label="NDF(%DM)" min-width="130px" align="center">
  147. <el-table-column prop="ndf" label="配方量" min-width="70" align="center" />
  148. <el-table-column label="TMR料" min-width="70" align="center">
  149. <template slot-scope="scope">
  150. <span>{{ (scope.row.Hrate * scope.row.ndf) | keepTreeNum }}</span>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="采食量" min-width="70" align="center">
  154. <template slot-scope="scope">
  155. <span>{{ (scope.row.Srate * scope.row.ndf) | keepTreeNum }}</span>
  156. </template>
  157. </el-table-column>
  158. </el-table-column>
  159. <el-table-column label="NFC(%DM)" min-width="130px" align="center">
  160. <el-table-column prop="nfc" label="配方量" min-width="70" align="center" />
  161. <el-table-column label="TMR料" min-width="70" align="center">
  162. <template slot-scope="scope">
  163. <span>{{ (scope.row.Hrate * scope.row.nfc) | keepTreeNum }}</span>
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="采食量" min-width="70" align="center">
  167. <template slot-scope="scope">
  168. <span>{{ (scope.row.Srate * scope.row.nfc) | keepTreeNum }}</span>
  169. </template>
  170. </el-table-column>
  171. </el-table-column>
  172. <el-table-column label="粗料中的NDF(%DM)" min-width="130px" align="center">
  173. <el-table-column prop="cndf" label="配方量" min-width="70" align="center" />
  174. <el-table-column label="TMR料" min-width="70" align="center">
  175. <template slot-scope="scope">
  176. <span>{{ (scope.row.Hrate * scope.row.cndf) | keepTreeNum }}</span>
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="采食量" min-width="70" align="center">
  180. <template slot-scope="scope">
  181. <span>{{ (scope.row.Srate * scope.row.cndf) | keepTreeNum }}</span>
  182. </template>
  183. </el-table-column>
  184. </el-table-column>
  185. <el-table-column label="ADF(%DM)" min-width="130px" align="center">
  186. <el-table-column prop="adf" label="配方量" min-width="70" align="center" />
  187. <el-table-column label="TMR料" min-width="70" align="center">
  188. <template slot-scope="scope">
  189. <span>{{ (scope.row.Hrate * scope.row.adf) | keepTreeNum }}</span>
  190. </template>
  191. </el-table-column>
  192. <el-table-column label="采食量" min-width="70" align="center">
  193. <template slot-scope="scope">
  194. <span>{{ (scope.row.Srate * scope.row.adf) | keepTreeNum }}</span>
  195. </template>
  196. </el-table-column>
  197. </el-table-column>
  198. <el-table-column label="钙(%DM)" min-width="130px" align="center">
  199. <el-table-column prop="cad" label="配方量" min-width="70" align="center" />
  200. <el-table-column label="TMR料" min-width="70" align="center">
  201. <template slot-scope="scope">
  202. <span>{{ (scope.row.Hrate * scope.row.cad) | keepTreeNum }}</span>
  203. </template>
  204. </el-table-column>
  205. <el-table-column label="采食量" min-width="70" align="center">
  206. <template slot-scope="scope">
  207. <span>{{ (scope.row.Srate * scope.row.cad) | keepTreeNum }}</span>
  208. </template>
  209. </el-table-column>
  210. </el-table-column>
  211. <el-table-column label="磷(%DM)" min-width="130px" align="center">
  212. <el-table-column prop="pd" label="配方量" min-width="70" align="center" />
  213. <el-table-column label="TMR料" min-width="70" align="center">
  214. <template slot-scope="scope">
  215. <span>{{ (scope.row.Hrate * scope.row.pd) | keepTreeNum }}</span>
  216. </template>
  217. </el-table-column>
  218. <el-table-column label="采食量" min-width="70" align="center">
  219. <template slot-scope="scope">
  220. <span>{{ (scope.row.Srate * scope.row.pd) | keepTreeNum }}</span>
  221. </template>
  222. </el-table-column>
  223. </el-table-column>
  224. <el-table-column label="(4.0)饲料转化效率(kg/DM)" min-width="130px" align="center">
  225. <el-table-column prop="trans4f" label="配方量" min-width="70" align="center" />
  226. <el-table-column label="TMR料" min-width="70" align="center">
  227. <template slot-scope="scope">
  228. <span>{{ (scope.row.Hrate * scope.row.trans4f) | keepTreeNum }}</span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column label="采食量" min-width="70" align="center">
  232. <template slot-scope="scope">
  233. <span>{{ (scope.row.Srate * scope.row.trans4f) | keepTreeNum }}</span>
  234. </template>
  235. </el-table-column>
  236. </el-table-column>
  237. <el-table-column label="(3.5)饲料转化效率(kg/DM)" min-width="130px" align="center">
  238. <el-table-column prop="trans35f" label="配方量" min-width="70" align="center" />
  239. <el-table-column label="TMR料" min-width="70" align="center">
  240. <template slot-scope="scope">
  241. <span>{{ (scope.row.Hrate * scope.row.trans35f) | keepTreeNum }}</span>
  242. </template>
  243. </el-table-column>
  244. <el-table-column label="采食量" min-width="70" align="center">
  245. <template slot-scope="scope">
  246. <span>{{ (scope.row.Srate * scope.row.trans35f) | keepTreeNum }}</span>
  247. </template>
  248. </el-table-column>
  249. </el-table-column>
  250. <el-table-column label="精粗比(%)" min-width="130px" align="center">
  251. <el-table-column prop="jcrate" label="配方量" min-width="70" align="center" />
  252. <el-table-column label="TMR料" min-width="70" align="center">
  253. <template slot-scope="scope">
  254. <span>{{ (scope.row.Hrate * scope.row.jcrate) | keepTreeNum }}</span>
  255. </template>
  256. </el-table-column>
  257. <el-table-column label="采食量" min-width="70" align="center">
  258. <template slot-scope="scope">
  259. <span>{{ (scope.row.Srate * scope.row.jcrate) | keepTreeNum }}</span>
  260. </template>
  261. </el-table-column>
  262. </el-table-column>
  263. <el-table-column label="日粮成本(元)" min-width="130px" align="center">
  264. <el-table-column prop="nm" label="配方量" min-width="70" align="center" />
  265. <el-table-column label="TMR料" min-width="70" align="center">
  266. <template slot-scope="scope">
  267. <span>{{ (scope.row.Hrate * scope.row.nm) | keepTreeNum }}</span>
  268. </template>
  269. </el-table-column>
  270. <el-table-column label="采食量" min-width="70" align="center">
  271. <template slot-scope="scope">
  272. <span>{{ (scope.row.Srate * scope.row.nm) | keepTreeNum }}</span>
  273. </template>
  274. </el-table-column>
  275. </el-table-column>
  276. <el-table-column label="干物质成本(元/公斤)" min-width="130px" align="center">
  277. <el-table-column prop="nm" label="配方量" min-width="70" align="center" />
  278. <el-table-column label="TMR料" min-width="70" align="center">
  279. <template slot-scope="scope">
  280. <span>{{ (scope.row.Hrate * scope.row.nm) | keepTreeNum }}</span>
  281. </template>
  282. </el-table-column>
  283. <el-table-column label="采食量" min-width="70" align="center">
  284. <template slot-scope="scope">
  285. <span>{{ (scope.row.Srate * scope.row.nm) | keepTreeNum }}</span>
  286. </template>
  287. </el-table-column>
  288. </el-table-column>
  289. <el-table-column label="日公斤奶成本(元)" min-width="130px" align="center">
  290. <el-table-column prop="nm" label="配方量" min-width="70" align="center" />
  291. <el-table-column label="TMR料" min-width="70" align="center">
  292. <template slot-scope="scope">
  293. <span>{{ (scope.row.Hrate * scope.row.nm) | keepTreeNum }}</span>
  294. </template>
  295. </el-table-column>
  296. <el-table-column label="采食量" min-width="70" align="center">
  297. <template slot-scope="scope">
  298. <span>{{ (scope.row.Srate * scope.row.nm) | keepTreeNum }}</span>
  299. </template>
  300. </el-table-column>
  301. </el-table-column>
  302. <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
  303. <template slot-scope="{row}">
  304. <el-button class="miniPrimary" @click="handleSee(row)">查看</el-button>
  305. </template>
  306. </el-table-column>
  307. </el-table>
  308. <pagination v-show="table.total>0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
  309. </div>
  310. <!-- 查看 -->
  311. <el-dialog :title="textMap[see.dialogStatus]" :destroy-on-close="true" :visible.sync="see.dialogFormVisible" :close-on-click-modal="false" width="90%">
  312. <div class="app-see">
  313. <div class="tableSee">
  314. <el-table
  315. :key="see.table.tableKey"
  316. v-loading="see.table.listLoading"
  317. element-loading-text="给我一点时间"
  318. :data="see.table.list"
  319. border
  320. fit
  321. show-summary
  322. highlight-current-row
  323. style="width: 100%;"
  324. :row-style="rowStyle"
  325. :cell-style="tableCellStyle"
  326. class="elTable table-fixed"
  327. >
  328. <el-table-column label="栏舍/指标" min-width="100px" align="center">
  329. <template slot-scope="{row}">
  330. <a @click="clickFormulaHurdlesIndex(row)">{{ row.barname }}</a>
  331. </template>
  332. </el-table-column>
  333. <el-table-column label="牛头数" min-width="100px" align="center" prop="ccount" />
  334. <el-table-column label="干物质(kg)" min-width="130px" align="center">
  335. <el-table-column prop="dry-nur" label="奶牛需要" min-width="70" align="center" />
  336. <el-table-column prop="dry-F" label="配方量" min-width="70" align="center" />
  337. <el-table-column prop="dry-H" label="TMR料" min-width="70" align="center" />
  338. <el-table-column prop="fat-S" label="采食量" min-width="70" align="center" />
  339. </el-table-column>
  340. <el-table-column label="产奶净能(M)" min-width="130px" align="center">
  341. <el-table-column prop="nm-nur" label="奶牛需要" min-width="70" align="center" />
  342. <el-table-column prop="nm-FT" label="配方量" min-width="70" align="center" />
  343. <el-table-column prop="nm-H" label="TMR料" min-width="70" align="center" />
  344. <el-table-column prop="nm-S" label="采食量" min-width="70" align="center" />
  345. </el-table-column>
  346. <el-table-column label="奶牛能量单位(NND)" min-width="130px" align="center">
  347. <el-table-column prop="nuint-nur" label="奶牛需要" min-width="70" align="center" />
  348. <el-table-column prop="nuint-FT" label="配方量" min-width="70" align="center" />
  349. <el-table-column prop="nuint-H" label="TMR料" min-width="70" align="center" />
  350. <el-table-column prop="nuint-S" label="采食量" min-width="70" align="center" />
  351. </el-table-column>
  352. <el-table-column label="粗蛋白(g)" min-width="130px" align="center">
  353. <el-table-column prop="cp-nur" label="奶牛需要" min-width="70" align="center" />
  354. <el-table-column prop="cp-FT" label="配方量" min-width="70" align="center" />
  355. <el-table-column prop="cp-H" label="TMR料" min-width="70" align="center" />
  356. <el-table-column prop="cp-S" label="采食量" min-width="70" align="center" />
  357. </el-table-column>
  358. <el-table-column label="磷(g)" min-width="130px" align="center">
  359. <el-table-column prop="p-nur" label="奶牛需要" min-width="70" align="center" />
  360. <el-table-column prop="p-FT" label="采食量" min-width="70" align="center" />
  361. <el-table-column prop="p-H" label="配方量" min-width="70" align="center" />
  362. <el-table-column prop="p-S" label="TMR料" min-width="70" align="center" />
  363. </el-table-column>
  364. <el-table-column label="产奶净能(MCal/DM)" min-width="130px" align="center">
  365. <el-table-column prop="nmd-nur" label="奶牛需要" min-width="70" align="center" />
  366. <el-table-column prop="nmd-FT" label="配方量" min-width="70" align="center" />
  367. <el-table-column prop="nmd-H" label="TMR料" min-width="70" align="center" />
  368. <el-table-column prop="nmd-S" label="采食量" min-width="70" align="center" />
  369. </el-table-column>
  370. <el-table-column label="粗蛋白(%DM)" min-width="130px" align="center">
  371. <el-table-column prop="cpd-nur" label="奶牛需要" min-width="70" align="center" />
  372. <el-table-column prop="cpd-FT" label="配方量" min-width="70" align="center" />
  373. <el-table-column prop="cpd-H" label="TMR料" min-width="70" align="center" />
  374. <el-table-column prop="cpd-S" label="采食量" min-width="70" align="center" />
  375. </el-table-column>
  376. <el-table-column label="脂肪(%DM)" min-width="130px" align="center">
  377. <el-table-column prop="fat-nur" label="奶牛需要" min-width="70" align="center" />
  378. <el-table-column prop="fat-FT" label="配方量" min-width="70" align="center" />
  379. <el-table-column prop="fat-H" label="TMR料" min-width="70" align="center" />
  380. <el-table-column prop="fat-S" label="采食量" min-width="70" align="center" />
  381. </el-table-column>
  382. <el-table-column label="淀粉(%DM)" min-width="130px" align="center">
  383. <el-table-column prop="starch-nur" label="奶牛需要" min-width="70" align="center" />
  384. <el-table-column prop="starch-FT" label="配方量" min-width="70" align="center" />
  385. <el-table-column prop="starch-H" label="TMR料" min-width="70" align="center" />
  386. <el-table-column prop="starch-S" label="采食量" min-width="70" align="center" />
  387. </el-table-column>
  388. <el-table-column label="NDF(%DM)" min-width="130px" align="center">
  389. <el-table-column prop="ndf-nur" label="奶牛需要" min-width="70" align="center" />
  390. <el-table-column prop="ndf-FT" label="配方量" min-width="70" align="center" />
  391. <el-table-column prop="ndf-H" label="TMR料" min-width="70" align="center" />
  392. <el-table-column prop="ndf-S" label="采食量" min-width="70" align="center" />
  393. </el-table-column>
  394. <el-table-column label="粗料中的NDF(%DM)" min-width="130px" align="center">
  395. <el-table-column prop="cndf-nur" label="奶牛需要" min-width="70" align="center" />
  396. <el-table-column prop="cndf-FT" label="配方量" min-width="70" align="center" />
  397. <el-table-column prop="cndf-H" label="TMR料" min-width="70" align="center" />
  398. <el-table-column prop="cndf-S" label="采食量" min-width="70" align="center" />
  399. </el-table-column>
  400. <el-table-column label="ADF(%DM)" min-width="130px" align="center">
  401. <el-table-column prop="adf-nur" label="奶牛需要" min-width="70" align="center" />
  402. <el-table-column prop="adf-FT" label="配方量" min-width="70" align="center" />
  403. <el-table-column prop="adf-H" label="TMR料" min-width="70" align="center" />
  404. <el-table-column prop="adf-S" label="采食量" min-width="70" align="center" />
  405. </el-table-column>
  406. <el-table-column label="NFC(%DM)" min-width="130px" align="center">
  407. <el-table-column prop="nfc-nur" label="奶牛需要" min-width="70" align="center" />
  408. <el-table-column prop="nfc-FT" label="配方量" min-width="70" align="center" />
  409. <el-table-column prop="nfc-H" label="TMR料" min-width="70" align="center" />
  410. <el-table-column prop="nfc-S" label="采食量" min-width="70" align="center" />
  411. </el-table-column>
  412. <el-table-column label="钙(%DM)" min-width="130px" align="center">
  413. <el-table-column prop="cad-nur" label="奶牛需要" min-width="70" align="center" />
  414. <el-table-column prop="cad-FT" label="配方量" min-width="70" align="center" />
  415. <el-table-column prop="cad-H" label="TMR料" min-width="70" align="center" />
  416. <el-table-column prop="cad-S" label="采食量" min-width="70" align="center" />
  417. </el-table-column>
  418. <el-table-column label="磷(%DM)" min-width="130px" align="center">
  419. <el-table-column prop="p-nur" label="奶牛需要" min-width="70" align="center" />
  420. <el-table-column prop="p-FT" label="配方量" min-width="70" align="center" />
  421. <el-table-column prop="p-H" label="TMR料" min-width="70" align="center" />
  422. <el-table-column prop="p-S" label="采食量" min-width="70" align="center" />
  423. </el-table-column>
  424. <el-table-column label="(4.0)饲料转化效率(kg/DM)" min-width="130px" align="center">
  425. <el-table-column prop="trans4f-nur" label="奶牛需要" min-width="70" align="center" />
  426. <el-table-column prop="trans4f-FT" label="配方量" min-width="70" align="center" />
  427. <el-table-column prop="trans4f-H" label="TMR料" min-width="70" align="center" />
  428. <el-table-column prop="trans4f-S" label="采食量" min-width="70" align="center" />
  429. </el-table-column>
  430. <el-table-column label="(3.5)饲料转化效率(kg/DM)" min-width="130px" align="center">
  431. <el-table-column prop="trans35f-nur" label="奶牛需要" min-width="70" align="center" />
  432. <el-table-column prop="trans35f-FT" label="配方量" min-width="70" align="center" />
  433. <el-table-column prop="trans35f-H" label="TMR料" min-width="70" align="center" />
  434. <el-table-column prop="trans35f-S" label="采食量" min-width="70" align="center" />
  435. </el-table-column>
  436. <el-table-column label="精粗比(%)" min-width="130px" align="center">
  437. <el-table-column prop="jcrate-nur" label="奶牛需要" min-width="70" align="center" />
  438. <el-table-column prop="jcrate-FT" label="配方量" min-width="70" align="center" />
  439. <el-table-column prop="jcrate-H" label="TMR料" min-width="70" align="center" />
  440. <el-table-column prop="jcrate-S" label="采食量" min-width="70" align="center" />
  441. </el-table-column>
  442. <el-table-column label="日粮成本(元)" min-width="130px" align="center">
  443. <el-table-column prop="softccount" label="奶牛需要" min-width="70" align="center" />
  444. <el-table-column prop="softccount" label="配方量" min-width="70" align="center" />
  445. <el-table-column prop="softccount" label="TMR料" min-width="70" align="center" />
  446. <el-table-column prop="softccount" label="采食量" min-width="70" align="center" />
  447. </el-table-column>
  448. <el-table-column label="干物质成本(元/公斤)" min-width="130px" align="center">
  449. <el-table-column prop="softccount" label="奶牛需要" min-width="70" align="center" />
  450. <el-table-column prop="softccount" label="配方量" min-width="70" align="center" />
  451. <el-table-column prop="softccount" label="TMR料" min-width="70" align="center" />
  452. <el-table-column prop="softccount" label="采食量" min-width="70" align="center" />
  453. </el-table-column>
  454. <el-table-column label="日公斤奶成本(元)" min-width="130px" align="center">
  455. <el-table-column prop="softccount" label="奶牛需要" min-width="70" align="center" />
  456. <el-table-column prop="softccount" label="配方量" min-width="70" align="center" />
  457. <el-table-column prop="softccount" label="TMR料" min-width="70" align="center" />
  458. <el-table-column prop="softccount" label="采食量" min-width="70" align="center" />
  459. </el-table-column>
  460. </el-table>
  461. </div>
  462. </div>
  463. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  464. <el-button class="cancelClose" @click="see.dialogFormVisible = false; ">关闭</el-button>
  465. </div>
  466. </el-dialog>
  467. <!-- 配方详情 -->
  468. <el-dialog :title="textMap[details.dialogStatus]" :destroy-on-close="true" :visible.sync="details.dialogFormVisible" :close-on-click-modal="false" width="90%">
  469. <div class="details">
  470. <el-form ref="temp" :rules="details.rules" :model="details.temp" label-position="right" label-width="120px" style="width: 100%;margin-bottom:30px">
  471. <el-row>
  472. <el-col :span="8">
  473. <el-form-item label="历史记录时间:" prop="cowclassid">
  474. <el-select v-model="details.temp.cowclassid" placeholder="请选择历史记录时间" class="filter-item" style="width:100%;">
  475. <el-option v-for="item in livestockTypeList" :key="item.id" :label="item.name" :value="item.id" />
  476. </el-select>
  477. </el-form-item>
  478. </el-col>
  479. </el-row>
  480. </el-form>
  481. <div class="table1">
  482. <div ref="templateDialog" class="templateDialog">
  483. <p class="recipeTemplate" />
  484. </div>
  485. <el-table
  486. :key="details.table1.tableKey"
  487. v-loading="details.table1.listLoading"
  488. element-loading-text="给我一点时间"
  489. :data="details.table1.list"
  490. border
  491. fit
  492. highlight-current-row
  493. style="width: 100%;"
  494. :row-style="rowStyle"
  495. :cell-style="cellStyle"
  496. class="elTable table-fixed"
  497. >
  498. <el-table-column label="配方名称" min-width="100px" align="center" prop="tname" />
  499. <el-table-column label="牲畜类别" min-width="100px" align="center" prop="ccname" />
  500. <el-table-column label="配方类型" min-width="100px" align="center" prop="fttype" />
  501. <el-table-column label="来源" min-width="100px" align="center" prop="source" />
  502. </el-table>
  503. </div>
  504. <div class="table2 detailDialog">
  505. <p class="recipeDetail" />
  506. <el-table
  507. :key="details.table2.tableKey"
  508. v-loading="details.table2.listLoading"
  509. element-loading-text="给我一点时间"
  510. :data="details.table2.list"
  511. border
  512. fit
  513. show-summary
  514. highlight-current-row
  515. style="width: 100%;"
  516. :row-style="rowStyle"
  517. :cell-style="cellStyle"
  518. class="elTable table-fixed"
  519. >
  520. <el-table-column label="序号" type="index" width="50" />
  521. <el-table-column label="饲料组" min-width="100px" align="center" prop="feedgroup" />
  522. <el-table-column label="饲料名称" min-width="100px" align="center" prop="fname" />
  523. <el-table-column label="重量(KG)" min-width="100px" align="center" prop="fweight" />
  524. <el-table-column label="搅拌延时(min)" min-width="100px" align="center" prop="autosecondname" />
  525. <el-table-column label="是否锁定牛头数比例" min-width="100px" align="center" prop="islockcount" />
  526. <el-table-column label="顺序" min-width="100px" align="center" prop="sort" />
  527. </el-table>
  528. </div>
  529. </div>
  530. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  531. <el-button class="cancelClose" @click="details.dialogFormVisible = false; ">关闭</el-button>
  532. </div>
  533. </el-dialog>
  534. </div>
  535. </template>
  536. <script>
  537. import { GetDataByName, GETNurJudgeRport } from '@/api/common'
  538. import Cookies from 'js-cookie'
  539. import Pagination from '@/components/Pagination'
  540. import { parseTime } from '@/utils/index.js'
  541. export default {
  542. name: 'FormulationEvaluation',
  543. components: { Pagination },
  544. filters: {
  545. keepTreeNum(value) {
  546. value = Number(value)
  547. return value.toFixed(3)
  548. }
  549. },
  550. data() {
  551. return {
  552. livestockTypeList: [{ id: 0, name: '2020-01-01' }],
  553. table: {
  554. getdataListParm: {
  555. name: 'judgenurFTReport',
  556. page: 1,
  557. offset: 1,
  558. pagecount: 10,
  559. returntype: 'Map',
  560. parammaps: {
  561. pastureid: Cookies.get('pastureid'),
  562. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  563. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  564. inputDatetime: [new Date(), new Date()]
  565. }
  566. },
  567. tableKey: 1,
  568. list: [],
  569. total: 0,
  570. listLoading: true,
  571. temp: {}
  572. },
  573. see: {
  574. dialogFormVisible: false,
  575. dialogStatus: '',
  576. temp: {},
  577. rules: {},
  578. table: {
  579. tableKey: 0,
  580. list: [],
  581. total: 0,
  582. listLoading: true,
  583. getdataListParm: {
  584. name: 'judgenurFTReport',
  585. page: 1,
  586. offset: 1,
  587. pagecount: 0,
  588. returntype: 'Map',
  589. parammaps: {
  590. name: 'judgenurBarBmReport',
  591. name1: 'judgenurBarHSL'
  592. }
  593. }
  594. }
  595. },
  596. details: {
  597. dialogFormVisible: false,
  598. dialogStatus: '',
  599. temp: {},
  600. rules: {},
  601. table1: {
  602. tableKey: 0,
  603. list: [],
  604. total: 0,
  605. listLoading: true,
  606. getdataListParm: {
  607. name: 'getFTListDateHis',
  608. page: 1,
  609. offset: 1,
  610. pagecount: 10,
  611. returntype: 'Map',
  612. parammaps: {
  613. pastureid: '',
  614. id: ''
  615. }
  616. }
  617. },
  618. table2: {
  619. tableKey: 0,
  620. list: [],
  621. total: 0,
  622. listLoading: true,
  623. getdataListParm: {
  624. name: 'getFTdetailListDate',
  625. page: 1,
  626. offset: 1,
  627. pagecount: 10,
  628. returntype: 'Map',
  629. parammaps: {
  630. pastureid: '',
  631. ftid: '',
  632. date: ''
  633. }
  634. }
  635. }
  636. },
  637. textMap: {
  638. see: '',
  639. details: '配方详情'
  640. },
  641. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  642. cellStyle: { padding: 0 + 'px' }
  643. }
  644. },
  645. created() {
  646. this.getList()
  647. },
  648. methods: {
  649. getList() {
  650. this.table.listLoading = true
  651. GetDataByName(this.table.getdataListParm).then(response => {
  652. console.log('table数据', response.data.list)
  653. if (response.data.list !== null) {
  654. this.table.list = response.data.list
  655. this.table.pageNum = response.data.pageNum
  656. this.table.pageSize = response.data.pageSize
  657. this.table.total = response.data.total
  658. } else {
  659. this.table.list = []
  660. }
  661. setTimeout(() => {
  662. this.table.listLoading = false
  663. }, 100)
  664. })
  665. },
  666. handleBefore() {
  667. if (this.table.getdataListParm.parammaps.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  668. var start = new Date(this.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
  669. var stop = new Date(this.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
  670. this.table.getdataListParm.parammaps.inputDatetime.length = 0
  671. this.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
  672. this.$forceUpdate()
  673. }
  674. },
  675. handleNext() {
  676. if (this.nutritional.tab2.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  677. var start2 = new Date(this.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
  678. var stop2 = new Date(this.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
  679. this.table.getdataListParm.parammaps.inputDatetime.length = 0
  680. this.table.getdataListParm.parammaps.inputDatetime.push(start2, stop2)
  681. this.$forceUpdate()
  682. }
  683. },
  684. tableCellStyle({ row, column, rowIndex, columnIndex }) {
  685. if (columnIndex === 0) {
  686. return {
  687. textDecoration: 'underline'
  688. }
  689. }
  690. return {
  691. textDecoration: 'none'
  692. }
  693. },
  694. clickFormulaTemplateIndex(row) {
  695. console.log('点击了配方模板/指标')
  696. this.details.dialogStatus = 'details'
  697. this.details.dialogFormVisible = true
  698. this.details.table1.getdataListParm.parammaps.pastureid = row.pastureid
  699. this.details.table1.getdataListParm.parammaps.id = row.ftid
  700. this.details.table2.getdataListParm.parammaps.pastureid = row.pastureid
  701. this.details.table2.getdataListParm.parammaps.ftid = row.ftid
  702. this.details.table2.getdataListParm.parammaps.date = parseTime(new Date(), '{y}-{m}-{d}')
  703. this.getListDetails1()
  704. },
  705. getListDetails1() {
  706. this.details.table1.listLoading = true
  707. GetDataByName(this.details.table1.getdataListParm).then(response => {
  708. console.log('table数据', response.data.list)
  709. if (response.data.list !== null) {
  710. this.details.table1.list = response.data.list
  711. this.details.table1.pageNum = response.data.pageNum
  712. this.details.table1.pageSize = response.data.pageSize
  713. this.details.table1.total = response.data.total
  714. this.getListDetails2()
  715. } else {
  716. this.details.table1.list = []
  717. }
  718. setTimeout(() => {
  719. this.details.table1.listLoading = false
  720. }, 100)
  721. })
  722. },
  723. getListDetails2() {
  724. this.details.table2.listLoading = true
  725. GetDataByName(this.details.table2.getdataListParm).then(response => {
  726. console.log('table数据', response.data.list)
  727. if (response.data.list !== null) {
  728. this.details.table2.list = response.data.list
  729. this.details.table2.pageNum = response.data.pageNum
  730. this.details.table2.pageSize = response.data.pageSize
  731. this.details.table2.total = response.data.total
  732. } else {
  733. this.details.table2.list = []
  734. }
  735. setTimeout(() => {
  736. this.details.table2.listLoading = false
  737. }, 100)
  738. })
  739. },
  740. clickFormulaHurdlesIndex(row) {
  741. console.log('点击了栏舍/指标')
  742. this.$router.push('/formulationPlan/DhedFormula')
  743. },
  744. handleSee(row) {
  745. console.log('查看', row)
  746. this.textMap.see = '栏舍详情——' + row.tname
  747. this.see.dialogStatus = 'see'
  748. this.see.dialogFormVisible = true
  749. this.see.table.getdataListParm.parammaps.ftid = row.ftid
  750. this.see.table.getdataListParm.parammaps.pastureid = row.pastureid
  751. this.see.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  752. this.see.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  753. this.getListSee()
  754. },
  755. getListSee() {
  756. this.see.table.listLoading = true
  757. GETNurJudgeRport(this.see.table.getdataListParm).then(response => {
  758. if (response.data !== null) {
  759. console.log('table数据', response.data)
  760. this.see.table.list = response.data
  761. this.see.table.pageNum = response.data.pageNum
  762. this.see.table.pageSize = response.data.pageSize
  763. this.see.table.total = response.data.total
  764. } else {
  765. this.see.table.list = []
  766. }
  767. setTimeout(() => {
  768. this.see.table.listLoading = false
  769. }, 100)
  770. })
  771. }
  772. }
  773. }
  774. </script>
  775. <style lang="scss" scoped>
  776. .search {clear: both; }
  777. .table { margin-top: 10px; }
  778. .table2{margin-top: 20px;}
  779. .templateDialog{
  780. background: #fff;
  781. position: relative;
  782. .recipeTemplate{
  783. z-index: 1;
  784. width: 72px;
  785. height: 70px;
  786. position: absolute;
  787. background: url(../../../assets/images/bg1.jpg) no-repeat;
  788. right: 0;
  789. top: 0;
  790. margin: 0;
  791. }
  792. }
  793. .detailDialog{
  794. background: #fff;
  795. position: relative;
  796. .recipeDetail{
  797. z-index: 1;
  798. width: 72px;
  799. height: 70px;
  800. position: absolute;
  801. background: url(../../../assets/images/bg2.jpg) no-repeat;
  802. right: 0;
  803. top: 0;
  804. margin: 0;
  805. }
  806. }
  807. </style>
  808. <style>
  809. .tableSee .el-table { overflow-x: auto; }
  810. .tableSee .el-table__header-wrapper,
  811. .tableSee .el-table__body-wrapper,
  812. .tableSee .el-table__footer-wrapper { overflow: visible; }
  813. .tableSee .el-table::after { position: relative; }
  814. .tableSee .el-table--scrollable-x .el-table__body-wrapper { overflow: visible; }
  815. </style>