|
|
|
@ -1,10 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="JNPF-common-layout">
|
|
|
|
|
<div class="JNPF-common-layout-center">
|
|
|
|
@ -67,10 +60,10 @@
|
|
|
|
|
@click="createPurchaseOrder()">生成采购单
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
|
|
|
|
|
@click="createPurchaseOrder()">生成收货单
|
|
|
|
|
@click="createReceiptOrder()">生成收货单
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
|
|
|
|
|
@click="createPurchaseOrder()">生成销售发货凭证
|
|
|
|
|
@click="createSaleDeliveryVoucher()">生成销售发货凭证
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="JNPF-common-head-right">
|
|
|
|
@ -254,6 +247,9 @@ export default {
|
|
|
|
|
flowVisible: false,
|
|
|
|
|
flowListVisible: false,
|
|
|
|
|
flowList: [],
|
|
|
|
|
purchaseFlowList: [],
|
|
|
|
|
receiptFlowList: [],
|
|
|
|
|
deliveryVoucherFlowList: [],
|
|
|
|
|
exportBoxVisible: false,
|
|
|
|
|
voucherTypeOptions: [{ "fullName": "磅单", "id": "1" }, { "fullName": "收据", "id": "2" }, { "fullName": "其他", "id": "3" }],
|
|
|
|
|
voucherTypeProps: { "label": "fullName", "value": "id" },
|
|
|
|
@ -293,6 +289,33 @@ export default {
|
|
|
|
|
this.$router.push('/404');
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
getFormById("1760188153336909825").then(res1 => {
|
|
|
|
|
let purchaseFlowId = res1.data && res1.data.id
|
|
|
|
|
getFlowList(purchaseFlowId, '1').then(res2 => {
|
|
|
|
|
this.purchaseFlowList = res2.data
|
|
|
|
|
}).catch((e) => {
|
|
|
|
|
this.$message({ type: 'error', message: e.message });
|
|
|
|
|
this.$router.push('/404');
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
getFormById("1760939976058462210").then(res1 => {
|
|
|
|
|
let receiptFlowId = res1.data && res1.data.id
|
|
|
|
|
getFlowList(receiptFlowId, '1').then(res2 => {
|
|
|
|
|
this.receiptFlowList = res2.data
|
|
|
|
|
}).catch((e) => {
|
|
|
|
|
this.$message({ type: 'error', message: e.message });
|
|
|
|
|
this.$router.push('/404');
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
getFormById("523901091608268101").then(res1 => {
|
|
|
|
|
let deliveryVoucherFlowId = res1.data && res1.data.id
|
|
|
|
|
getFlowList(deliveryVoucherFlowId, '1').then(res2 => {
|
|
|
|
|
this.deliveryVoucherFlowList = res2.data
|
|
|
|
|
}).catch((e) => {
|
|
|
|
|
this.$message({ type: 'error', message: e.message });
|
|
|
|
|
this.$router.push('/404');
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
createPurchaseOrder() {
|
|
|
|
@ -304,15 +327,63 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// const data = this.multipleSelectionItem
|
|
|
|
|
// this.saleOrderVisible = true
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.$refs.SaleOrder.init(data)
|
|
|
|
|
// })
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'error',
|
|
|
|
|
message: '暂未开放',
|
|
|
|
|
duration: 1500,
|
|
|
|
|
const selectData = this.multipleSelectionItem
|
|
|
|
|
if (!this.purchaseFlowList.length) {
|
|
|
|
|
this.$message({ type: 'error', message: '流程不存在' });
|
|
|
|
|
} else if (this.purchaseFlowList.length === 1) {
|
|
|
|
|
this.selectFlow1(this.purchaseFlowList[0], selectData)
|
|
|
|
|
} else {
|
|
|
|
|
this.flowListVisible = true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
createReceiptOrder() {
|
|
|
|
|
if (!this.multipleSelectionItem.length) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'error',
|
|
|
|
|
message: '请选择一条数据',
|
|
|
|
|
duration: 1500,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const selectData = this.multipleSelectionItem
|
|
|
|
|
if (!this.receiptFlowList.length) {
|
|
|
|
|
this.$message({ type: 'error', message: '流程不存在' });
|
|
|
|
|
} else if (this.receiptFlowList.length === 1) {
|
|
|
|
|
this.selectFlow1(this.receiptFlowList[0], selectData)
|
|
|
|
|
} else {
|
|
|
|
|
this.flowListVisible = true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
createSaleDeliveryVoucher() {
|
|
|
|
|
if (!this.multipleSelectionItem.length) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'error',
|
|
|
|
|
message: '请选择一条数据',
|
|
|
|
|
duration: 1500,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const selectData = this.multipleSelectionItem
|
|
|
|
|
if (!this.deliveryVoucherFlowList.length) {
|
|
|
|
|
this.$message({ type: 'error', message: '流程不存在' });
|
|
|
|
|
} else if (this.deliveryVoucherFlowList.length === 1) {
|
|
|
|
|
this.selectFlow1(this.deliveryVoucherFlowList[0], selectData)
|
|
|
|
|
} else {
|
|
|
|
|
this.flowListVisible = true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectFlow1(item, selectData) {
|
|
|
|
|
let data = {
|
|
|
|
|
id: '',
|
|
|
|
|
formType: 1,
|
|
|
|
|
flowId: item.id,
|
|
|
|
|
opType: '-1',
|
|
|
|
|
selectData: selectData
|
|
|
|
|
}
|
|
|
|
|
this.flowListVisible = false
|
|
|
|
|
this.flowVisible = true
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.FlowBox.init(data)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
toDetail(defaultValue, modelId) {
|
|
|
|
|