Browse Source

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

caojunjie 3 years ago
parent
commit
d718135fab

+ 9 - 0
src/api/financialManagement/paymentRequest.js

@@ -130,3 +130,12 @@ export function deleteDetail(data) {
   })
 }
 
+// 账单明细删除
+export function removeDetail(data) {
+  return request({
+    url: '/api/trade-finance/acc/remove',
+    method: 'post',
+    params: data
+  })
+}
+

+ 49 - 0
src/api/wel.js

@@ -20,3 +20,52 @@ export const salaryDataChain = (query) => {
     params: query
   })
 }
+export const checkDate = (query) => {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/checkDate',
+    method: 'get',
+    params: query
+  })
+}
+export const realTimeData = (query) => {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/realTimeData',
+    method: 'get',
+    params: query
+  })
+}
+export const shipCheckDate = (query) => {
+  return request({
+    url: '/api/blade-deliver-goods/exportDelivery/checkDate',
+    method: 'get',
+    params: query
+  })
+}
+export const shipRealTimeData = (query) => {
+  return request({
+    url: '/api/blade-deliver-goods/exportDelivery/realTimeData',
+    method: 'get',
+    params: query
+  })
+}
+export const monthSales = (query) => {
+  return request({
+    url: '/api/blade-purchase-sales/exportEnquiry/monthSales',
+    method: 'get',
+    params: query
+  })
+}
+export const salesTrend = (query) => {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/salesTrend',
+    method: 'get',
+    params: query
+  })
+}
+export const financeCheck = (query) => {
+  return request({
+    url: '/api/trade-finance/settlement/financeCheck',
+    method: 'get',
+    params: query
+  })
+}

+ 2 - 1
src/components/crop-select/configuration/mainList.json

@@ -16,12 +16,13 @@
             "prop": "code",
             "index": 1,
             "width":100,
+          "search": true,
           "overHidden": true
         },{
             "label": "名称",
             "prop": "cname",
             "search": true,
-            "searchSpan": 16,
+            "searchSpan": 8,
             "index": 2,
             "width":180,
         "overHidden": true

+ 5 - 3
src/components/finance/financialAccount.vue

@@ -500,9 +500,9 @@
         this.submitButton = true
         const itemsList = this.data.map(item => {
           item.corpId = this.corpId;
-          item.tradeType = this.billData.optionType?this.billData.optionType: item.tradeType
-          item.srcType = this.srcType
-          return item
+          item.tradeType = this.billData.optionType?this.billData.optionType: item.tradeType;
+          item.srcType = item.srcType? item.srcType: this.srcType;
+          return item;
         })
         const params = {
           url: this.checkData.url,
@@ -520,6 +520,7 @@
             if(res.data.success){
               this.$message.success("操作成功!")
               this.$emit("choceFun");
+              this.$emit("submit")
               //跳转付款申请页面
 
               // if(this.$store.getters.pqStatus){
@@ -548,6 +549,7 @@
             if(res.data.success){
               this.$message.success("操作成功!")
               this.$emit("choceFun");
+              this.$emit("submit")
             }
           }).finally(()=>{
             this.submitButton = false

+ 0 - 1
src/views/approval/processConfig/index.vue

@@ -418,7 +418,6 @@ export default {
         item.levelId = _.add(item.$index,1)
         delete item.id
         if (item.auditMoldId) {
-          console.log(item.auditMoldId)
           item.auditMoldId = item.auditMoldId.join(',');
         }
         if (item.auditUserId) {

+ 1 - 1
src/views/approveData/configuration/mainList.json

@@ -113,7 +113,7 @@
     },
     {
       "label": "申请人",
-      "prop": "sendName",
+      "prop": "sendRealName",
       "overHidden": true,
       "search": true,
       "index": 7,

+ 38 - 65
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -174,7 +174,7 @@
               <el-select
                 v-if="row.$cellEdit"
                 v-model="row.purchaseAmount"
-                @focus="changeContractAmt(row)"
+                @change="changeContractAmt(row)"
                 allow-create
                 filterable
                 v-input-limit="2"
@@ -364,25 +364,6 @@
         </span>
     </el-dialog>
 
-    <el-dialog
-      title="账单"
-      append-to-body
-      class="el-dialogDeep"
-      :visible.sync="applyPaymentDialog"
-      width="60%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      v-dialog-drag
-    >
-      <apply-payment
-        :billType="billType"
-        :billData="billData"
-        itemType="采购"
-        @choceFun="choceFun"
-      >
-      </apply-payment>
-    </el-dialog>
 
     <el-dialog
       append-to-body
@@ -396,11 +377,13 @@
       v-dialog-drag
     >
       <financial-account
+        v-if="financialAccountDialog"
         :billType="billType"
         :billData="{}"
         :arrList="applyPaymentList"
         :checkData="financeData"
         @choceFun="choceFun"
+        @submit="feeSubmit"
       >
       </financial-account>
     </el-dialog>
@@ -884,13 +867,13 @@ export default {
       detail(id).then(res => {
         this.form = res.data.data;
         this.browse = this.form.status > 0? true: false
-        this.contactsData = this.form.itemsVOList? this.form.itemsVOList: []
+        this.contactsData = this.form.orderItemsList? this.form.orderItemsList: []
         this.advantageProjectData = this.form.orderFeesList? this.form.orderFeesList: []
         this.bankOfDepositData = this.form.orderFilesList? this.form.orderFilesList: []
-        if (!this.form.itemsVOList) {
+        if (!this.form.orderItemsList) {
           this.contactsData = []
         } else {
-          this.contactsData = this.form.itemsVOList
+          this.contactsData = this.form.orderItemsList
         }
         // if (!this.form.orderFeesList) {
         //   this.advantageProjectData = []
@@ -926,7 +909,7 @@ export default {
         })
         this.goodsConfiguration.dicData = [].concat(goodsData)
         this.removeGoodsRepeat()
-        delete this.form.itemsVOList
+        delete this.form.orderItemsList
         delete this.form.orderFeesList
         delete this.form.orderFilesList
         // delete this.form.corpsName
@@ -1485,34 +1468,36 @@ export default {
         checkType: 'ffsq'
       }
       this.contactsData.map(e => {
-        const form = {
-          belongCompany: this.form.belongCompany,
-          srcOrderno:this.form.orderNo,
-          itemType:"采购",
-          corpsName:this.form.corpsName,
-          corpId:this.form.corpId,
-          srcParentId: this.form.id,
-          currency: 'CNY',
-          exchangeRate: '1',
-          taxRate: '0',
-          accDate: this.form.businesDate,
-          srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请  3.收发货-费用明细
-          tradeType: 'GN',
-          optionType: 'GN',
-          amount: e.amount,
-          goodName: e.cname,
-          price: e.price,
-          unit: e.unit,
-          quantity: e.orderQuantity,
-          srcFeesId: e.id,
-          costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+        if (e.submitPay != 1) {
+          const form = {
+            belongCompany: this.form.belongCompany,
+            srcOrderno:this.form.orderNo,
+            itemType:"采购",
+            corpsName:this.form.corpsName,
+            corpId:this.form.corpId,
+            srcParentId: this.form.id,
+            currency: 'CNY',
+            exchangeRate: '1',
+            taxRate: '0',
+            accDate: this.form.businesDate,
+            srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请  3.收发货-费用明细
+            tradeType: 'GN',
+            optionType: 'GN',
+            amount: e.amount,
+            goodName: e.cname,
+            price: e.purchaseAmount,
+            unit: e.unit,
+            quantity: e.orderQuantity,
+            srcFeesId: e.id,
+            costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+          }
+          arr.push(form)
         }
-        arr.push(form)
       })
-      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2)
+      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2 && item.submitPay != 1)
       getFeeList.forEach(item => {
         let form = {
-          srcOrderno:this.form.orgOrderNo,
+          srcOrderno:this.form.orderNo,
           itemType:"采购",
           corpsName:item.corpName,
           corpId: item.corpId,
@@ -1549,28 +1534,16 @@ export default {
     },
     //申请货款
     applyPayment(type){
-      // if (contrastObj(this.form, this.oldForm) ||
-      //   contrastList(this.contactsData, this.oldGoodsList) ||
-      //   contrastList(this.advantageProjectData, this.oldFeesList) ||
-      //   contrastList(this.bankOfDepositData, this.oldUploadList)
-      // ) {
-      //   this.$confirm("您已改动数据,是否先保存在进行操作!", {
-      //     confirmButtonText: "保存",
-      //     cancelButtonText: "取消",
-      //     type: "warning"
-      //   }).then(() => {
-      //     this.editCustomer();
-      //   })
-      // }else{
-        this.beforeBillData(true,type);
-        this.financialAccountDialog = true;
-      // }
-
+      this.beforeBillData(true,type);
+      this.financialAccountDialog = true;
     },
     //关闭账单
     choceFun(){
       this.financialAccountDialog  = false
     },
+    feeSubmit() {
+      this.queryData(this.form.id);
+    },
     //返回列表
     backToList() {
       if (contrastObj(this.form, this.oldForm) ||

+ 53 - 33
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -337,15 +337,6 @@
               ></el-input>
               <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
             </template>
-<!--            <template slot="cname" slot-scope="{ row }">-->
-<!--              <goods-select v-if="row.$cellEdit" v-model="row.cname" @getRow="getGoodsRow($event, row)"-->
-<!--                               :configuration="goodsConfiguration" @receiveList="receiveGoodList" @returnRow="getRow($event, row)"-->
-<!--                            :artsVision="form.belongToCorpId"-->
-<!--              />-->
-<!--              <span v-else>-->
-<!--                {{row.cname}}-->
-<!--              </span>-->
-<!--            </template>-->
             <template slot="shopQuality" slot-scope="{ row }">
               <el-switch
                 v-model="row.shopQuality"
@@ -432,6 +423,12 @@
                   :disabled="detailData.seeDisabled || browse"
                 >导 入</el-button>
               </el-upload>
+              <el-button
+                type="warning"
+                icon="el-icon-refresh"
+                size="small"
+                @click="resetStock"
+              >库存刷新</el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -661,11 +658,13 @@
       v-dialog-drag
     >
       <financial-account
+        v-if="financialAccountDialog"
         :billType="billType"
         :billData="{}"
         :arrList="applyPaymentList"
         :belongCompany="form.belongCompany"
         @choceFun="choceFun"
+        @submit="feeSubmit"
       >
       </financial-account>
     </el-dialog>
@@ -1809,6 +1808,7 @@ export default {
     },
     // 复制新单
     copyOrder() {
+      this.saveActives = ''
       this.queryData(this.form.id, true)
     },
     getcorpId(row) {
@@ -2116,32 +2116,34 @@ export default {
       this.billType = type
       const data = this.goodsActives === 'gift'? this.contactsData: this.goodsShowData
       data.map(e => {
-        const form = {
-          belongCompany: this.form.belongCompany,
-          srcOrderno:this.form.orgOrderNo,
-          itemType:"销售",
-          corpsName:this.form.corpName,
-          corpId:this.form.corpId,
-          srcParentId: this.form.id,
-          currency: 'CNY',
-          exchangeRate: '1',
-          taxRate: '0',
-          accDate: this.form.businesDate,
-          srcType: 1,
-          tradeType: 'GN',
-          optionType: 'GN',
-          chargeMember: this.form.chargeMember,
-          amount: e.amount,
-          quantity: e.orderQuantity, // 数量
-          price: e.price,
-          unit: e.unit,
-          goodName: e.cname,
-          srcFeesId: e.id,
-          costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+        if (e.submitPay != 1) {
+          const form = {
+            belongCompany: this.form.belongCompany,
+            srcOrderno:this.form.orgOrderNo,
+            itemType:"销售",
+            corpsName:this.form.corpName,
+            corpId:this.form.corpId,
+            srcParentId: this.form.id,
+            currency: 'CNY',
+            exchangeRate: '1',
+            taxRate: '0',
+            accDate: this.form.businesDate,
+            srcType: 1,
+            tradeType: 'GN',
+            optionType: 'GN',
+            chargeMember: this.form.chargeMember,
+            amount: e.amount,
+            quantity: e.orderQuantity, // 数量
+            price: e.price,
+            unit: e.unit,
+            goodName: e.cname,
+            srcFeesId: e.id,
+            costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+          }
+          arr.push(form)
         }
-        arr.push(form)
       })
-      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1)
+      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1 && item.submitPay != 1)
       getFeeList.forEach(item => {
         let form = {
           srcOrderno:this.form.orgOrderNo,
@@ -2175,6 +2177,10 @@ export default {
     choceFun(){
       this.financialAccountDialog  = false
     },
+    feeSubmit() {
+      this.saveActives = ''
+      this.queryData(this.form.id);
+    },
     //商品选中触发
     productSelection(selection) {
       this.selection = selection
@@ -3468,6 +3474,20 @@ export default {
       }
       row.amount = Number(row.price) * Number(row.orderQuantity)
     },
+    // 库存刷新
+    resetStock() {
+      this.goodsShowData.forEach(item => {
+        selectGoodsNum({
+          goodsId: item.itemId,
+          itemType: item.itemType? item.itemType: item.typeno,
+          tradeType: 'GN',
+          storageId: this.form.storageId
+        }).then(res => {
+          item.storageQuantity = res.data.data
+        })
+      })
+      this.$message.success('刷新成功')
+    },
   },
   computed: {
     ...mapGetters(["userInfo", "permission"])

+ 25 - 2
src/views/financialManagement/billDetails/billDetails.vue

@@ -47,7 +47,7 @@
           icon="el-icon-delete"
           size="small"
           :disabled="scope.row.billType === '申请' ||  scope.row.settlementAmount != 0"
-          @click.stop=""
+          @click.stop="rowDel(scope.row)"
         >删除
         </el-button>
       </template>
@@ -57,7 +57,7 @@
 
 <script>
   import option from "./configuration/mainList.json";
-  import { getBillList } from "@/api/financialManagement/paymentRequest";
+  import { getBillList, removeDetail } from "@/api/financialManagement/paymentRequest";
   import _ from "lodash";
 
   export default {
@@ -201,6 +201,29 @@
           this.$refs.crud.$refs.dialogColumn.columnBox = false;
         }
       },
+      rowDel(row){
+        this.$confirm("确定删除数据?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          if (row.id) {
+            removeDetail({ids: row.id}).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+              this.dataList.splice(row.$index, 1);
+            })
+          } else {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.dataList.splice(row.$index, 1);
+          }
+        });
+      },
     }
   }
 </script>

+ 6 - 6
src/views/maintenance/salesPolicy/configuration/customerContact.json

@@ -25,7 +25,7 @@
       "prop": "code",
       "index": 1,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -39,7 +39,7 @@
       "prop": "brand",
       "index": 1,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -53,7 +53,7 @@
       "prop": "productCategory",
       "index": 2,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -67,7 +67,7 @@
       "prop": "typeno",
       "index": 3,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -81,7 +81,7 @@
       "prop": "brandItem",
       "index": 3,
       "width":100,
-      "cell": true,
+      "cell": false,
       "overHidden": true,
       "rules": [
         {
@@ -94,7 +94,7 @@
       "label": "供应商",
       "prop": "corpId",
       "index": 3,
-      "width":100,
+      "width":160,
       "cell": false,
       "slot": true,
       "overHidden": true,

+ 16 - 9
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -169,7 +169,7 @@
               </el-upload>
             </template>
             <template slot-scope="{ row, index }" slot="menu">
-              <el-button type="text" size="small" @click="rowCell(row, index)" :disabled="!form.id"
+              <el-button type="text" size="small" @click="rowCell(row, index)"
                 >{{ row.$cellEdit ? "保存" : "修改" }}
               </el-button>
               <el-button
@@ -321,6 +321,7 @@ import {
 import goodsOption from "./configuration/commodity.json";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import { getToken } from "@/util/auth";
+import { getPurchasePrice } from "@/api/basicData/fees"
 
 export default {
   name: "detailsPage",
@@ -636,8 +637,9 @@ export default {
         } else {
           this.selectionList.forEach(e => {
             if (this.reData.salesType == 1) {
-              this.contactsData.forEach((item, index) => {
+              this.contactsData.forEach(async (item, index) => {
                 if (index == this.reData.index) {
+                  item.purchasePrice = await this.getPurchasePrice(e);
                   item.itemId = e.id;
                   item.code = e.code;
                   item.cname = e.cname;
@@ -654,7 +656,7 @@ export default {
                 }
               });
             } else {
-              this.contactsDataBuyFree.forEach((item, index) => {
+              this.contactsDataBuyFree.forEach(async (item, index) => {
                 item.itemId = e.id;
                 item.code = e.code;
                 item.cname = e.cname;
@@ -675,9 +677,9 @@ export default {
         }
       } else {
         if (this.salesType == 1) {
-          this.selectionList.forEach(item => {
-            console.log(item);
+          this.selectionList.forEach(async item => {
             this.contactsData.push({
+              purchasePrice: await this.getPurchasePrice(item),
               itemId: item.id,
               code: item.code,
               brand: item.brand,
@@ -686,7 +688,6 @@ export default {
               brandItem: item.brandItem,
               corpId: item.corpId,
               corpName: item.corpName,
-              purchasePrice: "",
               salesPrice: "",
               specialOffer: "",
               updateUserName: "",
@@ -771,8 +772,7 @@ export default {
     },
     //商品编辑
     rowCell(row, index) {
-      console.log(row);
-      if (row.$cellEdit) {
+      if (row.$cellEdit && this.form.id) {
         itemSubmit({...row,pid: this.form.id}).then(res => {
           this.$message.success('保存成功')
           this.$refs.crudContact.rowCell(row, index);
@@ -909,7 +909,14 @@ export default {
         arr.push(e.id);
       });
       this.form.corps = arr;
-    }
+    },
+    async getPurchasePrice(row) {
+      let data;
+      await getPurchasePrice({code: row.code}).then(res => {
+        data = res.data.data.length > 0? res.data.data[0].purchasePrice: 0
+      })
+      return data;
+    },
   }
 };
 </script>

+ 8 - 2
src/views/salaryManagement/highSchool/detailsPage.vue

@@ -1238,8 +1238,14 @@ export default {
           {
             label: "学生人数",
             prop: "studentNumber",
-            span: 4,
-            disabled: true
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 4
           },
           {
             label: "状态",

+ 8 - 2
src/views/salaryManagement/juniorhighSchool/detailsPage.vue

@@ -1238,8 +1238,14 @@ export default {
           {
             label: "学生人数",
             prop: "studentNumber",
-            span: 4,
-            disabled: true
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 4
           },
           {
             label: "状态",

+ 9 - 3
src/views/salaryManagement/logisticsDepartment/detailsPage.vue

@@ -1238,8 +1238,14 @@ export default {
           {
             label: "学生人数",
             prop: "studentNumber",
-            span: 4,
-            disabled: true
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 4
           },
           {
             label: "状态",
@@ -2370,7 +2376,7 @@ export default {
               "excelFile"
             ).disabled = false;
             break;
-                      case "33":
+          case "33":
             this.exportUrl =
               "/api/blade-school/salaryitem/export/teamLeaderAssessExcel";
             this.findObject(this.excelOption.column, "excelFile").action =

+ 9 - 2
src/views/salaryManagement/primarySchool/detailsPage.vue

@@ -1241,8 +1241,14 @@ export default {
           {
             label: "学生人数",
             prop: "studentNumber",
-            span: 4,
-            disabled: true
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 4
           },
           {
             label: "状态",
@@ -1365,6 +1371,7 @@ export default {
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
+    console.log(this.detailData);
     if (this.detailData.status == 1) {
       this.$set(this.option, "disabled", true);
     }

+ 96 - 17
src/views/wel/components/audit-data.vue

@@ -29,6 +29,11 @@
 </template>
 
 <script>
+import {
+  checkDate,
+  shipCheckDate,
+  financeCheck
+} from "@/api/wel";
 export default {
   name: "basicContainer",
   props: {
@@ -38,33 +43,107 @@ export default {
     return {
       loading: false,
       list: [
-        { icon: "el-icon-s-order", qty: "1", text: "销售订单/待审核" },
-        { icon: "el-icon-s-goods", qty: "1", text: "采购订单/待审核" },
-        { icon: "el-icon-s-home", qty: "1", text: "发货/待审核" },
-        { icon: "el-icon-s-home", qty: "1", text: "收货/待审核" },
-        { icon: "el-icon-s-finance", qty: "1", text: "申请付款/待审核" }
-      ]
+        { icon: "el-icon-s-order", qty: "0", text: "报价订单/待审核" },
+        { icon: "el-icon-s-order", qty: "0", text: "销售订单/待审核" },
+        { icon: "el-icon-s-goods", qty: "0", text: "采购订单/待审核" },
+        { icon: "el-icon-s-home", qty: "0", text: "发货/待审核" },
+        { icon: "el-icon-s-home", qty: "0", text: "收货/待审核" },
+        { icon: "el-icon-s-finance", qty: "0", text: "申请付款/待审核" }
+      ],
+      tradeType: null
     };
   },
+  created() {
+    this.getSysType();
+  },
   mounted() {
-    this.init()
+    this.init();
   },
   methods: {
-    init(){
-      if(this.sysType === 3){
+    init() {
+      // if(this.sysType === 3){
 
-      }
-      if(this.sysType === 5){
+      // }
+      if (this.sysType === 5) {
         this.list = [
-          { icon: "el-icon-s-order", qty: "0", text: "主营业务/待审核" },
-        ]
+          { icon: "el-icon-s-order", qty: "0", text: "主营业务/待审核" }
+        ];
       }
+      this.getCheckDate();
+      this.getshipCheckDate();
+      this.getfinanceCheck()
     },
-    refresh() {
+    getSysType() {
+      const sysType = localStorage.getItem("sysitemType");
+      if (sysType == 6) {
+        this.tradeType = "JXS";
+      } else if (sysType == 5) {
+        this.tradeType = "SW";
+      } else if (sysType == 4) {
+        this.tradeType = "CK";
+      } else if (sysType == 3) {
+        this.tradeType = "JK";
+      } else if (sysType == 2) {
+        this.tradeType = "GN";
+      } else if (sysType == 1) {
+        this.tradeType = "XX";
+      }
+    },
+    getCheckDate() {
       this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-      }, 1000);
+      checkDate({ tradeType: this.tradeType })
+        .then(res => {
+          this.list.forEach(e => {
+            if (e.text == "报价订单/待审核") {
+              e.qty = res.data.data.offerNumber;
+            }
+            if (e.text == "销售订单/待审核") {
+              e.qty = res.data.data.sellNumber;
+            }
+            if (e.text == "采购订单/待审核") {
+              e.qty = res.data.data.purchaseNumber;
+            }
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    getshipCheckDate() {
+      this.loading = true;
+      shipCheckDate({ tradeType: this.tradeType })
+        .then(res => {
+          this.list.forEach(e => {
+            if (e.text == "发货/待审核") {
+              e.qty = res.data.data.sellNumber;
+            }
+            if (e.text == "收货/待审核") {
+              e.qty = res.data.data.purchaseNumber;
+            }
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    getfinanceCheck(){
+      this.loading = true;
+      financeCheck({ tradeType: this.tradeType })
+        .then(res => {
+          this.list.forEach(e => {
+            if (e.text == "申请付款/待审核") {
+              e.qty = res.data.data;
+            }
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    refresh() {
+      this.getCheckDate();
+      this.getshipCheckDate();
+      this.getfinanceCheck()
     }
   }
 };

+ 7 - 0
src/views/wel/components/quick-launch.vue

@@ -63,6 +63,10 @@
         </div>
       </div>
       <div class="content" v-if="sysType == 4 || sysType == 2">
+        <div class="content-icon" @click="inPage('bj')">
+          <i class="tradingIcon icon-sales" style="color:#606266"></i>
+          <span>报价</span>
+        </div>
         <div class="content-icon" @click="inPage('xs')">
           <i class="tradingIcon icon-sales" style="color:#409EFF"></i>
           <span>销售</span>
@@ -122,6 +126,9 @@ export default {
       //出口
       if (this.sysType == 4) {
         switch (type) {
+          case "bj":
+            this.$router.push("/exportTrade/customerInquiry/index");
+            break;
           case "xs":
             this.$router.push("/exportTrade/salesContract/index");
             break;

+ 71 - 10
src/views/wel/components/realtime-data.vue

@@ -35,11 +35,25 @@
             <div class="card">
               <div class="card-title card-title1">
                 <span>
+                  报
+                </span>
+              </div>
+              <div class="card-content">
+                <span class="card-content-num">{{ data1.offerNumber }}</span>
+                <span class="card-content-text">报价订单</span>
+              </div>
+            </div>
+          </div>
+          <div class="divider" />
+          <div class="content-item">
+            <div class="card">
+              <div class="card-title card-title1">
+                <span>
                 </span>
               </div>
               <div class="card-content">
-                <span class="card-content-num">1</span>
+                <span class="card-content-num">{{ data1.sellNumber }}</span>
                 <span class="card-content-text">销售订单</span>
               </div>
             </div>
@@ -53,7 +67,7 @@
                 </span>
               </div>
               <div class="card-content">
-                <span class="card-content-num">1</span>
+                <span class="card-content-num">{{ data1.purchaseNumber }}</span>
                 <span class="card-content-text">采购订单</span>
               </div>
             </div>
@@ -67,8 +81,8 @@
                 </span>
               </div>
               <div class="card-content">
-                <span class="card-content-num">1</span>
-                <span class="card-content-text">发货量</span>
+                <span class="card-content-num">{{ data2.sellNumber }}</span>
+                <span class="card-content-text">发货量</span>
               </div>
             </div>
           </div>
@@ -81,8 +95,8 @@
                 </span>
               </div>
               <div class="card-content">
-                <span class="card-content-num">1</span>
-                <span class="card-content-text">收货量</span>
+                <span class="card-content-num">{{ data2.purchaseNumber }}</span>
+                <span class="card-content-text">收货量</span>
               </div>
             </div>
           </div>
@@ -136,6 +150,7 @@
 </template>
 
 <script>
+import { realTimeData, shipRealTimeData } from "@/api/wel";
 export default {
   name: "basicContainer",
   props: {
@@ -144,15 +159,61 @@ export default {
   data() {
     return {
       isActive: true,
-      loading: false
+      loading: false,
+      data1: {},
+      data2: {},
+      tradeType: null
     };
   },
+  created() {
+    this.getSysType();
+  },
+  mounted() {
+    this.init();
+  },
   methods: {
+    init() {
+      this.getrealTimeData();
+      this.getshipRealTimeData();
+    },
     refresh() {
+      this.init();
+    },
+    getSysType() {
+      const sysType = localStorage.getItem("sysitemType");
+      if (sysType == 6) {
+        this.tradeType = "JXS";
+      } else if (sysType == 5) {
+        this.tradeType = "SW";
+      } else if (sysType == 4) {
+        this.tradeType = "CK";
+      } else if (sysType == 3) {
+        this.tradeType = "JK";
+      } else if (sysType == 2) {
+        this.tradeType = "GN";
+      } else if (sysType == 1) {
+        this.tradeType = "XX";
+      }
+    },
+    getrealTimeData() {
       this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-      }, 1000);
+      realTimeData({ tradeType: this.tradeType })
+        .then(res => {
+          this.data1 = res.data.data;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    getshipRealTimeData() {
+      this.loading = true;
+      shipRealTimeData({ tradeType: this.tradeType})
+        .then(res => {
+          this.data2 = res.data.data;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     inDay() {
       this.isActive = true;

+ 51 - 18
src/views/wel/components/sales-reached.vue

@@ -3,7 +3,7 @@
     <el-card class="home-container__card">
       <div class="title">
         <span>
-          当月销售
+          当月报价
         </span>
         <span>
           <i
@@ -18,19 +18,19 @@
           <div id="ringData" ref="ringData" style="width:20vw;height:33vh" />
           <div>
             <div class="content_item">
-              <div class="content_item_num">100,000</div>
-              <div class="content_item_text">目标金额</div>
+              <div class="content_item_num">{{ data.grossAmount }}</div>
+              <div class="content_item_text">订单总金额</div>
             </div>
             <div class="content_item">
-              <div class="content_item_num">20</div>
-              <div class="content_item_text">达成金额</div>
+              <div class="content_item_num">{{ data.reachAmount }}</div>
+              <div class="content_item_text">达成</div>
             </div>
             <div class="content_item">
               <div class="divider" />
             </div>
             <div class="content_item">
-              <div class="content_item_num">20</div>
-              <div class="content_item_text">达成金额</div>
+              <div class="content_item_num">{{ data.notReachAmount }}</div>
+              <div class="content_item_text">达成</div>
             </div>
           </div>
         </div>
@@ -40,22 +40,55 @@
 </template>
 
 <script>
+import { monthSales } from "@/api/wel";
 export default {
   name: "basicContainer",
   data() {
     return {
-      loading: false
+      loading: false,
+      tradeType: null,
+      data: {}
     };
   },
+  created() {
+    this.getSysType();
+  },
   mounted() {
-    this.ringData();
+    this.init();
   },
   methods: {
-    refresh() {
+    init() {
+      this.getmonthSales();
+    },
+    getSysType() {
+      const sysType = localStorage.getItem("sysitemType");
+      if (sysType == 6) {
+        this.tradeType = "JXS";
+      } else if (sysType == 5) {
+        this.tradeType = "SW";
+      } else if (sysType == 4) {
+        this.tradeType = "CK";
+      } else if (sysType == 3) {
+        this.tradeType = "JK";
+      } else if (sysType == 2) {
+        this.tradeType = "GN";
+      } else if (sysType == 1) {
+        this.tradeType = "XX";
+      }
+    },
+    getmonthSales() {
       this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-      }, 1000);
+      monthSales({ tradeType: this.tradeType, billType: "BJ" })
+        .then(res => {
+          this.data = res.data.data;
+        })
+        .finally(() => {
+          this.loading = false;
+          this.ringData();
+        });
+    },
+    refresh() {
+      this.init();
     },
     ringData() {
       let ringData = this.$echarts.init(document.getElementById("ringData"));
@@ -73,7 +106,7 @@ export default {
             left: "center",
             top: "43%",
             style: {
-              text: "5%",
+              text: this.data.yieldRate + "%",
               textAlign: "center",
               fill: "#000",
               fontSize: 24
@@ -84,7 +117,7 @@ export default {
             left: "center",
             top: "53%",
             style: {
-              text: "销售达成率",
+              text: "报价达成率",
               textAlign: "center",
               fill: "#999999",
               fontSize: 16
@@ -94,7 +127,7 @@ export default {
         color: ["#F6695E", "#E3E3E3"],
         series: [
           {
-            name: "当月销售",
+            name: "当月报价",
             type: "pie",
             radius: ["55%", "70%"],
             avoidLabelOverlap: false,
@@ -106,8 +139,8 @@ export default {
               show: false
             },
             data: [
-              { value: 5, name: "已销售数量" },
-              { value: 95, name: "未销售数量" }
+              { value: Number(this.data.reachAmount), name: "已报价数量" },
+              { value: Number(this.data.notReachAmount), name: "未报价数量" }
             ]
           }
         ]

+ 98 - 35
src/views/wel/components/sales-trend.vue

@@ -1,39 +1,52 @@
 <template>
   <div class="home-container">
-    <el-card  class="home-container__card">
+    <el-card class="home-container__card">
       <div v-if="sysType !== 5">
         <div class="title">
-        <span>
-          销售趋势
-        </span>
           <span>
-          <i
-            class="el-icon-refresh-right"
-            style="cursor: pointer;font-size:20px"
-            @click="refresh"
-          ></i>
-        </span>
+            销售趋势
+          </span>
+          <span>
+            <i
+              class="el-icon-refresh-right"
+              style="cursor: pointer;font-size:20px"
+              @click="refresh"
+            ></i>
+          </span>
         </div>
+
         <div class="content" v-loading="loading">
+          <div class="content-year">
+            <el-date-picker
+              v-model="annual"
+              type="year"
+              size="mini"
+              placeholder="选择年"
+              value-format="yyyy"
+              style="margin-right:10px"
+              @change="getsalesTrend"
+            />
+          </div>
+
           <div
             id="polylineData"
             ref="polylineData"
-            style="width:60vw;height:33vh"
+            style="width:55vw;height:33vh"
           />
         </div>
       </div>
       <div v-if="sysType === 5">
         <div class="title">
-        <span>
-          业绩趋势
-        </span>
           <span>
-          <i
-            class="el-icon-refresh-right"
-            style="cursor: pointer;font-size:20px"
-            @click="refresh"
-          ></i>
-        </span>
+            业绩趋势
+          </span>
+          <span>
+            <i
+              class="el-icon-refresh-right"
+              style="cursor: pointer;font-size:20px"
+              @click="refresh"
+            ></i>
+          </span>
         </div>
         <div class="content" v-loading="loading">
           <div
@@ -48,6 +61,7 @@
 </template>
 
 <script>
+import { salesTrend } from "@/api/wel";
 export default {
   name: "basicContainer",
   props: {
@@ -55,35 +69,79 @@ export default {
   },
   data() {
     return {
-      loading: false
+      loading: false,
+      annual: "2022",
+      tradeType: null,
+      moneyList: []
     };
   },
+  created() {
+    this.getSysType();
+  },
   mounted() {
-    this.polylineData();
+    this.init();
   },
   methods: {
-    refresh() {
+    init() {
+      this.getsalesTrend();
+    },
+    getSysType() {
+      const sysType = localStorage.getItem("sysitemType");
+      if (sysType == 6) {
+        this.tradeType = "JXS";
+      } else if (sysType == 5) {
+        this.tradeType = "SW";
+      } else if (sysType == 4) {
+        this.tradeType = "CK";
+      } else if (sysType == 3) {
+        this.tradeType = "JK";
+      } else if (sysType == 2) {
+        this.tradeType = "GN";
+      } else if (sysType == 1) {
+        this.tradeType = "XX";
+      }
+    },
+    getsalesTrend() {
       this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-      }, 1000);
+      this.moneyList=[]
+      salesTrend({
+        tradeType: this.tradeType,
+        billType: "XS",
+        annual: this.annual
+      })
+        .then(res => {
+          res.data.data.forEach(e => {
+            this.moneyList.push(Number(e.money));
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+          this.polylineData();
+        });
+    },
+    refresh() {
+      this.init()
     },
     polylineData() {
       let polylineData = this.$echarts.init(
         document.getElementById("polylineData")
       );
-      // document.getElementById("polylineDatas")
       polylineData.setOption({
         xAxis: {
           type: "category",
           data: [
-            "2022-01-01",
-            "2022-01-01",
-            "2022-01-05",
-            "2022-01-09",
-            "2022-01-13",
-            "2022-01-17",
-            "2022-01-21"
+            "一月",
+            "二月",
+            "三月",
+            "四月",
+            "五月",
+            "六月",
+            "七月",
+            "八月",
+            "九月",
+            "十月",
+            "十一月",
+            "十二月"
           ]
         },
         yAxis: {
@@ -91,7 +149,7 @@ export default {
         },
         series: [
           {
-            data: [1, 4, 6, 7, 8, 10, 20],
+            data: this.moneyList,
             type: "line",
             smooth: true
           }
@@ -122,5 +180,10 @@ export default {
 }
 .content {
   display: flex;
+  flex-direction: column;
+  &-year {
+    display: flex;
+    justify-content: right;
+  }
 }
 </style>

+ 114 - 29
src/views/wel/home/tongjiSchool.vue

@@ -46,7 +46,7 @@
     </basic-container>
     <basic-container>
       <index-card
-        title="工资走势图"
+        title="工资环比走势图"
         iconName="el-icon-s-fold"
         style="height:500px;margin-bottom: 30px"
       >
@@ -84,7 +84,7 @@
     </basic-container>
     <basic-container>
       <index-card
-        title="工资比走势图"
+        title="工资比走势图"
         iconName="el-icon-s-fold"
         style="height:500px;margin-bottom: 30px"
       >
@@ -132,6 +132,21 @@
             >
             </el-option>
           </el-select>
+           <el-select
+            slot="content"
+            size="mini"
+            v-model="salaryType3"
+            placeholder="请选择"
+            @change="getsalaryDataChain"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
         </div>
 
         <div slot="content" style="height:450px" id="commoDity2"></div>
@@ -142,7 +157,11 @@
 </template>
 
 <script>
-import { salaryStatistics, salaryData, salaryDataChain } from "@/api/wel";
+import {
+  salaryStatistics,
+  salaryData,
+  salaryDataChain
+} from "@/api/wel";
 import { mapGetters } from "vuex";
 import indexCard from "../components/card.vue";
 import butCard from "../components/butCard.vue";
@@ -150,6 +169,7 @@ export default {
   name: "wel",
   data() {
     return {
+      tradeType: null,
       moon: null,
       semester: null,
       moonList: [],
@@ -164,6 +184,7 @@ export default {
       annual3: "2022",
       salaryType: "",
       salaryType2: "",
+      salaryType3:"",
       isHeight: {},
       options: [
         {
@@ -319,8 +340,8 @@ export default {
       })
         .then(res => {
           res.data.data.forEach(e => {
-            this.fsalaryList.push(Number(e.fsalary));
-            this.studentNumberList.push(Number(e.studentNumber));
+            this.fsalaryList.push(Number(e.fsalary).toFixed(6));
+            this.studentNumberList.push(Number(e.studentNumber).toFixed(2));
           });
         })
         .finally(() => {
@@ -342,7 +363,8 @@ export default {
       salaryDataChain({
         annual: this.annual3,
         moon: this.moon,
-        semester: this.semester
+        semester: this.semester,
+        salaryType:this.salaryType3
       })
         .then(res => {
           let data = res.data.data;
@@ -350,17 +372,27 @@ export default {
             this.yearList.push(Number(this.annual3) - i + "年");
           }
           this.fsalaryList2.push(Number(data.fsalary));
-          this.fsalaryList2.push(Number(data.fsalaryOne));
-          this.fsalaryList2.push(Number(data.fsalaryTwo));
-          this.fsalaryList2.push(Number(data.fsalaryThree));
-          this.fsalaryList2.push(Number(data.fsalaryFour));
-          this.fsalaryList2.push(Number(data.fsalaryFive));
-          this.studentNumberList2.push(Number(data.studentNumber));
-          this.studentNumberList2.push(Number(data.studentNumberOne));
-          this.studentNumberList2.push(Number(data.studentNumberTwo));
-          this.studentNumberList2.push(Number(data.studentNumberThree));
-          this.studentNumberList2.push(Number(data.studentNumberFour));
-          this.studentNumberList2.push(Number(data.studentNumberFive));
+          this.fsalaryList2.push(Number(data.fsalaryOne).toFixed(2));
+          this.fsalaryList2.push(Number(data.fsalaryTwo).toFixed(2));
+          this.fsalaryList2.push(Number(data.fsalaryThree).toFixed(2));
+          this.fsalaryList2.push(Number(data.fsalaryFour).toFixed(2));
+          this.fsalaryList2.push(Number(data.fsalaryFive).toFixed(2));
+          this.studentNumberList2.push(Number(data.studentNumber).toFixed(2));
+          this.studentNumberList2.push(
+            Number(data.studentNumberOne).toFixed(2)
+          );
+          this.studentNumberList2.push(
+            Number(data.studentNumberTwo).toFixed(2)
+          );
+          this.studentNumberList2.push(
+            Number(data.studentNumberThree).toFixed(2)
+          );
+          this.studentNumberList2.push(
+            Number(data.studentNumberFour).toFixed(2)
+          );
+          this.studentNumberList2.push(
+            Number(data.studentNumberFive).toFixed(2)
+          );
         })
         .finally(() => {
           this.commoDity2();
@@ -399,7 +431,6 @@ export default {
     commoDity() {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
       let myChart = this.$echarts.init(document.getElementById("commoDity"));
-
       // 绘制图表
       myChart.setOption({
         tooltip: {
@@ -434,12 +465,38 @@ export default {
           bottom: "3%",
           containLabel: true
         },
-        yAxis: {
-          type: "value",
-          axisLabel: {
-            formatter: "{value} 元"
+        yAxis: [
+          {
+            type: "value",
+            name: "人民币",
+            position: "left",
+            alignTicks: true,
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#5470C6"
+              }
+            },
+            axisLabel: {
+              formatter: "{value} 元"
+            }
+          },
+          {
+            type: "value",
+            name: "人数",
+            position: "right",
+            alignTicks: true,
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#91CC75"
+              }
+            },
+            axisLabel: {
+              formatter: "{value} 人"
+            }
           }
-        },
+        ],
         series: [
           {
             data: this.fsalaryList,
@@ -449,6 +506,7 @@ export default {
           {
             data: this.studentNumberList,
             name: "人数",
+            yAxisIndex: 1,
             type: "bar"
           }
         ]
@@ -471,7 +529,7 @@ export default {
         },
         xAxis: {
           type: "category",
-          data: this.yearList,
+          data: this.yearList
         },
         grid: {
           left: "3%",
@@ -479,12 +537,38 @@ export default {
           bottom: "3%",
           containLabel: true
         },
-        yAxis: {
-          type: "value",
-          axisLabel: {
-            formatter: "{value} 元"
+        yAxis: [
+          {
+            type: "value",
+            name: "人民币",
+            position: "left",
+            alignTicks: true,
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#5470C6"
+              }
+            },
+            axisLabel: {
+              formatter: "{value} 元"
+            }
+          },
+          {
+            type: "value",
+            name: "人数",
+            position: "right",
+            alignTicks: true,
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#91CC75"
+              }
+            },
+            axisLabel: {
+              formatter: "{value} 人"
+            }
           }
-        },
+        ],
         series: [
           {
             data: this.fsalaryList2,
@@ -494,6 +578,7 @@ export default {
           {
             data: this.studentNumberList2,
             name: "人数",
+            yAxisIndex: 1,
             type: "bar"
           }
         ]