Quellcode durchsuchen

价格类的数据保留2位以及修复弹窗点其他区域关闭的问题

gongwencan vor 2 Monaten
Ursprung
Commit
f855c43e21

+ 1 - 0
src/components/DialogAddTagPurchase.vue

@@ -4,6 +4,7 @@
       title="添加采购"
       append-to-body
       width="750px"
+      :close-on-click-modal="false"
     >
       <el-form
         ref="form"

+ 1 - 0
src/components/DialogImport.vue

@@ -4,6 +4,7 @@
     title="导入标签申领数据"
     append-to-body
     width="500px"
+    :close-on-click-modal="false"
   >
     <el-form
       ref="form"

+ 1 - 0
src/components/DialogImportTag.vue

@@ -4,6 +4,7 @@
       title="导入数据"
       append-to-body
       width="500px"
+      :close-on-click-modal="false"
     >
       <el-form
         ref="form"

+ 1 - 0
src/components/DialogMaterialDetail.vue

@@ -4,6 +4,7 @@
       title="物料详情"
       append-to-body
       width="750px"
+      :close-on-click-modal="false"
     >
       <el-form
         v-if="data"

+ 9 - 2
src/components/DialogTagApplyDetail.vue

@@ -4,6 +4,7 @@
       :title="formattedTitle"
       append-to-body
       width="1200px"
+       :close-on-click-modal="false"
     >
       <div class="flex column" style="padding-bottom:20px;height:580px">
         <div v-if="oData && oData.tagApplyStateId === '0'" class="flex valign-center">
@@ -97,14 +98,20 @@
                 align="right"
                 min-width="70"
                 header-align="right"
-              ></el-table-column>
+              >
+              <template slot-scope="scope">
+              {{ parseFloat(scope.row.unitPrice).toFixed(2) }}
+              </template></el-table-column>
             <el-table-column
                 label="费用(元)"
                 prop="amount"
                 align="right"
                 min-width="70"
                 header-align="right"
-              ></el-table-column>
+              >
+              <template slot-scope="scope">
+              {{ parseFloat(scope.row.amount).toFixed(2) }}
+              </template></el-table-column>
               <el-table-column
                 label="标签类型"
                 prop="tagTypeName"

+ 7 - 2
src/components/DialogTagApplyOrderExport.vue

@@ -3,6 +3,7 @@
     :visible.sync="visible"
     append-to-body
     width="297mm"
+    :close-on-click-modal="false"
   >
     <pdf-exporter ref="pdfExporter" class="flex column layout-gap" style="min-height:100%;margin:0 calc(var(--layout-gap) * -1);padding:var(--layout-gap);color:#000000;">
       <LogoImageView width="150"></LogoImageView>
@@ -44,7 +45,7 @@
               <td align="center"><div class="cell">{{ formatDataTime }}</div></td>
               <td align="center"><div class="cell">{{ item.unitPrice }}</div></td>
               <td align="center"><div class="cell">{{ item.number }}</div></td>
-              <td align="center"><div class="cell">{{ item.amount }}</div></td>
+              <td align="center"><div class="cell">{{ formatAmount(item.amount) }}</div></td>
             </tr>
             <tr>
               <td align="center" colspan="6"><div class="cell">总计</div></td>
@@ -115,7 +116,7 @@ export default {
       this.providerName = data.providerName
       this.applicantName = data.applicantName
       this.formatDataTime = (!this.data || !this.data.dataTime) ? '' : new Date(data.dataTime).format('YYYY-MM-DD')
-      this.amount = data.amount
+      this.amount = data.amount ? parseFloat(data.amount).toFixed(2) : null
       this.number = (!this.data || !this.data.details) ? 0 : this.data.details.reduce((sum, item) => sum + item.number, 0)
 
       if (flag) {
@@ -152,6 +153,10 @@ export default {
     formatDate (date) {
       if (!date) return ''
       return new Date(date).format('yyyy-MM-dd')
+    },
+    formatAmount (amount) {
+      if (amount == null) return ''
+      return parseFloat(amount).toFixed(2)
     }
   }
 }

+ 1 - 0
src/components/DialogTagApplyTemplateExport.vue

@@ -4,6 +4,7 @@
     title="导出模版"
     append-to-body
     width="500px"
+    :close-on-click-modal="false"
   >
     <el-form
       ref="form"

+ 1 - 0
src/components/DialogTagCodeSerialDetail.vue

@@ -4,6 +4,7 @@
     :title="`订单详情 ${oData ? oData.orderNo : ''}`"
     append-to-body
     width="1200px"
+    :close-on-click-modal="false"
   >
     <div class="flex column" style="padding-bottom:20px;height:600px">
       <div class="flex-1 fit-size">

+ 1 - 0
src/components/DialogTagDistribute.vue

@@ -4,6 +4,7 @@
      :title="`${operatorType.name}发货方式`"
       append-to-body
       width="750px"
+      :close-on-click-modal="false"
     >
       <el-form
         v-if="data"

+ 7 - 2
src/components/DialogTagDistributeDetail.vue

@@ -4,6 +4,7 @@
       :title="`订单详情 ${oData && oData.orderNo ? oData.orderNo : ''}`"
       append-to-body
       width="1200px"
+      :close-on-click-modal="false"
     >
       <div class="flex column" style="padding-bottom:20px;height:600px">
         <div class="flex-1 fit-size">
@@ -73,14 +74,18 @@
                 align="right"
                 min-width="70"
                 header-align="right"
-              ></el-table-column>
+              ><template slot-scope="scope">
+              {{ parseFloat(scope.row.unitPrice).toFixed(2) }}
+              </template></el-table-column>
             <el-table-column
                 label="费用(元)"
                 prop="amount"
                 align="right"
                 min-width="70"
                 header-align="right"
-              ></el-table-column>
+              ><template slot-scope="scope">
+              {{ parseFloat(scope.row.amount).toFixed(2) }}
+              </template></el-table-column>
               <el-table-column
                 label="标签类型"
                 prop="tagTypeName"

+ 1 - 0
src/components/DialogTagPurchase.vue

@@ -4,6 +4,7 @@
     :title="`${operatorType.name}标签采购`"
     append-to-body
     width="750px"
+    :close-on-click-modal="false"
   >
     <el-form
       v-if="data"

+ 11 - 2
src/components/DialogTagPurchaseDetail.vue

@@ -4,6 +4,7 @@
       :title="`订单详情-编号:${oData && oData.orderNo ? oData.orderNo : ''}`"
       append-to-body
       width="900px"
+      :close-on-click-modal="false"
     >
       <div class="flex column" style="padding-bottom:20px;height:580px">
         <div v-if="oData && oData.tagPurchaseStateId === '0'" class="flex valign-center" >
@@ -79,14 +80,22 @@
                 align="right"
                 min-width="70"
                 header-align="right"
-              ></el-table-column>
+              >
+              <template slot-scope="scope">
+              {{ parseFloat(scope.row.unitPrice).toFixed(2) }}
+              </template>
+            </el-table-column>
             <el-table-column
                 label="费用(元)"
                 prop="amount"
                 align="right"
                 min-width="70"
                 header-align="right"
-              ></el-table-column>
+              >
+              <template slot-scope="scope">
+              {{ parseFloat(scope.row.amount).toFixed(2) }}
+              </template>
+            </el-table-column>
               <el-table-column
                 v-if="oData && oData.tagPurchaseStateId === '0'"
                 label="操作栏"

+ 7 - 2
src/components/DialogTagPurchaseOrderExport.vue

@@ -3,6 +3,7 @@
     :visible.sync="visible"
     append-to-body
     width="297mm"
+    :close-on-click-modal="false"
   >
     <pdf-exporter ref="pdfExporter" id="tag-purchase-order-export-pdf" class="flex column layout-gap" style="min-height:100%;height:600px;margin:0 calc(var(--layout-gap) * -1);padding:var(--layout-gap);color:#000000;">
       <LogoImageView width="150"></LogoImageView>
@@ -38,7 +39,7 @@
               <td align="center"><div class="cell">{{ buyerName}}</div></td>
               <td align="center"><div class="cell">{{ item.tagTypeName}}</div></td>
               <td align="center"><div class="cell">{{ item.number}}</div></td>
-              <td align="center"><div class="cell">{{ item.amount}}</div></td>
+              <td align="center"><div class="cell">{{ formatAmount(item.amount)}}</div></td>
             </tr>
             <tr>
               <td align="center" colspan="4"><div class="cell">总计</div></td>
@@ -119,7 +120,7 @@ export default {
       this.details = this.data && this.data.details ? this.data.details : []
       this.buyerName = data.buyerName
       this.formatDataTime = (!this.data || !this.data.dataTime) ? '' : new Date(data.dataTime).format('YYYY-MM-DD')
-      this.amount = data.amount
+      this.amount = data.amount ? parseFloat(data.amount).toFixed(2) : null
       this.number = (!this.data || !this.data.details) ? 0 : this.data.details.reduce((sum, item) => sum + item.number, 0)
 
       if (flag) {
@@ -159,6 +160,10 @@ export default {
     formatDate (date) {
       if (!date) return ''
       return new Date(date).format('yyyy-MM-dd')
+    },
+    formatAmount (amount) {
+      if (amount == null) return ''
+      return parseFloat(amount).toFixed(2)
     }
   }
 }

+ 4 - 1
src/views/TagApply.vue

@@ -163,7 +163,10 @@
             min-width="84"
             header-align="right"
             align="right"
-          ></el-table-column>
+          >
+          <template slot-scope="scope">
+              {{ parseFloat(scope.row.amount).toFixed(2) }}
+              </template></el-table-column>
           <el-table-column
             label="状态"
             prop="tagApplyStateName"

+ 3 - 1
src/views/TagDistribute.vue

@@ -97,7 +97,9 @@
                 align="right"
                 min-width="70"
                 header-align="right"
-              ></el-table-column>
+              ><template slot-scope="scope">
+              {{ parseFloat(scope.row.amount).toFixed(2) }}
+              </template></el-table-column>
               <el-table-column
                 label="状态"
                 prop="tagApplyStateName"

+ 5 - 1
src/views/TagPurchase.vue

@@ -120,7 +120,11 @@
               min-width="84"
               header-align="right"
               align="right"
-            ></el-table-column>
+            >
+            <template slot-scope="scope">
+              {{ parseFloat(scope.row.amount).toFixed(2) }}
+              </template>
+            </el-table-column>
             <el-table-column
               label="采购人员"
               prop="buyerName"