7f70c4edfe727887f8e5f752364cbbdce8e0bded.svn-base 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. <template>
  2. <div class="app-container">
  3. <!-- 配方模板表 -->
  4. <div ref="template" class="template">
  5. <p class="recipeTemplate" />
  6. <div class="operation">
  7. <el-button class="success" @click="handleCreate">新生成</el-button>
  8. <el-button class="export" style="float: right;margin-right: 80px;" @click="handleHistoryRecord">历史记录</el-button>
  9. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleMaterialPlan">撒料计划</el-button>
  10. <el-button class="export" style="float: right;margin-right: 10px;" @click="handlePremixedPlan">预混计划</el-button>
  11. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleShedFormula">栏舍配方</el-button>
  12. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleRecipeemplate">配方模板</el-button>
  13. </div>
  14. <div class="search">
  15. <el-date-picker v-model="table.getdataListParm.parammaps.mydate" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :clearable="false" @change="changeDate" />
  16. <el-button class="el-icon-arrow-left elIconArrowLeft" @click="handleBefore" />
  17. <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext" />
  18. <el-select v-model="table.getdataListParm.parammaps.lpplantype" filterable placeholder="计划类型" class="filter-item" clearable style="width: 120px;" @change="changePlanType">
  19. <el-option v-for="item in planTypeList" :key="item.value" :label="item.lable" :value="item.value" />
  20. </el-select>
  21. <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" clearable @change="changeFrequency">
  22. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  23. </el-select>
  24. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="打印类型" class="filter-item" clearable style="width: 120px;">
  25. <el-option v-for="item in printingTypeList" :key="item.value" :label="item.label" :value="item.value" />
  26. </el-select>
  27. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="计划维度" class="filter-item" style="width: 120px;" clearable>
  28. <el-option v-for="item in planningDimensionList" :key="item.value" :label="item.label" :value="item.value" />
  29. </el-select>
  30. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="导出类型" class="filter-item" style="width: 120px;" clearable>
  31. <el-option v-for="item in exportTypeList" :key="item.value" :label="item.label" :value="item.value" />
  32. </el-select>
  33. <el-button class="export" @click="handleExport">导出</el-button>
  34. </div>
  35. <!-- 日执行计划 -->
  36. <div class="table">
  37. <el-table
  38. :key="table.tableKey"
  39. v-loading="table.listLoading"
  40. element-loading-text="给我一点时间"
  41. :data="table.list"
  42. border
  43. fit
  44. highlight-current-row
  45. style="width: 98%;"
  46. :row-style="rowStyle"
  47. :cell-style="cellStyle"
  48. class="elTable table-fixed"
  49. @row-click="tableRowClick"
  50. >
  51. <el-table-column label="序号" align="center" type="index" width="50px" />
  52. <el-table-column label="计划名称" min-width="130px" align="center">
  53. <template slot-scope="scope">
  54. <span>{{ scope.row.projname }}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="计划类型" prop="weight" min-width="130px" align="center" :formatter="lpplantype" />
  58. <el-table-column label="TMR编号" min-width="130px" align="center">
  59. <template slot-scope="scope">
  60. <span>{{ scope.row.tmrtname }}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="驾驶员" min-width="130px" align="center">
  64. <template slot-scope="scope">
  65. <span>{{ scope.row.driver }}</span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="已执行" min-width="130px" align="center">
  69. <template slot-scope="scope">
  70. <span>{{ scope.row.havebutton }}</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="班次" min-width="180px" align="center">
  74. <template slot-scope="scope">
  75. <span>{{ scope.row.times }}</span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="理论量" min-width="180px" align="center">
  79. <template slot-scope="scope">
  80. <span>{{ scope.row.lweight }}</span>
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="时间" min-width="180px" align="center">
  84. <template slot-scope="scope">
  85. <span>{{ scope.row.plantime }}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column label="发料位" min-width="180px" align="left">
  89. <template slot-scope="scope">
  90. <span>{{ scope.row.barnames }}</span>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. </div>
  95. </div>
  96. <!-- 计划内容操作 -->
  97. <div class="content">
  98. <div class="table2">
  99. <p class="contentOperation" />
  100. <div class="content-table">
  101. <el-table
  102. :key="table2.tableKey"
  103. v-loading="table2.listLoading"
  104. element-loading-text="给我一点时间"
  105. :data="table2.list"
  106. fit
  107. highlight-current-row
  108. style="width: 100%;"
  109. height="450"
  110. :row-style="rowStyle"
  111. :cell-style="cellStyle"
  112. class="elTable table-fixed"
  113. >
  114. <el-table-column label="操作序号" min-width="130px" align="center">
  115. <template slot-scope="scope">
  116. <span>{{ scope.row.sort }}</span>
  117. </template>
  118. </el-table-column>
  119. <el-table-column label="饲料名称" prop="fname" min-width="130px" align="center">
  120. <template slot-scope="scope">
  121. <span>{{ scope.row.fname }}</span>
  122. </template>
  123. </el-table-column>
  124. <el-table-column label="设计重量(KG)" prop="weight" min-width="130px" align="center">
  125. <template slot-scope="scope">
  126. <span>{{ scope.row.weight }}</span>
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. </div>
  131. </div>
  132. <div class="table3">
  133. <p class="stallRetails" />
  134. <!-- <div class="stallRetails">
  135. <p>栏舍内容<br>栏舍详情 </p>
  136. </div> -->
  137. <div class="content-table">
  138. <el-table
  139. :key="table3.tableKey"
  140. v-loading="table3.listLoading"
  141. element-loading-text="给我一点时间"
  142. :data="table3.list"
  143. height="450"
  144. fit
  145. highlight-current-row
  146. style="width: 100%;"
  147. :row-style="rowStyle"
  148. :cell-style="cellStyle"
  149. class="elTable table-fixed"
  150. >
  151. <el-table-column label=" 操作序号" min-width="130px" align="center">
  152. <template slot-scope="scope">
  153. <span>{{ scope.row.sort }}</span>
  154. </template>
  155. </el-table-column>
  156. <el-table-column label="栏舍编号" min-width="130px" align="center">
  157. <template slot-scope="scope">
  158. <span>{{ scope.row.fname }}</span>
  159. </template>
  160. </el-table-column>
  161. <el-table-column v-if="table3.getdataListParm.parammaps.lpplantype == 3" label="转投栏舍" min-width="130px" align="center">
  162. <template slot-scope="scope">
  163. <span>{{ scope.row.useinbar }}</span>
  164. </template>
  165. </el-table-column>
  166. <el-table-column v-else label="设计重量(KG)" min-width="130px" align="center">
  167. <template slot-scope="scope">
  168. <span>{{ scope.row.weight }}</span>
  169. </template>
  170. </el-table-column>
  171. </el-table>
  172. </div>
  173. </div>
  174. </div>
  175. <!-- 新生成 -->
  176. <el-dialog :title="textMap[newGeneration.dialogStatus]" :destroy-on-close="true" :visible.sync="newGeneration.dialogFormVisible" :close-on-click-modal="false" width="50%">
  177. <div class="newGeneration">
  178. <el-form ref="temp" :rules="newGeneration.rules" :model="newGeneration.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
  179. <el-row>
  180. <el-col :span="16">
  181. <el-form-item label="时间范围:" prop="inputDatetime">
  182. <el-date-picker v-model="newGeneration.temp.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 100%;" :clearable="false" />
  183. </el-form-item>
  184. </el-col>
  185. </el-row>
  186. </el-form>
  187. <div slot="footer" class="dialog-footer" style="bottom:10px">
  188. <el-button class="cancelClose" @click="newGeneration.dialogFormVisible = false;getList()">取消</el-button>
  189. <el-button class="success" :disabled="isokDisable" @click="newGenerationData()">确认</el-button>
  190. </div>
  191. </div>
  192. </el-dialog>
  193. <!-- 历史记录 -->
  194. <el-dialog :title="textMap[historyRecord.dialogStatus]" :destroy-on-close="true" :visible.sync="historyRecord.dialogFormVisible" :close-on-click-modal="false" width="90%">
  195. <div class="historyRecord">
  196. <keep-alive>
  197. <component :is="historyRecord.myComponent" ref="historyRecord" />
  198. </keep-alive>
  199. </div>
  200. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  201. <el-button class="cancelClose" @click="historyRecord.dialogFormVisible = false; ">关闭</el-button>
  202. </div>
  203. </el-dialog>
  204. </div>
  205. </template>
  206. <script>
  207. import { GetDataByName, GetDataByNames, ExecDataByConfig } from '@/api/common'
  208. import { MessageBox } from 'element-ui'
  209. import { parseTime } from '@/utils/index.js'
  210. import Cookies from 'js-cookie'
  211. export default {
  212. name: 'DailyExecutionPlan',
  213. data() {
  214. return {
  215. requestParams: [
  216. // { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] }
  217. ],
  218. planTypeList: [{ lable: '撒料计划', value: '2' }, { lable: '预混计划', value: '4' }, { lable: '剩料计划', value: '3' }], // 计划类型
  219. printingTypeList: [{ lable: '所有', value: '0' }, { lable: '精料', value: '1' }, { lable: '铲车', value: '2' }], // 打印类型
  220. frequencyList: [], // 班次
  221. planningDimensionList: [{ lable: '发料顺序', value: '0' }, { lable: 'TMR', value: '1' }], // 发料顺序
  222. exportTypeList: [{ lable: '投料简打', value: '0' }, { lable: '投料简打', value: '1' }], // 导出类型
  223. // 班次
  224. maxTime: {
  225. getMaxTimesParm: {
  226. name: 'getSysoptEnable',
  227. page: 1,
  228. offset: 1,
  229. pagecount: 1,
  230. returntype: 'Map',
  231. parammaps: {
  232. pastureid: Cookies.get('pastureid'),
  233. inforname: 'times'
  234. }
  235. }
  236. },
  237. table: {
  238. getdataListParm: {
  239. name: 'getDownloadedplanList',
  240. page: 1,
  241. offset: 1,
  242. pagecount: '',
  243. returntype: 'Map',
  244. parammaps: {
  245. pastureid: Cookies.get('pastureid'),
  246. barid: '',
  247. mydate: parseTime(new Date(), '{y}-{m}-{d}'),
  248. times: '',
  249. lpplantype: ''
  250. }
  251. },
  252. tableKey: 0,
  253. list: [],
  254. total: 0,
  255. listLoading: false
  256. },
  257. // 计划内容操作详情
  258. table2: {
  259. getdataListParm: {
  260. name: 'getDownloadplandtl1ListV2',
  261. page: 1,
  262. offset: 1,
  263. returntype: 'Map',
  264. parammaps: {
  265. pastureid: Cookies.get('pastureid'),
  266. date: '',
  267. id: ''
  268. }
  269. },
  270. tableKey: 0,
  271. list: [],
  272. total: 0,
  273. listLoading: false
  274. },
  275. // 计划内容 舍栏详情
  276. table3: {
  277. getdataListParm: {
  278. name: 'getDownloadplandt2ListV2',
  279. page: 1,
  280. offset: 1,
  281. returntype: 'Map',
  282. parammaps: {
  283. pastureid: Cookies.get('pastureid'),
  284. date: '',
  285. id: ''
  286. }
  287. },
  288. tableKey: 0,
  289. list: [],
  290. total: 0,
  291. listLoading: false
  292. },
  293. // 新生成
  294. newGeneration: {
  295. dialogFormVisible: false,
  296. dialogStatus: '',
  297. getdataListParm: {
  298. name: 'checkLLPIsDistribution',
  299. page: 1,
  300. offset: 1,
  301. pagecount: 1,
  302. returntype: 'Map',
  303. parammaps: {
  304. pastureid: Cookies.get('pastureid')
  305. }
  306. },
  307. temp: {},
  308. rules: {
  309. inputDatetime: [{ type: 'array', required: true, message: '必填', trigger: 'blur' }]
  310. }
  311. },
  312. historyRecord: {
  313. dialogFormVisible: false,
  314. dialogStatus: '',
  315. myComponent: null
  316. },
  317. textMap: {
  318. newGeneration: '新生成',
  319. historyRecord: '历史记录'
  320. },
  321. isokDisable: false,
  322. requestParam: {},
  323. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  324. cellStyle: { padding: 0 + 'px' }
  325. }
  326. },
  327. created() {
  328. this.getList()
  329. this.getDownList()
  330. this.getIsDisplay()
  331. },
  332. mounted() {
  333. this.table.getdataListParm.parammaps.mydate = parseTime(new Date(), '{y}-{m}-{d}')
  334. },
  335. methods: {
  336. getIsDisplay() {
  337. GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
  338. console.log(response.data.list[0].inforvalue)
  339. if (response.data.list[0].inforvalue == 1) {
  340. this.frequencyList = [{ id: '1', name: '第一班' }]
  341. } else if (response.data.list[0].inforvalue == 2) {
  342. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }]
  343. } else if (response.data.list[0].inforvalue == 3) {
  344. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
  345. } else if (response.data.list[0].inforvalue == 4) {
  346. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }, { id: '4', name: '第四班' }]
  347. }
  348. })
  349. },
  350. getDownList() {
  351. GetDataByNames(this.requestParams).then(response => {
  352. // this.livestockTypeList = response.data.getDictByName.list
  353. })
  354. },
  355. // -------------------日执行计划-----------------------------
  356. handleBefore() {
  357. if (this.table.getdataListParm.parammaps.mydate !== '' && this.table.getdataListParm.parammaps.mydate !== null) {
  358. this.table.getdataListParm.parammaps.mydate = new Date(this.table.getdataListParm.parammaps.mydate)
  359. var start = new Date(this.table.getdataListParm.parammaps.mydate.setDate(this.table.getdataListParm.parammaps.mydate.getDate() - 1))
  360. // var start = this.table.getdataListParm.parammaps.mydate - 1
  361. this.table.getdataListParm.parammaps.mydate = parseTime(start, '{y}-{m}-{d}')
  362. // this.$forceUpdate()
  363. this.getList()
  364. }
  365. },
  366. handleNext() {
  367. if (this.table.getdataListParm.parammaps.mydate !== '' && this.table.getdataListParm.parammaps.mydate !== null) {
  368. this.table.getdataListParm.parammaps.mydate = new Date(this.table.getdataListParm.parammaps.mydate)
  369. var stop = new Date(this.table.getdataListParm.parammaps.mydate.setDate(this.table.getdataListParm.parammaps.mydate.getDate() + 1))
  370. this.table.getdataListParm.parammaps.mydate = parseTime(stop, '{y}-{m}-{d}')
  371. this.getList()
  372. }
  373. },
  374. getList() {
  375. this.table.listLoading = true
  376. GetDataByName(this.table.getdataListParm).then(response => {
  377. console.log('table数据', response.data.list)
  378. if (response.data.list !== null) {
  379. this.table.list = response.data.list
  380. this.table.pageNum = response.data.pageNum
  381. this.table.pageSize = response.data.pageSize
  382. this.table.total = response.data.total
  383. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  384. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  385. this.table3.getdataListParm.parammaps.lpplantype = response.data.list[0].lpplantype
  386. this.getList2()
  387. this.getList3()
  388. } else {
  389. this.table.list = []
  390. this.table2.getdataListParm.parammaps.id = ''
  391. this.table3.getdataListParm.parammaps.id = ''
  392. this.getList2()
  393. this.getList3()
  394. this.table2.list = []
  395. this.table3.list = []
  396. }
  397. setTimeout(() => {
  398. this.table.listLoading = false
  399. }, 100)
  400. })
  401. },
  402. lpplantype: function(cellValue) {
  403. if (cellValue.lpplantype == 2) {
  404. return '撒料'
  405. } else if (cellValue.lpplantype == 4) {
  406. return '预混'
  407. } else if (cellValue.lpplantype == 3) {
  408. return '剩料'
  409. }
  410. },
  411. changeDate(val) {
  412. console.log('选择了日期', val)
  413. this.getList()
  414. this.getList2()
  415. this.getList3()
  416. },
  417. changePlanType(val) {
  418. console.log('选择了计划类型', val)
  419. this.getList()
  420. this.getList2()
  421. this.getList3()
  422. },
  423. changeFrequency(val) {
  424. console.log('选择了班次', val)
  425. this.getList()
  426. this.getList2()
  427. this.getList3()
  428. },
  429. // 日执行计划行点击
  430. tableRowClick(row, column, event) {
  431. console.log(row, column, event)
  432. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  433. this.table2.getdataListParm.parammaps.id = row.id
  434. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  435. this.table3.getdataListParm.parammaps.id = row.id
  436. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  437. this.getList2()
  438. this.getList3()
  439. },
  440. // 计划内容操作详情
  441. getList2() {
  442. this.table2.listLoading = true
  443. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  444. GetDataByName(this.table2.getdataListParm).then(response => {
  445. console.log('table数据', response.data.list)
  446. if (response.data.list !== null) {
  447. this.table2.list = response.data.list
  448. const arr = []
  449. var a = 0
  450. let b = this.table2.list[0].sort
  451. let c = 0
  452. for (let i = 0; i < this.table2.list.length; i++) {
  453. if (b !== parseInt(this.table2.list[i].sort)) {
  454. b = this.table2.list[i].sort
  455. arr.push({ 'sort': '小计', 'weight': a.toFixed(2) })
  456. a = 0
  457. }
  458. a = a + parseFloat(this.table2.list[i].weight)
  459. c = c + parseFloat(this.table2.list[i].weight)
  460. arr.push(this.table2.list[i])
  461. }
  462. arr.push({ 'sort': '小计', 'weight': a })
  463. arr.push({ 'sort': '总计', 'weight': c.toFixed(2) })
  464. this.table2.list = arr
  465. console.log(this.table2.list)
  466. this.table2.pageNum = response.data.pageNum
  467. this.table2.pageSize = response.data.pageSize
  468. this.table2.total = response.data.total
  469. } else {
  470. this.table2.list = []
  471. }
  472. setTimeout(() => {
  473. this.table2.listLoading = false
  474. }, 100)
  475. })
  476. },
  477. // 计划内容栏舍详情
  478. getList3() {
  479. this.table3.listLoading = true
  480. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  481. GetDataByName(this.table3.getdataListParm).then(response => {
  482. console.log('table数据', response.data.list)
  483. if (response.data.list !== null) {
  484. this.table3.list = response.data.list
  485. this.table3.pageNum = response.data.pageNum
  486. this.table3.pageSize = response.data.pageSize
  487. this.table3.total = response.data.total
  488. } else {
  489. this.table3.list = []
  490. }
  491. setTimeout(() => {
  492. this.table3.listLoading = false
  493. }, 100)
  494. })
  495. },
  496. // 新生成
  497. handleCreate() {
  498. console.log('点击了新生成')
  499. this.newGeneration.temp = {}
  500. this.newGeneration.dialogStatus = 'newGeneration'
  501. this.newGeneration.dialogFormVisible = true
  502. GetDataByName(this.newGeneration.getdataListParm).then(response => {
  503. console.log('table数据', response.data.list)
  504. if (response.data.list !== null) {
  505. if (response.data.list[0].vmsg == '存在未分配') {
  506. this.$message({ type: 'warning', message: '撒料计划中存在未分配完栏舍,建议及时进行分配', duration: 2000 })
  507. }
  508. }
  509. })
  510. },
  511. newGenerationData() {
  512. console.log('点击了新生成保存', this.newGeneration.temp)
  513. this.isokDisable = true
  514. setTimeout(() => {
  515. this.isokDisable = false
  516. }, 5000)
  517. this.$refs['temp'].validate(valid => {
  518. if (valid) {
  519. this.newGeneration.temp.startTime = parseTime(this.newGeneration.temp.inputDatetime[0], '{y}-{m}-{d}')
  520. this.newGeneration.temp.stopTime = parseTime(this.newGeneration.temp.inputDatetime[1], '{y}-{m}-{d}')
  521. this.requestParam = {}
  522. this.requestParam.common = { 'returnmap': '0' }
  523. this.requestParam.data = []
  524. this.requestParam.data[0] = { 'name': 'checkDLPIsStart', 'type': 'e', 'parammaps': {
  525. pastureid: Cookies.get('pastureid'),
  526. startTime: this.newGeneration.temp.startTime
  527. }}
  528. this.requestParam.data[1] = { 'name': 'createdownloadedplan', 'type': 'e', 'parammaps': {
  529. pastureid: Cookies.get('pastureid'),
  530. startTime: this.newGeneration.temp.startTime,
  531. stopTime: this.newGeneration.temp.stopTime
  532. }}
  533. ExecDataByConfig(this.requestParam).then(response => {
  534. console.log('新生成保存发送参数', this.requestParam)
  535. if (response.msg === 'fail') {
  536. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  537. } else {
  538. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  539. this.newGeneration.dialogFormVisible = false
  540. this.getList()
  541. }
  542. })
  543. }
  544. })
  545. },
  546. // 配方模板
  547. handleRecipeemplate() {
  548. console.log('点击了配方模板,页面待画')
  549. },
  550. handleShedFormula() {
  551. console.log('点击了栏舍配方,页面待画')
  552. },
  553. handlePremixedPlan() {
  554. console.log('点击了预混计划,页面待画')
  555. },
  556. handleMaterialPlan() {
  557. console.log('点击了撒料计划,页面待画')
  558. },
  559. handleHistoryRecord() {
  560. console.log('点击了历史记录,页面待画')
  561. this.historyRecord.dialogStatus = 'historyRecord'
  562. this.historyRecord.dialogFormVisible = true
  563. const vue = this
  564. var myComponent = () => import('./historyRecord.vue')
  565. return vue.historyRecord.myComponent = myComponent
  566. },
  567. handleExport() {
  568. console.log('点击了导出')
  569. }
  570. }
  571. }
  572. </script>
  573. <style lang="scss" scoped>
  574. .operation{margin-bottom:10px;}
  575. .search{margin-top:10px;}
  576. .table{margin-top:10px;}
  577. .template{
  578. background: #fff;
  579. position: relative;
  580. .recipeTemplate{
  581. width: 72px;
  582. height: 70px;
  583. position: absolute;
  584. background: url(../../../assets/images/bg3.jpg) no-repeat;
  585. right: 0;
  586. top: 0;
  587. margin: 0;
  588. }
  589. }
  590. .table2{
  591. float: left;width: 49%;margin-right: 1%;background: red;
  592. background: #fff;
  593. position: relative;
  594. .contentOperation{
  595. width: 72px;
  596. height: 70px;
  597. position: absolute;
  598. background: url(../../../assets/images/bg4.jpg) no-repeat;
  599. right: 0;
  600. top: 0;
  601. margin: 0;
  602. }
  603. .content-table{margin-top: 70px;}
  604. }
  605. .table3{
  606. float: left;
  607. width: 49%;
  608. background: #fff;
  609. position: relative;
  610. .stallRetails{
  611. width: 72px;
  612. height: 70px;
  613. position: absolute;
  614. background: url(../../../assets/images/bg5.jpg) no-repeat;
  615. right: 0;
  616. top: 0;
  617. margin: 0;
  618. // p{
  619. // font-size: 12px;
  620. // transform:rotate(45deg);
  621. // -ms-transform:rotate(45deg); /* Internet Explorer 9*/
  622. // -moz-transform:rotate(45deg); /* Firefox */
  623. // -webkit-transform:rotate(45deg); /* Safari 和 Chrome */
  624. // -o-transform:rotate(45deg); /* Opera */
  625. // filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
  626. // }
  627. }
  628. .content-table{margin-top: 70px;}
  629. }
  630. </style>