lilei 2 éve
szülő
commit
b43e9d5145

+ 3 - 3
src/utils/request.js

@@ -26,7 +26,7 @@ const service = axios.create({
 })
 
 const err = (error) => {
-  console.log(error, error.response.data,error.message,'error')
+  console.log(error.response)
   const config = error.config
   // 网络连接出错
   if (error.message.indexOf('Network Error') >= 0) {
@@ -44,7 +44,7 @@ const err = (error) => {
     const status = error.response.status
     const resData = error.response.data
     console.log(status,resData)
-    if ((status == 503 || status == 502 || status == 500 || status == 404)) {
+    if ((status == 503 || status == 500 || status == 404)) {
       notification.destroy()
       if(resData instanceof Blob){
         resData.text().then(data => {
@@ -57,7 +57,7 @@ const err = (error) => {
       }else{
         notification.error({
           message: '提示',
-          description: resData.message
+          description: resData.message || error.response.statusText
         })
       }
     }

+ 4 - 4
src/views/allocationManagement/transferOut/printModal.vue

@@ -38,8 +38,8 @@
         </a-form-model-item>
         <a-form-model-item label="产品价格" prop="priceType" v-if="nowType=='dbPrint'||nowType=='dbExport'">
           <a-radio-group v-model="form.priceType">
-            <a-radio value="ALLOCATE_BILL_PRICE">销售价</a-radio>
-            <a-radio value="ALLOCATE_BILL_COST">成本价</a-radio>
+            <a-radio value="ALLOCATE_BILL_PRICE" v-if="$hasPermissions('B_transferOut_print_salesPrice')">销售价</a-radio>
+            <a-radio value="ALLOCATE_BILL_COST" v-if="$hasPermissions('B_transferOut_print_costPrice')">成本价</a-radio>
             <a-radio value="ALLOCATE_BILL">不打印</a-radio>
           </a-radio-group>
         </a-form-model-item>
@@ -94,7 +94,7 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       form: {
         id: 'all',
-        priceType: undefined,
+        priceType: 'ALLOCATE_BILL',
         orderBy: undefined
       },
       rules: {
@@ -197,7 +197,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.form = {
         id: 'all',
-        priceType: undefined
+        priceType: 'ALLOCATE_BILL'
       }
     }
   },

+ 2 - 1
src/views/dealerManagement/rebateSettings/list.vue

@@ -23,7 +23,8 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"

+ 0 - 160
src/views/power/user/updateAreal.vue

@@ -1,160 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="user-modal"
-    :footer="null"
-    :maskClosable="false"
-    :title="title"
-    v-model="isShow"
-    @cancel="isShow=false"
-    :width="600">
-    <div>
-      <a-spin :spinning="spinning" tip="Loading...">
-        <a-form-model
-          ref="ruleForm"
-          :model="form"
-          :rules="rules"
-          :label-col="labelCol"
-          :wrapper-col="wrapperCol"
-        >
-          <a-form-model-item label="用户名称">
-            {{ form.name }}
-          </a-form-model-item>
-          <a-form-model-item label="所属营销分区" prop="subareaSnList">
-            <!-- <subarea id="user-subarea" v-model="form.subareaSn"></subarea> -->
-            <a-select
-              placeholder="请选择分区"
-              allowClear
-              mode="multiple"
-              v-model="form.subareaSnList"
-              :showSearch="true"
-              :filter-option="filterOption">
-              <a-select-option v-for="item in subareaList" :key="item.subareaSn" :value="item.subareaSn">{{ item.subareaName }}</a-select-option>
-            </a-select>
-          </a-form-model-item>
-          <div style="display: flex;justify-content: center;padding: 30px 0;">
-            <a-button type="primary" @click="onSubmit">确定</a-button>
-            <a-button style="margin-left: 15px;" @click="cansel">取消</a-button>
-          </div>
-        </a-form-model>
-      </a-spin>
-    </div>
-  </a-modal>
-</template>
-
-<script>
-import { commonMixin } from '@/utils/mixin'
-import { VSelect } from '@/components'
-import { userSubareaSave } from '@/api/power-user'
-import { subareaQueryAll } from '@/api/subarea'
-import subarea from '@/views/common/subarea.js'
-export default {
-  name: 'UpdateArea',
-  mixins: [commonMixin],
-  components: { VSelect, subarea },
-  props: {
-    openUdModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    }
-  },
-  data () {
-    return {
-      isShow: this.openUdModal, //  是否打开弹框
-      spinning: false,
-      title: '分区设置',
-      labelCol: { span: 5 },
-      wrapperCol: { span: 16 },
-      other: '',
-      form: {
-        name: '',
-        subareaSnList: undefined
-      },
-      rules: {
-        subareaSnList: [
-          { required: true, message: '请选择所属营销分区', trigger: 'change' }
-        ]
-      },
-      nowData: undefined,
-      subareaList: []
-    }
-  },
-  methods: {
-    setData (row) {
-      this.form.id = row.id
-      this.form.name = row.name
-      this.form.subareaSnList = row.subareaSnList || undefined
-      this.nowData = row
-    },
-    onSubmit () {
-      const _this = this
-      this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          _this.submitForm()
-        } else {
-          return false
-        }
-      })
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    getSubareaList () {
-      const _this = this
-      subareaQueryAll().then(res => {
-        if (res.status == 200) {
-          _this.subareaList = res.data || []
-        } else {
-          _this.subareaList = []
-        }
-      })
-    },
-    submitForm () {
-      const _this = this
-      const params = {
-        userSn: _this.nowData.sn,
-        subareaSnList: _this.form.subareaSnList
-      }
-      _this.spinning = true
-      userSubareaSave(params).then(res => {
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.isShow = false
-          _this.$emit('ok')
-          _this.spinning = false
-        } else {
-          _this.spinning = false
-        }
-      })
-    },
-    cansel () {
-      this.$emit('close')
-      this.$refs.ruleForm.resetFields()
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openUdModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-      } else {
-        this.getSubareaList()
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .merchantInfoManagement-modal{
-    .ant-modal-body {
-      padding: 40px 40px 24px;
-    }
-  }
-</style>

+ 5 - 21
src/views/power/user/userList.vue

@@ -66,15 +66,7 @@
           >
             重置密码
           </a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-info"
-            v-if="$hasPermissions('B_power_user_set')"
-            @click="handleSetting(record)"
-          >
-            分区设置
-          </a-button>
+           
           <a-button
             size="small"
             type="link"
@@ -88,8 +80,6 @@
       </s-table>
     </a-spin>
     <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :nowData="itemData" @close="closeModal"></userModal>
-    <!-- 分区设置 -->
-    <UpdateArea ref="UpdateArea" :openUdModal="openUdModal" @ok="$refs.table.refresh(true)" @close="openUdModal=false"></UpdateArea>
   </a-card>
 </template>
 
@@ -98,12 +88,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import userModal from './userModal.vue'
 import { resetPSD, updateEnableStatus, getPowerUserList, delectUserPower } from '@/api/power-user.js'
-import UpdateArea from './updateAreal.vue'
 export default {
   name: 'PowerUserList',
   mixins: [commonMixin],
   components: {
-    STable, VSelect, userModal, UpdateArea
+    STable, VSelect, userModal
   },
   data () {
     return {
@@ -122,13 +111,13 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '用户名称', dataIndex: 'name', align: 'center', width: '18%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '用户名称', dataIndex: 'name', align: 'center', width: '23%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '手机号码', dataIndex: 'phone', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '用户账号', dataIndex: 'loginName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属分区', dataIndex: 'allSubareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '角色', dataIndex: 'roleNames', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '角色', dataIndex: 'roleNames', width: '23%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', width: '6%', align: 'center', scopedSlots: { customRender: 'status' } },
-        { title: '操作', width: '20%', align: 'center', scopedSlots: { customRender: 'action' } }
+        { title: '操作', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -168,11 +157,6 @@ export default {
       this.queryParam.loginFlag = undefined
       this.$refs.table.refresh(true)
     },
-    // 分区设置
-    handleSetting (row) {
-      this.openUdModal = true
-      this.$refs.UpdateArea.setData(row)
-    },
     // 重置密码
     resetPassword (row) {
       const _this = this

+ 1 - 1
src/views/reportData/allocationDetails/list.vue

@@ -24,7 +24,7 @@
                 <a-input id="allocationDetailsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-model-item label="品牌分类">
                 <v-select code="BRAND_TYPE" id="allocationDetailsList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
               </a-form-model-item>