瀏覽代碼

修改bug

QuKatie 3 年之前
父節點
當前提交
7b00a35127

+ 8 - 0
src/api/basicData/customerInquiry.js

@@ -151,4 +151,12 @@ export const getGoodsInfo = (query) => {
     method: 'get',
     params:query
   })
+}
+//
+export function getPricedetail(query) {
+  return request({
+    url: '/api/blade-mocha-item/pricebank/detail',
+    method: 'get',
+    params:query
+  })
 }

+ 7 - 0
src/api/basicData/salesContract.js

@@ -124,4 +124,11 @@ export const getGoodsInfo = (query) => {
     method: 'get',
     params:query
   })
+}
+export function getPricedetail(query) {
+  return request({
+    url: '/api/blade-mocha-item/pricebank/detail',
+    method: 'get',
+    params:query
+  })
 }

+ 1 - 1
src/lang/zh.js

@@ -89,7 +89,7 @@ export default {
     userinfo: '个人信息',
     dashboard: '首页',
     lock: '锁屏',
-    bug: '没有错误日志',
+    bug: '错误日志',
     bugs: '条错误日志',
     screenfullF: '退出全屏',
     screenfull: '全屏',

+ 27 - 6
src/page/index/tags.vue

@@ -45,7 +45,7 @@
         >
           <top-color></top-color>
         </el-tooltip>
-        <el-tooltip
+        <!-- <el-tooltip
           v-if="showDebug"
           effect="dark"
           :content="logsFlag ? $t('navbar.bug') : logsLen + $t('navbar.bugs')"
@@ -53,16 +53,16 @@
           style="margin-right:14px"
         >
           <top-logs></top-logs>
-        </el-tooltip>
-        <el-tooltip
+        </el-tooltip> -->
+        <!-- <el-tooltip
           v-if="showLock"
           effect="dark"
           :content="$t('navbar.lock')"
           placement="bottom"
         >
           <top-lock></top-lock>
-        </el-tooltip>
-        <el-tooltip
+        </el-tooltip> -->
+        <!-- <el-tooltip
           v-if="showTheme"
           effect="dark"
           :content="$t('navbar.theme')"
@@ -71,7 +71,7 @@
           <div class="top-bar__item--show">
             <top-theme></top-theme>
           </div>
-        </el-tooltip>
+        </el-tooltip> -->
         <el-tooltip
           effect="dark"
           :content="$t('navbar.notice')"
@@ -116,10 +116,22 @@
           {{ $t("tagsView.menu") }}
           <i class="el-icon-arrow-down el-icon--right"></i>
         </el-button> -->
+          <top-logs ref="bug"></top-logs>
+          <top-lock ref="lock"></top-lock>
+          <top-theme ref="theme"></top-theme>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item @click.native="$parent.isSearch = true">{{
               $t("tagsView.search")
             }}</el-dropdown-item>
+            <el-dropdown-item @click.native="openBug">{{
+              $t("navbar.bug")
+            }}</el-dropdown-item>
+            <el-dropdown-item @click.native="openLock">{{
+              $t("navbar.lock")
+            }}</el-dropdown-item>
+            <el-dropdown-item @click.native="openTheme">{{
+              $t("navbar.theme")
+            }}</el-dropdown-item>
             <el-dropdown-item @click.native="closeOthersTags">{{
               $t("tagsView.closeOthers")
             }}</el-dropdown-item>
@@ -349,6 +361,15 @@ export default {
       this.$store.commit("DEL_TAG_OTHER");
       this.$store.commit("DEL_OTHER_DETAIL", this.$store.getters.tag);
     },
+    openBug() {
+      this.$refs.bug.handleOpen();
+    },
+    openLock() {
+      this.$refs.lock.handleLock();
+    },
+    openTheme() {
+      this.$refs.theme.open();
+    },
     findTag(value) {
       let tag, key;
       this.tagList.map((item, index) => {

+ 2 - 2
src/page/index/top/top-lock.vue

@@ -1,7 +1,7 @@
 <template>
   <span>
-    <i class="icon-suoping"
-       @click="handleLock"></i>
+    <!-- <i class="icon-suoping"
+       @click="handleLock"></i> -->
     <el-dialog title="设置锁屏密码"
                :visible.sync="box"
                width="30%"

+ 2 - 2
src/page/index/top/top-logs.vue

@@ -1,9 +1,9 @@
 <template>
   <span @click="logsFlag?'':handleOpen()">
-    <el-badge :value="logsFlag?'':logsLen"
+    <!-- <el-badge :value="logsFlag?'':logsLen"
               :max="99" class="logs">
       <i class="icon-rizhi1"></i>
-    </el-badge>
+    </el-badge> -->
     <el-dialog title="日志"
                fullscreen
                :visible.sync="box"

+ 2 - 2
src/page/index/top/top-theme.vue

@@ -18,10 +18,10 @@
       </el-radio-group>
     </el-dialog>
 
-    <span>
+    <!-- <span>
       <i class="icon-zhuti"
          @click="open"></i>
-    </span>
+    </span> -->
   </div>
 </template>
 

+ 1 - 1
src/styles/tags.scss

@@ -44,7 +44,7 @@
     &__box {
         position: relative;
         box-sizing: border-box;
-        padding-right: 320px;
+        padding-right: 240px;
         width: 100%;
         &--close {
             .el-tabs__item {

+ 98 - 7
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -543,7 +543,8 @@ import {
   saveShipping,
   getPorts,
   getSpecification,
-  saveSell
+  saveSell,
+  getPricedetail
 } from "@/api/basicData/customerInquiry";
 import { getCorpsattn } from "@/api/basicData/customerInformation";
 import reportDialog from "@/components/report-dialog/main";
@@ -1032,6 +1033,8 @@ export default {
         if (e.id == row.itemId) {
           row.cname = e.cname;
           row.code = e.code;
+          row.corpId = e.corpId;
+          row.corpName = e.corpName;
           row.priceCategory = e.goodsTypeName;
           row.itemUrl = e.url;
           row.itemDescription = e.cnameDescription;
@@ -1067,6 +1070,55 @@ export default {
           );
         }
       });
+      getPricedetail({ itemId: row.itemId, corpId: row.corpId }).then(res => {
+        if (res.data.data) {
+          this.goodsoptions.forEach(e => {
+            if (e.id == row.itemId) {
+              row.purchaseAmount = res.data.data.purchaseAmount;
+              row.productPrice = productCal(
+                res.data.data.purchaseAmount,
+                row.partsPrice,
+                this.form.coefficient
+              );
+              row.price = sellingCal(
+                productCal(
+                  res.data.data.purchaseAmount,
+                  row.partsPrice,
+                  this.form.coefficient
+                ),
+                this.form.exchangeRate
+              );
+              row.amount = amountCal(
+                sellingCal(
+                  productCal(
+                    res.data.data.purchaseAmount,
+                    row.partsPrice,
+                    this.form.coefficient
+                  ),
+                  this.form.exchangeRate
+                ),
+                row.orderQuantity,
+                row.freight,
+                row.insurance,
+                row.discount
+              );
+              row.itemMargin = grossProfitCal(
+                res.data.data.purchaseAmount,
+                row.partsPrice,
+                sellingCal(
+                  productCal(
+                    res.data.data.purchaseAmount,
+                    row.partsPrice,
+                    this.form.coefficient
+                  ),
+                  this.form.exchangeRate
+                ),
+                this.form.exchangeRate
+              );
+            }
+          });
+        }
+      });
     },
     saveSell() {
       if (!this.form.id) {
@@ -1340,6 +1392,8 @@ export default {
                 item.itemId = e.id;
                 item.code = e.code;
                 item.cname = e.cname;
+                item.corpId = e.corpId;
+                item.corpName = e.corpName;
                 item.priceCategory = e.goodsTypeName;
                 item.itemUrl = e.url;
                 item.itemProp = this.reData.itemProp;
@@ -1349,18 +1403,52 @@ export default {
                 item.customFour = this.reData.customFour;
                 item.customFive = this.reData.customFive;
                 item.partsList = this.reData.partsList;
-                item.partsPrice = this.reData.ppartsPrice;
+                item.partsPrice = this.reData.partsPrice;
                 item.itemDescription = e.cnameDescription;
                 item.itemType = this.reData.itemType;
                 item.tradeTerms = this.reData.tradeTerms;
-                item.price = this.reData.price;
+                item.purchaseAmount = 0;
+                item.productPrice = productCal(
+                  0,
+                  this.reData.partsPrice,
+                  this.form.coefficient
+                );
+                item.price = sellingCal(
+                  productCal(0, this.reData.partsPrice, this.form.coefficient),
+                  this.form.exchangeRate
+                );
                 item.orderQuantity = this.reData.orderQuantity;
                 item.insurance = this.reData.insurance;
                 item.freight = this.reData.freight;
                 item.discount = this.reData.discount;
-                item.amount = this.reData.amount;
+                item.amount = amountCal(
+                  sellingCal(
+                    productCal(
+                      0,
+                      this.reData.partsPrice,
+                      this.form.coefficient
+                    ),
+                    this.form.exchangeRate
+                  ),
+                  this.reData.orderQuantity,
+                  this.reData.freight,
+                  this.reData.insurance,
+                  this.reData.discount
+                );
                 item.taxRate = this.reData.taxRate;
-                item.itemMargin = this.reData.taxRate;
+                item.itemMargin = grossProfitCal(
+                  0,
+                  this.reData.partsPrice,
+                  sellingCal(
+                    productCal(
+                      0,
+                      this.reData.partsPrice,
+                      this.form.coefficient
+                    ),
+                    this.form.exchangeRate
+                  ),
+                  this.form.exchangeRate
+                );
                 item.unit = e.unit;
                 item.remarks = this.reData.remarks;
                 item.$cellEdit = true;
@@ -1374,6 +1462,8 @@ export default {
             itemId: e.id,
             code: e.code,
             cname: e.cname,
+            corpId: e.corpId,
+            corpName: e.corpName,
             priceCategory: e.goodsTypeName,
             itemUrl: e.url,
             itemProp: null,
@@ -1387,6 +1477,7 @@ export default {
             partsPrice: 0,
             itemType: null,
             tradeTerms: null,
+            purchaseAmount: 0,
             price: 0,
             orderQuantity: 0,
             insurance: 0,
@@ -1645,9 +1736,9 @@ export default {
       }
       return sums;
     },
-    openEdit(){
+    openEdit() {
       this.detailData.status = 2;
-      this.option=this.$options.data().option
+      this.option = this.$options.data().option;
     },
     async saveColumn() {
       const inSave = await this.saveColumnData(

+ 96 - 6
src/views/exportTrade/salesContract/detailsPage.vue

@@ -444,7 +444,7 @@
                 icon="el-icon-edit"
                 type="text"
                 @click="rowCell(row, index)"
-                :disabled="disabled||detailData.status == 1"
+                :disabled="disabled || detailData.status == 1"
                 >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
               >
               <el-button
@@ -593,7 +593,8 @@ import {
   deliverGoods,
   getPorts,
   getSpecification,
-  saveSell
+  saveSell,
+  getPricedetail
 } from "@/api/basicData/salesContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
@@ -1105,10 +1106,12 @@ export default {
       }
     },
     cnameChange(row) {
-      this.goodsoptions.forEach(e => {
+    this.goodsoptions.forEach(e => {
         if (e.id == row.itemId) {
           row.cname = e.cname;
           row.code = e.code;
+          row.corpId = e.corpId;
+          row.corpName = e.corpName;
           row.priceCategory = e.goodsTypeName;
           row.itemUrl = e.url;
           row.itemDescription = e.cnameDescription;
@@ -1144,6 +1147,55 @@ export default {
           );
         }
       });
+      getPricedetail({ itemId: row.itemId, corpId: row.corpId }).then(res => {
+        if (res.data.data) {
+          this.goodsoptions.forEach(e => {
+            if (e.id == row.itemId) {
+              row.purchaseAmount = res.data.data.purchaseAmount;
+              row.productPrice = productCal(
+                res.data.data.purchaseAmount,
+                row.partsPrice,
+                this.form.coefficient
+              );
+              row.price = sellingCal(
+                productCal(
+                  res.data.data.purchaseAmount,
+                  row.partsPrice,
+                  this.form.coefficient
+                ),
+                this.form.exchangeRate
+              );
+              row.amount = amountCal(
+                sellingCal(
+                  productCal(
+                    res.data.data.purchaseAmount,
+                    row.partsPrice,
+                    this.form.coefficient
+                  ),
+                  this.form.exchangeRate
+                ),
+                row.orderQuantity,
+                row.freight,
+                row.insurance,
+                row.discount
+              );
+              row.itemMargin = grossProfitCal(
+                res.data.data.purchaseAmount,
+                row.partsPrice,
+                sellingCal(
+                  productCal(
+                    res.data.data.purchaseAmount,
+                    row.partsPrice,
+                    this.form.coefficient
+                  ),
+                  this.form.exchangeRate
+                ),
+                this.form.exchangeRate
+              );
+            }
+          });
+        }
+      });
     },
     addLibrary() {
       if (!this.form.corpId) {
@@ -1410,6 +1462,8 @@ export default {
                 item.itemId = e.id;
                 item.code = e.code;
                 item.cname = e.cname;
+                item.corpId = e.corpId;
+                item.corpName = e.corpName;
                 item.priceCategory = e.goodsTypeName;
                 item.itemUrl = e.url;
                 item.itemProp = this.reData.itemProp;
@@ -1423,14 +1477,48 @@ export default {
                 item.itemDescription = e.cnameDescription;
                 item.itemType = this.reData.itemType;
                 item.tradeTerms = this.reData.tradeTerms;
-                item.price = this.reData.price;
+                item.purchaseAmount = 0;
+                item.productPrice = productCal(
+                  0,
+                  this.reData.partsPrice,
+                  this.form.coefficient
+                );
+                item.price = sellingCal(
+                  productCal(0, this.reData.partsPrice, this.form.coefficient),
+                  this.form.exchangeRate
+                );
                 item.orderQuantity = this.reData.orderQuantity;
                 item.insurance = this.reData.insurance;
                 item.freight = this.reData.freight;
                 item.discount = this.reData.discount;
-                item.amount = this.reData.amount;
+                item.amount = amountCal(
+                  sellingCal(
+                    productCal(
+                      0,
+                      this.reData.partsPrice,
+                      this.form.coefficient
+                    ),
+                    this.form.exchangeRate
+                  ),
+                  this.reData.orderQuantity,
+                  this.reData.freight,
+                  this.reData.insurance,
+                  this.reData.discount
+                );
                 item.taxRate = this.reData.taxRate;
-                item.itemMargin = this.reData.taxRate;
+                item.itemMargin = grossProfitCal(
+                  0,
+                  this.reData.partsPrice,
+                  sellingCal(
+                    productCal(
+                      0,
+                      this.reData.partsPrice,
+                      this.form.coefficient
+                    ),
+                    this.form.exchangeRate
+                  ),
+                  this.form.exchangeRate
+                );
                 item.unit = e.unit;
                 item.remarks = this.reData.remarks;
                 item.$cellEdit = true;
@@ -1444,6 +1532,8 @@ export default {
             itemId: e.id,
             code: e.code,
             cname: e.cname,
+            corpId: e.corpId,
+            corpName: e.corpName,
             priceCategory: e.goodsTypeName,
             itemUrl: e.url,
             itemProp: null,