Qukatie il y a 1 an
Parent
commit
cd608dda98

+ 1 - 0
src/components/crop-select/main.vue

@@ -201,6 +201,7 @@ export default {
       if (!this.multiple) {
         this.corpList.forEach(e => {
           if (row == e.id) {
+            console.log(1111,e)
             this.$emit("getCorpData", { ...e, index: this.cropIndex });
           }
         });

+ 44 - 23
src/components/fee-info/main.vue

@@ -15,13 +15,12 @@
           <!--<el-button type="warning" size="small" @click.stop="billingDetails('收费')" :loading="buttonLoading" :disabled="-->
           <!--  (financeDisabled && disabled) || selectionList.length == 0-->
           <!--" v-if="selectTab === 1&&billingShow">生成账单</el-button>-->
-          <el-button type="warning" size="small" @click.stop="billingDetails('申请')" :loading="buttonLoading" :disabled="
-            (financeDisabled && disabled) || selectionList.length == 0
-          " v-if="selectTab === 2&&billingShow">申请付费</el-button>
+          <el-button type="warning" size="small" @click.stop="billingDetails('申请')" :loading="buttonLoading" :disabled="(financeDisabled && disabled) || selectionList.length == 0
+            " v-if="selectTab === 2 && billingShow">申请付费</el-button>
         </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 ? "保存" : "修改"
+            row.$cellEdit ? "保存" : "修改"
           }}</el-button>
           <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="disabled">删 除
           </el-button>
@@ -30,9 +29,9 @@
           <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow" :disabled="disabled" circle>
           </el-button>
         </template>
-        <template slot="corpId" slot-scope="{ row, index }" >
-          <crop-select ref="corp" v-if="row.$cellEdit" v-model="row.corpId" :cropIndex="index"
-            @getCorpData="getCorpData" corpType="KG"></crop-select>
+        <template slot="corpId" slot-scope="{ row, index }">
+          <crop-select ref="corp" v-if="row.$cellEdit" v-model="row.corpId" :cropIndex="index" @getCorpData="getCorpData"
+            corpType="KG"></crop-select>
           <span v-else>{{ row.corpName }}</span>
         </template>
         <template slot="feeName" slot-scope="{ row }">
@@ -72,8 +71,7 @@
         <template slot="currency" slot-scope="{ row }">
           <el-select v-if="row.$cellEdit" v-model="row.currency" filterable allow-create default-first-option
             placeholder="请选择" size="small" @change="currencyChange(row)">
-            <el-option v-for="(item, index) in currencyList" :key="index" :label="item.dictValue"
-              :value="item.dictValue">
+            <el-option v-for="(item, index) in currencyList" :key="index" :label="item.dictValue" :value="item.dictValue">
             </el-option>
           </el-select>
           <span v-else>{{ row.currency }}</span>
@@ -131,7 +129,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, micrometerFormat2, IntegerFormat,decimalFormat2 } 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";
@@ -148,7 +146,7 @@ export default {
   name: "feeInfo",
   data() {
     return {
-      corpIds:'',
+      corpIds: '',
       invoiceOption: {
         border: true,
         align: 'center',
@@ -353,9 +351,11 @@ export default {
         } else {
           this.feeData = this.data_two;
         }
+        this.$forceUpdate();
       }
     },
     activeName(newVla, oldVal) {
+      console.log(newVla, oldVal)
       if (newVla !== oldVal) {
         if (newVla === "first") {
           this.tab1 = true;
@@ -384,7 +384,6 @@ export default {
       rows.forEach(row => {
         this.$refs.feeCrud.rowCellAdd(row)
       })
-
     },
     async allDel(type) {
       this.feeData.forEach(e => {
@@ -400,6 +399,29 @@ export default {
     async tabs2() {
       this.activeName = 'second'
     },
+    async tabs1() {
+      this.activeName = 'first'
+      this.selectTab = 1;
+    },
+    async oceanUSD() {
+      await this.tabs1()
+      let arr = []
+      arr = this.deepClone(this.orderFeesList);
+      arr.forEach(e => {
+        if (e.feesType == 2 && e.currency == 'USD') {
+          delete e.id
+          delete e.pid
+          delete e.createTime
+          delete e.createUser
+          delete e.updateTime
+          delete e.updateUser
+          delete e.tenantId
+          e.feesType = 1
+          this.orderFeesList.push(e)
+        }
+      })
+      this.feeData = this.orderFeesList.filter(item => item.feesType === 1)
+    },
     invoiceShow(row) {
       getfeesDetails({ id: row.id }).then(res => {
         this.invoiceData = res.data.data
@@ -518,11 +540,9 @@ export default {
       });
     },
     getCorpData(row) {
-      console.log(row);
-      console.log(' this.feeData', this.feeData);
-      this.feeData[row.index].corpName = row.cname;
-      this.feeData[row.index].corpId = row.corpId;
-      this.corpIds = row.id
+      console.log(row)
+      this.$set(this.feeData[row.index], 'corpName', row.cname)
+      this.$set(this.feeData[row.index], 'corpId', row.id)
     },
     countChange(row) {
       if (row.price && row.quantity) {
@@ -571,16 +591,17 @@ export default {
     //新增
     rowAdd() {
       // console.log(this.$parent.$data.form.corpId);
-      // console.log(this.corpList.find(item => this.$parent.$data.form.corpId == item.id).cname);
+      console.log(this.corpList.find(item => this.$parent.$data.form.corpId == item.id).cname);
       if (this.inCropId) {
         let corpName = ''
         if (!this.corpId) {
           corpName = this.corpList.find(item => this.$parent.$data.form.corpId == item.id).cname;
-          console.log('1',corpName);
+          this.corpId = this.corpList.find(item => this.$parent.$data.form.corpId == item.id).id
+          // console.log('1',this.corpList.find(item => this.$parent.$data.form.corpId == item.id).id,this.corpId);
         }
         if (this.corpId) {
           corpName = this.corpList.find(item => this.corpId == item.id).cname;
-          console.log('2',corpName);
+          console.log('2', corpName);
 
         }
         const params = {
@@ -588,9 +609,9 @@ export default {
           corpId: this.corpId ? this.corpId : this.$parent.$data.form.corpId,
           // corpId: this.corpId ? this.corpId : '',
           corpName: this.corpId ? corpName : '',
-          quantity:"1.000000",
-          currency:this.$parent.$data.form.currency,
-          exchangeRate:this.$parent.$data.form.exchangeRate
+          quantity: "1.000000",
+          currency: this.$parent.$data.form.currency,
+          exchangeRate: this.$parent.$data.form.exchangeRate
         };
         if (this.typeName === "wood") params.corpId = this.corpId
         this.$refs.feeCrud.rowCellAdd(params);

+ 9 - 0
src/util/calculate.js

@@ -145,6 +145,15 @@ export function grossProfitCal(num, num2, num3, num4) {
   const sum = _.multiply(_.divide(_.subtract(_.multiply(price, exchangeRate), _.add(purchase, fitting)), _.multiply(price, exchangeRate)), 100)
   return sum ? Number(sum).toFixed(2) : '0.00'
 }
+// 单品毛利率: 销售价*汇率 -(采购价格+配件价格)
+export function goodsGrossProfitCal(num, num2, num3, num4) {
+  const purchase = Number(num ? num : 0)
+  const fitting = Number(num2 ? num2 : 0)
+  const price = Number(num3 ? num3 : 0)
+  const exchangeRate = Number(Number(num4) ? num4 : 1)
+  const sum = _.subtract(_.multiply(price, exchangeRate), _.add(purchase, fitting))
+  return sum ? Number(sum).toFixed(2) : '0.00'
+}
 //单票毛利: (金额*汇率+费用应收合计)-(成本*数量+费用应付合计)
 export function STGPCal(num, num2, num3, num4) {
   const amountSum = Number(num ? num : 0)

+ 150 - 20
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -9,21 +9,34 @@
                         :disabled="detailData.status == 1">导入商品</el-button> -->
                     <!-- <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addLibrary"
                         :disabled="detailData.status == 1">出口价格库</el-button> -->
-                    <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印
+                    <el-button type="primary" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印
                     </el-button>
-                    <el-button type="info" size="small" @click.stop="savePurchase" :disabled="detailData.status == 1">
+                    <el-button type="warning" size="small" @click.stop="savePurchase" :disabled="detailData.status == 1">
                         采购询价
                     </el-button>
-                    <el-button type="info" size="small" @click.stop="saveShipping" :disabled="detailData.status == 1">
+                    <el-button type="warning" size="small" @click.stop="saveShipping" :disabled="detailData.status == 1">
                         船务询价
                     </el-button>
-                    <el-button type="info" size="small" @click="cnameData">刷新基础资料</el-button>
-                    <el-button type="info" size="small" @click="calculate(1)" :disabled="detailData.status == 1"
+                    <el-button type="warning" size="small" @click="cnameData">刷新基础资料</el-button>
+                    <el-button type="success" size="small" @click="calculate(1)" :disabled="detailData.status == 1"
                         :loading="calculateLoading">分摊国内费用
                     </el-button>
-                    <el-button type="info" size="small" @click="calculate(2)" :disabled="detailData.status == 1"
-                        :loading="calculateLoading">分摊海运费
+                    <el-button type="success" size="small" @click="calculate(2)" :disabled="detailData.status == 1"
+                        :loading="calculateLoading">分摊海运费到单价
                     </el-button>
+                    <el-button type="success" size="small" @click="oceanUSD" :disabled="detailData.status == 1">海运费单列
+                    </el-button>
+                    <el-popover placement="top" width="160" v-model="visible">
+                        <div style="text-align: center;">
+                            <el-input-number v-model="priceAD" size="small" :controls="false"></el-input-number> %
+                        </div>
+                        <div style="text-align: right; margin: 0">
+                            <el-button size="mini" type="text" @click="visible = false">取消</el-button>
+                            <el-button size="mini" type="text" @click="submitPriceAD">确定</el-button>
+                        </div>
+                        <el-button type="success" size="small" slot="reference"
+                            :disabled="detailData.status == 1">调整出厂价</el-button>
+                    </el-popover>
                 </el-row>
             </template>
             <template slot="headerSerial">
@@ -34,37 +47,37 @@
                 <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('cname')">{{ column.label }}</span>
             </template>
             <template slot="orderQuantity" slot-scope="{row}">
-                {{ row.orderQuantity|decimalFormat2 }}
+                {{ row.orderQuantity | decimalFormat2 }}
             </template>
             <template slot="amount" slot-scope="{row}">
-                {{ row.amount|decimalFormat2 }}
+                {{ row.amount | decimalFormat2 }}
             </template>
             <template slot="partsCost" slot-scope="{row}">
-                {{ row.partsCost|decimalFormat2 }}
+                {{ row.partsCost | decimalFormat2 }}
             </template>
             <template slot="partsPrice" slot-scope="{row}">
-                {{ row.partsPrice|decimalFormat2 }}
+                {{ row.partsPrice | decimalFormat2 }}
             </template>
             <template slot="productPrice" slot-scope="{row}">
-                {{ row.productPrice|decimalFormat2 }}
+                {{ row.productPrice | decimalFormat2 }}
             </template>
             <template slot="outFactoryPrice" slot-scope="{row}">
-                {{ row.outFactoryPrice|decimalFormat2 }}
+                {{ row.outFactoryPrice | decimalFormat2 }}
             </template>
             <template slot="shareAmount" slot-scope="{row}">
-                {{ row.shareAmount|decimalFormat2 }}
+                {{ row.shareAmount | decimalFormat2 }}
             </template>
             <template slot="internationalAmount" slot-scope="{row}">
-                {{ row.internationalAmount|decimalFormat2 }}
+                {{ row.internationalAmount | decimalFormat2 }}
             </template>
             <template slot="price" slot-scope="{row}">
-                {{ row.price|decimalFormat2 }}
+                {{ row.price | decimalFormat2 }}
             </template>
             <template slot="purchaseCost" slot-scope="{row}">
-                {{ row.purchaseCost|decimalFormat2 }}
+                {{ row.purchaseCost | decimalFormat2 }}
             </template>
             <template slot="purchaseAmount" slot-scope="{row}">
-                {{ row.purchaseAmount|decimalFormat2 }}
+                {{ row.purchaseAmount | decimalFormat2 }}
             </template>
             //操作栏
             <template slot="menu" slot-scope="{ row, index }">
@@ -350,9 +363,11 @@ import {
     sellingCal,
     amountCal,
     grossProfitCal,
+    goodsGrossProfitCal,
     costCal,
     addPrice,
-    divide
+    divide,
+    priceaAjustment
 } from "@/util/calculate";
 import { micrometerFormat2, decimalFormat2 } from "@/util/validate";
 import _ from "lodash";
@@ -360,6 +375,8 @@ export default {
     name: "customerInformation",
     data() {
         return {
+            priceAD: 0,
+            visible: false,
             calculateLoading: false,
             switchDialog: false,
             loading: false,
@@ -659,6 +676,7 @@ export default {
                     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.goodsGrossProfit = goodsGrossProfitCal(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;
@@ -755,6 +773,15 @@ export default {
                         ),
                         this.form.exchangeRate
                     ),
+                    goodsGrossProfit: goodsGrossProfitCal(
+                        e.purchaseAmount,
+                        0,
+                        sellingCal(
+                            productCal(e.purchaseAmount, 0, this.form.coefficient),
+                            this.form.exchangeRate
+                        ),
+                        this.form.exchangeRate
+                    ),
                     partsDescribe: null,
                     remarks: null,
                     exchangeRate: this.form.exchangeRate,
@@ -803,6 +830,9 @@ export default {
             if (!this.form.id) {
                 return this.$message.error("此单据没有提交记录,请先提交");
             }
+            if (!this.form.documenterId) {
+                return this.$message.error("船务员必填");
+            }
             this.$confirm("是否生成船务询价单?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
@@ -830,6 +860,15 @@ export default {
                 }
             });
         },
+        oceanUSD() {
+            this.$confirm('是否将应付的海运费(USD)复制到应收?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.$emit('oceanUSD')
+            })
+        },
         calculate(val) {
             this.form.totalValue = 0
             this.data.forEach((e, index) => {
@@ -840,7 +879,6 @@ export default {
                 let numSum = 0
                 this.orderFeesList.forEach(e => {
                     if (e.feesType == 2 && e.currency == "CNY") {
-                        console.log(sum, e.amount)
                         numSum = sum(numSum, e.amount)
                     }
                 })
@@ -867,6 +905,19 @@ export default {
                             e.outFactoryPrice,
                             this.form.exchangeRate
                         );
+                        e.goodsGrossProfit = goodsGrossProfitCal(
+                            e.purchaseAmount,
+                            e.partsPrice,
+                            e.outFactoryPrice,
+                            this.form.exchangeRate
+                        );
+                        // 处理单品毛利率是 -00.00 的问题
+                        if (Number(e.itemMargin) === 0) {
+                            e.itemMargin = Number(e.itemMargin) + ''
+                        }
+                        if (Number(e.goodsGrossProfit) == 0) {
+                            e.goodsGrossProfit = Number(e.goodsGrossProfit)
+                        }
                     })
                 })
 
@@ -900,6 +951,19 @@ export default {
                             e.outFactoryPrice,
                             this.form.exchangeRate
                         );
+                        e.goodsGrossProfit = goodsGrossProfitCal(
+                            e.purchaseAmount,
+                            e.partsPrice,
+                            e.outFactoryPrice,
+                            this.form.exchangeRate
+                        );
+                        // 处理单品毛利率是 -00.00 的问题
+                        if (Number(e.itemMargin) === 0) {
+                            e.itemMargin = Number(e.itemMargin) + ''
+                        }
+                        if (Number(e.goodsGrossProfit) == 0) {
+                            e.goodsGrossProfit = Number(e.goodsGrossProfit)
+                        }
                     })
                 })
             }
@@ -944,6 +1008,45 @@ export default {
         moveDown(row, index) {
             this.data[index] = this.data.splice(index + 1, 1, row)[0]
         },
+        submitPriceAD() {
+            this.visible = false;
+            this.data.forEach(e => {
+                e.outFactoryPrice = priceaAjustment(e.outFactoryPrice, this.priceAD)
+                e.totalValue = multiply(e.outFactoryPrice, e.orderQuantity)
+                e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount)
+                e.amount = amountCal(
+                    addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount),
+                    e.orderQuantity,
+                    e.freight,
+                    e.insurance,
+                    e.discount
+                );
+                e.itemMargin = grossProfitCal(
+                    e.purchaseAmount,
+                    e.partsPrice,
+                    e.outFactoryPrice,
+                    this.form.exchangeRate
+                );
+                e.goodsGrossProfit = goodsGrossProfitCal(
+                    e.purchaseAmount,
+                    e.partsPrice,
+                    e.outFactoryPrice,
+                    this.form.exchangeRate
+                );
+                // 处理单品毛利率是 -00.00 的问题
+                if (Number(e.itemMargin) === 0) {
+                    e.itemMargin = Number(e.itemMargin) + ''
+                }
+                if (Number(e.goodsGrossProfit) == 0) {
+                    e.goodsGrossProfit = Number(e.goodsGrossProfit)
+                }
+                // 出厂价格为零,单品毛利润为零
+                if (e.outFactoryPrice == 0) {
+                    e.itemMargin = 0
+                }
+            })
+            this.priceAD = 0
+        },
         purchaseAmountChange(row) {
             row.productPrice = productCal(
                 row.purchaseAmount,
@@ -969,6 +1072,15 @@ export default {
                 row.outFactoryPrice,
                 this.form.exchangeRate
             );
+            row.goodsGrossProfit = goodsGrossProfitCal(
+                row.purchaseAmount,
+                row.partsPrice,
+                row.outFactoryPrice,
+                this.form.exchangeRate
+            );
+            if (Number(row.goodsGrossProfit) == 0) {
+                row.goodsGrossProfit = Number(row.goodsGrossProfit)
+            }
         },
         priceChange(row) {
             row.price = addPrice(row.outFactoryPrice, row.shareAmount, row.internationalAmount)
@@ -985,6 +1097,15 @@ export default {
                 row.outFactoryPrice,
                 this.form.exchangeRate
             );
+            row.goodsGrossProfit = goodsGrossProfitCal(
+                row.purchaseAmount,
+                row.partsPrice,
+                row.outFactoryPrice,
+                this.form.exchangeRate
+            );
+            if (Number(row.goodsGrossProfit) == 0) {
+                row.goodsGrossProfit = Number(row.goodsGrossProfit)
+            }
         },
         itemTypeFocus(row) {
             this.itemtypeList = [];
@@ -1173,6 +1294,15 @@ export default {
                 this.goodsForm.outFactoryPrice,
                 this.form.exchangeRate
             );
+            this.goodsForm.goodsGrossProfit = goodsGrossProfitCal(
+                this.goodsForm.purchaseAmount,
+                this.goodsForm.partsPrice,
+                this.goodsForm.outFactoryPrice,
+                this.form.exchangeRate
+            );
+            if (Number(this.goodsForm.goodsGrossProfit) == 0) {
+                this.goodsForm.goodsGrossProfit = Number(this.goodsForm.goodsGrossProfit)
+            }
             const names = [this.goodsForm.partsModeName, this.goodsForm.partsHandleName, this.goodsForm.partsCapName, this.goodsForm.partsValveName, this.goodsForm.partsColourName, this.goodsForm.partsAuthenticationName, this.goodsForm.partsOtherName];
             const name = []
             names.forEach(e => {

+ 19 - 10
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -14,9 +14,9 @@
     "indexSlot": true,
     "dialogDrag": true,
     "summaryText": "合计",
-    "dialogWidth":"80%",
-    "dialogTop":"25",
-    "column":[
+    "dialogWidth": "80%",
+    "dialogTop": "25",
+    "column": [
         {
             "label": "产品名称",
             "prop": "cname",
@@ -253,6 +253,15 @@
             "overHidden": true
         },
         {
+            "label": "单品毛利",
+            "prop": "goodsGrossProfit",
+            "index": 26.1,
+            "width": 100,
+            "span": 6,
+            "align": "right",
+            "overHidden": true
+        },
+        {
             "label": "产品型号",
             "prop": "itemType",
             "index": 27,
@@ -268,7 +277,7 @@
             "align": "right",
             "span": 6,
             "hide": true,
-            "showColumn":false,
+            "showColumn": false,
             "disabled": true,
             "display": false,
             "overHidden": true
@@ -281,7 +290,7 @@
             "align": "right",
             "span": 6,
             "hide": true,
-            "showColumn":false,
+            "showColumn": false,
             "disabled": true,
             "display": false,
             "overHidden": true
@@ -294,7 +303,7 @@
             "align": "right",
             "span": 6,
             "hide": true,
-            "showColumn":false,
+            "showColumn": false,
             "disabled": true,
             "display": false,
             "overHidden": true
@@ -307,7 +316,7 @@
             "align": "right",
             "span": 6,
             "hide": true,
-            "showColumn":false,
+            "showColumn": false,
             "disabled": true,
             "overHidden": true
         },
@@ -327,7 +336,7 @@
             "width": 200,
             "span": 6,
             "hide": true,
-            "showColumn":false,
+            "showColumn": false,
             "disabled": true,
             "display": false,
             "overHidden": true
@@ -356,7 +365,7 @@
             "align": "right",
             "span": 6,
             "hide": true,
-            "showColumn":false,
+            "showColumn": false,
             "display": false,
             "disabled": true,
             "overHidden": true
@@ -400,4 +409,4 @@
             "span": 12
         }
     ]
-}
+}

+ 82 - 33
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -7,8 +7,7 @@
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut">
-        <el-button type="primary" size="small" class="el-button--small-yh "
-                   @click.stop="refresh">刷新数据
+        <el-button type="primary" size="small" class="el-button--small-yh " @click.stop="refresh">刷新数据
         </el-button>
         <el-button type="primary" size="small" v-if="detailData.status == 1" class="el-button--small-yh "
           @click.stop="openEdit">编辑
@@ -79,8 +78,8 @@
             </el-select>
           </template>
           <template slot="businesDate">
-            <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd"
-              value-format="yyyy-MM-dd 00:00:00" :disabled="detailData.status == 1" @change="businesDateChange">
+            <el-date-picker v-model="form.businesDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
+              :disabled="detailData.status == 1" @change="businesDateChange">
             </el-date-picker>
           </template>
           <template slot="currency">
@@ -130,7 +129,7 @@
         </avue-form>
       </trade-card>
       <goods-info ref="goodsInfo" :form="form" :data="data" :orderFeesList.sync="orderFeesList" :detailData="detailData"
-        @formGoodstoFees="formGoodstoFees"></goods-info>
+        @formGoodstoFees="formGoodstoFees" @oceanUSD="oceanUSD"></goods-info>
       <!-- <trade-card title="商品信息">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel" :summary-method="summaryMethod"
           @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle" @row-dblclick="handleRowDBLClick">
@@ -302,18 +301,18 @@
           </template>
         </avue-crud>
       </trade-card> -->
-      <fee-info ref="feeInfo" :tabShow="1"  :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
+      <fee-info ref="feeInfo" :tabShow="1" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
         feeUrl="/blade-purchase-sales/orderfees/update" optionType="CK" itemType="报价" @beforeFinance="beforeFinance"
-        :inCropId="true" />
+        :inCropId="true" @oceanUSD="oceanUSD"/>
       <containerTitle title="合同附件">
 
       </containerTitle>
       <c-upload typeUpload="CK" :data="orderFilesList" :disabled="detailData.status == 1" :enumerationValue="76"
-        deleteUrl="/blade-purchase-sales/orderfiles/update" display/>
+        deleteUrl="/blade-purchase-sales/orderfiles/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>
+      :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">
@@ -381,7 +380,7 @@ import {
   IntegerFormat
 } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
-import {dateFormat, NdayDate} from "@/util/date";
+import { dateFormat, NdayDate } from "@/util/date";
 import {
   productCal,
   sellingCal,
@@ -411,21 +410,23 @@ export default {
       switchDialog: false,
       form: {
         orderStatus: "录入",
-        ifShipping:"录入",
+        ifShipping: "录入",
         cargoType: "普货",
         businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
         currency: "USD",
-          dateValidity:NdayDate(7) + " 00:00:00", // 有效日期 当天+7天
-          portOfLoad:'QINGDAO, CHINA', // 起运港
-          dateClause:'30 DAYS', // 日期条款
-          priceTerms:'FOB', // 价格条款
-          paymentType:'预付50%,尾款发货前付清', // 收款方式
-          boxPile: '20GP', // 箱型
-          transport:'BY SEA', // 运输方式
-          boxNumber:1, // 箱量
-          priceTermsDescription:'QINGDAO, CHINA' , // 条款说明
-          dateDesc:'ABOUT 30 DAYS AFTER DEPOSIT ARRIVE.', // 日期说明
-          paymentTypeDescription:'T/T 50% AS DEPOSIT, BALANCE BEFORE SHIPMENT.', // 收款说明
+        dateValidity: NdayDate(7) + " 00:00:00", // 有效日期 当天+7天
+        portOfLoad: 'QINGDAO, CHINA', // 起运港
+        dateClause: '30 DAYS', // 日期条款
+        priceTerms: 'FOB', // 价格条款
+        paymentType: '预付50%,尾款发货前付清', // 收款方式
+        boxPile: '20GP', // 箱型
+        transport: 'BY SEA', // 运输方式
+        boxNumber: 1, // 箱量
+        buyerId: '1705056126778851330', // 采购员 王亚文
+        documenterId: '1597944227923324930', // 跟单员 张雪梅
+        priceTermsDescription: 'QINGDAO, CHINA', // 条款说明
+        dateDesc: 'ABOUT 30 DAYS AFTER DEPOSIT ARRIVE.', // 日期说明
+        paymentTypeDescription: 'T/T 50% AS DEPOSIT, BALANCE BEFORE SHIPMENT.', // 收款说明
       },
       disabled: false,
       dialogVisible: false,
@@ -509,7 +510,6 @@ export default {
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd 00:00:00",
             offset: 2,
-            row: true,
             rules: [
               {
                 required: true,
@@ -519,6 +519,28 @@ export default {
             ]
           },
           {
+          label: "采购员",
+          prop: "buyerId",
+          span: 6,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
+          props: {
+            label: "realName",
+            value: "id",
+            res: 'data.records'
+          },
+          rules: [
+            {
+              required: true,
+              message: "",
+              trigger: "blur"
+            }
+          ]
+        },
+          {
             label: "起运港",
             prop: "portOfLoad",
             span: 6,
@@ -573,7 +595,28 @@ export default {
                 trigger: "blur"
               }
             ],
-            row: true
+          },
+          {
+            label: "船务员",
+            prop: "documenterId",
+            span: 6,
+            overHidden: true,
+            filterable: true,
+            remote: true,
+            type: "select",
+            dicUrl: "/api/blade-user/page?size=20&current=1&realName={{key}}",
+            props: {
+              label: "realName",
+              value: "id",
+              res: 'data.records'
+            },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "日期条款",
@@ -872,7 +915,7 @@ export default {
       orderFilesList: [],
       oldform: {
         orderStatus: "录入",
-        ifShipping:"录入",
+        ifShipping: "录入",
         cargoType: "普货",
         businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
         currency: "USD"
@@ -1004,6 +1047,9 @@ export default {
     formGoodstoFees(rows, type) {
       this.$refs.feeInfo.imporData(rows, type)
     },
+    oceanUSD(){
+      console.log(1111)
+    },
     khEdit(staus) {
       if (staus == 'KH') {
         if (this.form.corpId) {
@@ -1840,6 +1886,9 @@ export default {
       }
       this.data.push({ $cellEdit: true });
     },
+    oceanUSD(){
+      this.$refs.feeInfo.oceanUSD()
+    },
     getDetail(id) {
       this.loading = true;
       this.showBut = false;
@@ -2069,13 +2118,13 @@ export default {
         (this.form.clientAttn ? this.form.clientAttn + ";" : "") +
         (this.form.clientAddress ? this.form.clientAddress + ";" : "");
     },
-    refresh(){
+    refresh() {
       let orderFeesList = this.$refs.feeInfo.submitData();
       if (
-          contrastObj(this.form, this.oldform) ||
-          contrastList(this.data, this.olddata) ||
-          contrastList(orderFeesList, this.oldorderFeesList) ||
-          contrastList(this.orderFilesList, this.oldorderFilesList)
+        contrastObj(this.form, this.oldform) ||
+        contrastList(this.data, this.olddata) ||
+        contrastList(orderFeesList, this.oldorderFeesList) ||
+        contrastList(this.orderFilesList, this.oldorderFilesList)
       ) {
         this.$confirm("数据发生变化未有保存记录, 是否保存?", "提示", {
           confirmButtonText: "确定",
@@ -2087,9 +2136,9 @@ export default {
           this.getDetail(this.form.id)
         });
       } else {
-        if (!this.form.id){
+        if (!this.form.id) {
           this.$message.error('请保存再刷新')
-        }else {
+        } else {
           this.getDetail(this.form.id)
         }
       }

+ 31 - 4
src/views/exportTrade/customerInquiry/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div>
     <basic-container v-show="show" class="page-crad">
+      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+        <el-tab-pane label="处理中" name="second" />
+        <!-- <el-tab-pane label="待确认" name="fifth" /> -->
+        <el-tab-pane label="已完成" name="first" />
+        <el-tab-pane label="已取消" name="third" />
+        <el-tab-pane label="全部" name="fourth" />
+      </el-tabs>
       <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"
@@ -10,13 +17,13 @@
           <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>
+              <span>{{ row.orderQuantity | decimalFormat2 }}</span>
             </template>
             <template slot-scope="{ row }" slot="price">
-              <span>{{ row.price | decimalFormat2  }}</span>
+              <span>{{ row.price | decimalFormat2 }}</span>
             </template>
             <template slot-scope="{ row }" slot="amount">
-              <span>{{ row.amount | decimalFormat2  }}</span>
+              <span>{{ row.amount | decimalFormat2 }}</span>
             </template>
           </avue-crud>
         </template>
@@ -104,6 +111,8 @@ export default {
   name: "customerInformation",
   data() {
     return {
+      activeName: 'second',
+      tabType: 1,
       search: {
         businesDate: defaultDate()
       },
@@ -197,7 +206,7 @@ export default {
     gainUser().then(res => {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
-    this.option.height = window.innerHeight - 210;
+    this.option.height = window.innerHeight - 260;
   },
   filters: {
     IntegerFormat(num) {
@@ -218,6 +227,20 @@ export default {
     }
   },
   methods: {
+    handleClick(tab, event) {
+      if (this.activeName == 'first') {
+        this.tabType = 1
+      } else if (this.activeName == 'second') {
+        this.tabType = 2
+      } else if (this.activeName == 'third') {
+        this.tabType = 3
+      } else if (this.activeName == 'fourth') {
+        this.tabType = ''
+      } else if (this.activeName == 'fifth') {
+        this.tabType = 4
+      }
+      this.onLoad(this.page, this.search);
+    },
     searchCriteriaSwitch(type) {
       if (type) {
         this.option.height = this.option.height - 191;
@@ -340,6 +363,10 @@ export default {
       delete data.businesDate;
       delete data.dateValidity;
       delete data.createTime;
+      params = {
+        ...params,
+        tabType: this.tabType
+      }
       this.loading = true;
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);

+ 94 - 10
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -16,7 +16,9 @@
             :loading="calculateLoading">分摊国内费用
           </el-button>
           <el-button type="success" size="small" @click="calculate(2)" :disabled="detailData.status == 1"
-            :loading="calculateLoading">分摊海运费
+            :loading="calculateLoading">分摊海运费到单价
+          </el-button>
+          <el-button type="success" size="small" @click="oceanUSD" :disabled="detailData.status == 1">海运费单列
           </el-button>
           <el-button :type="form.fudaPurchaseStatus ? 'success' : 'warning'" size="small" :disabled="!form.id"
             @click.native="dialog = true; fudaSatus = 1">通知采购</el-button>
@@ -24,13 +26,13 @@
             @click.native="dialog = true; fudaSatus = 2">通知跟单</el-button>
           <el-popover placement="top" width="160" v-model="visible">
             <div style="text-align: center;">
-              <el-input-number v-model="priceAD" size="small" controls-position="right"></el-input-number>
+              <el-input-number v-model="priceAD" size="small" :controls="false"></el-input-number> %
             </div>
             <div style="text-align: right; margin: 0">
               <el-button size="mini" type="text" @click="visible = false">取消</el-button>
               <el-button size="mini" type="text" @click="submitPriceAD">确定</el-button>
             </div>
-            <el-button type="info" size="small" slot="reference"  :disabled="detailData.status == 1">调整出厂价</el-button>
+            <el-button type="success" size="small" slot="reference" :disabled="detailData.status == 1">调整出厂价</el-button>
           </el-popover>
           <!--          <el-button type="primary" size="small" :disabled="form.status > 0 || (!form.status && form.status !== 0)" @click.native="pleaseCheck">请核数据</el-button>-->
         </el-row>
@@ -363,7 +365,8 @@ import {
   costCal,
   addPrice,
   divide,
-  priceaAjustment
+  priceaAjustment,
+  goodsGrossProfitCal
 } from "@/util/calculate";
 import _ from "lodash";
 import { getPricebankAll } from "@/api/basicData/customerInquiry";
@@ -692,16 +695,21 @@ export default {
           row.unit = e.unit;
           row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this
             .form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
-          // 处理单品毛利率是 -00.00 的问题
-          if (Number(row.itemMargin) === 0) {
-            row.itemMargin = Number(row.itemMargin) + ''
-          }
+          row.goodsGrossProfit = goodsGrossProfitCal(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
+          // 处理单品毛利率是 -00.00 的问题
+          if (Number(row.itemMargin) === 0) {
+            row.itemMargin = Number(row.itemMargin) + ''
+          }
+          if (Number(row.goodsGrossProfit) == 0) {
+            row.goodsGrossProfit = Number(row.goodsGrossProfit)
+          }
         }
       })
     },
@@ -796,6 +804,15 @@ export default {
             ),
             this.form.exchangeRate
           ),
+          goodsGrossProfit: goodsGrossProfitCal(
+            e.purchaseAmount,
+            0,
+            sellingCal(
+              productCal(e.purchaseAmount, 0, this.form.coefficient),
+              this.form.exchangeRate
+            ),
+            this.form.exchangeRate
+          ),
           partsDescribe: null,
           remarks: null,
           exchangeRate: this.form.exchangeRate,
@@ -946,6 +963,15 @@ export default {
               e.outFactoryPrice,
               this.form.exchangeRate
             );
+            e.goodsGrossProfit = goodsGrossProfitCal(
+              e.purchaseAmount,
+              e.partsPrice,
+              e.outFactoryPrice,
+              this.form.exchangeRate
+            );
+            if (Number(e.goodsGrossProfit) == 0) {
+              e.goodsGrossProfit = Number(e.goodsGrossProfit)
+            }
           })
         })
 
@@ -980,10 +1006,28 @@ export default {
               e.outFactoryPrice,
               this.form.exchangeRate
             );
+            e.goodsGrossProfit = goodsGrossProfitCal(
+              e.purchaseAmount,
+              e.partsPrice,
+              e.outFactoryPrice,
+              this.form.exchangeRate
+            );
+            if (Number(e.goodsGrossProfit) == 0) {
+              e.goodsGrossProfit = Number(e.goodsGrossProfit)
+            }
           })
         })
       }
     },
+    oceanUSD() {
+      this.$confirm('是否将应付的海运费(USD)复制到应收?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$emit('oceanUSD')
+      })
+    },
     khEdit(status) {
       if (status == 'cname') {
         this.$router.push({
@@ -1043,16 +1087,25 @@ export default {
           e.outFactoryPrice,
           this.form.exchangeRate
         );
+        e.goodsGrossProfit = goodsGrossProfitCal(
+          e.purchaseAmount,
+          e.partsPrice,
+          e.outFactoryPrice,
+          this.form.exchangeRate
+        );
         // 处理单品毛利率是 -00.00 的问题
         if (Number(e.itemMargin) === 0) {
           e.itemMargin = Number(e.itemMargin) + ''
         }
+        if (Number(e.goodsGrossProfit) == 0) {
+          e.goodsGrossProfit = Number(e.goodsGrossProfit)
+        }
         // 出厂价格为零,单品毛利润为零
         if (e.outFactoryPrice == 0) {
           e.itemMargin = 0
         }
       })
-      this.priceAD=0
+      this.priceAD = 0
     },
     purchaseAmountChange(row) {
       row.productPrice = productCal(
@@ -1080,6 +1133,15 @@ export default {
         row.outFactoryPrice,
         this.form.exchangeRate
       );
+      row.goodsGrossProfit = goodsGrossProfitCal(
+        row.purchaseAmount,
+        row.partsPrice,
+        row.outFactoryPrice,
+        this.form.exchangeRate
+      );
+      if (Number(row.goodsGrossProfit) == 0) {
+        row.goodsGrossProfit = Number(row.goodsGrossProfit)
+      }
     },
     outFactoryPriceInput(row) {
       console.log(row, 1005)
@@ -1106,13 +1168,23 @@ export default {
         row.outFactoryPrice,
         this.form.exchangeRate
       );
+      row.goodsGrossProfit = goodsGrossProfitCal(
+        row.purchaseAmount,
+        row.partsPrice,
+        row.outFactoryPrice,
+        this.form.exchangeRate
+      );
       // 处理单品毛利率是 -00.00 的问题
       if (Number(row.itemMargin) === 0) {
         row.itemMargin = Number(row.itemMargin) + ''
       }
+      if (Number(row.goodsGrossProfit) == 0) {
+        row.goodsGrossProfit = Number(row.goodsGrossProfit)
+      }
       // 出厂价格为零,单品毛利润为零
       if (row.outFactoryPrice == 0) {
         row.itemMargin = 0
+        row.goodsGrossProfit = 0
       }
 
     },
@@ -1307,6 +1379,15 @@ export default {
         this.goodsForm.outFactoryPrice,
         this.form.exchangeRate
       );
+      this.goodsForm.goodsGrossProfit = goodsGrossProfitCal(
+        this.goodsForm.purchaseAmount,
+        this.goodsForm.partsPrice,
+        this.goodsForm.outFactoryPrice,
+        this.form.exchangeRate
+      );
+      if (Number(this.goodsForm.goodsGrossProfit) == 0) {
+        this.goodsForm.goodsGrossProfit = Number(this.goodsForm.goodsGrossProfit)
+      }
       const names = [this.goodsForm.partsModeName, this.goodsForm.partsHandleName, this.goodsForm.partsCapName, this.goodsForm.partsValveName, this.goodsForm.partsColourName, this.goodsForm.partsAuthenticationName, this.goodsForm.partsOtherName];
       const name = []
       names.forEach(e => {
@@ -1401,7 +1482,7 @@ export default {
       if (columns.length > 0) {
         columns.forEach((column, index) => {
           let prop = column.property
-          if (['orderQuantity', 'amount', 'partsCost', 'partsPrice', 'productPrice', 'actualQuantity'].includes(prop)) {
+          if (['orderQuantity', 'amount', 'partsCost', 'partsPrice', 'productPrice', 'actualQuantity','goodsGrossProfit'].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;
@@ -1424,6 +1505,9 @@ export default {
             if (prop == 'actualQuantity') {
               sums[index] = micrometerFormat2(all)
             }
+            if (prop == 'goodsGrossProfit') {
+              sums[index] = micrometerFormat2(all)
+            }
           }
         });
       }

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

@@ -254,6 +254,15 @@
       "overHidden": true
     },
     {
+      "label": "单品毛利",
+      "prop": "goodsGrossProfit",
+      "index": 25,
+      "width": 100,
+      "span": 6,
+      "align": "right",
+      "overHidden": true
+    },
+    {
       "label": "产品型号",
       "prop": "itemType",
       "index": 26,

+ 4 - 1
src/views/exportTrade/salesContract/detailsPage.vue

@@ -233,7 +233,7 @@
         </avue-form>
       </trade-card>
       <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData" :orderFeesList.sync="orderFeesList"
-        @formGoodstoFees="formGoodstoFees" @backToList="getDetail"></goods-info>
+        @formGoodstoFees="formGoodstoFees" @backToList="getDetail" @oceanUSD="oceanUSD"></goods-info>
       <!--  <trade-card title="商品信息">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel"
           @selection-change="goodsSelectionChange" @saveColumn="saveColumn" @resetColumn="resetColumn"
@@ -2259,6 +2259,9 @@ export default {
       }
       this.dialogVisible = !this.dialogVisible;
     },
+    oceanUSD(){
+      this.$refs.feeInfo.oceanUSD()
+    },
     getDetail(id) {
       this.showBut = false;
       this.pageLoading = true;

+ 7 - 4
src/views/exportTrade/salesContract/index.vue

@@ -2,8 +2,9 @@
     <div>
         <basic-container v-show="show" class="page-crad">
             <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-                <el-tab-pane label="已完成" name="first" />
                 <el-tab-pane label="处理中" name="second" />
+                <el-tab-pane label="待确认" name="fifth" />
+                <el-tab-pane label="已完成" name="first" />
                 <el-tab-pane label="已取消" name="third" />
                 <el-tab-pane label="全部" name="fourth" />
             </el-tabs>
@@ -131,7 +132,7 @@ export default {
         return {
             dialogVisible: false,
             purchaseStatusList: [],
-            activeName: 'first',
+            activeName: 'second',
             tabType: 1,
             search: {
                 // businesDate: defaultDate()
@@ -267,8 +268,10 @@ export default {
             } else if (this.activeName == 'third') {
                 this.tabType = 3
             } else if (this.activeName == 'fourth') {
+                this.tabType = ''
+            }else if (this.activeName == 'fifth') {
                 this.tabType = 4
-            }
+            } 
             this.onLoad(this.page, this.search);
         },
         searchCriteriaSwitch(type) {
@@ -390,7 +393,7 @@ export default {
                 this.dataList = res.data.data.records ? res.data.data.records : [];
                 this.page.total = res.data.data.total;
                 if (this.page.total) {
-                    this.option.height = window.innerHeight - 310;
+                    this.option.height = window.innerHeight - 260;
                 }
             }).finally(() => {
                 this.loading = false;

+ 60 - 27
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -7,8 +7,7 @@
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut">
-        <el-button type="primary" size="small" class="el-button--small-yh "
-          @click.stop="refresh">刷新数据
+        <el-button type="primary" size="small" class="el-button--small-yh " @click.stop="refresh">刷新数据
         </el-button>
         <el-button type="primary" size="small" v-if="detailData.status == 1" class="el-button--small-yh "
           @click.stop="openEdit" :disabled="form.ifShipping == '船务确认'">编辑
@@ -61,8 +60,8 @@
         <avue-crud ref="freightCrud" :data="freightData" :option="freightOption" @row-del="rowDel"
           @saveColumn="saveFreightColumn" :cell-style="cellStyle">
           <template slot="shippingHouse" slot-scope="{ row, index }">
-            <crop-select v-show="row.$cellEdit" v-model="row.shippingHouse" :cropIndex="index"
-              @getCorpData="rowCorpData" corpType="GYS"></crop-select>
+            <crop-select v-show="row.$cellEdit" v-model="row.shippingHouse" :cropIndex="index" @getCorpData="rowCorpData"
+              corpType="GYS"></crop-select>
             <span v-show="!row.$cellEdit">{{ row.shippingHouseName }}</span>
           </template>
           <template slot="priorityReferrer" slot-scope="{ row }">
@@ -76,7 +75,7 @@
           </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 ? "保存" : "修改"
+              row.$cellEdit ? "保存" : "修改"
             }}</el-button>
             <el-button size="small" icon="el-icon-edit" type="text" @click="rowDel(row)"
               :disabled="detailData.status == 1">删 除</el-button>
@@ -89,8 +88,8 @@
       </trade-card>
     </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>
+      :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">
@@ -560,6 +559,23 @@ export default {
         if (valid) {
           if (status == "submit") {
             let orderFeesList = this.$refs.feeInfo.submitData();
+            for (let i = 0; i < orderFeesList.length; i++) {
+              // if (orderFeesList[i].corpId == null) {
+              //   return this.$message.error(`请输入第${i + 1}行的结算中心`);
+              // }
+              if (orderFeesList[i].price == 0) {
+                return this.$message.error(`请正确输入第${i + 1}行的销售价`);
+              }
+              if (orderFeesList[i].orderQuantity == 0) {
+                return this.$message.error(`请正确输入第${i + 1}行的数量`);
+              }
+              if (!orderFeesList[i].currency) {
+                return this.$message.error(`请正确选择第${i + 1}行的币别`);
+              }
+              if (!orderFeesList[i].exchangeRate) {
+                return this.$message.error(`请正确输入第${i + 1}行的汇率`);
+              }
+            }
             this.subLoading = true;
             submit({
               ...this.form,
@@ -584,7 +600,7 @@ export default {
                     ? res.data.data.orderFreightList
                     : []
                 );
-                this.orderFeesList = this.deepClone(res.data.data.orderFeesList?res.data.data.orderFeesList:[])
+                this.orderFeesList = this.deepClone(res.data.data.orderFeesList ? res.data.data.orderFeesList : [])
                 // this.getDetail(res.data.data.id)
                 if (status2 == "goBack") {
                   if (this.form.id) {
@@ -605,6 +621,23 @@ export default {
           }
           if (status == "fix") {
             let orderFeesList = this.$refs.feeInfo.submitData();
+            for (let i = 0; i < orderFeesList.length; i++) {
+              // if (orderFeesList[i].corpId == null) {
+              //   return this.$message.error(`请输入第${i + 1}行的结算中心`);
+              // }
+              if (orderFeesList[i].price == 0) {
+                return this.$message.error(`请正确输入第${i + 1}行的销售价`);
+              }
+              if (orderFeesList[i].orderQuantity == 0) {
+                return this.$message.error(`请正确输入第${i + 1}行的数量`);
+              }
+              if (!orderFeesList[i].currency) {
+                return this.$message.error(`请正确选择第${i + 1}行的币别`);
+              }
+              if (!orderFeesList[i].exchangeRate) {
+                return this.$message.error(`请正确输入第${i + 1}行的汇率`);
+              }
+            }
             commit({
               ...this.form,
               orderFreightList: this.freightData,
@@ -643,11 +676,11 @@ export default {
         }
       });
     },
-    refresh(){
+    refresh() {
       if (
-          contrastObj(this.form, this.oldform) ||
-          contrastList(this.data, this.olddata) ||
-          contrastList(this.freightData, this.oldfreightData)
+        contrastObj(this.form, this.oldform) ||
+        contrastList(this.data, this.olddata) ||
+        contrastList(this.freightData, this.oldfreightData)
       ) {
         this.$confirm("数据发生变化未有保存记录, 是否保存?", "提示", {
           confirmButtonText: "确定",
@@ -659,9 +692,9 @@ export default {
           this.getDetail(this.form.id)
         });
       } else {
-        if (!this.form.id){
+        if (!this.form.id) {
           this.$message.error('请保存再刷新')
-        }else {
+        } else {
           this.getDetail(this.form.id)
         }
       }
@@ -678,19 +711,19 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-            this.editCustomer("submit", "goBack");
-          }).catch(() => {
-            if (this.form.id) {
-              this.unLock({
-                moduleName: "cw",
-                tableName: "business_order",
-                billId: this.form.id,
-                billNo: this.form.orgOrderNo
-              });
-            }
-            this.$emit("goBack");
-            this.leaveDetailsKey(this.$route.name);
-          });
+          this.editCustomer("submit", "goBack");
+        }).catch(() => {
+          if (this.form.id) {
+            this.unLock({
+              moduleName: "cw",
+              tableName: "business_order",
+              billId: this.form.id,
+              billNo: this.form.orgOrderNo
+            });
+          }
+          this.$emit("goBack");
+          this.leaveDetailsKey(this.$route.name);
+        });
       } else {
         if (this.form.id) {
           this.unLock({

+ 19 - 4
src/views/iosBasicData/AirtransportExport/bills/index.vue

@@ -374,17 +374,28 @@
               <temolate slot="billStatus" slot-scope="{row}">
                   <span v-if="row.billStatus == item.dictKey"
                         v-for="(item,index) in billStatusData" :key="index"
-                        :style="{'color':item.colour}" >
+                        :style="{ 'background-color': item.colour }"
+                        style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
                       {{item.dictValue}}
                   </span>
               </temolate>
               <template slot="accountStatus" slot-scope="{ row }">
                   <span v-if="row.accountStatus == item.dictKey"
                         v-for="(item,index) in accountStatusData" :key="index"
-                        :style="{'color':item.colour}" >
+                        :style="{ 'background-color': item.colour }"
+                        style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
                       {{item.dictValue}}
                   </span>
               </template>
+              <template slot="status" slot-scope="{ row }">
+                    <div>
+                        <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
+                </template>
               <template slot="corpCnName" slot-scope="scope">
                     <span
                         style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
@@ -568,6 +579,7 @@ import { getDeptTree } from "@/api/system/dept";
               total: 0
         },
         selectionList: [],
+        auditStatusList: [],
         // 弹窗的选择数据
         dialogRadio:null,
         option:{},
@@ -598,6 +610,7 @@ import { getDeptTree } from "@/api/system/dept";
               delBtn:false,
               editBtn:false,
               menuWidth:'auto',
+              align: 'center',
               column: [
                   {
                       label: "单据类型",
@@ -1187,7 +1200,7 @@ import { getDeptTree } from "@/api/system/dept";
                           label: "dictValue",
                           value: "dictKey"
                       },
-                      width: "100",
+                      width: "120",
                       overHidden:true,
                   },
                   {
@@ -1199,7 +1212,7 @@ import { getDeptTree } from "@/api/system/dept";
                           label: "dictValue",
                           value: "dictKey"
                       },
-                      width: "180",
+                      width: "120",
                       overHidden:true,
                   },
                   {
@@ -1211,6 +1224,7 @@ import { getDeptTree } from "@/api/system/dept";
                           label: "dictValue",
                           value: "dictKey"
                       },
+                      width: "120",
                       overHidden:true,
                   },
                   {
@@ -1501,6 +1515,7 @@ import { getDeptTree } from "@/api/system/dept";
           statusWorkDictsfun(){
               getWorkDicts('audit_status_los').then(res=>{
                   this.findObject(this.option.column, "status").dicData = res.data.data;
+                  this.auditStatusList = res.data.data;
               })
           },
         // 添加到主单

+ 19 - 4
src/views/iosBasicData/AirtransportImport/bills/index.vue

@@ -374,17 +374,28 @@
               <temolate slot="billStatus" slot-scope="{row}">
                   <span v-if="row.billStatus == item.dictKey"
                         v-for="(item,index) in billStatusData" :key="index"
-                        :style="{'color':item.colour}" >
+                        :style="{ 'background-color': item.colour }"
+                        style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
                       {{item.dictValue}}
                   </span>
               </temolate>
               <template slot="accountStatus" slot-scope="{ row }">
                   <span v-if="row.accountStatus == item.dictKey"
                         v-for="(item,index) in accountStatusData" :key="index"
-                        :style="{'color':item.colour}" >
+                        :style="{ 'background-color': item.colour }"
+                        style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
                       {{item.dictValue}}
                   </span>
               </template>
+              <template slot="status" slot-scope="{ row }">
+                    <div>
+                        <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
+                </template>
               <template slot="corpCnName" slot-scope="scope">
                     <span
                         style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
@@ -568,6 +579,7 @@ import { getDeptTree } from "@/api/system/dept";
               total: 0
         },
         selectionList: [],
+        auditStatusList: [],
         // 弹窗的选择数据
         dialogRadio:null,
         option:{},
@@ -598,6 +610,7 @@ import { getDeptTree } from "@/api/system/dept";
               delBtn:false,
               editBtn:false,
               menuWidth:'auto',
+              align: 'center',
               column: [
                   {
                       label: "单据类型",
@@ -1187,7 +1200,7 @@ import { getDeptTree } from "@/api/system/dept";
                           label: "dictValue",
                           value: "dictKey"
                       },
-                      width: "100",
+                      width: "120",
                       overHidden:true,
                   },
                   {
@@ -1199,7 +1212,7 @@ import { getDeptTree } from "@/api/system/dept";
                           label: "dictValue",
                           value: "dictKey"
                       },
-                      width: "180",
+                      width: "120",
                       overHidden:true,
                   },
                   {
@@ -1211,6 +1224,7 @@ import { getDeptTree } from "@/api/system/dept";
                           label: "dictValue",
                           value: "dictKey"
                       },
+                      width: "120",
                       overHidden:true,
                   },
                   {
@@ -1501,6 +1515,7 @@ import { getDeptTree } from "@/api/system/dept";
           statusWorkDictsfun(){
               getWorkDicts('audit_status_los').then(res=>{
                   this.findObject(this.option.column, "status").dicData = res.data.data;
+                  this.auditStatusList = res.data.data;
               })
           },
         // 添加到主单

Fichier diff supprimé car celui-ci est trop grand
+ 1485 - 1512
src/views/iosBasicData/OceanFreightImport/bills/index.vue


+ 27 - 19
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -354,25 +354,32 @@
                     </SplitList>
                 </template>
                 <temolate slot="billStatus" slot-scope="{row}">
-                    <span v-if="row.billStatus == item.dictKey" v-for="(item, index) in billStatusData" :key="index"
-                    :style="{ 'background-color': item.colour }"
-                    style="color: #fff;border-radius: 30px;padding: 4px 15px;text-align: center;">
-                        {{ item.dictValue }}
-                    </span>
+                    <div>
+                        <span v-if="row.billStatus == item.dictKey" v-for="(item, index) in billStatusData" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
+
                 </temolate>
                 <template slot="accountStatus" slot-scope="{ row }">
-                    <span v-if="row.accountStatus == item.dictKey" v-for="(item, index) in accountStatusData" :key="index"
-                        :style="{ 'background-color': item.colour }"
-                        style="color: #fff;border-radius: 30px;padding: 4px 15px;text-align: center;">
-                        {{ item.dictValue }}
-                    </span>
+                    <div>
+                        <span v-if="row.accountStatus == item.dictKey" v-for="(item, index) in accountStatusData"
+                            :key="index" :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
                 </template>
                 <template slot="status" slot-scope="{ row }">
-                    <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
-                        :style="{ 'background-color': item.colour }"
-                        style="color: #fff;border-radius: 30px;padding: 4px 15px;text-align: center;">
-                        {{ item.dictValue }}
-                    </span>
+                    <div>
+                        <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
                 </template>
                 <template slot="corpCnName" slot-scope="scope">
                     <span
@@ -466,7 +473,7 @@ export default {
             // 订舱代理
             bookingAgentData: [],
             createDeptData: [], // 部门数据
-            auditStatusList:[],
+            auditStatusList: [],
             // 单据类型
             billTypeData: [
                 {
@@ -1175,7 +1182,7 @@ export default {
                             label: "dictValue",
                             value: "dictKey"
                         },
-                        width: "100",
+                        width: "120",
                         overHidden: true,
                     },
                     {
@@ -1187,7 +1194,7 @@ export default {
                             label: "dictValue",
                             value: "dictKey"
                         },
-                        width: "180",
+                        width: "120",
                         overHidden: true,
                     },
                     {
@@ -1195,6 +1202,7 @@ export default {
                         prop: "status",
                         type: 'select',
                         dicData: [],
+                        width:'120',
                         props: {
                             label: "dictValue",
                             value: "dictKey"
@@ -1528,7 +1536,7 @@ export default {
         statusWorkDictsfun() {
             getWorkDicts('audit_status_los').then(res => {
                 this.findObject(this.option.column, "status").dicData = res.data.data;
-                this.auditStatusList= res.data.data;
+                this.auditStatusList = res.data.data;
             })
         },
         // 添加到主单

+ 1 - 14
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -95,22 +95,9 @@
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
                                 <el-button type="danger" plain size="small" @click="batchDelete"
-                                    :disabled="form.generateTask == '已生成'">一键删除</el-button>
+                                    :disabled="form.generateTask == '已生成'||form.businessSource == '外部销售'">一键删除</el-button>
                                 <el-button type="primary" plain size="small" @click="quickCopy">快捷复制</el-button>
                             </template>
-
-                            <!--<template slot="goodsId" slot-scope="{ row }">-->
-                            <!--    <div>-->
-                            <!--        <el-select v-model="value" filterable placeholder="请选择">-->
-                            <!--            <el-option-->
-                            <!--                v-for="item in options"-->
-                            <!--                :key="item.value"-->
-                            <!--                :label="item.label"-->
-                            <!--                :value="item.value">-->
-                            <!--            </el-option>-->
-                            <!--        </el-select>-->
-                            <!--    </div>-->
-                            <!--</template>-->
                             <template slot="goodsId" slot-scope="{ row }">
                                 {{ row.goodsName }}
                             </template>

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff