Qukatie hace 1 año
padre
commit
6140321fa8

+ 4 - 0
src/enums/column-name.js

@@ -1580,6 +1580,10 @@ const columnName = [{
     name: '轮胎商城-财务管理-统计销售'
   },
   {
+    code: 337.2,
+    name: '轮胎商城-财务管理-统计采购'
+  },
+  {
     code: 338,
     name: '轮胎商城-品牌-花纹附件'
   },

+ 10 - 3
src/views/tirePartsMall/configuration/commodity.json

@@ -28,6 +28,13 @@
       "overHidden": true
     },
     {
+      "label": "商品编码",
+      "prop": "code",
+      "search": true,
+      "overHidden": true,
+      "width": "120"
+    },
+    {
       "label": "数量",
       "prop": "goodsNum",
       "slot": true,
@@ -67,15 +74,15 @@
     {
       "label": "库存",
       "prop": "inventory",
-      "hide": true,
-      "addDisabled": false,
       "multiple": true,
       "overHidden": true
     },
     {
       "label": "商品编码",
       "prop": "code",
-      "slot": true,
+      "search": true,
+      "hide": true,
+      "addDisabled": false,
       "overHidden": true,
       "width": "120"
     },

+ 7 - 0
src/views/tirePartsMall/configuration/commodityxsho.json

@@ -30,6 +30,13 @@
       "overHidden": true
     },
     {
+      "label": "商品编号",
+      "prop": "code",
+      "search": true,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "数量",
       "prop": "goodsNum",
       "slot": true,

+ 36 - 23
src/views/tirePartsMall/financialManagement/purchaseDetail/index.vue

@@ -11,8 +11,8 @@
             :page.sync="page"
             :cell-style="cellStyle"
             @search-change="searchChange"
-            @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 337)"
-            @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 337)">
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 337.2)"
+            @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 337.2)">
             <template slot="menuLeft">
                 <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
             </template>
@@ -91,14 +91,15 @@
                               @corpChange="corpChange($event,'actualPaymentStatus')">
                 </search-query>
             </template>
-            <template slot="statusSearch">
-                <search-query :datalist="statusData"
-                              :selectValue="query.status"
+            <template slot="bsTypeSearch">
+                <search-query :datalist="bsTypeData"
+                              :selectValue="query.bsType"
+                              :clearable="true"
                               :buttonIf="false"
                               :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
                               placeholder="请选择单据状态"
-                              @corpFocus="statusWorkDictsfun"
-                              @corpChange="corpChange($event,'status')">
+                              @corpFocus="getBsType"
+                              @corpChange="corpChange($event,'bsType')">
                 </search-query>
             </template>
             <template slot="isContainSearch">
@@ -165,11 +166,6 @@ export default {
                         decimals: 0
                     },
                     {
-                        name: 'price',
-                        type: 'sum',
-                        decimals: 2
-                    },
-                    {
                         name: 'subTotalMoney',
                         type: 'sum',
                         decimals: 2
@@ -192,14 +188,16 @@ export default {
                     search: true,
                     searchslot: true,
                     searchOrder: 3
-                }, {
-                    label: '业务员',
-                    prop: 'salerName',
-                    overHidden: true,
-                    search: true,
-                    searchslot: true,
-                    searchOrder: 4
-                }, {
+                }, 
+                // {
+                //     label: '业务员',
+                //     prop: 'salerName',
+                //     overHidden: true,
+                //     search: true,
+                //     searchslot: true,
+                //     searchOrder: 4
+                // }, 
+                {
                     label: '仓库',
                     prop: 'storageName',
                     overHidden: true,
@@ -302,11 +300,20 @@ export default {
                     label: '单据状态',
                     prop: 'status',
                     overHidden: true,
+                    // search: true,
+                    // searchslot: true,
+                    // searchOrder: 8
+                }, 
+                {
+                    label: '业务类型',
+                    prop: 'bsType',
+                    overHidden: true,
                     search: true,
                     searchslot: true,
                     searchOrder: 8
-                }, {
-                    label: '包含未发货',
+                }, 
+                {
+                    label: '包含未收货',
                     prop: 'isContain',
                     overHidden: true,
                     hide: true,
@@ -315,6 +322,7 @@ export default {
                     searchOrder: 9
                 }]
             },
+            bsTypeData:[],
             customerData: [], // 客户数据
             brandData: [], // 品牌数据
             goodsData: [], // 商品名称
@@ -367,7 +375,7 @@ export default {
         }
     },
     async created() {
-        this.option = await this.getColumnData(this.getColumnName(337), this.optionList);
+        this.option = await this.getColumnData(this.getColumnName(337.2), this.optionList);
     },
     methods: {
         cellStyle({row, rowIndex}) {
@@ -441,6 +449,11 @@ export default {
                 this.statusData = res.data.data
             })
         },
+        getBsType(){
+            getWorkDicts('cg_business_Type').then(res => {
+                this.bsTypeData = res.data.data
+            })
+        },
         // 下拉回调
         corpChange(value, name) {
             this.$set(this.query, name, value)

+ 20 - 5
src/views/tirePartsMall/financialManagement/saleDetail/index.vue

@@ -91,14 +91,15 @@
                               @corpChange="corpChange($event,'actualPaymentStatus')">
                 </search-query>
             </template>
-            <template slot="statusSearch">
-                <search-query :datalist="statusData"
-                              :selectValue="query.status"
+            <template slot="bsTypeSearch">
+                <search-query :datalist="bsTypeData"
+                              :selectValue="query.bsType"
+                              :clearable="true"
                               :buttonIf="false"
                               :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
                               placeholder="请选择单据状态"
-                              @corpFocus="statusWorkDictsfun"
-                              @corpChange="corpChange($event,'status')">
+                              @corpFocus="getBsType"
+                              @corpChange="corpChange($event,'bsType')">
                 </search-query>
             </template>
             <template slot="isContainSearch">
@@ -296,6 +297,14 @@ export default {
                     label: '单据状态',
                     prop: 'status',
                     overHidden: true,
+                    // search: true,
+                    // searchslot: true,
+                    // searchOrder: 8
+                }, 
+                {
+                    label: '业务类型',
+                    prop: 'bsType',
+                    overHidden: true,
                     search: true,
                     searchslot: true,
                     searchOrder: 8
@@ -309,6 +318,7 @@ export default {
                     searchOrder: 9
                 }]
             },
+            bsTypeData:[],
             customerData: [], // 客户数据
             brandData: [], // 品牌数据
             goodsData: [], // 商品名称
@@ -421,6 +431,11 @@ export default {
                 this.actualPaymentStatusData = res.data.data
             })
         },
+        getBsType(){
+            getWorkDicts('xs_business_Type').then(res => {
+                this.bsTypeData = res.data.data
+            })
+        },
         // 单据状态
         statusWorkDictsfun() {
             getWorkDicts('sales_Status').then(res => {

+ 13 - 6
src/views/tirePartsMall/purchaseService/returns/detailsPage.vue

@@ -925,7 +925,12 @@ export default {
                 let arr = this.form.orderItemsList
                 // 获取有id 的数据
                 const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
-                let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
+                let arrIds = []
+                itemsWithId.map(item => {
+                    if (item.id) {
+                        arrIds.push(item.id)
+                    }
+                })
                 // 把选中的删除掉
                 multiList.forEach((item) => {
                     for (let index in arr) {
@@ -934,11 +939,13 @@ export default {
                         }
                     }
                 })
-                // 有id 的处理
-                if (itemsWithId.length != 0) {
-                    delOrderItem({ ids: arrIds.join(',') }).then(res => {
-                        this.$message.success("操作成功!");
-                    });
+                // // 有id 的处理
+                if (arrIds.length != 0) {
+                    if (itemsWithId.length != 0) {
+                        delOrderItem({ ids: arrIds.join(',') }).then(res => {
+                            this.$message.success("操作成功!");
+                        });
+                    }
                 }
             })
         },

+ 20 - 12
src/views/tirePartsMall/salesService/returns/detailsPage.vue

@@ -93,15 +93,15 @@
                                 <span v-else>{{ row.returnsNumber }}</span>
                             </template>
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button v-if="mingxibaocun" :size="size" :disabled="form.status != '录入'|| editButton" :type="type"
-                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+                                <el-button v-if="mingxibaocun" :size="size" :disabled="form.status != '录入' || editButton"
+                                    :type="type" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
                                     @click="hangeditBtn(row, index)">编辑
                                 </el-button>
                                 <el-button v-else :size="size" :disabled="disabled" :type="type"
                                     :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="inSave(row, index)">保存
                                 </el-button>
-                                <el-button icon="el-icon-delete" :size="size" :disabled="form.status != '录入'|| editButton" :type="type"
-                                    @click="rowDelBox(row, index, 'orderItemsList')">删除
+                                <el-button icon="el-icon-delete" :size="size" :disabled="form.status != '录入' || editButton"
+                                    :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
                                 </el-button>
                             </template>
                         </avue-crud>
@@ -747,7 +747,7 @@ export default {
             })
             getDetails({ id: id }).then(res => {
                 this.form = res.data.data
-                if (res.data.data.status != '录入'||this.editButton) {
+                if (res.data.data.status != '录入' || this.editButton) {
                     this.findObject(this.optionForm.column, 'businesDate').disabled = true
                     this.findObject(this.optionForm.column, 'remarks').disabled = true
                 }
@@ -911,8 +911,8 @@ export default {
             );
         },
         // 监听多选
-        selectionContacts(list){
-            this.selectionMultilist=list
+        selectionContacts(list) {
+            this.selectionMultilist = list
         },
         // 一键删除
         batchDelete() {
@@ -928,7 +928,12 @@ export default {
                 let arr = this.form.orderItemsList
                 // 获取有id 的数据
                 const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
-                let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
+                let arrIds = []
+                itemsWithId.map(item => {
+                    if (item.id) {
+                        arrIds.push(item.id)
+                    }
+                }) // 获取id 数据
                 // 把选中的删除掉
                 multiList.forEach((item) => {
                     for (let index in arr) {
@@ -938,11 +943,14 @@ export default {
                     }
                 })
                 // 有id 的处理
-                if (itemsWithId.length != 0) {
-                    delOrderItem({ ids: arrIds.join(',') }).then(res => {
-                        this.$message.success("操作成功!");
-                    });
+                if (arrIds.length != 0) {
+                    if (itemsWithId.length != 0) {
+                        delOrderItem({ ids: arrIds.join(',') }).then(res => {
+                            this.$message.success("操作成功!");
+                        });
+                    }
                 }
+
             })
         },
         rowSave(form, done, loading) {