瀏覽代碼

新加设备管理模块

Qukatie 11 月之前
父節點
當前提交
51aab8e000

+ 18 - 2
src/api/iosBasicData/costcenter/coc.js

@@ -28,6 +28,22 @@ export const submit = (data) => {
         data: data
     })
 }
+//贸易代理保存
+export const submitItemList = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/submitItemList',
+        method: 'post',
+        data: data
+    })
+}
+//贸易代理保存
+export const submitFeeList = (data) => {
+    return request({
+        url: '/api/blade-los/routecost/submitFeeList',
+        method: 'post',
+        data: data
+    })
+}
 
 //申请付款
 export const generatePayment = (data) => {
@@ -57,7 +73,7 @@ export const remove = (data) => {
 //贸易代理删除
 export const removeItem = (data) => {
     return request({
-        url: '/api/blade-los/routecostitem/remove',
+        url: '/api/blade-los/routecost/removeItemList',
         method: 'post',
         params: data
     })
@@ -90,7 +106,7 @@ export const copyAgent = (data) => {
 //贸易代理费用明细删除
 export const feeRemove = (data) => {
     return request({
-        url: '/api/blade-los/routecostfee/remove',
+        url: '/api/blade-los/routecost/removeFeeList',
         method: 'post',
         params: data
     })

+ 56 - 0
src/api/tirePartsMall/equipmentManagement/index.js

@@ -0,0 +1,56 @@
+import request from '@/router/axios';
+//tree列表页
+export const getTreelist = (current, size, params) => {
+  return request({
+    url: '/api/blade-sales-part/devicebaseinfo/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+//详情列表页
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/blade-sales-part/deviceproductdata/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+//设备管理开启关闭
+export const submit = (row) => {
+  return request({
+    url: '/api/blade-sales-part/devicebaseinfo/submit',
+    method: 'post',
+    data: row
+  })
+}
+export const getDetail = (row) => {
+  return request({
+    url: '/api/blade-sales-part/devicebaseinfo/detail',
+    method: 'get',
+    params: row
+  })
+}
+//设备管理开启关闭
+export const remove = (row) => {
+  return request({
+    url: '/api/blade-sales-part/devicebaseinfo/remove',
+    method: 'POST',
+    params: row
+  })
+}
+//设备管理开启关闭
+export const update = (row) => {
+  return request({
+    url: '/api/blade-sales-part/devicebaseinfo/update',
+    method: 'post',
+    data: row
+  })
+}

+ 22 - 1
src/components/dicSelect/main.vue

@@ -173,7 +173,8 @@ export default {
                 }
             },
             treeData: [],
-            selectWidth: 0
+            selectWidth: 0,
+            obtained:true,
         }
     },
     props: {
@@ -271,6 +272,14 @@ export default {
             type: Boolean,
             default: false
         },
+        default:{
+            type: Boolean,
+            default: false
+        },
+        defaultValue:{
+            type: String,
+            default: ''
+        }
     },
     model: {
         prop: "value",
@@ -329,8 +338,20 @@ export default {
                 getDicinit(this.method, this.url, this.data).then(res => {
                     if (this.res) {
                         this.options = res.data.data[this.res]
+                        if(res.data.data[this.res].length>0&&this.default&&this.obtained){
+                            this.obtained=false
+                            if(res.data.data[this.res].length>0){
+                                this.$emit('getDefault',res.data.data[this.res][0])
+                            }
+                        }
                     } else {
                         this.options = res.data.data
+                        if(res.data.data.length>0&&this.default&&this.obtained){
+                            this.obtained=false
+                            if(res.data.data.length>0){
+                                this.$emit('getDefault',res.data.data[0])
+                            }
+                        }
                     }
                 }).finally(() => {
                     this.loading = false;

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

@@ -2010,6 +2010,12 @@ const columnName = [{
   },{
     code: 455,
     name: '永发-航线利润-列表页'
+  },{
+    code: 456,
+    name: '博瑞科-设备管理-列表页'
+  },{
+    code: 457,
+    name: '博瑞科-设备管理-主表弹窗列表页'
   }
 ]
 export const getColumnName = (key) => {

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

@@ -4031,4 +4031,18 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/costcenter/airlineProfit/index')
   }]
 },
+{
+  path: '/tirePartsMall/equipmentManagement/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/tirePartsMall/equipmentManagement/index',
+    name: '设备管理(L)',
+    meta: {
+      i18n: '/tirePartsMall/equipmentManagement/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/equipmentManagement/index')
+  }]
+},
 ]

+ 3 - 2
src/views/iosBasicData/costcenter/airlineProfit/index.vue

@@ -20,10 +20,10 @@
                             <el-button type="warning" size="small" @click="outExport">导 出
                             </el-button>
                         </template>
-                        <template slot="menu" slot-scope="{ row, index }">
+                        <!-- <template slot="menu" slot-scope="{ row, index }">
                             <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
                                 :disabled="row.status != '录入'">删 除</el-button>
-                        </template>
+                        </template> -->
                     </avue-crud>
                 </el-tab-pane>
                 <el-tab-pane label="自有箱" name="second">
@@ -253,6 +253,7 @@ export default {
                 viewBtn: false,
                 editBtn: false,
                 delBtn: false,
+                menu:false,
                 selection: true,
                 searchIcon: true,
                 align: 'center',

+ 396 - 25
src/views/iosBasicData/costcenter/coc/detailsPage.vue

@@ -7,12 +7,12 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-                <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
+                <!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
                     @click="$refs.print.openDialog()">预 览
                 </el-button>
                 <el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px"
                     :disabled="!form.id" @click="$refs.report.openDialog()">报表设计
-                </el-button>
+                </el-button> -->
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
                     v-if="editButton"
                     :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
@@ -45,8 +45,8 @@
                     <tempalte slot="belongingCompanyName">
                         <dic-select v-model="form.belongingCompanyName" placeholder="所属公司" key="id" label="deptName"
                             url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
-                            @selectChange="dicChange('belongingCompanyName', $event)"
-                            :disabled="editDisabled"></dic-select>
+                            @selectChange="dicChange('belongingCompanyName', $event)" :default="true"
+                            @getDefault="getDefault" :disabled="editDisabled"></dic-select>
                     </tempalte>
                     <tempalte slot="podCname">
                         <dic-select v-model="form.podCname" placeholder="起运港" key="id" label="cnName" res="records"
@@ -146,7 +146,8 @@
                             @click="allClick('一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionList.length == 0"
                             @click="allClick('批量删除')">批量删除</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
@@ -206,11 +207,14 @@
                     @saveColumn="saveColumn('crud2', 'polOption', 'polOptionBack', 448)">
                     <template slot="menuLeft">
                         <el-button type="info" plain size="small" :disabled="editDisabled"
-                            @click="allClick('一键保存')">一键保存</el-button>
+                            @click="allClick('POL一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('POL一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionPolList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionPolList.length == 0"
                             @click="allClick('POL批量删除')">批量删除</el-button>
+                        <el-button type="success" plain size="small" :disabled="editDisabled"
+                            @click="allClick('POL费用模板')">费用模板</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
                         <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -287,11 +291,14 @@
                     @saveColumn="saveColumn('crud3', 'podOption', 'podOptionBack', 449)">
                     <template slot="menuLeft">
                         <el-button type="info" plain size="small" :disabled="editDisabled"
-                            @click="allClick('一键保存')">一键保存</el-button>
+                            @click="allClick('POD一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('POD一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionPodList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionPodList.length == 0"
                             @click="allClick('POD批量删除')">批量删除</el-button>
+                        <el-button type="success" plain size="small" :disabled="editDisabled"
+                            @click="allClick('POD费用模板')">费用模板</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
                         <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -368,11 +375,14 @@
                     @saveColumn="saveColumn('crud4', 'potOption', 'potOptionBack', 450)">
                     <template slot="menuLeft">
                         <el-button type="info" plain size="small" :disabled="editDisabled"
-                            @click="allClick('一键保存')">一键保存</el-button>
+                            @click="allClick('POT一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('POT一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionPotList.length == 0"
+                        <el-button type="danger" plain size="small"
+                            :disabled="editDisabled || selectionPotList.length == 0"
                             @click="allClick('POT批量删除')">批量删除</el-button>
+                        <el-button type="success" plain size="small" :disabled="editDisabled"
+                            @click="allClick('POT费用模板')">费用模板</el-button>
                     </template>
                     <template slot="indexHeader" slot-scope="{row,index}">
                         <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -452,11 +462,35 @@
             :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
             <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
         </el-dialog>
+        <el-dialog append-to-body title="费用模板" :visible.sync="templateDialog" width="60%" :before-close="handleClose">
+            <span>
+                <el-row>
+                    <el-col :span="5">
+                        <el-scrollbar>
+                            <basic-container>
+                                <avue-tree :option="treeOption" :data="templateData" @node-click="nodeClick">
+                                </avue-tree>
+                            </basic-container>
+                        </el-scrollbar>
+                    </el-col>
+                    <el-col :span="19">
+                        <avue-crud :data="templateList" :option="templateOption"
+                            @selection-change="templateChange"></avue-crud>
+                    </el-col>
+                </el-row>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="templateDialog = false" size="mini">取 消</el-button>
+                <el-button type="primary" @click="importTemplate" size="mini">导 入</el-button>
+            </span>
+        </el-dialog>
     </div>
 </template>
 
 <script>
-import { submit, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent } from "@/api/iosBasicData/costcenter/coc";
+import { submit, submitItemList, submitFeeList, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent } from "@/api/iosBasicData/costcenter/coc";
+import { losbfeestemplateGetListTemplate } from "@/api/iosBasicData/bills";
+import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import businessReports from "@/components/tradeAgency/businessReports.vue";
@@ -465,10 +499,62 @@ import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 import { getDicinit } from "@/api/dicSelect/index";
 import { dateFormat } from "@/util/date";
 import _ from "lodash";
+import { Header } from "element-ui";
 export default {
     name: "detailsPage",
     data() {
         return {
+            selectionTemplateList: [],
+            feeType: null,
+            treeOption: {
+                nodeKey: "id",
+                // lazy: true,
+                addBtn: false,
+                menu: false,
+                size: "small",
+                props: {
+                    labelText: "标题",
+                    label: "cnName",
+                    value: "value",
+                    children: "children"
+                }
+            },
+            templateData: [],
+            templateList: [],
+            templateOption: {
+                height: 500,
+                menu: false,
+                addBtn: false,
+                editBtn: false,
+                delBtn: false,
+                viewBtn: false,
+                header: false,
+                index: true,
+                selection: true,
+                column: [
+                    {
+                        label: '费用',
+                        prop: 'feeCnName',
+                        overHidden: true,
+                    },
+                    {
+                        label: '成本价',
+                        prop: 'price',
+                        overHidden: true,
+                    },
+                    {
+                        label: '币别',
+                        prop: 'curCode',
+                        overHidden: true,
+                    },
+                    {
+                        label: '汇率',
+                        prop: 'curCode',
+                        overHidden: true,
+                    }
+                ]
+            },
+            templateDialog: false,
             selectionList: [],
             selectionPolList: [],
             selectionPodList: [],
@@ -479,6 +565,9 @@ export default {
             editButton: false,
             editDisabled: false,
             form: {
+                cabinType: '非固定',
+                flightType: '直达',
+                transportationTerms: 'CY-CY',
                 businessType: 'COC',
                 exrateDate: dateFormat(new Date()),
                 costItemList: [],
@@ -497,6 +586,11 @@ export default {
                         label: '所属公司',
                         prop: "belongingCompanyName",
                         disabled: false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
                     },
                     {
                         label: '系统号',
@@ -1484,7 +1578,6 @@ export default {
         detailData: Object
     },
     async created() {
-
         this.roleName = localStorage.getItem('roleName').split(',')
         this.option = await this.getColumnData(this.getColumnName(447), this.optionBack);
         this.polOption = await this.getColumnData(this.getColumnName(448), this.polOptionBack);
@@ -1504,6 +1597,16 @@ export default {
         }
     },
     methods: {
+        getDefault(data) {
+            if (!this.form.belongingCompanyName) {
+                this.form.belongingCompanyId = data.id
+                this.form.belongingCompanyName = data.deptName
+                this.form.podId = data.polId
+                this.form.podCode = data.polCode
+                this.form.podEname = data.polEnName
+                this.form.podCname = data.polCnName
+            }
+        },
         costPriceChange() {
             this.form.costItemList.forEach(item => {
                 let polSUM = 0
@@ -1797,37 +1900,62 @@ export default {
             if (!this.form.id) {
                 return this.$message.error("请保存数据");
             }
-            this.form.costItemList.push({
-                salesPrice: 0,
-                costPrice: 0,
-                totalProfit: 0,
-                oceanFreight: 0,
-                boxCost: 0,
-                useBoxCost: 0,
-                polCost: 0,
-                podCost: 0,
-                potCost: 0,
-                $cellEdit: true
+            bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                res.data.data.forEach(item => {
+                    if (item.code == 'USD') {
+                        this.form.costItemList.push({
+                            pid: this.form.id,
+                            curCode: 'USD',
+                            exrate: item.exrate,
+                            salesPrice: 0,
+                            costPrice: 0,
+                            totalProfit: 0,
+                            oceanFreight: 0,
+                            boxCost: 0,
+                            useBoxCost: 0,
+                            polCost: 0,
+                            podCost: 0,
+                            potCost: 0,
+                            $cellEdit: true
+                        })
+                    }
+                })
             })
+
         },
         polAddRow() {
             this.polFeeList.push({
+                pid: this.form.id,
                 busType: 'POL',
+                type: '船公司',
+                curCode: 'CNY',
+                exrate: 1,
                 $cellEdit: true
             })
         },
         podAddRow() {
             this.podFeeList.push({
+                pid: this.form.id,
                 busType: 'POD',
+                type: '船公司',
+                curCode: 'CNY',
+                exrate: 1,
                 $cellEdit: true
             })
         },
         potAddRow() {
             this.potFeeList.push({
+                pid: this.form.id,
                 busType: 'POT',
+                type: '场站',
+                curCode: 'CNY',
+                exrate: 1,
                 $cellEdit: true
             })
         },
+        templateChange(list) {
+            this.selectionTemplateList = list;
+        },
         selectionChange(list) {
             this.selectionList = list;
         },
@@ -1960,7 +2088,27 @@ export default {
         },
         allClick(name) {
             if (name == '一键保存') {
-                this.submit()
+                if (!this.form.costItemList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.form.costItemList) {
+                    if (!row.boxType || !row.curCode || !row.salesPrice) {
+                        this.$refs.crud.rowCell(row, row.$index)
+                        return this.$message.error("请完善明细信息");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitItemList(this.form.costItemList).then(res => {
+                    this.$message.success("保存成功");
+                    this.form.costItemList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
             }
             if (name == '一键编辑') {
                 for (let row of this.form.costItemList) {
@@ -2003,6 +2151,29 @@ export default {
                     }
                 })
             }
+            if (name == 'POL一键保存') {
+                if (!this.polFeeList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.polFeeList) {
+                    if (!row.type || !row.boxType || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        this.$refs.crud2.rowCell(row, row.$index)
+                        return this.$message.error("请完善POL杂费明细");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitFeeList(this.polFeeList).then(res => {
+                    this.$message.success("保存成功");
+                    this.polFeeList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
+            }
             if (name == 'POL一键编辑') {
                 for (let row of this.polFeeList) {
                     this.$set(row, "$cellEdit", true);
@@ -2044,6 +2215,29 @@ export default {
                     }
                 })
             }
+            if (name == 'POD一键保存') {
+                if (!this.podFeeList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.podFeeList) {
+                    if (!row.type || !row.boxType || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        this.$refs.crud3.rowCell(row, row.$index)
+                        return this.$message.error("请完善POL杂费明细");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitFeeList(this.podFeeList).then(res => {
+                    this.$message.success("保存成功");
+                    this.podFeeList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
+            }
             if (name == 'POD一键编辑') {
                 for (let row of this.podFeeList) {
                     this.$set(row, "$cellEdit", true);
@@ -2085,6 +2279,29 @@ export default {
                     }
                 })
             }
+            if (name == 'POT一键保存') {
+                if (!this.potFeeList.length) {
+                    return this.$message.error("请添加数据");
+                }
+                for (let row of this.potFeeList) {
+                    if (!row.type || !row.boxType || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        this.$refs.crud4.rowCell(row, row.$index)
+                        return this.$message.error("请完善POL杂费明细");
+                    }
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                submitFeeList(this.potFeeList).then(res => {
+                    this.$message.success("保存成功");
+                    this.potFeeList = res.data.data
+                }).finally(() => {
+                    loading.close();
+                })
+            }
             if (name == 'POT一键编辑') {
                 for (let row of this.potFeeList) {
                     this.$set(row, "$cellEdit", true);
@@ -2126,6 +2343,160 @@ export default {
                     }
                 })
             }
+            if (name == 'POL费用模板') {
+                this.templateData = []
+                this.templateList = []
+                this.feeType = 'POL'
+                this.templateDialog = true
+                let obj = {
+                    status: 0,
+                    type: 'COC',
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                losbfeestemplateGetListTemplate(1, 50, obj).then(res => {
+                    this.templateData = res.data.data.records
+                    if (res.data.data.records.length) {
+                        losbfeestemplateDetail(res.data.data.records[0].id).then(res => {
+                            this.templateList = res.data.data.feesTemplateItemsList
+                        })
+                    }
+
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+            if (name == 'POD费用模板') {
+                this.templateData = []
+                this.templateList = []
+                this.feeType = 'POD'
+                this.templateDialog = true
+                let obj = {
+                    status: 0,
+                    type: 'COC',
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                losbfeestemplateGetListTemplate(1, 50, obj).then(res => {
+                    this.templateData = res.data.data.records
+                    if (res.data.data.records.length) {
+                        losbfeestemplateDetail(res.data.data.records[0].id).then(res => {
+                            this.templateList = res.data.data.feesTemplateItemsList
+                        })
+                    }
+
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+            if (name == 'POT费用模板') {
+                this.templateData = []
+                this.templateList = []
+                this.feeType = 'POT'
+                this.templateDialog = true
+                let obj = {
+                    status: 0,
+                    type: 'COC',
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                losbfeestemplateGetListTemplate(1, 50, obj).then(res => {
+                    this.templateData = res.data.data.records
+                    if (res.data.data.records.length) {
+                        losbfeestemplateDetail(res.data.data.records[0].id).then(res => {
+                            this.templateList = res.data.data.feesTemplateItemsList
+                        })
+                    }
+
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+        },
+        importTemplate() {
+            if (!this.selectionTemplateList.length) {
+                return this.$message.error("请选择模板");
+            }
+            this.selectionTemplateList.forEach(e => {
+                if (this.feeType == 'POL') {
+                    bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                        res.data.data.forEach(item => {
+                            if (e.curCode == item.code) {
+                                this.polFeeList.push({
+                                    pid: this.form.id,
+                                    busType: 'POL',
+                                    feeName: e.feeCnName,
+                                    feeCode: e.feeCode,
+                                    feeId: e.feeId,
+                                    costPrice: e.price,
+                                    curCode: e.curCode,
+                                    exrate: item.exrate,
+                                    $cellEdit: true
+                                })
+                            }
+                        })
+                    })
+                }
+                if (this.feeType == 'POD') {
+                    bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                        res.data.data.forEach(item => {
+                            if (e.curCode == item.code) {
+                                this.podFeeList.push({
+                                    pid: this.form.id,
+                                    busType: 'POD',
+                                    feeName: e.feeCnName,
+                                    feeCode: e.feeCode,
+                                    feeId: e.feeId,
+                                    costPrice: e.price,
+                                    curCode: e.curCode,
+                                    exrate: item.exrate,
+                                    $cellEdit: true
+                                })
+                            }
+                        })
+                    })
+
+                }
+                if (this.feeType == 'POT') {
+                    bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                        res.data.data.forEach(item => {
+                            if (e.curCode == item.code) {
+                                this.potFeeList.push({
+                                    pid: this.form.id,
+                                    busType: 'POT',
+                                    feeName: e.feeCnName,
+                                    feeCode: e.feeCode,
+                                    feeId: e.feeId,
+                                    costPrice: e.price,
+                                    curCode: e.curCode,
+                                    exrate: item.exrate,
+                                    $cellEdit: true
+                                })
+                            }
+                        })
+                    })
+
+                }
+            })
+            this.templateDialog = false
+        },
+        // 左侧选择
+        nodeClick(e) {
+            losbfeestemplateDetail(e.id).then(res => {
+                this.templateList = res.data.data.feesTemplateItemsList
+            })
         },
         submit(type) {
             this.$refs["form"].validate((valid, done) => {

+ 32 - 8
src/views/iosBasicData/costcenter/coc/index.vue

@@ -50,7 +50,7 @@ export default {
             form: {},
             query: {
                 businessType: 'COC',
-                sort:0,
+                sort: 0,
             },
             loading: false,
             page: {
@@ -77,6 +77,30 @@ export default {
                 searchIcon: true,
                 align: 'center',
                 searchIndex: 3,
+                summaryText: "合计",
+                showSummary: true,
+                sumColumnList: [
+                    {
+                        name: 'profit20',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'profit40',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'profitHc',
+                        type: 'sum',
+                        decimals: 2
+                    },
+                    {
+                        name: 'otherProfit',
+                        type: 'sum',
+                        decimals: 2
+                    }
+                ],
                 column: [
                     {
                         label: "系统号",
@@ -94,7 +118,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bports/list",
+                        dicUrl: "/api/blade-los/bports/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -111,7 +135,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bports/list",
+                        dicUrl: "/api/blade-los/bports/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -128,7 +152,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/blines/list",
+                        dicUrl: "/api/blade-los/blines/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -145,7 +169,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bcorps/list?corpTypeName=船公司",
+                        dicUrl: "/api/blade-los/bcorps/list?corpTypeName=船公司&cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -162,7 +186,7 @@ export default {
                         type: 'select',
                         filterable: true,
                         remote: true,
-                        dicUrl: "/api/blade-los/bvessels/list",
+                        dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
                         props: {
                             label: 'cnName',
                             value: 'cnName',
@@ -280,8 +304,8 @@ export default {
                         showColumn: false,
                         search: true,
                         searchOrder: 9,
-                        searchSpan:12,
-                        searchValue:0,
+                        searchSpan: 12,
+                        searchValue: 0,
                     }
                 ]
             },

+ 56 - 21
src/views/iosBasicData/costcenter/soc/detailsPage.vue

@@ -45,8 +45,8 @@
                     <tempalte slot="belongingCompanyName">
                         <dic-select v-model="form.belongingCompanyName" placeholder="所属公司" key="id" label="deptName"
                             url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
-                            @selectChange="dicChange('belongingCompanyName', $event)"
-                            :disabled="editDisabled"></dic-select>
+                            @selectChange="dicChange('belongingCompanyName', $event)" :default="true"
+                            @getDefault="getDefault" :disabled="editDisabled"></dic-select>
                     </tempalte>
                     <tempalte slot="podCname">
                         <dic-select v-model="form.podCname" placeholder="起运港" key="id" label="cnName" res="records"
@@ -565,6 +565,9 @@ export default {
             editButton: false,
             editDisabled: false,
             form: {
+                cabinType: '非固定',
+                flightType: '直达',
+                transportationTerms: 'CY-CY',
                 businessType: 'SOC',
                 exrateDate: dateFormat(new Date()),
                 costItemList: [],
@@ -583,6 +586,11 @@ export default {
                         label: '所属公司',
                         prop: "belongingCompanyName",
                         disabled: false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
                     },
                     {
                         label: '系统号',
@@ -1570,7 +1578,6 @@ export default {
         detailData: Object
     },
     async created() {
-
         this.roleName = localStorage.getItem('roleName').split(',')
         this.option = await this.getColumnData(this.getColumnName(447), this.optionBack);
         this.polOption = await this.getColumnData(this.getColumnName(448), this.polOptionBack);
@@ -1590,6 +1597,16 @@ export default {
         }
     },
     methods: {
+        getDefault(data) {
+            if (!this.form.belongingCompanyName) {
+                this.form.belongingCompanyId = data.id
+                this.form.belongingCompanyName = data.deptName
+                this.form.podId = data.polId
+                this.form.podCode = data.polCode
+                this.form.podEname = data.polEnName
+                this.form.podCname = data.polCnName
+            }
+        },
         costPriceChange() {
             this.form.costItemList.forEach(item => {
                 let polSUM = 0
@@ -1883,24 +1900,36 @@ export default {
             if (!this.form.id) {
                 return this.$message.error("请保存数据");
             }
-            this.form.costItemList.push({
-                pid: this.form.id,
-                salesPrice: 0,
-                costPrice: 0,
-                totalProfit: 0,
-                oceanFreight: 0,
-                boxCost: 0,
-                useBoxCost: 0,
-                polCost: 0,
-                podCost: 0,
-                potCost: 0,
-                $cellEdit: true
+            bcurrencyGetExrate({ date: this.form.exrateDate, dc: 'D' }).then(res => {
+                res.data.data.forEach(item => {
+                    if (item.code == 'USD') {
+                        this.form.costItemList.push({
+                            pid: this.form.id,
+                            curCode: 'USD',
+                            exrate: item.exrate,
+                            salesPrice: 0,
+                            costPrice: 0,
+                            totalProfit: 0,
+                            oceanFreight: 0,
+                            boxCost: 0,
+                            useBoxCost: 0,
+                            polCost: 0,
+                            podCost: 0,
+                            potCost: 0,
+                            $cellEdit: true
+                        })
+                    }
+                })
             })
+
         },
         polAddRow() {
             this.polFeeList.push({
                 pid: this.form.id,
                 busType: 'POL',
+                type: '船公司',
+                curCode: 'CNY',
+                exrate: 1,
                 $cellEdit: true
             })
         },
@@ -1908,6 +1937,9 @@ export default {
             this.podFeeList.push({
                 pid: this.form.id,
                 busType: 'POD',
+                type: '船公司',
+                curCode: 'CNY',
+                exrate: 1,
                 $cellEdit: true
             })
         },
@@ -1915,6 +1947,9 @@ export default {
             this.potFeeList.push({
                 pid: this.form.id,
                 busType: 'POT',
+                type: '场站',
+                curCode: 'CNY',
+                exrate: 1,
                 $cellEdit: true
             })
         },
@@ -2309,8 +2344,8 @@ export default {
                 })
             }
             if (name == 'POL费用模板') {
-                this.templateData=[]
-                this.templateList=[]
+                this.templateData = []
+                this.templateList = []
                 this.feeType = 'POL'
                 this.templateDialog = true
                 let obj = {
@@ -2336,8 +2371,8 @@ export default {
                 })
             }
             if (name == 'POD费用模板') {
-                this.templateData=[]
-                this.templateList=[]
+                this.templateData = []
+                this.templateList = []
                 this.feeType = 'POD'
                 this.templateDialog = true
                 let obj = {
@@ -2363,8 +2398,8 @@ export default {
                 })
             }
             if (name == 'POT费用模板') {
-                this.templateData=[]
-                this.templateList=[]
+                this.templateData = []
+                this.templateList = []
                 this.feeType = 'POT'
                 this.templateDialog = true
                 let obj = {

+ 343 - 0
src/views/tirePartsMall/equipmentManagement/devicetype.vue

@@ -0,0 +1,343 @@
+<template>
+  <div>
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+      id="out-table" :header-cell-class-name="headerClassName" :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', 457)"
+      @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 457)" @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="success" size="small"  plain @click="handleStatus('开')">批量开启
+        </el-button>
+        <el-button type="info" size="small"  plain @click="handleStatus('关')">批量关闭
+        </el-button>
+        <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </div>
+</template>
+
+<script>
+import { getTreelist, submit, remove, getDetail, update } from "@/api/tirePartsMall/equipmentManagement";
+import { mapGetters } from "vuex";
+
+export default {
+  data() {
+    return {
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+        ageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        addBtnText: '新建设备管理',
+        addTitle: '新建设备管理',
+        editBtnText: '编辑',
+        editTitle: '编辑设备管理',
+        // viewBtnText: '查看',
+        // viewTitle: '查看类别',
+        height: 500,
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: false,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth: 140,
+        column: [
+          {
+            label: "设备编号",
+            prop: "deviceCode",
+            search: true,
+            overHidden: true,
+            rules: [{
+              required: true,
+              message: "请输入中文名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "设备名称",
+            prop: "deviceName",
+            search: true,
+            overHidden: true,
+            rules: [{
+              required: true,
+              message: "请输入英文名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "排序",
+            prop: "sort",
+            hide: true,
+            display: false,
+            overHidden: true,
+          },
+          {
+            label: "状态",
+            prop: "deviceStatus",
+            search: true,
+            type: 'select',
+            overHidden: true,
+            dicData: [{
+              label: '开',
+              value: '开'
+            }, {
+              label: '关',
+              value: '关'
+            }],
+          },
+          {
+            label: "创建人",
+            prop: "createUserName",
+            display: false,
+            overHidden: true,
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            width: 160,
+            display: false,
+            overHidden: true,
+          },
+          {
+            label: "修改人",
+            prop: "updateUserName",
+            display: false,
+            overHidden: true,
+          },
+          {
+            label: "修改时间",
+            prop: "updateTime",
+            width: 160,
+            display: false,
+            overHidden: true,
+          }
+        ]
+      },
+      data: []
+    };
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(457), this.optionBack);
+  },
+  methods: {
+    rowSave(row, done, loading) {
+      submit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      submit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    handleStatus(type) {
+      if (this.selectionList.length === 0) {
+        this.$message.error("请选择至少一条数据");
+        return;
+      }
+      if (type == '开') {
+        for (const selection of this.selectionList) {
+          if (selection.deviceStatus == '开') {
+            this.$message.error("请选择关闭状态的数据!");
+            return;
+          }
+        }
+      }
+      if (type == '关') {
+        for (const selection of this.selectionList) {
+          if (selection.deviceStatus == '关') {
+            this.$message.error("请选择开启状态的数据!");
+            return;
+          }
+        }
+      }
+      this.selectionList.forEach(item => {
+        item.deviceStatus = type
+      })
+      update(this.selectionList).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+      });
+    },
+    rowDel(row) {
+      if (row.deviceStatus == '关') {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove({ ids: row.id });
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      } else {
+        this.$message({
+          message: '开启状态无法删除',
+          type: 'error'
+        });
+      }
+
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.error("请选择至少一条数据");
+        return;
+      }
+      for (const selection of this.selectionList) {
+        if (selection.deviceStatus == '开') {
+          this.$message.error("选中的数据中有启用数据,启用数据不可删除!");
+          return;
+        }
+      }
+      let ids = []
+      this.selectionList.forEach(item => {
+        ids.push(item.id)
+      })
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove({ ids: ids.join(',') });
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      console.log(1111111111111, ["edit"].includes(type))
+      if (["edit"].includes(type)) {
+        getDetail({ id: this.form.id }).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      getTreelist(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        this.page.total = res.data.data.total;
+        this.data = res.data.data.records;
+        this.loading = false;
+      });
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
+        }
+      }
+      return back;
+    },
+  }
+};
+</script>
+
+<style scoped>
+::v-deep#out-table .back-one {
+  background: #ecf5ff !important;
+}
+
+::v-deep#out-table .back-two {
+  background: #ecf5ff !important;
+}
+</style>

+ 292 - 0
src/views/tirePartsMall/equipmentManagement/index.vue

@@ -0,0 +1,292 @@
+<template>
+  <div>
+    <el-row>
+      <el-col :span="4">
+        <div class="box">
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick">
+                <template slot="addBtn">
+                  <el-tooltip class="item" effect="dark" content="新建分类" placement="top">
+                    <i class="el-icon-setting" style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"
+                      @click="deviceVisible = true"></i>
+                  </el-tooltip>
+                </template>
+              </avue-tree>
+            </basic-container>
+          </el-scrollbar>
+        </div>
+      </el-col>
+      <el-col :span="20">
+        <basic-container>
+          <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" id="out-table"
+            :header-cell-class-name="headerClassName" :search.sync="search" v-model="form" ref="crud"
+            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 456)"
+            @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 456)" @on-load="onLoad">
+          </avue-crud>
+        </basic-container>
+      </el-col>
+    </el-row>
+
+    <!--类别弹窗-->
+    <el-dialog title="设备管理" :visible.sync="deviceVisible" append-to-body width="60%" top="5vh">
+      <div>
+        <devicetype></devicetype>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="deviceVisible = false">取 消</el-button>
+        <el-button type="primary" @click="deviceVisible = false">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getList, getTreelist } from "@/api/tirePartsMall/equipmentManagement";
+import { getWorkDicts } from "@/api/system/dictbiz";
+import devicetype from "@/views/tirePartsMall/equipmentManagement/devicetype.vue";
+
+export default {
+  data() {
+    return {
+      // 是否禁用
+      searchDisabled: false,
+      // 类别弹窗的开启
+      deviceVisible: false,
+      treeData: [],
+      treeOption: {
+        nodeKey: "id",
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "deviceName",
+          value: "deviceCode",
+        }
+      },
+      form: {},
+      query: {},
+      search: {
+        taskCode: null,
+        deviceCode: null,
+        deviceName: null,
+      },
+      loading: true,
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      selectionList: [],
+      option: {
+        dialogDrag: true,
+      },
+      optionBack: {
+        dialogDrag: true,
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 18,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        menu: false,
+        selection: true,
+        column: [
+          {
+            label: "任务编号",
+            prop: "taskCode",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "设备编号",
+            prop: "deviceCode",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "设备名称",
+            prop: "deviceName",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "开始时间",
+            prop: "startTime",
+            overHidden: true,
+            search: true,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+          },
+          {
+            label: "结束时间",
+            prop: "endTime",
+            overHidden: true,
+            search: true,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 23:59:59",
+          },
+          {
+            label: "模型层数",
+            prop: "modelLayernum",
+            overHidden: true,
+          },
+          {
+            label: "模型体积",
+            prop: "modelVolume",
+            overHidden: true,
+          },
+          {
+            label: "打印耗材",
+            prop: "printConsumable",
+            overHidden: true,
+          },
+          {
+            label: "创建人",
+            prop: "createUserName",
+            overHidden: true,
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            width: 160,
+            overHidden: true,
+          },
+          {
+            label: "修改人",
+            prop: "updateUserName",
+            overHidden: true,
+          },
+          {
+            label: "修改时间",
+            prop: "updateTime",
+            width: 160,
+            display: false,
+            overHidden: true,
+          }
+        ]
+      },
+      data: []
+    };
+  },
+  components: {
+    devicetype
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(456), this.optionBack);
+    this.getTreelist()
+  },
+  methods: {
+    getTreelist() {
+      getTreelist(1, 50).then(res => {
+        this.treeData = res.data.data.records
+      })
+    },
+    nodeClick(data) {
+      this.search.deviceCode = data.deviceCode;
+      this.search.deviceName = data.deviceName;
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    searchReset() {
+      this.search = {
+        taskCode: null,
+        deviceCode: null,
+        deviceName: null
+      };
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.search = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.search)).then(res => {
+        this.page.total = res.data.data.total;
+        this.data = res.data.data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
+        }
+      }
+      return back;
+    },
+
+  }
+};
+</script>
+
+<style scoped>
+::v-deep#out-table .back-one {
+  background: #ecf5ff !important;
+}
+
+::v-deep#out-table .back-two {
+  background: #ecf5ff !important;
+}
+
+::v-deep .el-input-group__append {
+  padding: 0 0px !important;
+}
+</style>