|
|
|
@ -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>
|
|
|
|
|