瀏覽代碼

Merge branch 'develop_szhj' of http://git.chelingzhu.com/jianguan-web/jq-repairFusion-html into develop_szhj

lilei 3 年之前
父節點
當前提交
dac96f2c7b

+ 10 - 12
src/views/numsGoodsShelves/bondManagement/addbond.vue

@@ -49,7 +49,7 @@
                   style="width: 100%;display: inline-block;" />
               </a-form-model-item>
             </a-col>
-            <a-col :span="2"> <span style="display: inline-block; padding-top: 10px;">元</span></a-col>
+            <a-col :span="4"> <span style="display: inline-block; padding-top: 10px;">元</span></a-col>
           </a-row>
           <a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;">
             <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }" id="addbond-handleSubmit">保存</a-button>
@@ -160,11 +160,12 @@ export default {
       this.spinning = true
       bondRecordDetail({ bondRecordSn: this.nowData ? this.nowData.bondRecordSn : '' }).then(res => {
         if (res.status == 200) {
+          this.form = Object.assign({}, res.data)
           this.dealerName = res.data.dealerName
           this.shelfName = res.data.shelfName
           this.storeName = res.data.storeName
           this.form.bondAmount = res.data.bondAmount
-          this.form = Object.assign({}, res.data)
+          // this.form = Object.assign({}, res.data)
         } else {
         }
         this.spinning = false
@@ -203,18 +204,15 @@ export default {
     },
     isshow (newValue, oldValue) {
       if (!newValue) {
-        this.form = {
-          dealerSn: undefined, // 经销商sn
-          bondAmount: '', // 保证金金额
-          storeSn: undefined, // 汽车修理厂sn
-          shelfSn: '' // 货架名称
+        if (!this.nowData) {
+          this.$refs.shelfList.resetForm()
         }
         this.dealerName = ''
         this.shelfName = ''
         this.storeName =
-        this.$emit('close')
         this.$refs.ruleForm.resetFields()
         this.titleText = '新增保证金'
+        this.$emit('close')
       }
     },
     nowData: {
@@ -234,9 +232,9 @@ export default {
 }
 </script>
 <style lang="less">
-.addGoodsShelve-modal{
-  .ant-select-disabled .ant-select-selection{
-    background-color: none !important;
+  .addbond-modal{
+    .ant-input-number-handler-wrap{
+      display: none;
+    }
   }
-}
 </style>

+ 7 - 15
src/views/numsGoodsShelves/goodsShelvesAdministration/addGoodsShelve.vue

@@ -133,14 +133,6 @@ export default {
     }
   },
   methods: {
-    // 过滤空格
-    filterEmpty () {
-      let str = this.form.name
-      str = str.replace(/\ +/g, '')
-      str = str.replace(/[ ]/g, '')
-      str = str.replace(/[\r\n]/g, '')
-      this.form.name = str
-    },
     // 经销商 change
     dealerChange (obj) {
       this.form.dealerSn = obj.key || undefined
@@ -213,13 +205,11 @@ export default {
     },
     isshow (newValue, oldValue) {
       if (!newValue) {
-        this.form = {
-          dealerSn: undefined, // 经销商sn
-          ownerType: 1, // 平台
-          storeSn: undefined, // 汽车修理厂sn
-          shelfName: '', // 货架名称
-          images: '', // 图片
-          remarks: ''// 备注
+        this.form = {}
+        this.form.ownerType = 1
+        if (!this.nowData) {
+          this.$refs.storeList.resetForm()
+          this.$refs.dealerList.resetForm()
         }
         this.$refs.ruleForm.resetFields()
         this.titleText = '新增数字货架'
@@ -233,6 +223,8 @@ export default {
             this.titleText = '编辑数字货架'
             this.getShelfDetail()
           } else {
+            this.$refs.storeList.resetForm()
+            this.$refs.dealerList.resetForm()
             this.titleText = '新增数字货架'
           }
         }

+ 1 - 1
src/views/numsGoodsShelves/goodsShelvesAdministration/addHWModal.vue

@@ -63,7 +63,7 @@ export default {
         shelfPlaceCode: '' // 货位号
       },
       rules: {
-        shelfPlaceCode: [ { required: true, message: '请输入货位号', trigger: 'blur' }]
+        shelfPlaceCode: [ { required: true, message: '请输入货位号', trigger: 'blur' }]
       }
     }
   },

+ 11 - 11
src/views/numsGoodsShelves/goodsShelvesAdministration/goodsAllocationSet.vue

@@ -29,7 +29,7 @@
       </a-card>
       <a-card :bordered="false" size="small" class="pages-wrap">
         <div class="goodsAllocationSet-baseInfo">
-          <a-button id="goodsAllocationSet-addHW" @click="pageInfo&&pageInfo.state=='NOT_ENABLE'? addHW(0,pageInfo):addHW(1,pageInfo)" type="primary">{{ pageInfo&&pageInfo.state=='NOT_ENABLE'? '批量导入货位':'新增' }}</a-button>
+          <a-button id="goodsAllocationSet-addHW" @click="pageInfo&&pageInfo.state=='NOT_ENABLE'? addHW(0,pageInfo):addHW(1,pageInfo)" type="primary">{{ pageInfo&&pageInfo.state=='NOT_ENABLE'? '批量导入货位':'新增货位' }}</a-button>
         </div>
         <a-table
           class="sTable fixPagination"
@@ -40,9 +40,9 @@
           :data-source="loadData"
           bordered>
           <template slot="status" slot-scope="text, record">
-            <a-button size="small" type="link" id="goodsAllocationSet-handleEdit" @click="handleEdit(record)" v-if="pageInfo&&pageInfo.state=='NOT_ENABLE' && !record.productCode">编辑</a-button>
-            <a-button size="small" type="link" id="goodsAllocationSet-handleDel" @click="handleDel(record)" v-if="pageInfo&&pageInfo.state=='NOT_ENABLE' && !record.productCode">删除</a-button>
-            <span v-if="pageInfo&&pageInfo.state!='NOT_ENABLE'" style="display: inline-block;padding-left: 7px;">--</span>
+            <a-button size="small" type="link" id="goodsAllocationSet-handleEdit" @click="handleEdit(record)" v-if=" !record.shelfProductEntity">编辑</a-button>
+            <a-button size="small" type="link" id="goodsAllocationSet-handleDel" @click="handleDel(record)" v-if=" !record.shelfProductEntity">删除</a-button>
+            <span v-if="record.shelfProductEntity" style="display: inline-block;padding-left: 7px;">--</span>
             <!-- <span v-if="!($hasPermissions('B_powerMD_user_edit') && record.superAdmin!=1) && !(record.loginFlag==1 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_restPwd')) && !(record.loginFlag==0 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_del'))">--</span> -->
           </template>
         </a-table>
@@ -140,20 +140,20 @@ export default {
         },
         {
           title: '绑定产品编码',
-          dataIndex: 'productCode',
-          width: '13%',
+          dataIndex: 'shelfProductEntity.productCode',
+          width: '10%',
           align: 'center',
           customRender: function (text) {
-            return text || '--'
+            return text || ''
           }
         },
         {
           title: '绑定产品',
-          dataIndex: 'productName',
-          width: '13%',
-          align: 'center',
+          dataIndex: 'shelfProductEntity.productName',
+          width: '16%',
+          align: 'left',
           customRender: function (text) {
-            return text || '--'
+            return text || ''
           }
         },
         {

+ 15 - 11
src/views/numsGoodsShelves/goodsShelvesAdministration/settlementModifyModal.vue

@@ -103,7 +103,7 @@
             </a-col>
             <a-col :span="20">
               <a-form-model-item :label="form.settleType=='CREDIT'?'超过授信额度':'超期未结算'" v-if="form.settleType">
-                <a-checkbox id="settlementModifyModal-onChange" :checked="form.limitFlag==1" v-model="form.limitFlag">
+                <a-checkbox id="settlementModifyModal-onChange" :checked="form.limitFlag==1" @change="onChange">
                   限制汽车修理厂无法使用数字货架
                 </a-checkbox>
               </a-form-model-item>
@@ -163,7 +163,7 @@ export default {
         creditWarnLimit: '', // 结算提醒金额
         settleDay: undefined, // 每月结算日
         warnBeforeDays: undefined, // 结算提醒提前天数
-        limitFlag: false// 是否限制使用
+        limitFlag: 0// 是否限制使用
       },
       rules: {
         settleType: [ { required: true, message: '请选择结算方式', trigger: 'change' } ],
@@ -183,6 +183,14 @@ export default {
       str = str.replace(/[\r\n]/g, '')
       this.form.name = str
     },
+    onChange (e) {
+      console.log(e.target.checked)
+      if (e.target.checked) {
+        this.form.limitFlag = 1
+      } else {
+        this.form.limitFlag = 0
+      }
+    },
     // 改变货架归属
     changeRadio (e) {
       this.form.loginFlag = e.target.value
@@ -193,14 +201,10 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          const params = JSON.parse(JSON.stringify(_this.form))
-          console.log(params.limitFlag, params, '!params.limitFlag')
-          if (params.limitFlag == undefined || params.limitFlag == false) {
-            params.limitFlag = 0
-          } else {
-            params.limitFlag = 1
-          }
-          console.log(params, 'params', _this.form)
+          const params = Object.assign({}, _this.form)
+          // if (params.limitFlag == '') {
+          //   params.limitFlag = 0
+          // }
           if (this.shelfInfo) {
             console.log(this.shelfInfo, 'this.nowData')
             params.shelfSn = this.shelfInfo.shelfSn
@@ -240,6 +244,7 @@ export default {
         warnBeforeDays: undefined, // 结算提醒提前天数
         limitFlag: 0 // 是否限制使用
       }
+      this.$refs.ruleForm.resetFields()
       this.$emit('close')
     }
   },
@@ -250,7 +255,6 @@ export default {
     isshow (newValue, oldValue) {
       if (!newValue) {
         this.$refs.ruleForm.resetFields()
-        this.form = {}
         this.$emit('close')
       }
     }

+ 22 - 33
src/views/numsGoodsShelves/goodsShelvesAdministration/settlementSet.vue

@@ -28,22 +28,21 @@
         </a-collapse>
         <a-collapse :activeKey="['1']" class="bzj-collapse" v-if="pageInfo&&pageInfo.settleType">
           <a-collapse-panel key="1" header="保证金 ( 保证金的新增/编辑/删除请在左侧菜单“保证金管理”功能中操作 )">
-            <s-table
+            <a-table
               class="sTable fixPagination"
               ref="table"
               size="small"
               rowKey="id"
-              :showPagination="false"
+              :pagination="false"
               :columns="columns"
-              :data="loadData"
-              :defaultLoadData="true"
+              :data-source="loadData"
               bordered>
               <template slot="status" slot-scope="text, record">
                 <a-button type="link" @click="handleEdit(record)" id="settlementSet-handleEdit">编辑</a-button>
                 <a-button type="link" @click="handleDel(record)" id="settlementSet-handleDel">删除</a-button>
               <!-- <span v-if="!($hasPermissions('B_powerMD_user_edit') && record.superAdmin!=1) && !(record.loginFlag==1 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_restPwd')) && !(record.loginFlag==0 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_del'))">--</span> -->
               </template>
-            </s-table>
+            </a-table>
           </a-collapse-panel>
         </a-collapse>
       </a-card>
@@ -188,13 +187,13 @@
 </template>
 
 <script>
-import { STable, VSelect } from '@/components'
+import { VSelect } from '@/components'
 import { shelfDetail, shelfSettleRuleSave, settleRuleDetail } from '@/api/shelf.js'
 import { bondRecordList } from '@/api/boundRecord.js'
 import settlementModifyModal from './settlementModifyModal.vue'
 import { toThousands } from '@/libs/tools.js'
 export default {
-  components: { STable, settlementModifyModal, VSelect },
+  components: { settlementModifyModal, VSelect },
   data () {
     return {
       spinning: false,
@@ -214,7 +213,7 @@ export default {
         creditWarnLimit: '', // 结算提醒金额
         settleDay: undefined, // 每月结算日
         warnBeforeDays: undefined, // 结算提醒提前天数
-        limitFlag: '', // 是否限制使用
+        limitFlag: 0, // 是否限制使用
         bondFlag: '', // 是否缴纳保证金
         bondAmount: '' // 保证金金额
       },
@@ -236,24 +235,7 @@ export default {
         { title: '保证金金额', dataIndex: 'bondAmount', width: '30%', align: 'right', customRender: function (text) { return toThousands(text, 2) || '--' } },
         { title: '状态', dataIndex: 'stateDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '支付时间', width: '20%', align: 'center', dataIndex: 'payDate' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.spinning = true
-        return bondRecordList(Object.assign({ shelfSn: this.$route.params.shelfSn })).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (let i = 0; i < data.length; i++) {
-              const _item = data[i]
-              _item.no = no + i + 1
-            }
-          }
-          this.spinning = false
-          return data
-        })
-      }
+      ]
     }
   },
   methods: {
@@ -288,6 +270,15 @@ export default {
     changeRadio (e) {
       this.isEdit = e.target.value
     },
+    getbondRecordList () {
+      this.spinning = true
+      bondRecordList(Object.assign({ shelfSn: this.$route.params.shelfSn })).then(res => {
+        if (res.status == 200) {
+          this.loadData = res.data || []
+        }
+        this.spinning = false
+      })
+    },
     // 数字货架详情
     getShelfDetail () {
       this.spinning = true
@@ -318,7 +309,6 @@ export default {
           if (res.status == 200) {
             this.form = Object.assign({}, res.data)
             this.form.limitFlag = Number(this.form.limitFlag)
-
             this.settleInfo = res.data
           } else {
             this.form = {}
@@ -338,11 +328,9 @@ export default {
     },
     // 修改
     handleModify (shelfVal, settleVal) {
-      console.log(shelfVal, settleVal, '----------修改')
       this.pageInfo = shelfVal
       this.settleInfo = settleVal
       this.openModal = true
-      console.log('----------修改')
     },
     // 保存
     handleSubmit () {
@@ -350,10 +338,10 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = Object.assign({}, _this.form)
-          console.log(params, 'params')
-          if (params.limitFlag == '') {
-            params.limitFlag = 0
-          }
+          console.log(params, 'params', _this.form)
+          // if (params.limitFlag == '') {
+          //   params.limitFlag = 0
+          // }
           if (this.pageInfo) {
             params.shelfSn = this.pageInfo.shelfSn
             params.storeSn = this.pageInfo.storeSn
@@ -380,6 +368,7 @@ export default {
     },
     pageInit () {
       this.getShelfDetail()
+      this.getbondRecordList()
     }
   },
   mounted () {

+ 50 - 54
src/views/numsGoodsShelves/partsDealerManagement/setSHModal.vue

@@ -2,53 +2,41 @@
   <div>
     <a-modal
       centered
-      wrapClassName="addGoodsShelve-modal"
+      wrapClassName="setSHModal-modal"
       :footer="null"
       :maskClosable="false"
       title="设置结算账户"
       v-model="isshow"
       @cancle="close"
-      :width="450">
+      :width="550">
       <a-spin :spinning="spinning" tip="Loading...">
         <a-alert :message="message" type="info" />
         <a-form-model
-          id="userEdit-form"
+          id="setSHModal-form"
           ref="ruleForm"
           :model="form"
           :rules="rules"
-          :label-col="formItemLayout.labelCol"
-          :wrapper-col="formItemLayout.wrapperCol"
+          :labelCol="{span:6}"
+          :wrapperCol="{span:16}"
         >
-          <a-row :gutter="24">
-            <a-col :span="24">
-              <a-form-model-item label="配件经销商" >
-                <span>{{ form.dealerEntity?form.dealerEntity.dealerName:'--' }}</span>
-              </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-model-item label="平台商户号" prop="merchantNo" >
-                <a-input id="userList-name" allowClear v-model.trim="form.merchantNo" placeholder="请输入平台商户号"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-model-item label="结算账户名" prop="bankAccount">
-                <a-input id="userList-name" allowClear v-model.trim="form.bankAccount" placeholder="请输入结算账户名"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-model-item label="结算账户号" prop="bankCard">
-                <a-input id="userList-name" allowClear v-model.trim="form.bankCard" placeholder="请输入结算账户号"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-model-item label="开户银行" prop="bankName">
-                <a-input id="userList-name" allowClear v-model.trim="form.bankName" placeholder="请输入开户银行"/>
-              </a-form-model-item>
-            </a-col>
-          </a-row>
+          <a-form-model-item label="配件经销商" >
+            <span>{{ form.dealerEntity?form.dealerEntity.dealerName:'--' }}</span>
+          </a-form-model-item>
+          <a-form-model-item label="平台商户号" prop="merchantNo" >
+            <a-input id="setSHModal-merchantNo" allowClear v-model.trim="form.merchantNo" placeholder="请输入平台商户号"/>
+          </a-form-model-item>
+          <a-form-model-item label="结算账户名" prop="bankAccount">
+            <a-input id="setSHModal-bankAccount" allowClear v-model.trim="form.bankAccount" placeholder="请输入结算账户名"/>
+          </a-form-model-item>
+          <a-form-model-item label="结算账户号" prop="bankCard">
+            <a-input id="setSHModal-bankCard" allowClear v-model.trim="form.bankCard" placeholder="请输入结算账户号"/>
+          </a-form-model-item>
+          <a-form-model-item label="开户银行" prop="bankName">
+            <a-input id="setSHModal-bankName" allowClear v-model.trim="form.bankName" placeholder="请输入开户银行"/>
+          </a-form-model-item>
           <a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;">
-            <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">保存</a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="close">取消</a-button>
+            <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }" id="setSHModal-handleSubmit">保存</a-button>
+            <a-button :style="{ marginLeft: '8px' }" @click="close" id="setSHModal-close">取消</a-button>
           </a-form-model-item>
         </a-form-model>
       </a-spin>
@@ -59,7 +47,7 @@
 <script>
 import { saveMerchantAccount, merchantAccountDetail } from '@/api/merchantAccount.js'
 export default {
-  name: 'AddGoodsShelve',
+  name: 'SetSHModal',
   props: {
     visible: {
       type: Boolean,
@@ -79,10 +67,6 @@ export default {
       isshow: this.visible,
       message: '以下结算账户信息需要与进件时填写的资料保持一直否则将无法体现成功',
       pageInfo: null,
-      formItemLayout: {
-        labelCol: { span: 6 },
-        wrapperCol: { span: 16 }
-      },
       form: {
         dealerEntity: {
           dealerName: ''
@@ -90,7 +74,7 @@ export default {
         bankName: '', // 开户行
         bankAccount: '', // 账户名
         bankCard: '', // 账户号
-        merchantNo: '' // 保证金金额
+        merchantNo: '' // 商户号
       },
       rules: {
         merchantNo: [ { required: true, message: '请输入保证金金额', trigger: 'blur' } ],
@@ -119,10 +103,12 @@ export default {
       this.spinning = true
       merchantAccountDetail({ merchantSn: this.nowData.merchantSn, merchantType: this.nowData.merchantType }).then(res => {
         if (res.status == 200) {
-          this.form = Object.assign({}, res.data)
+          this.form.merchantNo = res.data.merchantNo
+          this.form.dealerEntity.dealerName = res.data.dealerEntity.dealerName
           this.form.bankName = res.data.merchantBankAccountEntity.bankName
           this.form.bankAccount = res.data.merchantBankAccountEntity.bankAccount
           this.form.bankCard = res.data.merchantBankAccountEntity.bankCard
+          this.pageInfo = Object.assign({}, res.data)
         } else {
         }
         this.spinning = false
@@ -130,18 +116,25 @@ export default {
     },
     // 保存提交
     handleSubmit () {
+      console.log('保存', 'handleSubmit')
       const _this = this
       this.$refs.ruleForm.validate(valid => {
+        console.log(valid, 'console.log(valid)')
         if (valid) {
-          // const params = JSON.parse(JSON.stringify(_this.form))
-          const params = Object.assign({}, _this.form)
-          if (params.bankName && params.bankAccount && params.bankCard) {
-            params.merchantBankAccountEntity.bankName = params.bankName
-            params.merchantBankAccountEntity.bankAccount = params.bankAccount
-            params.merchantBankAccountEntity.bankCard = params.bankCard
+          const params = JSON.parse(JSON.stringify(_this.pageInfo))
+          console.log(params, 'params')
+          if (params) {
+            params.merchantBankAccountEntity.bankName = _this.form.bankName
+            params.merchantBankAccountEntity.bankAccount = _this.form.bankAccount
+            params.merchantBankAccountEntity.bankCard = _this.form.bankCard
+            params.dealerEntity.dealerName = _this.form.dealerEntity.dealerName
+            params.merchantNo = _this.form.merchantNo
           }
+          console.log(params, 'params')
           params.id = _this.nowData && _this.nowData.id ? _this.nowData.id : null
+          params.dealerEntity.dealerSn = _this.nowData && _this.nowData.dealerEntity ? _this.nowData.dealerEntity.dealerSn : null
           _this.spinning = true
+          console.log(params, 'params')
           saveMerchantAccount(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
@@ -167,9 +160,17 @@ export default {
     },
     isshow (newValue, oldValue) {
       if (!newValue) {
-        this.form = {}
-        this.close()
+        this.form = {
+          dealerEntity: {
+            dealerName: ''
+          },
+          bankName: '', // 开户行
+          bankAccount: '', // 账户名
+          bankCard: '', // 账户号
+          merchantNo: '' // 保证金金额
+        }
         this.$refs.ruleForm.resetFields()
+        this.close()
       } else {
         this.getMerchantAccountDetail()
       }
@@ -188,9 +189,4 @@ export default {
 }
 </script>
 <style lang="less">
-.addGoodsShelve-modal{
-  .ant-select-disabled .ant-select-selection{
-    background-color: none !important;
-  }
-}
 </style>

+ 5 - 9
src/views/power/role/roleList.vue

@@ -28,7 +28,7 @@
         </a-form>
       </div>
       <div class="table-operator">
-        <a-button type="primary" class="button-error" @click="openModal" id="roleList-openModal">新增</a-button>
+        <a-button type="primary" class="button-error" @click="openModal" id="roleList-openModal">新增角色</a-button>
       </div>
       <s-table
         class="sTable fixPagination"
@@ -57,13 +57,9 @@
         </template>
         <!-- 操作 -->
         <span slot="action" slot-scope="text, record">
-          <a-icon type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
-          <a-icon type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
-          <a-icon
-            type="delete"
-            title="删除"
-            :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
-            @click="delect(record)" />
+          <a-button size="small" type="link" class="button-info" @click="openMenuModal(record)">菜单权限</a-button>
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" v-if="record.isEnable">编辑</a-button>
+          <a-button size="small" type="link" class="button-info" @click="delect(record)" v-if="!record.isEnable">删除</a-button>
         </span>
       </s-table>
     </a-spin>
@@ -113,7 +109,7 @@ export default {
         { title: '角色名称', dataIndex: 'name', width: '25%', align: 'center' },
         { title: '角色描述', dataIndex: 'remarks', width: '25%', align: 'center', scopedSlots: { customRender: 'remarks' } },
         { title: '状态', width: '15%', align: 'center', scopedSlots: { customRender: 'status' } },
-        { title: '操作', width: '15%', align: 'center', scopedSlots: { customRender: 'action' } }
+        { title: '操作', width: '15%', align: 'left', scopedSlots: { customRender: 'action' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 4 - 19
src/views/power/user/userList.vue

@@ -27,7 +27,7 @@
         </a-form>
       </div>
       <div class="table-operator">
-        <a-button type="primary" class="button-error" @click="openModal">新增</a-button>
+        <a-button type="primary" class="button-error" @click="openModal">新增用户</a-button>
       </div>
       <s-table
         class="sTable fixPagination"
@@ -45,22 +45,9 @@
           <!-- <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
         </span>
         <span slot="action" slot-scope="text, record">
-          <a-icon
-            type="edit"
-            title="编辑"
-            :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
-            @click="handleEdit(record)"
-          />
-          <a-icon
-            type="unlock"
-            title="重置密码"
-            :style="{fontSize: '20px',color:' #ffaa00',padding: '0 10px'}"
-            @click="resetPassword(record)" />
-          <a-icon
-            type="delete"
-            title="删除"
-            :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
-            @click="delect(record)"/>
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
+          <a-button size="small" type="link" class="button-info" @click="resetPassword(record)" v-if="record.loginFlag">重置密码</a-button>
+          <a-button size="small" type="link" class="button-info" @click="delect(record)" v-if="!record.loginFlag">删除</a-button>
           <!-- <span v-if="!($hasPermissions('B_powerMD_user_edit') && record.superAdmin!=1) && !(record.loginFlag==1 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_restPwd')) && !(record.loginFlag==0 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_del'))">--</span> -->
         </span>
       </s-table>
@@ -97,10 +84,8 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '来源', dataIndex: 'org.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '用户名称', dataIndex: 'name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '手机号码', dataIndex: 'phone', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '用户账号', dataIndex: 'loginName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '角色', width: '15%', align: 'center', dataIndex: 'roleNames', customRender: function (text) { return text || '--' } },
         { title: '状态', width: '10%', align: 'center', scopedSlots: { customRender: 'status' } },
         { title: '操作', width: '15%', align: 'left', scopedSlots: { customRender: 'action' } }

+ 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
     proxy: {
       '/api': {
-        // target: ' http://192.168.16.107:7300/mock/61aeb88e4b9f94168035f9e0/xprh-admin',
+        // target: 'http://p.xprh.360arrow.com/xprh-admin',
         target: 'http://192.168.16.151:8701/xprh-admin',
         // ws: false,
         ws: true,