|
@@ -3,10 +3,14 @@
|
|
|
<div class="left-card">
|
|
|
<div class="top">
|
|
|
<div class="commons-title title">
|
|
|
- {{ route.query.flowName || "流程标题(发起)" }}
|
|
|
+ {{
|
|
|
+ processConfig[route.query.flowKey]
|
|
|
+ ? processConfig[route.query.flowKey].name + `(${processStaus[route.query.processType] || "发起"})`
|
|
|
+ : "流程标题(发起)"
|
|
|
+ }}
|
|
|
</div>
|
|
|
<div class="line"></div>
|
|
|
- <!-- <SendFunds ref="makeDom" v-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds> -->
|
|
|
+ <!-- <SendSubscribe ref="makeDom" @auxiliaryChange='(e) => getAuxiliaryData(e)' v-if="flowForm.flowKey == 'subscribe_flow'" :queryData="queryData.data"></SendSubscribe> -->
|
|
|
</div>
|
|
|
<div class="bottom" v-if="route.query.processType != 20">
|
|
|
<div class="commons-title title">处理意见</div>
|
|
@@ -14,7 +18,7 @@
|
|
|
<el-form-item prop="remark" label-width="0px" label="">
|
|
|
<el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="remark" label-width="80px" label="附件上传">
|
|
|
+ <!-- <el-form-item prop="remark" label-width="80px" label="附件上传">
|
|
|
<el-upload
|
|
|
v-model:fileList="flowForm.fileList"
|
|
|
action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
@@ -25,12 +29,12 @@
|
|
|
:on-preview="onPreviewFile">
|
|
|
<el-button>选择</el-button>
|
|
|
</el-upload>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit" :loading="btnLoading">提交</el-button>
|
|
|
- <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" :loading="btnLoading" @click="handleSubmit(i.type)">{{
|
|
|
- i.name
|
|
|
- }}</el-button>
|
|
|
+ <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" :loading="btnLoading" @click="handleSubmit(i.type)">
|
|
|
+ {{ i.name }}
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -103,7 +107,17 @@ import useTagsViewStore from "@/store/modules/tagsView.js";
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
//决策辅助
|
|
|
import auxiliary from "./auxiliary";
|
|
|
-import { ref } from "vue";
|
|
|
+// 消息提示
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
+
|
|
|
+const processConfig = ref({
|
|
|
+ subscribe_flow: { name: "申购" },
|
|
|
+});
|
|
|
+const processStaus = ref({
|
|
|
+ 10: "审批",
|
|
|
+ 20: "查看",
|
|
|
+ 30: "退回发起",
|
|
|
+});
|
|
|
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
@@ -113,7 +127,6 @@ let auxiliaryData = ref([]);
|
|
|
const getAuxiliaryData = (data) => {
|
|
|
auxiliaryData.value = data;
|
|
|
};
|
|
|
-
|
|
|
const btnLoading = ref(false);
|
|
|
// 意见表单
|
|
|
const flowForm = reactive({
|
|
@@ -179,147 +192,12 @@ const handleSubmit = async (_type) => {
|
|
|
btnLoading.value = true;
|
|
|
if (valid) {
|
|
|
const data = { ...makeDom.value.getFormData() };
|
|
|
- if (flowForm.flowKey == "subscribe_flow") {
|
|
|
- // data.subscribeDetailList = data.subscribeDetailList.map((x) => ({
|
|
|
- // bussinessId: x.bussinessId,
|
|
|
- // count: x.count,
|
|
|
- // remark: x.remark,
|
|
|
- // }));
|
|
|
- } else if (flowForm.flowKey == "purchase_flow") {
|
|
|
- // data.purchaseDetailList = data.purchaseDetailList.map((x) => ({
|
|
|
- // bussinessId: x.bussinessId,
|
|
|
- // subscribeDetailId: x.id,
|
|
|
- // count: x.count,
|
|
|
- // price: x.price,
|
|
|
- // amount: x.amount,
|
|
|
- // }));
|
|
|
- } else if (flowForm.flowKey == "account_request_funds_flow") {
|
|
|
- } else if (flowForm.flowKey == "sales_return_flow") {
|
|
|
- } else if (flowForm.flowKey == "refund_flow") {
|
|
|
- } else if (flowForm.flowKey == "wdly_apply_purchase") {
|
|
|
- data.subscribeDetailList = data.subscribeDetailList.map((x) => ({
|
|
|
- bussinessId: x.bussinessId,
|
|
|
- count: x.count,
|
|
|
- remark: x.remark,
|
|
|
- }));
|
|
|
- const victoriatouristJson = {
|
|
|
- planArrivalTime: data.planArrivalTime,
|
|
|
- receiptWarehouseId: data.receiptWarehouseId,
|
|
|
- };
|
|
|
- data.victoriatouristJson = JSON.stringify(victoriatouristJson);
|
|
|
- } else if (flowForm.flowKey == "wdly_purchase") {
|
|
|
- data.purchaseDetailList = data.purchaseDetailList.map((x) => ({
|
|
|
- bussinessId: x.bussinessId,
|
|
|
- subscribeDetailId: x.id,
|
|
|
- count: x.count,
|
|
|
- price: x.price,
|
|
|
- amount: x.amount,
|
|
|
- deptId: x.deptId,
|
|
|
- }));
|
|
|
- const victoriatouristJson = {
|
|
|
- isAgreement: data.isAgreement,
|
|
|
- paymentMethod: data.paymentMethod,
|
|
|
- otherFeeList: data.otherFeeList,
|
|
|
- contractCode: data.contractCode,
|
|
|
- };
|
|
|
- data.victoriatouristJson = JSON.stringify(victoriatouristJson);
|
|
|
- } else if (flowForm.flowKey == "sale_quotation_flow") {
|
|
|
- if (flowForm.tenantType === "EHSD") {
|
|
|
- data.ehsdJson = JSON.stringify({
|
|
|
- deliveryTime: data.deliveryTime,
|
|
|
- });
|
|
|
- data.quotationProductList = data.quotationProductList.map((item) => {
|
|
|
- let ehsdJson = JSON.stringify({
|
|
|
- packMethod: item.packMethod,
|
|
|
- tradeMethods: item.tradeMethods,
|
|
|
- });
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- ehsdJson: ehsdJson,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- } else if (flowForm.flowKey == "contract_flow") {
|
|
|
- if (flowForm.tenantType === "EHSD") {
|
|
|
- if (data.fileList && data.fileList.length > 0) {
|
|
|
- data.fileList = data.fileList.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- data.fileList = [];
|
|
|
- }
|
|
|
- if (data.packageFileList && data.packageFileList.length > 0) {
|
|
|
- data.packageFileList = data.packageFileList.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- data.packageFileList = [];
|
|
|
- }
|
|
|
- data.ehsdJson = JSON.stringify({
|
|
|
- deliveryTime: data.deliveryTime,
|
|
|
- });
|
|
|
- data.contractProductList = data.contractProductList.map((item) => {
|
|
|
- let ehsdJson = JSON.stringify({
|
|
|
- packMethod: item.packMethod,
|
|
|
- tradeMethods: item.tradeMethods,
|
|
|
- });
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- ehsdJson: ehsdJson,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- } else if (flowForm.flowKey == "sample_flow") {
|
|
|
- if (data.fileList && data.fileList.length > 0) {
|
|
|
- data.fileList = data.fileList.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- data.fileList = [];
|
|
|
- }
|
|
|
- if (data.packageFileList && data.packageFileList.length > 0) {
|
|
|
- data.packageFileList = data.packageFileList.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- data.packageFileList = [];
|
|
|
- }
|
|
|
- data.ehsdJson = JSON.stringify({
|
|
|
- deliveryTime: data.deliveryTime,
|
|
|
- });
|
|
|
- data.sampleProductList = data.sampleProductList.map((item) => {
|
|
|
- let ehsdJson = JSON.stringify({
|
|
|
- packMethod: item.packMethod,
|
|
|
- tradeMethods: item.tradeMethods,
|
|
|
- });
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- ehsdJson: ehsdJson,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- flowForm.fileList = flowForm.fileList.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- ...item.raw,
|
|
|
- };
|
|
|
- });
|
|
|
+ // flowForm.fileList = flowForm.fileList.map((item) => {
|
|
|
+ // return {
|
|
|
+ // ...item,
|
|
|
+ // ...item.raw,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
if (route.query.processType == 10 || route.query.processType == 30) {
|
|
|
if (_type && _type == 1) {
|
|
|
proxy
|
|
@@ -341,7 +219,7 @@ const handleSubmit = async (_type) => {
|
|
|
(res) => {
|
|
|
handleResult(res);
|
|
|
},
|
|
|
- (err) => {
|
|
|
+ () => {
|
|
|
btnLoading.value = false;
|
|
|
}
|
|
|
);
|
|
@@ -356,7 +234,7 @@ const handleSubmit = async (_type) => {
|
|
|
(res) => {
|
|
|
handleResult(res);
|
|
|
},
|
|
|
- (err) => {
|
|
|
+ () => {
|
|
|
btnLoading.value = false;
|
|
|
}
|
|
|
);
|
|
@@ -382,73 +260,9 @@ const skipPage = () => {
|
|
|
type: "success",
|
|
|
});
|
|
|
if (flowForm.flowKey == "subscribe_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/purchaseManage/subscribe",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "purchase_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/purchaseManage/purchase",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "sales_return_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/purchaseManage/returnGoods",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "account_request_funds_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/fundManage/funds",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "refund_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/purchasePayment/invoice",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "pay_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/purchasePayment/payment",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "sale_quotation_flow") {
|
|
|
- if (flowForm.tenantType === "EHSD") {
|
|
|
- router.replace({
|
|
|
- path: "/EHSD/saleContract/priceSheetEHSD",
|
|
|
- });
|
|
|
- } else {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/saleContract/priceSheet",
|
|
|
- });
|
|
|
- }
|
|
|
- } else if (flowForm.flowKey == "contract_flow") {
|
|
|
- if (flowForm.tenantType === "EHSD") {
|
|
|
- router.replace({
|
|
|
- path: "/EHSD/saleContract/contractEHSD",
|
|
|
- });
|
|
|
- } else {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/saleContract/contract",
|
|
|
- });
|
|
|
- }
|
|
|
- } else if (flowForm.flowKey == "contract_update_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/saleContract/contract",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "sample_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/EHSD/saleContract/sampleEHSD",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "ehsd_purchase_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/EHSD/procurement/purchasedEHSD",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "service_contract_flow") {
|
|
|
- router.replace({
|
|
|
- path: "/ERP/saleContract/serviceContract",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "wdly_purchase") {
|
|
|
- router.replace({
|
|
|
- path: "/WDLY/purchaseManage/alreadyPurchase_wdly",
|
|
|
- });
|
|
|
- } else if (flowForm.flowKey == "wdly_apply_purchase") {
|
|
|
- router.replace({
|
|
|
- path: "/WDLY/purchaseManage/subscribe_wdly",
|
|
|
- });
|
|
|
+ // router.replace({
|
|
|
+ // path: "/ERP/purchaseManage/subscribe",
|
|
|
+ // });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -476,10 +290,8 @@ const getRecords = (_id) => {
|
|
|
return item.flowExampleDetailId;
|
|
|
});
|
|
|
proxy.post("fileInfo/getList", { businessIdList: fileIds.value }).then((res2) => {
|
|
|
- console.log(res2);
|
|
|
fileObj.value = res2;
|
|
|
});
|
|
|
- console.log(fileObj.value);
|
|
|
});
|
|
|
} else {
|
|
|
proxy
|
|
@@ -526,10 +338,7 @@ onMounted(async () => {
|
|
|
padding: 0 20px;
|
|
|
height: calc(100vh - 130px);
|
|
|
.left-card {
|
|
|
- // background: #fff;
|
|
|
border-radius: 4px;
|
|
|
- // padding: 20px;
|
|
|
- // flex: 1;
|
|
|
width: calc(100% - 400px - 20px);
|
|
|
margin-right: 20px;
|
|
|
display: flex;
|
|
@@ -573,7 +382,6 @@ onMounted(async () => {
|
|
|
flex: 1;
|
|
|
.name {
|
|
|
font-size: 12px;
|
|
|
-
|
|
|
color: #39c55a;
|
|
|
margin-bottom: 10px;
|
|
|
span {
|