|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
<view class="page-product-receipt">
|
|
|
|
|
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
|
|
|
|
|
<view class="left">
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title">{{ $t('message.Scrap') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
@ -64,7 +64,7 @@
|
|
|
|
|
<u-button type="primary" @click="onSubmit">{{ $t('message.InventoryFinish') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
|
|
|
|
|
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
@ -79,10 +79,10 @@ import { VForm, VFormRules } from 'vue/types/form';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
|
|
|
|
|
interface OptionType {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
}
|
|
|
|
|
// interface OptionType {
|
|
|
|
|
// label: string;
|
|
|
|
|
// value: string;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
@ -111,22 +111,13 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
//条码扫码
|
|
|
|
|
async scanning() {
|
|
|
|
|
if (!this.form.order3) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.scrapForm') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.scrapForm') as string);
|
|
|
|
|
}
|
|
|
|
|
if (!this.Some) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.finishedProduct') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.finishedProduct') as string);
|
|
|
|
|
}
|
|
|
|
|
if (!this.form.barcode) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.barcode') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
@ -138,10 +129,7 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
};
|
|
|
|
|
await this.model.getProductCode(params);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.product_Tip8') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.product_Tip8') as string);
|
|
|
|
|
this.Some.actualQty += 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -157,10 +145,7 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
//单号查询
|
|
|
|
|
async query() {
|
|
|
|
|
if (!this.form.order3) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Commission_tips1') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let param = {
|
|
|
|
@ -173,10 +158,7 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
};
|
|
|
|
|
await this.model.queryScrapList(param);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.product_Tip8') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.product_Tip8') as string);
|
|
|
|
|
this.model.recordsList.forEach((item: any) => {
|
|
|
|
|
item.fileNo = ' ';
|
|
|
|
|
});
|
|
|
|
@ -187,10 +169,7 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
//确定
|
|
|
|
|
async onSubmit() {
|
|
|
|
|
if (!this.Some.fileNo) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.fileNumber') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.fileNumber') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const orderlist = [
|
|
|
|
@ -211,7 +190,7 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
await this.model.onTakeoutConfirm(orderlist);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
title: this.$t('message.success') as string,
|
|
|
|
|
});
|
|
|
|
|
this.Some = {};
|
|
|
|
@ -224,10 +203,7 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
//查询明细
|
|
|
|
|
async bill() {
|
|
|
|
|
if (!this.form.order3) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Commission_tips1') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.queryDetailed(this.form.order3);
|
|
|
|
|