瀏覽代碼

盘点审核

chenrui 4 年之前
父節點
當前提交
458a155b0b

+ 161 - 0
src/views/financialManagement/inventoryReview/detail.vue

@@ -0,0 +1,161 @@
+<template>
+  <div class="inventoryReviewDetail-wrap">
+    <a-page-header :ghost="false" @back="handleBack" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="inventoryReviewDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" id="inventoryReviewDetail-preview-btn">打印预览</a-button>
+        <a-button key="1" type="primary" id="inventoryReviewDetail-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 内容 -->
+    <a-page-header title="盘点单号:CG2021010100001" ></a-page-header>
+    <!-- alert -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message"><strong class="red">红色代表盘盈</strong>,<strong class="green">绿色代表盈亏</strong></div>
+    </a-alert>
+    <!-- 盈亏统计 -->
+    <a-card size="small" :bordered="false" class="inventoryReviewDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="盈亏统计">
+          <a-descriptions :column="2" bordered>
+            <a-descriptions-item label="库存数量">2</a-descriptions-item>
+            <a-descriptions-item label="库存成本">20</a-descriptions-item>
+            <a-descriptions-item label="盘盈数量">¥120.36</a-descriptions-item>
+            <a-descriptions-item label="盘盈成本">3</a-descriptions-item>
+            <a-descriptions-item label="盘亏数量">4</a-descriptions-item>
+            <a-descriptions-item label="盘亏成本">¥11.2</a-descriptions-item>
+            <a-descriptions-item>
+              <template slot="label">
+                盈亏总数量
+                <a-popover>
+                  <template slot="content">
+                    盘盈数量与盘亏数量之和
+                  </template>
+                  <a-icon type="question-circle" theme="twoTone" />
+                </a-popover>
+              </template>
+              4
+            </a-descriptions-item>
+            <a-descriptions-item>
+              <template slot="label">
+                盈亏总成本
+                <a-popover>
+                  <template slot="content">
+                    盘盈成本与盘亏成本之和
+                  </template>
+                  <a-icon type="question-circle" theme="twoTone" />
+                </a-popover>
+              </template>
+              4
+            </a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 产品明细 -->
+    <a-card size="small" :bordered="false" class="inventoryReviewDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="产品明细">
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="default"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ x: 1290 }"
+            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', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 160, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '库存数量', dataIndex: 'qtsy', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存成本', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点数量', dataIndex: 'qtssy', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点盈亏数量', dataIndex: 'qtdsy', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点盈亏成本', dataIndex: 'prifce', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? 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', 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)
+        })
+      }
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/financialManagement/inventoryReview/list' })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .inventoryReviewDetail-wrap{
+    .inventoryReviewDetail-cont{
+      margin-bottom: 15px;
+    }
+    .green{
+      color: #19be6b;
+    }
+    .red{
+      color: #ed1c24;
+    }
+  }
+</style>

+ 174 - 0
src/views/financialManagement/inventoryReview/list.vue

@@ -0,0 +1,174 @@
+<template>
+  <a-card size="small" :bordered="false" class="inventoryReviewList-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-input id="inventoryReviewList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入盘点单号"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="盘点审核时间">
+              <a-range-picker v-model="queryParam.creatDate" id="inventoryReviewList-creatDate"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="财务审核状态">
+              <v-select
+                v-model="queryParam.billStatus"
+                ref="billStatus"
+                id="inventoryReviewList-billStatus"
+                code="PAYMENT_TYPE"
+                placeholder="请选择财务审核状态"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <span class="table-page-search-submitButtons">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryReviewList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="inventoryReviewList-reset">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- alert -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">共 <strong>6</strong> 条记录,其中待审核 <strong>14</strong> 条 </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1300 }"
+      bordered>
+      <!-- 采购单号 -->
+      <template slot="purchaseNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseNo }}</span>
+      </template>
+      <!-- 采购入库单号 -->
+      <template slot="purchaseNos" slot-scope="text, record">
+        <span style="color: #ed1c24;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 size="small" type="link" @click="handleExamine(record, 1)" id="inventoryReview-adopt-btn">通过</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleExamine(record, 2)" id="inventoryReview-unadopt-btn">不通过</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="inventoryReview-detail-btn">详情</a-button>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+// import { getRoleList, getServiceList } from '@/api/manage'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      disabled: false, //  查询、重置按钮是否可操作
+      // 查询参数
+      queryParam: {},
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '盘点单号', scopedSlots: { customRender: 'purchaseBillNo' }, align: 'center' },
+        { title: '盘点产品款数', dataIndex: 'totalCategory', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存总成本', dataIndex: 'totalAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘盈总数量', dataIndex: 'totalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘亏总数量', dataIndex: 'totalssQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点审核时间', dataIndex: 'sauditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务审核状态', scopedSlots: { customRender: 'auditStatus' }, width: 120, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 190, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 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)
+        })
+      }
+    }
+  },
+  methods: {
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/financialManagement/inventoryReview/detail/${row.id}` })
+    },
+    //  审核
+    handleExamine (row, type) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '操作后不可恢复,确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
+        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()
+          //   }
+          // })
+        }
+      })
+    },
+    //  重置
+    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)
+    }
+  }
+}
+</script>
+<style lang="less">
+  .inventoryReviewList-wrap{
+    .sTable{
+      margin-top: 15px;
+    }
+  }
+</style>