812083a08a1438cd61ec2d362afd96ab2e1f4762.svn-base 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. <template>
  2. <div>
  3. <div class="operation">
  4. <el-button class="success" style="float: left;" @click="handleCreate">新增车次</el-button>
  5. <el-button class="danger" style="float: left;" @click="handleDelete">减少车次</el-button>
  6. <!-- <el-button class="import" style="float: right;" @click="handleHistoryRecords">历史记录</el-button> -->
  7. </div>
  8. <div class="search" />
  9. <div class="table">
  10. <el-table
  11. id="table"
  12. :key="table.tableKey"
  13. v-loading="table.listLoading"
  14. element-loading-text="给我一点时间"
  15. :data="table.list"
  16. border
  17. fit
  18. highlight-current-row
  19. style="width: 100%;"
  20. :row-style="rowStyle"
  21. :cell-style="cellStyle"
  22. class="elTable table-fixed"
  23. row-key="id"
  24. @selection-change="handleSelect"
  25. >
  26. <el-table-column type="selection" min-width="50" />
  27. <el-table-column label="车次" min-width="85px" align="center">
  28. <template slot-scope="scope">
  29. <span v-if="scope.row.NoEdit">{{ scope.row.sort }}</span>
  30. <el-input v-if="scope.row.Edit" v-model.trim="scope.row.sort" type="number" style="width:80%;padding:10px 0;" />
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="配方名称" min-width="110px" align="center">
  34. <template slot-scope="scope">
  35. <span v-if="scope.row.NoEdit">{{ scope.row.ftname }}</span>
  36. <el-select v-if="scope.row.Edit" v-model="scope.row.ftid" filterable placeholder="" class="filter-item" style="width:80%;padding:10px 0;" @change="(value)=> {changeformulaName(value, scope.row)}">
  37. <el-option v-for="item in formulaNameList" :key="item.id" :label="item.tname" :value="item.id" />
  38. </el-select>
  39. </template>
  40. </el-table-column>
  41. <el-table-column label="TMR编号" prop="weight" min-width="130px" align="center">
  42. <template slot-scope="scope">
  43. <span v-if="scope.row.NoEdit">{{ scope.row.tmrcode }}</span>
  44. <el-select v-if="scope.row.Edit" v-model="scope.row.tmrid" filterable placeholder="" class="filter-item" style="width:80%;padding:10px 0;" @change="(value)=> {changeTMRNumber(value, scope.row)}">
  45. <el-option v-for="item in TMRNumberList" :key="item.id" :label="item.tname" :value="item.id" />
  46. </el-select>
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="班次" min-width="120px" align="center">
  50. <template slot-scope="scope">
  51. <span v-if="scope.row.NoEdit">{{ scope.row.times }}</span>
  52. <el-select v-if="scope.row.Edit" v-model="scope.row.times" filterable placeholder="" class="filter-item" style="width:80%;padding:10px 0;" @change="(value)=> {changeTimes(value, scope.row)}">
  53. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  54. </el-select>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="撒料计划车次跟随" min-width="100px" align="center">
  58. <template slot-scope="scope">
  59. <span v-if="scope.row.NoEdit">{{ scope.row.lppcode }}</span>
  60. <el-select v-if="scope.row.Edit" v-model="scope.row.lppid" filterable clearable placeholder="" class="filter-item" style="width:80%;padding:10px 0;" @change="(value)=> {changeCarFollow(value, scope.row)}">
  61. <el-option v-for="item in carFollowList" :key="item.id" :label="item.lppcode" :value="item.id" />
  62. </el-select>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="生效" min-width="80px" align="center">
  66. <template slot-scope="scope">
  67. <el-switch v-model="scope.row.enable" :disabled="scope.row.NoEdit==true" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleEnableChange(scope.$index, scope.row)" />
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="时间" min-width="130px" align="center">
  71. <template slot-scope="scope">
  72. <span v-if="scope.row.NoEdit">{{ scope.row.ptime }}</span>
  73. <el-time-picker v-if="scope.row.Edit" v-model="scope.row.ptime" type="datetime" placeholder="选择时间" format="HH:mm" value-format="HH:mm" style="display: inline-block;width: 95%;" />
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="单车操作重量" min-width="80px" align="center">
  77. <template slot-scope="scope">
  78. <span>{{ scope.row.maxweight }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="混料重量" min-width="90px" align="center">
  82. <template slot-scope="scope">
  83. <span v-if="scope.row.NoEdit">{{ scope.row.operateweight }}</span>
  84. <el-input v-if="scope.row.Edit" v-model="scope.row.operateweight" type="number" style="width:80%;padding:10px 0;" />
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="操作" align="center" min-width="180" class-name="small-padding fixed-width" fixed="right">
  88. <template slot-scope="{row}">
  89. <!-- 新增 -->
  90. <el-button v-if="row.isCreate" class="miniSuccess" :disabled="isokDisable" @click="createData(row)">保存</el-button>
  91. <el-button v-if="row.isCreate" class="minCancel" @click="createCancel(row)">取消</el-button>
  92. <!-- 编辑 -->
  93. <el-button v-if="row.isUpdate" class="miniSuccess" @click="handleUpdate(row)">编辑</el-button>
  94. <el-button v-if="row.isUpdate" class="miniDanger" @click="handleRowDelete(row)">删除</el-button>
  95. <!-- 编辑保存 -->
  96. <el-button v-if="row.isUpdateSave" class="miniSuccess" :disabled="isokDisable" @click="updateData(row)">保存</el-button>
  97. <el-button v-if="row.isUpdateSave" class="minCancel" @click="updateCancel(row)">取消</el-button>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. </div>
  102. </span>
  103. </div>
  104. </template>
  105. <script>
  106. import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig } from '@/api/common'
  107. import Sortable from 'sortablejs'
  108. import Pagination from '@/components/Pagination'
  109. import Cookies from 'js-cookie'
  110. import { MessageBox } from 'element-ui'
  111. export default {
  112. name: 'PremixedPlan',
  113. components: { Pagination },
  114. props: {
  115. show: { type: Boolean, default: false }, // 弹框可见标志
  116. parentDate: { type: String, defalut: '' }
  117. },
  118. data() {
  119. return {
  120. date: '',
  121. requestParams: [
  122. { name: 'getTMRYHList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }},
  123. { name: 'getFTYHList', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid') }}
  124. ],
  125. formulaNameList: [], // 配方名称
  126. TMRNumberList: [], // TMR编号
  127. // 班次
  128. maxTime: {
  129. getMaxTimesParm: {
  130. name: 'getSysoptEnable',
  131. page: 1,
  132. offset: 1,
  133. pagecount: 1,
  134. returntype: 'Map',
  135. parammaps: {
  136. pastureid: Cookies.get('pastureid'),
  137. inforname: 'times'
  138. }
  139. }
  140. },
  141. frequencyList: [], // 班次
  142. getCarFollowParm: {
  143. name: 'getLPPCodeList',
  144. offset: 0,
  145. pagecount: 0,
  146. parammaps: {
  147. pastureid: Cookies.get('pastureid'),
  148. times: ''
  149. }
  150. },
  151. carFollowList: [], // 发料计划车次跟随
  152. table: {
  153. getdataListParm: {
  154. name: 'getPremixplanList',
  155. page: 1,
  156. offset: 1,
  157. pagecount: 10,
  158. returntype: 'Map',
  159. parammaps: {
  160. pastureid: Cookies.get('pastureid')
  161. }
  162. },
  163. tableKey: 0,
  164. list: [],
  165. total: 0,
  166. listLoading: true
  167. },
  168. selectList: [],
  169. isokDisable: false,
  170. requestParam: {},
  171. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  172. cellStyle: { padding: 0 + 'px' },
  173. dropState: false
  174. }
  175. },
  176. watch: {
  177. // 监听show,visible 随着show变化而变化
  178. show: {
  179. immediate: true,
  180. handler(newVal, oldVal) {
  181. console.log('newVal-show', newVal)
  182. }
  183. },
  184. parentDate: {
  185. immediate: true,
  186. handler(newVal, oldVal) {
  187. console.log('newVal-show', newVal)
  188. this.date = newVal
  189. }
  190. }
  191. },
  192. created() {
  193. this.getList()
  194. this.getDownList()
  195. this.getIsDisplay()
  196. },
  197. methods: {
  198. getDownList() {
  199. GetDataByNames(this.requestParams).then(response => {
  200. this.TMRNumberList = response.data.getTMRYHList.list
  201. this.formulaNameList = response.data.getFTYHList.list
  202. })
  203. },
  204. getIsDisplay() {
  205. GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
  206. if (response.data.list[0].inforvalue == 1) {
  207. this.frequencyList = [{ id: '1', name: '第一班' }]
  208. } else if (response.data.list[0].inforvalue == 2) {
  209. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }]
  210. } else if (response.data.list[0].inforvalue == 3) {
  211. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
  212. } else if (response.data.list[0].inforvalue == 4) {
  213. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }, { id: '4', name: '第四班' }]
  214. }
  215. })
  216. },
  217. getList() {
  218. this.table.listLoading = true
  219. GetDataByName(this.table.getdataListParm).then(response => {
  220. console.log('table数据', response.data.list)
  221. if (response.data.list !== null) {
  222. for (let i = 0; i < response.data.list.length; i++) {
  223. this.$set(response.data.list[i], 'Edit', false) // 编辑
  224. this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
  225. this.$set(response.data.list[i], 'groupEdit', false) // 饲料组编辑
  226. this.$set(response.data.list[i], 'groupNoEdit', true) // 饲料组不可编辑
  227. this.$set(response.data.list[i], 'isCreate', false) // 新增操作
  228. this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
  229. this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
  230. }
  231. this.table.list = response.data.list
  232. this.table.pageNum = response.data.pageNum
  233. this.table.pageSize = response.data.pageSize
  234. this.rowDrop()
  235. this.table.total = response.data.total
  236. } else {
  237. this.table.list = []
  238. }
  239. setTimeout(() => {
  240. this.table.listLoading = false
  241. }, 100)
  242. })
  243. },
  244. // 配方名称
  245. changeformulaName(item, row) {
  246. row.ftname = this.formulaNameList.find(obj => obj.id == item).tname
  247. },
  248. // TMR编号
  249. changeTMRNumber(item, row) {
  250. row.tmrcode = this.TMRNumberList.find(obj => obj.id == item).tname
  251. row.maxweight = this.TMRNumberList.find(obj => obj.id == item).maxstirfeed
  252. },
  253. // 撒料计划车次跟随列表
  254. changeCarFollow(item, row) {
  255. if (item == '') {
  256. row.lppcode = ''
  257. } else {
  258. row.lppcode = this.carFollowList.find(obj => obj.id == item).lppcode
  259. }
  260. },
  261. // 班次
  262. changeTimes(item, row) {
  263. console.log(item, row)
  264. this.getCarFollowParm.parammaps.times = item
  265. this.getCarFollowList(row)
  266. },
  267. // 撒料计划车次跟随列表
  268. getCarFollowList(row) {
  269. GetDataByName(this.getCarFollowParm).then(response => {
  270. console.log('撒料计划车次跟随列表数据', response.data.list)
  271. if (response.data.list !== null) {
  272. this.carFollowList = response.data.list
  273. row.lppid = this.carFollowList[0].id
  274. row.lppcode = this.carFollowList[0].lppcode
  275. }
  276. })
  277. },
  278. handleEnableChange() {
  279. console.log('点击了生效')
  280. },
  281. // 行拖拽
  282. rowDrop() {
  283. console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
  284. const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
  285. const that = this
  286. var sortable = Sortable.create(tbody, {
  287. disabled: that.dropState,
  288. onChoose({ newIndex, oldIndex }) {
  289. if (that.dropState == true) {
  290. sortable.destroy()
  291. }
  292. },
  293. onEnd({ newIndex, oldIndex }) {
  294. const currRow = that.table.list.splice(oldIndex, 1)[0]
  295. that.table.list.splice(newIndex, 0, currRow)
  296. console.log('索引', newIndex)
  297. console.log('拖动数据', currRow)
  298. console.log('上', that.table.list[newIndex - 1])
  299. console.log('下', that.table.list[newIndex + 1])
  300. }
  301. })
  302. },
  303. // 模板新增
  304. handleCreate() {
  305. this.dropState = true
  306. console.log('点击了新增车次')
  307. // 编辑true/不可编辑false
  308. // 新增操true,编辑false,编辑保存false
  309. for (let i = 0; i < this.table.list.length; i++) {
  310. if (this.table.list[i].Edit === true) {
  311. console.log(123)
  312. this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
  313. return false
  314. }
  315. }
  316. var sort = 1
  317. if (this.table.list.length > 0) {
  318. sort = parseInt(this.table.list[this.table.list.length - 1].sort) + 1
  319. } else {
  320. sort = 1
  321. }
  322. this.table.list.unshift({ 'myId': (new Date()).valueOf(), 'Edit': true, 'NoEdit': false, 'isCreate': true, 'isUpdate': false, 'isUpdateSave': false, 'enable': 1, 'sort': sort, 'ftid': '', 'ftname': '', 'tmrcode': '', 'tmrid': '', 'times': '', 'lppcode': '', 'lppid': '', 'ptime': '', 'maxweight': '', 'operateweight': '' })
  323. },
  324. createData(row) {
  325. console.log('点击了新增保存', row)
  326. if (row.sort == '' && row.ftid == '' && row.tmrid == '' && row.times == '' && row.operateweight == '') {
  327. this.$message({ type: 'error', message: '车次/配方名称/TMR编号/班次/混料重量不能为空', duration: 2000 })
  328. return false
  329. } else if (row.ftid == '' && row.tmrid == '' && row.times == '' && row.operateweight == '') {
  330. this.$message({ type: 'error', message: '配方名称/TMR编号/班次/混料重量不能为空', duration: 2000 })
  331. return false
  332. } else if (row.tmrid == '' && row.times == '' && row.operateweight == '') {
  333. this.$message({ type: 'error', message: 'TMR编号/班次/混料重量不能为空', duration: 2000 })
  334. return false
  335. } else if (row.times == '' && row.operateweight == '') {
  336. this.$message({ type: 'error', message: '班次/混料重量不能为空', duration: 2000 })
  337. return false
  338. } else if (row.sort == '' || row.sort == 0) {
  339. this.$message({ type: 'error', message: '车次不能为空且大于0', duration: 2000 })
  340. return false
  341. } else if (row.ftid == '') {
  342. this.$message({ type: 'error', message: '配方名称不能为空', duration: 2000 })
  343. return false
  344. } else if (row.tmrid == '') {
  345. this.$message({ type: 'error', message: 'TMR编号不能为空', duration: 2000 })
  346. return false
  347. } else if (row.times == '') {
  348. this.$message({ type: 'error', message: '班次不能为空', duration: 2000 })
  349. return false
  350. } else if (row.operateweight == '') {
  351. this.$message({ type: 'error', message: '混料重量不能为空', duration: 2000 })
  352. return false
  353. }
  354. for (let i = 0; i < this.table.list.length; i++) {
  355. if (row.sort !== '') {
  356. if (row.sort == this.table.list[i].sort) {
  357. if (row.myId !== this.table.list[i].myId) {
  358. this.$message({ type: 'error', message: '车次不可重复', duration: 2000 })
  359. return false
  360. }
  361. }
  362. }
  363. }
  364. var isInteger = /^\d+$/
  365. if (row.sort !== '') {
  366. if (!isInteger.test(parseFloat(row.sort))) {
  367. this.$message({ type: 'error', message: '车次请输入整数', duration: 2000 })
  368. return false
  369. }
  370. }
  371. this.isokDisable = true
  372. setTimeout(() => {
  373. this.isokDisable = false
  374. }, 1000)
  375. this.requestParam.name = 'insertPremixplan'
  376. this.requestParam.parammaps = row
  377. this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
  378. PostDataByName(this.requestParam).then(response => {
  379. console.log('新增保存发送参数', this.requestParam)
  380. if (response.msg !== 'fail') {
  381. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  382. this.getList()
  383. this.dropState = false
  384. } else {
  385. failproccess(response, this.$notify)
  386. }
  387. })
  388. },
  389. createCancel(row) {
  390. console.log('点击了新增取消')
  391. this.dropState = false
  392. for (let i = 0; i < this.table.list.length; i++) {
  393. if (row.myId === this.table.list[i].myId) {
  394. var listIndex = this.table.list.indexOf(this.table.list[i])
  395. }
  396. if (listIndex > -1) {
  397. this.table.list.splice(listIndex, 1)
  398. return
  399. }
  400. }
  401. },
  402. // 模板编辑
  403. handleUpdate(row) {
  404. for (let i = 0; i < this.table.list.length; i++) {
  405. if (this.table.list[i].Edit == true) {
  406. this.$message({ type: 'error', message: '当前内容未保存,请点击取消或保存继续进行操作', duration: 2000 })
  407. return false
  408. }
  409. }
  410. // 编辑true,不可编辑false
  411. row.Edit = true
  412. row.NoEdit = false
  413. // 新增false,编辑false,编辑保存true
  414. row.isCreate = false
  415. row.isUpdate = false
  416. row.isUpdateSave = true
  417. row.lppid = String(row.lppid)
  418. if (row.times == '第一班') {
  419. this.getCarFollowParm.parammaps.times = '1'
  420. row.times = '1'
  421. } else if (row.times == '第二班') {
  422. this.getCarFollowParm.parammaps.times = '2'
  423. row.times = '2'
  424. } else if (row.times == '第三班') {
  425. this.getCarFollowParm.parammaps.times = '3'
  426. row.times = '3'
  427. } else if (row.times == '第四班') {
  428. this.getCarFollowParm.parammaps.times = '4'
  429. row.times = '4'
  430. }
  431. console.log(row)
  432. GetDataByName(this.getCarFollowParm).then(response => {
  433. console.log('撒料计划车次跟随列表数据', response.data.list)
  434. if (response.data.list !== null) {
  435. this.carFollowList = response.data.list
  436. }
  437. })
  438. this.dropState = true
  439. },
  440. updateData(row) {
  441. console.log('点击了编辑保存', row)
  442. if (row.ftid == '' && row.tmrid == '' && row.times == '' && row.operateweight == '') {
  443. this.$message({ type: 'error', message: '配方名称/TMR编号/班次/混料重量不能为空', duration: 2000 })
  444. return false
  445. } else if (row.tmrid == '' && row.times == '' && row.operateweight == '') {
  446. this.$message({ type: 'error', message: 'TMR编号/班次/混料重量不能为空', duration: 2000 })
  447. return false
  448. } else if (row.times == '' && row.operateweight == '') {
  449. this.$message({ type: 'error', message: '班次/混料重量不能为空', duration: 2000 })
  450. return false
  451. } else if (row.ftid == '') {
  452. this.$message({ type: 'error', message: '配方名称不能为空', duration: 2000 })
  453. return false
  454. } else if (row.tmrid == '') {
  455. this.$message({ type: 'error', message: 'TMR编号不能为空', duration: 2000 })
  456. return false
  457. } else if (row.times == '') {
  458. this.$message({ type: 'error', message: '班次不能为空', duration: 2000 })
  459. return false
  460. } else if (row.operateweight == '') {
  461. this.$message({ type: 'error', message: '混料重量不能为空', duration: 2000 })
  462. return false
  463. }
  464. for (let i = 0; i < this.table.list.length; i++) {
  465. if (row.sort == this.table.list[i].sort) {
  466. if (row.id !== this.table.list[i].id) {
  467. this.$message({ type: 'error', message: '车次不可重复', duration: 2000 })
  468. return false
  469. }
  470. }
  471. }
  472. var isInteger = /^\d+$/
  473. if (row.sort !== '') {
  474. if (!isInteger.test(parseFloat(row.sort))) {
  475. this.$message({ type: 'error', message: '车次请输入整数', duration: 2000 })
  476. return false
  477. }
  478. }
  479. if (row.sort == '' || row.sort == 0) {
  480. this.$message({ type: 'error', message: '车次不能为空且大于0', duration: 2000 })
  481. return false
  482. }
  483. this.isokDisable = true
  484. setTimeout(() => {
  485. this.isokDisable = false
  486. }, 1000)
  487. this.requestParam.name = 'updatePremixplan'
  488. this.requestParam.parammaps = row
  489. PostDataByName(this.requestParam).then(response => {
  490. console.log('新增保存发送参数', this.requestParam)
  491. if (response.msg !== 'fail') {
  492. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  493. this.getList()
  494. this.dropState = false
  495. } else {
  496. failproccess(response, this.$notify)
  497. }
  498. })
  499. },
  500. updateCancel(row) {
  501. console.log('点击了编辑取消')
  502. // 编辑false,不可编辑true
  503. row.Edit = false
  504. row.NoEdit = true
  505. // 新增false,编辑true,编辑保存false
  506. row.isCreate = false
  507. row.isUpdate = true
  508. row.isUpdateSave = false
  509. this.getList()
  510. this.dropState = false
  511. },
  512. handleSelect(val) {
  513. console.log('勾选数据', val)
  514. this.selectList = val
  515. },
  516. // 减少车次
  517. handleDelete() {
  518. if (this.selectList.length == 0) {
  519. this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
  520. } else {
  521. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否删除?', {
  522. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  523. }).then(() => {
  524. console.log(this.selectList)
  525. this.requestParam.common = { 'returnmap': '0' }
  526. this.requestParam.data = []
  527. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  528. this.requestParam.data[0].children = []
  529. this.requestParam.data[0].children[0] = { 'name': 'deletePremixplan', 'type': 'e', 'parammaps': {
  530. id: '@insertSpotList.id',
  531. pastureid: '@insertSpotList.pastureid'
  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.getList()
  540. }
  541. })
  542. })
  543. }
  544. }
  545. }
  546. }
  547. </script>