提交
This commit is contained in:
parent
475b0b956b
commit
03da130aeb
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 生产管理系统
|
VUE_APP_TITLE = 伟旺生产管理系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 生产管理系统
|
VUE_APP_TITLE = 伟旺生产管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 生产管理系统
|
VUE_APP_TITLE = 伟旺生产管理系统
|
||||||
|
|
||||||
NODE_ENV = production
|
NODE_ENV = production
|
||||||
|
|
||||||
|
|
|
@ -18,20 +18,26 @@ export function getOrder(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增生产订单
|
// 新增生产订单
|
||||||
export function addOrder(data) {
|
export function addOrder(data, submit) {
|
||||||
return request({
|
return request({
|
||||||
url: '/bst/order',
|
url: '/bst/order',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
|
params: {
|
||||||
|
submit
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改生产订单
|
// 修改生产订单
|
||||||
export function updateOrder(data) {
|
export function updateOrder(data, submit) {
|
||||||
return request({
|
return request({
|
||||||
url: '/bst/order',
|
url: '/bst/order',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data,
|
||||||
|
params: {
|
||||||
|
submit
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,8 @@ aside {
|
||||||
|
|
||||||
.required-label::before {
|
.required-label::before {
|
||||||
content: "* ";
|
content: "* ";
|
||||||
color: #F56C6C;
|
color: #ff4949;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// mini版本的树选择器
|
// mini版本的树选择器
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!--版本更新内容:添加prop属性,修复多选-->
|
<!--版本更新内容:添加prop属性,修复多选-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible="show" width="80%" top="2vh" @close="close" :append-to-body="true">
|
<el-dialog :title="title" :visible="show" width="600px" top="2vh" @close="close" :append-to-body="true">
|
||||||
<dept-check
|
<dept-check
|
||||||
v-if="show"
|
v-if="show"
|
||||||
ref="check"
|
ref="check"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<span :class="required ? 'required-label' : ''">{{label}}</span>
|
<span :class="required ? 'required-label' : ''">{{label}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template scope="d">
|
<template scope="d">
|
||||||
<form-col table label-width="0" :prop="prop" :rules="rules">
|
<form-col table label-width="0" :prop="colProp(d.$index)" :rules="rules">
|
||||||
<slot :row="d.row"/>
|
<slot :row="d.row"/>
|
||||||
</form-col>
|
</form-col>
|
||||||
</template>
|
</template>
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
<script>
|
<script>
|
||||||
import FormCol from '@/components/FormCol/index.vue'
|
import FormCol from '@/components/FormCol/index.vue'
|
||||||
import HoverShow from '@/components/HoverShow/index.vue'
|
import HoverShow from '@/components/HoverShow/index.vue'
|
||||||
|
import { isEmpty } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TableFormCol",
|
name: "TableFormCol",
|
||||||
|
@ -27,6 +28,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
propPrefix: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
prop: {
|
prop: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
|
@ -43,6 +48,16 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
colProp() {
|
||||||
|
return (index) => {
|
||||||
|
if (isEmpty(this.propPrefix) || isEmpty(this.prop)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return `${this.propPrefix}[${index}].${this.prop}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -84,7 +84,7 @@ export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: 'order',
|
path: 'order',
|
||||||
component: () => import('@/views/bst/order/edit/edit.vue'),
|
component: () => import('@/views/bst/order/edit/edit.vue'),
|
||||||
name: 'OrderEdit',
|
name: 'OrderAdd',
|
||||||
meta: {
|
meta: {
|
||||||
title: '新增订单',
|
title: '新增订单',
|
||||||
noCache: false
|
noCache: false
|
||||||
|
@ -119,7 +119,15 @@ export const constantRoutes = [
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
path: 'order/:id',
|
||||||
|
component: () => import('@/views/bst/order/view/view.vue'),
|
||||||
|
name: 'OrderView',
|
||||||
|
meta: {
|
||||||
|
title: '订单详情',
|
||||||
|
noCache: false
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,115 +4,6 @@ import { getLastDate, getLastDateTimeEnd, getLastDateTimeStart, getLastMonth, ge
|
||||||
export const views = {
|
export const views = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单价状态
|
|
||||||
export const PriceStatus = {
|
|
||||||
WAIT_SUBMIT: "1", // 未提交
|
|
||||||
WAIT_VERIFY: "2", // 待审核
|
|
||||||
PASS: "3", // 已通过
|
|
||||||
REJECT: "4", // 未通过
|
|
||||||
// 允许编辑
|
|
||||||
canEdit(status) {
|
|
||||||
return [this.WAIT_SUBMIT, this.REJECT].includes(status);
|
|
||||||
},
|
|
||||||
// 允许提交
|
|
||||||
canSubmit(status) {
|
|
||||||
return [this.WAIT_SUBMIT].includes(status);
|
|
||||||
},
|
|
||||||
// 允许取消提交
|
|
||||||
canCancel(status) {
|
|
||||||
return [this.WAIT_VERIFY].includes(status);
|
|
||||||
},
|
|
||||||
// 允许审核
|
|
||||||
canVerify(status) {
|
|
||||||
return [this.WAIT_VERIFY].includes(status);
|
|
||||||
},
|
|
||||||
// 允许禁用
|
|
||||||
canDisable(status) {
|
|
||||||
return [this.PASS].includes(status);
|
|
||||||
},
|
|
||||||
// 允许启用
|
|
||||||
canEnable(status) {
|
|
||||||
return [this.PASS].includes(status);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
// 工资模式
|
|
||||||
export const IncomeMode = {
|
|
||||||
SCORE: "1", // 计分
|
|
||||||
COUNT: "2", // 计量
|
|
||||||
}
|
|
||||||
|
|
||||||
// 报表状态
|
|
||||||
export const ReportStatus = {
|
|
||||||
WAIT_SUBMIT: "1", // 未提交
|
|
||||||
WAIT_VERIFY: "2", // 待审核
|
|
||||||
PASS: "3", // 已通过
|
|
||||||
REJECT: "4", // 未通过
|
|
||||||
// 允许编辑
|
|
||||||
canEdit(status) {
|
|
||||||
return [this.WAIT_SUBMIT, this.REJECT].includes(status);
|
|
||||||
},
|
|
||||||
// 允许提交
|
|
||||||
canSubmit(status) {
|
|
||||||
return [this.WAIT_SUBMIT].includes(status);
|
|
||||||
},
|
|
||||||
// 允许取消提交
|
|
||||||
canCancel(status) {
|
|
||||||
return [this.WAIT_VERIFY].includes(status);
|
|
||||||
},
|
|
||||||
// 允许审核
|
|
||||||
canVerify(status) {
|
|
||||||
return [this.WAIT_VERIFY].includes(status);
|
|
||||||
},
|
|
||||||
// 允许删除
|
|
||||||
canDel(status) {
|
|
||||||
return [this.WAIT_SUBMIT, this.REJECT].includes(status);
|
|
||||||
},
|
|
||||||
// 是否已审核过的状态
|
|
||||||
isVerified(status) {
|
|
||||||
return [this.PASS, this.REJECT].includes(status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生产订单ERP业务状态
|
|
||||||
*/
|
|
||||||
export const ProdOrderErpStatus = {
|
|
||||||
PLAN: "1", // 计划
|
|
||||||
PLAN_CONFIRM: "2", // 计划确认
|
|
||||||
ISSUED: "3", // 下达
|
|
||||||
START_WORK: "4", // 开工
|
|
||||||
END_WORK: "5", // 完工
|
|
||||||
CLOSED: "6", // 结案
|
|
||||||
FINISHED: "7", // 结算
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 报表工序类型
|
|
||||||
*/
|
|
||||||
export const ReportPriceType = {
|
|
||||||
PUBLIC: "1", // 公共工序
|
|
||||||
BILL: "2", // 订单工序
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入日志业务类型
|
|
||||||
*/
|
|
||||||
export const LogImportBizType = {
|
|
||||||
PRICE: "1", // 单价
|
|
||||||
PROD_ORDER: "2", // 生产订单
|
|
||||||
}
|
|
||||||
|
|
||||||
// 操作日志业务类型
|
|
||||||
export const OperLogBizType = {
|
|
||||||
UNKNOWN: "0", // 未知
|
|
||||||
PRICE: "1", // 单价
|
|
||||||
REPORT: "2", // 报表
|
|
||||||
PROD_ORDER: "3", // 生产订单
|
|
||||||
MATERIAL: "4", // 物料
|
|
||||||
UNIT: "5", // 单位
|
|
||||||
}
|
|
||||||
|
|
||||||
// 日期选择器快捷选项
|
// 日期选择器快捷选项
|
||||||
export const DatePickerOptions = {
|
export const DatePickerOptions = {
|
||||||
// 默认
|
// 默认
|
||||||
|
|
18
src/utils/enums.js
Normal file
18
src/utils/enums.js
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
export const OrderStatus = {
|
||||||
|
PROPOSED: "1", // 拟定
|
||||||
|
RELEASED: "2", // 已发布
|
||||||
|
FINISHED: "3", // 完工
|
||||||
|
|
||||||
|
// 允许编辑
|
||||||
|
canEdit() {
|
||||||
|
return [this.PROPOSED];
|
||||||
|
},
|
||||||
|
// 允许完工
|
||||||
|
canFinished() {
|
||||||
|
return [this.RELEASED];
|
||||||
|
},
|
||||||
|
// 允许删除
|
||||||
|
canDel() {
|
||||||
|
return [this.PROPOSED];
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,33 +11,48 @@
|
||||||
class="mini-table"
|
class="mini-table"
|
||||||
>
|
>
|
||||||
<el-table-column align="center" label="序号" width="50" type="index"/>
|
<el-table-column align="center" label="序号" width="50" type="index"/>
|
||||||
<table-form-col label="生产车间" prop="deptId">
|
<table-form-col label="生产车间" :prop-prefix="propPrefix" prop="deptId" required :rules="rules.deptId">
|
||||||
<dept-input slot-scope="d" v-model="d.row.deptId"/>
|
<dept-input slot-scope="d" v-model="d.row.deptId"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="数量" prop="num">
|
<table-form-col label="数量" :prop-prefix="propPrefix" prop="num" required :rules="rules.num">
|
||||||
<el-input-number slot-scope="d" v-model="d.row.num" :min="0" controls-position="right" style="width: 100%"/>
|
<el-input-number slot-scope="d" v-model="d.row.num" :min="0" controls-position="right" style="width: 100%"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="最终工序" prop="isEnd" width="100">
|
<table-form-col label="最终工序" :prop-prefix="propPrefix" prop="isEnd" width="100">
|
||||||
<el-checkbox slot-scope="d" v-model="d.row.isEnd" />
|
<el-checkbox slot-scope="d" v-model="d.row.isEnd" />
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="处理方式" prop="handleWay">
|
<table-form-col label="处理方式" :prop-prefix="propPrefix" prop="handleWay">
|
||||||
<el-input slot-scope="d" v-model="d.row.handleWay" placeholder="请输入处理方式"/>
|
<el-input slot-scope="d" v-model="d.row.handleWay" placeholder="请输入处理方式"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="效果" prop="effect">
|
<table-form-col label="效果" :prop-prefix="propPrefix" prop="effect">
|
||||||
<el-input slot-scope="d" v-model="d.row.effect" placeholder="请输入效果"/>
|
<el-input slot-scope="d" v-model="d.row.effect" placeholder="请输入效果"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="颜色" prop="color">
|
<table-form-col label="颜色" :prop-prefix="propPrefix" prop="color">
|
||||||
<el-input slot-scope="d" v-model="d.row.color" placeholder="请输入颜色"/>
|
<el-input slot-scope="d" v-model="d.row.color" placeholder="请输入颜色"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="盖子颜色" prop="coverColor">
|
<table-form-col label="盖子颜色" :prop-prefix="propPrefix" prop="coverColor">
|
||||||
<el-input slot-scope="d" v-model="d.row.coverColor" placeholder="请输入盖子颜色"/>
|
<el-input slot-scope="d" v-model="d.row.coverColor" placeholder="请输入盖子颜色"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
|
<!-- <table-form-col label="排序" :prop-prefix="propPrefix" prop="sort" width="80">-->
|
||||||
|
<!-- <template slot-scope="d">{{d.row.sort}}</template>-->
|
||||||
|
<!-- </table-form-col>-->
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="160">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增工序</el-button>
|
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增工序</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleChangeSort(d.$index, -1)"
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
size="small"
|
||||||
|
>上移</el-button>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleChangeSort(d.$index, 1)"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="small"
|
||||||
|
>下移</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDel(d.$index, d.row)"
|
@click="handleDel(d.$index, d.row)"
|
||||||
|
@ -72,6 +87,14 @@ export default {
|
||||||
value: {
|
value: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => ([])
|
default: () => ([])
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
propPrefix: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -92,9 +115,11 @@ export default {
|
||||||
},
|
},
|
||||||
// 选中并新增
|
// 选中并新增
|
||||||
handleSelectDept(deptList) {
|
handleSelectDept(deptList) {
|
||||||
let list = [];
|
if (this.value == null) {
|
||||||
|
this.$emit('input', []);
|
||||||
|
}
|
||||||
deptList.forEach(dept => {
|
deptList.forEach(dept => {
|
||||||
list.push({
|
this.value.push({
|
||||||
id: null,
|
id: null,
|
||||||
orderProdId: null,
|
orderProdId: null,
|
||||||
deptId: dept.deptId,
|
deptId: dept.deptId,
|
||||||
|
@ -105,16 +130,11 @@ export default {
|
||||||
color: null,
|
color: null,
|
||||||
coverColor: null,
|
coverColor: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
|
sort: this.getNewSort(),
|
||||||
|
});
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
if (this.value == null) {
|
|
||||||
this.$emit('input', list);
|
|
||||||
} else {
|
|
||||||
this.value.push(...list);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.showDeptDialog = false;
|
this.showDeptDialog = false;
|
||||||
|
this.reorder();
|
||||||
},
|
},
|
||||||
// 删除行
|
// 删除行
|
||||||
handleDel(index, row) {
|
handleDel(index, row) {
|
||||||
|
@ -125,7 +145,34 @@ export default {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.value.splice(index, 1)
|
this.value.splice(index, 1)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 重新排序,根据sort字段,从小到大排序
|
||||||
|
reorder() {
|
||||||
|
this.value.sort((a, b) => a.sort - b.sort);
|
||||||
|
},
|
||||||
|
handleChangeSort(index, offset) {
|
||||||
|
if (index + offset < 0) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (index + offset > this.value.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 交换顺序
|
||||||
|
let upItem = this.value[index + offset];
|
||||||
|
let current = this.value[index];
|
||||||
|
let temp = upItem.sort;
|
||||||
|
upItem.sort = current.sort;
|
||||||
|
current.sort = temp;
|
||||||
|
this.reorder();
|
||||||
|
},
|
||||||
|
// 获取最新的排序
|
||||||
|
getNewSort() {
|
||||||
|
let max = 0;
|
||||||
|
this.value.forEach(item => {
|
||||||
|
max = item.sort > max ? item.sort : max;
|
||||||
|
})
|
||||||
|
return max + 1;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
<el-table-column type="expand" width="50" align="left">
|
<el-table-column type="expand" width="50" align="left">
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
<div class="expand-container">
|
<div class="expand-container">
|
||||||
<prod-process-list v-model="d.row.processList"/>
|
<prod-process-list v-model="d.row.processList" :prop-prefix="`prodList[${d.$index}].processList`" :rules="rules.processList"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||||
<table-form-col label="主图" prop="picture" width="200">
|
<table-form-col label="主图" prop-prefix="prodList" prop="picture" width="200">
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
<hover-show>
|
<hover-show>
|
||||||
<template #show>
|
<template #show>
|
||||||
|
@ -29,40 +29,52 @@
|
||||||
</hover-show>
|
</hover-show>
|
||||||
</template>
|
</template>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="名称" prop="name">
|
<table-form-col label="名称" prop-prefix="prodList" prop="name" required :rules="rules.name">
|
||||||
<el-input slot-scope="d" v-model="d.row.name" placeholder="请输入名称"/>
|
<el-input slot-scope="d" v-model="d.row.name" placeholder="请输入名称"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="物料编码" prop="materialNo">
|
<table-form-col label="数量" prop-prefix="prodList" prop="num" required :rules="rules.num">
|
||||||
<el-input slot-scope="d" v-model="d.row.materialNo" placeholder="请输入物料编码"/>
|
|
||||||
</table-form-col>
|
|
||||||
<table-form-col label="规格" prop="spec">
|
|
||||||
<el-input slot-scope="d" v-model="d.row.spec" placeholder="请输入规格"/>
|
|
||||||
</table-form-col>
|
|
||||||
<table-form-col label="数量" prop="num">
|
|
||||||
<el-input-number slot-scope="d" v-model="d.row.num" placeholder="请输入数量" :min="0" controls-position="right" style="width: 100%"/>
|
<el-input-number slot-scope="d" v-model="d.row.num" placeholder="请输入数量" :min="0" controls-position="right" style="width: 100%"/>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="加工类型" prop="workType">
|
<table-form-col label="加工商" prop-prefix="prodList" prop="workType" :rules="rules.workType" required>
|
||||||
<el-select slot-scope="d" v-model="d.row.workType" placeholder="请选择加工类型">
|
<el-select slot-scope="d" v-model="d.row.workType" placeholder="请选择加工商">
|
||||||
<el-option v-for="item in dict.type.order_prod_work_type" :key="item.value" :label="item.label" :value="item.value"/>
|
<el-option v-for="item in dict.type.order_prod_work_type" :key="item.value" :label="item.label" :value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="成品" prop="isEnd" width="80">
|
<table-form-col label="物料编码" prop-prefix="prodList" prop="materialNo">
|
||||||
|
<el-input slot-scope="d" v-model="d.row.materialNo" placeholder="请输入物料编码"/>
|
||||||
|
</table-form-col>
|
||||||
|
<table-form-col label="规格" prop-prefix="prodList" prop="spec">
|
||||||
|
<el-input slot-scope="d" v-model="d.row.spec" placeholder="请输入规格"/>
|
||||||
|
</table-form-col>
|
||||||
|
<table-form-col label="成品" prop-prefix="prodList" prop="isEnd" width="80">
|
||||||
<el-checkbox slot-scope="d" v-model="d.row.isEnd" />
|
<el-checkbox slot-scope="d" v-model="d.row.isEnd" />
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
<table-form-col label="备注" prop="remark" show-overflow-tooltip>
|
<!-- <table-form-col label="排序" prop-prefix="prodList" prop="sort" width="80">-->
|
||||||
|
<!-- <template slot-scope="d">{{d.row.sort}}</template>-->
|
||||||
|
<!-- </table-form-col>-->
|
||||||
|
<table-form-col label="备注" prop-prefix="prodList" prop="remark">
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
<hover-show>
|
|
||||||
<template #show>{{d.row.remark | dv}}</template>
|
|
||||||
<el-input v-model="d.row.remark" placeholder="请输入备注" maxlength="200" show-word-limit type="textarea"/>
|
<el-input v-model="d.row.remark" placeholder="请输入备注" maxlength="200" show-word-limit type="textarea"/>
|
||||||
</hover-show>
|
|
||||||
</template>
|
</template>
|
||||||
</table-form-col>
|
</table-form-col>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="160">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增产品</el-button>
|
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增产品</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="d">
|
<template slot-scope="d">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleChangeSort(d.$index, -1)"
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
size="small"
|
||||||
|
>上移</el-button>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleChangeSort(d.$index, 1)"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="small"
|
||||||
|
>下移</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleDel(d.$index, d.row)"
|
@click="handleDel(d.$index, d.row)"
|
||||||
|
@ -91,6 +103,10 @@ export default {
|
||||||
default: () =>({
|
default: () =>({
|
||||||
prodList: [], // 产品列表
|
prodList: [], // 产品列表
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -103,7 +119,11 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 新增行
|
// 新增行
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.form.prodList.push({
|
this.form.prodList.push(this.getNewRow())
|
||||||
|
this.reorder();
|
||||||
|
},
|
||||||
|
getNewRow() {
|
||||||
|
return {
|
||||||
name:null,
|
name:null,
|
||||||
materialNo:null,
|
materialNo:null,
|
||||||
picture:null,
|
picture:null,
|
||||||
|
@ -112,8 +132,41 @@ export default {
|
||||||
remark:null,
|
remark:null,
|
||||||
isEnd: false,
|
isEnd: false,
|
||||||
workType: "1",
|
workType: "1",
|
||||||
|
sort: this.getNewSort(),
|
||||||
processList: [],
|
processList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 重新排序,根据sort字段,从小到大排序
|
||||||
|
reorder() {
|
||||||
|
if (this.form == null || this.form.prodList == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.prodList.sort((a, b) => a.sort - b.sort);
|
||||||
|
},
|
||||||
|
handleChangeSort(index, offset) {
|
||||||
|
if (index + offset < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (index + offset > this.form.prodList.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 交换顺序
|
||||||
|
let upItem = this.form.prodList[index + offset];
|
||||||
|
let current = this.form.prodList[index];
|
||||||
|
let temp = upItem.sort;
|
||||||
|
upItem.sort = current.sort;
|
||||||
|
current.sort = temp;
|
||||||
|
this.reorder();
|
||||||
|
},
|
||||||
|
// 获取最新的排序
|
||||||
|
getNewSort() {
|
||||||
|
let max = 0;
|
||||||
|
if (this.form != null && this.form.prodList != null) {
|
||||||
|
this.form.prodList.forEach(item => {
|
||||||
|
max = item.sort > max ? item.sort : max;
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
return max + 1;
|
||||||
},
|
},
|
||||||
// 删除行
|
// 删除行
|
||||||
handleDel(index, row) {
|
handleDel(index, row) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<image-upload v-model="form.picture" :limit="1"/>
|
<image-upload v-model="form.picture" :limit="1"/>
|
||||||
</form-col>
|
</form-col>
|
||||||
<form-col :span="span" label="交货日期" prop="deliveryDate">
|
<form-col :span="span" label="交货日期" prop="deliveryDate">
|
||||||
<el-date-picker v-model="form.deliveryDate" type="date" placeholder="选择日期" :clearable="false" style="width: 100%;"/>
|
<el-date-picker v-model="form.deliveryDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :clearable="false" style="width: 100%;"/>
|
||||||
</form-col>
|
</form-col>
|
||||||
<form-col :span="span" label="数量" prop="num">
|
<form-col :span="span" label="数量" prop="num">
|
||||||
<el-input-number v-model="form.num" :min="0" controls-position="right" style="width: 100%;"/>
|
<el-input-number v-model="form.num" :min="0" controls-position="right" style="width: 100%;"/>
|
||||||
|
@ -28,7 +28,9 @@
|
||||||
|
|
||||||
<div class="edit-title">产品信息</div>
|
<div class="edit-title">产品信息</div>
|
||||||
<order-prod-list
|
<order-prod-list
|
||||||
|
ref="orderProdList"
|
||||||
:form="form"
|
:form="form"
|
||||||
|
:rules="rules.prodList"
|
||||||
/>
|
/>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,18 +54,34 @@ export default {
|
||||||
span: 6,
|
span: 6,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
orderNo: [
|
num: [
|
||||||
{ required: true, message: "订单号不能为空", trigger: "blur" }
|
{ required: true, message: "数量不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
createTime: [
|
prodList: {
|
||||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
name: [
|
||||||
|
{ required: true, message: "产品名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
num: [
|
||||||
|
{ required: true, message: "数量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
workType: [
|
||||||
|
{ required: true, message: "加工方式不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
processList: {
|
||||||
|
deptId: [
|
||||||
|
{ required: true, message: "生产车间不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
num: [
|
||||||
|
{ required: true, message: "数量不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
this.form.id = this.$route.params.id;
|
this.form.id = this.$route.params.id;
|
||||||
if (this.form.reportId == null) {
|
if (this.form.id == null) {
|
||||||
this.title = "新增订单";
|
this.title = "新增订单";
|
||||||
this.reset();
|
this.reset();
|
||||||
} else {
|
} else {
|
||||||
|
@ -93,7 +111,9 @@ export default {
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
deleted: null,
|
deleted: null,
|
||||||
prodList: []
|
prodList: [
|
||||||
|
this.$refs.orderProdList.getNewRow()
|
||||||
|
]
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -102,17 +122,21 @@ export default {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
|
this.loading = true;
|
||||||
updateOrder(this.form, submit).then(response => {
|
updateOrder(this.form, submit).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.$router.back();
|
||||||
this.getList();
|
}).finally(() => {
|
||||||
});
|
this.loading = false;
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
|
this.loading = true;
|
||||||
addOrder(this.form, submit).then(response => {
|
addOrder(this.form, submit).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.$router.back();
|
||||||
this.getList();
|
}).finally(() => {
|
||||||
});
|
this.loading = false;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,16 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="订单状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择订单状态" clearable @change="handleQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.order_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="客户" prop="customer">
|
<el-form-item label="客户" prop="customer">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.customer"
|
v-model="queryParams.customer"
|
||||||
|
@ -84,6 +94,12 @@
|
||||||
<template v-if="column.key === 'id'">
|
<template v-if="column.key === 'id'">
|
||||||
{{d.row[column.key]}}
|
{{d.row[column.key]}}
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="column.key === 'status'">
|
||||||
|
<dict-tag :options="dict.type.order_status" :value="d.row[column.key]"/>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="column.key === 'picture'">
|
||||||
|
<image-preview :src="d.row.picture" :width="50" :height="50"/>
|
||||||
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{d.row[column.key]}}
|
{{d.row[column.key]}}
|
||||||
</template>
|
</template>
|
||||||
|
@ -92,12 +108,20 @@
|
||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-has-permi="['bst:order:query']"
|
||||||
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-has-permi="['bst:order:edit']"
|
v-has-permi="['bst:order:edit']"
|
||||||
|
v-show="OrderStatus.canEdit().includes(scope.row.status)"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -105,6 +129,7 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-has-permi="['bst:order:remove']"
|
v-has-permi="['bst:order:remove']"
|
||||||
|
v-show="OrderStatus.canDel().includes(scope.row.status)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -125,6 +150,7 @@
|
||||||
import { delOrder, listOrder } from '@/api/bst/order'
|
import { delOrder, listOrder } from '@/api/bst/order'
|
||||||
import FormCol from '@/components/FormCol/index.vue'
|
import FormCol from '@/components/FormCol/index.vue'
|
||||||
import { $showColumns } from '@/utils/mixins'
|
import { $showColumns } from '@/utils/mixins'
|
||||||
|
import { OrderStatus } from '@/utils/enums'
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
|
@ -135,14 +161,17 @@ const defaultSort = {
|
||||||
export default {
|
export default {
|
||||||
name: "Order",
|
name: "Order",
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns],
|
||||||
|
dicts: ['order_status'],
|
||||||
components: {FormCol},
|
components: {FormCol},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
OrderStatus,
|
||||||
span: 24,
|
span: 24,
|
||||||
// 字段列表
|
// 字段列表
|
||||||
columns: [
|
columns: [
|
||||||
{key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
{key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||||
{key: 'orderNo', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'orderNo', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'status', visible: true, label: '订单状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'picture', visible: true, label: '主图', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'picture', visible: true, label: '主图', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'customer', visible: true, label: '客户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'customer', visible: true, label: '客户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'deliveryDate', visible: true, label: '交货日期', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'deliveryDate', visible: true, label: '交货日期', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
@ -235,6 +264,9 @@ export default {
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.$router.push(`/edit/order/${row.id}`)
|
this.$router.push(`/edit/order/${row.id}`)
|
||||||
},
|
},
|
||||||
|
handleView(row) {
|
||||||
|
this.$router.push(`/view/order/${row.id}`)
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
|
|
11
src/views/bst/order/view/view.vue
Normal file
11
src/views/bst/order/view/view.vue
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "OrderView",
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -9,8 +9,8 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="加工类型" prop="workType">
|
<el-form-item label="加工商" prop="workType">
|
||||||
<el-select v-model="queryParams.workType" placeholder="请选择加工类型" clearable @change="handleQuery">
|
<el-select v-model="queryParams.workType" placeholder="请选择加工商" clearable @change="handleQuery">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.order_prod_work_type"
|
v-for="dict in dict.type.order_prod_work_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
@ -112,6 +112,12 @@
|
||||||
<template v-else-if="column.key === 'workType'">
|
<template v-else-if="column.key === 'workType'">
|
||||||
<dict-tag :options="dict.type.order_prod_work_type" :value="d.row[column.key]"/>
|
<dict-tag :options="dict.type.order_prod_work_type" :value="d.row[column.key]"/>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="column.key === 'picture'">
|
||||||
|
<image-preview :src="d.row.picture" :width="50" :height="50"/>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="column.key === 'isEnd'">
|
||||||
|
<boolean-tag :value="d.row.isEnd"/>
|
||||||
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{d.row[column.key]}}
|
{{d.row[column.key]}}
|
||||||
</template>
|
</template>
|
||||||
|
@ -145,55 +151,6 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改订单产品对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-row>
|
|
||||||
<form-col :span="span" label="订单ID" prop="orderId">
|
|
||||||
<el-input v-model="form.orderId" placeholder="请输入订单ID" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="加工类型" prop="workType">
|
|
||||||
<el-select v-model="form.workType" placeholder="请选择加工类型">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.order_prod_work_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="是否成品" prop="isEnd">
|
|
||||||
<el-input v-model="form.isEnd" placeholder="请输入是否成品" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="物料编码" prop="materialNo">
|
|
||||||
<el-input v-model="form.materialNo" placeholder="请输入物料编码" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="主图" prop="picture">
|
|
||||||
<el-input v-model="form.picture" placeholder="请输入主图" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="规格" prop="spec">
|
|
||||||
<el-input v-model="form.spec" placeholder="请输入规格" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="数量" prop="num">
|
|
||||||
<el-input v-model="form.num" placeholder="请输入数量" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="删除标志" prop="deleted">
|
|
||||||
<el-input v-model="form.deleted" placeholder="请输入删除标志" />
|
|
||||||
</form-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -201,6 +158,7 @@
|
||||||
import { addOrderProd, getOrderProd, listOrderProd, updateOrderProd } from '@/api/bst/orderProd'
|
import { addOrderProd, getOrderProd, listOrderProd, updateOrderProd } from '@/api/bst/orderProd'
|
||||||
import FormCol from '@/components/FormCol/index.vue'
|
import FormCol from '@/components/FormCol/index.vue'
|
||||||
import { $showColumns } from '@/utils/mixins'
|
import { $showColumns } from '@/utils/mixins'
|
||||||
|
import BooleanTag from '@/components/BooleanTag/index.vue'
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
|
@ -212,7 +170,7 @@ export default {
|
||||||
name: "OrderProd",
|
name: "OrderProd",
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns],
|
||||||
dicts: ['order_prod_work_type'],
|
dicts: ['order_prod_work_type'],
|
||||||
components: {FormCol},
|
components: { BooleanTag, FormCol},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
span: 24,
|
span: 24,
|
||||||
|
@ -220,13 +178,13 @@ export default {
|
||||||
columns: [
|
columns: [
|
||||||
{key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
{key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||||
{key: 'orderNo', visible: true, label: '订单', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'orderNo', visible: true, label: '订单', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'workType', visible: true, label: '加工类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
||||||
{key: 'isEnd', visible: true, label: '是否成品', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
||||||
{key: 'materialNo', visible: true, label: '物料编码', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
||||||
{key: 'picture', visible: true, label: '主图', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'picture', visible: true, label: '主图', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'name', visible: true, label: '名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'name', visible: true, label: '名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'spec', visible: true, label: '规格', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
||||||
{key: 'num', visible: true, label: '数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'num', visible: true, label: '数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'workType', visible: true, label: '加工商', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'materialNo', visible: true, label: '物料编码', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'spec', visible: true, label: '规格', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'isEnd', visible: true, label: '是否成品', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
],
|
],
|
||||||
// 排序方式
|
// 排序方式
|
||||||
|
@ -274,7 +232,7 @@ export default {
|
||||||
{ required: true, message: "订单ID不能为空", trigger: "blur" }
|
{ required: true, message: "订单ID不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
workType: [
|
workType: [
|
||||||
{ required: true, message: "加工类型不能为空", trigger: "change" }
|
{ required: true, message: "加工商不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
isEnd: [
|
isEnd: [
|
||||||
{ required: true, message: "是否成品不能为空", trigger: "blur" }
|
{ required: true, message: "是否成品不能为空", trigger: "blur" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container home">
|
<div class="app-container home">
|
||||||
<h3>欢迎使用生产管理系统!</h3>
|
<h3>欢迎使用伟旺生产管理系统!</h3>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<h3 class="title-box">
|
<h3 class="title-box">
|
||||||
<img :src="logo" class="logo"/>
|
<img :src="logo" class="logo"/>
|
||||||
<span class="title">生产管理系统</span>
|
<span class="title">伟旺生产管理系统</span>
|
||||||
</h3>
|
</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||||
<h3 class="title">生产管理系统</h3>
|
<h3 class="title">伟旺生产管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
|
|
|
@ -7,7 +7,7 @@ function resolve(dir) {
|
||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin')
|
const CompressionPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || '生产管理系统' // 网页标题
|
const name = process.env.VUE_APP_TITLE || '伟旺生产管理系统' // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 3800 // 端口
|
const port = process.env.port || process.env.npm_config_port || 3800 // 端口
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user