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

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', Access_type: 'Access type',
//报废 //报废
Scrap_ScrapNo: 'Scrap No', Scrap_ScrapNo: 'Scrap',
Scrap_Tip: 'Please input scrap No', Scrap_Tip: 'Please input scrap No',
Scrap_ScrapDetails: 'Scrap detail', Scrap_ScrapDetails: 'Scrap detail',
operatingTime: 'operatingTime', operatingTime: 'operatingTime',

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

@ -38,6 +38,10 @@
<u-form-item :label="$t('message.product_costCenter')"> <u-form-item :label="$t('message.product_costCenter')">
<u-input v-model="Some.costCenter" :disabled="true" :placeholder="$t('message.po_PleaseInput')" /> <u-input v-model="Some.costCenter" :disabled="true" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item> </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-form-item :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.barcode')" v-model="form.barcode" @search="scanning" :show-action="false"></u-search> <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', icon: 'none',
title: this.$t('message.product_Tip8') as string, title: this.$t('message.product_Tip8') as string,
}); });
this.Some.actualQty += 1;
} }
} }
// //

@ -46,6 +46,10 @@
<u-form-item :label="$t('message.DocumentNumber')"> <u-form-item :label="$t('message.DocumentNumber')">
<u-input v-model="Some.fileNo" placeholder="" /> <u-input v-model="Some.fileNo" placeholder="" />
</u-form-item> </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-form-item :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.barcode')" v-model="form.barcode" @search="scanning" :show-action="false"></u-search> <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', icon: 'none',
title: this.$t('message.product_Tip8') as string, title: this.$t('message.product_Tip8') as string,
}); });
this.Some.actualQty += 1;
} }
} }
value = ''; value = '';

@ -17,6 +17,10 @@
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode"> <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-search :placeholder="$t('message.po_PleaseInput')" v-model="form.productCode" @search="query" :show-action="false"></u-search>
</u-form-item> </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-form-item :label="$t('message.product_FGCode')">
<u-input :disabled="true" v-model="model.orderInInfo.productCode" placeholder="" /> <u-input :disabled="true" v-model="model.orderInInfo.productCode" placeholder="" />

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

@ -28,7 +28,7 @@
</u-form-item> </u-form-item>
<!-- 数量 --> <!-- 数量 -->
<u-form-item :label="$t('message.Summary_Number')"> <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>
<!-- 原库位 --> <!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')"> <u-form-item :label="$t('message.Warehouse_OriginalLocation')">

@ -28,7 +28,7 @@
</u-form-item> </u-form-item>
<!-- 数量 --> <!-- 数量 -->
<u-form-item :label="$t('message.Summary_Number')"> <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>
<!-- 原库位 --> <!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')"> <u-form-item :label="$t('message.Warehouse_OriginalLocation')">

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

Loading…
Cancel
Save