|
@@ -33,8 +33,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #mattressQD>
|
|
|
- <el-row class="h-full" :gutter="10">
|
|
|
- <el-col :span="6" class="h-full">
|
|
|
+ <LjFoldLayout ref="LjFoldLayoutRef" v-bind="layoutSetting">
|
|
|
+ <template #left>
|
|
|
<LjVxeTable
|
|
|
ref="YwTableRef"
|
|
|
row-key="key"
|
|
@@ -49,8 +49,8 @@
|
|
|
collapseButtons
|
|
|
>
|
|
|
</LjVxeTable>
|
|
|
- </el-col>
|
|
|
- <el-col :span="18" class="h-full">
|
|
|
+ </template>
|
|
|
+ <div class="main-box flx-col">
|
|
|
<LjVxeTable
|
|
|
ref="QdTableRef"
|
|
|
row-key="key"
|
|
@@ -65,8 +65,8 @@
|
|
|
collapseButtons
|
|
|
>
|
|
|
</LjVxeTable>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ </div>
|
|
|
+ </LjFoldLayout>
|
|
|
</template>
|
|
|
</LjDetail>
|
|
|
|
|
@@ -75,7 +75,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx" name="mattressInterfaceDetail">
|
|
|
-import { ref, watch, reactive, inject, onMounted, computed, nextTick } from "vue";
|
|
|
+import { ref, watch, reactive, inject, onMounted, computed, nextTick, onBeforeMount } from "vue";
|
|
|
import { DwnameEnum } from "@/enums/dwnameEnum";
|
|
|
import LjDetail from "@/components/LjDetail/index.vue";
|
|
|
import { DetailProp } from "@/components/LjDetail/interface";
|
|
@@ -91,6 +91,7 @@ import { MittEnum } from "@/enums/mittEnum";
|
|
|
import MattressDialog from "@/views/system/selector/mattress/index.vue";
|
|
|
import MtrldefErpDialog from "@/views/system/selector/mtrldefErp/index.vue";
|
|
|
import { formatToDate } from "@/utils/dateUtil";
|
|
|
+import LjFoldLayout from "@/components/LjFoldLayout/index.vue";
|
|
|
|
|
|
interface detailProp {
|
|
|
/**
|
|
@@ -145,7 +146,7 @@ const {
|
|
|
toExcel,
|
|
|
toCreateMtrl,
|
|
|
toCreateORDelMtrlPf,
|
|
|
- toUpdateL1Planprice,
|
|
|
+ // toUpdateL1Planprice,
|
|
|
YWAudit,
|
|
|
JSAudit,
|
|
|
JS2Audit,
|
|
@@ -155,6 +156,8 @@ const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
|
|
|
|
|
|
const initParams = ref({ mattressid: 0 as Number });
|
|
|
|
|
|
+const layoutSetting = reactive({});
|
|
|
+
|
|
|
const detailProps = reactive<DetailProp>({
|
|
|
dwname: DwnameEnum.mattressInterfaceDetail,
|
|
|
columns: columns_detail,
|
|
@@ -193,10 +196,8 @@ const qdAction = [
|
|
|
label: "批量设置",
|
|
|
clickFunc: () => {
|
|
|
let _cur = QdTableRef.value.currentEditCell;
|
|
|
- console.log("qdAction _cur :>> ", _cur);
|
|
|
- console.log("qdAction ![d) :>> ", !["wrkgrpid", "wrkgrpid2", "useqty"].includes(_cur.field));
|
|
|
|
|
|
- if (!["wrkgrpid", "wrkgrpid2", "useqty"].includes(_cur.field)) {
|
|
|
+ if (!["wrkgrpid", "wrkgrpid2", "actual_useqty"].includes(_cur.field)) {
|
|
|
return ElMessage.warning("此列暂不支持批量设置(仅支持实际用量、工组)");
|
|
|
}
|
|
|
// return mattressQDList.value.length == 0;
|
|
@@ -209,7 +210,7 @@ const qdAction = [
|
|
|
if (visibleData) {
|
|
|
let _val = visibleData[_cur.rowIndex];
|
|
|
_data = visibleData.map((o, idx) => {
|
|
|
- if (o.useqty > 0 && idx > _cur.rowIndex) {
|
|
|
+ if (o.actual_useqty > 0 && idx > _cur.rowIndex) {
|
|
|
o[_cur.field] = _val[_cur.field];
|
|
|
if (_cur.field == "wrkgrpid1") {
|
|
|
o.wrkgrpcode1 = _val.wrkgrpcode1;
|
|
@@ -217,11 +218,18 @@ const qdAction = [
|
|
|
o.wrkgrpcode2 = _val.wrkgrpcode2;
|
|
|
}
|
|
|
}
|
|
|
+ if (_cur.field == "actual_useqty") {
|
|
|
+ if (o.useqty > 0 && idx > _cur.rowIndex) {
|
|
|
+ o[_cur.field] = _val[_cur.field];
|
|
|
+ }
|
|
|
+ }
|
|
|
return o;
|
|
|
});
|
|
|
|
|
|
$table.reloadData(_data);
|
|
|
resetMergeCellsQd();
|
|
|
+
|
|
|
+ ElMessage.success("批设成功(有实际用量的数据行)");
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -235,9 +243,21 @@ const orderDefaultAction = [
|
|
|
return !orderStatus.value;
|
|
|
},
|
|
|
clickFunc: item => {
|
|
|
- router.replace(
|
|
|
- `/erpapi/mattressInterface/detail?id=${LjDetailRef.value?._mainData.mattressid}&code=${LjDetailRef.value?._mainData.mattresscode}`
|
|
|
- );
|
|
|
+ // router.replace(
|
|
|
+ // `/erpapi/mattressInterface/detail?id=${LjDetailRef.value?._mainData.mattressid}&code=${LjDetailRef.value?._mainData.mattresscode}`
|
|
|
+ // );
|
|
|
+
|
|
|
+ const _cur = mainData.value[0];
|
|
|
+ router.push({
|
|
|
+ name: "mattressInterfaceDetail",
|
|
|
+ params: {
|
|
|
+ id: _cur.mattressid
|
|
|
+ },
|
|
|
+ query: {
|
|
|
+ code: _cur.mattresscode
|
|
|
+ },
|
|
|
+ replace: true
|
|
|
+ });
|
|
|
}
|
|
|
}),
|
|
|
buttonDefault({
|
|
@@ -270,10 +290,23 @@ const orderDefaultAction = [
|
|
|
message: t("sys.api.sueccessToSave"),
|
|
|
type: "success"
|
|
|
});
|
|
|
- tabRemove(route.fullPath);
|
|
|
- router.push(
|
|
|
- `/erpapi/mattressInterface/detail?id=${LjDetailRef.value?._mainData.mattressid}&code=${LjDetailRef.value?._mainData.mattresscode}`
|
|
|
- );
|
|
|
+ // tabRemove(route.fullPath);
|
|
|
+ // router.replace(
|
|
|
+ // `/erpapi/mattressInterface/detail?id=${LjDetailRef.value?._mainData.mattressid}&code=${LjDetailRef.value?._mainData.mattresscode}`
|
|
|
+ // );
|
|
|
+
|
|
|
+ // const _cur = LjDetailRef.value?._mainData;
|
|
|
+ // router.push({
|
|
|
+ // name: "mattressInterfaceDetail",
|
|
|
+ // params: {
|
|
|
+ // id: _cur.mattressid
|
|
|
+ // },
|
|
|
+ // query: {
|
|
|
+ // code: _cur.mattresscode
|
|
|
+ // },
|
|
|
+ // replace: true
|
|
|
+ // });
|
|
|
+ // LjDetailRef.value.refresh();
|
|
|
loadingStatus.save = false;
|
|
|
})
|
|
|
.catch(error => {
|
|
@@ -504,23 +537,31 @@ const orderDefaultAction = [
|
|
|
],
|
|
|
buttonDefault({
|
|
|
label: "生成/更新物料",
|
|
|
- power: 90,
|
|
|
+ power: 88,
|
|
|
limited: () => {
|
|
|
return !!orderStatus.value;
|
|
|
},
|
|
|
clickFunc: item => {
|
|
|
- toCreateMtrl(1, LjDetailRef.value?._mainData.mattressid);
|
|
|
+ toCreateMtrl(1, { list: [LjDetailRef.value?._mainData.mattressid] });
|
|
|
}
|
|
|
}),
|
|
|
[
|
|
|
buttonDefault({
|
|
|
label: "生成金蝶清单",
|
|
|
power: 90,
|
|
|
+ disabledTextCallBack: (data: any) => {
|
|
|
+ console.log("生成金蝶清单 disabledTextCallBack data", data);
|
|
|
+ if (data.js2_flag == 0) {
|
|
|
+ return "床垫清单未审核,无法生成金蝶清单";
|
|
|
+ }
|
|
|
+
|
|
|
+ return "";
|
|
|
+ },
|
|
|
limited: () => {
|
|
|
return !!orderStatus.value;
|
|
|
},
|
|
|
clickFunc: item => {
|
|
|
- toCreateORDelMtrlPf(1, LjDetailRef.value?._mainData.mattressid);
|
|
|
+ toCreateORDelMtrlPf(1, { list: [LjDetailRef.value?._mainData.mattressid] });
|
|
|
}
|
|
|
})
|
|
|
// buttonDefault({
|
|
@@ -550,9 +591,22 @@ const orderDefaultAction = [
|
|
|
];
|
|
|
|
|
|
const routeToEdit = (type: any) => {
|
|
|
- console.log("routeToEdit mainData :>> ", mainData);
|
|
|
+ console.log("routeToEdit mainData :>> ", mainData, route.fullPath);
|
|
|
+
|
|
|
const _cur = mainData.value[0];
|
|
|
- router.push(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
|
|
|
+ // router.replace(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
|
|
|
+
|
|
|
+ router.push({
|
|
|
+ name: "mattressInterfaceEditYw",
|
|
|
+ params: {
|
|
|
+ id: _cur.mattressid
|
|
|
+ },
|
|
|
+ query: {
|
|
|
+ code: _cur.mattresscode,
|
|
|
+ type: type
|
|
|
+ },
|
|
|
+ replace: true
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -576,6 +630,14 @@ const funcAfterMound = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+onBeforeMount(() => {
|
|
|
+ if (route.params?.id) {
|
|
|
+ // 刷新数据
|
|
|
+ initParams.value.mattressid = Number(route.params?.id);
|
|
|
+ editType.value = Number(route.query?.type);
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
console.log("route onMounted:>> ", route);
|
|
|
console.log("route onMounted:>> ", route.params);
|
|
@@ -603,10 +665,10 @@ onMounted(async () => {
|
|
|
const result2 = await GetERPWrkGrpList2();
|
|
|
workgrpEnum2.value = result2.datatable ?? [];
|
|
|
|
|
|
- if (route.query?.id) {
|
|
|
+ if (route.params?.id) {
|
|
|
// 刷新数据
|
|
|
- initParams.value.mattressid = Number(route.query?.id);
|
|
|
- editType.value = Number(route.query?.type);
|
|
|
+ // initParams.value.mattressid = Number(route.params?.id);
|
|
|
+ // editType.value = Number(route.query?.type);
|
|
|
console.log("detail onMounted initParams.value :>> ", initParams.value);
|
|
|
console.log("领用工组领用工组领用工组领用工组 columns_qd.value :>> ", columns_qd.value);
|
|
|
await RetriveMattressInterface(initParams.value.mattressid.valueOf());
|