|
@@ -3,24 +3,11 @@
|
|
<!-- 左侧区域 -->
|
|
<!-- 左侧区域 -->
|
|
<section class="list-part-container">
|
|
<section class="list-part-container">
|
|
<!-- 搜索区域 -->
|
|
<!-- 搜索区域 -->
|
|
- <el-form
|
|
|
|
- class="list-search-container"
|
|
|
|
- :model="queryParams"
|
|
|
|
- ref="queryRef"
|
|
|
|
- :inline="true"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
|
|
<el-form-item class="section-title" label="载具类别" />
|
|
<el-form-item class="section-title" label="载具类别" />
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="success" icon="Refresh" @click="handleQueryCategory"
|
|
|
|
- >刷新</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="Plus"
|
|
|
|
- @click="handleShowCategoryDialog(null)"
|
|
|
|
- v-hasPermi="['business:carrier:add']"
|
|
|
|
- >新增</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="success" icon="Refresh" @click="handleQueryCategory">刷新</el-button>
|
|
|
|
+ <el-button type="primary" icon="Plus" @click="handleShowCategoryDialog(null)" v-hasPermi="['business:carrier:add']">新增</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 列表区 -->
|
|
<!-- 列表区 -->
|
|
@@ -40,46 +27,21 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table> -->
|
|
</el-table> -->
|
|
- <el-tree
|
|
|
|
- ref="categoryTable"
|
|
|
|
- v-loading="categoryLoading"
|
|
|
|
- :data="carrierCategoryList"
|
|
|
|
- :props="{ label: 'name', children: 'children' }"
|
|
|
|
- :expand-on-click-node="false"
|
|
|
|
- :filter-node-method="filterNode"
|
|
|
|
- default-expand-all
|
|
|
|
- node-key="id"
|
|
|
|
- highlight-current
|
|
|
|
- @node-click="handleCurrentCategoryChange"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-tree ref="categoryTable" v-loading="categoryLoading" :data="carrierCategoryList" :props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" :filter-node-method="filterNode" default-expand-all node-key="id" highlight-current @node-click="handleCurrentCategoryChange">
|
|
<template #default="{ node, data }">
|
|
<template #default="{ node, data }">
|
|
- <div
|
|
|
|
- style="
|
|
|
|
|
|
+ <div style="
|
|
display: flex;
|
|
display: flex;
|
|
width: 100%;
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
- "
|
|
|
|
- >
|
|
|
|
- <span>
|
|
|
|
- <span v-if="data.parentId == 0" style="display: inline-block; width: 20px;">{{ getNodeIndex(data) }}. </span>
|
|
|
|
- <span>{{ node.label }}</span>
|
|
|
|
|
|
+ ">
|
|
|
|
+ <span>
|
|
|
|
+ <span v-if="data.parentId == 0" style="display: inline-block; width: 20px;">{{ getNodeIndex(data) }}. </span>
|
|
|
|
+ <span>{{ node.label }}</span>
|
|
</span>
|
|
</span>
|
|
<span>
|
|
<span>
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="warning"
|
|
|
|
- icon="Edit"
|
|
|
|
- @click="handleShowCategoryDialog(data)"
|
|
|
|
- v-hasPermi="['business:carrier:edit']"
|
|
|
|
- >编辑
|
|
|
|
|
|
+ <el-button link type="warning" icon="Edit" @click="handleShowCategoryDialog(data)" v-hasPermi="['business:carrier:edit']">编辑
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- icon="Delete"
|
|
|
|
- @click="handleDeleteCategory(data)"
|
|
|
|
- v-hasPermi="['business:carrier:remove']"
|
|
|
|
- >删除
|
|
|
|
|
|
+ <el-button link type="danger" icon="Delete" @click="handleDeleteCategory(data)" v-hasPermi="['business:carrier:remove']">删除
|
|
</el-button>
|
|
</el-button>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@@ -91,89 +53,33 @@
|
|
|
|
|
|
<!-- 右侧区域 -->
|
|
<!-- 右侧区域 -->
|
|
<section class="list-part-container" style="flex: 2">
|
|
<section class="list-part-container" style="flex: 2">
|
|
- <el-form
|
|
|
|
- class="list-search-container"
|
|
|
|
- :model="carrierParams"
|
|
|
|
- ref="queryRef"
|
|
|
|
- :inline="true"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-form class="list-search-container" :model="carrierParams" ref="queryRef" :inline="true">
|
|
<el-form-item class="section-title" label="载具管理" />
|
|
<el-form-item class="section-title" label="载具管理" />
|
|
<el-form-item label="载具编号:">
|
|
<el-form-item label="载具编号:">
|
|
- <el-input
|
|
|
|
- placeholder="请输入载具编号"
|
|
|
|
- clearable
|
|
|
|
- style="width: 180px"
|
|
|
|
- v-model.trim="carrierParams.code"
|
|
|
|
- @keydown.enter.prevent
|
|
|
|
- @keyup.enter="handleQueryCarrier"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input placeholder="请输入载具编号" clearable style="width: 180px" v-model.trim="carrierParams.code" @keydown.enter.prevent @keyup.enter="handleQueryCarrier" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="info" icon="Search" @click="handleQueryCarrier"
|
|
|
|
- >搜索</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="success" icon="Refresh" @click="handleRefreshCarrier"
|
|
|
|
- >刷新</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="info" icon="Search" @click="handleQueryCarrier">搜索</el-button>
|
|
|
|
+ <el-button type="success" icon="Refresh" @click="handleRefreshCarrier">刷新</el-button>
|
|
<!-- <el-button type="primary" icon="Plus" @click="handleShowCarrierDialog(null)" v-hasPermi="['business:carrier:add']">新增</el-button> -->
|
|
<!-- <el-button type="primary" icon="Plus" @click="handleShowCarrierDialog(null)" v-hasPermi="['business:carrier:add']">新增</el-button> -->
|
|
- <el-button
|
|
|
|
- :disabled="selections.length == 0"
|
|
|
|
- type="warning"
|
|
|
|
- icon="Download"
|
|
|
|
- @click="handleBatchDownloadQrCode"
|
|
|
|
- >批量下载二维码</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button :disabled="selections.length == 0" type="warning" icon="Download" @click="handleBatchDownloadQrCode">批量下载二维码</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
<!-- 列表区 -->
|
|
<!-- 列表区 -->
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
- <el-table
|
|
|
|
- v-loading="carrierLoading"
|
|
|
|
- row-key="id"
|
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
|
- :data="carrierList"
|
|
|
|
- height="100%"
|
|
|
|
- >
|
|
|
|
- <el-table-column
|
|
|
|
- type="selection"
|
|
|
|
- width="40"
|
|
|
|
- align="center"
|
|
|
|
- :reserve-selection="true"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- type="index"
|
|
|
|
- label="行号"
|
|
|
|
- width="50"
|
|
|
|
- align="center"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- prop="code"
|
|
|
|
- label="载具编号"
|
|
|
|
- width="80"
|
|
|
|
- align="center"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="状态"
|
|
|
|
- width="70"
|
|
|
|
- prop="isAbandoned"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table v-loading="carrierLoading" row-key="id" @selection-change="handleSelectionChange" :data="carrierList" height="100%">
|
|
|
|
+ <el-table-column type="selection" width="40" align="center" :reserve-selection="true" />
|
|
|
|
+ <el-table-column type="index" label="行号" width="50" align="center" />
|
|
|
|
+ <el-table-column prop="code" label="载具编号" width="80" align="center" />
|
|
|
|
+ <el-table-column label="状态" width="70" prop="isAbandoned" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ scope.row.status }}
|
|
{{ scope.row.status }}
|
|
- <dict-tag
|
|
|
|
- :options="carrier_status"
|
|
|
|
- :value="scope.row.isAbandoned"
|
|
|
|
- />
|
|
|
|
|
|
+ <dict-tag :options="carrier_status" :value="scope.row.isAbandoned" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="createTime"
|
|
|
|
- label="添加日期"
|
|
|
|
- width="120"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="createTime" label="添加日期" width="120" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ proxy.moment(scope.row.createTime).format("YYYY-MM-DD") }}
|
|
{{ proxy.moment(scope.row.createTime).format("YYYY-MM-DD") }}
|
|
</template>
|
|
</template>
|
|
@@ -198,24 +104,8 @@
|
|
<!-- <el-button link type="warning" icon="Edit" @click="handleShowCarrierDialog(scope.row.id)" v-hasPermi="['business:carrier:edit']">
|
|
<!-- <el-button link type="warning" icon="Edit" @click="handleShowCarrierDialog(scope.row.id)" v-hasPermi="['business:carrier:edit']">
|
|
编辑
|
|
编辑
|
|
</el-button> -->
|
|
</el-button> -->
|
|
- <el-button
|
|
|
|
- v-if="scope.row.isAbandoned === 0"
|
|
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- icon="Delete"
|
|
|
|
- @click="handleShowAbandonDialog(scope.row.id)"
|
|
|
|
- v-hasPermi="['business:carrier:abandonment']"
|
|
|
|
- >废弃</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-else
|
|
|
|
- link
|
|
|
|
- type="success"
|
|
|
|
- icon="CircleCheck"
|
|
|
|
- @click="handleUnAbandoned(scope.row)"
|
|
|
|
- v-hasPermi="['business:carrier:unAbandonment']"
|
|
|
|
- >取消废弃</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button v-if="scope.row.isAbandoned === 0" link type="danger" icon="Delete" @click="handleShowAbandonDialog(scope.row.id)" v-hasPermi="['business:carrier:abandonment']">废弃</el-button>
|
|
|
|
+ <el-button v-else link type="success" icon="CircleCheck" @click="handleUnAbandoned(scope.row)" v-hasPermi="['business:carrier:unAbandonment']">取消废弃</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -223,204 +113,189 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
- <pagination
|
|
|
|
- v-show="carrierTotal > 0"
|
|
|
|
- :total="carrierTotal"
|
|
|
|
- v-model:page="carrierParams.pageNum"
|
|
|
|
- v-model:limit="carrierParams.pageSize"
|
|
|
|
- @pagination="getCarriers"
|
|
|
|
- />
|
|
|
|
|
|
+ <pagination v-show="carrierTotal > 0" :total="carrierTotal" v-model:page="carrierParams.pageNum" v-model:limit="carrierParams.pageSize" @pagination="getCarriers" />
|
|
</section>
|
|
</section>
|
|
|
|
|
|
<!-- 载具类别表单 -->
|
|
<!-- 载具类别表单 -->
|
|
- <carrier-category-form
|
|
|
|
- ref="carrierCategoryRef"
|
|
|
|
- @handleSaveSuccess="handleQueryCategory"
|
|
|
|
- />
|
|
|
|
|
|
+ <carrier-category-form ref="carrierCategoryRef" @handleSaveSuccess="handleQueryCategory" />
|
|
|
|
|
|
<!-- 载具表单 -->
|
|
<!-- 载具表单 -->
|
|
<carrier-form ref="carrierRef" @handleSaveSuccess="handleRefreshCarrier" />
|
|
<carrier-form ref="carrierRef" @handleSaveSuccess="handleRefreshCarrier" />
|
|
|
|
|
|
<!-- 废弃弹窗 -->
|
|
<!-- 废弃弹窗 -->
|
|
- <carrier-abandonment-form
|
|
|
|
- ref="carrierAbandonmentRef"
|
|
|
|
- @handleSaveSuccess="handleRefreshCarrier"
|
|
|
|
- />
|
|
|
|
|
|
+ <carrier-abandonment-form ref="carrierAbandonmentRef" @handleSaveSuccess="handleRefreshCarrier" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="Process">
|
|
<script setup name="Process">
|
|
-import {
|
|
|
|
- listCategory,
|
|
|
|
- delCategory,
|
|
|
|
- listCarrier,
|
|
|
|
- saveCarrierReject,
|
|
|
|
- download,
|
|
|
|
-} from "@/api/business/carrier";
|
|
|
|
-import carrierForm from "./form";
|
|
|
|
-import carrierCategoryForm from "./formCategory";
|
|
|
|
-import carrierAbandonmentForm from "./formAbandonment";
|
|
|
|
-import { nextTick } from "vue";
|
|
|
|
-const { proxy } = getCurrentInstance();
|
|
|
|
-const { carrier_status } = proxy.useDict("carrier_status");
|
|
|
|
-const webHost = import.meta.env.VITE_APP_PRODUCTION_API;
|
|
|
|
-const categoryTable = ref(null);
|
|
|
|
-const carrierCategoryList = ref([]);
|
|
|
|
-const carrierList = ref([]);
|
|
|
|
-const currentCategory = ref({});
|
|
|
|
-const defaultCheckedKey = ref('');
|
|
|
|
-const categoryLoading = ref(false);
|
|
|
|
-const carrierLoading = ref(false);
|
|
|
|
-const carrierTotal = ref(0);
|
|
|
|
-const selections = ref([]);
|
|
|
|
|
|
+import { listCategory, delCategory, listCarrier, saveCarrierReject, download } from '@/api/business/carrier'
|
|
|
|
+import carrierForm from './form'
|
|
|
|
+import carrierCategoryForm from './formCategory'
|
|
|
|
+import carrierAbandonmentForm from './formAbandonment'
|
|
|
|
+import { nextTick } from 'vue'
|
|
|
|
+const { proxy } = getCurrentInstance()
|
|
|
|
+const { carrier_status } = proxy.useDict('carrier_status')
|
|
|
|
+const webHost = import.meta.env.VITE_APP_PRODUCTION_API
|
|
|
|
+const categoryTable = ref(null)
|
|
|
|
+const carrierCategoryList = ref([])
|
|
|
|
+const carrierList = ref([])
|
|
|
|
+const currentCategory = ref({})
|
|
|
|
+const defaultCheckedKey = ref('')
|
|
|
|
+const categoryLoading = ref(false)
|
|
|
|
+const carrierLoading = ref(false)
|
|
|
|
+const carrierTotal = ref(0)
|
|
|
|
+const selections = ref([])
|
|
const data = reactive({
|
|
const data = reactive({
|
|
form: {},
|
|
form: {},
|
|
queryParams: {
|
|
queryParams: {
|
|
- code: "",
|
|
|
|
|
|
+ code: '',
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- pageSize: 10,
|
|
|
|
|
|
+ pageSize: 10
|
|
},
|
|
},
|
|
carrierParams: {
|
|
carrierParams: {
|
|
- code: "",
|
|
|
|
|
|
+ code: '',
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- pageSize: 10,
|
|
|
|
- },
|
|
|
|
-});
|
|
|
|
|
|
+ pageSize: 10
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
|
|
-const { queryParams, carrierParams } = toRefs(data);
|
|
|
|
|
|
+const { queryParams, carrierParams } = toRefs(data)
|
|
/** 查询对象 */
|
|
/** 查询对象 */
|
|
|
|
|
|
/**************************** 载具类别相关事件 ****************************/
|
|
/**************************** 载具类别相关事件 ****************************/
|
|
/** 载具分类列表 */
|
|
/** 载具分类列表 */
|
|
const getCategories = () => {
|
|
const getCategories = () => {
|
|
- categoryLoading.value = true;
|
|
|
|
|
|
+ categoryLoading.value = true
|
|
listCategory().then((res) => {
|
|
listCategory().then((res) => {
|
|
- categoryLoading.value = false;
|
|
|
|
- carrierCategoryList.value = res.rows;
|
|
|
|
|
|
+ categoryLoading.value = false
|
|
|
|
+ carrierCategoryList.value = res.rows
|
|
if (carrierCategoryList.value.length > 0) {
|
|
if (carrierCategoryList.value.length > 0) {
|
|
- currentCategory.value = carrierCategoryList.value[0];
|
|
|
|
- nextTick(() => {
|
|
|
|
- proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id)
|
|
|
|
- handleCurrentCategoryChange(currentCategory.value)
|
|
|
|
- })
|
|
|
|
|
|
+ currentCategory.value = carrierCategoryList.value[0]
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id)
|
|
|
|
+ handleCurrentCategoryChange(currentCategory.value)
|
|
|
|
+ })
|
|
// categoryTable.value.setCurrentRow(currentCategory.value);
|
|
// categoryTable.value.setCurrentRow(currentCategory.value);
|
|
}
|
|
}
|
|
- });
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+const filterNode = (value, data) => {
|
|
|
|
+ queryParams.value.code = ''
|
|
|
|
+ if (!value) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ return data.name.indexOf(value) !== -1
|
|
|
|
+}
|
|
const handleCurrentCategoryChange = (row) => {
|
|
const handleCurrentCategoryChange = (row) => {
|
|
if (row) {
|
|
if (row) {
|
|
- currentCategory.value = row;
|
|
|
|
|
|
+ currentCategory.value = row
|
|
} else {
|
|
} else {
|
|
- currentCategory.value = {};
|
|
|
|
|
|
+ currentCategory.value = {}
|
|
if (carrierCategoryList.value.length > 0) {
|
|
if (carrierCategoryList.value.length > 0) {
|
|
- currentCategory.value = carrierCategoryList.value[0];
|
|
|
|
|
|
+ currentCategory.value = carrierCategoryList.value[0]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (currentCategory.value.id) {
|
|
if (currentCategory.value.id) {
|
|
//categoryTable.value.setCurrentRow(currentCategory.value);
|
|
//categoryTable.value.setCurrentRow(currentCategory.value);
|
|
- getCarriers();
|
|
|
|
|
|
+ getCarriers()
|
|
} else {
|
|
} else {
|
|
- carrierList.value = [];
|
|
|
|
- carrierTotal.value = 0;
|
|
|
|
|
|
+ carrierList.value = []
|
|
|
|
+ carrierTotal.value = 0
|
|
}
|
|
}
|
|
-};
|
|
|
|
|
|
+}
|
|
function getNodeIndex(data) {
|
|
function getNodeIndex(data) {
|
|
- const index = carrierCategoryList.value.findIndex(
|
|
|
|
- (item) => item.id === data.id
|
|
|
|
- );
|
|
|
|
- return index + 1;
|
|
|
|
|
|
+ const index = carrierCategoryList.value.findIndex((item) => item.id === data.id)
|
|
|
|
+ return index + 1
|
|
}
|
|
}
|
|
function handleShowCategoryDialog(data) {
|
|
function handleShowCategoryDialog(data) {
|
|
- if(data) {
|
|
|
|
- proxy.$refs.carrierCategoryRef.open(data.id);
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- proxy.$refs.carrierCategoryRef.open();
|
|
|
|
- }
|
|
|
|
|
|
+ if (data) {
|
|
|
|
+ proxy.$refs.carrierCategoryRef.open(data.id)
|
|
|
|
+ } else {
|
|
|
|
+ proxy.$refs.carrierCategoryRef.open()
|
|
}
|
|
}
|
|
|
|
+}
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
const handleDeleteCategory = (data) => {
|
|
const handleDeleteCategory = (data) => {
|
|
proxy.$modal
|
|
proxy.$modal
|
|
- .confirm("确定删除选中项?")
|
|
|
|
|
|
+ .confirm('确定删除选中项?')
|
|
.then(() => {
|
|
.then(() => {
|
|
- return delCategory(data.id);
|
|
|
|
|
|
+ return delCategory(data.id)
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- proxy.$modal.msgSuccess("操作成功!");
|
|
|
|
- getCategories();
|
|
|
|
|
|
+ proxy.$modal.msgSuccess('操作成功!')
|
|
|
|
+ getCategories()
|
|
})
|
|
})
|
|
- .catch(() => {});
|
|
|
|
-};
|
|
|
|
|
|
+ .catch(() => {})
|
|
|
|
+}
|
|
|
|
|
|
const handleQueryCategory = () => {
|
|
const handleQueryCategory = () => {
|
|
- getCategories();
|
|
|
|
-};
|
|
|
|
|
|
+ getCategories()
|
|
|
|
+}
|
|
/**************************** 载具相关事件 ****************************/
|
|
/**************************** 载具相关事件 ****************************/
|
|
|
|
|
|
const getCarriers = () => {
|
|
const getCarriers = () => {
|
|
- carrierLoading.value = true;
|
|
|
|
- carrierParams.value.categoryId = currentCategory.value.id;
|
|
|
|
|
|
+ carrierLoading.value = true
|
|
|
|
+ carrierParams.value.categoryId = currentCategory.value.id
|
|
listCarrier(carrierParams.value).then((res) => {
|
|
listCarrier(carrierParams.value).then((res) => {
|
|
- carrierLoading.value = false;
|
|
|
|
- carrierList.value = res.rows;
|
|
|
|
- carrierTotal.value = res.total;
|
|
|
|
- });
|
|
|
|
-};
|
|
|
|
|
|
+ carrierLoading.value = false
|
|
|
|
+ carrierList.value = res.rows
|
|
|
|
+ carrierTotal.value = res.total
|
|
|
|
+ })
|
|
|
|
+}
|
|
/**
|
|
/**
|
|
* 列表checkbox列选择 事件
|
|
* 列表checkbox列选择 事件
|
|
*/
|
|
*/
|
|
function handleSelectionChange(selection) {
|
|
function handleSelectionChange(selection) {
|
|
- selections.value = selection;
|
|
|
|
- console.log(selections.value);
|
|
|
|
|
|
+ selections.value = selection
|
|
|
|
+ console.log(selections.value)
|
|
}
|
|
}
|
|
const handleRefreshCarrier = () => {
|
|
const handleRefreshCarrier = () => {
|
|
- getCarriers();
|
|
|
|
-};
|
|
|
|
|
|
+ getCarriers()
|
|
|
|
+}
|
|
|
|
|
|
const handleQueryCarrier = () => {
|
|
const handleQueryCarrier = () => {
|
|
- carrierParams.value.pageNum = 1;
|
|
|
|
- handleRefreshCarrier();
|
|
|
|
-};
|
|
|
|
|
|
+ carrierParams.value.pageNum = 1
|
|
|
|
+ handleRefreshCarrier()
|
|
|
|
+}
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
const handleShowCarrierDialog = (id) => {
|
|
const handleShowCarrierDialog = (id) => {
|
|
- proxy.$refs.carrierRef.open({ categoryId: currentCategory.value.id, id: id });
|
|
|
|
-};
|
|
|
|
|
|
+ proxy.$refs.carrierRef.open({ categoryId: currentCategory.value.id, id: id })
|
|
|
|
+}
|
|
|
|
|
|
const handleShowAbandonDialog = (id) => {
|
|
const handleShowAbandonDialog = (id) => {
|
|
- proxy.$refs.carrierAbandonmentRef.open({ id: id });
|
|
|
|
-};
|
|
|
|
|
|
+ proxy.$refs.carrierAbandonmentRef.open({ id: id })
|
|
|
|
+}
|
|
|
|
|
|
const handleUnAbandoned = (row) => {
|
|
const handleUnAbandoned = (row) => {
|
|
proxy.$modal
|
|
proxy.$modal
|
|
- .confirm("确定取消废弃选中项?")
|
|
|
|
|
|
+ .confirm('确定取消废弃选中项?')
|
|
.then(() => {
|
|
.then(() => {
|
|
- var carrierReject = {};
|
|
|
|
- carrierReject.carrierId = row.id;
|
|
|
|
- carrierReject.isAbandoned = 0;
|
|
|
|
- carrierReject.operaionDate = proxy.moment().format("YYYY-MM-DD");
|
|
|
|
- return saveCarrierReject(carrierReject);
|
|
|
|
|
|
+ var carrierReject = {}
|
|
|
|
+ carrierReject.carrierId = row.id
|
|
|
|
+ carrierReject.isAbandoned = 0
|
|
|
|
+ carrierReject.operaionDate = proxy.moment().format('YYYY-MM-DD')
|
|
|
|
+ return saveCarrierReject(carrierReject)
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- proxy.$modal.msgSuccess("操作成功!");
|
|
|
|
- handleRefreshCarrier();
|
|
|
|
|
|
+ proxy.$modal.msgSuccess('操作成功!')
|
|
|
|
+ handleRefreshCarrier()
|
|
})
|
|
})
|
|
- .catch(() => {});
|
|
|
|
-};
|
|
|
|
|
|
+ .catch(() => {})
|
|
|
|
+}
|
|
|
|
|
|
/** 批量下载二维码 */
|
|
/** 批量下载二维码 */
|
|
function handleBatchDownloadQrCode() {
|
|
function handleBatchDownloadQrCode() {
|
|
|
|
+ console.log(selections.value)
|
|
for (var i = 0; i < selections.value.length; i++) {
|
|
for (var i = 0; i < selections.value.length; i++) {
|
|
- // window.open(webHost + selections.value[i].qcCode)
|
|
|
|
- console.log(webHost + selections.value[i].qcCode);
|
|
|
|
|
|
+ console.log(webHost + selections.value[i].qcCode)
|
|
|
|
|
|
- var link = document.createElement("a");
|
|
|
|
- link.href = webHost + selections.value[i].qcCode;
|
|
|
|
- link.download = selections.value[i].code; // 可以根据需要设置下载的文件名
|
|
|
|
- link.target = "_blank"; // 可以根据需要选择是否在新窗口中下载
|
|
|
|
- link.click();
|
|
|
|
|
|
+ var link = document.createElement('a')
|
|
|
|
+ link.href = webHost + selections.value[i].qcCode
|
|
|
|
+ link.download = selections.value[i].code // 可以根据需要设置下载的文件名
|
|
|
|
+ link.target = '_blank' // 可以根据需要选择是否在新窗口中下载
|
|
|
|
+ link.click()
|
|
}
|
|
}
|
|
// download({}).then((res) => {
|
|
// download({}).then((res) => {
|
|
// if (res.code === 200) {
|
|
// if (res.code === 200) {
|
|
@@ -429,14 +304,14 @@ function handleBatchDownloadQrCode() {
|
|
// })
|
|
// })
|
|
}
|
|
}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- getCategories();
|
|
|
|
-});
|
|
|
|
|
|
+ getCategories()
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
:deep(.el-tree-node__label) {
|
|
:deep(.el-tree-node__label) {
|
|
font-size: 14px !important;
|
|
font-size: 14px !important;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
- width: 100%;
|
|
|
|
|
|
+ width: 100%;
|
|
}
|
|
}
|
|
:deep(.el-tree-node__content) {
|
|
:deep(.el-tree-node__content) {
|
|
height: 40px;
|
|
height: 40px;
|
|
@@ -444,5 +319,4 @@ onMounted(() => {
|
|
padding: 8px 0;
|
|
padding: 8px 0;
|
|
line-height: 23px;
|
|
line-height: 23px;
|
|
}
|
|
}
|
|
-
|
|
|
|
</style>
|
|
</style>
|