Преглед на файлове

修改列表页和主表配置字段

Qukatie преди 6 дни
родител
ревизия
11482b449b

+ 48 - 6
src/views/iosBasicData/storageFeeF/detailsPage.vue

@@ -34,12 +34,15 @@
             </trade-card>
             <trade-card title="仓储费明细">
                 <avue-crud :option="option" :data="form.storageFeesItemsList" id="out-table" ref="crud"
-                    @resetColumn="resetColumn('crud', 'option', 'optionBack', 443)"
+                    @selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 443)"
                     @saveColumn="saveColumn('crud', 'option', 'optionBack', 443)">
                     <template slot="menuLeft">
                         <el-button type="primary" size="small" @click="addRow"
                             :disabled="editButton || form.status == '已生成'">计算仓储费
                         </el-button>
+                        <el-button type="danger" size="small" @click="allDel"
+                            :disabled="editButton || form.status == '已生成'||selectionList.length==0">批量删除
+                        </el-button>
                     </template>
                     <template slot="menu" slot-scope="{ row, index }">
                         <!-- <el-button size="small" icon="el-icon-edit" type="text"
@@ -151,6 +154,8 @@ export default {
                 menu: true,
                 refreshBtn: false,
                 align: 'center',
+                tip: false,
+                selection: true,
                 column: [
                     {
                         label: "合同号",
@@ -225,6 +230,7 @@ export default {
                     }
                 ]
             },
+            selectionList: [],
         }
     },
     components: {
@@ -251,14 +257,14 @@ export default {
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-                    let ids=[]
-                    ids=this.form.storageFeesItemsList.map(item => item.id) 
+                    let ids = []
+                    ids = this.form.storageFeesItemsList.map(item => item.id)
                     itemRemove({ ids: ids.join(',') }).then(res => {
-                        this.form.storageFeesItemsList=[]
+                        this.form.storageFeesItemsList = []
                         this.getData()
                         this.$message.success("操作成功!");
                     });
-                  
+
                 })
             }
             if (this.form.storageFeesItemsList.length == 0) {
@@ -287,8 +293,44 @@ export default {
                 loading.close()
             })
         },
+        selectionChange(list) {
+            this.selectionList = list
+        },
         allDel() {
-
+            let multiList = []
+            let arr = []
+            this.$confirm("确定将选择数据删除?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                multiList = this.selectionList
+                arr = this.form.storageFeesItemsList
+                // 获取有id 的数据
+                const itemsWithId = multiList.filter(item => item.id != null);
+                let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
+                // 把选中的删除掉
+                multiList.forEach((item) => {
+                    for (let index in arr) {
+                        if (JSON.stringify(item) == JSON.stringify(arr[index])) {
+                            arr.splice(Number(index), 1)
+                        }
+                    }
+                })
+                if (itemsWithId.length != 0) {
+                    const loading = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    itemRemove({ ids: arrIds.join(',') }).then(res => {
+                        this.$message.success("删除成功");
+                    }).finally(() => {
+                        loading.close();
+                    })
+                }
+            })
         },
         // 编辑
         inEdit() {

+ 2 - 2
src/views/storehouse/inStockManage/inStockPlan/index.vue

@@ -232,8 +232,8 @@ export default {
                 searchIcon: true,
                 searchIndex: 3,
                 highlightCurrentRow: true,
-                expand: true,
-                expandWidth: 60,
+                // expand: true,
+                // expandWidth: 60,
                 dialogWidth: "70%",
                 summaryText: "合计",
                 showSummary: true,

+ 7 - 7
src/views/storehouse/outStockManage/outStockPlan/detailsPage.vue

@@ -46,7 +46,7 @@
                             :disabled="editButton || form.status == 1"></dic-select>
                     </tempalte>
                     <tempalte slot="storageName">
-                        <dic-select v-model="form.storageName" placeholder="货主" key="id" label="cname" res="records"
+                        <dic-select v-model="form.storageName" placeholder="仓库" key="id" label="cname" res="records"
                             url="/blade-sales-part/tire/center/warehouse/storage/list?current=1&size=5"
                             :filterable="true" :remote="true" dataName="cname"
                             @selectChange="dicChange('storageName', $event)"
@@ -552,14 +552,14 @@ export default {
                 },
                 {
                     label: '仓库',
-                    prop: "storageId",
+                    prop: "storageName",
                     type: 'select',
                     disabled: false,
-                    props: {
-                        label: 'cname',
-                        value: 'id'
-                    },
-                    dicUrl: '/api/blade-sales-part/tire/center/warehouse/storage/storageSelectedList',
+                    // props: {
+                    //     label: 'cname',
+                    //     value: 'id'
+                    // },
+                    // dicUrl: '/api/blade-sales-part/tire/center/warehouse/storage/storageSelectedList',
                     rules: [{
                         required: true,
                         message: " ",

+ 2 - 2
src/views/storehouse/outStockManage/outStockPlan/index.vue

@@ -207,8 +207,8 @@ export default {
         searchSpan: 6,
         searchMenuSpan: 18,
         searchIcon: true,
-        expand: true,
-        expandWidth: 60,
+        // expand: true,
+        // expandWidth: 60,
         searchIndex: 3,
         highlightCurrentRow: true,
         dialogWidth: "70%",