chenrui 4 年之前
父节点
当前提交
6641060760

+ 39 - 0
src/api/costType.js

@@ -0,0 +1,39 @@
+import { axios } from '@/utils/request'
+
+//  费用类型 列表  分页
+export const costTypeList = (params) => {
+  const url = `/costType/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  费用类型 列表  不分页
+export const costTypeAllList = (params) => {
+  return axios({
+    url: `/costType/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 新增/编辑 费用类型
+export const costTypeSave = params => {
+  return axios({
+    url: '/costType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除 费用类型
+export const costTypeDel = params => {
+  return axios({
+    url: `/costType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 5 - 15
src/api/dealerProduct.js

@@ -1,6 +1,6 @@
 import { axios } from '@/utils/request'
 import { axios } from '@/utils/request'
 
 
-//  产品列表  分页
+//  经销商产品 列表  分页  (自建产品)
 export const dealerProductList = (params) => {
 export const dealerProductList = (params) => {
   const url = `/dealerProduct/queryPage/${params.pageNo}/${params.pageSize}`
   const url = `/dealerProduct/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageNo
@@ -12,17 +12,7 @@ export const dealerProductList = (params) => {
   })
   })
 }
 }
 
 
-//  产品列表  无分页
-export const dealerProductQuery = (params) => {
-  const url = `/dealerProduct/query`
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 新增/编辑产品
+// 新增/编辑 经销商产品
 export const dealerProductSave = params => {
 export const dealerProductSave = params => {
   return axios({
   return axios({
     url: '/dealerProduct/save',
     url: '/dealerProduct/save',
@@ -31,7 +21,7 @@ export const dealerProductSave = params => {
   })
   })
 }
 }
 
 
-// 产品 更改状态
+// 经销商产品 更改状态
 export const dealerProductUpdate = params => {
 export const dealerProductUpdate = params => {
   return axios({
   return axios({
     url: '/dealerProduct/updateStatus',
     url: '/dealerProduct/updateStatus',
@@ -40,7 +30,7 @@ export const dealerProductUpdate = params => {
   })
   })
 }
 }
 
 
-// 产品 导出
+// 经销商产品 导出
 export const dealerProductExport = params => {
 export const dealerProductExport = params => {
   return axios({
   return axios({
     url: '/dealerProduct/export',
     url: '/dealerProduct/export',
@@ -50,7 +40,7 @@ export const dealerProductExport = params => {
   })
   })
 }
 }
 
 
-//  产品  详情
+//  经销商产品  详情
 export const dealerProductDetail = (params) => {
 export const dealerProductDetail = (params) => {
   return axios({
   return axios({
     url: `/dealerProduct/findById/${params.id}`,
     url: `/dealerProduct/findById/${params.id}`,

+ 1 - 1
src/api/dealerProductBrand.js

@@ -14,7 +14,7 @@ export const dealerProductBrandList = (params) => {
 
 
 //  产品品牌列表  无分页
 //  产品品牌列表  无分页
 export const dealerProductBrandQuery = (params) => {
 export const dealerProductBrandQuery = (params) => {
-  const url = `/dealerProductBrand/query`
+  const url = `/dealerProductBrand/queryList`
   return axios({
   return axios({
     url: url,
     url: url,
     data: params,
     data: params,

+ 5 - 5
src/api/dealerProductType.js

@@ -1,16 +1,16 @@
 import { axios } from '@/utils/request'
 import { axios } from '@/utils/request'
 
 
-//  产品类别列表  无分页
-export const dealerProductTypeQuery = (params) => {
+//  产品分类 列表  无分页
+export const dealerProductTypeList = (params) => {
   const url = `/dealerProductType/query`
   const url = `/dealerProductType/query`
   return axios({
   return axios({
     url: url,
     url: url,
-    data: params,
+    data: {},
     method: 'post'
     method: 'post'
   })
   })
 }
 }
 
 
-// 新增/编辑产品类
+// 新增/编辑 产品
 export const dealerProductTypeSave = params => {
 export const dealerProductTypeSave = params => {
   return axios({
   return axios({
     url: '/dealerProductType/save',
     url: '/dealerProductType/save',
@@ -19,7 +19,7 @@ export const dealerProductTypeSave = params => {
   })
   })
 }
 }
 
 
-// 删除产品类
+// 删除 产品
 export const dealerProductTypeDel = params => {
 export const dealerProductTypeDel = params => {
   return axios({
   return axios({
     url: `/dealerProductType/delete/${params.id}`,
     url: `/dealerProductType/delete/${params.id}`,

+ 39 - 0
src/api/sparePartsPutType.js

@@ -0,0 +1,39 @@
+import { axios } from '@/utils/request'
+
+//  散件入库类型类型 列表  分页
+export const sparePartsPutTypeList = (params) => {
+  const url = `/sparePartsPutType/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  散件入库类型类型 列表  不分页
+export const sparePartsPutTypeAllList = (params) => {
+  return axios({
+    url: `/sparePartsPutType/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 新增/编辑 散件入库类型类型
+export const sparePartsPutTypeSave = params => {
+  return axios({
+    url: '/sparePartsPutType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除 散件入库类型类型
+export const sparePartsPutTypeDel = params => {
+  return axios({
+    url: `/sparePartsPutType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 8 - 0
src/api/stock.js

@@ -22,3 +22,11 @@ export const stockDetailList = (params) => {
     method: 'post'
     method: 'post'
   })
   })
 }
 }
+//  库存 列表 合计
+export const stockCount = (params) => {
+  return axios({
+    url: '/stock/queryCount',
+    data: params,
+    method: 'post'
+  })
+}

+ 39 - 0
src/api/storeCallOutType.js

@@ -0,0 +1,39 @@
+import { axios } from '@/utils/request'
+
+//  店内调出类型 列表  分页
+export const storeCallOutTypeList = (params) => {
+  const url = `/storeCallOutType/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出类型 列表  不分页
+export const storeCallOutTypeAllList = (params) => {
+  return axios({
+    url: `/storeCallOutType/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 新增/编辑 店内调出类型
+export const storeCallOutTypeSave = params => {
+  return axios({
+    url: '/storeCallOutType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除 店内调出类型
+export const storeCallOutTypeDel = params => {
+  return axios({
+    url: `/storeCallOutType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

文件差异内容过多而无法显示
+ 784 - 1205
src/config/router.config.js


+ 13 - 12
src/views/basicData/bulkPartsTypeManagement/editModal.vue

@@ -37,9 +37,9 @@
 
 
 <script>
 <script>
 import { STable } from '@/components'
 import { STable } from '@/components'
-import { custTypeSave } from '@/api/custType'
+import { sparePartsPutTypeSave } from '@/api/sparePartsPutType'
 export default {
 export default {
-  name: 'bulkPartsTypeEditModal',
+  name: 'BulkPartsTypeEditModal',
   components: { STable },
   components: { STable },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
@@ -69,24 +69,24 @@ export default {
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
       },
       },
       form: {
       form: {
-        name: '', // 散件类型名称
+        name: '' // 散件类型名称
       },
       },
       rules: {
       rules: {
         name: [
         name: [
           { required: true, message: '请输入散件类型名称', trigger: 'blur' }
           { required: true, message: '请输入散件类型名称', trigger: 'blur' }
-        ],
+        ]
       }
       }
     }
     }
   },
   },
   methods: {
   methods: {
     //  保存
     //  保存
-    handleSave(){
+    handleSave () {
       const _this = this
       const _this = this
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
           const form = _this.form
           const form = _this.form
           form.id = _this.itemId ? _this.itemId : null
           form.id = _this.itemId ? _this.itemId : null
-          custTypeSave(form).then(res => {
+          sparePartsPutTypeSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.isShow = false
               _this.isShow = false
@@ -97,7 +97,7 @@ export default {
           return false
           return false
         }
         }
       })
       })
-    },
+    }
   },
   },
   watch: {
   watch: {
     //  父页面传过来的弹框状态
     //  父页面传过来的弹框状态
@@ -108,12 +108,13 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
+        this.$refs.ruleForm.resetFields()
       }
       }
     },
     },
     itemId (newValue, oldValue) {
     itemId (newValue, oldValue) {
-      if (this.isShow && newValue) {  //  编辑
+      if (this.isShow && newValue) { //  编辑
         this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
         this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
-      }else{  //  添加
+      } else { //  添加
         this.form.name = ''
         this.form.name = ''
       }
       }
     }
     }
@@ -124,11 +125,11 @@ export default {
 <style lang="less">
 <style lang="less">
   .bulkPartsTypeEdit-modal{
   .bulkPartsTypeEdit-modal{
     .ant-modal-body {
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     }
     .btn-cont {
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
     }
   }
   }
 </style>
 </style>

+ 24 - 40
src/views/basicData/bulkPartsTypeManagement/list.vue

@@ -16,8 +16,9 @@
       bordered>
       bordered>
       <!-- 操作 -->
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" @click="handleEdit(record)" id="bulkPartsTypeList-edit-btn">编辑</a-button>
-        <a-button size="small" type="danger" @click="handleDel(record)" id="bulkPartsTypeList-del-btn" style="margin: 0 0 0 8px;">删除</a-button>
+        <a-button size="small" type="link" @click="handleEdit(record)" id="bulkPartsTypeList-edit-btn">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDel(record)" id="bulkPartsTypeList-del-btn" style="margin: 0 0 0 8px;">删除</a-button>
       </template>
       </template>
     </s-table>
     </s-table>
     <!-- 新增/编辑散件类型 -->
     <!-- 新增/编辑散件类型 -->
@@ -26,7 +27,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { custTypeAllList } from '@/api/custType'
+import { sparePartsPutTypeList, sparePartsPutTypeDel } from '@/api/sparePartsPutType'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import bulkPartsTypeEditModal from './editModal.vue'
 import bulkPartsTypeEditModal from './editModal.vue'
 export default {
 export default {
@@ -34,46 +35,31 @@ export default {
   data () {
   data () {
     return {
     return {
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        name: '', //  散件类型名称
+        name: '' //  散件类型名称
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '散件类型名称', dataIndex: 'name', align: 'center', ellipsis: true },
         { title: '散件类型名称', dataIndex: 'name', align: 'center', ellipsis: true },
-        { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        // return custTypeAllList( 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
-        // })
-        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 sparePartsPutTypeList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].no = no + i + 1
           }
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
         })
       },
       },
-      openModal: false,  //  新增编辑散件类型  弹框
-      itemId: '',  //  当前id
-      nowData: null  //  当前记录数据
+      openModal: false, //  新增编辑散件类型  弹框
+      itemId: '', //  当前id
+      nowData: null //  当前记录数据
     }
     }
   },
   },
   methods: {
   methods: {
@@ -83,30 +69,30 @@ export default {
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     //  新增/编辑
     //  新增/编辑
-    handleEdit(row){
+    handleEdit (row) {
       this.itemId = row ? row.id : null
       this.itemId = row ? row.id : null
-      this.nowData = row ? row : null
+      this.nowData = row || null
       this.openModal = true
       this.openModal = true
     },
     },
     //  删除
     //  删除
-    handleDel(row){
+    handleDel (row) {
       const _this = this
       const _this = this
       _this.$confirm({
       _this.$confirm({
         title: '提示',
         title: '提示',
         content: '删除后原数据不可恢复,是否删除?',
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         centered: true,
         onOk () {
         onOk () {
-          // dealerProductTypeDel({ id: row.id }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
+          sparePartsPutTypeDel({ id: row.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
         }
         }
       })
       })
     },
     },
     //  关闭弹框
     //  关闭弹框
-    closeModal(){
+    closeModal () {
       this.itemId = ''
       this.itemId = ''
       this.openModal = false
       this.openModal = false
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
@@ -114,5 +100,3 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
-
-<style lang="less"></style>

+ 1 - 0
src/views/basicData/customerTypeManagement/editModal.vue

@@ -108,6 +108,7 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
+        this.$refs.ruleForm.resetFields()
       }
       }
     },
     },
     itemId (newValue, oldValue) {
     itemId (newValue, oldValue) {

+ 1 - 1
src/views/basicData/customerTypeManagement/list.vue

@@ -57,7 +57,7 @@ export default {
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '客户类型名称', dataIndex: 'name', align: 'center', ellipsis: true },
         { title: '客户类型名称', dataIndex: 'name', align: 'center', ellipsis: true },
-        { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象

+ 24 - 23
src/views/basicData/expenseType/editModal.vue

@@ -21,8 +21,8 @@
         <a-form-model-item label="所属类别" v-if="parentType">
         <a-form-model-item label="所属类别" v-if="parentType">
           {{ parentType }}
           {{ parentType }}
         </a-form-model-item>
         </a-form-model-item>
-        <a-form-model-item label="费用类型名称" prop="productTypeName">
-          <a-input v-model.trim="form.productTypeName" id="expenseTypeEdit-name" :maxLength="30" allowClear placeholder="请输入费用类型名称(最多30个字符)" />
+        <a-form-model-item label="费用类型名称" prop="name">
+          <a-input v-model.trim="form.name" id="expenseTypeEdit-name" :maxLength="30" allowClear placeholder="请输入费用类型名称(最多30个字符)" />
         </a-form-model-item>
         </a-form-model-item>
       </a-form-model>
       </a-form-model>
       <div class="btn-cont">
       <div class="btn-cont">
@@ -35,9 +35,9 @@
 
 
 <script>
 <script>
 import { STable } from '@/components'
 import { STable } from '@/components'
-import { dealerProductTypeSave } from '@/api/dealerProductType'
+// import { dealerProductTypeSave } from '@/api/dealerProductType'
 export default {
 export default {
-  name: 'expenseTypeEditModal',
+  name: 'ExpenseTypeEditModal',
   components: { STable },
   components: { STable },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
@@ -66,37 +66,37 @@ export default {
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
       },
       },
       form: {
       form: {
-        productTypeName: '', // 费用类型名称
+        name: '' // 费用类型名称
       },
       },
       rules: {
       rules: {
-        productTypeName: [
+        name: [
           { required: true, message: '请输入费用类型名称', trigger: 'blur' }
           { required: true, message: '请输入费用类型名称', trigger: 'blur' }
-        ],
+        ]
       },
       },
-      parentType: '',  //  父级分类
+      parentType: '' //  父级分类
     }
     }
   },
   },
   methods: {
   methods: {
     //  保存
     //  保存
-    handleSave(){
+    handleSave () {
       const _this = this
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
           const formData = JSON.parse(JSON.stringify(_this.form))
           const formData = JSON.parse(JSON.stringify(_this.form))
           formData.id = _this.itemId ? _this.itemId : undefined
           formData.id = _this.itemId ? _this.itemId : undefined
           formData.psn = _this.nowData && _this.nowData.psn ? _this.nowData.psn : undefined
           formData.psn = _this.nowData && _this.nowData.psn ? _this.nowData.psn : undefined
-          dealerProductTypeSave(formData).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$emit('ok')
-              _this.isShow = false
-            }
-          })
+          // dealerProductTypeSave(formData).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$emit('ok')
+          //     _this.isShow = false
+          //   }
+          // })
         } else {
         } else {
           return false
           return false
         }
         }
       })
       })
-    },
+    }
   },
   },
   watch: {
   watch: {
     //  父页面传过来的弹框状态
     //  父页面传过来的弹框状态
@@ -107,9 +107,10 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
-      }else{
+        this.$refs.ruleForm.resetFields()
+      } else {
         //  获取父级分类 名称
         //  获取父级分类 名称
-        if(this.nowData && this.nowData.namePaths){
+        if (this.nowData && this.nowData.namePaths) {
           let namePathsArr = []
           let namePathsArr = []
           namePathsArr = this.nowData.namePaths.split(',')
           namePathsArr = this.nowData.namePaths.split(',')
           this.parentType = ''
           this.parentType = ''
@@ -117,16 +118,16 @@ export default {
             this.parentType += item + ' > '
             this.parentType += item + ' > '
           })
           })
           this.parentType = this.parentType ? this.parentType.substr(0, this.parentType.length - 3) : ''
           this.parentType = this.parentType ? this.parentType.substr(0, this.parentType.length - 3) : ''
-        }else{
+        } else {
           this.parentType = ''
           this.parentType = ''
         }
         }
       }
       }
     },
     },
     itemId (newValue, oldValue) {
     itemId (newValue, oldValue) {
       if (this.isShow && newValue) {
       if (this.isShow && newValue) {
-        this.form.productTypeName = this.nowData && this.nowData.productTypeName ? this.nowData.productTypeName : ''
-      }else{
-        this.form.productTypeName = ''
+        this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
+      } else {
+        this.form.name = ''
       }
       }
     }
     }
   }
   }

+ 19 - 17
src/views/basicData/expenseType/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="expenseTypeList-wrap">
   <a-card size="small" :bordered="false" class="expenseTypeList-wrap">
     <!-- 操作按钮 -->
     <!-- 操作按钮 -->
     <div class="table-operator">
     <div class="table-operator">
-      <a-button id="expenseTypeList-add" type="primary" @click="handleAdd()" style="margin-top: 18px;">新增一级类</a-button>
+      <a-button id="expenseTypeList-add" type="primary" @click="handleAdd()" style="margin-top: 18px;">新增一级类</a-button>
     </div>
     </div>
     <!-- 列表 -->
     <!-- 列表 -->
     <s-table
     <s-table
@@ -25,6 +25,7 @@
           class="btn-add-s"
           class="btn-add-s"
           id="expenseType-addSubItem"
           id="expenseType-addSubItem"
           @click="handleAdd(record)">新增子级</a-button>
           @click="handleAdd(record)">新增子级</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
         <a-button
         <a-button
           v-if="record.pid != 0"
           v-if="record.pid != 0"
           type="link"
           type="link"
@@ -33,6 +34,7 @@
           class="btn-edit-s"
           class="btn-edit-s"
           id="expenseType-edit"
           id="expenseType-edit"
           @click="handleEdit(record)">编辑</a-button>
           @click="handleEdit(record)">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
         <a-button
         <a-button
           v-if="record.pid != 0"
           v-if="record.pid != 0"
           type="link"
           type="link"
@@ -49,7 +51,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { dealerProductTypeQuery, dealerProductTypeDel } from '@/api/dealerProductType'
+import { costTypeAllList, costTypeDel } from '@/api/costType'
 import { STable } from '@/components'
 import { STable } from '@/components'
 import expenseTypeEditModal from './editModal.vue'
 import expenseTypeEditModal from './editModal.vue'
 export default {
 export default {
@@ -61,39 +63,39 @@ export default {
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
       },
       },
       columns: [
       columns: [
-        { title: '费用类型名称', dataIndex: 'productTypeName', align: 'left' },
+        { title: '费用类型名称', dataIndex: 'name', align: 'left' },
         { title: '创建时间', dataIndex: 'createDate', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        return dealerProductTypeQuery({}).then(res => {
+        return costTypeAllList({}).then(res => {
           //  递归去除空children
           //  递归去除空children
           this.recursionFun(res.data)
           this.recursionFun(res.data)
-          if(res.data.length > 0){
+          if (res.data.length > 0) {
             this.defaultExpandedRowKeys[0] = res.data[0].id
             this.defaultExpandedRowKeys[0] = res.data[0].id
-          }else{
+          } else {
             this.defaultExpandedRowKeys = []
             this.defaultExpandedRowKeys = []
           }
           }
           return res.data
           return res.data
         })
         })
       },
       },
       defaultExpandedRowKeys: [], //  树形数据默认展开项
       defaultExpandedRowKeys: [], //  树形数据默认展开项
-      openModal: false,  //  新增编辑  弹框
-      itemId: '',  //  当前id
-      nowData: null  //  当前记录数据
+      openModal: false, //  新增编辑  弹框
+      itemId: '', //  当前id
+      nowData: null //  当前记录数据
     }
     }
   },
   },
   methods: {
   methods: {
     //  新增子级
     //  新增子级
     handleAdd (row) {
     handleAdd (row) {
       this.itemId = null
       this.itemId = null
-      if(row){  //  新增子级
-        let nowData = row
+      if (row) { //  新增子级
+        const nowData = row
         nowData.psn = nowData && nowData.productTypeSn ? nowData.productTypeSn : null
         nowData.psn = nowData && nowData.productTypeSn ? nowData.productTypeSn : null
         this.nowData = nowData
         this.nowData = nowData
-      }else{  //  最高级
+      } else { //  最高级
         this.nowData = null
         this.nowData = null
       }
       }
       this.openModal = true
       this.openModal = true
@@ -101,18 +103,18 @@ export default {
     //  编辑
     //  编辑
     handleEdit (row) {
     handleEdit (row) {
       this.itemId = row && row.id ? row.id : null
       this.itemId = row && row.id ? row.id : null
-      let nowData = row
+      const nowData = row
       nowData.psn = nowData && nowData.productTypeSn ? nowData.productTypeSn : null
       nowData.psn = nowData && nowData.productTypeSn ? nowData.productTypeSn : null
       this.nowData = nowData
       this.nowData = nowData
       this.openModal = true
       this.openModal = true
     },
     },
     //  关闭弹框
     //  关闭弹框
-    closeModal(){
+    closeModal () {
       this.itemId = ''
       this.itemId = ''
       this.openModal = false
       this.openModal = false
     },
     },
     //  新增/编辑  成功
     //  新增/编辑  成功
-    handleOk(){
+    handleOk () {
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     //  删除
     //  删除
@@ -124,7 +126,7 @@ export default {
         content: '删除后原数据不可恢复,是否删除?',
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         centered: true,
         onOk () {
         onOk () {
-          dealerProductTypeDel({ id: _this.nowId }).then(res => {
+          costTypeDel({ id: _this.nowId }).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.$refs.table.refresh()
@@ -170,4 +172,4 @@ export default {
       }
       }
     }
     }
   }
   }
-</style>
+</style>

+ 13 - 12
src/views/basicData/storeTransferOutTypeManagement/editModal.vue

@@ -37,9 +37,9 @@
 
 
 <script>
 <script>
 import { STable } from '@/components'
 import { STable } from '@/components'
-import { custTypeSave } from '@/api/custType'
+import { storeCallOutTypeSave } from '@/api/storeCallOutType'
 export default {
 export default {
-  name: 'storeTransferOutTypeEditModal',
+  name: 'StoreTransferOutTypeEditModal',
   components: { STable },
   components: { STable },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
@@ -69,24 +69,24 @@ export default {
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
       },
       },
       form: {
       form: {
-        name: '', // 店内调出类型名称
+        name: '' // 店内调出类型名称
       },
       },
       rules: {
       rules: {
         name: [
         name: [
           { required: true, message: '请输入店内调出类型名称', trigger: 'blur' }
           { required: true, message: '请输入店内调出类型名称', trigger: 'blur' }
-        ],
+        ]
       }
       }
     }
     }
   },
   },
   methods: {
   methods: {
     //  保存
     //  保存
-    handleSave(){
+    handleSave () {
       const _this = this
       const _this = this
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
           const form = _this.form
           const form = _this.form
           form.id = _this.itemId ? _this.itemId : null
           form.id = _this.itemId ? _this.itemId : null
-          custTypeSave(form).then(res => {
+          storeCallOutTypeSave(form).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
               _this.isShow = false
               _this.isShow = false
@@ -97,7 +97,7 @@ export default {
           return false
           return false
         }
         }
       })
       })
-    },
+    }
   },
   },
   watch: {
   watch: {
     //  父页面传过来的弹框状态
     //  父页面传过来的弹框状态
@@ -108,12 +108,13 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
+        this.$refs.ruleForm.resetFields()
       }
       }
     },
     },
     itemId (newValue, oldValue) {
     itemId (newValue, oldValue) {
-      if (this.isShow && newValue) {  //  编辑
+      if (this.isShow && newValue) { //  编辑
         this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
         this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
-      }else{  //  添加
+      } else { //  添加
         this.form.name = ''
         this.form.name = ''
       }
       }
     }
     }
@@ -124,11 +125,11 @@ export default {
 <style lang="less">
 <style lang="less">
   .storeTransferOutTypeEdit-modal{
   .storeTransferOutTypeEdit-modal{
     .ant-modal-body {
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     }
     .btn-cont {
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
     }
   }
   }
 </style>
 </style>

+ 24 - 40
src/views/basicData/storeTransferOutTypeManagement/list.vue

@@ -16,8 +16,9 @@
       bordered>
       bordered>
       <!-- 操作 -->
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" @click="handleEdit(record)" id="storeTransferOutTypeList-edit-btn">编辑</a-button>
-        <a-button size="small" type="danger" @click="handleDel(record)" id="storeTransferOutTypeList-del-btn" style="margin: 0 0 0 8px;">删除</a-button>
+        <a-button size="small" type="link" @click="handleEdit(record)" id="storeTransferOutTypeList-edit-btn">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDel(record)" id="storeTransferOutTypeList-del-btn">删除</a-button>
       </template>
       </template>
     </s-table>
     </s-table>
     <!-- 新增/编辑店内调出类型 -->
     <!-- 新增/编辑店内调出类型 -->
@@ -26,54 +27,39 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { custTypeAllList } from '@/api/custType'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import storeTransferOutTypeEditModal from './editModal.vue'
 import storeTransferOutTypeEditModal from './editModal.vue'
+import { storeCallOutTypeList, storeCallOutTypeDel } from '@/api/storeCallOutType'
 export default {
 export default {
   components: { STable, VSelect, storeTransferOutTypeEditModal },
   components: { STable, VSelect, storeTransferOutTypeEditModal },
   data () {
   data () {
     return {
     return {
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        name: '', //  店内调出类型名称
+        name: '' //  店内调出类型名称
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '店内调出类型名称', dataIndex: 'name', align: 'center', ellipsis: true },
         { title: '店内调出类型名称', dataIndex: 'name', align: 'center', ellipsis: true },
-        { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        // return custTypeAllList( 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
-        // })
-        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 storeCallOutTypeList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].no = no + i + 1
           }
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
         })
       },
       },
-      openModal: false,  //  新增编辑店内调出类型  弹框
-      itemId: '',  //  当前id
-      nowData: null  //  当前记录数据
+      openModal: false, //  新增编辑店内调出类型  弹框
+      itemId: '', //  当前id
+      nowData: null //  当前记录数据
     }
     }
   },
   },
   methods: {
   methods: {
@@ -83,30 +69,30 @@ export default {
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     //  新增/编辑
     //  新增/编辑
-    handleEdit(row){
+    handleEdit (row) {
       this.itemId = row ? row.id : null
       this.itemId = row ? row.id : null
-      this.nowData = row ? row : null
+      this.nowData = row || null
       this.openModal = true
       this.openModal = true
     },
     },
     //  删除
     //  删除
-    handleDel(row){
+    handleDel (row) {
       const _this = this
       const _this = this
       _this.$confirm({
       _this.$confirm({
         title: '提示',
         title: '提示',
         content: '删除后原数据不可恢复,是否删除?',
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         centered: true,
         onOk () {
         onOk () {
-          // dealerProductTypeDel({ id: row.id }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
+          storeCallOutTypeDel({ id: row.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
         }
         }
       })
       })
     },
     },
     //  关闭弹框
     //  关闭弹框
-    closeModal(){
+    closeModal () {
       this.itemId = ''
       this.itemId = ''
       this.openModal = false
       this.openModal = false
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
@@ -114,5 +100,3 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
-
-<style lang="less"></style>

+ 72 - 37
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -6,42 +6,48 @@
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
             <a-form-item label="产品编码">
-              <a-input id="inventoryQueryList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              <a-input id="inventoryQueryList-productCode" v-model="queryParam.dealerProduct.code" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="原厂编码">
             <a-form-item label="原厂编码">
-              <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
+              <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.dealerProduct.origCode" allowClear placeholder="请输入原厂编码"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="产品名称">
             <a-form-item label="产品名称">
-              <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.dealerProduct.name" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品品牌">
               <a-form-item label="产品品牌">
-                <a-select id="inventoryQueryList-brandName" placeholder="请选择产品品牌" allowClear v-model="queryParam.brandName">
+                <a-select id="inventoryQueryList-productBrandSn" placeholder="请选择产品品牌" allowClear v-model="queryParam.productBrandSn">
                   <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
                   <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
                 </a-select>
                 </a-select>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品类">
-                <a-cascader :options="typeData" placeholder="请选择产品类别" allowClear v-model="queryParam.productTypeName" />
+              <a-form-item label="产品类">
+                <a-cascader :options="typeData" placeholder="请选择产品分类" allowClear v-model="productTypeSn" @change="changeType" />
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="库存数量是否为0">
               <a-form-item label="库存数量是否为0">
-                <a-switch checkedChildren="是" unCheckedChildren="否" id="inventoryQueryList-currentStockQty" v-model="queryParam.currentStockQty" />
+                <v-select code="FLAG" id="inventoryQueryList-zeroQtyFlag" v-model="queryParam.zeroQtyFlag" allowClear placeholder="请选择"></v-select>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
           </template>
           </template>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
-            <a-button style="margin-left: 8px" type="danger" @click="handleExport" :disabled="disabled" :loading="exportLoading" id="inventoryQueryList-export">导出</a-button>
+            <!-- <a-button
+              style="margin-left: 8px"
+              type="danger"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              id="inventoryQueryList-export">导出</a-button> -->
             <a @click="advanced=!advanced" style="margin-left: 8px">
             <a @click="advanced=!advanced" style="margin-left: 8px">
               {{ advanced ? '收起' : '展开' }}
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
               <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -52,7 +58,7 @@
     </div>
     </div>
     <!-- 合计 -->
     <!-- 合计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div class="ftext" slot="message">现有库存总数量(个):<strong>998</strong>;现有库存总成本(¥):<strong>2009.00</strong>。</div>
+      <div class="ftext" slot="message">现有库存总数量(个):<strong>{{ currentStock.currentStockQty || 0 }}</strong>;现有库存总成本(¥):<strong>{{ currentStock.currentStockCost || 0 }}</strong>。</div>
     </a-alert>
     </a-alert>
     <!-- 列表 -->
     <!-- 列表 -->
     <s-table
     <s-table
@@ -62,8 +68,13 @@
       :rowKey="(record) => record.id"
       :rowKey="(record) => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
-      :scroll="{ x: 1370 }"
+      :scroll="{ x: 1430 }"
       bordered>
       bordered>
+      <!-- 产品分类 -->
+      <template slot="productTypeName" slot-scope="text, record">
+        <span v-if="record.dealerProduct">{{ record.dealerProduct.productTypeName2 || '' }}</span> >
+        <span v-if="record.dealerProduct">{{ record.dealerProduct.productTypeName3 || '' }}</span>
+      </template>
       <!-- 操作 -->
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
       <template slot="action" slot-scope="text, record">
         <a-button size="small" type="link" @click="goDetail(record)" id="inventoryQueryList-detail-btn">库存详情</a-button>
         <a-button size="small" type="link" @click="goDetail(record)" id="inventoryQueryList-detail-btn">库存详情</a-button>
@@ -78,53 +89,63 @@
 
 
 <script>
 <script>
 import moment from 'moment'
 import moment from 'moment'
-import { stockList } from '@/api/stock'
-import { STable } from '@/components'
+import { stockList, stockCount } from '@/api/stock'
+import { STable, VSelect } from '@/components'
 import inventoryQueryDetailModal from './detailModal.vue'
 import inventoryQueryDetailModal from './detailModal.vue'
 export default {
 export default {
-  components: { STable, inventoryQueryDetailModal },
+  components: { STable, VSelect, inventoryQueryDetailModal },
   data () {
   data () {
     return {
     return {
-      advanced: false,  // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        productCode: '', //  产品编码
-        productOrigCode: '', //  原厂编码
-        productName: '', //  产品名称
-        brandName: undefined,  //  产品品牌
-        productTypeName: undefined, //  产品类别
-        currentStockQty: false  //  库存数量是否为0
+        dealerProduct: {
+          code: '', //  产品编码
+          name: '', //  产品名称
+          origCode: '', //  原厂编码
+          productBrandSn: '', //  产品品牌
+          productTypeSn1: '', //  产品分类1
+          productTypeSn2: '', //  产品分类2
+          productTypeSn3: '' //  产品分类3
+        },
+        zeroQtyFlag: undefined //  库存数量是否为0
       },
       },
+      productTypeSn: [],
       exportLoading: false, // 导出loading
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      brandData: [],  //  产品品牌下拉数据
-      typeData: [],  //  产品类下拉数据
+      brandData: [], //  产品品牌下拉数据
+      typeData: [], //  产品类下拉数据
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', dataIndex: 'productType', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProduct.code', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProduct.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'dealerProduct.origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'dealerProduct.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productTypeName' }, width: 200, align: 'center' },
         { title: '现有库存数量(个)', dataIndex: 'currentStockQty', width: 165, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '现有库存数量(个)', dataIndex: 'currentStockQty', width: 165, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '现有库存成本(¥)', dataIndex: 'currentStockCost', width: 165, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
+        { title: '现有库存成本(¥)', dataIndex: 'currentStockCost', width: 165, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        // { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        this.queryParam = {}
-        return stockList( Object.assign(parameter, this.queryParam) ).then(res => {
+        return stockList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].no = no + i + 1
           }
           }
           this.disabled = false
           this.disabled = false
+          // 总计
+          this.getTotal(Object.assign(parameter, this.queryParam))
           return data
           return data
         })
         })
       },
       },
-      openModal: false,  //  查看库存详情  弹框
-      itemId: ''  //  当前库存记录id
+      openModal: false, //  查看库存详情  弹框
+      itemId: '', //  当前库存记录id
+      currentStock: { // 合计信息
+        currentStockQty: '',
+        currentStockCost: ''
+      }
     }
     }
   },
   },
   methods: {
   methods: {
@@ -138,18 +159,32 @@ export default {
       this.queryParam.currentStockQty = false
       this.queryParam.currentStockQty = false
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
+    // 分类  changeType
+    changeType (val) {
+      console.log(val)
+    },
+    // 合计
+    getTotal (param) {
+      stockCount(param).then(res => {
+        if (res.status == 200) {
+          this.currentStock = res.data
+        } else {
+          this.currentStock = null
+        }
+      })
+    },
     //  库存详情
     //  库存详情
-    goDetail(row){
+    goDetail (row) {
       this.itemId = row.id
       this.itemId = row.id
       this.openModal = true
       this.openModal = true
     },
     },
     //  关闭弹框
     //  关闭弹框
-    closeModal(){
+    closeModal () {
       this.itemId = ''
       this.itemId = ''
       this.openModal = false
       this.openModal = false
     },
     },
     //  出入库明细
     //  出入库明细
-    goWarehouseDetail(row){
+    goWarehouseDetail (row) {
       this.$router.push({ path: `/inventoryManagement/inventoryQuery/warehouseDetail/${row.id}` })
       this.$router.push({ path: `/inventoryManagement/inventoryQuery/warehouseDetail/${row.id}` })
     },
     },
     //  导出
     //  导出
@@ -175,4 +210,4 @@ export default {
     }
     }
   }
   }
 }
 }
-</script>
+</script>

+ 15 - 14
src/views/productManagement/productBrand/editModal.vue

@@ -18,11 +18,11 @@
         :label-col="formItemLayout.labelCol"
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
       >
-        <a-form-model-item label="产品品牌名称" prop="productBrandName">
+        <a-form-model-item label="产品品牌名称" prop="brandName">
           <a-input
           <a-input
-            id="productBrandEdit-productBrandName"
+            id="productBrandEdit-brandName"
             :maxLength="30"
             :maxLength="30"
-            v-model="form.productBrandName"
+            v-model="form.brandName"
             placeholder="请输入产品品牌名称(最多30个字符)"
             placeholder="请输入产品品牌名称(最多30个字符)"
             allowClear />
             allowClear />
         </a-form-model-item>
         </a-form-model-item>
@@ -39,7 +39,7 @@
 import { STable } from '@/components'
 import { STable } from '@/components'
 import { dealerProductBrandSave } from '@/api/dealerProductBrand'
 import { dealerProductBrandSave } from '@/api/dealerProductBrand'
 export default {
 export default {
-  name: 'productBrandEditModal',
+  name: 'ProductBrandEditModal',
   components: { STable },
   components: { STable },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
@@ -68,18 +68,18 @@ export default {
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
       },
       },
       form: {
       form: {
-        productBrandName: '', // 产品品牌名称
+        brandName: '' // 产品品牌名称
       },
       },
       rules: {
       rules: {
-        productBrandName: [
+        brandName: [
           { required: true, message: '请输入产品品牌名称', trigger: 'blur' }
           { required: true, message: '请输入产品品牌名称', trigger: 'blur' }
-        ],
+        ]
       }
       }
     }
     }
   },
   },
   methods: {
   methods: {
     //  保存
     //  保存
-    handleSave(){
+    handleSave () {
       const _this = this
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
@@ -96,7 +96,7 @@ export default {
           return false
           return false
         }
         }
       })
       })
-    },
+    }
   },
   },
   watch: {
   watch: {
     //  父页面传过来的弹框状态
     //  父页面传过来的弹框状态
@@ -107,8 +107,9 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
-      }else{
-        this.form.productBrandName = this.nowData && this.nowData.productBrandName ? this.nowData.productBrandName : ''
+        this.$refs.ruleForm.resetFields()
+      } else {
+        this.form.brandName = this.nowData && this.nowData.brandName ? this.nowData.brandName : ''
       }
       }
     }
     }
   }
   }
@@ -118,11 +119,11 @@ export default {
 <style lang="less">
 <style lang="less">
   .productBrandEdit-modal{
   .productBrandEdit-modal{
     .ant-modal-body {
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     }
     .btn-cont {
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
     }
   }
   }
 </style>
 </style>

+ 27 - 29
src/views/productManagement/productBrand/list.vue

@@ -6,12 +6,12 @@
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="品牌名称">
             <a-form-item label="品牌名称">
-              <a-input id="productBrandList-productBrandName" v-model.trim="queryParam.productBrandName" allowClear placeholder="请输入品牌名称"/>
+              <a-input id="productBrandList-brandName" v-model.trim="queryParam.brandName" allowClear placeholder="请输入品牌名称"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="状态">
             <a-form-item label="状态">
-              <v-select code="ENABLED_FLAG" id="productBrandList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+              <v-select code="ENABLE_FLAG" id="productBrandList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
@@ -24,7 +24,7 @@
     <!-- 操作按钮 -->
     <!-- 操作按钮 -->
     <div class="table-operator">
     <div class="table-operator">
       <a-button id="productBrandList-add" type="primary" @click="handleEdit()">新增品牌</a-button>
       <a-button id="productBrandList-add" type="primary" @click="handleEdit()">新增品牌</a-button>
-      <a-button id="productBrandList-import" @click="handleImport">导入品牌</a-button>
+      <!-- <a-button id="productBrandList-import" @click="handleImport">导入品牌</a-button> -->
     </div>
     </div>
     <!-- 列表 -->
     <!-- 列表 -->
     <s-table
     <s-table
@@ -47,7 +47,7 @@
       </template>
       </template>
       <!-- 操作 -->
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" @click="handleEdit(record)" id="productBrandList-edit-btn">编辑</a-button>
+        <a-button size="small" type="link" @click="handleEdit(record)" id="productBrandList-edit-btn">编辑</a-button>
       </template>
       </template>
     </s-table>
     </s-table>
     <!-- 新增/编辑产品品牌 -->
     <!-- 新增/编辑产品品牌 -->
@@ -64,22 +64,22 @@ export default {
   data () {
   data () {
     return {
     return {
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        productBrandName: '', //  品牌名称
-        enabledFlag: undefined,  //  状态
+        brandName: '', //  品牌名称
+        enabledFlag: undefined //  状态
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品品牌名称', dataIndex: 'productBrandName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '首字母', dataIndex: 'firstChar', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 180, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
+        { title: '产品品牌名称', dataIndex: 'brandName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '首字母', dataIndex: 'firstChar', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', align: 'center' },
+        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 160, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        return dealerProductBrandList( Object.assign(parameter, this.queryParam) ).then(res => {
+        return dealerProductBrandList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {
@@ -89,30 +89,30 @@ export default {
           return data
           return data
         })
         })
       },
       },
-      openModal: false,  //  新增编辑  弹框
-      itemId: '',  //  当前id
-      nowData: null  //  当前记录数据
+      openModal: false, //  新增编辑  弹框
+      itemId: '', //  当前id
+      nowData: null //  当前记录数据
     }
     }
   },
   },
   methods: {
   methods: {
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
-      this.queryParam.productBrandName = ''
+      this.queryParam.brandName = ''
       this.queryParam.enabledFlag = undefined
       this.queryParam.enabledFlag = undefined
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     //  新增/编辑
     //  新增/编辑
-    handleEdit(row){
+    handleEdit (row) {
       this.itemId = row ? row.id : null
       this.itemId = row ? row.id : null
-      this.nowData = row ? row : null
+      this.nowData = row || null
       this.openModal = true
       this.openModal = true
     },
     },
     //  新增/编辑  成功
     //  新增/编辑  成功
-    handleOk(){
+    handleOk () {
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     //  关闭弹框
     //  关闭弹框
-    closeModal(){
+    closeModal () {
       this.itemId = ''
       this.itemId = ''
       this.nowData = null
       this.nowData = null
       this.openModal = false
       this.openModal = false
@@ -125,18 +125,16 @@ export default {
         enabledFlag: record.enabledFlag == 1 ? '0' : '1'
         enabledFlag: record.enabledFlag == 1 ? '0' : '1'
       }
       }
       dealerProductBrandUpdate(_data).then(res => {
       dealerProductBrandUpdate(_data).then(res => {
-      	if (res.status == 200) {
-      		_this.$message.success(res.message)
-      		_this.$refs.table.refresh()
-      	} else {
-      		_this.$refs.table.refresh()
-      	}
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+        } else {
+          _this.$refs.table.refresh()
+        }
       })
       })
     },
     },
     //  导入
     //  导入
-    handleImport(){},
+    handleImport () {}
   }
   }
 }
 }
 </script>
 </script>
-
-<style lang="less"></style>

+ 13 - 13
src/views/productManagement/productCategory/editModal.vue

@@ -37,7 +37,7 @@
 import { STable } from '@/components'
 import { STable } from '@/components'
 import { dealerProductTypeSave } from '@/api/dealerProductType'
 import { dealerProductTypeSave } from '@/api/dealerProductType'
 export default {
 export default {
-  name: 'productCategoryEditModal',
+  name: 'ProductCategoryEditModal',
   components: { STable },
   components: { STable },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
@@ -66,19 +66,19 @@ export default {
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
       },
       },
       form: {
       form: {
-        productTypeName: '', // 产品分类名称
+        productTypeName: '' // 产品分类名称
       },
       },
       rules: {
       rules: {
         productTypeName: [
         productTypeName: [
           { required: true, message: '请输入产品分类名称', trigger: 'blur' }
           { required: true, message: '请输入产品分类名称', trigger: 'blur' }
-        ],
+        ]
       },
       },
-      parentType: '',  //  父级分类
+      parentType: '' //  父级分类
     }
     }
   },
   },
   methods: {
   methods: {
     //  保存
     //  保存
-    handleSave(){
+    handleSave () {
       const _this = this
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
@@ -96,7 +96,7 @@ export default {
           return false
           return false
         }
         }
       })
       })
-    },
+    }
   },
   },
   watch: {
   watch: {
     //  父页面传过来的弹框状态
     //  父页面传过来的弹框状态
@@ -107,9 +107,9 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
-      }else{
+      } else {
         //  获取父级分类 名称
         //  获取父级分类 名称
-        if(this.nowData && this.nowData.namePaths){
+        if (this.nowData && this.nowData.namePaths) {
           let namePathsArr = []
           let namePathsArr = []
           namePathsArr = this.nowData.namePaths.split(',')
           namePathsArr = this.nowData.namePaths.split(',')
           this.parentType = ''
           this.parentType = ''
@@ -117,7 +117,7 @@ export default {
             this.parentType += item + ' > '
             this.parentType += item + ' > '
           })
           })
           this.parentType = this.parentType ? this.parentType.substr(0, this.parentType.length - 3) : ''
           this.parentType = this.parentType ? this.parentType.substr(0, this.parentType.length - 3) : ''
-        }else{
+        } else {
           this.parentType = ''
           this.parentType = ''
         }
         }
       }
       }
@@ -125,7 +125,7 @@ export default {
     itemId (newValue, oldValue) {
     itemId (newValue, oldValue) {
       if (this.isShow && newValue) {
       if (this.isShow && newValue) {
         this.form.productTypeName = this.nowData && this.nowData.productTypeName ? this.nowData.productTypeName : ''
         this.form.productTypeName = this.nowData && this.nowData.productTypeName ? this.nowData.productTypeName : ''
-      }else{
+      } else {
         this.form.productTypeName = ''
         this.form.productTypeName = ''
       }
       }
     }
     }
@@ -136,11 +136,11 @@ export default {
 <style lang="less">
 <style lang="less">
   .productCategoryEdit-modal{
   .productCategoryEdit-modal{
     .ant-modal-body {
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     }
     .btn-cont {
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
     }
   }
   }
 </style>
 </style>

+ 4 - 4
src/views/productManagement/productCategory/list.vue

@@ -49,7 +49,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { dealerProductTypeQuery, dealerProductTypeDel } from '@/api/dealerProductType'
+import { dealerProductTypeList, dealerProductTypeDel } from '@/api/dealerProductType'
 import { STable } from '@/components'
 import { STable } from '@/components'
 import productCategoryEditModal from './editModal.vue'
 import productCategoryEditModal from './editModal.vue'
 export default {
 export default {
@@ -62,13 +62,13 @@ export default {
       },
       },
       columns: [
       columns: [
         { title: '分类名称', dataIndex: 'productTypeName', align: 'left' },
         { title: '分类名称', dataIndex: 'productTypeName', align: 'left' },
-        { title: '创建时间', dataIndex: 'createDate', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, align: 'center' }
+        { title: '创建时间', dataIndex: 'createDate', width: 320, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 300, align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        return dealerProductTypeQuery({}).then(res => {
+        return dealerProductTypeList().then(res => {
           //  递归去除空children
           //  递归去除空children
           this.recursionFun(res.data)
           this.recursionFun(res.data)
           if (res.data.length > 0) {
           if (res.data.length > 0) {

+ 11 - 11
src/views/productManagement/productInfo/detailModal.vue

@@ -11,15 +11,15 @@
     <!-- 产品详情 -->
     <!-- 产品详情 -->
     <div v-if="detailsData">
     <div v-if="detailsData">
       <a-descriptions bordered size="default">
       <a-descriptions bordered size="default">
-        <a-descriptions-item label="产品名称:">{{ detailsData.productName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="产品编码:">{{ detailsData.productCode || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品名称:">{{ detailsData.name || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品编码:">{{ detailsData.code || '--' }}</a-descriptions-item>
         <a-descriptions-item label="原厂编码:">{{ detailsData.origCode || '--' }}</a-descriptions-item>
         <a-descriptions-item label="原厂编码:">{{ detailsData.origCode || '--' }}</a-descriptions-item>
         <a-descriptions-item label="基本单位:">{{ detailsData.unit || '--' }}</a-descriptions-item>
         <a-descriptions-item label="基本单位:">{{ detailsData.unit || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品品牌:">{{ detailsData.productBrandName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品品牌:">{{ detailsData.productBrandName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品分类:">{{ productTypeName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品分类:">{{ productTypeName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="经销批发价:">{{ (detailsData.wholesalePrice || detailsData.wholesalePrice==0) ? detailsData.wholesalePrice : '--' }}</a-descriptions-item>
+        <a-descriptions-item label="经销批发价:">{{ (detailsData.specialPrice || detailsData.specialPrice==0) ? detailsData.specialPrice : '--' }}</a-descriptions-item>
         <a-descriptions-item label="终端价:">{{ (detailsData.terminalPrice || detailsData.terminalPrice==0) ? detailsData.terminalPrice : '--' }}</a-descriptions-item>
         <a-descriptions-item label="终端价:">{{ (detailsData.terminalPrice || detailsData.terminalPrice==0) ? detailsData.terminalPrice : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="车主价:">{{ (detailsData.carOwnerPrice || detailsData.carOwnerPrice==0) ? detailsData.carOwnerPrice : '--' }}</a-descriptions-item>
+        <a-descriptions-item label="车主价:">{{ (detailsData.carOwnersPrice || detailsData.carOwnersPrice==0) ? detailsData.carOwnersPrice : '--' }}</a-descriptions-item>
       </a-descriptions>
       </a-descriptions>
       <div class="btn-cont"><a-button id="product-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
       <div class="btn-cont"><a-button id="product-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
     </div>
     </div>
@@ -29,7 +29,7 @@
 <script>
 <script>
 import { dealerProductDetail } from '@/api/dealerProduct'
 import { dealerProductDetail } from '@/api/dealerProduct'
 export default {
 export default {
-  name: 'productInfoDetailModal',
+  name: 'ProductInfoDetailModal',
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
       type: Boolean,
       type: Boolean,
@@ -51,16 +51,16 @@ export default {
   data () {
   data () {
     return {
     return {
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
-      detailsData: null, //  详情数据
+      detailsData: null //  详情数据
     }
     }
   },
   },
   methods: {
   methods: {
     //  获取详情
     //  获取详情
-    getDetail(){
+    getDetail () {
       dealerProductDetail({ id: this.itemId }).then(res => {
       dealerProductDetail({ id: this.itemId }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.detailsData = res.data
           this.detailsData = res.data
-        }else{
+        } else {
           this.detailsData = null
           this.detailsData = null
         }
         }
       })
       })
@@ -89,11 +89,11 @@ export default {
 <style lang="less">
 <style lang="less">
   .productInfoDetail-modal{
   .productInfoDetail-modal{
     .ant-modal-body {
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     }
     .btn-cont {
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
     }
   }
   }
 </style>
 </style>

+ 65 - 50
src/views/productManagement/productInfo/edit.vue

@@ -8,20 +8,20 @@
       :label-col="formItemLayout.labelCol"
       :label-col="formItemLayout.labelCol"
       :wrapper-col="formItemLayout.wrapperCol"
       :wrapper-col="formItemLayout.wrapperCol"
     >
     >
-      <a-form-model-item label="产品名称" prop="productName">
+      <a-form-model-item label="产品名称" prop="name">
         <a-input
         <a-input
-          id="productInfoEdit-productName"
+          id="productInfoEdit-name"
           :maxLength="30"
           :maxLength="30"
-          v-model="form.productName"
+          v-model="form.name"
           placeholder="请输入产品名称(最多30个字符)"
           placeholder="请输入产品名称(最多30个字符)"
           allowClear />
           allowClear />
       </a-form-model-item>
       </a-form-model-item>
-      <a-form-model-item label="产品编码" prop="productCode">
+      <a-form-model-item label="产品编码" prop="code">
         <a-input
         <a-input
-          id="productInfoEdit-productCode"
+          id="productInfoEdit-code"
           :maxLength="30"
           :maxLength="30"
           :disabled="!!$route.params.id"
           :disabled="!!$route.params.id"
-          v-model="form.productCode"
+          v-model="form.code"
           placeholder="请输入产品编码(最多30个字符)"
           placeholder="请输入产品编码(最多30个字符)"
           allowClear />
           allowClear />
       </a-form-model-item>
       </a-form-model-item>
@@ -42,18 +42,35 @@
           allowClear />
           allowClear />
       </a-form-model-item>
       </a-form-model-item>
       <a-form-model-item label="产品品牌" prop="productBrandSn">
       <a-form-model-item label="产品品牌" prop="productBrandSn">
-        <a-select id="productInfoEdit-productBrand" placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增" :disabled="!!$route.params.id" allowClear v-model="form.productBrandSn" :showSearch="true" option-filter-prop="children" :filter-option="filterOption" style="width: 90%;">
-        	<a-select-option v-for="item in productBrandList" :key="item.productBrandSn" :value="item.productBrandSn" :disabled="item.enabledFlag==0">{{ item.productBrandName }}</a-select-option>
+        <a-select
+          id="productInfoEdit-productBrand"
+          placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
+          :disabled="!!$route.params.id"
+          allowClear
+          v-model="form.productBrandSn"
+          :showSearch="true"
+          option-filter-prop="children"
+          :filter-option="filterOption"
+          style="width: 90%;">
+          <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
         </a-select>
         </a-select>
         <a-button @click="openModal=true" icon="plus" size="small" id="productInfoEdit-add-btn" style="margin-left: 5px;"></a-button>
         <a-button @click="openModal=true" icon="plus" size="small" id="productInfoEdit-add-btn" style="margin-left: 5px;"></a-button>
       </a-form-model-item>
       </a-form-model-item>
       <a-form-model-item label="产品分类" prop="productType">
       <a-form-model-item label="产品分类" prop="productType">
-        <a-cascader :disabled="!!$route.params.id" @change="changeProductType" :options="productTypeList" :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }" id="productInfoEdit-productType" placeholder="请选择产品分类" allowClear v-model="form.productType" />
+        <a-cascader
+          :disabled="!!$route.params.id"
+          @change="changeProductType"
+          :options="productTypeList"
+          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+          id="productInfoEdit-productType"
+          placeholder="请选择产品分类"
+          allowClear
+          v-model="form.productType" />
       </a-form-model-item>
       </a-form-model-item>
-      <a-form-model-item label="经销批发价" prop="wholesalePrice">
+      <a-form-model-item label="经销批发价" prop="specialPrice">
         <a-input-number
         <a-input-number
-          id="productInfoEdit-wholesalePrice"
-          v-model="form.wholesalePrice"
+          id="productInfoEdit-specialPrice"
+          v-model="form.specialPrice"
           :min="0"
           :min="0"
           :max="999999"
           :max="999999"
           :precision="2"
           :precision="2"
@@ -72,10 +89,10 @@
           placeholder="请输入终端价(0~999999)"
           placeholder="请输入终端价(0~999999)"
           allowClear /><span>元</span>
           allowClear /><span>元</span>
       </a-form-model-item>
       </a-form-model-item>
-      <a-form-model-item label="车主价" prop="carOwnerPrice">
+      <a-form-model-item label="车主价" prop="carOwnersPrice">
         <a-input-number
         <a-input-number
-          id="productInfoEdit-carOwnerPrice"
-          v-model="form.carOwnerPrice"
+          id="productInfoEdit-carOwnersPrice"
+          v-model="form.carOwnersPrice"
           :min="0"
           :min="0"
           :max="999999"
           :max="999999"
           :precision="2"
           :precision="2"
@@ -97,10 +114,10 @@
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import productBrandEditModal from '../productBrand/editModal.vue'
 import productBrandEditModal from '../productBrand/editModal.vue'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeQuery } from '@/api/dealerProductType'
+import { dealerProductTypeList } from '@/api/dealerProductType'
 import { dealerProductSave, dealerProductDetail } from '@/api/dealerProduct'
 import { dealerProductSave, dealerProductDetail } from '@/api/dealerProduct'
 export default {
 export default {
-  name: 'productInfoEdit',
+  name: 'ProductInfoEdit',
   components: { STable, VSelect, productBrandEditModal },
   components: { STable, VSelect, productBrandEditModal },
   data () {
   data () {
     return {
     return {
@@ -109,16 +126,16 @@ export default {
         wrapperCol: { span: 16 }
         wrapperCol: { span: 16 }
       },
       },
       form: {
       form: {
-        productName: '', // 产品名称
-        productCode: '',  //  产品编码
-        origCode: '',  //  原厂编码
-        unit: '',  //  基本单位
-        productBrandSn: undefined,  //  产品品牌
-        productTypeSn3: '',  //  产品三级分类
+        name: '', // 产品名称
+        code: '', //  产品编码
+        origCode: '', //  原厂编码
+        unit: '', //  基本单位
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn3: '', //  产品三级分类
         productType: [], //  产品分类
         productType: [], //  产品分类
-        wholesalePrice: '',  //  经销价
-        terminalPrice: '',  //  终端价
-        carOwnerPrice: '',  //  车主价
+        specialPrice: '', //  经销价
+        terminalPrice: '', //  终端价
+        carOwnersPrice: '' //  车主价
       },
       },
       rules: {
       rules: {
         productName: [
         productName: [
@@ -132,11 +149,11 @@ export default {
         ],
         ],
         productType: [
         productType: [
           { required: true, message: '请选择产品分类', trigger: 'change' }
           { required: true, message: '请选择产品分类', trigger: 'change' }
-        ],
+        ]
       },
       },
-      productBrandList: [],  //  品牌下拉数据
-      productTypeList: [],  //  分类下拉数据
-      openModal: false,  //  新增编辑  弹框
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [], //  分类下拉数据
+      openModal: false //  新增编辑  弹框
     }
     }
   },
   },
   methods: {
   methods: {
@@ -149,7 +166,7 @@ export default {
           const productTypeSn2 = res.data.productTypeSn2 ? res.data.productTypeSn2 : ''
           const productTypeSn2 = res.data.productTypeSn2 ? res.data.productTypeSn2 : ''
           const productTypeSn3 = res.data.productTypeSn3 ? res.data.productTypeSn3 : ''
           const productTypeSn3 = res.data.productTypeSn3 ? res.data.productTypeSn3 : ''
           this.form.productType = [productTypeSn1, productTypeSn2, productTypeSn3]
           this.form.productType = [productTypeSn1, productTypeSn2, productTypeSn3]
-        }else{
+        } else {
           this.$refs.ruleForm.resetFields()
           this.$refs.ruleForm.resetFields()
         }
         }
       })
       })
@@ -178,48 +195,48 @@ export default {
       })
       })
     },
     },
     //  产品分类  change
     //  产品分类  change
-    changeProductType(val, opt){
+    changeProductType (val, opt) {
       this.form.productTypeSn3 = val[2] ? val[2] : ''
       this.form.productTypeSn3 = val[2] ? val[2] : ''
     },
     },
     //  新增品牌  成功
     //  新增品牌  成功
-    handleOk(){
+    handleOk () {
       //  获取品牌数据列表,并赋值
       //  获取品牌数据列表,并赋值
       this.getProductBrand('val')
       this.getProductBrand('val')
     },
     },
-    filterOption(input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     },
     //  返回
     //  返回
     goBack () {
     goBack () {
       this.$router.push({ path: '/productManagement/productInfo/list' })
       this.$router.push({ path: '/productManagement/productInfo/list' })
     },
     },
     //  产品品牌  列表
     //  产品品牌  列表
-    getProductBrand(val){
+    getProductBrand (val) {
       dealerProductBrandQuery({}).then(res => {
       dealerProductBrandQuery({}).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           this.productBrandList = res.data
           this.productBrandList = res.data
-          if(val){  //  需将新增加的品牌回填到产品品牌的地方,即不需要用户再选一下
-            this.form.productBrandSn = this.productBrandList[0].productBrandSn
+          if (val) { //  需将新增加的品牌回填到产品品牌的地方,即不需要用户再选一下
+            this.form.productBrandSn = this.productBrandList[this.productBrandList.length - 1].brandSn
           }
           }
-        }else{
+        } else {
           this.productBrandList = []
           this.productBrandList = []
         }
         }
       })
       })
     },
     },
     //  产品分类  列表
     //  产品分类  列表
-    getProductType(){
-      dealerProductTypeQuery({}).then(res => {
-        if(res.status == 200){
+    getProductType () {
+      dealerProductTypeList({}).then(res => {
+        if (res.status == 200) {
           this.productTypeList = res.data
           this.productTypeList = res.data
-        }else{
+        } else {
           this.productTypeList = []
           this.productTypeList = []
         }
         }
       })
       })
-    },
+    }
   },
   },
-  mounted(){  // 不使用beforeRouteEnter:由于页面路由动态id导致页面表现方式不同但路由相同,则会出现数据不重新请求问题
+  mounted () { // 不使用beforeRouteEnter:由于页面路由动态id导致页面表现方式不同但路由相同,则会出现数据不重新请求问题
     this.getProductBrand()
     this.getProductBrand()
     this.getProductType()
     this.getProductType()
     this.$refs.ruleForm.resetFields()
     this.$refs.ruleForm.resetFields()
@@ -229,5 +246,3 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
-
-<style lang="less"></style>

+ 92 - 80
src/views/productManagement/productInfo/list.vue

@@ -6,12 +6,12 @@
         <a-row :gutter="15">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
             <a-form-item label="产品编码">
-              <a-input id="productInfoList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="产品名称">
             <a-form-item label="产品名称">
-              <a-input id="productInfoList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
@@ -22,19 +22,28 @@
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品品牌">
               <a-form-item label="产品品牌">
-                <a-select placeholder="请选择" id="productInfoList-productBrandSn" allowClear v-model="queryParam.productBrandSn" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.productBrandSn" :value="item.productBrandSn">{{ item.productBrandName }}</a-select-option>
+                <a-select
+                  placeholder="请选择"
+                  id="productInfoList-productBrandSn"
+                  allowClear
+                  v-model="queryParam.productBrandSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
                 </a-select>
                 </a-select>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品分类">
               <a-form-item label="产品分类">
-                <a-cascader @change="changeProductType" change-on-select :options="productTypeList" :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }" id="productInfoList-productType" placeholder="请选择产品分类" allowClear />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="状态">
-                <v-select code="ENABLED_FLAG" id="productInfoList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="productInfoList-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
@@ -48,11 +57,22 @@
                   :placeholder="['开始时间', '结束时间']" />
                   :placeholder="['开始时间', '结束时间']" />
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select code="PRODUCT_STATUS" id="productInfoList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+              </a-form-item>
+            </a-col>
           </template>
           </template>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
             <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
-            <a-button style="margin: 0 0 18px 8px" type="danger" @click="handleExport" :disabled="disabled" :loading="exportLoading" id="inventoryQueryList-export">导出</a-button>
+            <!-- <a-button
+              style="margin: 0 0 18px 8px"
+              type="danger"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              id="inventoryQueryList-export">导出</a-button> -->
             <a @click="advanced=!advanced" style="margin-left: 8px">
             <a @click="advanced=!advanced" style="margin-left: 8px">
               {{ advanced ? '收起' : '展开' }}
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
               <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -64,7 +84,7 @@
     <!-- 操作按钮 -->
     <!-- 操作按钮 -->
     <div class="table-operator">
     <div class="table-operator">
       <a-button id="productInfoList-add" type="primary" @click="handleEdit()">新增产品</a-button>
       <a-button id="productInfoList-add" type="primary" @click="handleEdit()">新增产品</a-button>
-      <a-button id="productInfoList-import" @click="handleImport" style="margin: 0 15px;">批量导入产品</a-button>
+      <!-- <a-button id="productInfoList-import" @click="handleImport" style="margin: 0 15px;">批量导入产品</a-button> -->
     </div>
     </div>
     <!-- 列表 -->
     <!-- 列表 -->
     <s-table
     <s-table
@@ -74,29 +94,21 @@
       :rowKey="(record) => record.id"
       :rowKey="(record) => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
+      :scroll="{ x: 1500 }"
       bordered>
       bordered>
       <!-- 产品分类 -->
       <!-- 产品分类 -->
-      <!-- 自定义表头 -->
-      <template slot="productTypeCustomTitle">
-        <a-tooltip placement="top">
-          <template slot="title">
-            <span>列表中只显示第三级分类的名称,鼠标移动至文字上,查看上级分类。“>”为分隔符</span>
-          </template>
-          产品分类<a-icon type="question-circle" :style="{ color: '#ed1c24', marginLeft: '10px' }" />
-        </a-tooltip>
-      </template>
       <template slot="productType" slot-scope="text, record">
       <template slot="productType" slot-scope="text, record">
         <a-tooltip placement="top">
         <a-tooltip placement="top">
           <template slot="title">
           <template slot="title">
-            <span>{{record.productTypeName}}</span>
+            <span>{{ record.productTypeName }}</span>
           </template>
           </template>
-          {{record.productTypeName3}}
+          {{ record.productTypeName3 }}
         </a-tooltip>
         </a-tooltip>
       </template>
       </template>
       <!-- 状态 -->
       <!-- 状态 -->
       <template slot="enabledFlag" slot-scope="text, record">
       <template slot="enabledFlag" slot-scope="text, record">
         <a-switch
         <a-switch
-          id="productBrandList-enable"
+          id="productInfoList-enable"
           checkedChildren="启用"
           checkedChildren="启用"
           unCheckedChildren="禁用"
           unCheckedChildren="禁用"
           @change="changeStatus(record)"
           @change="changeStatus(record)"
@@ -117,7 +129,7 @@
 <script>
 <script>
 import moment from 'moment'
 import moment from 'moment'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeQuery } from '@/api/dealerProductType'
+import { dealerProductTypeList } from '@/api/dealerProductType'
 import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct'
 import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import productInfoDetailModal from './detailModal.vue'
 import productInfoDetailModal from './detailModal.vue'
@@ -125,38 +137,38 @@ export default {
   components: { STable, VSelect, productInfoDetailModal },
   components: { STable, VSelect, productInfoDetailModal },
   data () {
   data () {
     return {
     return {
-      advanced: false,  // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        productCode: '',  //  产品编码
-        productName: '', //  产品名称
-        origCode: '',  //  原厂编码
-        productBrandSn: undefined,  //  产品品牌
-        productTypeSn1: '',  //  产品一级分类
-        productTypeSn2: '',  //  产品二级分类
-        productTypeSn3: '',  //  产品三级分类
-        enabledFlag: undefined,  //  状态
-        beginDate: '',  //  创建时间  开始时间
-        endDate: '',  //  创建时间  结束时间
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        enabledFlag: undefined, //  状态
+        beginDate: '', //  创建时间  开始时间
+        endDate: '' //  创建时间  结束时间
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       exportLoading: false, // 导出loading
       dateFormat: 'YYYY-MM-DD',
       dateFormat: 'YYYY-MM-DD',
       columns: [
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: 200, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', width: 160, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { slots: { title: 'productTypeCustomTitle' }, scopedSlots: { customRender: 'productType' }, width: 180, align: 'center' },
-        { title: '终端价', dataIndex: 'terminalPrice', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 180, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'code', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '终端价', dataIndex: 'terminalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 140, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
-        return dealerProductList( Object.assign(parameter, this.queryParam) ).then(res => {
+        return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
           for (var i = 0; i < data.list.length; i++) {
@@ -170,10 +182,10 @@ export default {
           return data
           return data
         })
         })
       },
       },
-      openModal: false,  //  查看客户详情  弹框
-      itemId: '',  //  当前产品id
-      productBrandList: [],  //  品牌下拉数据
-      productTypeList: [],  //  分类下拉数据
+      openModal: false, //  查看客户详情  弹框
+      itemId: '', //  当前产品id
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [] //  分类下拉数据
     }
     }
   },
   },
   methods: {
   methods: {
@@ -182,7 +194,7 @@ export default {
       return date && date.valueOf() > Date.now()
       return date && date.valueOf() > Date.now()
     },
     },
     //  创建时间  change
     //  创建时间  change
-    creatTimechange(dates, dateStrings){
+    creatTimechange (dates, dateStrings) {
       this.queryParam.beginDate = dateStrings[0]
       this.queryParam.beginDate = dateStrings[0]
       this.queryParam.endDate = dateStrings[1]
       this.queryParam.endDate = dateStrings[1]
     },
     },
@@ -201,45 +213,45 @@ export default {
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     //  新增/编辑
     //  新增/编辑
-    handleEdit(row){
-      if(row){  //  编辑
+    handleEdit (row) {
+      if (row) { //  编辑
         this.$router.push({ path: `/productManagement/productInfo/edit/${row.id}` })
         this.$router.push({ path: `/productManagement/productInfo/edit/${row.id}` })
-      }else{  //  新增
+      } else { //  新增
         this.$router.push({ path: '/productManagement/productInfo/add' })
         this.$router.push({ path: '/productManagement/productInfo/add' })
       }
       }
     },
     },
     //  批量导入
     //  批量导入
-    handleImport(){
-      
+    handleImport () {
+
     },
     },
-    filterOption(input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     },
     //  详情
     //  详情
-    handleDetail(row){
+    handleDetail (row) {
       this.itemId = row.id
       this.itemId = row.id
       this.openModal = true
       this.openModal = true
     },
     },
     //  关闭弹框
     //  关闭弹框
-    closeModal(){
+    closeModal () {
       this.itemId = ''
       this.itemId = ''
       this.openModal = false
       this.openModal = false
     },
     },
     //  产品分类  change
     //  产品分类  change
-    changeProductType(val, opt){
+    changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
     },
     // 启用 禁用
     // 启用 禁用
     changeStatus (record) {
     changeStatus (record) {
-      if (record.enabledFlag=='1') {
+      if (record.enabledFlag == '1') {
         this.$confirm({
         this.$confirm({
           title: '提示',
           title: '提示',
           content: '产品被禁用后,不能再销售,确定禁用吗?',
           content: '产品被禁用后,不能再销售,确定禁用吗?',
-		  centered: true,
+          centered: true,
           onOk: () => {
           onOk: () => {
             this.setEnable(record)
             this.setEnable(record)
           }
           }
@@ -284,31 +296,31 @@ export default {
       link.click()
       link.click()
     },
     },
     //  产品品牌  列表
     //  产品品牌  列表
-    getProductBrand(){
+    getProductBrand () {
       dealerProductBrandQuery({}).then(res => {
       dealerProductBrandQuery({}).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           this.productBrandList = res.data
           this.productBrandList = res.data
-        }else{
+        } else {
           this.productBrandList = []
           this.productBrandList = []
         }
         }
       })
       })
     },
     },
     //  产品分类  列表
     //  产品分类  列表
-    getProductType(){
-      dealerProductTypeQuery({}).then(res => {
-        if(res.status == 200){
+    getProductType () {
+      dealerProductTypeList({}).then(res => {
+        if (res.status == 200) {
           this.productTypeList = res.data
           this.productTypeList = res.data
-        }else{
+        } else {
           this.productTypeList = []
           this.productTypeList = []
         }
         }
       })
       })
-    },
+    }
   },
   },
-  beforeRouteEnter(to, from, next) {
-  	next(vm => {
-  		vm.getProductBrand()
-  		vm.getProductType()
-  	})
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getProductBrand()
+      vm.getProductType()
+    })
   }
   }
 }
 }
-</script>
+</script>

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
     proxy: {
       '/api': {
       '/api': {
-        target: 'http://192.168.16.103:8503/qpls-md',
+        target: 'http://192.168.16.102:8503/qpls-md',
         // target: 'http://it.test.zyucgj.com/zyit',
         // target: 'http://it.test.zyucgj.com/zyit',
         // target: 'https://it.test.qiubcar.com/zyit',
         // target: 'https://it.test.qiubcar.com/zyit',
         ws: false,
         ws: false,

部分文件因为文件数量过多而无法显示