caojunjie 2 éve
szülő
commit
d7a2acb1e1

+ 8 - 0
src/api/maintenance/salesPolicy.js

@@ -59,3 +59,11 @@ export function itemSubmit(data) {
         data: data
     })
 }
+//请核
+export function pleaseCheck(data) {
+    return request({
+        url: '/api/blade-mocha-item/salespolicy/checkSalesPolicy',
+        method: 'post',
+        data: data
+    })
+}

+ 27 - 14
src/router/views/index.js

@@ -1777,19 +1777,6 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/purchasingManagement/inStock/index')
   }]
 }, {
-  path: '/salesManagement/outStock/index',
-  component: Layout,
-  hidden: true,
-  children: [{
-    path: '/salesManagement/outStock/index',
-    name: '出库管理',
-    meta: {
-      i18n: '/salesManagement/outStock/index',
-      keepAlive: true,
-    },
-    component: () => import( /* webpackChunkName: "views" */ '@/views/salesManagement/outStock/index')
-  }]
-}, {
   path: '/basicData/agreement/index',
   component: Layout,
   hidden: true,
@@ -1841,5 +1828,31 @@ export default [{
     },
     component: () => import( /* webpackChunkName: "views" */ '@/views/financing/financingLedger/detail')
   }]
-}
+}, {
+  path: '/InventoryManagement/inventoryAccount/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/InventoryManagement/inventoryAccount/index',
+    name: '库存帐',
+    meta: {
+      i18n: '/InventoryManagement/inventoryAccount/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/InventoryManagement/inventoryAccount/index')
+  }]
+}, {
+    path: '/salesManagement/outStock/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/salesManagement/outStock/index',
+      name: '出库管理',
+      meta: {
+        i18n: '/salesManagement/outStock/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/salesManagement/outStock/index')
+    }]
+  }
 ]

+ 10 - 6
src/views/basicData/agreement/index.vue

@@ -148,19 +148,23 @@ export default {
       });
     },
     switchChange(row) {
-      console.log(row.status)
-      this.$confirm("确定要"+row.status==0?"开启":"停用"+row.corpName+"吗?", {
+      let name = row.status == 0?"开启":"停用"
+      this.$confirm("确定要"+ name +row.corpName+"吗?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        submit({ ...row })
-          .then(res => {
+        submit({ ...row }).then(res => {
             this.$message.success("修改成功");
-          })
-          .finally(() => {
+          }).finally(() => {
             this.onLoad(this.page, this.search);
           });
+      }).catch(() => {
+        if (row.status == 0){
+          this.$set(row,'status',"1")
+        }else{
+          this.$set(row,'status',"0")
+        }
       });
 
     },

+ 1 - 8
src/views/dealer/sales/detail.vue

@@ -820,14 +820,7 @@ export default {
             balanceAmount: 0,
             surplusRouteQuantity: 0
           };
-        this.$set(
-          form,
-          "purchaseAmount",
-          a.inQuantity
-            ? a.inQuantity == 0
-              ? 0
-              : (Number(a.inAmount) / Number(a.inQuantity)).toFixed(2)
-            : 0
+        this.$set(form,"purchaseAmount",a.inQuantity ? a.inQuantity == 0 ? 0 : (Number(a.inAmount) / Number(a.inQuantity)).toFixed(2) : 0
         );
         this.$set(form, "stock", a.surplusRouteQuantity);
       })

+ 1 - 1
src/views/dealer/stock/config/mainList.json

@@ -154,7 +154,7 @@
       "overHidden": true
     },{
       "label": "库存价",
-      "prop": "stockPrice",
+      "prop": "inAmount",
       "search": false,
       "index": 15,
       "width": 100,

+ 1 - 1
src/views/financing/financingManagement/index.vue

@@ -84,7 +84,7 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      this.getWorkDicts("approval_status").then(res => {
+      this.getWorkDicts("financing_status").then(res => {
         this.findObject(this.option.column, "status").dicData =
           res.data.data;
       });

+ 36 - 2
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -12,13 +12,26 @@
         </el-button>
       </div>
       <el-button
-        class="el-button--small-yh add-customer-btn"
+        class="add-customer-btn"
         type="primary"
         :disabled="disabled"
         size="small"
         @click="editCustomer"
         >{{ form.id ? "确认修改" : "确认新增" }}
       </el-button>
+
+<!--      style="margin-right: 110px"-->
+<!--      <el-dropdown class="add-customer-btn">-->
+<!--        <el-button type="primary" size="small">-->
+<!--          审核处理<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
+<!--        </el-button>-->
+<!--        <el-dropdown-menu slot="dropdown">-->
+<!--          <el-dropdown-item @click.native="pleaseCheck">请核数据</el-dropdown-item>-->
+<!--          <el-dropdown-item>审核进度</el-dropdown-item>-->
+<!--          <el-dropdown-item>撤销请核</el-dropdown-item>-->
+<!--          <el-dropdown-item>审批数据</el-dropdown-item>-->
+<!--        </el-dropdown-menu>-->
+<!--      </el-dropdown>-->
     </div>
     <div style="margin-top: 60px">
       <el-form
@@ -315,7 +328,8 @@ import {
   corpsattn,
   typeSave,
   getItemdetail,
-  itemSubmit
+  itemSubmit,
+  pleaseCheck
 } from "@/api/maintenance/salesPolicy";
 import {
   submit,
@@ -845,6 +859,26 @@ export default {
         }
       });
     },
+    //请核数据
+    pleaseCheck(){
+      this.$confirm("是否确认提交审批?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        const data = {
+          id : this.form.id,
+          checkType: 'xszc',
+          url: '/maintenance/salesPolicy/index',
+          pageStatus:"this.$store.getters.domSaleStatus",
+          pageLabel:"销售政策",
+          checkFlag: 2,
+        }
+        pleaseCheck(data).then(res=>{
+          console.log(res)
+        })
+      })
+    },
     //修改提交触发
     editCustomer() {
       this.$refs["form"].validate(valid => {

+ 15 - 1
src/views/purchasingManagement/inStock/config/mainList.json

@@ -166,9 +166,23 @@
       "overHidden": true
     },
     {
+      "label": "单据状态",
+      "prop": "status",
+      "index": 16,
+      "width": 120,
+      "type": "select",
+      "dataType": "number",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "dicData": [],
+      "overHidden": true
+    },
+    {
       "label": "备注",
       "prop": "orderRemark",
-      "index": 16,
+      "index": 17,
       "width": 120,
       "search": true,
       "searchSpan": 8,

+ 1 - 1
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -520,7 +520,7 @@ export default {
         type: "warning"
       }).then(() => {
         if (row.id) {
-          delItem({itemId: row.id}).then(res => {
+          delItem({itemId: row.id,type:"RK"}).then(res => {
             this.$message({
               type: "success",
               message: "删除成功!"

+ 33 - 1
src/views/salesManagement/outStock/config/customerContactTwo.json

@@ -1,6 +1,7 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 24,
+  "searchSpan": 8,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -9,15 +10,41 @@
   "delBtn": false,
   "menu": true,
   "headerAlign": "center",
+  "searchIcon": true,
+  "searchIndex": 2,
   "menuWidth": 160,
   "refreshBtn": false,
+  "searchMenuPosition": "right",
   "showSumary": true,
+  "selection": true,
   "indexSlot": false,
   "column": [{
+    "prop": "mainBillNo",
+    "label": "提单号",
+    "overHidden": true,
+    "search": true,
+    "hide": true,
+    "showColumn": false,
+    "width": 100
+  },{
+    "prop": "stockTime",
+    "label": "入库日期",
+    "type": "date",
+    "searchRange": true,
+    "searchDefaultTime": ["00:00:00", "23:59:59"],
+    "format": "yyyy-MM-dd",
+    "valueFormat": "yyyy-MM-dd HH:mm:ss",
+    "overHidden": true,
+    "search": true,
+    "hide": true,
+    "showColumn": false,
+    "width": 100
+  },{
     "index": 1,
     "prop": "itemId",
     "label": "品名",
     "type": "select",
+    "search": true,
     "props": {
       "label": "cname",
       "value": "id"
@@ -38,6 +65,7 @@
     "prop": "length",
     "label": "长度(m)",
     "overHidden": true,
+    "search": true,
     "width": 100
   },
     {
@@ -45,6 +73,7 @@
       "prop": "thickness",
       "label": "厚度(m)",
       "overHidden": true,
+      "search": true,
       "width": 100
     },
     {
@@ -117,6 +146,7 @@
       "prop": "grade",
       "label": "等级",
       "overHidden": true,
+      "search": true,
       "rules": [
         {
           "required": true,
@@ -151,12 +181,14 @@
       "prop": "containerNo",
       "label": "箱号",
       "overHidden": true,
+      "search": true,
       "width": 100
     },{
       "index": 12,
       "prop": "itemType",
       "label": "品牌",
       "overHidden": true,
+      "search": true,
       "rules": [
         {
           "required": true,

+ 8 - 3
src/views/salesManagement/outStock/config/mainList.json

@@ -19,7 +19,12 @@
     {
       "name": "storageQuantity",
       "type": "sum",
-      "decimals": 3
+      "decimals": 2
+    },
+    {
+      "name": "purchaseQuantity",
+      "type": "sum",
+      "decimals": 2
     },
     {
       "name": "storageAmount",
@@ -117,7 +122,7 @@
       "searchSpan": 8,
       "overHidden": true
     },{
-      "label": "计划库数量",
+      "label": "计划库数量",
       "prop": "purchaseQuantity",
       "index": 9,
       "width": 120
@@ -127,7 +132,7 @@
       "index": 10,
       "width": 120
     },{
-      "label": "实际库数量",
+      "label": "实际库数量",
       "prop": "storageQuantity",
       "index": 11,
       "width": 120

+ 46 - 40
src/views/salesManagement/outStock/detailsPage.vue

@@ -46,7 +46,8 @@
           </template>
           <template slot="storageId">
             <el-cascader v-model="form.storageId" :options="storagetreeList" :show-all-levels="false"
-                         :disabled="detailData.status == 1" :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
+                         :disabled="detailData.status == 1"
+                         :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
                          clearable @change="storagetreeChange">
             </el-cascader>
           </template>
@@ -130,7 +131,8 @@
           </template>
         </avue-crud>
       </trade-card>
-      <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="!(form.status == 2 || form.status == 0 || !form.status)"
+      <fee-info ref="feeInfo" :orderFeesList="orderFeesList"
+                :disabled="!(form.status == 2 || form.status == 0 || !form.status)"
                 feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
                 :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false"/>
       <!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 3" :orderFilesList="orderFilesList"
@@ -242,7 +244,7 @@ export default {
     return {
       activeName: 'searchList',
       checkData: {},
-      search:{},
+      search: {},
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -255,8 +257,8 @@ export default {
       },
       loading: false,
       dialogVisible: false,
-      dialogList:[],
-      goodsList:[],
+      dialogList: [],
+      goodsList: [],
       checkDialog: false,
       form: {},
       checkScheduleDialog: false,
@@ -379,13 +381,13 @@ export default {
               }
             ],
             span: 6
-          },{
+          }, {
             label: "计划出库数量",
             prop: "purchaseQuantity",
-            value:0,
+            value: 0,
             minRows: 1,
             span: 6
-          },{
+          }, {
             label: "计划品名",
             prop: "planGoodsName",
             minRows: 1,
@@ -412,7 +414,7 @@ export default {
       oldorderFeesList: [],
       oldorderFilesList: [],
       roleName: localStorage.getItem("roleName"),
-      selectionList:[]
+      selectionList: []
     };
   },
   props: {
@@ -426,18 +428,6 @@ export default {
     uploadFile,
     check
   },
-  watch: {
-    form: {
-      // handler() {
-      //   if (this.form.status > 0) {
-      //     this.$set(this.option, 'disabled', true)
-      //     // this.$set(this.findObject(this.tableOption.column, "remarks"),'disabled',true)
-      //   } else {
-      //     this.$set(this.option, 'disabled', false)
-      //   }
-      // }
-    }
-  },
   async created() {
     if (this.detailData.status == 3) {
       this.option.disabled = true;
@@ -445,11 +435,12 @@ export default {
     if (this.detailData.status == 1) {
       this.option.disabled = true;
     }
+    console.log(this.detailData)
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
-    this.tableOption = await this.getColumnData(this.getColumnName(191),tableOption);
-    this.tableOptionTwo = await this.getColumnData(this.getColumnName(191.1),tableOptionTwo);
+    this.tableOption = await this.getColumnData(this.getColumnName(191), tableOption);
+    this.tableOptionTwo = await this.getColumnData(this.getColumnName(191.1), tableOptionTwo);
     getStoragetree().then(res => {
       this.storagetreeList = res.data.data;
     })
@@ -494,23 +485,30 @@ export default {
         this.page.total = 0
       }
     },
-    selectionChange(list){
+    selectionChange(list) {
       this.selectionList = list
     },
-    confirmImport(){
+    confirmImport() {
+      let map = new Map();
+      for (let item of this.selectionList.concat(this.goodsListSave)) {
+        if (!map.has(item.id)) {
+          map.set(item.id, item);
+        }
+      }
+      this.goodsListSave = [...map.values()];
       let data = []
-      for (let it in this.goodsListSave){
-        for (let item in this.goodsListSave){
-          for (let li of this.itemsVOList){
-            if (this.goodsListSave[item].billNo == li.billNo) return this.$message.warning('第'+Number(Number(item)+1)+'条已存在,请勿重复导入!')
+      for (let it in this.goodsListSave) {
+        for (let item in this.goodsListSave) {
+          for (let li of this.itemsVOList) {
+            if (this.goodsListSave[item].billNo == li.billNo) return this.$message.warning('第' + Number(Number(item) + 1) + '条已存在,请勿重复导入!')
           }
         }
         data.push({
           ...this.goodsListSave[it],
-          srcItemId:this.goodsListSave[it].id,
+          srcItemId: this.goodsListSave[it].id,
           $cellEdit: true
         })
-        delete data[data.length-1].id
+        delete data[data.length - 1].id
       }
       this.itemsVOList = this.itemsVOList.concat(data)
       this.goodsListSave = []
@@ -548,6 +546,8 @@ export default {
       this.getWorkDicts("unit").then(res => {
         this.findObject(this.tableOption.column, "unit").dicData =
             res.data.data;
+        this.findObject(this.tableOptionTwo.column, "unit").dicData =
+            res.data.data;
       });
     },
     cellStyle() {
@@ -669,6 +669,8 @@ export default {
             res.data.data.itemsVOList.forEach(e => {
               e.storageInQuantity = e.balanceNumber
               e.srcItemId = e.id
+              e.storageInQuantity = e.balanceNumber
+              e.storageAmount = e.balanceMoney
               delete e.id
               delete e.forklift
               delete e.carry
@@ -744,13 +746,13 @@ export default {
             if (status == "goBack") {
               this.$emit("goBack");
             }
-            if (!this.detailData.id){
+            if (!this.detailData.id) {
               this.detailData.id = res.data.data.id
             }
             this.getDetail(res.data.data.id)
           }).finally(() => {
-                this.subLoading = false;
-              });
+            this.subLoading = false;
+          });
         } else {
           return false;
         }
@@ -759,7 +761,7 @@ export default {
     //请核
     auditCheck() {
       let orderFeesList = this.$refs.feeInfo.submitData();
-      if (orderFeesList.length == 0) {
+      if ((orderFeesList.length == 0 && this.form.status == 2)) {
         this.$confirm("没有应收费用,是否继续提交?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
@@ -1016,8 +1018,12 @@ export default {
         this.$refs.crudTwo.$refs.dialogColumn.columnBox = false;
       }
     },
-    searchChange(params,done) {
-      this.onLoad(this.page,this.search);
+    searchChange(params, done) {
+      if (this.search.stockTime){
+        this.search.stockTimeStart = this.search.stockTime[0]
+        this.search.stockTimeEnd = this.search.stockTime[1]
+      }
+      this.onLoad(this.page, this.search);
       done();
     },
     //商品查询
@@ -1025,10 +1031,10 @@ export default {
       let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
       scanningCodeAddPc({
-        storageId:this.form.storageId,
-        purchaserId:this.form.purchaserId,
+        storageId: this.form.storageId,
+        purchaserId: this.form.purchaserId,
         ...obj
-      }).then(res=>{
+      }).then(res => {
         this.dialogList = res.data.data.records
         this.goodsList = res.data.data.records
         this.page.total = res.data.data.total;

+ 1 - 1
src/views/salesManagement/outStock/index.vue

@@ -73,7 +73,7 @@ export default {
         this.getAllWorkDicts()
     },
     activated() {
-        if (!this.$store.getters.ckglStatus && !this.show) {
+        if (!this.$store.getters.ckglStatus && this.show) {
             this.show = true;
         }
         setTimeout(() => {

+ 15 - 29
src/views/wel/home/jiatongPage/components/audit-data.vue

@@ -46,7 +46,7 @@ export default {
         { 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: "库内盘点/待审核" }
       ],
       tradeType: null
     };
@@ -91,33 +91,21 @@ export default {
     },
     getCheckDate() {
       this.loading = true;
-      checkDate({ tradeType: this.tradeType })
-        .then(res => {
-          if (this.sysType == 2){
-            this.domList.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;
-              }
-            });
-          }else {
-            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;
-              }
-            });
+      checkDate({ tradeType: this.tradeType }).then(res => {
+        this.list.forEach(e => {
+          if (e.text == "入库管理/待审核") {
+            e.qty = res.data.data.purchaseNumber;
+          }
+          if (e.text == "出库管理/待审核") {
+            e.qty = res.data.data.sellNumber;
           }
+          if (e.text == "融资管理/待审核") {
+            e.qty = res.data.data.financingSum;
+          }
+          if (e.text == "库内盘点/待审核") {
+            e.qty = res.data.data.offerNumber;
+          }
+        });
         })
         .finally(() => {
           this.loading = false;
@@ -175,8 +163,6 @@ export default {
     },
     refresh() {
       this.getCheckDate();
-      this.getshipCheckDate();
-      this.getfinanceCheck()
     }
   }
 };

+ 3 - 3
src/views/wel/home/jiatongPage/components/realtime-data.vue

@@ -56,7 +56,7 @@
                 </span>
               </div>
               <div class="card-content">
-                <span class="card-content-num">{{ data1.offerNumber || '0' }}立方</span>
+                <span class="card-content-num">{{ data1.purchaseNumber || '0' }}立方</span>
                 <span class="card-content-text">入库</span>
               </div>
             </div>
@@ -144,7 +144,7 @@ export default {
         orderEndDate: this.realDate[1]
       })
         .then(res => {
-          this.data1 = res.data.data;
+          this.data2 = res.data.data;
         })
         .finally(() => {
           this.loading = false;
@@ -158,7 +158,7 @@ export default {
         orderEndDate: this.realDate[1]
       })
         .then(res => {
-          this.data2 = res.data.data;
+          this.data1 = res.data.data;
         })
         .finally(() => {
           this.loading = false;

+ 1 - 0
src/views/wel/home/jiatongPage/components/sales-trend.vue

@@ -109,6 +109,7 @@ export default {
     getsalesTrend() {
       this.loading = true;
       this.moneyList = [];
+      this.xAxisData = [];
       salesTrendTow({
         year: this.annual
       }).then(res => {