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. 158
      src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue
  7. 122
      src/views/distribution/inventory/distrilbutionBillLadingList.vue
  8. 406
      src/views/factory/snm/staorderPackages.vue
  9. 423
      src/views/factory/snm/stationlinenum.vue
  10. 3386
      yarn.lock

1
package.json

@ -27,6 +27,7 @@
"kr-print-designer": "^1.1.8",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"sortablejs": "^1.15.0",
"vite-plugin-mock": "^2.9.4",
"vue": "^3.2.40",
"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-checkbox label="12" />
<el-checkbox label="2" /> -->
<el-table :data="columnList" style="width: 100%; height: 700px" border>
<el-table-column
v-for="column in headtop"
:key="column.prop"
:prop="column.prop"
:label="column.label"
:width="column.width"
flexible
>
<el-table :data="columnList" style="width: 100%; height: 700px" border ref="tableEl1">
<el-table-column v-for="column in headtop" :key="column.prop" :prop="column.prop" :label="column.label"
:width="column.width" flexible>
<template #header>
<el-text class="mx-1">{{ column.label }}</el-text>
</template>
<template #default="scope">
<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
:key="scope.row['label']"
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(1)"
>
<el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
@change="checkboxitem(1)">
<!-- 用于隐藏文字 -->
<template #default="scope">
<!-- {{ scope }} -->
@ -31,13 +20,8 @@
</el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-else-if="column.label == '冻结'" v-model="flexList">
<el-checkbox
:key="scope.row['label']"
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(2)"
>
<el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
@change="checkboxitem(2)">
<!-- 用于隐藏文字 -->
<template #default="scope">
<!-- {{ scope }} -->
@ -45,13 +29,8 @@
</el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-else-if="column.label == '排序'" v-model="sortlist">
<el-checkbox
:key="scope.row['label']"
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(3)"
>
<el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
@change="checkboxitem(3)">
<!-- 用于隐藏文字 -->
<template #default="scope">
<!-- {{ scope }} -->
@ -67,9 +46,10 @@
</template>
<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';
const functions = inject('functions') as any;
import Sortable from "sortablejs";
interface TableColumnType {
/** 表格列的key */
prop: string;
@ -122,6 +102,9 @@ interface headtoptype {
const checkList = ref<(string | number)[]>([]);
const flexList = ref<(string | number)[]>([]);
const sortlist = ref<(string | number)[]>([]);
const tableEl1 = ref(null);
if (functions.getStorage(window.location.pathname + 'checkList')) {
checkList.value = functions.getStorage(window.location.pathname + 'checkList');
console.log(checkList.value);
@ -145,6 +128,47 @@ let props = defineProps({
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() {
emit('closce', false);
}
@ -184,13 +208,7 @@ function close() {
// });
// emit('setcolum', props.columnList);
// });
// onMounted(() => {
// props.columnList.map(item => {
// if (item.head) {
// (checkList.value as string[]).push(item.label);
// }
// });
// });
// watchEffect(()=>{
// props.columnList.map(item => {
// if(item.head){

4
src/page/index/index.vue

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

4
src/page/index/layout.vue

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

44
src/router/avue-router.js

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

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

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

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

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

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

@ -1,33 +1,18 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
: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">
<avue-crud :option="option" v-model:search="search" v-model:page="page" v-model="form" :table-loading="loading"
: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>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.staorderPackages_delete"-->
<!-- @click="handleDelete"> -->
<!-- </el-button>-->
<el-button type="primary"
@click="handleVie">
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.staorderPackages_delete"-->
<!-- @click="handleDelete"> -->
<!-- </el-button>-->
<el-button type="primary" @click="handleVie">
</el-button>
</template>
</avue-crud>
@ -35,216 +20,215 @@
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/factory/snm/staorderPackages";
import option from "@/option/factory/snm/staorderPackages";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from "@/api/factory/snm/staorderPackages";
import option from "@/option/factory/snm/staorderPackages";
import { mapGetters } from "vuex";
import { exportBlob } from "@/api/common";
import { getToken } from '@/utils/auth';
import { downloadXls } from "@/utils/util";
import { dateNow } from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 30,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 30,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.staorderPackages_add, false),
viewBtn: this.validData(this.permission.staorderPackages_view, false),
delBtn: this.validData(this.permission.staorderPackages_delete, false),
editBtn: this.validData(this.permission.staorderPackages_edit, false)
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.staorderPackages_add, false),
viewBtn: this.validData(this.permission.staorderPackages_view, false),
delBtn: this.validData(this.permission.staorderPackages_delete, false),
editBtn: this.validData(this.permission.staorderPackages_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
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) {
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
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.query.masterId = this.$route.query.data;
// this.masterId = this.$route.query.data;
//
this.onLoad(this.page);
} else {
}
//
this.onLoad(this.page);
} 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) {
add(row).then(() => {
//
handleVie() {
// 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.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
//
handleVie() {
// this.$store.dispatch(this.$route.path, this.$route);
this.$router.push({
path: '/factory/snm/stationOrder'
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
},
handleDelete() {
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.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
this.$refs.crud.toggleSelection();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
},
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();
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
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) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(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;
const {
orderId,
} = this.query;
}
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;
const {
orderId,
} = this.query;
if (!!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();
});
if (!!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();
});
}
};
}
};
</script>
<style>
</style>
<style></style>

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

@ -1,266 +1,249 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
: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 #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>
<avue-crud :option="option" v-model:search="search" v-model:page="page" v-model="form" :table-loading="loading"
: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 #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}">
<span>{{ column.label }}</span>
<el-input size="autosize" v-model="query.logisticsLineNumber" placeholder="请输入内容" suffix-icon="el-icon-search" />
<!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
</template>
<template #logisticsLineNumber-header="{ column }">
<span>{{ column.label }}</span>
<el-input size="autosize" v-model="query.logisticsLineNumber" placeholder="请输入内容" suffix-icon="el-icon-search" />
<!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
</template>
<template #logisticsLineName-header="{column}">
<span>{{ column.label }}</span>
<el-input size="autosize" v-model="query.logisticsLineName" placeholder="请输入内容" suffix-icon="el-icon-search" />
<!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
</template>
<template #logisticsLineName-header="{ column }">
<span>{{ column.label }}</span>
<el-input size="autosize" v-model="query.logisticsLineName" placeholder="请输入内容" suffix-icon="el-icon-search" />
<!-- <el-tag>{{(column || {}).label}}-{{(column || {}).prop}}</el-tag> -->
</template>
<template #menu-left>
<el-button type="danger"
icon="el-icon-delete"
plain
v-if="permission.stationlinenum_delete"
@click="handleDelete">
<el-button type="danger" icon="el-icon-delete" plain v-if="permission.stationlinenum_delete"
@click="handleDelete">
</el-button>
<el-button type="warning"
plain
icon="el-icon-download"
@click="handleExport">
<el-button type="warning" plain icon="el-icon-download" @click="handleExport">
</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/factory/snm/stationlinenum";
import option from "@/option/factory/snm/stationlinenum";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getList, getDetail, add, update, remove } from "@/api/factory/snm/stationlinenum";
import option from "@/option/factory/snm/stationlinenum";
import { mapGetters } from "vuex";
import { exportBlob } from "@/api/common";
import { getToken } from '@/utils/auth';
import { downloadXls } from "@/utils/util";
import { dateNow } from "@/utils/date";
import NProgress from 'nprogress';
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 {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 30,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
addBtn: this.validData(this.permission.stationlinenum_add, false),
viewBtn: this.validData(this.permission.stationlinenum_view, false),
delBtn: this.validData(this.permission.stationlinenum_delete, false),
editBtn: this.validData(this.permission.stationlinenum_edit, false)
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.stationlinenum_add, false),
viewBtn: this.validData(this.permission.stationlinenum_view, false),
delBtn: this.validData(this.permission.stationlinenum_delete, false),
editBtn: this.validData(this.permission.stationlinenum_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
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: {
rowSave(row, done, loading) {
add(row).then(() => {
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
},
handleDelete() {
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.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
this.$refs.crud.toggleSelection();
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
},
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();
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
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) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(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;
}
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;
const {
logisticsLineNumber,
logisticsLineName,
} = this.query;
const {
logisticsLineNumber,
logisticsLineName,
} = this.query;
let values = {
logisticsLineNumber_equal: logisticsLineNumber,
logisticsLineName_like: logisticsLineName,
};
let values = {
logisticsLineNumber_equal: logisticsLineNumber,
logisticsLineName_like: logisticsLineName,
};
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();
});
}
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>
<style scoped lang='scss'>
:deep(.no-print){
margin-left:auto;
.el-button{
margin-right:0
:deep(.no-print) {
margin-left: auto;
.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>

3386
yarn.lock

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