Browse Source

细节修改

qinbai 3 years ago
parent
commit
f41d280752

+ 2 - 2
src/api/financialManagement/financialManagement.js

@@ -15,9 +15,9 @@ export const getList = (current, size, params) => {
 export const remove = (id) => {
   return request({
     url: '/api/trade-finance/settlement/remove',
-    method: 'delete',
+    method: 'post',
     params: {
-      id:id
+      ids:id
     }
   })
 }

+ 6 - 1
src/views/financialManagement/payment.vue

@@ -83,7 +83,12 @@
       }
     },
     created() {
-
+      if(this.$route.query.params){
+        this.detailData={
+          params:this.$route.query.params
+        }
+        this.show = false;
+      }
     },
     components:{
       detailPage

+ 17 - 6
src/views/financialManagement/paymentDetailsPage.vue

@@ -132,7 +132,7 @@
           multipleChoices:false,
           multiple:false,
           disabled:false,
-          searchShow:false,
+          searchShow:true,
           collapseTags:false,
           placeholder:'请点击右边按钮选择',
           dicData:[]
@@ -327,13 +327,13 @@
         this.assignment()
       }
 
-      if(this.$route.query.params){
-        detailListData(this.$route.query.params.id).then(res =>{
+      if(this.detailData.params){
+        detailListData(this.detailData.params.id).then(res =>{
           this.form.corpId =  res.data.data.corpId;
           this.form.srcOrderno =  res.data.data.orderNo;
           this.configuration.dicData = res.data.data.corpsName;
           res.data.data.itemsVOList.forEach((item,index) =>{
-            this.$route.query.params.orderItemIds.forEach((e,i) =>{
+            this.detailData.params.orderItemIds.forEach((e,i) =>{
               if(e ==  index){
                 const params ={
                   srcOrderno:res.data.data.orderNo,
@@ -380,7 +380,7 @@
       refreshChange() {
         console.log('1')
       },
-      editFinance(){
+      editFinance(status){
         this.$refs["form"].validate((valid) => {
           if(valid){
             const params = {
@@ -393,11 +393,22 @@
                 this.$message.success("操作成功!")
               }
             })
+            if(status === true){
+              this.$emit("goBack");
+            }
           }
         })
       },
       backToList(){
-        this.$emit("goBack");
+        this.$confirm("是否保存当前页面?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.editFinance(true)
+        }).catch(() => {
+          this.$emit("goBack");
+        })
       }
     }
   }

+ 14 - 3
src/views/financialManagement/receiptDetailsPage.vue

@@ -131,7 +131,7 @@
           multipleChoices:false,
           multiple:false,
           disabled:false,
-          searchShow:false,
+          searchShow:true,
           collapseTags:false,
           placeholder:'请点击右边按钮选择',
           dicData:[]
@@ -338,7 +338,7 @@
       refreshChange() {
         console.log('1')
       },
-      editFinance(){
+      editFinance(status){
         this.$refs["form"].validate((valid) => {
           if(valid){
             const params = {
@@ -351,11 +351,22 @@
                 this.$message.success("操作成功!")
               }
             })
+            if(status === true){
+              this.$emit("goBack");
+            }
           }
         })
       },
       backToList(){
-        this.$emit("goBack");
+        this.$confirm("是否保存当前页面?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning",
+        }).then(() => {
+          this.editFinance(true)
+        }).catch(() => {
+          this.$emit("goBack");
+        })
       }
     }
   }

+ 21 - 7
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -139,7 +139,7 @@
       <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1">导入</el-button>
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>
           <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"
                      :disabled="tableData.length !== 1">导入</el-button>
         </span>
@@ -177,7 +177,7 @@ export default {
         multipleChoices:false,
         multiple:false,
         disabled:false,
-        searchShow:false,
+        searchShow:true,
         collapseTags:false,
         placeholder:'请点击右边按钮选择',
         dicData:[]
@@ -186,7 +186,7 @@ export default {
         multipleChoices:false,
         multiple:false,
         disabled:false,
-        searchShow:false,
+        searchShow:true,
         collapseTags:false,
         placeholder:'请点击右边按钮选择',
         dicData:[]
@@ -340,9 +340,12 @@ export default {
         this.$set(this.form, "sysNo", res.data.data)
       })
     }
-    if (this.$route.query.form) {
-      this.form = JSON.parse(this.$route.query.form);
+    if (this.detailData.form) {
+      this.form = JSON.parse(this.detailData.form);
       this.form.id = null
+      this.form.orderItemsList.forEach(item =>{
+        delete item.id
+      })
       this.contactsData = this.form.orderItemsList
       delete this.form.orderItemsList
       getSysNo("JK-FH").then(res => {
@@ -429,7 +432,7 @@ export default {
       })
     },
     //修改提交触发
-    editCustomer() {
+    editCustomer(status) {
       this.$refs["form"].validate((valid) => {
         for (let i = 0; i < this.contactsData.length; i++) {
           if (this.contactsData[i].billNo == null) {
@@ -455,6 +458,9 @@ export default {
               })
             }
           })
+          if(status === true){
+            this.$emit("goBack");
+          }
         } else {
           return false;
         }
@@ -565,7 +571,15 @@ export default {
     },
     //返回列表
     backToList() {
-      this.$emit("goBack");
+      this.$confirm("是否保存当前页面?", "提示", {
+        confirmButtonText: "保存",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.editCustomer(true)
+      }).catch(() => {
+        this.$emit("goBack");
+      })
     }
   },
 }

+ 6 - 0
src/views/importTrade/invoice/index.vue

@@ -91,6 +91,12 @@ export default {
     detailPage
   },
   created() {
+    if(this.$route.query.form){
+      this.detailData={
+        form:this.$route.query.form
+      }
+      this.show = false;
+    }
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)

+ 20 - 8
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -140,7 +140,7 @@
       <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1">导入</el-button>
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>
           <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"
                      :disabled="tableData.length !== 1">导入</el-button>
         </span>
@@ -181,7 +181,7 @@ export default {
         multipleChoices:false,
         multiple:false,
         disabled:false,
-        searchShow:false,
+        searchShow:true,
         collapseTags:false,
         placeholder:'请点击右边按钮选择',
         dicData:[]
@@ -190,7 +190,7 @@ export default {
         multipleChoices:false,
         multiple:false,
         disabled:false,
-        searchShow:false,
+        searchShow:true,
         collapseTags:false,
         placeholder:'请点击右边按钮选择',
         dicData:[]
@@ -349,15 +349,16 @@ export default {
         this.$set(this.form,"sysNo", res.data.data)
       })
     }
-    if(this.$route.query.params){
-      detailListData(this.$route.query.params.id).then(res =>{
+    if(this.detailData.params){
+      detailListData(this.detailData.params.id).then(res =>{
         this.form.orderNo =  res.data.data.orderNo;
         res.data.data.itemsVOList.forEach((item,index) =>{
-          this.$route.query.params.orderItemIds.forEach((e,i) =>{
+          this.detailData.params.orderItemIds.forEach((e,i) =>{
             if(e ==  index){
               item.contractNumber =  res.data.data.orderNo;
               item.actualQuantity =  item.purchaseQuantity;
               item.contractAmount =  item.amount;
+              delete item.id
               this.$refs.crudContact.rowCellAdd(item);
               this.$refs.crudContact.rowCell(item,this.contactsData.length - 1)
             }
@@ -431,7 +432,7 @@ export default {
       })
     },
     //修改提交触发
-    editCustomer() {
+    editCustomer(status) {
       this.$refs["form"].validate((valid) => {
         for (let i = 0; i < this.contactsData.length; i++) {
           if (this.contactsData[i].billNo == null) {
@@ -458,6 +459,9 @@ export default {
               })
             }
           })
+          if(status === true){
+            this.$emit("goBack");
+          }
         } else {
           return false;
         }
@@ -581,7 +585,15 @@ export default {
     },
     //返回列表
     backToList() {
-      this.$emit("goBack");
+      this.$confirm("是否保存当前页面?", "提示", {
+        confirmButtonText: "保存",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.editCustomer(true)
+      }).catch(() => {
+        this.$emit("goBack");
+      })
     }
   },
 }

+ 6 - 1
src/views/importTrade/receipt/index.vue

@@ -91,7 +91,12 @@ export default {
     detailPage
   },
   created() {
-    // this.onLoad()
+    if(this.$route.query.params){
+      this.detailData={
+        params:this.$route.query.params
+      }
+      this.show = false;
+    }
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)

+ 24 - 9
src/views/purchase/contract/detailsPage.vue

@@ -16,6 +16,7 @@
         type="primary"
         :disabled="disabled"
         @click="editCustomer"
+        :loading="butLoading"
       >{{form.id?'确认修改':'确认新增'}}
       </el-button>
     </div>
@@ -177,8 +178,8 @@
       <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false , selectKind = -1">取 消</el-button>
           <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true && selectKind == -1">导入</el-button>
-          <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true && selectKind == -1" :disabled="tableData.length !== 1">导入</el-button>
+          <el-button type="primary" @click="importChoice"  v-if="commodityData === true  && selectKind == -1"
                      :disabled="tableData.length !== 1">导入<</el-button>
         </span>
     </el-dialog>
@@ -259,7 +260,7 @@ export default {
         multipleChoices:false,
         multiple:false,
         disabled:false,
-        searchShow:false,
+        searchShow:true,
         collapseTags:false,
         placeholder:'请点击右边按钮选择',
         dicData:[]
@@ -268,7 +269,7 @@ export default {
         multipleChoices:false,
         multiple:false,
         disabled:false,
-        searchShow:false,
+        searchShow:true,
         collapseTags:false,
         placeholder:'请点击右边按钮选择',
         dicData:[]
@@ -603,7 +604,7 @@ export default {
       }
     },
     //修改提交触发
-    editCustomer() {
+    editCustomer(status) {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           let orderFeesList = this.$refs.feeInfo.submitData();
@@ -624,7 +625,6 @@ export default {
               return this.$message.error(`请输入第${j + 1}行的提单号`);
             }
           }
-          console.log(this.contactsData)
           let submitDto = {
             ...this.form,
             tradeType:"JK",
@@ -653,6 +653,13 @@ export default {
               })
             }
           })
+          setTimeout(() =>{
+
+          },1000);
+          this.butLoading = false;
+          if(status === true){
+            this.$emit("goBack");
+          }
         } else {
           return false;
         }
@@ -682,12 +689,12 @@ export default {
       }
       if(type){
         this.$router.push({
-          path: "payment_detailsPage",
+          path: "/financialManagement/payment",
           query: {params: params},
         });
       }else{
         this.$router.push({
-          path: "importReceipt_detailsPage",
+          path: "/importTrade/receipt/index",
           query: {params: params},
         });
       }
@@ -973,7 +980,15 @@ export default {
       this.$message.success('发货成功')
     },
     backToList() {
-      this.$emit("goBack");
+      this.$confirm("是否保存当前页面?", "提示", {
+        confirmButtonText: "保存",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.editCustomer(true)
+      }).catch(() => {
+        this.$emit("goBack");
+      })
     },
   }
 }

+ 16 - 5
src/views/salesManagement/salesContract/detailsPage.vue

@@ -172,7 +172,7 @@
       <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1">导入</el-button>
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>
           <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"
                      :disabled="tableData.length !== 1">导入</el-button>
         </span>
@@ -220,7 +220,7 @@ export default {
         multipleChoices:false,
         multiple:false,
         disabled:false,
-        searchShow:false,
+        searchShow:true,
         collapseTags:false,
         placeholder:'请点击右边按钮选择',
         dicData:[]
@@ -614,7 +614,7 @@ export default {
         row.amount = (row.actualQuantity * row.price).toFixed(2);
       }
     },
-    editCustomer() {
+    editCustomer(status) {
       this.$refs["form"].validate((valid) => {
         let orderFeesList = this.$refs.feeInfo.submitData();
         for (let i = 0; i < orderFeesList.length; i++) {
@@ -662,6 +662,9 @@ export default {
               })
             }
           })
+          if(status === true){
+            this.$emit("goBack");
+          }
         } else {
           return false;
         }
@@ -698,7 +701,7 @@ export default {
       }
       generateShipment(data).then(res=>{
         this.$router.push({
-          path: "importInvoice_detailsPage",
+          path: "/importTrade/invoice/index",
           query: {form: JSON.stringify(res.data.data)},
         });
       })
@@ -842,7 +845,15 @@ export default {
       })
     },
     backToList() {
-      this.$emit("goBack");
+      this.$confirm("是否保存当前页面?", "提示", {
+        confirmButtonText: "保存",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.editCustomer(true)
+      }).catch(() => {
+        this.$emit("goBack");
+      })
     },
   },
 }