Qukatie 2 лет назад
Родитель
Сommit
8ba0cf4c11
28 измененных файлов с 893 добавлено и 954 удалено
  1. 10 10
      src/components/fee-info/main.vue
  2. 18 0
      src/util/validate.js
  3. 4 1
      src/views/billM/billingCenter/index.vue
  4. 14 11
      src/views/exportTrade/EcommerceStocking/index.vue
  5. 186 125
      src/views/exportTrade/customerInquiry/components/goodsInfo.vue
  6. 0 22
      src/views/exportTrade/customerInquiry/config/customerContact.json
  7. 56 111
      src/views/exportTrade/customerInquiry/index.vue
  8. 251 398
      src/views/exportTrade/invoice/detailsPage.vue
  9. 14 7
      src/views/exportTrade/purchaseContract/detailsPage.vue
  10. 84 70
      src/views/exportTrade/purchaseContract/index.vue
  11. 7 4
      src/views/exportTrade/purchaseInquiry/detailsPage.vue
  12. 2 2
      src/views/exportTrade/purchaseInquiry/index.vue
  13. 72 0
      src/views/exportTrade/salesContract/components/goodsInfo.vue
  14. 0 25
      src/views/exportTrade/salesContract/config/customerContact.json
  15. 11 11
      src/views/exportTrade/salesContract/detailsPage.vue
  16. 14 11
      src/views/exportTrade/salesContract/index.vue
  17. 3 3
      src/views/exportTrade/shippingInquiry/detailsPage.vue
  18. 6 6
      src/views/iosBasicData/SeafreightExportF/bills/index.vue
  19. 18 18
      src/views/iosBasicData/accounts/index.vue
  20. 8 18
      src/views/iosBasicData/accountsDetails/index.vue
  21. 13 22
      src/views/iosBasicData/fingenleg/index.vue
  22. 5 16
      src/views/iosBasicData/fingenlegcalc/index.vue
  23. 19 33
      src/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue
  24. 12 8
      src/views/iosBasicData/finvouchers/finvouchersitems.vue
  25. 2 2
      src/views/iosBasicData/finvouchers/index.vue
  26. 26 5
      src/views/maintenance/landFreight/detailsPage.vue
  27. 28 11
      src/views/maintenance/portSurcharge/detailsPage.vue
  28. 10 4
      src/views/maintenance/priceLibrary/index.vue

+ 10 - 10
src/components/fee-info/main.vue

@@ -52,17 +52,17 @@
         <template slot="price" slot-scope="{ row }">
           <el-input-number v-if="row.$cellEdit" v-model="row.price" placeholder="请输入" size="small" :controls="false"
             :precision="2" @input="countChange(row)" style="width: 100%"></el-input-number>
-          <span v-else>{{ row.price | micrometerFormat }}</span>
+          <span v-else>{{ row.price | micrometerFormat2 }}</span>
         </template>
         <template slot="quantity" slot-scope="{ row }">
           <el-input-number v-if="row.$cellEdit && !isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
             :controls="false" :precision="0" @input="countChange(row)" style="width: 100%"></el-input-number>
           <el-input-number v-if="row.$cellEdit && isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
             :controls="false" :precision="6" @input="countChange(row)" style="width: 100%"></el-input-number>
-          <span v-else>{{ row.quantity | decimalFormat }}</span>
+          <span v-else>{{ row.quantity | decimalFormat2 }}</span>
         </template>
         <template slot="amount" slot-scope="{ row }">
-          <span>{{ row.amount | micrometerFormat }}</span>
+          <span>{{ row.amount | micrometerFormat2 }}</span>
         </template>
         <template slot="exchangeRate" slot-scope="{ row }">
           <el-input-number v-if="row.$cellEdit" v-model="row.exchangeRate" size="small" :controls="false" :precision="6"
@@ -131,7 +131,7 @@ import woodOption from "./config/wood.json";
 import option from "./config/feeList.json";
 import { getDeptLazyTree, customerList } from "@/api/basicData/basicFeesDesc";
 import { delItem, delItem2, getfeesDetails } from "@/api/feeInfo/fee-info";
-import { isPercentage, micrometerFormat, IntegerFormat } from "@/util/validate";
+import { isPercentage, micrometerFormat2, IntegerFormat,decimalFormat2 } from "@/util/validate";
 import cropDialog from "@/components/crop-dialog/main";
 import _ from "lodash";
 import ApplyPayment from "../finance/applyPayment";
@@ -298,11 +298,11 @@ export default {
     isPercentage(val) {
       return isPercentage(val);
     },
-    micrometerFormat(val) {
-      return micrometerFormat(val);
+    micrometerFormat2(val) {
+      return micrometerFormat2(val);
     },
-    decimalFormat(num) {
-      return num ? Number(num).toFixed(6) : "0.00";
+    decimalFormat2(num) {
+      return decimalFormat2(num);
     },
     IntegerFormat(num) {
       return IntegerFormat(num);
@@ -826,11 +826,11 @@ export default {
             });
             //数量总计
             if (item.property == "quantity") {
-              sums[index] = qtySum ? qtySum.toFixed(6) : "0.00";
+              sums[index] = micrometerFormat2(qtySum);
             }
             //金额总计
             if (item.property == "amount") {
-              sums[index] = micrometerFormat(amountSum);
+              sums[index] = micrometerFormat2(amountSum);
             }
           }
         });

+ 18 - 0
src/util/validate.js

@@ -2,6 +2,9 @@
 export function decimalFormat(num){
   return num ? Number(num).toFixed(2) : "0.00";
 }
+export function decimalFormat2(num){
+  return num ? Number(Number(num).toFixed(2)) : "0";
+}
 //数字取整
 export function IntegerFormat(num){
   num=Number(num?num:0)
@@ -22,6 +25,21 @@ export function micrometerFormat(num) {
     })
   );
 }
+/**
+ * 单数据转千分符
+ *
+ * @export
+ * @param {*} num 数值
+ * @returns
+ */
+export function micrometerFormat2(num) {
+  num = num ? Number(num).toFixed(2) : '0.00'
+  return (
+    Number(num) && Number(num).toString().replace(/\d+/, function (s) {
+      return s.replace(/(\d)(?=(\d{3})+$)/g, '$1,');
+    })
+  );
+}
 // 百分比
 export function isPercentage(val) {
   const num = val ? Number(val).toFixed(2) : 0.00

+ 4 - 1
src/views/billM/billingCenter/index.vue

@@ -610,8 +610,11 @@
                 label:'未对账',
                 value:0
               },{
-                label:'对账',
+                label:'部分对账',
                 value:1
+              },{
+                label:'已对账',
+                value:2
               }],
               overHidden:true,
               rules: [{

+ 14 - 11
src/views/exportTrade/EcommerceStocking/index.vue

@@ -44,10 +44,13 @@
                     <span>{{ row.orderQuantity | IntegerFormat }}</span>
                 </template>
                 <template slot-scope="{ row }" slot="amount">
-                    <span>{{ row.amount | decimalFormat }}</span>
+                    <span>{{ row.amount | decimalFormat2 }}</span>
                 </template>
                 <template slot-scope="{ row }" slot="purchaseAmount">
-                    <span>{{ row.purchaseAmount | decimalFormat }}</span>
+                    <span>{{ row.purchaseAmount | decimalFormat2 }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="grossProfit">
+                    <span>{{ row.grossProfit | decimalFormat2 }}</span>
                 </template>
                 <template slot="menuLeft">
                     <el-button
@@ -190,7 +193,7 @@ import {
 } from "@/api/basicData/salesContract";
 import detailPage from "./detailsPage.vue";
 import {defaultDate} from "@/util/date";
-import {micrometerFormat, IntegerFormat, decimalFormat} from "@/util/validate";
+import {micrometerFormat2, IntegerFormat, decimalFormat2} from "@/util/validate";
 import _ from "lodash";
 
 export default {
@@ -295,8 +298,8 @@ export default {
         IntegerFormat(num) {
             return IntegerFormat(num);
         },
-        decimalFormat(num) {
-            return decimalFormat(num);
+        decimalFormat2(num) {
+            return decimalFormat2(num);
         }
     },
     activated() {
@@ -524,19 +527,19 @@ export default {
                         });
                         //数量总计
                         if (item.property == "minOrder") {
-                            sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+                            sums[index] = micrometerFormat2(qtySum);
                         }
                         //入库金额总计
                         if (item.property == "predictOceanFreight") {
-                            sums[index] = micrometerFormat(instoreSum);
+                            sums[index] = micrometerFormat2(instoreSum);
                         }
                         //金额总计
                         if (item.property == "referenceOceanFreight") {
-                            sums[index] = micrometerFormat(totalSum);
+                            sums[index] = micrometerFormat2(totalSum);
                         }
                         //实际海运费
                         if (item.property == "oceanFreight") {
-                            sums[index] = micrometerFormat(oceanFreightSum);
+                            sums[index] = micrometerFormat2(oceanFreightSum);
                         }
                         if (item.property == "orderQuantity") {
                             sums[index] = orderQuantitySum
@@ -549,10 +552,10 @@ export default {
                                 : "0.00";
                         }
                         if (item.property == "amount") {
-                            sums[index] = micrometerFormat(amountSum);
+                            sums[index] = micrometerFormat2(amountSum);
                         }
                         if (item.property == "purchaseAmount") {
-                            sums[index] = micrometerFormat(purchaseAmountSum);
+                            sums[index] = micrometerFormat2(purchaseAmountSum);
                         }
                     }
                 });

+ 186 - 125
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -33,6 +33,39 @@
             <template slot="codeHeader" slot-scope="{column}">
                 <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('cname')">{{ column.label }}</span>
             </template>
+            <template slot="orderQuantity" slot-scope="{row}">
+                {{ row.orderQuantity|decimalFormat2 }}
+            </template>
+            <template slot="amount" slot-scope="{row}">
+                {{ row.amount|decimalFormat2 }}
+            </template>
+            <template slot="partsCost" slot-scope="{row}">
+                {{ row.partsCost|decimalFormat2 }}
+            </template>
+            <template slot="partsPrice" slot-scope="{row}">
+                {{ row.partsPrice|decimalFormat2 }}
+            </template>
+            <template slot="productPrice" slot-scope="{row}">
+                {{ row.productPrice|decimalFormat2 }}
+            </template>
+            <template slot="outFactoryPrice" slot-scope="{row}">
+                {{ row.outFactoryPrice|decimalFormat2 }}
+            </template>
+            <template slot="shareAmount" slot-scope="{row}">
+                {{ row.shareAmount|decimalFormat2 }}
+            </template>
+            <template slot="internationalAmount" slot-scope="{row}">
+                {{ row.internationalAmount|decimalFormat2 }}
+            </template>
+            <template slot="price" slot-scope="{row}">
+                {{ row.price|decimalFormat2 }}
+            </template>
+            <template slot="purchaseCost" slot-scope="{row}">
+                {{ row.purchaseCost|decimalFormat2 }}
+            </template>
+            <template slot="purchaseAmount" slot-scope="{row}">
+                {{ row.purchaseAmount|decimalFormat2 }}
+            </template>
             //操作栏
             <template slot="menu" slot-scope="{ row, index }">
                 <div style="display:flex;justify-content: center;">
@@ -47,9 +80,9 @@
                             <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
                                 @click="moveUp(row, index)" style="color:#409EFF;"></i>
                         </el-tooltip>
-                        <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i
-                                v-if="index != (data.length - 1)" :disabled="detailData.status == 1"
-                                class="el-icon-arrow-down" @click="moveDown(row, index)" style="color:#409EFF;"></i>
+                        <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (data.length - 1)"
+                                :disabled="detailData.status == 1" class="el-icon-arrow-down" @click="moveDown(row, index)"
+                                style="color:#409EFF;"></i>
                         </el-tooltip>
                     </div>
                 </div>
@@ -58,12 +91,8 @@
             <template slot="cnameForm" slot-scope="{type,disabled}">
                 <span style="display:flex">
                     <el-select v-model="goodsForm.itemId" placeholder="请选择" size="small" filterable
-                               @change="cnameChange(goodsForm)">
-                        <el-option
-                            v-for="item in goodsoptions"
-                            :key="item.itemId"
-                            :label="item.cname"
-                            :value="item.itemId">
+                        @change="cnameChange(goodsForm)">
+                        <el-option v-for="item in goodsoptions" :key="item.itemId" :label="item.cname" :value="item.itemId">
                         </el-option>
                     </el-select>
                     <el-button icon="el-icon-search" size="small" @click="pickGoods"></el-button>
@@ -73,8 +102,7 @@
             <template slot="remarksOneForm" slot-scope="{type,disabled}">
                 <el-select v-model="goodsForm.remarksOne" placeholder="请选择" size="small" :disabled="disabled"
                     @change="propsChange(goodsForm)">
-                    <el-option v-for="item in ThreadList" :key="item.id" :label="item.dictValue"
-                        :value="item.dictValue">
+                    <el-option v-for="item in ThreadList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
                     </el-option>
                 </el-select>
             </template>
@@ -82,8 +110,7 @@
             <template slot="customTwoForm" slot-scope="{type,disabled}">
                 <el-select v-model="goodsForm.customTwo" placeholder="请选择" size="small" :disabled="disabled"
                     @change="propsChange(goodsForm)">
-                    <el-option v-for="item in mediumList" :key="item.id" :label="item.dictValue"
-                        :value="item.dictValue">
+                    <el-option v-for="item in mediumList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
                     </el-option>
                 </el-select>
             </template>
@@ -99,8 +126,7 @@
             <template slot="customFourForm" slot-scope="{type,disabled}">
                 <el-select v-model="goodsForm.customFour" placeholder="请选择" size="small" :disabled="disabled"
                     @change="propsChange(goodsForm)">
-                    <el-option v-for="item in stencilList" :key="item.id" :label="item.dictValue"
-                        :value="item.dictValue">
+                    <el-option v-for="item in stencilList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
                     </el-option>
                 </el-select>
             </template>
@@ -168,10 +194,9 @@
             //认证
             <template slot="partsAuthenticationNameForm" slot-scope="{type,disabled}">
                 <div style="display:flex;">
-                    <el-input v-model="goodsForm.partsAuthenticationName" size="small" placeholder=""
-                        :disabled="disabled">
+                    <el-input v-model="goodsForm.partsAuthenticationName" size="small" placeholder="" :disabled="disabled">
                         <template slot="append">{{ goodsForm.partsAuthenticationSalePrice ?
-                                goodsForm.partsAuthenticationSalePrice : 0
+                            goodsForm.partsAuthenticationSalePrice : 0
                         }}</template>
                     </el-input>
                     <el-button icon="el-icon-edit" size="mini" @click="openpart(5, goodsForm.partsAuthenticationValue)"
@@ -254,13 +279,13 @@
             </template>
             //产品型号
             <template slot="itemTypeForm" slot-scope="{type,disabled}">
-              <el-input v-model="goodsForm.itemType" placeholder="请输入内容"></el-input>
-<!--                <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"-->
-<!--                    size="small" @focus="itemTypeFocus(goodsForm)">-->
-<!--                    <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value"-->
-<!--                        :value="item.value">-->
-<!--                    </el-option>-->
-<!--                </el-select>-->
+                <el-input v-model="goodsForm.itemType" placeholder="请输入内容"></el-input>
+                <!--                <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"-->
+                <!--                    size="small" @focus="itemTypeFocus(goodsForm)">-->
+                <!--                    <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value"-->
+                <!--                        :value="item.value">-->
+                <!--                    </el-option>-->
+                <!--                </el-select>-->
             </template>
         </avue-crud>
         <!-- <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
@@ -308,14 +333,14 @@ import priceLibrary from "@/components/price-Library/main";
 import propertyDialog from "@/components/property-dialog/main";
 import { dateFormat } from "@/util/date";
 import {
-  delItem,
-  getDeptLazyTree,
-  getGoods,
-  savePurchase,
-  saveShipping,
-  getSpecification,
-  getPricebank,
-  calculationDomesticFees, getPricebankAll
+    delItem,
+    getDeptLazyTree,
+    getGoods,
+    savePurchase,
+    saveShipping,
+    getSpecification,
+    getPricebank,
+    calculationDomesticFees, getPricebankAll
 } from "@/api/basicData/customerInquiry";
 import {
     sum,
@@ -329,6 +354,7 @@ import {
     addPrice,
     divide
 } from "@/util/calculate";
+import { micrometerFormat2, decimalFormat2 } from "@/util/validate";
 import _ from "lodash";
 export default {
     name: "customerInformation",
@@ -404,6 +430,11 @@ export default {
         priceLibrary,
         reportDialog
     },
+    filters: {
+        decimalFormat2(num) {
+            return decimalFormat2(num);
+        }
+    },
     async created() {
         this.tableOption = await this.getColumnData(
             this.getColumnName(1),
@@ -443,21 +474,21 @@ export default {
         this.getWorkDicts("unit").then(res => {
             this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
         });
-        getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res=>{
-          this.goodsoptions = res.data.data
+        getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
+            this.goodsoptions = res.data.data
         })
-      // getPricebank(1, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
-      //   if (res.data.data.total > 0) {
-      //     this.goodsoptions = res.data.data.records;
-      //     if (Math.ceil(res.data.data.total / 10) > 1) {
-      //       for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-      //         getPricebank(i, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(e => {
-      //           this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
-      //         });
-      //       }
-      //     }
-      //   }
-      // });
+        // getPricebank(1, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
+        //   if (res.data.data.total > 0) {
+        //     this.goodsoptions = res.data.data.records;
+        //     if (Math.ceil(res.data.data.total / 10) > 1) {
+        //       for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+        //         getPricebank(i, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(e => {
+        //           this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+        //         });
+        //       }
+        //     }
+        //   }
+        // });
     },
     methods: {
         cellStyle() {
@@ -559,83 +590,83 @@ export default {
             this.$refs.crud.rowAdd()
         },
         cnameChange(row) {
-          this.upDataOption()
-          for (let e of this.goodsoptions) {
-             if (e.itemId == row.itemId) {
-              row.itemId = e.itemId;
-              row.code = e.code;
-              row.cname = e.cname;
-              row.ename = e.ename;
-              row.priceCategory = e.goodsTypeName;
-              row.purchaseCost = costCal(e.price, e.taxRate);
-              row.purchaseAmount = e.purchaseAmount;
-              row.itemProp = null;
-              row.remarksOne = null;
-              row.customTwo = null;
-              row.customThree = null;
-              row.customFour = null;
-              row.customFive = null;
-              row.customSix = null;
-              row.customSeven = null;
-              row.customEight = null;
-              row.customNine = null;
-              row.customTen = null;
-              row.partsValveName = null;
-              row.partsValveValue = null;
-              row.partsValveCostPrice = 0;
-              row.partsValveSalePrice = 0;
-              row.partsCapName = null;
-              row.partsCapValue = null;
-              row.partsCapCostPrice = 0;
-              row.partsCapSalePrice = 0;
-              row.partsHandleName = null;
-              row.partsHandleValue = null;
-              row.partsHandleCostPrice = 0;
-              row.partsHandleSalePrice = 0;
-              row.partsColourName = null;
-              row.partsColourValue = null;
-              row.partsColourCostPrice = 0;
-              row.partsColourSalePrice = 0;
-              row.partsModeName = null;
-              row.partsModeValue = null;
-              row.partsModeCostPrice = 0;
-              row.partsModeSalePrice = 0;
-              row.partsAuthenticationName = null;
-              row.partsAuthenticationValue = null;
-              row.partsAuthenticationCostPrice = 0;
-              row.partsAuthenticationSalePrice = 0;
-              row.partsOtherName = null;
-              row.partsOtherValue = null;
-              row.partsOtherCostPrice = 0;
-              row.partsOtherSalePrice = 0;
-              row.partsCost = 0;
-              row.corpId = e.corpId;
-              row.corpName = e.corpCode;
-              row.itemDescription = e.cnameDescription;
-              row.partsPrice = 0;
-              row.itemType = e.specs;
-              row.tradeTerms = null;
-              row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
-              row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
-              row.shareAmount = 0;
-              row.internationalAmount = 0;
-              row.orderQuantity = 1;
-              row.insurance = 0;
-              row.freight = 0;
-              row.discount = null;
-              row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
-              row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
-              row.taxRate = 0;
-              row.unit = e.unit;
-              row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
-              row.partsDescribe = null;
-              row.remarks = null;
-              row.exchangeRate = this.form.exchangeRate;
-              row.productRemark = e.ename;
-              row.attributeList = this.getAttribute(e.goodsSpecificationList);
-              row.referrerReason = e.referrerReason
+            this.upDataOption()
+            for (let e of this.goodsoptions) {
+                if (e.itemId == row.itemId) {
+                    row.itemId = e.itemId;
+                    row.code = e.code;
+                    row.cname = e.cname;
+                    row.ename = e.ename;
+                    row.priceCategory = e.goodsTypeName;
+                    row.purchaseCost = costCal(e.price, e.taxRate);
+                    row.purchaseAmount = e.purchaseAmount;
+                    row.itemProp = null;
+                    row.remarksOne = null;
+                    row.customTwo = null;
+                    row.customThree = null;
+                    row.customFour = null;
+                    row.customFive = null;
+                    row.customSix = null;
+                    row.customSeven = null;
+                    row.customEight = null;
+                    row.customNine = null;
+                    row.customTen = null;
+                    row.partsValveName = null;
+                    row.partsValveValue = null;
+                    row.partsValveCostPrice = 0;
+                    row.partsValveSalePrice = 0;
+                    row.partsCapName = null;
+                    row.partsCapValue = null;
+                    row.partsCapCostPrice = 0;
+                    row.partsCapSalePrice = 0;
+                    row.partsHandleName = null;
+                    row.partsHandleValue = null;
+                    row.partsHandleCostPrice = 0;
+                    row.partsHandleSalePrice = 0;
+                    row.partsColourName = null;
+                    row.partsColourValue = null;
+                    row.partsColourCostPrice = 0;
+                    row.partsColourSalePrice = 0;
+                    row.partsModeName = null;
+                    row.partsModeValue = null;
+                    row.partsModeCostPrice = 0;
+                    row.partsModeSalePrice = 0;
+                    row.partsAuthenticationName = null;
+                    row.partsAuthenticationValue = null;
+                    row.partsAuthenticationCostPrice = 0;
+                    row.partsAuthenticationSalePrice = 0;
+                    row.partsOtherName = null;
+                    row.partsOtherValue = null;
+                    row.partsOtherCostPrice = 0;
+                    row.partsOtherSalePrice = 0;
+                    row.partsCost = 0;
+                    row.corpId = e.corpId;
+                    row.corpName = e.corpCode;
+                    row.itemDescription = e.cnameDescription;
+                    row.partsPrice = 0;
+                    row.itemType = e.specs;
+                    row.tradeTerms = null;
+                    row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
+                    row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+                    row.shareAmount = 0;
+                    row.internationalAmount = 0;
+                    row.orderQuantity = 1;
+                    row.insurance = 0;
+                    row.freight = 0;
+                    row.discount = null;
+                    row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+                    row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+                    row.taxRate = 0;
+                    row.unit = e.unit;
+                    row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
+                    row.partsDescribe = null;
+                    row.remarks = null;
+                    row.exchangeRate = this.form.exchangeRate;
+                    row.productRemark = e.ename;
+                    row.attributeList = this.getAttribute(e.goodsSpecificationList);
+                    row.referrerReason = e.referrerReason
+                }
             }
-          }
         },
         importLibray(rows) {
             this.upDataOption()
@@ -729,7 +760,7 @@ export default {
                     exchangeRate: this.form.exchangeRate,
                     productRemark: e.ename,
                     attributeList: this.getAttribute(e.goodsSpecificationList),
-                    referrerReason:e.referrerReason
+                    referrerReason: e.referrerReason
                 }
             });
             this.$refs.crud.rowAdd()
@@ -1234,8 +1265,38 @@ export default {
             loading()
             done()
         },
+        summaryMethod({ columns, data }) {
+            const sums = [];
+            if (columns.length > 0) {
+                columns.forEach((column, index) => {
+                    let prop = column.property
+                    if (['orderQuantity', 'amount', 'partsCost', 'partsPrice', 'productPrice'].includes(prop)) {
+                        let values = this.data.map(item => Number(item[prop] || 0));
+                        let all = values.length !== 0 ? sums[index] = values.reduce((a, b) => {
+                            return a + b;
+                        }) : 0
+                        if (prop == 'orderQuantity') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'amount') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'partsCost') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'partsPrice') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'productPrice') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                    }
+                });
+            }
+            return sums;
+        },
         async saveColumn() {
-          const inSave = await this.saveColumnData(this.getColumnName(1),this.tableOption);
+            const inSave = await this.saveColumnData(this.getColumnName(1), this.tableOption);
             if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
                 this.findObject(this.tableOption.column, "purchaseCost").hide = false;
                 this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;

+ 0 - 22
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -16,28 +16,6 @@
     "summaryText": "合计",
     "dialogWidth":"80%",
     "dialogTop":"25",
-    "sumColumnList": [
-        {
-            "name": "orderQuantity",
-            "type": "sum"
-        },
-        {
-            "name": "amount",
-            "type": "sum"
-        },
-        {
-            "name": "partsCost",
-            "type": "sum"
-        },
-        {
-            "name": "partsPrice",
-            "type": "sum"
-        },
-        {
-            "name": "productPrice",
-            "type": "sum"
-        }
-    ],
     "column":[
         {
             "label": "产品名称",

+ 56 - 111
src/views/exportTrade/customerInquiry/index.vue

@@ -1,35 +1,24 @@
 <template>
   <div>
     <basic-container v-show="show" class="page-crad">
-      <avue-crud
-        ref="crud"
-        :option="option"
-        :data="dataList"
-        v-model="form"
-        :page.sync="page"
-        :search.sync="search"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        :table-loading="loading"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        :cell-style="cellStyle"
-        :summary-method="summaryMethod"
-        @selection-change="selectionChange"
-        @expand-change="expandChange"
-        @search-criteria-switch="searchCriteriaSwitch"
-      >
+      <avue-crud ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
+        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+        @resetColumn="resetColumn" :cell-style="cellStyle" :summary-method="summaryMethod"
+        @selection-change="selectionChange" @expand-change="expandChange" @search-criteria-switch="searchCriteriaSwitch">
         <template slot-scope="{ row }" slot="expand">
-          <avue-crud
-            :data="row.itemData"
-            :option="itemOption"
-            :table-loading="row.itemLoading"
-            :cell-style="cellStyle"
-            class="itemTable"
-          ></avue-crud>
+          <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
+            class="itemTable">
+            <template slot-scope="{ row }" slot="orderQuantity">
+              <span>{{ row.orderQuantity | decimalFormat2  }}</span>
+            </template>
+            <template slot-scope="{ row }" slot="price">
+              <span>{{ row.price | decimalFormat2  }}</span>
+            </template>
+            <template slot-scope="{ row }" slot="amount">
+              <span>{{ row.amount | decimalFormat2  }}</span>
+            </template>
+          </avue-crud>
         </template>
         <template slot-scope="{ row }" slot="createUser">
           <span>{{ row.createUserName }}</span>
@@ -38,13 +27,17 @@
           <span>{{ row.orderQuantity | IntegerFormat }}</span>
         </template>
         <template slot-scope="{ row }" slot="amount">
-          <span>{{ row.amount | decimalFormat }}</span>
+          <span>{{ row.amount | decimalFormat2 }}</span>
         </template>
         <template slot-scope="{ row }" slot="orderStatus">
-          <span v-for="item in orderStatusList" :style="{color: item.colour}" v-if="item.dictValue == row.orderStatus">{{row.orderStatus}}</span>
+          <span v-for="item in orderStatusList" :style="{ color: item.colour }"
+            v-if="item.dictValue == row.orderStatus">{{ row.orderStatus }}</span>
         </template>
         <template slot-scope="{ row }" slot="purchaseAmount">
-          <span>{{ row.purchaseAmount | decimalFormat }}</span>
+          <span>{{ row.purchaseAmount | decimalFormat2 }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="grossProfit">
+          <span>{{ row.grossProfit | decimalFormat2 }}</span>
         </template>
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
@@ -53,95 +46,45 @@
           <port-info v-model="search.portOfDestination" />
         </template>
         <template slot="businesDateSearch">
-          <el-date-picker
-            v-model="search.businesDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
+          <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
+            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
           </el-date-picker>
         </template>
         <template slot="dateValiditySearch">
-          <el-date-picker
-            v-model="search.dateValidity"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
+          <el-date-picker v-model="search.dateValidity" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
+            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
           </el-date-picker>
         </template>
         <template slot="createTimeSearch">
-          <el-date-picker
-            v-model="search.createTime"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
+          <el-date-picker v-model="search.createTime" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
+            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
           </el-date-picker>
         </template>
         <template slot="menuLeft">
-          <el-button
-            type="primary"
-            icon="el-icon-plus"
-            size="small"
-            @click.stop="newAdd()"
-            >创建单据
+          <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">创建单据
           </el-button>
-          <el-button
-            type="success"
-            size="small"
-            @click.stop="copyDoc()"
-            :disabled="selectionList.length != 1"
-            >复制单据</el-button
-          >
+          <el-button type="success" size="small" @click.stop="copyDoc()"
+            :disabled="selectionList.length != 1">复制单据</el-button>
           <el-button type="info" size="small">报表打印</el-button>
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="scope" slot="corpId">
-          <span
-            style="color: #409EFF;cursor: pointer"
-            @click.stop="editOpen(scope.row, 1)"
-            >{{ scope.row.corpsName }}
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{ scope.row.corpsName }}
           </span>
         </template>
         <template slot-scope="scope" slot="orderNo">
-          <span
-            style="color: #409EFF;cursor: pointer"
-            @click.stop="editOpen(scope.row, 1)"
-            >{{ scope.row.orderNo }}
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{ scope.row.orderNo }}
           </span>
         </template>
-        <template slot-scope="scope" slot="grossProfitRate">
-          {{ scope.row.grossProfitRate ? scope.row.grossProfitRate : 0 }}%
-        </template>
         <template slot-scope="scope" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            size="small"
-            @click.stop="rowDel(scope.row, scope.index)"
-            >删除
+          <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)">删除
           </el-button>
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page
-      @goBack="goBack"
-      @copyOrder="copyOrder"
-      :detailData="detailData"
-      v-if="!show"
-    ></detail-page>
+    <detail-page @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData" v-if="!show"></detail-page>
   </div>
 </template>
 
@@ -155,7 +98,7 @@ import {
 } from "@/api/basicData/customerInquiry";
 import detailPage from "./detailsPage";
 import { defaultDate } from "@/util/date";
-import { micrometerFormat, IntegerFormat,decimalFormat } from "@/util/validate";
+import { micrometerFormat2, IntegerFormat, decimalFormat2 } from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -174,7 +117,7 @@ export default {
         total: 0,
         pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
-      orderStatusList:[],
+      orderStatusList: [],
       show: true,
       detailData: {},
       loading: false,
@@ -260,8 +203,8 @@ export default {
     IntegerFormat(num) {
       return IntegerFormat(num);
     },
-    decimalFormat(num){
-      return decimalFormat(num);
+    decimalFormat2(num) {
+      return decimalFormat2(num);
     }
   },
   activated() {
@@ -352,23 +295,23 @@ export default {
       if (params.businesDate) {
         params.orderStartDate = params.businesDate[0];
         params.orderEndDate = params.businesDate[1];
-      }else {
-          delete params.orderStartDate
-          delete params.orderEndDate
+      } else {
+        delete params.orderStartDate
+        delete params.orderEndDate
       }
       if (params.dateValidity) {
         params.dateValidityStart = params.dateValidity[0];
         params.dateValidityEnd = params.dateValidity[1];
-      }else {
-          delete params.dateValidityStart
-          delete params.dateValidityEnd
+      } else {
+        delete params.dateValidityStart
+        delete params.dateValidityEnd
       }
       if (params.createTime) {
         params.createTimeStart = params.createTime[0];
         params.createTimeEnd = params.createTime[1];
-      }else {
-          delete params.createTimeStart
-          delete params.createTimeEnd
+      } else {
+        delete params.createTimeStart
+        delete params.createTimeEnd
       }
       this.search = this.deepClone(params);
       delete params.businesDate;
@@ -435,15 +378,15 @@ export default {
             });
             //数量总计
             if (item.property == "orderQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+              sums[index] = Number(qtySum ? qtySum.toFixed(2) : "0");
             }
             //入库金额总计
             if (item.property == "amount") {
-              sums[index] = micrometerFormat(instoreSum);
+              sums[index] = micrometerFormat2(instoreSum);
             }
             //金额总计
             if (item.property == "purchaseAmount") {
-              sums[index] = micrometerFormat(totalSum);
+              sums[index] = micrometerFormat2(totalSum);
             }
           }
         });
@@ -501,7 +444,7 @@ export default {
     }
   },
   watch: {
-    option: function() {
+    option: function () {
       this.search.businesDate = defaultDate();
     }
   }
@@ -512,9 +455,11 @@ export default {
 ::v-deep .select-component {
   display: flex;
 }
+
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+
 .itemTable ::v-deep .el-table {
   margin-left: 50px;
   width: 100%;

+ 251 - 398
src/views/exportTrade/invoice/detailsPage.vue

@@ -3,315 +3,163 @@
     <div class="customer-head">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
-        <el-button
-          type="danger"
-          style="border: none;background: none;color: red"
-          icon="el-icon-arrow-left"
-          @click="backToList"
-          >返回列表
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+          @click="backToList">返回列表
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut">
-        <el-button
-          type="primary"
-          size="small"
-          v-if="detailData.status == 1"
-          class="el-button--small-yh "
-          @click.stop="openEdit"
-          >编辑
+        <el-button type="primary" size="small" v-if="detailData.status == 1" class="el-button--small-yh "
+          @click.stop="openEdit">编辑
         </el-button>
-<!--        <el-button-->
-<!--          type="info"-->
-<!--          @click.stop="editCustomer('save')"-->
-<!--          v-if="form.deliveryStatus == '录入'"-->
-<!--          size="small"-->
-<!--          >确认发货</el-button-->
-<!--        >-->
-<!--        <el-button-->
-<!--          type="info"-->
-<!--          @click.stop="editCustomer('repeal')"-->
-<!--          v-if="form.deliveryStatus != '录入'"-->
-<!--          size="small"-->
-<!--          >撤销发货</el-button-->
-<!--        >-->
-<!--        <el-button-->
-<!--          type="success"-->
-<!--          :disabled="!form.id"-->
-<!--          size="small"-->
-<!--          @click="copyDoc"-->
-<!--        >-->
-<!--          复制单据-->
-<!--        </el-button>-->
-        <el-button
-          type="primary"
-          :disabled="disabled"
-          @click="editCustomer('submit')"
-          :loading="subLoading"
-          v-if="detailData.status != 1"
-          size="small"
-          >保存数据
+        <!--        <el-button-->
+        <!--          type="info"-->
+        <!--          @click.stop="editCustomer('save')"-->
+        <!--          v-if="form.deliveryStatus == '录入'"-->
+        <!--          size="small"-->
+        <!--          >确认发货</el-button-->
+        <!--        >-->
+        <!--        <el-button-->
+        <!--          type="info"-->
+        <!--          @click.stop="editCustomer('repeal')"-->
+        <!--          v-if="form.deliveryStatus != '录入'"-->
+        <!--          size="small"-->
+        <!--          >撤销发货</el-button-->
+        <!--        >-->
+        <!--        <el-button-->
+        <!--          type="success"-->
+        <!--          :disabled="!form.id"-->
+        <!--          size="small"-->
+        <!--          @click="copyDoc"-->
+        <!--        >-->
+        <!--          复制单据-->
+        <!--        </el-button>-->
+        <el-button type="primary" :disabled="disabled" @click="editCustomer('submit')" :loading="subLoading"
+          v-if="detailData.status != 1" size="small">保存数据
         </el-button>
       </div>
     </div>
     <div class="customer-main">
       <trade-card title="基础信息">
-        <avue-form
-          ref="form"
-          class="trading-form"
-          v-model="form"
-          :option="option"
-        >
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpId">
-            <crop-select
-              v-model="form.corpId"
-              corpType="KH"
-              disabled
-            ></crop-select>
+            <crop-select v-model="form.corpId" corpType="KH" disabled></crop-select>
           </template>
           <template slot="belongToCorpId">
             <crop-select v-model="form.belongToCorpId" corpType="GS" disabled></crop-select>
           </template>
           <template slot="storageId">
-            <warehouse-select
-              v-model="form.storageId"
-              :configuration="configuration2"
-              :disabled="detailData.status == 1"
-            ></warehouse-select>
+            <warehouse-select v-model="form.storageId" :configuration="configuration2"
+              :disabled="detailData.status == 1"></warehouse-select>
           </template>
         </avue-form>
       </trade-card>
       <trade-card title="商品信息">
-        <avue-crud
-          ref="crud"
-          :data="data"
-          :option="tableOption"
-          @row-del="rowDel"
-          @saveColumn="saveColumn"
-          @resetColumn="resetColumn"
-          :summary-method="summaryMethod"
-          :cell-style="cellStyle"
-        >
+        <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
+          @resetColumn="resetColumn" :summary-method="summaryMethod" :cell-style="cellStyle">
           <template slot="headerSerial">
-            <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="mini"
-              @click.stop="addRow"
-              :disabled="detailData.status == 1"
-              circle
-            ></el-button>
+            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+              :disabled="detailData.status == 1" circle></el-button>
           </template>
           <template slot="menuLeft">
-            <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="small"
-              @click.stop="newDetails"
-              :disabled="detailData.status == 1"
-              >批量录入</el-button
-            >
-            <el-button
-              type="info"
-              icon="el-icon-printer"
-              size="small"
-              @click.stop="openReport()"
-              >报表打印</el-button
-            >
-<!--            <el-button :type="!form.customsStatus?'info':'primary'" size="small" :disabled="!form.id||form.estimateGoodGoods !='货备齐'" @click.native="dialog = true;fudaSatus = 1"-->
-<!--            >已报关</el-button>-->
-<!--            <el-button :type="!form.shippingStatus?'info':'warning'" size="small" :disabled="!form.id||form.estimateGoodGoods !='货备齐'" @click.native="dialog = true;fudaSatus = 2"-->
-<!--            >已出运</el-button>-->
-<!--            <el-button :type="form.documentaryStatus == '已寄单'?'success':'info'" size="small" :disabled="!form.id||form.estimateGoodGoods !='货备齐'" @click.native="dialog = true;fudaSatus = 3"-->
-<!--            >已寄单</el-button>-->
-            <el-button :type="!form.customsStatus?'info':'primary'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 1"
-            >已报关</el-button>
-            <el-button :type="!form.shippingStatus?'info':'warning'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 2"
-            >已出运</el-button>
-            <el-button :type="form.documentaryStatus == '已寄单'?'success':'info'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 3"
-            >已寄单</el-button>
+            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newDetails"
+              :disabled="detailData.status == 1">批量录入</el-button>
+            <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印</el-button>
+            <!--            <el-button :type="!form.customsStatus?'info':'primary'" size="small" :disabled="!form.id||form.estimateGoodGoods !='货备齐'" @click.native="dialog = true;fudaSatus = 1"-->
+            <!--            >已报关</el-button>-->
+            <!--            <el-button :type="!form.shippingStatus?'info':'warning'" size="small" :disabled="!form.id||form.estimateGoodGoods !='货备齐'" @click.native="dialog = true;fudaSatus = 2"-->
+            <!--            >已出运</el-button>-->
+            <!--            <el-button :type="form.documentaryStatus == '已寄单'?'success':'info'" size="small" :disabled="!form.id||form.estimateGoodGoods !='货备齐'" @click.native="dialog = true;fudaSatus = 3"-->
+            <!--            >已寄单</el-button>-->
+            <el-button :type="!form.customsStatus ? 'info' : 'primary'" size="small" :disabled="!form.id"
+              @click.native="dialog = true; fudaSatus = 1">已报关</el-button>
+            <el-button :type="!form.shippingStatus ? 'info' : 'warning'" size="small" :disabled="!form.id"
+              @click.native="dialog = true; fudaSatus = 2">已出运</el-button>
+            <el-button :type="form.documentaryStatus == '已寄单' ? 'success' : 'info'" size="small" :disabled="!form.id"
+              @click.native="dialog = true; fudaSatus = 3">已寄单</el-button>
           </template>
           <template slot-scope="{ row }" slot="corpId">
             {{ row.corpsName }}
           </template>
           <template slot="itemType" slot-scope="{ row }">
-            <el-select
-              v-if="row.$cellEdit"
-              v-model="row.itemType"
-              filterable
-              allow-create
-              default-first-option
-              placeholder="请输入"
-              @focus="itemTypeFocus(row)"
-            >
-              <el-option
-                v-for="(item, index) in itemtypeList"
-                :key="index"
-                :label="item.value"
-                :value="item.value"
-              >
+            <el-select v-if="row.$cellEdit" v-model="row.itemType" filterable allow-create default-first-option
+              placeholder="请输入" @focus="itemTypeFocus(row)">
+              <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value" :value="item.value">
               </el-option>
             </el-select>
             <span v-else>{{ row.itemType }}</span>
           </template>
           <template slot="cname" slot-scope="{ row, index }">
-            <el-button
-              size="small"
-              type="text"
-              @click="rePick(row, index)"
-              :disabled="disabled"
-              class="picker"
-              style="padding:4px 10px;float:left"
-              >选择</el-button
-            >
+            <el-button size="small" type="text" @click="rePick(row, index)" :disabled="disabled" class="picker"
+              style="padding:4px 10px;float:left">选择</el-button>
             <span> {{ row.cname }}</span>
           </template>
           <template slot="taxRate" slot-scope="{ row }">
-            <el-input
-              v-if="row.$cellEdit"
-              size="mini"
-              v-model="row.taxRate"
+            <el-input v-if="row.$cellEdit" size="mini" v-model="row.taxRate"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-              @change="taxRateChange(row)"
-              placeholder="请输入"
-            />
+              @change="taxRateChange(row)" placeholder="请输入" />
             <span v-else>{{ row.taxRate }}</span>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button
-              size="small"
-              icon="el-icon-edit"
-              type="text"
-              @click="rowCell(row, index)"
-              :disabled="disabled"
-              >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
-            >
-            <el-button
-              size="small"
-              icon="el-icon-edit"
-              type="text"
-              @click="rowDel(row)"
-              >删 除</el-button
-            >
+            <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)" :disabled="disabled">{{
+              row.$cellEdit ? "保存" : "修改" }}</el-button>
+            <el-button size="small" icon="el-icon-edit" type="text" @click="rowDel(row)">删 除</el-button>
           </template>
           <template slot="price" slot-scope="{ row }">
-            <el-input
-              v-if="row.$cellEdit"
-              v-model="row.price"
-              size="small"
+            <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-              @change="priceChange(row)"
-            ></el-input>
-            <span v-else>{{ row.price }}</span>
+              @change="priceChange(row)"></el-input>
+            <span v-else>{{ row.price | decimalFormat2 }}</span>
+          </template>
+          <template slot="contractAmount" slot-scope="{ row }">
+            <span>{{ row.contractAmount | decimalFormat2 }}</span>
           </template>
           <template slot="actualQuantity" slot-scope="{ row }">
-            <el-input
-              v-if="row.$cellEdit"
-              v-model="row.actualQuantity"
-              size="small"
-              oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
-              @change="quantityChange(row)"
-            ></el-input>
+            <el-input v-if="row.$cellEdit" v-model="row.actualQuantity" size="small"
+              oninput='this.value=this.value.replace(/[^(\d)]/g,"")' @change="quantityChange(row)"></el-input>
             <span v-else>{{ row.actualQuantity | IntegerFormat }}</span>
           </template>
         </avue-crud>
       </trade-card>
-      <fee-info
-        ref="feeInfo"
-        :inCropId="true"
-        :orderFeesList="orderFeesList"
-        :disabled="detailData.status == 1"
-        feeUrl="/blade-deliver-goods/deliveryfees/update"
-      />
+      <fee-info ref="feeInfo" :inCropId="true" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
+        feeUrl="/blade-deliver-goods/deliveryfees/update" />
       <containerTitle title="合同附件"></containerTitle>
-      <c-upload
-        typeUpload="CK"
-        :data="orderFilesList"
-        :disabled="detailData.status == 1"
-        :enumerationValue="76"
-        deleteUrl="/blade-deliver-goods/deliveryfiles/update"
-        display
-      />
+      <c-upload typeUpload="CK" :data="orderFilesList" :disabled="detailData.status == 1" :enumerationValue="76"
+        deleteUrl="/blade-deliver-goods/deliveryfiles/update" display />
     </div>
-    <el-dialog
-      title="导入商品"
-      append-to-body
-      class="el-dialogDeep"
-      :visible.sync="dialogVisible"
-      width="80%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      @close="closeGoods"
-      top="5vh"
-      v-dialog-drag
-    >
+    <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods" top="5vh"
+      v-dialog-drag>
       <span>
         <el-row>
           <el-col :span="4">
             <div>
               <el-scrollbar>
                 <basic-container>
-                  <avue-tree
-                    :option="treeOption"
-                    @node-click="nodeClick"
-                    :style="treeStyle"
-                  />
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle" />
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
           <el-col :span="20">
-            <avue-crud
-              :option="goodsOption"
-              :table-loading="loading"
-              :data="goodsList"
-              ref="goodsCrud"
-              :search.sync="search"
-              @search-change="searchChange"
-              @refresh-change="refreshChange"
-              @selection-change="selectionChange"
-              @row-click="rowClick"
-              :page.sync="page"
-              @on-load="onLoad"
-              @saveColumn="saveGoodsColumn"
-              @resetColumn="resetGoodsColumn"
-              :cell-style="cellStyle"
-            ></avue-crud>
+            <avue-crud :option="goodsOption" :table-loading="loading" :data="goodsList" ref="goodsCrud"
+              :search.sync="search" @search-change="searchChange" @refresh-change="refreshChange"
+              @selection-change="selectionChange" @row-click="rowClick" :page.sync="page" @on-load="onLoad"
+              @saveColumn="saveGoodsColumn" @resetColumn="resetGoodsColumn" :cell-style="cellStyle"></avue-crud>
           </el-col>
         </el-row>
       </span>
 
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="importGoods"
-          :disabled="selectionList.length == 0"
-          >导入</el-button
-        >
+        <el-button type="primary" @click="importGoods" :disabled="selectionList.length == 0">导入</el-button>
       </span>
     </el-dialog>
-    <report-dialog
-      :switchDialog="switchDialog"
-      :reportId="form.id"
-      reportName="跟单"
-      @onClose="onClose()"
-    ></report-dialog>
-    <el-dialog
-        title="选择日期"
-        :visible.sync="dialog"
-        v-if="dialog"
-        width="30%"
-        append-to-body>
+    <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="跟单" @onClose="onClose()"></report-dialog>
+    <el-dialog title="选择日期" :visible.sync="dialog" v-if="dialog" width="30%" append-to-body>
       <span>
-        <el-date-picker
-            v-model="pickerValue"
-            type="date"
-            style="width: 100%;"
-            size="small"
-            value-format="yyyy-MM-dd HH:ss:mm"
-            placeholder="选择日期">
-      </el-date-picker>
+        <el-date-picker v-model="pickerValue" type="date" style="width: 100%;" size="small"
+          value-format="yyyy-MM-dd HH:ss:mm" placeholder="选择日期">
+        </el-date-picker>
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialog = false;">取 消</el-button>
@@ -337,18 +185,18 @@ import {
 } from "@/api/basicData/invoice";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
-import { micrometerFormat, IntegerFormat } from "@/util/validate";
+import { micrometerFormat2, IntegerFormat, decimalFormat2 } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import _ from "lodash";
 import fa from "element-ui/src/locale/lang/fa";
-import {dateFormat} from "@/util/date";
+import { dateFormat } from "@/util/date";
 export default {
   name: "detailsPageEdit",
   data() {
     return {
-      fudaSatus:0,
-      dialog:false,
-      pickerValue:dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
+      fudaSatus: 0,
+      dialog: false,
+      pickerValue: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
       treeStyle: "height:" + (window.innerHeight - 315) + "px",
       configuration2: {
         multipleChoices: false,
@@ -381,7 +229,7 @@ export default {
             ],
             span: 8,
             slot: true
-          },{
+          }, {
             label: "公司主体",
             prop: "belongToCorpId",
             disabled: true,
@@ -436,17 +284,17 @@ export default {
             type: "textarea",
             minRows: 2,
             disabled: true,
-          },{
+          }, {
             label: "订单日期",
             prop: "businesDate",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "计划交货日期",
             prop: "plannedDeliveryDate",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "联系人",
             prop: "corpAttn",
             disabled: true,
@@ -457,145 +305,145 @@ export default {
             prop: "corpTel",
             disabled: true,
             span: 8
-          },{
+          }, {
             label: "货物类型",
             prop: "cargoType",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "起运港",
             prop: "portOfLoad",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "目的港",
             prop: "portOfDestination",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "运输方式",
             prop: "transport",
             span: 8,
             disabled: true,
-          },{
-             label: "运输方式描述",
-             prop: "transportDescription",
-             span: 8,
-             disabled: true,
-          },{
+          }, {
+            label: "运输方式描述",
+            prop: "transportDescription",
+            span: 8,
+            disabled: true,
+          }, {
             label: "价格条款",
             prop: "priceTerms",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "价格条款描述",
             prop: "priceTermsDescription",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "币别",
             prop: "currency",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "付款方式",
             prop: "paymentType",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "收付款方式描述",
             prop: "paymentTypeDescription",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "汇率",
             prop: "exchangeRate",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "日期条款",
             prop: "dateClause",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "日期说明",
             prop: "dateDesc",
             span: 8,
             disabled: true,
-          },{
+          }, {
             label: "船名",
             prop: "shipName",
             span: 8,
-          },{
+          }, {
             label: "航次",
             prop: "voyage",
             span: 8,
-          },{
+          }, {
             label: "工作号",
             prop: "jobNumber",
             span: 8,
-          },{
+          }, {
             label: "采购备注",
             prop: "purchaseRemark",
             type: "textarea",
             minRows: 2,
             disabled: true,
             span: 16
-          },{
+          }, {
             label: '需产地证',
             prop: 'certificateOriginRequired',
             type: 'select',
             span: 8,
             dicData: [{
-                label: "是",
-                value: "1"
+              label: "是",
+              value: "1"
             }, {
-                label: "否",
-                value: "0"
+              label: "否",
+              value: "0"
             }],
             value: "1"
-          },{
+          }, {
             label: "船务备注",
             prop: "shippingRemark",
             type: "textarea",
             minRows: 2,
             disabled: true,
             span: 16
-          },{
+          }, {
             label: "签单方式",
             prop: "signingMethod",
             span: 8,
             type: "select",
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=signing_method",
             props: {
-                label: "dictValue",
-                value: "dictValue"
+              label: "dictValue",
+              value: "dictValue"
             },
             rules: [{
-                required: false,
-                message: "",
-                trigger: "blur"
+              required: false,
+              message: "",
+              trigger: "blur"
             }]
-          },{
+          }, {
             label: "备注",
             prop: "deliveryRemarks",
             type: "textarea",
             minRows: 2,
             span: 16
-          },{
+          }, {
             label: "三方检验",
             prop: "tripartiteInspection",
             span: 8,
             type: "select",
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=tripartite_inspection",
             props: {
-                label: "dictValue",
-                value: "dictValue"
+              label: "dictValue",
+              value: "dictValue"
             },
             rules: [{
-                required: false,
-                message: "",
-                trigger: "blur"
+              required: false,
+              message: "",
+              trigger: "blur"
             }]
           }
         ]
@@ -603,7 +451,7 @@ export default {
       treeOption: {
         nodeKey: "id",
         lazy: true,
-        treeLoad: function(node, resolve) {
+        treeLoad: function (node, resolve) {
           const parentId = node.level === 0 ? 0 : node.data.id;
           getDeptLazyTree(parentId).then(res => {
             resolve(
@@ -688,9 +536,9 @@ export default {
       this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
     });
   },
-  watch:{
+  watch: {
     dialog(newVla, oldVal) {
-      if (newVla){
+      if (newVla) {
         this.pickerValue = dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
       }
     }
@@ -698,6 +546,9 @@ export default {
   filters: {
     IntegerFormat(num) {
       return IntegerFormat(num);
+    },
+    decimalFormat2(num) {
+      return decimalFormat2(num);
     }
   },
   methods: {
@@ -707,8 +558,8 @@ export default {
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
     },
-    PSModification(type){
-      if (!this.pickerValue)return this.$message.error("请选择日期")
+    PSModification(type) {
+      if (!this.pickerValue) return this.$message.error("请选择日期")
       const loading = this.$loading({
         lock: true,
         text: '操作中',
@@ -716,18 +567,18 @@ export default {
         background: 'rgba(255,255,255,0.7)'
       });
       purchaseStatusUpdate({
-        id:this.form.id,
-        documentaryStatusType:type,
-        documentaryDate:this.pickerValue,
-        customsDate:this.pickerValue,
-        shippingDate:this.pickerValue
-      }).then(res=>{
+        id: this.form.id,
+        documentaryStatusType: type,
+        documentaryDate: this.pickerValue,
+        customsDate: this.pickerValue,
+        shippingDate: this.pickerValue
+      }).then(res => {
         loading.close();
         this.$message.success("操作成功")
         this.pickerValue = ''
         this.dialog = false
         this.getDetail(this.form.id);
-      }).catch(err=>{
+      }).catch(err => {
         loading.close();
         this.pickerValue = ''
         this.dialog = false
@@ -926,78 +777,78 @@ export default {
         background: 'rgba(255,255,255,0.7)'
       });
       detail(id).then(res => {
-          if (this.detailData.status == "copy") {
-            delete res.data.data.id;
-            delete res.data.data.sysNo;
-            delete res.data.data.orderNo;
-            delete res.data.data.orgOrderNo;
-            delete res.data.data.srcOrderNo;
-            delete res.data.data.createTime;
-            delete res.data.data.createUser;
-            delete res.data.data.createUserName;
-            delete res.data.data.updateTime;
-            delete res.data.data.updateUser;
-            delete res.data.data.updateUserName;
-            delete res.data.data.morderNo;
-            delete res.data.data.status;
-            delete res.data.data.ifEnquiry;
-            delete res.data.data.ifShipping;
-            delete res.data.data.customsStatus;
-            delete res.data.data.shippingStatus;
-            delete res.data.data.documentaryStatus;
-            res.data.data.orderStatus = "录入";
-            res.data.data.deliveryItemsList.forEach(e => {
-              delete e.id;
-              delete e.pid;
-              delete e.createTime;
-              delete e.createUser;
-              delete e.updateTime;
-              delete e.updateUser;
-              delete e.orgOrderNo;
-              delete e.srcId;
-              delete e.status;
-              delete e.isDeleted;
-            });
-            res.data.data.deliveryFeesList.forEach(e => {
-              delete e.id;
-              delete e.pid;
-              delete e.createTime;
-              delete e.createUser;
-              delete e.updateTime;
-              delete e.updateUser;
-              delete e.status;
-              delete e.isDeleted;
-            });
-            res.data.data.deliveryFilesList.forEach(e => {
-              delete e.id;
-              delete e.pid;
-              delete e.createTime;
-              delete e.createUser;
-              delete e.updateTime;
-              delete e.updateUser;
-              delete e.status;
-              delete e.isDeleted;
-            });
-          }
-          this.form = res.data.data;
-          this.data = res.data.data.deliveryItemsList;
-          this.orderFeesList = res.data.data.deliveryFeesList;
-          this.orderFilesList = res.data.data.deliveryFilesList;
-          this.oldform = res.data.data;
-          this.olddata = this.deepClone(res.data.data.deliveryItemsList);
-          this.oldorderFeesList = this.deepClone(
-            res.data.data.deliveryFeesList
-          );
-          this.oldorderFilesList = this.deepClone(
-            res.data.data.deliveryFilesList
-          );
-          loading.close();
-        }).finally(() => {
-          this.loading = false;
-          this.showBut = true;
-          this.pageLoading = false;
+        if (this.detailData.status == "copy") {
+          delete res.data.data.id;
+          delete res.data.data.sysNo;
+          delete res.data.data.orderNo;
+          delete res.data.data.orgOrderNo;
+          delete res.data.data.srcOrderNo;
+          delete res.data.data.createTime;
+          delete res.data.data.createUser;
+          delete res.data.data.createUserName;
+          delete res.data.data.updateTime;
+          delete res.data.data.updateUser;
+          delete res.data.data.updateUserName;
+          delete res.data.data.morderNo;
+          delete res.data.data.status;
+          delete res.data.data.ifEnquiry;
+          delete res.data.data.ifShipping;
+          delete res.data.data.customsStatus;
+          delete res.data.data.shippingStatus;
+          delete res.data.data.documentaryStatus;
+          res.data.data.orderStatus = "录入";
+          res.data.data.deliveryItemsList.forEach(e => {
+            delete e.id;
+            delete e.pid;
+            delete e.createTime;
+            delete e.createUser;
+            delete e.updateTime;
+            delete e.updateUser;
+            delete e.orgOrderNo;
+            delete e.srcId;
+            delete e.status;
+            delete e.isDeleted;
+          });
+          res.data.data.deliveryFeesList.forEach(e => {
+            delete e.id;
+            delete e.pid;
+            delete e.createTime;
+            delete e.createUser;
+            delete e.updateTime;
+            delete e.updateUser;
+            delete e.status;
+            delete e.isDeleted;
+          });
+          res.data.data.deliveryFilesList.forEach(e => {
+            delete e.id;
+            delete e.pid;
+            delete e.createTime;
+            delete e.createUser;
+            delete e.updateTime;
+            delete e.updateUser;
+            delete e.status;
+            delete e.isDeleted;
+          });
+        }
+        this.form = res.data.data;
+        this.data = res.data.data.deliveryItemsList;
+        this.orderFeesList = res.data.data.deliveryFeesList;
+        this.orderFilesList = res.data.data.deliveryFilesList;
+        this.oldform = res.data.data;
+        this.olddata = this.deepClone(res.data.data.deliveryItemsList);
+        this.oldorderFeesList = this.deepClone(
+          res.data.data.deliveryFeesList
+        );
+        this.oldorderFilesList = this.deepClone(
+          res.data.data.deliveryFilesList
+        );
         loading.close();
-        });
+      }).finally(() => {
+        this.loading = false;
+        this.showBut = true;
+        this.pageLoading = false;
+        loading.close();
+      });
     },
     getGenerate(data) {
       this.form = data;
@@ -1032,32 +883,32 @@ export default {
               deliveryFeesList: orderFeesList,
               deliveryFilesList: this.orderFilesList
             }).then(res => {
-                this.$message.success("保存成功");
-                this.form = res.data.data;
-                this.data = res.data.data.deliveryItemsList;
-                this.orderFeesList = res.data.data.deliveryFeesList;
-                this.orderFilesList = res.data.data.deliveryFilesList;
-                this.oldform = res.data.data;
-                this.olddata = this.deepClone(res.data.data.deliveryItemsList);
-                this.oldorderFeesList = this.deepClone(
-                  res.data.data.deliveryFeesList
-                );
-                this.oldorderFilesList = this.deepClone(
-                  res.data.data.deliveryFilesList
-                );
-                if (status2 == "goBack") {
-                  if (this.form.id) {
-                    this.unLock({
-                      moduleName: "fh",
-                      tableName: "business_order",
-                      billId: this.form.id,
-                      billNo: this.form.orgOrderNo
-                    });
-                  }
-                  this.$emit("goBack");
-                  this.leaveDetailsKey(this.$route.name);
+              this.$message.success("保存成功");
+              this.form = res.data.data;
+              this.data = res.data.data.deliveryItemsList;
+              this.orderFeesList = res.data.data.deliveryFeesList;
+              this.orderFilesList = res.data.data.deliveryFilesList;
+              this.oldform = res.data.data;
+              this.olddata = this.deepClone(res.data.data.deliveryItemsList);
+              this.oldorderFeesList = this.deepClone(
+                res.data.data.deliveryFeesList
+              );
+              this.oldorderFilesList = this.deepClone(
+                res.data.data.deliveryFilesList
+              );
+              if (status2 == "goBack") {
+                if (this.form.id) {
+                  this.unLock({
+                    moduleName: "fh",
+                    tableName: "business_order",
+                    billId: this.form.id,
+                    billNo: this.form.orgOrderNo
+                  });
                 }
-              })
+                this.$emit("goBack");
+                this.leaveDetailsKey(this.$route.name);
+              }
+            })
               .finally(() => {
                 this.subLoading = false;
               });
@@ -1190,11 +1041,11 @@ export default {
             });
             //数量总计
             if (item.property == "actualQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+              sums[index] = micrometerFormat2(qtySum);
             }
             //金额总计
             if (item.property == "contractAmount") {
-              sums[index] = micrometerFormat(amountSum);
+              sums[index] = micrometerFormat2(amountSum);
             }
           }
         });
@@ -1297,9 +1148,11 @@ export default {
 .trading-form ::v-deep .el-form-item {
   margin-bottom: 8px !important;
 }
+
 ::v-deep .el-form-item__error {
   display: none !important;
 }
+
 ::v-deep .select-component {
   display: flex !important;
 }

+ 14 - 7
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -91,12 +91,15 @@
               <el-input type="text" v-if="row.$cellEdit" v-model="row.price" size="small"
                         oninput="value=value.replace(/^\\D*(^\\-?\\d*(?:\\.\\d{0,2})?).*$/g, '$1')"
                         @change="quantityChange(row)"></el-input>
-              <span v-else>{{ row.price }}</span>
+              <span v-else>{{ row.price|decimalFormat2 }}</span>
+            </template>
+            <template slot="amount" slot-scope="{ row }">
+              <span>{{ row.amount|decimalFormat2 }}</span>
             </template>
             <template slot="orderQuantity" slot-scope="{ row }">
               <el-input v-if="row.$cellEdit" v-model="row.orderQuantity" size="small"
                 oninput='this.value=this.value.replace(/[^(\d)]/g,"")'></el-input>
-              <span v-else>{{ row.orderQuantity }}</span>
+              <span v-else>{{ row.orderQuantity|decimalFormat2 }}</span>
             </template>
             <template slot="cname" slot-scope="{ row, index }">
               <el-button size="small" type="text" @click="rePick(row, index)"
@@ -287,8 +290,9 @@ import { contrastObj, contrastList } from "@/util/contrastData";
 import {
   isvalidatemobile,
   validatename,
-  micrometerFormat,
-  IntegerFormat
+  micrometerFormat2,
+  IntegerFormat,
+  decimalFormat2
 } from "@/util/validate";
 import financialAccount from "@/components/finance/financialAccount";
 import billApplication from "@/components/bill/billApplication";
@@ -781,7 +785,10 @@ export default {
   filters: {
     IntegerFormat(num) {
       return IntegerFormat(num);
-    }
+    },
+    decimalFormat2(num) {
+      return decimalFormat2(num);
+    },
   },
   methods: {
       // 采购任务弹窗点击
@@ -1342,11 +1349,11 @@ export default {
             });
             //数量总计
             if (item.property == "orderQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+              sums[index] =micrometerFormat2(qtySum);
             }
             //金额总计
             if (item.property == "amount") {
-              sums[index] = micrometerFormat(amountSum);
+              sums[index] = micrometerFormat2(amountSum);
             }
           }
         });

+ 84 - 70
src/views/exportTrade/purchaseContract/index.vue

@@ -5,27 +5,26 @@
                 <el-tab-pane label="待采购" name="first"></el-tab-pane>
                 <el-tab-pane label="业务单据" name="second"></el-tab-pane>
             </el-tabs>
-            <avue-crud v-show="tabsType == 'first'" ref="procureCrud" :page.sync="treatPage"
-                       :option="procureOption" :data="procureData" @refresh-change="listBYStatusfun(treatPage)"
-                       @resetColumn="resetColumnTwo('procureCrud', 'procureOption', 'procureOptionList', 2.3)"
-                       @saveColumn="saveColumnTwo('procureCrud', 'procureOption', 'procureOptionList', 2.3)">
+            <avue-crud v-show="tabsType == 'first'" ref="procureCrud" :page.sync="treatPage" :option="procureOption"
+                :data="procureData" @refresh-change="listBYStatusfun(treatPage)"
+                @resetColumn="resetColumnTwo('procureCrud', 'procureOption', 'procureOptionList', 2.3)"
+                @saveColumn="saveColumnTwo('procureCrud', 'procureOption', 'procureOptionList', 2.3)">
                 <template slot-scope="scope" slot="menu">
-                    <el-button type="text" size="small"
-                               @click.stop="procureViewfun(scope.row)">采购
+                    <el-button type="text" size="small" @click.stop="procureViewfun(scope.row)">采购
                     </el-button>
                 </template>
             </avue-crud>
-            <avue-crud v-show="tabsType == 'second'"
-                ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
-                @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
-                @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-                @resetColumn="resetColumn" :cell-style="cellStyle" @selection-change="selectionChange"
-                @expand-change="expandChange" @search-criteria-switch="searchCriteriaSwitch" >
+            <avue-crud v-show="tabsType == 'second'" ref="crud" :option="option" :data="dataList" v-model="form"
+                :page.sync="page" :search.sync="search" @search-change="searchChange" @current-change="currentChange"
+                @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading"
+                @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle"
+                @selection-change="selectionChange" @expand-change="expandChange"
+                @search-criteria-switch="searchCriteriaSwitch">
                 <template slot-scope="{ row }" slot="expand">
                     <avue-crud ref="itemCrud" :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading"
-                               @resetColumn="resetColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)"
-                               @saveColumn="saveColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)"
-                        :cell-style="cellStyle" class="itemTable"></avue-crud>
+                        @resetColumn="resetColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)"
+                        @saveColumn="saveColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)" :cell-style="cellStyle"
+                        class="itemTable"></avue-crud>
                 </template>
                 <template slot="createTimeSearch">
                     <el-date-picker v-model="search.createTime" type="daterange" start-placeholder="开始日期"
@@ -69,7 +68,8 @@
                     </span>
                 </template>
                 <template slot-scope="scope" slot="srcOrderNo">
-                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{ scope.row.srcOrderNo }}</span>
+                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{
+                        scope.row.srcOrderNo }}</span>
                 </template>
                 <template slot-scope="scope" slot="fudaPurchaseStatus">
                     <span class="el-button--text">
@@ -92,6 +92,18 @@
                 <template slot-scope="{ row }" slot="orderQuantity">
                     <span>{{ row.orderQuantity | IntegerFormat }}</span>
                 </template>
+                <template slot-scope="{ row }" slot="purchaseAmount">
+                    <span>{{ row.purchaseAmount | decimalFormat2 }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="purchaseQuantity">
+                    <span>{{ row.purchaseQuantity | decimalFormat2 }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="pdeliverQuantity">
+                    <span>{{ row.deliverQuantity | decimalFormat2 }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="actualQuantity">
+                    <span>{{ row.actualQuantity | decimalFormat2 }}</span>
+                </template>
                 <template slot-scope="scope" slot="menu">
                     <el-button type="text" icon="el-icon-delete" size="small"
                         @click.stop="rowDel(scope.row, scope.index)">删除
@@ -131,8 +143,7 @@
                             @resetColumn="resetColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
                             @saveColumn="saveColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
                             @refresh-change="refreshChangeTwo" @search-change="searchChangeTwo" @search-reset="searchReset"
-                                   @selection-change="dialogSelectionChange"
-                            @on-load="dialogOnLoad">
+                            @selection-change="dialogSelectionChange" @on-load="dialogOnLoad">
                             <template slot="menuLeft">
                                 <el-tabs v-model="activeName" @tab-click="tabHandle">
                                     <el-tab-pane label="查询结果" name="searchList" />
@@ -161,21 +172,21 @@
                 </el-row>
             </span>
             <span slot="footer" class="dialog-footer">
-<!--                <el-button type="warning" @click="outExport">导出</el-button>-->
+                <!--                <el-button type="warning" @click="outExport">导出</el-button>-->
                 <el-button type="warning" @click="openReport">导出</el-button>
                 <el-button @click="dialogVisible = false; params = {}">取 消</el-button>
                 <el-button type="primary" :disabled="goodsListSave.length === 0" @click="confirmImport">导 入</el-button>
             </span>
         </el-dialog>
 
-      <report-dialog :switchDialog="switchDialog" :reportId="params.pid" reportName="出口贸易-采购"
-                     @onClose="onClose()"></report-dialog>
+        <report-dialog :switchDialog="switchDialog" :reportId="params.pid" reportName="出口贸易-采购"
+            @onClose="onClose()"></report-dialog>
 
         <el-dialog title="导入采购任务" :visible.sync="procureVisible" append-to-body>
             <avue-crud :data="procurelistData" :option="procurelistOption" :search.sync="params" ref="daorucaigoCrud"
-                       @refresh-change="refreshChangeTwo"
-                       @resetColumn="resetColumnTwo('daorucaigoCrud', 'procurelistOption', 'procurelistOptionList', 2.4)"
-                       @saveColumn="saveColumnTwo('daorucaigoCrud', 'procurelistOption', 'procurelistOptionList', 2.4)"  >
+                @refresh-change="refreshChangeTwo"
+                @resetColumn="resetColumnTwo('daorucaigoCrud', 'procurelistOption', 'procurelistOptionList', 2.4)"
+                @saveColumn="saveColumnTwo('daorucaigoCrud', 'procurelistOption', 'procurelistOptionList', 2.4)">
                 <template slot="menuLeft">
                     <el-tabs v-model="activeName" @tab-click="tabHandle">
                         <el-tab-pane label="查询结果" name="searchList" />
@@ -186,22 +197,22 @@
                     <crop-select v-model="params.corpId" corpType="GYS" />
                 </template>
                 <template slot="actualQuantity" slot-scope="scope">
-                    <el-input-number v-if="activeName === 'importStaging'" v-model="scope.row.actualQuantity"
-                                     :precision="2" :min="0.01" :controls="false"></el-input-number>
+                    <el-input-number v-if="activeName === 'importStaging'" v-model="scope.row.actualQuantity" :precision="2"
+                        :min="0.01" :controls="false"></el-input-number>
                     <span v-else>{{ scope.row.actualQuantity }}</span>
                 </template>
                 <template slot-scope="scope" slot="menu">
                     <el-button type="text" icon="el-icon-edit" size="small"
-                               @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
-                               :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                        @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
+                        :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
                     </el-button>
                     <el-button type="text" icon="el-icon-delete" size="small"
-                               @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+                        @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
                     </el-button>
                 </template>
             </avue-crud>
             <span slot="footer" class="dialog-footer">
-<!--                <el-button type="warning" @click="outExport">导出</el-button>-->
+                <!--                <el-button type="warning" @click="outExport">导出</el-button>-->
                 <el-button type="warning" @click="openReport">导出</el-button>
                 <el-button @click="procureVisible = false;">取 消</el-button>
                 <el-button type="primary" :disabled="goodsListSave.length === 0" @click="confirmImport">导 入</el-button>
@@ -224,23 +235,23 @@ import {
 } from "@/api/exportTrade/purchaseContract";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
-import { IntegerFormat } from "@/util/validate";
+import { IntegerFormat, decimalFormat2 } from "@/util/validate";
 import { customerParameter } from "@/enums/management-type";
 import { getToken } from "@/util/auth";
-import {customerList} from "@/api/basicData/customerInformation";
+import { customerList } from "@/api/basicData/customerInformation";
 import { detail as companyDetail } from "@/api/basicData/customerInformation"
-import {getUser as nameUser} from "@/api/system/user"
+import { getUser as nameUser } from "@/api/system/user"
 import tableOption from "@/views/exportTrade/EcommerceStocking/config/customerContact.json";
 
 export default {
     name: "customerInformation",
     data() {
         return {
-            tabsType:'first',
-            procureData:[], // 待采购数据
+            tabsType: 'first',
+            procureData: [], // 待采购数据
             // 待采购配置
-            procureOption:[],
-            procureOptionList:{
+            procureOption: [],
+            procureOptionList: {
                 searchShow: true,
                 searchMenuSpan: 8,
                 border: true,
@@ -257,44 +268,44 @@ export default {
                     label: "销售单号",
                     prop: "orderNo",
                     overHidden: true
-                },{
+                }, {
                     label: "采购员",
                     prop: "buyerName",
-                    hide:true,
+                    hide: true,
                     overHidden: true
-                },{
+                }, {
                     label: "交货日期",
                     prop: "plannedDeliveryDate",
                     overHidden: true
-                },{
+                }, {
                     label: "公司主体",
                     prop: "belongToCorpName",
                     overHidden: true
-                },{
+                }, {
                     label: "公司主体",
                     prop: "belongToCorpId",
-                    hide:true,
+                    hide: true,
                     overHidden: true
-                },{
+                }, {
                     label: "制单人",
                     prop: "createUserName",
                     overHidden: true
-                },{
+                }, {
                     label: "制单人",
                     prop: "createUser",
-                    hide:true,
+                    hide: true,
                     overHidden: true
-                },{
+                }, {
                     label: "制单日期",
                     prop: "createTime",
                     overHidden: true
                 }]
             },
-            procureVisible:false, // 待采购弹窗
-            procurelistData:[], // 待采购弹窗列表数据
+            procureVisible: false, // 待采购弹窗
+            procurelistData: [], // 待采购弹窗列表数据
             // 待采购弹窗待配置
-            procurelistOption:{},
-            procurelistOptionList : {
+            procurelistOption: {},
+            procurelistOptionList: {
                 searchShow: true,
                 searchMenuSpan: 8,
                 border: true,
@@ -468,7 +479,7 @@ export default {
                 searchIcon: false,
                 searchIndex: 2,
                 tip: false,
-                selection:true,
+                selection: true,
                 column: [{
                     label: "销售单号",
                     prop: "billNo",
@@ -577,14 +588,14 @@ export default {
                 }]
             },
             dialogVisible: false,
-            itemOption:{},
+            itemOption: {},
             itemOptionList: {
                 align: "center",
                 header: true,
-                addBtn:false,
+                addBtn: false,
                 border: true,
                 menu: false,
-                refreshBtn:false,
+                refreshBtn: false,
                 column: [
                     {
                         label: "产品类别",
@@ -640,7 +651,7 @@ export default {
             option: {},
             parentId: 0,
             dataList: [],
-            treatPage:{
+            treatPage: {
                 pageSize: 20,
                 currentPage: 1,
                 total: 0,
@@ -683,6 +694,9 @@ export default {
     filters: {
         IntegerFormat(num) {
             return IntegerFormat(num);
+        },
+        decimalFormat2(num) {
+            return decimalFormat2(num);
         }
     },
     activated() {
@@ -697,23 +711,23 @@ export default {
     },
     methods: {
         // 采购任务弹窗打开
-        caigorenwufun(){
+        caigorenwufun() {
             this.dialogVisible = true;
             this.listBYStatusfun(this.treatPage) // 获取待采购数据
         },
         // 获取待采购数据
-        listBYStatusfun(page){
+        listBYStatusfun(page) {
             listBYStatus({
                 size: page.pageSize,
                 current: page.currentPage,
             }).then(res => {
                 for (let item of res.data.data.records) {
                     // 公司
-                    companyDetail(item.belongToCorpId).then(re=>{
+                    companyDetail(item.belongToCorpId).then(re => {
                         item.belongToCorpName = re.data.data.cname
                     })
                     // 用户
-                    nameUser(item.createUser).then(re=>{
+                    nameUser(item.createUser).then(re => {
                         item.createUserName = re.data.data.name
                     })
                 }
@@ -723,7 +737,7 @@ export default {
             });
         },
         // 获取待采购弹窗列表数据
-        procureViewfun(row){
+        procureViewfun(row) {
             this.procurelistData = []
             this.procureOnLoad(row.id)
             this.procureVisible = true;
@@ -793,7 +807,7 @@ export default {
             this.selectionList = list;
         },
         // 采购任务弹窗增加多选
-        dialogSelectionChange(list){
+        dialogSelectionChange(list) {
             this.goodsListSave = list
         },
         //行展开数据
@@ -916,10 +930,10 @@ export default {
             }
         },
         openReport() {
-          this.switchDialog = !this.switchDialog;
+            this.switchDialog = !this.switchDialog;
         },
         onClose(val) {
-          this.switchDialog = val;
+            this.switchDialog = val;
         },
         confirmImport() {
             let ids = this.goodsListSave.map(item => {
@@ -933,10 +947,10 @@ export default {
             });
             generatePurchaseBill(this.goodsListSave).then(res => {
                 this.$message.success("导入成功")
-                console.log(res,629)
+                console.log(res, 629)
 
-                for(let item of  res.data.data.orderItemsList) {
-                    getGoods(1,10,null,{cname:item.cname}).then(res=>{
+                for (let item of res.data.data.orderItemsList) {
+                    getGoods(1, 10, null, { cname: item.cname }).then(res => {
                         item.price = res.data.data.records[0].displayPrice
                     })
                 }
@@ -977,7 +991,7 @@ export default {
                 size: 20,
                 current: 1,
                 showAll: 0,
-                pid:id
+                pid: id
             }
             listXS(params).then(res => {
                 this.procurelistData = res.data.data
@@ -1003,7 +1017,7 @@ export default {
             }
             this.loading = true;
             this.dataList.forEach(item => {
-            this.$refs.crud.toggleRowExpansion(item, false);
+                this.$refs.crud.toggleRowExpansion(item, false);
             });
             getList(page.currentPage, page.pageSize, params)
                 .then(res => {
@@ -1059,7 +1073,7 @@ export default {
             }
         },
         handleCurrentChange(val) {
-          console.log(val)
+            console.log(val)
             // this.currentRow = val;
             this.params.pid = val.id
             this.dialogPage.currentPage = 1;

+ 7 - 4
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -59,7 +59,7 @@
             <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)"></el-input>
-            <span v-else>{{ row.price }}</span>
+            <span v-else>{{ row.price| micrometerFormat2 }}</span>
           </template>
           <template slot="taxRate" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.taxRate" size="small"
@@ -95,7 +95,7 @@
             <span v-show="!row.$cellEdit">{{ row.corpName }}</span>
           </template>
           <template slot="purchaseAmount" slot-scope="{ row }">
-            <span>{{ row.purchaseAmount | micrometerFormat }}</span>
+            <span>{{ row.purchaseAmount | micrometerFormat2 }}</span>
           </template>
           <template slot="menuLeft">
             <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newDetails"
@@ -160,7 +160,7 @@ import {
 } from "@/api/basicData/purchaseInquiry";
 import customerDialog from "@/components/customer-dialog/main";
 import reportDialog from "@/components/report-dialog/main";
-import { micrometerFormat, IntegerFormat } from "@/util/validate";
+import { micrometerFormat2, IntegerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import { purchaseCal } from "@/util/calculate";
 import _ from "lodash";
@@ -347,6 +347,9 @@ export default {
   filters: {
     IntegerFormat(num) {
       return IntegerFormat(num);
+    },
+    micrometerFormat2(num) {
+      return micrometerFormat2(num);
     }
   },
   async created() {
@@ -821,7 +824,7 @@ export default {
             }
             //金额总计
             if (item.property == "amount") {
-              sums[index] = micrometerFormat(amountSum);
+              sums[index] = micrometerFormat2(amountSum);
             }
           }
         });

+ 2 - 2
src/views/exportTrade/purchaseInquiry/index.vue

@@ -127,7 +127,7 @@ import {
 } from "@/api/basicData/purchaseInquiry";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
-import { IntegerFormat } from "@/util/validate";
+import { IntegerFormat,micrometerFormat2 } from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -302,7 +302,7 @@ export default {
             });
             //数量总计
             if (item.property == "orderQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+              sums[index] = micrometerFormat2(qtySum );
             }
           }
         });

+ 72 - 0
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -30,6 +30,39 @@
       <template slot="codeHeader" slot-scope="{column}">
         <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('cname')">{{ column.label }}</span>
       </template>
+      <template slot="orderQuantity" slot-scope="{row}">
+                {{ row.orderQuantity|decimalFormat2 }}
+            </template>
+            <template slot="amount" slot-scope="{row}">
+                {{ row.amount|decimalFormat2 }}
+            </template>
+            <template slot="partsCost" slot-scope="{row}">
+                {{ row.partsCost|decimalFormat2 }}
+            </template>
+            <template slot="partsPrice" slot-scope="{row}">
+                {{ row.partsPrice|decimalFormat2 }}
+            </template>
+            <template slot="productPrice" slot-scope="{row}">
+                {{ row.productPrice|decimalFormat2 }}
+            </template>
+            <template slot="outFactoryPrice" slot-scope="{row}">
+                {{ row.outFactoryPrice|decimalFormat2 }}
+            </template>
+            <template slot="shareAmount" slot-scope="{row}">
+                {{ row.shareAmount|decimalFormat2 }}
+            </template>
+            <template slot="internationalAmount" slot-scope="{row}">
+                {{ row.internationalAmount|decimalFormat2 }}
+            </template>
+            <template slot="price" slot-scope="{row}">
+                {{ row.price|decimalFormat2 }}
+            </template>
+            <template slot="purchaseCost" slot-scope="{row}">
+                {{ row.purchaseCost|decimalFormat2 }}
+            </template>
+            <template slot="purchaseAmount" slot-scope="{row}">
+                {{ row.purchaseAmount|decimalFormat2 }}
+            </template>
       //操作栏
       <template slot="menu" slot-scope="{ row, index }">
         <div style="display:flex;justify-content: center;">
@@ -331,6 +364,7 @@ import {
 } from "@/util/calculate";
 import _ from "lodash";
 import {getPricebankAll} from "@/api/basicData/customerInquiry";
+import { micrometerFormat2, decimalFormat2 } from "@/util/validate";
 export default {
   name: "customerInformation",
   data() {
@@ -409,6 +443,11 @@ export default {
     priceLibrary,
     reportDialog
   },
+  filters: {
+        decimalFormat2(num) {
+            return decimalFormat2(num);
+        }
+    },
   async created() {
     this.tableOption = await this.getColumnData(
       this.getColumnName(5),
@@ -1322,6 +1361,39 @@ export default {
       loading()
       done()
     },
+    summaryMethod({ columns, data }) {
+            const sums = [];
+            if (columns.length > 0) {
+                columns.forEach((column, index) => {
+                    let prop = column.property
+                    if (['orderQuantity', 'amount', 'partsCost', 'partsPrice', 'productPrice','actualQuantity'].includes(prop)) {
+                        let values = this.data.map(item => Number(item[prop] || 0));
+                        let all = values.length !== 0 ? sums[index] = values.reduce((a, b) => {
+                            return a + b;
+                        }) : 0
+                        if (prop == 'orderQuantity') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'amount') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'partsCost') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'partsPrice') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'productPrice') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                        if (prop == 'actualQuantity') {
+                            sums[index] = micrometerFormat2(all)
+                        }
+                    }
+                });
+            }
+            return sums;
+        },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(5),

+ 0 - 25
src/views/exportTrade/salesContract/config/customerContact.json

@@ -17,31 +17,6 @@
   "summaryText": "合计",
   "dialogWidth": "90%",
   "dialogTop":"25",
-  "sumColumnList": [{
-      "name": "orderQuantity",
-      "type": "sum"
-    },
-    {
-      "name": "amount",
-      "type": "sum"
-    },
-    {
-      "name": "partsCost",
-      "type": "sum"
-    },
-    {
-      "name": "partsPrice",
-      "type": "sum"
-    },
-    {
-      "name": "productPrice",
-      "type": "sum"
-    },
-    {
-      "name": "actualQuantity",
-      "type": "sum"
-    }
-  ],
   "column": [{
       "label": "产品名称",
       "prop": "cname",

+ 11 - 11
src/views/exportTrade/salesContract/detailsPage.vue

@@ -342,23 +342,23 @@
           <template slot="purchaseCost" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.purchaseCost" size="small" placeholder="请输入"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
-            <span v-else>{{ row.purchaseCost | micrometerFormat }}</span>
+            <span v-else>{{ row.purchaseCost | micrometerFormat2 }}</span>
           </template>
           <template slot="purchaseAmount" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" size="small" placeholder="请输入"
               @change="purchaseAmountChange(row)"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"></el-input>
-            <span v-else>{{ row.purchaseAmount | micrometerFormat }}</span>
+            <span v-else>{{ row.purchaseAmount | micrometerFormat2 }}</span>
           </template>
           <template slot="price" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)">
             </el-input>
-            <span v-else>{{ row.price | micrometerFormat }}</span>
+            <span v-else>{{ row.price | micrometerFormat2 }}</span>
           </template>
           <template slot="amount" slot-scope="{ row }">
-            <span>{{ row.amount | micrometerFormat }}</span>
+            <span>{{ row.amount | micrometerFormat2 }}</span>
           </template>
           <template slot="orderQuantity" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.orderQuantity" size="small"
@@ -379,14 +379,14 @@
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)">
             </el-input>
-            <span v-else>{{ row.insurance | micrometerFormat }}</span>
+            <span v-else>{{ row.insurance | micrometerFormat2 }}</span>
           </template>
           <template slot="freight" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.freight" size="small"
               oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
               @change="priceChange(row)">
             </el-input>
-            <span v-else>{{ row.freight | micrometerFormat }}</span>
+            <span v-else>{{ row.freight | micrometerFormat2 }}</span>
           </template>
           <template slot="taxRate" slot-scope="{ row }">
             <el-input v-if="row.$cellEdit" v-model="row.taxRate" size="small"
@@ -539,7 +539,7 @@ import partDialog from "@/components/part-dialog/main";
 import {
   isDiscount,
   isPercentage,
-  micrometerFormat,
+  micrometerFormat2,
   IntegerFormat
 } from "@/util/validate";
 import {
@@ -1357,8 +1357,8 @@ export default {
     isPercentage(val) {
       return isPercentage(val);
     },
-    micrometerFormat(val) {
-      return micrometerFormat(val);
+    micrometerFormat2(val) {
+      return micrometerFormat2(val);
     },
     IntegerFormat(num) {
       return IntegerFormat(num);
@@ -2833,11 +2833,11 @@ export default {
             });
             //数量总计
             if (item.property == "orderQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+              sums[index] =micrometerFormat2(qtySum);
             }
             //金额总计
             if (item.property == "amount") {
-              sums[index] = micrometerFormat(amountSum);
+              sums[index] = micrometerFormat2(amountSum);
             }
           }
         });

+ 14 - 11
src/views/exportTrade/salesContract/index.vue

@@ -44,10 +44,13 @@
                     <span>{{ row.orderQuantity | IntegerFormat }}</span>
                 </template>
                 <template slot-scope="{ row }" slot="amount">
-                    <span>{{ row.amount | decimalFormat }}</span>
+                    <span>{{ row.amount | decimalFormat2 }}</span>
                 </template>
                 <template slot-scope="{ row }" slot="purchaseAmount">
-                    <span>{{ row.purchaseAmount | decimalFormat }}</span>
+                    <span>{{ row.purchaseAmount | decimalFormat2 }}</span>
+                </template>
+                <template slot-scope="{ row }" slot="grossProfit">
+                    {{ row.grossProfit|decimalFormat2}}
                 </template>
                 <template slot="menuLeft">
                     <el-button
@@ -190,7 +193,7 @@ import {
 } from "@/api/basicData/salesContract";
 import detailPage from "./detailsPage.vue";
 import {defaultDate} from "@/util/date";
-import {micrometerFormat, IntegerFormat, decimalFormat} from "@/util/validate";
+import {micrometerFormat2, IntegerFormat, decimalFormat2} from "@/util/validate";
 import _ from "lodash";
 
 export default {
@@ -295,8 +298,8 @@ export default {
         IntegerFormat(num) {
             return IntegerFormat(num);
         },
-        decimalFormat(num) {
-            return decimalFormat(num);
+        decimalFormat2(num) {
+            return decimalFormat2(num);
         }
     },
     activated() {
@@ -524,19 +527,19 @@ export default {
                         });
                         //数量总计
                         if (item.property == "minOrder") {
-                            sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+                            sums[index] = micrometerFormat2(qtySum);
                         }
                         //入库金额总计
                         if (item.property == "predictOceanFreight") {
-                            sums[index] = micrometerFormat(instoreSum);
+                            sums[index] = micrometerFormat2(instoreSum);
                         }
                         //金额总计
                         if (item.property == "referenceOceanFreight") {
-                            sums[index] = micrometerFormat(totalSum);
+                            sums[index] = micrometerFormat2(totalSum);
                         }
                         //实际海运费
                         if (item.property == "oceanFreight") {
-                            sums[index] = micrometerFormat(oceanFreightSum);
+                            sums[index] = micrometerFormat2(oceanFreightSum);
                         }
                         if (item.property == "orderQuantity") {
                             sums[index] = orderQuantitySum
@@ -549,10 +552,10 @@ export default {
                                 : "0.00";
                         }
                         if (item.property == "amount") {
-                            sums[index] = micrometerFormat(amountSum);
+                            sums[index] = micrometerFormat2(amountSum);
                         }
                         if (item.property == "purchaseAmount") {
-                            sums[index] = micrometerFormat(purchaseAmountSum);
+                            sums[index] = micrometerFormat2(purchaseAmountSum);
                         }
                     }
                 });

+ 3 - 3
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -144,7 +144,7 @@ import {
   multiply
 } from "@/util/calculate";
 import reportDialog from "@/components/report-dialog/main";
-import { micrometerFormat, IntegerFormat } from "@/util/validate";
+import { micrometerFormat2, IntegerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import feeInfo from "@/components/fee-info/main";
 import _ from "lodash";
@@ -721,11 +721,11 @@ export default {
             });
             //数量总计
             if (item.property == "orderQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+              sums[index] = micrometerFormat2(qtySum);
             }
             //金额总计
             if (item.property == "amount") {
-              sums[index] = micrometerFormat(amountSum);
+              sums[index] = micrometerFormat2(amountSum);
             }
           }
         });

+ 6 - 6
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -1100,12 +1100,12 @@ import {getToken} from "@/util/auth";
             //     width: "120",
             //     overHidden:true,
             // },
-            {
-              label: "综合利润(USD)",
-              prop: "amountProfitUsd",
-                width: "120",
-                overHidden:true,
-            },
+            // {
+            //   label: "综合利润(USD)",
+            //   prop: "amountProfitUsd",
+            //     width: "120",
+            //     overHidden:true,
+            // },
             {
               label: "合计应收(CNY )",
               prop: "amountDrLoc",

+ 18 - 18
src/views/iosBasicData/accounts/index.vue

@@ -290,24 +290,24 @@ import {
                   }
               ]
             },
-            {
-              label: "项目",
-              prop: "isItem",
-              overHidden: true,
-              search: true,
-              type:'select',
-                width: "35",
-              dicData:[
-                  {
-                      label:'否',
-                      value:0,
-                  },
-                  {
-                      label:'是',
-                      value:1,
-                  }
-              ]
-            },
+            // {
+            //   label: "项目",
+            //   prop: "isItem",
+            //   overHidden: true,
+            //   search: true,
+            //   type:'select',
+            //     width: "35",
+            //   dicData:[
+            //       {
+            //           label:'否',
+            //           value:0,
+            //       },
+            //       {
+            //           label:'是',
+            //           value:1,
+            //       }
+            //   ]
+            // },
             {
                 label: "是否生成过凭证",
                 prop: "count",

+ 8 - 18
src/views/iosBasicData/accountsDetails/index.vue

@@ -369,11 +369,6 @@ export default {
     "query.checkbox": {
       handler(newVla, oldVal) {
         this.resetData()
-        if (newVla && newVla.length) {
-          newVla.forEach(e => {
-            this.query[e] = 1
-          })
-        }
         if (newVla.filter(e => e == 'foreignCurrency') && newVla.filter(e => e == 'foreignCurrency').length) {
           this.findObject(this.option.column, "amountDrUsd").hide = false;
           this.findObject(this.option.column, "amountCrUsd").hide = false;
@@ -460,15 +455,10 @@ export default {
     // },
   },
   created() {
-    this.option.height = window.innerHeight - 190;
+    this.option.height = window.innerHeight - 360;
   },
   methods: {
     showHight() {
-      if (this.searchShow) {
-        this.option.height = this.option.height - 149;
-      } else {
-        this.option.height = this.option.height + 149;
-      }
       this.$refs.crud.getTableHeight();
     },
     nodeClick(data) {
@@ -501,13 +491,13 @@ export default {
     },
     //重置特殊值
     resetData() {
-      this.query.foreignCurrency = 0
-      this.query.lastLevelItem = 0
-      this.query.blcNotZero = 0
-      this.query.noAmountIncurred = 0
-      this.query.doNotDisplayYear = 0
-      this.query.oppositeAcc = 0
-      this.query.total = 0
+      this.query.foreignCurrency = this.query.checkbox.find(e=>e=='foreignCurrency')?1:0
+      this.query.lastLevelItem = this.query.checkbox.find(e=>e=='lastLevelItem')?1:0
+      this.query.blcNotZero = this.query.checkbox.find(e=>e=='blcNotZero')?1:0
+      this.query.noAmountIncurred = this.query.checkbox.find(e=>e=='noAmountIncurred')?1:0
+      this.query.doNotDisplayYear = this.query.checkbox.find(e=>e=='doNotDisplayYearc')?1:0
+      this.query.oppositeAcc =this.query.checkbox.find(e=>e=='oppositeAcc')?1:0
+      this.query.total =this.query.checkbox.find(e=>e=='total')?1:0
     },
     //导出
     outExport() {

+ 13 - 22
src/views/iosBasicData/fingenleg/index.vue

@@ -95,7 +95,8 @@ export default {
             filterable: true,
             multiple: true,
             tags: true,
-            dicUrl: "/api/blade-los/accounts/selectList?isDetail=1",
+            remote:true,
+            dicUrl: `/api/blade-los/accounts/selectList?isDetail=1&cnName={{key}}`,
             dicData: [],
             props: {
               label: 'cnName',
@@ -273,16 +274,6 @@ export default {
           {
             label: "方向",
             prop: "dc",
-            type: 'select',
-            dicData: [
-              {
-                label: '借方',
-                value: 'D'
-              }, {
-                label: '贷方',
-                value: 'C'
-              },
-            ],
             overHidden: true,
           },
 
@@ -308,11 +299,11 @@ export default {
     "query.checkbox": {
       handler(newVla, oldVal) {
         this.resetData()
-        if (newVla && newVla.length) {
-          newVla.forEach(e => {
-            this.query[e] = 1
-          })
-        }
+        // if (newVla && newVla.length) {
+        //   newVla.forEach(e => {
+        //     this.query[e] = 1
+        //   })
+        // }
         if (newVla.filter(e => e == 'foreignCurrency') && newVla.filter(e => e == 'foreignCurrency').length) {
           this.findObject(this.option.column, "amountDrUsd").hide = false;
           this.findObject(this.option.column, "amountCrUsd").hide = false;
@@ -369,12 +360,12 @@ export default {
     },
     //重置特殊值
     resetData() {
-      this.query.auxiliaryAccounting = 0
-      this.query.foreignCurrency = 0
-      this.query.lastLevelItem = 0
-      this.query.blcNotZero = 0
-      this.query.noAmountIncurred = 0
-      this.query.doNotDisplayYear = 0
+      this.query.auxiliaryAccounting = this.query.checkbox.find(e=>e=='auxiliaryAccounting')?1:0
+      this.query.foreignCurrency = this.query.checkbox.find(e=>e=='foreignCurrency')?1:0
+      this.query.lastLevelItem = this.query.checkbox.find(e=>e=='lastLevelItem')?1:0
+      this.query.blcNotZero = this.query.checkbox.find(e=>e=='blcNotZero')?1:0
+      this.query.noAmountIncurred = this.query.checkbox.find(e=>e=='noAmountIncurred')?1:0
+      this.query.doNotDisplayYear = this.query.checkbox.find(e=>e=='doNotDisplayYearc')?1:0
     },
     //导出
     outExport() {

+ 5 - 16
src/views/iosBasicData/fingenlegcalc/index.vue

@@ -346,11 +346,6 @@ export default {
     "query.checkbox": {
       handler(newVla, oldVal) {
         this.resetData()
-        if (newVla && newVla.length) {
-          newVla.forEach(e => {
-            this.query[e] = 1
-          })
-        }
         if (newVla.filter(e => e == 'foreignCurrency') && newVla.filter(e => e == 'foreignCurrency').length) {
           this.findObject(this.option.column, "amountDrUsd").hide = false;
           this.findObject(this.option.column, "amountCrUsd").hide = false;
@@ -426,18 +421,12 @@ export default {
     // },
   },
   created() {
-    this.option.height = window.innerHeight - 190;
     getAllList({ type: this.query.type }).then(res => {
       this.corpDic = res.data.data
     })
   },
   methods: {
     showHight() {
-      if (this.searchShow) {
-        this.option.height = this.option.height - 115;
-      } else {
-        this.option.height = this.option.height + 115;
-      }
       this.$refs.crud.getTableHeight();
     },
     nodeClick(data) {
@@ -470,11 +459,11 @@ export default {
     },
     //重置特殊值
     resetData() {
-      this.query.displayAcc = 0
-      this.query.foreignCurrency = 0
-      this.query.blcNotZero = 0
-      this.query.noAmountIncurred = 0
-      this.query.doNotDisplayYear = 0
+      this.query.displayAcc = this.query.checkbox.find(e=>e=='displayAcc')?1:0
+      this.query.foreignCurrency =this.query.checkbox.find(e=>e=='foreignCurrency')?1:0
+      this.query.blcNotZero = this.query.checkbox.find(e=>e=='blcNotZero')?1:0
+      this.query.noAmountIncurred = this.query.checkbox.find(e=>e=='noAmountIncurred')?1:0
+      this.query.doNotDisplayYear = this.query.checkbox.find(e=>e=='doNotDisplayYearc')?1:0
     },
     //导出
     outExport() {

+ 19 - 33
src/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue

@@ -5,14 +5,15 @@
             :cell-style="{padding:'0px',fontSize:'12px'}"
             :header-cell-style="tableHeaderCellStyle"
             :data="tableData"
-            border
+            :border="true"
             show-summary
             :summary-method="summaryMethod"
             style="width: 100%"
             @selection-change="handleSelectionChange"
             @row-click="rowClick"
             :row-style="rowStyle"
-            :row-class-name="rowClassName" >
+            :row-class-name="rowClassName" 
+            >
             <el-table-column
                 fixed="left"
                 type="selection"
@@ -28,7 +29,7 @@
                 <template slot-scope="{ row }">
                     <el-input style="width: 100%;" type="textarea" v-model="row.descr"
                               size="small" autocomplete="off"
-                              clearable placeholder="请输入摘要" >
+                              clearable placeholder="请输入摘要" :disabled="disabled">
                     </el-input>
                 </template>
             </el-table-column>
@@ -46,37 +47,18 @@
                                       :buttonIf="false"
                                       :desc="true"
                                       :forParameter="{key:'code',label:'code',value:'code',desc:'cnName'}"
+                                      :disabled="disabled"
                                       @corpFocus="accountsListfun"
                                       @remoteMethod="accountsListfun"
                                       @corpChange="corpChange($event,'accountId',row)">
                         </search-query>
                         <el-tooltip class="item" effect="dark" content="修改" placement="top">
-                            <el-button size="mini" type="primary" icon="el-icon-edit" circle @click="auxiliaryAccountingfun(row)"></el-button>
+                            <el-button size="mini" type="primary" icon="el-icon-edit" circle @click="auxiliaryAccountingfun(row)" :disabled="disabled"></el-button>
                         </el-tooltip>
                     </div>
                     <span>{{(row.accountCode?row.accountCode:'')+' '+(row.accountCnName?row.accountCnName:'')+(row.emplName?'_【职员】'+row.emplName:'')+(row.createDeptName?'_【部门】'+row.createDeptName:'')+(row.corpCnName?'_【客户】'+row.corpCnName:'')}}</span>
                 </template>
             </el-table-column>
-            <!--<el-table-column-->
-            <!--    prop="quantityDr"-->
-            <!--    label="借方数量" >-->
-            <!--    <template slot-scope="{ row }">-->
-            <!--        <el-input style="width: 100%;" type="number" v-model="row.quantityDr"-->
-            <!--                  size="small" autocomplete="off"-->
-            <!--                  placeholder="请输入借方数量" >-->
-            <!--        </el-input>-->
-            <!--    </template>-->
-            <!--</el-table-column>-->
-            <!--<el-table-column-->
-            <!--    prop="quantityCr"-->
-            <!--    label="贷方数量" >-->
-            <!--    <template slot-scope="{ row }">-->
-            <!--        <el-input style="width: 100%;" type="number" v-model="row.quantityCr"-->
-            <!--                  size="small" autocomplete="off"-->
-            <!--                  placeholder="请输入贷方数量" >-->
-            <!--        </el-input>-->
-            <!--    </template>-->
-            <!--</el-table-column>-->
 
             <el-table-column label="本币金额">
                 <el-table-column
@@ -84,7 +66,7 @@
                     label="借方" width="120px" >
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountDr"
-                                  size="small" autocomplete="off" :disabled="!row.accountId"
+                                  size="small" autocomplete="off" :disabled="!row.accountId||disabled"
                                    placeholder="请输入借方" @blur="amountBlur(row,'D')" >
                         </el-input>
                     </template>
@@ -94,7 +76,7 @@
                     label="货方" width="120px" >
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountCr"
-                                  size="small" autocomplete="off" :disabled="!row.accountId"
+                                  size="small" autocomplete="off" :disabled="!row.accountId||disabled"
                                    placeholder="请输入货方" @blur="amountBlur(row,'C')" >
                         </el-input>
                     </template>
@@ -112,7 +94,7 @@
                         <el-input v-if="row.curCode == 'USD'" style="width: 100%;" type="number"
                                   v-model="row.exrate"
                                   size="small" autocomplete="off"
-                                  clearable placeholder="请输入借方" @blur="amountBlur(row,'exrate')" >
+                                  clearable placeholder="请输入借方" @blur="amountBlur(row,'exrate')" :disabled="disabled">
                         </el-input>
                         <span v-else >{{row.exrate}}</span>
                     </template>
@@ -122,7 +104,7 @@
                     label="借方" width="120px">
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountDrUsd"
-                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY' || !row.accountId"
+                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY' || !row.accountId||disabled"
                                   clearable placeholder="请输入借方" @blur="amountUSDBlur(row,'Dusd')" >
                         </el-input>
                     </template>
@@ -132,7 +114,7 @@
                     label="货方" width="120px">
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountCrUsd"
-                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY' || !row.accountId"
+                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY' || !row.accountId||disabled"
                                   clearable placeholder="请输入货方" @blur="amountUSDBlur(row,'Cusd')" >
                         </el-input>
                     </template>
@@ -145,17 +127,17 @@
                 <template slot-scope="{ row }">
                     <el-input style="width: 100%;" type="textarea" v-model="row.remarks"
                               size="small" autocomplete="off"
-                              clearable placeholder="请输入备注" >
+                              clearable placeholder="请输入备注" :disabled="disabled">
                     </el-input>
                 </template>
             </el-table-column>
             <el-table-column label="操作" fixed="right" width="100px">
                 <template slot-scope="scope">
                     <el-tooltip class="item" effect="dark" content="添加" placement="top">
-                        <el-button size="mini" type="primary" icon="el-icon-plus" circle @click="addRowsfun(scope.row,scope.$index)"></el-button>
+                        <el-button size="mini" type="primary" icon="el-icon-plus" circle @click="addRowsfun(scope.row,scope.$index)" :disabled="disabled"></el-button>
                     </el-tooltip>
                     <el-tooltip class="item" effect="dark" content="删除" placement="top">
-                        <el-button size="mini" type="danger" icon="el-icon-delete" circle @click="deletefun(scope.row,scope.$index)" ></el-button>
+                        <el-button size="mini" type="danger" icon="el-icon-delete" circle @click="deletefun(scope.row,scope.$index)" :disabled="disabled"></el-button>
                     </el-tooltip>
                 </template>
             </el-table-column>
@@ -182,7 +164,11 @@
             handleSelectionData:{
                 type:Array,
                 default:[]
-            }
+            },
+            disabled:{
+                type:Blob,
+                default:false
+            },
         },
         async created() {
             this.accountsListfun()

+ 12 - 8
src/views/iosBasicData/finvouchers/finvouchersitems.vue

@@ -8,10 +8,10 @@
             </div>
             <div class="add-customer-btn">
                 <el-button  size="small" type="success" style="margin-right: 8px"
-                            :loading="saveLoading" >凭证标错
+                            :loading="saveLoading" :disabled="form.voucherStatus==1">凭证标错
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px"
-                            :loading="saveLoading" @click="finvouchersSubmitfun" >保 存
+                            :loading="saveLoading" @click="finvouchersSubmitfun" :disabled="form.voucherStatus==1">保 存
                 </el-button>
             </div>
         </div>
@@ -25,6 +25,7 @@
                                               :selectValue="form.voucherType"
                                               :clearable="true"
                                               :buttonIf="false"
+                                              :disabled="form.voucherStatus==1"
                                               :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
                                               placeholder="请选择凭证类型"
                                               @corpChange="corpChange($event,'voucherType')">
@@ -46,6 +47,7 @@
                                                 style="width: 100%;"
                                                 type="date" size="small"
                                                 value-format="yyyy-MM-dd HH:mm"
+                                                :disabled="form.voucherStatus==1"
                                                 placeholder="选择凭证日期">
                                 </el-date-picker>
                             </el-form-item>
@@ -58,6 +60,7 @@
                                               :buttonIf="false"
                                               :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
                                               placeholder="请选择凭证类型"
+                                              :disabled="form.voucherStatus==1"
                                               @corpChange="corpChange($event,'voucherSource')">
                                 </search-query>
                             </el-form-item>
@@ -86,26 +89,27 @@
             <el-card style="margin-top: 10px">
                 <div style="margin-bottom: 10px">
                     <el-button  size="small" type="primary" style="margin-right: 8px"
-                                :loading="saveLoading" @click="addEntryfun" >添加分录
+                                :loading="saveLoading" @click="addEntryfun"  :disabled="form.voucherStatus==1">添加分录
                     </el-button>
                     <el-button  size="small" type="danger" style="margin-right: 8px"
-                                :loading="saveLoading" @click="deleteEntryfun" >删除分录
+                                :loading="saveLoading" @click="deleteEntryfun" :disabled="form.voucherStatus==1" >删除分录
                     </el-button>
                     <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" >项目属性
+                                :loading="saveLoading" :disabled="form.voucherStatus==1">项目属性
                     </el-button>
                     <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" >凭证断号观察器
+                                :loading="saveLoading" :disabled="form.voucherStatus==1">凭证断号观察器
                     </el-button>
                     <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" >断号优化
+                                :loading="saveLoading" :disabled="form.voucherStatus==1">断号优化
                     </el-button>
                     <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" >科目余额查询
+                                :loading="saveLoading" :disabled="form.voucherStatus==1">科目余额查询
                     </el-button>
                 </div>
                 <fromtable-details :tableData="form.finVouchersItemsList"
                                    :handleSelectionData="handleSelectionData"
+                                   :disabled="form.voucherStatus==1"
                                    @handleSelectionChange="handleSelectionChange"
                                    @addRowsfun="addRowsfun"
                                    @deletefun="deletefun"

+ 2 - 2
src/views/iosBasicData/finvouchers/index.vue

@@ -20,9 +20,9 @@
             </el-button>
           </template>
           <template slot="menu" slot-scope="{row}">
-            <el-button type="text" size="small" @click="editFun(row)">编辑
+            <el-button type="text" size="small" @click="editFun(row)" :disabled="row.voucherStatus==1">编辑
             </el-button>
-            <el-button type="text" size="small" @click="rowDel(row)">删除
+            <el-button type="text" size="small" @click="rowDel(row)"  :disabled="row.voucherStatus==1">删除
             </el-button>
           </template>
           <template slot="billNo" slot-scope="{row}">

+ 26 - 5
src/views/maintenance/landFreight/detailsPage.vue

@@ -30,11 +30,26 @@
             </el-button>
           </template>
           <template slot="feesId" slot-scope="{ row,index }">
-            <breakdown-select v-if="row.$cellEdit" v-model="row.feesId" @selectValue="value => selectValue(value,row)"
+            <breakdown-select v-if="row.$cellEdit" v-model="row.feesId" @selectValue="value => selectValue(value, row)"
               :configuration="breakConfiguration">
             </breakdown-select>
             <span v-else>{{ row.feesName }}</span>
           </template>
+          <template slot-scope="{ row }" slot="twentyGp">
+            <span>{{ row.twentyGp | micrometerFormat2 }}</span>
+          </template>
+          <template slot-scope="{ row }" slot="fortyGp">
+            <span>{{ row.fortyGp | micrometerFormat2 }}</span>
+          </template>
+          <template slot-scope="{ row }" slot="fortyHc">
+            <span>{{ row.fortyHc | micrometerFormat2 }}</span>
+          </template>
+          <template slot-scope="{ row }" slot="fortyFiveGp">
+            <span>{{ row.fortyFiveGp | micrometerFormat2 }}</span>
+          </template>
+          <template slot-scope="{ row }" slot="pallet">
+            <span>{{ row.pallet | micrometerFormat2 }}</span>
+          </template>
           <!-- <template slot="currency" slot-scope="{ row,index }">
             <el-select size="small" v-if="row.$cellEdit" v-model="row.currency" placeholder="请选择" clearable>
               <el-option v-for="item in currencyList" :key="item.id" :label="item" :value="item">
@@ -44,7 +59,7 @@
           </template> -->
           <template slot="menu" slot-scope="{ row, index }">
             <el-button size="small" type="text" @click="rowCell(row, index)">{{
-            row.$cellEdit ? "保存" : "修改" }}</el-button>
+              row.$cellEdit ? "保存" : "修改" }}</el-button>
             <el-button size="small" type="text" @click="rowDel(row, index)">删除
             </el-button>
           </template>
@@ -59,6 +74,7 @@ import { optionList } from "./js/optionList";
 import { getDetail, submit, itemDel } from "@/api/maintenance/landFreight";
 import { areaTypeTree } from "@/api/basicData/customerInformation";
 import { getCode } from "@/api/basicData/customerInquiry";
+import { micrometerFormat2 } from "@/util/validate";
 export default {
   name: "index",
   data() {
@@ -121,6 +137,11 @@ export default {
       type: Object
     }
   },
+  filters: {
+    micrometerFormat2(num) {
+      return micrometerFormat2(num)
+    }
+  },
   async created() {
     this.optionList = await this.getColumnData(
       this.getColumnName(204),
@@ -167,7 +188,7 @@ export default {
       this.form.corpName = row.cname
     },
     addRow() {
-      this.dataList.push({ currency: 'CNY',type:1, $cellEdit: true });
+      this.dataList.push({ currency: 'CNY', type: 1, $cellEdit: true });
     },
     rowCell(row, index) {
       this.$refs.crud.rowCell(row, index)
@@ -206,8 +227,8 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
-          this.dataList.forEach(e=>{
-            e.departure=e.departureId?e.departureId.replace(/,/g,"/"):''
+          this.dataList.forEach(e => {
+            e.departure = e.departureId ? e.departureId.replace(/,/g, "/") : ''
           })
           this.loadingBtn = true;
           submit({ ...this.form, feesType: 1, orderCostItemList: this.dataList })

+ 28 - 11
src/views/maintenance/portSurcharge/detailsPage.vue

@@ -28,16 +28,15 @@
       <basic-container v-loading="loadingBtn">
         <el-tabs>
           <el-tab-pane label="运费">
-            <avue-crud ref="crud" :option="optionList" :data="dataList" :table-loading="loading"
-              @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave"
-              @row-update="addUpdate">
+            <avue-crud ref="crud" :option="optionList" :data="dataList" :table-loading="loading" @saveColumn="saveColumn"
+              @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
               <template slot="menuLeft">
                 <el-button type="primary" @click="addRow" size="small">新增
                 </el-button>
               </template>
               <template slot="feesId" slot-scope="{ row,index }">
-                <breakdown-select v-if="row.$cellEdit" v-model="row.feesId"
-                  @selectValue="value => selectValue(value,row)" :configuration="breakConfiguration">
+                <breakdown-select v-if="row.$cellEdit" v-model="row.feesId" @selectValue="value => selectValue(value, row)"
+                  :configuration="breakConfiguration">
                 </breakdown-select>
                 <span v-else>{{ row.feesName }}</span>
               </template>
@@ -46,11 +45,20 @@
                   <el-option v-for="item in currencyList" :key="item.id" :label="item" :value="item">
                   </el-option>
                 </el-select>
-                <span v-else>{{ row.currency}}</span>
+                <span v-else>{{ row.currency }}</span>
+              </template>
+              <template slot-scope="{ row }" slot="twentyGp">
+                <span>{{ row.twentyGp | micrometerFormat2 }}</span>
+              </template>
+              <template slot-scope="{ row }" slot="fortyGp">
+                <span>{{ row.fortyGp | micrometerFormat2 }}</span>
+              </template>
+              <template slot-scope="{ row }" slot="fortyHc">
+                <span>{{ row.fortyHc | micrometerFormat2 }}</span>
               </template>
               <template slot="menu" slot-scope="{ row, index }">
                 <el-button size="small" type="text" @click="rowCell(row, index)">{{
-                row.$cellEdit ? "保存" : "修改" }}</el-button>
+                  row.$cellEdit ? "保存" : "修改" }}</el-button>
                 <el-button size="small" type="text" @click="rowDel(row, index)">删除
                 </el-button>
               </template>
@@ -65,8 +73,8 @@
                 </el-button>
               </template>
               <template slot="feesId" slot-scope="{ row,index }">
-                <breakdown-select v-if="row.$cellEdit" v-model="row.feesId"
-                  @selectValue="value => selectValue(value,row)" :configuration="breakConfiguration">
+                <breakdown-select v-if="row.$cellEdit" v-model="row.feesId" @selectValue="value => selectValue(value, row)"
+                  :configuration="breakConfiguration">
                 </breakdown-select>
                 <span v-else>{{ row.feesName }}</span>
               </template>
@@ -75,11 +83,14 @@
                   <el-option v-for="item in currencyList" :key="item.id" :label="item" :value="item">
                   </el-option>
                 </el-select>
-                <span v-else>{{ row.currency}}</span>
+                <span v-else>{{ row.currency }}</span>
+              </template>
+              <template slot-scope="{ row }" slot="ticket">
+                <span>{{ row.ticket | micrometerFormat2 }}</span>
               </template>
               <template slot="menu" slot-scope="{ row, index }">
                 <el-button size="small" type="text" @click="rowCell2(row, index)">{{
-                row.$cellEdit ? "保存" : "修改" }}</el-button>
+                  row.$cellEdit ? "保存" : "修改" }}</el-button>
                 <el-button size="small" type="text" @click="rowDel2(row, index)">删除
                 </el-button>
               </template>
@@ -96,6 +107,7 @@ import { optionList, optionList2 } from "./js/optionList";
 import { getDetail, submit, itemDel } from "@/api/maintenance/landFreight";
 import { areaTypeTree } from "@/api/basicData/customerInformation";
 import { getCode } from "@/api/basicData/customerInquiry";
+import { micrometerFormat2 } from "@/util/validate";
 export default {
   name: "index",
   data() {
@@ -165,6 +177,11 @@ export default {
       type: Object
     }
   },
+  filters: {
+    micrometerFormat2(num) {
+      return micrometerFormat2(num)
+    }
+  },
   async created() {
     this.optionList = await this.getColumnData(
       this.getColumnName(206),

+ 10 - 4
src/views/maintenance/priceLibrary/index.vue

@@ -55,7 +55,10 @@
           <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
             oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
             @change="priceChange(row)"></el-input>
-          <span v-else>{{ row.price }}</span>
+          <span v-else>{{ row.price|micrometerFormat2 }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="purchaseAmount">
+          <span>{{ row.purchaseAmount|micrometerFormat2 }}</span>
         </template>
         <template slot-scope="{ row }" slot="endTime">
           <el-date-picker v-if="row.$cellEdit" format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
@@ -102,7 +105,7 @@ import {
   submit,
   updateParts
 } from "@/api/maintenance/priceLibrary";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat2 } from "@/util/validate";
 import { orderStateFormat } from "@/enums/order-stauts";
 import { taxRateFormat } from "@/enums/tax-rate";
 import { purchaseCal } from "@/util/calculate";
@@ -209,6 +212,9 @@ export default {
         time = '<span style="color:#9ACD32">' + time + "</span>";
       }
       return time;
+    },
+    micrometerFormat2(num){
+     return micrometerFormat2(num)
     }
   },
   methods: {
@@ -338,11 +344,11 @@ export default {
             });
             //最新价格
             if (item.property == "price") {
-              sums[index] = micrometerFormat(priceSum);
+              sums[index] = micrometerFormat2(priceSum);
             }
             //采购价格
             if (item.property == "purchaseAmount") {
-              sums[index] = micrometerFormat(amountSum);
+              sums[index] = micrometerFormat2(amountSum);
             }
           }
         });