``
This commit is contained in:
parent
16e9225bbc
commit
6514ae0510
9
.idea/evo_vue.iml
Normal file
9
.idea/evo_vue.iml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
6
.idea/misc.xml
Normal file
6
.idea/misc.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/evo_vue.iml" filepath="$PROJECT_DIR$/.idea/evo_vue.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@ -36,12 +36,13 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.3.1",
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
|
"@jiaminghi/data-view": "^2.10.0",
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"@vue/composition-api": "^1.7.2",
|
"@vue/composition-api": "^1.7.2",
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"clipboard": "2.0.8",
|
"clipboard": "2.0.8",
|
||||||
"core-js": "3.25.3",
|
"core-js": "3.25.3",
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.13",
|
||||||
"dhtmlx-gantt": "^8.0.11",
|
"dhtmlx-gantt": "^8.0.11",
|
||||||
"echarts-gl": "^2.0.9",
|
"echarts-gl": "^2.0.9",
|
||||||
"element-ui": "^2.15.12",
|
"element-ui": "^2.15.12",
|
||||||
|
|||||||
44
src/api/system/assetCard.js
Normal file
44
src/api/system/assetCard.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询金蝶资产卡片列表
|
||||||
|
export function listAssetCard(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/assetCard/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询金蝶资产卡片详细
|
||||||
|
export function getAssetCard(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/assetCard/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增金蝶资产卡片
|
||||||
|
export function addAssetCard(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/assetCard',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改金蝶资产卡片
|
||||||
|
export function updateAssetCard(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/assetCard',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除金蝶资产卡片
|
||||||
|
export function delAssetCard(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/assetCard/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -18,12 +18,19 @@ export function getOrderPro(id) {
|
|||||||
}
|
}
|
||||||
export function processList(params) {
|
export function processList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/orderPro/processlist',
|
url: '/system/orderPro/processlist',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 调用 MRP 运算结果
|
||||||
|
export function getMRPResults(id) {
|
||||||
|
return request({
|
||||||
|
url: `/system/orderPro/getMRPResults/${id}`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 15 * 60 * 1000 // 设置 15 分钟超时
|
||||||
|
})
|
||||||
|
}
|
||||||
// 新增项目令号
|
// 新增项目令号
|
||||||
export function addOrderPro(data) {
|
export function addOrderPro(data) {
|
||||||
return request({
|
return request({
|
||||||
@ -69,6 +76,14 @@ export function addProduct(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 新增:修改产品(PUT)
|
||||||
|
export function updateProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/save',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
// 查询此项目用到的产品列表
|
// 查询此项目用到的产品列表
|
||||||
export function listSave(query) {
|
export function listSave(query) {
|
||||||
return request({
|
return request({
|
||||||
@ -103,4 +118,4 @@ export function uploadPDF(id) {
|
|||||||
responseType: 'blob', // 设置响应类型为blob,用于文件下载
|
responseType: 'blob', // 设置响应类型为blob,用于文件下载
|
||||||
headers: { 'Content-Type': 'application/json; application/octet-stream' }
|
headers: { 'Content-Type': 'application/json; application/octet-stream' }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import router from './router'
|
|||||||
import directive from './directive' // directive
|
import directive from './directive' // directive
|
||||||
import plugins from './plugins' // plugins
|
import plugins from './plugins' // plugins
|
||||||
import { download } from '@/utils/request'
|
import { download } from '@/utils/request'
|
||||||
|
import dataV from '@jiaminghi/data-view'
|
||||||
import './assets/icons' // icon
|
import './assets/icons' // icon
|
||||||
import './permission' // permission control
|
import './permission' // permission control
|
||||||
import { getDicts } from "@/api/system/dict/data";
|
import { getDicts } from "@/api/system/dict/data";
|
||||||
@ -80,6 +80,7 @@ Vue.use(VueComposition)
|
|||||||
Vue.use(directive)
|
Vue.use(directive)
|
||||||
Vue.use(plugins)
|
Vue.use(plugins)
|
||||||
Vue.use(VueMeta)
|
Vue.use(VueMeta)
|
||||||
|
Vue.use(dataV)
|
||||||
DictData.install()
|
DictData.install()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
|
|||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
const whiteList = ['/login', '/register', '/index']
|
const whiteList = ['/login', '/register', '/index','/indexDaping','/mrp2']
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
@ -40,6 +40,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// 没有token
|
// 没有token
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免登录白名单,直接进入
|
// 在免登录白名单,直接进入
|
||||||
|
|||||||
@ -120,6 +120,18 @@ export const constantRoutes = [
|
|||||||
path: '/index',
|
path: '/index',
|
||||||
component: () => import('@/views/index'),
|
component: () => import('@/views/index'),
|
||||||
hidden: true
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/indexDaping',
|
||||||
|
component: () => import('@/views/indexDaping'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/mrp2',
|
||||||
|
component: () => import('@/views/system/mrp2/index'),
|
||||||
|
name: 'Mrp2Public',
|
||||||
|
hidden: true,
|
||||||
|
meta: { title: 'MRP2运算结果' }
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
// path: '/',
|
// path: '/',
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
export function getstate() {
|
export function getstate() {
|
||||||
|
|
||||||
return axios.get('/all/getstate?UTF-8')
|
return axios.get('/all/getstate?UTF-8')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
return response.data;
|
return response.data;
|
||||||
@ -12,4 +12,4 @@ export function getstate() {
|
|||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('API 请求失败:', error);
|
console.error('API 请求失败:', error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -78,20 +78,27 @@
|
|||||||
<span style="font-family: '微软雅黑',sans-serif;">{{ scope.row.materialName }}</span>
|
<span style="font-family: '微软雅黑',sans-serif;">{{ scope.row.materialName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="即时库存(参考)" align="center" prop="unit"/>
|
|
||||||
<el-table-column label="可用库存(参考)" align="center">
|
<el-table-column label="单位" align="center" prop="unit"/>
|
||||||
|
<el-table-column label="即时库存" align="center" prop="inInventory"/>
|
||||||
|
<el-table-column label="材质" align="center" prop="materialQuality" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :style="{ color: scope.row.singleWeight < scope.row.unit ? 'red' : 'black' }">
|
<dict-tag :options="dict.type.material_properties" :value="scope.row.materialQuality"/>
|
||||||
{{ scope.row.singleWeight }}
|
</template>
|
||||||
</span>
|
</el-table-column>
|
||||||
|
<el-table-column label="所属类别" align="center" prop="imCategory" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.im_category" :value="scope.row.imCategory"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="材质" align="center" prop="materialQuality" />
|
|
||||||
<el-table-column label="所属类别" align="center" prop="imCategory" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-table-column label="单价" align="center" prop="unitPrice" />-->
|
<!-- <el-table-column label="单价" align="center" prop="unitPrice" />-->
|
||||||
<el-table-column label="物料属性" align="center" prop="classificationNumber" />
|
<el-table-column label="物料属性" align="center" prop="classificationNumber" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.item_attributes" :value="scope.row.classificationNumber"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -131,9 +138,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import {listMaterial_index, material_inventory} from "@/api/system/material";
|
import {listMaterial_index, material_inventory} from "@/api/system/material";
|
||||||
/*import upload from "svg-sprite-loader/examples/custom-runtime-generator/build/main";*/
|
/*import upload from "svg-sprite-loader/examples/custom-runtime-generator/build/main";*/
|
||||||
|
import dict from "@/utils/dict";
|
||||||
|
import DictData from "@/components/DictData";
|
||||||
export default {
|
export default {
|
||||||
name: "Material",
|
name: "Material",
|
||||||
|
dicts: ['material_properties','item_attributes','im_category'],
|
||||||
computed: {
|
computed: {
|
||||||
upload() {
|
upload() {
|
||||||
return upload
|
return upload
|
||||||
|
|||||||
388
src/views/system/assetCard/index.vue
Normal file
388
src/views/system/assetCard/index.vue
Normal file
@ -0,0 +1,388 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="资产类别" prop="assetCategory">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.assetCategory"
|
||||||
|
placeholder="请输入资产类别"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="卡片编码" prop="cardCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.cardCode"
|
||||||
|
placeholder="请输入卡片编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计量单位" prop="assetUnit">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.assetUnit"
|
||||||
|
placeholder="请输入计量单位"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产编码" prop="assetCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.assetCode"
|
||||||
|
placeholder="请输入资产编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产位置" prop="assetLocation">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.assetLocation"
|
||||||
|
placeholder="请输入资产位置"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产数量" prop="assetQuantity">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.assetQuantity"
|
||||||
|
placeholder="请输入资产数量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产名称" prop="assetName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.assetName"
|
||||||
|
placeholder="请输入资产名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="制造商" prop="assetManufacturer">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.assetManufacturer"
|
||||||
|
placeholder="请输入制造商"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:assetCard:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:assetCard:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:assetCard:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:assetCard:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="assetCardList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="ID" align="center" prop="id" v-if="true"/>
|
||||||
|
<el-table-column label="资产类别" align="center" prop="assetCategory" />
|
||||||
|
<el-table-column label="卡片编码" align="center" prop="cardCode" />
|
||||||
|
<el-table-column label="计量单位" align="center" prop="assetUnit" />
|
||||||
|
<el-table-column label="资产编码" align="center" prop="assetCode" />
|
||||||
|
<el-table-column label="资产位置" align="center" prop="assetLocation" />
|
||||||
|
<el-table-column label="资产数量" align="center" prop="assetQuantity" />
|
||||||
|
<el-table-column label="资产名称" align="center" prop="assetName" />
|
||||||
|
<el-table-column label="制造商" align="center" prop="assetManufacturer" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:assetCard:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:assetCard:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改金蝶资产卡片对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="资产类别" prop="assetCategory">
|
||||||
|
<el-input v-model="form.assetCategory" placeholder="请输入资产类别" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="卡片编码" prop="cardCode">
|
||||||
|
<el-input v-model="form.cardCode" placeholder="请输入卡片编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计量单位" prop="assetUnit">
|
||||||
|
<el-input v-model="form.assetUnit" placeholder="请输入计量单位" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产编码" prop="assetCode">
|
||||||
|
<el-input v-model="form.assetCode" placeholder="请输入资产编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产位置" prop="assetLocation">
|
||||||
|
<el-input v-model="form.assetLocation" placeholder="请输入资产位置" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产数量" prop="assetQuantity">
|
||||||
|
<el-input v-model="form.assetQuantity" placeholder="请输入资产数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资产名称" prop="assetName">
|
||||||
|
<el-input v-model="form.assetName" placeholder="请输入资产名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="制造商" prop="assetManufacturer">
|
||||||
|
<el-input v-model="form.assetManufacturer" placeholder="请输入制造商" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listAssetCard, getAssetCard, delAssetCard, addAssetCard, updateAssetCard } from "@/api/system/assetCard";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AssetCard",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 金蝶资产卡片表格数据
|
||||||
|
assetCardList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
assetCategory: undefined,
|
||||||
|
cardCode: undefined,
|
||||||
|
assetUnit: undefined,
|
||||||
|
assetCode: undefined,
|
||||||
|
assetLocation: undefined,
|
||||||
|
assetQuantity: undefined,
|
||||||
|
assetName: undefined,
|
||||||
|
assetManufacturer: undefined,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
id: [
|
||||||
|
{ required: true, message: "ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
assetCategory: [
|
||||||
|
{ required: true, message: "资产类别不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
cardCode: [
|
||||||
|
{ required: true, message: "卡片编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
assetUnit: [
|
||||||
|
{ required: true, message: "计量单位不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
assetCode: [
|
||||||
|
{ required: true, message: "资产编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
assetLocation: [
|
||||||
|
{ required: true, message: "资产位置不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
assetQuantity: [
|
||||||
|
{ required: true, message: "资产数量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
assetName: [
|
||||||
|
{ required: true, message: "资产名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
assetManufacturer: [
|
||||||
|
{ required: true, message: "制造商不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询金蝶资产卡片列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listAssetCard(this.queryParams).then(response => {
|
||||||
|
this.assetCardList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined,
|
||||||
|
assetCategory: undefined,
|
||||||
|
cardCode: undefined,
|
||||||
|
assetUnit: undefined,
|
||||||
|
assetCode: undefined,
|
||||||
|
assetLocation: undefined,
|
||||||
|
assetQuantity: undefined,
|
||||||
|
assetName: undefined,
|
||||||
|
assetManufacturer: undefined,
|
||||||
|
createBy: undefined,
|
||||||
|
updateBy: undefined,
|
||||||
|
createTime: undefined,
|
||||||
|
updateTime: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加金蝶资产卡片";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.loading = true;
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getAssetCard(id).then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改金蝶资产卡片";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateAssetCard(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addAssetCard(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除金蝶资产卡片编号为"' + ids + '"的数据项?').then(() => {
|
||||||
|
this.loading = true;
|
||||||
|
return delAssetCard(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/assetCard/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `assetCard_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
File diff suppressed because it is too large
Load Diff
@ -525,69 +525,6 @@ export default {
|
|||||||
bomNumber: [
|
bomNumber: [
|
||||||
{ required: true, message: "BOM型号不能为空", trigger: "blur" }
|
{ required: true, message: "BOM型号不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
V1: [
|
|
||||||
{ required: true, message: "行程不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V2: [
|
|
||||||
{ required: true, message: "设备总长不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V3: [
|
|
||||||
{ required: true, message: "地脚位置1不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V5: [
|
|
||||||
{ required: true, message: "箱体装配长度不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V6: [
|
|
||||||
{ required: true, message: "箱体地脚位置1不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V8: [
|
|
||||||
{ required: true, message: "铝箱长度1不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
G1: [
|
|
||||||
{ required: true, message: "铝箱1重量不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V10: [
|
|
||||||
{ required: true, message: "导向条长度1不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
G5: [
|
|
||||||
{ required: true, message: "导向条1单重1不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
G8: [
|
|
||||||
{ required: true, message: "导向条1单重2不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V12: [
|
|
||||||
{ required: true, message: "导向条长度2不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
G6: [
|
|
||||||
{ required: true, message: "导向条2单重1不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
G9: [
|
|
||||||
{ required: true, message: "导向条2单重2不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V41: [
|
|
||||||
{ required: true, message: "30D.02.4不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V42: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V43: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V44: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V45: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V46: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V47: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
V48: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user