website-parts-shop-sales-information.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <div class="website-parts-shop-sales">
  3. <div class="website-parts-shop-sales-sl" v-if="formData">
  4. <el-page-header
  5. @back="
  6. () => {
  7. $emit('goBack')
  8. }
  9. "
  10. content="销售单信息"
  11. ></el-page-header>
  12. <br />
  13. <div style="margin-bottom: -1px">
  14. <div style="display: flex">
  15. <div style="width: 50%; margin-right: -1px">
  16. <el-descriptions
  17. :column="2"
  18. size="small"
  19. border
  20. labelClassName="labelClassName"
  21. contentClassName="contentClassName"
  22. >
  23. <el-descriptions-item>
  24. <template slot="label"> 网点 </template>
  25. <div>
  26. {{ formData.websitName }}
  27. </div>
  28. </el-descriptions-item>
  29. <el-descriptions-item>
  30. <template slot="label"> 申请类别 </template>
  31. <div>
  32. {{ { TRADE: '商用空调', ELEC: '生活电器(小家电)', HOME: '家用空调' }[formData.applyCategory] }}
  33. </div>
  34. </el-descriptions-item>
  35. <el-descriptions-item>
  36. <template slot="label"> 申请类型 </template>
  37. <div>
  38. {{ { '0': '普通申请', '1': '急件申请', '2': '备件申请' }[formData.applyType] }}
  39. </div>
  40. </el-descriptions-item>
  41. <el-descriptions-item>
  42. <template slot="label"> 发货方式 </template>
  43. <div>
  44. {{ { '0': '快递', '1': '自提' }[formData.deliveryType] }}
  45. </div>
  46. </el-descriptions-item>
  47. </el-descriptions>
  48. </div>
  49. <div style="width: 50%">
  50. <el-descriptions
  51. :column="2"
  52. size="small"
  53. border
  54. labelClassName="labelClassName"
  55. contentClassName="contentClassName"
  56. >
  57. <el-descriptions-item>
  58. <template slot="label"> 销售类型 </template>
  59. <div>
  60. {{ { CUSTOMER: '客户', WORKER: '内部师傅' }[formData.buyPeople] }}
  61. </div>
  62. </el-descriptions-item>
  63. <el-descriptions-item>
  64. <template slot="label"> 申请人 </template>
  65. <div>
  66. {{ formData.workerName }}
  67. </div>
  68. </el-descriptions-item>
  69. <el-descriptions-item>
  70. <template slot="label"> 联系电话 </template>
  71. <div>
  72. {{ formData.mobile }}
  73. </div>
  74. </el-descriptions-item>
  75. <el-descriptions-item>
  76. <template slot="label"> 接收单位 </template>
  77. <div>
  78. {{ formData.receiveUnit }}
  79. </div>
  80. </el-descriptions-item>
  81. </el-descriptions>
  82. </div>
  83. </div>
  84. </div>
  85. <div style="margin-bottom: -1px">
  86. <el-descriptions
  87. :column="2"
  88. size="small"
  89. border
  90. labelClassName="labelClassName2"
  91. contentClassName="contentClassNam2"
  92. >
  93. <el-descriptions-item>
  94. <template slot="label"> 发货单位 </template>
  95. <div>
  96. {{ formData.websitName }}
  97. </div>
  98. </el-descriptions-item>
  99. <el-descriptions-item>
  100. <template slot="label"> 操作人 </template>
  101. <div>
  102. <!-- -->
  103. </div>
  104. </el-descriptions-item>
  105. <el-descriptions-item>
  106. <template slot="label"> 收件地址 </template>
  107. <div>
  108. {{ formData.receiveAddr }}
  109. </div>
  110. </el-descriptions-item>
  111. <el-descriptions-item>
  112. <template slot="label"> 详细地址 </template>
  113. <div>
  114. {{ formData.addr }}
  115. </div>
  116. </el-descriptions-item>
  117. </el-descriptions>
  118. </div>
  119. <div style="margin-bottom: -1px">
  120. <div style="display: flex">
  121. <div style="width: 50%; margin-right: -1px">
  122. <el-descriptions
  123. :column="2"
  124. size="small"
  125. border
  126. labelClassName="labelClassName"
  127. contentClassName="contentClassName"
  128. >
  129. <el-descriptions-item>
  130. <template slot="label"> 支付方式 </template>
  131. <div>
  132. {{ { CASH: '现金', ALLINPAY: '通联', CREDIT: '记账' }[formData.payType] }}
  133. </div>
  134. </el-descriptions-item>
  135. <el-descriptions-item>
  136. <template slot="label"> 销售金额 </template>
  137. <div>
  138. {{ formData.totalAmount }}
  139. </div>
  140. </el-descriptions-item>
  141. <el-descriptions-item>
  142. <template slot="label"> 应收金额 </template>
  143. <div>
  144. {{ formData.itemTotalAmount }}
  145. </div>
  146. </el-descriptions-item>
  147. <el-descriptions-item>
  148. <template slot="label"> 收款状态 </template>
  149. <div>
  150. {{ formData.creditStatus ? '已收款' : '未收款' }}
  151. </div>
  152. </el-descriptions-item>
  153. </el-descriptions>
  154. </div>
  155. <div style="width: 50%">
  156. <el-descriptions
  157. :column="2"
  158. size="small"
  159. border
  160. labelClassName="labelClassName"
  161. contentClassName="contentClassName"
  162. >
  163. <el-descriptions-item>
  164. <template slot="label"> 下单时间 </template>
  165. <div>
  166. {{ formData.createTime }}
  167. </div>
  168. </el-descriptions-item>
  169. <el-descriptions-item>
  170. <template slot="label"> </template>
  171. <div>
  172. <!-- -->
  173. </div>
  174. </el-descriptions-item>
  175. <el-descriptions-item>
  176. <template slot="label"> 收款人 </template>
  177. <div>
  178. {{ formData.updateBy }}
  179. </div>
  180. </el-descriptions-item>
  181. <el-descriptions-item>
  182. <template slot="label"> 收款时间 </template>
  183. <div>
  184. {{ formData.updateTime }}
  185. </div>
  186. </el-descriptions-item>
  187. </el-descriptions>
  188. </div>
  189. </div>
  190. </div>
  191. <div style="margin-bottom: -1px">
  192. <el-descriptions size="small" border labelClassName="labelClassName">
  193. <el-descriptions-item labelStyle="width:15.45%">
  194. <template slot="label"> 备注 </template>
  195. <div>
  196. <!-- -->
  197. </div>
  198. </el-descriptions-item>
  199. </el-descriptions>
  200. </div>
  201. <div style="margin-bottom: 10px; margin-top: 10px; width: 100%">
  202. <el-table :data="items" size="mini" border style="width: 100%" header-cell-class-name="headerRowColor">
  203. <el-table-column label="序号" width="60">
  204. <template slot-scope="scope">
  205. <div class="serial_number">{{ scope.$index + 1 }}</div>
  206. </template>
  207. </el-table-column>
  208. <el-table-column label="配件编码" prop="partsNumber"> </el-table-column>
  209. <el-table-column label="配件名称" prop="partsName"> </el-table-column>
  210. <el-table-column label="单位" width="120" prop="goodsStockUnit"> </el-table-column>
  211. <el-table-column label="市场价" width="120" prop="marketPrice"> </el-table-column>
  212. <el-table-column label="销售价" width="120" prop="salesPrice"> </el-table-column>
  213. <el-table-column label="优惠价" width="120" prop="secondPrice"> </el-table-column>
  214. <el-table-column label="数量" width="100" prop="qty"> </el-table-column>
  215. <el-table-column label="总金额" width="100" prop="totalAmount"> </el-table-column>
  216. </el-table>
  217. </div>
  218. <div style="margin-bottom: 10px; width: 100%">
  219. <el-table :data="payOrder" size="mini" border header-cell-class-name="headerRowColor" style="width: 100%">
  220. <el-table-column prop="outTradeNo" label="商户订单号" width="235" />
  221. <el-table-column prop="orderNo" label="商户单号" width="150" />
  222. <el-table-column prop="payFlag" label="支付状态" width="80">
  223. <template slot-scope="scope">
  224. {{ { NO: '否', YES: '是' }[scope.row.payFlag] }}
  225. </template>
  226. </el-table-column>
  227. <el-table-column prop="payValue" label="支付金额" width="80" />
  228. <el-table-column prop="createTime" label="生成时间" width="140" />
  229. <el-table-column prop="timeExpire" label="失效时间" width="140" />
  230. <el-table-column prop="mchNo" label="商户号" width="150" />
  231. <el-table-column prop="openid" label="支付账号" show-overflow-tooltip />
  232. <el-table-column prop="transactionId" label="微信流水号" show-overflow-tooltip />
  233. </el-table>
  234. </div>
  235. <div style="text-align: right" v-if="formData && !formData.creditStatus">
  236. <el-button size="small" type="primary" @click="shoukuan">收款</el-button>
  237. </div>
  238. </div>
  239. <pay-popup-window
  240. v-if="visible"
  241. :item="rowData"
  242. :visible="visible"
  243. @success="
  244. () => {
  245. $refs.pageRef.refreshList()
  246. }
  247. "
  248. @setVisible="
  249. bool => {
  250. visible = bool
  251. rowData = null
  252. getxiangqing()
  253. }
  254. "
  255. />
  256. </div>
  257. </template>
  258. <script>
  259. import PayPopupWindow from './pay-popup-window.vue'
  260. import { ppartsCreditDetail } from '@/api/masterAccountingManagement'
  261. export default {
  262. components: { PayPopupWindow },
  263. props: {
  264. item: {
  265. type: Object,
  266. default: () => ({})
  267. }
  268. },
  269. data() {
  270. return {
  271. visible: false,
  272. rowData: null,
  273. formData: null
  274. }
  275. },
  276. computed: {
  277. items() {
  278. return this?.formData?.item ? [this?.formData?.item] : []
  279. },
  280. payOrder() {
  281. return this?.formData?.payOrder ? [this?.formData?.payOrder] : []
  282. }
  283. },
  284. mounted() {
  285. this.getxiangqing()
  286. },
  287. methods: {
  288. getxiangqing() {
  289. ppartsCreditDetail({ id: this.item.id }).then(res => {
  290. this.formData = res.data
  291. })
  292. },
  293. shoukuan() {
  294. this.rowData = this.formData
  295. this.visible = true
  296. }
  297. }
  298. }
  299. </script>
  300. <style lang="scss" scoped>
  301. .website-parts-shop-sales {
  302. min-width: 860px;
  303. position: absolute;
  304. top: 0;
  305. left: 0;
  306. right: 0;
  307. bottom: 0;
  308. z-index: 999;
  309. background: #fff;
  310. overflow: hidden;
  311. .website-parts-shop-sales-sl {
  312. padding: 20px;
  313. width: 100%;
  314. height: 100%;
  315. overflow: auto;
  316. }
  317. .sizeinput {
  318. width: 100%;
  319. height: 100%;
  320. position: relative;
  321. .inputjh {
  322. position: absolute;
  323. top: 0;
  324. left: 0;
  325. right: 0;
  326. bottom: 0;
  327. display: flex;
  328. justify-content: space-between;
  329. align-items: center;
  330. ::v-deep .el-input {
  331. margin: 0 5px;
  332. &:first-child {
  333. margin-left: 0 !important;
  334. }
  335. &:last-child {
  336. margin-right: 0 !important;
  337. }
  338. }
  339. }
  340. }
  341. .serial_number {
  342. width: 100%;
  343. height: 100%;
  344. padding: 6px !important;
  345. text-align: center;
  346. }
  347. .caozuo {
  348. width: 100%;
  349. height: 36px;
  350. display: flex;
  351. justify-content: center;
  352. align-items: center;
  353. }
  354. ::v-deep .is-disabled {
  355. .el-textarea__inner,
  356. .el-input__inner {
  357. background-color: #fff;
  358. border-color: #fff;
  359. }
  360. .el-input__suffix {
  361. display: none;
  362. }
  363. }
  364. ::v-deep th .cell {
  365. width: 100%;
  366. height: 100%;
  367. text-align: center;
  368. }
  369. ::v-deep .el-table__cell {
  370. .el-select,
  371. .el-input,
  372. .el-textarea__inner,
  373. .el-input__inner {
  374. height: 36px !important;
  375. border: none !important;
  376. }
  377. }
  378. ::v-deep .cell {
  379. height: 100%;
  380. padding: 0 !important;
  381. }
  382. ::v-deep .labelClassName {
  383. width: 6% !important;
  384. }
  385. ::v-deep .contentClassName {
  386. width: 19% !important;
  387. }
  388. ::v-deep .labelClassName2 {
  389. width: 6% !important;
  390. }
  391. ::v-deep .contentClassNam2 {
  392. width: 44% !important;
  393. }
  394. ::v-deep .headerRowColor {
  395. .cell {
  396. height: 100%;
  397. padding: 6px !important;
  398. }
  399. }
  400. }
  401. </style>