|
@@ -521,39 +521,46 @@ const action: detailAction[] = [
|
|
|
loading: () => loadingStatus.showQd,
|
|
|
power: 72,
|
|
|
clickFunc: async item => {
|
|
|
- loadingStatus.showQd = !loadingStatus.showQd;
|
|
|
- const { curRecords } = getCurrentRecords(vxeTableRef.value);
|
|
|
+ // const { curRecords } = getCurrentRecords(vxeTableRef.value);
|
|
|
|
|
|
- console.log("curRecords :>> ", curRecords);
|
|
|
- if (!curRecords.length) {
|
|
|
+ const curRecord = vxeTableRef.value.element.getCurrentRecord() ?? null;
|
|
|
+
|
|
|
+ // console.log("curRecords :>> ", curRecords);
|
|
|
+ if (!curRecord) {
|
|
|
ElMessage.warning(t("business.tips.mattress.records"));
|
|
|
return;
|
|
|
- } else if (curRecords.length > 1) {
|
|
|
- ElMessage.warning(`无法进行多单${t("common.showQuoteList")}`);
|
|
|
- return;
|
|
|
+ // } else if (curRecords.length > 1) {
|
|
|
+ // ElMessage.warning(`无法进行多单${t("common.showQuoteList")}`);
|
|
|
+ // return;
|
|
|
}
|
|
|
|
|
|
- const res = await GetComputeMattressById({
|
|
|
- mattressid: curRecords[0].mattressid,
|
|
|
- check_original: Number(isShowOriginFormulaMattress.value)
|
|
|
- });
|
|
|
- const isQuoteListMxData = getQuoteListMxData(funcChaifenTabPro(res.mattress, res.mattressMx));
|
|
|
- let _data = {
|
|
|
- data: res.mattress,
|
|
|
- mxdata: isQuoteListMxData,
|
|
|
- enumMap: vxeTableRef.value.enumMap,
|
|
|
- fabricMx: fabricMxTabList.value,
|
|
|
- formulakindenum: formulaKindEnum.value,
|
|
|
- dannum_type: res.mattress.dannum_type,
|
|
|
- formula: res.formulas, //
|
|
|
- replace: res.replace, //
|
|
|
- formula_ori: res.formulas_origin, //
|
|
|
- formula_bednet: res.formulas_bednet, //
|
|
|
- differ: res.differ //
|
|
|
- };
|
|
|
- QuoteListDrawerRef.value.show(_data);
|
|
|
-
|
|
|
loadingStatus.showQd = !loadingStatus.showQd;
|
|
|
+ GetComputeMattressById({
|
|
|
+ mattressid: curRecord.mattressid,
|
|
|
+ check_original: Number(isShowOriginFormulaMattress.value)
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ const isQuoteListMxData = getQuoteListMxData(funcChaifenTabPro(res.mattress, res.mattressMx));
|
|
|
+ let _data = {
|
|
|
+ data: res.mattress,
|
|
|
+ mxdata: isQuoteListMxData,
|
|
|
+ enumMap: vxeTableRef.value.enumMap,
|
|
|
+ fabricMx: fabricMxTabList.value,
|
|
|
+ formulakindenum: formulaKindEnum.value,
|
|
|
+ dannum_type: res.mattress.dannum_type,
|
|
|
+ formula: res.formulas, //
|
|
|
+ replace: res.replace, //
|
|
|
+ formula_ori: res.formulas_origin, //
|
|
|
+ formula_bednet: res.formulas_bednet, //
|
|
|
+ differ: res.differ //
|
|
|
+ };
|
|
|
+ QuoteListDrawerRef.value.show(_data);
|
|
|
+
|
|
|
+ loadingStatus.showQd = !loadingStatus.showQd;
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ loadingStatus.showQd = !loadingStatus.showQd;
|
|
|
+ });
|
|
|
}
|
|
|
}),
|
|
|
buttonDefault({
|