Browse Source

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into deploy

lilei 4 years ago
parent
commit
f5cff132be

+ 47 - 0
src/api/settle.js

@@ -0,0 +1,47 @@
+import { axios } from '@/utils/request'
+
+//  单位收付款 列表  分页
+export const settleUnitClientList = (params) => {
+  const url = `/settle/unit/queryClientUnSettlePage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款记录 列表 结算记录 分页
+export const settleUnitList = (params) => {
+  const url = `/settle/unit/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款 全部单据
+export const settleInfoAllList = (params) => {
+  return axios({
+    url: '/settle/info/queryList',
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调入 详情 合计
+// export const allocLinkagePutDetailCount = (params) => {
+//   return axios({
+//     url: '/allocLinkagePut/detail/queryCount',
+//     data: params,
+//     method: 'post'
+//   })
+// }
+//  单位收付款 详情
+export const settleUnitDetail = (params) => {
+  return axios({
+    url: `/settle/unit/findById/${params.sn}`,
+    method: 'get'
+  })
+}

+ 2 - 2
src/api/stockOut.js

@@ -12,9 +12,9 @@ export const stockOutList = (params) => {
   })
 }
 //  出库 出库
-export const stockOutOut = (params) => {
+export const stockOutBizInfo = (params) => {
   return axios({
-    url: '/stockOut/out',
+    url: '/stockOut/findByBizInfo',
     data: params,
     method: 'post'
   })

+ 21 - 0
src/api/stockPut.js

@@ -0,0 +1,21 @@
+import { axios } from '@/utils/request'
+
+//  入库 列表  有分页
+export const stockPutList = (params) => {
+  const url = `/stockPut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 根据业务信息查询入库单
+export const stockPutOut = (params) => {
+  return axios({
+    url: '/stockPut/out',
+    data: params,
+    method: 'post'
+  })
+}

+ 4 - 15
src/config/router.config.js

@@ -1451,9 +1451,9 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'receipt/:id',
-                name: 'companyReceivablePayableReceipt',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/receipt.vue'),
+                path: 'collectionPayment/:id',
+                name: 'companyReceivablePayableCollectionPayment',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/collectionPayment.vue'),
                 meta: {
                   title: '单位收款单',
                   icon: 'transaction',
@@ -1461,17 +1461,6 @@ export const asyncRouterMap = [
                   // permission: 'B_goodsManage_edit'
                 }
               },
-              {
-                path: 'paymentSlip/:id',
-                name: 'companyReceivablePayablePaymentSlip',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/paymentSlip.vue'),
-                meta: {
-                  title: '单位付款单',
-                  icon: 'transaction',
-                  hidden: true
-                  // permission: 'B_goodsManage_edit'
-                }
-              },
               {
                 path: 'detail/:id',
                 name: 'companyReceivablePayableDetail',
@@ -1520,7 +1509,7 @@ export const asyncRouterMap = [
                 }
               }
             ]
-          },
+          }
           // {
           //   path: '/financialManagement/withdrawalManagement',
           //   redirect: '/financialManagement/withdrawalManagement/list',

+ 10 - 0
src/libs/getDate.js

@@ -75,5 +75,15 @@ export default {
     obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD')
     obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD')
     return obj
+  },
+  // 获取近三个月的开始结束时间
+  getLastThreeMonthDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().month(moment().month() - 2).startOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
   }
 }

+ 1 - 2
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -205,8 +205,7 @@ export default {
         productTotalCost: '',
         productTotalQty: ''
       },
-      dataTotalCount: '', //  列表数据总条数
-      itemId: '' //  当前id
+      dataTotalCount: '' //  列表数据总条数
     }
   },
   methods: {

+ 176 - 0
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -0,0 +1,176 @@
+<template>
+  <a-modal
+    centered
+    class="chooseBillModal-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="全部单据"
+    v-model="isShow"
+    @cancle="isShow=false"
+    width="80%">
+    <!-- 搜索条件 -->
+    <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="chooseBillModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="单据类型">
+              <v-select
+                v-model="queryParam.bizType"
+                ref="bizType"
+                id="chooseBillModal-bizType"
+                code="PUT_STOCK_TYPE"
+                placeholder="请选择单据类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="审核时间">
+              <a-range-picker
+                style="width:100%"
+                id="chooseBillModal-auditTime"
+                :disabledDate="disabledDate"
+                v-model="auditTime"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseBillModal-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="chooseBillModal-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :showPagination="false"
+      :scroll="{ y: 500 }"
+      bordered>
+    </s-table>
+    <div class="btn-cont">
+      <a-button type="primary" id="chooseBillModal-modal-save" @click="handleSave">确定</a-button>
+      <a-button id="chooseBillModal-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+import { settleInfoAllList } from '@/api/settle'
+export default {
+  name: 'ChooseBillModal',
+  components: { STable, VSelect },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    nowChoose: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      disabled: false,
+      auditTime: [], //  审核时间
+      dateFormat: 'YYYY-MM-DD',
+      queryParam: {
+        bizNo: '',
+        bizType: undefined
+      },
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '单据号', dataIndex: 'bizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额', dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '余额', dataIndex: 'unsettleAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // 创建时间
+        if (this.auditTime && this.auditTime.length > 0) {
+          this.queryParam.auditBeginDate = moment(this.auditTime[0]).format(this.dateFormat) + '00:00:00'
+          this.queryParam.auditEndDate = moment(this.auditTime[1]).format(this.dateFormat) + '23:59:59'
+        } else {
+          this.queryParam.auditBeginDate = undefined
+          this.queryParam.auditEndDate = undefined
+        }
+        return settleInfoAllList(this.queryParam).then(res => {
+          const data = res.data
+          for (var i = 0; i < data.length; i++) {
+            data[i].no = i + 1
+          }
+          this.disabled = false
+          return data
+        })
+      },
+      selectedRowKeys: [],
+      selectedRows: []
+    }
+  },
+  computed: {
+    hasSelected () {
+      return this.selectedRowKeys.length > 0
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 确定
+    handleSave () {
+      this.$emit('ok', this.selectedRows)
+      this.isShow = false
+    },
+    // 重置
+    resetSearchForm () {},
+    onSelectChange (selectedRowKeys, selectedRows) {
+      console.log('selectedRowKeys changed: ', selectedRowKeys, selectedRows)
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .chooseBillModal-modal{
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 214 - 0
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -0,0 +1,214 @@
+<template>
+  <div class="collectionPayment-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="collectionPayment-cont" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="collectionPayment-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <span style="margin: 0 15px;color: #666;">客户:敬爱的国家首都</span>
+      </template>
+    </a-page-header>
+    <!-- 已选单据 -->
+    <a-card size="small" :bordered="false" class="collectionPayment-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1">
+          <template slot="header">
+            已选单据
+            <a-button type="primary" size="small" class="button-error" id="collectionPayment-circle-btn" @click.stop="handleChoose">选择单据</a-button>
+          </template>
+          <!-- 总计 -->
+          <a-alert type="info" showIcon style="margin-bottom:15px">
+            <div slot="message">总款数 <strong></strong> ,总数量 <strong></strong> ,总成本¥<strong></strong></div>
+          </a-alert>
+          <!-- 列表 -->
+          <a-table
+            class="sTable"
+            ref="chooseTable"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="chooseColumns"
+            :dataSource="chooseLoadData"
+            :scroll="{ x: 1040, y: 300 }"
+            :pagination="false"
+            bordered>
+            <!-- 本次结算金额 -->
+            <template slot="settleAmount" slot-scope="text, record">
+              <a-input-number
+                id="collectionPayment-settleAmount"
+                v-model="record.settleAmount"
+                :precision="2"
+                :min="0"
+                :max="record.unsettleAmount"
+                placeholder="请输入"
+                @blur="e => settleAmountBlur(e.target.value, record)"
+                style="width: 100%;" />
+            </template>
+            <!-- 操作 -->
+            <template slot="action" slot-scope="text, record">
+              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="collectionPayment-del-btn">移除</a-button>
+            </template>
+          </a-table>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-card size="small" :bordered="false" class="collectionPayment-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="收付款信息">
+          <a-form-model
+            id="collectionPayment-form"
+            ref="ruleForm"
+            :model="form"
+            :rules="rules"
+            :label-col="formItemLayout.labelCol"
+            :wrapper-col="formItemLayout.wrapperCol">
+            <a-row :gutter="20">
+              <a-col span="12">
+                <a-form-model-item label="应结算金额" prop="supplierName">
+                  <a-input-number
+                    id="collectionPayment-outQty"
+                    v-model="form.outQty"
+                    readonly
+                    :precision="2"
+                    placeholder="请输入"
+                    style="width: 100%;" />
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="折让金额" prop="supplierName">
+                  <a-input-number
+                    id="collectionPayment-outQty"
+                    v-model="form.outQty"
+                    :precision="2"
+                    placeholder="请输入"
+                    style="width: 100%;"
+                    allowClear />
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="实结算金额" prop="supplierName">
+                  <a-input-number
+                    id="collectionPayment-outQty"
+                    v-model="form.outQty"
+                    readonly
+                    :precision="2"
+                    placeholder="请输入"
+                    style="width: 100%;" />
+                </a-form-model-item>
+              </a-col>
+              <a-col span="12">
+                <a-form-model-item label="结算方式" prop="supplierName">
+                  <a-select id="collectionPayment-countySn" v-model="form.countySn" placeholder="请选择结算方式" allowClear>
+                    <a-select-option v-for="item in settleStyleList" :value="item.id" :key="item.id">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col span="24">
+                <a-form-model-item label="备注" prop="supplierName" :label-col="{ span: 3 }" :wrapper-col="{ span: 20 }">
+                  <a-textarea id="collectionPayment-remark" :maxLength="100" v-model="form.remark" placeholder="请输入备注(最多100个字符)" allowClear />
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+          </a-form-model>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-affix :offset-bottom="0">
+      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+        <a-button
+          type="primary"
+          id="collectionPayment-submit"
+          size="large"
+          class="button-primary"
+          @click="handleSubmit"
+          style="padding: 0 60px;">提交</a-button>
+      </div>
+    </a-affix>
+    <choose-bill-modal :openModal="openModal" :nowChoose="chooseLoadData" @ok="handleOk" @close="openModal=false" />
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import chooseBillModal from './chooseBillModal.vue'
+import { settleStyleQueryAll } from '@/api/settleStyle'
+export default {
+  components: { STable, VSelect, chooseBillModal },
+  data () {
+    return {
+      chooseQueryParam: {
+        productCode: '',
+        productName: ''
+      },
+      // 表头
+      chooseColumns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '单据号', dataIndex: 'bizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额', dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '余额', dataIndex: 'unsettleAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次结算金额', dataIndex: 'settleAmount', width: 140, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+      ],
+      chooseLoadData: [],
+      choosePageNo: 1, //  分页页码
+      choosePageSize: 10, //  分页 每页多少条
+      productTotal: null, //  合计
+      settleStyleList: [], //  结算方式
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 16 }
+      },
+      form: {},
+      rules: {
+        supplierName: [
+          { required: true, message: '请输入供应商名称', trigger: 'blur' }
+        ]
+      },
+      openModal: false //  弹框
+
+    }
+  },
+  methods: {
+    // 选择单据
+    handleChoose () {
+      this.openModal = true
+    },
+    // 本次结算金额  blur
+    settleAmountBlur (val, record) {
+      console.log(val, record)
+    },
+    // 提交
+    handleSubmit () {
+
+    },
+    handleOk (selectedRows) {
+      this.chooseLoadData = selectedRows
+    },
+    //  结算方式
+    getSettleStyle () {
+      settleStyleQueryAll({}).then(res => {
+        if (res.status == 200) {
+          this.settleStyleList = res.data
+        } else {
+          this.settleStyleList = []
+        }
+      })
+    },
+    // 返回列表
+    handleBack () {
+      this.$router.push({ path: `/financialManagement/companyReceivablePayable/list` })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getSettleStyle()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .collectionPayment-cont{
+    margin-bottom: 15px;
+  }
+</style>

+ 12 - 33
src/views/financialManagement/companyReceivablePayable/list.vue

@@ -15,7 +15,7 @@
                 v-model="queryParam.billStatus"
                 ref="billStatus"
                 id="companyReceivablePayableList-billStatus"
-                code="PAYMENT_TYPE"
+                code="SETTLE_CLIENT_TYPE"
                 placeholder="请选择单位类型"
                 allowClear></v-select>
             </a-form-item>
@@ -44,9 +44,8 @@
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" class="button-info" @click="handleCollection(record)" id="companyReceivablePayableList-collection-btn">收款</a-button>
-        <a-button size="small" type="primary" class="button-warning" @click="handlePayment(record)" id="companyReceivablePayableList-payment-btn">付款</a-button>
-        <a-button size="small" type="primary" class="button-success" @click="handleDetail(record)" id="companyReceivablePayableList-detail-btn">详情</a-button>
+        <a-button size="small" type="link" class="button-info" @click="handleCollectionPayment(record)" id="companyReceivablePayableList-collectionPayment-btn">收付款</a-button>
+        <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="companyReceivablePayableList-detail-btn">详情</a-button>
       </template>
     </s-table>
   </a-card>
@@ -54,7 +53,8 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-// import { getRoleList, getServiceList } from '@/api/manage'
+import { settleUnitList } from '@/api/settle'
+import { settleStyleQueryAll } from '@/api/settleStyle'
 export default {
   components: { STable, VSelect },
   data () {
@@ -74,31 +74,14 @@ export default {
       // 加载数据方法 必须为 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
-          }
+        return settleUnitList( 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
-          resolve(data)
+          this.disabled = false
+          return data
         })
       }
     }
@@ -108,13 +91,9 @@ export default {
     handleDetail (row) {
       this.$router.push({ path: `/financialManagement/companyReceivablePayable/detail/${row.id}` })
     },
-    //  收款
-    handleCollection (row) {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayable/receipt/${row.id}` })
-    },
-    //  付款
-    handlePayment (row) {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayable/paymentSlip/${row.id}` })
+    //  收付款
+    handleCollectionPayment (row) {
+      this.$router.push({ path: `/financialManagement/companyReceivablePayable/collectionPayment/${row.id}` })
     },
     //  重置
     resetSearchForm () {

+ 47 - 39
src/views/financialManagement/warehousingAudit/list.vue

@@ -16,7 +16,13 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="入库时间">
-              <a-range-picker v-model="queryParam.creatDate" id="warehousingAuditList-creatDate"/>
+              <a-range-picker
+                style="width:100%"
+                id="warehousingAuditList-creatDate"
+                :disabledDate="disabledDate"
+                v-model="createDate"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
           </a-col>
           <template v-if="advanced">
@@ -57,7 +63,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1290 }"
+      :scroll="{ x: 1460 }"
       bordered>
       <!-- 采购单号 -->
       <template slot="purchaseBillNo" slot-scope="text, record">
@@ -67,77 +73,79 @@
       <template slot="purchaseNos" slot-scope="text, record">
         <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseNo }}</span>
       </template>
-      <!-- 状态 -->
-      <template slot="auditStatus" slot-scope="text, record">
-        <a-tag :color="record.auditStatus=='FINISH'?'green':'red'" >{{ record.auditStatus=='FINISH'? '待备货审核': '待单据审核' }}</a-tag>
-      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" class="button-info" @click="handleExamine(record, 1)" id="warehousingAudit-adopt-btn">通过</a-button>
-        <a-button size="small" type="primary" class="button-warning" @click="handleExamine(record, 2)" id="warehousingAudit-unadopt-btn">不通过</a-button>
-        <a-button size="small" type="primary" class="button-success" @click="handleDetail(record)" id="warehousingAudit-detail-btn">详情</a-button>
+        <a-button size="small" type="link" class="button-info" @click="handleExamine(record, 1)" id="warehousingAudit-adopt-btn">通过</a-button>
+        <a-button size="small" type="link" class="button-warning" @click="handleExamine(record, 2)" id="warehousingAudit-unadopt-btn">不通过</a-button>
+        <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="warehousingAudit-detail-btn">详情</a-button>
       </template>
     </s-table>
   </a-card>
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
-// import { getRoleList, getServiceList } from '@/api/manage'
+import getDate from '@/libs/getDate'
+import { stockPutList } from '@/api/stockPut'
 export default {
   components: { STable, VSelect },
   data () {
     return {
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
+      createDate: [
+        moment(getDate.getLastThreeMonthDays().starttime, this.dateFormat),
+        moment(getDate.getLastThreeMonthDays().endtime, this.dateFormat)
+      ], //  创建时间
+      dateFormat: 'YYYY-MM-DD',
+      tableHeight: 0,
       // 查询参数
       queryParam: {},
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, align: 'center' },
-        { title: '采购入库单号', scopedSlots: { customRender: 'purchaseNos' }, align: 'center' },
-        { title: '总款数', dataIndex: 'totalCategory', width: 100, 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: 'totalAmount', 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: 'putBizNo', align: 'center' },
+        { title: '采购入库单号', scopedSlots: { customRender: 'purchaseNos' }, width: 220, align: 'center' },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库总数量', dataIndex: 'productTotalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库总成本', dataIndex: 'productTotalCost', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'putTime', 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: 250, align: 'center', fixed: 'right' }
+        { title: '财务审核状态', dataIndex: 'auditStateDictValue', width: 120, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 180, 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
-          }
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 440
+        }
+        // 创建时间
+        if (this.createDate && this.createDate.length > 0) {
+          this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
+          this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        return stockPutList(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
-          resolve(data)
+          this.disabled = false
+          return data
         })
       }
     }
   },
   methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
     //  详情
     handleDetail (row) {
       this.$router.push({ path: `/financialManagement/warehousingAudit/detail/${row.id}` })

+ 3 - 2
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -101,7 +101,8 @@
       </template>
       <!-- 预警提示 -->
       <template slot="warnTip" slot-scope="text, record">
-        <span :class="[record.warnTip=='OVERFLOW'?'yellow':record.warnTip=='NOT_ENOUGH'?'red':record.warnTip=='LACK'?'blue':record.warnTip=='NORMAL'?'green':'']">{{ record.warnTipDictValue }}</span>
+        <span v-if="record.warnTipDictValue" :class="[record.warnTip=='OVERFLOW'?'yellow':record.warnTip=='NOT_ENOUGH'?'red':record.warnTip=='LACK'?'blue':record.warnTip=='NORMAL'?'green':'']">{{ record.warnTipDictValue }}</span>
+        <span v-else>--</span>
       </template>
       <!-- 在途数 -->
       <template slot="inTransit" slot-scope="text, record" >
@@ -181,7 +182,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'brandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '实时库存数(个)', dataIndex: 'currentStockQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '实时库存数(个)', dataIndex: 'stockQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 130, align: 'center' },
         { title: '总库存数(个)', dataIndex: 'totalStockQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 130, align: 'center' },