33041a99c42896729387a9266fc09617853c5438.svn-base 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. <template>
  2. <div class="app-container">
  3. <div ref="list" class="list">
  4. <div class="list-t">
  5. <span>班次:</span>
  6. <el-radio-group v-model="menuRadio" size="small" @change="changeMenu">
  7. <el-radio-button label="全部">全部</el-radio-button>
  8. <el-radio-button label="早班">早班</el-radio-button>
  9. <el-radio-button label="中班">中班</el-radio-button>
  10. <el-radio-button label="晚班">晚班</el-radio-button>
  11. </el-radio-group>
  12. </div>
  13. <!-- 拖拽列表 -->
  14. <ul class="draggableList">
  15. <li v-for="element in MenuList" :key="element.name">
  16. <span class="draggableTitle">{{ element.title }}:</span>
  17. <draggable id="1" data-source="juju1" :list="element.MenuList" class="list-group1" draggable=".item" group="a" :move="move" @change="log" @start="start" @end="end">
  18. <div v-for="item in element.MenuList" :key="item.name" :style="{'background':item.background}" class="list-group-item1 item" style="width: 100px;float: left;margin:5px 5px;height: 28px;">
  19. <el-tooltip placement="top">
  20. <div slot="content">{{ item.name }}</div>
  21. <div class="draggableName">{{ item.name }}</div>
  22. </el-tooltip>
  23. <div class="draggableWeight">{{ item.weight }}</div>
  24. </div>
  25. </draggable>
  26. </li>
  27. </ul>
  28. </div>
  29. <div ref="listRight" class="list-r">
  30. <div v-if="isLeftButton" class="rightButton" @click="handleLeftButton">
  31. <i class="el-icon-arrow-left left" />
  32. <span>栏舍统计</span>
  33. </div>
  34. <div v-if="isRightButton" class="rightButton" @click="handleRightButton">
  35. <i class="el-icon-arrow-right right" />
  36. <div class="smallTable">
  37. <el-table slot="reference" :data="smallMenu.list" header-align="center" :cell-style="cellStyle2" :row-style="rowStyle2" :header-row-style="headerRowStyle2" :header-cell-style="headerCellStyle2" :height="150">
  38. <template v-for="(item,index) in smallMenu.titlelist">
  39. <el-table-column :key="index" show-overflow-tooltip :prop="item.column_name" :label="item.label" :width="item.width" />
  40. </template>
  41. </el-table>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="operation">
  46. <el-button class="success" style="float:left;" @click="handleNewTrains">新增车次</el-button>
  47. <el-button class="danger" style="float:left;" @click="handleReduceTrains">减少车次</el-button>
  48. <el-button class="success" style="float:left;" @click="handleAutomaticGeneration">自动生成</el-button>
  49. <el-button class="success" style="float:left;" @click="handleCheck">校验</el-button>
  50. <el-button class="import" style="float:right;" @click="handleHistoryRecord">历史记录</el-button>
  51. </div>
  52. <div class="table">
  53. <el-table
  54. id="table"
  55. :key="table.tableKey"
  56. v-loading="table.listLoading"
  57. element-loading-text="给我一点时间"
  58. :data="table.list"
  59. border
  60. highlight-current-row
  61. style="width: 100%;"
  62. :height="height"
  63. :row-style="rowStyle"
  64. :cell-style="cellStyle"
  65. class="elTable table-fixed"
  66. :row-class-name="tableRowClassName"
  67. row-key="id"
  68. @cell-click="tabClick"
  69. @selection-change="handleSelect"
  70. >
  71. <el-table-column type="selection" width="50" />
  72. <el-table-column label="车次" width="85px" align="center">
  73. <template slot-scope="scope">
  74. <el-input v-if="scope.row.index === table.tabClickIndex && table.tabClickLabel === '车次'" ref="input1" v-model="scope.row.pastureName" type="number" placeholder="车次" class="filter-item" style="display: inline-block;width: 95%;" @blur="handleBlur" />
  75. <span v-else>{{ scope.row.pastureName }}</span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="TMR编号" width="110px" align="center">
  79. <template slot-scope="scope">
  80. <el-select v-if="scope.row.index === table.tabClickIndex && table.tabClickLabel === 'TMR编号'" ref="input2" v-model="scope.row.status" placeholder="TMR编号" class="filter-item" style="width:95%;" @change="handleSelectChange()">
  81. <el-option v-for="item in TMRNumberList" :key="item.id" :label="item.name" :value="item.name" />
  82. </el-select>
  83. <span v-else>{{ scope.row.status }}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="描述" width="110px" align="center">
  87. <template slot-scope="scope">
  88. <el-input v-if="scope.row.index === table.tabClickIndex && table.tabClickLabel === '描述'" ref="input3" v-model="scope.row.pastureName" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" placeholder="描述" maxlength="255" class="filter-item" style="display: inline-block;width: 95%;" @blur="handleBlur" />
  89. <span v-else>{{ scope.row.status }}</span>
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="生效" width="100px" align="center">
  93. <template slot-scope="scope">
  94. <el-switch v-model="scope.row.enable" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" @change="handleTakeEffectChange(scope.$index, scope.row)" />
  95. </template>
  96. </el-table-column>
  97. <el-table-column label="班次" width="100px" align="center">
  98. <template slot-scope="scope">
  99. <el-select v-if="scope.row.index === table.tabClickIndex && table.tabClickLabel === '班次'" ref="input4" v-model="scope.row.status" placeholder="班次" class="filter-item" style="width:95%;" @change="handleSelectChange()">
  100. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.name" />
  101. </el-select>
  102. <span v-else>{{ scope.row.status }}</span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="时间" width="150px" align="center">
  106. <template slot-scope="scope">
  107. <el-time-picker v-if="scope.row.index === table.tabClickIndex && table.tabClickLabel === '时间'" ref="input5" v-model="scope.row.pastureName" :picker-options="{ selectableRange: '00:00:00 - 23:59:59' }" placeholder="选择时间" style="display: inline-block;width: 95%;" @change="handleTimeChange" />
  108. <span v-else>{{ scope.row.status }}</span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="最大重量" width="80px" align="center">
  112. <template slot-scope="scope">
  113. <span>{{ scope.row.status }}</span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="合计重量" width="80px" align="center">
  117. <template slot-scope="scope">
  118. <span>{{ scope.row.status }}</span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="模板配方" width="120px" align="center">
  122. <template slot-scope="scope">
  123. <el-select v-if="scope.row.index === table.tabClickIndex && table.tabClickLabel === '模板配方'" ref="input6" v-model="scope.row.status" placeholder="模板配方" class="filter-item" style="width:95%;" @change="handleSelectChange">
  124. <el-option v-for="item in templateFormulationList" :key="item.id" :label="item.name" :value="item.name" />
  125. </el-select>
  126. <span v-else>{{ scope.row.status }}</span>
  127. </template>
  128. </el-table-column>
  129. <el-table-column label="发料" width="950px" align="center">
  130. <template slot-scope="scope">
  131. <draggable id="2" data-source="juju" :list="scope.row.list" class="list-group2" draggable=".item" group="a" :move="move2" @change="log2" @start="start2" @end="end2">
  132. <div v-for="element in scope.row.list" :key="element.name" :style="{'background':element.background}" class="list-group-item2 item" style="width: 100px;float: left;border-radius:5px;margin: 5px 5px;padding: 0;height: 60px;">
  133. <span :style="{'background':element.background}" style="display: block;height:20px;line-height: 20px;border-radius:5px;position: relative;color:#fff;">
  134. {{ element.name }}
  135. <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleDelete(element.name)" />
  136. </span>
  137. <div style="margin-top: 7px;">
  138. <el-tooltip placement="top">
  139. <div slot="content">{{ element.brandName }}</div>
  140. <el-select v-model="element.brandName" placeholder="发料设备" class="filter-item2" style="display: inline-block;width: 55px;">
  141. <el-option v-for="item in equipmentList" :key="item.id" :label="item.name" :value="item.name" />
  142. </el-select>
  143. </el-tooltip>
  144. <el-tooltip placement="top">
  145. <div slot="content">{{ element.weight }}</div>
  146. <el-input v-model="element.weight" type="number" placeholder="重量" class="filter-item2" style="display: inline-block;width: 40px;" />
  147. </el-tooltip>
  148. </div>
  149. </div>
  150. </draggable>
  151. </template>
  152. </el-table-column>
  153. </el-table>
  154. </div>
  155. <!-- 自动生成 -->
  156. <el-dialog :title="textMap[automaticGeneration.dialogStatus]" :destroy-on-close="true" :visible.sync="automaticGeneration.dialogFormVisible" :close-on-click-modal="false" width="40%">
  157. <div class="app-automaticGeneration" style="margin: 0 auto;">
  158. <div style="width: 210px;margin:60px auto 100px;">
  159. 请选择自动生成方式<br>
  160. 1、清空计划生产新计划<br>
  161. 2、当前计划基础上继续生成计划<br>
  162. </div>
  163. <div slot="footer" class="dialog-footer">
  164. <el-button class="cancel" @click="automaticGeneration.dialogFormVisible = false; ">关闭</el-button>
  165. <el-button class="success" :disabled="isokDisable" @click="continueData()">继续生成</el-button>
  166. <el-button class="success" :disabled="isokDisable" @click="emptyPlanData()">清空计划</el-button>
  167. </div>
  168. </div>
  169. </el-dialog>
  170. </div>
  171. </template>
  172. <script>
  173. import { GetDataByName } from '@/api/common'
  174. import draggable from 'vuedraggable'
  175. import Sortable from 'sortablejs'
  176. // const id = 1
  177. export default {
  178. name: 'MaterialIssuancePlan',
  179. display: 'Two list header slot',
  180. order: 14,
  181. components: { draggable },
  182. data() {
  183. return {
  184. equipmentList: [{ id: 0, name: '发料设备01' }, { id: 1, name: '发料设备02' }], // 发料设备
  185. TMRNumberList: [{ id: 0, name: 'TMR编号01' }, { id: 1, name: 'TMR编号02' }], // TMR编号
  186. frequencyList: [{ id: 0, name: '早班' }, { id: 1, name: '中班' }, { id: 2, name: '晚班' }], // 班次
  187. templateFormulationList: [{ id: 0, name: '泌乳牛高产' }, { id: 1, name: '高产日粮' }, { id: 2, name: '青年牛' }], // templateFormulationList
  188. table: {
  189. getdataListParm: {
  190. name: 'getAssetList',
  191. page: 1,
  192. offset: 1,
  193. pagecount: 10,
  194. returntype: 'Map',
  195. parammaps: {
  196. enable: ''
  197. }
  198. },
  199. list: [],
  200. total: 0,
  201. tableKey: 0,
  202. listLoading: false,
  203. tabClickIndex: null, // 点击的单元格
  204. tabClickLabel: '' // 当前点击的列名
  205. },
  206. selectList: [], // 选中数据
  207. menuRadio: '全部', // 全部/早班/中班/晚班
  208. MenuList: [], // 配单列表
  209. allMenuList: [
  210. { 'title': '配方1', 'MenuList': [{ background: '#909', name: '全部1', id: 1, 'weight': 100 }, { background: '#909', name: '全部2', id: 2, 'weight': 99 }, { background: '#909', name: '全部3', id: 3, 'weight': 98 }, { background: '#909', name: '全部4', id: 4, 'weight': 90 }] },
  211. { 'title': '配方2', 'MenuList': [{ background: '#9f0', name: '全部11', id: 1, 'weight': 100 }, { background: '#9f0', name: '全部22', id: 2, 'weight': 99 }, { background: '#9f0', name: '全部33', id: 3, 'weight': 98 }, { background: '#9f0', name: '全部44', id: 4, 'weight': 90 }, { background: '#9f0', name: '全部55全部55全部55全部55', id: 5, 'weight': 55 }, { background: '#9f0', name: '全部66', id: 6, 'weight': 80 }] },
  212. { 'title': '配方3', 'MenuList': [{ background: '#909', name: '全部77', id: 7, 'weight': 100 }, { background: '#909', name: '全部88', id: 8, 'weight': 99 }, { background: '#909', name: '全部99', id: 9, 'weight': 98 }, { background: '#909', name: '全部10', id: 10, 'weight': 90 }, { background: '#909', name: '全部11', id: 11, 'weight': 55 }, { background: '#909', name: '全部12', id: 12, 'weight': 80 }, { background: '#909', name: '全部13', id: 13, 'weight': 70 }] },
  213. { 'title': '配方4', 'MenuList': [{ background: '#9f0', name: '全部14', id: 14, 'weight': 100 }, { background: '#9f0', name: '全部15', id: 15, 'weight': 99 }, { background: '#9f0', name: '全部16', id: 16, 'weight': 98 }, { background: '#9f0', name: '全部17', id: 17, 'weight': 90 }] },
  214. { 'title': '配方5', 'MenuList': [{ background: '#909', name: '全部18', id: 18, 'weight': 100 }, { background: '#909', name: '全部19', id: 19, 'weight': 99 }, { background: '#909', name: '全部20', id: 20, 'weight': 98 }, { background: '#909', name: '全部21', id: 21, 'weight': 90 }] }
  215. ],
  216. morningMenuList: [{ 'title': '配方1', 'MenuList': [{ name: '早班1', id: 1 }, { name: '早班2', id: 2 }, { name: '早班3', id: 3 }] }, { 'title': '配方2', 'MenuList': [{ name: '早班11', id: 1 }, { name: '早班22', id: 2 }, { name: '早班33', id: 3 }] }],
  217. middleMenuList: [{ 'title': '配方1', 'MenuList': [{ name: '中班1', id: 1 }, { name: '中班2', id: 2 }, { name: '中班3', id: 3 }] }, { 'title': '配方2', 'MenuList': [{ name: '中班11', id: 1 }, { name: '中班22', id: 2 }, { name: '中班33', id: 3 }] }],
  218. eveningMenuList: [{ 'title': '配方1', 'MenuList': [{ name: '晚班1', id: 1 }, { name: '晚班2', id: 2 }, { name: '晚班3', id: 3 }] }, { 'title': '配方2', 'MenuList': [{ name: '晚班11', id: 1 }, { name: '晚班22', id: 2 }, { name: '晚班33', id: 3 }] }],
  219. isLeftButton: true, // 向左
  220. isRightButton: false, // 向右
  221. rowStyle2: { maxHeight: 20 + 'px', height: 20 + 'px' },
  222. cellStyle2: { padding: 0 + 'px' },
  223. headerRowStyle2: { maxHeight: 20 + 'px', height: 20 + 'px' },
  224. headerCellStyle2: { padding: 0 + 'px' },
  225. smallMenu: { // 栏舍统计table
  226. getdataListParm: {
  227. name: 'getAssetList',
  228. page: 1,
  229. offset: 1,
  230. pagecount: 10,
  231. returntype: 'Map',
  232. parammaps: {
  233. enable: ''
  234. }
  235. },
  236. total: 0,
  237. tableKey: 0,
  238. listLoading: false,
  239. 'list': [],
  240. 'titlelist': []
  241. },
  242. // 自动生成
  243. automaticGeneration: {
  244. dialogFormVisible: false,
  245. dialogStatus: ''
  246. },
  247. textMap: {
  248. automaticGeneration: '提示'
  249. },
  250. isokDisable: false,
  251. height: document.body.clientHeight - 255 - 50, // table高度
  252. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  253. cellStyle: { padding: 0 + 'px' }
  254. }
  255. },
  256. created() {
  257. if (this.menuRadio === '全部') {
  258. this.MenuList = this.allMenuList
  259. }
  260. this.getList()
  261. this.getSmallMenuList()
  262. },
  263. methods: {
  264. getSmallMenuList() {
  265. this.smallMenu.listLoading = true
  266. GetDataByName(this.smallMenu.getdataListParm).then(response => {
  267. console.log('smallMenu数据', response.data.list)
  268. if (response.data.list !== null) {
  269. // this.smallMenu.list = response.data.list
  270. this.smallMenu.list = [
  271. { 'a1': '总数', 'a2': '11-1', 'a3': '12-1', 'a4': '13-1', 'a5': '14-1', 'a6': '15-1', 'a7': '16-1' },
  272. { 'a1': '早班未分配', 'a2': '11-2', 'a3': '12-2', 'a4': '13-2', 'a5': '14-2', 'a6': '15-2', 'a7': '16-2' },
  273. { 'a1': '中班未分配', 'a2': '11-3', 'a3': '12-3', 'a4': '13-3', 'a5': '14-3', 'a6': '15-3', 'a7': '16-3' },
  274. { 'a1': '晚班未分配', 'a2': '11-4', 'a3': '12-4', 'a4': '13-4', 'a5': '14-4', 'a6': '15-4', 'a7': '16-4' }
  275. ]
  276. this.smallMenu.titlelist = [
  277. { 'label': '配方/班次', 'column_name': 'a1' },
  278. { 'label': '总栏舍', 'column_name': 'a2' },
  279. { 'label': '配方1', 'column_name': 'a3' },
  280. { 'label': '配方2', 'column_name': 'a4' },
  281. { 'label': '配方3', 'column_name': 'a5' },
  282. { 'label': '配方4', 'column_name': 'a6' },
  283. { 'label': '配方5', 'column_name': 'a7' }
  284. ]
  285. is.table.total = response.data.total
  286. } else {
  287. this.smallMenu.list = []
  288. }
  289. setTimeout(() => {
  290. this.smallMenu.listLoading = false
  291. }, 100)
  292. })
  293. },
  294. getList() {
  295. this.table.listLoading = true
  296. GetDataByName(this.table.getdataListParm).then(response => {
  297. console.log('table数据', response.data.list)
  298. if (response.data.list !== null) {
  299. this.table.list = response.data.list
  300. this.table.list = [
  301. { 'id': 0, 'eqName': '潜污泵', 'pastureName': '双城牧场1', 'purpose': '0', 'specification': '"Q=150t/h', 'status': '正常', 'list': [{ 'name': 'John 1', 'myid': 1, 'background': '#d9d' }, { 'name': 'John 2', 'myid': 2, 'background': '#d9d' }, { 'name': 'John 3', 'myid': 3, 'background': '#d9d' }]
  302. }, {
  303. 'id': 1, 'eqCode': '24.QWB074', 'eqName': '潜污泵', 'pastureName': '双城牧场2', 'specification': '"Q=150t/h', 'status': '正常', 'list': [{ 'name': 'John 4', 'myid': 4, 'background': '#0f5' }, { name: 'John 5', 'myid': 5, 'background': '#0f5' }, { 'name': 'John 6', 'myid': 6, 'background': '#0f5' }]
  304. }, {
  305. 'id': 2, 'eqCode': '24.QWB074', 'eqName': '潜污泵', 'pastureName': '双城牧场3', 'specification': '"Q=150t/h', 'status': '正常', 'list': []
  306. }, {
  307. 'id': 3, 'eqCode': '24.QWB074', 'eqName': '潜污泵', 'pastureName': '双城牧场4', 'specification': '"Q=150t/h', 'status': '正常', 'list': []
  308. }, {
  309. 'id': 4, 'eqCode': '24.QWB074', 'eqName': '潜污泵', 'pastureName': '双城牧场5', 'specification': '"Q=150t/h', 'status': '正常', 'list': []
  310. }, {
  311. 'id': 5, 'eqCode': '24.QWB074', 'eqName': '潜污泵', 'pastureName': '双城牧场6', 'specification': '"Q=150t/h', 'status': '正常', 'list': []
  312. }
  313. ]
  314. this.rowDrop()
  315. if (response.data.total) {
  316. this.table.tal = response.data.total
  317. }
  318. } else {
  319. this.table.list = []
  320. }
  321. setTimeout(() => {
  322. this.table.listLoading = false
  323. }, 100)
  324. })
  325. },
  326. // 行拖拽
  327. rowDrop() {
  328. console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
  329. const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
  330. const that = this
  331. Sortable.create(tbody, {
  332. onEnd({ newIndex, oldIndex }) {
  333. const currRow = that.table.list.splice(oldIndex, 1)[0]
  334. that.table.list.splice(newIndex, 0, currRow)
  335. console.log('索引', newIndex)
  336. console.log('拖动数据', currRow)
  337. console.log('上', that.table.list[newIndex - 1])
  338. console.log('下', that.table.list[newIndex + 1])
  339. }
  340. })
  341. },
  342. handleSelect(val) {
  343. console.log('勾选数据', val)
  344. this.selectList = val
  345. },
  346. // 增加车次
  347. handleNewTrains() {
  348. this.table.list.unshift({})
  349. },
  350. // 减少车次
  351. handleReduceTrains() {
  352. if (this.selectList.length !== 1) {
  353. this.$message({ type: 'error', message: '请选择车次', duration: 2000 })
  354. return false
  355. } else {
  356. // 减少对应车次
  357. }
  358. },
  359. // 自动生成
  360. handleAutomaticGeneration() {
  361. this.automaticGeneration.dialogStatus = 'automaticGeneration'
  362. this.automaticGeneration.dialogFormVisible = true
  363. },
  364. continueData() {
  365. console.log('点击继续生成')
  366. },
  367. emptyPlanData() {
  368. console.log('点击清空计划')
  369. },
  370. // 检验
  371. handleCheck() {
  372. console.log('点击检验')
  373. },
  374. // 历史记录
  375. handleHistoryRecord() {
  376. console.log('点击历史记录')
  377. },
  378. // 配方
  379. log: function(evt) {
  380. window.console.log(evt)
  381. },
  382. start(evt) {},
  383. end(evt) {},
  384. move(evt, originalEvent) {
  385. if (originalEvent.target.className === 'list-group-item1 item') {
  386. return false
  387. } else {
  388. console.log(222)
  389. }
  390. },
  391. // 发料位
  392. log2: function(evt) {
  393. window.console.log(evt)
  394. },
  395. start2(evt) { },
  396. end2(evt) { },
  397. move2(evt, originalEvent) {
  398. console.log(evt, originalEvent)
  399. if (originalEvent.target.className === 'list-group-item1 item') {
  400. return false
  401. }
  402. },
  403. // 点击编辑
  404. tableRowClassName({ row, rowIndex }) {
  405. row.index = rowIndex // 把每一行的索引放进row
  406. },
  407. tabClick(row, column) {
  408. console.log()
  409. switch (column.label) {
  410. case '车次':
  411. this.table.tabClickIndex = row.index
  412. this.table.tabClickLabel = column.label
  413. this.$nextTick(() => {
  414. this.$refs.input1.focus()
  415. })
  416. break
  417. case 'TMR编号':
  418. this.table.tabClickIndex = row.index
  419. this.table.tabClickLabel = column.label
  420. this.$nextTick(() => {
  421. this.$refs.input2.focus()
  422. })
  423. break
  424. case '描述':
  425. this.table.tabClickIndex = row.index
  426. this.table.tabClickLabel = column.label
  427. this.$nextTick(() => {
  428. this.$refs.input3.focus()
  429. })
  430. break
  431. case '班次':
  432. this.table.tabClickIndex = row.index
  433. this.table.tabClickLabel = column.label
  434. this.$nextTick(() => {
  435. this.$refs.input4.focus()
  436. })
  437. break
  438. case '时间':
  439. this.table.tabClickIndex = row.index
  440. this.table.tabClickLabel = column.label
  441. this.$nextTick(() => {
  442. this.$refs.input5.focus()
  443. })
  444. break
  445. case '模板配方':
  446. this.table.tabClickIndex = row.index
  447. this.table.tabClickLabel = column.label
  448. this.$nextTick(() => {
  449. this.$refs.input6.focus()
  450. })
  451. break
  452. default: return
  453. }
  454. },
  455. // 失去焦点/选择保存
  456. handleBlur(index, row) {
  457. this.table.tabClickIndex = null
  458. this.table.tabClickLabel = ''
  459. console.log(index, row)
  460. },
  461. handleSelectChange(index, row) {
  462. this.table.tabClickIndex = null
  463. this.table.tabClickLabel = ''
  464. },
  465. handleTimeChange() {
  466. this.table.tabClickIndex = null
  467. this.table.tabClickLabel = ''
  468. },
  469. handleTakeEffectChange() {
  470. console.log('点击了生效')
  471. },
  472. // 删除
  473. handleDelete(val) {
  474. console.log(val, '点击了发料删除')
  475. },
  476. // 早中晚班
  477. changeMenu(val) {
  478. console.log(val)
  479. if (this.menuRadio === '全部') {
  480. this.MenuList = this.allMenuList
  481. } else if (this.menuRadio === '早班') {
  482. this.MenuList = this.morningMenuList
  483. } else if (this.menuRadio === '中班') {
  484. this.MenuList = this.middleMenuList
  485. } else if (this.menuRadio === '晚班') {
  486. this.MenuList = this.eveningMenuList
  487. }
  488. },
  489. handleLeftButton() { // 向左
  490. this.isLeftButton = false
  491. this.isRightButton = true
  492. this.$refs.listRight.style.zIndex = 4
  493. },
  494. handleRightButton() { // 向右
  495. this.isLeftButton = true
  496. this.isRightButton = false
  497. this.$refs.listRight.style.zIndex = 1
  498. }
  499. }
  500. }
  501. </script>
  502. <style lang="scss">
  503. .el-radio-button__orig-radio:checked+.el-radio-button__inner {
  504. color: #fff;
  505. background-color: #ccc;
  506. border-color: #ccc;
  507. -webkit-box-shadow: -1px 0 0 0 #ccc;
  508. box-shadow: -1px 0 0 0 #ccc;
  509. }
  510. </style>
  511. <style lang="scss" scoped>
  512. .list{
  513. position: fixed; height: 150px;z-index: 3;width: 60%;
  514. .list-t{position: fixed;z-index: 1;height:32px;}
  515. .draggableList{ width: 100%; height: 117px; list-style: none;margin-top:32px;padding-left:0;padding-right:0;overflow: auto;
  516. .draggableTitle{float: left;width: 100px;margin:5px 5px;text-align: center;color:#000;height: 28px;line-height: 36px;}
  517. li{
  518. margin: 3px 0;text-align: center;color:#fff;
  519. .draggableName{display:block;font-size: 12px;overflow: hidden; width: 100px;text-overflow:ellipsis; white-space: nowrap;}
  520. .draggableWeight{display:block;font-size: 10px;}
  521. }
  522. }
  523. }
  524. $width:24%;
  525. $width2:calc(24% - 50px);
  526. .list-r{
  527. position: fixed; height: 150px;z-index: 1;width: $width;right: 0;
  528. .rightButton{
  529. height: 150px;position: fixed;
  530. .left{font:40px/150px '';position: fixed;background: #fff;width: 50px;right: 0;}
  531. span{width: 20px;font:500 16px/16px '';display: inline-block;position: fixed;right: 0;margin-top: 42px;}
  532. .right{font:40px/150px '';background: #fff;width: 50px;right: $width;}
  533. .smallTable{position: fixed; top: 95px; width: $width2; margin-left: 50px;}
  534. }
  535. }
  536. .operation{margin-top: 150px;height: 50px;}
  537. .table{clear:both;}
  538. </style>
  539. <style lang="scss">
  540. // 下拉框
  541. .filter-item2 .el-input--suffix .el-input__inner{
  542. height: 30px !important;
  543. font-size: 8px;
  544. padding: 0 2px;
  545. }
  546. .filter-item2 .el-input--suffix .el-input__suffix .el-input__suffix-inner .el-input__icon{
  547. line-height: 30px !important;
  548. }
  549. // 输入框
  550. .filter-item2 .el-input__inner{
  551. height: 30px !important;
  552. font-size: 8px;
  553. padding: 0 2px;
  554. }
  555. </style>