Parcourir la source

密码需求优化,供应商维护账期采购周期功能添加

asd26269546 il y a 2 ans
Parent
commit
cadee26e2a

+ 1 - 1
src/components/login-form/login-form.vue

@@ -57,7 +57,7 @@ export default {
     handleSubmit () {
       if(this.form.password == '123456'){
         this.$Message.info({
-          content:'为了安全,请联系管理员重置密码后在登录',
+          content:'密码错误',
           duration:3,
         });
         return

+ 61 - 4
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -1,7 +1,7 @@
 <!-- 供应商维护 -->
 <template>
   <div class="container">
-    <Form  :label-width="60" inline>
+    <Form  :label-width="80" inline>
       <FormItem label="关键词"> 
         <Poptip trigger="focus"  width="250" placement="bottom">
             <div slot="content">
@@ -11,17 +11,35 @@
                 </li>
               </ul>
             </div>
-            <Input v-model="params.search" @on-change="getSupplierSelectList" placeholder="请输入用途关键词"></Input>
+            <Input style="width:150px" v-model="params.search" @on-change="getSupplierSelectList" placeholder="请输入用途关键词"></Input>
         </Poptip>
         
       </FormItem>
-      <FormItem label="用途">
-        <Select v-model="params.PurposeIndex" style="width:200px" @on-change="selectPurposeFn" filterable>
+      <FormItem label="按产品查看">
+        <Select v-model="params.Purpose" style="width:150px" @on-change="selectPurposeFn" filterable>
             <div slot="empty">无匹配数据</div>
             <Option  :value="999">全部</Option>
             <Option v-for="(i,index) in selectPurposeList" :value="index" :key="index">{{ i.purpose }}</Option>
         </Select>
       </FormItem>
+      <FormItem label="按账期查看">
+        <Select v-model="params.accountDate" style="width:150px" @on-change="changePage(1)" filterable>
+            <div slot="empty">无匹配数据</div>
+            <Option  value="">全部</Option>
+            <Option v-for="(i,index) in accountDateList" :value="i.accountDate" :key="index">
+              {{ i.accountDate + '天(' }}<span style="color:red">{{i.count}}</span>)
+            </Option>
+        </Select>
+      </FormItem>
+      <FormItem label="按采购周期">
+        <Select v-model="params.type" style="width:150px" @on-change="changePage(1)" filterable>
+            <div slot="empty">无匹配数据</div>
+            <Option  value="">全部</Option>
+            <Option v-for="(i,index) in safetyWarnDayList" :value="i.type" :key="index">
+              {{ i.name + '(' }}<span style="color:red">{{i.count}}</span>)
+            </Option>
+        </Select>
+      </FormItem>
       <Button type="primary" @click="getStatisticsClassify();changePage(1)">查询</Button>
       <div style="float:right">
         <Button type="primary" style="margin-right:10px" @click="eventHandle('account')">收款账号维护</Button>
@@ -149,6 +167,7 @@ export default {
           placeholder: '请输入账期',
           span: 12
         },
+        
         {
           type: 'input',
           label: '账期说明',
@@ -905,6 +924,21 @@ export default {
           minWidth: 100
         },
         {
+          title: '采购周期',
+          key: 'accountDateRemark',
+          minWidth: 100,
+          render:(h,p)=>{
+            return h('span',{
+              style:{
+                color:'#0077ff',
+                cursor:"pointer"
+              }
+            },
+              '查看'
+            )
+          }
+        },
+        {
           title: '账期说明',
           key: 'accountDateRemark',
           minWidth: 100
@@ -1047,13 +1081,34 @@ export default {
         TechnologyType:99,
         Purpose:null,
         search:null,
+        type:'',
+        accountDate:'',
       },
       total:0,
       loading:false,
       selectPurposeList:[],
+      accountDateList:[],
+      safetyWarnDayList:[],
     }
   },
   methods: {
+    getSafetyWarnDayList(){
+      const v = this
+      axios.post('/cloudApi/supplier/getSafetyWarnDayList',{}).then(res=>{
+        console.log(res)
+        v.safetyWarnDayList = res.data.data
+      })
+      
+    },
+    getAccountDateList(){
+      const v = this
+      axios.post('/cloudApi/supplier/getAccountDateList',{}).then(res=>{
+        console.log(res)
+        v.accountDateList = res.data.data
+      })
+      
+    },
+
     selectPurposeFn(e){
       console.log(e)
       if(e == 999){
@@ -1239,6 +1294,8 @@ export default {
     this.getStatisticsClassify()
     this.getSupplierSelectList()
     this.getMaterialSelectPurposeList()
+    this.getAccountDateList()
+    this.getSafetyWarnDayList()
   }
 }
 </script>

+ 80 - 14
src/view/system-manage/user.vue

@@ -31,6 +31,29 @@
         </div>
       </div>
     </div>
+    <Modal v-model="refreshModal" width="360">
+        <p slot="header" style="color:#f60;text-align:center">
+            <Icon type="ios-information-circle"></Icon>
+            <span>警告提示!</span>
+        </p>
+        <div style="text-align:center">
+            <p>{{refresText}}</p>
+           
+        </div>
+        <div slot="footer">
+            <Button type="error" size="large" long :loading="loading" @click="del">确认</Button>
+        </div>
+    </Modal>
+    <Modal
+        v-model="tipModal"
+        title="提示"
+        >
+        <div style="font-size: 16px;">
+          <p>重置成功</p>
+          <p>新密码为:{{tipText}}</p>
+          <p>请妥善保管</p>
+        </div>
+    </Modal>
   </div>
 </template>
 
@@ -51,7 +74,7 @@ import { GetMaterialCategoryZTree } from '@/api/baseData'
 import MyTable from '_c/my-table/my-table'
 import MyTree from '_c/my-tree/my-tree'
 import MyModalForm from '_c/my-modal-form/my-modal-form'
-
+import axios from 'axios'
 export default {
   name: 'user_manage',
   components: {
@@ -61,6 +84,11 @@ export default {
   },
   data () {
     return {
+      tipModal:false,
+      tipText:null,
+      refreshModal:false,
+      refresText:'您确定重置所有账号密码么!',
+      loading:false,
       title: '',
       currentId: '',
       updPwdshow: false,
@@ -176,15 +204,15 @@ export default {
           placeholder: '请输入选择角色',
           span: 12
         },
-        {
-          type: 'input',
-          comType: 'number',
-          label: '初始密码',
-          key: 'unit',
-          placeholder: '123456',
-          span: 12,
-          disabled: true
-        }
+        // {
+        //   type: 'input',
+        //   comType: 'number',
+        //   label: '初始密码',
+        //   key: 'unit',
+        //   placeholder: '123456',
+        //   span: 12,
+        //   disabled: true
+        // }
       ],
       columns: [
         {
@@ -265,11 +293,12 @@ export default {
                   on: {
                     click: () => {
                       this.currentId = params.row.id
-                      this.updPwdshow = true
+                      this.refreshModal = true
+                      this.refresText = '您确定重置"'+ params.row.realName +'"密码么!'
                     }
                   }
                 },
-                '修改密码'
+                '重置密码'
               ),
               h(
                 'Button',
@@ -325,6 +354,13 @@ export default {
           text: '添加',
           align: 'right',
           e: 'add'
+        },
+        {
+          name: 'Button',
+          type: 'primary',
+          text: '重置密码',
+          align: 'right',
+          e: 'refreshPassword'
         }
       ],
       params: {
@@ -333,10 +369,35 @@ export default {
         total: 0
       },
       data: [],
-      treeData: []
+      treeData: [],
+
     }
   },
   methods: {
+    del(){
+      const v = this
+      if(this.currentId == null){
+        window.open('http://120.79.80.64:8050/cloudApi/accAccount/refreshPasswordTest')
+        this.refreshModal = false
+        this.$Message.info({
+          content:'重置成功开始下载表格',
+          duration:3,
+        });
+      }else{
+        axios.post('/cloudApi/accAccount/updatePassword',{id:this.currentId}).then(res=>{
+          this.refreshModal = false
+          if(res.data.code == 200){
+            this.tipModal = true
+            this.tipText = res.data.data
+            this.getList()
+          }
+        })
+      }
+      
+      // axios.get('/cloudApi/accAccount/refreshPasswordTest').then(res=>{
+      //   window.open(res.data)
+      // })
+    },
     upfPwdCfm (type, data) {
       ResetPassword({
         ...data,
@@ -357,7 +418,7 @@ export default {
         }).then(res => {
           if (res.code === 0) {
             this.show = false
-            this.$Message.info(res.msg)
+            this.$Message.info('新增用户成功,请点击列表重置按钮,初始化用户密码')
             this.getList()
           }
         })
@@ -468,6 +529,11 @@ export default {
           this.formType = 'add'
           this.show = true
           break
+        case 'refreshPassword':
+          this.currentId = null
+          this.refreshModal = true
+          
+          break
       }
     },
     // 选择物料分类 显示物料列表

+ 1 - 1
src/view/system-manage/user2.vue

@@ -374,7 +374,7 @@ export default {
           this.refreshModal = false
           if(res.data.code == 200){
             this.$Message.info({
-              content:'重置成功密码为:' + res.data.data,
+              content:'重置成功密码为:' + res.data.data + '。弹窗将在10秒后自动关闭。',
               duration:10,
             });
           }