detail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <div class="outboundOrderDetail-wrap">
  3. <a-page-header :ghost="false" @back="handleBack" class="outboundOrderDetail-cont">
  4. <template slot="subTitle">
  5. <a href="javascript:;" @click="handleBack">返回列表</a>
  6. <a-button size="small" id="outboundOrderDetail-ts-btn" style="margin-left:30px" key="0">订单推送</a-button>
  7. <a-button size="small" id="outboundOrderDetail-export-btn" type="danger" style="margin-left:20px" key="1">销售导出</a-button>
  8. </template>
  9. <template slot="extra">
  10. <span>打印字段:</span>
  11. <a-select key="2" style="width:150px" id="sales-pritKey" placeholder="请选择打印字段" allowClear>
  12. <a-select-option v-for="item in pritKey" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
  13. </a-select>
  14. <span><i style="color: red;">*</i>打印模板:</span>
  15. <a-select key="3" style="width:150px" id="sales-pritKey" placeholder="请选择打印模板" allowClear>
  16. <a-select-option v-for="item in pritModal" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
  17. </a-select>
  18. <a-button key="4" id="outboundOrderDetail-preview-btn">打印预览</a-button>
  19. <a-button key="5" type="primary" id="outboundOrderDetail-print-btn">快速打印</a-button>
  20. </template>
  21. </a-page-header>
  22. <!-- 基础信息 -->
  23. <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
  24. <a-collapse :activeKey="['1']">
  25. <a-collapse-panel key="1" header="基础信息">
  26. <a-descriptions size="small" :column="3">
  27. <a-descriptions-item label="客户名称">张三的</a-descriptions-item>
  28. <a-descriptions-item label="客户地址">山西省太原市阿斯加德法律静安寺水电费</a-descriptions-item>
  29. <a-descriptions-item label="支付方式">货到付款</a-descriptions-item>
  30. <a-descriptions-item label="收款方式">现金</a-descriptions-item>
  31. <a-descriptions-item label="联系手机">13709146191</a-descriptions-item>
  32. <a-descriptions-item label="联系电话">13709146191</a-descriptions-item>
  33. <a-descriptions-item label="备注">备注备注备注备注备注</a-descriptions-item>
  34. <a-descriptions-item label="销售单号">34242sdf234234</a-descriptions-item>
  35. <a-descriptions-item label="制单人">王明</a-descriptions-item>
  36. <a-descriptions-item label="业务员">李四</a-descriptions-item>
  37. <a-descriptions-item label="审核状态">未审核</a-descriptions-item>
  38. <a-descriptions-item label="完结状态">未完结</a-descriptions-item>
  39. </a-descriptions>
  40. </a-collapse-panel>
  41. </a-collapse>
  42. </a-card>
  43. <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
  44. <!-- alert -->
  45. <a-alert type="info" style="margin-bottom: 10px;">
  46. <div slot="message">
  47. 总款数:<strong>12</strong>;总数量:<strong>12</strong>;总赠品数量:<strong>12</strong>;急件总款数:<strong>12</strong>;急件总数量:<strong>12</strong>;<br/>
  48. 总售价:<strong>12</strong>;总成本:<strong>12</strong>;总毛利:<strong>12</strong>;折后总售价:<strong>12</strong>;折扣:<strong>12%</strong>;折扣金额:<strong>12</strong>;
  49. </div>
  50. </a-alert>
  51. <!-- 列表 -->
  52. <s-table
  53. class="sTable"
  54. ref="table"
  55. size="default"
  56. :rowKey="(record) => record.id"
  57. :columns="columns"
  58. :data="loadData"
  59. :scroll="{ x: 1660 }"
  60. bordered>
  61. <!-- 状态 -->
  62. <template slot="state" slot-scope="text, record">
  63. <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
  64. </template>
  65. </s-table>
  66. </a-card>
  67. </div>
  68. </template>
  69. <script>
  70. import { STable, VSelect } from '@/components'
  71. export default {
  72. name: 'SalesDetail',
  73. components: {
  74. STable,
  75. VSelect
  76. },
  77. data () {
  78. return {
  79. disabled: false,
  80. pritKey: [
  81. { id: 0, name: '打印促销' },
  82. { id: 1, name: '打印支付方式' },
  83. { id: 2, name: '打印收款方式' }
  84. ],
  85. pritModal: [
  86. { id: 0, name: '普通模板一' },
  87. { id: 1, name: '普通模板二' },
  88. { id: 2, name: '仓库模板一' }
  89. ],
  90. // 表头
  91. columns: [
  92. { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
  93. { title: '产品编码', dataIndex: 'salerNo', width: 140, align: 'center' },
  94. { title: '产品名称', dataIndex: 'storeNo', align: 'center' },
  95. { title: '原厂编码', dataIndex: 'custName', width: 140, align: 'center' },
  96. { title: '成本价', dataIndex: 'totalP', width: 100, align: 'center' },
  97. { title: '售价', dataIndex: 'totalNums', width: 100, align: 'center' },
  98. { title: '折后售价', dataIndex: 'totalPrice', width: 100, align: 'center' },
  99. { title: '销售数量', dataIndex: 'payType', width: 100, align: 'center' },
  100. { title: '单位', dataIndex: 'mementPay', width: 100, align: 'center' },
  101. { title: '辅助数量', dataIndex: 'shDate', width: 100, align: 'center' },
  102. { title: '售价小计', dataIndex: 'isJj', width: 100, align: 'center' },
  103. { title: '折后小计', dataIndex: 'status', width: 100, align: 'center' },
  104. { title: '仓库', dataIndex: 'status', width: 100, align: 'center' },
  105. { title: '仓位', dataIndex: 'status', width: 100, align: 'center' },
  106. { title: '销售类型', dataIndex: 'status', width: 100, align: 'center' }
  107. ],
  108. // 加载数据方法 必须为 Promise 对象
  109. loadData: parameter => {
  110. this.disabled = true
  111. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  112. // const data = res.data
  113. // const no = (data.pageNo - 1) * data.pageSize
  114. // for (var i = 0; i < data.list.length; i++) {
  115. // data.list[i].no = no + i + 1
  116. // }
  117. // this.disabled = false
  118. // return data
  119. // })
  120. const _this = this
  121. return new Promise(function (resolve, reject) {
  122. const data = {
  123. pageNo: 1,
  124. pageSize: 10,
  125. list: [
  126. { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
  127. ],
  128. count: 10
  129. }
  130. const no = (data.pageNo - 1) * data.pageSize
  131. for (var i = 0; i < data.list.length; i++) {
  132. data.list[i].no = no + i + 1
  133. }
  134. _this.disabled = false
  135. resolve(data)
  136. })
  137. }
  138. }
  139. },
  140. methods: {
  141. // 返回
  142. handleBack () {
  143. this.$router.push({ path: '/salesManagement/outboundOrder/list' })
  144. }
  145. }
  146. }
  147. </script>
  148. <style lang="less">
  149. .outboundOrderDetail-wrap{
  150. .outboundOrderDetail-cont{
  151. margin-bottom: 10px;
  152. }
  153. }
  154. </style>