planProjectAudit.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437
  1. <template>
  2. <!-- 国贸计划审核 -->
  3. <div class="outElectricity">
  4. <div class="box">
  5. <div class="box-top">
  6. <el-form
  7. style="overflow: hidden;"
  8. :style="filterForm.show ? null : { height: '0px' }"
  9. size="mini"
  10. label-width="75px"
  11. >
  12. <el-row>
  13. <el-col :span="6">
  14. <el-form-item label="排产日期">
  15. <zj-timegran-date
  16. v-model="filterForm.data.time"
  17. style="width: 100%;"
  18. :type="'daterange'"
  19. :oneFoo="getTableData"
  20. :custom ="1"
  21. ></zj-timegran-date>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="4">
  25. <el-form-item label="编号">
  26. <el-input
  27. v-model="filterForm.data.id"
  28. style="width: 100%;"
  29. refcous="true"
  30. ></el-input>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :span="4">
  34. <el-form-item label="工序">
  35. <el-select
  36. filterable clearable
  37. collapse-tags
  38. v-model="filterForm.data.workprocType"
  39. multiple
  40. placeholder=""
  41. style="width: 100%;"
  42. >
  43. <el-option
  44. v-for="item of nameObj.workprocid.arr"
  45. :key="item.id"
  46. :value="item.id"
  47. :label="item.name"
  48. ></el-option>
  49. </el-select>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="4">
  53. <el-form-item label="状态">
  54. <el-select
  55. filterable
  56. collapse-tags
  57. v-model="filterForm.data.state"
  58. multiple
  59. placeholder=""
  60. style="width: 100%;"
  61. >
  62. <el-option
  63. v-for="item of nameObj.state.arr"
  64. :key="item.id"
  65. :value="item.id"
  66. :label="item.name"
  67. ></el-option>
  68. </el-select>
  69. </el-form-item>
  70. </el-col>
  71. </el-row>
  72. </el-form>
  73. <div class="box-top-gjl">
  74. <el-form size="mini" label-width="75px">
  75. <el-row>
  76. <el-col :span="16">
  77. <el-button
  78. type="primary"
  79. size="mini"
  80. icon="el-icon-add-outline"
  81. @click="passaudits()"
  82. :loading="loading"
  83. >审核下发</el-button>
  84. <el-button
  85. size="mini"
  86. type="danger"
  87. icon="el-icon-add-outline"
  88. @click="turndown()"
  89. :loading="loading"
  90. >取消下发</el-button>
  91. </el-col>
  92. <el-col :span="8">
  93. <div style="float:right; text-align: right;">
  94. <el-button
  95. class="button"
  96. type="primary"
  97. size="mini"
  98. icon="el-icon-search"
  99. v-if="butPrivilege.QUERY"
  100. @click="getTableData()"
  101. >查询</el-button>
  102. <el-button
  103. size="mini"
  104. :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
  105. :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
  106. @click="filterForm.show = !filterForm.show;
  107. $nextTick(() => {
  108. singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
  109. }
  110. );"
  111. >{{ filterForm.show ? '收起' : '展开' }}</el-button>
  112. </div>
  113. </el-col>
  114. </el-row>
  115. </el-form>
  116. </div>
  117. </div>
  118. <div class="box-bottom">
  119. <el-form
  120. size="mini"
  121. ref="dialog_form_arr"
  122. label-width="0px"
  123. :model="tableFormDataObj"
  124. >
  125. <el-table
  126. stripe
  127. id="singleTable"
  128. ref="singleTable"
  129. :data="tableData"
  130. v-loading="tableLoading"
  131. style="width: 100%;"
  132. :height="singleTableHeight"
  133. border
  134. size="mini"
  135. highlight-current-row
  136. @selection-change="handleSelectionChange"
  137. :summary-method="getSummaries"
  138. :row-class-name="tableRowClassName"
  139. @cell-click="cellClick"
  140. @expand-change="rowClick"
  141. >
  142. <el-table-column
  143. type="selection"
  144. width="40"
  145. align="center"
  146. fixed="left"
  147. class-name="cnspicuous"
  148. ></el-table-column>
  149. <el-table-column
  150. sortable
  151. prop="id"
  152. label="编号"
  153. align="center"
  154. fixed="left"
  155. width="120px"
  156. :show-overflow-tooltip="true"
  157. ></el-table-column>
  158. <el-table-column
  159. sortable
  160. prop="workprocType"
  161. label="工序"
  162. align="center"
  163. fixed="left"
  164. width="120px"
  165. :show-overflow-tooltip="true"
  166. >
  167. <template slot-scope="scope">
  168. <span>{{ nameObj.workprocid.obj[scope.row.workprocType] ? nameObj.workprocid.obj[scope.row.workprocType].name : scope.row.workprocType }}</span>
  169. </template>
  170. </el-table-column>
  171. <el-table-column
  172. sortable
  173. prop="jhTime"
  174. label="排产日期"
  175. align="center"
  176. fixed="left"
  177. width="88px"
  178. :show-overflow-tooltip="true"
  179. ></el-table-column>
  180. <el-table-column
  181. sortable
  182. prop="deliveryDate"
  183. label="交货日期"
  184. align="center"
  185. fixed="left"
  186. width="88px"
  187. :show-overflow-tooltip="true"
  188. ></el-table-column>
  189. <el-table-column
  190. sortable
  191. prop="state"
  192. label="状态"
  193. align="center"
  194. fixed="left"
  195. width="88px"
  196. :show-overflow-tooltip="true"
  197. >
  198. <template slot-scope="scope">
  199. <span
  200. :style="{color: nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].color : ''}"
  201. >{{ nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].name : scope.row.state }}</span>
  202. </template>
  203. </el-table-column>
  204. <el-table-column
  205. sortable
  206. prop="grades"
  207. label="钢种"
  208. align="center"
  209. fixed="left"
  210. width="106px"
  211. :show-overflow-tooltip="true"
  212. >
  213. </el-table-column>
  214. <el-table-column
  215. sortable
  216. prop="specifications"
  217. label="规格"
  218. align="center"
  219. fixed="left"
  220. width="105px"
  221. :show-overflow-tooltip="true"
  222. v-if="filterForm.data.gx!='XG'"
  223. >
  224. </el-table-column>
  225. <el-table-column
  226. sortable
  227. prop="lengths"
  228. label="长度"
  229. align="center"
  230. width="80px"
  231. :show-overflow-tooltip="true"
  232. >
  233. </el-table-column>
  234. <!-- <el-table-column
  235. sortable
  236. prop="lengthTimesWidth"
  237. label="高度*宽度"
  238. align="center"
  239. width="120px"
  240. :show-overflow-tooltip="true"
  241. >
  242. </el-table-column> -->
  243. <el-table-column
  244. sortable
  245. prop="planWeight"
  246. label="计划量"
  247. align="center"
  248. width="60px"
  249. :show-overflow-tooltip="true"
  250. >
  251. </el-table-column>
  252. <el-table-column
  253. sortable
  254. prop="transportType"
  255. label="运输方式"
  256. align="center"
  257. width="87px"
  258. :show-overflow-tooltip="true"
  259. >
  260. </el-table-column>
  261. <el-table-column
  262. sortable
  263. prop="purpose"
  264. label="用途"
  265. align="center"
  266. width="87px"
  267. :show-overflow-tooltip="true"
  268. >
  269. </el-table-column>
  270. <el-table-column
  271. sortable
  272. prop="gmReviewer"
  273. label="审核人"
  274. align="center"
  275. min-width="120px"
  276. :show-overflow-tooltip="true"
  277. >
  278. </el-table-column>
  279. <el-table-column
  280. sortable
  281. prop="gmReviewerTime"
  282. label="审核时间"
  283. align="center"
  284. width="120px"
  285. :show-overflow-tooltip="true"
  286. >
  287. </el-table-column>
  288. <el-table-column
  289. sortable
  290. prop="createMan"
  291. label="创建人"
  292. align="center"
  293. width="120px"
  294. :show-overflow-tooltip="true"
  295. >
  296. </el-table-column>
  297. <el-table-column
  298. sortable
  299. prop="createTime"
  300. label="创建时间"
  301. align="center"
  302. width="120px"
  303. :show-overflow-tooltip="true"
  304. >
  305. </el-table-column>
  306. </el-table>
  307. </el-form>
  308. <el-pagination
  309. layout="total, sizes, prev, pager, next, jumper"
  310. :total="total"
  311. :page-sizes="[10, 20, 50, 100, 500, 1000]"
  312. :page-size="pageSize"
  313. :current-page.sync="pageNum"
  314. @size-change="tableSizeChange"
  315. @current-change="getTableData()"
  316. style="text-align: right;margin-top: 10px;"
  317. ></el-pagination>
  318. </div>
  319. </div>
  320. </div>
  321. </template>
  322. <script>
  323. import { zCheckNumber1 } from '~/utils/validator.js';
  324. import timegranDate from '~/components/zg/timegranDate.vue';
  325. import {formatDate, XtcommonSummaries, getCookie} from '@/utils/util.js';
  326. import store from '@/store/index.js';
  327. export default {
  328. name: 'outElectricity',
  329. components: {
  330. 'zj-timegran-date': timegranDate
  331. },
  332. data () {
  333. let setDate = new Date();
  334. setDate.setDate(15);
  335. setDate.setMonth((setDate.getMonth() - 1));
  336. return {
  337. rowIndex: '',
  338. columnId: '',
  339. focusTarget: null,
  340. seqArr: [],
  341. editSetFlag: '',
  342. isCheck: false, // 是否为审核人
  343. isClick: false,
  344. filterForm: {
  345. show: true,
  346. data: {
  347. show: false,
  348. id: '',
  349. workprocType: [],
  350. state: ['1'],
  351. time: [(new Date() - 3600 * 1000 * 24 * 7), (new Date() + 3600 * 1000 * 24 * 7)]
  352. },
  353. rules: {
  354. },
  355. disabled: {
  356. networkid: false
  357. }
  358. },
  359. pageNum: 1,
  360. pageSize: 100,
  361. total: 0,
  362. singleTableHeight: 100,
  363. tableData: [
  364. ],
  365. expands: {},
  366. loading: false,
  367. tableLoading: false,
  368. multipleSelection: [],
  369. tableFormDataObj: {},
  370. nameObj: {
  371. state: {
  372. obj: {
  373. '1': {
  374. name: '等待审核',
  375. color: '#7a7a7a'
  376. },
  377. '2': {
  378. name: '已下发',
  379. color: 'green'
  380. },
  381. '3': {
  382. name: '已接收',
  383. color: 'red'
  384. }
  385. },
  386. arr: [
  387. {
  388. id: '1',
  389. name: '等待审核',
  390. color: '#7a7a7a'
  391. },
  392. {
  393. id: '2',
  394. name: '已下发',
  395. color: 'green'
  396. },
  397. {
  398. id: '3',
  399. name: '已接收',
  400. color: 'red'
  401. }
  402. ]
  403. },
  404. roleList: {
  405. obj: {},
  406. arr: []
  407. },
  408. type: {
  409. obj: {
  410. '0': '否',
  411. '1': '是'
  412. },
  413. arr: [
  414. {
  415. id: '0',
  416. name: '否'
  417. },
  418. {
  419. id: '1',
  420. name: '是'
  421. }
  422. ]
  423. },
  424. transportType: {
  425. obj: {'0': {name: '火运'}, '1': {name: '汽运'}, '2': {name: '汽运或者火运'}},
  426. arr: [
  427. {
  428. id: '0',
  429. name: '火运'
  430. },
  431. {
  432. id: '1',
  433. name: '汽运'
  434. },
  435. {
  436. id: '2',
  437. name: '汽运或者火运'
  438. }
  439. ]
  440. },
  441. workprocid: {
  442. obj: {'AT2004': {name: '炼钢'}, 'AT2005': {name: '一高线'}, 'AT2006': {name: '二高线'}, 'AT2007': {name: '型钢'}},
  443. arr: [
  444. {
  445. id: 'AT2004',
  446. name: '炼钢'
  447. },
  448. {
  449. id: 'AT2005',
  450. name: '一高线'
  451. },
  452. {
  453. id: 'AT2006',
  454. name: '二高线'
  455. },
  456. {
  457. id: 'AT2007',
  458. name: '型钢'
  459. }
  460. ]
  461. },
  462. location: {
  463. obj: {},
  464. arr: [],
  465. showDataArr: []
  466. },
  467. purpose: {
  468. obj: {
  469. '0': {name: '标准件'},
  470. '1': {name: '铁丝'},
  471. '2': {name: '钢丝、弹簧'}
  472. },
  473. arr: [
  474. {
  475. id: '0',
  476. name: '标准件'
  477. },
  478. {
  479. id: '1',
  480. name: '铁丝'
  481. },
  482. {
  483. id: '2',
  484. name: '钢丝、弹簧'
  485. }
  486. ]
  487. },
  488. locateid: {
  489. obj: {},
  490. arr: []
  491. },
  492. networkid: {
  493. obj: {},
  494. arr: []
  495. },
  496. userId: {
  497. obj: {},
  498. arr: []
  499. },
  500. unitid: {
  501. obj: {},
  502. arr: [],
  503. defaults: ''
  504. },
  505. grades: {
  506. obj: {},
  507. arr: []
  508. },
  509. specifications: {
  510. obj: {},
  511. arr: []
  512. },
  513. lengthTimeswidth: {
  514. obj: {},
  515. arr: []
  516. },
  517. chemicalStandard: {
  518. obj: {},
  519. arr: []
  520. }
  521. },
  522. butPrivilege: {
  523. QUERY: false,
  524. PUT: false,
  525. CHECK: false,
  526. UNDOCHECK: false
  527. },
  528. loginName: getCookie('loginName'),
  529. userInfo: {},
  530. userRoles: {},
  531. qrRole: [],
  532. spread: false,
  533. store
  534. }
  535. },
  536. created () {
  537. // 获取按钮权限
  538. this.activeMenu = window.localStorage.getItem('activeMenu');
  539. for (let key in this.butPrivilege) {
  540. this.butPrivilege[key] = this.checkPrivilege(this.activeMenu + key);
  541. }
  542. },
  543. mounted () {
  544. let that = this;
  545. window.PEDataObj = {
  546. // 将数据绑定到window上,供main页面使用
  547. vm: that,
  548. // tableArr:用于导出成Excel的表格的信息
  549. tableArr: [
  550. {
  551. name: '',
  552. id: 'singleTable'
  553. }
  554. ]
  555. };
  556. that.$nextTick(() => {
  557. // 立即获取的height有一定偏差,通过setTimeout延迟来解决
  558. setTimeout(() => {
  559. that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
  560. }, 1);
  561. });
  562. // 接收路由参数
  563. if (that.$route.query.workproc_type) {
  564. that.filterForm.data.workproc_type = that.$route.query.workproc_type;
  565. }
  566. // 当有审核与取消审核权限时,默认其为审核人,审核人无法修改数据
  567. if (that.butPrivilege.CHECK || that.butPrivilege.UNDOCHECK) {
  568. that.isCheck = true;
  569. }
  570. // 管理员在这里录入数据
  571. if (that.loginName === 'admin' && that.filterForm.disabled.networkid) {
  572. that.isCheck = false;
  573. }
  574. // 接收路由参数
  575. if (that.$route.query.gx) {
  576. that.filterForm.data.gx = that.$route.query.gx;
  577. let its = that.filterForm.data.gx.split(',');
  578. if (its && its.length > 10) {
  579. that.pageSize = 50;
  580. that.custom = 0;
  581. }
  582. }
  583. that.getUnitIdData();
  584. // that.getlengthTimesWidth();
  585. that.getRoles();
  586. },
  587. methods: {
  588. // 计算树区域高度
  589. getRoleHeight (dom) {
  590. return window.innerHeight - dom.offsetTop;
  591. },
  592. // 自定义的表格合计方法:只给指定列进行合计
  593. getSummaries (param) {
  594. const prop = ['planWeight']; // 合计列绑定的prop
  595. return XtcommonSummaries(param, prop);
  596. },
  597. rowClick (row) {
  598. let that = this,
  599. params = {
  600. parentid: row.id
  601. };
  602. that.tableLoading = true;
  603. let url = 'pass/ems/v1/emsprodplanrounds/getRounds';
  604. that.axios.get(url, {
  605. params: params
  606. })
  607. .then(function (res) {
  608. if (res.code === '0') {
  609. let chirItem = Object.keys(res.data[0])[0];
  610. that.expands[chirItem] = res.data[0][chirItem];
  611. } else {
  612. that.$message.error(res.message);
  613. }
  614. that.tableLoading = false;
  615. }).catch(function () {
  616. that.tableLoading = false;
  617. });
  618. },
  619. // 获取高线钢种
  620. getGrades () {
  621. let that = this
  622. let type = '';
  623. if (that.filterForm.data.gx === 'GX') {
  624. type = '高线'
  625. }
  626. if (that.filterForm.data.gx === 'XG') {
  627. type = '型钢'
  628. }
  629. let url = 'pass/product/v1/emssteel/getGrades/?type=' + type;
  630. that.axios.get(url)
  631. .then(function (res) {
  632. if (res.code === '0') {
  633. let arr = [];
  634. let obj = {};
  635. for (let item of res.data) {
  636. arr.push({
  637. id: item.id,
  638. name: item.steelName
  639. })
  640. obj[item.id] = {
  641. name: item.steelName,
  642. id: item.id
  643. }
  644. }
  645. that.nameObj.grades.arr = arr;
  646. that.nameObj.grades.obj = obj;
  647. } else {
  648. that.$message.error(res.message);
  649. }
  650. });
  651. },
  652. // 获取高线规格
  653. getSpecifications () {
  654. let that = this
  655. let url = 'pass/product/v1/emssteel/getSpecifications/?type=' + '高线';
  656. that.axios.get(url)
  657. .then(function (res) {
  658. if (res.code === '0') {
  659. let arr = [];
  660. let obj = {};
  661. for (let item of res.data) {
  662. arr.push({
  663. id: item.id,
  664. name: item.specName
  665. })
  666. obj[item.id] = {
  667. name: item.specName,
  668. unitid: item.id
  669. }
  670. }
  671. that.nameObj.specifications.arr = arr;
  672. that.nameObj.specifications.obj = obj;
  673. } else {
  674. that.$message.error(res.message);
  675. }
  676. });
  677. },
  678. // 获取高线执行标准
  679. getStandards () {
  680. let that = this
  681. let url = 'pass/product/v1/emsstandard/getStandards';
  682. that.axios.get(url)
  683. .then(function (res) {
  684. if (res.code === '0') {
  685. let arr = [];
  686. let obj = {};
  687. for (let item of res.data) {
  688. arr.push({
  689. id: item.basecode,
  690. name: item.basename
  691. })
  692. }
  693. that.nameObj.chemicalStandard.arr = arr;
  694. that.nameObj.chemicalStandard.obj = obj;
  695. } else {
  696. that.$message.error(res.message);
  697. }
  698. });
  699. },
  700. // 获取炼钢钢种
  701. getGradesASLg () {
  702. let that = this
  703. let url = 'pass/product/v1/emsvqcmbasesteel/getBase'
  704. that.axios.get(url)
  705. .then(function (res) {
  706. if (res.code === '0') {
  707. let arr = [];
  708. let obj = {};
  709. for (let item of res.data) {
  710. arr.push({
  711. id: item.id,
  712. name: item.name
  713. })
  714. obj[item.id] = {
  715. name: item.name,
  716. id: item.id
  717. }
  718. }
  719. that.nameObj.grades.arr = arr;
  720. that.nameObj.grades.obj = obj;
  721. } else {
  722. that.$message.error(res.message);
  723. }
  724. });
  725. },
  726. // 获取炼钢规格
  727. getSpecificationsAsLg () {
  728. let that = this
  729. let url = 'pass/product/v1/emsvqcmbasespecbillet/getbasespecbillet';
  730. that.axios.get(url)
  731. .then(function (res) {
  732. if (res.code === '0') {
  733. let arr = [];
  734. let obj = {};
  735. for (let item of res.data) {
  736. arr.push({
  737. id: item.id,
  738. name: item.name
  739. })
  740. obj[item.id] = {
  741. name: item.name,
  742. id: item.id
  743. }
  744. }
  745. that.nameObj.specifications.arr = arr;
  746. that.nameObj.specifications.obj = obj;
  747. } else {
  748. that.$message.error(res.message);
  749. }
  750. });
  751. },
  752. // 获取炼钢化学成分标准
  753. getStandardsAsLg () {
  754. let that = this
  755. let url = 'pass/product/v1/emsvqcmstdchem/getstdchem';
  756. that.axios.get(url)
  757. .then(function (res) {
  758. if (res.code === '0') {
  759. let arr = [];
  760. let obj = {};
  761. for (let item of res.data) {
  762. arr.push({
  763. id: item.basecode,
  764. name: item.standardgb
  765. })
  766. }
  767. that.nameObj.chemicalStandard.arr = arr;
  768. that.nameObj.chemicalStandard.obj = obj;
  769. } else {
  770. that.$message.error(res.message);
  771. }
  772. });
  773. },
  774. // 获取型钢宽度*长度
  775. // getlengthTimesWidth () {
  776. // let that = this
  777. // let url = 'pass/ems/v1/emsprodplanrounds/getbasespecbillet';
  778. // that.axios.get(url)
  779. // .then(function (res) {
  780. // if (res.code === '0') {
  781. // let arr = [];
  782. // let obj = {};
  783. // for (let item of res.data) {
  784. // arr.push({
  785. // id: item.id,
  786. // name: item.specifications
  787. // })
  788. // }
  789. // that.nameObj.specifications.arr = arr;
  790. // that.nameObj.specifications.obj = obj;
  791. // } else {
  792. // that.$message.error(res.message);
  793. // }
  794. // });
  795. // },
  796. connn () {
  797. let that = this;
  798. if (!that.filterForm.data.networkid || that.filterForm.data.networkid.length === 0) {
  799. that.nameObj.location.showDataArr = that.nameObj.workprocid.arr;
  800. } else {
  801. let url = 'pass/ems/v1/emsprodplanmonths/getWorkprocs'
  802. that.axios.get(url)
  803. .then(function (res) {
  804. if (res.code === '0') {
  805. let arr = [];
  806. for (let item of res.data) {
  807. arr.push({
  808. id: item.id,
  809. name: item.name
  810. })
  811. }
  812. that.nameObj.location.showDataArr = arr;
  813. } else {
  814. that.$message.error(res.message);
  815. }
  816. });
  817. }
  818. },
  819. // 保存数据
  820. dataSave () {
  821. let that = this;
  822. let SubmitData = {
  823. jhTime: that.dialog.editorBox.form.data.jhTime,
  824. grades: that.dialog.editorBox.form.data.grades,
  825. unitid: '008',
  826. chemicalStandard: that.dialog.editorBox.form.data.chemicalStandard,
  827. planWeight: that.dialog.editorBox.form.data.planWeight,
  828. specifications: that.dialog.editorBox.form.data.specifications,
  829. transportType: that.dialog.editorBox.form.data.transportType,
  830. memo: that.dialog.editorBox.form.data.memo,
  831. workprocType: that.filterForm.data.workproc_type,
  832. lengths: that.dialog.editorBox.form.data.lengths,
  833. purpose: that.dialog.editorBox.form.data.purpose,
  834. iateralArea: that.dialog.editorBox.form.data.iateralArea,
  835. deliveryDate: that.dialog.editorBox.form.data.deliveryDate,
  836. lengthTimesWidth: that.dialog.editorBox.form.data.lengthTimesWidth,
  837. dimension: that.dialog.editorBox.form.data.dimension,
  838. surfaceStandard: that.dialog.editorBox.form.data.surfaceStandard,
  839. state: '0'
  840. };
  841. that.$refs['dialog_form'].validate((valid) => {
  842. if (valid) {
  843. that.loading = true;
  844. that.axios.post('pass/ems/v1/emsgmpcjhs/', SubmitData, {
  845. contentType: 'application/json'
  846. })
  847. .then(function (res) {
  848. if (res.code === '0') {
  849. that.$message({
  850. message: '新增成功',
  851. type: 'success'
  852. });
  853. that.getTableData();
  854. that.dialog.editorBox.show = false;
  855. } else {
  856. that.$message.error(res.message);
  857. }
  858. that.loading = false;
  859. }).catch(function () {
  860. that.loading = false;
  861. });
  862. }
  863. });
  864. },
  865. // 获取表格中的数据
  866. getTableData (pageNum) {
  867. let that = this,
  868. params = {},
  869. pData = {
  870. startTime: that.filterForm.data.time[0],
  871. endTime: that.filterForm.data.time[1],
  872. id: that.filterForm.data.id,
  873. workprocType: that.filterForm.data.workprocType.toString(),
  874. state: that.filterForm.data.state.toString() === '' ? '1,2,3,4' : that.filterForm.data.state.toString()
  875. };
  876. for (let key in pData) {
  877. if (pData[key]) {
  878. params[key] = pData[key];
  879. }
  880. }
  881. that.pageNum = pageNum || that.pageNum;
  882. that.tableLoading = true;
  883. let url = 'pass/ems/v1/emsgmpcjhs/getShData/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
  884. that.axios.get(url, {
  885. params: params
  886. })
  887. .then(function (res) {
  888. if (res.code === '0') {
  889. let arr = [];
  890. for (let i = 0; i < res.data.list.length; i++) {
  891. let item = res.data.list[i];
  892. arr.push({
  893. seq: i,
  894. id: item.id,
  895. jhTime: item.jhTime,
  896. deliveryDate: item.deliveryDate,
  897. state: item.state,
  898. unitid: item.unitid,
  899. grades: item.grades,
  900. specifications: item.specifications,
  901. lengths: item.lengths,
  902. lengthTimesWidth: item.lengthTimesWidth,
  903. transportType: item.transportType,
  904. purpose: item.purpose,
  905. workprocType: item.workprocType,
  906. createMan: item.createMan,
  907. createTime: item.createTime,
  908. planWeight: item.planWeight,
  909. gmReviewer: item.gmReviewer,
  910. gmReviewerTime: item.gmReviewerTime
  911. });
  912. }
  913. that.total = res.data.total;
  914. that.tableData = arr;
  915. that.getAdds();
  916. } else {
  917. that.$message.error(res.message);
  918. }
  919. that.$nextTick(() => {
  920. setTimeout(() => {
  921. that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
  922. }, 1);
  923. });
  924. that.tableLoading = false;
  925. }).catch(function () {
  926. that.tableLoading = false;
  927. });
  928. },
  929. // 改变表格显示条数
  930. tableSizeChange (val) {
  931. let that = this;
  932. that.pageSize = val;
  933. that.getTableData(1);
  934. },
  935. keyDown (event1, disabledFlag) {
  936. let tdTarget = event1.target;
  937. let _this = this;
  938. while (tdTarget.tagName !== 'TD') {
  939. tdTarget = tdTarget.parentElement;
  940. }
  941. // 如果按下键盘下键或者回车键
  942. if (event.keyCode === 40 || event.keyCode === 13) {
  943. let index = parseInt(this.rowIndex);
  944. // index++;
  945. if (index !== this.seqArr[this.seqArr.length - 1]) {
  946. for (let i = 0; i < this.seqArr.length; i++) {
  947. if (index === this.seqArr[i]) {
  948. index = this.seqArr[i + 1];
  949. break;
  950. }
  951. }
  952. }
  953. this.editSetFlag = index + this.columnId;
  954. let id = '#' + this.editSetFlag;
  955. this.$nextTick(() => {
  956. $(id).click();
  957. });
  958. } else if (event.keyCode === 38) { // 键盘上键
  959. let index = parseInt(this.rowIndex);
  960. if (index !== this.seqArr[0]) {
  961. for (let i = 0; i < this.seqArr.length; i++) {
  962. if (index === this.seqArr[i]) {
  963. index = this.seqArr[i - 1];
  964. break;
  965. }
  966. }
  967. }
  968. this.editSetFlag = index + this.columnId;
  969. let id = '#' + this.editSetFlag;
  970. this.$nextTick(() => {
  971. $(id).click();
  972. });
  973. } else if (event.keyCode === 37) { // 键盘左键
  974. $(tdTarget).prevAll().find('input:text').last().click();
  975. } else if (event.keyCode === 39) { // 键盘右键
  976. $(tdTarget).nextAll().find('input').eq(0).click();
  977. }
  978. },
  979. // 只允许对未接受的数据进行操作
  980. checkboxT (row, index) {
  981. if (row.state === '3' && !this.isCheck) {
  982. return false;
  983. } else {
  984. return true;
  985. }
  986. },
  987. // 获取标准计量单位
  988. getUnitIdData () {
  989. let that = this
  990. let url = 'pass/ems/v1/trmunits/getIdAndName';
  991. that.axios.get(url)
  992. .then(function (res) {
  993. if (res.code === '0') {
  994. let arr = [];
  995. let obj = {};
  996. for (let item of res.data) {
  997. arr.push({
  998. id: item.id,
  999. name: item.name
  1000. })
  1001. obj[item.id] = item.name;
  1002. if (item.name === '吨') {
  1003. that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
  1004. }
  1005. }
  1006. that.nameObj.unitid.arr = arr;
  1007. that.nameObj.unitid.obj = obj;
  1008. } else {
  1009. that.$message.error(res.message);
  1010. }
  1011. });
  1012. },
  1013. handleSelectionChange (val) {
  1014. let that = this;
  1015. let tableFormDataObj = {};
  1016. let arr = [];
  1017. for (let item of val) {
  1018. arr.push(item.seq);
  1019. }
  1020. this.seqArr = arr.sort(sortNumber);
  1021. for (let item of that.tableData) {
  1022. item.isSelection = false;
  1023. }
  1024. for (let item of val) {
  1025. let obj = {};
  1026. let xId = item.seq;
  1027. if (that.tableFormDataObj[xId]) {
  1028. // 如果已存在该数据则使用该数据
  1029. tableFormDataObj[xId] = that.tableFormDataObj[xId];
  1030. } else {
  1031. // 负责则从对应行中获取行内原数据
  1032. for (let key in item) {
  1033. obj[key] = item[key];
  1034. }
  1035. item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
  1036. tableFormDataObj[xId] = obj;
  1037. }
  1038. item.isSelection = true;
  1039. }
  1040. for (let item of that.tableData) {
  1041. if (item.isSelection === false) {
  1042. item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
  1043. }
  1044. }
  1045. that.tableFormDataObj = tableFormDataObj;
  1046. that.multipleSelection = val;
  1047. this.getAdds();
  1048. },
  1049. handleclickChange (row, column, cell, event) {
  1050. let that = this;
  1051. if (column.label === '计划量' && !this.isClick) {
  1052. that.isClick = true;
  1053. } else {
  1054. that.isClick = false;
  1055. }
  1056. },
  1057. getApportValue (seq, value, rowIndex, event) {
  1058. let that = this;
  1059. if (!isNaN(Number(value))) {
  1060. if (!isNaN(Number(that.tableFormDataObj[seq].mintvalue)) && !isNaN(Number(that.tableFormDataObj[seq].mendvalue)) && that.tableFormDataObj[seq].mintvalue !== null && that.tableFormDataObj[seq].mendvalue !== null) {
  1061. let poor = that.floatComputed(Number(that.tableFormDataObj[seq].mendvalue), Number(that.tableFormDataObj[seq].mintvalue), '-');
  1062. that.tableFormDataObj[seq].apportvalue = that.floatComputed(poor, Number(that.tableFormDataObj[seq].mods), '*').toFixed(0);
  1063. let rv1 = that.floatComputed(Number(that.tableFormDataObj[seq].apportvalue), Number(that.tableFormDataObj[seq].wastage), '+');
  1064. that.tableFormDataObj[seq].realvalue = that.floatComputed(rv1, Number(that.tableFormDataObj[seq].secondVal), '-').toFixed(0);
  1065. that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
  1066. }
  1067. }
  1068. },
  1069. // 手动修改抄度后计算实际电量
  1070. chnageApportvalue (seq, value, rowIndex) {
  1071. let that = this;
  1072. if (!isNaN(Number(value)) && !isNaN(Number(that.tableFormDataObj[seq].wastage))) {
  1073. that.tableFormDataObj[seq].realvalue = that.floatComputed(Number(value), Number(that.tableFormDataObj[seq].wastage), '+').toFixed(0);
  1074. }
  1075. that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
  1076. },
  1077. // 手动修改损耗后计算实际电量
  1078. chnageWastage (seq, value, rowIndex) {
  1079. let that = this;
  1080. if (!isNaN(Number(value)) && !isNaN(Number(that.tableFormDataObj[seq].apportvalue)) && that.tableFormDataObj[seq].apportvalue !== null) {
  1081. let rv1 = that.floatComputed(Number(value), Number(that.tableFormDataObj[seq].apportvalue), '+');
  1082. that.tableFormDataObj[seq].realvalue = that.floatComputed(rv1, Number(that.tableFormDataObj[seq].secondVal), '-').toFixed(0);
  1083. that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
  1084. }
  1085. },
  1086. // 手动修改二次转供电后计算实际电量
  1087. chnageSecondVal (seq, value, rowIndex) {
  1088. let that = this;
  1089. if (!isNaN(Number(value)) && !isNaN(Number(that.tableFormDataObj[seq].apportvalue)) && that.tableFormDataObj[seq].apportvalue !== null) {
  1090. let val1 = that.floatComputed(Number(that.tableFormDataObj[seq].apportvalue), Number(that.tableFormDataObj[seq].wastage), '+');
  1091. that.tableFormDataObj[seq].realvalue = that.floatComputed(val1, Number(value), '-').toFixed(0);
  1092. that.showRealValue(rowIndex, that.tableFormDataObj[seq].realvalue);
  1093. }
  1094. },
  1095. // 统计合计值
  1096. getAdds () {
  1097. let that = this;
  1098. let wlarr = [];
  1099. for (var i = 0; i < that.tableData.length; i++) {
  1100. wlarr.push(that.tableData[i].workprocid + '-' + that.tableData[i].location + '-' + that.tableData[i].workshop + '-' + that.tableData[i].clock + '-' + that.tableData[i].clocke);
  1101. }
  1102. let wls = [...new Set(wlarr)]
  1103. let arrs = [];
  1104. for (let wl of wls) {
  1105. let rxj = 0;
  1106. let yhj = 0;
  1107. for (let item of that.tableData) {
  1108. if (wl === item.workprocid + '-' + item.location + '-' + item.workshop + '-' + item.clock + '-' + item.clocke) {
  1109. rxj = that.floatComputed(Number(item.weightDay), rxj, '+');
  1110. yhj = that.floatComputed(Number(item.weightMonth), yhj, '+');
  1111. }
  1112. }
  1113. for (let i = 0; i < that.tableData.length; i++) {
  1114. if (wl === that.tableData[i].workprocid + '-' + that.tableData[i].location + '-' + that.tableData[i].workshop + '-' + that.tableData[i].clock + '-' + that.tableData[i].clocke) {
  1115. that.tableData[i].rxj = rxj;
  1116. that.tableData[i].yhj = yhj;
  1117. }
  1118. }
  1119. }
  1120. },
  1121. // 展示实际电量
  1122. showRealValue (rowIndex, value) {
  1123. let that = this;
  1124. for (let i = 0; i < that.tableData.length; i++) {
  1125. if (i === rowIndex) {
  1126. that.tableData[i].realvalue = value;
  1127. }
  1128. }
  1129. this.getAdds();
  1130. },
  1131. // 批量修改
  1132. but_edit_plural () {
  1133. let that = this;
  1134. if (that.multipleSelection.length > 0) {
  1135. that.$refs['dialog_form_arr'].validate((valid, obj) => {
  1136. if (valid) {
  1137. let SubmitData = [];
  1138. for (let key in that.tableFormDataObj) {
  1139. SubmitData.push({
  1140. id: that.tableFormDataObj[key].id,
  1141. jhTime: that.tableFormDataObj[key].jhTime,
  1142. grades: that.tableFormDataObj[key].grades,
  1143. transportType: that.tableFormDataObj[key].transportType,
  1144. specifications: that.tableFormDataObj[key].specifications,
  1145. unitid: that.tableFormDataObj[key].unitid,
  1146. memo: that.tableFormDataObj[key].memo,
  1147. workprocType: that.filterForm.data.workproc_type,
  1148. chemicalStandard: that.tableFormDataObj[key].chemicalStandard,
  1149. planWeight: that.tableFormDataObj[key].planweight,
  1150. createTime: that.tableFormDataObj[key].createtime,
  1151. purpose: that.tableFormDataObj[key].purpose,
  1152. createMan: that.tableFormDataObj[key].createman,
  1153. updateTime: that.tableFormDataObj[key].updatetime,
  1154. updateMan: that.tableFormDataObj[key].updateman,
  1155. state: that.tableFormDataObj[key].state,
  1156. lengths: that.tableFormDataObj[key].lengths,
  1157. surfaceStandard: that.tableFormDataObj[key].surfacestandard,
  1158. deliveryDate: that.tableFormDataObj[key].deliveryDate,
  1159. dimension: that.tableFormDataObj[key].dimension,
  1160. iateralArea: that.tableFormDataObj[key].iateralarea,
  1161. lengthTimesWidth: that.tableFormDataObj[key].lengthtimeswidth
  1162. });
  1163. }
  1164. that.loading = true;
  1165. that.axios.put('pass/ems/v1/emsgmpcjhs/batchupdate', SubmitData)
  1166. .then(function (res) {
  1167. if (res.code === '0') {
  1168. that.$message({
  1169. message: '修改成功',
  1170. type: 'success'
  1171. });
  1172. that.getTableData();
  1173. that.dialog.editorBox.show = false;
  1174. } else {
  1175. that.$message.error(res.message);
  1176. }
  1177. that.loading = false;
  1178. }).catch(function () {
  1179. that.loading = false;
  1180. });
  1181. }
  1182. });
  1183. } else {
  1184. this.$message.error('至少要选择一条数据');
  1185. }
  1186. },
  1187. getRoles () {
  1188. let that = this;
  1189. // 获取用户信息
  1190. this.store.dispatch('getUserInfo').then((res) => {
  1191. this.userInfo = res.data;
  1192. that.axios.get('pass/v1/sysuserroles/?userId=' + res.data.userId + '&pageNum=1&pageSize=100').then(rest => {
  1193. if (rest) {
  1194. for (let i = 0; i < rest.data.list.length; i++) {
  1195. that.qrRole.push(rest.data.list[i].roleId)
  1196. }
  1197. that.userRoles = rest.data.list; // 获取用户角色关联信息
  1198. }
  1199. let roleId = this.nameObj.roleList.obj['生产部-生产处'].id;
  1200. if (this.qrRole.includes(roleId)) {
  1201. this.spread = true;
  1202. }
  1203. })
  1204. });
  1205. // 获取角色信息
  1206. this.store.dispatch('system/rolesManage/list').then(res => {
  1207. if (res.code === '0') {
  1208. this.nameObj.roleList.arr = res.data;
  1209. for (let obj of res.data) {
  1210. this.nameObj.roleList.obj[obj.roleName] = {
  1211. name: obj.roleName,
  1212. id: obj.id
  1213. };
  1214. }
  1215. } else {
  1216. this.$message.error(res.message);
  1217. }
  1218. });
  1219. },
  1220. turndown () {
  1221. let that = this;
  1222. if (that.multipleSelection.length > 0) {
  1223. that.$refs['dialog_form_arr'].validate((valid, obj) => {
  1224. if (valid) {
  1225. let SubmitData = [];
  1226. for (let key in that.tableFormDataObj) {
  1227. SubmitData.push({
  1228. id: that.tableFormDataObj[key].id,
  1229. workprocType: that.filterForm.data.workproc_type,
  1230. state: '0'
  1231. });
  1232. }
  1233. that.loading = true;
  1234. that.axios.put('pass/ems/v1/emsgmpcjhs/turndown', SubmitData)
  1235. .then(function (res) {
  1236. if (res.code === '0') {
  1237. that.$message({
  1238. message: '操作成功',
  1239. type: 'success'
  1240. });
  1241. that.getTableData();
  1242. that.dialog.editorBox.show = false;
  1243. } else {
  1244. that.$message.error(res.message);
  1245. }
  1246. that.loading = false;
  1247. }).catch(function () {
  1248. that.loading = false;
  1249. });
  1250. }
  1251. });
  1252. } else {
  1253. this.$message.error('至少要选择一条数据');
  1254. }
  1255. },
  1256. passaudits () {
  1257. let that = this;
  1258. if (that.multipleSelection.length > 0) {
  1259. that.$refs['dialog_form_arr'].validate((valid, obj) => {
  1260. if (valid) {
  1261. let SubmitData = [];
  1262. for (let key in that.tableFormDataObj) {
  1263. SubmitData.push({
  1264. id: that.tableFormDataObj[key].id,
  1265. workprocType: that.filterForm.data.workproc_type,
  1266. state: '2'
  1267. });
  1268. }
  1269. that.loading = true;
  1270. that.axios.put('pass/ems/v1/emsgmpcjhs/passaudits', SubmitData)
  1271. .then(function (res) {
  1272. if (res.code === '0') {
  1273. that.$message({
  1274. message: '操作成功',
  1275. type: 'success'
  1276. });
  1277. that.getTableData();
  1278. that.dialog.editorBox.show = false;
  1279. } else {
  1280. that.$message.error(res.message);
  1281. }
  1282. that.loading = false;
  1283. }).catch(function () {
  1284. that.loading = false;
  1285. });
  1286. }
  1287. });
  1288. } else {
  1289. this.$message.error('至少要选择一条数据');
  1290. }
  1291. },
  1292. // 下发
  1293. issue (state) {
  1294. let that = this;
  1295. if (that.multipleSelection.length > 0) {
  1296. that.$refs['dialog_form_arr'].validate((valid, obj) => {
  1297. if (valid) {
  1298. let SubmitData = [];
  1299. for (let key in that.tableFormDataObj) {
  1300. SubmitData.push({
  1301. id: that.tableFormDataObj[key].id,
  1302. workprocType: that.filterForm.data.workproc_type,
  1303. state: state
  1304. });
  1305. }
  1306. that.loading = true;
  1307. that.axios.put('pass/ems/v1/emsgmpcjhs/updatestate', SubmitData)
  1308. .then(function (res) {
  1309. if (res.code === '0') {
  1310. that.$message({
  1311. message: '修改成功',
  1312. type: 'success'
  1313. });
  1314. that.getTableData();
  1315. that.dialog.editorBox.show = false;
  1316. } else {
  1317. that.$message.error(res.message);
  1318. }
  1319. that.loading = false;
  1320. }).catch(function () {
  1321. that.loading = false;
  1322. });
  1323. }
  1324. });
  1325. } else {
  1326. this.$message.error('至少要选择一条数据');
  1327. }
  1328. },
  1329. // 批量删除
  1330. but_del_plural () {
  1331. let that = this;
  1332. if (that.multipleSelection.length > 0) {
  1333. let SubmitData = [];
  1334. for (let item of that.multipleSelection) {
  1335. SubmitData.push({
  1336. id: item.id,
  1337. state: item.state,
  1338. sqno: item.sqno
  1339. });
  1340. }
  1341. that.$confirm('是否删除已选数据?', '提示', {
  1342. confirmButtonText: '确定',
  1343. cancelButtonText: '取消',
  1344. state: 'warning'
  1345. }).then(() => {
  1346. that.axios.delete('pass/ems/v1/emsgmpcjhs/delete', {
  1347. data: SubmitData,
  1348. contentType: 'application/json;charset=UTF-8'
  1349. })
  1350. .then(function (res) {
  1351. if (res.code === '0') {
  1352. that.$message({
  1353. message: '删除成功',
  1354. type: 'success'
  1355. });
  1356. that.getTableData();
  1357. } else {
  1358. that.$message.error(res.message);
  1359. }
  1360. }).catch(function () {
  1361. });
  1362. }).catch(() => {
  1363. });
  1364. } else {
  1365. this.$message.error('至少要选择一条数据');
  1366. }
  1367. },
  1368. tableRowClassName ({row, rowIndex}) {
  1369. // 把每一行的索引放进row
  1370. row.index = rowIndex;
  1371. },
  1372. cellClick (row, column, cell, event) {
  1373. let _this = this;
  1374. this.rowIndex = row.index;
  1375. this.columnId = column.id;
  1376. _this.editSetFlag = row.index + column.id;
  1377. _this.focusTarget = event.target;
  1378. while (_this.focusTarget.tagName !== 'TD') {
  1379. _this.focusTarget = _this.focusTarget.parentElement;
  1380. }
  1381. _this.$nextTick(() => {
  1382. let target = this.focusTarget;
  1383. $(target).find('input').focus();
  1384. });
  1385. }
  1386. }
  1387. }
  1388. function sortNumber (a, b) {
  1389. return a - b
  1390. }
  1391. </script>
  1392. <style lang="less">
  1393. .outElectricity{
  1394. min-width: 700px;
  1395. height: 100%;
  1396. .box {
  1397. height: 100%;
  1398. padding: 15px 15px 0 15px;
  1399. .box-top {
  1400. .el-form-item {
  1401. margin-bottom: 7px;
  1402. }
  1403. .box-top-gjl {
  1404. overflow: hidden;
  1405. padding: 7px 0;
  1406. border-top: 1px solid #ccc;
  1407. }
  1408. }
  1409. .rowDisable td {
  1410. color: #6bb025 !important;
  1411. }
  1412. .el-table .el-table__row {
  1413. height: 35px;
  1414. }
  1415. .el-table__body .el-form-item--mini.el-form-item {
  1416. margin: 0px;
  1417. .error {
  1418. overflow: hidden;
  1419. color: #f56c6c;
  1420. font-size: 12px;
  1421. line-height: 1;
  1422. }
  1423. }
  1424. }
  1425. .color_no {
  1426. color: #7a7a7a;
  1427. }
  1428. .color_yes {
  1429. color: #1a9f17;
  1430. }
  1431. .cnspicuous .el-checkbox__input.is-disabled .el-checkbox__inner {
  1432. background-color: #dcdfe6;
  1433. border-color: #babbbf;
  1434. }
  1435. }
  1436. </style>