002201 1 年之前
父節點
當前提交
6a764736f6

+ 4 - 4
src/views/purchase/apply/add/columns.js

@@ -191,10 +191,10 @@ export default function useColumns() {
           item: { key: "price", title: "无税单价", require: true },
           attr: {
             formatter: (prop) => {
-              const { tax, taxPrice } = prop;
-              const newTax = Number(tax) / 100;
-              const price = (taxPrice / (1 + newTax)).toFixed(CONFIG.precision);
-              prop.price = price === "NaN" ? null : price;
+              const { tax = 0, taxPrice = 0 } = prop;
+              prop.price = ((taxPrice / (tax / 100 + 1)) * 1).toFixed(
+                CONFIG.precision
+              );
               return prop.price;
             },
           },

+ 15 - 7
src/views/purchase/apply/add/index.vue

@@ -146,13 +146,21 @@ export default {
         const {
           params: { priceApplyOrgs, priceApplyItems },
         } = this;
+        this.params.priceApplyOrgs = priceApplyOrgs.map((item, index) => ({
+          ...item,
+          $index: index,
+        }));
+        this.params.priceApplyItems = priceApplyItems.map((item, index) => ({
+          ...item,
+          $index: index,
+        }));
         return {
-          priceApplyOrgs: priceApplyOrgs
-            .map((item, index) => ({ ...item, $index, index }))
-            .filter(({ delFlag }) => delFlag !== "2"),
-          priceApplyItems: priceApplyItems
-            .map((item, index) => ({ ...item, $index, index }))
-            .filter(({ delFlag }) => delFlag !== "2"),
+          priceApplyOrgs: this.params.priceApplyOrgs.filter(
+            ({ delFlag }) => delFlag !== "2"
+          ),
+          priceApplyItems: this.params.priceApplyItems.filter(
+            ({ delFlag }) => delFlag !== "2"
+          ),
         };
       },
       set() {},
@@ -304,7 +312,6 @@ export default {
       );
       this.params[prop].push({
         delFlag: "0",
-        $index: this.params[prop].length,
         ...this.$init.params(TableColumns),
       });
     },
@@ -325,6 +332,7 @@ export default {
           ...item,
           delFlag: index === $index ? "2" : item.delFlag,
         }));
+        console.log(this.params[prop]);
       }
     },
     //

+ 1 - 1
src/views/purchase/task/dao-chu/index.vue

@@ -37,7 +37,7 @@ export default {
               } = this.$props;
               await this.download(
                 "pu/order/generate/export",
-                { ...prop, pageNum, pageSize },
+                { ...data, pageNum, pageSize },
                 `task_${new Date().getTime()}.xlsx`
               );
               await done();

+ 1 - 1
src/views/purchase/task/index.vue

@@ -94,7 +94,7 @@ export default {
     useReset() {
       this.page.pageNum = 1;
       this.page.pageSize = 10;
-      this.params = initParams(this.SearchColumns);
+      this.params = this.$init.params(this.SearchColumns);
       this.useQuery(this.params, this.page);
     },
     // 选 择

+ 23 - 18
src/views/purchase/transferOrder/add.vue

@@ -446,10 +446,11 @@
             >
           </div>
           <el-table
-            :data="showMaterialInfo"
+            :data="materialInfo"
             fit
             max-height="480"
             style="font-size: 12px"
+            :row-class-name="rowClassName"
           >
             <el-table-column
               show-overflow-tooltip
@@ -482,15 +483,15 @@
                     :disabled="sonDisable"
                     size="mini"
                     v-model="scope.row.materialCode"
-                    @clear="cleanMx(scope.row.$index, '物料编码')"
-                    @focus="chooseMaterial(scope.row.$index)"
+                    @clear="cleanMx(scope.$index, '物料编码')"
+                    @focus="chooseMaterial(scope.$index)"
                   >
                     <el-button
                       size="mini"
                       :disabled="sonDisable"
                       slot="append"
                       icon="el-icon-more"
-                      @click="chooseMaterial(scope.row.$index)"
+                      @click="chooseMaterial(scope.$index)"
                     ></el-button>
                   </el-input>
                 </el-form-item>
@@ -1682,16 +1683,6 @@ export default {
       isDCCk: true,
     };
   },
-  computed: {
-    showMaterialInfo: {
-      get() {
-        return this.materialInfo
-          .map((item, index) => ({ ...item, $index: index }))
-          .filter(({ delFlag }) => delFlag !== "2");
-      },
-      set() {},
-    },
-  },
   created() {
     if (this.pageStu == "check") {
       console.log("数据", this.row);
@@ -2016,16 +2007,26 @@ export default {
         customerLogisticName: null,
       };
       this.materialInfo.push(newLine);
-      console.log(this.materialInfo);
     },
-    delLine(index, { $index }) {
-      // this.materialInfo.splice(index, 1);
+    delLine($index) {
+      console.log("删除行:", index);
       this.materialInfo = this.materialInfo.map((item, index) => ({
         ...item,
         delFlag: index === $index ? "2" : item.delFlag,
       }));
-      console.log("删除行:", $index, this.materialInfo);
     },
+    //
+    rowClassName(prop) {
+      const {
+        row: { delFlag },
+      } = prop;
+      if (delFlag === "2") {
+        return "is-hidden";
+      } else {
+        return "";
+      }
+    },
+
     chooseRefer(type, isPage, title, pkOrg, isDirectStore, gubFlag) {
       this.referCondition.type = type;
       this.referCondition.isPage = isPage;
@@ -2287,6 +2288,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .el-table__row.is-hidden {
+  display: none;
+}
+
 .btn_group {
   width: 100%;
   margin: 20px 0;

+ 2 - 2
vue.config.js

@@ -37,7 +37,7 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/drp-admin`, //测试
-       // target: `http://test-sy.derom.com/drp-admin`, //测试
+       target: `http://test-sy.derom.com/drp-admin`, //测试
         // target: `http://release-sy.derom.com/drp-admin`, //预发
         // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
@@ -46,7 +46,7 @@ module.exports = {
         // target: `http://172.16.13.47:8000/drp-admin`, //这是一个美女的本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
 
-         target: `http://127.0.0.1:8000/drp-admin`,
+        //  target: `http://127.0.0.1:8000/drp-admin`,
         changeOrigin: true,
         pathRewrite: {
           ["^" + process.env.VUE_APP_BASE_API]: "",