index.vue 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460
  1. <template>
  2. <div>
  3. <div v-if="pageDisplay" class="app-container">
  4. <formComponent
  5. v-if="searchWhether"
  6. :formOption="formOption"
  7. :dataList="dataList"
  8. :inDex="inDex"
  9. ref="avatar"
  10. @submitForm="submitForm"
  11. @returnToForm="returnToForm"
  12. />
  13. <listComponent
  14. :tableData="tableData"
  15. @selectionbox="selectionbox"
  16. @see="viewMethod"
  17. @modify="modification"
  18. @deletion="deletion"
  19. @buttonList="buttonList"
  20. @showSearch="showSearch"
  21. @feedback="feedback"
  22. @getList="getList"
  23. :hasPermi="hasPermi"
  24. :isItHidden="isItHidden"
  25. :customButton="customButton"
  26. :listStyle="listStyle"
  27. :queryList="queryList"
  28. :setRowList="setRowList"
  29. />
  30. <el-pagination
  31. style="float: right;margin-top: 10px"
  32. @size-change="handleSizeChange"
  33. @current-change="handleCurrentChange"
  34. :page-sizes="[10, 20, 30, 50]"
  35. :page-size="this.formDataList.pageSize"
  36. background
  37. layout="sizes, prev, pager, next"
  38. :total="total">
  39. </el-pagination>
  40. </div>
  41. <div v-else class="app-container">
  42. <formComponent
  43. v-if="searchWhether"
  44. :formOption="contentOption"
  45. :dataList="dataList"
  46. :inDex="inDex"
  47. ref="avatar"
  48. @writeOff="writeOff"
  49. @submitForm="submitForm"
  50. @returnToForm="returnToForm"
  51. @submitAndSave="submitAndSave"
  52. @selectTrigger="selectTrigger"
  53. />
  54. <listComponent
  55. ref="listComponent"
  56. :tableData="contentList"
  57. @selectionbox="selectionbox"
  58. @see="viewMethod"
  59. @modify="modification"
  60. @deletion="deletion"
  61. @buttonList="buttonList"
  62. @showSearch="showSearch"
  63. @feedback="feedback"
  64. @getList="getList"
  65. @deletRows="deletRows"
  66. @totalAmount="totalAmount"
  67. @change="change"
  68. :hasPermi="hasPermi"
  69. :tatolLabel="tatolLabel"
  70. :isItHidden="isItHidden"
  71. :customButton="contentButton"
  72. :listStyle="contentStyle"
  73. :queryList="purchaseList"
  74. :setRowList="setRowList"
  75. :listData="listData"
  76. />
  77. </div>
  78. <add-or-update
  79. v-if="addOrUpdateVisible"
  80. ref="addOrUpdate"
  81. @refreshDataList="getDataList"
  82. ></add-or-update>
  83. <approval-comments
  84. v-if="addOrUpdateVisib"
  85. ref="ApprovalComments"
  86. @refreshDataList="returnData"
  87. ></approval-comments>
  88. <el-dialog
  89. title="打印采购"
  90. :visible.sync="dialogVisible"
  91. :fullscreen="true"
  92. style="padding: 0;margin:0"
  93. width="70%">
  94. <div ref="print">
  95. <table class="table table-striped table-bordered" align="center" valign="center">
  96. <tr>
  97. <td style="font-size: 24px;font-weight:bold" class="column" colspan="6">采购表</td>
  98. </tr>
  99. <tr>
  100. <td class="column" style="width: 10%;">项目</td>
  101. <td class="column" style="width: 25%;">{{formList.projectName}}</td>
  102. <td class="column" style="width: 10%;">供应商</td>
  103. <td class="column" style="width: 25%;">{{ formList.corpName }}</td>
  104. <td class="column" style="width: 25%;" colspan="2">日期:{{formList.fBsdate}}</td>
  105. </tr>
  106. </table>
  107. <table class="table table-striped table-bordered" align="center" valign="center">
  108. <tr>
  109. <td class="column" style="width: 15%;border-top: none;">品名</td>
  110. <td class="column" style="width: 15%;border-top: none;">单价</td>
  111. <td class="column" style="width: 15%;border-top: none;">采购计划</td>
  112. <td class="column" style="width: 15%;border-top: none;">实际重量</td>
  113. <td class="column" style="width: 15%;border-top: none;">金额</td>
  114. <td class="column" style="width: 20%;border-top: none;">备注</td>
  115. </tr>
  116. <tr v-for="(item,index) in contentList" :key="index">
  117. <td class="column">{{item.feeName}}</td>
  118. <td class="column">{{item.fUnitprice}}</td>
  119. <td class="column">{{item.fPurchase}}({{item.fFeeunitName}})</td>
  120. <td class="column">{{item.fQty}}({{item.fFeeunitName}})</td>
  121. <td class="column">{{item.fAmount}}</td>
  122. <td class="column">{{item.remark}}</td>
  123. </tr>
  124. </table>
  125. <table class="table table-striped table-bordered" align="center" valign="center">
  126. <tr>
  127. <td colspan="6" style="border-top: none;" class="column"></td>
  128. </tr>
  129. <tr>
  130. <td class="column" style="width: 25%;">采购人签字</td>
  131. <td class="column" style="width: 25%;">厨房主管签字</td>
  132. <td class="column" style="width: 25%;">验收人签字</td>
  133. <td class="column" style="width: 25%;">主管签字</td>
  134. </tr>
  135. <tr>
  136. <td class="column" style="width: 25%;height: 37px;"></td>
  137. <td class="column" style="width: 25%;"></td>
  138. <td class="column" style="width: 25%;"></td>
  139. <td class="column" style="width: 25%;"></td>
  140. </tr>
  141. <tr>
  142. <td colspan="4" style="border-top: none;font-weight:bold;text-align: right;padding-right: 10%;font-size: 16px;" class="column">{{ formList.fsbuName }}</td>
  143. </tr>
  144. </table>
  145. </div>
  146. <span slot="footer" class="dialog-footer">
  147. <el-button @click="dialogVisible = false">取 消</el-button>
  148. <el-button type="primary" @click="Printing">打印</el-button>
  149. </span>
  150. </el-dialog>
  151. </div>
  152. </template>
  153. <script>
  154. import { select } from '@/api/system/set'
  155. import {
  156. listQuery,
  157. submit,
  158. viewSingle,
  159. deleteQuery,
  160. productName,
  161. queryItem,
  162. company,
  163. warehouse,
  164. listDelete,
  165. tableDeleteQuery,
  166. confirmDeletion,
  167. pleaseCheck,
  168. copyNew,
  169. revoke,
  170. withdrawBy
  171. } from '@/api/purchaseRequest/index'
  172. import Cookies from 'js-cookie'
  173. export default {
  174. name: 'index',
  175. data() {
  176. return {
  177. addOrUpdateVisible: false,
  178. addOrUpdateVisib: false,
  179. total:0,
  180. selection:[],
  181. formDataList:{
  182. fBilltype: 'SQ',
  183. pageSize:10,
  184. pageNum:1,
  185. },
  186. formList:{},
  187. tatolLabel:['金额'],
  188. dialogVisible: false,
  189. listData: {
  190. fFeeid: [],
  191. fFeeunitid: [],
  192. fStltypeid: []
  193. },
  194. hasPermi:{
  195. lookup:['anpin:stockControl:query'],
  196. disappear:['anpin:stockControl:remove']
  197. },
  198. setTimeout:'',
  199. searchWhether: true,
  200. pageDisplay: true,
  201. dataList: {
  202. fGoodsid: [],
  203. fSbu: [],
  204. fWarehouseid: [],
  205. fCorpid: [],
  206. },
  207. contentList: [],
  208. inDex: 4,
  209. tableData: [],
  210. tableList: [],
  211. isItHidden: true,
  212. listStyle: [
  213. {
  214. surface: '1',
  215. label: 'serialNumber',
  216. name: '序号',
  217. checked: 0,
  218. width: 100,
  219. onabort: ''
  220. }, {
  221. surface: '2',
  222. label: 'fBillno',
  223. name: '申请编号',
  224. checked: 0,
  225. width: 100,
  226. onabort: ''
  227. }, {
  228. surface: '3',
  229. label: 'projectName',
  230. name: '项目名称',
  231. checked: 0,
  232. width: 100,
  233. onabort: ''
  234. }, {
  235. surface: '4',
  236. label: 'corpName',
  237. name: '客户名称',
  238. checked: 0,
  239. width: 100,
  240. onabort: ''
  241. }, {
  242. surface: '5',
  243. label: 'fMoney',
  244. name: '金额',
  245. checked: 0,
  246. width: 100,
  247. onabort: ''
  248. }, {
  249. surface: '6',
  250. label: 'createTime',
  251. name: '申请日期',
  252. checked: 0,
  253. width: 100,
  254. onabort: ''
  255. },{
  256. surface: '7',
  257. label: 'createBy',
  258. name: '申请人',
  259. checked: 0,
  260. width: 100,
  261. onabort: ''
  262. }, {
  263. surface: '8',
  264. label: 'fReviewDate',
  265. name: '审核日期',
  266. checked: 0,
  267. width: 100,
  268. onabort: ''
  269. },{
  270. surface: '9',
  271. label: 'remark',
  272. name: '备注',
  273. checked: 0,
  274. width: 100,
  275. onabort: ''
  276. },{
  277. surface: '10',
  278. label: 'fBillstatusName',
  279. name: '状态',
  280. checked: 0,
  281. width: 100,
  282. onabort: ''
  283. },{
  284. surface: '11',
  285. label: 'operation',
  286. name: '操作',
  287. checked: 0,
  288. width: 160,
  289. fixed:'right',
  290. operation: '1',
  291. onabort: ''
  292. }
  293. ],
  294. contentStyle: [
  295. {
  296. surface: '1',
  297. label: 'serialNumber',
  298. name: '序号',
  299. checked: 0,
  300. width: 100,
  301. disabled: false,
  302. onabort: ''
  303. }, {
  304. surface: '2',
  305. label: 'fFeeid',
  306. name: '品名',
  307. checked: 0,
  308. width: 100,
  309. onabort: '',
  310. disabled: false,
  311. changeable: 1
  312. }, {
  313. surface: '3',
  314. label: 'fCurrencyName',
  315. name: '规格',
  316. checked: 0,
  317. width: 100,
  318. onabort: '',
  319. disabled: false,
  320. changeable: 1
  321. },{
  322. surface: '4',
  323. label: 'fUnitprice',
  324. name: '单价',
  325. checked: 0,
  326. width: 100,
  327. disabled: false,
  328. onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
  329. changeable: 2
  330. }, {
  331. surface: '5',
  332. label: 'fPurchase',
  333. name: '采购数量',
  334. checked: 0,
  335. width: 100,
  336. onabort: '',
  337. disabled: false,
  338. changeable: 2
  339. }, {
  340. surface: '6',
  341. label: 'fQty',
  342. name: '实际数量',
  343. checked: 0,
  344. width: 100,
  345. onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
  346. disabled: false,
  347. changeable: 2
  348. }, {
  349. surface: '7',
  350. label: 'fFeeunitid',
  351. name: '计量单位',
  352. checked: 0,
  353. width: 100,
  354. onabort: '',
  355. disabled: false,
  356. changeable: 1
  357. }, {
  358. surface: '8',
  359. label: 'fAmount',
  360. name: '金额',
  361. checked: 0,
  362. width: 100,
  363. onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
  364. disabled: false,
  365. changeable: 2
  366. }, {
  367. surface: '9',
  368. label: 'fStltypeid',
  369. name: '付费方式',
  370. checked: 0,
  371. width: 100,
  372. onabort: '',
  373. disabled: false,
  374. changeable: 1
  375. }, {
  376. surface: '10',
  377. label: 'remark',
  378. name: '备注',
  379. checked: 0,
  380. width: 100,
  381. onabort: '',
  382. disabled: false,
  383. changeable: 2
  384. }, {
  385. surface: '11',
  386. label: 'createTime',
  387. name: '申请日期',
  388. checked: 0,
  389. disabled: false,
  390. width: 100,
  391. onabort: ''
  392. }, {
  393. surface: '12',
  394. label: 'createBy',
  395. name: '申请人',
  396. disabled: false,
  397. checked: 0,
  398. width: 100,
  399. onabort: ''
  400. }, {
  401. surface: '13',
  402. label: 'fReviewDate',
  403. name: '审核日期',
  404. checked: 0,
  405. disabled: false,
  406. width: 100,
  407. onabort: ''
  408. }, {
  409. surface: '14',
  410. label: 'operation',
  411. name: '操作',
  412. checked: 0,
  413. disabled: false,
  414. width: 160,
  415. fixed:'right',
  416. operation: '2',
  417. onabort: ''
  418. }
  419. ],
  420. queryList: {
  421. tableName: '采购申请',
  422. columnList: []
  423. },
  424. purchaseList: {
  425. tableName: '采购申请详情',
  426. columnList: []
  427. },
  428. setRowList: [],
  429. customButton: [
  430. {
  431. type: 'primary',
  432. size: 'mini',
  433. icon: 'el-icon-edit',
  434. name: '新增',
  435. disabled: false,
  436. hasPermi:['anpin:stockControl:anPingApply']
  437. },
  438. // {
  439. // type:'warning',
  440. // size:'mini',
  441. // icon:'el-icon-edit',
  442. // name:'立即修改',
  443. // disabled:false,
  444. // },
  445. {
  446. type: 'warning',
  447. size: 'mini',
  448. icon: 'el-icon-upload2',
  449. name: '导出',
  450. disabled: false,
  451. hasPermi:['anpin:stockControl:export']
  452. }, {
  453. type: 'success',
  454. size: 'mini',
  455. icon: 'el-icon-c-scale-to-original',
  456. name: '复制新增',
  457. disabled: false,
  458. hasPermi:['anpin:stockControl:generateReceipts']
  459. }
  460. ],
  461. contentButton: [
  462. {
  463. type: 'danger',
  464. size: 'mini',
  465. icon: 'el-icon-arrow-left',
  466. name: '返回列表',
  467. disabled: false
  468. }, {
  469. type: 'primary',
  470. size: 'mini',
  471. icon: 'el-icon-plus',
  472. name: '录入',
  473. disabled: false
  474. }, {
  475. type: 'primary',
  476. size: 'mini',
  477. icon: 'el-icon-plus',
  478. name: '保存',
  479. plain: true,
  480. disabled: false
  481. }, {
  482. type: 'success',
  483. size: 'mini',
  484. icon: 'el-icon-edit',
  485. name: '修改',
  486. disabled: false
  487. }, {
  488. type: 'warning',
  489. size: 'mini',
  490. icon: 'el-icon-download',
  491. name: '导出',
  492. disabled: false
  493. },{
  494. type: 'info',
  495. size: 'mini',
  496. icon: 'el-icon-edit-outline',
  497. name: '打印',
  498. disabled: false
  499. },{
  500. type: 'primary',
  501. size: 'mini',
  502. icon: 'el-icon-edit-outline',
  503. name: '请核',
  504. disabled: false
  505. },{
  506. type: 'primary',
  507. size: 'mini',
  508. icon: 'el-icon-edit-outline',
  509. name: '查看审批',
  510. disabled: false
  511. },{
  512. type: 'info',
  513. size: 'mini',
  514. icon: 'el-icon-edit-outline',
  515. name: '生成入库单',
  516. disabled: false
  517. },{
  518. type: 'info',
  519. size: 'mini',
  520. icon: 'el-icon-edit-outline',
  521. name: '生成销售单',
  522. disabled: false
  523. },{
  524. type: 'info',
  525. size: 'mini',
  526. icon: 'el-icon-edit-outline',
  527. name: '生成出库单',
  528. disabled: false
  529. }
  530. ],
  531. formOption: [
  532. {
  533. span: 6,
  534. label: 'fBillno',
  535. name: '申请编号',
  536. inputType: 2,
  537. width: 200,
  538. labelSize: '80',
  539. rules: [{ required: false, message: ' ' }]
  540. }, {
  541. span: 6,
  542. label: 'fGoodsid',
  543. name: '项目名称',
  544. inputType: 1,
  545. width: 200,
  546. labelSize: '80',
  547. rules: [{ required: false, message: ' ' }]
  548. }, {
  549. span: 6,
  550. label: 'fCorpid',
  551. name: '供应商',
  552. inputType: 1,
  553. width: 200,
  554. labelSize: '80',
  555. rules: [{ required: false, message: ' ' }]
  556. }, {
  557. span: 6,
  558. label: 'createBy',
  559. name: '申请人',
  560. inputType: 2,
  561. width: 200,
  562. labelSize: '80',
  563. rules: [{ required: false, message: ' ' }]
  564. }, {
  565. span: 6,
  566. label: 'moneys',
  567. name: '金额',
  568. inputType: 5,
  569. width: 200,
  570. labelSize: '80',
  571. rules: [{ required: false, message: ' ' }]
  572. }, {
  573. span: 6,
  574. label: 'cLoadDate',
  575. name: '申请日期',
  576. inputType: 3,
  577. width: 300,
  578. labelSize: '80',
  579. rules: [{ required: false, message: ' ' }]
  580. }
  581. ],
  582. contentOption: [
  583. {
  584. index:'1',
  585. span: 6,
  586. label: 'fBillno',
  587. name: '系统编号',
  588. inputType: 2,
  589. width: 200,
  590. labelSize: '80',
  591. disabled: true,
  592. rules: [{ required: false, message: ' ' }]
  593. }, {
  594. index:'2',
  595. span: 6,
  596. label: 'fGoodsid',
  597. name: '项目名称',
  598. inputType: 1,
  599. width: 200,
  600. labelSize: '80',
  601. disabled: true,
  602. rules: [{ required: true, message: ' ' }]
  603. }, {
  604. index:'3',
  605. span: 6,
  606. label: 'personNaem',
  607. name: '项目主管',
  608. inputType: 2,
  609. width: 200,
  610. labelSize: '80',
  611. disabled: true,
  612. rules: [{ required: false, message: ' ' }]
  613. }, {
  614. index:'4',
  615. span: 6,
  616. label: 'corpsName',
  617. name: '客户',
  618. inputType: 2,
  619. width: 200,
  620. labelSize: '80',
  621. disabled: true,
  622. rules: [{ required: false, message: ' ' }]
  623. }, {
  624. index:'5',
  625. span: 6,
  626. label: 'fCorpid',
  627. name: '供应商',
  628. inputType: 1,
  629. width: 200,
  630. labelSize: '80',
  631. disabled: true,
  632. rules: [{ required: true, message: ' ' }]
  633. }, {
  634. index:'6',
  635. span: 6,
  636. label: 'fWarehouseid',
  637. name: '仓库',
  638. inputType: 1,
  639. width: 200,
  640. disabled: true,
  641. labelSize: '80',
  642. rules: [{ required: true, message: ' ' }]
  643. }, {
  644. index:'7',
  645. span: 6,
  646. label: 'fBsdate',
  647. name: '提货日期',
  648. inputType: 6,
  649. width: 200,
  650. disabled: true,
  651. labelSize: '80',
  652. rules: [{ required: true, message: ' ' }]
  653. }, {
  654. index:'8',
  655. span: 6,
  656. label: 'createBy',
  657. name: '申请人',
  658. inputType: 2,
  659. width: 200,
  660. disabled: true,
  661. labelSize: '80',
  662. rules: [{ required: false, message: ' ' }]
  663. },
  664. {
  665. index:'9',
  666. span: 6,
  667. label: 'fStudentsWeight',
  668. name: '学生人数',
  669. inputType: 2,
  670. onabort: 'this.value=this.value.replace(/[^0-9]/g,\'\')',
  671. width: 200,
  672. disabled: true,
  673. labelSize: '80',
  674. rules: [{ required: true, message: ' ' }]
  675. }, {
  676. index:'10',
  677. span: 6,
  678. label: 'fTeachersWeight',
  679. name: '教师人数',
  680. onabort: 'this.value=this.value.replace(/[^0-9]/g,\'\')',
  681. inputType: 2,
  682. width: 200,
  683. disabled: true,
  684. labelSize: '80',
  685. rules: [{ required: true, message: ' ' }]
  686. },
  687. {
  688. index:'11',
  689. span: 6,
  690. label: 'fSbu',
  691. name: '开票公司',
  692. inputType: 1,
  693. width: 200,
  694. disabled: true,
  695. labelSize: '80',
  696. rules: [{ required: true, message: ' ' }]
  697. }, {
  698. index:'12',
  699. span: 6,
  700. label: 'remark',
  701. name: '备注',
  702. inputType: 4,
  703. disabled: true,
  704. width: 200,
  705. labelSize: '80',
  706. rules: [{ required: false, message: ' ' }]
  707. }
  708. ]
  709. }
  710. },
  711. activated(){
  712. this.homePage()
  713. // console.log(this.$route.query.open)
  714. if (this.$route.query.open === 'true'){
  715. this.contentList = []
  716. let data = {
  717. tableName: this.purchaseList.tableName,
  718. userId: Cookies.get('userName')
  719. }
  720. this.$refs.avatar.form = {}
  721. this.getRow(data)
  722. this.contentOption.forEach(item => {
  723. if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
  724. item.disabled = true
  725. } else {
  726. item.disabled = false
  727. }
  728. })
  729. this.contentButton.forEach(item => item.disabled = false)
  730. this.contentStyle.forEach(item => item.disabled = false)
  731. this.$refs.avatar.form.createBy = Cookies.get('userName')
  732. this.$router.push({ query: {} })
  733. }
  734. },
  735. created() {
  736. let data = {
  737. tableName: this.queryList.tableName,
  738. userId: Cookies.get('userName')
  739. }
  740. this.getRow(data)
  741. this.query(this.formDataList)
  742. productName().then(res => {
  743. console.log(res)
  744. if (res.code === 200) {
  745. for (let item in res.rows) {
  746. this.listData.fFeeid.push({
  747. label: res.rows[item].fName,
  748. value: res.rows[item].fId,
  749. fFeeunitid: res.rows[item].fFeeunitid,
  750. fCurrency: res.rows[item].fCurrency
  751. })
  752. }
  753. }
  754. })
  755. this.getDicts('data_unitfees').then(res => {
  756. console.log(res.data)
  757. for (let item in res.data) {
  758. this.listData.fFeeunitid.push({
  759. label: res.data[item].dictLabel,
  760. value: JSON.parse(res.data[item].dictValue)
  761. })
  762. }
  763. })
  764. this.getDicts('f_paymode').then(res => {
  765. console.log(res)
  766. for (let item in res.data) {
  767. this.listData.fStltypeid.push({
  768. label: res.data[item].dictLabel,
  769. value: JSON.parse(res.data[item].dictValue)
  770. })
  771. }
  772. })
  773. queryItem().then(res => {
  774. console.log(res)
  775. for (let item in res.data) {
  776. this.dataList.fGoodsid.push({
  777. label: res.data[item].projectName,
  778. value: res.data[item].fId,
  779. personNaem: res.data[item].personNaem,
  780. corpsName: res.data[item].corpsName,
  781. fCorpid: res.data[item].fCorpid
  782. })
  783. }
  784. })
  785. //查询仓库
  786. warehouse().then(res => {
  787. console.log(res)
  788. for (let item in res.rows) {
  789. this.dataList.fWarehouseid.push({
  790. label: res.rows[item].fName,
  791. value: res.rows[item].fId
  792. })
  793. }
  794. })
  795. this.fCompany(1)
  796. this.fCompany(2)
  797. },
  798. methods: {
  799. change(scope){
  800. console.log(this.contentList)
  801. for(let item in this.contentList){
  802. for(let li in this.listData.fFeeid){
  803. if(this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
  804. console.log("111")
  805. this.$set(this.contentList[item],'fFeeunitid',this.listData.fFeeid[li].fFeeunitid)
  806. this.$set(this.contentList[item],'fCurrencyName',this.listData.fFeeid[li].fCurrency)
  807. }
  808. }
  809. }
  810. },
  811. homePage(){
  812. let date = this.$route.query
  813. console.log(date)
  814. if (this.$route.query.list){
  815. this.contentButton = this.$options.data().contentButton
  816. this.contentButton.push(JSON.parse(this.$route.query.list))
  817. console.log(this.contentButton)
  818. let scope = {
  819. row:{
  820. fId:JSON.parse(this.$route.query.data).billId
  821. }
  822. }
  823. this.viewMethod(scope)
  824. }
  825. },
  826. // 查看审批流
  827. getDataList() {
  828. this.addOrUpdateVisible = false;
  829. },
  830. returnData() {
  831. this.addOrUpdateVisib = false;
  832. this.open = false;
  833. this.cancelTwo();
  834. },
  835. addOrUpdateHandle() {
  836. this.addOrUpdateVisible = true;
  837. this.$nextTick(() => {
  838. this.$refs.addOrUpdate.init(this.$refs.avatar.form.fId,520);
  839. });
  840. },
  841. addOrUpdateHand() {
  842. this.addOrUpdateVisib = true;
  843. this.$nextTick(() => {
  844. this.$refs.ApprovalComments.init(this.$refs.avatar.form.fId,520);
  845. });
  846. },
  847. //首页审批跳转关闭返回首页
  848. cancelTwo() {
  849. let view = {
  850. fullPath: '/purchaseRequest',
  851. hash: '',
  852. matched: Array(2),
  853. meta: Object,
  854. name: 'PurchaseRequest',
  855. params: Object,
  856. path: '/purchaseRequest',
  857. query: Object,
  858. title: '采购申请'
  859. }
  860. this.$router.push({ path: '/index' })
  861. this.$store
  862. .dispatch('tagsView/delView', view)
  863. .then(({ visitedViews }) => {
  864. if (this.isActive(view)) {
  865. this.toLastView(visitedViews, view)
  866. }
  867. })
  868. Global.$emit('removeCache', 'closeSelectedTag', view)
  869. },
  870. //分页
  871. handleSizeChange(val) {
  872. // console.log(`每页 ${val} 条`);
  873. this.formDataList.pageSize = val
  874. this.query(this.formDataList)
  875. },
  876. handleCurrentChange(val) {
  877. // console.log(`当前页: ${val}`);
  878. this.formDataList.pageNum = val
  879. this.query(this.formDataList)
  880. },
  881. //计算金额
  882. totalAmount(scope) {
  883. console.log(scope)
  884. if (scope.row.fUnitprice && scope.row.fQty) {
  885. scope.row.fAmount = (scope.row.fUnitprice * scope.row.fQty).toFixed(2)
  886. }
  887. },
  888. //查询公司
  889. fCompany(name) {
  890. company(name).then(res => {
  891. console.log(res)
  892. if (name == 1) {
  893. this.dataList.fCorpid = []
  894. for (let item in res.data) {
  895. this.dataList.fCorpid.push({
  896. label: res.data[item].fName,
  897. value: res.data[item].fId
  898. })
  899. }
  900. } else if (name == 2) {
  901. this.dataList.fSbu = []
  902. for (let item in res.data) {
  903. this.dataList.fSbu.push({
  904. label: res.data[item].fName,
  905. value: res.data[item].fId
  906. })
  907. }
  908. }
  909. })
  910. },
  911. //查询主页列数据
  912. query(data) {
  913. listQuery(data).then(res => {
  914. this.tableData = res.rows
  915. this.total = res.total
  916. })
  917. },
  918. //查询列数据
  919. getRow(data,list) {
  920. console.log(data,list)
  921. select(data).then((res) => {
  922. if (data.tableName === '采购申请详情') {
  923. if (res.data.length != 0) {
  924. this.purchaseList.columnList = res.data.filter((e) => e.checked == 0)
  925. this.purchaseList.columnList = res.data
  926. this.setRowList = res.data
  927. this.purchaseList.columnList = this.purchaseList.columnList.filter((e) => e.checked == 0)
  928. // this.waitFor = true
  929. } else {
  930. this.$set(this.purchaseList,'columnList',this.$options.data().contentStyle)
  931. this.setRowList = this.$options.data().contentStyle
  932. }
  933. this.purchaseList.columnList.forEach(item => item.disabled = true)
  934. this.pageDisplay = false
  935. this.isItHidden = false
  936. this.inDex = this.contentOption.length
  937. } else {
  938. if (res.data.length != 0) {
  939. this.queryList.columnList = res.data.filter((e) => e.checked == 0)
  940. this.queryList.columnList = res.data
  941. this.setRowList = res.data
  942. this.queryList.columnList = this.queryList.columnList.filter((e) => e.checked == 0)
  943. // this.waitFor = true
  944. } else {
  945. this.$set(this.queryList,'columnList',this.$options.data().listStyle)
  946. this.setRowList = this.$options.data().listStyle
  947. }
  948. this.pageDisplay = true
  949. this.isItHidden = true
  950. this.inDex = 4
  951. }
  952. this.$refs.avatar.form = {}
  953. if (list){
  954. this.$refs.avatar.form = list.warehouseBills
  955. this.contentList = list.tWarehousebillsfees
  956. this.contentButton = this.$options.data().contentButton
  957. if (this.$refs.avatar.form.fBillstatus === 6){
  958. this.contentButton.push({
  959. type: 'danger',
  960. size: 'mini',
  961. icon: 'el-icon-edit-outline',
  962. name: '撤销采购',
  963. disabled: false
  964. })
  965. }else if(this.$refs.avatar.form.fBillstatus === 4){
  966. this.contentButton.push({
  967. type: 'danger',
  968. size: 'mini',
  969. icon: 'el-icon-edit-outline',
  970. name: '撤销审批',
  971. disabled: false
  972. })
  973. }
  974. this.contentButton.forEach(item =>{
  975. if (item.name == '返回列表' || item.name == '修改' || item.name == '打印'){
  976. item.disabled = false
  977. }else {
  978. item.disabled = true
  979. }
  980. })
  981. }
  982. })
  983. },
  984. returnToForm(row) {
  985. console.log(row, 111)
  986. },
  987. //查看
  988. viewMethod(scope) {
  989. this.contentOption.forEach(item => item.disabled = true)
  990. this.contentStyle.forEach(item => item.disabled = true)
  991. console.log(this.contentStyle)
  992. this.contentButton.forEach(item =>{
  993. if (item.name == '返回列表' || item.name == '修改'){
  994. item.disabled = false
  995. }else {
  996. item.disabled = true
  997. }
  998. })
  999. viewSingle(scope.row.fId).then(res => {
  1000. if (res.code === 200) {
  1001. let data = {
  1002. tableName: this.purchaseList.tableName,
  1003. userId: Cookies.get('userName')
  1004. }
  1005. let list ={
  1006. warehouseBills:res.data.warehouseBills,
  1007. tWarehousebillsfees:res.data.tWarehousebillsfees
  1008. }
  1009. this.$refs.avatar.form = {}
  1010. this.getRow(data,list)
  1011. }
  1012. })
  1013. },
  1014. //修改
  1015. modification(scope) {
  1016. console.log(scope)
  1017. },
  1018. //删除
  1019. deletion(scope) {
  1020. console.log(scope.row.fId)
  1021. tableDeleteQuery(scope.row.fId).then(res => {
  1022. console.log(res)
  1023. this.$confirm(res.msg == 1 ? '主表数据为空' : (res.msg == 2 ? '主表有数据' : '未知状态') + '是否永久删除该条数据?', '提示', {
  1024. confirmButtonText: '确定',
  1025. cancelButtonText: '取消',
  1026. type: 'warning'
  1027. }).then(() => {
  1028. confirmDeletion(scope.row.fId).then(data => {
  1029. this.$message({
  1030. type: 'success',
  1031. message: '删除成功!'
  1032. })
  1033. this.query(this.formDataList)
  1034. })
  1035. }).catch(() => {
  1036. this.$message({
  1037. type: 'info',
  1038. message: '已取消删除'
  1039. })
  1040. })
  1041. })
  1042. },
  1043. //选择框
  1044. selectionbox(selection) {
  1045. if (selection.length > 1){
  1046. this.customButton.forEach(item =>{
  1047. if (item.name === '复制新增'){
  1048. item.disabled = true
  1049. }else {
  1050. item.disabled = false
  1051. }
  1052. })
  1053. }else {
  1054. this.customButton.forEach(item => item.disabled = false)
  1055. this.selection = selection
  1056. }
  1057. },
  1058. //详情内容保存
  1059. submitAndSave(item) {
  1060. let formData = new window.FormData()
  1061. this.$refs.avatar.form.fMoney = 0
  1062. this.contentList.forEach(item => this.$refs.avatar.form.fMoney += Number(item.fAmount))
  1063. formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
  1064. formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
  1065. formData.append('fBilltype', 'SQ')
  1066. submit(formData).then(res => {
  1067. if (res.code == 200) {
  1068. this.$message.success('保存成功')
  1069. this.$refs.avatar.form = res.data.warehouseBills
  1070. this.contentList = res.data.tWarehousebillsCntrs
  1071. console.log(this.dataList, this.contentList)
  1072. if (item == 1){
  1073. this.dialogVisible = true
  1074. }else if (item === 2){
  1075. let data = {
  1076. tableName: this.queryList.tableName,
  1077. userId: Cookies.get('userName')
  1078. }
  1079. this.getRow(data)
  1080. this.query(this.formDataList)
  1081. }
  1082. }
  1083. })
  1084. },
  1085. //表单选中后触发
  1086. selectTrigger(name, list, id) {
  1087. console.log(list, id)
  1088. if (name == 'fGoodsid') {
  1089. for (let item in list) {
  1090. if (list[item].value == id) {
  1091. this.$refs.avatar.form.personNaem = list[item].personNaem
  1092. this.$refs.avatar.form.corpsName = list[item].corpsName
  1093. }
  1094. }
  1095. }
  1096. },
  1097. //确认打印
  1098. Printing(){
  1099. this.$print(this.$refs.print)
  1100. },
  1101. //所以按钮
  1102. buttonList(row) {
  1103. console.log(row)
  1104. let data
  1105. switch (row.name) {
  1106. case '新增':
  1107. this.contentList = []
  1108. data = {
  1109. tableName: this.purchaseList.tableName,
  1110. userId: Cookies.get('userName')
  1111. }
  1112. this.$refs.avatar.form = {}
  1113. this.getRow(data)
  1114. this.contentOption.forEach(item => {
  1115. if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
  1116. item.disabled = true
  1117. } else {
  1118. item.disabled = false
  1119. }
  1120. })
  1121. this.contentButton.forEach(item => item.disabled = false)
  1122. this.contentStyle.forEach(item => item.disabled = false)
  1123. this.$refs.avatar.form.createBy = Cookies.get('userName')
  1124. break
  1125. case '保存':
  1126. this.$refs.avatar.submitForm('submit')
  1127. break
  1128. case '打印':
  1129. console.log(this.listData.fFeeid,this.contentList)
  1130. for (let item in this.contentList){
  1131. for (let li in this.listData.fFeeid){
  1132. if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
  1133. this.contentList[item].feeName = this.listData.fFeeid[li].label
  1134. }
  1135. }
  1136. for(let i in this.listData.fFeeunitid){
  1137. if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value){
  1138. this.contentList[item].fFeeunitName = this.listData.fFeeunitid[i].label
  1139. }
  1140. }
  1141. }
  1142. if (!this.$refs.avatar.form.fId){
  1143. this.$message.error('未保存,不允许打印');
  1144. }else if (this.$refs.avatar.form.fBillstatus >= 4){
  1145. this.formList = this.$refs.avatar.form
  1146. this.dialogVisible = true
  1147. }else {
  1148. this.formList = this.$refs.avatar.form
  1149. console.log(this.$refs.avatar.form.fBillstatus)
  1150. this.submitAndSave(1)
  1151. }
  1152. break
  1153. case '修改':
  1154. this.contentButton.forEach(item =>{
  1155. if (this.$refs.avatar.form.fBillstatus >= 4){
  1156. if (item.name === '返回列表' || item.name == '打印' || item.name === '修改' || item.name === '生成入库单' || item.name === '生成销售单'||item.name === '生成出库单' || item.name === '查看审批' || item.name === '审批' || item.name === '撤销采购' || item.name === '撤销审批'){
  1157. item.disabled = false
  1158. }else {
  1159. item.disabled = true
  1160. }
  1161. }else {
  1162. item.disabled = false
  1163. this.purchaseList.columnList.forEach(item => item.disabled = false)
  1164. this.contentStyle.forEach(item => item.disabled = false)
  1165. this.contentOption.forEach(item => {
  1166. if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
  1167. item.disabled = true
  1168. } else {
  1169. item.disabled = false
  1170. }
  1171. })
  1172. }
  1173. })
  1174. break
  1175. case '录入':
  1176. this.contentList.push({
  1177. fFeeid: '',
  1178. fUnitprice: '',
  1179. fPurchase: '',
  1180. fQty: '',
  1181. fFeeunitid: '',
  1182. fAmount: '',
  1183. fStltypeid: '',
  1184. remark: '',
  1185. createTime: '',
  1186. createBy: Cookies.get('userName'),
  1187. fReviewDate: '',
  1188. operation: '',
  1189. })
  1190. break
  1191. case '查看审批':
  1192. this.addOrUpdateHandle()
  1193. break
  1194. case '审批':
  1195. this.addOrUpdateHand()
  1196. break
  1197. case '返回列表':
  1198. console.log(this.$route.query.data)
  1199. if (!this.$refs.avatar.form.fId && this.contentList !== 0 || this.$refs.avatar.form.fBillstatus > 3 && !this.$route.query.data) {
  1200. data = {
  1201. tableName: this.queryList.tableName,
  1202. userId: Cookies.get('userName')
  1203. }
  1204. this.getRow(data)
  1205. this.query(this.formDataList)
  1206. } else if(this.$route.query.data){
  1207. this.cancelTwo();
  1208. this.$router.push({path:'/index'})
  1209. }else {
  1210. this.$confirm('当前数据未保存是否保存?', '提示', {
  1211. confirmButtonText: '保存',
  1212. cancelButtonText: '取消',
  1213. type: 'warning'
  1214. }).then(() => {
  1215. this.submitAndSave(2)
  1216. }).catch(() => {
  1217. data = {
  1218. tableName: this.queryList.tableName,
  1219. userId: Cookies.get('userName')
  1220. }
  1221. this.getRow(data)
  1222. this.query(this.formDataList)
  1223. })
  1224. }
  1225. break
  1226. case '请核':
  1227. if (this.$refs.avatar.form.fBillstatus < 4){
  1228. this.$refs.avatar.submitForm('check')
  1229. }else {
  1230. this.$message.error('请先保存');
  1231. }
  1232. break
  1233. case '生成入库单':
  1234. let listData = {
  1235. fId:this.$refs.avatar.form.fId,
  1236. fBilltype:'RK'
  1237. }
  1238. copyNew(listData).then(res=>{
  1239. this.$message({
  1240. message: '生成成功',
  1241. type: 'success',
  1242. showClose:true
  1243. });
  1244. })
  1245. break
  1246. case '生成销售单':
  1247. let liste = {
  1248. fId:this.$refs.avatar.form.fId,
  1249. fBilltype:'XS'
  1250. }
  1251. copyNew(liste).then(res=>{
  1252. this.$message({
  1253. message: '生成成功',
  1254. type: 'success',
  1255. showClose:true
  1256. });
  1257. })
  1258. break
  1259. case '生成出库单':
  1260. let listd = {
  1261. fId:this.$refs.avatar.form.fId,
  1262. fBilltype:'CK'
  1263. }
  1264. copyNew(listd).then(res=>{
  1265. this.$message({
  1266. message: '生成成功',
  1267. type: 'success',
  1268. showClose:true
  1269. });
  1270. })
  1271. break
  1272. case '复制新增':
  1273. if (this.selection.length > 0){
  1274. let datae = {
  1275. fId:this.selection[0].fId,
  1276. fBilltype:'SQ'
  1277. }
  1278. copyNew(datae).then(res=>{
  1279. this.$message({
  1280. message: '复制新增成功',
  1281. type: 'success',
  1282. showClose:true
  1283. });
  1284. let scope = {
  1285. row:{
  1286. fId:res.data
  1287. }
  1288. }
  1289. this.query(this.formDataList)
  1290. this.viewMethod(scope)
  1291. })
  1292. }else {
  1293. this.$message.warning('未选择列表,请选择后再点击');
  1294. }
  1295. break
  1296. case '撤销审批':
  1297. let date = new Date()
  1298. let y = date.getFullYear()
  1299. let m = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
  1300. let d = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate())
  1301. data = {
  1302. actId:520,
  1303. id:this.$refs.avatar.form.fId,
  1304. billId:this.$refs.avatar.form.fId,
  1305. auditItem:y + '-' + m + '-' + d
  1306. }
  1307. console.log(data)
  1308. revoke(data).then(res=>{
  1309. if (res.code === 200){
  1310. this.$message({
  1311. showClose: true,
  1312. message: '撤销成功',
  1313. type: 'success'
  1314. })
  1315. data = {
  1316. tableName: this.queryList.tableName,
  1317. userId: Cookies.get('userName')
  1318. }
  1319. this.getRow(data)
  1320. this.query(this.formDataList)
  1321. }
  1322. })
  1323. break
  1324. case '撤销采购':
  1325. withdrawBy(this.$refs.avatar.form.fId).then(res=>{
  1326. if (res.code === 200){
  1327. this.$message({
  1328. showClose: true,
  1329. message: '撤销成功',
  1330. type: 'success'
  1331. })
  1332. data = {
  1333. tableName: this.queryList.tableName,
  1334. userId: Cookies.get('userName')
  1335. }
  1336. this.getRow(data)
  1337. this.query(this.formDataList)
  1338. }
  1339. })
  1340. break
  1341. default:
  1342. this.$message.error('该按钮暂无功能')
  1343. }
  1344. },
  1345. //请核
  1346. writeOff(){
  1347. let formData = new window.FormData()
  1348. formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
  1349. formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
  1350. formData.append('fBilltype', 'SQ')
  1351. pleaseCheck(formData).then(res => {
  1352. if (res.code == 200) {
  1353. this.$message.success('请核成功')
  1354. this.contentOption.forEach(item => item.disabled = true)
  1355. this.contentStyle.forEach(item => item.disabled = true)
  1356. this.contentButton.forEach(item =>{
  1357. if (item.name == '返回列表' || item.name == '修改'){
  1358. item.disabled = false
  1359. }else {
  1360. item.disabled = true
  1361. }
  1362. })
  1363. // this.$refs.avatar.form = res.data.warehouseBills
  1364. // this.contentList = res.data.tWarehousebillsCntrs
  1365. let data = {
  1366. tableName: this.queryList.tableName,
  1367. userId: Cookies.get('userName')
  1368. }
  1369. this.getRow(data)
  1370. this.query(this.formDataList)
  1371. }
  1372. })
  1373. },
  1374. // 显示搜索条件、点击后会调用此方法
  1375. showSearch() {
  1376. console.log('到我了')
  1377. this.searchWhether = !this.searchWhether
  1378. },
  1379. //搜索、重置、展开
  1380. feedback(res) {
  1381. console.log(res)
  1382. if (res == '展开') {
  1383. if (this.inDex == 4) {
  1384. this.inDex = this.formOption.length
  1385. } else {
  1386. this.inDex = 4
  1387. }
  1388. } else if (res == '搜索') {
  1389. this.$refs.avatar.submitForm()
  1390. } else if (res == '重置') {
  1391. this.$refs.avatar.form = {}
  1392. this.$refs.avatar.submitForm()
  1393. }
  1394. },
  1395. //表单验证通过执行搜索
  1396. submitForm() {
  1397. let list = this.formDataList
  1398. console.log(this.$refs.avatar.form)
  1399. this.formDataList = this.$refs.avatar.form
  1400. this.formDataList.fBilltype = list.fBilltype
  1401. this.formDataList.pageSize = list.pageSize
  1402. this.formDataList.pageNum = list.pageNum
  1403. this.query(this.formDataList)
  1404. },
  1405. //点击刷新会调用此方法
  1406. getList() {
  1407. this.feedback('重置')
  1408. this.submitForm()
  1409. console.log('到我了2')
  1410. },
  1411. //详情表内容移出
  1412. deletRows(index, rows) {
  1413. console.log(index, rows)
  1414. if (rows[index].fId) {
  1415. deleteQuery(this.$refs.avatar.form.fId, this.$refs.avatar.form.fDateChanged).then(res => {
  1416. if (res.code === 200) {
  1417. listDelete(rows[index].fId).then(data => {
  1418. rows.splice(index, 1)
  1419. })
  1420. }
  1421. })
  1422. } else {
  1423. rows.splice(index, 1)
  1424. }
  1425. }
  1426. }
  1427. }
  1428. </script>
  1429. <style scoped>
  1430. .table {
  1431. border-collapse: collapse;
  1432. border-spacing: 0;
  1433. background-color: transparent;
  1434. display: table;
  1435. width: 100%;
  1436. max-width: 100%;
  1437. margin: 0 auto;
  1438. }
  1439. .table td {
  1440. text-align: center;
  1441. vertical-align: middle;
  1442. font-size: 14px;
  1443. color: #333333;
  1444. padding: 8px 12px;
  1445. }
  1446. .column {
  1447. border: 1px solid #000;
  1448. }
  1449. .app-container >>> .el-form-item{
  1450. margin-bottom: 0;
  1451. }
  1452. </style>