|
|
|
@ -136,11 +136,14 @@
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<!-- 确定 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button :disabled="isdisabled" @click="onSubmit" type="primary">确认收货</u-button>
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button :disabled="isdisabled" @click="onSubmit" type="primary">103暂收</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button :disabled="isDisabled105" @click="handelSubmit105" type="success">105过账</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 返回 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="error" @click="uni.navigateBack()">返回</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
@ -152,6 +155,8 @@
|
|
|
|
|
<u-button @click="submiteditor">操作</u-button>
|
|
|
|
|
</u-popup>
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
|
|
|
|
|
<u-modal v-model="showStatus105" :content="contentStatus150" title="105过账失败"></u-modal>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
@ -161,6 +166,8 @@ import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
import { removeLeadingZeros } from '@/utils/tool';
|
|
|
|
|
import LjListRow from '@/components/lanju/lj-list-row/index.vue';
|
|
|
|
|
import ljPagination from '@/components/lanju/lj-pagination/index.vue';
|
|
|
|
|
|
|
|
|
|
interface OptionType {
|
|
|
|
|
label: string;
|
|
|
|
@ -168,6 +175,8 @@ interface OptionType {
|
|
|
|
|
}
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
|
ljPagination,
|
|
|
|
|
LjListRow,
|
|
|
|
|
jPicker,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
@ -239,7 +248,13 @@ export default class receiveSRM extends BasePage {
|
|
|
|
|
temNumber = '';
|
|
|
|
|
editoritem: any = {};
|
|
|
|
|
isdisabled = false;
|
|
|
|
|
|
|
|
|
|
isDisabled105 = false;
|
|
|
|
|
showStatus105 = false;
|
|
|
|
|
contentStatus150 = '';
|
|
|
|
|
qualityStatusCo = {
|
|
|
|
|
Y: '检验合格',
|
|
|
|
|
N: '检验不合格',
|
|
|
|
|
};
|
|
|
|
|
//点击收货按钮,录入批次(或系统自动生成)、数量、托盘码进行收货。
|
|
|
|
|
async onFormDoubleClick(item) {
|
|
|
|
|
console.log('双击', item);
|
|
|
|
@ -261,7 +276,6 @@ export default class receiveSRM extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
//查询货单关联采购单信息
|
|
|
|
|
async query() {
|
|
|
|
|
console.log(session);
|
|
|
|
|
if (this.userDefined5 == '' || this.userDefined5.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入送货单',
|
|
|
|
@ -413,6 +427,70 @@ export default class receiveSRM extends BasePage {
|
|
|
|
|
return removeLeadingZeros(item.materialCode) == this.bimWl.value;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 105过账按钮
|
|
|
|
|
* **/
|
|
|
|
|
async handelSubmit105() {
|
|
|
|
|
this.isDisabled105 = true;
|
|
|
|
|
const list = this.list;
|
|
|
|
|
let params: any = [];
|
|
|
|
|
if (list.length > 0) {
|
|
|
|
|
for (const item of list) {
|
|
|
|
|
if (!item.orderStatus || item.orderStatus === '0') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请先完成收货!',
|
|
|
|
|
type: 'default',
|
|
|
|
|
duration: 3000,
|
|
|
|
|
});
|
|
|
|
|
this.isDisabled105 = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//待检、不合格不在手持机上过账
|
|
|
|
|
if (!item.qualityStatus || item.qualityStatus === 'N') {
|
|
|
|
|
this.contentStatus150 = '采购单号:' + item.procureCode + ',物料编码:' + removeLeadingZeros(item.materialCode) + ',' + (this.qualityStatusCo[item.qualityStatus] || '未检验');
|
|
|
|
|
this.showStatus105 = true;
|
|
|
|
|
this.isDisabled105 = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//rawOrderInId不为空
|
|
|
|
|
if (item.rawOrderInId) {
|
|
|
|
|
params.push({ id: item.rawOrderInId });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (params.length > 0) {
|
|
|
|
|
//去重
|
|
|
|
|
params = params.filter((item: any, index: any, self: any) => self.findIndex((t: { [x: string]: any }) => t['id'] === item['id']) === index);
|
|
|
|
|
|
|
|
|
|
await this.model.sap105temporarilyCollected(params);
|
|
|
|
|
this.isDisabled105 = false;
|
|
|
|
|
if (this.model.sap105code + '' === '200') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: this.model.sap105msg,
|
|
|
|
|
type: 'primary',
|
|
|
|
|
duration: 6000,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
await this.query();
|
|
|
|
|
} else {
|
|
|
|
|
this.isDisabled105 = false;
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '无可过账数据',
|
|
|
|
|
type: 'default',
|
|
|
|
|
duration: 3000,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.isDisabled105 = false;
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '未选择数据',
|
|
|
|
|
type: 'default',
|
|
|
|
|
duration: 3000,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|