Browse Source

提交瑞金

caojunjie 2 years ago
parent
commit
633aec3fe3

+ 9 - 1
src/api/basicData/invoice.js

@@ -68,6 +68,14 @@ export const getDeptLazyTree = (parentId) => {
       }
   })
 }
+//修改发货状态
+export function purchaseStatusUpdate(query) {
+    return request({
+        url: '/api/blade-deliver-goods/exportDelivery/documentaryStatusUpdate',
+        method: 'post',
+        data: query
+    })
+}
 //规格
 export function getSpecification(query) {
   return request({
@@ -103,4 +111,4 @@ export function gainUser(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 13 - 2
src/api/basicData/salesContract.js

@@ -50,7 +50,7 @@ export function submit(data) {
 //修改和新增
 export function deliverGoods(data) {
   return request({
-    url: '/api/blade-purchase-sales/exportOrder/deliverGoods',
+    url: '/api/blade-purchase-sales/exportOrder/generateShipment',
     method: 'post',
     data: data
   })
@@ -110,6 +110,17 @@ export function saveSell(data) {
     }
   })
 }
+//销售页面生成采购
+export function generatePurchaseNews(data,fudaPurchaseDate) {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/generatePurchaseNews',
+    method: 'post',
+    data: {
+      id: data,
+      fudaPurchaseDate:fudaPurchaseDate
+    }
+  })
+}
 //生成销售单
 export function gainUser(query) {
   return request({
@@ -175,4 +186,4 @@ export const calculationDomesticFees = (data) => {
     method: 'post',
     data: data
   })
-}
+}

+ 16 - 1
src/api/exportTrade/purchaseContract.js

@@ -12,6 +12,13 @@ export const getList = (current, size, params) => {
     }
   })
 }
+export const listXS = (params) => {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/listXS',
+    method: 'get',
+    params: params
+  })
+}
 export function detail(id) {
   return request({
     url: '/api/trade-purchase/purchase-order/' + id,
@@ -97,6 +104,14 @@ export function getSpecification(query) {
     params: query
   })
 }
+//修改采购状态
+export function purchaseStatusUpdate(query) {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/purchaseStatusUpdate',
+    method: 'post',
+    params: query
+  })
+}
 // 获取销售订单明细详情
 export function getCKMarketDetailsList(current,size,params) {
   return request({
@@ -124,4 +139,4 @@ export function pleaseCheck(data) {
     method: 'post',
     data: data
   })
-}
+}

+ 7 - 0
src/api/wel.js

@@ -146,3 +146,10 @@ export const businessStatisticsFrequency = (query) => {
     params: query
   })
 }
+export const documentQuantityStatistics = (query) => {
+  return request({
+    url: '/api/blade-purchase-sales/exportOrder/documentQuantityStatistics',
+    method: 'get',
+    params: query
+  })
+}

+ 112 - 72
src/views/exportTrade/invoice/config/mainList.json

@@ -18,100 +18,143 @@
   "column": [{
       "label": "销售订单号",
       "prop": "orgOrderNo",
-      "index": 1,
       "minWidth": 100,
       "overHidden": true,
       "search": true,
       "searchSpan": 8
     },
     {
-      "label": "出库日期",
-      "prop": "businessDate",
-      "search": true,
-      "searchSpan": 8,
-      "index": 2,
-      "minWidth": 80,
-      "overHidden": true,
-      "type": "date",
-      "format": "yyyy-MM-dd"
-    },
-    {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "searchSpan": 8,
-      "index": 3,
       "minWidth": 80,
       "overHidden": true
     },
     {
-      "label": "所属公司",
-      "prop": "salesCompany",
-      "search": true,
-      "searchSpan": 8,
-      "index": 4,
-      "minWidth": 80,
+      "label": "客户详情",
+      "prop": "clientMessage",
       "overHidden": true
-    },
-    {
-      "label": "商品名称",
-      "prop": "",
-      "search": true,
-      "index": 5,
-      "minWidth": 80,
-      "overHidden": true,
-      "hide": true,
-      "showColumn": false,
-      "searchSpan": 8
-    },
-    {
-      "label": "仓库",
-      "prop": "storageId",
-      "search": true,
+    },{
+      "label": "订单日期",
+      "prop": "businesDate",
+      "searchProp": "businesDateList",
+      "width": 100,
+      "type": "date",
       "searchSpan": 8,
-      "index": 6,
-      "minWidth": 80,
+      "searchRange": true,
+      "search": true,
+      "searchDefaultTime": ["00:00:00", "23:59:59"],
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
       "overHidden": true
-    },
-    {
-      "label": "出库数量",
-      "prop": "totalQuantity",
-      "index": 7,
-      "minWidth": 80,
+    },{
+      "label": "订单状态",
+      "prop": "deliveryStatus",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
+      "props": {
+        "label": "dictValue",
+        "value": "dictValue"
+      },
+      "searchSpan": 8,
+      "search": true,
       "overHidden": true
-    },
-    {
-      "label": "出库金额",
-      "prop": "deliveryAmount",
-      "index": 8,
-      "minWidth": 80,
+    },{
+      "label": "计划交货日期",
+      "prop": "plannedDeliveryDate",
       "overHidden": true
-    },
-    {
-      "label": "收货地址",
-      "prop": "arrivalAddress",
+    },{
+      "label": "起运港",
+      "prop": "portOfLoad",
       "search": true,
       "searchSpan": 8,
-      "index": 9,
-      "minWidth": 80,
       "overHidden": true
-    },
-    {
-      "label": "收货人",
-      "prop": "arrivalContact",
+    },{
+      "label": "目的港",
+      "prop": "portOfDestination",
       "search": true,
       "searchSpan": 8,
-      "index": 10,
-      "minWidth": 80,
       "overHidden": true
-    },
-    {
-      "label": "收货电话",
-      "prop": "arrivalTel",
-      "search": true,
-      "searchSpan": 8,
-      "index": 11,
-      "minWidth": 80,
+    },{
+      "label": "运输方式",
+      "prop": "transport",
+      "overHidden": true
+    },{
+      "label": "日期条款",
+      "prop": "dateClause",
+      "overHidden": true
+    },{
+      "label": "日期说明",
+      "prop": "dateDesc",
+      "overHidden": true
+    },{
+      "label": "货物类型",
+      "prop": "cargoType",
+      "overHidden": true
+    },{
+      "label": "价格条款",
+      "prop": "priceTerms",
+      "overHidden": true
+    },{
+      "label": "价格条款描述",
+      "prop": "priceTermsDescription",
+      "overHidden": true
+    },{
+      "label": "付款方式",
+      "prop": "paymentType",
+      "overHidden": true
+    },{
+      "label": "收付款方式描述",
+      "prop": "paymentTypeDescription",
+      "overHidden": true
+    },{
+      "label": "币别",
+      "prop": "currency",
+      "overHidden": true
+    },{
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "overHidden": true
+    },{
+      "label": "采购备注",
+      "prop": "purchaseRemark",
+      "overHidden": true
+    },{
+      "label": "船务备注",
+      "prop": "shippingRemark",
+      "overHidden": true
+    },{
+      "label": "预计货好状态",
+      "prop": "estimateGoodGoods",
+      "overHidden": true
+    },{
+      "label": "预计货好日期",
+      "prop": "estimateGoodGoodsDate",
+      "overHidden": true
+    },{
+      "label": "跟单状态",
+      "prop": "documentaryStatus",
+      "overHidden": true
+    },{
+      "label": "跟单日期",
+      "prop": "documentaryDate",
+      "overHidden": true
+    },{
+      "label": "报关状态",
+      "prop": "customsStatus",
+      "overHidden": true
+    },{
+      "label": "报关日期",
+      "prop": "customsDate",
+      "overHidden": true
+    },{
+      "label": "出运状态",
+      "prop": "shippingStatus",
+      "overHidden": true
+    },{
+      "label": "出运日期",
+      "prop": "shippingDate",
       "overHidden": true
     },
     {
@@ -119,14 +162,12 @@
       "prop": "deliveryRemarks",
       "search": true,
       "searchSpan": 8,
-      "index": 12,
       "minWidth": 80,
       "overHidden": true
     },
     {
       "label": "制单日期",
       "prop": "createTime",
-      "index": 13,
       "minWidth": 80,
       "search": true,
       "overHidden": true,
@@ -137,7 +178,6 @@
     {
       "label": "制单人",
       "prop": "createUser",
-      "index": 14,
       "minWidth": 80,
       "search": true,
       "overHidden": true,

+ 172 - 85
src/views/exportTrade/invoice/detailsPage.vue

@@ -20,28 +20,28 @@
           @click.stop="openEdit"
           >编辑
         </el-button>
-        <el-button
-          type="info"
-          @click.stop="editCustomer('save')"
-          v-if="form.deliveryStatus == '录入'"
-          size="small"
-          >确认发货</el-button
-        >
-        <el-button
-          type="info"
-          @click.stop="editCustomer('repeal')"
-          v-if="form.deliveryStatus != '录入'"
-          size="small"
-          >撤销发货</el-button
-        >
-        <el-button
-          type="success"
-          :disabled="!form.id"
-          size="small"
-          @click="copyDoc"
-        >
-          复制单据
-        </el-button>
+<!--        <el-button-->
+<!--          type="info"-->
+<!--          @click.stop="editCustomer('save')"-->
+<!--          v-if="form.deliveryStatus == '录入'"-->
+<!--          size="small"-->
+<!--          >确认发货</el-button-->
+<!--        >-->
+<!--        <el-button-->
+<!--          type="info"-->
+<!--          @click.stop="editCustomer('repeal')"-->
+<!--          v-if="form.deliveryStatus != '录入'"-->
+<!--          size="small"-->
+<!--          >撤销发货</el-button-->
+<!--        >-->
+<!--        <el-button-->
+<!--          type="success"-->
+<!--          :disabled="!form.id"-->
+<!--          size="small"-->
+<!--          @click="copyDoc"-->
+<!--        >-->
+<!--          复制单据-->
+<!--        </el-button>-->
         <el-button
           type="primary"
           :disabled="disabled"
@@ -114,6 +114,12 @@
               @click.stop="openReport()"
               >报表打印</el-button
             >
+            <el-button type="info" size="small" :disabled="!form.id || form.customsStatus" @click.native="dialog = true;fudaSatus = 1"
+            >已报关</el-button>
+            <el-button type="info" size="small" :disabled="!form.id || form.shippingStatus" @click.native="dialog = true;fudaSatus = 2"
+            >已出运</el-button>
+            <el-button type="info" size="small" :disabled="!form.id || form.documentaryStatus != '跟单中'" @click.native="dialog = true;fudaSatus = 3"
+            >已完成</el-button>
           </template>
           <template slot-scope="{ row }" slot="corpId">
             {{ row.corpsName }}
@@ -280,6 +286,27 @@
       reportName="客户询价"
       @onClose="onClose()"
     ></report-dialog>
+    <el-dialog
+        title="选择日期"
+        :visible.sync="dialog"
+        v-if="dialog"
+        width="30%"
+        append-to-body>
+      <span>
+        <el-date-picker
+            v-model="pickerValue"
+            type="date"
+            style="width: 100%;"
+            size="small"
+            value-format="yyyy-MM-dd HH:ss:mm"
+            placeholder="选择日期">
+      </el-date-picker>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialog = false;pickerValue = ''">取 消</el-button>
+        <el-button type="primary" @click="PSModification(fudaSatus)">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -295,7 +322,7 @@ import {
   getGoods,
   getSpecification,
   save,
-  repeal
+  repeal, purchaseStatusUpdate
 } from "@/api/basicData/invoice";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
@@ -306,6 +333,9 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
+      fudaSatus:0,
+      dialog:false,
+      pickerValue:'',
       treeStyle: "height:" + (window.innerHeight - 315) + "px",
       configuration2: {
         multipleChoices: false,
@@ -363,70 +393,94 @@ export default {
             row: true
           },
           {
-            label: "仓库名称",
-            prop: "storageId",
-            span: 8
-          },
-          {
-            label: "仓库类型",
-            prop: "warehouseType",
-            span: 8
-          },
-          {
-            label: "发货日期",
-            prop: "businessDate",
+            label: "客户详情",
+            prop: "clientMessage",
             span: 8,
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ]
-          },
-          {
-            label: "出库数量",
-            prop: "totalQuantity",
+            disabled: true,
+          },{
+            label: "订单日期",
+            prop: "businesDate",
             span: 8,
-            disabled: true
-          },
-          {
-            label: "出库金额",
-            prop: "deliveryAmount",
+            disabled: true,
+          },{
+            label: "计划交货日期",
+            prop: "plannedDeliveryDate",
             span: 8,
-            disabled: true
-          },
-          {
-            label: "费用合计",
-            prop: "totalCost",
-            span: 8
-          },
-          {
-            label: "收货人",
-            prop: "arrivalContact",
-            span: 8
-          },
-          {
-            label: "收货电话",
-            prop: "arrivalTel",
-            span: 8
-          },
-          {
-            label: "收货地址",
-            prop: "arrivalAddress",
-            span: 8
-          },
-          {
-            label: "制单时间",
-            prop: "createTime",
+            disabled: true,
+          },{
+            label: "起运港",
+            prop: "portOfLoad",
+            span: 8,
+            disabled: true,
+          },{
+            label: "目的港",
+            prop: "portOfDestination",
+            span: 8,
+            disabled: true,
+          },{
+            label: "运输方式",
+            prop: "transport",
+            span: 8,
+            disabled: true,
+          },{
+            label: "日期条款",
+            prop: "dateClause",
+            span: 8,
+            disabled: true,
+          },{
+            label: "日期说明",
+            prop: "dateDesc",
+            span: 8,
+            disabled: true,
+          },{
+            label: "货物类型",
+            prop: "cargoType",
+            span: 8,
+            disabled: true,
+          },{
+            label: "价格条款",
+            prop: "priceTerms",
+            span: 8,
+            disabled: true,
+          },{
+            label: "价格条款描述",
+            prop: "priceTermsDescription",
             span: 8,
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
-            disabled: true
+            disabled: true,
+          },{
+            label: "付款方式",
+            prop: "paymentType",
+            span: 8,
+            disabled: true,
+          },{
+            label: "收付款方式描述",
+            prop: "paymentTypeDescription",
+            span: 8,
+            disabled: true,
+          },{
+            label: "币别",
+            prop: "currency",
+            span: 8,
+            disabled: true,
+          },{
+            label: "汇率",
+            prop: "exchangeRate",
+            span: 8,
+            disabled: true,
+          },{
+            label: "采购备注",
+            prop: "purchaseRemark",
+            type: "textarea",
+            minRows: 2,
+            disabled: true,
+            span: 24
+          },{
+            label: "船务备注",
+            prop: "shippingRemark",
+            type: "textarea",
+            minRows: 2,
+            disabled: true,
+            span: 24
           },
           {
             label: "备注",
@@ -537,6 +591,32 @@ export default {
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
     },
+    PSModification(type){
+      if (!this.pickerValue)return this.$message.error("请选择日期")
+      const loading = this.$loading({
+        lock: true,
+        text: '操作中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      purchaseStatusUpdate({
+        id:this.form.id,
+        documentaryStatusType:type,
+        documentaryDate:this.pickerValue,
+        customsDate:this.pickerValue,
+        shippingDate:this.pickerValue
+      }).then(res=>{
+        loading.close();
+        this.$message.success("操作成功")
+        this.pickerValue = ''
+        this.dialog = false
+        this.getDetail(this.form.id);
+      }).catch((err)=>{
+        loading.close();
+        this.pickerValue = ''
+        this.dialog = false
+      })
+    },
     rePick(row, index) {
       this.reData = {
         ...row,
@@ -721,6 +801,12 @@ export default {
       this.loading = true;
       this.showBut = false;
       this.pageLoading = true;
+      const loading = this.$loading({
+        lock: true,
+        text: '操作中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
       detail(id)
         .then(res => {
           if (this.detailData.status == "copy") {
@@ -785,11 +871,12 @@ export default {
           this.oldorderFilesList = this.deepClone(
             res.data.data.deliveryFilesList
           );
-        })
-        .finally(() => {
+          loading.close();
+        }).finally(() => {
           this.loading = false;
           this.showBut = true;
           this.pageLoading = false;
+        loading.close();
         });
     },
     getGenerate(data) {

+ 21 - 32
src/views/exportTrade/invoice/index.vue

@@ -47,36 +47,25 @@
             >{{ scope.row.orgOrderNo }}
           </span>
         </template>
-        <template slot="storageIdSearch">
-          <warehouse-select
-            v-model="search.storageId"
-            :configuration="configuration2"
-          ></warehouse-select>
-        </template>
-        <template slot="businessDateSearch">
-          <el-date-picker
-            v-model="search.businessDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
+
         <template slot="createTimeSearch">
           <el-date-picker
-            v-model="search.createTime"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
+              v-model="search.createTime"
+              type="daterange"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']"
           >
           </el-date-picker>
         </template>
+        <template slot="portOfLoadSearch">
+          <port-info v-model="search.portOfLoad" />
+        </template>
+        <template slot="portOfDestinationSearch">
+          <port-info v-model="search.portOfDestination" />
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -85,13 +74,13 @@
             @click.stop="newAdd()"
             >创建单据
           </el-button>
-          <el-button
-            type="success"
-            size="small"
-            @click.stop="copyDoc()"
-            :disabled="selectionList.length != 1"
-            >复制单据</el-button
-          >
+<!--          <el-button-->
+<!--            type="success"-->
+<!--            size="small"-->
+<!--            @click.stop="copyDoc()"-->
+<!--            :disabled="selectionList.length != 1"-->
+<!--            >复制单据</el-button-->
+<!--          >-->
           <el-button type="info" size="small">报表打印</el-button>
         </template>
         <template slot="corpIdSearch">

+ 110 - 0
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -95,6 +95,116 @@
       "overHidden": true
     },
     {
+      "label": "数量",
+      "prop": "storageQuantity",
+      "index": 8.1,
+      "minWidth": 80,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "采购数",
+      "prop": "purchaseQuantity",
+      "index": 8.2,
+      "minWidth": 80,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "发货数",
+      "prop": "deliverQuantity",
+      "index": 8.3,
+      "minWidth": 80,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "客户收货数",
+      "prop": "receiveQuantity",
+      "index": 8.4,
+      "minWidth": 90,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "发货数量",
+      "prop": "actualQuantity",
+      "index": 8.5,
+      "minWidth": 80,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "采购员",
+      "prop": "buyerName",
+      "index": 8.51,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "跟单员",
+      "prop": "documenterName",
+      "index": 8.52,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "采购状态",
+      "prop": "fudaPurchaseStatus",
+      "index": 8.53,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "采购日期",
+      "prop": "fudaPurchaseDate",
+      "index": 8.54,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "排产状态",
+      "prop": "productionScheduling",
+      "index": 8.55,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "排产日期",
+      "prop": "productionSchedulingDate",
+      "index": 8.56,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "预计货好状态",
+      "prop": "estimateGoodGoods",
+      "index": 8.57,
+      "minWidth": 100,
+      "overHidden": true
+    },
+    {
+      "label": "预计货好日期",
+      "prop": "estimateGoodGoodsDate",
+      "index": 8.58,
+      "minWidth": 100,
+      "overHidden": true
+    },
+    {
+      "label": "跟单状态",
+      "prop": "documentaryStatus",
+      "index": 8.59,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "跟单日期",
+      "prop": "documentaryDate",
+      "index": 8.6,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
       "label": "收货金额",
       "prop": "",
       "index": 9,

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

@@ -52,8 +52,13 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="!form.id" @click.native="copyDoc"
-              >复制单据</el-dropdown-item
-            >
+              >复制单据</el-dropdown-item>
+            <el-dropdown-item v-if="!form.fudaPurchaseStatus" :disabled="!form.id" @click.native="PSModification(1)"
+              >排产中</el-dropdown-item>
+            <el-dropdown-item v-if="!form.productionScheduling" :disabled="!form.id" @click.native="PSModification(2)"
+              >预计货好</el-dropdown-item>
+            <el-dropdown-item v-if="form.estimateGoodGoods == '待采购'" :disabled="!form.id" @click.native="PSModification(3)"
+              >采购完成</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
         <el-button
@@ -62,9 +67,7 @@
           @click="editCustomer"
           :loading="subLoading"
           v-if="detailData.status != 1"
-          size="small"
-          >保存数据
-        </el-button>
+          size="small">保存数据</el-button>
       </div>
     </div>
     <div class="customer-main">
@@ -186,14 +189,14 @@
                 @click.stop="openReport()"
                 >报表打印</el-button
               >
-              <el-button
-                type="warning"
-                icon="el-icon-plus"
-                size="small"
-                :disabled="detailData.status == 1 || orderItemIds.length == 0"
-                @click="getInvoice"
-                >生成收货单
-              </el-button>
+<!--              <el-button-->
+<!--                type="warning"-->
+<!--                icon="el-icon-plus"-->
+<!--                size="small"-->
+<!--                :disabled="detailData.status == 1 || orderItemIds.length == 0"-->
+<!--                @click="getInvoice"-->
+<!--                >生成收货单-->
+<!--              </el-button>-->
             </template>
             <template slot="menu" slot-scope="{ row, index }">
               <el-button
@@ -359,7 +362,7 @@ import {
   getDeptLazyTree,
   getGoods,
   getSpecification,
-  pleaseCheck
+  pleaseCheck, purchaseStatusUpdate
 } from "@/api/exportTrade/purchaseContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
@@ -680,6 +683,23 @@ export default {
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
     },
+    PSModification(type){
+      const loading = this.$loading({
+        lock: true,
+        text: '操作中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      purchaseStatusUpdate({
+        id:this.form.id,
+        purchaseStatusType:type
+      }).then(res=>{
+        this.$message.success("操作成功")
+        loading.close();
+      }).catch((err)=>{
+        loading.close();
+      })
+    },
     rePick(row, index) {
       this.reData = {
         ...row,

+ 177 - 17
src/views/exportTrade/purchaseContract/index.vue

@@ -34,20 +34,21 @@
         </template>
         <template slot="menuLeft">
           <el-button
-            type="primary"
-            icon="el-icon-plus"
-            size="small"
-            @click.stop="newAdd('new')"
-            >创建单据
+              type="primary"
+              icon="el-icon-plus"
+              size="small"
+              @click.stop="newAdd('new')"
+          >创建单据
           </el-button>
           <el-button
-            type="success"
-            size="small"
-            @click.stop="copyDoc()"
-            :disabled="selectionList.length != 1"
-            >复制单据</el-button
-          >
-          <el-button type="info" size="small">报表打印</el-button>
+              type="success"
+              size="small"
+              @click.stop="copyDoc()"
+              :disabled="selectionList.length != 1"
+          >复制单据
+          </el-button>
+          <el-button type="info" size="small" disabled>报表打印</el-button>
+<!--          <el-button type="info" size="small" @click="dialogVisible = true">导入销售单</el-button>-->
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
@@ -120,17 +121,62 @@
       </avue-crud>
     </basic-container>
     <detail-page
-      @goBack="goBack"
-      @copyOrder="copyOrder"
-      :detailData="detailData"
-      v-if="!show"
+        @goBack="goBack"
+        @copyOrder="copyOrder"
+        :detailData="detailData"
+        v-if="!show"
     ></detail-page>
+    <el-dialog
+        title="导入销售单"
+        v-if="dialogVisible"
+        :visible.sync="dialogVisible"
+        append-to-body
+        width="80%">
+      <span>
+        <avue-crud :data="dialogData" :option="dialogOption"
+                   :page.sync="dialogPage"
+                   :search.sync="params"
+                   ref="dialogCrud"
+                   @refresh-change="refreshChangeTwo"
+                   @on-load="dialogOnLoad">
+          <template slot="menuLeft">
+                <el-tabs v-model="activeName" @tab-click="tabHandle">
+                  <el-tab-pane label="查询结果" name="searchList"/>
+                  <el-tab-pane label="已选定数据" name="importStaging"/>
+                </el-tabs>
+              </template>
+          <template slot-scope="scope" slot="menu">
+        <el-button
+            type="text"
+            icon="el-icon-edit"
+            size="small"
+            @click.stop="importStagList(scope.row, scope.index)"
+            v-if="activeName == 'searchList'"
+            :disabled=" goodsListSave.findIndex(item => item.id == scope.row.id) !== -1 "
+        >选择
+        </el-button>
+        <el-button
+            type="text"
+            icon="el-icon-delete"
+            size="small"
+            @click.stop="removeStagList(scope.row, scope.index)"
+            v-else
+        >移除
+        </el-button>
+      </template>
+        </avue-crud>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import option from "./config/mainList.json";
-import { getList, remove, gainUser } from "@/api/exportTrade/purchaseContract";
+import {getList, remove, gainUser, listXS} from "@/api/exportTrade/purchaseContract";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
 import { IntegerFormat } from "@/util/validate";
@@ -141,6 +187,79 @@ export default {
       search: {
         businesDate: defaultDate()
       },
+      dialogData: [],
+      goodsListShow: [],
+      goodsListSave: [],
+      params:{},
+      dialogPage: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      activeName: 'searchList',
+      dialogOption: {
+        searchShow: true,
+        searchMenuSpan: 16,
+        border: true,
+        index: true,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        menuWidth: "100",
+        headerAlign: "center",
+        searchIcon: true,
+        searchIndex: 2,
+        tip: false,
+        column: [{
+          label: "销售单号",
+          prop: "orderNo",
+          search:false,
+          overHidden: true
+        }, {
+          label: "销售日期",
+          prop: "businesDate",
+          overHidden: true
+        }, {
+          label: "供应商",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "交货日期",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "采购员",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "产品名称",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "产品编号",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "产品类别",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "产品型号",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "数量",
+          prop: "corpId",
+          overHidden: true
+        }, {
+          label: "采购数",
+          prop: "corpId",
+          overHidden: true
+        }]
+      },
+      dialogVisible: false,
       form: {},
       option: {},
       parentId: 0,
@@ -151,6 +270,7 @@ export default {
         total: 0,
         pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
+      totalTwo:0,
       show: true,
       detailData: {},
       loading: false,
@@ -175,6 +295,9 @@ export default {
     }
   },
   methods: {
+    removeStagList(row, index) {
+      this.goodsListSave.splice(row.$index, 1);
+    },
     searchCriteriaSwitch(type) {
       if (type) {
         this.option.height = this.option.height - 139;
@@ -256,6 +379,38 @@ export default {
       this.page.currentPage = 1;
       this.page.pageSize = val;
     },
+    // 标签页切换
+    tabHandle(data) {
+      if (data.name == 'searchList') {
+        this.dialogData = this.goodsListShow;
+        this.dialogPage.total = this.totalTwo
+      } else if (data.name == 'importStaging') {
+        this.goodsListShow = this.dialogData;
+        this.dialogData = this.goodsListSave;
+        this.totalTwo = this.dialogPage.total
+        this.dialogPage.total = 0
+      }
+    },
+    importStagList(row, index) {
+      this.goodsListSave.push(row);
+    },
+    refreshChangeTwo(){
+      this.onLoad(this.page);
+    },
+    dialogOnLoad(page, params) {
+      this.dialogLoading = true;
+      params = {
+        ...params,
+        size: page.pageSize,
+        current: page.currentPage,
+        ...this.params
+      }
+      listXS(params).then(res => {
+        this.dialogLoading = false
+        this.dialogData = res.data.data.records
+        this.dialogPage.total = res.data.data.total
+      })
+    },
     onLoad(page, params) {
       if (this.search.businesDate && this.search.businesDate.length > 0) {
         params = {
@@ -318,6 +473,11 @@ export default {
   watch: {
     option: function() {
       this.search.businesDate = defaultDate();
+    },
+    dialogVisible:function (){
+      this.goodsListShow = []
+      this.goodsListSave = []
+      this.totalTwo = 0
     }
   }
 };

+ 70 - 5
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -8,9 +8,9 @@
         <el-row>
           <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印
           </el-button>
-          <el-button type="warning" icon="el-icon-plus" size="small"
-            :disabled="detailData.status == 1 || orderItemIds.length == 0" @click="getInvoice">生成发货单
-          </el-button>
+<!--          <el-button type="warning" icon="el-icon-plus" size="small"-->
+<!--            :disabled="detailData.status == 1 || orderItemIds.length == 0" @click="getInvoice">生成发货单-->
+<!--          </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"
             :loading="calculateLoading">分摊国内费用
@@ -18,6 +18,8 @@
           <el-button type="info" size="small" @click="calculate(2)" :disabled="detailData.status == 1"
             :loading="calculateLoading">分摊海运费
           </el-button>
+          <el-button type="info" size="small" :disabled="!form.id || form.fudaPurchaseStatus" @click.native="dialog = true;fudaSatus = 1">通知采购</el-button>
+          <el-button type="info" size="small" :disabled="!form.id || form.documentaryStatus" @click.native="dialog = true;fudaSatus = 2">通知跟单</el-button>
         </el-row>
       </template>
       <template slot="headerSerial">
@@ -271,6 +273,28 @@
     </report-dialog>
     <part-library ref="partLibrary" @importPart="importPart"></part-library>
     <price-library ref="library" @importLibray="importLibray" />
+    <el-dialog
+        title="选择日期"
+        :visible.sync="dialog"
+        v-if="dialog"
+        width="30%"
+        append-to-body>
+      <span>
+        <el-date-picker
+          v-model="pickerValue"
+          type="date"
+          style="width: 100%;"
+          size="small"
+          value-format="yyyy-MM-dd HH:ss:mm"
+          placeholder="选择日期">
+      </el-date-picker>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialog = false">取 消</el-button>
+        <el-button type="primary" v-if="fudaSatus == 1" @click="saveSell">确 定</el-button>
+        <el-button type="primary" v-if="fudaSatus == 2" @click="getInvoice">确 定</el-button>
+      </span>
+    </el-dialog>
   </trade-card>
 </template>
 
@@ -290,7 +314,7 @@ import {
   getGoods,
   getSpecification,
   getPricebank,
-  calculationDomesticFees
+  calculationDomesticFees, generatePurchaseNews, deliverGoods
 } from "@/api/basicData/salesContract";
 import {
   sum,
@@ -310,6 +334,9 @@ export default {
   name: "customerInformation",
   data() {
     return {
+      fudaSatus:null,
+      pickerValue:"",
+      dialog:false,
       calculateLoading: false,
       switchDialog: false,
       loading: false,
@@ -742,9 +769,47 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    inInvoice() {
+      if (!this.pickerValue)return this.$message.error("请选择日期")
+      const data = {
+        id: this.form.id,
+        documentaryDate:this.pickerValue
+      };
+      deliverGoods(data).then(res => {
+        if (res.data.code == 200) {
+          this.$message.success("生成成功");
+          this.dialog = false
+          this.pickerValue = ''
+          this.$emit("backToList",this.form.id)
+        }
+      }).catch(()=>{
+        this.pickerValue = ''
+        this.dialog = false
+      })
+    },
+    saveSell() {
+      if (!this.pickerValue) return this.$message.error("请选择日期")
+      if (!this.form.id) {
+        return this.$message.error("此单据没有提交记录,请先提交");
+      }
+      if (!this.form.buyerId){
+        return this.$message.error("采购员必填");
+      }
+      generatePurchaseNews(this.form.id,this.pickerValue).then(res => {
+        if (res.data.code == 200) {
+          this.$message.success("生成成功");
+          this.dialog = false
+          this.pickerValue = ''
+          this.$emit("backToList",this.form.id)
+        }
+      }).catch(()=>{
+        this.pickerValue = ''
+        this.dialog = false
+      })
+    },
     getInvoice() {
       if (this.$store.getters.outStatus) {
-        this.$alert("出口发货单存在,请保存发货单再进行操作", "温馨提示", {
+        this.$alert("出口单存在,请保存发货单再进行操作", "温馨提示", {
           confirmButtonText: "确定",
           type: "warning",
           callback: action => {

+ 103 - 1
src/views/exportTrade/salesContract/config/mainList.json

@@ -172,14 +172,116 @@
       "overHidden": true
     },
     {
+      "label": "数量",
+      "prop": "storageQuantity",
+      "index": 12.1,
+      "minWidth": 80,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "采购数",
+      "prop": "purchaseQuantity",
+      "index": 12.2,
+      "minWidth": 80,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "发货数",
+      "prop": "deliverQuantity",
+      "index": 12.3,
+      "minWidth": 80,
+      "align": "right",
+      "overHidden": true
+    },
+    {
+      "label": "客户收货数",
+      "prop": "receiveQuantity",
+      "index": 12.4,
+      "minWidth": 90,
+      "align": "right",
+      "overHidden": true
+    },
+    {
       "label": "发货数量",
       "prop": "actualQuantity",
-      "index": 12,
+      "index": 12.5,
       "minWidth": 80,
       "align": "right",
       "overHidden": true
     },
     {
+      "label": "采购员",
+      "prop": "buyerName",
+      "index": 12.51,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "跟单员",
+      "prop": "documenterName",
+      "index": 12.52,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "采购状态",
+      "prop": "fudaPurchaseStatus",
+      "index": 12.53,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "采购日期",
+      "prop": "fudaPurchaseDate",
+      "index": 12.54,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "排产状态",
+      "prop": "productionScheduling",
+      "index": 12.55,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "排产日期",
+      "prop": "productionSchedulingDate",
+      "index": 12.56,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "预计货好状态",
+      "prop": "estimateGoodGoods",
+      "index": 12.57,
+      "minWidth": 100,
+      "overHidden": true
+    },
+    {
+      "label": "预计货好日期",
+      "prop": "estimateGoodGoodsDate",
+      "index": 12.58,
+      "minWidth": 100,
+      "overHidden": true
+    },
+    {
+      "label": "跟单状态",
+      "prop": "documentaryStatus",
+      "index": 12.59,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "跟单日期",
+      "prop": "documentaryDate",
+      "index": 12.6,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
       "label": "产品毛利",
       "prop": "grossProfit",
       "index": 13,

+ 128 - 88
src/views/exportTrade/salesContract/detailsPage.vue

@@ -35,8 +35,6 @@
             业务处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item @click.native="saveSell">生成采购
-            </el-dropdown-item>
             <el-dropdown-item :disabled="!form.id" @click.native="copyDoc">复制单据</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -155,7 +153,7 @@
         </avue-form>
       </trade-card>
       <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData" :orderFeesList.sync="orderFeesList"
-        @formGoodstoFees="formGoodstoFees"></goods-info>
+        @formGoodstoFees="formGoodstoFees" @backToList="getDetail"></goods-info>
       <!--  <trade-card title="商品信息">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel"
           @selection-change="goodsSelectionChange" @saveColumn="saveColumn" @resetColumn="resetColumn"
@@ -421,7 +419,7 @@ import {
   getPricedetail,
   pleaseCheck,
   getParities,
-  getCode
+  getCode, generatePurchaseNews
 } from "@/api/basicData/salesContract";
 import {
   getAllBoxs
@@ -754,95 +752,134 @@ export default {
           append: "%",
           disabled: true
         },
-        {
-          label: "汇率",
-          prop: "exchangeRate",
-          span: 8,
-          row: true,
-          rules: [{
-            required: true,
-            message: "",
-            trigger: "blur"
-          }]
-        },
-        {
-          label: "箱型",
-          prop: "boxPile",
-          type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
-          props: {
-            label: "dictValue",
-            value: "dictValue"
-          },
-          span: 6,
-          rules: [
-            {
-              required: true,
-              message: "",
-              trigger: "blur"
-            }
-          ]
-        },
-        {
-          label: "箱量",
-          prop: "boxNumber",
-          span: 6,
-          rules: [
-            {
+          {
+            label: "汇率",
+            prop: "exchangeRate",
+            span: 8,
+            row: true,
+            rules: [{
               required: true,
               message: "",
               trigger: "blur"
-            }
-          ]
-        },
-        {
-          label: "起订量",
-          prop: "minOrder",
-          span: 6
-        },
-        {
-          label: "预计海运费",
-          prop: "predictOceanFreight",
-          span: 6
-        },
-        {
-          label: "参考海运费",
-          prop: "referenceOceanFreight",
-          span: 6
-        },
-        {
-          label: "实际海运费",
-          prop: "oceanFreight",
-          span: 6,
-          // offset: 0,
-          // row: true
-        },{
+            }]
+          }, {
+            label: "箱型",
+            prop: "boxPile",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          }, {
+            label: "箱量",
+            prop: "boxNumber",
+            span: 6,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          }, {
+            label: "起订量",
+            prop: "minOrder",
+            span: 6
+          }, {
+            label: "预计海运费",
+            prop: "predictOceanFreight",
+            span: 6
+          },
+          {
+            label: "参考海运费",
+            prop: "referenceOceanFreight",
+            span: 6
+          }, {
+            label: "实际海运费",
+            prop: "oceanFreight",
+            span: 6,
+            // offset: 0,
+            // row: true
+          }, {
             label: "单票毛利",
             prop: "singleTicketMargin",
             span: 6,
-            disabled: true
+            disabled: true,
+            row: true
+          }, {
+            label: "采购员",
+            prop: "buyerId",
+            span: 6,
+            overHidden: true,
+            filterable: true,
+            remote: true,
+            type: "select",
+            dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+            props: {
+              label: "account",
+              value: "id",
+              res: 'data.records'
+            },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          }, {
+            label: "跟单员",
+            prop: "documenterId",
+            span: 6,
+            overHidden: true,
+            filterable: true,
+            remote: true,
+            type: "select",
+            dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+            props: {
+              label: "account",
+              value: "id",
+              res: 'data.records'
+            },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            row: true
           },
-        {
-          label: "备注",
-          prop: "orderRemark",
-          type: "textarea",
-          minRows: 2,
-          span: 8
-        },
-        {
-          label: "采购备注",
-          prop: "purchaseRemark",
-          type: "textarea",
-          minRows: 2,
-          span: 8
-        },
-        {
-          label: "船务备注",
-          prop: "shippingRemark",
-          type: "textarea",
-          minRows: 2,
-          span: 8
-        }
+          {
+            label: "备注",
+            prop: "orderRemark",
+            type: "textarea",
+            minRows: 2,
+            span: 8
+          },
+          {
+            label: "采购备注",
+            prop: "purchaseRemark",
+            type: "textarea",
+            minRows: 2,
+            span: 8
+          },
+          {
+            label: "船务备注",
+            prop: "shippingRemark",
+            type: "textarea",
+            minRows: 2,
+            span: 8
+          }
         ]
       },
       goodsEditShow: false,
@@ -1458,12 +1495,15 @@ export default {
       if (!this.form.id) {
         return this.$message.error("此单据没有提交记录,请先提交");
       }
+      if (!this.form.buyerId){
+        return this.$message.error("采购员必填");
+      }
       this.$confirm("是否生成采购单?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        saveSell(this.form.id).then(res => {
+        generatePurchaseNews(this.form.id).then(res => {
           if (res.data.code == 200) {
             this.$message.success("生成成功");
           }
@@ -2241,7 +2281,7 @@ export default {
     },
     getInvoice() {
       if (this.$store.getters.outStatus) {
-        this.$alert("出口发货单存在,请保存发货单再进行操作", "温馨提示", {
+        this.$alert("出口单存在,请保存发货单再进行操作", "温馨提示", {
           confirmButtonText: "确定",
           type: "warning",
           callback: action => {

+ 101 - 36
src/views/wel/components/sales-reached.vue

@@ -1,50 +1,97 @@
 <template>
   <div>
-    <div class="home-container" v-if="sysType != 2">
-      <el-card class="home-container__card">
-        <div class="title">
-        <span>
-          当月报价
-        </span>
+    <span v-if="tenantId == 577435">
+      <div class="home-container">
+        <el-card class="home-container__card">
+          <div style="display:flex;">
+          <el-date-picker
+              v-model="search.dateList"
+              type="daterange"
+              range-separator="-"
+              size="mini"
+              style="margin-right: 5px"
+              :default-time="['00:00:00', '23:59:59']"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              @change="query(0)"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+          </el-date-picker>
+            <el-button size="mini" @click="query(1)">当日</el-button>
+            <el-button size="mini" @click="query(2)">当月</el-button>
+          </div>
+          <el-table
+              :data="tableData"
+              size="mini"
+              height="300"
+              style="width: 100%">
+            <el-table-column
+                prop="billType"
+                align="center"
+                label="来源">
+            </el-table-column>
+            <el-table-column
+                prop="name"
+                align="center"
+                label="操作员">
+            </el-table-column>
+            <el-table-column
+                prop="number"
+                align="center"
+                label="数量">
+            </el-table-column>
+          </el-table>
+        </el-card>
+      </div>
+    </span>
+    <span v-else>
+      <div class="home-container" v-if="sysType != 2">
+        <el-card class="home-container__card">
+          <div class="title">
           <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 style="display:flex">
-            <div id="ringData" ref="ringData" style="width:20vw;height:33vh" />
-            <div>
-              <div class="content_item">
-                <div class="content_item_num">{{ data.grossAmount }}</div>
-                <div class="content_item_text">订单总金额</div>
-              </div>
-              <div class="content_item">
-                <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">{{ data.notReachAmount }}</div>
-                <div class="content_item_text">未达成</div>
+            当月报价
+          </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 style="display:flex">
+              <div id="ringData" ref="ringData" style="width:20vw;height:33vh"/>
+              <div>
+                <div class="content_item">
+                  <div class="content_item_num">{{ data.grossAmount }}</div>
+                  <div class="content_item_text">订单总金额</div>
+                </div>
+                <div class="content_item">
+                  <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">{{ data.notReachAmount }}</div>
+                  <div class="content_item_text">未达成</div>
+                </div>
               </div>
             </div>
           </div>
-        </div>
-      </el-card>
-    </div>
-    <domSales v-if="sysType == 2"/>
+        </el-card>
+      </div>
+      <domSales v-if="sysType == 2"/>
+    </span>
   </div>
 </template>
 
 <script>
-import { monthSales } from "@/api/wel";
+import { monthSales ,documentQuantityStatistics} from "@/api/wel";
 import domSales from "../home/domesticTrade/domSales";
+import search from "@/page/index/search.vue";
+import {dateFormat} from "@/util/date";
 export default {
   name: "basicContainer",
   props: {
@@ -55,6 +102,9 @@ export default {
   },
   data() {
     return {
+      search:{},
+      tableData: [],
+      tenantId: this.$store.getters.userInfo.tenant_id,
       loading: false,
       tradeType: null,
       data: {}
@@ -67,6 +117,21 @@ export default {
     this.init();
   },
   methods: {
+    query(type){
+      const date = new Date();
+      if (type == 1){
+        this.$set(this.search,"dateList",[`${dateFormat(new Date(),"yyyy-MM-dd")} 00:00:00`,`${dateFormat(new Date(),"yyyy-MM-dd")} 23:59:59`])
+      }
+      if (type == 2){
+        this.$set(this.search,"dateList",[
+          `${dateFormat(new Date(date.getFullYear(), date.getMonth(), 1),"yyyy-MM-dd")} 00:00:00`,
+          `${dateFormat(new Date(date.getFullYear(), date.getMonth() + 1, 0),"yyyy-MM-dd")} 23:59:59`
+        ])
+      }
+      documentQuantityStatistics({...this.search}).then(res=>{
+        this.tableData = res.data.data
+      })
+    },
     init() {
       this.getmonthSales();
     },

+ 3 - 3
vue.config.js

@@ -30,11 +30,11 @@ module.exports = {
     port: 1024,
     proxy: {
       '/api': {
-        //本地服务接口地址
+        // 本地服务接口地址
         // target: 'http://192.168.3.64:1080',
-        // target: 'http://192.168.0.105:1080',
+        target: 'http://192.168.0.105:1080',
         // 打包地址
-        target: 'http://121.37.83.47:10004',//服务器ip
+        // target: 'http://121.37.83.47:10004',//服务器ip
         // target: 'http://trade.tubaosoft.com:10004',//服务器域名
         ws: true,
         pathRewrite: {