detailDialog.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  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="12">
  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="12">
  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="remark"
  168. label="是否首工序"
  169. v-if="['3', '4', '5', '6'].includes(form.sourceType)"
  170. >
  171. <el-radio-group v-model="form.isFirstProcess" disabled>
  172. <el-radio v-for="item in processList" :label="item.value">{{
  173. item.label
  174. }}</el-radio>
  175. </el-radio-group>
  176. </el-form-item>
  177. <el-form-item label="需求人:" prop="requireUserName">
  178. <el-input v-model="form.requireUserName" disabled></el-input>
  179. </el-form-item>
  180. <el-form-item label="优惠后总金额:" prop="payAmount">
  181. <el-input v-model="form.payAmount" disabled>
  182. <template slot="append">元</template>
  183. </el-input>
  184. </el-form-item>
  185. <el-form-item label="订单总金额:" prop="totalAmount">
  186. <el-input v-model="form.totalAmount" disabled>
  187. <template slot="append">元</template>
  188. </el-input>
  189. </el-form-item>
  190. <el-form-item label="计价方式:">
  191. <el-select v-model="form.pricingWay" disabled style="width: 100%">
  192. <el-option :value="1" label="按数量计费"></el-option>
  193. <el-option :value="2" label="按重量计费"></el-option>
  194. </el-select>
  195. </el-form-item>
  196. </el-col>
  197. </el-row>
  198. <headerTitle title="基本信息"></headerTitle>
  199. <el-row>
  200. <el-col :span="12">
  201. <el-form-item label="采购方名称:" prop="partaName">
  202. <el-input v-model="form.partaName" disabled> </el-input>
  203. </el-form-item>
  204. <el-form-item
  205. label="采购方统一社会信用代码:"
  206. prop="partaUnifiedSocialCreditCode"
  207. class="form_item_label"
  208. >
  209. <el-input v-model="form.partaUnifiedSocialCreditCode" disabled>
  210. </el-input>
  211. </el-form-item>
  212. <el-form-item label="采购方联系人:" prop="partaLinkName">
  213. <el-input v-model="form.partaLinkName" disabled> </el-input>
  214. </el-form-item>
  215. <el-form-item label="采购方电话:" prop="partaTel">
  216. <el-input v-model="form.partaTel" disabled> </el-input>
  217. </el-form-item>
  218. <el-form-item label="采购方传真:" prop="partaFax">
  219. <el-input v-model="form.partaFax" disabled></el-input>
  220. </el-form-item>
  221. <el-form-item label=" 采购方Email:" prop="partaEmail">
  222. <el-input v-model="form.partaEmail" disabled></el-input>
  223. </el-form-item>
  224. <el-form-item label="采购方地址:" prop="partaAddress">
  225. <el-input v-model="form.partaAddress" disabled></el-input>
  226. </el-form-item>
  227. <!-- <el-form-item
  228. label="客户税号"
  229. prop="contactAddress"
  230. >
  231. <el-input
  232. clearable
  233. v-model="form.contactAddress"
  234. placeholder="请输入"
  235. />
  236. </el-form-item> -->
  237. </el-col>
  238. <el-col :span="12">
  239. <el-form-item label="供应商名称:" prop="partbName">
  240. <el-input v-model="form.partbName" disabled></el-input>
  241. </el-form-item>
  242. <el-form-item
  243. label="供应商统一社会信用代码:"
  244. prop="partbUnifiedSocialCreditCode"
  245. class="form_item_label"
  246. >
  247. <el-input
  248. v-model="form.partbUnifiedSocialCreditCode"
  249. disabled
  250. ></el-input>
  251. </el-form-item>
  252. <el-form-item label="供应商联系人:" prop="partbLinkName">
  253. <el-input v-model="form.partbLinkName" disabled></el-input>
  254. </el-form-item>
  255. <el-form-item
  256. prop="partbTel"
  257. label="供应商联系电话:"
  258. class="form_item_label"
  259. >
  260. <el-input v-model="form.partbTel" disabled></el-input>
  261. </el-form-item>
  262. <el-form-item prop="partbFax" label="供应商传真:">
  263. <el-input v-model="form.partbFax" disabled></el-input>
  264. </el-form-item>
  265. <el-form-item label="供应商Email:" prop="partbEmail">
  266. <el-input v-model="form.partbEmail" disabled></el-input>
  267. </el-form-item>
  268. <el-form-item label="供应商地址:" prop="partbAddress">
  269. <el-input v-model="form.partbAddress" disabled></el-input>
  270. </el-form-item>
  271. <!-- <el-form-item
  272. label="售出方税号"
  273. prop="contactAddress"
  274. >
  275. <el-input
  276. clearable
  277. v-model="form.contactAddress"
  278. placeholder="请输入"
  279. />
  280. </el-form-item> -->
  281. </el-col>
  282. </el-row>
  283. </el-form>
  284. <el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
  285. <el-tab-pane label="物品清单" name="1">
  286. <ele-pro-table
  287. ref="table"
  288. :needPage="false"
  289. :columns="competAnalysisListcolumns"
  290. :toolkit="[]"
  291. :datasource="detailData.productList"
  292. row-key="id"
  293. >
  294. <template v-slot:toolbar>
  295. <div class="headbox">
  296. <span class="amount">总计:{{ detailData.totalAmount }}元</span>
  297. <span class="amount"
  298. >应付金额:{{ detailData.payAmount }}元</span
  299. >
  300. </div>
  301. </template>
  302. <template v-slot:technicalDrawings="{ row }">
  303. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  304. </template>
  305. <template v-slot:requirementTotalCount="{ row, $index }">
  306. <el-button type="text" @click="handleGetBillDetail(row, 1)">{{
  307. row.requirementTotalCount
  308. }}</el-button>
  309. </template>
  310. <template v-slot:planTotalCount="{ row, $index }">
  311. <el-button type="text" @click="handleGetBillDetail(row, 2)">{{
  312. row.planTotalCount
  313. }}</el-button>
  314. </template>
  315. <template v-slot:inquiryTotalCount="{ row, $index }">
  316. <el-button type="text" @click="handleGetBillDetail(row, 3)">{{
  317. row.inquiryTotalCount
  318. }}</el-button>
  319. </template>
  320. <template v-slot:contractTotalCount="{ row, $index }">
  321. <el-button type="text" @click="handleGetBillDetail(row, 4)">{{
  322. row.contractTotalCount
  323. }}</el-button>
  324. </template>
  325. <template v-slot:doneTotalCount="{ row, $index }">
  326. <el-button type="text" @click="handleGetBillDetail(row, 5)">{{
  327. row.doneTotalCount
  328. }}</el-button>
  329. </template>
  330. <template v-slot:waitTotalCount="{ row, $index }">
  331. <el-button type="text" @click="handleGetBillDetail(row, 6)">{{
  332. row.waitTotalCount
  333. }}</el-button>
  334. </template>
  335. </ele-pro-table>
  336. </el-tab-pane>
  337. <el-tab-pane
  338. label="带料清单"
  339. name="2"
  340. v-if="['3', '4', '5', '6'].includes(form.sourceType)"
  341. >
  342. <ele-pro-table
  343. ref="table"
  344. :needPage="false"
  345. :columns="competAnalysisListcolumns1"
  346. :toolkit="[]"
  347. :datasource="detailData.rawList"
  348. row-key="id"
  349. >
  350. <template v-slot:technicalDrawings="{ row }">
  351. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  352. </template>
  353. </ele-pro-table>
  354. </el-tab-pane>
  355. <el-tab-pane
  356. label="产出清单"
  357. name="3"
  358. v-if="['3', '4', '5', '6'].includes(form.sourceType)"
  359. >
  360. <ele-pro-table
  361. ref="table"
  362. :needPage="false"
  363. :columns="competAnalysisListcolumns1"
  364. :toolkit="[]"
  365. :datasource="detailData.outputList"
  366. row-key="id"
  367. >
  368. <template v-slot:technicalDrawings="{ row }">
  369. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  370. </template>
  371. </ele-pro-table>
  372. </el-tab-pane>
  373. </el-tabs>
  374. </div>
  375. <bpmDetail
  376. v-if="activeComp === 'bpm' && form.processInstanceId"
  377. :id="form.processInstanceId"
  378. ></bpmDetail>
  379. <div v-if="activeComp == 'invoice'">
  380. <invoiceList :orderId="detailId"></invoiceList>
  381. </div>
  382. <div v-if="activeComp == 'returnorder'">
  383. <returnGoodsList :orderId="detailId"></returnGoodsList>
  384. </div>
  385. <div v-if="activeComp == 'accountstatement'">
  386. <accountstatementList :orderId="detailId"></accountstatementList>
  387. </div>
  388. <div slot="footer" class="footer">
  389. <el-button @click="cancel">返回</el-button>
  390. </div>
  391. <bill-detail-dialog
  392. :bill-detail-dialog-flag.sync="billDetailDialogFlag"
  393. v-if="billDetailDialogFlag"
  394. ref="billDetailDialogRef"
  395. ></bill-detail-dialog>
  396. </ele-modal>
  397. </template>
  398. <script>
  399. import {
  400. // getpurchaseorderDetail,
  401. getpurchaseorderDetail
  402. } from '@/api/purchasingManage/purchaseOrder';
  403. import invoiceList from '@/views/purchasingManage/purchaseOrder/orderAssociation/invoiceList.vue';
  404. import returnGoodsList from '@/views/purchasingManage/purchaseOrder/orderAssociation/returnGoodsList.vue';
  405. import accountstatementList from '@/views/purchasingManage/purchaseOrder/orderAssociation/accountstatementList.vue';
  406. import { getFile } from '@/api/system/file';
  407. import dictMixins from '@/mixins/dictMixins';
  408. import { copyObj } from '@/utils/util';
  409. import bpmDetail from '@/views/bpm/processInstance/detail.vue';
  410. import fileMain from '@/components/addDoc/index.vue';
  411. import billDetailDialog from '@/views/purchasingManage/purchaseOrder/components/billDetailDialog.vue';
  412. import modalTitle from '@/BIZComponents/modalTitle.vue';
  413. export default {
  414. mixins: [dictMixins],
  415. components: {
  416. billDetailDialog,
  417. fileMain,
  418. invoiceList,
  419. returnGoodsList,
  420. accountstatementList,
  421. bpmDetail,
  422. modalTitle
  423. },
  424. data() {
  425. return {
  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: 'measuringUnit',
  633. label: '计量单位',
  634. slot: 'measuringUnit',
  635. align: 'center'
  636. },
  637. {
  638. width: 120,
  639. prop: 'singleWeight',
  640. label: '单重',
  641. slot: 'singleWeight',
  642. align: 'center'
  643. },
  644. {
  645. width: 120,
  646. prop: 'totalWeight',
  647. label: '总重',
  648. slot: 'totalWeight',
  649. align: 'center'
  650. },
  651. {
  652. width: 120,
  653. prop: 'weightUnit',
  654. label: '重量单位',
  655. slot: 'weightUnit',
  656. align: 'center'
  657. },
  658. {
  659. width: 160,
  660. prop: 'singlePrice',
  661. label: '单价',
  662. slot: 'singlePrice',
  663. align: 'center'
  664. },
  665. {
  666. width: 160,
  667. prop: 'discountSinglePrice',
  668. label: '折后单价',
  669. slot: 'discountSinglePrice',
  670. align: 'center'
  671. },
  672. {
  673. width: 120,
  674. prop: 'totalPrice',
  675. label: '合计',
  676. slot: 'totalPrice',
  677. formatter: (_row, _column, cellValue) => {
  678. return _row.totalPrice + '元';
  679. },
  680. align: 'center'
  681. },
  682. {
  683. width: 120,
  684. prop: 'discountTotalPrice',
  685. label: '折后合计',
  686. slot: 'discountTotalPrice',
  687. formatter: (_row, _column, cellValue) => {
  688. return _row.discountTotalPrice + '元';
  689. },
  690. align: 'center'
  691. },
  692. {
  693. width: 110,
  694. prop: 'batchNo',
  695. label: '批次号',
  696. slot: 'batchNo',
  697. align: 'center'
  698. },
  699. {
  700. width: 120,
  701. prop: 'deliveryDays',
  702. label: '交期(天)',
  703. slot: 'deliveryDays'
  704. },
  705. {
  706. width: 160,
  707. prop: 'deliveryDeadline',
  708. label: '交期截止日期',
  709. slot: 'deliveryDeadline',
  710. align: 'center'
  711. },
  712. {
  713. width: 200,
  714. prop: 'guaranteePeriod',
  715. label: '质保期',
  716. slot: 'guaranteePeriod',
  717. formatter: (_row, _column, cellValue) => {
  718. return (
  719. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  720. );
  721. },
  722. align: 'center'
  723. },
  724. {
  725. width: 160,
  726. prop: 'guaranteePeriodDeadline',
  727. label: '质保截止日期',
  728. slot: 'guaranteePeriodDeadline',
  729. align: 'center'
  730. },
  731. {
  732. width: 120,
  733. prop: 'technicalAnswerName',
  734. label: '技术答疑人',
  735. slot: 'technicalAnswerName',
  736. align: 'center'
  737. },
  738. {
  739. width: 220,
  740. prop: 'technicalParams',
  741. label: '技术参数',
  742. slot: 'technicalParams',
  743. align: 'center'
  744. },
  745. {
  746. width: 240,
  747. prop: 'technicalDrawings',
  748. label: '技术图纸',
  749. slot: 'technicalDrawings',
  750. formatter: (_row, _column, cellValue) => {
  751. return (
  752. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  753. );
  754. },
  755. align: 'center'
  756. },
  757. {
  758. width: 220,
  759. prop: 'remark',
  760. label: '备注',
  761. slot: 'remark',
  762. align: 'center'
  763. }
  764. ],
  765. competAnalysisListcolumns1: [
  766. {
  767. width: 45,
  768. type: 'index',
  769. columnKey: 'index',
  770. align: 'center',
  771. fixed: 'left'
  772. },
  773. {
  774. width: 200,
  775. prop: 'productName',
  776. label: '名称',
  777. slot: 'productName',
  778. align: 'center'
  779. },
  780. {
  781. width: 120,
  782. prop: 'productCode',
  783. label: '编码',
  784. slot: 'productCode',
  785. align: 'center'
  786. },
  787. {
  788. width: 200,
  789. prop: 'productCategoryName',
  790. label: '类型',
  791. slot: 'productCategoryName',
  792. align: 'center'
  793. },
  794. {
  795. width: 160,
  796. prop: 'productBrand',
  797. label: '牌号',
  798. slot: 'productBrand',
  799. align: 'center'
  800. },
  801. {
  802. width: 120,
  803. prop: 'modelType',
  804. label: '型号',
  805. slot: 'modelType',
  806. align: 'center'
  807. },
  808. {
  809. width: 120,
  810. prop: 'supplierMark',
  811. label: '供应商代号',
  812. slot: 'supplierMark',
  813. align: 'center'
  814. },
  815. {
  816. width: 120,
  817. prop: 'specification',
  818. label: '规格',
  819. slot: 'specification',
  820. align: 'center'
  821. },
  822. {
  823. minWidth: 200,
  824. prop: 'taskName',
  825. label: '工序',
  826. slot: 'taskName',
  827. align: 'center'
  828. },
  829. {
  830. width: 120,
  831. prop: 'requirementTotalCount',
  832. label: '采购需求数量',
  833. slot: 'requirementTotalCount',
  834. align: 'center'
  835. },
  836. {
  837. width: 120,
  838. prop: 'planTotalCount',
  839. label: '采购计划数量',
  840. slot: 'planTotalCount',
  841. align: 'center'
  842. },
  843. {
  844. width: 120,
  845. prop: 'inquiryTotalCount',
  846. label: '采购核价数量',
  847. slot: 'inquiryTotalCount',
  848. align: 'center'
  849. },
  850. {
  851. width: 120,
  852. prop: 'contractTotalCount',
  853. label: '采购合同数量',
  854. slot: 'contractTotalCount',
  855. align: 'center'
  856. },
  857. {
  858. width: 80,
  859. prop: 'doneTotalCount',
  860. label: '已采数量',
  861. slot: 'doneTotalCount',
  862. align: 'center'
  863. },
  864. {
  865. width: 80,
  866. prop: 'waitTotalCount',
  867. label: '待采数量',
  868. // slot: 'waitTotalCount',
  869. align: 'center'
  870. },
  871. {
  872. width: 120,
  873. prop: 'totalCount',
  874. label: '数量',
  875. slot: 'totalCount',
  876. align: 'center'
  877. },
  878. {
  879. width: 120,
  880. prop: 'measuringUnit',
  881. label: '计量单位',
  882. slot: 'measuringUnit',
  883. align: 'center'
  884. },
  885. {
  886. width: 120,
  887. prop: 'singleWeight',
  888. label: '单重',
  889. slot: 'singleWeight',
  890. align: 'center'
  891. },
  892. {
  893. width: 120,
  894. prop: 'totalWeight',
  895. label: '总重',
  896. slot: 'totalWeight',
  897. align: 'center'
  898. },
  899. {
  900. width: 120,
  901. prop: 'weightUnit',
  902. label: '重量单位',
  903. slot: 'weightUnit',
  904. align: 'center'
  905. },
  906. {
  907. width: 110,
  908. prop: 'batchNo',
  909. label: '批次号',
  910. slot: 'batchNo',
  911. align: 'center'
  912. },
  913. {
  914. width: 120,
  915. prop: 'deliveryDays',
  916. label: '交期(天)',
  917. slot: 'deliveryDays'
  918. },
  919. {
  920. width: 160,
  921. prop: 'deliveryDeadline',
  922. label: '交期截止日期',
  923. slot: 'deliveryDeadline',
  924. align: 'center'
  925. },
  926. {
  927. width: 200,
  928. prop: 'guaranteePeriod',
  929. label: '质保期',
  930. slot: 'guaranteePeriod',
  931. formatter: (_row, _column, cellValue) => {
  932. return (
  933. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  934. );
  935. },
  936. align: 'center'
  937. },
  938. {
  939. width: 160,
  940. prop: 'guaranteePeriodDeadline',
  941. label: '质保截止日期',
  942. slot: 'guaranteePeriodDeadline',
  943. align: 'center'
  944. },
  945. {
  946. width: 120,
  947. prop: 'technicalAnswerName',
  948. label: '技术答疑人',
  949. slot: 'technicalAnswerName',
  950. align: 'center'
  951. },
  952. {
  953. width: 220,
  954. prop: 'technicalParams',
  955. label: '技术参数',
  956. slot: 'technicalParams',
  957. align: 'center'
  958. },
  959. {
  960. width: 240,
  961. prop: 'technicalDrawings',
  962. label: '技术图纸',
  963. slot: 'technicalDrawings',
  964. formatter: (_row, _column, cellValue) => {
  965. return (
  966. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  967. );
  968. },
  969. align: 'center'
  970. },
  971. {
  972. width: 220,
  973. prop: 'remark',
  974. label: '备注',
  975. slot: 'remark',
  976. align: 'center'
  977. }
  978. ]
  979. };
  980. },
  981. methods: {
  982. async open(row) {
  983. this.activeName = '1';
  984. this.form = row;
  985. this.visible = true;
  986. await this.getDetailData(row.id);
  987. this.detailId = row.id;
  988. },
  989. handleGetBillDetail(row, type) {
  990. this.billDetailDialogFlag = true;
  991. this.$nextTick(() => {
  992. this.$refs.billDetailDialogRef.open(row, type);
  993. });
  994. },
  995. cancel() {
  996. this.$nextTick(() => {
  997. // 关闭后,销毁所有的表单数据
  998. (this.form = copyObj(this.formDef)),
  999. (this.otherForm = copyObj(this.otherFormDef)),
  1000. (this.tableBankData = []);
  1001. this.tableLinkData = [];
  1002. this.visible = false;
  1003. });
  1004. },
  1005. downloadFile(file) {
  1006. getFile({ objectName: file.storePath }, file.name);
  1007. },
  1008. async getDetailData(id) {
  1009. this.loading = true;
  1010. const data = await getpurchaseorderDetail(id);
  1011. this.loading = false;
  1012. if (data) {
  1013. this.form = data;
  1014. this.detailData = data;
  1015. }
  1016. }
  1017. }
  1018. };
  1019. </script>
  1020. <style scoped lang="scss">
  1021. .ele-dialog-form {
  1022. .el-form-item {
  1023. margin-bottom: 10px;
  1024. }
  1025. }
  1026. .headbox {
  1027. display: flex;
  1028. justify-content: flex-start;
  1029. align-items: center;
  1030. .amount {
  1031. font-size: 14px;
  1032. font-weight: bold;
  1033. margin-right: 20px;
  1034. }
  1035. }
  1036. .switch_left ul .active {
  1037. border-top: 4px solid var(--color-primary);
  1038. color: var(--color-primary-5);
  1039. }
  1040. .switch {
  1041. padding-bottom: 20px;
  1042. }
  1043. :deep .divider .content {
  1044. justify-content: flex-start;
  1045. }
  1046. </style>