dd4355bb4fc085c0630b37513355d780a15b225e.svn-base 40 KB

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