Przeglądaj źródła

Merge branch 'hw' of 121.41.102.225:Nidong/jiufang

mushencc 3 lat temu
rodzic
commit
ecb6ed9c51

+ 30 - 30
src/views/PurchasingManage/PurchasingOrder/edit.vue

@@ -694,11 +694,11 @@ export default {
                    if(this.$route.query.type==6||this.$route.query.type==3){
                     return
                   }
-  currentRow.no_tax_price = '';
-                  currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
-                  currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
-                  currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
-                  currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
+  // currentRow.no_tax_price = '';
+                  // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
+                  // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
+                  // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
+                  // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
                    if(!currentRow.copy&&!currentRow.edit){
         currentRow.change = true;
       }
@@ -739,10 +739,10 @@ export default {
                    if(this.$route.query.type==6||this.$route.query.type==3){
                     return
                   }
-                  currentRow.tax_rate = '';
-                  currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
-                  currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
-                  currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
+                  // currentRow.tax_rate = '';
+                  // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
+                  // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
+                  // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
                    if(!currentRow.copy&&!currentRow.edit){
         currentRow.change = true;
       }
@@ -783,11 +783,11 @@ export default {
                    if(this.$route.query.type==6||this.$route.query.type==3){
                     return
                   }
-                  currentRow.price = ''
-                  currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
-                  currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
-                  currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
-                  currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
+                  // currentRow.price = ''
+                  // currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
+                  // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
+                  // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
+                  // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
                    if(!currentRow.copy&&!currentRow.edit){
         currentRow.change = true;
       }
@@ -814,7 +814,7 @@ export default {
               on: {
                 'on-change': (e) => {
                   currentRow.no_tax_amount = e.target.value
-                  currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
+                  currentRow.no_tax_price = ((1 * currentRow.no_tax_amount) / (1*currentRow.num)).toFixed(2)
                   currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
                   currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
                   currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
@@ -827,10 +827,10 @@ export default {
                    if(this.$route.query.type==6||this.$route.query.type==3){
                     return
                   }
-                  currentRow.no_tax_amount = '';
-                     currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
-                  currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
-                  currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
+                  // currentRow.no_tax_amount = '';
+                  //    currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
+                  // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
+                  // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
                   currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
                    if(!currentRow.copy&&!currentRow.edit){
         currentRow.change = true;
@@ -880,7 +880,7 @@ export default {
                 if(Math.abs(((currentRow.total_price*1)-(currentRow.num*1*currentRow.no_tax_price))-row.tax_amount*1)>this.ext_tax_rate){
                   let tax_amount = ((this.tableData[index].total_price*1)-((this.tableData[index].no_tax_price*1*this.tableData[index].num))).toFixed(2);
                    this.tableData.splice(index, 1, JSON.parse(JSON.stringify(this.tableData[index])));
-                this.tableData[index] =Object.assign({}, this.tableData[index], {
+                this.tableData[index] =Object.assign({},this.tableData[index], {
     tax_amount:tax_amount*1
 })  
                  this.tableData[index].no_tax_amount = ((this.tableData[index].total_price*1)-(this.tableData[index].tax_amount*1)).toFixed(2);
@@ -896,10 +896,10 @@ export default {
                         this.tableData.splice(index,1,currentRow)
                     
                   }else{
-                     currentRow.tax_amount = ''
+                    //  currentRow.tax_amount = ''
                   // currentRow.fax = (1 * currentRow.tax_amount / currentRow.no_tax_price).toFixed(2)
-                 currentRow.no_tax_amount = (1*(currentRow.total_price-currentRow.tax_amount)).toFixed(2)
-                 currentRow.no_tax_price = currentRow.num?(1*(currentRow.no_tax_amount/currentRow.num)).toFixed(2):0
+                //  currentRow.no_tax_amount = (1*(currentRow.total_price-currentRow.tax_amount)).toFixed(2)
+                //  currentRow.no_tax_price = currentRow.num?(1*(currentRow.no_tax_amount/currentRow.num)).toFixed(2):'0.00'
                   if(!currentRow.copy&&!currentRow.edit){
         currentRow.change = true;
       }
@@ -926,9 +926,9 @@ export default {
               on: {
                 'on-change': (e) => {
                   currentRow.total_price = e.target.value
-                  currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):0;
+                  currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):'0.00';
                   currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
-                  currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):0;
+                  currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):'0.00';
                   currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
                    if(!currentRow.copy&&!currentRow.edit){
         currentRow.change = true;
@@ -939,11 +939,11 @@ export default {
                    if(this.$route.query.type==6||this.$route.query.type==3){
                     return
                   }
-                    currentRow.total_price =''
-                    currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):0;
-                  currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
-                  currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):0;
-                  currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
+                    // currentRow.total_price =''
+                  //   currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):'0.00';
+                  // currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
+                  // currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):'0.00';
+                  // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
                    if(!currentRow.copy&&!currentRow.edit){
         currentRow.change = true;
       }

+ 10 - 3
src/views/PurchasingManage/RequisitionOrder/edit.vue

@@ -523,6 +523,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      routerState:true,
       m_id:'',
       selectChoose:[],
       project_name:[],
@@ -1240,6 +1241,11 @@ this.selectChoose.map(m=>{
       if(!this.searchData.order_time){
        return this.$Message.warning('请选择单据日期')
       };
+     if(!this.routerState){
+       return
+     }else{
+       this.routerState = false;
+     }
       let state = false;
        let objData = [];
         objData =JSON.parse(JSON.stringify(this.tableData)); 
@@ -1255,7 +1261,8 @@ this.selectChoose.map(m=>{
            if(state){
             return this.$Message.warning('物料数量不能为0')
           }
-      this.searchData.order_time =
+          let obj = JSON.parse(JSON.stringify(this.searchData));
+      obj.order_time =
         parseInt(new Date(this.searchData.order_time).getTime() / 1000) || "";
         objData.map(v=>{
           v.arrive_time =  parseInt(new Date(v.time).getTime() / 1000) || "";
@@ -1271,7 +1278,7 @@ this.selectChoose.map(m=>{
         method: "post",
         url,
         data: {
-          ...this.searchData,
+          ...obj,
           children:{...objData} 
         },
       })
@@ -1308,7 +1315,7 @@ this.selectChoose.map(m=>{
           plan_no:this.$route.query.plan_no,
           plan_type:this.searchData.plan_type,
           remark:this.searchData.remark,
-          order_time:this.searchData.order_time,
+          order_time:obj.order_time,
           upd_list,
           add_list,
           del_list

+ 1 - 1
vue.config.js

@@ -1,6 +1,6 @@
 const axios_default_ip =
   process.env.NODE_ENV == "dev"
-    ? "http://121.37.173.82:82"
+    ? "http://121.41.102.225:82"
     : process.env.NODE_ENV == "test-prd"
     ? "http://121.41.102.225:82" //
     : process.env.NODE_ENV == "prd_other"