lilei 4 rokov pred
rodič
commit
3c9a1eecb2

+ 12 - 1
src/config/router.config.js

@@ -73,13 +73,24 @@ export const asyncRouterMap = [{
           {
             path: 'list',
             name: 'salesQueryList',
-            component: () => import(/* webpackChunkName: "shop" */ '@/views/salesManagement/salesQuery/list.vue'),
+            component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/list.vue'),
             meta: {
               title: '销售单列表',
               icon: 'menu',
               hidden: true
               // permission: 'M_salesQuery_list'
             }
+          },
+          {
+            path: 'detail/:id',
+            name: 'salesDetail',
+            component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/salesDetail.vue'),
+            meta: {
+              title: '销售单明细',
+              icon: 'menu',
+              hidden: true
+              // permission: 'M_salesDetail'
+            }
           }
         ]
       }

+ 28 - 14
src/views/salesManagement/salesQuery/list.vue

@@ -101,7 +101,9 @@
       <!-- 操作 -->
       <span slot="action" slot-scope="text, record">
         <template>
-          <a id="alesManagementList-edit-btn" @click="handleView(record)">明细</a>
+          <a href="javascript:;" id="alesManagementList-auth-btn">审核</a>
+          <a-divider type="vertical" />
+          <a href="javascript:;" id="alesManagementList-send-btn">发货</a>
           <a-divider type="vertical" />
         </template>
         <a-dropdown>
@@ -110,16 +112,13 @@
           </a>
           <a-menu slot="overlay">
             <a-menu-item >
-              <a href="javascript:;">审核</a>
-            </a-menu-item>
-            <a-menu-item >
-              <a href="javascript:;">发货</a>
+              <a id="alesManagementList-view-btn" href="javascript:;" @click="handleView(record)">明细</a>
             </a-menu-item>
             <a-menu-item>
-              <a href="javascript:;" @click="handleEdit(record)">修改</a>
+              <a id="alesManagementList-edit-btn" href="javascript:;" @click="handleEdit(record)">修改</a>
             </a-menu-item>
             <a-menu-item>
-              <a href="javascript:;" @click="handleDel(record)">删除</a>
+              <a id="alesManagementList-del-btn" href="javascript:;" @click="handleDel(record)">删除</a>
             </a-menu-item>
           </a-menu>
         </a-dropdown>
@@ -150,57 +149,70 @@ export default {
       columns: [
         {
           title: '创建时间',
-          dataIndex: 'creatDate'
+          dataIndex: 'creatDate',
+          align: 'center'
         },
         {
           title: '销售单号',
-          dataIndex: 'salerNo'
+          dataIndex: 'salerNo',
+          align: 'center'
         },
         {
           title: '店内单号',
-          dataIndex: 'storeNo'
+          dataIndex: 'storeNo',
+          align: 'center'
         },
         {
           title: '客户名称',
           dataIndex: 'custName',
+          align: 'center'
         },
         {
           title: '总款数',
           dataIndex: 'totalP',
+          align: 'center'
         },
         {
           title: '总数量',
           dataIndex: 'totalNums',
+          align: 'center'
         },
         {
           title: '总售价',
           dataIndex: 'totalPrice',
+          align: 'center'
         },
         {
           title: '支付方式',
           dataIndex: 'payType',
+          align: 'center'
         },
         {
           title: '收款方式',
           dataIndex: 'mementPay',
+          align: 'center'
         },
         {
           title: '审核时间',
           dataIndex: 'shDate',
+          align: 'center'
         },
         {
           title: '急件',
           dataIndex: 'isJj',
+          align: 'center'
         },
         {
           title: '状态',
           dataIndex: 'status',
+          align: 'center'
         },
         {
           title: '操作',
-          width: '150px',
+          width: '200px',
           key: 'operation',
           fixed: 'right',
+          align: 'center',
           scopedSlots: { customRender: 'action' }
         }
       ],
@@ -223,7 +235,8 @@ export default {
             pageSize: 10,
             list: [
               { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ]
+            ],
+            count: 10
           }
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -236,13 +249,14 @@ export default {
     }
   },
   created () {
-    getRoleList({ t: new Date() })
   },
   methods: {
     handleEdit (record) {
       this.$emit('onEdit', record)
     },
-    handleView(){},
+    handleView(record){
+      this.$router.push({ name: 'salesDetail', params: { id: record.id }})
+    },
     handleDel(){},
     toggleAdvanced () {
       this.advanced = !this.advanced

+ 267 - 0
src/views/salesManagement/salesQuery/salesDetail.vue

@@ -0,0 +1,267 @@
+<template>
+  <div>
+    <a-affix>
+        <a-page-header
+          :ghost="false"
+          @back="() => $router.go(-1)"
+        >
+          <template slot="subTitle">
+            <a href="javascript:;" @click="() => $router.go(-1)">返回列表</a>
+            <a-button size="small" style="margin-left:50px" key="0">
+              编辑
+            </a-button>
+          </template>
+          <template slot="extra">
+            <span>打印字段:</span>
+            <a-select key="4" style="width:150px" id="sales-pritKey" placeholder="请选择打印字段" allowClear>
+              <a-select-option v-for="item in pritKey" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+            </a-select>
+            <span><i style="color: red;">*</i>打印模板:</span>
+            <a-select key="3" style="width:150px" id="sales-pritKey" placeholder="请选择打印模板" allowClear>
+              <a-select-option v-for="item in pritModal" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+            </a-select>
+            <a-button key="2">
+              打印预览
+            </a-button>
+            <a-button key="1" type="primary">
+              快速打印
+            </a-button>
+          </template>
+          <a-descriptions size="small" :column="4">
+            <a-descriptions-item label="客户名称">
+              张三的
+            </a-descriptions-item>
+            <a-descriptions-item label="客户地址">
+              山西省太原市阿斯加德法律静安寺水电费
+            </a-descriptions-item>
+            <a-descriptions-item label="支付方式">
+              货到付款
+            </a-descriptions-item>
+            <a-descriptions-item label="收款方式">
+              现金
+            </a-descriptions-item>
+            <a-descriptions-item label="联系手机">
+              13709146191
+            </a-descriptions-item>
+            <a-descriptions-item label="联系电话">
+              13709146191
+            </a-descriptions-item>
+            <a-descriptions-item label="备注">
+              备注备注备注备注备注
+            </a-descriptions-item>
+            <a-descriptions-item label="销售单号">
+              34242sdf234234
+            </a-descriptions-item>
+            <a-descriptions-item label="制单人">
+              王明
+            </a-descriptions-item>
+            <a-descriptions-item label="业务员">
+              李四
+            </a-descriptions-item>
+            <a-descriptions-item label="审核状态">
+              未审核
+            </a-descriptions-item>
+            <a-descriptions-item label="完结状态">
+              未完结
+            </a-descriptions-item>
+          </a-descriptions>
+        </a-page-header>
+    </a-affix>
+    
+    <a-card :bordered="false" class="pages-wrap">
+      <!-- alert -->
+      <a-alert type="info">
+        <div slot="message">
+          <span>总款数:1;</span>
+          <span>总数量:6;</span>
+          <span>总赠品数量:3;</span>
+          <span>急件总款数:7;</span>
+          <span>急件总数量:12;</span>
+          <span>总售价:11;</span>
+          <span>总成本:8;</span>
+          <span>总毛利:10;</span>
+          <span>折后总售价:11;</span>
+          <span>折扣:0.00%;</span>
+          <span>折扣金额:0.00;</span>
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1500, y: 300 }"
+        bordered>
+        <!-- 状态 -->
+        <template slot="state" slot-scope="text, record">
+          <span>{{record.state == 1 ? '已启用' : '已禁用'}}</span>
+        </template>
+      </s-table>
+    </a-card>
+  </div>
+</template>
+
+<script>
+  import { STable, VSelect } from '@/components'
+  export default{
+    name: 'salesDetail',
+    components: {
+      STable,
+      VSelect
+    },
+    data(){
+      return {
+        disabled: false,
+        pritKey:[
+          {
+            id: 0,
+            name:'打印促销'
+          },
+          {
+            id: 1,
+            name:'打印支付方式'
+          },
+          {
+            id: 2,
+            name:'打印收款方式'
+          }
+        ],
+        pritModal:[
+          {
+            id: 0,
+            name:'普通模板一'
+          },
+          {
+            id: 1,
+            name:'普通模板二'
+          },
+          {
+            id: 2,
+            name:'仓库模板一'
+          }
+        ],
+        // 表头
+        columns: [
+          {
+            title: '序号',
+            dataIndex: 'no',
+            align: 'center',
+            width: 100
+          },
+          {
+            title: '产品编码',
+            dataIndex: 'salerNo',
+            align: 'center'
+          },
+          {
+            title: '产品名称',
+            dataIndex: 'storeNo',
+            align: 'center'
+          },
+          {
+            title: '原厂编码',
+            dataIndex: 'custName',
+            align: 'center'
+          },
+          {
+            title: '成本价',
+            dataIndex: 'totalP',
+            align: 'center'
+          },
+          {
+            title: '售价',
+            dataIndex: 'totalNums',
+            align: 'center'
+          },
+          {
+            title: '折后售价',
+            dataIndex: 'totalPrice',
+            align: 'center'
+          },
+          {
+            title: '销售数量',
+            dataIndex: 'payType',
+            align: 'center'
+          },
+          {
+            title: '单位',
+            dataIndex: 'mementPay',
+            align: 'center'
+          },
+          {
+            title: '辅助数量',
+            dataIndex: 'shDate',
+            align: 'center'
+          },
+          {
+            title: '售价小计',
+            dataIndex: 'isJj',
+            align: 'center'
+          },
+          {
+            title: '折后小计',
+            dataIndex: 'status',
+            align: 'center'
+          },
+          {
+            title: '仓库',
+            dataIndex: 'status',
+            align: 'center'
+          },
+          {
+            title: '仓位',
+            dataIndex: 'status',
+            align: 'center'
+          },
+          {
+            title: '销售类型',
+            dataIndex: 'status',
+            align: 'center'
+          },
+        ],
+        // 加载数据方法 必须为 Promise 对象
+        loadData: parameter => {
+          this.disabled = true
+          // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
+          //   const data = res.data
+          //   const no = (data.pageNo - 1) * data.pageSize
+          //   for (var i = 0; i < data.list.length; i++) {
+          //     data.list[i].no = no + i + 1
+          //   }
+          //   this.disabled = false
+          //   return data
+          // })
+          const _this = this
+          return new Promise(function(resolve, reject){
+            const data = {
+              pageNo: 1,
+              pageSize: 10,
+              list: [
+                { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+              ],
+              count: 10
+            }
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            _this.disabled = false
+            resolve(data)
+          })
+        },
+      }
+    }
+  }
+</script>
+
+<style lang="less">
+  .pages-wrap{
+    margin-top: 15px;
+    .sTable{
+      margin-top: 15px;
+    }
+  }
+</style>