|
@@ -3,32 +3,109 @@
|
|
|
name="rpMustPayCrmDetail"
|
|
|
ref="LjDetailRef"
|
|
|
v-bind="detailProps"
|
|
|
- :data="mainData"
|
|
|
:request-api="getData"
|
|
|
:data-callback="dataCallback"
|
|
|
:init-param="initParams"
|
|
|
v-model:order-status="orderStatus"
|
|
|
:action="orderStatus ? orderEditAction : orderDefaultAction"
|
|
|
+ :after-mound="funcAfterMound"
|
|
|
>
|
|
|
<!-- @to-pin-detail="emit('toPinDetail')" -->
|
|
|
- <template #rpMustPayMxList>
|
|
|
+ <template #fabricMx>
|
|
|
+ <el-tabs v-model="fabricMxTabs" type="card" @tab-click="handleFabricMxTabsClick">
|
|
|
+ <template v-for="item in fabricMxTabList">
|
|
|
+ <el-tab-pane :label="item.label" :name="item.name" :key="item.name" v-if="item.visible()"></el-tab-pane>
|
|
|
+ </template>
|
|
|
+ </el-tabs>
|
|
|
<LjVxeTable
|
|
|
- ref="rpMustPayMxList"
|
|
|
+ ref="fabricMxRef"
|
|
|
row-key="key"
|
|
|
table-cls=""
|
|
|
- :request-api="getData_mx"
|
|
|
- :data-callback="dataCallback"
|
|
|
- :init-param="initParams"
|
|
|
+ :data="fabricMxData"
|
|
|
:columns="columnsMx"
|
|
|
:dwname="DwnameEnum.mattressQuoteMx"
|
|
|
:table-props="tableProps_mx"
|
|
|
+ :tool-button="[]"
|
|
|
+ :auto-load-layout="false"
|
|
|
+ collapseButtons
|
|
|
+ >
|
|
|
+ </LjVxeTable>
|
|
|
+ </template>
|
|
|
+ <template #bednetMx>
|
|
|
+ <LjVxeTable
|
|
|
+ ref="bednetMxRef"
|
|
|
+ row-key="key"
|
|
|
+ table-cls=""
|
|
|
+ :request-api="getData_bednet"
|
|
|
+ :data-callback="dataCallback"
|
|
|
+ :init-param="initParams"
|
|
|
+ :columns="columnsMxBednet"
|
|
|
+ :dwname="DwnameEnum.mattressQuoteMxBednet"
|
|
|
+ :table-props="tableProps_mx"
|
|
|
:tool-button="['export', 'refresh', 'setting']"
|
|
|
:auto-load-layout="false"
|
|
|
- pagination
|
|
|
+ collapseButtons
|
|
|
+ >
|
|
|
+ </LjVxeTable>
|
|
|
+ </template>
|
|
|
+ <template #cushionsMx>
|
|
|
+ <LjVxeTable
|
|
|
+ ref="cushionsMxRef"
|
|
|
+ row-key="key"
|
|
|
+ table-cls=""
|
|
|
+ :request-api="getData_cushions"
|
|
|
+ :data-callback="dataCallback"
|
|
|
+ :init-param="initParams"
|
|
|
+ :columns="columnsMxCushions"
|
|
|
+ :dwname="DwnameEnum.mattressQuoteMxCushions"
|
|
|
+ :table-props="tableProps_mx"
|
|
|
+ :tool-button="['export', 'refresh', 'setting']"
|
|
|
+ :auto-load-layout="false"
|
|
|
+ collapseButtons
|
|
|
+ >
|
|
|
+ </LjVxeTable>
|
|
|
+ </template>
|
|
|
+ <template #accessoriesMx>
|
|
|
+ <LjVxeTable
|
|
|
+ ref="accessoriesMxRef"
|
|
|
+ row-key="key"
|
|
|
+ table-cls=""
|
|
|
+ :request-api="getData_accessories"
|
|
|
+ :data-callback="dataCallback"
|
|
|
+ :init-param="initParams"
|
|
|
+ :columns="columnsMxAccessories"
|
|
|
+ :dwname="DwnameEnum.mattressQuoteMxAccessories"
|
|
|
+ :table-props="tableProps_mx"
|
|
|
+ :tool-button="['export', 'refresh', 'setting']"
|
|
|
+ :auto-load-layout="false"
|
|
|
+ collapseButtons
|
|
|
+ >
|
|
|
+ </LjVxeTable>
|
|
|
+ </template>
|
|
|
+ <template #innerClothLayerMx>
|
|
|
+ <LjVxeTable
|
|
|
+ ref="innerClothLayerMxRef"
|
|
|
+ row-key="key"
|
|
|
+ table-cls=""
|
|
|
+ :request-api="getData_innerClothLayer"
|
|
|
+ :data-callback="dataCallback"
|
|
|
+ :init-param="initParams"
|
|
|
+ :columns="columnsMxInnerClothLayer"
|
|
|
+ :dwname="DwnameEnum.mattressQuoteMxInnerClothLayer"
|
|
|
+ :table-props="tableProps_mx"
|
|
|
+ :tool-button="['export', 'refresh', 'setting']"
|
|
|
+ :auto-load-layout="false"
|
|
|
+ collapseButtons
|
|
|
>
|
|
|
</LjVxeTable>
|
|
|
</template>
|
|
|
</LjDetail>
|
|
|
+
|
|
|
+ <el-button v-if="ifAfterMound" class="btn-floating pl-8 pr-8 pt-15 pb-15 h-auto" round v-draggable-btn="oaFlowFloadProp">
|
|
|
+ <span class="text-vertical">
|
|
|
+ {{ $t("business.detail.formula") }}
|
|
|
+ </span>
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="mattressQuoteDetail">
|
|
@@ -42,13 +119,17 @@ import { useAuthButtons } from "@/hooks/useAuthButtons";
|
|
|
import LjVxeTable from "@/components/LjVxeTable/index.vue";
|
|
|
import { cloneDeep } from "lodash-es";
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
-import { CommonDynamicSelect } from "@/api/modules/common";
|
|
|
+import { CommonDynamicSelect, GetFormulaCompute } from "@/api/modules/common";
|
|
|
+import ToastFormula from "@/components/ToastWidget/Formula/index.vue";
|
|
|
+import { TYPE, useToast, POSITION } from "vue-toastification";
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
+import { calculateFormula } from "@/utils/index";
|
|
|
|
|
|
interface detailProp {
|
|
|
/**
|
|
|
* @argument any 页面数据
|
|
|
*/
|
|
|
- data?: any;
|
|
|
+ data1?: any;
|
|
|
/**
|
|
|
* @argument string 请求数据的api ==> 非必传
|
|
|
*/
|
|
@@ -66,35 +147,189 @@ interface detailProp {
|
|
|
const props = withDefaults(defineProps<detailProp>(), {});
|
|
|
const { t } = useI18n();
|
|
|
const route = useRoute();
|
|
|
-const { columns, columnsMx } = useHooks(t);
|
|
|
+const {
|
|
|
+ columns,
|
|
|
+ columnsMx,
|
|
|
+ columnsMxBednet,
|
|
|
+ columnsMxCushions,
|
|
|
+ columnsMxAccessories,
|
|
|
+ columnsMxInnerClothLayer,
|
|
|
+ LjDetailRef,
|
|
|
+ summaryData,
|
|
|
+ fieldParams
|
|
|
+} = useHooks(t);
|
|
|
const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
|
|
|
+const toast = useToast();
|
|
|
|
|
|
+const showFormula = ref(false);
|
|
|
const initParams = ref({ arg_mattressid: 0 });
|
|
|
-const mainData = ref([]);
|
|
|
const orderStatus = ref("");
|
|
|
+// const mainData = ref([]);
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description tab 面料
|
|
|
+ * ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
|
|
+ */
|
|
|
+const fabricMxData = ref([]);
|
|
|
+const fabricMxResData = ref();
|
|
|
+const fabricMxRef = ref();
|
|
|
+const fabricMxTabs = ref("fabricMx");
|
|
|
+const fabricMxTabList = ref([
|
|
|
+ {
|
|
|
+ label: "裥面",
|
|
|
+ name: "tabpage_8",
|
|
|
+ visible: () => Number(mattresstypeEnum.value.if_top_side) == 1,
|
|
|
+ type: [0, 80, 40, 50, 60, 70, 9000]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "裥底",
|
|
|
+ name: "tabpage_9",
|
|
|
+ visible: () => Number(mattresstypeEnum.value.if_button_sdie) == 1,
|
|
|
+ type: [1, 81, 41, 51, 61, 71, 9001]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "裥大恻",
|
|
|
+ name: "tabpage_10",
|
|
|
+ visible: () => Number(mattresstypeEnum.value.if_big_side) == 1,
|
|
|
+ type: [2, 82, 42, 52, 62, 72, 9002]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "裥小恻",
|
|
|
+ name: "tabpage_11",
|
|
|
+ visible: () => Number(mattresstypeEnum.value.if_small_side) == 1,
|
|
|
+ type: [3, 83, 43, 53, 63, 73, 9003]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "裥V恻",
|
|
|
+ name: "tabpage_12",
|
|
|
+ visible: () => Number(mattresstypeEnum.value.if_v_side) == 1,
|
|
|
+ type: [4, 84, 44, 54, 64, 74, 9004]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "拉手刺绣及其他工艺",
|
|
|
+ name: "tabpage_13",
|
|
|
+ visible: () => true,
|
|
|
+ type: [
|
|
|
+ 0, 80, 40, 50, 60, 70, 1, 81, 41, 51, 61, 71, 2, 82, 42, 52, 62, 72, 3, 83, 43, 53, 63, 73, 4, 84, 44, 54, 64, 74, 9000,
|
|
|
+ 9001, 9002, 9003, 9004, 9005, 9006
|
|
|
+ ]
|
|
|
+ }
|
|
|
+]);
|
|
|
+const mattresstypeEnum = ref<any>({});
|
|
|
+
|
|
|
+const getData_mx = (params: any) => {
|
|
|
+ console.log("getData params :>> ", params);
|
|
|
+ let newParams: any = {};
|
|
|
+ params.pageNum && (newParams.pageindex = params.pageNum);
|
|
|
+ params.pageSize && (newParams.pagesize = params.pageSize);
|
|
|
+ delete params.pageNum;
|
|
|
+ delete params.pageSize;
|
|
|
+ newParams.queryParams = params;
|
|
|
+ console.log("params :>> ", params);
|
|
|
+ newParams.dsname = "web_mattress_mx";
|
|
|
+ return CommonDynamicSelect(newParams, DwnameEnum.mattressQuoteMx);
|
|
|
+ // return [];
|
|
|
+};
|
|
|
+/**↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description tab 床网
|
|
|
+ * ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
|
|
+ */
|
|
|
+
|
|
|
+const getData_cushions = (params: any) => {
|
|
|
+ console.log("getData params :>> ", params);
|
|
|
+ let newParams: any = {};
|
|
|
+ params.pageNum && (newParams.pageindex = params.pageNum);
|
|
|
+ params.pageSize && (newParams.pagesize = params.pageSize);
|
|
|
+ delete params.pageNum;
|
|
|
+ delete params.pageSize;
|
|
|
+ newParams.queryParams = params;
|
|
|
+ console.log("params :>> ", params);
|
|
|
+ newParams.dsname = "web_mattress_mx_dianceng";
|
|
|
+ return CommonDynamicSelect(newParams, DwnameEnum.mattressQuoteMxBednet);
|
|
|
+};
|
|
|
+/**↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description tab 垫层
|
|
|
+ * ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
|
|
+ */
|
|
|
+
|
|
|
+const getData_accessories = (params: any) => {
|
|
|
+ console.log("getData params :>> ", params);
|
|
|
+ let newParams: any = {};
|
|
|
+ params.pageNum && (newParams.pageindex = params.pageNum);
|
|
|
+ params.pageSize && (newParams.pagesize = params.pageSize);
|
|
|
+ delete params.pageNum;
|
|
|
+ delete params.pageSize;
|
|
|
+ newParams.queryParams = params;
|
|
|
+ console.log("params :>> ", params);
|
|
|
+ newParams.dsname = "web_mattress_mx_no";
|
|
|
+ return CommonDynamicSelect(newParams, DwnameEnum.mattressQuoteMxCushions);
|
|
|
+};
|
|
|
+/**↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description tab 辅料
|
|
|
+ * ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
|
|
+ */
|
|
|
+
|
|
|
+const getData_bednet = (params: any) => {
|
|
|
+ console.log("getData params :>> ", params);
|
|
|
+ let newParams: any = {};
|
|
|
+ params.pageNum && (newParams.pageindex = params.pageNum);
|
|
|
+ params.pageSize && (newParams.pagesize = params.pageSize);
|
|
|
+ delete params.pageNum;
|
|
|
+ delete params.pageSize;
|
|
|
+ newParams.queryParams = params;
|
|
|
+ console.log("params :>> ", params);
|
|
|
+ newParams.dsname = "web_mattress_mx_bednet";
|
|
|
+ return CommonDynamicSelect(newParams, DwnameEnum.mattressQuoteMxAccessories);
|
|
|
+};
|
|
|
+/**↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description tab 内布套
|
|
|
+ * ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
|
|
+ */
|
|
|
+
|
|
|
+const getData_innerClothLayer = (params: any) => {
|
|
|
+ console.log("getData params :>> ", params);
|
|
|
+ let newParams: any = {};
|
|
|
+ params.pageNum && (newParams.pageindex = params.pageNum);
|
|
|
+ params.pageSize && (newParams.pagesize = params.pageSize);
|
|
|
+ delete params.pageNum;
|
|
|
+ delete params.pageSize;
|
|
|
+ newParams.queryParams = params;
|
|
|
+ console.log("params :>> ", params);
|
|
|
+ newParams.dsname = "web_mattress_mx_neibutao";
|
|
|
+ return CommonDynamicSelect(newParams, DwnameEnum.mattressQuoteMxInnerClothLayer);
|
|
|
+};
|
|
|
+/**↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */
|
|
|
|
|
|
const detailProps = reactive<DetailProp>({
|
|
|
dwname: DwnameEnum.mattressQuote,
|
|
|
columns: columns,
|
|
|
// headerstatus: ["status", "ifamt_ok"],
|
|
|
basicDefault: {
|
|
|
- basicGroup: [
|
|
|
- {
|
|
|
- label: "单据信息",
|
|
|
- span: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: "床垫信息",
|
|
|
- span: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: "报价信息",
|
|
|
- span: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: ""
|
|
|
- }
|
|
|
- ]
|
|
|
+ // basicGroup: [
|
|
|
+ // {
|
|
|
+ // label: "单据信息",
|
|
|
+ // span: 1
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "床垫信息",
|
|
|
+ // span: 1
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "报价信息",
|
|
|
+ // span: 1
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: ""
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
},
|
|
|
header: {
|
|
|
fieldNames: {
|
|
@@ -103,23 +338,68 @@ const detailProps = reactive<DetailProp>({
|
|
|
name: "name"
|
|
|
},
|
|
|
// icon: "iconclipboard",
|
|
|
- tabsProp: {
|
|
|
- scrollspy: true,
|
|
|
- sticky: true
|
|
|
- }
|
|
|
+ // tabsProp: {
|
|
|
+ // scrollspy: true,
|
|
|
+ // sticky: true
|
|
|
+ // }
|
|
|
+ floatbtn: [
|
|
|
+ {
|
|
|
+ id: "oaFlow",
|
|
|
+ originLeft: 100,
|
|
|
+ originTop: 50
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
mould: [
|
|
|
{
|
|
|
- id: "rpMustPayMxList",
|
|
|
+ id: "fabricMx",
|
|
|
+ type: "table",
|
|
|
+ label: t("business.detail.fabric")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "bednetMx",
|
|
|
+ type: "table",
|
|
|
+ label: t("business.detail.bednet")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "cushionsMx",
|
|
|
+ type: "table",
|
|
|
+ label: t("business.detail.cushions")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "accessoriesMx",
|
|
|
+ type: "table",
|
|
|
+ label: t("business.detail.accessories")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "packagMx",
|
|
|
+ type: "table",
|
|
|
+ label: t("business.detail.packag")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "innerClothLayerMx",
|
|
|
+ type: "table",
|
|
|
+ label: t("business.detail.innerClothLayer")
|
|
|
+ // limited: (params: any) => {
|
|
|
+ // if (!params) return true;
|
|
|
+ // return params?.if_n_butao == "0";
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "topCottonMx",
|
|
|
type: "table",
|
|
|
- label: t("business.takePay.mustPayMx")
|
|
|
+ label: t("business.detail.topCotton"),
|
|
|
+ limited: (params: any) => {
|
|
|
+ if (!params) return true;
|
|
|
+ return params?.if_w_butao == "0";
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
const tableProps_mx = {
|
|
|
- // height: "auto",
|
|
|
- height: "",
|
|
|
+ height: "auto",
|
|
|
+ // height: "",
|
|
|
minHeight: "300px",
|
|
|
editConfig: { trigger: "click", mode: "cell" }
|
|
|
// exportConfig: {
|
|
@@ -141,20 +421,6 @@ const getData = (params: any) => {
|
|
|
// return [];
|
|
|
};
|
|
|
|
|
|
-const getData_mx = (params: any) => {
|
|
|
- console.log("getData params :>> ", params);
|
|
|
- let newParams: any = {};
|
|
|
- params.pageNum && (newParams.pageindex = params.pageNum);
|
|
|
- params.pageSize && (newParams.pagesize = params.pageSize);
|
|
|
- delete params.pageNum;
|
|
|
- delete params.pageSize;
|
|
|
- newParams.queryParams = params;
|
|
|
- console.log("params :>> ", params);
|
|
|
- newParams.dsname = "web_mattress_mx";
|
|
|
- return CommonDynamicSelect(newParams, DwnameEnum.mattressQuoteMx);
|
|
|
- // return [];
|
|
|
-};
|
|
|
-
|
|
|
const dataCallback = (data: any) => {
|
|
|
console.log("dataCallback data :>> ", data);
|
|
|
return {
|
|
@@ -207,7 +473,7 @@ onMounted(async () => {
|
|
|
if (route.query?.id) {
|
|
|
// 赋值主表数据
|
|
|
// mainData.value = res.datatable.length ? res.datatable[0] : {};
|
|
|
- console.log("mainData.value :>> ", mainData.value);
|
|
|
+ // console.log("mainData.value :>> ", mainData.value);
|
|
|
// 刷新数据
|
|
|
initParams.value.arg_mattressid = Number(route.query?.id);
|
|
|
console.log("detail onMounted initParams.value :>> ", initParams.value);
|
|
@@ -216,6 +482,171 @@ onMounted(async () => {
|
|
|
// mainData.value = props.data;
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+const gotoOaFlow = async (timeout = 0) => {
|
|
|
+ console.log("LjDetailRef.value.mainData :>> ", LjDetailRef.value._mainData, summaryData.value);
|
|
|
+ let result = await calculateFormula(summaryData.value, fieldParams.value, LjDetailRef.value._mainData);
|
|
|
+ if (result.length) {
|
|
|
+ let _data = cloneDeep(LjDetailRef.value._mainData);
|
|
|
+ result.map((t, i) => {
|
|
|
+ _data[t.field] = t.value;
|
|
|
+ });
|
|
|
+ console.log("_data :>> ", _data, result);
|
|
|
+ toast.clear();
|
|
|
+ toast(
|
|
|
+ {
|
|
|
+ component: ToastFormula,
|
|
|
+ props: {
|
|
|
+ t: t,
|
|
|
+ formulas: summaryData.value,
|
|
|
+ data: _data,
|
|
|
+ fields: fieldParams.value,
|
|
|
+ showFormula: showFormula.value
|
|
|
+ },
|
|
|
+ listeners: {
|
|
|
+ toggleFormula: (data: any) => {
|
|
|
+ showFormula.value = data;
|
|
|
+ console.log("showFormula.value :>> ", showFormula.value);
|
|
|
+ },
|
|
|
+ refresh: () => {
|
|
|
+ gotoOaFlow();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position: POSITION.BOTTOM_RIGHT,
|
|
|
+ icon: false,
|
|
|
+ timeout: timeout,
|
|
|
+ closeButton: false,
|
|
|
+ toastClassName: "longjoe-toast"
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ ElMessage.error("计算公式有误");
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description 流转状况悬浮按钮参数
|
|
|
+ */
|
|
|
+const oaFlowFloadProp = ref<any>({
|
|
|
+ id: "oaFlow",
|
|
|
+ click: gotoOaFlow
|
|
|
+});
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description 详情页是否加载完成
|
|
|
+ */
|
|
|
+const ifAfterMound = ref(false);
|
|
|
+/**
|
|
|
+ * @description 页面数据加载完成
|
|
|
+ */
|
|
|
+const funcAfterMound = async () => {
|
|
|
+ console.log("onMounted detail sale start!!!! :>> ");
|
|
|
+ // console.log("LjDetailRef.value.currentMould :>> ", LjDetailRef.value.currentMould);
|
|
|
+ // console.log(
|
|
|
+ // "Boolean(Number(CheckOption(sysOptionEnum.sys_option_043))) :>> ",
|
|
|
+ // Boolean(Number(CheckOption(sysOptionEnum.sys_option_043)))
|
|
|
+ // );
|
|
|
+ // // 流转状况
|
|
|
+ // if (Boolean(Number(CheckOption(sysOptionEnum.sys_option_043))) && LjDetailRef.value.currentMould.header.floatbtn) {
|
|
|
+ let _oaflowbtn = LjDetailRef.value.currentMould.header.floatbtn.find((itm: any) => itm.id == "oaFlow");
|
|
|
+ if (_oaflowbtn) {
|
|
|
+ _oaflowbtn.originLeft && (oaFlowFloadProp.value.originLeft = _oaflowbtn.originLeft);
|
|
|
+ _oaflowbtn.originTop && (oaFlowFloadProp.value.originTop = _oaflowbtn.originTop);
|
|
|
+ }
|
|
|
+ // oaFlowFloadProp.value.change = LjDetailRef.value.toSetFloatBtnChange;
|
|
|
+
|
|
|
+ // if (!ALLOW_EDIT_STATE.includes(orderStatus.value)) {
|
|
|
+ // // 非新增、修改时执行
|
|
|
+ // getOaFlowList(initParams.value.scid, initParams.value.taskid).then(() => {
|
|
|
+ // if (oaFlowList.value.length) {
|
|
|
+ // gotoOaFlow();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (ALLOW_EDIT_STATE.includes(orderStatus.value)) {
|
|
|
+ // saleTaskMx_tableProps.value.editConfig.enabled = true;
|
|
|
+ // }
|
|
|
+ // if (orderStatus.value == "new") {
|
|
|
+ // nextTick(async () => {
|
|
|
+ // console.log("SaletaskmxListRef.value onmound new:>> ", SaletaskmxListRef.value);
|
|
|
+ // if (SaletaskmxListRef.value) {
|
|
|
+ // const $table = SaletaskmxListRef.value.element;
|
|
|
+ // if ($table) {
|
|
|
+ // const record = {};
|
|
|
+ // const { row: newRow } = await $table.insertAt(record, null);
|
|
|
+ // await $table.setEditCell(newRow, "mtrlcode");
|
|
|
+ // console.log("onMounted saletask finish :>> ", $table);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ if (!orderStatus.value) {
|
|
|
+ gotoOaFlow(8000);
|
|
|
+ }
|
|
|
+ ifAfterMound.value = true;
|
|
|
+
|
|
|
+ console.log("onMounted detail sale start LjDetailRef.value.mainData :>> ", LjDetailRef.value);
|
|
|
+
|
|
|
+ const { enumMap, _mainData } = LjDetailRef.value;
|
|
|
+ console.log("enumMap :>> ", enumMap, _mainData);
|
|
|
+ mattresstypeEnum.value = enumMap.get("mattresstypeid").find(t => t.value == _mainData.mattresstypeid);
|
|
|
+ console.log("mattresstypeEnum :>> ", mattresstypeEnum);
|
|
|
+
|
|
|
+ let itmshow = fabricMxTabList.value.find(t => t.visible());
|
|
|
+ fabricMxTabs.value = itmshow.name;
|
|
|
+
|
|
|
+ let res = await getData_mx(initParams.value);
|
|
|
+ fabricMxResData.value = dataCallback(res);
|
|
|
+ console.log("fabricMxRef.value :>> ", fabricMxRef.value);
|
|
|
+ funcGetFabricMxShowData(itmshow.name);
|
|
|
+ console.log("funcAfterMound resData :>> ", fabricMxData.value);
|
|
|
+};
|
|
|
+
|
|
|
+const funcGetFabricMxShowData = (tabname: string) => {
|
|
|
+ let item = fabricMxTabList.value.find(t => t.name == tabname);
|
|
|
+
|
|
|
+ fabricMxData.value = fabricMxResData.value.list.filter(t => item.type.includes(Number(t.formulakind)));
|
|
|
+ fabricMxRef.value.refresh();
|
|
|
+};
|
|
|
+
|
|
|
+const handleFabricMxTabsClick = (pane: any, val: any) => {
|
|
|
+ console.log("handleFabricMxTabsClick pane :>> ", pane.paneName);
|
|
|
+ console.log("handleFabricMxTabsClick val :>> ", val);
|
|
|
+ const $table = fabricMxRef.value.element;
|
|
|
+ const column = $table.getColumnByField("formulakind");
|
|
|
+ console.log("column :>> ", column);
|
|
|
+ console.log("column.filters :>> ", column.filters);
|
|
|
+ console.log("props.enum :>> ", column.filterRender.props.enum);
|
|
|
+
|
|
|
+ funcGetFabricMxShowData(pane.paneName);
|
|
|
+
|
|
|
+ // switch (pane.paneName) {
|
|
|
+ // case 'tabpage_8':
|
|
|
+ // LjDetailRef.value.element.setFilter('formulakind', )
|
|
|
+ // break;
|
|
|
+ // case 'tabpage_9':
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // case 'tabpage_10':
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // case 'tabpage_11':
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // case 'tabpage_12':
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // case 'tabpage_13':
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // default:
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|