commerce_detail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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.factoryNumber}}</div>
  49. </el-col>
  50. <el-col :span="8" class="item">
  51. <div class="label">项目名称</div>
  52. <div class="value">{{detailData.projectName}}</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.taxRate}}</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.billingTime}}</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="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
  124. <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
  125. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  126. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  127. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  128. <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
  129. <el-table-column align="right" label="未出库数量" prop="notOutNumber" min-width="100" show-overflow-tooltip></el-table-column>
  130. <el-table-column align="right" label="含税单价" prop="price" min-width="100" show-overflow-tooltip>
  131. <template slot-scope="scope">
  132. {{scope.row.price | numToFixed}}
  133. </template>
  134. </el-table-column>
  135. <el-table-column align="right" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip>
  136. <template slot-scope="scope">
  137. {{scope.row.afterTaxPrice | numToFixed}}
  138. </template>
  139. </el-table-column>
  140. <el-table-column align="right" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip>
  141. <template slot-scope="scope">
  142. {{scope.row.payAmount | numToFixed}}
  143. </template>
  144. </el-table-column>
  145. <el-table-column align="right" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
  146. <el-table-column align="right" label="折扣额" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
  147. <template slot-scope="scope">
  148. {{scope.row.totalDiscAmount | numToFixed}}
  149. </template>
  150. </el-table-column>
  151. <el-table-column align="right" label="折扣后单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
  152. <template slot-scope="scope">
  153. {{scope.row.singlePayPrice | numToFixed}}
  154. </template>
  155. </el-table-column>
  156. <el-table-column align="center" label="退补标记" prop="refundStatus" min-width="100" show-overflow-tooltip>
  157. <template slot-scope="scope">
  158. {{scope.row.refundStatus | refundStatusFilter}}
  159. </template>
  160. </el-table-column>
  161. <el-table-column align="center" label="厂产品代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
  162. </el-table>
  163. </div>
  164. <div class="page-footer">
  165. <div class="footer">
  166. <el-button type="primary" icon="el-icon-printer" @click="toPrint">打 印</el-button>
  167. <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
  168. <el-button slot="reference">关 闭</el-button>
  169. </el-popconfirm>
  170. </div>
  171. </div>
  172. </div>
  173. <CommonPrint :printId="printId" :printType="printType" v-if="isShowPrint" @backDetail="backDetail" />
  174. </div>
  175. </template>
  176. <script>
  177. import { getEnginDetail } from "@/api/supply/deliver";
  178. import CommonPrint from "@/views/supply/deliver/components/common_print";
  179. export default {
  180. name: 'commerceDetail',
  181. componentName: 'commerceDetail',
  182. props: ['listItem'],
  183. components: {
  184. CommonPrint,
  185. },
  186. filters: {
  187. statusFilter(val) {
  188. const statusList = [
  189. { label: '已保存', value: 'SAVE' },
  190. { label: '待审核', value: 'WAIT' },
  191. { label: '审核通过', value: 'OK' },
  192. { label: '审核驳回', value: 'FAIL' },
  193. ]
  194. let obj = statusList.find(o => o.value == val);
  195. return obj ? obj.label : ''
  196. },
  197. orderTypeFilter(val) {
  198. const MAP = {
  199. 1: '零售订单',
  200. 2: '家用工程订单',
  201. 3: '商用工程订单',
  202. }
  203. return MAP[val];
  204. },
  205. refundStatusFilter(val) {
  206. const MAP = {
  207. 1: '正常',
  208. }
  209. return MAP[val];
  210. }
  211. },
  212. data() {
  213. return {
  214. detailData: {},
  215. printType: 2,
  216. printId: '',
  217. isShowPrint: false,
  218. }
  219. },
  220. created() {
  221. this.getDetail();
  222. },
  223. methods: {
  224. // 返回列表
  225. goBack() {
  226. this.$emit('backListFormDetail');
  227. },
  228. // 获取详情
  229. getDetail() {
  230. getEnginDetail({id: this.listItem.id}).then(res => {
  231. if(res.data.invoicePickBeans) {
  232. res.data.invoicePickBeans.forEach(item => {
  233. item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
  234. item.sums1 = ['notOutNumber', 'refundableQty'];
  235. item.sums2 = ['price', 'afterTaxPrice', 'payAmount', 'totalDiscAmount', 'singlePayPrice'];
  236. })
  237. }
  238. this.detailData = res.data;
  239. })
  240. },
  241. // 点击打印
  242. toPrint() {
  243. this.printId = this.listItem.id;
  244. this.isShowPrint = true;
  245. },
  246. backDetail() {
  247. this.printId = '';
  248. this.isShowPrint = false;
  249. },
  250. }
  251. }
  252. </script>
  253. <style scoped lang="scss">
  254. .detail-container {
  255. width: 100%;
  256. height: 100%;
  257. }
  258. .main-title {
  259. display: flex;
  260. justify-content: space-between;
  261. align-items: center;
  262. margin-top: 30px;
  263. height: 60px;
  264. border-bottom: 1px solid #DCDFE6;
  265. margin-bottom: 20px;
  266. .title {
  267. font-size: 16px;
  268. font-weight: 600;
  269. padding-left: 10px;
  270. }
  271. }
  272. </style>