0e6dfcf985f90a43c39ddc39e2612a19ddd3afbd.svn-base 31 KB

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