瀏覽代碼

待审页面修改

wengyuwen 4 年之前
父節點
當前提交
448ae7a2e7

+ 26 - 18
src/views/morePage/stock/index.vue

@@ -10,30 +10,32 @@
       <el-row>
         <el-col :span="6">
           <el-form-item label="客户名称" prop="refno1">
-            <el-select
+            <el-input
               v-model="queryParams.refno1"
               placeholder="请输入客户名称"
               clearable
               size="small"
               filterable
             >
-              <el-option
-                v-for="(dict, index) in factIdOptions"
-                :key="index.fId"
-                :label="dict.fName"
-                :value="dict.fId"
-              />
-            </el-select> </el-form-item
+<!--              <el-option-->
+<!--                v-for="(dict, index) in factIdOptions"-->
+<!--                :key="index.fId"-->
+<!--                :label="dict.fName"-->
+<!--                :value="dict.fId"-->
+<!--              />-->
+            </el-input> </el-form-item
         ></el-col>
         <el-col :span="6">
-          <el-form-item label-width="100px" label="业务类型" prop="rbillId">
+          <el-form-item label-width="100px" label="业务类型" prop="refno2">
             <el-select
-              v-model="queryParams.rbillId"
+              v-model="queryParams.refno2"
               placeholder="请选择业务类型"
               clearable
               size="small"
-              multiple
             >
+              <el-option label="项目管理" value="XMGL"/>
+              <el-option label="采购申请" value="SQ"/>
+              <el-option label="销售出库" value="XS"/>
             </el-select>
           </el-form-item>
         </el-col>
@@ -44,14 +46,15 @@
             prop="sendTime"
           >
             <el-date-picker
-              v-model="queryParams.sendTime"
+              v-model="queryParams.sendTimeList"
               size="small"
               @keyup.enter.native="handleQuery"
               style="max-width: 187px"
-              type="datetimerange"
+              type="daterange"
               align="right"
               start-placeholder="开始日期"
               end-placeholder="结束日期"
+              value-format="yyyy-MM-dd"
               :default-time="['00:00:00', '23:59:59']"
             >
             </el-date-picker>
@@ -129,13 +132,16 @@
                 prop="auditOpTime"
               >
                 <el-date-picker
-                  v-model="queryParams.auditOpTime"
+                  v-model="queryParams.auditOpTimeList"
                   placeholder="请输入审核日期"
                   clearable
                   size="small"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
                   @keyup.enter.native="handleQuery"
                   style="max-width: 187px"
-                  type="date"
+                  value-format="yyyy-MM-dd"
+                  type="daterange"
                 >
                 </el-date-picker></el-form-item
             ></el-col>
@@ -151,10 +157,10 @@
         <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" index="">审核中</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" index="A">审核通过</el-button></el-col
       >
 
       <div class="tabSetting">
@@ -402,6 +408,7 @@ export default {
         billNo: null,
         sendUserId: null,
         auditUserId: null,
+        auditOpTimeList:null,
         actId: null,
         sendTime: null,
         billTime: null,
@@ -473,7 +480,7 @@ export default {
         },
         {
           surface: "10",
-          label: "isAccountPeriod",
+          label: "sendName",
           name: "提交人",
           checked: 0,
           width: 150,
@@ -575,6 +582,7 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      console.log()
       this.queryParams.pageNum = 1;
       this.getList(this.queryParams);
     },

+ 36 - 17
src/views/project/index1.vue

@@ -299,11 +299,13 @@
         <el-breadcrumb-item>项目管理</el-breadcrumb-item>
         <el-breadcrumb-item>项目管理详情页</el-breadcrumb-item>
         <el-breadcrumb-item>
-          <el-button plain size="mini" type="danger" icon="el-icon-arrow-left" @click="goBack">
+          <el-button  v-if="cancelButton === true" plain size="mini" type="danger" icon="el-icon-arrow-left" @click="goBack">
             返回列表
           </el-button>
+          <el-button v-if="cancelButton === false" plain size="mini" icon="el-icon-refresh-left" type="danger" @click="cancelTwo">返回首页</el-button>
         </el-breadcrumb-item>
       </el-breadcrumb>
+      <h1 style="text-align: center;margin-top: -42px">项目管理</h1>
       <el-form label-width="88px" ref="detailform" :model="detailform" :rules="rules">
         <el-row>
           <el-col :span="6">
@@ -359,9 +361,6 @@
       </el-form>
       <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
-          <el-button v-if="cancelButton === false" size="mini" icon="el-icon-refresh-left" type="danger" @click="cancelTwo">返回首页</el-button>
-        </el-col>
-        <el-col :span="1.5">
           <el-button size="mini" :disabled="doNot" icon="el-icon-plus" type="primary" @click="addList">录入</el-button>
         </el-col>
         <el-col :span="1.5">
@@ -555,6 +554,7 @@ import { addChange, getChange, listCharge, getCorps, getliable, listmaterial, de
 import Cookies from 'js-cookie'
 import { addSet, resetModule, select } from '@/api/system/set'
 import { getName, queryUserVal, revoke, revokeBill } from '@/api/purchaseIssue'
+import Global from '@/layout/components/global'
 Vue.directive('dialogDrag', {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector('.el-dialog__header')
@@ -842,11 +842,15 @@ export default {
         }]
       },
       loading:true,
-      name:''
+      name:'',
+      pendingPage:null,
     }
   },
   activated(){
     this.homePage()
+    if(this.$route.query.list){
+      this.pendingPage = JSON.parse(this.$route.query.list)
+    }
   },
   created(){
     //获取登陆人
@@ -946,19 +950,34 @@ export default {
     },
     //首页审批跳转关闭返回首页
     cancelTwo() {
-      this.open = false
-      let view = {
-        fullPath: "/project",
-        hash: "",
-        matched: Array(2),
-        meta: Object,
-        name: "Project",
-        params: Object,
-        path: "/project",
-        query: Object,
-        title: "项目管理"
+      let view = {}
+      if(this.pendingPage.pendingPage){
+        view = {
+          fullPath: "/morePage/stock?open=true",
+          hash: "",
+          matched: Array(2),
+          meta: Object,
+          name: "MorePage/stock",
+          params: Object,
+          path: "/morePage/stock",
+          query: Object,
+          title: "待审数据"
+        }
+        this.$router.push({ path: '/morePage/stock' })
+      }else {
+        view = {
+          fullPath: "/project",
+          hash: "",
+          matched: Array(2),
+          meta: Object,
+          name: "Project",
+          params: Object,
+          path: "/project",
+          query: Object,
+          title: "项目管理"
+        }
+        this.$router.push({ path: '/index' })
       }
-      this.$router.push({ path: '/index' })
       this.$store
         .dispatch('tagsView/delView', view)
         .then(({ visitedViews }) => {

+ 47 - 66
src/views/purchaseIssue/index.vue

@@ -189,6 +189,7 @@ import {
   confirmDeletion, pleaseCheck, revoke, queryUserVal, getName, revokeBill, copyNew
 } from '@/api/purchaseIssue/index'
 import Cookies from 'js-cookie'
+import Global from '@/layout/components/global'
 
 export default {
   name: 'index',
@@ -721,11 +722,15 @@ export default {
           labelSize: '80',
           rules: [{ required: false, message: ' ' }]
         }
-      ]
+      ],
+      pendingPage:null,
     }
   },
   activated() {
     this.homePage()
+    if(this.$route.query.list){
+      this.pendingPage = JSON.parse(this.$route.query.list)
+    }
     if (this.$route.query.open === 'true'){
       this.contentList = []
       this.contentButton = this.$options.data().contentButton
@@ -955,19 +960,34 @@ export default {
     },
     //首页审批跳转关闭返回首页
     cancelTwo() {
-      this.open = false
-      let view = {
-        fullPath: '/purchaseIssue',
-        hash: '',
-        matched: Array(2),
-        meta: Object,
-        name: 'PurchaseIssue',
-        params: Object,
-        path: '/purchaseIssue',
-        query: Object,
-        title: '销售出库'
+      let view = {}
+      if(this.pendingPage.pendingPage){
+        view = {
+          fullPath: "/morePage/stock?open=true",
+          hash: "",
+          matched: Array(2),
+          meta: Object,
+          name: "MorePage/stock",
+          params: Object,
+          path: "/morePage/stock",
+          query: Object,
+          title: "待审数据"
+        }
+        this.$router.push({ path: '/morePage/stock' })
+      }else {
+        view = {
+          fullPath: '/purchaseIssue',
+          hash: '',
+          matched: Array(2),
+          meta: Object,
+          name: 'PurchaseIssue',
+          params: Object,
+          path: '/purchaseIssue',
+          query: Object,
+          title: '销售出库'
+        }
+        this.$router.push({ path: '/index' })
       }
-      this.$router.push({ path: '/index' })
       this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
         if (this.isActive(view)) {
           this.toLastView(visitedViews, view)
@@ -1021,7 +1041,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data, list) {
+    getRow(data, list, add) {
       select(data).then((res) => {
         if (data.tableName === '销售出库详情') {
           if (res.data.length != 0) {
@@ -1035,7 +1055,11 @@ export default {
             this.$set(this.purchaseList,'columnList',this.$options.data().contentStyle)
             this.setRowList = this.$options.data().contentStyle
           }
-          this.purchaseList.columnList.forEach(item => item.disabled = true)
+          if(add){
+            this.purchaseList.columnList.forEach(item => item.disabled = false)
+          }else{
+            this.purchaseList.columnList.forEach(item => item.disabled = true)
+          }
           this.pageDisplay = false
           this.isItHidden = false
           this.inDex = this.contentOption.length
@@ -1119,9 +1143,6 @@ export default {
                 this.contentButton[li].disabled = false
               }
             }
-            // if (this.contentButton[li].name == '撤销审批' && this.lander === operator) {
-            //   this.contentButton[li].disabled = false
-            // }
           }
         }
       })
@@ -1161,32 +1182,12 @@ export default {
           // this.contentList = res.data.tWarehousebillsCntrs
           this.contentOption.forEach(item => item.disabled = true)
           this.contentStyle.forEach(item => item.disabled = true)
-          this.contentButton = this.$options.data().contentButton
-          this.contentButton.push({
-            type: 'danger',
-            size: 'mini',
-            icon: 'el-icon-refresh-left',
-            name: '撤销审批',
-            disabled: false
-          })
-          this.contentButton.push({
-            type: 'primary',
-            size: 'mini',
-            icon: 'el-icon-edit-outline',
-            name: '查看审批',
-            disabled: false
-          })
-          let operator = this.$refs.avatar.form.createBy
-          for (let li in this.contentButton) {
-            if (this.contentButton[li].name == '打印'||this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '申请发票' || this.contentButton[li].name == '查看审批') {
-              this.contentButton[li].disabled = false
-            } else {
-              this.contentButton[li].disabled = true
-            }
-            if (this.contentButton[li].name == '撤销审批' && this.lander === operator) {
-              this.contentButton[li].disabled = false
-            }
+          let data = {
+            tableName: this.queryList.tableName,
+            userId: Cookies.get('userName')
           }
+          this.getRow(data)
+          this.query(this.formDataList)
         }
       })
     },
@@ -1318,7 +1319,7 @@ export default {
         this.query(this.formDataList)
       } else if (this.$route.query.data) {
         this.cancelTwo()
-        this.$router.push({ path: '/index' })
+        // this.$router.push({ path: '/index' })
       } else {
         this.$confirm('当前数据未保存是否保存?', '提示', {
           confirmButtonText: '保存',
@@ -1341,25 +1342,6 @@ export default {
       let data
       switch (row.name) {
         case '新单':
-          if (row.nameTwo === '详情页'){
-            this.contentList = []
-            data = {
-              tableName: this.purchaseList.tableName,
-              userId: Cookies.get('userName')
-            }
-            this.$refs.avatar.form = {}
-            this.getRow(data)
-            this.$refs.avatar.clearVerification()
-            this.contentOption.forEach(item => {
-              if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
-                item.disabled = true
-              } else {
-                item.disabled = false
-              }
-            })
-            this.contentButton.forEach(item => item.disabled = false)
-            this.contentStyle.forEach(item => item.disabled = false)
-          }else {
             this.contentList = []
             this.contentButton = this.$options.data().contentButton
             data = {
@@ -1367,8 +1349,7 @@ export default {
               userId: Cookies.get('userName')
             }
             this.$refs.avatar.form = {}
-            this.getRow(data)
-
+            this.getRow(data,'',1)
             this.contentOption.forEach(item => {
               if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'fBillno') {
                 item.disabled = true
@@ -1378,7 +1359,7 @@ export default {
             })
             this.contentButton.forEach(item => item.disabled = false)
             this.contentStyle.forEach(item => item.disabled = false)
-          }
+            this.$refs.avatar.clearVerification()
           break
         case '复制新单':
           if (row.nameTwo === '详情页'){

+ 58 - 54
src/views/purchaseRequest/index.vue

@@ -191,7 +191,7 @@ import {
   queryUserVal
 } from '@/api/purchaseRequest/index'
 import Cookies from 'js-cookie'
-
+import Global from '@/layout/components/global'
 export default {
   name: 'index',
   data() {
@@ -342,7 +342,6 @@ export default {
           width: 100,
           onabort: '',
           disabled: false,
-          changeable: 1
         },{
           surface: '4',
           label: 'fUnitprice',
@@ -739,12 +738,15 @@ export default {
           labelSize: '80',
           rules: [{ required: false, message: ' ' }]
         }
-      ]
+      ],
+      pendingPage:null,
     }
   },
   activated(){
     this.homePage()
-    // console.log(this.$route.query.open)
+    if(this.$route.query.list){
+      this.pendingPage = JSON.parse(this.$route.query.list)
+    }
     if (this.$route.query.open === 'true'){
       this.contentList = []
       let data = {
@@ -887,18 +889,34 @@ export default {
     },
     //首页审批跳转关闭返回首页
     cancelTwo() {
-      let view = {
-        fullPath: '/purchaseRequest',
-        hash: '',
-        matched: Array(2),
-        meta: Object,
-        name: 'PurchaseRequest',
-        params: Object,
-        path: '/purchaseRequest',
-        query: Object,
-        title: '采购申请'
+      let view = {}
+      if(this.pendingPage.pendingPage){
+        view = {
+          fullPath: "/morePage/stock?open=true",
+          hash: "",
+          matched: Array(2),
+          meta: Object,
+          name: "MorePage/stock",
+          params: Object,
+          path: "/morePage/stock",
+          query: Object,
+          title: "待审数据"
+        }
+        this.$router.push({ path: '/morePage/stock' })
+      }else{
+        view = {
+          fullPath: '/purchaseRequest',
+          hash: '',
+          matched: Array(2),
+          meta: Object,
+          name: 'PurchaseRequest',
+          params: Object,
+          path: '/purchaseRequest',
+          query: Object,
+          title: '采购申请'
+        }
+        this.$router.push({ path: '/index' })
       }
-      this.$router.push({ path: '/index' })
       this.$store
         .dispatch('tagsView/delView', view)
         .then(({ visitedViews }) => {
@@ -957,7 +975,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data,list) {
+    getRow(data,list,add) {
       console.log(data,list)
       select(data).then((res) => {
         if (data.tableName === '采购申请详情') {
@@ -971,7 +989,11 @@ export default {
             this.$set(this.purchaseList,'columnList',this.$options.data().contentStyle)
             this.setRowList = this.$options.data().contentStyle
           }
-          this.purchaseList.columnList.forEach(item => item.disabled = true)
+          if(add){
+            this.purchaseList.columnList.forEach(item => item.disabled = false)
+          }else{
+            this.purchaseList.columnList.forEach(item => item.disabled = true)
+          }
           this.pageDisplay = false
           this.isItHidden = false
           this.inDex = this.contentOption.length
@@ -1121,18 +1143,22 @@ export default {
     },
     //详情内容保存
     submitAndSave(item) {
-      let formData = new window.FormData()
-      this.$refs.avatar.form.fMoney = 0
-      this.contentList.forEach(item => this.$refs.avatar.form.fMoney += Number(item.fAmount))
-      formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
-      formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
-      formData.append('fBilltype', 'SQ')
-      submit(formData).then(res => {
-        if (res.code == 200) {
-          this.$message.success('保存成功')
-          this.$refs.avatar.form = res.data.warehouseBills
-          this.contentList = res.data.tWarehousebillsCntrs
-          console.log(this.dataList, this.contentList)
+      console.log(this.$refs.avatar.form.fBillstatus)
+      if(this.$refs.avatar.form.fBillstatus < 4 || !this.$refs.avatar.form.fBillstatus) {
+        let formData = new window.FormData()
+        this.$refs.avatar.form.fMoney = 0
+        this.contentList.forEach(item => this.$refs.avatar.form.fMoney += Number(item.fAmount))
+        formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
+        formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
+        formData.append('fBilltype', 'SQ')
+        submit(formData).then(res => {
+          if (res.code == 200) {
+            this.$message.success('保存成功')
+            this.$refs.avatar.form = res.data.warehouseBills
+            this.contentList = res.data.tWarehousebillsCntrs
+          }
+        })
+      }
           if (item == 1){
             this.dialogVisible = true
           }else if (item === 2){
@@ -1162,8 +1188,6 @@ export default {
               this.viewMethod(scope)
             })
           }
-        }
-      })
     },
     //表单选中后触发
     selectTrigger(name, list, id) {
@@ -1193,7 +1217,7 @@ export default {
         this.query(this.formDataList)
       } else if(this.$route.query.data){
         this.cancelTwo();
-        this.$router.push({path:'/index'})
+        // this.$router.push({path:'/index'})
       }else {
         this.$confirm('当前数据未保存是否保存?', '提示', {
           confirmButtonText: '保存',
@@ -1217,15 +1241,13 @@ export default {
       let data
       switch (row.name) {
         case '新单':
-          if (row.nameTwo === '详情页'){
             this.contentList = []
             data = {
               tableName: this.purchaseList.tableName,
               userId: Cookies.get('userName')
             }
             this.$refs.avatar.form = {}
-            this.getRow(data)
-            this.$refs.avatar.clearVerification()
+            this.getRow(data,'',1)
             this.contentOption.forEach(item => {
               if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
                 item.disabled = true
@@ -1235,26 +1257,8 @@ export default {
             })
             this.contentButton.forEach(item => item.disabled = false)
             this.contentStyle.forEach(item => item.disabled = false)
+             this.$refs.avatar.clearVerification()
             this.$refs.avatar.form.createBy = Cookies.get('userName')
-          }else {
-            this.contentList = []
-            data = {
-              tableName: this.purchaseList.tableName,
-              userId: Cookies.get('userName')
-            }
-            this.$refs.avatar.form = {}
-            this.getRow(data)
-            this.contentOption.forEach(item => {
-              if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
-                item.disabled = true
-              } else {
-                item.disabled = false
-              }
-            })
-            this.contentButton.forEach(item => item.disabled = false)
-            this.contentStyle.forEach(item => item.disabled = false)
-            this.$refs.avatar.form.createBy = Cookies.get('userName')
-          }
           break
         case '保存':
           this.$refs.avatar.submitForm('submit')

+ 2 - 22
src/views/warehouse/inStock/index.vue

@@ -683,7 +683,7 @@ export default {
           type:'primary',
           size:'mini',
           icon:'el-icon-plus',
-          name:'新',
+          name:'新',
           disabled:false,
           hasPermi:['anpin:stockControl:anPingApply']
         },{
@@ -1369,27 +1369,6 @@ export default {
     //所以按钮
     buttonList(row){
       switch (row.name) {
-        case '新增':
-          this.detailList.columnList = this.detailStyle
-          this.detailForm = {}
-          this.detailData = []
-          this.inDex = this.detailOption.length
-          //从表修改按钮
-          for(let li in this.detailStyle){
-            if(!this.detailStyle[li].doNot){
-              this.detailStyle[li].disabled = false
-            }
-          }
-          for(let item in this.detailOption){
-            if(!this.detailOption[item].doNot){
-              this.detailOption[item].disabled = false
-            }
-          }
-          for(let li in this.detailButton){
-            this.detailButton[li].disabled = false
-          }
-          this.MainTable = true
-          break
         case '新单':
           this.detailList.columnList = this.detailStyle
           this.detailForm = {}
@@ -1409,6 +1388,7 @@ export default {
           for(let li in this.detailButton){
             this.detailButton[li].disabled = false
           }
+          this.MainTable = true
           break
         case '录入明细':
           this.$refs.detailForm.rules()

+ 2 - 2
src/views/warehouse/outStock/index.vue

@@ -48,7 +48,7 @@
           </el-button>
         </el-breadcrumb-item>
       </el-breadcrumb>
-      <h1 style="text-align: center;margin-top: -42px">仓库库</h1>
+      <h1 style="text-align: center;margin-top: -42px">仓库库</h1>
       <MainForm
         ref="detailForm"
         :searchdata="detailOption"
@@ -683,7 +683,7 @@ export default {
           type:'primary',
           size:'mini',
           icon:'el-icon-plus',
-          name:'新',
+          name:'新',
           disabled:false,
           hasPermi:['anpin:stockControl:anPingApply']
         },{