فهرست منبع

更改仓库调拨通用样式

chenrui 4 سال پیش
والد
کامیت
664f9d2637

+ 25 - 28
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="warehouseAllocationDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="warehouseAllocationDetail-back">
+    <a-page-header :ghost="false" :backIcon="false" class="warehouseAllocationDetail-back" >
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="warehouseAllocationDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="warehouseAllocationDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <a-button
           v-if="warehouse&&warehouse.stateDictValue!='已完结'"
           type="primary"
@@ -46,7 +46,7 @@
       <s-table
         class="sTable"
         ref="table"
-        size="default"
+        size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
@@ -128,37 +128,34 @@ export default {
     },
     //  新增/编辑
     handleEdit () {
-		  this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${this.warehouse.id}/${this.warehouse.allocationWarehouseSn}` })
+      this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${this.warehouse.id}/${this.warehouse.allocationWarehouseSn}` })
     },
     // 查询基础信息
     getHouse () {
-		  allocWarehouseFind({
-		    id: this.id
-		  }).then(res => {
-		    if (res.status == 200) {
-		      this.warehouse = res.data
-		      this.queryParam.outWarehouseSn = res.data.outWarehouseSn
-		      // this.getWarehouseLoc(this.warehouse.putWarehouseSn, 'put')
-		      // this.getWarehouseLoc(this.warehouse.outWarehouseSn, 'out')
-		    } else {
-		      this.warehouse = null
-		    }
-		  })
+      allocWarehouseFind({ id: this.id }).then(res => {
+        if (res.status == 200) {
+          this.warehouse = res.data
+          this.queryParam.outWarehouseSn = res.data.outWarehouseSn
+          // this.getWarehouseLoc(this.warehouse.putWarehouseSn, 'put')
+          // this.getWarehouseLoc(this.warehouse.outWarehouseSn, 'out')
+        } else {
+          this.warehouse = null
+        }
+      })
     },
     // 已选产品总计查询
     getProduceTotal () {
-	  allocWarehouseDetailTotal(this.queryParam).then(res => {
-	    console.log(res, '-----总计----')
-	    if (res.status == 200) {
-	      this.productTotalCost = res.data.productTotalCost || 0
-	      this.productTotalQty = res.data.productTotalQty || 0
-	      this.productTotalCategory = res.data.productTotalCategory || 0
-	    } else {
-	      this.productTotalCost = 0
-	      this.productTotalQty = 0
-	      this.productTotalCategory = 0
-	    }
-	  })
+      allocWarehouseDetailTotal(this.queryParam).then(res => {
+        if (res.status == 200) {
+          this.productTotalCost = res.data.productTotalCost || 0
+          this.productTotalQty = res.data.productTotalQty || 0
+          this.productTotalCategory = res.data.productTotalCategory || 0
+        } else {
+          this.productTotalCost = 0
+          this.productTotalQty = 0
+          this.productTotalCategory = 0
+        }
+      })
     },
     //  导出
     handleExport () {

+ 89 - 299
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="warehouseAllocationEdit-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="warehouseAllocationEdit-back">
+    <a-page-header :ghost="false" :backIcon="false" class="warehouseAllocationEdit-back" >
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="warehouseAllocationEdit-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="warehouseAllocationEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -17,14 +17,7 @@
         <a-collapse-panel key="1">
           <template slot="header">
             基础信息
-            <!-- <a-button
-              type="primary"
-              shape="circle"
-              size="small"
-              icon="edit"
-              class="edit-circle-btn"
-              id="warehouseAllocationEdit-circle-btn"
-              @click.stop="handleEditInfo" /> -->
+            <!-- <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="warehouseAllocationEdit-circle-btn" @click.stop="handleEditInfo" /> -->
           </template>
           <a-descriptions :column="3">
             <a-descriptions-item label="调出仓库">{{ warehouse?warehouse.outWarehouseName:'' }}
@@ -89,12 +82,12 @@
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品类" prop="typeName">
+                    <a-form-item label="产品类" prop="typeName">
                       <a-cascader
                         :field-names="{ label: 'productTypeName', value: 'productTypeSn', children: 'children'}"
                         :options="typeData"
                         id="warehouseAllocationEdit-typeName"
-                        placeholder="请选择产品类"
+                        placeholder="请选择产品类"
                         allowClear
                         v-model="typeName" />
                     </a-form-item>
@@ -139,19 +132,19 @@
           <a-table
             class="sTable"
             ref="table"
-            size="default"
+            size="small"
             :rowKey="(record) => record.id"
             :columns="columns"
             :loading="loading"
             :dataSource="loadData"
             :pagination="pagination"
             @change="getProductList"
-            :scroll="{ x: 1560 }"
+            :scroll="{ x: 1740 }"
             bordered>
-            <!-- 类 -->
-            <template slot="type" slot-scope="text, record">
-              <span>{{ record.dealerProduct.productTypeName2||'--' }}</span>
-              <span v-if="record.dealerProduct.productTypeName3">-{{ record.dealerProduct.productTypeName3||'' }}</span>
+            <!-- 产品分类 -->
+            <template slot="productType" slot-scope="text, record">
+              <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+              <span v-else>--</span>
             </template>
             <!-- 调入仓位 -->
             <template slot="storageQuantity" slot-scope="text, record">
@@ -181,7 +174,8 @@
               <a-button
                 :loading="record.addLoading"
                 size="small"
-                type="link"
+                type="primary"
+                class="button-primary"
                 @click="handleAdd(record)"
                 id="warehouseAllocationEdit-add-btn">添加</a-button>
             </template>
@@ -255,16 +249,16 @@
           <s-table
             class="sTable"
             ref="chooseTable"
-            size="default"
+            size="small"
             :rowKey="(record) => record.id"
             :columns="chooseColumns"
             :data="chooseLoadData"
             :scroll="{ x: 1460 }"
             bordered>
-            <!-- 类 -->
-            <template slot="type" slot-scope="text, record">
-              <span>{{ record.productTypeName2||'--' }}</span><span
-                v-if="record.productTypeName3">-{{ record.productTypeName3||'' }}</span>
+            <!-- 产品分类 -->
+            <template slot="productType" slot-scope="text, record">
+              <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+              <span v-else>--</span>
             </template>
             <!-- 调入仓位 -->
             <template slot="storageQuantity" slot-scope="text, record">
@@ -275,10 +269,7 @@
                 allowClear
                 v-model="record.putWarehouseLocationSn"
                 style="width: 100%;">
-                <a-select-option
-                  v-for="item in warehousePutLocData"
-                  :key="item.warehouseLocationSn"
-                  :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
               </a-select>
             </template>
             <!-- 调出数量 -->
@@ -296,7 +287,8 @@
             <template slot="action" slot-scope="text, record">
               <a-button
                 size="small"
-                type="link"
+                type="primary"
+                class="button-error"
                 @click="handleDel(record,1)"
                 id="warehouseAllocationEdit-del-btn">删除</a-button>
             </template>
@@ -322,39 +314,18 @@
 </template>
 
 <script>
-import {
-  STable,
-  VSelect
-} from '@/components'
+import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
-import {
-  dealerProductBrandQuery
-} from '@/api/dealerProductBrand.js'
-import {
-  dealerProductTypeList
-} from '@/api/dealerProductType.js'
-import {
-  warehouseLocAllList
-} from '@/api/warehouse.js'
-import {
-  productQuery,
-  allocWarehouseFind,
-  allocWarehouseDetailTotal,
-  allocWarehouseDetailQuery,
-  allocWarehouseDetailSave,
-  allocWarehouseDetailDelete,
-  allocWarehouseSubmit
-} from '@/api/allocWarehouse.js'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand.js'
+import { dealerProductTypeList } from '@/api/dealerProductType.js'
+import { warehouseLocAllList } from '@/api/warehouse.js'
+import { productQuery, allocWarehouseFind, allocWarehouseDetailTotal, allocWarehouseDetailQuery, allocWarehouseDetailSave, allocWarehouseDetailDelete, allocWarehouseSubmit } from '@/api/allocWarehouse.js'
 export default {
-  components: {
-    STable,
-    VSelect,
-    basicInfoModal
-  },
+  components: { STable, VSelect, basicInfoModal },
   data () {
     return {
       id: this.$route.params.id, // 单据id
-	  typeName: [], // 类别
+      typeName: [], // 分类
       queryParam: {
         outWarehouseSn: '', // 调出仓库sn
         productCode: '', // 产品编码
@@ -373,13 +344,13 @@ export default {
       productTotalCategory: 0, // 总款项
       warehouse: null, // 基础信息
       brandData: [], //  产品品牌  下拉数据
-      typeData: [], //  产品类  下拉数据
+      typeData: [], //  产品类  下拉数据
       warehousePutLocData: [], //  调入仓库仓位  下拉数据
       warehouseOutLocData: [], //  调出仓库仓位  下拉数据
       disabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
       delLoading: false, // 整单删除loading
-	  submitLoading: false, // 提交按钮loading
+      submitLoading: false, // 提交按钮loading
       // 加载数据方法 必须为 Promise 对象
       loadData: [],
       pageNo: 1,
@@ -392,204 +363,33 @@ export default {
       },
       loading: false, // 表格加载圈
       // 表头
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 80,
-        align: 'center'
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'productCode',
-        width: 140,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'productName',
-        width: 200,
-        align: 'center',
-        ellipsis: true
-      },
-      {
-        title: '原厂编码',
-        dataIndex: 'productOrigCode',
-        width: 140,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '品牌',
-        dataIndex: 'brandName',
-        width: 160,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '类别',
-        width: 160,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'type'
-        }
-      },
-      {
-        title: '调出仓位',
-        dataIndex: 'warehouseLocationName',
-        width: 140,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '调入仓位',
-        scopedSlots: {
-          customRender: 'storageQuantity'
-        },
-        width: 140,
-        align: 'center'
-      },
-      {
-        title: '库存数量',
-        dataIndex: 'currentQty',
-        width: 100,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '单位',
-        dataIndex: 'unit',
-        width: 100,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '调出数量',
-        scopedSlots: {
-          customRender: 'transferOutQuantity'
-        },
-        width: 140,
-        align: 'center'
-      },
-      {
-        title: '操作',
-        scopedSlots: {
-          customRender: 'action'
-        },
-        width: 100,
-        align: 'center',
-        fixed: 'right'
-      }
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 200, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '调出仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓位', scopedSlots: { customRender: 'storageQuantity' }, width: 140, align: 'center' },
+        { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 140, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
-
       // 表头
-      chooseColumns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 80,
-        align: 'center'
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'productCode',
-        width: 140,
-        align: 'center',
-        sorter: true,
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'productName',
-        width: 200,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '原厂编码',
-        dataIndex: 'productOrigCode',
-        width: 140,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '品牌',
-        dataIndex: 'brandName',
-        width: 160,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '类别',
-        width: 160,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'type'
-        }
-      },
-      {
-        title: '调出仓位',
-        dataIndex: 'outWarehouseLocationName',
-        width: 140,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '调入仓位',
-        dataIndex: 'putWarehouseLocationSn',
-        width: 140,
-        align: 'center',
-        scopedSlots: {
-          customRender: 'storageQuantity'
-        }
-      },
-      {
-        title: '单位',
-        dataIndex: 'productUnit',
-        width: 100,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '调出数量',
-        scopedSlots: {
-          customRender: 'transferOutQuantity'
-        },
-        width: 140,
-        align: 'center'
-      },
-      {
-        title: '操作',
-        scopedSlots: {
-          customRender: 'action'
-        },
-        width: 100,
-        align: 'center',
-        fixed: 'right'
-      }
+      chooseColumns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 200, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调入仓位', dataIndex: 'putWarehouseLocationSn', width: 140, align: 'center', scopedSlots: { customRender: 'storageQuantity' } },
+        { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 140, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
@@ -609,25 +409,25 @@ export default {
     }
   },
   methods: {
-	  pageInit () {
-		 this.queryParam.productCode = '' // 产品编码
-		 this.queryParam.productName = '' // 产品名称
-		 this.queryParam.productOrigCode = '' // 原厂编码
-		 this.queryParam.brandSn = undefined // 品牌
-		 this.typeName = [] // 类别
-		 this.queryParam.outWarehouseLocationName = undefined // 调出仓位
-		 this.chooseParam.productCode = ''
-		 this.chooseParam.productName = ''
-		 this.pageNo = 1
-		 this.pageSize = 10
-	  },
+    pageInit () {
+      this.queryParam.productCode = '' // 产品编码
+      this.queryParam.productName = '' // 产品名称
+      this.queryParam.productOrigCode = '' // 原厂编码
+      this.queryParam.brandSn = undefined // 品牌
+      this.typeName = [] // 分类
+      this.queryParam.outWarehouseLocationName = undefined // 调出仓位
+      this.chooseParam.productCode = ''
+      this.chooseParam.productName = ''
+      this.pageNo = 1
+      this.pageSize = 10
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.productCode = '' // 产品编码
       this.queryParam.productName = '' // 产品名称
       this.queryParam.productOrigCode = '' // 原厂编码
       this.queryParam.brandSn = undefined // 品牌
-      this.typeName = [] // 类
+      this.typeName = [] // 
       this.queryParam.outWarehouseLocationName = undefined // 调出仓位
       this.getProductList()
     },
@@ -648,7 +448,6 @@ export default {
     getProductType () {
       dealerProductTypeList({}).then(res => {
         this.typeData = res.data || []
-        console.log(res, this.typeData, '--------获取产品分类')
       })
     },
     // 获取仓库仓位
@@ -661,7 +460,6 @@ export default {
         } else {
           this.warehouseOutLocData = res.data || []
         }
-        // return res.data || []
       })
     },
     // 查询基础信息
@@ -688,39 +486,33 @@ export default {
       this.pageNo = pagination && pagination.current ? pagination.current : this.pageNo
       this.pageSize = pagination && pagination.pageSize ? pagination.pageSize : this.pageSize
       this.pagination.current = this.pageNo
-	  const params = Object.assign({
-        pageNo: this.pageNo,
-        pageSize: this.pageSize
-      }, this.queryParam)
-	  if (this.typeName.length) {
-	  		  params.productTypeSn1 = this.typeName[0]
-	  		  params.productTypeSn2 = this.typeName[1] || ''
-	  		  params.productTypeSn3 = this.typeName[2] || ''
-	  }
-	  console.log(this.typeName, 'queryParam')
+      const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
+      if (this.typeName.length) {
+        params.productTypeSn1 = this.typeName[0]
+        params.productTypeSn2 = this.typeName[1] || ''
+        params.productTypeSn3 = this.typeName[2] || ''
+      }
       productQuery(params).then(res => {
-		  if (res.status == 200) {
-			 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
-			   data.list[i].addLoading = false
-			 }
-			 this.pagination.total = Number(data.count)
-			 this.loadData = data.list
-		  } else {
-			  this.pagination.total = 0
-			  this.loadData = []
-		  }
+        if (res.status == 200) {
+          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
+            data.list[i].addLoading = false
+          }
+          this.pagination.total = Number(data.count)
+          this.loadData = data.list
+        } else {
+          this.pagination.total = 0
+          this.loadData = []
+        }
         this.loading = false
         this.disabled = false
-        console.log(this.loadData, '-----产品查询')
       })
     },
     // 已选产品总计查询
     getProduceTotal () {
       allocWarehouseDetailTotal(this.chooseParam).then(res => {
-        console.log(res, '-----总计----')
         if (res.status == 200) {
           this.productTotalCost = res.data.productTotalCost || 0
           this.productTotalQty = res.data.productTotalQty || 0
@@ -734,7 +526,6 @@ export default {
     },
     //  添加
     handleAdd (row) {
-      console.log(row, '-------row')
       if (!row.putWarehouseLocationSn) {
         return this.$message.error('请选择调入仓位!')
       }
@@ -745,7 +536,7 @@ export default {
       const params = Object.assign(row, {
         allocationWarehouseSn: this.chooseParam.allocationWarehouseSn
       })
-	  params.allocationCost = params.putCost
+      params.allocationCost = params.putCost
       allocWarehouseDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
@@ -774,7 +565,6 @@ export default {
             }
           }
           allocWarehouseDetailDelete(params).then(res => {
-            console.log(res, 'res1111')
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.chooseTable.refresh()
@@ -821,7 +611,7 @@ export default {
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.openModal = false
-	  vm.pageInit()
+      vm.pageInit()
       vm.getProductBrand()
       vm.getProductType()
       vm.getHouse()

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

@@ -12,9 +12,9 @@
             <a-form-item label="创建时间">
               <a-range-picker
                 style="width:100%"
-                id="warehouseAllocationList-creatDate"
+                id="warehouseAllocationList-createDate"
                 :disabledDate="disabledDate"
-                v-model="creatDate"
+                v-model="createDate"
                 :format="dateFormat"
                 :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
@@ -83,21 +83,35 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1435 }"
+      :scroll="{ x: 1480 }"
       bordered>
-      <!-- 状态 -->
-      <template slot="state" slot-scope="text, record">
-        <a-tag >{{ text }}</a-tag>
+      <!-- 单号 -->
+      <template slot="allocationWarehouseNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationWarehouseNo }}</span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button v-if="record.stateDictValue=='待审核'" size="small" type="link" @click="handleExamine(record)" id="warehouseAllocationList-examine-btn">审核</a-button>
-        <a-divider v-if="record.stateDictValue=='待审核'" type="vertical" style="margin: 0;" />
-        <a-button v-if="record.stateDictValue!='已完结'" size="small" type="link" @click="handleEdit(record)" id="warehouseAllocationList-edit-btn">编辑</a-button>
-        <a-divider v-if="record.stateDictValue!='已完结'" type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" id="warehouseAllocationList-detail-btn">详情</a-button>
-        <a-divider v-if="record.stateDictValue!='已完结'" type="vertical" style="margin: 0;" />
-        <a-button v-if="record.stateDictValue!='已完结'" size="small" type="link" @click="handleDel(record)" id="warehouseAllocationList-del-btn">删除</a-button>
+        <a-button
+          v-if="record.stateDictValue=='待审核'"
+          size="small"
+          type="primary"
+          class="button-success"
+          @click="handleExamine(record)"
+          id="warehouseAllocationList-examine-btn">审核</a-button>
+        <a-button
+          v-if="record.stateDictValue!='已完结'"
+          size="small"
+          type="primary"
+          class="button-info"
+          @click="handleEdit(record)"
+          id="warehouseAllocationList-edit-btn">编辑</a-button>
+        <a-button
+          v-if="record.stateDictValue!='已完结'"
+          size="small"
+          type="primary"
+          class="button-error"
+          @click="handleDel(record)"
+          id="warehouseAllocationList-del-btn">删除</a-button>
       </template>
     </s-table>
     <!-- 新增/编辑 -->
@@ -116,8 +130,8 @@ export default {
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
-      creatDate: undefined, //  创建时间
-	  warehouseList: [], // 仓库列表
+      createDate: undefined, //  创建时间
+      warehouseList: [], // 仓库列表
       queryParam: { //  查询条件
         outWarehouseSn: undefined, //  调出仓库
         putWarehouseSn: undefined, //  调入仓库
@@ -128,23 +142,23 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '单号', dataIndex: 'allocationWarehouseNo', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '单号', scopedSlots: { customRender: 'allocationWarehouseNo' }, align: 'center' },
         { title: '调出仓库', dataIndex: 'outWarehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '调入仓库', dataIndex: 'putWarehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总成本', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'stateDictValue', scopedSlots: { customRender: 'state' }, width: 100, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 215, align: 'center', fixed: 'right' }
+        { title: '状态', dataIndex: 'stateDictValue', width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         // 创建时间
-        if (this.creatDate && this.creatDate.length > 0) {
-          this.queryParam.beginDate = moment(this.creatDate[0]).format(this.dateFormat)
-          this.queryParam.endDate = moment(this.creatDate[1]).format(this.dateFormat)
+        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
@@ -159,8 +173,7 @@ export default {
           return data
         })
       },
-      openModal: false, //  新增编辑  弹框
-      itemId: '' //  当前品牌id
+      openModal: false //  新增编辑  弹框
     }
   },
   methods: {
@@ -170,21 +183,20 @@ export default {
     },
     // 获取仓库列表
     getWarehouseList () {
-	  warehouseAllList({}).then(res => {
-		  console.log(res, '-----仓库----')
-	    if (res.status == 200) {
-	      this.warehouseList = res.data || []
-	    } else {
-	      this.warehouseList = []
-	    }
-	  })
+      warehouseAllList({}).then(res => {
+        if (res.status == 200) {
+          this.warehouseList = res.data || []
+        } else {
+          this.warehouseList = []
+        }
+      })
     },
     //  重置
     resetSearchForm () {
       this.queryParam.outWarehouseSn = undefined
       this.queryParam.putWarehouseSn = undefined
       this.queryParam.state = undefined
-      this.creatDate = undefined
+      this.createDate = undefined
       this.$refs.table.refresh(true)
     },
     //  基本信息  保存
@@ -199,10 +211,7 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
-          allocWarehouseDelete({
-            id: row.id
-          }).then(res => {
-            console.log(res, 'res1111')
+          allocWarehouseDelete({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -219,10 +228,7 @@ export default {
         content: '确认要审核通过吗?',
         centered: true,
         onOk () {
-          allocWarehouseAudit({
-            id: row.id
-          }).then(res => {
-            console.log(res, 'res1111')
+          allocWarehouseAudit({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -237,15 +243,15 @@ export default {
     },
     //  新增/编辑
     handleEdit (row) {
-		  this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${row.id}/${row.allocationWarehouseSn}` })
+      this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${row.id}/${row.allocationWarehouseSn}` })
     }
   },
   beforeRouteEnter (to, from, next) {
-  	next(vm => {
+    next(vm => {
       vm.queryParam.outWarehouseSn = undefined
       vm.queryParam.putWarehouseSn = undefined
       vm.queryParam.state = undefined
-      vm.creatDate = undefined
+      vm.createDate = undefined
       vm.getWarehouseList()
     })
   }