detailDialog.vue 43 KB

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