|
@@ -58,7 +58,7 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <LjDrawerQuoteList ref="QuoteListDrawerRef" :iforigin="isShowOriginFormulaMattress" />
|
|
|
+ <LjDrawerQuoteList ref="QuoteListDrawerRef" :iforigin="isShowOriginFormulaMattress" @closed="ifShowDrawer = false" />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="mattressQuote">
|
|
@@ -123,6 +123,7 @@ const loadingBtn = ref(false);
|
|
|
const deptEnum = ref([]);
|
|
|
const userListData = ref([]);
|
|
|
const QuoteListDrawerRef = ref(null);
|
|
|
+const ifShowDrawer = ref(false);
|
|
|
|
|
|
const { isShowOriginFormulaMattress } = storeToRefs(globalStore);
|
|
|
const loadingStatus = reactive({
|
|
@@ -197,6 +198,43 @@ const handleDBlClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $c
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const handleClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }: any) => {
|
|
|
+ if (ifShowDrawer.value) {
|
|
|
+ funcShowQuoteList(row);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const funcShowQuoteList = (curRecord: any) => {
|
|
|
+ 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);
|
|
|
+ ifShowDrawer.value = true;
|
|
|
+
|
|
|
+ loadingStatus.showQd = !loadingStatus.showQd;
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ loadingStatus.showQd = !loadingStatus.showQd;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
const rowClsNameFunc = (data: any) => {
|
|
|
const { row, rowIndex, $rowIndex } = data;
|
|
|
if (Number(row.flag) == 0) {
|
|
@@ -233,8 +271,8 @@ const tableEvents = {
|
|
|
// "checkbox-all": handleCheckboxChange,
|
|
|
// "checkbox-range-change": handleCheckboxChange,
|
|
|
// "current-change": handleCurrentChanged
|
|
|
- "cell-dblclick": handleDBlClickTable
|
|
|
- // "cell-click": handleClickTable
|
|
|
+ "cell-dblclick": handleDBlClickTable,
|
|
|
+ "cell-click": handleClickTable
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
@@ -534,33 +572,7 @@ const action: detailAction[] = [
|
|
|
// return;
|
|
|
}
|
|
|
|
|
|
- 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;
|
|
|
- });
|
|
|
+ funcShowQuoteList(curRecord);
|
|
|
}
|
|
|
}),
|
|
|
buttonDefault({
|