浏览代码

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

QuKatie 3 年之前
父节点
当前提交
f7ea15e6a4

+ 17 - 1
src/api/standAlone/handoverSheet.js

@@ -37,7 +37,7 @@ export function typeSave(data) {
 // 明细删除
 export function removeGoods(data) {
   return request({
-    url: '/api/trade-project/handoveritem/remove',
+    url: '/api/trade-project/handover-item/remove',
     method: 'post',
     params: {
       ids: data
@@ -52,3 +52,19 @@ export function pleaseCheck(data) {
     data: data
   })
 }
+//保存附件
+export function saveAttached(data) {
+  return request({
+    url: '/api/trade-project/handover-item/file',
+    method: 'post',
+    data:data
+  })
+}
+//获取附件
+export function getAttachment(data) {
+  return request({
+    url: '/api/trade-project/handover-item/file-list',
+    method: 'get',
+    params:data
+  })
+}

+ 1 - 0
src/components/bill/billDetailList.vue

@@ -98,6 +98,7 @@
       onLoad(page, params){
         this.loading = true;
         params = {
+          ...params,
           ...this.params
         }
         params.billType = this.billType

+ 13 - 1
src/components/bill/config/application.json

@@ -1,7 +1,7 @@
 {
   "lazy": true,
   "tip": false,
-  "simplePage": true,
+  "simplePage": false,
   "searchShow": true,
   "addBtn":false,
   "editBtn":false,
@@ -25,6 +25,18 @@
   "searchIcon": true,
   "searchIndex": 2,
   "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "settlementAmount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "合同号",

+ 17 - 1
src/components/bill/config/mainList.json

@@ -1,7 +1,7 @@
 {
   "lazy": true,
   "tip": false,
-  "simplePage": true,
+  "simplePage": false,
   "searchShow": true,
   "addBtn":false,
   "editBtn":false,
@@ -24,6 +24,22 @@
   "searchIcon": true,
   "searchIndex": 2,
   "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "settlementAmount",
+      "type": "sum"
+    },
+    {
+      "name": "invoiceAmount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "合同号",

+ 1 - 0
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -854,6 +854,7 @@ export default {
       this.queryData(id)
     }else if (this.detailData.form){
       this.form = JSON.parse(this.detailData.form);
+      this.$set(this.form, 'orgId', this.form.id);
       delete this.form.createTime
       delete this.form.id
       delete this.form.sysNo

+ 18 - 8
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -572,6 +572,7 @@
                 :option="customerBuyFree"
                 :data="contactsDataBuyFree"
                 @selection-change="selectionChangePolicyTwo"
+                :table-loading="loadingPolicy"
                 ref="crudContactE">
             </avue-crud>
           </basic-container>
@@ -1979,7 +1980,8 @@ export default {
           } else {
             this.$set(item, 'price', '0')
           }
-          this.$set(item, 'amount', (Number(item.price) * Number(item.orderQuantity)).toFixed(2))
+          this.priceChange(item)
+          // this.$set(item, 'amount', (Number(item.price) * Number(item.orderQuantity)).toFixed(2))
         })
         getPurchasePrice({code: item.code}).then(response => {
           if (response.data.data.length > 0) {
@@ -2408,7 +2410,7 @@ export default {
           this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
           this.$set(this.goodsListSave[item], 'shopQuality', 0)
           this.$set(this.goodsListSave[item], 'inputMold', 0) // 判断是商品还是政策 商品 0 特价 1 买赠2
-          this.$set(this.goodsListSave[item], 'priceType', this.goodsListSave[item].policyName)
+          // this.$set(this.goodsListSave[item], 'priceType', this.goodsListSave[item].policyName)
           this.goodsListSave[item].amount = 0
           if (this.goodsActives == "goods") {
             this.$set(this.goodsListSave[item], 'goodType', 0)
@@ -2475,7 +2477,7 @@ export default {
           this.$set(this.tableData[item], 'shopQuality', 0);
           this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight);
           this.$set(this.tableData[item], 'inputMold', 0);
-          this.$set(this.tableData[item], 'priceType', this.tableData[item].policyName);
+          // this.$set(this.tableData[item], 'priceType', this.tableData[item].policyName);
           this.tableData[item].amount = 0;
           if (this.goodsActives == "goods") {
             this.$set(this.tableData[item], 'goodType', 0)
@@ -2603,9 +2605,11 @@ export default {
               } else {
                 this.$set(list[item], 'price', '0')
               }
+              this.priceChange(list[item])
             })
           } else {
             this.$set(list[item], 'price', list[item].specialOffer)
+            this.priceChange(list[item])
           }
           this.$set(list[item], 'inputMold', 1)
           this.$set(list[item], 'goodType', 0)
@@ -2617,9 +2621,11 @@ export default {
               } else {
                 this.$set(list[item], 'price', '0')
               }
+              this.priceChange(list[item])
             })
           } else {
             this.$set(list[item], 'price', list[item].salePrice)
+            this.priceChange(list[item])
           }
           this.$set(list[item], 'inputMold', 2)
           this.$set(buyFree[item], 'inputMold', 2)
@@ -2640,7 +2646,7 @@ export default {
           this.$set(list[item], 'itemType',  list[item].typeno)
           this.$set(list[item], 'actualQuantity', 0)
           this.$set(list[item], 'orderQuantity', list[item].orderQuantity? list[item].orderQuantity: 0)
-          this.$set(list[item], 'amount', 0)
+          // this.$set(list[item], 'amount', 0)
           this.$set(list[item], 'priceCategory', list[item].productCategory)
           this.$set(list[item], 'priceType', this.policyForm.cname)
           this.$set(list[item], 'cname', list[item].productCategory)
@@ -2654,7 +2660,7 @@ export default {
           if (listLength != 0) {
             this.$set(buyFree[item], 'actualQuantity', 0)
             this.$set(buyFree[item], 'orderQuantity', 0)
-            this.$set(buyFree[item], 'amount', 0)
+            // this.$set(buyFree[item], 'amount', 0)
             this.$set(buyFree[item], 'priceCategory', list[item].productCategory)
             this.$set(buyFree[item], 'priceType', this.policyForm.cname)
             this.$set(buyFree[item], 'cname', list[item].productCategory)
@@ -2684,11 +2690,13 @@ export default {
           delete list[item].updateUserName
           this.maxGoodsNum++
           this.$refs.crudContact.rowCellAdd(list[item]);
-          // this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
+          this.$nextTick(() => {
+            this.quantityChange(list[item])
+          })
           if (listLength != 0) {
             this.$refs.crudContact.rowCellAdd(buyFree[item]);
+            this.quantityChange(buyFree[item])
           }
-          // this.$refs.crudContact.rowCell(buyFree[item], this.contactsData.length - 1)
         })
       }
       this.policyDialog = false
@@ -2771,7 +2779,7 @@ export default {
       done(row);
     },
     policyOnLoad(params = {}) {
-      // this.policyLoading = true;
+      this.loadingPolicy = true;
       this.policyForm = {};
       detailList(this.treePolicyId).then(res => {
         this.policyForm = res.data.data;
@@ -2787,6 +2795,8 @@ export default {
         } else {
           this.contactsDataBuyFree = []
         }
+      }).finally(() => {
+        this.loadingPolicy = false;
       })
     },
     //

+ 0 - 1
src/views/landTransportation/motorcadeDriver/index.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="adds">
-    {{goodsList}}
     <basic-container>
       <div class="home-container">
         <div style="display: flex;justify-content: center;">

+ 19 - 1
src/views/wel/components/audit-data.vue

@@ -13,7 +13,7 @@
           ></i>
         </span>
       </div>
-      <div class="content" v-loading="loading">
+      <div class="content" v-loading="loading" v-if="sysType != 2">
         <div class="content-item" v-for="(item, index) in list" :key="index">
           <div class="card">
             <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
@@ -24,6 +24,17 @@
           </div>
         </div>
       </div>
+      <div class="content" v-loading="loading" v-if="sysType == 2">
+        <div class="content-item" v-for="(item, index) in domList" :key="index">
+          <div class="card">
+            <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
+            <div class="card-content">
+              <span class="card-content-num">{{ item.qty }}</span>
+              <span class="card-content-text">{{ item.text }}</span>
+            </div>
+          </div>
+        </div>
+      </div>
     </el-card>
   </div>
 </template>
@@ -50,6 +61,13 @@ export default {
         { icon: "el-icon-s-home", qty: "0", text: "收货/待审核" },
         { icon: "el-icon-s-finance", qty: "0", text: "申请付款/待审核" }
       ],
+      domList: [
+        { 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
     };
   },

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

@@ -63,7 +63,7 @@
         </div>
       </div>
       <div class="content" v-if="sysType == 4 || sysType == 2">
-        <div class="content-icon" @click="inPage('bj')">
+        <div class="content-icon" @click="inPage('bj')" v-if="sysType == 4">
           <i class="tradingIcon icon-sales" style="color:#606266"></i>
           <span>报价</span>
         </div>
@@ -97,7 +97,7 @@
           <i class="tradingIcon icon-pay" style="color:#7E8270"></i>
           <span>付费</span>
         </div>
-        <div class="content-icon" @click="inPage('smart')">
+        <div class="content-icon" @click="inPage('smart')" v-if="sysType == 2">
           <div style="width: 36px;height: 37px;border-radius: 10px;background-color: #0771e3;text-align: center;">
             <i class="el-icon-basketball" style="color:#FFFFFF;font-size: 26px;line-height: 37px;"></i>
           </div>
@@ -131,9 +131,11 @@ export default {
     sysType: Number
   },
   created() {
-    this.getWorkDicts('large_screen').then(res => {
-      this.largeScreenToken = res.data.data[0].dictKey;
-    })
+    if (this.sysType == 2) {
+      this.getWorkDicts('large_screen').then(res => {
+        this.largeScreenToken = res.data.data[0].dictKey;
+      })
+    }
   },
   methods: {
     inPage(type) {

+ 58 - 1
src/views/wel/components/realtime-data.vue

@@ -47,7 +47,7 @@
         </span>
       </div>
       <div style="display: flex;justify-content: center;">
-        <div class="content" v-if="sysType !== 5" v-loading="loading">
+        <div class="content" v-if="sysType !== 5 && sysType !== 2" v-loading="loading">
           <div class="content-item">
             <div class="card">
               <div class="card-title card-title1">
@@ -161,6 +161,63 @@
             </div>
           </div>
         </div>
+        <div class="content" v-if="sysType == 2" v-loading="loading">
+          <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">{{ data1.sellNumber }}</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-title2">
+                <span>
+                  采
+                </span>
+              </div>
+              <div class="card-content">
+                <span class="card-content-num">{{ data1.purchaseNumber }}</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-title3">
+                <span>
+                  发
+                </span>
+              </div>
+              <div class="card-content">
+                <span class="card-content-num">{{ data2.sellNumber }}</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-title4">
+                <span>
+                  收
+                </span>
+              </div>
+              <div class="card-content">
+                <span class="card-content-num">{{ data2.purchaseNumber }}</span>
+                <span class="card-content-text">收货重量</span>
+              </div>
+            </div>
+          </div>
+        </div>
       </div>
     </el-card>
   </div>

+ 35 - 25
src/views/wel/components/sales-reached.vue

@@ -1,48 +1,58 @@
 <template>
-  <div class="home-container">
-    <el-card class="home-container__card">
-      <div class="title">
+  <div>
+    <div class="home-container" v-if="sysType != 2">
+      <el-card class="home-container__card">
+        <div class="title">
         <span>
           当月报价
         </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 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 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>
+      </el-card>
+    </div>
+    <domSales v-if="sysType == 2"/>
   </div>
 </template>
 
 <script>
 import { monthSales } from "@/api/wel";
+import domSales from "../home/domesticTrade/domSales";
 export default {
   name: "basicContainer",
+  props: {
+    sysType: Number
+  },
+  components: {
+    domSales
+  },
   data() {
     return {
       loading: false,

+ 192 - 0
src/views/wel/home/domesticTrade/domSales.vue

@@ -0,0 +1,192 @@
+<template>
+  <div class="home-container">
+    <el-card class="home-container__card">
+      <div class="title">
+        <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 style="display:flex">
+          <div id="domRingData" 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>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import { monthSales } from "@/api/wel";
+export default {
+  name: "basicContainer",
+  data() {
+    return {
+      loading: false,
+      tradeType: null,
+      data: {}
+    };
+  },
+  created() {
+    this.getSysType();
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    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";
+      } else if (sysType == 999) {
+        this.tradeType = "ADMIN";
+      }
+    },
+    getmonthSales() {
+      this.loading = true;
+      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("domRingData"));
+      ringData.setOption({
+        tooltip: {
+          trigger: "item"
+        },
+        legend: {
+          top: "3%",
+          left: "center"
+        },
+        graphic: [
+          {
+            type: "text",
+            left: "center",
+            top: "43%",
+            style: {
+              text: this.data.yieldRate + "%",
+              textAlign: "center",
+              fill: "#000",
+              fontSize: 24
+            }
+          },
+          {
+            type: "text",
+            left: "center",
+            top: "53%",
+            style: {
+              text: "销售达成率",
+              textAlign: "center",
+              fill: "#999999",
+              fontSize: 16
+            }
+          }
+        ],
+        color: ["#F6695E", "#E3E3E3"],
+        series: [
+          {
+            name: "当月销售",
+            type: "pie",
+            radius: ["55%", "70%"],
+            avoidLabelOverlap: false,
+            label: {
+              show: false,
+              position: "center"
+            },
+            labelLine: {
+              show: false
+            },
+            data: [
+              { value: Number(this.data.reachAmount), name: "已销售数量" },
+              { value: Number(this.data.notReachAmount), name: "未销售数量" }
+            ]
+          }
+        ]
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.home-container {
+  padding: 0px 5px 5px 5px;
+  box-sizing: border-box;
+  height: 100%;
+  ::v-deep .el-card__body {
+    padding: 10px 15px;
+    font-size: 14px;
+  }
+  &__card {
+    width: 100%;
+    height: 100%;
+  }
+  .title {
+    display: flex;
+    justify-content: space-between;
+  }
+}
+.content {
+  display: flex;
+  &_item {
+    margin-top: 20px;
+    .divider {
+      display: block;
+      height: 0px;
+      width: 12vw;
+      border-top: 1px dashed #dcdfe6;
+    }
+    &_num {
+      font-size: 18px;
+      font-weight: 600;
+    }
+    &_text {
+      color: #909399;
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/workManagement/handoverSheet/config/customerContact.json

@@ -8,7 +8,7 @@
   "addBtn": false,
   "delBtn": false,
   "align": "center",
-  "menuWidth": 120,
+  "menuWidth": 180,
   "refreshBtn": false,
   "showSummary": true,
   "summaryText": "合计",

+ 73 - 1
src/views/workManagement/handoverSheet/detail.vue

@@ -110,6 +110,13 @@
             >{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
             <el-button
               size="small"
+              icon="el-icon-upload"
+              type="text"
+              :disabled="disabled || checkDisabled"
+              @click="annexOpen(row, index)"
+            >附件</el-button>
+            <el-button
+              size="small"
               icon="el-icon-delete"
               type="text"
               @click="rowDel(row, index)"
@@ -212,6 +219,24 @@
       reportName="交接单"
       @onClose="onClose()"
     />
+    <el-dialog
+      title="附件"
+      :visible.sync="dialogVisible"
+      append-to-body
+      width="70%">
+      <c-upload
+        typeUpload="PC"
+        :basic="true"
+        deleteUrl="/api/blade-client/common-file/remove"
+        :data="orderList"
+        :disabled="upLoadForm.status >= 2"
+        :enumerationValue="124"
+      ></c-upload>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false" size="small">取 消</el-button>
+          <el-button type="primary" @click="saveAnnex" size="small" :disabled="upLoadForm.status >= 2">保 存</el-button>
+        </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -230,7 +255,13 @@ import { getCurrentDate } from "@/util/date";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
-import {dataDetail, typeSave, removeGoods, pleaseCheck} from "@/api/standAlone/handoverSheet";
+import {
+  dataDetail,
+  typeSave,
+  removeGoods,
+  pleaseCheck,
+  saveAttached,
+  getAttachment} from "@/api/standAlone/handoverSheet";
 import reportDialog from "@/components/report-dialog/main";
 
 export default {
@@ -349,6 +380,10 @@ export default {
       checkDialog: false,
       checkScheduleDialog: false,
       checkData: {},
+      dialogVisible: false,
+      orderList: [],
+      upLoadForm: {},
+      rowIndex: null, //暂存明细下标
     }
   },
   async created() {
@@ -436,6 +471,9 @@ export default {
         done();
         if (valid) {
           this.$set(this.form, 'itemList', this.dataList)
+          this.form.itemList.forEach(item => {
+            item.fileList = item.fileList? item.fileList: [];
+          })
           this.btnLoading = true;
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
@@ -585,6 +623,40 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    //打开附件
+    annexOpen(row, index) {
+      this.dialogVisible = true
+      this.upLoadForm = row
+      if (row.id) {
+        getAttachment({id: row.id}).then(res => {
+          this.orderList = res.data.data? res.data.data: [];
+        })
+      } else {
+        this.$set(row, 'fileList', row.fileList? row.fileList: []); // 新数据默认插入空
+        this.orderList = [...row.fileList];
+        this.rowIndex = index;
+      }
+    },
+    //保存
+    saveAnnex() {
+      if (this.upLoadForm.id) {
+        this.orderList.forEach(item => this.$set(item, 'pid', this.upLoadForm.id))
+        saveAttached(this.orderList).then(res => {
+          this.$nextTick(() => {
+            this.dialogVisible = false;
+            this.rowIndex = null;
+            this.orderList = [];
+          })
+        })
+      } else {
+        this.dataList[this.rowIndex].fileList = [...this.orderList];
+        this.$nextTick(() => {
+          this.dialogVisible = false;
+          this.rowIndex = null;
+          this.orderList = [];
+        })
+      }
+    },
   },
 }
 </script>