Pārlūkot izejas kodu

修改了备件申购金额问题2.备件出库新增了提示弹窗

duanxiaoduan 1 gadu atpakaļ
vecāks
revīzija
3accf7fba9

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/index.html


+ 37 - 3
src/views/custom/outStock/index.vue

@@ -6,6 +6,8 @@
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="备件出库" name="first">
+        <!-- <div class="el-icon-info" style="font-size: 30px;float: right;color: #009C69;" @click="handleDescription" /> -->
+        <div class="el-icon-info" style="font-size: 30px;float: right;color: #409EFF;" @click="handleDescription"/>
         <div class="filter-container">
           <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
@@ -1021,6 +1023,24 @@
         <el-button @click="easStatus.dialogFormVisible = false;get_table_data()">关闭</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog :title="textMap[description.dialogStatus]" :destroy-on-close="true" :visible.sync="description.dialogFormVisible" :close-on-click-modal="false" width="70%">
+        <b style="line-height: 28px;">常见问题1:出库保存报错</b>
+        <br>
+      <div class="app-description dialogMinHeight">
+        <div class="content">
+          报错原因1: 请求超时
+          <br>
+          报错原因2:牧场在SAP已出库
+          <br>
+          解决方案:请在SAP冲销相应的未同步的出库。
+          <br>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button class="cancelClose" @click="description.dialogFormVisible = false; ">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -1167,7 +1187,8 @@ export default {
         see: '查看详情',
         update: '编辑',
         create: '新增',
-        easStatus: 'EAS同步—同步失败数据'
+        easStatus: 'EAS同步—同步失败数据',
+        description: '常见问题说明'
       },
       getdataListParm: {
         name: 'getBigPartuseList',
@@ -1333,7 +1354,11 @@ export default {
             pastureid: Cookies.get('pastureid')
           }
         }
-      }
+      },
+      description: {
+        dialogFormVisible: false,
+        dialogStatus: ''
+      },
     }
   },
   computed: {
@@ -3259,8 +3284,11 @@ export default {
       }).catch(() => {
         this.$message({ type: 'info', message: '已取消忽略同步' })
       })
+    },
+    handleDescription() {
+      this.description.dialogStatus = 'description'
+      this.description.dialogFormVisible = true
     }
-
   }
 }
 </script>
@@ -3288,5 +3316,11 @@ export default {
   .el-form-item__content{
     line-height: 0;
   }
+  .app-description{
+    display:flex; justify-content: left; align-items: left;font-size: 14px;line-height: 28px;height: 300px;
+    .content{
+      display:flex;
+    }
+  }
 
 </style>

+ 80 - 17
src/views/custom/subscribe/index.vue

@@ -667,7 +667,7 @@ export default {
       textMap: {
         update: '编辑',
         create: '新增',
-        see: '查看/特殊申购l',
+        see: '查看',
         examine1: '审核1',
         examine2: '审核2',
         examine3: '审核3',
@@ -1387,6 +1387,12 @@ export default {
     },
     // 查看
     form_see(row) {
+      // 查看/特殊申购
+      if(row.purchase_type == 1 || row.purchase_type == 3){
+        this.textMap.see = '特殊申购'
+      }else{
+        this.textMap.see = '查看'
+      }
       this.dialogStatus = 'see'
       this.dialogFormVisibleSee = true
       this.seeTemp = Object.assign({}, row)
@@ -1395,12 +1401,12 @@ export default {
       this.listSee = []
       this.getdataListSee.parammaps.id = this.seeTemp.id
       this.getSeeList()
+    },
+    getFlowPath(){
       // 流程图
       var reason = '未通过原因:' + this.seeTemp.workflowNote
-
-
-
       if (this.seeTemp.purchase_type < 0 || this.seeTemp.purchase_type == 0 ) {
+        if(this.isApplyEx4 == true){
           if (this.seeTemp.statue === 2) {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' }]
             this.active = 1
@@ -1423,8 +1429,8 @@ export default {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '场长审核' }, { title: '采购审核' }]
             this.active = 4
           }  else if (this.seeTemp.statue === 11) {
-            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
-            this.active = 5
+              this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
+              this.active = 5
           } else if (this.seeTemp.statue === 12) {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson  }, { title: '场长审核' , date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason }, { title: '采购审核' }]
             this.active = 5
@@ -1436,11 +1442,46 @@ export default {
             this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
             this.active = 6
           }
+        }else{
+          if (this.seeTemp.statue === 2) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '采购审核' }]
+            this.active = 1
+          } else if (this.seeTemp.statue === 3) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' },  { title: '采购审核' }]
+            this.active = 2
+          } else if (this.seeTemp.statue === 4) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
+            this.active = 2
+          } else if (this.seeTemp.statue === 9) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' }, { title: '采购审核' }]
+            this.active = 3
+          } else if (this.seeTemp.statue === 10) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason  }, { title: '供应主管审核' }, { title: '采购审核' }]
+            this.active = 3
+          }  else if (this.seeTemp.statue === 5) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+            this.active = 4
+          } else if (this.seeTemp.statue === 6) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason },  { title: '采购审核' }]
+            this.active = 4
+          }  else if (this.seeTemp.statue === 11) {
+              this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson   }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+              this.active = 4
+          } else if (this.seeTemp.statue === 12) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },  { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson  }, { title: '采购审核' }]
+            this.active = 4
+          } else if (this.seeTemp.statue === 7) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+            this.active = 6
+          } else if (this.seeTemp.statue === 8) {
+            this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
+            this.active = 6
+          }
+        }
       } else if(this.seeTemp.purchase_type == 3){
         this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }]
         this.active = 1
       }else {
-        // 待写
         if (this.seeTemp.statue === 2) {
           this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '财务审核' },{ title: '场长审核' },{ title: '采购审核' }]
           this.active = 1
@@ -1482,10 +1523,9 @@ export default {
           this.active = 7
         }
       }
-
-
     },
     getSeeList() {
+      this.listLoadingSee = true
       GetDataByName(this.getdataListSee).then(response => {
         if (response.data.list !== null) {
           console.log('查看下方table数据', response.data.list)
@@ -1493,17 +1533,34 @@ export default {
           this.listAdd = response.data.list
           var sumPrices = 0
           response.data.list.forEach(function(i,j){
-            sumPrices = sumPrices + i["sumPrice"]
+            sumPrices = sumPrices + (parseFloat(i.price1) *parseFloat(i.amount) )
           })
           console.log("总价sumPrices",sumPrices)
-          var priceObj  = response.data.list.find(obj => obj.price >= 500)
+          var priceObj = false
+          var priceArr = []
+          response.data.list.forEach(function(i,j){
+            if(parseFloat(i.price1) * parseFloat(i.amount) >= 500){
+              priceArr.push(true)
+            }else{
+              priceArr.push(false)
+            }
+          })
+
+          if (priceArr.includes(true)) {
+            priceObj = true
+          } else {
+            priceObj = false
+          }
           console.log("priceObj",priceObj)
           //总价大于2000 或单价>500
           if(sumPrices >= 2000 || priceObj){
             this.isApplyEx4 = true
+            this.getFlowPath()
           } else {
             this.isApplyEx4 = false
+            this.getFlowPath()
           }
+
           for (let i = 0; i < response.data.list.length; i++) {
             if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
               console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
@@ -1520,8 +1577,6 @@ export default {
               this.listAdd[i].srcpath = ''
               this.listAdd[i].picpath = ''
             }
-            console.log(process.env.VUE_APP_BASE_API)
-            console.log(this.listSee, '============')
           }
         }
         if (response.data.total) {
@@ -1905,14 +1960,22 @@ export default {
           this.requestParam.parammaps = {}
           this.requestParam.parammaps.id = this.examineTemp.id
           if (this.examineTemp.statue == 1) {
-            if(this.isApplyEx4 == true){
-              this.requestParam.parammaps.statue = 5
+            if(this.examineTemp.purchase_type !== 1 || this.examineTemp.purchase_type !== 3){
+              if(this.isApplyEx4 == true){
+                this.requestParam.parammaps.statue = 5
+              }else{
+                this.requestParam.parammaps.statue = 11
+              }
             }else{
               this.requestParam.parammaps.statue = 11
             }
           } else if (this.examineTemp.statue == 2) {
-            if(this.isApplyEx4 == true){
-              this.requestParam.parammaps.statue = 6
+            if(this.examineTemp.purchase_type !== 1 || this.examineTemp.purchase_type !== 3){
+              if(this.isApplyEx4 == true){
+                this.requestParam.parammaps.statue = 6
+              }else{
+                this.requestParam.parammaps.statue = 12
+              }
             }else{
               this.requestParam.parammaps.statue = 12
             }

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels