salesReturnOrderDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <template>
  2. <div>
  3. <h4>订单信息</h4>
  4. <el-divider />
  5. <div class="diy-table-1">
  6. <el-row>
  7. <el-col :span="8" class="item">
  8. <div class="label">销售退货单</div>
  9. <div class="value">{{ detailData.refundOrderId }}</div>
  10. </el-col>
  11. <el-col :span="8" class="item">
  12. <div class="label">订单日期</div>
  13. <div class="value">{{ detailData.refOrderDate }}</div>
  14. </el-col>
  15. <el-col :span="8" class="item">
  16. <div class="label">销售订单</div>
  17. <div class="value">{{ detailData.refOrderId }}</div>
  18. </el-col>
  19. <el-col :span="8" class="item">
  20. <div class="label">经销商编号</div>
  21. <div class="value">{{ detailData.customerNumber }}</div>
  22. </el-col>
  23. <el-col :span="16" class="item">
  24. <div class="label">经销商名称</div>
  25. <div class="value">{{ detailData.customerName }}</div>
  26. </el-col>
  27. </el-row>
  28. <!-- 政策订单 -->
  29. <el-row v-if="type === 'policy'">
  30. <el-col :span="8" class="item">
  31. <div class="label">销售政策编码</div>
  32. <div class="value">{{ detailData.policyCode }}</div>
  33. </el-col>
  34. <el-col :span="16" class="item">
  35. <div class="label">销售政策</div>
  36. <div class="value">{{ detailData.policyTitle }}</div>
  37. </el-col>
  38. <el-col :span="24" class="item">
  39. <div class="label">格力回复</div>
  40. <div class="value">{{ detailData.geLiNote }}</div>
  41. </el-col>
  42. </el-row>
  43. <!-- 零售订单 -->
  44. <el-row v-if="type === 'retail'">
  45. <!-- <el-col :span="8" class="item">
  46. <div class="label">产品大类</div>
  47. <div class="value">{{ detailData.id }}</div>
  48. </el-col> -->
  49. <el-col :span="24" class="item">
  50. <div class="label">销售订单类型</div>
  51. <div class="value">{{ orderType[detailData.refundOrderType] }}</div>
  52. </el-col>
  53. </el-row>
  54. <!-- 商用工程订单 -->
  55. <el-row v-if="type === 'commercial'">
  56. <el-col :span="8" class="item">
  57. <div class="label">工程信息编码</div>
  58. <div class="value">{{ detailData.refEnginRecordNo }}</div>
  59. </el-col>
  60. <el-col :span="8" class="item">
  61. <div class="label">工程项目名称</div>
  62. <div class="value">{{ detailData.refProjectName }}</div>
  63. </el-col>
  64. <el-col :span="8" class="item">
  65. <div class="label">工程信息单类型</div>
  66. <div class="value">{{ detailData.refProjectType }}</div>
  67. </el-col>
  68. <el-col :span="8" class="item">
  69. <div class="label">厂工程编码</div>
  70. <div class="value">{{ detailData.refFactoryNo }}</div>
  71. </el-col>
  72. <el-col :span="8" class="item">
  73. <div class="label">使用单位</div>
  74. <div class="value">{{ detailData.refUseUnit }}</div>
  75. </el-col>
  76. <el-col :span="8" class="item">
  77. <div class="label" />
  78. <div class="value" />
  79. </el-col>
  80. <el-col :span="8" class="item">
  81. <div class="label">联系人</div>
  82. <div class="value">{{ detailData.refLinkman }}</div>
  83. </el-col>
  84. <el-col :span="8" class="item">
  85. <div class="label">固定电话</div>
  86. <div class="value">{{ detailData.refTel }}</div>
  87. </el-col>
  88. <el-col :span="8" class="item">
  89. <div class="label">移动电话</div>
  90. <div class="value">{{ detailData.id }}</div>
  91. </el-col>
  92. <el-col :span="8" class="item">
  93. <div class="label">不扣押金</div>
  94. <div class="value">{{ detailData.takeDeposit?'不扣':'扣' }}</div>
  95. </el-col>
  96. <el-col :span="8" class="item">
  97. <div class="label">文件编码</div>
  98. <div class="value">{{ detailData.id }}</div>
  99. </el-col>
  100. <el-col :span="8" class="item">
  101. <div class="label">业务员</div>
  102. <div class="value">{{ detailData.serviceName }}</div>
  103. </el-col>
  104. <el-col :span="24" class="item">
  105. <div class="label">格力回复</div>
  106. <div class="value">{{ detailData.geLiNote }}</div>
  107. </el-col>
  108. <el-col :span="24" class="item">
  109. <div class="label">格力内部备注</div>
  110. <div class="value">{{ detailData.geLiInnerNote }}</div>
  111. </el-col>
  112. </el-row>
  113. <el-row>
  114. <el-col :span="24" class="item">
  115. <div class="label">备注</div>
  116. <div class="value">{{ detailData.remark }}</div>
  117. </el-col>
  118. <el-col :span="6" class="item">
  119. <div class="label">制单人</div>
  120. <div class="value">{{ detailData.createBy }}</div>
  121. </el-col>
  122. <el-col :span="6" class="item">
  123. <div class="label">制单日期</div>
  124. <div class="value">{{ detailData.createTime }}</div>
  125. </el-col>
  126. <el-col :span="6" class="item">
  127. <div class="label">审核人</div>
  128. <div class="value">{{ detailData.examineBy }}</div>
  129. </el-col>
  130. <el-col :span="6" class="item">
  131. <div class="label">审核日期</div>
  132. <div class="value">{{ detailData.examineTime }}</div>
  133. </el-col>
  134. <el-col :span="6" class="item">
  135. <div class="label">最后更新人</div>
  136. <div class="value">{{ detailData.updateBy }}</div>
  137. </el-col>
  138. <el-col :span="6" class="item">
  139. <div class="label">最后更新日期</div>
  140. <div class="value">{{ detailData.updateTime }}</div>
  141. </el-col>
  142. <el-col :span="6" class="item">
  143. <div class="label">关闭人</div>
  144. <div class="value">{{ detailData.refundBy }}</div>
  145. </el-col>
  146. <el-col :span="6" class="item">
  147. <div class="label">关闭日期</div>
  148. <div class="value">{{ detailData.refundTime }}</div>
  149. </el-col>
  150. <el-col :span="24" class="item">
  151. <div class="label">审核说明</div>
  152. <div class="value">{{ detailData.examineRemark }}</div>
  153. </el-col>
  154. </el-row>
  155. </div>
  156. <h4>货品信息</h4>
  157. <el-divider />
  158. <zj-table
  159. :table-attributes="tableAttributes"
  160. :is-drop="true"
  161. :columns="columns"
  162. :table-data="policyData"
  163. />
  164. </div>
  165. </template>
  166. <script>
  167. import { getRefundDetail } from '@/api/supply/salesReturnOrder'
  168. export default {
  169. props: {
  170. refundOrderId: {
  171. type: String,
  172. default: null
  173. },
  174. type: {
  175. type: String,
  176. default: null
  177. }
  178. },
  179. data() {
  180. return {
  181. moduleType: 1,
  182. detailData: {},
  183. policyData: [],
  184. tableAttributes: {
  185. border: true,
  186. headerCellClassName: 'headerRowColor',
  187. size: 'mini',
  188. 'summary-method': this.$getSummaries,
  189. 'show-summary': true
  190. },
  191. orderType: {
  192. TRADE: '商用',
  193. HOME: '家用',
  194. RETAIL: '零售单',
  195. RETAIL_POLICY: '销售政策单'
  196. }
  197. }
  198. },
  199. computed: {
  200. columns() {
  201. return [
  202. {
  203. columnAttributes: {
  204. label: '序号',
  205. prop: 'index'
  206. },
  207. render: (h, { props, index }) => {
  208. return <div>{index + 1}</div>
  209. }
  210. },
  211. {
  212. columnAttributes: {
  213. label: '销售类型',
  214. prop: 'saleTypeName',
  215. width: 200
  216. }
  217. },
  218. {
  219. columnAttributes: {
  220. label: '产品编码',
  221. prop: 'materialoldMumber',
  222. width: 200
  223. }
  224. },
  225. {
  226. columnAttributes: {
  227. label: '物料代码',
  228. prop: 'materialCode',
  229. width: 200
  230. }
  231. },
  232. {
  233. columnAttributes: {
  234. label: '产品名称',
  235. prop: 'materialName',
  236. width: 200
  237. }
  238. },
  239. {
  240. columnAttributes: {
  241. label: '规格型号',
  242. prop: 'specification',
  243. width: 300
  244. }
  245. },
  246. {
  247. columnAttributes: {
  248. label: '单位',
  249. prop: 'unit',
  250. width: 200
  251. }
  252. },
  253. {
  254. columnAttributes: {
  255. label: '单价',
  256. prop: 'price',
  257. width: 200
  258. }
  259. },
  260. ...(() => {
  261. return this.type !== 'commercial' ? [{
  262. columnAttributes: {
  263. label: '数量',
  264. prop: 'qty',
  265. width: 120
  266. }
  267. }] : [
  268. {
  269. columnAttributes: {
  270. label: '工程信息数量',
  271. prop: 'enginNum',
  272. width: 120
  273. }
  274. },
  275. {
  276. columnAttributes: {
  277. label: '数量',
  278. prop: 'qty',
  279. width: 120
  280. }
  281. }
  282. ]
  283. })(),
  284. {
  285. columnAttributes: {
  286. label: '订单金额',
  287. prop: 'totalAmount',
  288. width: 120
  289. }
  290. },
  291. {
  292. columnAttributes: {
  293. label: '返利类型',
  294. prop: 'customerWalletName2',
  295. width: 120
  296. }
  297. },
  298. {
  299. columnAttributes: {
  300. label: '使用返利金额',
  301. prop: 'payRebateAmount',
  302. width: 120
  303. }
  304. },
  305. {
  306. columnAttributes: {
  307. label: '格力折扣',
  308. prop: 'discAmount',
  309. width: 120
  310. }
  311. },
  312. {
  313. columnAttributes: {
  314. label: '现金钱包',
  315. prop: 'customerWalletName',
  316. width: 120
  317. }
  318. },
  319. {
  320. columnAttributes: {
  321. label: '实付金额',
  322. prop: 'payAmount',
  323. width: 120
  324. }
  325. },
  326. {
  327. columnAttributes: {
  328. label: '直调',
  329. prop: 'directTransferStatus',
  330. width: 120
  331. }, render: (h, { row }) => {
  332. const { directTransferStatus } = row
  333. return <div>{directTransferStatus ? '是' : '否'}</div>
  334. }
  335. },
  336. {
  337. columnAttributes: {
  338. label: '直调数量',
  339. prop: 'directTransferQty',
  340. width: 120
  341. }
  342. },
  343. {
  344. columnAttributes: {
  345. label: '原订单数量',
  346. prop: 'oldQty',
  347. width: 120
  348. }
  349. },
  350. {
  351. columnAttributes: {
  352. label: '备注',
  353. prop: 'remark',
  354. width: 200
  355. }
  356. },
  357. {
  358. columnAttributes: {
  359. label: '税率',
  360. prop: 'tax',
  361. width: 120
  362. }
  363. }
  364. ]
  365. }
  366. },
  367. mounted() {
  368. getRefundDetail({ refundOrderId: this.refundOrderId }).then(res => {
  369. res.data.items.forEach(item => {
  370. item.sums1 = ['directTransferQty', 'enginNum', 'hasSendQty', 'oldQty', 'qty', 'rebateRate', 'tax']
  371. item.sums2 = ['orgPrice', 'payAmount', 'payRebateAmount', 'price', 'totalAmount']
  372. })
  373. this.detailData = res.data
  374. this.policyData = res.data.items
  375. })
  376. }
  377. }
  378. </script>
  379. <style lang="scss" scoped></style>