orderDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. <template>
  2. <div class="orderDetail">
  3. <el-card class="box">
  4. <span class="box-header-title">
  5. 基本信息(<el-link type="primary">{{ form.orderCode }}</el-link>)
  6. <!-- <el-link v-show="form.printFileUrlLink != null" target="_blank" :href="form.printFileUrlLink">下载原图文件</el-link>-->
  7. <el-button v-show="form.printFileUrlLink != null" type="primary" size="mini">
  8. <a target="_blank" :href="form.printFileUrlLink">下载原图文件</a>
  9. </el-button>
  10. <el-button v-show="form.attachFileUrlLink != null" type="success" size="mini">
  11. <a target="_blank" :href="form.attachFileUrlLink">下载附件文件</a>
  12. </el-button>
  13. <!-- <el-link v-show="form.attachFileUrlLink != null" target="_blank" :href="form.attachFileUrlLink">下载附件文件</el-link>-->
  14. </span>
  15. <i class="box-header-icon el-icon-caret-top" @click="unfold($event,'basicInfo',2)"></i>
  16. <div class="box-content" id="basicInfo">
  17. <el-row :gutter="5">
  18. <el-col :span="6">
  19. <div class="detailItem">
  20. <label class="item_label">制单时间:</label>
  21. <div class="item_content" v-if="form.createTime">{{ form.createTime | getTime }}</div>
  22. </div>
  23. </el-col>
  24. <el-col :span="5">
  25. <div class="detailItem">
  26. <label class="item_label">制单人:</label>
  27. <div class="item_content">{{ form.createManUser}}</div>
  28. </div>
  29. </el-col>
  30. <el-col :span="5">
  31. <div class="detailItem">
  32. <label class="item_label">客户名称:</label>
  33. <div class="item_content">{{ form.clientName }}</div>
  34. </div>
  35. </el-col>
  36. <el-col :span="5">
  37. <div class="detailItem">
  38. <label class="item_label">产品类型:</label>
  39. <div class="item_content">{{ form.productName }}</div>
  40. </div>
  41. </el-col>
  42. <el-col :span="5">
  43. <div class="detailItem">
  44. <label class="item_label">订单数量:</label>
  45. <div class="item_content">
  46. <span>{{ form.printQty }}</span>
  47. </div>
  48. </div>
  49. </el-col>
  50. <el-col :span="10">
  51. <div class="detailItem">
  52. <label class="item_label">备注:</label>
  53. <div class="item_content">{{ form.orderMemo }}</div>
  54. </div>
  55. </el-col>
  56. </el-row>
  57. </div>
  58. </el-card>
  59. <el-card class="box" style="margin-top: 10px">
  60. <div slot="header">
  61. <span class="box-header-title">产品信息</span>
  62. <i class="box-header-icon el-icon-caret-top" @click="unfold($event,'deliverInfo',2)"></i>
  63. </div>
  64. <div class="box-content" id="deliverInfo">
  65. <el-row :gutter="10">
  66. <el-col style="height: 40px" :span="4">
  67. <div class="detailItem">
  68. <label class="item_label">材料类型:</label>
  69. <div class="item_content">{{ form.paperName }}</div>
  70. </div>
  71. </el-col>
  72. <el-col style="height: 40px" :span="4">
  73. <div class="detailItem">
  74. <label class="item_label">每本页数:</label>
  75. <div class="item_content">{{ form.pageCount }}</div>
  76. </div>
  77. </el-col>
  78. <el-col style="height: 40px" :span="4">
  79. <div class="detailItem">
  80. <label class="item_label">印刷颜色:</label>
  81. <div class="item_content">{{ form.printColor }}</div>
  82. </div>
  83. </el-col>
  84. <el-col style="height: 40px" :span="15">
  85. <div class="detailItem">
  86. <label class="item_label">生产工艺:</label>
  87. <div class="item_content">
  88. <el-checkbox v-model="form.printCodeFlag" :true-label="1" :false-label="0" disabled >打码</el-checkbox>
  89. <el-checkbox v-model="form.printCoverFlag" :true-label="1" :false-label="0" disabled>封面</el-checkbox>
  90. <el-checkbox v-model="form.printMatFlag" :true-label="1" :false-label="0" disabled>加垫</el-checkbox>
  91. <el-checkbox v-model="form.printNotCodeFlag" :true-label="1" :false-label="0" disabled>不打码</el-checkbox>
  92. <el-checkbox v-model="form.printAllCoverFlag" :true-label="1" :false-label="0" disabled>封面全包</el-checkbox>
  93. </div>
  94. </div>
  95. </el-col>
  96. </el-row>
  97. </div>
  98. </el-card>
  99. <el-card class="box">
  100. <div slot="header">
  101. <span class="box-header-title">报价信息</span>
  102. <i class="box-header-icon el-icon-caret-top" @click="unfold($event,'produceInfo',2)"></i>
  103. </div>
  104. <div class="box-content" id="produceInfo">
  105. <el-row :gutter="10">
  106. <el-col :span="6">
  107. <div class="detailItem">
  108. <label class="item_label">数量:</label>
  109. <div class="item_content">{{ form.printQty }}</div>
  110. <div v-if="form.printQtyUnit" class="item_content">({{ form.printQtyUnit }})</div>
  111. </div>
  112. </el-col>
  113. <el-col :span="6">
  114. <div class="detailItem">
  115. <label class="item_label">单价:</label>
  116. <div class="item_content">{{ form.printPrice }}</div>
  117. </div>
  118. </el-col>
  119. <el-col :span="6">
  120. <div class="detailItem">
  121. <label class="item_label">金额:</label>
  122. <div class="item_content">{{ form.printMoneyTotal }}</div>
  123. </div>
  124. </el-col>
  125. </el-row>
  126. <el-row :gutter="10">
  127. <el-col :span="6">
  128. <div class="detailItem">
  129. <label class="item_label">送货方式:</label>
  130. <div class="item_content">{{ form.sendKind }}</div>
  131. </div>
  132. </el-col>
  133. <el-col :span="15">
  134. <div class="detailItem">
  135. <label class="item_label">送货地址:</label>
  136. <div class="item_content">{{ form.sendAddress }}</div>
  137. </div>
  138. </el-col>
  139. </el-row>
  140. </div>
  141. </el-card>
  142. <el-card class="box">
  143. <div slot="header">
  144. <span class="box-header-title">外发信息</span>
  145. <i class="box-header-icon el-icon-caret-top" @click="unfold($event,'outInfo',2)"></i>
  146. </div>
  147. <div class="box-content" id="outInfo">
  148. <el-row :gutter="10">
  149. <!-- <el-col :span="20">-->
  150. <!-- <div class="detailItem">-->
  151. <!-- <label class="item_label">外发形式:</label>-->
  152. <!-- <el-radio-group v-model="form.orderKind">-->
  153. <!-- <el-radio disabled :label="0">常规</el-radio>-->
  154. <!-- <el-radio disabled :label="1">销售</el-radio>-->
  155. <!-- <el-radio disabled :label="2">自产</el-radio>-->
  156. <!-- <el-radio disabled :label="3">外发</el-radio>-->
  157. <!-- </el-radio-group>-->
  158. <!-- </div>-->
  159. <!-- </el-col>-->
  160. <!-- <el-col :span="6">-->
  161. <!-- <div v-if="form.outWorkDept != null" class="detailItem">-->
  162. <!-- <label class="item_label">外发部门:</label>-->
  163. <!-- <div class="item_content">{{ form.outWorkDept }}</div>-->
  164. <!-- </div>-->
  165. <!-- </el-col>-->
  166. <el-col :span="6">
  167. <div class="detailItem">
  168. <label class="item_label">供应商:</label>
  169. <div class="item_content">{{ form.outWorkFactory }}</div>
  170. </div>
  171. </el-col>
  172. </el-row>
  173. <el-row :gutter="10">
  174. <el-col :span="6">
  175. <div class="detailItem">
  176. <label class="item_label">外发数量:</label>
  177. <div class="item_content">{{ form.outQty }}</div>
  178. </div>
  179. </el-col>
  180. <el-col :span="6">
  181. <div class="detailItem">
  182. <label class="item_label">外发单价:</label>
  183. <div class="item_content">{{ form.outPrice }}</div>
  184. </div>
  185. </el-col>
  186. <el-col :span="6">
  187. <div class="detailItem">
  188. <label class="item_label">外发金额:</label>
  189. <div class="item_content">{{ form.outMoneyTotal }}</div>
  190. </div>
  191. </el-col>
  192. <el-col :span="6">
  193. <div class="detailItem">
  194. <label class="item_label">外发运费:</label>
  195. <div class="item_content">{{ form.outSendMoney }}</div>
  196. </div>
  197. </el-col>
  198. <el-col :span="15">
  199. <div class="detailItem">
  200. <label class="item_label">外发备注:</label>
  201. <div class="item_content">{{ form.outMemo }}</div>
  202. </div>
  203. </el-col>
  204. </el-row>
  205. </div>
  206. </el-card>
  207. <el-card class="box">
  208. <div slot="header">
  209. <span class="box-header-title">成本信息</span>
  210. <i class="box-header-icon el-icon-caret-top" @click="unfold($event,'CostInfo',2)"></i>
  211. </div>
  212. <div class="box-content" id="CostInfo">
  213. <el-row :gutter="10">
  214. <el-col :span="6">
  215. <div class="detailItem">
  216. <label class="item_label">毛利:</label>
  217. <div class="item_content">{{ form.orderGrossProfit }}</div>
  218. </div>
  219. </el-col>
  220. <el-col :span="6">
  221. <div class="detailItem">
  222. <label class="item_label">毛利率:</label>
  223. <div class="item_content">{{ form.orderGrossProfitRate }}%</div>
  224. </div>
  225. </el-col>
  226. </el-row>
  227. </div>
  228. </el-card>
  229. <el-dialog size="mini" title="PDF文件列表" :append-to-body="true" :visible.sync="dialogPdfVisible" width="560px">
  230. <el-table :data="gridDataPdf">
  231. <el-table-column
  232. label="#"
  233. align="center"
  234. type="index"
  235. :index="indexMethod">
  236. </el-table-column>
  237. <el-table-column
  238. label="PDF文件名称"
  239. width="450px"
  240. >
  241. <template slot-scope="{row}">
  242. <a target="_blank" :href="row.url" style="color: #409EFF;cursor: pointer"
  243. class="ellipsis"> {{ row.fileName }}</a>
  244. </template>
  245. </el-table-column>
  246. </el-table>
  247. </el-dialog>
  248. <div v-show="machinefListVisible" style="width: 100%;position: fixed;left: 0px;height: 510px;z-index: 9999;background: #fff;bottom:0px;border-top: 1px solid #ddd;overflow-y: auto">
  249. <machinef-list @closeDrawer="closeDrawer" @searchList="searchList" ref="machinefList"></machinef-list>
  250. </div>
  251. </div>
  252. </template>
  253. <script>
  254. import {
  255. getPrintOrderInfo
  256. } from '@/api/order/orderDetail'
  257. import OrderStep from "@/components/orderStep/orderStep";
  258. import {getOrderPDFFiles} from "@/api/printbill/printbill";
  259. import {getConfigInfo} from "@/api/system/config";
  260. import {ifPermission} from "@/api/order/orderList";
  261. // import PrintbillDetail from "@/components/printbillDetail/printbillDetail";
  262. import printStep from "@/components/printbillDetail/printStep";
  263. import machinefList from "@/components/machinefList/machinefList";
  264. export default {
  265. name: 'OrderDetail',
  266. components: {
  267. OrderStep,
  268. printStep,
  269. machinefList
  270. },
  271. data() {
  272. return {
  273. machinefListVisible:false,
  274. dialogPdfVisible: false,
  275. gridDataPdf: [],
  276. form: {},
  277. deliverInform: [],
  278. partInfoList: [],
  279. produceInfoList: [],
  280. outAssistBillList: [],
  281. orderStockItemList: [],
  282. sendBillItemList: [],
  283. idOrder: '',
  284. eleindex: 0,
  285. deptSurveylist: [{id: 1}, {id: 2}],
  286. payKind: [],
  287. activeName: 'first',
  288. craftInfoList: [],
  289. permissionFlag1: false,
  290. printBillCode: ''
  291. }
  292. },
  293. watch: {
  294. activeName(val) {
  295. console.log(val);
  296. if (val == 'second') {
  297. this.getCraftInfo()
  298. }
  299. }
  300. },
  301. mounted() {
  302. if (this.$route.query.idOrder != undefined) {
  303. this.idOrder = this.$route.query.idOrder
  304. this.getInfo()
  305. }
  306. },
  307. methods: {
  308. //获取机台任务
  309. handleMachine(){
  310. const _that = this;
  311. _that.machinefListVisible = true;
  312. _that.$refs.machinefList.getMachine(_that.$refs.machinefList.activeName,_that.$refs.machinefList.activeIndex);
  313. },
  314. closeDrawer(){
  315. this.machinefListVisible = false;
  316. },
  317. searchList(id){
  318. const _that = this;
  319. // _that.search.idMachineInfo = id;
  320. // _that.listData.page=1;
  321. // _that.tableData = [];
  322. // _that.getTableInfo();
  323. },
  324. getPrintBillStep(id){
  325. const _that = this;
  326. _that.$refs.printStep.idOrder = id;
  327. _that.$refs.printStep.drawer = true;
  328. _that.$refs.printStep.getStep();
  329. },
  330. handlePrintBillDetail(id){
  331. const _that = this;
  332. if(_that.$route.path=="/printbill/list"){
  333. return
  334. }
  335. _that.$refs.printbillDetail.idOrder = id;
  336. _that.$refs.printbillDetail.printVisible = true;
  337. _that.$refs.printbillDetail.fullscreenLoading = true;
  338. _that.$refs.printbillDetail.getDetail();
  339. },
  340. getInfo() {
  341. const _that = this
  342. var data = {
  343. 'idOrder': _that.idOrder
  344. }
  345. getPrintOrderInfo(data).then(res => {
  346. _that.activeName = 'first'
  347. _that.form = res.data
  348. document.title = _that.form.orderCode + '_订单详情'
  349. })
  350. },
  351. getCraftInfo() {
  352. const _that = this
  353. var data = {
  354. 'idOrder': _that.idOrder
  355. }
  356. readPrintOrderDetailCraftInfo(data).then(res => {
  357. console.log('readPrintOrderDetailCraftInfo', res)
  358. _that.craftInfoList = res.data
  359. })
  360. },
  361. customRowStyle({row, rowIndex}) {
  362. if (row.processState == 10) {
  363. return {
  364. color: 'green'
  365. }
  366. }
  367. },
  368. enter(i) {
  369. this.eleindex = i
  370. },
  371. //序号
  372. indexMethod(index) {
  373. return index + 1;
  374. },
  375. openOrderStep() {
  376. const _that = this
  377. _that.$refs.orderStep.idOrder = _that.form.id
  378. _that.$refs.orderStep.getOrderStep()
  379. },
  380. handleOrderPDFFiles(id) {
  381. //查看pdf
  382. const _that = this;
  383. var datas = {
  384. "idOrder": id
  385. }
  386. getOrderPDFFiles(datas).then(response => {
  387. // console.log(response.data);
  388. _that.dialogPdfVisible = true;
  389. _that.gridDataPdf = response.data
  390. }).catch(err => {
  391. console.log(err);
  392. })
  393. },
  394. // 展开收起
  395. unfold: function (e, data, type) {
  396. const dv = document.getElementById(data)
  397. var pv = dv.parentNode
  398. if (dv.className == 'noShow') {
  399. dv.removeAttribute('class')
  400. pv.className = 'el-card__body'
  401. if (type == 2) {
  402. e.target.className = 'box-header-icon el-icon-caret-top'
  403. } else {
  404. pv.parentNode.children[0].children[0].children[1].className = 'box-header-icon el-icon-caret-top'
  405. }
  406. } else {
  407. dv.setAttribute('class', 'noShow')
  408. pv.className = 'hideContent'
  409. if (type == 2) {
  410. e.target.className = 'box-header-icon el-icon-caret-bottom'
  411. } else {
  412. pv.parentNode.children[0].children[0].children[1].className = 'box-header-icon el-icon-caret-bottom'
  413. }
  414. }
  415. },
  416. }
  417. }
  418. </script>
  419. <style>
  420. .el-tooltip__popper {
  421. max-width: 800px;
  422. line-height: 180%;
  423. }
  424. </style>
  425. <style lang="scss" scoped>
  426. .box {
  427. margin-bottom: 10px;
  428. }
  429. .box-header-title {
  430. line-height: 20px;
  431. font-size: 17px;
  432. font-weight: 500;
  433. color: #666;
  434. }
  435. .detailItem {
  436. margin: 5px;
  437. color: #666;
  438. }
  439. .detailItem .item_content {
  440. display: inline-block;
  441. }
  442. /*手风琴样式*/
  443. .or-container {
  444. display: flex;
  445. width: 100%;
  446. /*padding: 4% 2%;*/
  447. box-sizing: border-box;
  448. /*height: 400px;*/
  449. }
  450. .or-container:before {
  451. background-color: rgba(0, 0, 0, 0.4);
  452. }
  453. .boxItem {
  454. flex: 1;
  455. overflow: hidden;
  456. transition: .5s;
  457. box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
  458. line-height: 0;
  459. padding: 0 15px;
  460. }
  461. .noShow {
  462. display: none;
  463. }
  464. .box-title {
  465. font-size: 16px;
  466. font-width: 700;
  467. line-height: 30px;
  468. margin: 10px 0;
  469. padding-left: 10px;
  470. }
  471. .box-header-right {
  472. float: right;
  473. color: #20a0ff;
  474. line-height: 36px;
  475. cursor: pointer;
  476. margin-right: 10px;
  477. }
  478. .box-header-icon {
  479. float: right;
  480. color: #20a0ff;
  481. line-height: 36px;
  482. cursor: pointer;
  483. }
  484. .title-state {
  485. display: none;
  486. }
  487. /*.box-show{*/
  488. /* display: block;*/
  489. /* line-height: 20px;*/
  490. /*}*/
  491. .box-main {
  492. display: block;
  493. line-height: 20px;
  494. }
  495. .eleactive {
  496. flex: 1 1 30%;
  497. }
  498. .eleactive .title-state {
  499. display: inline-block;
  500. }
  501. /*.eleactive .box-show{*/
  502. /* display: none;*/
  503. /*}*/
  504. /*.eleactive .box-main{*/
  505. /* display: block;*/
  506. /*}*/
  507. .eleactive > img {
  508. width: 100%;
  509. height: 100%;
  510. }
  511. .tip {
  512. padding: 8px 16px;
  513. background-color: #ecf8ff;
  514. border-radius: 4px;
  515. border-left: 5px solid #50bfff;
  516. margin: 8px 0;
  517. }
  518. ::v-deep .el-checkbox__input.is-disabled .el-checkbox__inner::after {
  519. box-sizing: content-box;
  520. content: "";
  521. border: 2px solid #409eff;
  522. border-left: 0;
  523. border-top: 0;
  524. height: 7px;
  525. left: 4px;
  526. position: absolute;
  527. top: 1px;
  528. transform-origin: center;
  529. }
  530. ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
  531. background-color:#409eff;
  532. width: 10px;
  533. height: 10px;
  534. }
  535. ::v-deep .el-radio__input.is-disabled .el-radio__inner, .el-radio__input.is-disabled.is-checked .el-radio__inner {
  536. border-color:#E4E7ED;
  537. background-color: #ffffff;
  538. }
  539. /*end*/
  540. .orderDetail {
  541. //margin-top:-30px ;
  542. ::v-deep .el-card__header {
  543. padding: 9px 20px;
  544. }
  545. .el-checkbox__original {
  546. background-color: #c91111 !important;
  547. }
  548. ::v-deep .el-card__body {
  549. padding: 10px 20px;
  550. }
  551. }
  552. ::v-deep .el-tooltip__popper {
  553. max-width: 400px;
  554. }
  555. </style>