Browse Source

出库、库存页面修改

liyuan 3 ngày trước cách đây
mục cha
commit
4b20dbb948

+ 26 - 0
src/api/storehouse/stock.js

@@ -0,0 +1,26 @@
+import request from '@/router/axios';
+//查询列表
+export const getList = (params) => {
+    return request({
+        url: '/api/blade-sales-part/tire/center/warehouse/stockDesc/list',
+        method: 'get',
+        params: params
+    })
+}
+
+
+export const stockDescStockSum = (params) => {
+    return request({
+        url: '/api/blade-sales-part/tire/center/warehouse/stockDesc/stockSum',
+        method: 'get',
+        params: params
+    })
+}
+
+export const stockGoodsList = (params) => {
+    return request({
+        url: '/api/blade-sales-part/tire/center/warehouse/stockDesc/stockGoodsList',
+        method: 'get',
+        params: params
+    })
+}

+ 3 - 45
src/views/storehouse/inventoryManage/inventory/index.vue

@@ -59,11 +59,12 @@
 </template>
 
 <script>
-import { getList, stockDescStockSum, stockBrandList } from "@/api/tirePartsMall/inventory";
+import { stockBrandList } from "@/api/tirePartsMall/inventory";
 import { getToken } from "@/util/auth";
 import { getCorpType } from "@/api/tirePartsMall/basicData/commodityInformation";
 import reportDialog from "@/components/report-dialog/main.vue";
 import { isProcurement } from "@/api/basicData/configuration";
+import { getList, stockDescStockSum } from "@/api/storehouse/stock.js";
 export default {
   name: "index",
   components: { reportDialog },
@@ -226,23 +227,6 @@ export default {
             prop: "balanceQuantity",
             overHidden: true,
             width: 100
-          },
-          {
-            label: '结余数量(融资)',
-            prop: "balanceQuantityFinancing",
-            overHidden: true,
-            width: 120
-          },
-          {
-            label: '结余数量(自有)',
-            prop: "balanceQuantityHave",
-            overHidden: true,
-            width: 120
-          }, {
-            label: '库存单价',
-            prop: "inventoryCostPrice",
-            overHidden: true,
-            width: 100
           }, {
             label: '批次',
             search: true,
@@ -250,23 +234,12 @@ export default {
             overHidden: true,
             width: 100
           },
-          // {
-          //   label: '上架库存',
-          //   prop: "storeInventory",
-          //   overHidden: true,
-          //   width: 100
-          // },
           {
             label: '库存金额',
             prop: "inventoryAmount",
             overHidden: true,
             width: 100
           }, {
-            label: '库存预警',
-            prop: "inventoryAlert",
-            overHidden: true,
-            width: 100
-          }, {
             label: '是否显示零库存',
             prop: "whether",
             overHidden: true,
@@ -284,21 +257,6 @@ export default {
               label: '否',
               value: '0'
             }],
-          }, {
-            label: '是否上架',
-            prop: "ifGrounding",
-            overHidden: true,
-            search: true,
-            type: 'select',
-            dicData: [{
-              label: '未上架',
-              value: '0'
-            }, {
-              label: '已上架',
-              value: '1'
-            }],
-            searchValue: '1',
-
           }]
       },
       brandOption: {},
@@ -468,7 +426,7 @@ export default {
         }
       }
       const routeData = this.$router.resolve({
-        path: '/api/blade-sales-part/stockDesc/stockExport',      //跳转目标下载地址
+        path: '/api/blade-sales-part/tire/center/warehouse/stockDesc/stockExport',      //跳转目标下载地址
         query: {
           ...config.params
         }

+ 112 - 0
src/views/storehouse/outStockManage/configuration/commodityxsho.json

@@ -0,0 +1,112 @@
+{
+  "align": "center",
+  "height": "400",
+  "calcHeight": 80,
+  "stripe": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 80,
+  "searchSpan": 8,
+  "searchMenuSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": true,
+  "dialogClickModal": false,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "column": [
+    {
+      "label": "商品名称",
+      "prop": "cname",
+      "search": true,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "商品编号",
+      "prop": "code",
+      "search": true,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "goodsNum",
+      "slot": true,
+      "overHidden": true,
+      "width": 120
+    },
+    {
+      "label": "单价",
+      "prop":"price",
+      "overHidden": true,
+      "slot": true,
+      "width": 120,
+      "cell": true,
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "批次号",
+      "prop": "dot",
+      "cell":true,
+      "width": "80",
+      "disabled": true,
+      "allowCreate": true,
+      "filterable": true,
+      "overHidden": true
+    },
+    {
+      "label": "库存",
+      "prop": "balanceQuantity",
+      "addDisabled": false,
+      "multiple": true,
+      "overHidden": true
+    },
+    {
+      "label": "规格型号",
+      "prop": "typeNo",
+      "width": "120",
+      "slot": true,
+      "overHidden": true,
+      "search": true
+    },
+    {
+      "label": "公司",
+      "prop": "salesCompanyName",
+      "slot": true,
+      "width": "120",
+      "overHidden": true
+    },
+    {
+      "label": "商品分类",
+      "prop": "goodsTypeName",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brandName",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "width": "120",
+      "slot": true,
+      "overHidden": true,
+      "search": true
+    }
+  ]
+}

+ 39 - 158
src/views/storehouse/outStockManage/outStockPlan/detailsPage.vue

@@ -75,15 +75,6 @@
                                     size="small" v-model="row.price" style="width: 100%"></el-input>
                                 <span v-else>{{ row.price }}</span>
                             </template>
-                            <template slot="dot" slot-scope="{ row }">
-                                <el-select v-if="!mingxibaocun" v-model="row.dot" filterable default-first-option
-                                    @focus="picihaolistfun(row.goodsId)" @change="dotchangefun($event, row)"
-                                    size="small">
-                                    <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
-                                        :value="item.dot"></el-option>
-                                </el-select>
-                                <span v-else>{{ row.dot }}</span>
-                            </template>
                             <template slot="subTotalMoney" slot-scope="{ row }">{{ row.goodsNum * row.price
                                 }}</template>
 
@@ -163,18 +154,6 @@
                                 <el-input-number v-model="row.goodsNum" size="small" :controls="false"
                                     :precision="numberDecimal" @input="amountChange($event, row)" style="width: 100%" />
                             </template>
-                            <template slot="dot" slot-scope="{row}">
-                                <!--使用allow-create属性即可通过在输入框中输入文字来创建新的条目。注意此时filterable必须为真。-->
-                                <!--本例还使用了default-first-option属性, 在该属性打开的情况下,按下回车就可以选中当前选项列表中的第一个选项,-->
-                                <!--无需使用鼠标或键盘方向键进行定位。-->
-                                <!--allow-create filterable default-first-option-->
-                                <el-select v-model="row.dot" filterable default-first-option size="small"
-                                    @focus="picihaolistfun(row.id)" @change="dotchangefun($event, row)">
-                                    <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
-                                        :value="item.dot"></el-option>
-                                </el-select>
-                                <!--<span v-else>{{ row.dot }}</span>-->
-                            </template>
                             <template slot="price" slot-scope="{row}">
                                 <el-input-number v-model="row.price" size="small" :controls="false"
                                     style="width: 100%" />
@@ -220,19 +199,14 @@ import reportDialog from "@/components/report-dialog/main";
 import { dateFormat } from "@/util/date";
 import checkSchedule from "@/components/checkL/checkSchedule";
 import check from "@/components/checkL/check";
-import { getList, listAll } from "@/api/tirePartsMall/basicData/listingManagement"
-import commodityxsho from '../../configuration/commodityxsho.json'
-import { number } from "echarts";
+import commodityxsho from '../configuration/commodityxsho.json'
 import { getCorpTypes } from "@/api/tirePartsMall/basicData/commodityInformation";
-import losbfeestemplate from "@/views/iosBasicData/losbfeestemplate/index.vue";
 import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
-import {
-    getList as KHgetList
-} from "@/api/tirePartsMall/basicData/customerInformation";
 import { getToken } from "@/util/auth";
 import { isProcurement } from "@/api/basicData/configuration";
 import { getList as inventoryList } from "@/api/tirePartsMall/inventory";
 import dicSelect from "@/components/dicSelect/main";
+import { stockGoodsList } from "@/api/storehouse/stock.js";
 export default {
     name: "detailsPage",
     data() {
@@ -423,12 +397,42 @@ export default {
                         trigger: "blur"
                     }]
                 },
+                    {
+                        label: '联系人',
+                        type: "select",
+                        prop: "contacts",
+                        disabled: false,
+                        allowCreate: true,
+                        filterable: true,
+                        dicData: [],
+                        props: {
+                            label: 'address',
+                            value: 'id'
+                        },
+                        dicUrl: '/api/blade-sales-part/corpsAddr/corpIdByAddr?pid={{key}}'
+                    }, {
+                        label: '电话',
+                        disabled: false,
+
+                        prop: "phone",
+                    }, {
+                        label: '收货地址',
+                        prop: "recAddress",
+                        type: 'select',
+                        allowCreate: true,
+                        filterable: true,
+                        disabled: false,
+                        props: {
+                            label: 'address',
+                            value: 'address'
+                        },
+                        dicUrl: '/api/blade-sales-part/corpsAddr/corpIdByAddr?pid={{key}}'
+                    },
                 {
                     label: '仓库',
                     prop: "storageId",
                     type: 'select',
                     disabled: false,
-                    placeholder: '仓库为空即为异地销售',
                     props: {
                         label: 'cname',
                         value: 'id'
@@ -441,7 +445,7 @@ export default {
                     }]
                 },
                 {
-                    label: '计划出库日期',
+                    label: '出库日期',
                     prop: "businesDate",
                     searchProp: "businesDateList",
                     disabled: false,
@@ -463,37 +467,6 @@ export default {
                     disabled: true,
                 },
                 {
-                    label: '联系人',
-                    type: "select",
-                    prop: "contacts",
-                    disabled: false,
-                    allowCreate: true,
-                    filterable: true,
-                    dicData: [],
-                    props: {
-                        label: 'address',
-                        value: 'id'
-                    },
-                    dicUrl: '/api/blade-sales-part/corpsAddr/corpIdByAddr?pid={{key}}'
-                }, {
-                    label: '电话',
-                    disabled: false,
-
-                    prop: "phone",
-                }, {
-                    label: '收货地址',
-                    prop: "recAddress",
-                    type: 'select',
-                    allowCreate: true,
-                    filterable: true,
-                    disabled: false,
-                    props: {
-                        label: 'address',
-                        value: 'address'
-                    },
-                    dicUrl: '/api/blade-sales-part/corpsAddr/corpIdByAddr?pid={{key}}'
-                },
-                {
                     label: '单据编号',
                     prop: "ordNo",
                     disabled: true,
@@ -687,13 +660,6 @@ export default {
                         dicUrl: "/api/blade-sales-part/stockDesc/dotList",
                         overHidden: true,
                     },
-                    // {
-                    //     label: '单号',
-                    //     prop: 'poNo',
-                    //     overHidden: true,
-                    //     disabled: false,
-                    //     width: 100
-                    // },
                     {
                         label: '商品编码',
                         prop: 'goodsNo',
@@ -740,7 +706,6 @@ export default {
                         overHidden: true,
                         width: 100
                     },
-
                     {
                         label: '发货数量',
                         prop: 'sendNum',
@@ -750,12 +715,6 @@ export default {
                         editDisplay: false,
                         addDisplay: false
                     },
-                    // {
-                    //     label: '利润',
-                    //     prop: 'profit',
-                    //     overHidden: true,
-                    //     width: 100
-                    // },
                     {
                         label: '小计',
                         prop: 'subTotalMoney',
@@ -765,78 +724,6 @@ export default {
                         editDisplay: false,
                         addDisplay: false
                     },
-                    // {
-                    //     label: '返利',
-                    //     prop: 'thisAmount',
-                    //     overHidden: true,
-                    //     width: 100
-                    // },
-                    {
-                        label: '成本',
-                        prop: 'costprie',
-                        overHidden: true,
-                        width: 100,
-                        disabled: true,
-                        editDisplay: false,
-                        addDisplay: false
-
-                    },
-                    {
-                        label: '毛利',
-                        prop: 'grossProfit',
-                        overHidden: true,
-                        width: 100,
-                        disabled: true,
-                        editDisplay: false,
-                        addDisplay: false
-                    },
-                    {
-                        label: '返利后单价',
-                        prop: 'rebatePrice',
-                        overHidden: true,
-                        width: 100,
-                        disabled: true,
-                        editDisplay: false,
-                        addDisplay: false,
-                        hide: false,
-                        showColumn: true
-                    },
-                    {
-                        label: '返利后成本价',
-                        prop: 'rebateCostprie',
-                        overHidden: true,
-                        width: 100,
-                        disabled: true,
-                        editDisplay: false,
-                        addDisplay: false,
-                        hide: false,
-                        showColumn: true
-                    },
-                    {
-                        label: '返利后利润',
-                        prop: 'rebateProfit',
-                        overHidden: true,
-                        width: 100,
-                        disabled: true,
-                        editDisplay: false,
-                        addDisplay: false,
-                        hide: false,
-                        showColumn: true
-                    },
-                    {
-                        label: '退货数量',
-                        prop: "returnsNumber",
-                        overHidden: true,
-                        width: 100,
-                        disabled: true,
-                    },
-                    {
-                        label: '退货金额',
-                        prop: "returnsAmount",
-                        overHidden: true,
-                        width: 100,
-                        disabled: true,
-                    },
                     {
                         label: '备注',
                         prop: "remarks",
@@ -1162,12 +1049,11 @@ export default {
             this.goodsListShow = []
             this.loading = true;
             if (this.goodsType == 1) {
-                goodsPageXs({
+                stockGoodsList({
                     current: page.currentPage,
                     size: page.pageSize,
-                    customId: this.form.customerId,
-                    stock: this.form.storageId,
-                    enableOrNot: 1,
+                    customerId: this.form.customerId,
+                    storageId: this.form.storageId,
                     goodsTypeId: this.treeDeptId,
                     ...Object.assign(params, this.SelectSearch),
                     whetherIntegral: '0'
@@ -1417,21 +1303,16 @@ export default {
             }
             this.findObject(this.optionContactsBack.column, 'goodsId').dicUrl = `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=${this.dicUrlWithCustomId}&enableOrNot=1&stock=${this.form.storageId}`
             this.goodsType = type
+            let columnList = ['goodsId', 'goodsNum', 'price', 'dot', 'remarks']
             this.optionContactsBack.column.forEach(its => {
-                if (its.prop == 'goodsId' || its.prop == 'goodsNum' || its.prop == 'price' || its.prop == 'dot' || its.prop == 'remarks') {
-                    its.disabled = false
-                } else {
-                    its.disabled = true
-                }
+                its.disabled = columnList.indexOf(its.prop) === -1
             })
             this.getAllWorkDicts()
-
             this.goodsListSave = []
             setTimeout(res => {
                 this.refreshChange()
                 this.dialogVisible = true
             }, 300)
-            // this.$refs.formContacts.rowAdd()
         },
         //打印
         handlePrint() {