This commit is contained in:
shijing 2022-05-06 09:06:46 +08:00
parent e40977274d
commit df91dd18f4
3 changed files with 289 additions and 225 deletions

View File

@ -13,6 +13,30 @@
:model="loginForm" :model="loginForm"
:rules="loginRules" :rules="loginRules"
> >
<!--<el-form-item>
<el-input
v-model="loginForm.username"
type="text" name="text"
placeholder="账号"
autocomplete="off">
<i slot="prefix" class="el-input_icon el-icon-user"></i>
</el-input>
</el-form-item>
<el-form-item>
<input type="text"
name="password"
autocomplete="off"
onfocus="passwordType=='password'"
>
<el-input
v-model="loginForm.password"
type="text" name="pwd" id="pwd"
placeholder="密码"
autocomplete="off"
@input="setPassword">
<i slot="prefix" class="el-icon-lock"></i>
</el-input>
</el-form-item>-->
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
ref="username" ref="username"
@ -21,15 +45,24 @@
name="username" name="username"
type="text" type="text"
tabindex="1" tabindex="1"
auto-complete="on" auto-complete="off"
><svg-icon >
<svg-icon
slot="prefix" slot="prefix"
icon-class="userName" icon-class="userName"
class="el-input__icon input-icon" class="el-input__icon input-icon"
/></el-input> />
</el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<input
type="text"
name="password"
autocomplete="off"
onfocus="passwordType=='password'"
style="display: none;height: 0;"
>
<el-input <el-input
:key="passwordType" :key="passwordType"
ref="password" ref="password"
@ -38,18 +71,18 @@
placeholder="密码" placeholder="密码"
name="password" name="password"
tabindex="2" tabindex="2"
auto-complete="on" auto-complete="off"
id="passwordInput" id="passwordInput"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
><svg-icon >
<svg-icon
slot="prefix" slot="prefix"
icon-class="password" icon-class="password"
class="el-input__icon input-icon" class="el-input__icon input-icon"
/></el-input>
<span class="show-pwd" @click="showPwd">
<svg-icon
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
/> />
</el-input>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/>
</span> </span>
</el-form-item> </el-form-item>
<el-button <el-button
@ -57,8 +90,9 @@
type="primary" type="primary"
style="width: 100%; margin-bottom: 30px" style="width: 100%; margin-bottom: 30px"
@click.native.prevent="handleLogin" @click.native.prevent="handleLogin"
>登录</el-button
> >
登录
</el-button>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -75,6 +109,7 @@
<script> <script>
import faceLogin from '@/components/faceLogin/tracking.vue' import faceLogin from '@/components/faceLogin/tracking.vue'
export default { export default {
name: "Login", name: "Login",
inject: ['reload'], inject: ['reload'],
@ -136,6 +171,10 @@
immediate: true, immediate: true,
}, },
}, },
mounted() {
this.loginForm.username = null;
this.loginForm.password = null;
},
methods: { methods: {
toBigScreen() { toBigScreen() {
this.$router.push('/index') this.$router.push('/index')
@ -159,7 +198,8 @@
.dispatch("user/login", this.loginForm) .dispatch("user/login", this.loginForm)
.then(() => { .then(() => {
this.$store.dispatch("user/getCount", {}); this.$store.dispatch("user/getCount", {});
this.$router.push({ path: this.redirect || "/" }, () => {}); this.$router.push({path: this.redirect || "/"}, () => {
});
this.loading = false; this.loading = false;
localStorage.setItem("rem_username", this.loginForm.username); localStorage.setItem("rem_username", this.loginForm.username);
localStorage.setItem("rem_password", this.loginForm.password); localStorage.setItem("rem_password", this.loginForm.password);
@ -208,11 +248,13 @@
background-image: url("../../assets/bg-login.png"); background-image: url("../../assets/bg-login.png");
background-size: cover; background-size: cover;
} }
.title { .title {
margin: 30px auto 30px auto; margin: 30px auto 30px auto;
text-align: center; text-align: center;
color: #0174d7; color: #0174d7;
} }
.logo { .logo {
width: 350px; width: 350px;
height: 140px; height: 140px;
@ -229,46 +271,56 @@
.el-input { .el-input {
height: 45px; height: 45px;
input { input {
height: 45px; height: 45px;
} }
} }
.input-icon { .input-icon {
height: 39px; height: 39px;
width: 14px; width: 14px;
margin-left: 2px; margin-left: 2px;
} }
} }
.faceLoginBtnWrap { .faceLoginBtnWrap {
width: 250px; width: 250px;
border-right: 1px dashed #409EFF; border-right: 1px dashed #409EFF;
text-align: center; text-align: center;
} }
.faceLoginBtn { .faceLoginBtn {
width: 150px; width: 150px;
margin-top: 90px; margin-top: 90px;
} }
#passwordInput { #passwordInput {
padding-right: 35px; padding-right: 35px;
} }
.show-pwd { .show-pwd {
height: 39px; height: 39px;
margin-right: 2px; margin-right: 2px;
} }
.login-tip { .login-tip {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
color: #bfbfbf; color: #bfbfbf;
} }
.login-code { .login-code {
width: 33%; width: 33%;
height: 38px; height: 38px;
float: right; float: right;
img { img {
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
} }
.show-pwd { .show-pwd {
position: absolute; position: absolute;
right: 10px; right: 10px;
@ -277,9 +329,11 @@
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
} }
.login-code-img { .login-code-img {
height: 38px; height: 38px;
} }
.testTracking { .testTracking {
width: 100%; width: 100%;
height: 500px; height: 500px;

View File

@ -24,15 +24,16 @@
{{ materialdetail.count }} {{ materialdetail.count }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="文件"> <el-descriptions-item label="文件">
<el-link v-if="materialdetail.file_" :href="materialdetail.file_.path">{{materialdetail.file_.name}}</el-link> <el-link v-if="materialdetail.file_" :href="materialdetail.file_.path">{{materialdetail.file_.name}}
</el-link>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-tabs v-model="activeName" type="card"> <el-tabs v-model="activeName" type="card">
<el-tab-pane <el-tab-pane
v-if="this.type == 3 || this.type == 4"
label="供应商" label="供应商"
name="5" name="5"
v-if="this.type == 3 || this.type == 4"
> >
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="批次" name="3"> <el-tab-pane label="批次" name="3">
@ -68,7 +69,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="关联的订单" name="1"> <el-tab-pane label="关联的订单" name="1">
<el-table <el-table
:data="orderlist" :data="orderlist"
@ -86,22 +86,26 @@
<el-table-column label="客户" show-overflow-tooltip> <el-table-column label="客户" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.customer_.name scope.row.customer_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="所属合同" show-overflow-tooltip> <el-table-column label="所属合同" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.contract_.name scope.row.contract_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品名称" show-overflow-tooltip> <el-table-column label="产品名称" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.product_.name scope.row.product_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品型号" show-overflow-tooltip> <el-table-column label="产品型号" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.product_.specification scope.row.product_.specification
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品数量"> <el-table-column label="产品数量">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ scope.row.count }}</template>
@ -109,12 +113,14 @@
<el-table-column label="交货日期"> <el-table-column label="交货日期">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.delivery_date scope.row.delivery_date
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间"> <el-table-column label="创建时间">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.create_time scope.row.create_time
}}</template> }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -135,12 +141,14 @@
<el-table-column label="订单编号"> <el-table-column label="订单编号">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.order_.number scope.row.order_.number
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="合同编号"> <el-table-column label="合同编号">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.order_.contract_.number scope.row.order_.contract_.number
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="生产数量"> <el-table-column label="生产数量">
@ -155,7 +163,8 @@
<el-table-column label="交付截止时间"> <el-table-column label="交付截止时间">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.order_.delivery_date scope.row.order_.delivery_date
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="是否生成子计划"> <el-table-column label="是否生成子计划">
@ -167,7 +176,8 @@
<el-table-column label="创建时间"> <el-table-column label="创建时间">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.create_time scope.row.create_time
}}</template> }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -196,16 +206,17 @@
<el-table-column label="状态"> <el-table-column label="状态">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
actstate_[scope.row.act_state] actstate_[scope.row.act_state]
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="仓库"> <el-table-column label="仓库">
<template slot-scope="scope" v-if="scope.row.warehouse_">{{ <template slot-scope="scope" v-if="scope.row.warehouse_">{{
scope.row.warehouse_.name scope.row.warehouse_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="装箱单" name="5" v-if="this.type == 1"> <el-tab-pane label="装箱单" name="5" v-if="this.type == 1">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"> <el-button type="primary" icon="el-icon-plus" @click="handleCreate">
新增装箱单 新增装箱单
@ -219,19 +230,14 @@
height="460" height="460"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="名称"> <el-table-column label="名称">
<template slot-scope="scope">{{ scope.row.name }}</template> <template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="单位"> <el-table-column label="单位">
<template slot-scope="scope">{{ scope.row.unit }}</template> <template slot-scope="scope">{{ scope.row.unit }}</template>
</el-table-column> </el-table-column>
<el-table-column label="数量"> <el-table-column label="数量">
<template slot-scope="scope" >{{ <template slot-scope="scope">{{scope.row.count}}</template>
scope.row.count
}}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
@ -239,19 +245,17 @@
width="220px" width="220px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
type="primary" type="primary"
@click="handleEdit(scope)" @click="handleEdit(scope)"
>编辑 >
编辑
</el-link> </el-link>
<el-link <el-link
type="danger" type="danger"
@click="handleDelete(scope)" @click="handleDelete(scope)"
>删除 >
删除
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -275,9 +279,10 @@
<el-option <el-option
v-for="item in materialoptions" v-for="item in materialoptions"
:key="item.id" :key="item.id"
:value="item.id"
:label="item.name" :label="item.name"
> :value="item.id">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specification }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -309,9 +314,12 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false" <el-button
>取消</el-button type="danger"
@click="dialogVisible = false"
> >
取消
</el-button>
<el-button type="primary" @click="confirm('Form')">确认</el-button> <el-button type="primary" @click="confirm('Form')">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -328,7 +336,14 @@ import { upUrl, upHeaders } from "@/api/file";
import {getProductionplanList} from "@/api/pm"; import {getProductionplanList} from "@/api/pm";
import {getmaterialbatchList} from "@/api/inm"; import {getmaterialbatchList} from "@/api/inm";
import {getOrderList} from "@/api/sam"; import {getOrderList} from "@/api/sam";
import { getMaterial,getpackitemList,createpackitem,updatepackitem,deletepackitem,getMaterialList } from "@/api/mtm"; import {
getMaterial,
getpackitemList,
createpackitem,
updatepackitem,
deletepackitem,
getMaterialList
} from "@/api/mtm";
import {getwproductList} from "@/api/wpm"; import {getwproductList} from "@/api/wpm";
import {upFile} from "@/api/file"; import {upFile} from "@/api/file";
@ -336,6 +351,7 @@ import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
const defaultpackitem = { const defaultpackitem = {
name: "", name: "",
unit: "", unit: "",
@ -380,7 +396,7 @@ export default {
created() { created() {
this.material = this.$route.params.id; this.material = this.$route.params.id;
this.type = this.$route.params.type; this.type = this.$route.params.type;
this.getMaterialist() this.getMaterialist();
this.getMaterial(); this.getMaterial();
this.getpickList(); this.getpickList();
this.getOrderList(); this.getOrderList();
@ -390,13 +406,11 @@ export default {
}, },
methods: { methods: {
//新增装箱单 //新增装箱单
getMaterialist() getMaterialist() {
{
getMaterialList({pageoff: true, type: 3}).then((response) => { getMaterialList({pageoff: true, type: 3}).then((response) => {
if (response.data) { if (response.data) {
this.materialoptions = response.data; this.materialoptions = response.data;
} }
}); });
}, },
@ -406,15 +420,10 @@ selectmaterial(selval){
this.packitem.name = response.data.name; this.packitem.name = response.data.name;
this.packitem.unit = response.data.unit; this.packitem.unit = response.data.unit;
this.packitem.specification = response.data.specification; this.packitem.specification = response.data.specification;
} }
}); });
}, },
handleCreate() { handleCreate() {
this.packitem = Object.assign({}, defaultpackitem); this.packitem = Object.assign({}, defaultpackitem);
this.dialogType = "new"; this.dialogType = "new";
@ -431,6 +440,7 @@ handleCreate() {
this.$refs["Form"].clearValidate(); this.$refs["Form"].clearValidate();
}); });
}, },
handleDelete(scope) { handleDelete(scope) {
this.$confirm("确认删除?", "警告", { this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -446,6 +456,7 @@ handleCreate() {
console.error(err); console.error(err);
}); });
}, },
async confirm(form) { async confirm(form) {
this.$refs[form].validate((valid) => { this.$refs[form].validate((valid) => {
if (valid) { if (valid) {
@ -474,8 +485,7 @@ handleCreate() {
}); });
}, },
getpickList() getpickList() {
{
getpackitemList({product: this.material, page: 0}).then((response) => { getpackitemList({product: this.material, page: 0}).then((response) => {
if (response.data) { if (response.data) {
this.pickList = response.data; //zhuangxiang信息 this.pickList = response.data; //zhuangxiang信息
@ -486,8 +496,7 @@ getpickList()
getMaterial() { getMaterial() {
getMaterial(this.material).then((response) => { getMaterial(this.material).then((response) => {
if (response.data) { if (response.data) {
debugger; // debugger;
this.materialdetail = response.data; //物料基本信息 this.materialdetail = response.data; //物料基本信息
} }
}); });
@ -499,6 +508,7 @@ getpickList()
} }
}); });
}, },
getplanList() { getplanList() {
getProductionplanList({material: this.material, page: 0}).then( getProductionplanList({material: this.material, page: 0}).then(
(response) => { (response) => {

View File

@ -449,9 +449,9 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="字段父级"> <!--<el-form-item label="字段父级">
<treeselect v-model="field.parent" :multiple="false" :options="treeDate" placeholder="字段父级"/> <treeselect v-model="field.parent" :multiple="false" :options="treeDate" placeholder="字段父级"/>
</el-form-item> </el-form-item>-->
<el-form-item label="字段说明"> <el-form-item label="字段说明">
<el-input v-model="field.help_text" placeholder="字段名称"/> <el-input v-model="field.help_text" placeholder="字段名称"/>
</el-form-item> </el-form-item>