home_detail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <template>
  2. <div class="detail-container">
  3. <div v-show="!isShowPrint">
  4. <el-page-header @back="goBack" content="详情"></el-page-header>
  5. <div class="main-title">
  6. <div class="title">发货单信息</div>
  7. </div>
  8. <div class="diy-table-1">
  9. <el-row :gutter="0">
  10. <el-col :span="8" class="item">
  11. <div class="label">发货单号</div>
  12. <div class="value">{{detailData.id}}</div>
  13. </el-col>
  14. <el-col :span="8" class="item">
  15. <div class="label">发货日期</div>
  16. <div class="value">{{detailData.orderTime}}</div>
  17. </el-col>
  18. <el-col :span="8" class="item">
  19. <div class="label">单据状态</div>
  20. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  21. </el-col>
  22. <el-col :span="8" class="item">
  23. <div class="label">发货申请单号</div>
  24. <div class="value">{{detailData.id}}</div>
  25. </el-col>
  26. <el-col :span="8" class="item">
  27. <div class="label">订单类型</div>
  28. <div class="value">{{detailData.orderType | orderTypeFilter}}</div>
  29. </el-col>
  30. <el-col :span="8" class="item">
  31. <div class="label">工程订单号</div>
  32. <div class="value">{{detailData.enginOrderNo}}</div>
  33. </el-col>
  34. <el-col :span="8" class="item">
  35. <div class="label">经销商编码</div>
  36. <div class="value">{{detailData.customerNumber}}</div>
  37. </el-col>
  38. <el-col :span="16" class="item">
  39. <div class="label">经销商名称</div>
  40. <div class="value">{{detailData.customerName}}</div>
  41. </el-col>
  42. <el-col :span="8" class="item">
  43. <div class="label">工程编号</div>
  44. <div class="value">{{detailData.refEnginRecordNo}}</div>
  45. </el-col>
  46. <el-col :span="8" class="item">
  47. <div class="label">厂工程编码</div>
  48. <div class="value">{{detailData.refFactoryNo}}</div>
  49. </el-col>
  50. <el-col :span="8" class="item">
  51. <div class="label">项目名称</div>
  52. <div class="value">{{detailData.refProjectName}}</div>
  53. </el-col>
  54. <el-col :span="8" class="item">
  55. <div class="label">仓库</div>
  56. <div class="value">{{detailData.correspondName}}</div>
  57. </el-col>
  58. <el-col :span="8" class="item">
  59. <div class="label">税率</div>
  60. <div class="value">{{detailData.tax}}</div>
  61. </el-col>
  62. <el-col :span="8" class="item">
  63. <div class="label">发票号</div>
  64. <div class="value">{{detailData.billNumber}}</div>
  65. </el-col>
  66. <el-col :span="16" class="item">
  67. <div class="label">备注</div>
  68. <div class="value">{{detailData.remark}}</div>
  69. </el-col>
  70. <el-col :span="8" class="item">
  71. <div class="label">币种</div>
  72. <div class="value">{{detailData.currency}}</div>
  73. </el-col>
  74. <el-col :span="8" class="item">
  75. <div class="label">外仓印刷单号</div>
  76. <div class="value">{{detailData.printingSheet}}</div>
  77. </el-col>
  78. <el-col :span="8" class="item">
  79. <div class="label">制单人</div>
  80. <div class="value">{{detailData.createBy}}</div>
  81. </el-col>
  82. <el-col :span="8" class="item">
  83. <div class="label">制单日期</div>
  84. <div class="value">{{detailData.createTime}}</div>
  85. </el-col>
  86. <el-col :span="16" class="item">
  87. <div class="label">文件编号</div>
  88. <div class="value">{{detailData.fileNumber}}</div>
  89. </el-col>
  90. <el-col :span="8" class="item">
  91. <div class="label">出库日期</div>
  92. <div class="value">{{detailData.outTime}}</div>
  93. </el-col>
  94. <el-col :span="8" class="item">
  95. <div class="label">审核人</div>
  96. <div class="value">{{detailData.approvalName}}</div>
  97. </el-col>
  98. <el-col :span="8" class="item">
  99. <div class="label">审核日期</div>
  100. <div class="value">{{detailData.approvalTime}}</div>
  101. </el-col>
  102. <el-col :span="8" class="item">
  103. <div class="label">开票日期</div>
  104. <div class="value">{{detailData.billTime}}</div>
  105. </el-col>
  106. </el-row>
  107. </div>
  108. <div class="main-title">
  109. <div class="title">货品信息</div>
  110. </div>
  111. <div class="table">
  112. <el-table
  113. :data="detailData.invoicePickBeans"
  114. element-loading-text="Loading"
  115. border
  116. fit
  117. highlight-current-row
  118. stripe
  119. show-summary
  120. :summary-method="$getSummaries">
  121. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  122. <el-table-column align="center" label="订单号" prop="enginOrderNo" min-width="180" show-overflow-tooltip></el-table-column>
  123. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
  124. <el-table-column align="center" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
  125. <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
  126. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  127. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  128. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  129. <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
  130. <el-table-column align="right" label="未出库数量" prop="notOutNumber" min-width="100" show-overflow-tooltip></el-table-column>
  131. <el-table-column align="right" label="含税单价" prop="price" min-width="100" show-overflow-tooltip>
  132. <template slot-scope="scope">
  133. {{scope.row.price | numToFixed}}
  134. </template>
  135. </el-table-column>
  136. <el-table-column align="right" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip>
  137. <template slot-scope="scope">
  138. {{scope.row.afterTaxPrice | numToFixed}}
  139. </template>
  140. </el-table-column>
  141. <el-table-column align="right" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip>
  142. <template slot-scope="scope">
  143. {{scope.row.payAmount | numToFixed}}
  144. </template>
  145. </el-table-column>
  146. <el-table-column align="right" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
  147. <el-table-column align="right" label="折扣额" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
  148. <template slot-scope="scope">
  149. {{scope.row.totalDiscAmount | numToFixed}}
  150. </template>
  151. </el-table-column>
  152. <el-table-column align="right" label="折扣后单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
  153. <template slot-scope="scope">
  154. {{scope.row.singlePayPrice | numToFixed}}
  155. </template>
  156. </el-table-column>
  157. <el-table-column align="center" label="退补标记" prop="refundStatus" min-width="100" show-overflow-tooltip>
  158. <template slot-scope="scope">
  159. {{scope.row.refundStatus | refundStatusFilter}}
  160. </template>
  161. </el-table-column>
  162. <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip></el-table-column>
  163. <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  164. <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip></el-table-column>
  165. <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
  166. </el-table>
  167. </div>
  168. <div class="page-footer">
  169. <div class="footer">
  170. <el-button type="primary" icon="el-icon-printer" @click="toPrint" v-if="$checkBtnRole('print', $route.meta.roles)">打 印</el-button>
  171. <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
  172. <el-button slot="reference">关 闭</el-button>
  173. </el-popconfirm>
  174. </div>
  175. </div>
  176. </div>
  177. <print-preview ref="preView" />
  178. <!-- <CommonPrint :printId="printId" :printType="printType" v-if="isShowPrint" @backDetail="backDetail" /> -->
  179. </div>
  180. </template>
  181. <script>
  182. import print from "@/mixin/print";
  183. import printPreview from '@/views/supply/deliver/components/design/preview.vue'
  184. import { getEnginDetail } from "@/api/supply/deliver";
  185. import CommonPrint from "@/views/supply/deliver/components/common_print";
  186. export default {
  187. name: 'HomeDetail',
  188. componentName: 'HomeDetail',
  189. props: ['listItem'],
  190. components: {
  191. CommonPrint,printPreview
  192. }, mixins: [print],
  193. filters: {
  194. statusFilter(val) {
  195. const statusList = [
  196. { label: '已保存', value: 'SAVE' },
  197. { label: '待审核', value: 'WAIT' },
  198. { label: '审核通过', value: 'OK' },
  199. // { label: '审核驳回', value: 'FAIL' },,
  200. ]
  201. let obj = statusList.find(o => o.value == val);
  202. return obj ? obj.label : ''
  203. },
  204. orderTypeFilter(val) {
  205. const MAP = {
  206. 1: '零售订单',
  207. 2: '家用工程订单',
  208. 3: '商用工程订单',
  209. }
  210. return MAP[val];
  211. },
  212. refundStatusFilter(val) {
  213. const MAP = {
  214. 1: '正常',
  215. }
  216. return MAP[val];
  217. }
  218. },
  219. data() {
  220. return {
  221. detailData: {},
  222. printType: 2,
  223. printId: '',
  224. isShowPrint: false,
  225. }
  226. },
  227. mounted() {
  228. this.initPrint()
  229. },
  230. created() {
  231. this.getDetail();
  232. },
  233. methods: {
  234. // 返回列表
  235. goBack() {
  236. this.$emit('backListFormDetail');
  237. },
  238. // 获取详情
  239. getDetail() {
  240. getEnginDetail({id: this.listItem.id}).then(res => {
  241. if(res.data.invoicePickBeans) {
  242. res.data.invoicePickBeans.forEach(item => {
  243. item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
  244. item.sums1 = ['notOutNumber', 'refundableQty'];
  245. item.sums2 = ['price', 'afterTaxPrice', 'payAmount', 'totalDiscAmount', 'singlePayPrice'];
  246. })
  247. }
  248. this.detailData = res.data;
  249. })
  250. },
  251. // 点击打印
  252. toPrint() {
  253. this.printId = this.listItem.id;
  254. this.getDateil(this.listItem.id,'getDeliverDetail').then(res=>{
  255. this.$endLoading()
  256. this.$refs.preView.show(this.hiprintTemplate, this.outputData);
  257. });
  258. },
  259. backDetail() {
  260. this.printId = '';
  261. this.isShowPrint = false;
  262. },
  263. }
  264. }
  265. </script>
  266. <style scoped lang="scss">
  267. .detail-container {
  268. width: 100%;
  269. height: 100%;
  270. }
  271. .main-title {
  272. display: flex;
  273. justify-content: space-between;
  274. align-items: center;
  275. margin-top: 30px;
  276. height: 60px;
  277. border-bottom: 1px solid #DCDFE6;
  278. margin-bottom: 20px;
  279. .title {
  280. font-size: 16px;
  281. font-weight: 600;
  282. padding-left: 10px;
  283. }
  284. }
  285. </style>