瀏覽代碼

对接仓库调拨管理列表接口

chenrui 4 年之前
父節點
當前提交
d41a3e2894
共有 2 個文件被更改,包括 41 次插入43 次删除
  1. 13 0
      src/api/allocWarehouse.js
  2. 28 43
      src/views/allocationManagement/warehouseAllocation/list.vue

+ 13 - 0
src/api/allocWarehouse.js

@@ -0,0 +1,13 @@
+import { axios } from '@/utils/request'
+
+//  仓库调拨列表  分页
+export const allocWarehouseList = (params) => {
+  const url = `/allocWarehouse/findPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 28 - 43
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -8,9 +8,9 @@
             <a-form-item label="创建时间">
               <a-range-picker
                   style="width:100%"
-                  id="warehouseAllocationList-bundleNamesss"
+                  id="warehouseAllocationList-creatDate"
                   :disabledDate="disabledDate"
-                  v-model="queryParam.brand"
+                  v-model="creatDate"
                   :format="dateFormat"
                   :placeholder="['开始时间', '结束时间']" />
               </a-form-item>
@@ -19,9 +19,9 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="调出仓库">
               <v-select
-                v-model="queryParam.billStatus"
-                ref="billStatus"
-                id="warehouseAllocationList-billStatus"
+                v-model="queryParam.outWarehouseName"
+                ref="outWarehouseName"
+                id="warehouseAllocationList-outWarehouseName"
                 code="PAYMENT_TYPE"
                 placeholder="请选择调出仓库"
                 allowClear></v-select>
@@ -30,9 +30,9 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="调入仓库">
               <v-select
-                v-model="queryParam.billStatus"
-                ref="billStatus"
-                id="warehouseAllocationList-billStatus"
+                v-model="queryParam.putWarehouseName"
+                ref="putWarehouseName"
+                id="warehouseAllocationList-putWarehouseName"
                 code="PAYMENT_TYPE"
                 placeholder="请选择调入仓库"
                 allowClear></v-select>
@@ -42,9 +42,9 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="单据状态">
                 <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="warehouseAllocationList-billStatus"
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="warehouseAllocationList-state"
                   code="PAYMENT_TYPE"
                   placeholder="请选择单据状态"
                   allowClear></v-select>
@@ -76,8 +76,8 @@
       :data="loadData"
       bordered>
       <!-- 状态 -->
-      <template slot="status" slot-scope="text, record">
-        <span :class="record.status==1?'green':'red'"> {{ record.status==1? '待提交': '待审核' }} </span>
+      <template slot="state" slot-scope="text, record">
+        <span :class="record.state==1?'green':'red'"> {{ record.state==1? '待提交': '待审核' }} </span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -93,7 +93,7 @@
 </template>
 
 <script>
-// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { allocWarehouseList } from '@/api/allocWarehouse'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 export default {
@@ -101,6 +101,7 @@ export default {
   data () {
     return {
       advanced: false,  // 高级搜索 展开/关闭
+      creatDate: undefined,  //  创建时间
       queryParam: { //  查询条件
         bundleName: '', //  品牌名称
         state: undefined,  //  状态
@@ -108,44 +109,28 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
       columns: [
-        { title: '创建时间', dataIndex: 'no', width: 70, align: 'center', width: 180 },
-        { title: '单号', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '调出仓库', dataIndex: 'inventoryMoney', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调入仓库', dataIndex: 'productOldNum', width: 160, 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: '创建时间', dataIndex: 'createDate', width: 70, align: 'center', width: 180 },
+        { title: '单号', dataIndex: 'allocationWarehouseNo', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '调出仓库', dataIndex: 'outWarehouseName', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓库', dataIndex: 'putWarehouseName', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总成本', dataIndex: 'productTotalCost', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', scopedSlots: { customRender: 'state' }, width: 180, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 300, 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' }
-            ]
-          }
+        return allocWarehouseList( 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
         })
       },
       openModal: false,  //  新增编辑  弹框