mes托盘变更功能&生产质检增加烘房下发搬运

master
guoshuang 2 years ago
parent 170e127714
commit beff5a95c7

@ -18,6 +18,9 @@
<u-button type="primary" @click="query"></u-button>
</view>
</view>
<u-form-item label="托盘码">
<u-search placeholder="请扫描托盘码" v-model="location" :show-action="false"></u-search>
</u-form-item>
</u-form>
</view>
</template>
@ -39,12 +42,38 @@ export default class PalletChange extends BasePage {
// this.remove = e.pickerName;
// }
orderNo: any = '';
location: any = '';
generateGUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0,
v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
}
async query() {
if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl');
return;
}
await this.model.queryOrderNo(this.orderNo);
var currentDate = new Date();
//
var year = currentDate.getFullYear();
var month = ('0' + (currentDate.getMonth() + 1)).slice(-2);
var day = ('0' + currentDate.getDate()).slice(-2);
var hours = ('0' + currentDate.getHours()).slice(-2);
var minutes = ('0' + currentDate.getMinutes()).slice(-2);
var seconds = ('0' + currentDate.getSeconds()).slice(-2);
// "YYYY-MM-DD HH:mm:ss"
var formattedDate = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
let params = {
rfidNo: this.orderNo,
reqCode: this.generateGUID(),
reqTime: formattedDate,
location: this.location,
};
await this.model.palletInforUpdate(params);
}
}
</script>

@ -28,6 +28,14 @@ export class PalletChange extends VuexModule {
const orderNoItemList = [];
return { orderNoItemList };
}
SubmitCode: any = '';
//托盘信息变更x
@MutationAction
async palletInforUpdate(params: any) {
const result: any = await http.post(url.lanjumes.product.palletInforUpdate, params);
const SubmitCode = result.code;
return { SubmitCode };
}
}
export default getModule(PalletChange);

@ -214,8 +214,36 @@ export default class productCheckReceipt extends BasePage {
await this.model.queryOrderNo(this.orderNo);
}
histroyItem: any = {};
selectProductCode(e: any) {
generateGUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0,
v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
}
async selectProductCode(e: any) {
this.productCodeList = e.pickerName;
if (this.productCodeList.value == '1') {
//
var currentDate = new Date();
//
var year = currentDate.getFullYear();
var month = ('0' + (currentDate.getMonth() + 1)).slice(-2);
var day = ('0' + currentDate.getDate()).slice(-2);
var hours = ('0' + currentDate.getHours()).slice(-2);
var minutes = ('0' + currentDate.getMinutes()).slice(-2);
var seconds = ('0' + currentDate.getSeconds()).slice(-2);
// "YYYY-MM-DD HH:mm:ss"
var formattedDate = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
let params = {
rfidNo: this.orderNo,
reqCode: this.generateGUID(),
reqTime: formattedDate,
};
await this.model.sendDestinationStations(params);
}
}
barcode: any = '';
async onSubmit() {

@ -60,6 +60,13 @@ export class wholeTransfer extends VuexModule {
const SubmitCode = result.code;
return { SubmitCode };
}
//烘房出来下发搬运任务
@MutationAction
async sendDestinationStations(params: any) {
const result: any = await http.post(url.lanjumes.product.sendDestinationStations, params);
const SubmitCode = result.code;
return { SubmitCode };
}
@MutationAction
async empty() {
const orderNoItemList = [];

@ -19,13 +19,7 @@
<view class="container">
<u-row :gutter="30">
<u-col :span="16" style="padding: 0px">
<u-button
@click.native="
uni.navigateTo({
url: item.path,
})
"
>
<u-button @click.native="togopage(item.path)">
<u-icon size="80" name="/static/icons/icon-02.png"></u-icon>
<!-- <text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text> -->
<text class="name">{{ item.menuName }}</text>
@ -80,6 +74,9 @@ export default class RawHome extends BasePage {
factoryList: any = {};
today = dayjs().format('YYYY-MM-DD dddd');
onReady() {
if (session.FactoryCode != undefined) {
this.factoryList.value = session.FactoryCode;
}
this.newmenuList = this.menuList.filter((item) => item.perms == 'wms' || item.perms == 'mes');
console.log('1234', this.menuList);
}
@ -93,6 +90,16 @@ export default class RawHome extends BasePage {
url: `/pages/mes/index`,
});
}
togopage(path) {
//console.log('guoguo',session.FactoryCode)
if (session.FactoryCode == undefined) {
this.customToast('请选择工厂');
} else {
uni.navigateTo({
url: path,
});
}
}
selectProductCode(e: any) {
this.factoryList = e.pickerName;
const factory: string = this.factoryList.factory;

@ -405,6 +405,8 @@ export const url = {
getInfoByRfid: '/dev-api/quality/handCheck/getInfoByRfid',
saveQcProCheck: '/dev-api/quality/handCheck/saveQcProCheck',
queryhandChecklist: '/dev-api/quality/handCheck/list',
sendDestinationStations: '/api/ReceivingAndFeedingMaterials/sendDestinationStations',
palletInforUpdate: '/api/ReceivingAndFeedingMaterials/palletInforUpdate',
},
},
lanjuwms: {

Loading…
Cancel
Save