|
@@ -1,66 +1,59 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<basic-container v-if="isShow">
|
|
|
- <avue-crud
|
|
|
- ref="crud"
|
|
|
- :option="option"
|
|
|
- :table-loading="loading"
|
|
|
- :data="data"
|
|
|
- :page.sync="page"
|
|
|
- :search.sync="query"
|
|
|
- @search-change="searchChange"
|
|
|
- @search-reset="searchReset"
|
|
|
- @selection-change="selectionChange"
|
|
|
- @current-change="currentChange"
|
|
|
- @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad"
|
|
|
- >
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="addButton"
|
|
|
- >创建单据
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot="menu" slot-scope="{ row, index }">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- icon="el-icon-edit"
|
|
|
- type="text"
|
|
|
- @click="rowEdit(row)"
|
|
|
- >编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- icon="el-icon-delete"
|
|
|
- type="text"
|
|
|
- @click="rowDel(row, index)"
|
|
|
- :disabled="row.auditStatus > 0"
|
|
|
- >删 除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot="contractNo" slot-scope="{ row }">
|
|
|
- <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">
|
|
|
- {{ row.contractNo }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </avue-crud>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="4">
|
|
|
+ <avue-tree ref="tree" :option="treeOption" :data="treeData" @node-click="nodeClick" v-model="treeForm" style="height:77vh;">
|
|
|
+ <template slot="addBtn">
|
|
|
+ <el-tooltip class="item" effect="dark" content="新建分类" placement="top">
|
|
|
+ <i class="el-icon-setting" @click="allClick('新建分类')" style="font-size:18px;line-height: 1px;width: 20px;padding:10px;"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </avue-tree>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="20">
|
|
|
+ <avue-crud
|
|
|
+ ref="crud"
|
|
|
+ :option="option"
|
|
|
+ :table-loading="loading"
|
|
|
+ :data="data"
|
|
|
+ :page.sync="page"
|
|
|
+ :search.sync="query"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="searchReset"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @on-load="onLoad"
|
|
|
+ >
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">创建单据 </el-button>
|
|
|
+ <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="row.auditStatus > 0">删除</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="contractNo" slot-scope="{ row }">
|
|
|
+ <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">
|
|
|
+ {{ row.contractNo }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</basic-container>
|
|
|
- <detailsPage
|
|
|
- v-if="!isShow"
|
|
|
- :detailData="detailData"
|
|
|
- @goBack="goBack"
|
|
|
- ></detailsPage>
|
|
|
+ <goods-type ref="goodsType" @update="getTree"></goods-type>
|
|
|
+ <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getList, remove } from '@/api/claimSettlement/index';
|
|
|
-import detailsPage from './detailsPage.vue';
|
|
|
-import { getToken } from '@/util/auth';
|
|
|
+import { getList, remove, getGoodsTypeTree } from "@/api/goodsManage/index";
|
|
|
+import detailsPage from "./detailsPage.vue";
|
|
|
+import goodsType from "./components/index.vue";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -73,9 +66,22 @@ export default {
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
|
},
|
|
|
+ corpTypeVisible: false,
|
|
|
+ treeForm: {},
|
|
|
+ treeData: [],
|
|
|
+ treeOption: {
|
|
|
+ addBtn: false,
|
|
|
+ menu: false,
|
|
|
+ size: "small",
|
|
|
+ props: {
|
|
|
+ labelText: "标题",
|
|
|
+ label: "title",
|
|
|
+ value: "value"
|
|
|
+ }
|
|
|
+ },
|
|
|
selectionList: [],
|
|
|
option: {
|
|
|
- height: 'auto',
|
|
|
+ height: "auto",
|
|
|
calcHeight: 30,
|
|
|
menuWidth: 120,
|
|
|
tip: false,
|
|
@@ -89,155 +95,118 @@ export default {
|
|
|
delBtn: false,
|
|
|
selection: true,
|
|
|
searchIcon: true,
|
|
|
- align: 'center',
|
|
|
+ align: "center",
|
|
|
searchIndex: 3,
|
|
|
column: [
|
|
|
{
|
|
|
- label: '理赔单号',
|
|
|
- prop: 'claimNo',
|
|
|
+ label: "商品名称",
|
|
|
+ prop: "cname",
|
|
|
search: true,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: '来源类型',
|
|
|
- prop: 'claimSourceType',
|
|
|
+ label: "商品编码",
|
|
|
+ prop: "code",
|
|
|
search: true,
|
|
|
- type: 'select',
|
|
|
- dicData: [
|
|
|
- {
|
|
|
- label: '经销商',
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: '门店',
|
|
|
- value: 2
|
|
|
- },
|
|
|
- {
|
|
|
- label: '终端消费者',
|
|
|
- value: 3
|
|
|
- }
|
|
|
- ],
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: '来源方名称',
|
|
|
- prop: 'sourceName',
|
|
|
- width: 90,
|
|
|
+ label: "分类",
|
|
|
+ prop: "goodsTypeName",
|
|
|
search: true,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: '消费者姓名',
|
|
|
- prop: 'consumerName',
|
|
|
- width: 90,
|
|
|
+ label: "品牌",
|
|
|
+ prop: "brandName",
|
|
|
search: true,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '消费者电话',
|
|
|
- prop: 'consumerPhone',
|
|
|
- width: 90,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '胎号',
|
|
|
- prop: 'tyreNo',
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '规格型号',
|
|
|
- prop: 'tyreSpecs',
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '购买日期',
|
|
|
- prop: 'purchaseDate',
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
+ filterable: true,
|
|
|
+ type: "select",
|
|
|
+ props: {
|
|
|
+ label: "cname",
|
|
|
+ value: "cname"
|
|
|
+ },
|
|
|
+ dicUrl: "/api/gubersail-admin/brandDesc/listAllV1?whetherIntegral=0",
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- label: '装车日期',
|
|
|
- prop: 'mountDate',
|
|
|
+ label: "批次",
|
|
|
+ prop: "dot",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: '行驶里程(km)',
|
|
|
- prop: 'runMileage',
|
|
|
- width: 100,
|
|
|
+ label: "花纹",
|
|
|
+ prop: "brandItem",
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: '理赔原因',
|
|
|
- prop: 'claimReason',
|
|
|
+ label: "规格型号",
|
|
|
+ prop: "typeno",
|
|
|
+ span: 6,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
- label: '索赔金额',
|
|
|
- prop: 'claimAmount',
|
|
|
- overHidden: true
|
|
|
+ label: "售价1",
|
|
|
+ prop: "priceOne",
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 80
|
|
|
},
|
|
|
{
|
|
|
- label: '审核状态',
|
|
|
- prop: 'auditStatus',
|
|
|
- type: 'select',
|
|
|
- dicData: [
|
|
|
- {
|
|
|
- label: '待审核',
|
|
|
- value: 0
|
|
|
- },
|
|
|
- {
|
|
|
- label: '审核中',
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: '已通过',
|
|
|
- value: 2
|
|
|
- },
|
|
|
- {
|
|
|
- label: '已拒绝',
|
|
|
- value: 3
|
|
|
- }
|
|
|
- ],
|
|
|
- overHidden: true
|
|
|
+ label: "售价2",
|
|
|
+ prop: "priceTwo",
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 80
|
|
|
},
|
|
|
{
|
|
|
- label: '提交时间',
|
|
|
- prop: 'submitTime',
|
|
|
- overHidden: true
|
|
|
+ label: "售价3",
|
|
|
+ prop: "priceThree",
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 80
|
|
|
},
|
|
|
{
|
|
|
- label: '备注',
|
|
|
- prop: 'remark',
|
|
|
- overHidden: true
|
|
|
+ label: "售价4",
|
|
|
+ prop: "priceFour",
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 80
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- label: '制单人',
|
|
|
- prop: 'createUserName',
|
|
|
+ label: "仓库",
|
|
|
+ prop: "storageName",
|
|
|
+ search: true,
|
|
|
overHidden: true,
|
|
|
- width: 80
|
|
|
+ hide: true,
|
|
|
+ type: "select",
|
|
|
+ props: {
|
|
|
+ label: "cname",
|
|
|
+ value: "cname",
|
|
|
+ res: "data.records"
|
|
|
+ },
|
|
|
+ dicUrl: "/api/gubersail-admin/storageDesc/list?current=1&size=5",
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- label: '制单日期',
|
|
|
- prop: 'createTime',
|
|
|
- type: 'date',
|
|
|
+ label: "库存数量",
|
|
|
+ prop: "balanceQuantity",
|
|
|
overHidden: true,
|
|
|
- width: 100,
|
|
|
- format: 'yyyy-MM-dd',
|
|
|
- valueFormat: 'yyyy-MM-dd HH:mm:ss'
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- label: '修改人',
|
|
|
- prop: 'updateUserName',
|
|
|
+ label: "库存单价",
|
|
|
+ prop: "inventoryCostPrice",
|
|
|
overHidden: true,
|
|
|
- width: 80
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- label: '修改日期',
|
|
|
- prop: 'updateTime',
|
|
|
- type: 'date',
|
|
|
+ label: "库存金额",
|
|
|
+ prop: "inventoryAmount",
|
|
|
overHidden: true,
|
|
|
- width: 100,
|
|
|
- format: 'yyyy-MM-dd',
|
|
|
- valueFormat: 'yyyy-MM-dd HH:mm:ss'
|
|
|
+ width: 100
|
|
|
}
|
|
|
]
|
|
|
},
|
|
@@ -245,11 +214,55 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
- detailsPage
|
|
|
+ detailsPage,
|
|
|
+ goodsType
|
|
|
},
|
|
|
created() {
|
|
|
+ this.getTree();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getTree() {
|
|
|
+ getGoodsTypeTree().then(res => {
|
|
|
+ this.treeData = res.data.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ allClick(name) {
|
|
|
+ if (name == "新建分类") {
|
|
|
+ this.$refs.goodsType.openDialog();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ outExport() {
|
|
|
+ let config = { params: { ...this.query } };
|
|
|
+ if (config.params) {
|
|
|
+ for (const propName of Object.keys(config.params)) {
|
|
|
+ const value = config.params[propName];
|
|
|
+ if (value !== null && typeof value !== "undefined") {
|
|
|
+ if (value instanceof Array) {
|
|
|
+ for (const key of Object.keys(value)) {
|
|
|
+ let params = propName + "[" + key + "]";
|
|
|
+ config.params[params] = value[key];
|
|
|
+ }
|
|
|
+ delete config.params[propName];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: "/api/blade-sales-part/stockDesc/stockExport", //跳转目标下载地址
|
|
|
+ query: {
|
|
|
+ ...config.params
|
|
|
+ }
|
|
|
+ });
|
|
|
+ window.open(routeData.href.slice(1, routeData.href.length) + "&" + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
+ },
|
|
|
+ //tree点击事件
|
|
|
+ nodeClick(data) {
|
|
|
+ console.log(data, this.treeForm);
|
|
|
+ this.query.goodsTypeId = data.value;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ },
|
|
|
addButton() {
|
|
|
this.isShow = false;
|
|
|
},
|
|
@@ -269,16 +282,16 @@ export default {
|
|
|
*/
|
|
|
rowDel(row, index) {
|
|
|
if (row.item == 1) {
|
|
|
- return this.$message.error('存在明细不允许删除');
|
|
|
+ return this.$message.error("存在明细不允许删除");
|
|
|
}
|
|
|
- this.$confirm('确定将选择数据删除?', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
}).then(() => {
|
|
|
remove({ ids: row.id }).then(res => {
|
|
|
this.onLoad(this.page, this.query);
|
|
|
- this.$message.success('成功删除');
|
|
|
+ this.$message.success("成功删除");
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -342,16 +355,16 @@ export default {
|
|
|
// 详情的返回列表
|
|
|
goBack() {
|
|
|
// 初始化数据
|
|
|
- if (JSON.stringify(this.$route.query) != '{}') {
|
|
|
+ if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
this.$router.$avueRouter.closeTag();
|
|
|
this.$router.push({
|
|
|
- path: '/claimSettlement/index'
|
|
|
+ path: "/claimSettlement/index"
|
|
|
});
|
|
|
}
|
|
|
this.detailData = {};
|
|
|
this.isShow = true;
|
|
|
this.onLoad(this.page, this.query);
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -360,7 +373,11 @@ export default {
|
|
|
::v-deep .el-col-md-8 {
|
|
|
width: 24.33333%;
|
|
|
}
|
|
|
-// ::v-deep .el-table .cell{
|
|
|
-// display: flex;
|
|
|
-// }
|
|
|
+::v-deep .el-table .cell {
|
|
|
+ padding-right: 0px !important;
|
|
|
+}
|
|
|
+::v-deep .avue-crud .el-table .el-button.el-button--small {
|
|
|
+ padding: 0px !important;
|
|
|
+ margin-right: 0px !important;
|
|
|
+}
|
|
|
</style>
|