Kaynağa Gözat

备货审核

chenrui 4 yıl önce
ebeveyn
işleme
119993e205

+ 36 - 0
src/config/router.config.js

@@ -341,6 +341,42 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/salesManagement/examineVerify',
+            redirect: '/salesManagement/examineVerify/list',
+            name: 'examineVerify',
+            component: RouteView,
+            meta: {
+              title: '备货审核',
+              icon: 'export'
+              // permission: 'M_outboundOrder'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'examineVerifyList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/list.vue'),
+                meta: {
+                  title: '备货审核列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_outboundOrder_list'
+                }
+              },
+              {
+                path: 'detail/:id',
+                name: 'examineVerifyDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/examineVerify/detail.vue'),
+                meta: {
+                  title: '备货审核详情',
+                  icon: 'file-done',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          },
           {
             path: '/salesManagement/giftRecord',
             redirect: '/salesManagement/giftRecord/list',

+ 180 - 0
src/views/salesManagement/examineVerify/detail.vue

@@ -0,0 +1,180 @@
+<template>
+  <div class="examineVerifyDetail-page-wrapper">
+    <!-- 操作 -->
+    <a-page-header :ghost="false" @back="handleBack" class="examineVerifyDetail-operation-wrapper">
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="examineVerifyDetail-btn-back" href="javascript:;" @click="handleBack">返回列表</a>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" @click="handlePreview" id="examineVerifyDetail-btn-preview">打印预览</a-button>
+        <a-button key="1" type="primary" @click="handlePrint" id="examineVerifyDetail-btn-print">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 急件单信息 -->
+    <a-card :bordered="false" class="examineVerifyDetail-info-wrapper">
+      <a-descriptions :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="联系手机">名称思密达</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-item label="业务员">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="审核状态">名称思密达</a-descriptions-item>
+        <a-descriptions-item label="完结状态">名称思密达</a-descriptions-item>
+      </a-descriptions>
+    </a-card>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总款数:<strong>998</strong>;总数量:<strong>2009</strong>;总数量:<strong>2009</strong>;急件总款数:<strong>2009</strong>;急件总数量:<strong>2009</strong>。</div>
+      <div class="ftext" slot="message">总售价:<strong>998</strong>;总成本:<strong>2009</strong>;总毛利:<strong>2009</strong>;折后总售价:<strong>2009</strong>;折扣:<strong>2009%</strong>;折扣金额:<strong>2009</strong>。</div>
+    </a-alert>
+    <!-- 表格 -->
+    <a-card :bordered="false" class="examineVerifyDetail-table-wrapper">
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        bordered>
+        <!-- 库存数量 -->
+        <template slot="inventoryQuantity" slot-scope="text, record">
+          <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{record.inventoryQuantity}}</span>
+        </template>
+      </s-table>
+    </a-card>
+  </div>
+  
+</template>
+
+<script>
+  import { STable, VSelect } from '@/components'
+  export default {
+    components: { STable, VSelect },
+    data () {
+      return {
+        columns: [
+          { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+          { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+          { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+          { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '成本价', dataIndex: 'productsBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '售价', dataIndex: 'productssBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '折后售价', dataIndex: 'prodsuctssBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '销售数量', dataIndex: 'inventoryNum', width: 180, align: 'center', ellipsis: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '售价小计', dataIndex: 'inventoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '折后小计', dataIndex: 'invesntoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '折扣金额', dataIndex: 'indventoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '仓库', dataIndex: 'productBrawnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '仓位', dataIndex: 'productBradnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '销售类型', dataIndex: 'product2Brand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        ],
+        // 加载数据方法 必须为 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', inventoryQuantity: 0, quantityNotOffset: 3, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+              ]
+            }
+            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)
+          })
+        },
+      }
+    },
+    methods: {
+      //  返回
+      handleBack(){
+        this.$router.push({ path: '/salesManagement/examineVerify/list' })
+      },
+      //  冲减
+      handleSubmit(){
+        const _this = this
+        this.$confirm({
+          title: '提示',
+          content: '确定要进行冲减吗?',
+          okText: '确定',
+          cancelText: '取消',
+		  centered: true,
+          onOk () {
+            // delectRolePower({
+            //   id: row.id
+            // }).then(res => {
+            //   console.log(res, 'res1111')
+            //   if (res.status == 200) {
+            //     _this.$message.success(res.message)
+            //     _this.$refs.table.refresh()
+            //   }
+            // })
+          }
+        })
+      },
+      //  快速打印
+      handlePrint(){
+        
+      },
+      //  打印预览
+      handlePreview(){
+        
+      },
+    }
+  }
+</script>
+
+<style lang="less">
+  .examineVerifyDetail-page-wrapper{
+    .examineVerifyDetail-info-wrapper{
+      margin: 15px 0;
+      .item-cont {
+      	margin-bottom: 15px;
+      	display: flex;
+      	.item-label {
+      		width: 115px;
+      		font-size: 14px;
+      		color: rgba(0, 0, 0, 0.85);
+      		flex-shrink: 0;
+      	}
+      	.item-main {
+      		flex-grow: 1;
+          word-break: break-all;
+      	}
+      }
+    }
+    .examineVerifyDetail-table-wrapper{
+      .sTable{
+        table{
+          width: auto;
+        }
+      }
+      .red{
+        color: #ed1c24;
+      }
+    }
+  }
+</style>

+ 232 - 0
src/views/salesManagement/examineVerify/list.vue

@@ -0,0 +1,232 @@
+<template>
+  <a-card :bordered="false" class="examineVerifyList-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
+                  style="width:100%"
+                  id="examineVerifyList-bundleNamesss"
+                  :disabledDate="disabledDate"
+                  v-model="queryParam.brand"
+                  :format="dateFormat"
+                  :placeholder="['开始时间', '结束时间']" />
+              </a-form-item>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="客户名称">
+            	<a-select placeholder="请选择" allowClear v-model="queryParam.name" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
+            		<a-select-option v-for="item in custData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+            	</a-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="examineVerifyList-billStatus"
+                code="PAYMENT_TYPE"
+                placeholder="请选择出库类型"
+                allowClear></v-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="examineVerifyList-billStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择单据状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="examineVerifyList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="examineVerifyList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <div style="margin-bottom: 15px">
+      <a-button type="primary" id="examineVerifyList-export" :disabled="!hasSelected" :loading="loading" @click="handleBatchAudit">
+        批量审核
+      </a-button>
+      <span style="margin-left: 8px">
+        <template v-if="hasSelected">
+          {{ `已选 ${selectedRowKeys.length} 项` }}
+        </template>
+      </span>
+    </div>
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :showPagination="false"
+      bordered>
+      <!-- 状态 -->
+      <template slot="status" slot-scope="text, record">
+        <span :class="record.status==1?'green':'red'"> {{ record.status==1? '待入库': '待审核' }} </span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button type="primary" size="small" @click="handleExamine(record)" id="examineVerifyList-examine-btn" style="margin: 0 0 10px 8px;">备货审核</a-button>
+        <a-button size="small" @click="handleDetail(record)" id="examineVerifyList-detail-btn" style="margin: 0 0 0 8px;">详情</a-button>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        bundleName: '', //  品牌名称
+        state: undefined, //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '创建时间', dataIndex: 'nso', width: 70, align: 'center' },
+        { title: '关联单号', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '出库类型', dataIndex: 'productOldNum', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'inventoryMoney', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'inventsoryMoney', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'inventoryModney', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'inventoryaMoney', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'inventoryMongey', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核状态', scopedSlots: { customRender: 'status' }, width: 180, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
+      ],
+      selectedRowKeys: [], // Check here to configure the default column
+      loading: false,
+      // 加载数据方法 必须为 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' }
+            ]
+          }
+          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)
+        })
+      },
+      custData: [],  //  客户 下拉数据
+    }
+  },
+  computed: {
+    hasSelected () {
+      return this.selectedRowKeys.length > 0
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    filterOption(input, option) {
+    	return (
+    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    	)
+    },
+    //  重置
+    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)
+    },
+    //  批量审核
+    handleExamine () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要审核通过吗?',
+        okText: '确定',
+        cancelText: '取消',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/examineVerify/detail/${row.id}` })
+    },
+    // 批量审核
+    handleBatchAudit () {
+      this.loading = true
+      // ajax request after empty completing
+      setTimeout(() => {
+        this.loading = false
+        this.selectedRowKeys = []
+      }, 1000)
+    },
+    onSelectChange (selectedRowKeys) {
+      console.log('selectedRowKeys changed: ', selectedRowKeys)
+      this.selectedRowKeys = selectedRowKeys
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .examineVerifyList-wrap{
+    .sTable{
+      table{
+        width: auto;
+      }
+    }
+  }
+</style>