chenrui 4 年 前
コミット
1089e1dc9c

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

@@ -303,10 +303,92 @@ export const asyncRouterMap = [{
             }
           }
         ]
-      },
+      }
     ]
   },
   // 采购管理
+  {
+    path: '/purchasingManagement',
+    redirect: '/purchasingManagement/purchaseOrder',
+    component: PageView,
+    meta: {
+      title: '采购管理',
+      icon: 'shop'
+      // permission: 'M_shop'
+    },
+    children: [
+      {
+        path: '/purchasingManagement/purchaseOrder',
+        redirect: '/purchasingManagement/purchaseOrder/list',
+        name: 'purchaseOrder',
+        component: RouteView,
+        meta: {
+          title: '采购单管理',
+          icon: 'shopping'
+          // permission: 'M_goodsManage_list'
+        },
+        hideChildrenInMenu: true,
+        children: [
+          {
+            path: '/purchasingManagement/purchaseOrder/list',
+            name: 'purchaseOrderList',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/list.vue'),
+            meta: {
+              title: '采购单列表',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'M_goodsManage_list'
+            }
+          },
+          {
+            path: '/purchasingManagement/purchaseOrder/add',
+            name: 'purchaseOrderAdd',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
+            meta: {
+              title: '新增采购单',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'B_goodsManage_edit'
+            }
+          },
+          {
+            path: '/purchasingManagement/purchaseOrder/edit/:id',
+            name: 'purchaseOrderEdit',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
+            meta: {
+              title: '编辑采购单',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'B_goodsManage_edit'
+            }
+          },
+          {
+            path: '/purchasingManagement/purchaseOrder/detail/:id',
+            name: 'purchaseOrderDetail',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/detail.vue'),
+            meta: {
+              title: '采购单详情',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'B_goodsManage_edit'
+            }
+          },
+          {
+            path: '/purchasingManagement/purchaseOrder/warehousing/:id',
+            name: 'purchaseOrderWarehousing',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/warehousing.vue'),
+            meta: {
+              title: '入库',
+              icon: 'shopping',
+              hidden: true
+              // permission: 'B_goodsManage_edit'
+            }
+          }
+        ]
+      }
+
+    ]
+  },
   // 散件管理
   // 产品管理
   {

+ 125 - 0
src/views/purchasingManagement/purchaseOrder/detail.vue

@@ -0,0 +1,125 @@
+<template>
+  <div class="purchaseOrderDetail-wrap">
+    <a-page-header :ghost="false" @back="() => $router.go(-1)" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="purchaseOrderDetail-back-btn" href="javascript:;" @click="() => $router.go(-1)">返回列表</a>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" id="purchaseOrderDetail-preview-btn">打印预览</a-button>
+        <a-button key="1" type="primary" id="purchaseOrderDetail-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 内容 -->
+    <a-page-header title="单号:CG2021010100001" >
+      <template slot="tags">
+        <a-tag color="blue">审核通过</a-tag>
+        <a-tag color="orange">未结算</a-tag>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card :bordered="false" class="purchaseOrderDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions column="3">
+            <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="收货地址">箭冠营销中心</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 产品详情 -->
+    <a-card :bordered="false" class="purchaseOrderDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="产品详情">
+          <!-- 总计 -->
+          <a-alert type="info" showIcon style="margin-bottom:15px">
+            <div slot="message">产品款数 <strong>6</strong> ,采购数量合计 <strong>6</strong> ,采购金额合计¥<strong>6.33</strong></div>
+          </a-alert>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="default"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            bordered>
+            <!-- 采购数量 -->
+            <template slot="purchaseNum" slot-scope="text, record">
+              <span>{{record.purchaseNum}}</span>
+            </template>
+            <!-- 缺货数量 -->
+            <template slot="outOfStockNum" slot-scope="text, record">
+              <span>{{record.outOfStockNum}}</span>
+            </template>
+          </s-table>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    
+  </div>
+</template>
+
+<script>
+  import { STable, VSelect } from '@/components'
+  export default{
+    components: { STable, VSelect },
+    data(){
+      return{
+        // 表头
+        columns: [
+          { title: '序号', dataIndex: 'no', align: 'center' },
+          { title: '产品编码', dataIndex: 'creatDate', align: 'center' },
+          { title: '产品名称', dataIndex: 'custName', align: 'center' },
+          { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
+          { title: '采购单价', dataIndex: 'totalNums', align: 'center' },
+          { title: '采购数量', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
+          { title: '缺货数量', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
+          { title: '单位', dataIndex: 'mementPay', align: 'center' },
+          { title: '采购金额', dataIndex: 'shDate', 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', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '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">
+  .purchaseOrderDetail-cont{
+    margin-top: 15px;
+  }
+</style>

+ 8 - 0
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 229 - 0
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -0,0 +1,229 @@
+<template>
+  <a-card :bordered="false" class="salesManagementList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="创建时间">
+              <a-range-picker v-model="queryParam.creatDate" id="purchasingManagementList-creatDate"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="采购单号">
+              <a-input id="purchasingManagementList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入采购单号"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+            	<a-select id="purchasingManagementList-customeName" placeholder="请选择供应商" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
+            		<a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
+            	</a-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单据状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="purchasingManagementList-billStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择单据状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="结算状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="purchasingManagementList-billStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择结算状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <span class="table-page-search-submitButtons">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchasingManagementList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="purchasingManagementList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮 -->
+    <div class="table-operator">
+      <a-button id="purchasingManagementList-add" type="primary" @click="handleAdd()">新增采购单(箭冠)</a-button>
+    </div>
+    <!-- alert -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">共 <strong>6</strong> 条记录,采购数量合计 <strong>14</strong> ,采购金额合计¥<strong>14.00</strong> </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 采购单号 -->
+      <template slot="purchaseNo" slot-scope="text, record">
+        <span style="color: #ff0000;cursor: pointer;">{{record.purchaseNo}}</span>
+      </template>
+      <!-- 状态 -->
+      <template slot="state" slot-scope="text, record">
+        <span>{{record.state == 1 ? '已启用' : '已禁用'}}</span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button type="primary" @click="handleEdit(record)" id="inventoryQueryList-edit-btn">编辑</a-button>
+        <a-button type="dashed" @click="handleDetail(record)" id="inventoryQueryList-detail-btn" style="margin: 0 0 8px 8px">详情</a-button>
+        <a-button @click="handleSubmit(record)" id="inventoryQueryList-submit-btn" style="margin: 0 0 8px 8px">提交</a-button>
+        <a-button type="primary" @click="handleWarehouse(record)" id="inventoryQueryList-warehouse-btn" style="margin: 0 0 8px 8px">签收入库</a-button>
+        <a-button type="danger" @click="handleDel(record)" id="inventoryQueryList-del-btn" style="margin: 0 0 0 8px">删除</a-button>
+      </template>
+    </s-table>
+    <!-- 选择客户弹框 -->
+    <!-- <chooseCustom :openModal="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></chooseCustom> -->
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+// import chooseCustom from './chooseCustom.vue'
+// import { getRoleList, getServiceList } from '@/api/manage'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      // 高级搜索 展开/关闭
+      advanced: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      openModal: false, // 选择客户弹框是否显示
+      customeList:[],
+      // 查询参数
+      queryParam: {},
+      // 表头
+      columns: [
+        { title: '采购单号', scopedSlots: { customRender: 'purchaseNo' }, align: 'center' },
+        { title: '创建时间', dataIndex: 'creatDate', 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: '操作', scopedSlots: { customRender: 'action' }, width: 270, 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', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '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)
+        })
+      },
+    }
+  },
+  created () {
+  },
+  methods: {
+    // 选择客户成功
+    chooseCustomOk(data){
+      this.$router.push({ name: 'salesNew' })
+    },
+    //  编辑
+    handleEdit (row) {
+      this.$router.push({ path: `/purchasingManagement/purchaseOrder/edit/${row.id}`})
+    },
+    //  详情
+    handleDetail(row){
+      this.$router.push({ path: `/purchasingManagement/purchaseOrder/detail/${row.id}`})
+    },
+    //  提交
+    handleSubmit(){
+      
+    },
+    //  签收入库
+    handleWarehouse(row){
+      
+    },
+    //  删除
+    handleDel(row){
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '删除后不可恢复,确定要进行删除吗?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    filterOption(input, option) {
+    	return (
+    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    	)
+    },
+  }
+}
+</script>
+<style lang="less">
+  .salesManagementList-wrap{
+    .sTable{
+      margin-top: 15px;
+    }
+  }
+</style>

+ 8 - 0
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>