Selaa lähdekoodia

业务员 查看库存 客户来源新字段查询条件

Qukatie 7 kuukautta sitten
vanhempi
commit
e985ec4806

+ 8 - 0
src/api/system/user.js

@@ -12,6 +12,14 @@ export const getList = (current, size, params, deptId) => {
     }
   })
 }
+
+export const selectListLos = (data) => {
+  return request({
+    url: '/api/blade-user/selectListLos',
+    method: 'get',
+    params:data
+  })
+}
 export const userList = (current, size, params, deptId) => {
   return request({
     url: '/api/blade-user/userList',

+ 6 - 2
src/views/iosBasicData/OceanFreightImport/bills/billsDetails.vue

@@ -315,6 +315,7 @@ import editypes from "@/views/iosBasicData/editypes/index.vue";
 import { editypesList } from "@/api/iosBasicData/editypes";
 import { verifyEnglish } from "@/util/date";
 import { contrastObj, contrastList } from "@/util/contrastData";
+import { selectListLos } from "@/api/approval/processConfig";
 import _ from "lodash";
 export default {
     components: {
@@ -958,8 +959,8 @@ export default {
         },
         // 获取业务来源业务员数据
         salesUserGetListfun(account) {
-            userGetList(1, 10, { account }).then(res => {
-                this.columnforfun('srcCnName').dicData = res.data.data.records
+            selectListLos('业务员').then(res => {
+                this.columnforfun('srcCnName').dicData = res.data.data
             })
         },
         // 获取公司名称 用户管理左侧
@@ -1004,6 +1005,7 @@ export default {
                     this.form.corpEnName = this.$refs.bcorps[0].selectionList[0].enName
                     this.form.corpId = this.$refs.bcorps[0].selectionList[0].id
                     this.form.corpCode = this.$refs.bcorps[0].selectionList[0].code
+                    this.form.corpSource = this.$refs.bcorps[0].selectionList[0].corpSource
                     // 获取 客户op数据
                     this.getBcorpsattnListfun()
                     // 业务来源参数带出
@@ -1116,6 +1118,7 @@ export default {
                     this.form.corpId = ''
                     this.form.corpCode = ''
                     this.form.shortName=''
+                         this.form.corpSource = ""
                     // 清空 客户OP
                     this.form.corpAttnName = ''
                     this.form.corpAttnId = ''
@@ -1135,6 +1138,7 @@ export default {
                         this.form.corpId = item.id
                         this.form.corpCode = item.code
                         this.form.shortName = item.shortName
+                        this.form.corpSource = item.corpSource
                         // 获取 客户op数据
                         this.getBcorpsattnListfun()
                         // 业务来源参数带出

+ 8 - 3
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -333,6 +333,7 @@ import editypes from "@/views/iosBasicData/editypes/index.vue";
 import { editypesList } from "@/api/iosBasicData/editypes";
 import { verifyEnglish } from "@/util/date";
 import { contrastObj, contrastList } from "@/util/contrastData";
+import { selectListLos } from "@/api/approval/processConfig";
 import _ from "lodash";
 export default {
     components: {
@@ -1116,8 +1117,8 @@ export default {
                     this.columnforfun('srcCnName').dicData = res.data.data.records
                 })
             } else {
-                userGetList(1, 10, { account }).then(res => {
-                    this.columnforfun('srcCnName').dicData = res.data.data.records
+                selectListLos('业务员').then(res => {
+                    this.columnforfun('srcCnName').dicData = res.data.data
                 })
             }
 
@@ -1164,6 +1165,7 @@ export default {
                     this.form.corpEnName = this.$refs.bcorps[0].selectionList[0].enName
                     this.form.corpId = this.$refs.bcorps[0].selectionList[0].id
                     this.form.corpCode = this.$refs.bcorps[0].selectionList[0].code
+                    this.form.corpSource = this.$refs.bcorps[0].selectionList[0].corpSource
                     // 获取 客户op数据
                     this.getBcorpsattnListfun()
                     // 业务来源参数带出
@@ -1194,6 +1196,7 @@ export default {
                     this.form.corpEnName = this.$refs.bcorps[0].$refs.detail.formData.enName
                     this.form.corpId = this.$refs.bcorps[0].$refs.detail.formData.id
                     this.form.corpCode = this.$refs.bcorps[0].$refs.detail.formData.code
+                    this.form.corpSource = this.$refs.bcorps[0].$refs.detail.formData.corpSource
                     // 获取 客户op数据
                     this.getBcorpsattnListfun()
                     // 业务来源参数带出
@@ -1306,6 +1309,7 @@ export default {
                     this.form.corpId = ''
                     this.form.corpCode = ''
                     this.form.shortName = ''
+                    this.form.corpSource = ""
                     // 清空 客户OP
                     this.form.corpAttnName = ''
                     this.form.corpAttnId = ''
@@ -1325,6 +1329,7 @@ export default {
                         this.form.corpId = item.id
                         this.form.corpCode = item.code
                         this.form.shortName = item.shortName
+                        this.form.corpSource = item.corpSource
                         // 获取 客户op数据
                         this.getBcorpsattnListfun()
                         // 业务来源参数带出
@@ -1674,7 +1679,7 @@ export default {
                         })
                         return;
                     }
-                   
+
                     // let msgsList = []
                     // if (!verifyEnglish(this.form.hshipperDetails)) {
                     //     msgsList.push('发货人')

+ 30 - 1
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -654,7 +654,7 @@ export default {
                 calcHeight: 30,
                 tip: false,
                 searchShow: true,
-                searchMenuSpan: 24,
+                searchMenuSpan: 12,
                 searchLabelWidth: '100',
                 border: true,
                 index: true,
@@ -1218,6 +1218,35 @@ export default {
                         width: "160",
                         overHidden: true,
                     },
+                    {
+                        label: "客户来源",
+                        prop: "corpSource",
+                        width: 140,
+                        overHidden: true,
+                        search: true,
+                        type: "select",
+                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=corp_Source",
+                        props: {
+                            label: 'dictValue',
+                            value: 'dictKey',
+                        },
+                    },
+                    {
+                        label: "客户OP",
+                        prop: "operatorName",
+                        width: 140,
+                        overHidden: true,
+                        search: true,
+                        type: "select",
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-user/page?cnName={{key}}",
+                        props: {
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
+                        },
+                    },
                     // {
                     //   label: "进项发票状态",
                     //   prop: "invoiceCrStatusDescr",

+ 16 - 3
src/views/iosBasicData/bcorps/detailsPage.vue

@@ -155,6 +155,15 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8">
+                <el-form-item label="客户来源" prop="corpSource">
+                  <el-select v-model="formData.corpSource" size="small" placeholder="请选择客户来源" clearable
+                    :style="{ width: '100%' }">
+                    <el-option v-for="(item, index) in corpSourceDict" :key="index" :label="item.dictValue"
+                      :value="item.dictKey" :disabled="item.disabled"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
                 <el-form-item label="国家" prop="cntyCode">
                   <search-query ref="SearchQuery" :datalist="cntyOptions" title="国家" :filterable="true"
                     :clearable="true" :remote="true"
@@ -1090,7 +1099,6 @@ import bcountrys from '@/views/iosBasicData/bcountrys/index.vue'
 import user from '@/views/system/user.vue'
 import rateManagement from '@/views/iosBasicData/rateManagement/index.vue'
 import SearchQuery from '@/components/iosbasic-data/searchquery.vue'
-import { getList as userGetList } from '@/api/system/user'
 import { getDeptLazyTree } from "@/api/system/dept";
 import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
 import { blinesList } from "@/api/iosBasicData/blines";
@@ -1157,6 +1165,7 @@ export default {
       // 字典
       creditLevelDict: [],
       enterpriseTypeDict: [],
+      corpSourceDict:[],
       // 对话框
       // 客户联系人对话框
       dialogTitle: '窗口',
@@ -1370,6 +1379,10 @@ export default {
         this.formData.enterpriseType = this.enterpriseTypeDict[0].dictKey
       }
     });
+    getWorkDicts('corp_Source').then((res) => {
+      this.corpSourceDict = res.data.data
+    });
+    
 
   },
   mounted() { },
@@ -1484,8 +1497,8 @@ export default {
     },
     // 获取业务来源业务员数据
     salesUserGetListfun(account) {
-      userGetList(1, 10, { account }).then(res => {
-        this.srcData = res.data.data.records
+      selectListLos('业务员').then(res => {
+        this.srcData = res.data.data
       })
     },
     // 获取公司名称 用户管理左侧

+ 26 - 8
src/views/iosBasicData/bcorps/index.vue

@@ -20,12 +20,12 @@
       <el-col :span="19">
         <basic-container class="page-crad">
           <!-- :on-change="handleChange" -->
-          <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
-            id="out-table" :header-cell-class-name="headerClassName" :search.sync="query" :before-open="beforeOpen"
-            v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
-            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
-            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
-            @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 304)"
+          <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page"
+            :permission="permissionList" id="out-table" :header-cell-class-name="headerClassName" :search.sync="query"
+            :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
+            @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
+            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+            @refresh-change="refreshChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 304)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 304)" @on-load="onLoad">
             <template slot="cnName" slot-scope="scope">
               <div style="color: #1e9fff;cursor: pointer;" @click.stop="editOpen(scope.row)">
@@ -67,7 +67,8 @@
 
     <reportContainer ref="reportContainer"></reportContainer>
 
-    <detailPage v-if="!isShow" ref="detail" @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData"></detailPage>
+    <detailPage v-if="!isShow" ref="detail" @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData">
+    </detailPage>
 
     <!--类别弹窗-->
     <el-dialog title="类别" v-dialogdrag :visible.sync="corpTypeVisible" append-to-body width="60%"
@@ -188,7 +189,7 @@ export default {
         searchIcon: true,
         searchIndex: 3,
         searchShow: true,
-        searchMenuSpan: 6,
+        searchMenuSpan: 18,
         border: true,
         index: true,
         viewBtn: true,
@@ -371,6 +372,19 @@ export default {
             overHidden: true,
           },
           {
+            label: "客户来源",
+            prop: "corpSource",
+            width: 140,
+            overHidden: true,
+            search: true,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=corp_Source",
+            props: {
+              label: 'dictValue',
+              value: 'dictKey',
+            },
+          },
+          {
             label: "分管员",
             prop: "adminProfilesName",
             width: "100",
@@ -728,6 +742,10 @@ export default {
         this.page.total = data.total;
         this.data = data.records;
         this.loading = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+          this.$refs.crud.dicInit();
+        });
         this.selectionClear();
       });
     },

+ 41 - 3
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -102,6 +102,13 @@
                                 <el-button type="danger" plain size="small" @click="batchDelete"
                                     :disabled="form.generateTask == '已生成' || form.businessSource == '外部销售'">一键删除</el-button>
                                 <el-button type="primary" plain size="small" @click="quickCopy">快捷复制</el-button>
+                                <el-popover width="600" trigger="click">
+                                    <avue-crud :data="inventoryData" :option="inventoryOption"></avue-crud>
+                                    <el-button type="primary" plain size="small" slot="reference" @click="viewInventory"
+                                        :disabled="selectionMultilist.length != 1">查看库存</el-button>
+                                </el-popover>
+                                <!-- <el-button type="primary" plain size="small" 
+                                    :disabled="selectionMultilist.length != 1">查看库存</el-button> -->
                             </template>
                             <template slot="goodsId" slot-scope="{ row }">
                                 {{ row.goodsName }}
@@ -347,11 +354,36 @@ import {
 } from "@/api/tirePartsMall/basicData/customerInformation";
 import { getToken } from "@/util/auth";
 import { isProcurement } from "@/api/basicData/configuration";
+import { getList as inventoryList } from "@/api/tirePartsMall/inventory";
 export default {
     name: "detailsPage",
 
     data() {
         return {
+            inventoryOption: {
+                header: false,
+                menu: false,
+                column: [
+                    {
+                        label: '商品名称',
+                        prop: 'cname',
+                        overHidden: true,
+                    }, {
+                        label: '仓库',
+                        prop: 'storageName',
+                        overHidden: true,
+                    }, {
+                        label: '库存数量',
+                        prop: 'balanceQuantity',
+                        overHidden: true,
+                    }, {
+                        label: '批次号',
+                        prop: 'dot',
+                        overHidden: true,
+                    }
+                ]
+            },
+            inventoryData: [],
             excelBox: false,
             reportName: '', // 打印传的名字
             SelectSearch: {}, // 添加商品检索
@@ -1370,6 +1402,12 @@ export default {
         }
     },
     methods: {
+        viewInventory() {
+            this.inventoryData = []
+            inventoryList({ cname: this.selectionMultilist[0].goodsName }).then(res => [
+                this.inventoryData = res.data.data.records
+            ])
+        },
         uploadAfter(res, done, loading, column) {
             if (Array.isArray(res)) {
                 if (res instanceof Array) {
@@ -2257,7 +2295,7 @@ export default {
                         return
                     }
                     for (let i in this.form.orderItemsList) {
-                        this.form.orderItemsList[i].subTotalMoney = Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price)?Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price).toFixed(2):0
+                        this.form.orderItemsList[i].subTotalMoney = Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price) ? Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price).toFixed(2) : 0
                         if (this.form.orderItemsList[i].pid) {
                         } else {
                             if (this.form.orderItemsList[i].whether == '1') {
@@ -2462,7 +2500,7 @@ export default {
 
                 this.form.orderItemsList.forEach((items) => {
                     if (!items.subTotalMoney) {
-                        items.subTotalMoney = Number(items.goodsNum * items.price)?Number(items.goodsNum * items.price).toFixed(2):0
+                        items.subTotalMoney = Number(items.goodsNum * items.price) ? Number(items.goodsNum * items.price).toFixed(2) : 0
                         items.grossProfit = items.subTotalMoney - items.costprie
                     }
                     // let brandName = items.brandId
@@ -2609,7 +2647,7 @@ export default {
 
                 this.form.orderItemsList.forEach((items) => {
                     if (!items.subTotalMoney) {
-                        items.subTotalMoney = Number(items.goodsNum * items.price)?Number(items.goodsNum * items.price).toFixed(2):0
+                        items.subTotalMoney = Number(items.goodsNum * items.price) ? Number(items.goodsNum * items.price).toFixed(2) : 0
                         items.grossProfit = items.subTotalMoney - items.costprie
                     }
                 })