outsource.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  1. <!-- 委外列表 -->
  2. <template>
  3. <div class="sale">
  4. <template v-if="!detailVisible && !addOrUpdateVisible && !changeFormVisible &&!changeAttachVisible && !attachVisible && !noticeChangeAttachVisible && !inboundVisible && !outsourceVisible && !noticeChangeAttachVisible && !amountMaskSettingVisible">
  5. <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
  6. <el-form-item label="类别">
  7. <el-select
  8. v-model="dataForm.commissionType"
  9. remote
  10. placeholder="请选择">
  11. <el-option
  12. v-for="item in optionsType"
  13. :key="item.code"
  14. :label="item.value"
  15. :value="item.code">
  16. </el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item label="名称或说明" prop="goodsName">
  20. <el-input v-model="dataForm.goodsName" placeholder="物料名称" clearable/>
  21. </el-form-item>
  22. <el-form-item label="申请日期">
  23. <el-date-picker
  24. v-model="dataForm.date"
  25. value-format="yyyy-MM-dd"
  26. type="daterange"
  27. range-separator="至"
  28. start-placeholder="开始日期"
  29. end-placeholder="结束日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item label="状态">
  33. <el-select
  34. v-model="dataForm.purchaseState"
  35. remote
  36. placeholder="请选择">
  37. <el-option
  38. v-for="item in optionsOutsourceState"
  39. :key="item.code"
  40. :label="item.value"
  41. :value="item.code">
  42. </el-option>
  43. </el-select>
  44. </el-form-item>
  45. <el-form-item>
  46. <el-button @click="search()">查询</el-button>
  47. <el-button v-if="isAuth('pur:commDetail:save')" type="primary" @click="addOrUpdateHandle()">新增委外</el-button>
  48. <el-button v-if="isAuth('pur:commDetail:noteChangeConfig')" type="primary" @click="setNoticeChangeHandel()">工作提示通知设置</el-button>
  49. <el-button v-if="isAuth('pur:commDetail:priceConfig')" type="primary" @click="setAmountMaskHandel()">委外金额屏蔽设置</el-button>
  50. <el-button v-if="isAuth('pur:commDetail:updatePurCommissionDetail')" type="primary" @click="batchHandle()" :disabled="batchBtnDisabled">批量委外</el-button>
  51. <el-button v-if="isAuth('pur:commDetail:infoPutIn')" type="primary" @click="batchIncomeHandle()" :disabled="batchIncomeBtnDisabled">批量入库</el-button>
  52. </el-form-item>
  53. </el-form>
  54. <el-table
  55. @selection-change="handleSelectionChange"
  56. :data="dataList"
  57. :row-class-name="tableRowClassName"
  58. border
  59. v-loading="dataListLoading"
  60. style="width: 100%;">
  61. <el-table-column
  62. type="selection"
  63. width="55">
  64. </el-table-column>
  65. <el-table-column
  66. label="序号"
  67. type="index"
  68. width="50"
  69. align="center">
  70. </el-table-column>
  71. <el-table-column
  72. prop="purchaseCode"
  73. header-align="center"
  74. align="center"
  75. min-width="120"
  76. :show-tooltip-when-overflow="true"
  77. label="采购编码">
  78. </el-table-column>
  79. <el-table-column
  80. prop="productName"
  81. header-align="center"
  82. align="center"
  83. min-width="140"
  84. :show-tooltip-when-overflow="true"
  85. label="物料名称">
  86. </el-table-column>
  87. <el-table-column
  88. prop="mapNumber"
  89. header-align="center"
  90. align="center"
  91. min-width="140"
  92. :show-tooltip-when-overflow="true"
  93. label="图号">
  94. </el-table-column>
  95. <el-table-column
  96. prop="simplePic"
  97. header-align="center"
  98. align="center"
  99. min-width="120"
  100. label="简图">
  101. <template slot-scope="scope">
  102. <el-popover placement="right" title="" trigger="hover">
  103. <img :src="scope.row.simplePic" style="height: 400px;width: 500px">
  104. <img slot="reference" :src="scope.row.simplePic" :alt="scope.row.simplePic" style="max-height: 50px;max-width: 130px">
  105. </el-popover>
  106. </template>
  107. </el-table-column>
  108. <el-table-column
  109. prop="productNumber"
  110. header-align="center"
  111. align="center"
  112. min-width="120"
  113. :show-tooltip-when-overflow="true"
  114. label="物料编号">
  115. </el-table-column>
  116. <el-table-column
  117. prop="commissionTypeName"
  118. header-align="center"
  119. align="center"
  120. min-width="140"
  121. :show-overflow-tooltip="true"
  122. :formatter="formatType"
  123. label="委外类别">
  124. </el-table-column>
  125. <el-table-column
  126. prop="productSpec"
  127. header-align="center"
  128. align="center"
  129. min-width="100"
  130. :show-tooltip-when-overflow="true"
  131. label="型号及规格">
  132. </el-table-column>
  133. <el-table-column
  134. prop="cnt"
  135. header-align="center"
  136. align="center"
  137. label="数量">
  138. </el-table-column>
  139. <el-table-column
  140. prop="qualifiedCnt"
  141. header-align="center"
  142. align="center"
  143. label="合格数量">
  144. </el-table-column>
  145. <el-table-column
  146. prop="unitName"
  147. header-align="center"
  148. align="center"
  149. min-width="100"
  150. :show-tooltip-when-overflow="true"
  151. label="单位">
  152. </el-table-column>
  153. <el-table-column
  154. prop="deadline"
  155. header-align="center"
  156. align="center"
  157. min-width="160"
  158. :show-tooltip-when-overflow="true"
  159. label="委外期限">
  160. </el-table-column>
  161. <el-table-column
  162. prop="arrivedTime"
  163. header-align="center"
  164. align="center"
  165. min-width="160"
  166. :show-tooltip-when-overflow="true"
  167. label="到料时间">
  168. </el-table-column>
  169. <el-table-column
  170. prop="batchNumber"
  171. header-align="center"
  172. align="center"
  173. min-width="140"
  174. :show-tooltip-when-overflow="true"
  175. label="批次号/用途">
  176. </el-table-column>
  177. <el-table-column
  178. prop="supplierName"
  179. header-align="center"
  180. align="center"
  181. min-width="140"
  182. :show-tooltip-when-overflow="true"
  183. label="供应商">
  184. </el-table-column>
  185. <!-- <el-table-column-->
  186. <!-- prop="technologyFile"-->
  187. <!-- header-align="center"-->
  188. <!-- align="center"-->
  189. <!-- min-width="140"-->
  190. <!-- :show-tooltip-when-overflow="true"-->
  191. <!-- label="工艺文件">-->
  192. <!-- </el-table-column>-->
  193. <el-table-column
  194. header-align="center"
  195. align="center"
  196. label="附件">
  197. <template slot-scope="scope">
  198. <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>
  199. </template>
  200. </el-table-column>
  201. <el-table-column
  202. prop="applyTime"
  203. header-align="center"
  204. align="center"
  205. min-width="160"
  206. :show-tooltip-when-overflow="true"
  207. label="申请时间">
  208. </el-table-column>
  209. <el-table-column
  210. prop="applier"
  211. header-align="center"
  212. align="center"
  213. min-width="140"
  214. :show-tooltip-when-overflow="true"
  215. label="申请人">
  216. </el-table-column>
  217. <el-table-column
  218. prop="orgName"
  219. header-align="center"
  220. align="center"
  221. min-width="140"
  222. :show-tooltip-when-overflow="true"
  223. label="申请部门">
  224. </el-table-column>
  225. <el-table-column
  226. prop="notes"
  227. header-align="center"
  228. align="center"
  229. min-width="180"
  230. :show-overflow-tooltip="true"
  231. label="备注">
  232. </el-table-column>
  233. <el-table-column
  234. fixed="right"
  235. prop="approvalState"
  236. header-align="center"
  237. align="center"
  238. :formatter="formatState"
  239. label="审批状态">
  240. </el-table-column>
  241. <el-table-column
  242. fixed="right"
  243. prop="purchaseState"
  244. header-align="center"
  245. align="center"
  246. :formatter="formatOutsourceState"
  247. label="委外状态">
  248. </el-table-column>
  249. <el-table-column
  250. fixed="right"
  251. header-align="center"
  252. align="center"
  253. width="150"
  254. label="操作">
  255. <template slot-scope="scope">
  256. <el-button v-if="isAuth('pur:commDetail:info')" type="text" size="small" @click="detailHandle(scope.row.purchaseId)">查看</el-button>
  257. <el-button v-if="isAuth('pur:commDetail:update') && (Number(scope.row.approvalState) === 1)" type="text" size="small" @click="addOrUpdateHandle(scope.row.purchaseId)">编辑</el-button>
  258. <el-button v-if="isAuth('pur:commDetail:updatePurCommissionDetail') && (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 1)" type="text" size="small" @click="outsourceHandle(scope.row)">委外</el-button>
  259. <el-button v-if="isAuth('pur:commDetail:infoPutIn') && (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 2||(Number(scope.row.purchaseState) === 5))" type="text" size="small" @click="inBound(scope.row)">入库</el-button>
  260. <el-button v-if="isAuth('pur:commDetail:infoPutInAgain') && (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 5)" type="text" size="small" @click="inBound(scope.row)">再次入库</el-button>
  261. <el-button type="text" size="small" @click="exportHandle(scope.row.purchaseId)">导出</el-button>
  262. <el-button v-if="isAuth('pur:commDetail:update') && (Number(scope.row.approvalState) === 1)" type="text" size="small" @click="revokeHandle(scope.row.purchaseId)">撤回</el-button>
  263. <el-button v-if="isAuth('pur:commDetail:update') && (Number(scope.row.approvalState) === 0)" type="text" size="small" @click="deleteHandle(scope.row.purchaseId)">删除</el-button>
  264. </template>
  265. </el-table-column>
  266. </el-table>
  267. <el-pagination
  268. @size-change="sizeChangeHandle"
  269. @current-change="currentChangeHandle"
  270. :current-page="pageIndex"
  271. :page-sizes="[10, 20, 50, 100]"
  272. :page-size="pageSize"
  273. :total="totalPage"
  274. layout="total, sizes, prev, pager, next, jumper">
  275. </el-pagination>
  276. </template>
  277. <!-- 弹窗, 新增 / 修改 -->
  278. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @onChose="onChose"></add-or-update>
  279. <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
  280. <attach-detail v-if="changeAttachVisible" ref="changeDetail" @onChose="onChose"/>
  281. <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
  282. <notice-change-setting v-if="noticeChangeAttachVisible" ref="noticeChangeSetting" @onChose="onChose"/>
  283. <change-form v-if="changeFormVisible" ref="changeForm" @refreshDataList="getDataList" @onChose="onChose"/>
  284. <!-- 入库 -->
  285. <stock-order-inbound v-if="inboundVisible" ref="inbound" @refreshDataList="getDataList" @onChose="onChose"/>
  286. <outsource-pop v-if="outsourceVisible" ref="refOutsource" @refreshDataList="getDataList" @onChose="onChose"/>
  287. <amount-mask-setting v-if="amountMaskSettingVisible" ref="amountMaskSetting" @onChose="onChose"/>
  288. </div>
  289. </template>
  290. <script>
  291. import Vue from 'vue'
  292. import AddOrUpdate from './outsource-add-or-update'
  293. import Detail from './outsource-detail'
  294. import { getOutsourceList, delOutsource, revokeOutsource } from '@/api/sale'
  295. import AttachDetail from '../common/attach-detail'
  296. import NoticeChangeSetting from './outsource-notice-change-setting'
  297. import ChangeForm from '../cus/contract-record-change'
  298. import { getDictList } from '@/api/dict'
  299. import StockOrderInbound from '../warehouse/stock-order-inbound'
  300. import OutsourcePop from './outsource-pop'
  301. import AmountMaskSetting from './outsource-amount-mask-setting'
  302. import { downloadUrl } from '@/api/file'
  303. export default {
  304. name: 'outsource',
  305. components: {
  306. OutsourcePop,
  307. AttachDetail,
  308. AddOrUpdate,
  309. Detail,
  310. NoticeChangeSetting,
  311. ChangeForm,
  312. StockOrderInbound,
  313. AmountMaskSetting
  314. },
  315. data () {
  316. return {
  317. addOrUpdateVisible: false,
  318. detailVisible: false,
  319. attachVisible: false,
  320. changeAttachVisible: false,
  321. noticeChangeAttachVisible: false,
  322. amountMaskSettingVisible: false,
  323. changeFormVisible: false,
  324. inboundVisible: false, // 入库申请
  325. outsourceVisible: false, // 委外
  326. dataForm: {},
  327. dataList: [],
  328. pageIndex: 1,
  329. pageSize: 10,
  330. totalPage: 0,
  331. dataListLoading: false,
  332. dataListSelections: [],
  333. optionsType: [], // 类别
  334. // 委外状态
  335. optionsOutsourceState: [
  336. {code: null, value: '全部'},
  337. {code: '1', value: '待委外'},
  338. {code: '2', value: '委外中'},
  339. {code: '3', value: '已入库'},
  340. {code: '4', value: '入库中'},
  341. {code: '5', value: '入库异常'}
  342. ],
  343. // 审批状态
  344. optionsState: [],
  345. selectedRows: [],
  346. batchBtnDisabled: false,
  347. batchIncomeBtnDisabled: false
  348. }
  349. },
  350. created () {
  351. this.optionsState = this.$store.state.common.approveStates
  352. this.getType()
  353. this.getDataList()
  354. },
  355. methods: {
  356. onChose () {
  357. this.addOrUpdateVisible = false
  358. this.attachVisible = false
  359. this.detailVisible = false
  360. this.noticeChangeAttachVisible = false
  361. this.changeFormVisible = false
  362. this.changeAttachVisible = false
  363. this.inboundVisible = false
  364. this.outsourceVisible = false
  365. this.amountMaskSettingVisible = false
  366. this.selectedRows = []
  367. this.batchBtnDisabled = false
  368. this.batchIncomeBtnDisabled = false
  369. },
  370. // 查询
  371. search () {
  372. this.pageIndex = 1
  373. this.getDataList()
  374. },
  375. // 获取类别
  376. getType () {
  377. getDictList({type: 'commission_type'}).then(({data}) => {
  378. if (data) {
  379. this.optionsType = data
  380. }
  381. })
  382. },
  383. // 获取数据列表
  384. getDataList () {
  385. this.selectedRows = []
  386. this.batchBtnDisabled = false
  387. this.batchIncomeBtnDisabled = false
  388. this.dataListLoading = true
  389. let params = {
  390. 'current': this.pageIndex,
  391. 'size': this.pageSize,
  392. 'goodsName': this.dataForm.goodsName ? this.dataForm.goodsName : null,
  393. 'applyTimeBegin': this.dataForm.date ? this.dataForm.date[0] : null,
  394. 'applyTimeEnd': this.dataForm.date ? this.dataForm.date[1] : null,
  395. 'purchaseState': this.dataForm.purchaseState ? this.dataForm.purchaseState : null,
  396. 'commissionType': this.dataForm.commissionType ? this.dataForm.commissionType : null
  397. }
  398. getOutsourceList(params).then(({data}) => {
  399. if (data && data.code === '200' && data.data) {
  400. this.dataList = data.data.records
  401. this.totalPage = Number(data.data.total)
  402. // 简图格式调整
  403. this.dataList.forEach(item => {
  404. if (item.attachList2 && item.attachList2.length > 0) {
  405. item.simplePic = downloadUrl + item.attachList2[0].url
  406. } else {
  407. item.simplePic = ''
  408. }
  409. })
  410. } else {
  411. this.dataList = []
  412. this.totalPage = 0
  413. }
  414. this.dataListLoading = false
  415. })
  416. },
  417. deleteHandle (id) {
  418. if (!id) return
  419. let ids = []
  420. ids.push(id)
  421. this.$confirm(`确定删除?`, '提示', {
  422. confirmButtonText: '确定',
  423. cancelButtonText: '取消',
  424. type: 'warning'
  425. }).then(() => {
  426. delOutsource({purchaseIds: [id]}).then(({data}) => {
  427. if (data && data.code === '200') {
  428. this.$message({
  429. message: '操作成功',
  430. type: 'success',
  431. duration: 1500,
  432. onClose: () => {
  433. this.getDataList()
  434. }
  435. })
  436. } else {
  437. this.$message.error(data.msg)
  438. }
  439. })
  440. }).catch(() => {})
  441. },
  442. // 每页数
  443. sizeChangeHandle (val) {
  444. this.pageSize = val
  445. this.pageIndex = 1
  446. this.getDataList()
  447. },
  448. // 当前页
  449. currentChangeHandle (val) {
  450. this.pageIndex = val
  451. this.getDataList()
  452. },
  453. // 多选
  454. selectionChangeHandle (val) {
  455. this.dataListSelections = val
  456. },
  457. // 新增 / 修改
  458. addOrUpdateHandle (id) {
  459. this.addOrUpdateVisible = true
  460. this.$nextTick(() => {
  461. this.$refs.addOrUpdate.init(id)
  462. })
  463. },
  464. // 撤回
  465. revokeHandle (id) {
  466. this.$confirm('是否确认要撤回?', '提示', {
  467. confirmButtonText: '确定',
  468. cancelButtonText: '取消',
  469. type: 'warning'
  470. }).then(() => {
  471. revokeOutsource({id}).then(({data}) => {
  472. if (data && data.code === '200') {
  473. this.$message({
  474. type: 'success',
  475. message: '撤回成功!',
  476. duration: 1500,
  477. onClose: () => {
  478. this.search()
  479. }
  480. })
  481. } else {
  482. this.$message({
  483. type: 'error',
  484. message: data.msg
  485. })
  486. }
  487. })
  488. }).catch(() => {
  489. this.$message({
  490. type: 'info',
  491. message: '已取消撤回'
  492. })
  493. })
  494. },
  495. // 变更
  496. changeHandle (id) {
  497. this.changeFormVisible = true
  498. this.$nextTick(() => {
  499. this.$refs.changeForm.init(id)
  500. })
  501. },
  502. // 详情
  503. detailHandle (id) {
  504. this.detailVisible = true
  505. this.$nextTick(() => {
  506. this.$refs.detail.init(id)
  507. })
  508. },
  509. // 变更通知人设置
  510. setNoticeChangeHandle () {
  511. this.noticeChangeAttachVisible = true
  512. this.$nextTick(() => {
  513. this.$refs.noticeChangeSetting.init()
  514. })
  515. },
  516. // 物料更改通知单
  517. changeDetails (row) {
  518. this.changeAttachVisible = true
  519. this.$nextTick(() => {
  520. this.$refs.changeDetail.init(row.noticeAttachList)
  521. })
  522. },
  523. // 转换属性“委外状态”
  524. formatOutsourceState (row) {
  525. if (!row.purchaseState) return ''
  526. const item1 = this.optionsOutsourceState.find((item) => item.code === row.purchaseState.toString())
  527. return item1 ? item1.value : ''
  528. },
  529. // 转换属性“类别”
  530. formatType (row) {
  531. if (!row.commissionType) return ''
  532. const item1 = this.optionsType.find((item) => item.code === row.commissionType.toString())
  533. return item1 ? item1.value : ''
  534. },
  535. // 转换属性“审批状态”
  536. formatState (row) {
  537. if (!row.approvalState) return ''
  538. const item1 = this.optionsState.find((item) => item.code === row.approvalState.toString())
  539. return item1 ? item1.value : ''
  540. },
  541. // 附件
  542. attachDetails (row) {
  543. this.attachVisible = true
  544. this.$nextTick(() => {
  545. this.$refs.attachDetail.init(row.attachList)
  546. })
  547. },
  548. // 高亮表格
  549. tableRowClassName ({row, rowIndex}) {
  550. if (!row.purchaseState) return ''
  551. if (Number(row.purchaseState) === 0) {
  552. return 'warning-row'
  553. }
  554. return ''
  555. },
  556. // 入库申请
  557. inBound (row) {
  558. if (!row) return
  559. let dataForm = {...row,
  560. buttonType: '1',
  561. sourceCategory: '3', // 入库依据类别
  562. materialName: row.productName,
  563. tableId: row.purComDetailId, // 主表ID
  564. specifications: row.specificationExplian
  565. }
  566. this.inboundVisible = true
  567. this.$nextTick(() => {
  568. this.$refs.inbound.init(0, false, dataForm)
  569. })
  570. },
  571. // 委外
  572. outsourceHandle (row) {
  573. this.outsourceVisible = true
  574. this.$nextTick(() => {
  575. this.$refs.refOutsource.init(row)
  576. })
  577. },
  578. // 变更通知人设置
  579. setNoticeChangeHandel () {
  580. this.noticeChangeAttachVisible = true
  581. this.$nextTick(() => {
  582. this.$refs.noticeChangeSetting.init()
  583. })
  584. },
  585. // 委外金额屏蔽设置
  586. setAmountMaskHandel () {
  587. this.amountMaskSettingVisible = true
  588. this.$nextTick(() => {
  589. this.$refs.amountMaskSetting.init()
  590. })
  591. },
  592. // 监听批量选择的行
  593. handleSelectionChange (rows) {
  594. this.selectedRows = rows
  595. this.batchBtnDisabled = false
  596. this.batchIncomeBtnDisabled = false
  597. // (Number(scope.row.approvalState) === 3) && (Number(scope.row.purchaseState) === 1)
  598. // 控制批量操作按钮
  599. for (let index = 0; index < this.selectedRows.length; index++) {
  600. let item = this.selectedRows[index]
  601. if (Number(item.approvalState) === 3 && Number(item.purchaseState) === 1) {
  602. } else {
  603. this.batchBtnDisabled = true
  604. }
  605. if (Number(item.approvalState) === 3 && (Number(item.purchaseState) === 2 || Number(item.purchaseState) === 5)) {
  606. } else {
  607. this.batchIncomeBtnDisabled = true
  608. }
  609. }
  610. },
  611. // 批量委外
  612. batchHandle () {
  613. if (this.selectedRows.length === 0) {
  614. this.$message.error('请先勾选数据')
  615. return
  616. }
  617. this.outsourceVisible = true
  618. this.$nextTick(() => {
  619. this.$refs.refOutsource.init(this.selectedRows)
  620. })
  621. },
  622. // 批量入库
  623. batchIncomeHandle () {
  624. if (this.selectedRows.length === 0) {
  625. this.$message.error('请先勾选数据')
  626. return
  627. }
  628. let list = []
  629. for (let index = 0; index < this.selectedRows.length; index++) {
  630. let item = this.selectedRows[index]
  631. let dataForm = {
  632. ...item,
  633. buttonType: '1',
  634. sourceCategory: '3', // 入库依据类别
  635. materialName: item.productName,
  636. tableId: item.purComDetailId, // 主表ID
  637. specifications: item.specificationExplian
  638. }
  639. list.push(dataForm)
  640. }
  641. this.inboundVisible = true
  642. this.$nextTick(() => {
  643. this.$refs.inbound.init(0, false, list)
  644. })
  645. },
  646. exportHandle (val) {
  647. location.href = this.$http.adornUrl(`/biz-service/purCommDetail/exportExcel/${val}?_token=${Vue.cookie.get('token')}`)
  648. }
  649. }
  650. }
  651. </script>
  652. <style scoped>
  653. </style>
  654. <style>
  655. .el-table .warning-row {
  656. background: #fbc4c4;
  657. }
  658. </style>