Sfoglia il codice sorgente

备件申购特殊申购接口对接

duanxiaoduan 1 anno fa
parent
commit
a6cf20c5e7
2 ha cambiato i file con 37 aggiunte e 9 eliminazioni
  1. BIN
      dist.zip
  2. 37 9
      src/views/custom/subscribe/index.vue

BIN
dist.zip


+ 37 - 9
src/views/custom/subscribe/index.vue

@@ -1637,7 +1637,8 @@ export default {
         }, 100)
       })
     },
-    public_select(item){
+    public_select(item){
+      this.$set(item,'myId',Date.parse(new Date()))
       if (this.createTemp.providerId == '') {
         if (this.listAdd.length > 0) {
           if (this.listAdd.find(obj => obj.partId == item.partId)) {
@@ -1829,6 +1830,9 @@ export default {
           let url = 'authdata/partpurchase/edit'
           let dataArr = []
           for(let i =0 ;i<this.listAdd.length;i++){
+            if(this.listAdd[i].myId !== undefined){
+              this.listAdd[i].id = 0
+            }
             let obj = {
               "id": parseFloat(this.listAdd[i].id),
               "bigId": parseFloat(this.createTemp.bigId),
@@ -2801,6 +2805,8 @@ export default {
       })
     },
     handle_specialSubscription(){
+      this.resetCreateTemp()
+      this.listAdd = []
       this.createTemp.purchaseType = '1'
       this.edit = 1
       this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
@@ -2918,10 +2924,13 @@ export default {
         }
         if(this.createTemp.purchaseType == 1){
           if(this.createTemp.markBackend){
-            console.log('有数据-走新保存')
+            console.log('有数据-走新保存',this.listAdd)
             let url = 'authdata/partpurchase/edit'
             let dataArr = []
             for(let i =0 ;i<this.listAdd.length;i++){
+              if(this.listAdd[i].myId !== undefined){
+                this.listAdd[i].id = 0
+              }
               let obj = {
                 "id": parseFloat(this.listAdd[i].id),
                 "bigId": parseFloat(this.createTemp.bigId),
@@ -2964,7 +2973,7 @@ export default {
             postJson(url, data).then(response => {
               if (response.msg !== 'fail') {
                 this.get_table_data()
-                this.dialogFormVisible = false
+                this.dialogFormVisible2 = false
                 this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
               } else {
                 failproccess(response, this.$notify)
@@ -2993,9 +3002,9 @@ export default {
       let url = 'authdata/spare/parts/requisitions'
         for(let i=0;i<this.listAdd.length;i++){
           this.$set(this.listAdd[i],'contractId',String(this.listAdd[i].contractId))
-          this.$set(this.listAdd[i],'departmentId',this.createTemp.departmentId)
+          this.$set(this.listAdd[i],'departmentId',String(this.createTemp.departmentId))
           this.$set(this.listAdd[i],'date',this.createTemp.createTime)
-          this.$set(this.listAdd[i],'employeId',this.createTemp.employeId)
+          this.$set(this.listAdd[i],'employeId',String(this.createTemp.employeId))
         }
         let data = {
           "pastureId": parseInt(this.createTemp.pastureId),
@@ -3018,7 +3027,7 @@ export default {
         postJson(url, data).then(response => {
           if (response.msg !== 'fail') {
             this.get_table_data()
-            this.dialogFormVisible = false
+            this.dialogFormVisible2 = false
             this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
           } else {
             failproccess(response, this.$notify)
@@ -3061,9 +3070,6 @@ export default {
           this.isokDisable = false
           if (response.msg !== 'fail') {
             this.get_table_data()
-            this.dialogFormVisible_Examine = false
-            this.dialogFormVisible_See = false
-            this.statueReason = false
             this.$notify({
               title: '成功',
               message: '驳回成功',
@@ -3085,6 +3091,28 @@ export default {
     },
     form_modify(){
       // 提交
+      console.log('点击了库管审核')
+      this.isokDisable = true
+      setTimeout(() => {
+        this.isokDisable = false
+      }, 1000)
+      this.requestParam = {}
+      this.requestParam.name = 'partpurchaseCharge'
+      this.requestParam.parammaps = {}
+      this.requestParam.parammaps.id = this.examineTemp.id
+      this.requestParam.parammaps.statue = 3
+      this.requestParam.parammaps.empId	 = Cookies.get('employeid')
+      PostDataByName(this.requestParam).then(response => {
+        console.log('提交确认发送参数', this.requestParam)
+        this.isokDisable = false
+        if (response.msg !== 'fail') {
+          this.get_table_data()
+          this.dialogFormVisible_modify = false
+          this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+        } else {
+          failproccess(response, this.$notify)
+        }
+      })
     },
     handle_milkSubscription(){
       // 奶厅申购