瀏覽代碼

产品定价

lilei 1 天之前
父節點
當前提交
102cb2c6e3

+ 24 - 7
src/config/router.config.js

@@ -3,6 +3,7 @@ import {
   UserLayout,
   BasicLayout,
   MobileLayout,
+  MobilePageLayout,
   BlankLayout,
   BigScreen,
   PageView
@@ -100,32 +101,48 @@ export const asyncMobileRouterMap = [
        {
          path: '/home',
          name: 'home',
-         component: () => import(/* webpackChunkName: "home" */ '@/mobile/Home'),
+         component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/Home'),
          meta: {
            title: '首页',
            icon: 'home',
            hidden: true
          }
-       },
+       }
+    ]
+  },
+  {
+    path: '/page',
+    name: 'page',
+    component: MobilePageLayout,
+    redirect: '/inventoryQuery',
+    children: [
        {
          path: '/inventoryQuery',
          name: 'inventoryQuery',
-         component: () => import(/* webpackChunkName: "inventoryManagement" */ '@/mobile/inventoryManagement/inventoryQuery/list.vue'),
+         component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/inventoryManagement/inventoryQuery/list.vue'),
          meta: {
            title: '库存查询',
            icon: 'monitor',
-           hidden: true,
            permission: 'M_inventoryQueryList'
          }
        },
        {
-         path: 'productPricing',
+         path: '/warehouseDetail/:sn/:warehouseSn',
+         name: 'inventoryQueryWarehouseDetail',
+         component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/inventoryManagement/inventoryQuery/warehouseDetail.vue'),
+         meta: {
+           title: '出入库明细',
+           icon: 'monitor',
+           permission: 'B_inventoryQuery_rkDetail'
+         }
+       },
+       {
+         path: '/productPricing',
          name: 'productPricing',
-         component: () => import(/* webpackChunkName: "productManagement" */ '@/mobile/productManagement/productPricing/list.vue'),
+         component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/productManagement/productPricing/list.vue'),
          meta: {
            title: '产品定价',
            icon: 'transaction',
-           hidden: true,
            permission: 'M_productPricingList'
          }
        }

+ 2 - 5
src/layouts/MobileLayout.vue

@@ -43,13 +43,10 @@ export default {
   <a-layout id="components-layout-mobile-fixed">
     <a-layout-header :style="{ position: 'fixed', zIndex: 1, width: '100%',padding:'0 10px' }">
       <div class="logo">
+        <img src="@/assets/logo.png" height="30px">
         运营中心系统
       </div>
       <div class="user-wrapper">
-        <a href="javascript:;" style="margin:0 10px;color: #fff;" @click="handleToHome">
-          <a-icon type="home"/>
-          <span style="margin: 0 5px;">返回首页</span>
-        </a>
         <a-icon type="user" />
         <span style="margin: 0 5px;">{{ nickname }}</span>
         <a href="javascript:;" style="margin-left: 10px;color: #ff5500;" @click="handleLogout">
@@ -76,7 +73,7 @@ export default {
   overflow: auto;
 }
 #components-layout-mobile-fixed .logo {
-  width: 100px;
+  width: 140px;
   height: 31px;
   line-height:31px;
   color: #fff;

+ 90 - 0
src/layouts/MobilePageLayout.vue

@@ -0,0 +1,90 @@
+<script>
+import { mixin } from '@/utils/mixin'
+import { mapActions, mapGetters } from 'vuex'
+export default {
+  name: 'MobilePageLayout',
+  components: {
+  },
+  mixins: [mixin],
+  computed: {
+    ...mapGetters(['nickname', 'avatar']),
+    title () {
+      return this.$route.meta.title
+    }
+  },
+  methods: {
+    ...mapActions(['Logout']),
+    handleLogout () {
+      this.$confirm({
+        title: '提示',
+        content: '确定要退出登录吗 ?',
+        centered: true,
+        onOk: () => {
+          return this.Logout({}).then(() => {
+            setTimeout(() => {
+              this.$router.push({ path: '/user/login' })
+            }, 16)
+          }).catch(err => {
+            this.$message.error({
+              title: '错误',
+              description: err.message
+            })
+          })
+        },
+        onCancel () {
+        }
+      })
+    },
+    handleToHome () {
+      this.$router.go(-1)
+    }
+  }
+}
+</script>
+
+<template>
+  <a-layout id="components-layout-mobile-page">
+    <a-layout-header :style="{ position: 'fixed', zIndex: 1, width: '100%',padding:'0 10px' }">
+      <a href="javascript:;" class="icon-back" style="margin:0 10px;color: #fff;" @click="handleToHome">
+        <a-icon type="left"/>
+        <span style="margin: 0 5px;">返回</span>
+      </a>
+      <div class="logo">
+        {{ title }}
+      </div>
+    </a-layout-header>
+    <a-layout-content :style="{ padding: '0', marginTop: '64px' }">
+      <div style="padding:10px;">
+        <keep-alive>
+          <router-view :key="$route.name"></router-view>
+        </keep-alive>
+      </div>
+    </a-layout-content>
+  </a-layout>
+</template>
+<style>
+.envtipsBox{
+  display:none;
+}
+#components-layout-mobile-page{
+  height: 100%;
+  overflow: auto;
+}
+#components-layout-mobile-page .logo {
+  width: 100px;
+  height: 31px;
+  line-height:31px;
+  color: #fff;
+  margin: 16px 15px 16px 0;
+  text-align: center;
+  font-weight: 900;
+  position: absolute;
+  width: 100%;
+  z-index: -1;
+}
+#components-layout-mobile-page .icon-back{
+  z-index: 10000;
+  color: #fff;
+  float: left;
+}
+</style>

+ 2 - 1
src/layouts/index.js

@@ -5,5 +5,6 @@ import RouteView from './RouteView'
 import PageView from './PageView'
 import BigScreen from './BigScreen'
 import MobileLayout from './MobileLayout'
+import MobilePageLayout from './MobilePageLayout'
 
-export { UserLayout, BasicLayout, BlankLayout, RouteView, PageView, BigScreen, MobileLayout }
+export { UserLayout, BasicLayout, BlankLayout, RouteView, PageView, BigScreen, MobileLayout, MobilePageLayout }

+ 0 - 107
src/mobile/inventoryManagement/inventoryQuery/exportExcelModal.vue

@@ -1,107 +0,0 @@
-<template>
-  <a-modal
-    centered
-    :footer="null"
-    :maskClosable="false"
-    class="export-excel-modal"
-    title="选择导出方式"
-    v-model="isShow"
-    @cancel="isShow=false"
-    :width="600">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-form-model
-        id="export-excel-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="导出库存" prop="exportType">
-          <a-radio-group v-model="form.exportType" id="export-excel-radio">
-            <a-radio value="all" id="export-excel-radio-all">所有</a-radio>
-            <a-radio value="type" id="export-excel-radio-type">分类汇总导出</a-radio>
-          </a-radio-group>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="export-excel-save" @click="handleSave()">导出</a-button>
-        <a-button id="export-excel-back" @click="handleCancel" style="margin-left: 15px;">取消</a-button>
-      </div>
-    </a-spin>
-  </a-modal>
-</template>
-
-<script>
-export default {
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    itemData: {
-      type: Object,
-      default: () => {
-        return null
-      }
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      form: {
-        exportType: 'all' // 导出方式
-      },
-      rules: {
-        exportType: [{ required: true, message: '请选择导出方式', trigger: 'change' }]
-      },
-      formItemLayout: {
-        labelCol: { span: 6 },
-        wrapperCol: { span: 18 }
-      },
-      spinning: false
-    }
-  },
-  methods: {
-    // 确认
-    handleSave (isPrint) {
-      const _this = this
-      this.$store.state.app.curActionPermission = 'B_inventoryQuery_export'
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          _this.$emit('ok', _this.form.exportType)
-          _this.isShow = false
-        } else {
-          return false
-        }
-      })
-    },
-    // 取消选择分类
-    handleCancel () {
-      this.isShow = false
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-        this.$refs.ruleForm.resetFields()
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .export-excel-modal{
-    .btn-cont {
-      text-align: center;
-      margin: 35px 0 10px;
-    }
-  }
-</style>

+ 61 - 79
src/mobile/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -1,12 +1,6 @@
 <template>
   <div class="inventoryQueryWarehouseDetail-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="inventoryQueryWarehouseDetail-back">
-        <!-- 自定义的二级文字标题 -->
-        <template slot="subTitle">
-          <a id="inventoryQueryWarehouseDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        </template>
-      </a-page-header>
       <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-cont">
         <!-- 搜索条件 -->
         <div ref="tableSearch" class="table-page-search-wrapper">
@@ -67,18 +61,9 @@
                   </a-form-item>
                 </a-col>
               </template>
-              <a-col :md="6" :sm="24">
+              <a-col :md="6" :sm="24" style="text-align:center;">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-reset">重置</a-button>
-                <a-button
-                  type="primary"
-                  style="margin-left: 5px"
-                  class="button-warning"
-                  v-if="$hasPermissions('B_inventoryQuery_rkDetail_export')"
-                  @click="handleExcel"
-                  :disabled="disabled"
-                  :loading="exportLoading"
-                  id="inventoryQueryList-export">导出</a-button>
                 <a @click="advanced=!advanced" style="margin-left: 5px" id="inventoryQueryList-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -88,7 +73,7 @@
           </a-form>
         </div>
         <!-- 合计 -->
-        <a-alert type="info" style="margin-bottom:10px">
+        <a-alert type="info" style="margin:10px 0">
           <div class="ftext" slot="message">
             当前库存总数量:<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}个</strong>;
             入库总数量:<strong>{{ (productTotal&&(productTotal.totalPutQty || productTotal.totalPutQty==0)) ? productTotal.totalPutQty : '--' }}个</strong>;
@@ -98,27 +83,44 @@
         </a-alert>
         <!-- 列表 -->
         <s-table
-          class="sTable fixPagination"
+          class="sTable"
           ref="table"
-          :style="{ height: tableHeight+70+'px' }"
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
-          bordered>
-          <!-- 数量 -->
-          <template slot="qty" slot-scope="text, record">
-            <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
-              <span v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</span>
-              {{ record.qty }}
-            </p>
-          </template>
-          <!-- 总售价 -->
-          <template slot="totalAmount" slot-scope="text, record">
-            <span v-if="record.bizType!='SPARE_PARTS_RETURN'"> {{ toThousands(record.totalPrice) }}</span>
-            <span v-else>--</span>
+        >
+          <template slot="productInfo" slot-scope="text, record">
+            <div class="tr-row">
+              <div class="tr-title">{{ record.productName }}</div>
+              <div>产品编码:<span class="code">{{ record.productCode }}</span></div>
+              <div>原厂编码:<span>{{ record.productOrigCode ||'--' }}</span></div>
+              <div>批次号:<span>{{ record.stockBatchNo ||'--' }}</span></div>
+              <div>单据类型:<span>{{ record.bizTypeDictValue ||'--' }}</span></div>
+              <div>关联单号:<span>{{ record.bizNo ||'--' }}</span></div>
+              <div>下推单号:<span>{{ record.bizSubNo ||'--' }}</span></div>
+              <div>单据审核时间:<span>{{ record.auditTime ||'--' }}</span></div>
+              <div>单位名称:<span>{{ record.unitName ||'--' }}</span></div>
+              <div>仓库仓位:<span>{{ record.warehouseName }}</span>><span>{{ record.warehouseLocationName }}</span></div>
+              <div style="display: flex;">
+                <div>数量:
+                  <span :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
+                    <b v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</b>
+                    {{ record.qty }}
+                  </span>
+                </div>
+                <div style="margin-left: 15px;" v-if="$hasPermissions('B_inventoryQuery_rkDetail_costPrice')">
+                  总成本:<span>{{ toThousands(record.totalCost) }}</span>
+                </div>
+                <div style="margin-left: 15px;" v-if="$hasPermissions('B_inventoryQuery_rkDetail_salesPrice')">
+                  总售价:
+                  <span v-if="record.bizType!='SPARE_PARTS_RETURN'"> {{ toThousands(record.totalPrice) }}</span>
+                  <span v-else>--</span>
+                </div>
+              </div>
+              <div>出入库状态:<span>{{ record.stateDictValue }}</span></div>
+            </div>
           </template>
         </s-table>
       </a-card>
@@ -130,8 +132,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { stockFlowCount, stockFlowList, stockFlowExport } from '@/api/stock'
+import { stockFlowCount, stockFlowList } from '@/api/stock'
 export default {
   name: 'InventoryQueryWarehouseDetail',
   mixins: [commonMixin],
@@ -184,31 +185,10 @@ export default {
   },
   computed: {
     columns () {
-      const _this = this
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '批次号', dataIndex: 'stockBatchNo', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '关联单号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '下推单号', dataIndex: 'bizSubNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'unitName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '数量', scopedSlots: { customRender: 'qty' }, width: '5%', align: 'center' },
-        // { title: '总成本', dataIndex: 'totalCost', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '总售价', dataIndex: 'totalPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '出入库状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
+        { title: '产品信息', scopedSlots: { customRender: 'productInfo' }, width: '90%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_inventoryQuery_rkDetail_costPrice')) { // 成本价权限
-        arr.splice(13, 0, { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
-      if (this.$hasPermissions('B_inventoryQuery_rkDetail_salesPrice')) { // 售价权限
-        arr.splice(14, 0, { title: '总售价', width: '5%', align: 'right', scopedSlots: { customRender: 'totalAmount' } })
-      }
       return arr
     }
   },
@@ -242,23 +222,6 @@ export default {
       this.queryParam.state = undefined
       this.$refs.table.refresh(true)
     },
-    // 导出
-    handleExcel () {
-      const _this = this
-      this.$store.state.app.curActionPermission = 'B_inventoryQuery_rkDetail_export'
-      const params = Object.assign(this.queryParam, { productSn: this.$route.params.sn, warehouseSn: this.$route.params.warehouseSn })
-      this.exportLoading = true
-      this.spinning = true
-      hdExportExcel(stockFlowExport, params, '出入库明细', function () {
-        _this.exportLoading = false
-        _this.spinning = false
-        _this.$store.state.app.curActionPermission = ''
-      })
-    },
-    //  返回列表
-    handleBack () {
-      this.$router.push({ name: 'inventoryQueryList', query: { closeLastOldTab: true } })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -308,11 +271,30 @@ export default {
     .inventoryQueryWarehouseDetail-cont{
       margin-bottom: 6px;
     }
-    .green{
-      color: #19be6b;
-    }
-    .red{
-      color: #ed1c24;
+    .tr-row{
+      text-align: left;
+      .tr-title{
+        font-weight: bold;
+      }
+      > div{
+        padding: 2px 0;
+        color: #666;
+        span{
+          color: #222;
+        }
+        .green{
+          color: #19be6b;
+        }
+        .red{
+          color: #ed1c24;
+        }
+        .code{
+          color: #00aaff;
+        }
+        .nums{
+          color: #ff0000;
+        }
+      }
     }
   }
 </style>

+ 0 - 202
src/mobile/productManagement/productPricing/chooseImportModal.vue

@@ -1,202 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="chooseImport-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="导入"
-    v-model="isShow"
-    @cancel="isShow=false"
-    :width="900">
-    <div class="chooseImport-con">
-      <!-- 可导入数据 -->
-      <p class="">可导入数据{{ loadData.length }}条</p>
-      <a-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.allocateSn"
-        :columns="nowColumns"
-        :dataSource="loadData"
-        :loading="loading"
-        :scroll="{ y: 200 }"
-        :pagination="false"
-        bordered>
-      </a-table>
-      <a-divider />
-      <!-- 不可导入数据 -->
-      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
-      <a-table
-        class="unTable"
-        ref="unTable"
-        size="small"
-        :rowKey="(record) => record.errorDesc"
-        :columns="nowUnColumns"
-        :dataSource="unLoadData"
-        :loading="loading"
-        :scroll="{ y: 200 }"
-        :pagination="false"
-        bordered>
-      </a-table>
-      <!-- 按钮 -->
-      <div class="btn-con">
-        <a-button
-          type="primary"
-          id="chooseImport-submit"
-          size="large"
-          :class="loadData.length==0?'button-grey':'button-primary'"
-          @click="handleSubmit"
-          style="padding: 0 40px;">确认导入</a-button>
-        <a-button
-          id="chooseImport-cancel"
-          size="large"
-          class="button-cancel"
-          @click="isShow=false"
-          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
-        <a-button
-          type="primary"
-          id="chooseImport-error"
-          size="large"
-          class="button-error"
-          @click="handleError"
-          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
-      </div>
-    </div>
-  </a-modal>
-</template>
-
-<script>
-import { commonMixin } from '@/utils/mixin'
-import { hdExportExcel } from '@/libs/exportExcel'
-// 接口
-import { productPriceImport, productPriceFailExcel } from '@/api/product'
-export default {
-  name: 'ChooseImportModal',
-  mixins: [commonMixin],
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    paramsData: {// 导入数据
-      type: Object,
-      default: () => {
-        return {}
-      }
-    }
-  },
-  data () {
-    const _this = this
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      nowColumns: [
-        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
-        { title: '产品名称', dataIndex: 'name', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'code', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '变更原因', dataIndex: 'changeReason', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      loadData: [], // 可导入数据
-      nowUnColumns: [
-        { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
-        { title: '产品名称', dataIndex: 'name', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'code', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '变更原因', dataIndex: 'changeReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'errorMsg', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      unLoadData: [], // 导入错误数据
-      loading: false// 列表加载状态
-    }
-  },
-  methods: {
-    // 获取导入列表数据
-    getData () {
-      const _this = this
-      this.loading = true
-      const params = {
-        path: this.paramsData.path
-      }
-      productPriceImport(params).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          if (res.data.rightList && res.data.rightList.length > 0) {
-            res.data.rightList.map((item, index) => {
-              item.no = index + 1
-            })
-          }
-          if (res.data.errorList && res.data.errorList.length > 0) {
-            res.data.errorList.map((item, index) => {
-              item.no = index + 1
-            })
-          }
-          _this.loadData = res.data.rightList || []
-          _this.unLoadData = res.data.errorList || []
-        }
-      })
-    },
-    // 确认导入
-    handleSubmit () {
-      if (this.loadData.length == 0) {
-        this.$message.warning('无可导入产品!')
-      } else {
-        this.$emit('ok', this.loadData)
-        this.isShow = false
-      }
-    },
-    // 导出错误项
-    handleError () {
-      const _this = this
-      if (_this.unLoadData.length < 1) {
-        _this.$message.info('暂无可导出的错误项~')
-        return
-      }
-      _this.spinning = true
-      hdExportExcel(productPriceFailExcel, _this.unLoadData, '产品定价错误项', function () {
-        _this.spinning = false
-      })
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-        this.loadData = []
-        this.unLoadData = []
-      } else {
-        this.getData()
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  .chooseImport-modal{
-    .chooseImport-con{
-      .red{
-        color: #f30;
-      }
-      .btn-con{
-        text-align: center;
-        margin: 30px 0 20px;
-        .button-cancel,.button-error{
-          font-size: 12px;
-        }
-      }
-    }
-  }
-</style>

+ 0 - 208
src/mobile/productManagement/productPricing/importGuideModal.vue

@@ -1,208 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="importGuide-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="导入"
-    v-model="isShow"
-    @cancel="isShow=false"
-    :width="750">
-    <div class="importGuide-con">
-      <div class="explain-con">
-        <div class="explain-item">
-          <div class="explain-tit">
-            <span>1</span>准备导入
-          </div>
-          <ul>
-            <li>1) 导入的Excel文件中必须包含名为“产品编码”的列,且名称必须相同</li>
-            <li>2) “产品编码”必须是列表中已存在的产品</li>
-            <li>3) 产品首次定价,省级价、市级价、特约价不可为空,再次定价导入时可为空,为空表示不对原有价格做改变</li>
-          </ul>
-          <a-button
-            id="importGuide-download"
-            type="link"
-            icon="download"
-            style="padding: 0 0 0 23px;"
-            :loading="exportLoading"
-            @click="handleExport">下载导入模板</a-button>
-        </div>
-        <div class="explain-item">
-          <div class="explain-tit">
-            <span>2</span>上传数据文件
-          </div>
-          <p>目前支持的文件类型*.xls,*.xlsx.</p>
-          <div style="overflow: hidden;padding-left: 23px;">
-            <Upload
-              id="importGuide-attachList"
-              ref="importUpload"
-              :maxNums="1"
-              fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
-              uploadType="import"
-              :action="attachAction"
-              :uploadParams="uploadParams"
-              upText="添加文件"
-              @change="changeImport"></Upload>
-          </div>
-        </div>
-      </div>
-      <!-- 按钮 -->
-      <div class="btn-con">
-        <a-button
-          type="primary"
-          id="importGuide-nextStep"
-          size="large"
-          class="button-primary"
-          @click="handlerNextStep"
-          style="padding: 0 60px;">下一步</a-button>
-        <a-button
-          id="importGuide-cancel"
-          size="large"
-          class="button-cancel"
-          @click="isShow=false"
-          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
-      </div>
-    </div>
-    <!-- 导入 -->
-    <chooseImportModal :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
-  </a-modal>
-</template>
-
-<script>
-import { hdExportExcel } from '@/libs/exportExcel'
-// 组件
-import ChooseImportModal from './chooseImportModal.vue'
-import { Upload } from '@/components'
-// 接口
-import { productPriceTplDownload } from '@/api/product'
-export default {
-  name: 'ImportGuideModal',
-  components: { ChooseImportModal, Upload },
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    params: {
-      type: Object,
-      default: null
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      exportLoading: false, // 导出按钮加载状态
-      openImportModal: false, //  打开导入详情弹窗
-      attachAction: process.env.VUE_APP_API_BASE_URL + '/upload', // 上传文件地址
-      paramsData: null, // 导入数据
-      uploadParams: {// 上传文件参数
-        savePathType: 'local'
-      }
-    }
-  },
-  methods: {
-    // 下一步
-    handlerNextStep () {
-      if (this.paramsData) {
-        this.openImportModal = true
-      } else {
-        this.$message.warning('添加文件后再进行下一步操作!')
-      }
-    },
-    // 上传文件  change
-    changeImport (file) {
-      if (file) {
-        this.paramsData = {
-          path: file
-        }
-      }
-    },
-    // 导入
-    hanldeOk (obj) {
-      if (obj && obj.length > 0) {
-        this.$emit('ok', obj)
-        this.isShow = false
-      }
-    },
-    // 关闭
-    handleClose () {
-      this.openImportModal = false
-      this.isShow = false
-    },
-    //  导出
-    handleExport () {
-      const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      setTimeout(() => {
-        _this.exportLoading = false
-      }, 1000)
-      hdExportExcel(productPriceTplDownload, {}, '产品定价导入模板', function () {
-        _this.spinning = false
-      })
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-        this.paramsData = null
-        this.$refs.importUpload.setFileList('')
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  .importGuide-modal{
-    .importGuide-con{
-      .explain-con{
-        .explain-item{
-          margin-bottom: 10px;
-          .explain-tit{
-            font-weight: bold;
-            span{
-              display: inline-block;
-              width: 18px;
-              height: 18px;
-              line-height: 16px;
-              text-align: center;
-              margin-right: 5px;
-              border-radius: 50%;
-              border: 1px solid rgba(0, 0, 0, 0.3);
-            }
-          }
-          p{
-            margin: 8px 0;
-            padding-left: 23px;
-          }
-          ul{
-            list-style: none;
-            padding: 0;
-            padding-left: 23px;
-            margin: 0;
-            li{
-              line-height: 26px;
-            }
-          }
-        }
-        #importGuide-attachList{
-          width: 100%;
-        }
-      }
-      .btn-con{
-        margin: 10px 0 20px;
-        text-align: center;
-        .button-cancel{
-          font-size: 12px;
-        }
-      }
-    }
-  }
-</style>

+ 79 - 76
src/mobile/productManagement/productPricing/list.vue

@@ -37,17 +37,9 @@
                 </a-form-item>
               </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 0;text-align: center;">
               <a-button type="primary" @click="searchForm" :disabled="disabled" id="productPricingList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productPricingList-reset">重置</a-button>
-              <a-button
-                style="margin-left: 5px"
-                type="primary"
-                class="button-warning"
-                @click="handleExport"
-                :disabled="disabled"
-                v-if="$hasPermissions('B_ProductPriceExoprt')"
-                id="productPricingList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -57,17 +49,10 @@
         </a-form>
       </div>
     </a-card>
-    <a-card size="small" :bordered="false">
+    <a-card size="small" :bordered="false" style="margin-top: 10px;">
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 操作按钮 -->
         <div class="table-operator">
-          <a-button
-            style="margin: 0 10px 0 0;"
-            v-if="$hasPermissions('B_productPriceImport')"
-            id="productPricingList-add"
-            @click="openGuideModal=true"
-            type="primary"
-          >定价导入</a-button>
           <a-button
             id="productPricingList-batchAudit"
             type="primary"
@@ -80,33 +65,60 @@
         </div>
         <!-- 列表 -->
         <s-table
-          class="sTable fixPagination"
+          style="margin-top: 10px;"
+          class="sTable"
           ref="table"
-          :style="{ height: tableHeight+70+'px' }"
           size="small"
           :row-selection="$hasPermissions('B_productPricing_audit') ? { columnWidth: '4%', getCheckboxProps: record => ({ props: { disabled: record.pricingState!='WAIT_PRICING_AUDIT' } })}: null"
           @rowSelection="rowSelectionFun"
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{y: tableHeight }"
           :defaultLoadData="false"
-          bordered>
-          <!-- 产品分类 -->
-          <template slot="productType" slot-scope="text, record">
-            <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-            <span v-else>--</span>
-          </template>
-          <!-- 成本价 -->
-          <template slot="sterminaldsdPrice" slot-scope="text, record">
-            <div v-if="record.supplierProductList">
-              <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">
-                <span>{{ (item.cost || item.cost==0) ? item.cost.toFixed(2):'--' }}</span>元 -
-                <span>{{ (item.supplierName||'') }}</span>;
-              </p>
+        >
+          <template slot="productInfo" slot-scope="text, record">
+            <div class="tr-row">
+              <div class="tr-title">{{ record.name }}</div>
+              <div>创建时间':<span>{{ record.createDate ||'--' }}</span></div>
+              <div>产品编码:<span class="code">{{ record.code }}</span></div>
+              <div>原厂编码:<span>{{ record.origCode ||'--' }}</span></div>
+              <div>品牌:<span>{{ record.productBrandName ||'--' }}</span></div>
+              <div>产品分类:
+                <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+                <span v-else>--</span>
+              </div>
+              <div>产品状态:<span style="margin-right: 10px;">{{ record.stateDictValue ||'--' }}</span> 定价状态:<span>{{ record.pricingStateDictValue ||'--' }}</span></div>
+              <div>定价时间:<span>{{ record.pricingTime ||'--' }}</span></div>
+              <div style="display: flex;">
+                成本价:
+                <div style="width:80%" v-if="record.supplierProductList">
+                  <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">
+                    <span class="red">{{ (item.cost || item.cost==0) ? item.cost.toFixed(2):'--' }}</span> 元
+                    ({{ (item.supplierName||'') }});
+                  </p>
+                </div>
+                <span v-else>--</span>
+              </div>
+              <div style="display: flex;flex-wrap: wrap;">
+                <div style="margin-right: 10px;">
+                  省级价:<span class="red">{{ toThousands(record.provincePrice) }}</span>
+                </div>
+                <div style="margin-right: 10px;">
+                  市级价:<span class="red">{{ toThousands(record.cityPrice) }}</span>
+                </div>
+                <div style="margin-right: 10px;">
+                  特约价:<span class="red">{{ toThousands(record.specialPrice) }}</span>
+                </div>
+                <div style="margin-right: 10px;">
+                  终端价:<span class="red">{{ toThousands(record.terminalPrice) }}</span>
+                </div>
+                <div>
+                  车主价:<span class="red">{{ toThousands(record.carOwnersPrice) }}</span>
+                </div>
+              </div>
             </div>
-            <span v-else>--</span>
           </template>
+
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
@@ -118,6 +130,7 @@
               :id="'productPricingList-audit-btn'+record.id">审核</a-button>
             <a-button
               size="small"
+              style="margin-top: 15px;"
               type="link"
               v-if="$hasPermissions('B_productPricing_edit')"
               class="button-info"
@@ -131,8 +144,6 @@
       <product-pricing-edit-modal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" @ok="$refs.table.refresh()" />
       <!-- 审核价格 -->
       <product-pricing-audit-modal v-drag :openModal="openPriceAuditModal" :itemSn="itemSn" @close="closeAuditModal" @ok="auditSuccess" />
-      <!-- 导入产品 -->
-      <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
       <!-- 审核弹窗 -->
       <a-modal
         closable
@@ -168,7 +179,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { exportExcel } from '@/libs/JGPrint.js'
 // 组件
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
@@ -176,19 +186,17 @@ import productPricingEditModal from './editModal.vue'
 import productPricingAuditModal from './auditModal.vue'
 import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
-import ImportGuideModal from './importGuideModal.vue'
 // 接口
-import { productPricingList, productExportPricing, batchAuditPrice, productPriceInsertImport } from '@/api/product'
+import { productPricingList, batchAuditPrice } from '@/api/product'
 export default {
   name: 'ProductPricingList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, productPricingEditModal, productPricingAuditModal, ProductBrand, ProductType, ImportGuideModal },
+  components: { STable, VSelect, rangeDate, productPricingEditModal, productPricingAuditModal, ProductBrand, ProductType },
   data () {
     return {
       spinning: false,
-      advanced: true, // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
-      openGuideModal: false, // 打开定价导入弹窗
       tableHeight: 0, // 表格高度
       time: [], // 定价时间
       //  查询条件
@@ -239,24 +247,9 @@ export default {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys ? this.rowSelectionInfo.selectedRowKeys.length : 0
     },
     columns () {
-      const _this = this
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', align: 'left', width: '13%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'code', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productBrandName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '11%', align: 'left' },
-        { title: '产品状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '定价时间', dataIndex: 'pricingTime', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', scopedSlots: { customRender: 'sterminaldsdPrice' }, width: '7%', align: 'center' },
-        { title: '省级价', dataIndex: 'provincePrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '市级价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '特约价', dataIndex: 'specialPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
+        { title: '产品信息', scopedSlots: { customRender: 'productInfo' }, width: '82%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       return arr
@@ -314,23 +307,6 @@ export default {
       }
       _this.openAuditModal = true
     },
-    // 导入产品
-    hanldeOk (obj) {
-      productPriceInsertImport(obj).then(res => {
-        if (res.status == 200) {
-          this.resetSearchForm()
-        }
-      })
-    },
-    //  导出
-    handleExport () {
-      const _this = this
-      const params = this.queryParam
-      this.spinning = true
-      exportExcel(productExportPricing, params, '产品价格导出', function () {
-        _this.spinning = false
-      })
-    },
     //  编辑
     handleEdit (row) {
       this.itemSn = row.productSn
@@ -424,3 +400,30 @@ export default {
   }
 }
 </script>
+<style lang="less">
+  .tr-row{
+    text-align: left;
+    .tr-title{
+      font-weight: bold;
+    }
+    > div{
+      padding: 2px 0;
+      color: #666;
+      span{
+        color: #222;
+      }
+      .green{
+        color: #19be6b;
+      }
+      .red{
+        color: #ed1c24;
+      }
+      .code{
+        color: #00aaff;
+      }
+      .nums{
+        color: #ff0000;
+      }
+    }
+  }
+</style>