Ver Fonte

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie há 3 anos atrás
pai
commit
1bb5aa89c9

+ 1 - 1
src/components/part-dialog/configuration/mainList.json

@@ -3,7 +3,7 @@
   "border": true,
   "index": true,
   "addBtn": false,
-  "menuWidth":70,
+  "menuWidth":140,
   "selection": true,
   "tip":false,
   "delBtn":false,

+ 26 - 6
src/components/part-dialog/main.vue

@@ -30,7 +30,18 @@
             >
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button type="text" size="small" @click.stop="rowDel(row, index)"
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-edit"
+              @click.stop="rowEdit(row, index)"
+              >修改</el-button
+            >
+            <el-button
+              type="text"
+              size="small"
+              @click.stop="rowDel(row, index)"
+              icon="el-icon-delete"
               >删除</el-button
             >
           </template>
@@ -120,10 +131,12 @@ export default {
       // });
     },
     priceChange(row) {
-      row.amout = _.multiply(
-        Number(row.goodNumber ? row.goodNumber : 0),
-        Number(row.price ? row.price : 0)
-      );
+      row.amout = Number(
+        _.multiply(
+          Number(row.goodNumber ? row.goodNumber : 0),
+          Number(row.price ? row.price : 0)
+        )
+      ).toFixed(2);
     },
     rowDel(row, index) {
       this.$message({
@@ -132,6 +145,13 @@ export default {
       });
       this.data.splice(index, 1);
     },
+    rowEdit(row, index) {
+      if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
     rowAdd() {
       this.$emit("partOpen", true);
     },
@@ -176,7 +196,7 @@ export default {
             let amountSum = 0;
             this.amoutSum = 0;
             data.forEach(e => {
-              qtySum =_.add(qtySum, Number(e.goodNumber));
+              qtySum = _.add(qtySum, Number(e.goodNumber));
               amountSum = _.add(amountSum, Number(e.amout));
               this.amoutSum = Number(amountSum).toFixed(2);
             });

+ 3 - 3
src/components/selectComponent/customerSelect.vue

@@ -311,13 +311,13 @@ export default {
     },
     open() {
       if (this.typeData == "KH") {
-        this.corpType = customerParameter;
+        this.corpType = customerParameter.code;
       }
       if (this.typeData == "GYS") {
-        this.corpType = supplierParameter;
+        this.corpType = supplierParameter.code;
       }
       if (this.typeData == "GS") {
-        this.corpType = companyParameter;
+        this.corpType = companyParameter.code;
       }
       this.dialogVisible = true;
       let _this = this;

+ 12 - 3
src/enums/management-type.js

@@ -1,6 +1,15 @@
 //客户管理
-export const customerParameter = "KH"
+export const customerParameter = {
+  code:"KH",
+  name:"客户"
+}
 //客户管理
-export const supplierParameter = "GYS"
+export const supplierParameter = {
+  code:"GYS",
+  name:"供应商"
+}
 //客户管理
-export const companyParameter = "GS"
+export const companyParameter = {
+  code:"GS",
+  name:"公司主体"
+}

+ 1 - 0
src/views/basicData/commodityType/detailsPageEdit.vue

@@ -477,6 +477,7 @@ export default {
           {
             label: "供应商",
             prop: "corpId",
+            span:12,
             rules: [
               {
                 required: true,

+ 1 - 1
src/views/basicData/customerCategory/configuration/mainList.json

@@ -14,7 +14,7 @@
   "menuWidth": 300,
   "column": [
     {
-      "label": "客户类型",
+      "label": "类型",
       "prop": "cname",
       "search": true,
       "index": 1,

+ 2 - 2
src/views/basicData/customerInformation/configuration/mainList.json

@@ -17,7 +17,7 @@
   "dialogClickModal": false,
   "column":[
     {
-      "label": "客户编码",
+      "label": "编码",
       "prop": "code",
       "search": true,
       "index": 1,
@@ -30,7 +30,7 @@
         }
       ]
     },{
-      "label": "客户全称",
+      "label": "全称",
       "prop": "cname",
       "search": true,
       "index": 2,

+ 3 - 3
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -433,7 +433,7 @@ export default {
       basicData: {
         column: [
           {
-            label: "客户编码",
+            label: "编码",
             prop: "code",
             rules: [
               {
@@ -444,7 +444,7 @@ export default {
             ]
           },
           {
-            label: "客户名称",
+            label: "名称",
             prop: "cname",
             rules: [
               {
@@ -455,7 +455,7 @@ export default {
             ]
           },
           {
-            label: "客户类别",
+            label: "类别",
             prop: "corpsTypeId",
             rules: [
               {

+ 2 - 2
src/views/basicData/customerManagement/companyMaterial/configuration/mainList.json

@@ -17,7 +17,7 @@
   "dialogClickModal": false,
   "column":[
     {
-      "label": "客户编码",
+      "label": "编码",
       "prop": "code",
       "search": true,
       "index": 1,
@@ -30,7 +30,7 @@
         }
       ]
     },{
-      "label": "客户全称",
+      "label": "全称",
       "prop": "cname",
       "search": true,
       "index": 2,

+ 3 - 3
src/views/basicData/customerManagement/companyMaterial/detailsPageEdit.vue

@@ -433,7 +433,7 @@ export default {
       basicData: {
         column: [
           {
-            label: "客户编码",
+            label: "编码",
             prop: "code",
             rules: [
               {
@@ -444,7 +444,7 @@ export default {
             ]
           },
           {
-            label: "客户名称",
+            label: "名称",
             prop: "cname",
             rules: [
               {
@@ -455,7 +455,7 @@ export default {
             ]
           },
           {
-            label: "客户类别",
+            label: "类别",
             prop: "corpsTypeId",
             rules: [
               {

+ 1 - 1
src/views/basicData/customerManagement/companyType/configuration/mainList.json

@@ -14,7 +14,7 @@
   "menuWidth": 300,
   "column": [
     {
-      "label": "客户类型",
+      "label": "类型",
       "prop": "cname",
       "search": true,
       "index": 1,

+ 2 - 2
src/views/basicData/customerManagement/supplierMaterial/configuration/mainList.json

@@ -17,7 +17,7 @@
   "dialogClickModal": false,
   "column":[
     {
-      "label": "客户编码",
+      "label": "编码",
       "prop": "code",
       "search": true,
       "index": 1,
@@ -30,7 +30,7 @@
         }
       ]
     },{
-      "label": "客户全称",
+      "label": "全称",
       "prop": "cname",
       "search": true,
       "index": 2,

+ 3 - 3
src/views/basicData/customerManagement/supplierMaterial/detailsPageEdit.vue

@@ -433,7 +433,7 @@ export default {
       basicData: {
         column: [
           {
-            label: "客户编码",
+            label: "编码",
             prop: "code",
             rules: [
               {
@@ -444,7 +444,7 @@ export default {
             ]
           },
           {
-            label: "客户名称",
+            label: "名称",
             prop: "cname",
             rules: [
               {
@@ -455,7 +455,7 @@ export default {
             ]
           },
           {
-            label: "客户类别",
+            label: "类别",
             prop: "corpsTypeId",
             rules: [
               {

+ 1 - 1
src/views/basicData/customerManagement/supplierType/configuration/mainList.json

@@ -14,7 +14,7 @@
   "menuWidth": 300,
   "column": [
     {
-      "label": "客户类型",
+      "label": "类型",
       "prop": "cname",
       "search": true,
       "index": 1,

+ 1 - 1
src/views/basicData/productInformation/detailsPageEdit.vue

@@ -237,7 +237,7 @@ export default {
           {
             label: "供应商",
             prop: "corpId",
-            span: 8,
+             span:12,
             rules: [
               {
                 required: true,

+ 35 - 1
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -23,6 +23,11 @@
         >
           申请货款
         </el-button>
+        <el-button type="info"
+                   size="small"
+                   @click="openApplicationDialog"
+        >查看申请记录
+        </el-button>
         <el-button type="warning"
                    size="small"
                    class="el-button--small-yh "
@@ -388,6 +393,24 @@
       >
       </apply-payment>
     </el-dialog>
+
+    <el-dialog
+      title="申请记录"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="applicationDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <bill-application
+        :billId="form.id"
+        @choceApplication="choceApplication"
+      >
+      </bill-application>
+    </el-dialog>
   </div>
 </template>
 
@@ -413,6 +436,7 @@ import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import { contrastObj, contrastList } from "@/util/contrastData";
 //账单组件
 import ApplyPayment from "../../../components/finance/applyPayment";
+import  billApplication from "@/components/bill/billApplication";
 
 export default {
   name: "detailsPage",
@@ -425,7 +449,8 @@ export default {
     }
   },
   components:{
-    ApplyPayment
+    ApplyPayment,
+    billApplication
   },
   data() {
     return {
@@ -521,6 +546,7 @@ export default {
       billType:"申请",  //账单类型
       billData:{},     //账单需要数据
       applyPaymentDialog:false,//生成账单组件
+      applicationDialog: false,// 申请记录
       dialogVisible: false,
       advantageProjectForm: {},
       bankOfDepositForm: {},
@@ -1298,6 +1324,14 @@ export default {
         this.billData.srcId = -1
       }
     },
+    // 查看申请记录
+    openApplicationDialog(){
+      this.applicationDialog = true
+    },
+    //关闭申记录
+    choceApplication(){
+      this.applicationDialog = false
+    },
     //申请货款
     applyPayment(type){
       // if (contrastObj(this.form, this.oldForm) ||

+ 40 - 13
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -204,7 +204,7 @@
             >
             <el-button
               size="small"
-              icon="el-icon-edit"
+              icon="el-icon-delete"
               type="text"
               @click="rowDel(row, index)"
               :disabled="detailData.status == 1"
@@ -647,7 +647,14 @@ export default {
               if (value == "USD") {
                 this.form.exchangeRate = 6.3843;
               }
-            }
+            },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "汇率",
@@ -931,17 +938,15 @@ export default {
       this.data[index].partsPrice = sum;
       // 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
       // this.data[index].price=_.multiply(multiplier, multiplicand)
-
-      this.data[index].price = Number(
+      this.data[index].productPrice = Number(
         _.multiply(
-          _.divide(
-            _.add(
-              Number(sum),
-              Number(
-                this.data[index].partsPrice ? this.data[index].partsPrice : 0
-              )
-            ),
-            Number(this.form.exchangeRate ? this.form.exchangeRate : 1)
+          _.add(
+            Number(sum),
+            Number(
+              this.data[index].purchaseAmount
+                ? this.data[index].purchaseAmount
+                : 0
+            )
           ),
           _.add(
             1,
@@ -952,11 +957,33 @@ export default {
           )
         )
       ).toFixed(2);
+      this.data[index].price = Number(
+        _.divide(
+          _.multiply(
+            _.add(
+              Number(sum),
+              Number(
+                this.data[index].purchaseAmount
+                  ? this.data[index].purchaseAmount
+                  : 0
+              )
+            ),
+            _.add(
+              1,
+              _.divide(
+                Number(this.form.coefficient ? this.form.coefficient : 0),
+                100
+              )
+            )
+          ),
+          Number(this.form.exchangeRate ? this.form.exchangeRate : 1)
+        )
+      ).toFixed(2);
       const names = [];
       const namePrices = [];
       rows.map(e => {
         names.push(e.goodName);
-        namePrices.push(e.goodName + ":" + e.price);
+        namePrices.push(e.goodName + ":" + e.amout);
       });
       this.data[index].partsDescribe = names.join(",");
       this.data[index].partsPriceDescribe = namePrices.join(";");