成品报废 领用 增加 已扫数量展示 && 原材料 报废 领用 可以修改数量 && 其他优化

master
hou 4 years ago
parent a6f447835a
commit da81d15c42

@ -0,0 +1,16 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

@ -290,7 +290,7 @@ export default {
Access_type: 'Access type',
//报废
Scrap_ScrapNo: 'Scrap No',
Scrap_ScrapNo: 'Scrap',
Scrap_Tip: 'Please input scrap No',
Scrap_ScrapDetails: 'Scrap detail',
operatingTime: 'operatingTime',

@ -1,38 +1,17 @@
<template>
<view
class="page-login"
:style="{ backgroundImage: `url(${image.login.bg3})` }"
>
<view
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="page-login" :style="{ backgroundImage: `url(${image.login.bg3})` }">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left"></view>
<view class="title"></view>
<view class="right">
<u-icon
class="setting"
@click="uni.navigateTo({ url: page.login.server })"
size="30"
name="/static/icons/icon-47.png"
></u-icon>
<u-icon class="setting" @click="uni.navigateTo({ url: page.login.server })" size="30" name="/static/icons/icon-47.png"></u-icon>
</view>
</view>
<view class="logo">
<u-image
width="288rpx"
height="85rpx"
:src="image.global.logo1"
></u-image>
<u-image width="288rpx" height="85rpx" :src="image.global.logo1"></u-image>
<span>V1.6</span>
</view>
<u-form
class="form"
:model="form"
ref="form"
:border-bottom="false"
:error-type="['toast']"
>
<u-form class="form" :model="form" ref="form" :border-bottom="false" :error-type="['toast']">
<u-form-item
class="form-item"
prop="username"
@ -76,19 +55,9 @@
/></u-form-item>
</u-form>
<view class="i18n" @click="i18nOptionsShow = true">
<view class="dropdown-text">{{
$i18n.locale === "en" ? "English" : "简体中文"
}}</view>
<u-icon
:class="i18nOptionsShow ? 'dropdown-icon-active' : 'dropdown-icon'"
size="16"
name="/static/icons/icon-50.png"
></u-icon>
<u-action-sheet
:list="i18nList"
v-model="i18nOptionsShow"
@click="onLanguageSelect"
></u-action-sheet>
<view class="dropdown-text">{{ $i18n.locale === 'en' ? 'English' : '简体中文' }}</view>
<u-icon :class="i18nOptionsShow ? 'dropdown-icon-active' : 'dropdown-icon'" size="16" name="/static/icons/icon-50.png"></u-icon>
<u-action-sheet :list="i18nList" v-model="i18nOptionsShow" @click="onLanguageSelect"></u-action-sheet>
</view>
<u-button
shape="circle"
@ -101,21 +70,21 @@
hover-class="button-hover"
type="primary"
@click="login"
>{{ $t("message.Login") }}</u-button
>{{ $t('message.Login') }}</u-button
>
<alerts />
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { server } from "@/pages/login/server/model";
import Alerts from "@/components/alert/alerts.vue";
import { page } from "@/utils/page";
import { session } from "@/store/modules/session";
import { BasePage } from "@/components/base/page";
import { VForm } from "vue/types/form";
import { Lang } from "@/i18n";
import { Component, Ref } from 'vue-property-decorator';
import { server } from '@/pages/login/server/model';
import Alerts from '@/components/alert/alerts.vue';
import { page } from '@/utils/page';
import { session } from '@/store/modules/session';
import { BasePage } from '@/components/base/page';
import { VForm } from 'vue/types/form';
import { Lang } from '@/i18n';
// import { any } from 'lodash/fp';
@Component({
@ -131,57 +100,53 @@ export default class LoginPage extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref('form') readonly $form!: VForm;
get serverAddress(): string | null {
return server.serverAddress;
}
form = {
username: "",
password: "",
username: '',
password: '',
};
rules = {
username: [
{ required: true, message: this.$t("message.PleaseInputUserName") },
],
password: [
{ required: true, message: this.$t("message.PleaseInputPassword") },
],
username: [{ required: true, message: this.$t('message.PleaseInputUserName') }],
password: [{ required: true, message: this.$t('message.PleaseInputPassword') }],
};
i18nOptionsShow = false;
i18nList = [
{
text: "简体中文",
color: "black",
text: '简体中文',
color: 'black',
},
{
text: "English",
color: "black",
text: 'English',
color: 'black',
},
];
onLanguageSelect(index: number) {
const languages = ["cn", "en"];
const languages = ['cn', 'en'];
this.$i18n.locale = languages[index];
}
onReady(): void {
this.$form.setRules(this.rules);
console.log("image", this.image);
console.log('image', this.image);
}
Version: string = "1.0.0";
Version: string = '1.0.0';
async update() {
await session.QueryVersion();
if (this.Version != session.Version) {
await uni.downloadFile({
url: "http://106.13.174.133:5210/HaierWMS.apk",
url: 'http://106.13.174.133:5210/HaierWMS.apk',
success: (res) => {
console.log("res.statusCode", res.statusCode);
console.log("res.tempFilePath", res.tempFilePath);
console.log('res.statusCode', res.statusCode);
console.log('res.tempFilePath', res.tempFilePath);
},
});
}
@ -192,8 +157,8 @@ export default class LoginPage extends BasePage {
if (valid) {
if (!server.isServerAddressSet) {
await uni.showToast({
icon: "none",
title: this.$t("message.Tip") as string,
icon: 'none',
title: this.$t('message.Tip') as string,
});
setTimeout(() => {
uni.navigateTo({ url: page.login.server });
@ -205,15 +170,7 @@ export default class LoginPage extends BasePage {
password,
lang: this.$i18n.locale as Lang,
});
const {
code,
factoryCode,
list,
loginName,
msg,
userId,
userName,
} = loginResult;
const { code, factoryCode, list, loginName, msg, userId, userName } = loginResult;
session.setUser({
code,
factoryCode,
@ -225,8 +182,8 @@ export default class LoginPage extends BasePage {
lang: this.$i18n.locale as Lang,
});
uni.showToast({
icon: "success",
title: this.$t("message.LoginSuccessful") as string,
icon: 'success',
title: this.$t('message.LoginSuccessful') as string,
});
uni.navigateTo({
url: page.login.area,

@ -38,6 +38,10 @@
<u-form-item :label="$t('message.product_costCenter')">
<u-input v-model="Some.costCenter" :disabled="true" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 已扫 -->
<u-form-item :label="$t('message.product_Swept')">
<u-input :disabled="true" v-model="Some.actualQty" placeholder="" />
</u-form-item>
<!-- 条码 -->
<u-form-item :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.barcode')" v-model="form.barcode" @search="scanning" :show-action="false"></u-search>
@ -162,6 +166,7 @@ export default class ProductCheckReceipt extends BasePage {
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.Some.actualQty += 1;
}
}
//

@ -46,6 +46,10 @@
<u-form-item :label="$t('message.DocumentNumber')">
<u-input v-model="Some.fileNo" placeholder="" />
</u-form-item>
<!-- 已扫 -->
<u-form-item :label="$t('message.product_Swept')">
<u-input :disabled="true" v-model="Some.actualQty" placeholder="" />
</u-form-item>
<!-- 条码 -->
<u-form-item :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.barcode')" v-model="form.barcode" @search="scanning" :show-action="false"></u-search>
@ -138,6 +142,7 @@ export default class productCheckReceipt extends BasePage {
icon: 'none',
title: this.$t('message.product_Tip8') as string,
});
this.Some.actualQty += 1;
}
}
value = '';

@ -17,6 +17,10 @@
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="form.productCode" @search="query" :show-action="false"></u-search>
</u-form-item>
<!-- 已扫 -->
<!-- <u-form-item :label="$t('message.product_Swept')">
<u-input :disabled="true" v-model="model.orderInInfo.actualQty" placeholder="" />
</u-form-item> -->
<!-- 成品编码 -->
<u-form-item :label="$t('message.product_FGCode')">
<u-input :disabled="true" v-model="model.orderInInfo.productCode" placeholder="" />

@ -14,6 +14,7 @@ class OrderInInfo {
productCode?: string;
locCode?: string;
barcode?: string;
// actualQty?: string;
}
@Module({

@ -28,7 +28,7 @@
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.Summary_Number')">
<u-input :disabled="true" v-model="Some.qty" placeholder="" />
<u-input v-model="Some.qty" placeholder="" />
</u-form-item>
<!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')">

@ -28,7 +28,7 @@
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.Summary_Number')">
<u-input :disabled="true" v-model="Some.qty" placeholder="" />
<u-input v-model="Some.qty" placeholder="" />
</u-form-item>
<!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')">

@ -1,19 +1,12 @@
import {
Action,
getModule,
Module,
Mutation,
VuexModule,
MutationAction,
} from "vuex-module-decorators";
import { Area } from "@/pages/login/area/model";
import { Lang } from "@/i18n";
import request from "@/utils/request";
import { url } from "@/utils/url";
import { stringify } from "query-string";
import store from "@/store";
import { page } from "@/utils/page";
import { result } from "lodash";
import { Action, getModule, Module, Mutation, VuexModule, MutationAction } from 'vuex-module-decorators';
import { Area } from '@/pages/login/area/model';
import { Lang } from '@/i18n';
import request from '@/utils/request';
import { url } from '@/utils/url';
import { stringify } from 'query-string';
import store from '@/store';
import { page } from '@/utils/page';
import { result } from 'lodash';
export interface User {
code?: string;
@ -31,14 +24,14 @@ export interface User {
dynamic: true,
store,
namespaced: true,
name: "session",
name: 'session',
})
class SessionService extends VuexModule {
/**
*
*/
user: User | null = null;
Version: string = "";
Version: string = '';
/**
*
@ -125,7 +118,7 @@ class SessionService extends VuexModule {
// 用户 getter
get getUser(): User {
if (this.user === null) {
throw new Error("当前无登录用户");
throw new Error('当前无登录用户');
} else {
return this.user;
}
@ -133,22 +126,14 @@ class SessionService extends VuexModule {
// 登录
@Action({ rawError: true })
async login({
username,
password,
lang,
}: {
username: string;
password: string;
lang: Lang;
}): Promise<User> {
async login({ username, password, lang }: { username: string; password: string; lang: Lang }): Promise<User> {
return request.post(
url.wmspda.system.login,
stringify({
userName: username,
passWord: password,
lang: lang == "en" ? "en_US" : "zh_CN",
})
lang: lang == 'en' ? 'en_US' : 'zh_CN',
}),
);
}
@ -175,7 +160,7 @@ class SessionService extends VuexModule {
//查询版本号
@MutationAction
async QueryVersion() {
let res: any = await request.get("http://106.13.174.133:5210/setup.json");
let res: any = await request.get('http://seamom.haier.net/sgNginxDownload/Debug/setup.json');
let Version = res.version;
return { Version };
}

Loading…
Cancel
Save