detailDialog.vue 36 KB

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