Browse Source

首页待审页面修改

wengyuwen 4 years ago
parent
commit
d1d855db16

+ 9 - 1
src/api/morePage/stock.js

@@ -14,4 +14,12 @@ export function selectAuditItemsTotal(query) {
         method: 'get',
         params: query
     })
-}
+}
+//获取审批人
+export function getUserName(query) {
+    return request({
+        url: '/system/user/selectUserName',
+        method: 'get',
+        params: query
+    })
+}

+ 9 - 9
src/layout/components/Navbar.vue

@@ -7,15 +7,15 @@
 
     <div class="right-menu">
       <template v-if="device!=='mobile'">
-        <search id="header-search" class="right-menu-item" />
-        
-        <el-tooltip content="源码地址" effect="dark" placement="bottom">
-          <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
-        </el-tooltip>
-
-        <el-tooltip content="文档地址" effect="dark" placement="bottom">
-          <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
-        </el-tooltip>
+<!--        <search id="header-search" class="right-menu-item" />-->
+<!--        -->
+<!--        <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
+<!--          <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
+<!--        </el-tooltip>-->
+
+<!--        <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
+<!--          <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
+<!--        </el-tooltip>-->
 
         <screenfull id="screenfull" class="right-menu-item hover-effect" />
 

+ 282 - 220
src/views/morePage/stock/index.vue

@@ -87,44 +87,52 @@
                   placeholder="请选择请核人"
                   clearable
                   size="small"
-                  multiple
                 >
+                  <el-option
+                    v-for="item in userNameOptions"
+                    :key="item.userId"
+                    :label="item.userName"
+                    :value="item.userId"/>
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
-              <el-form-item
-                label-width="100px"
-                label="审核人"
-                prop="auditUserId"
-              >
-                <el-select
-                  v-model="queryParams.auditUserId"
-                  placeholder="请输入审核人"
-                  clearable
-                  size="small"
-                  multiple
-                >
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item
-                label-width="100px"
-                label="业务日期"
-                prop="billTime"
-              >
-                <el-date-picker
-                  v-model="queryParams.billTime"
-                  placeholder="请输入业务日期"
-                  clearable
-                  size="small"
-                  @keyup.enter.native="handleQuery"
-                  style="max-width: 187px"
-                  type="date"
-                >
-                </el-date-picker> </el-form-item
-            ></el-col>
+<!--            <el-col :span="6">-->
+<!--              <el-form-item-->
+<!--                label-width="100px"-->
+<!--                label="审核人"-->
+<!--                prop="auditUserId"-->
+<!--              >-->
+<!--                <el-select-->
+<!--                  v-model="queryParams.auditUserId"-->
+<!--                  placeholder="请输入审核人"-->
+<!--                  clearable-->
+<!--                  size="small"-->
+<!--                >-->
+<!--                  <el-option-->
+<!--                  v-for="item in userNameOptions"-->
+<!--                  :key="item.userId"-->
+<!--                  :label="item.userName"-->
+<!--                  :value="item.userId"/>-->
+<!--                </el-select>-->
+<!--              </el-form-item>-->
+<!--            </el-col>-->
+<!--            <el-col :span="6">-->
+<!--              <el-form-item-->
+<!--                label-width="100px"-->
+<!--                label="业务日期"-->
+<!--                prop="billTime"-->
+<!--              >-->
+<!--                <el-date-picker-->
+<!--                  v-model="queryParams.billTime"-->
+<!--                  placeholder="请输入业务日期"-->
+<!--                  clearable-->
+<!--                  size="small"-->
+<!--                  @keyup.enter.native="handleQuery"-->
+<!--                  style="max-width: 187px"-->
+<!--                  type="date"-->
+<!--                >-->
+<!--                </el-date-picker> </el-form-item-->
+<!--            ></el-col>-->
             <el-col :span="6"
               ><el-form-item
                 label-width="100px"
@@ -139,7 +147,7 @@
                   start-placeholder="开始日期"
                   end-placeholder="结束日期"
                   @keyup.enter.native="handleQuery"
-                  style="max-width: 187px"
+                  style="max-width: 240px"
                   value-format="yyyy-MM-dd"
                   type="daterange"
                 >
@@ -151,16 +159,16 @@
     </el-form>
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button size="mini" @click="handleQuery">全部</el-button></el-col
+        <el-button size="mini" @click="handleQuery()">全部</el-button></el-col
       >
       <el-col :span="1.5">
-        <el-button size="mini" @click="handleQuery">待审业务</el-button></el-col
+        <el-button size="mini" @click="handleQuery('S')">待审业务</el-button></el-col
       >
       <el-col :span="1.5">
-        <el-button size="mini" @click="handleQuery" index="">审核中</el-button></el-col
+        <el-button size="mini" @click="handleQuery('B')">审核退回</el-button></el-col
       >
       <el-col :span="1.5">
-        <el-button size="mini" @click="handleQuery" index="A">审核通过</el-button></el-col
+        <el-button size="mini" @click="handleQuery('A')" index="A">审核通过</el-button></el-col
       >
 
       <div class="tabSetting">
@@ -169,7 +177,7 @@
             type="cyan"
             icon="el-icon-search"
             size="mini"
-            @click="handleQuery"
+            @click="handleQuery()"
             >搜索</el-button
           >
           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
@@ -281,6 +289,7 @@
       >
         <template slot-scope="scope">
           <span v-if="item.label == 'refno3'">{{scope.row.refno3 ? scope.row.refno3 : scope.row.billNo}}</span>
+          <span v-if="item.label == 'auditOpTime'">{{scope.row.auditOpTime ? scope.row.auditOpTime.slice(0,10) : scope.row.auditOpTime}}</span>
           <span v-else>{{ scope.row[item.label] }}</span>
         </template>
       </el-table-column>
@@ -385,7 +394,7 @@
 </template>
 
 <script>
-import { selectAuditItems, selectAuditItemsTotal } from "@/api/morePage/stock";
+import { selectAuditItems, selectAuditItemsTotal,getUserName } from "@/api/morePage/stock";
 import { listCorps } from "@/api/basicdata/corps";
 import { addSet, select, resetModule } from "@/api/system/set";
 import Cookies from "js-cookie";
@@ -396,6 +405,7 @@ export default {
   components: {draggable},
   data() {
     return {
+      userNameOptions:[],
       selectAuditList: [],
       dialogVisible: false,
       total: 0,
@@ -445,7 +455,7 @@ export default {
         },
         {
           surface: "5",
-          label: "fAmount",
+          label: "monry",
           name: "金额",
           checked: 0,
           width: 120,
@@ -502,6 +512,10 @@ export default {
     listCorps().then((response) => {
       this.factIdOptions = response.rows;
     });
+    getUserName().then(res=>{
+      console.log(res)
+      this.userNameOptions = res.rows
+    })
     this.getList();
     this.getRow();
   },
@@ -581,13 +595,26 @@ export default {
       this.drag = false;
     },
     /** 搜索按钮操作 */
-    handleQuery() {
-      console.log()
+    handleQuery(res) {
+      if(res){
+        this.queryParams.auditStatus = res
+      }else{
+        this.queryParams.auditStatus = null
+      }
       this.queryParams.pageNum = 1;
       this.getList(this.queryParams);
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams = {
+        refno1:null,
+        refno2:null,
+        sendTimeList:null,
+        billNo:null,
+        sendUserId:null,
+        auditUserId:null,
+        auditOpTimeList:null,
+      }
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -687,186 +714,221 @@ export default {
           }
         });
         this.selectAuditList = response.data;
-        selectAuditItemsTotal().then((res) => {
-          if (res.code == 200) {
-            this.total = res.data;
-          }
-        });
+        this.total = response.data.length
+        // selectAuditItemsTotal().then((res) => {
+        //   if (res.code == 200) {
+        //     this.total = res.data;
+        //   }
+        // });
         this.loading = false;
       });
     },
     approval(row) {
-      // console.log(row)
-      switch (row.refno4) {
-        case "XS":
-          this.$router.push({
-            path: '/purchaseIssue',
-            query: {
-              data: JSON.stringify(row),
-              list: JSON.stringify(
-                {
-                  type: 'primary',
-                  size: 'mini',
-                  icon: 'el-icon-edit-outline',
-                  name: '审批',
-                  disabled: false,
-                  pendingPage:true
-                }
-              )
-            }
-          })
-          break
-        case "SQ":
-          this.$router.push({
-            path: '/purchaseRequest',
-            query: {
-              data: JSON.stringify(row),
-              list: JSON.stringify(
-                {
-                  type: 'primary',
-                  size: 'mini',
-                  icon: 'el-icon-edit-outline',
-                  name: '审批',
-                  disabled: false,
-                  pendingPage:true
-                }
-              )
-            }
-          })
-          break
-        case 'XMGL':
-          this.$router.push({
-            path: '/project',
-            query: {
-              data: JSON.stringify(row),
-              list: JSON.stringify(
-                {
-                  type: 'primary',
-                  size: 'mini',
-                  icon: 'el-icon-edit-outline',
-                  name: '审批',
-                  disabled: false,
-                  pendingPage:true
-                }
-              )
-            }
-          })
-          break
-        case "SJRK": {
-          this.$router.push({
-            path: "/business/inStock",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "SJCK": {
-          this.$router.push({
-            path: "/business/outStock",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "HQZY": {
-          this.$router.push({
-            path: "/business/goodsTransfer",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "CKDB": {
-          this.$router.push({
-            path: "/business/stockTransfer",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "HWTG": {
-          this.$router.push({
-            path: "/business/cargoClearance",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "JSCCF": {
-          this.$router.push({
-            path: "/business/agreement",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "CCF": {
-          this.$router.push({
-            path: "/agreement/agreementStorage",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "ZYF": {
-          this.$router.push({
-            path: "/agreement/agreementTask",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "SF": {
-          this.$router.push({
-            path: "/finance/charge",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "DZ": {
-          this.$router.push({
-            path: "/finance/contrast",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "FF": {
-          this.$router.push({
-            path: "/finance/payment",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "KHDD": {
-          this.$router.push({
-            path: "/domesticTrade/orderInformation",
-            query: { list: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "ApplyFP": {
-          this.$router.push({
-            path: "/finance/chargeInvoice",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "KHDZ": {
-          this.$router.push({
-            path: "/finance/contrast",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "KHSF": {
-          this.$router.push({
-            path: "/finance/charge",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        case "KHFF": {
-          this.$router.push({
-            path: "/finance/payment",
-            query: { data: JSON.stringify(row) },
-          });
-          break;
-        }
-        default: {
-          console.log(row)
-          return this.$message.error("未知错误,无状态");
+      console.log(row)
+      if(row.audit == '审核通过' || row.audit == '审核退回'){
+        console.log("111")
+        switch (row.refno4) {
+          case "XS":
+            this.$router.push({
+              path: '/purchaseIssue',
+              query: {
+                data: JSON.stringify(row),
+                list:JSON.stringify({ pendingPage: true })
+              }
+            })
+            break
+          case "SQ":
+            this.$router.push({
+              path: '/purchaseRequest',
+              query: {
+                data: JSON.stringify(row),
+                list:JSON.stringify({ pendingPage: true })
+              }
+            })
+            break
+          case 'XMGL':
+            this.$router.push({
+              path: '/project',
+              query: {
+                data: JSON.stringify(row),
+                list:JSON.stringify({ pendingPage: true })
+              }
+            })
+            break
+          }
+      }else{
+        console.log("222")
+        switch (row.refno4) {
+          case "XS":
+            this.$router.push({
+              path: '/purchaseIssue',
+              query: {
+                data: JSON.stringify(row),
+                list: JSON.stringify(
+                  {
+                    type: 'primary',
+                    size: 'mini',
+                    icon: 'el-icon-edit-outline',
+                    name: '审批',
+                    disabled: false,
+                    pendingPage:true
+                  }
+                )
+              }
+            })
+            break
+          case "SQ":
+            this.$router.push({
+              path: '/purchaseRequest',
+              query: {
+                data: JSON.stringify(row),
+                list: JSON.stringify(
+                  {
+                    type: 'primary',
+                    size: 'mini',
+                    icon: 'el-icon-edit-outline',
+                    name: '审批',
+                    disabled: false,
+                    pendingPage:true
+                  }
+                )
+              }
+            })
+            break
+          case 'XMGL':
+            this.$router.push({
+              path: '/project',
+              query: {
+                data: JSON.stringify(row),
+                list: JSON.stringify(
+                  {
+                    type: 'primary',
+                    size: 'mini',
+                    icon: 'el-icon-edit-outline',
+                    name: '审批',
+                    disabled: false,
+                    pendingPage:true
+                  }
+                )
+              }
+            })
+            break
+          case "SJRK": {
+            this.$router.push({
+              path: "/business/inStock",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "SJCK": {
+            this.$router.push({
+              path: "/business/outStock",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "HQZY": {
+            this.$router.push({
+              path: "/business/goodsTransfer",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "CKDB": {
+            this.$router.push({
+              path: "/business/stockTransfer",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "HWTG": {
+            this.$router.push({
+              path: "/business/cargoClearance",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "JSCCF": {
+            this.$router.push({
+              path: "/business/agreement",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "CCF": {
+            this.$router.push({
+              path: "/agreement/agreementStorage",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "ZYF": {
+            this.$router.push({
+              path: "/agreement/agreementTask",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "SF": {
+            this.$router.push({
+              path: "/finance/charge",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "DZ": {
+            this.$router.push({
+              path: "/finance/contrast",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "FF": {
+            this.$router.push({
+              path: "/finance/payment",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "KHDD": {
+            this.$router.push({
+              path: "/domesticTrade/orderInformation",
+              query: { list: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "ApplyFP": {
+            this.$router.push({
+              path: "/finance/chargeInvoice",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "KHDZ": {
+            this.$router.push({
+              path: "/finance/contrast",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "KHSF": {
+            this.$router.push({
+              path: "/finance/charge",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          case "KHFF": {
+            this.$router.push({
+              path: "/finance/payment",
+              query: { data: JSON.stringify(row) },
+            });
+            break;
+          }
+          default: {
+            console.log(row)
+            return this.$message.error("未知错误,无状态");
+          }
         }
       }
     },

+ 14 - 6
src/views/project/index1.vue

@@ -320,7 +320,7 @@
           </el-col>
           <el-col :span="6">
             <el-form-item label="收款单位" prop="fCorpid">
-              <el-select size="small" :disabled="doNot" style="width:200px" v-model="detailform.fCorpid">
+              <el-select size="small" :disabled="doNot" style="width:200px" clearable v-model="detailform.fCorpid">
                 <el-option
                   v-for="item in fMblnoOptions"
                   :key="item.fId"
@@ -331,7 +331,7 @@
           </el-col>
           <el-col :span="6">
             <el-form-item label="责任人" prop="fPerson">
-              <el-select size="small" :disabled="doNot" style="width:200px" v-model="detailform.fPerson">
+              <el-select size="small" :disabled="doNot" clearable style="width:200px" v-model="detailform.fPerson">
                 <el-option
                   v-for="item in liableOption"
                   :key="item.userId"
@@ -483,7 +483,7 @@
             :fixed="item.fixed"
           >
             <template slot-scope="scope">
-              <el-select v-if="item.label == 'fMaterial'" @change="change" :disabled="doNot" v-model="scope.row.fMaterial" placehoder="111请输入">
+              <el-select v-if="item.label == 'fMaterial'" clearable @change="change" :disabled="doNot" v-model="scope.row.fMaterial" placehoder="111请输入">
                 <el-option
                 v-for="item in materialOption"
                 :key="item.fId"
@@ -491,7 +491,7 @@
                 :value="item.fId"
                 />
               </el-select>
-              <el-select v-else-if="item.label == 'fMeasure'" :disabled="doNot" v-model="scope.row.fMeasure" placehoder="222请选择">
+              <el-select v-else-if="item.label == 'fMeasure'" clearable :disabled="doNot" v-model="scope.row.fMeasure" placehoder="222请选择">
                 <el-option
                   v-for="item in unitOptions"
                   :key="item.dictValue"
@@ -499,7 +499,7 @@
                   :value="item.dictValue"
                 />
               </el-select>
-              <el-select v-else-if="item.label == 'fStatus'" :disabled="doNot" v-model="scope.row.fStatus" placehoder="222请选择">
+              <el-select v-else-if="item.label == 'fStatus'" clearable :disabled="doNot" v-model="scope.row.fStatus" placehoder="222请选择">
                 <el-option label="正常" value='0'/>
                 <el-option label="停用" value='1'/>
               </el-select>
@@ -926,7 +926,15 @@ export default {
           }
         }
         this.handleUpdate(scope.row)
-        this.approvedBy = true
+        console.log(this.$route.query.list)
+        let data = JSON.parse(this.$route.query.list)
+        if(data.name){
+          this.approvedBy = true
+          console.log("bbb")
+        }else{
+          console.log("aaa")
+          this.approvedBy = false
+        }
       }else{
         this.mainTabel = false
         this.cancelButton = true

+ 8 - 10
src/views/purchaseIssue/index.vue

@@ -506,6 +506,12 @@ export default {
           plain: true,
           disabled: false
         }, {
+        type: 'primary',
+        size: 'mini',
+        icon: 'el-icon-edit-outline',
+        name: '请核',
+        disabled: false
+      },{
           type: 'success',
           size: 'mini',
           icon: 'el-icon-edit',
@@ -549,13 +555,6 @@ export default {
         //   disabled: false
         // },
         {
-          type: 'primary',
-          size: 'mini',
-          icon: 'el-icon-edit-outline',
-          name: '请核',
-          disabled: false
-        },
-        {
           type: 'info',
           size: 'mini',
           icon: 'el-icon-edit-outline',
@@ -1084,7 +1083,7 @@ export default {
           this.contentList = list.tWarehousebillsfees
           this.contentButton = this.$options.data().contentButton
           console.log(this.$route.query.list)
-          if (this.$route.query.list) {
+          if (this.$route.query.list.name) {
             this.contentButton.push(JSON.parse(this.$route.query.list))
           }
           let data = {
@@ -1129,8 +1128,7 @@ export default {
           }
           for (let li in this.contentButton) {
             if (this.$refs.avatar.form.fBillstatus < 4) {
-              if (this.contentButton[li].name == '录入明细' || this.contentButton[li].name == '保存'||
-                this.contentButton[li].name == '请核') {
+              if (this.contentButton[li].name == '录入明细' || this.contentButton[li].name == '保存') {
                 this.contentButton[li].disabled = true
               } else {
                 this.contentButton[li].disabled = false

+ 8 - 8
src/views/purchaseRequest/index.vue

@@ -496,6 +496,12 @@ export default {
           plain: true,
           disabled: false
         }, {
+        type: 'primary',
+        size: 'mini',
+        icon: 'el-icon-edit-outline',
+        name: '请核',
+        disabled: false
+        }, {
           type: 'primary',
           size: 'mini',
           icon: 'el-icon-plus',
@@ -533,12 +539,6 @@ export default {
           type: 'primary',
           size: 'mini',
           icon: 'el-icon-edit-outline',
-          name: '请核',
-          disabled: false
-        },{
-          type: 'primary',
-          size: 'mini',
-          icon: 'el-icon-edit-outline',
           name: '查看审批',
           disabled: false
         },{
@@ -1017,7 +1017,7 @@ export default {
           this.$refs.avatar.form = list.warehouseBills
           this.contentList = list.tWarehousebillsfees
           this.contentButton = this.$options.data().contentButton
-          if (this.$route.query.list) {
+          if (this.$route.query.list.name) {
             this.contentButton.push(JSON.parse(this.$route.query.list))
           }
           let data = {
@@ -1051,7 +1051,7 @@ export default {
           }
           this.contentButton.forEach(item =>{
             if(this.$refs.avatar.form.fBillstatus < 4){
-              if (item.name == '录入明细' || item.name == '保存' || item.name == '请核'){
+              if (item.name == '录入明细' || item.name == '保存'){
                 item.disabled = true
               }else {
                 item.disabled = false