detail.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <div class="examineVerifyDetail-page-wrapper">
  3. <!-- 操作 -->
  4. <a-page-header :ghost="false" @back="handleBack" class="examineVerifyDetail-operation-wrapper">
  5. <!-- 自定义的二级文字标题 -->
  6. <template slot="subTitle">
  7. <a id="examineVerifyDetail-btn-back" href="javascript:;" @click="handleBack">返回列表</a>
  8. </template>
  9. <!-- 操作区,位于 title 行的行尾 -->
  10. <template slot="extra">
  11. <a-button key="2" @click="handlePreview" id="examineVerifyDetail-btn-preview">打印预览</a-button>
  12. <a-button key="1" type="primary" @click="handlePrint" id="examineVerifyDetail-btn-print">快速打印</a-button>
  13. </template>
  14. </a-page-header>
  15. <!-- 急件单信息 -->
  16. <a-card size="small" :bordered="false" class="examineVerifyDetail-info-wrapper">
  17. <a-collapse :activeKey="['1']">
  18. <a-collapse-panel key="1" header="基础信息">
  19. <a-descriptions :column="3">
  20. <a-descriptions-item label="客户名称">名称思密达</a-descriptions-item>
  21. <a-descriptions-item label="客户地址">陕西省西安市未央区凤城八路</a-descriptions-item>
  22. <a-descriptions-item label="支付方式">名称思密达</a-descriptions-item>
  23. <a-descriptions-item label="收款方式">名称思密达</a-descriptions-item>
  24. <a-descriptions-item label="联系手机">名称思密达</a-descriptions-item>
  25. <a-descriptions-item label="联系电话">名称思密达</a-descriptions-item>
  26. <a-descriptions-item label="备注" span="2">名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达</a-descriptions-item>
  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="完结状态">名称思密达</a-descriptions-item>
  32. </a-descriptions>
  33. </a-collapse-panel>
  34. </a-collapse>
  35. </a-card>
  36. <!-- 表格 -->
  37. <a-card size="small" :bordered="false" class="examineVerifyDetail-table-wrapper">
  38. <!-- 合计 -->
  39. <a-alert type="info" showIcon style="margin-bottom:15px">
  40. <div slot="message">
  41. 总款数:<strong>998</strong>;总数量:<strong>2009</strong>;总数量:<strong>2009</strong>;急件总款数:<strong>2009</strong>;急件总数量:<strong>2009</strong>。<br/>
  42. 总售价:<strong>998</strong>;总成本:<strong>2009</strong>;总毛利:<strong>2009</strong>;折后总售价:<strong>2009</strong>;折扣:<strong>2009%</strong>;折扣金额:<strong>2009</strong>。
  43. </div>
  44. </a-alert>
  45. <s-table
  46. class="sTable"
  47. ref="table"
  48. size="default"
  49. :rowKey="(record) => record.id"
  50. :columns="columns"
  51. :data="loadData"
  52. :scroll="{ x: 1660 }"
  53. bordered>
  54. <!-- 库存数量 -->
  55. <template slot="inventoryQuantity" slot-scope="text, record">
  56. <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{ record.inventoryQuantity }}</span>
  57. </template>
  58. </s-table>
  59. </a-card>
  60. </div>
  61. </template>
  62. <script>
  63. import { STable, VSelect } from '@/components'
  64. export default {
  65. components: { STable, VSelect },
  66. data () {
  67. return {
  68. columns: [
  69. { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
  70. { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
  71. { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  72. { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
  73. { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  74. { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  75. { title: '折后售价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  76. { title: '销售数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  77. { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  78. { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' },
  79. { title: '折后小计', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  80. { title: '折扣金额', dataIndex: 'discountAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  81. { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center' },
  82. { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
  83. { title: '销售类型', dataIndex: 'salesBillType', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
  84. ],
  85. // 加载数据方法 必须为 Promise 对象
  86. loadData: parameter => {
  87. this.disabled = true
  88. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  89. // const data = res.data
  90. // const no = (data.pageNo - 1) * data.pageSize
  91. // for (var i = 0; i < data.list.length; i++) {
  92. // data.list[i].no = no + i + 1
  93. // }
  94. // this.disabled = false
  95. // return data
  96. // })
  97. const _this = this
  98. return new Promise(function (resolve, reject) {
  99. const data = {
  100. pageNo: 1,
  101. pageSize: 10,
  102. list: [
  103. { id: '1', productNum: 'jgqp11111111111', inventoryQuantity: 0, quantityNotOffset: 3, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
  104. ]
  105. }
  106. const no = (data.pageNo - 1) * data.pageSize
  107. for (var i = 0; i < data.list.length; i++) {
  108. data.list[i].no = no + i + 1
  109. }
  110. _this.disabled = false
  111. resolve(data)
  112. })
  113. }
  114. }
  115. },
  116. methods: {
  117. // 返回
  118. handleBack () {
  119. this.$router.push({ path: '/salesManagement/examineVerify/list' })
  120. },
  121. // 冲减
  122. handleSubmit () {
  123. const _this = this
  124. this.$confirm({
  125. title: '提示',
  126. content: '确定要进行冲减吗?',
  127. okText: '确定',
  128. cancelText: '取消',
  129. centered: true,
  130. onOk () {
  131. // delectRolePower({
  132. // id: row.id
  133. // }).then(res => {
  134. // console.log(res, 'res1111')
  135. // if (res.status == 200) {
  136. // _this.$message.success(res.message)
  137. // _this.$refs.table.refresh()
  138. // }
  139. // })
  140. }
  141. })
  142. },
  143. // 快速打印
  144. handlePrint () {
  145. },
  146. // 打印预览
  147. handlePreview () {
  148. }
  149. }
  150. }
  151. </script>
  152. <style lang="less">
  153. .examineVerifyDetail-page-wrapper{
  154. .examineVerifyDetail-info-wrapper{
  155. margin: 15px 0;
  156. .item-cont {
  157. margin-bottom: 15px;
  158. display: flex;
  159. .item-label {
  160. width: 115px;
  161. font-size: 14px;
  162. color: rgba(0, 0, 0, 0.85);
  163. flex-shrink: 0;
  164. }
  165. .item-main {
  166. flex-grow: 1;
  167. word-break: break-all;
  168. }
  169. }
  170. }
  171. .examineVerifyDetail-table-wrapper{
  172. .red{
  173. color: #ed1c24;
  174. }
  175. }
  176. }
  177. </style>