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

master
guoshuang 2 years ago
parent 170e127714
commit beff5a95c7

@ -18,6 +18,9 @@
<u-button type="primary" @click="query"></u-button> <u-button type="primary" @click="query"></u-button>
</view> </view>
</view> </view>
<u-form-item label="托盘码">
<u-search placeholder="请扫描托盘码" v-model="location" :show-action="false"></u-search>
</u-form-item>
</u-form> </u-form>
</view> </view>
</template> </template>
@ -39,12 +42,38 @@ export default class PalletChange extends BasePage {
// this.remove = e.pickerName; // this.remove = e.pickerName;
// } // }
orderNo: any = ''; 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() { async query() {
if (this.orderNo == '' || this.orderNo.length == 0) { if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl'); this.customToast('请输入nficl');
return; 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> </script>

@ -28,6 +28,14 @@ export class PalletChange extends VuexModule {
const orderNoItemList = []; const orderNoItemList = [];
return { 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); export default getModule(PalletChange);

@ -214,8 +214,36 @@ export default class productCheckReceipt extends BasePage {
await this.model.queryOrderNo(this.orderNo); await this.model.queryOrderNo(this.orderNo);
} }
histroyItem: any = {}; 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; 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 = ''; barcode: any = '';
async onSubmit() { async onSubmit() {

@ -60,6 +60,13 @@ export class wholeTransfer extends VuexModule {
const SubmitCode = result.code; const SubmitCode = result.code;
return { SubmitCode }; 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 @MutationAction
async empty() { async empty() {
const orderNoItemList = []; const orderNoItemList = [];

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

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

Loading…
Cancel
Save