wxy il y a 4 ans
Parent
commit
4782149ebb
2 fichiers modifiés avec 12 ajouts et 6 suppressions
  1. 4 1
      src/views/order/inDetail.vue
  2. 8 5
      src/views/order/out.vue

+ 4 - 1
src/views/order/inDetail.vue

@@ -399,7 +399,10 @@ export default {
     //选择税率
     //选择税率
     selectChange(val, index) {
     selectChange(val, index) {
       let bill = this.detailForm.in_bill[index]; //bill是数组
       let bill = this.detailForm.in_bill[index]; //bill是数组
-      this.inputChange(val, index);
+      // console.log(bill);
+      if (bill.sh_ys) {
+        this.inputChange(val, index);
+      }
     },
     },
     //返回
     //返回
     toReturn() {
     toReturn() {

+ 8 - 5
src/views/order/out.vue

@@ -376,11 +376,14 @@ export default {
     selectChange(val, index) {
     selectChange(val, index) {
       const outList = this.detailForm.out_bill;
       const outList = this.detailForm.out_bill;
       let outForm = outList[index];
       let outForm = outList[index];
-      let sh_ys = _.round(Number(val * outForm.sq_ys), 2);
-      let sh_ss = _.round(Number(val * outForm.sq_ss), 2);
-      this.$set(outForm, `sh_ys`, sh_ys);
-      this.$set(outForm, `sh_ss`, sh_ss);
-      this.computRate();
+      // console.log(outForm);
+      if (outForm.sq_ys) {
+        let sh_ys = _.round(Number(val * outForm.sq_ys), 2);
+        let sh_ss = _.round(Number(val * outForm.sq_ss), 2);
+        this.$set(outForm, `sh_ys`, sh_ys);
+        this.$set(outForm, `sh_ss`, sh_ss);
+        this.computRate();
+      }
     },
     },
     //税前应收
     //税前应收
     change(index) {
     change(index) {