Bläddra i källkod

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!202
黄梓星 1 år sedan
förälder
incheckning
83104f9df2

+ 9 - 3
src/components/computed-input-v2/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <span v-on="$listeners">{{ innerValue || "- -" }}</span>
+  <span v-on="$listeners">{{ innerValue || "--" }}</span>
 </template>
 
 <script>
@@ -17,6 +17,10 @@ export default {
       default: () => {},
       require: true,
     },
+    // formatter
+    source: {
+      type: Object,
+    },
   },
   data() {
     return {};
@@ -24,13 +28,15 @@ export default {
   computed: {
     innerValue: {
       get() {
-        return this.formatter(this.value);
+        return this.formatter(this.source || this.value);
       },
     },
   },
   watch: {},
   methods: {},
-  created() {},
+  created() {
+    console.log(this, this.$props.source);
+  },
   mounted() {},
   destroyed() {},
 };

+ 3 - 1
src/components/computed-input/index.vue

@@ -42,7 +42,9 @@ export default {
     },
   },
   methods: {},
-  created() {},
+  created() {
+   
+  },
   mounted() {},
   destroyed() {},
 };

+ 15 - 7
src/views/material/changeApply/add.vue

@@ -153,7 +153,7 @@
           <el-row :gutter="20">
             <el-col :span="8">
               <el-form-item label="药品" prop="drug"
-                            :rules="{ required: !isControl, message: '请选择是否药品', trigger: 'change' }">
+                            :rules="{ required: !isControl, message: '请选择是否药品', trigger: 'blur' }">
                 <el-select v-model="basicForm2.drug" placeholder="请选择" clearable :disabled="disable || isControl">
                   <el-option v-for="dict in dict.type.sys_medicine" :key="dict.value" :label="dict.label"
                              :value="dict.value"/>
@@ -187,7 +187,7 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="剂型" prop="dosageFrom"
-                            :rules="{ required: !isControl, message: '请选择剂型', trigger: 'change' }">
+                            :rules="{ required: !isControl, message: '请选择剂型', trigger: 'blur' }">
                 <el-select ref="doses" v-model="basicForm2.dosageFrom" placeholder="请选择" clearable
                            :disabled="disable || isControl" @focus="chooseDose">
                   <el-option v-for="item in doseOptions" :key="item.id" :label="item.name" :value="item.id"/>
@@ -590,14 +590,18 @@
           if (valid) {
             this.$refs['basic2'].validate(valid => {
               if (valid) {
+                this.$modal.loading("保存中...");
                 addChangeList(sparams).then(res => {
                   if (res.code === 200) {
                     this.$message({
                       message: res.msg,
                       type: 'success'
                     });
+                    this.$modal.closeLoading();
                     this.back()
                   }
+                }).catch(err => {
+                this.$modal.closeLoading();
                 })
               }
             })
@@ -613,14 +617,18 @@
           if (valid) {
             this.$refs['basic2'].validate(valid => {
               if (valid) {
+                this.$modal.loading("提交中...");
                 editChangeList(sparams).then(res => {
                   if (res.code === 200) {
                     this.$message({
                       message: res.msg,
                       type: 'success'
                     });
+                    this.$modal.closeLoading();
                     this.back()
                   }
+                }).catch(err => {
+                this.$modal.closeLoading();
                 })
               }
             })
@@ -629,11 +637,11 @@
       },
       back() {
         this.$emit('jugislist', true)
-        let queryParams = {
-          pageNum: 1,
-          pageSize: 10
-        }
-        this.$emit('refresh', queryParams)
+        // let queryParams = {
+        //   pageNum: 1,
+        //   pageSize: 10
+        // }
+        this.$emit('refresh')
       },
       // 子表增删行
       // handleSelectionChange(val) {

+ 20 - 6
src/views/material/requisition/add.vue

@@ -481,7 +481,7 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="剂型" prop="dosageFrom"
-                :rules="{ required: !isControl, message: '请选择剂型', trigger: 'change' }">
+                :rules="{ required: !isControl, message: '请选择剂型', trigger: 'blur' }">
                 <el-select ref="doses" v-model="basicForm2.dosageFrom" placeholder="请选择" clearable
                   :disabled="disable || isControl" @focus="chooseDose">
                   <el-option v-for="item in doseOptions" :key="item.id" :label="item.name" :value="item.id" />
@@ -1097,6 +1097,8 @@ export default {
       console.log('val1111111', val)
       if (val == '0') {
         this.isControl = false
+        this.basicForm2.dosageFrom = '0001A11000000000BX7Z'
+        this.getDoseDetails(this.basicForm2.dosageFrom)
       } else {
         this.basicForm2.isDrug = ''
         this.basicForm2.registrationNo = ''
@@ -1300,14 +1302,18 @@ export default {
           })
         })
         Promise.all([form1, form2]).then(() => {
+          this.$modal.loading("保存中...");
           editReq(sparams).then(res => {
             if (res.code === 200) {
               this.$message({
                 message: res.msg,
                 type: 'success'
               });
+              this.$modal.closeLoading();
               this.back()
             }
+          }).catch(err => {
+            this.$modal.closeLoading();
           })
         })
       } else {
@@ -1334,14 +1340,18 @@ export default {
           })
         })
         Promise.all([form1, form2]).then(() => {
+          this.$modal.loading("保存中...");
           addReq(sparams).then(res => {
             if (res.code === 200) {
               this.$message({
                 message: res.msg,
                 type: 'success'
               });
+              this.$modal.closeLoading();
               this.back()
             }
+          }).catch(err => {
+            this.$modal.closeLoading();
           })
         })
       }
@@ -1368,14 +1378,18 @@ export default {
       Promise.all([form1, form2]).then(() => {
         // 提交时候要维护物料类别
         if (this.sysMaterialMedcineItemApply.length !== 0) {
+          this.$modal.loading("提交中...");
           editReq(sparams).then(res => {
             if (res.code === 200) {
               this.$message({
                 message: res.msg,
                 type: 'success'
               });
+              this.$modal.closeLoading();
               this.back()
             }
+          }).catch(err => {
+            this.$modal.closeLoading();
           })
         } else {
           this.$message({
@@ -1387,11 +1401,11 @@ export default {
     },
     back() {
       this.$emit('jugislist', true)
-      let queryParams = {
-        pageNum: 1,
-        pageSize: 10
-      }
-      this.$emit('refresh', queryParams)
+      // let queryParams = {
+      //   pageNum: 1,
+      //   pageSize: 10
+      // }
+      this.$emit('refresh')
     },
     // 子表增删行
     handleSelectionChange(val) {

+ 26 - 5
src/views/purchase/MaterialClassDivision/add.vue

@@ -145,6 +145,7 @@
                   :disabled="disable"
                   v-model="basicForm.orderPersonal"
                   clearable
+                  @clear="clean('订单员')"
                   @focus="chooseRefer('CONTACTS_PARAM', true, '订单员')"
                 >
                   <el-option
@@ -177,6 +178,7 @@
                   :disabled="disable"
                   v-model="basicForm.buyer"
                   clearable
+                  @clear="clean('采购员')"
                   @focus="chooseRefer('CONTACTS_PARAM', true, '采购员')"
                 >
                   <el-option
@@ -335,27 +337,35 @@ export default {
   methods: {
     save() {
       if(this.pageStu == 'add') {
+        this.$modal.loading("保存中...");
         addDivision(this.basicForm).then(res => {
           if (res.code === 200) {
             this.$modal.msgSuccess("保存成功");
+            this.$modal.closeLoading();
             this.back()
           }
+        }).catch(err => {
+          this.$modal.closeLoading();
         })
       } else if(this.pageStu == 'edit') {
+        this.$modal.loading("保存中...");
         editDivision(this.basicForm).then(res => {
           this.$modal.msgSuccess("编辑成功");
+          this.$modal.closeLoading();
           this.back()
+        }).catch(err => {
+          this.$modal.closeLoading();
         })
       }
     },
     submit() {},
     back() {
       this.$emit('jugislist', true)
-      let queryParams = {
-        pageNum: 1,
-        pageSize: 10
-      }
-      this.$emit('refresh', queryParams)
+      // let queryParams = {
+      //   pageNum: 1,
+      //   pageSize: 10
+      // }
+      this.$emit('refresh')
     },
     // 如果需要回显则调用详情接口
     getDetails(row) {
@@ -443,6 +453,17 @@ export default {
         }
       })
     },
+    // 清空采购员,订单员
+    clean(title) {
+      if (title == '订单员') {
+        this.basicForm.orderPersonal = ''
+        this.basicForm.orderPersonalName = ''
+      }
+      if (title == '采购员') {
+        this.basicForm.buyer = ''
+        this.basicForm.buyerName = ''
+      }
+    }
   }
 }
 </script>

+ 78 - 63
src/views/purchase/catalogue/index.vue

@@ -122,16 +122,7 @@ export default {
 </script>
 
 <template>
-  <el-card
-    v-loading="loading"
-    style="
-      width: calc(100% - 20px);
-      height: 100%;
-      margin: 10px;
-      padding: 0 20px 20px 0;
-    "
-    :body-style="{ padding: 0 }"
-  >
+  <el-card v-loading="loading" :body-style="{ padding: 0 }">
     <see-model ref="SeeModel"></see-model>
     <export-model ref="ExportModel"></export-model>
     <invalid-model
@@ -147,61 +138,56 @@ export default {
       :model="params"
       label-width="auto"
       label-position="right"
-      style="padding: 20px 0 0"
     >
-      <el-row style="display: flex; flex-wrap: wrap">
-        <el-col :span="22">
-          <el-row :gutter="20" style="display: flex; flex-wrap: wrap">
-            <el-col
-              v-for="column in searchColumns"
-              :key="column.title"
-              :span="column.span || 6"
+      <el-row :gutter="20" style="display: flex; flex-wrap: wrap">
+        <el-col
+          v-for="column in searchColumns"
+          :key="column.title"
+          :span="column.span || 6"
+        >
+          <el-form-item :prop="column.key" :label="column.title">
+            <el-input
+              v-if="column.inputType === 'Input'"
+              v-model="params[column.key]"
+              :placeholder="column.placeholder"
+              style="width: 100%"
+              @keyup.enter.native="useQuery(params, page)"
+            ></el-input>
+            <el-select
+              v-if="column.inputType === 'Select'"
+              v-model="params[column.key]"
+              :disabled="column.disabled"
+              :clearable="column.clearable"
+              :placeholder="column.placeholder"
+              style="width: 100%"
+              @change="useQuery(params, page)"
+              @keyup.enter.native="useQuery(params, page)"
             >
-              <el-form-item :prop="column.key" :label="column.title">
-                <el-input
-                  v-if="column.inputType === 'Input'"
-                  v-model="params[column.key]"
-                  :placeholder="column.placeholder"
-                  style="width: 100%"
-                  @keyup.enter.native="useQuery(params, page)"
-                ></el-input>
-                <el-select
-                  v-if="column.inputType === 'Select'"
-                  v-model="params[column.key]"
-                  :disabled="column.disabled"
-                  :clearable="column.clearable"
-                  :placeholder="column.placeholder"
-                  style="width: 100%"
-                  @change="useQuery(params, page)"
-                  @keyup.enter.native="useQuery(params, page)"
-                >
-                  <el-option
-                    v-for="item in dict.type[column.referName]"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-                <dr-popover-select
-                  v-if="column.inputType === 'PopoverSelect'"
-                  v-model="params[column.key]"
-                  :size="size"
-                  :source.sync="params"
-                  :title="column.title"
-                  :type="column.referName"
-                  :multiple="column.multiple"
-                  :readonly="column.readonly"
-                  :value-key="column.valueKey"
-                  :placeholder="column.placeholder"
-                  :data-mapping="column.dataMapping"
-                  @change="useQuery(params, page)"
-                  @keyup.enter.native="useQuery(params, page)"
-                >
-                </dr-popover-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
+              <el-option
+                v-for="item in dict.type[column.referName]"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <dr-popover-select
+              v-if="column.inputType === 'PopoverSelect'"
+              v-model="params[column.key]"
+              :size="size"
+              :source.sync="params"
+              :title="column.title"
+              :type="column.referName"
+              :multiple="column.multiple"
+              :readonly="column.readonly"
+              :value-key="column.valueKey"
+              :placeholder="column.placeholder"
+              :data-mapping="column.dataMapping"
+              @change="useQuery(params, page)"
+              @keyup.enter.native="useQuery(params, page)"
+            >
+            </dr-popover-select>
+          </el-form-item>
         </el-col>
       </el-row>
     </el-form>
@@ -236,6 +222,7 @@ export default {
       </el-button>
     </el-row>
     <el-table
+      v-if="tableData.length"
       :size="size"
       :data="tableData"
       highlight-current-row
@@ -284,6 +271,7 @@ export default {
         </template>
       </el-table-column>
     </el-table>
+    <el-empty v-else :image-size="200"></el-empty>
     <pagination
       :total="page.total"
       :page.sync="page.pageNum"
@@ -292,3 +280,30 @@ export default {
     />
   </el-card>
 </template>
+<style scoped lang="scss">
+.el-card {
+  width: calc(100% - 20px);
+  height: 100%;
+  margin: 10px;
+  padding: 0 0 20px 0;
+  .el-form {
+    padding: 20px 0 0;
+  }
+  .el-row {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 0 20px;
+  }
+  ::v-deep .el-table--mini {
+    width: 100%;
+    margin: 20px 0 0 0;
+    .el-table__cell {
+      height: 50px;
+    }
+    td.el-table__cell {
+      border-right: 0;
+      // border-bottom: 0;
+    }
+  }
+}
+</style>

+ 7 - 5
src/views/purchase/contract/add/column.js

@@ -406,7 +406,7 @@ export default function useColumns() {
           item: { title: "含税金额合计", key: "taxMoney" },
           attr: {
             is: "el-computed-input-v2",
-            computed: (prop) => {
+            formatter: (prop) => {
               const { qty = 0, taxPrice = 0 } = prop;
               return (qty * taxPrice * 1).toFixed(CONFIG.precision);
             },
@@ -416,7 +416,7 @@ export default function useColumns() {
           item: { title: "无税单价", key: "taxFreePrice" },
           attr: {
             is: "el-computed-input-v2",
-            computed: (prop) => {
+            formatter: (prop) => {
               const { tax = 0, taxPrice = 0 } = prop;
               return ((taxPrice / (tax / 100 + 1)) * 1).toFixed(
                 CONFIG.precision
@@ -428,9 +428,11 @@ export default function useColumns() {
           item: { title: "无税金额合计", key: "taxFreeMoney" },
           attr: {
             is: "el-computed-input-v2",
-            computed: (prop) => {
-              const { qty = 0, taxFreePrice = 0 } = prop;
-              return (qty * taxFreePrice * 1).toFixed(CONFIG.precision);
+            formatter: (prop) => {
+              const { qty = 0, tax = 0, taxPrice = 0 } = prop;
+              return (qty * (taxPrice / (tax / 100 + 1)) * 1).toFixed(
+                CONFIG.precision
+              );
             },
           },
         },

+ 8 - 6
src/views/purchase/contract/edit/column.js

@@ -382,7 +382,7 @@ export default function useColumns() {
           item: { title: "税率%", key: "tax" },
           attr: {
             is: "el-popover-select-v2",
-            valueKey: "name",
+            valueKey: "ntaxrate",
             referName: "TAX_RATE_PARAM",
             dataMapping: {
               tax: "ntaxrate",
@@ -406,7 +406,7 @@ export default function useColumns() {
           item: { title: "含税金额合计", key: "taxMoney" },
           attr: {
             is: "el-computed-input-v2",
-            computed: (prop) => {
+            formatter: (prop) => {
               const { qty = 0, taxPrice = 0 } = prop;
               return (qty * taxPrice * 1).toFixed(CONFIG.precision);
             },
@@ -416,7 +416,7 @@ export default function useColumns() {
           item: { title: "无税单价", key: "taxFreePrice" },
           attr: {
             is: "el-computed-input-v2",
-            computed: (prop) => {
+            formatter: (prop) => {
               const { tax = 0, taxPrice = 0 } = prop;
               return ((taxPrice / (tax / 100 + 1)) * 1).toFixed(
                 CONFIG.precision
@@ -428,9 +428,11 @@ export default function useColumns() {
           item: { title: "无税金额合计", key: "taxFreeMoney" },
           attr: {
             is: "el-computed-input-v2",
-            computed: (prop) => {
-              const { qty = 0, taxFreePrice = 0 } = prop;
-              return (qty * taxFreePrice * 1).toFixed(CONFIG.precision);
+            formatter: (prop) => {
+              const { qty = 0, tax = 0, taxPrice = 0 } = prop;
+              return (qty * (taxPrice / (tax / 100 + 1)) * 1).toFixed(
+                CONFIG.precision
+              );
             },
           },
         },

+ 1 - 0
src/views/purchase/contract/edit/index.vue

@@ -69,6 +69,7 @@ export default {
           if (code === 200) {
             const [{ ntaxrate }] = rows;
             source.tax = ntaxrate === "0E-8" ? "0.00000000" : ntaxrate;
+            console.log("ntaxrate", ntaxrate);
           }
         } catch (err) {
           // catch

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

@@ -51,7 +51,7 @@ export default {
         const rule5 = pigeonhole === "Y";
         return {
           // 修 改
-          edit: rule1 && !rule4,
+          edit: rule1 && rule3,
           // 删 除
           delt: rule1 && rule3,
           // 终 止

+ 5 - 5
src/views/purchase/contract/see/column.js

@@ -209,7 +209,7 @@ export default function useColumns() {
           item: { title: "采购数量", key: "qty" },
           attr: {
             is: "el-computed-input-v2",
-            formatter: (prop) => {
+            formatter: (prop = 0) => {
               return (prop * 1).toFixed(CONFIG.precision);
             },
           },
@@ -218,7 +218,7 @@ export default function useColumns() {
           item: { title: "含税单价", key: "taxPrice" },
           attr: {
             is: "el-computed-input-v2",
-            formatter: (prop) => {
+            formatter: (prop = 0) => {
               return (prop * 1).toFixed(CONFIG.precision);
             },
           },
@@ -227,7 +227,7 @@ export default function useColumns() {
           item: { title: "含税金额合计", key: "taxMoney" },
           attr: {
             is: "el-computed-input-v2",
-            formatter: (prop) => {
+            formatter: (prop = 0) => {
               return (prop * 1).toFixed(CONFIG.precision);
             },
           },
@@ -236,7 +236,7 @@ export default function useColumns() {
           item: { title: "无税单价", key: "taxFreePrice" },
           attr: {
             is: "el-computed-input-v2",
-            formatter: (prop) => {
+            formatter: (prop = 0) => {
               return (prop * 1).toFixed(CONFIG.precision);
             },
           },
@@ -245,7 +245,7 @@ export default function useColumns() {
           item: { title: "无税金额合计", key: "taxFreeMoney" },
           attr: {
             is: "el-computed-input-v2",
-            formatter: (prop) => {
+            formatter: (prop = 0) => {
               return (prop * 1).toFixed(CONFIG.precision);
             },
           },

+ 1 - 99
src/views/purchase/contract/see/index.vue

@@ -81,28 +81,8 @@ export default {
       this.tabName = tabName;
       this.params = initParams([...TabColumns, ...FormColumns]);
     },
-    // //
-    // async useDelete(prop) {
-    //   await this.root
-    //     .useDelete(prop)
-    //     .then(() => {
-    //       this.hide();
-    //     })
-    //     .catch(() => {});
-    // },
-    // //
-    // async useTermination(prop) {
-    //   await this.root
-    //     .useTermination(prop)
-    //     .then(() => {
-    //       this.fetchItem(this.params.id);
-    //     })
-    //     .catch(() => {});
-    // },
-  },
-  created() {
-    console.log(this);
   },
+  created() {},
   mounted() {},
   destroyed() {},
 };
@@ -117,84 +97,6 @@ export default {
     <template slot="title">
       <span>{{ title }}</span>
       <span>
-        <!-- <el-tooltip
-          v-if="root.hasPowerDelete([params])"
-          effect="dark"
-          content="删 除"
-          placement="bottom-end"
-        >
-          <el-button
-            :size="size"
-            circle
-            icon="el-icon-delete"
-            @click="useDelete([params])"
-          ></el-button>
-        </el-tooltip>
-        <el-tooltip
-          v-if="root.hasPowerAlteration([params])"
-          effect="dark"
-          content="变 更"
-          placement="bottom-end"
-        >
-          <el-button
-            :size="size"
-            circle
-            icon="el-icon-edit"
-            @click="root.useEdit([params])"
-          ></el-button>
-        </el-tooltip>
-        <el-tooltip
-          v-if="root.hasPowerEdit([params])"
-          effect="dark"
-          content="编 辑"
-          placement="bottom-end"
-        >
-          <el-button
-            :size="size"
-            circle
-            icon="el-icon-edit"
-            @click="root.useEdit([params])"
-          ></el-button>
-        </el-tooltip>
-        <el-tooltip
-          v-if="root.hasPowerTermination([params])"
-          effect="dark"
-          content="终 止"
-          placement="bottom-end"
-        >
-          <el-button
-            :size="size"
-            circle
-            icon="el-icon-light-rain"
-            @click="useTermination([params])"
-          ></el-button>
-        </el-tooltip>
-        <el-tooltip
-          v-if="root.hasPowerPigeonhole([params])"
-          effect="dark"
-          content="归 档"
-          placement="bottom-end"
-        >
-          <el-button
-            :size="size"
-            circle
-            icon="el-icon-lightning"
-            @click="root.usePigeonhole([params])"
-          ></el-button>
-        </el-tooltip>
-        <el-tooltip
-          v-if="root.hasPowerSubmit([params])"
-          effect="dark"
-          content="提交OA"
-          placement="bottom-end"
-        >
-          <el-button
-            :size="size"
-            circle
-            icon="el-icon-heavy-rain"
-            @click="root.useSubmit([params])"
-          ></el-button>
-        </el-tooltip> -->
         <el-button
           :size="size"
           circle

+ 13 - 5
src/views/purchase/deliveryAddress/add.vue

@@ -217,29 +217,37 @@ export default {
   methods: {
     save() {
       if(this.pageStu == 'add') {
+        this.$modal.loading("保存中...");
         addAddress(this.basicForm).then(res => {
           if (res.code === 200) {
             this.$modal.msgSuccess("保存成功");
+            this.$modal.closeLoading();
             this.back()
           }
+        }).catch(err => {
+          this.$modal.closeLoading();
         })
       } else if (this.pageStu == 'edit') {
+        this.$modal.loading("保存中...");
         editAddress(this.basicForm).then(res => {
           if (res.code === 200) {
             this.$modal.msgSuccess("编辑成功");
+            this.$modal.closeLoading();
             this.back()
           }
+        }).catch(err => {
+          this.$modal.closeLoading();
         })
       }
     },
     submit() {},
     back() {
       this.$emit('jugislist', true)
-      let queryParams = {
-        pageNum: 1,
-        pageSize: 10
-      }
-      this.$emit('refresh', queryParams)
+      // let queryParams = {
+      //   pageNum: 1,
+      //   pageSize: 10
+      // }
+      this.$emit('refresh')
     },
     // 如果需要回显则调用详情接口
     getDetails(row) {

+ 6 - 11
src/views/purchase/task/first-direct/column.js

@@ -26,11 +26,11 @@ export const TableColumns = [
     attr: {},
   },
   {
-    item: { key: "tax", title: "税率" },
+    item: { key: "tax", title: "税率 (%)" },
     attr: {
       component: "el-computed-input-v2",
       formatter: (prop) => {
-        return (prop * 1).toFixed(CONFIG.precision) + "%";
+        return (prop.tax * 1).toFixed(CONFIG.precision);
       },
     },
   },
@@ -38,13 +38,8 @@ export const TableColumns = [
     item: { key: "taxFreePrice", title: "无税单价" },
     attr: {
       component: "el-computed-input-v2",
-      formatter: (prop) => {
-        return (prop * 1).toFixed(CONFIG.precision);
-      },
-    },
-    listeners: {
-      click: (prop) => {
-        console.log("prop", prop);
+      formatter: (prop = 0) => {
+        return (prop.tax * 1).toFixed(CONFIG.precision);
       },
     },
   },
@@ -52,8 +47,8 @@ export const TableColumns = [
     item: { key: "taxPrice", title: "主含税单价" },
     attr: {
       component: "el-computed-input-v2",
-      formatter: (prop) => {
-        return (prop * 1).toFixed(CONFIG.precision);
+      formatter: (prop = 0) => {
+        return (prop.tax * 1).toFixed(CONFIG.precision);
       },
     },
   },

+ 12 - 7
src/views/purchase/transferOrder/add.vue

@@ -863,6 +863,8 @@ export default {
           this.$modal.msgSuccess("提交成功");
           this.back()
         }
+      }).catch(err => {
+        this.$modal.closeLoading();
       })
     },
     save() {
@@ -873,27 +875,30 @@ export default {
           this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
           this.basicForm.stAllotReceiveExecuteList = this.priceList
           this.basicForm.stAllotReceiveExpenseList = this.resultList
+          this.$modal.loading("保存中...");
           addOrder(this.basicForm).then(res => {
             if (res.code === 200) {
               this.$modal.msgSuccess("保存成功");
-              this.$emit('jugislist', true)
-              let queryParams = {
-                pageNum: 1,
-                pageSize: 5
-              }
-              this.$emit('refresh', queryParams)
+              this.$modal.closeLoading();
+              this.back()
             }
+          }).catch(err => {
+            this.$modal.closeLoading();
           })
         } else if (this.sonPageStu == 'edit') {
           this.basicForm.stAllotMaterialList = this.materialInfo
           this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
           this.basicForm.stAllotReceiveExecuteList = this.priceList
           this.basicForm.stAllotReceiveExpenseList = this.resultList
+          this.$modal.loading("保存中...");
           editOrder(this.basicForm).then(res => {
             if (res.code === 200) {
               this.$modal.msgSuccess("编辑成功");
+              this.$modal.closeLoading();
               this.back()
             }
+          }).catch(err => {
+            this.$modal.closeLoading();
           })
         }
       } else {
@@ -906,7 +911,7 @@ export default {
       //   pageNum: 1,
       //   pageSize: 5
       // }
-      // this.$emit('refresh', queryParams)
+      this.$emit('refresh')
     },
     // 如果需要回显则调用详情接口
     getDetails(row) {