|
|
@@ -15,20 +15,39 @@
|
|
|
<div v-for="item in tabOptions" :label="item.name" :name="item.name">
|
|
|
<headerTitle :title="item.name"></headerTitle>
|
|
|
<div v-if="item.key == 'main'">
|
|
|
- <receiptInfo ref="modalRefs" :businessId="businessId" :form="form" :detailData="detailData">
|
|
|
+ <receiptInfo
|
|
|
+ ref="modalRefs"
|
|
|
+ :businessId="businessId"
|
|
|
+ :form="form"
|
|
|
+ :detailData="detailData"
|
|
|
+ >
|
|
|
</receiptInfo>
|
|
|
</div>
|
|
|
<div v-if="item.key == 'inoutBound'">
|
|
|
- <add ref="inoutBoundRef" :form="form" :sourceBizNo="form.receiveNo" :saleProductList="form.productList"
|
|
|
- :bizType="form.outsourceSendCode?10:2" :detailProductList="detailData.productList"></add>
|
|
|
+ <add
|
|
|
+ ref="inoutBoundRef"
|
|
|
+ :form="form"
|
|
|
+ :sourceBizNo="form.receiveNo"
|
|
|
+ :saleProductList="form.productList"
|
|
|
+ :bizType="form.outsourceSendCode ? 10 : 2"
|
|
|
+ :detailProductList="detailData.productList"
|
|
|
+ ></add>
|
|
|
</div>
|
|
|
<div v-if="item.key == 'inoutBoundView'">
|
|
|
- <detailDialog ref="inoutBoundViewRef" :bizType="form.outsourceSendCode?10:2" :businessId="form.receiveNo" :isUpload="isUpload">
|
|
|
+ <detailDialog
|
|
|
+ ref="inoutBoundViewRef"
|
|
|
+ :bizType="form.outsourceSendCode ? 10 : 2"
|
|
|
+ :businessId="form.receiveNo"
|
|
|
+ :isUpload="isUpload"
|
|
|
+ >
|
|
|
</detailDialog>
|
|
|
</div>
|
|
|
<div v-if="item.key == 'inoutBoundEdit'">
|
|
|
- <procurementWarehousing :businessId="form.receiveNo" :qualityInspectionItems="qualityInspectionItems"
|
|
|
- ref="inoutBoundEditRef">
|
|
|
+ <procurementWarehousing
|
|
|
+ :businessId="form.receiveNo"
|
|
|
+ :qualityInspectionItems="qualityInspectionItems"
|
|
|
+ ref="inoutBoundEditRef"
|
|
|
+ >
|
|
|
</procurementWarehousing>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -37,216 +56,212 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import dictMixins from '@/mixins/dictMixins';
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
|
|
|
-import { getReceiveSaleOrderrecordDetail } from '@/api/bpm/components/purchasingManage/purchaseorderreceive';
|
|
|
+ import { getReceiveSaleOrderrecordDetail } from '@/api/bpm/components/purchasingManage/purchaseorderreceive';
|
|
|
|
|
|
-import detailDialog from '@/views/bpm/stockManagement/details.vue';
|
|
|
+ import detailDialog from '@/views/bpm/stockManagement/details.vue';
|
|
|
|
|
|
-import procurementWarehousing from '@/views/bpm/stockManagement/quality.vue';
|
|
|
+ import procurementWarehousing from '@/views/bpm/stockManagement/quality.vue';
|
|
|
|
|
|
+ import receiptInfo from './receiptInfo.vue';
|
|
|
+ import add from '@/views/bpm/stockManagement/storage.vue';
|
|
|
|
|
|
+ import storageApi from '@/api/warehouseManagement';
|
|
|
+ // import fileMain from '@/components/addDoc/index.vue';
|
|
|
|
|
|
-import receiptInfo from './receiptInfo.vue';
|
|
|
-import add from '@/views/bpm/stockManagement/storage.vue';
|
|
|
-
|
|
|
-import storageApi from '@/api/warehouseManagement';
|
|
|
-// import fileMain from '@/components/addDoc/index.vue';
|
|
|
-
|
|
|
-export default {
|
|
|
- props: {
|
|
|
- businessId: {
|
|
|
- default: ''
|
|
|
+ export default {
|
|
|
+ props: {
|
|
|
+ businessId: {
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ taskId: {
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ taskDefinitionKey: {
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
},
|
|
|
- taskId: {
|
|
|
- default: ''
|
|
|
+ components: {
|
|
|
+ // fileMain,
|
|
|
+ detailDialog,
|
|
|
+ procurementWarehousing,
|
|
|
+ add,
|
|
|
+ receiptInfo
|
|
|
},
|
|
|
- taskDefinitionKey: {
|
|
|
- default: ''
|
|
|
- }
|
|
|
- },
|
|
|
- components: {
|
|
|
- // fileMain,
|
|
|
- detailDialog,
|
|
|
- procurementWarehousing,
|
|
|
- add,
|
|
|
- receiptInfo
|
|
|
- },
|
|
|
- mixins: [dictMixins],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- qualityInspectionItems: [
|
|
|
- 'materielDesignation',
|
|
|
- 'clientCode',
|
|
|
- 'engrave',
|
|
|
- 'weight',
|
|
|
- 'result'
|
|
|
- ],
|
|
|
- isUpload: false,
|
|
|
- activeComp: 'main',
|
|
|
- tabOptions: [{ key: 'main', name: '收货单详情' }],
|
|
|
-
|
|
|
- visible: false,
|
|
|
- detailId: '',
|
|
|
- title: '详情',
|
|
|
- row: {},
|
|
|
- activeName: 'base',
|
|
|
- form: {
|
|
|
- orderFiles: [{ name: '222' }]
|
|
|
- },
|
|
|
- detailData: {},
|
|
|
-
|
|
|
- };
|
|
|
- },
|
|
|
- async created() {
|
|
|
- await this.getDetailData(this.businessId);
|
|
|
- // getOutInBySourceBizNoOrError(this.form.receiveNo)
|
|
|
- await storageApi
|
|
|
- .getInfoBySourceBizNo(this.form.receiveNo)
|
|
|
- .then((res) => {
|
|
|
- if (JSON.stringify(res) == '{}') {
|
|
|
- // 未查询到相关信息(未入库)
|
|
|
- if (this.taskDefinitionKey == 'storeManagerApprove') {
|
|
|
- this.tabOptions.push({ key: 'inoutBound', name: '入库单' });
|
|
|
- this.activeComp = 'inoutBound';
|
|
|
- this.$emit('activeCompChange', 'inoutBound');
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.add.pickerSuccess(this.form);
|
|
|
- // });
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.taskDefinitionKey == 'qualityInspection') {
|
|
|
- this.tabOptions.push({
|
|
|
- key: 'inoutBoundEdit',
|
|
|
- name: '入库单详情(已入库)'
|
|
|
- });
|
|
|
- this.activeComp = 'inoutBoundEdit';
|
|
|
- } else if (this.taskDefinitionKey == 'qualityInspectionFeedback') {
|
|
|
- this.tabOptions.push({
|
|
|
- key: 'inoutBoundView',
|
|
|
- name: '入库单详情'
|
|
|
- });
|
|
|
- this.isUpload = true;
|
|
|
- this.activeComp = 'inoutBoundView';
|
|
|
+ mixins: [dictMixins],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ qualityInspectionItems: [
|
|
|
+ 'materielDesignation',
|
|
|
+ 'clientCode',
|
|
|
+ 'engrave',
|
|
|
+ 'weight',
|
|
|
+ 'result'
|
|
|
+ ],
|
|
|
+ isUpload: false,
|
|
|
+ activeComp: 'main',
|
|
|
+ tabOptions: [{ key: 'main', name: '收货单详情' }],
|
|
|
+
|
|
|
+ visible: false,
|
|
|
+ detailId: '',
|
|
|
+ title: '详情',
|
|
|
+ row: {},
|
|
|
+ activeName: 'base',
|
|
|
+ form: {
|
|
|
+ orderFiles: [{ name: '222' }]
|
|
|
+ },
|
|
|
+ detailData: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ await this.getDetailData(this.businessId);
|
|
|
+ // getOutInBySourceBizNoOrError(this.form.receiveNo)
|
|
|
+ await storageApi
|
|
|
+ .getInfoBySourceBizNo(this.form.receiveNo)
|
|
|
+ .then((res) => {
|
|
|
+ if (JSON.stringify(res) == '{}') {
|
|
|
+ // 未查询到相关信息(未入库)
|
|
|
+ if (this.taskDefinitionKey == 'storeManagerApprove') {
|
|
|
+ this.tabOptions.push({ key: 'inoutBound', name: '入库单' });
|
|
|
+ this.activeComp = 'inoutBound';
|
|
|
+ this.$emit('activeCompChange', 'inoutBound');
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.add.pickerSuccess(this.form);
|
|
|
+ // });
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.tabOptions.push({
|
|
|
- key: 'inoutBoundView',
|
|
|
- name: '入库单详情'
|
|
|
- });
|
|
|
- this.isUpload = false;
|
|
|
- this.activeComp = 'inoutBoundView';
|
|
|
+ if (this.taskDefinitionKey == 'qualityInspection') {
|
|
|
+ this.tabOptions.push({
|
|
|
+ key: 'inoutBoundEdit',
|
|
|
+ name: '入库单详情(已入库)'
|
|
|
+ });
|
|
|
+ this.activeComp = 'inoutBoundEdit';
|
|
|
+ } else if (this.taskDefinitionKey == 'qualityInspectionFeedback') {
|
|
|
+ this.tabOptions.push({
|
|
|
+ key: 'inoutBoundView',
|
|
|
+ name: '入库单详情'
|
|
|
+ });
|
|
|
+ this.isUpload = true;
|
|
|
+ this.activeComp = 'inoutBoundView';
|
|
|
+ } else {
|
|
|
+ this.tabOptions.push({
|
|
|
+ key: 'inoutBoundView',
|
|
|
+ name: '入库单详情'
|
|
|
+ });
|
|
|
+ this.isUpload = false;
|
|
|
+ this.activeComp = 'inoutBoundView';
|
|
|
+ }
|
|
|
+ // if (
|
|
|
+ // ![
|
|
|
+ // 'starter',
|
|
|
+ // 'deptLeaderApprove',
|
|
|
+ // 'storeManagerApprove',
|
|
|
+ // 'qualityInspection'
|
|
|
+ // ].includes(this.taskDefinitionKey)
|
|
|
+ // ) {
|
|
|
+ // this.tabOptions.push({
|
|
|
+ // key: 'inoutBoundView',
|
|
|
+ // name: '入库单详情'
|
|
|
+ // });
|
|
|
+ // this.isUpload = true;
|
|
|
+ // this.activeComp = 'inoutBoundView';
|
|
|
+ // } else {
|
|
|
+ // this.tabOptions.push({
|
|
|
+ // key: 'inoutBoundEdit',
|
|
|
+ // name: '入库单详情(已入库)'
|
|
|
+ // });
|
|
|
+ // this.activeComp = 'inoutBoundEdit';
|
|
|
+ // }
|
|
|
}
|
|
|
- // if (
|
|
|
- // ![
|
|
|
- // 'starter',
|
|
|
- // 'deptLeaderApprove',
|
|
|
- // 'storeManagerApprove',
|
|
|
- // 'qualityInspection'
|
|
|
- // ].includes(this.taskDefinitionKey)
|
|
|
- // ) {
|
|
|
- // this.tabOptions.push({
|
|
|
- // key: 'inoutBoundView',
|
|
|
- // name: '入库单详情'
|
|
|
- // });
|
|
|
- // this.isUpload = true;
|
|
|
- // this.activeComp = 'inoutBoundView';
|
|
|
- // } else {
|
|
|
- // this.tabOptions.push({
|
|
|
- // key: 'inoutBoundEdit',
|
|
|
- // name: '入库单详情(已入库)'
|
|
|
- // });
|
|
|
- // this.activeComp = 'inoutBoundEdit';
|
|
|
- // }
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message.error('获取入库单详情失败');
|
|
|
- });
|
|
|
- console.log(this.tabOptions, 'this.tabOptions')
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- methods: {
|
|
|
-
|
|
|
- changeActive(item) {
|
|
|
- this.activeComp = item.key;
|
|
|
- this.$emit('activeCompChange', item.key);
|
|
|
- // if (
|
|
|
- // this.taskDefinitionKey == 'storeManagerApprove' &&
|
|
|
- // item.key == 'inoutBound'
|
|
|
- // ) {
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.add.pickerSuccess(this.form);
|
|
|
- // });
|
|
|
- // }
|
|
|
- },
|
|
|
- save(data) {
|
|
|
- this.$refs.inoutBoundRef?.[0].handleSave(data);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error('获取入库单详情失败');
|
|
|
+ });
|
|
|
+ console.log(this.tabOptions, 'this.tabOptions');
|
|
|
},
|
|
|
- success() {
|
|
|
- // this.$parent.handleClose()
|
|
|
|
|
|
- this.$emit('handleClose');
|
|
|
- },
|
|
|
+ methods: {
|
|
|
+ changeActive(item) {
|
|
|
+ this.activeComp = item.key;
|
|
|
+ this.$emit('activeCompChange', item.key);
|
|
|
+ // if (
|
|
|
+ // this.taskDefinitionKey == 'storeManagerApprove' &&
|
|
|
+ // item.key == 'inoutBound'
|
|
|
+ // ) {
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.add.pickerSuccess(this.form);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ save(data) {
|
|
|
+ this.$refs.inoutBoundRef?.[0].handleSave(data);
|
|
|
+ },
|
|
|
+ success() {
|
|
|
+ // this.$parent.handleClose()
|
|
|
|
|
|
- // 判断质检状态是否全部已检
|
|
|
- allListChecked() {
|
|
|
- return (
|
|
|
- this.$refs.inoutBoundEditRef?.[0] &&
|
|
|
- this.$refs.inoutBoundEditRef[0].getStatus()
|
|
|
- );
|
|
|
- },
|
|
|
- async getTableValue() {
|
|
|
- console.log(this.$refs)
|
|
|
- return {
|
|
|
- form: this.form,
|
|
|
- returnStorageData: this.$refs.inoutBoundRef?.[0]&& await this.$refs.inoutBoundRef[0].getReturnStorage(),
|
|
|
- isAllChecked:
|
|
|
+ this.$emit('handleClose');
|
|
|
+ },
|
|
|
+
|
|
|
+ // 判断质检状态是否全部已检
|
|
|
+ allListChecked() {
|
|
|
+ return (
|
|
|
this.$refs.inoutBoundEditRef?.[0] &&
|
|
|
- (await this.$refs.inoutBoundEditRef[0].getStatus()),
|
|
|
-
|
|
|
- qualityInspector:
|
|
|
- (this.$refs.inoutBoundViewRef?.[0] &&
|
|
|
- this.$refs.inoutBoundViewRef[0].getQualityFile()) ||
|
|
|
- {}
|
|
|
- // qualityInspector:
|
|
|
- // (this.$refs.detailDialog &&
|
|
|
- // this.$refs.detailDialog.getQualityFile()) ||
|
|
|
- // {}
|
|
|
- };
|
|
|
- },
|
|
|
- async getDetailData(id) {
|
|
|
- this.loading = true;
|
|
|
- const data = await getReceiveSaleOrderrecordDetail(id);
|
|
|
- this.loading = false;
|
|
|
- if (data) {
|
|
|
- console.log(data, '1111111111111111111111');
|
|
|
-
|
|
|
- this.form = data;
|
|
|
- this.detailData = data;
|
|
|
+ this.$refs.inoutBoundEditRef[0].getStatus()
|
|
|
+ );
|
|
|
+ },
|
|
|
+ async getTableValue() {
|
|
|
+ console.log(this.$refs);
|
|
|
+ return {
|
|
|
+ form: this.form,
|
|
|
+ returnStorageData:
|
|
|
+ this.$refs.inoutBoundRef?.[0] &&
|
|
|
+ (await this.$refs.inoutBoundRef[0].getReturnStorage()),
|
|
|
+ isAllChecked:
|
|
|
+ this.$refs.inoutBoundEditRef?.[0] &&
|
|
|
+ (await this.$refs.inoutBoundEditRef[0].getStatus()),
|
|
|
+
|
|
|
+ qualityInspector:
|
|
|
+ (this.$refs.inoutBoundViewRef?.[0] &&
|
|
|
+ this.$refs.inoutBoundViewRef[0].getQualityFile()) ||
|
|
|
+ {}
|
|
|
+ // qualityInspector:
|
|
|
+ // (this.$refs.detailDialog &&
|
|
|
+ // this.$refs.detailDialog.getQualityFile()) ||
|
|
|
+ // {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async getDetailData(id) {
|
|
|
+ this.loading = true;
|
|
|
+ const data = await getReceiveSaleOrderrecordDetail(id);
|
|
|
+ this.loading = false;
|
|
|
+ if (data) {
|
|
|
+ console.log(data, '1111111111111111111111');
|
|
|
+
|
|
|
+ this.form = data;
|
|
|
+ this.detailData = data;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-.ele-dialog-form {
|
|
|
- .el-form-item {
|
|
|
- margin-bottom: 10px;
|
|
|
+ .ele-dialog-form {
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-.headbox {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
+ .headbox {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .amount {
|
|
|
- font-size: 14px;
|
|
|
- font-weight: bold;
|
|
|
- margin-right: 20px;
|
|
|
+ .amount {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
</style>
|