Browse Source

Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

fix_bug_pro20231227
pref_mail@163.com 1 year ago
parent
commit
4a9f79ad0f
  1. 1
      package.json
  2. 94
      src/components/edittablehead/index.vue
  3. 4
      src/page/index/index.vue
  4. 4
      src/page/index/layout.vue
  5. 44
      src/router/avue-router.js
  6. 152
      src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue
  7. 120
      src/views/distribution/inventory/distrilbutionBillLadingList.vue
  8. 406
      src/views/factory/snm/staorderPackages.vue
  9. 419
      src/views/factory/snm/stationlinenum.vue
  10. 3386
      yarn.lock

1
package.json

@ -27,6 +27,7 @@
"kr-print-designer": "^1.1.8", "kr-print-designer": "^1.1.8",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"sortablejs": "^1.15.0",
"vite-plugin-mock": "^2.9.4", "vite-plugin-mock": "^2.9.4",
"vue": "^3.2.40", "vue": "^3.2.40",
"vue-baidu-map": "^0.21.22", "vue-baidu-map": "^0.21.22",

94
src/components/edittablehead/index.vue

@ -2,28 +2,17 @@
<el-drawer :model-value="drawerShow" @close="close" title="编辑列表" size="40%"> <el-drawer :model-value="drawerShow" @close="close" title="编辑列表" size="40%">
<!-- <el-checkbox label="12" /> <!-- <el-checkbox label="12" />
<el-checkbox label="2" /> --> <el-checkbox label="2" /> -->
<el-table :data="columnList" style="width: 100%; height: 700px" border> <el-table :data="columnList" style="width: 100%; height: 700px" border ref="tableEl1">
<el-table-column <el-table-column v-for="column in headtop" :key="column.prop" :prop="column.prop" :label="column.label"
v-for="column in headtop" :width="column.width" flexible>
:key="column.prop"
:prop="column.prop"
:label="column.label"
:width="column.width"
flexible
>
<template #header> <template #header>
<el-text class="mx-1">{{ column.label }}</el-text> <el-text class="mx-1">{{ column.label }}</el-text>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-text class="mx-1" v-if="column.prop == 'label'">{{ scope.row[column.prop] }}</el-text> <el-text class="mx-1" v-if="column.prop == 'label'">{{ scope.row[column.prop] }}</el-text>
<el-checkbox-group v-else-if="column.label == '隐藏'" v-model="checkList"> <el-checkbox-group v-else-if="column.label == '隐藏'" v-model="checkList">
<el-checkbox <el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
:key="scope.row['label']" @change="checkboxitem(1)">
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(1)"
>
<!-- 用于隐藏文字 --> <!-- 用于隐藏文字 -->
<template #default="scope"> <template #default="scope">
<!-- {{ scope }} --> <!-- {{ scope }} -->
@ -31,13 +20,8 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<el-checkbox-group v-else-if="column.label == '冻结'" v-model="flexList"> <el-checkbox-group v-else-if="column.label == '冻结'" v-model="flexList">
<el-checkbox <el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
:key="scope.row['label']" @change="checkboxitem(2)">
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(2)"
>
<!-- 用于隐藏文字 --> <!-- 用于隐藏文字 -->
<template #default="scope"> <template #default="scope">
<!-- {{ scope }} --> <!-- {{ scope }} -->
@ -45,13 +29,8 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<el-checkbox-group v-else-if="column.label == '排序'" v-model="sortlist"> <el-checkbox-group v-else-if="column.label == '排序'" v-model="sortlist">
<el-checkbox <el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
:key="scope.row['label']" @change="checkboxitem(3)">
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(3)"
>
<!-- 用于隐藏文字 --> <!-- 用于隐藏文字 -->
<template #default="scope"> <template #default="scope">
<!-- {{ scope }} --> <!-- {{ scope }} -->
@ -67,9 +46,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watchEffect, onMounted, watch, inject } from 'vue'; import { ref, watchEffect, onMounted, watch, inject, nextTick } from 'vue';
import type { PropType } from 'vue'; import type { PropType } from 'vue';
const functions = inject('functions') as any; const functions = inject('functions') as any;
import Sortable from "sortablejs";
interface TableColumnType { interface TableColumnType {
/** 表格列的key */ /** 表格列的key */
prop: string; prop: string;
@ -122,6 +102,9 @@ interface headtoptype {
const checkList = ref<(string | number)[]>([]); const checkList = ref<(string | number)[]>([]);
const flexList = ref<(string | number)[]>([]); const flexList = ref<(string | number)[]>([]);
const sortlist = ref<(string | number)[]>([]); const sortlist = ref<(string | number)[]>([]);
const tableEl1 = ref(null);
if (functions.getStorage(window.location.pathname + 'checkList')) { if (functions.getStorage(window.location.pathname + 'checkList')) {
checkList.value = functions.getStorage(window.location.pathname + 'checkList'); checkList.value = functions.getStorage(window.location.pathname + 'checkList');
console.log(checkList.value); console.log(checkList.value);
@ -145,6 +128,47 @@ let props = defineProps({
required: true, required: true,
}, },
}); });
onMounted(() => {
nextTick(() => {
console.log('onMounted')
initSortable();
});
})
watch(
() => props.drawerShow,
(val) => {
if (val)
nextTick(() => {
initSortable();
console.log('watch')
});
}
);
const initSortable = () => {
if (tableEl1.value && tableEl1.value.$el) {
const el1 = tableEl1.value.$el.querySelector('.el-table__body tbody')
console.log(el1)
Sortable.create(el1, {
// handle: '.move-icon',
animation: 150, //
onEnd: ({ newIndex, oldIndex }) => {
console.log(newIndex, oldIndex)
const arr = props.columnList
const currRow = arr.splice(oldIndex, 1)[0]
arr.splice(newIndex, 0, currRow)
// nextTick(() => {
// emit('setcolum', arr, 4);
// })
}
})
}
}
function close() { function close() {
emit('closce', false); emit('closce', false);
} }
@ -184,13 +208,7 @@ function close() {
// }); // });
// emit('setcolum', props.columnList); // emit('setcolum', props.columnList);
// }); // });
// onMounted(() => {
// props.columnList.map(item => {
// if (item.head) {
// (checkList.value as string[]).push(item.label);
// }
// });
// });
// watchEffect(()=>{ // watchEffect(()=>{
// props.columnList.map(item => { // props.columnList.map(item => {
// if(item.head){ // if(item.head){

4
src/page/index/index.vue

@ -15,9 +15,9 @@
<!-- 主体视图层 --> <!-- 主体视图层 -->
<div id="avue-view" v-show="!isSearch" v-if="isRefresh"> <div id="avue-view" v-show="!isSearch" v-if="isRefresh">
<router-view #="{ Component }"> <router-view #="{ Component }">
<keep-alive :include="$store.getters.tagsKeep"> <!-- <keep-alive :include="$store.getters.tagsKeep"> -->
<component :is="Component" /> <component :is="Component" />
</keep-alive> <!-- </keep-alive> -->
</router-view> </router-view>
</div> </div>
</div> </div>

4
src/page/index/layout.vue

@ -1,7 +1,7 @@
<template> <template>
<router-view #="{ Component }"> <router-view #="{ Component }">
<keep-alive :include="$store.getters.tagsKeep"> <!-- <keep-alive :include="$store.getters.tagsKeep"> -->
<component :is="Component" /> <component :is="Component" />
</keep-alive> <!-- </keep-alive> -->
</router-view> </router-view>
</template> </template>

44
src/router/avue-router.js

@ -54,9 +54,11 @@ RouterPlugin.install = function (option = {}) {
children = oMenu[propsDefault.children], children = oMenu[propsDefault.children],
query = oMenu[propsDefault.query], query = oMenu[propsDefault.query],
meta = oMenu[propsDefault.meta]; meta = oMenu[propsDefault.meta];
if (option.keepAlive) { if (option.keepAlive) {
meta.keepAlive = option.keepAlive; meta.keepAlive = option.keepAlive;
} }
const isChild = !!(children && children.length !== 0); const isChild = !!(children && children.length !== 0);
const oRouter = { const oRouter = {
path: path, path: path,
@ -92,29 +94,29 @@ RouterPlugin.install = function (option = {}) {
// 处理是否为一级路由 // 处理是否为一级路由
children: !isChild children: !isChild
? (() => { ? (() => {
if (first) { if (first) {
oMenu[propsDefault.path] = `${path}`; oMenu[propsDefault.path] = `${path}`;
let result = modules[`../${component}.vue`]; let result = modules[`../${component}.vue`];
if (result) result().then(mod => (mod.default.name = path)); if (result) result().then(mod => (mod.default.name = path));
else { else {
console.log(component + '不存在'); console.log(component + '不存在');
}
return [
{
component: result,
icon: icon,
name: name,
meta: meta,
query: query,
path: '',
},
];
} }
return []; return [
})() {
component: result,
icon: icon,
name: name,
meta: meta,
query: query,
path: '',
},
];
}
return [];
})()
: (() => { : (() => {
return this.formatRoutes(children, false); return this.formatRoutes(children, false);
})(), })(),
}; };
if (!isURL(path)) aRouter.push(oRouter); if (!isURL(path)) aRouter.push(oRouter);
} }

152
src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue

@ -14,16 +14,8 @@
</el-form-item> </el-form-item>
<el-form-item label="入库时间:" class="el-times"> <el-form-item label="入库时间:" class="el-times">
<!-- <el-input v-model="query.stockupArea" placeholder="请输入备货区"></el-input>--> <!-- <el-input v-model="query.stockupArea" placeholder="请输入备货区"></el-input>-->
<el-date-picker <el-date-picker v-model="stockupDate" type="datetimerange" unlink-panels range-separator=""
v-model="stockupDate" start-placeholder="开始时间" end-placeholder="结束时间" :shortcuts="shortcuts" :default-time="defaultTime2" />
type="datetimerange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
:default-time="defaultTime2"
/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="货物名称:">--> <!-- <el-form-item label="货物名称:">-->
<!-- <el-input v-model="query.descriptionGoods" placeholder="请输入货物名称"></el-input>--> <!-- <el-input v-model="query.descriptionGoods" placeholder="请输入货物名称"></el-input>-->
@ -75,28 +67,14 @@
<div class="avue-crud__header"> <div class="avue-crud__header">
<!-- 头部左侧按钮模块 --> <!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"> <div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="handler" <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="handler">创建异常</el-button>
>创建异常</el-button
>
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleMoke" v-if = "handler">转预约单</el-button>--> <!-- <el-button type="danger" icon="el-icon-delete" @click="handleMoke" v-if = "handler">转预约单</el-button>-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleStockList" v-if = "handler">批量加配转库存品</el-button>--> <!-- <el-button type="primary" icon="el-icon-plus" @click="handleStockList" v-if = "handler">批量加配转库存品</el-button>-->
<el-button <el-button type="danger" icon="el-icon-delete" @click="handleCallDelivery('3')"
type="danger" v-if="handler">修改客户信息</el-button>
icon="el-icon-delete" <el-button type="danger" icon="el-icon-delete" @click="handleCallDelivery('2')"
@click="handleCallDelivery('3')" v-if="handler">修改服务类型</el-button>
v-if="handler" <el-button type="danger" icon="el-icon-plus" @click="handleExport" plain> </el-button>
>修改客户信息</el-button
>
<el-button
type="danger"
icon="el-icon-delete"
@click="handleCallDelivery('2')"
v-if="handler"
>修改服务类型</el-button
>
<el-button type="danger" icon="el-icon-plus" @click="handleExport" plain
> </el-button
>
</div> </div>
<!-- <div class="avue-crud__left"> <!-- <div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handlebill" v-if = "!handler">创建提货单</el-button> <el-button type="primary" icon="el-icon-plus" @click="handlebill" v-if = "!handler">创建提货单</el-button>
@ -113,27 +91,12 @@
</el-row> </el-row>
<el-row> <el-row>
<!-- 列表模块 --> <!-- 列表模块 -->
<tablecmt <tablecmt :columnList="columnList" :tableData="data" :loading="loading" @inputTxt="inputsc" @timeCheck="timesc"
:columnList="columnList" @btnCheck="btnsc" @selectCheck="selectsc" @selection="selectionChange">
:tableData="data"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps"> <template #default="slotProps">
<el-text type="primary" text icon="el-icon-view" @click="handleView(slotProps.scope)" <el-text type="primary" text icon="el-icon-view" @click="handleView(slotProps.scope)">查看</el-text>
>查看</el-text <el-text type="primary" text icon="el-icon-edit"
> @click="handleCallDeliveryOwn(slotProps.scope)">修改客户信息</el-text>
<el-text
type="primary"
text
icon="el-icon-edit"
@click="handleCallDeliveryOwn(slotProps.scope)"
>修改客户信息</el-text
>
</template> </template>
</tablecmt> </tablecmt>
</el-row> </el-row>
@ -141,17 +104,9 @@
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> <div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-pagination <el-pagination align="right" background @size-change="sizeChange" @current-change="currentChange"
align="right" :current-page="page.currentPage" :page-sizes="[30, 50, 80, 120]" :page-size="page.pageSize"
background layout="total, sizes, prev, pager, next, jumper" :total="page.total">
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination> </el-pagination>
</div> </div>
</el-row> </el-row>
@ -167,12 +122,7 @@
<el-input v-model="formCall.waybill" autocomplete="off" /> <el-input v-model="formCall.waybill" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item label="跟进记录" :label-width="formLabelWidth"> <el-form-item label="跟进记录" :label-width="formLabelWidth">
<el-input <el-input v-model="formCall.followUpRecord" :rows="2" type="textarea" placeholder="请填写内容" />
v-model="formCall.followUpRecord"
:rows="2"
type="textarea"
placeholder="请填写内容"
/>
</el-form-item> </el-form-item>
<el-form-item label="历史跟进" :label-width="formLabelWidth"> </el-form-item> <el-form-item label="历史跟进" :label-width="formLabelWidth"> </el-form-item>
</el-form> </el-form>
@ -189,12 +139,8 @@
<el-form-item label="服务类型" :label-width="formLabelWidth"> <el-form-item label="服务类型" :label-width="formLabelWidth">
<!-- <el-input v-model="formService.typeService" autocomplete="off" />--> <!-- <el-input v-model="formService.typeService" autocomplete="off" />-->
<el-select v-model="formService.typeService" clearable placeholder="请选择服务类型"> <el-select v-model="formService.typeService" clearable placeholder="请选择服务类型">
<el-option <el-option v-for="item in distributionType" :key="item.dictKey" :label="item.dictValue"
v-for="item in distributionType" :value="item.dictKey">
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -202,12 +148,7 @@
<el-input v-model="formService.cost" autocomplete="off" /> <el-input v-model="formService.cost" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item label="原因" :label-width="formLabelWidth"> <el-form-item label="原因" :label-width="formLabelWidth">
<el-input <el-input v-model="formService.cause" :rows="2" type="textarea" placeholder="请填写原因" />
v-model="formService.cause"
:rows="2"
type="textarea"
placeholder="请填写原因"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
@ -227,12 +168,7 @@
<el-input v-model="formCustomer.phone" autocomplete="off" /> <el-input v-model="formCustomer.phone" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item label="地址" :label-width="formLabelWidth"> <el-form-item label="地址" :label-width="formLabelWidth">
<el-input <el-input v-model="formCustomer.address" :rows="2" type="textarea" placeholder="请填写地址" />
v-model="formCustomer.address"
:rows="2"
type="textarea"
placeholder="请填写地址"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
@ -244,13 +180,7 @@
</template> </template>
</el-dialog> </el-dialog>
<!-- 表单模块 --> <!-- 表单模块 -->
<el-dialog <el-dialog :title="title" v-model="box" width="50%" :before-close="beforeClose" append-to-body>
:title="title"
v-model="box"
width="50%"
:before-close="beforeClose"
append-to-body
>
<el-form :disabled="view" ref="form" :model="form" label-width="80px"> <el-form :disabled="view" ref="form" :model="form" label-width="80px">
<!-- 表单字段 --> <!-- 表单字段 -->
<el-form-item label="服务号" prop="serviceNumber"> <el-form-item label="服务号" prop="serviceNumber">
@ -270,13 +200,8 @@
</el-form-item> </el-form-item>
<el-form-item label="入库时间" prop="warehouseEntryTime"> <el-form-item label="入库时间" prop="warehouseEntryTime">
<!-- <el-input v-model="form.warehouseEntryTime" placeholder="请输入入库时间"/>--> <!-- <el-input v-model="form.warehouseEntryTime" placeholder="请输入入库时间"/>-->
<el-date-picker <el-date-picker v-model="form.warehouseEntryTime" type="datetime" placeholder="请输入入库时间"
v-model="form.warehouseEntryTime" format="YYYY-MM-DD hh:mm:ss" value-format="YYYY-MM-DD hh:mm:ss" />
type="datetime"
placeholder="请输入入库时间"
format="YYYY-MM-DD hh:mm:ss"
value-format="YYYY-MM-DD hh:mm:ss"
/>
</el-form-item> </el-form-item>
<el-form-item label="在库时长" prop="storeTime"> <el-form-item label="在库时长" prop="storeTime">
<el-input v-model="form.storeTime" placeholder="请输入在库时长" /> <el-input v-model="form.storeTime" placeholder="请输入在库时长" />
@ -352,21 +277,15 @@
<!-- 表单按钮 --> <!-- 表单按钮 -->
<template #footer> <template #footer>
<span v-if="!view" class="dialog-footer"> <span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" <el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit"> </el-button>
> </el-button
>
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button> <el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
</basic-container> </basic-container>
<edittablehead <edittablehead @setcolum="setnewcolum" @closce="showdrawer" :drawerShow="drawerShow" :columnList="columnList">
@setcolum="setnewcolum" </edittablehead>
@closce="showdrawer"
:drawerShow="drawerShow"
:columnList="columnList"
></edittablehead>
</template> </template>
<script> <script>
@ -516,7 +435,7 @@ export default {
fixed: false, fixed: false,
sortable: true, sortable: true,
}, },
{ {
prop: 'totalNumber', prop: 'totalNumber',
label: '订单总件数', label: '订单总件数',
type: 1, type: 1,
@ -1590,23 +1509,29 @@ export default {
.el-button--text { .el-button--text {
margin-right: 15px; margin-right: 15px;
} }
.el-select { .el-select {
width: 300px; width: 300px;
} }
.el-input { .el-input {
width: 300px; width: 300px;
} }
.dialog-footer button:first-child { .dialog-footer button:first-child {
margin-right: 10px; margin-right: 10px;
} }
.el-fr { .el-fr {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.asterisk-left:last-child { .asterisk-left:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.el-input { .el-input {
margin-left: 8px; margin-left: 8px;
} }
@ -1614,31 +1539,38 @@ export default {
:deep(.el-form-item__content) { :deep(.el-form-item__content) {
margin-left: 8px; margin-left: 8px;
} }
.el-times { .el-times {
width: auto; width: auto;
:deep(.el-tooltip__trigger) { :deep(.el-tooltip__trigger) {
height: 30px !important; height: 30px !important;
} }
} }
:deep(.el-form-item__label) { :deep(.el-form-item__label) {
padding: 0; padding: 0;
} }
:deep(.avue-crud) { :deep(.avue-crud) {
display: flex; display: flex;
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
} }
:deep(.el-card__body) { :deep(.el-card__body) {
height: 100%; height: 100%;
} }
:deep(.el-card) { :deep(.el-card) {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.el-fy { .el-fy {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
</style> </style>

120
src/views/distribution/inventory/distrilbutionBillLadingList.vue

@ -10,15 +10,8 @@
</el-form-item> </el-form-item>
<el-form-item label="入库时间:" class="el-times"> <el-form-item label="入库时间:" class="el-times">
<!-- <el-input v-model="query.stockupArea" placeholder="请输入备货区"></el-input>--> <!-- <el-input v-model="query.stockupArea" placeholder="请输入备货区"></el-input>-->
<el-date-picker <el-date-picker v-model="stockupDate" type="datetimerange" unlink-panels range-separator=""
v-model="stockupDate" start-placeholder="开始时间" end-placeholder="结束时间" :shortcuts="shortcuts" />
type="datetimerange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
/>
</el-form-item> </el-form-item>
</div> </div>
<!-- 查询按钮 --> <!-- 查询按钮 -->
@ -36,8 +29,7 @@
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span style="margin-bottom: 2%; font-size: 16px"> <span style="margin-bottom: 2%; font-size: 16px">
已提货{{ stopNum }}/{{ numBill }}</span 已提货{{ stopNum }}/{{ numBill }}</span>
>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -46,14 +38,12 @@
<div class="avue-crud__left"> <div class="avue-crud__left">
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button> <!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>--> <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>-->
<el-button type="primary" icon="el-icon-plus" @click="handleBillAdd" <el-button type="primary" icon="el-icon-plus" v-if="permission.distrilbutionBillLadingList_add"
>创建自提</el-button @click="handleBillAdd">创建自提</el-button>
> <el-button type="primary" icon="el-icon-plus" v-if="permission.distrilbutionBillLadingList_sign"
<el-button type="primary" icon="el-icon-plus" @click="handleSign(null, 2)" @click="handleSign(null, 2)">自提签收</el-button>
>自提签收</el-button <el-button type="danger" icon="el-icon-delete" v-if="permission.distrilbutionBillLadingList_export"
> @click="handleExportInfo" plain>导出
<el-button type="danger" icon="el-icon-delete" @click="handleExportInfo" plain
>导出
</el-button> </el-button>
</div> </div>
<!-- 头部右侧按钮模块 --> <!-- 头部右侧按钮模块 -->
@ -66,36 +56,16 @@
</el-row> </el-row>
<el-row> <el-row>
<!-- 列表模块 --> <!-- 列表模块 -->
<tablecmt <tablecmt :columnList="columnList" :tableData="data" :loading="loading" @inputTxt="inputsc" @timeCheck="timesc"
:columnList="columnList" @btnCheck="btnsc" @selectCheck="selectsc" @selection="selectionChange">
:tableData="data"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps"> <template #default="slotProps">
<!-- <el-button size="small" @click="editsolt(slotProps.scope)">修改</el-button>--> <!-- <el-button size="small" @click="editsolt(slotProps.scope)">修改</el-button>-->
<el-text size="small" text @click="handleLike(slotProps.scope)">查看</el-text> <el-text size="small" text v-if="permission.distrilbutionBillLadingList_view"
<el-text @click="handleLike(slotProps.scope)">查看</el-text>
size="small" <el-text size="small" type="danger" icon="el-icon-edit" text @click="handleSign(slotProps.scope, 1)"
type="danger" v-if="permission.distrilbutionBillLadingList_qs && slotProps.scope.row.conditions < 30">签收</el-text>
icon="el-icon-edit" <el-text type="primary" text icon="el-icon-edit" @click="handleEdits(slotProps.scope)"
text v-if="permission.distrilbutionBillLadingList_edit && slotProps.scope.row.conditions < 20">编辑提货信息</el-text>
@click="handleSign(slotProps.scope, 1)"
v-if="slotProps.scope.row.conditions < 30"
>签收</el-text
>
<el-text
type="primary"
text
icon="el-icon-edit"
@click="handleEdits(slotProps.scope)"
v-if="slotProps.scope.row.conditions < 20"
>编辑提货信息</el-text
>
<!-- <el-button size="small" type="danger" icon="el-icon-edit" text @click="handleDeleteOwn(slotProps.scope)">删除</el-button>--> <!-- <el-button size="small" type="danger" icon="el-icon-edit" text @click="handleDeleteOwn(slotProps.scope)">删除</el-button>-->
</template> </template>
</tablecmt> </tablecmt>
@ -104,28 +74,14 @@
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> <div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-pagination <el-pagination align="right" background @size-change="sizeChange" @current-change="currentChange"
align="right" :current-page="page.currentPage" :page-sizes="[30, 50, 80, 120]" :page-size="page.pageSize"
background layout="total, sizes, prev, pager, next, jumper" :total="page.total">
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination> </el-pagination>
</div> </div>
</el-row> </el-row>
<!-- 表单模块 --> <!-- 表单模块 -->
<el-dialog <el-dialog :title="title" v-model="box" width="50%" :before-close="beforeClose" append-to-body>
:title="title"
v-model="box"
width="50%"
:before-close="beforeClose"
append-to-body
>
<el-form :disabled="view" ref="form" :model="form" label-width="80px"> <el-form :disabled="view" ref="form" :model="form" label-width="80px">
<!-- 表单字段 --> <!-- 表单字段 -->
<el-form-item label="提货时间" prop="pickUpTime"> <el-form-item label="提货时间" prop="pickUpTime">
@ -142,12 +98,8 @@
</el-form-item> </el-form-item>
<el-form-item label="证件类型" prop="certificateType"> <el-form-item label="证件类型" prop="certificateType">
<el-select v-model="form.certificateType" clearable placeholder="请选择证件类型"> <el-select v-model="form.certificateType" clearable placeholder="请选择证件类型">
<el-option <el-option v-for="item in certificateTypeData" :key="item.dictKey" :label="item.dictValue"
v-for="item in certificateTypeData" :value="item.dictKey">
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -158,9 +110,7 @@
<!-- 表单按钮 --> <!-- 表单按钮 -->
<template #footer> <template #footer>
<span v-if="!view" class="dialog-footer"> <span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" <el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit"> </el-button>
> </el-button
>
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button> <el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
</span> </span>
</template> </template>
@ -318,12 +268,8 @@
</div> </div>
</div>--> </div>-->
</basic-container> </basic-container>
<edittablehead <edittablehead @setcolum="setnewcolum" @closce="showdrawer" :drawerShow="drawerShow" :columnList="columnList">
@setcolum="setnewcolum" </edittablehead>
@closce="showdrawer"
:drawerShow="drawerShow"
:columnList="columnList"
></edittablehead>
</template> </template>
<script> <script>
@ -774,6 +720,8 @@ export default {
} else if (type == 3) { } else if (type == 3) {
this.columnList = newarr; this.columnList = newarr;
this.$functions.setStorage(window.location.pathname + 'sortlist', headarr); this.$functions.setStorage(window.location.pathname + 'sortlist', headarr);
} else if (type == 4) {
this.columnList = newarr;
} }
}, },
selectionsc(value) { selectionsc(value) {
@ -1161,10 +1109,12 @@ export default {
z-index: 999; z-index: 999;
height: 60px; height: 60px;
} }
.foot .dialog-footer { .foot .dialog-footer {
margin-bottom: 130px; margin-bottom: 130px;
text-align: center; text-align: center;
} }
.ca .el-radio__inner { .ca .el-radio__inner {
top: -18px; top: -18px;
left: -19px; left: -19px;
@ -1187,23 +1137,28 @@ export default {
.el-input { .el-input {
margin-left: 8px; margin-left: 8px;
} }
:deep(.el-form-item__content) { :deep(.el-form-item__content) {
margin-left: 8px; margin-left: 8px;
} }
.el-fr-d { .el-fr-d {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.el-btn { .el-btn {
margin-right: 0; margin-right: 0;
} }
// //
.el-times { .el-times {
:deep(.el-tooltip__trigger) { :deep(.el-tooltip__trigger) {
height: 30px !important; height: 30px !important;
} }
} }
:deep(.el-form-item__label) { :deep(.el-form-item__label) {
padding: 0; padding: 0;
} }
@ -1215,17 +1170,20 @@ export default {
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
} }
:deep(.el-card__body) { :deep(.el-card__body) {
height: 100%; height: 100%;
} }
:deep(.el-card) { :deep(.el-card) {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.el-fy { .el-fy {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
</style> </style>

406
src/views/factory/snm/staorderPackages.vue

@ -1,33 +1,18 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" <avue-crud :option="option" v-model:search="search" v-model:page="page" v-model="form" :table-loading="loading"
v-model:search="search" :data="data" :permission="permissionList" :before-open="beforeOpen" ref="crud" @row-update="rowUpdate"
v-model:page="page" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
v-model="form" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
:table-loading="loading" @refresh-change="refreshChange" @on-load="onLoad">
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
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"
@on-load="onLoad">
<template #menu-left> <template #menu-left>
<!-- <el-button type="danger"--> <!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"--> <!-- icon="el-icon-delete"-->
<!-- plain--> <!-- plain-->
<!-- v-if="permission.staorderPackages_delete"--> <!-- v-if="permission.staorderPackages_delete"-->
<!-- @click="handleDelete"> --> <!-- @click="handleDelete"> -->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="primary" <el-button type="primary" @click="handleVie">
@click="handleVie">
</el-button> </el-button>
</template> </template>
</avue-crud> </avue-crud>
@ -35,216 +20,215 @@
</template> </template>
<script> <script>
import {getList, getDetail, add, update, remove} from "@/api/factory/snm/staorderPackages"; import { getList, getDetail, add, update, remove } from "@/api/factory/snm/staorderPackages";
import option from "@/option/factory/snm/staorderPackages"; import option from "@/option/factory/snm/staorderPackages";
import {mapGetters} from "vuex"; import { mapGetters } from "vuex";
import {exportBlob} from "@/api/common"; import { exportBlob } from "@/api/common";
import {getToken} from '@/utils/auth'; import { getToken } from '@/utils/auth';
import {downloadXls} from "@/utils/util"; import { downloadXls } from "@/utils/util";
import {dateNow} from "@/utils/date"; import { dateNow } from "@/utils/date";
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
export default { export default {
data() { data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 30,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
form: {}, addBtn: this.validData(this.permission.staorderPackages_add, false),
query: {}, viewBtn: this.validData(this.permission.staorderPackages_view, false),
search: {}, delBtn: this.validData(this.permission.staorderPackages_delete, false),
loading: true, editBtn: this.validData(this.permission.staorderPackages_edit, false)
page: {
pageSize: 30,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
}; };
}, },
computed: { ids() {
...mapGetters(["permission"]), let ids = [];
permissionList() { this.selectionList.forEach(ele => {
return { ids.push(ele.id);
addBtn: this.validData(this.permission.staorderPackages_add, false), });
viewBtn: this.validData(this.permission.staorderPackages_view, false), return ids.join(",");
delBtn: this.validData(this.permission.staorderPackages_delete, false), }
editBtn: this.validData(this.permission.staorderPackages_edit, false) },
}; watch: {
}, // eslint-disable-next-line no-unused-vars
ids() { '$route'(to, from) {
let ids = []; // this.isadd =false;
this.selectionList.forEach(ele => { // this.query.masterId = null;
ids.push(ele.id); // this.masterId = null;
}); if (!!this.$route.query.data) {
return ids.join(",");
}
},
watch: {
// eslint-disable-next-line no-unused-vars
'$route'(to, from) {
// this.isadd =false;
// this.query.masterId = null;
// this.masterId = null;
if (!!this.$route.query.data) {
// // // //
// // this.isadd =true; // // this.isadd =true;
// this.query.masterId = this.$route.query.data; // this.query.masterId = this.$route.query.data;
// this.masterId = this.$route.query.data; // this.masterId = this.$route.query.data;
// //
this.onLoad(this.page); this.onLoad(this.page);
} else { } else {
}
} }
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
}, },
methods: { //
rowSave(row, done, loading) { handleVie() {
add(row).then(() => { // this.$store.dispatch(this.$route.path, this.$route);
this.$router.push({
path: '/factory/snm/stationOrder'
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
done();
}, error => {
loading();
window.console.log(error);
}); });
}, },
// handleDelete() {
handleVie() { if (this.selectionList.length === 0) {
// this.$store.dispatch(this.$route.path, this.$route); this.$message.warning("请选择至少一条数据");
this.$router.push({ return;
path: '/factory/snm/stationOrder' }
}); this.$confirm("确定将选择数据删除?", {
}, confirmButtonText: "确定",
rowUpdate(row, index, done, loading) { cancelButtonText: "取消",
update(row).then(() => { type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
done(); this.$refs.crud.toggleSelection();
}, error => {
loading();
console.log(error);
}); });
}, },
rowDel(row) { handleExport() {
this.$confirm("确定将选择数据删除?", { let downloadUrl = `/logpm-factory/staorderPackages/export-staorderPackages?${this.website.tokenHeader}=${getToken()}`;
confirmButtonText: "确定", const {
cancelButtonText: "取消", } = this.query;
type: "warning" let values = {
}) };
.then(() => { this.$confirm("是否导出数据?", "提示", {
return remove(row.id); confirmButtonText: "确定",
}) cancelButtonText: "取消",
.then(() => { type: "warning"
this.onLoad(this.page); }).then(() => {
this.$message({ NProgress.start();
type: "success", exportBlob(downloadUrl, values).then(res => {
message: "操作成功!" downloadXls(res.data, `运单包件信息${dateNow()}.xlsx`);
}); NProgress.done();
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}) })
.then(() => { });
return remove(this.ids); },
}) beforeOpen(done, type) {
.then(() => { if (["edit", "view"].includes(type)) {
this.onLoad(this.page); getDetail(this.form.id).then(res => {
this.$message({ this.form = res.data.data;
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/logpm-factory/staorderPackages/export-staorderPackages?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `运单包件信息${dateNow()}.xlsx`);
NProgress.done();
})
}); });
}, }
beforeOpen(done, type) { done();
if (["edit", "view"].includes(type)) { },
getDetail(this.form.id).then(res => { searchReset() {
this.form = res.data.data; this.query = {};
}); this.onLoad(this.page);
} },
done(); searchChange(params, done) {
}, this.query = params;
searchReset() { this.page.currentPage = 1;
this.query = {}; this.onLoad(this.page, params);
this.onLoad(this.page); done();
}, },
searchChange(params, done) { selectionChange(list) {
this.query = params; this.selectionList = list;
this.page.currentPage = 1; },
this.onLoad(this.page, params); selectionClear() {
done(); this.selectionList = [];
}, this.$refs.crud.toggleSelection();
selectionChange(list) { },
this.selectionList = list; currentChange(currentPage) {
}, this.page.currentPage = currentPage;
selectionClear() { },
this.selectionList = []; sizeChange(pageSize) {
this.$refs.crud.toggleSelection(); this.page.pageSize = pageSize;
}, },
currentChange(currentPage){ refreshChange() {
this.page.currentPage = currentPage; this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize){ onLoad(page, params = {}) {
this.page.pageSize = pageSize; this.loading = true;
}, const {
refreshChange() { orderId,
this.onLoad(this.page, this.query); } = this.query;
},
onLoad(page, params = {}) {
this.loading = true;
const {
orderId,
} = this.query;
if (!!this.$route.query.data) { if (!!this.$route.query.data) {
this.query.orderId = this.$route.query.data; this.query.orderId = this.$route.query.data;
}
let values = {
orderId : this.$route.query.data,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
} }
let values = {
orderId: this.$route.query.data,
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
} }
}; }
};
</script> </script>
<style> <style></style>
</style>

419
src/views/factory/snm/stationlinenum.vue

@ -1,53 +1,33 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" <avue-crud :option="option" v-model:search="search" v-model:page="page" v-model="form" :table-loading="loading"
v-model:search="search" :data="data" :permission="permissionList" :before-open="beforeOpen" ref="crud" @row-update="rowUpdate"
v-model:page="page" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
v-model="form" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
:table-loading="loading" @refresh-change="refreshChange" @on-load="onLoad">
:data="data" <template #id-header="{ column }">
:permission="permissionList" <span>{{ column.label }}</span>
:before-open="beforeOpen" <el-input size="autosize" v-model="query.id" placeholder="请输入内容" suffix-icon="el-icon-search" />
ref="crud" <!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
@row-update="rowUpdate" </template>
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #id-header="{column}">
<span>{{ column.label }}</span>
<el-input size="autosize" v-model="query.id" placeholder="请输入内容" suffix-icon="el-icon-search" />
<!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
</template>
<template #logisticsLineNumber-header="{column}"> <template #logisticsLineNumber-header="{ column }">
<span>{{ column.label }}</span> <span>{{ column.label }}</span>
<el-input size="autosize" v-model="query.logisticsLineNumber" placeholder="请输入内容" suffix-icon="el-icon-search" /> <el-input size="autosize" v-model="query.logisticsLineNumber" placeholder="请输入内容" suffix-icon="el-icon-search" />
<!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> --> <!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
</template> </template>
<template #logisticsLineName-header="{column}"> <template #logisticsLineName-header="{ column }">
<span>{{ column.label }}</span> <span>{{ column.label }}</span>
<el-input size="autosize" v-model="query.logisticsLineName" placeholder="请输入内容" suffix-icon="el-icon-search" /> <el-input size="autosize" v-model="query.logisticsLineName" placeholder="请输入内容" suffix-icon="el-icon-search" />
<!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> --> <!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
</template> </template>
<template #menu-left> <template #menu-left>
<el-button type="danger" <el-button type="danger" icon="el-icon-delete" plain v-if="permission.stationlinenum_delete"
icon="el-icon-delete" @click="handleDelete">
plain
v-if="permission.stationlinenum_delete"
@click="handleDelete">
</el-button> </el-button>
<el-button type="warning" <el-button type="warning" plain icon="el-icon-download" @click="handleExport">
plain
icon="el-icon-download"
@click="handleExport">
</el-button> </el-button>
</template> </template>
@ -57,210 +37,213 @@
</template> </template>
<script> <script>
import {getList, getDetail, add, update, remove} from "@/api/factory/snm/stationlinenum"; import { getList, getDetail, add, update, remove } from "@/api/factory/snm/stationlinenum";
import option from "@/option/factory/snm/stationlinenum"; import option from "@/option/factory/snm/stationlinenum";
import {mapGetters} from "vuex"; import { mapGetters } from "vuex";
import {exportBlob} from "@/api/common"; import { exportBlob } from "@/api/common";
import {getToken} from '@/utils/auth'; import { getToken } from '@/utils/auth';
import {downloadXls} from "@/utils/util"; import { downloadXls } from "@/utils/util";
import {dateNow} from "@/utils/date"; import { dateNow } from "@/utils/date";
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 30,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
export default {
data() {
return { return {
form: {}, addBtn: this.validData(this.permission.stationlinenum_add, false),
query: {}, viewBtn: this.validData(this.permission.stationlinenum_view, false),
search: {}, delBtn: this.validData(this.permission.stationlinenum_delete, false),
loading: true, editBtn: this.validData(this.permission.stationlinenum_edit, false)
page: {
pageSize: 30,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
}; };
}, },
computed: { ids() {
...mapGetters(["permission"]), let ids = [];
permissionList() { this.selectionList.forEach(ele => {
ids.push(ele.id);
return { });
addBtn: this.validData(this.permission.stationlinenum_add, false), return ids.join(",");
viewBtn: this.validData(this.permission.stationlinenum_view, false), }
delBtn: this.validData(this.permission.stationlinenum_delete, false), },
editBtn: this.validData(this.permission.stationlinenum_edit, false) methods: {
}; rowSave(row, done, loading) {
}, add(row).then(() => {
ids() { this.onLoad(this.page);
let ids = []; this.$message({
this.selectionList.forEach(ele => { type: "success",
ids.push(ele.id); message: "操作成功!"
}); });
return ids.join(","); done();
} }, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
}, },
methods: { rowDel(row) {
rowSave(row, done, loading) { this.$confirm("确定将选择数据删除?", {
add(row).then(() => { confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
done();
}, error => {
loading();
window.console.log(error);
}); });
}, },
rowUpdate(row, index, done, loading) { handleDelete() {
update(row).then(() => { if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
done(); this.$refs.crud.toggleSelection();
}, error => {
loading();
console.log(error);
}); });
}, },
rowDel(row) { handleExport() {
this.$confirm("确定将选择数据删除?", { let downloadUrl = `/logpm-factory/snm/stationlinenum/export-stationlinenum?${this.website.tokenHeader}=${getToken()}`;
confirmButtonText: "确定", const {
cancelButtonText: "取消", logisticsLineNumber,
type: "warning" logisticsLineName,
}) } = this.query;
.then(() => { let values = {
return remove(row.id); logisticsLineNumber_equal: logisticsLineNumber,
}) logisticsLineName_like: logisticsLineName,
.then(() => { };
this.onLoad(this.page); this.$confirm("是否导出数据?", "提示", {
this.$message({ confirmButtonText: "确定",
type: "success", cancelButtonText: "取消",
message: "操作成功!" type: "warning"
}); }).then(() => {
}); NProgress.start();
}, exportBlob(downloadUrl, values).then(res => {
handleDelete() { downloadXls(res.data, `诗尼曼线路${dateNow()}.xlsx`);
if (this.selectionList.length === 0) { NProgress.done();
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}) })
.then(() => { });
return remove(this.ids); },
}) beforeOpen(done, type) {
.then(() => { if (["edit", "view"].includes(type)) {
this.onLoad(this.page); getDetail(this.form.id).then(res => {
this.$message({ this.form = res.data.data;
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/logpm-factory/snm/stationlinenum/export-stationlinenum?${this.website.tokenHeader}=${getToken()}`;
const {
logisticsLineNumber,
logisticsLineName,
} = this.query;
let values = {
logisticsLineNumber_equal: logisticsLineNumber,
logisticsLineName_like: logisticsLineName,
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `诗尼曼线路${dateNow()}.xlsx`);
NProgress.done();
})
}); });
}, }
beforeOpen(done, type) { done();
if (["edit", "view"].includes(type)) { },
getDetail(this.form.id).then(res => { searchReset() {
this.form = res.data.data; this.query = {};
}); this.onLoad(this.page);
} },
done(); searchChange(params, done) {
}, this.query = params;
searchReset() { this.page.currentPage = 1;
this.query = {}; this.onLoad(this.page, params);
this.onLoad(this.page); done();
}, },
searchChange(params, done) { selectionChange(list) {
this.query = params; this.selectionList = list;
this.page.currentPage = 1; },
this.onLoad(this.page, params); selectionClear() {
done(); this.selectionList = [];
}, this.$refs.crud.toggleSelection();
selectionChange(list) { },
this.selectionList = list; currentChange(currentPage) {
}, this.page.currentPage = currentPage;
selectionClear() { },
this.selectionList = []; sizeChange(pageSize) {
this.$refs.crud.toggleSelection(); this.page.pageSize = pageSize;
}, },
currentChange(currentPage){ refreshChange() {
this.page.currentPage = currentPage; this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize){ onLoad(page, params = {}) {
this.page.pageSize = pageSize; this.loading = true;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const { const {
logisticsLineNumber, logisticsLineNumber,
logisticsLineName, logisticsLineName,
} = this.query; } = this.query;
let values = { let values = {
logisticsLineNumber_equal: logisticsLineNumber, logisticsLineNumber_equal: logisticsLineNumber,
logisticsLineName_like: logisticsLineName, logisticsLineName_like: logisticsLineName,
}; };
getList(page.currentPage, page.pageSize, values).then(res => { getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data; const data = res.data.data;
this.page.total = data.total; this.page.total = data.total;
this.data = data.records; this.data = data.records;
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
}); });
}
} }
}; }
};
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
:deep(.no-print){ :deep(.no-print) {
margin-left:auto; margin-left: auto;
.el-button{
margin-right:0 .el-button {
margin-right: 0
} }
} }
:deep(.avue-form__row){
max-width:300px!important; :deep(.avue-form__row) {
max-width: 300px !important;
} }
:deep(.el-form-item__label){
width:auto !important; :deep(.el-form-item__label) {
width: auto !important;
} }
</style> </style>

3386
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save