555d1872a6a5e15184849ce6c6d43ca00073a28e.svn-base 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  1. <template>
  2. <div class="app-container">
  3. <el-tabs v-model="activeName" @tab-click="handleTabClick">
  4. <el-tab-pane label="库存统计" name="first">
  5. <div class="search">
  6. <el-date-picker v-model="tab.table.getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="float: left;width: 250px;margin-bottom:10px;" />
  7. <el-input v-model="tab.table.getdataListParm.parammaps.source" class="filter-item" style="float: left;width: 245px;margin-bottom:10px;" placeholder="饲料名称" />
  8. <el-button class="successBorder" style="float: left;margin-left: 10px;margin-bottom:10px;" @click="handleSearch">查询</el-button>
  9. <el-button class="export" style="float: right;margin-right: 10px;margin-bottom:10px;" @click="handleExport">导出</el-button>
  10. </div>
  11. <div class="table">
  12. <el-table
  13. :key="tab.table.tableKey"
  14. v-loading="tab.table.listLoading"
  15. element-loading-text="给我一点时间"
  16. :data="tab.table.list"
  17. border
  18. fit
  19. highlight-current-row
  20. style="width: 100%;"
  21. :row-style="rowStyle"
  22. :cell-style="cellStyle"
  23. class="elTable table-fixed"
  24. >
  25. <el-table-column label="饲料名称" min-width="130px" align="center">
  26. <template slot-scope="scope">
  27. <span>{{ scope.row.bigcowclass }}</span>
  28. </template>
  29. </el-table-column>
  30. <el-table-column label="期初" min-width="130px" align="center">
  31. <el-table-column prop="bigcowclass" align="center" label="期初库存(kg)" min-width="120" />
  32. <el-table-column prop="bigcowclass" align="center" label="期初金额(元)" min-width="120" />
  33. </el-table-column>
  34. <el-table-column label="用量" min-width="110px" align="center">
  35. <el-table-column prop="bigcowclass" align="center" label="入库重量(kg)" min-width="120" />
  36. <el-table-column prop="bigcowclass" align="center" label="系统出库重量(kg)" min-width="120" />
  37. <el-table-column prop="bigcowclass" align="center" label="人工用料重量(kg)" min-width="120" />
  38. <el-table-column prop="bigcowclass" align="center" label="损耗重量(kg)" min-width="120" />
  39. </el-table-column>
  40. <el-table-column label="期末" min-width="130px" align="center">
  41. <el-table-column prop="bigcowclass" align="center" label="期末库存(kg)" min-width="120" />
  42. <el-table-column prop="bigcowclass" align="center" label="期末金额(元)" min-width="120" />
  43. </el-table-column>
  44. </el-table>
  45. <pagination v-show="tab.table.total>=0" :total="tab.table.total" :page.sync="tab.table.getdataListParm.offset" :limit.sync="tab.table.getdataListParm.pagecount" @pagination="getTabList" />
  46. </div>
  47. </el-tab-pane>
  48. <el-tab-pane label="用料分析" name="second">
  49. <div class="search">
  50. <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" />
  51. <span style="margin-left: 10px;">统计类型:</span>
  52. <el-radio v-model="tab2.radio" label="1" @change="changeRadio2">牲畜类别</el-radio>
  53. <el-radio v-model="tab2.radio" label="2" @change="changeRadio2">栏舍名称</el-radio>
  54. <el-radio v-model="tab2.radio" label="3" @change="changeRadio2">日期</el-radio>
  55. <el-radio v-model="tab2.radio" label="4" @change="changeRadio2">TMR设备编号</el-radio>
  56. <el-radio v-model="tab2.radio" label="5" @change="changeRadio2">班次</el-radio>
  57. <el-radio v-model="tab2.radio" label="6" @change="changeRadio2">车次</el-radio>
  58. <el-input v-if="tab2.isRadio1" v-model="tab2.table.getdataListParm.parammaps.source" class="filter-item" style="width: 245px;" placeholder="牲畜类别" />
  59. <el-input v-if="tab2.isRadio2" v-model="tab2.table.getdataListParm.parammaps.source" class="filter-item" style="width: 245px;" placeholder="栏舍名称" />
  60. <el-input v-if="tab2.isRadio3" v-model="tab2.table.getdataListParm.parammaps.source" class="filter-item" style="width: 245px;" placeholder="日期" />
  61. <el-input v-if="tab2.isRadio4" v-model="tab2.table.getdataListParm.parammaps.source" class="filter-item" style="width: 245px;" placeholder="TMR设备编号" />
  62. <el-input v-if="tab2.isRadio5" v-model="tab2.table.getdataListParm.parammaps.source" class="filter-item" style="width: 245px;" placeholder="班次" />
  63. <el-input v-if="tab2.isRadio6" v-model="tab2.table.getdataListParm.parammaps.source" class="filter-item" style="width: 245px;" placeholder="车次" />
  64. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  65. </div>
  66. <el-table :data="tab2.table.list" max-height="420">
  67. <el-table-column v-for="item in tab2.table.tableConfig" :key="item.id" align="center" :label="item.label" :prop="item.prop" :width="item.width">
  68. <el-table-column v-for="item1 in item.children" v-if="item.children || item.children.length>0" :key="item1.id" align="center" :label="item1.label" :prop="item1.prop" :width="item1.width">
  69. <el-table-column v-for="item2 in item1.children" v-if="item1.children || item1.children.length>0" :key="item2.id" :label="item2.label" :prop="item2.prop" :width="item2.width" />
  70. </el-table-column>
  71. </el-table-column>
  72. </el-table>
  73. </el-tab-pane>
  74. <el-tab-pane label="价格分析" name="third">
  75. <div class="search">
  76. <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" />
  77. <span style="margin-left: 10px;">统计类型:</span>
  78. <el-radio v-model="tab3.radio" label="1" @change="changeRadio3">牲畜类别</el-radio>
  79. <el-radio v-model="tab3.radio" label="2" @change="changeRadio3">栏舍名称</el-radio>
  80. <el-radio v-model="tab3.radio" label="3" @change="changeRadio3">日期</el-radio>
  81. <el-radio v-model="tab3.radio" label="4" @change="changeRadio3">TMR设备编号</el-radio>
  82. <el-input v-model="tab3.table.getdataListParm.parammaps.sourc3" style="width: 245px;" placeholder="栏舍名称" />
  83. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  84. </div>
  85. <el-table :data="tab3.table.list" max-height="420">
  86. <el-table-column v-for="item in tab3.table.tableConfig" :key="item.id" align="center" :label="item.label" :prop="item.prop" :width="item.width">
  87. <el-table-column v-for="item1 in item.children" v-if="item.children || item.children.length>0" :key="item1.id" align="center" :label="item1.label" :prop="item1.prop" :width="item1.width">
  88. <el-table-column v-for="item2 in item1.children" v-if="item1.children || item1.children.length>0" :key="item2.id" :label="item2.label" :prop="item2.prop" :width="item2.width" />
  89. </el-table-column>
  90. </el-table-column>
  91. </el-table>
  92. </el-tab-pane>
  93. </el-tabs>
  94. </div>
  95. </div>
  96. </template>
  97. <script>
  98. import { GetDataByName } from '@/api/common'
  99. import Cookies from 'js-cookie'
  100. import { parseTime } from '@/utils/index.js'
  101. import Pagination from '@/components/Pagination'
  102. export default {
  103. name: 'InventoryManagement',
  104. components: { Pagination },
  105. data() {
  106. return {
  107. fileComment: [{ 'label': '商务文件评分', 'children': [{ 'label': '1' }, { 'label': '2' }, { 'label': '管理员' }] }],
  108. activeName: 'first',
  109. tab: {
  110. table: {
  111. getdataListParm: {
  112. name: 'getBarmilkList',
  113. page: 1,
  114. offset: 1,
  115. pagecount: 10,
  116. returntype: 'Map',
  117. parammaps: {
  118. pastureid: Cookies.get('pastureid'),
  119. startTime: '',
  120. stopTime: '',
  121. inputDatetime: ''
  122. }
  123. },
  124. tableKey: 1,
  125. list: [],
  126. total: 0,
  127. listLoading: true
  128. }
  129. },
  130. tab2: {
  131. table: {
  132. getdataListParm: {
  133. name: 'getBarmilkList',
  134. page: 1,
  135. offset: 1,
  136. pagecount: 10,
  137. returntype: 'Map',
  138. parammaps: {
  139. pastureid: Cookies.get('pastureid'),
  140. startTime: '',
  141. stopTime: '',
  142. inputDatetime: ''
  143. }
  144. },
  145. tableKey: 1,
  146. list: [],
  147. tableConfig: [],
  148. total: 0,
  149. listLoading: true
  150. },
  151. radio: '1',
  152. isRadio1: true,
  153. isRadio2: false,
  154. isRadio3: false,
  155. isRadio4: false,
  156. isRadio5: false,
  157. isRadio6: false
  158. },
  159. tab3: {
  160. table: {
  161. getdataListParm: {
  162. name: 'getBarmilkList',
  163. page: 1,
  164. offset: 1,
  165. pagecount: 10,
  166. returntype: 'Map',
  167. parammaps: {
  168. pastureid: Cookies.get('pastureid'),
  169. startTime: '',
  170. stopTime: '',
  171. inputDatetime: ''
  172. }
  173. },
  174. tableKey: 1,
  175. list: [],
  176. tableConfig: [],
  177. total: 0,
  178. listLoading: true
  179. },
  180. radio: '1'
  181. },
  182. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  183. cellStyle: { padding: 0 + 'px' }
  184. }
  185. },
  186. created() {
  187. this.getTabList()
  188. },
  189. methods: {
  190. handleTabClick() {
  191. if (this.activeName == 'first') {
  192. this.getTabList()
  193. } else if (this.activeName == 'second') {
  194. this.getTab2List()
  195. } else if (this.activeName == 'third') {
  196. this.getTab3List()
  197. }
  198. },
  199. getTabList() {
  200. this.tab.table.listLoading = true
  201. GetDataByName(this.tab.table.getdataListParm).then(response => {
  202. console.log('库存统计table数据', response.data.list)
  203. if (response.data.list !== null) {
  204. this.tab.table.list = response.data.list
  205. this.tab.table.total = response.data.total
  206. } else {
  207. this.tab.table.list = []
  208. }
  209. setTimeout(() => {
  210. this.tab.table.listLoading = false
  211. }, 100)
  212. })
  213. },
  214. handleSearch() {},
  215. handleExport() {},
  216. getTab2List() {
  217. this.tab2.table.listLoading = true
  218. GetDataByName(this.tab2.table.getdataListParm).then(response => {
  219. console.log('库存统计table数据', response.data.list)
  220. this.tab2.table.list = [
  221. {
  222. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  223. }, {
  224. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  225. }, {
  226. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  227. }, {
  228. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  229. }
  230. ],
  231. this.tab2.table.tableConfig = [{
  232. id: 90, label: '饲料名称', prop: '', width: '',
  233. children: [{ id: 91, label: '牲畜类别', prop: 'districtName', width: '' }]
  234. }, {
  235. id: 100, label: '饲料01', prop: '', width: '',
  236. children: [
  237. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  238. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  239. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  240. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  241. ]
  242. }, {
  243. id: 110, label: '饲料02', prop: '', width: '',
  244. children: [
  245. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  246. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  247. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  248. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  249. ]
  250. }]
  251. // if (response.data.list !== null) {
  252. // this.tab2.table.list = response.data.list
  253. // this.tab2.table.total = response.data.total
  254. // } else {
  255. // this.tab2.table.list = []
  256. // }
  257. setTimeout(() => {
  258. this.tab2.table.listLoading = false
  259. }, 100)
  260. })
  261. },
  262. changeRadio2() {
  263. console.log(this.tab.radio)
  264. if (this.tab2.radio == '1') {
  265. this.tab2.isRadio1 = true,
  266. this.tab2.isRadio2 = false,
  267. this.tab2.isRadio3 = false,
  268. this.tab2.isRadio4 = false,
  269. this.tab2.isRadio5 = false,
  270. this.tab2.isRadio6 = false,
  271. this.tab2.table.list = [
  272. {
  273. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  274. }, {
  275. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  276. }, {
  277. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  278. }, {
  279. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  280. }
  281. ],
  282. this.tab2.table.tableConfig = [{
  283. id: 90, label: '饲料名称', prop: '', width: '',
  284. children: [{ id: 91, label: '牲畜类别', prop: 'districtName', width: '' }]
  285. }, {
  286. id: 100, label: '饲料01', prop: '', width: '',
  287. children: [
  288. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  289. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  290. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  291. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  292. ]
  293. }, {
  294. id: 110, label: '饲料02', prop: '', width: '',
  295. children: [
  296. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  297. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  298. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  299. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  300. ]
  301. }]
  302. } else if (this.tab2.radio == '2') {
  303. this.tab2.isRadio1 = false,
  304. this.tab2.isRadio2 = true,
  305. this.tab2.isRadio3 = false,
  306. this.tab2.isRadio4 = false,
  307. this.tab2.isRadio5 = false,
  308. this.tab2.isRadio6 = false,
  309. this.tab2.table.list = [
  310. {
  311. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  312. }, {
  313. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  314. }, {
  315. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  316. }, {
  317. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  318. }
  319. ],
  320. this.tab2.table.tableConfig = [{
  321. id: 90, label: '饲料名称', prop: '', width: '',
  322. children: [{ id: 91, label: '栏舍名称', prop: 'districtName', width: '' }]
  323. }, {
  324. id: 100, label: '饲料01', prop: '', width: '',
  325. children: [
  326. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  327. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  328. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  329. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  330. ]
  331. }, {
  332. id: 110, label: '饲料02', prop: '', width: '',
  333. children: [
  334. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  335. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  336. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  337. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  338. ]
  339. }]
  340. } else if (this.tab2.radio == '3') {
  341. this.tab2.isRadio1 = false,
  342. this.tab2.isRadio2 = false,
  343. this.tab2.isRadio3 = true,
  344. this.tab2.isRadio4 = false,
  345. this.tab2.isRadio5 = false,
  346. this.tab2.isRadio6 = false,
  347. this.tab2.table.list = [
  348. {
  349. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  350. }, {
  351. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  352. }, {
  353. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  354. }, {
  355. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  356. }
  357. ],
  358. this.tab2.table.tableConfig = [{
  359. id: 90, label: '饲料名称', prop: '', width: '',
  360. children: [{ id: 91, label: '日期', prop: 'districtName', width: '' }]
  361. }, {
  362. id: 100, label: '饲料01', prop: '', width: '',
  363. children: [
  364. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  365. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  366. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  367. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  368. ]
  369. }, {
  370. id: 110, label: '饲料02', prop: '', width: '',
  371. children: [
  372. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  373. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  374. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  375. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  376. ]
  377. }]
  378. } else if (this.tab2.radio == '4') {
  379. this.tab2.isRadio1 = false,
  380. this.tab2.isRadio2 = false,
  381. this.tab2.isRadio3 = false,
  382. this.tab2.isRadio4 = true,
  383. this.tab2.isRadio5 = false,
  384. this.tab2.isRadio6 = false,
  385. this.tab2.table.list = [
  386. {
  387. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  388. }, {
  389. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  390. }, {
  391. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  392. }, {
  393. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  394. }
  395. ],
  396. this.tab2.table.tableConfig = [{
  397. id: 90, label: '饲料名称', prop: '', width: '',
  398. children: [{ id: 91, label: 'TMR设备编号', prop: 'districtName', width: '' }]
  399. }, {
  400. id: 100, label: '饲料01', prop: '', width: '',
  401. children: [
  402. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  403. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  404. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  405. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  406. ]
  407. }, {
  408. id: 110, label: '饲料02', prop: '', width: '',
  409. children: [
  410. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  411. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  412. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  413. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  414. ]
  415. }]
  416. } else if (this.tab2.radio == '5') {
  417. this.tab2.isRadio1 = false,
  418. this.tab2.isRadio2 = false,
  419. this.tab2.isRadio3 = false,
  420. this.tab2.isRadio4 = false,
  421. this.tab2.isRadio5 = true,
  422. this.tab2.isRadio6 = false,
  423. this.tab2.table.list = [
  424. {
  425. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  426. }, {
  427. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  428. }, {
  429. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  430. }, {
  431. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  432. }
  433. ],
  434. this.tab2.table.tableConfig = [{
  435. id: 90, label: '饲料名称', prop: '', width: '',
  436. children: [{ id: 91, label: '班次', prop: 'districtName', width: '' }]
  437. }, {
  438. id: 100, label: '饲料01', prop: '', width: '',
  439. children: [
  440. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  441. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  442. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  443. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  444. ]
  445. }, {
  446. id: 110, label: '饲料02', prop: '', width: '',
  447. children: [
  448. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  449. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  450. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  451. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  452. ]
  453. }]
  454. } else if (this.tab2.radio == '6') {
  455. this.tab2.isRadio1 = false,
  456. this.tab2.isRadio2 = false,
  457. this.tab2.isRadio3 = false,
  458. this.tab2.isRadio4 = false,
  459. this.tab2.isRadio5 = false,
  460. this.tab2.isRadio6 = true,
  461. this.tab2.table.list = [
  462. {
  463. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  464. }, {
  465. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  466. }, {
  467. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  468. }, {
  469. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  470. }
  471. ],
  472. this.tab2.table.tableConfig = [{
  473. id: 90, label: '饲料名称', prop: '', width: '',
  474. children: [{ id: 91, label: '车次', prop: 'districtName', width: '' }]
  475. }, {
  476. id: 100, label: '饲料01', prop: '', width: '',
  477. children: [
  478. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  479. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  480. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  481. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  482. ]
  483. }, {
  484. id: 110, label: '饲料02', prop: '', width: '',
  485. children: [
  486. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  487. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  488. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  489. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  490. ]
  491. }]
  492. }
  493. },
  494. getTab3List() {
  495. this.tab3.table.listLoading = true
  496. GetDataByName(this.tab3.table.getdataListParm).then(response => {
  497. console.log('库存统计table数据', response.data.list)
  498. this.tab3.table.list = [
  499. {
  500. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  501. }, {
  502. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  503. }, {
  504. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  505. }, {
  506. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  507. }
  508. ],
  509. this.tab3.table.tableConfig = [{
  510. id: 90, label: '饲料名称', prop: '', width: '',
  511. children: [{ id: 91, label: '牲畜类别', prop: 'districtName', width: '' }]
  512. }, {
  513. id: 100, label: '饲料01', prop: '', width: '',
  514. children: [
  515. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  516. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  517. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  518. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  519. ]
  520. }, {
  521. id: 110, label: '饲料02', prop: '', width: '',
  522. children: [
  523. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  524. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  525. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  526. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  527. ]
  528. }]
  529. // if (response.data.list !== null) {
  530. // this.tab2.table.list = response.data.list
  531. // this.tab2.table.total = response.data.total
  532. // } else {
  533. // this.tab2.table.list = []
  534. // }
  535. setTimeout(() => {
  536. this.tab3.table.listLoading = false
  537. }, 100)
  538. })
  539. },
  540. changeRadio3() {
  541. console.log(this.tab.radio)
  542. if (this.tab3.radio == '1') {
  543. this.tab3.table.list = [
  544. {
  545. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  546. }, {
  547. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  548. }, {
  549. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  550. }, {
  551. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  552. }
  553. ],
  554. this.tab3.table.tableConfig = [{
  555. id: 90, label: '饲料名称', prop: '', width: '',
  556. children: [{ id: 91, label: '牲畜类别', prop: 'districtName', width: '' }]
  557. }, {
  558. id: 100, label: '饲料01', prop: '', width: '',
  559. children: [
  560. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  561. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  562. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  563. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  564. ]
  565. }, {
  566. id: 110, label: '饲料02', prop: '', width: '',
  567. children: [
  568. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  569. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  570. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  571. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  572. ]
  573. }]
  574. } else if (this.tab3.radio == '2') {
  575. this.tab3.table.list = [
  576. {
  577. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  578. }, {
  579. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  580. }, {
  581. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  582. }, {
  583. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  584. }
  585. ],
  586. this.tab3.table.tableConfig = [{
  587. id: 90, label: '饲料名称', prop: '', width: '',
  588. children: [{ id: 91, label: '栏舍名称', prop: 'districtName', width: '' }]
  589. }, {
  590. id: 100, label: '饲料01', prop: '', width: '',
  591. children: [
  592. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  593. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  594. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  595. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  596. ]
  597. }, {
  598. id: 110, label: '饲料02', prop: '', width: '',
  599. children: [
  600. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  601. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  602. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  603. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  604. ]
  605. }]
  606. } else if (this.tab3.radio == '3') {
  607. this.tab3.table.list = [
  608. {
  609. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  610. }, {
  611. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  612. }, {
  613. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  614. }, {
  615. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  616. }
  617. ],
  618. this.tab3.table.tableConfig = [{
  619. id: 90, label: '饲料名称', prop: '', width: '',
  620. children: [{ id: 91, label: '日期', prop: 'districtName', width: '' }]
  621. }, {
  622. id: 100, label: '饲料01', prop: '', width: '',
  623. children: [
  624. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  625. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  626. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  627. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  628. ]
  629. }, {
  630. id: 110, label: '饲料02', prop: '', width: '',
  631. children: [
  632. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  633. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  634. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  635. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  636. ]
  637. }]
  638. } else if (this.tab3.radio == '4') {
  639. this.tab3.table.list = [
  640. {
  641. 'districtName': 10, 'timeDimension1': '00001', 'timeDimension2': '00002', 'timeDimension3': '00003', 'timeDimension4': '00004'
  642. }, {
  643. 'districtName': 11, 'timeDimension1': '11111', 'timeDimension2': '11112', 'timeDimension3': '11113', 'timeDimension4': '11114'
  644. }, {
  645. 'districtName': 12, 'timeDimension1': '22221', 'timeDimension2': '22222', 'timeDimension3': '22223', 'timeDimension4': '22224'
  646. }, {
  647. 'districtName': 13, 'timeDimension1': '33331', 'timeDimension2': '33332', 'timeDimension3': '33333', 'timeDimension4': '33334'
  648. }
  649. ],
  650. this.tab3.table.tableConfig = [{
  651. id: 90, label: '饲料名称', prop: '', width: '',
  652. children: [{ id: 91, label: 'TMR设备编号', prop: 'districtName', width: '' }]
  653. }, {
  654. id: 100, label: '饲料01', prop: '', width: '',
  655. children: [
  656. { id: 101, label: '理论', prop: 'timeDimension1', width: '' },
  657. { id: 102, label: '实际', prop: 'timeDimension2', width: '' },
  658. { id: 103, label: '误差值', prop: 'timeDimension2', width: '' },
  659. { id: 104, label: '误差率', prop: 'timeDimension2', width: '' }
  660. ]
  661. }, {
  662. id: 110, label: '饲料02', prop: '', width: '',
  663. children: [
  664. { id: 111, label: '理论', prop: 'timeDimension3', width: '' },
  665. { id: 112, label: '实际', prop: 'timeDimension4', width: '' },
  666. { id: 113, label: '误差值', prop: 'timeDimension2', width: '' },
  667. { id: 114, label: '误差率', prop: 'timeDimension2', width: '' }
  668. ]
  669. }]
  670. }
  671. }
  672. }
  673. }
  674. </script>
  675. <style lang="scss" scoped>
  676. .search{margin-bottom:10px;}
  677. </style>