|
@@ -502,6 +502,19 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
<!-- <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle> -->
|
|
<!-- <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle> -->
|
|
|
|
|
+ <headerTitle
|
|
|
|
|
+ title="物品清单"
|
|
|
|
|
+ style="margin-top: 30px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ style="margin-bottom: 5px"
|
|
|
|
|
+ @click="orderListShow"
|
|
|
|
|
+ v-if="!form.id"
|
|
|
|
|
+ >历史记录</el-button
|
|
|
|
|
+ ></headerTitle
|
|
|
|
|
+ >
|
|
|
<el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
|
|
<el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
|
|
|
<el-tab-pane label="物品清单" name="1">
|
|
<el-tab-pane label="物品清单" name="1">
|
|
|
<inventoryTable
|
|
<inventoryTable
|
|
@@ -684,6 +697,17 @@
|
|
|
@changeParent="getPReturnOrderInfo"
|
|
@changeParent="getPReturnOrderInfo"
|
|
|
ref="returnOrderDialogRef"
|
|
ref="returnOrderDialogRef"
|
|
|
></purchase-return-order-dialog>
|
|
></purchase-return-order-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 采购订单 -->
|
|
|
|
|
+ <orderListDialog
|
|
|
|
|
+ ref="orderListDialogRef"
|
|
|
|
|
+ :isMy="true"
|
|
|
|
|
+ :contactData="{
|
|
|
|
|
+ id: form.partbId
|
|
|
|
|
+ }"
|
|
|
|
|
+ @changeParent="changeHistoryOrder"
|
|
|
|
|
+ ></orderListDialog>
|
|
|
|
|
+
|
|
|
<ele-modal
|
|
<ele-modal
|
|
|
custom-class="ele-dialog-form long-dialog-form"
|
|
custom-class="ele-dialog-form long-dialog-form"
|
|
|
:visible.sync="supplierListShow"
|
|
:visible.sync="supplierListShow"
|
|
@@ -774,6 +798,7 @@
|
|
|
import { formatDate } from '@/utils/dateUtils';
|
|
import { formatDate } from '@/utils/dateUtils';
|
|
|
import { formatPrice } from '@/BIZComponents/setProduct.js';
|
|
import { formatPrice } from '@/BIZComponents/setProduct.js';
|
|
|
import { parameterGetByCode } from '@/api/main/index.js';
|
|
import { parameterGetByCode } from '@/api/main/index.js';
|
|
|
|
|
+ import orderListDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/orderListDialog.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
mixins: [dictMixins],
|
|
@@ -802,7 +827,8 @@
|
|
|
returnOrderDialog,
|
|
returnOrderDialog,
|
|
|
returnOrderDealDialog,
|
|
returnOrderDealDialog,
|
|
|
purchaseReturnOrderDialog,
|
|
purchaseReturnOrderDialog,
|
|
|
- PaymentCollectionPlan
|
|
|
|
|
|
|
+ PaymentCollectionPlan,
|
|
|
|
|
+ orderListDialog
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
let formDef = {
|
|
let formDef = {
|
|
@@ -1044,6 +1070,80 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ orderListShow() {
|
|
|
|
|
+ if (!this.form.partbName) {
|
|
|
|
|
+ this.$message.warning('请先选择供应商');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$refs.orderListDialogRef.open();
|
|
|
|
|
+ },
|
|
|
|
|
+ async changeHistoryOrder(item) {
|
|
|
|
|
+ console.log('item~~~~', item)
|
|
|
|
|
+ const data = await getpurchaseorderDetail(item.id);
|
|
|
|
|
+ console.log('data~~~~', data);
|
|
|
|
|
+ [
|
|
|
|
|
+ 'id',
|
|
|
|
|
+ 'orderId',
|
|
|
|
|
+ 'createTime',
|
|
|
|
|
+ 'createUserId',
|
|
|
|
|
+ 'createUserName',
|
|
|
|
|
+ 'createDept',
|
|
|
|
|
+ 'orderNo',
|
|
|
|
|
+ 'orderStatus',
|
|
|
|
|
+ 'outboundStatus',
|
|
|
|
|
+ 'payStatus',
|
|
|
|
|
+ 'preOrderNo',
|
|
|
|
|
+ 'progress',
|
|
|
|
|
+ 'processInstanceId',
|
|
|
|
|
+ 'orderBomList'
|
|
|
|
|
+ ].forEach((key) => {
|
|
|
|
|
+ delete data[key];
|
|
|
|
|
+ data.productList.forEach((item) => {
|
|
|
|
|
+ if (['id', 'createTime', 'createUserId', 'orderId'].includes(key)) {
|
|
|
|
|
+ delete item[key];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ data.rawList.forEach((item) => {
|
|
|
|
|
+ if (['id', 'createTime', 'createUserId', 'orderId'].includes(key)) {
|
|
|
|
|
+ delete item[key];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ data.outputList.forEach((item) => {
|
|
|
|
|
+ if (['id', 'createTime', 'createUserId', 'orderId'].includes(key)) {
|
|
|
|
|
+ delete item[key];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ data.receiptPaymentList.forEach((item) => {
|
|
|
|
|
+ if (['id', 'createTime', 'createUserId', 'orderId'].includes(key)) {
|
|
|
|
|
+ delete item[key];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ this.form = data;
|
|
|
|
|
+ if (data) {
|
|
|
|
|
+ // data.relationType = +data.relationType;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$store.commit('order/setAllcountAmount', data.totalAmount);
|
|
|
|
|
+ this.$refs.inventoryTable &&
|
|
|
|
|
+ this.$refs.inventoryTable.putTableValue(data.productList);
|
|
|
|
|
+ this.$refs.rawDetailListRef &&
|
|
|
|
|
+ this.$refs.rawDetailListRef.putTableValue(data.rawList); //原料
|
|
|
|
|
+ this.$refs.outputDetailListRef &&
|
|
|
|
|
+ this.$refs.outputDetailListRef.putTableValue(data.outputList); //产成品
|
|
|
|
|
+ this.getLinkInfo(data.partaId);
|
|
|
|
|
+
|
|
|
|
|
+ this.$refs.paymentCollectionPlanRef && this.$refs.paymentCollectionPlanRef.putTableValue(data);
|
|
|
|
|
+ this.getrequireUser(data.requireDeptId);
|
|
|
|
|
+ if(data.purchaseDeptId) {
|
|
|
|
|
+ this.getPurchaseUser(data.purchaseDeptId);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$store.commit('order/setContractId', data.contractId);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
setIssueNumber(len) {
|
|
setIssueNumber(len) {
|
|
|
this.form.issueNumber = len;
|
|
this.form.issueNumber = len;
|
|
|
},
|
|
},
|
|
@@ -2215,8 +2315,8 @@
|
|
|
(val) => val.value == this.form.sourceType
|
|
(val) => val.value == this.form.sourceType
|
|
|
)?.label,
|
|
)?.label,
|
|
|
receiptPaymentList: this.$refs?.paymentCollectionPlanRef?.getTableValue() || [],
|
|
receiptPaymentList: this.$refs?.paymentCollectionPlanRef?.getTableValue() || [],
|
|
|
- endSettlementDate: this.form.settlementDate.length ?this.form.settlementDate[1] : '',
|
|
|
|
|
- startSettlementDate: this.form.settlementDate.length ? this.form.settlementDate[0] : ''
|
|
|
|
|
|
|
+ endSettlementDate: this.form.settlementDate?.length ? this.form.settlementDate[1] : '',
|
|
|
|
|
+ startSettlementDate: this.form.settlementDate?.length ? this.form.settlementDate[0] : ''
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const ratioSum = commitData.receiptPaymentList.reduce((acc, cur) => acc + +cur.ratio, 0);
|
|
const ratioSum = commitData.receiptPaymentList.reduce((acc, cur) => acc + +cur.ratio, 0);
|