detailDialog.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. v-if="visible"
  6. :visible.sync="visible"
  7. :title="title"
  8. :close-on-click-modal="false"
  9. width="70%"
  10. @close="cancel"
  11. :maxable="true"
  12. :resizable="true"
  13. :modal="modal"
  14. >
  15. <div class="switch">
  16. <div class="switch_left">
  17. <ul>
  18. <li
  19. v-for="item in tabOptions"
  20. :key="item.key"
  21. :class="{ active: activeComp == item.key }"
  22. @click="activeComp = item.key"
  23. >
  24. {{ item.name }}
  25. </li>
  26. </ul>
  27. </div>
  28. </div>
  29. <div v-if="activeComp == 'order'">
  30. <el-form
  31. ref="form"
  32. :model="form"
  33. :rules="rules"
  34. class="el-form-box"
  35. label-width="120px"
  36. >
  37. <headerTitle title="订单信息"> </headerTitle>
  38. <el-row>
  39. <el-col :span="8">
  40. <el-form-item label="订单编号:" prop="orderNo">
  41. <el-input v-model="form.orderNo" disabled></el-input>
  42. </el-form-item>
  43. <el-form-item label="来源类型" prop="relationType">
  44. <el-select
  45. v-model="form.relationType"
  46. filterable
  47. clearable
  48. disabled
  49. style="width: 100%"
  50. >
  51. <el-option :value="1" label="采购需求单"></el-option>
  52. <el-option :value="2" label="采购计划单"></el-option>
  53. <el-option :value="3" label="采购核价单"></el-option>
  54. <el-option :value="4" label="采购合同"></el-option>
  55. </el-select>
  56. </el-form-item>
  57. <el-form-item
  58. v-if="form.relationType == 1"
  59. label="采购需求单"
  60. prop="purchasePlanName"
  61. >
  62. <el-input
  63. disabled
  64. v-model="form.relationName"
  65. placeholder="请选择"
  66. ></el-input>
  67. </el-form-item>
  68. <el-form-item
  69. v-if="form.relationType == 2"
  70. label="采购计划单"
  71. prop="purchasePlanName"
  72. >
  73. <!-- <el-input-->
  74. <!-- @click.native="handPurchasePlan"-->
  75. <!-- v-model="form.purchasePlanName"-->
  76. <!-- placeholder="请选择"-->
  77. <!-- ></el-input> -->
  78. <el-input
  79. disabled
  80. v-model="form.relationName"
  81. placeholder="请选择"
  82. ></el-input>
  83. </el-form-item>
  84. <el-form-item
  85. v-if="form.relationType == 3"
  86. label="采购核价单"
  87. prop="purchasePlanName"
  88. >
  89. <el-input
  90. disabled
  91. v-model="form.relationName"
  92. placeholder="请选择"
  93. ></el-input>
  94. </el-form-item>
  95. <el-form-item
  96. v-if="form.relationType == 4"
  97. label="选择合同"
  98. prop="contractName"
  99. >
  100. <el-input
  101. clearable
  102. v-model="form.contractName"
  103. disabled
  104. placeholder="请输入"
  105. />
  106. </el-form-item>
  107. <el-form-item label="需求部门:" prop="requireDeptName">
  108. <el-input v-model="form.requireDeptName" disabled></el-input>
  109. </el-form-item>
  110. <el-form-item label="订单类型:" prop="sourceTypeName">
  111. <el-input v-model="form.sourceTypeName" disabled></el-input>
  112. </el-form-item>
  113. <el-form-item prop="remark" label="备注:">
  114. <el-input
  115. type="textarea"
  116. v-model="form.remark"
  117. disabled
  118. ></el-input>
  119. </el-form-item>
  120. <el-form-item prop="orderFiles" label="附件:">
  121. <fileMain v-model="form.orderFiles" type="view"></fileMain>
  122. </el-form-item>
  123. </el-col>
  124. <el-col :span="8">
  125. <el-form-item label="采购计划名称:" prop="purchasePlanName">
  126. <el-input v-model="form.purchasePlanName" disabled></el-input>
  127. </el-form-item>
  128. <el-form-item label="项目名称:" prop="projectName">
  129. <el-input v-model="form.projectName" disabled></el-input>
  130. </el-form-item>
  131. <el-form-item label="结算方式:" prop="settlementModeName">
  132. <el-input
  133. v-model="detailData.settlementModeName"
  134. disabled
  135. ></el-input>
  136. </el-form-item>
  137. <el-form-item
  138. prop="outsourceScene"
  139. label="委外场景"
  140. v-if="
  141. orderSourceType.includes(form.sourceType) && form.outsourceScene
  142. "
  143. >
  144. <el-select
  145. v-model="form.outsourceScene"
  146. disabled
  147. style="width: 100%"
  148. >
  149. <el-option
  150. :value="item.value"
  151. :label="item.label"
  152. v-for="item in outsourceSceneList"
  153. :key="item.value"
  154. >
  155. </el-option>
  156. </el-select>
  157. </el-form-item>
  158. <el-form-item label="需求人:" prop="requireUserName">
  159. <el-input v-model="form.requireUserName" disabled></el-input>
  160. </el-form-item>
  161. <el-form-item label="优惠后总金额:" prop="payAmount">
  162. <el-input v-model="form.payAmount" disabled>
  163. <template slot="append">元</template>
  164. </el-input>
  165. </el-form-item>
  166. <el-form-item label="订单总金额:" prop="totalAmount">
  167. <el-input v-model="form.totalAmount" disabled>
  168. <template slot="append">元</template>
  169. </el-input>
  170. </el-form-item>
  171. </el-col>
  172. <el-col :span="8">
  173. <el-form-item label="订单总金额" prop="orderTotalPrice">
  174. <el-input v-model="form.orderTotalPrice" disabled />
  175. </el-form-item>
  176. <el-form-item label="发货总金额" prop="sendTotalPrice">
  177. <el-input v-model="form.sendTotalPrice" disabled />
  178. </el-form-item>
  179. <el-form-item label="发货总数量" prop="sendTotalCount">
  180. <el-input v-model="form.sendTotalCount" disabled />
  181. </el-form-item>
  182. <el-form-item label="收货总金额" prop="receiveTotalPrice">
  183. <el-input v-model="form.receiveTotalPrice" disabled />
  184. </el-form-item>
  185. <el-form-item label="收货总数量" prop="receiveTotalCount">
  186. <el-input v-model="form.receiveTotalCount" disabled />
  187. </el-form-item>
  188. <el-form-item label="退货总金额" prop="returnTotalPrice">
  189. <el-input v-model="form.returnTotalPrice" disabled />
  190. </el-form-item>
  191. <el-form-item label="退货总数量" prop="returnTotalCount">
  192. <el-input v-model="form.returnTotalCount" disabled />
  193. </el-form-item>
  194. </el-col>
  195. </el-row>
  196. <headerTitle title="基本信息"></headerTitle>
  197. <el-row>
  198. <el-col :span="12">
  199. <el-form-item label="采购方名称:" prop="partaName">
  200. <el-input v-model="form.partaName" disabled> </el-input>
  201. </el-form-item>
  202. <el-form-item
  203. label="采购方统一社会信用代码:"
  204. prop="partaUnifiedSocialCreditCode"
  205. class="form_item_label"
  206. >
  207. <el-input v-model="form.partaUnifiedSocialCreditCode" disabled>
  208. </el-input>
  209. </el-form-item>
  210. <el-form-item label="采购方联系人:" prop="partaLinkName">
  211. <el-input v-model="form.partaLinkName" disabled> </el-input>
  212. </el-form-item>
  213. <el-form-item label="采购方电话:" prop="partaTel">
  214. <el-input v-model="form.partaTel" disabled> </el-input>
  215. </el-form-item>
  216. <el-form-item label="采购方传真:" prop="partaFax">
  217. <el-input v-model="form.partaFax" disabled></el-input>
  218. </el-form-item>
  219. <el-form-item label=" 采购方Email:" prop="partaEmail">
  220. <el-input v-model="form.partaEmail" disabled></el-input>
  221. </el-form-item>
  222. <el-form-item label="采购方地址:" prop="partaAddress">
  223. <el-input v-model="form.partaAddress" disabled></el-input>
  224. </el-form-item>
  225. </el-col>
  226. <el-col :span="12">
  227. <el-form-item label="供应商名称:" prop="partbName">
  228. <el-input v-model="form.partbName" disabled></el-input>
  229. </el-form-item>
  230. <el-form-item
  231. label="供应商统一社会信用代码:"
  232. prop="partbUnifiedSocialCreditCode"
  233. class="form_item_label"
  234. >
  235. <el-input
  236. v-model="form.partbUnifiedSocialCreditCode"
  237. disabled
  238. ></el-input>
  239. </el-form-item>
  240. <el-form-item label="供应商联系人:" prop="partbLinkName">
  241. <el-input v-model="form.partbLinkName" disabled></el-input>
  242. </el-form-item>
  243. <el-form-item
  244. prop="partbTel"
  245. label="供应商联系电话:"
  246. class="form_item_label"
  247. >
  248. <el-input v-model="form.partbTel" disabled></el-input>
  249. </el-form-item>
  250. <el-form-item prop="partbFax" label="供应商传真:">
  251. <el-input v-model="form.partbFax" disabled></el-input>
  252. </el-form-item>
  253. <el-form-item label="供应商Email:" prop="partbEmail">
  254. <el-input v-model="form.partbEmail" disabled></el-input>
  255. </el-form-item>
  256. <el-form-item label="供应商地址:" prop="partbAddress">
  257. <el-input v-model="form.partbAddress" disabled></el-input>
  258. </el-form-item>
  259. <!-- <el-form-item
  260. label="售出方税号"
  261. prop="contactAddress"
  262. >
  263. <el-input
  264. clearable
  265. v-model="form.contactAddress"
  266. placeholder="请输入"
  267. />
  268. </el-form-item> -->
  269. </el-col>
  270. </el-row>
  271. </el-form>
  272. <el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
  273. <el-tab-pane label="物品清单" name="1">
  274. <ele-pro-table
  275. ref="table"
  276. :needPage="false"
  277. :columns="competAnalysisListcolumns"
  278. @columns-change="handleColumnChange"
  279. :cache-key="cacheKeyUrl"
  280. :datasource="detailData.productList"
  281. row-key="id"
  282. max-height="500px"
  283. >
  284. <template v-slot:toolbar>
  285. <div class="headbox">
  286. <span class="amount">总计:{{ detailData.totalAmount }}元</span>
  287. <span class="amount"
  288. >应付金额:{{ detailData.payAmount }}元</span
  289. >
  290. </div>
  291. </template>
  292. <template v-slot:technicalDrawings="{ row }">
  293. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  294. </template>
  295. <template v-slot:requirementTotalCount="{ row, $index }">
  296. <el-button type="text" @click="handleGetBillDetail(row, 1)">{{
  297. row.requirementTotalCount
  298. }}</el-button>
  299. </template>
  300. <template v-slot:planTotalCount="{ row, $index }">
  301. <el-button type="text" @click="handleGetBillDetail(row, 2)">{{
  302. row.planTotalCount
  303. }}</el-button>
  304. </template>
  305. <template v-slot:inquiryTotalCount="{ row, $index }">
  306. <el-button type="text" @click="handleGetBillDetail(row, 3)">{{
  307. row.inquiryTotalCount
  308. }}</el-button>
  309. </template>
  310. <template v-slot:contractTotalCount="{ row, $index }">
  311. <el-button type="text" @click="handleGetBillDetail(row, 4)">{{
  312. row.contractTotalCount
  313. }}</el-button>
  314. </template>
  315. <template v-slot:doneTotalCount="{ row, $index }">
  316. <el-button type="text" @click="handleGetBillDetail(row, 5)">{{
  317. row.doneTotalCount
  318. }}</el-button>
  319. </template>
  320. <template v-slot:waitTotalCount="{ row, $index }">
  321. <el-button type="text" @click="handleGetBillDetail(row, 6)">{{
  322. row.waitTotalCount
  323. }}</el-button>
  324. </template>
  325. </ele-pro-table>
  326. </el-tab-pane>
  327. <el-tab-pane
  328. label="带料清单"
  329. name="2"
  330. v-if="orderSourceType.includes(form.sourceType)"
  331. >
  332. <ele-pro-table
  333. ref="table"
  334. :needPage="false"
  335. :columns="competAnalysisListcolumns1"
  336. :toolkit="[]"
  337. :datasource="detailData.rawList"
  338. row-key="id"
  339. >
  340. <template v-slot:technicalDrawings="{ row }">
  341. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  342. </template>
  343. </ele-pro-table>
  344. </el-tab-pane>
  345. <el-tab-pane
  346. label="产出清单"
  347. name="3"
  348. v-if="orderSourceType.includes(form.sourceType)"
  349. >
  350. <ele-pro-table
  351. ref="table"
  352. :needPage="false"
  353. :columns="competAnalysisListcolumns1"
  354. :toolkit="[]"
  355. :datasource="detailData.outputList"
  356. row-key="id"
  357. >
  358. <template v-slot:technicalDrawings="{ row }">
  359. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  360. </template>
  361. </ele-pro-table>
  362. </el-tab-pane>
  363. </el-tabs>
  364. </div>
  365. <bpmDetail
  366. v-if="activeComp === 'bpm' && form.processInstanceId"
  367. :id="form.processInstanceId"
  368. ></bpmDetail>
  369. <div v-if="activeComp == 'invoice'">
  370. <invoiceList :orderId="detailId"></invoiceList>
  371. </div>
  372. <div v-if="activeComp == 'returnorder'">
  373. <returnGoodsList :orderId="detailId"></returnGoodsList>
  374. </div>
  375. <div v-if="activeComp == 'accountstatement'">
  376. <accountstatementList :orderId="detailId"></accountstatementList>
  377. </div>
  378. <div slot="footer" class="footer">
  379. <el-button @click="cancel">返回</el-button>
  380. </div>
  381. <bill-detail-dialog
  382. :bill-detail-dialog-flag.sync="billDetailDialogFlag"
  383. v-if="billDetailDialogFlag"
  384. ref="billDetailDialogRef"
  385. ></bill-detail-dialog>
  386. </ele-modal>
  387. </template>
  388. <script>
  389. import {
  390. // getpurchaseorderDetail,
  391. getpurchaseorderDetail
  392. } from '@/api/purchasingManage/purchaseOrder';
  393. import invoiceList from '@/views/purchasingManage/purchaseOrder/orderAssociation/invoiceList.vue';
  394. import returnGoodsList from '@/views/purchasingManage/purchaseOrder/orderAssociation/returnGoodsList.vue';
  395. import accountstatementList from '@/views/purchasingManage/purchaseOrder/orderAssociation/accountstatementList.vue';
  396. import { getFile } from '@/api/system/file';
  397. import dictMixins from '@/mixins/dictMixins';
  398. import { copyObj } from '@/utils/util';
  399. import bpmDetail from '@/views/bpm/processInstance/detail.vue';
  400. // import fileMain from '@/components/addDoc/index.vue';
  401. import billDetailDialog from '@/views/purchasingManage/purchaseOrder/components/billDetailDialog.vue';
  402. import { orderSourceType, outsourceSceneList, lbjtList } from '@/enum/dict';
  403. import tabMixins from '@/mixins/tableColumnsMixin';
  404. import { levelList } from '@/enum/dict.js';
  405. export default {
  406. mixins: [dictMixins, tabMixins],
  407. components: {
  408. billDetailDialog,
  409. // fileMain,
  410. invoiceList,
  411. returnGoodsList,
  412. accountstatementList,
  413. bpmDetail
  414. },
  415. props: {
  416. modal: {
  417. type: Boolean,
  418. default: true
  419. }
  420. },
  421. data() {
  422. return {
  423. orderSourceType,
  424. outsourceSceneList,
  425. cacheKeyUrl: 'eos-purchasingManage-purchaseOrder-inventoryTableDetail',
  426. processList: [
  427. {
  428. label: '是',
  429. value: 1
  430. },
  431. {
  432. label: '否',
  433. value: 0
  434. }
  435. ],
  436. activeComp: 'order',
  437. billDetailDialogFlag: false,
  438. fullscreen: false,
  439. tabOptions: [
  440. { key: 'order', name: '订单详情' },
  441. { key: 'bpm', name: '流程详情' },
  442. { key: 'invoice', name: '收货列表' },
  443. { key: 'returnorder', name: '退货列表' },
  444. { key: 'accountstatement', name: '对账列表' }
  445. ],
  446. visible: false,
  447. detailId: '',
  448. title: '详情',
  449. row: {},
  450. activeName: '1',
  451. form: {
  452. orderFiles: [{ name: '222' }]
  453. },
  454. rules: {},
  455. detailData: {},
  456. receiptPaymentListcolumns: [
  457. {
  458. width: 45,
  459. type: 'index',
  460. columnKey: 'index',
  461. align: 'center',
  462. fixed: 'left'
  463. },
  464. {
  465. width: 200,
  466. prop: 'moneyName',
  467. label: '款项名称',
  468. slot: 'moneyName',
  469. align: 'center'
  470. },
  471. {
  472. width: 100,
  473. prop: 'price',
  474. label: '金额',
  475. slot: 'price',
  476. formatter: (_row, _column, cellValue) => {
  477. return _row.price + '元';
  478. },
  479. align: 'center'
  480. },
  481. {
  482. width: 100,
  483. prop: 'ratio',
  484. label: '比例',
  485. slot: 'ratio',
  486. formatter: (_row, _column, cellValue) => {
  487. return _row.ratio + '%';
  488. },
  489. align: 'center'
  490. },
  491. {
  492. width: 160,
  493. prop: 'deadLine',
  494. label: '截止日期',
  495. slot: 'deadLine',
  496. align: 'center'
  497. },
  498. {
  499. prop: 'remark',
  500. label: ' 说明',
  501. slot: 'remark',
  502. align: 'center'
  503. }
  504. ],
  505. competAnalysisListcolumns: [
  506. {
  507. width: 45,
  508. type: 'index',
  509. columnKey: 'index',
  510. align: 'center',
  511. fixed: 'left'
  512. },
  513. {
  514. width: 200,
  515. prop: 'productName',
  516. label: '名称',
  517. slot: 'productName',
  518. align: 'center'
  519. },
  520. {
  521. width: 120,
  522. prop: 'productCode',
  523. label: '编码',
  524. slot: 'productCode',
  525. align: 'center'
  526. },
  527. {
  528. width: 200,
  529. prop: 'productCategoryName',
  530. label: '类型',
  531. slot: 'productCategoryName',
  532. align: 'center'
  533. },
  534. {
  535. width: 160,
  536. prop: 'productBrand',
  537. label: '牌号',
  538. slot: 'productBrand',
  539. align: 'center'
  540. },
  541. {
  542. width: 120,
  543. prop: 'modelType',
  544. label: '型号',
  545. slot: 'modelType',
  546. align: 'center'
  547. },
  548. {
  549. width: 120,
  550. prop: 'supplierMark',
  551. label: '供应商代号',
  552. slot: 'supplierMark',
  553. align: 'center'
  554. },
  555. {
  556. width: 120,
  557. prop: 'specification',
  558. label: '规格',
  559. slot: 'specification',
  560. align: 'center'
  561. },
  562. {
  563. minWidth: 200,
  564. prop: 'taskName',
  565. label: '工序',
  566. slot: 'taskName',
  567. align: 'center'
  568. },
  569. {
  570. width: 120,
  571. prop: 'requirementTotalCount',
  572. label: '采购需求数量',
  573. slot: 'requirementTotalCount',
  574. align: 'center'
  575. },
  576. {
  577. width: 120,
  578. prop: 'planTotalCount',
  579. label: '采购计划数量',
  580. slot: 'planTotalCount',
  581. align: 'center'
  582. },
  583. {
  584. width: 120,
  585. prop: 'inquiryTotalCount',
  586. label: '采购核价数量',
  587. slot: 'inquiryTotalCount',
  588. align: 'center'
  589. },
  590. {
  591. width: 120,
  592. prop: 'contractTotalCount',
  593. label: '采购合同数量',
  594. slot: 'contractTotalCount',
  595. align: 'center'
  596. },
  597. {
  598. width: 80,
  599. prop: 'doneTotalCount',
  600. label: '已采数量',
  601. slot: 'doneTotalCount',
  602. align: 'center'
  603. },
  604. {
  605. width: 80,
  606. prop: 'waitTotalCount',
  607. label: '待采数量',
  608. // slot: 'waitTotalCount',
  609. align: 'center'
  610. },
  611. {
  612. width: 80,
  613. prop: 'doneReceiveCount',
  614. label: '已收货数量',
  615. align: 'center'
  616. },
  617. {
  618. width: 80,
  619. prop: 'waitReceiveCount',
  620. label: '未收货数量',
  621. align: 'center'
  622. },
  623. {
  624. width: 120,
  625. prop: 'totalCount',
  626. label: '数量',
  627. slot: 'totalCount',
  628. align: 'center'
  629. },
  630. {
  631. width: 120,
  632. prop: 'produceType',
  633. align: 'center',
  634. label: '属性类型',
  635. showOverflowTooltip: true,
  636. formatter: (row, column) => {
  637. if (row.produceType) {
  638. return row.produceType
  639. .map((item) => {
  640. return lbjtList[item];
  641. })
  642. .toString();
  643. }
  644. }
  645. },
  646. {
  647. width: 120,
  648. prop: 'packingSpecification',
  649. align: 'center',
  650. label: '包装规格',
  651. showOverflowTooltip: true
  652. },
  653. {
  654. width: 120,
  655. prop: 'measuringUnit',
  656. label: '计量单位',
  657. slot: 'measuringUnit',
  658. align: 'center'
  659. },
  660. {
  661. width: 120,
  662. prop: 'singleWeight',
  663. label: '单重',
  664. slot: 'singleWeight',
  665. align: 'center'
  666. },
  667. {
  668. width: 120,
  669. prop: 'totalWeight',
  670. label: '总重',
  671. slot: 'totalWeight',
  672. align: 'center'
  673. },
  674. {
  675. width: 120,
  676. prop: 'weightUnit',
  677. label: '重量单位',
  678. slot: 'weightUnit',
  679. align: 'center'
  680. },
  681. {
  682. width: 160,
  683. prop: 'pricingWay',
  684. label: '计价方式',
  685. slot: 'pricingWay',
  686. align: 'center',
  687. formatter: (row, column) => {
  688. return row.pricingWay == 1
  689. ? '按数量计费'
  690. : row.pricingWay == 2
  691. ? '按重量计费'
  692. : '';
  693. }
  694. },
  695. {
  696. minWidth: 120,
  697. prop: 'goodsLevel',
  698. label: '物品级别',
  699. formatter: (_row, _column, cellValue) => {
  700. return levelList.find((item) => item.value == _row.goodsLevel)
  701. ?.label;
  702. },
  703. align: 'center'
  704. },
  705. {
  706. width: 160,
  707. prop: 'singlePrice',
  708. label: '单价',
  709. slot: 'singlePrice',
  710. align: 'center'
  711. },
  712. {
  713. width: 120,
  714. prop: 'taxRate',
  715. label: '税率',
  716. formatter: (row, column) => {
  717. return row.taxRate && row.taxRate + '%';
  718. },
  719. align: 'center'
  720. },
  721. {
  722. width: 150,
  723. prop: 'notaxSinglePrice',
  724. label: '不含税单价',
  725. align: 'center'
  726. },
  727. {
  728. width: 160,
  729. prop: 'discountSinglePrice',
  730. label: '折后单价',
  731. slot: 'discountSinglePrice',
  732. align: 'center'
  733. },
  734. {
  735. width: 120,
  736. prop: 'totalPrice',
  737. label: '合计',
  738. slot: 'totalPrice',
  739. formatter: (_row, _column, cellValue) => {
  740. return _row.totalPrice + '元';
  741. },
  742. align: 'center'
  743. },
  744. {
  745. width: 120,
  746. prop: 'discountTotalPrice',
  747. label: '折后合计',
  748. slot: 'discountTotalPrice',
  749. formatter: (_row, _column, cellValue) => {
  750. return _row.discountTotalPrice + '元';
  751. },
  752. align: 'center'
  753. },
  754. {
  755. width: 110,
  756. prop: 'batchNo',
  757. label: '批次号',
  758. slot: 'batchNo',
  759. align: 'center'
  760. },
  761. {
  762. prop: 'provenance',
  763. label: '产地',
  764. slot: 'provenance',
  765. align: 'center',
  766. minWidth: 200,
  767. showOverflowTooltip: true,
  768. formatter: (row, column) => {
  769. return row.provenance && row.provenance.length
  770. ? row.provenance
  771. .map((item) => this.getDictValue('产地', item))
  772. .join(',')
  773. : '';
  774. }
  775. },
  776. // {
  777. // width: 120,
  778. // prop: 'deliveryDays',
  779. // label: '交期(天)',
  780. // slot: 'deliveryDays'
  781. // },
  782. {
  783. width: 160,
  784. prop: 'deliveryDeadline',
  785. label: '交期截止日期',
  786. slot: 'deliveryDeadline',
  787. align: 'center'
  788. },
  789. {
  790. width: 200,
  791. prop: 'guaranteePeriod',
  792. label: '有效期',
  793. slot: 'guaranteePeriod',
  794. formatter: (_row, _column, cellValue) => {
  795. return (
  796. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  797. );
  798. },
  799. align: 'center'
  800. },
  801. {
  802. width: 160,
  803. prop: 'guaranteePeriodDeadline',
  804. label: '有效期截止日期',
  805. slot: 'guaranteePeriodDeadline',
  806. align: 'center'
  807. },
  808. {
  809. width: 120,
  810. prop: 'technicalAnswerName',
  811. label: '技术答疑人',
  812. slot: 'technicalAnswerName',
  813. align: 'center'
  814. },
  815. {
  816. width: 220,
  817. prop: 'technicalParams',
  818. label: '技术参数',
  819. slot: 'technicalParams',
  820. align: 'center'
  821. },
  822. {
  823. width: 240,
  824. prop: 'technicalDrawings',
  825. label: '技术图纸',
  826. slot: 'technicalDrawings',
  827. formatter: (_row, _column, cellValue) => {
  828. return (
  829. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  830. );
  831. },
  832. align: 'center'
  833. },
  834. {
  835. width: 220,
  836. prop: 'remark',
  837. label: '备注',
  838. slot: 'remark',
  839. align: 'center'
  840. }
  841. ],
  842. competAnalysisListcolumns1: [
  843. {
  844. width: 45,
  845. type: 'index',
  846. columnKey: 'index',
  847. align: 'center',
  848. fixed: 'left'
  849. },
  850. {
  851. width: 200,
  852. prop: 'productName',
  853. label: '名称',
  854. slot: 'productName',
  855. align: 'center'
  856. },
  857. {
  858. width: 120,
  859. prop: 'productCode',
  860. label: '编码',
  861. slot: 'productCode',
  862. align: 'center'
  863. },
  864. {
  865. width: 200,
  866. prop: 'productCategoryName',
  867. label: '类型',
  868. slot: 'productCategoryName',
  869. align: 'center'
  870. },
  871. {
  872. width: 160,
  873. prop: 'productBrand',
  874. label: '牌号',
  875. slot: 'productBrand',
  876. align: 'center'
  877. },
  878. {
  879. width: 120,
  880. prop: 'modelType',
  881. label: '型号',
  882. slot: 'modelType',
  883. align: 'center'
  884. },
  885. {
  886. width: 120,
  887. prop: 'supplierMark',
  888. label: '供应商代号',
  889. slot: 'supplierMark',
  890. align: 'center'
  891. },
  892. {
  893. width: 120,
  894. prop: 'specification',
  895. label: '规格',
  896. slot: 'specification',
  897. align: 'center'
  898. },
  899. {
  900. minWidth: 200,
  901. prop: 'taskName',
  902. label: '工序',
  903. slot: 'taskName',
  904. align: 'center'
  905. },
  906. {
  907. width: 120,
  908. prop: 'requirementTotalCount',
  909. label: '采购需求数量',
  910. slot: 'requirementTotalCount',
  911. align: 'center'
  912. },
  913. {
  914. width: 120,
  915. prop: 'planTotalCount',
  916. label: '采购计划数量',
  917. slot: 'planTotalCount',
  918. align: 'center'
  919. },
  920. {
  921. width: 120,
  922. prop: 'inquiryTotalCount',
  923. label: '采购核价数量',
  924. slot: 'inquiryTotalCount',
  925. align: 'center'
  926. },
  927. {
  928. width: 120,
  929. prop: 'contractTotalCount',
  930. label: '采购合同数量',
  931. slot: 'contractTotalCount',
  932. align: 'center'
  933. },
  934. {
  935. width: 80,
  936. prop: 'doneTotalCount',
  937. label: '已采数量',
  938. slot: 'doneTotalCount',
  939. align: 'center'
  940. },
  941. {
  942. width: 80,
  943. prop: 'waitTotalCount',
  944. label: '待采数量',
  945. // slot: 'waitTotalCount',
  946. align: 'center'
  947. },
  948. {
  949. width: 120,
  950. prop: 'totalCount',
  951. label: '数量',
  952. slot: 'totalCount',
  953. align: 'center'
  954. },
  955. {
  956. width: 120,
  957. prop: 'measuringUnit',
  958. label: '计量单位',
  959. slot: 'measuringUnit',
  960. align: 'center'
  961. },
  962. {
  963. width: 120,
  964. prop: 'singleWeight',
  965. label: '单重',
  966. slot: 'singleWeight',
  967. align: 'center'
  968. },
  969. {
  970. width: 120,
  971. prop: 'totalWeight',
  972. label: '总重',
  973. slot: 'totalWeight',
  974. align: 'center'
  975. },
  976. {
  977. width: 120,
  978. prop: 'weightUnit',
  979. label: '重量单位',
  980. slot: 'weightUnit',
  981. align: 'center'
  982. },
  983. {
  984. width: 110,
  985. prop: 'batchNo',
  986. label: '批次号',
  987. slot: 'batchNo',
  988. align: 'center'
  989. },
  990. {
  991. prop: 'provenance',
  992. label: '产地',
  993. slot: 'provenance',
  994. align: 'center',
  995. minWidth: 200,
  996. showOverflowTooltip: true,
  997. formatter: (row, column) => {
  998. return row.provenance && row.provenance.length
  999. ? row.provenance
  1000. .map((item) => this.getDictValue('产地', item))
  1001. .join(',')
  1002. : '';
  1003. }
  1004. },
  1005. // {
  1006. // width: 120,
  1007. // prop: 'deliveryDays',
  1008. // label: '交期(天)',
  1009. // slot: 'deliveryDays'
  1010. // },
  1011. {
  1012. width: 160,
  1013. prop: 'deliveryDeadline',
  1014. label: '交期截止日期',
  1015. slot: 'deliveryDeadline',
  1016. align: 'center'
  1017. },
  1018. {
  1019. width: 200,
  1020. prop: 'guaranteePeriod',
  1021. label: '有效期',
  1022. slot: 'guaranteePeriod',
  1023. formatter: (_row, _column, cellValue) => {
  1024. return (
  1025. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  1026. );
  1027. },
  1028. align: 'center'
  1029. },
  1030. {
  1031. width: 160,
  1032. prop: 'guaranteePeriodDeadline',
  1033. label: '有效期截止日期',
  1034. slot: 'guaranteePeriodDeadline',
  1035. align: 'center'
  1036. },
  1037. {
  1038. width: 120,
  1039. prop: 'technicalAnswerName',
  1040. label: '技术答疑人',
  1041. slot: 'technicalAnswerName',
  1042. align: 'center'
  1043. },
  1044. {
  1045. width: 220,
  1046. prop: 'technicalParams',
  1047. label: '技术参数',
  1048. slot: 'technicalParams',
  1049. align: 'center'
  1050. },
  1051. {
  1052. width: 240,
  1053. prop: 'technicalDrawings',
  1054. label: '技术图纸',
  1055. slot: 'technicalDrawings',
  1056. formatter: (_row, _column, cellValue) => {
  1057. return (
  1058. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  1059. );
  1060. },
  1061. align: 'center'
  1062. },
  1063. {
  1064. width: 220,
  1065. prop: 'remark',
  1066. label: '备注',
  1067. slot: 'remark',
  1068. align: 'center'
  1069. }
  1070. ]
  1071. };
  1072. },
  1073. created() {
  1074. this.requestDict('产地');
  1075. },
  1076. methods: {
  1077. async open(row) {
  1078. this.activeName = '1';
  1079. this.form = row;
  1080. this.visible = true;
  1081. await this.getDetailData(row.id);
  1082. this.detailId = row.id;
  1083. },
  1084. handleGetBillDetail(row, type) {
  1085. this.billDetailDialogFlag = true;
  1086. this.$nextTick(() => {
  1087. this.$refs.billDetailDialogRef.open(row, type);
  1088. });
  1089. },
  1090. cancel() {
  1091. this.$nextTick(() => {
  1092. // 关闭后,销毁所有的表单数据
  1093. (this.form = copyObj(this.formDef)),
  1094. (this.otherForm = copyObj(this.otherFormDef)),
  1095. (this.tableBankData = []);
  1096. this.tableLinkData = [];
  1097. this.visible = false;
  1098. });
  1099. },
  1100. downloadFile(file) {
  1101. getFile({ objectName: file.storePath }, file.name);
  1102. },
  1103. async getDetailData(id) {
  1104. this.loading = true;
  1105. const data = await getpurchaseorderDetail(id);
  1106. this.loading = false;
  1107. if (data) {
  1108. this.form = data;
  1109. this.detailData = data;
  1110. }
  1111. }
  1112. }
  1113. };
  1114. </script>
  1115. <style scoped lang="scss">
  1116. .ele-dialog-form {
  1117. .el-form-item {
  1118. margin-bottom: 10px;
  1119. }
  1120. }
  1121. .headbox {
  1122. display: flex;
  1123. justify-content: flex-start;
  1124. align-items: center;
  1125. .amount {
  1126. font-size: 14px;
  1127. font-weight: bold;
  1128. margin-right: 20px;
  1129. }
  1130. }
  1131. .switch_left ul .active {
  1132. border-top: 4px solid var(--color-primary);
  1133. color: var(--color-primary-5);
  1134. }
  1135. .switch {
  1136. padding-bottom: 20px;
  1137. }
  1138. :deep .divider .content {
  1139. justify-content: flex-start;
  1140. }
  1141. </style>