detailDialog.vue 35 KB

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