LAPTOP-R6EHHS26\86155 2 years ago
commit 066581b489

@ -20,6 +20,7 @@ export interface Factory {
factoryname: string;
value: string;
label: string;
poolName: string;
}
@Module({ dynamic: true, store, namespaced: true, name: 'area' })

@ -82,11 +82,11 @@ export default class ChangePalletNew extends BasePage {
zaiciFocus = false;
switchListText = [
{
title: '',
title: '人工',
value: 0,
},
{
title: '',
title: 'AGV',
value: 1,
},
];
@ -131,6 +131,18 @@ export default class ChangePalletNew extends BasePage {
this.customToast('请输入nficl');
return;
}
if (Object.keys(this.orderNoItemList).length === 0) {
this.customToast('请先查询出nficl数据');
return;
}
if (this.productCodelocList.value == '' || this.productCodelocList.value == undefined) {
this.customToast('请选择缓存区');
return;
}
if (this.productCodeList.value == '' || this.productCodeList.value == undefined) {
this.customToast('请选择库位');
return;
}
var currentDate = new Date();
//
@ -156,7 +168,7 @@ export default class ChangePalletNew extends BasePage {
//productionState: this.productCodeList.value,
};
await this.model.palletInforUpdate(params);
if (model.SubmitCode == 10) {
if (model.SubmitCode == 200) {
this.uni.showToast({ title: '成功' });
this.Clear();
}

@ -7,7 +7,7 @@ import { session } from '@/store/modules/session';
namespaced: true,
dynamic: true,
store,
name: 'page.mes.PalletChange',
name: 'page.mes.PalletChangeNew',
})
export class ChangePalletNew extends VuexModule {
orderNoItemList: any = [];

@ -29,13 +29,13 @@
<choose-one @switchfunction="switchChangeFun" :switchType="'text'" :defaultColor="'#4A72F9'" :highColor="'#FFFFFF'" :defaultValue="locationStatus" :switchList="switchListText"></choose-one>
</u-form-item> -->
<div v-show="isshow">
<div v-if="oldstationNos.length">
<!-- <div v-if="oldstationNos.length">
<u-form-item label="设备:">
<jPicker sureColor="#ff0000" :moren="moren1" @bindpicker="selectProductCode" showKey="label" valKey="value" :val="productCodeList.value" :options="oldstationNos" />
</u-form-item>
</div>
</div> -->
<div v-else>
<div>
<u-form-item label="设备类型:">
<jPicker sureColor="#ff0000" :moren="moren2" @bindpicker="selectProductCodeType" showKey="label" valKey="value" :val="productCodeTypeList.value" :options="DictTypeList" />
</u-form-item>
@ -119,21 +119,25 @@ export default class PalletChange extends BasePage {
this.isshow = true;
});
await this.model.requestDestinationStation(this.orderNo);
const stationNos = model.orderNoItemList.stationNos;
for (let i = 0; i < stationNos.length; i++) {
for (let j = 0; j < this.DictList.length; j++) {
if (stationNos[i].stationNo === this.DictList[j].equipmentCode) {
stationNos[i].equipmentName = this.DictList[j].equipmentName;
break;
}
}
}
console.log('111', stationNos);
this.oldstationNos = stationNos.map((item) => ({
label: item.equipmentName,
value: item.stationNo,
...item,
}));
// const stationNos = model.orderNoItemList.stationNos;
// for (let i = 0; i < stationNos.length; i++) {
// for (let j = 0; j < this.DictList.length; j++) {
// if (stationNos[i].stationNo === this.DictList[j].equipmentCode) {
// stationNos[i].equipmentName = this.DictList[j].equipmentName;
// break;
// }
// }
// }
// this.oldstationNos = stationNos.map((item) => ({
// label: item.equipmentName,
// value: item.stationNo,
// ...item,
// }));
// console.log('111', stationNos);
// if (this.oldstationNos.some((item) => !item.label || item.label == undefined)) {
// this.oldstationNo = [];
// }
// console.log('fffff',this.oldstationNos)
}
generateGUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {

@ -262,7 +262,11 @@ export default class productCheckReceipt extends BasePage {
this.customToast('该rfid不可用不可质检');
return;
}
if (this.productCodeList.value == '') {
if (this.productLocList.value == '' || this.productLocList.value == undefined) {
this.customToast('请选择缓存区');
return;
}
if (this.productCodeList.value == '' || this.productCodeList.value == undefined) {
this.customToast('请选择是否合格');
return;
}

@ -76,6 +76,14 @@ export default class RawHome extends BasePage {
onReady() {
if (session.FactoryCode != undefined) {
this.factoryList.value = session.FactoryCode;
} else {
this.factoryList.value = this.areas[0].factory;
const factory: string = this.areas[0].factory;
const poolName: string = this.areas[0].poolName;
session.setFactory({
factoryCode: factory,
poolName: poolName,
});
}
this.newmenuList = this.menuList.filter((item) => item.perms == 'wms' || item.perms == 'mes' || item.perms == 'equipment');
console.log('1234', this.menuList);

@ -34,7 +34,7 @@
</view>
</view>
<view class="astyle">
<view> 检查更</view>
<view @click="checkupdate"> </view>
<!-- <u-button
@click.native="
uni.navigateTo({
@ -64,9 +64,75 @@ export default class RawHome extends BasePage {
model = model;
src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg';
today = dayjs().format('YYYY-MM-DD dddd');
version: '0.01';
checkversion: any = {};
onLoad() {
// this.model.getMenuList();
}
compareVersion(version1: any, version2: any) {
//version1 1 &&& version2 -1
const newVersion1 = `${version1}`.split('.').length < 3 ? `${version1}`.concat('.0') : `${version1}`;
const newVersion2 = `${version2}`.split('.').length < 3 ? `${version2}`.concat('.0') : `${version2}`;
//,
function toNum(a) {
const c = a.toString().split('.');
const num_place = ['', '0', '00', '000', '0000'],
r = num_place.reverse();
for (let i = 0; i < c.length; i++) {
const len = c[i].length;
c[i] = r[len] + c[i];
}
return c.join('');
}
//
function checkPlugin(a: any, b: any) {
const numA = toNum(a);
const numB = toNum(b);
return numA > numB ? 1 : numA < numB ? -1 : 0;
}
return checkPlugin(newVersion1, newVersion2);
}
async checkupdate() {
try {
this.checkversion = await model.checkupdate();
let versionNumber = this.compareVersion(this.version, this.checkversion.Version);
versionNumber = 1;
if (versionNumber == -1) {
//
uni.showModal({
content: '新版本为:' + this.checkversion.Version + ',' + '是否更新?',
success: (res) => {
if (res.confirm) {
//
let downloadApkUrl = this.checkversion.url;
uni.showLoading({
title: '下载中',
});
////////////////uni,
uni.downloadFile({
url: downloadApkUrl,
success: (downloadResult) => {
uni.hideLoading();
if (downloadResult.statusCode == 200) {
//
plus.runtime.install(downloadResult.tempFilePath as any, { force: true }, function () {
//uni.showToast('');
plus.runtime.restart();
});
}
},
});
} else if (res.cancel) {
console.log();
}
},
});
return;
}
} catch (e) {
console.log('error', e);
}
}
}
</script>
@ -167,7 +233,7 @@ export default class RawHome extends BasePage {
padding: 32rpx;
margin-top: 4rpx;
text-align: center;
border: 1rpx solid #F2F2F2;
border: 1rpx solid #f2f2f2;
border-radius: 8rpx;
}
}

@ -1,6 +1,6 @@
import { getModule, Module, VuexModule } from 'vuex-module-decorators';
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
//import http from '@/utils/request';
import http from '@/utils/request';
//import { url } from '@/utils/url';
//import { session } from '@/store/modules/session';
//import { stringify } from 'query-string';
@ -33,6 +33,12 @@ export class ReceiptModule extends VuexModule {
// const menuList = result.data;
// return { menuList };
// }
@MutationAction
async checkupdate() {
const result = await http.post('///');
const checkversion = result.data;
return checkversion;
}
}
export default getModule(ReceiptModule);

Loading…
Cancel
Save