|
@@ -1757,7 +1757,7 @@ const save = async () => {
|
|
|
|
|
|
|
|
// 主副规格
|
|
// 主副规格
|
|
|
let subspecs = [];
|
|
let subspecs = [];
|
|
|
- let $table_subspecs = subSpecsRef.value.element;
|
|
|
|
|
|
|
+ let $table_subspecs = subSpecsRef.value?.element;
|
|
|
if ($table_subspecs) {
|
|
if ($table_subspecs) {
|
|
|
$table_subspecs.clearEdit();
|
|
$table_subspecs.clearEdit();
|
|
|
subspecs = $table_subspecs.getTableData().visibleData;
|
|
subspecs = $table_subspecs.getTableData().visibleData;
|
|
@@ -1797,7 +1797,7 @@ const save = async () => {
|
|
|
|
|
|
|
|
// 特殊工艺
|
|
// 特殊工艺
|
|
|
let extraProcesses = [];
|
|
let extraProcesses = [];
|
|
|
- let $table_processes = specialProcessesMxRef.value.element;
|
|
|
|
|
|
|
+ let $table_processes = specialProcessesMxRef.value?.element;
|
|
|
if ($table_processes) {
|
|
if ($table_processes) {
|
|
|
$table_processes.clearEdit();
|
|
$table_processes.clearEdit();
|
|
|
console.log("$table_processes.getTableData() :>> ", $table_processes.getTableData());
|
|
console.log("$table_processes.getTableData() :>> ", $table_processes.getTableData());
|
|
@@ -1809,7 +1809,7 @@ const save = async () => {
|
|
|
|
|
|
|
|
// 材料额外费用
|
|
// 材料额外费用
|
|
|
let extraCosts = [];
|
|
let extraCosts = [];
|
|
|
- let $table_costs = additionalCostsMxRef.value.element;
|
|
|
|
|
|
|
+ let $table_costs = additionalCostsMxRef.value?.element;
|
|
|
if ($table_costs) {
|
|
if ($table_costs) {
|
|
|
$table_costs.clearEdit();
|
|
$table_costs.clearEdit();
|
|
|
extraCosts = $table_costs.getTableData().visibleData;
|
|
extraCosts = $table_costs.getTableData().visibleData;
|
|
@@ -2395,7 +2395,7 @@ const handleSelFabricMxNewMtrlGroup = async (target: string, item: any) => {
|
|
|
console.log("handleSelFabricMxNewMtrlGroup target :>> ", target, item, fabricMxTab10.value);
|
|
console.log("handleSelFabricMxNewMtrlGroup target :>> ", target, item, fabricMxTab10.value);
|
|
|
if (target == "tabpage_10") {
|
|
if (target == "tabpage_10") {
|
|
|
// 裥大恻
|
|
// 裥大恻
|
|
|
- const $table = fabricMxTab10Ref.value.element;
|
|
|
|
|
|
|
+ const $table = fabricMxTab10Ref.value?.element;
|
|
|
const { visibleData } = $table.getTableData();
|
|
const { visibleData } = $table.getTableData();
|
|
|
let hasSame = visibleData.findIndex(t => t.sortcode == item.label);
|
|
let hasSame = visibleData.findIndex(t => t.sortcode == item.label);
|
|
|
if (hasSame > -1) {
|
|
if (hasSame > -1) {
|
|
@@ -2426,7 +2426,7 @@ const handleSelFabricMxNewMtrlGroup = async (target: string, item: any) => {
|
|
|
autoLoadExtraData(fabricMxTab10Ref.value, specialProcessesMxRef.value);
|
|
autoLoadExtraData(fabricMxTab10Ref.value, specialProcessesMxRef.value);
|
|
|
} else if (target == "tabpage_11") {
|
|
} else if (target == "tabpage_11") {
|
|
|
// 裥小恻
|
|
// 裥小恻
|
|
|
- const $table = fabricMxTab11Ref.value.element;
|
|
|
|
|
|
|
+ const $table = fabricMxTab11Ref.value?.element;
|
|
|
const { visibleData } = $table.getTableData();
|
|
const { visibleData } = $table.getTableData();
|
|
|
let hasSame = visibleData.findIndex(t => t.sortcode == item.label);
|
|
let hasSame = visibleData.findIndex(t => t.sortcode == item.label);
|
|
|
if (hasSame > -1) {
|
|
if (hasSame > -1) {
|
|
@@ -2456,9 +2456,9 @@ const handleDelFabricMxNewMtrlGroup = (target: string) => {
|
|
|
let sameMx = [];
|
|
let sameMx = [];
|
|
|
let $table = null;
|
|
let $table = null;
|
|
|
if (target == "tabpage_10") {
|
|
if (target == "tabpage_10") {
|
|
|
- $table = fabricMxTab10Ref.value.element;
|
|
|
|
|
|
|
+ $table = fabricMxTab10Ref.value?.element;
|
|
|
} else if (target == "tabpage_11") {
|
|
} else if (target == "tabpage_11") {
|
|
|
- $table = fabricMxTab11Ref.value.element;
|
|
|
|
|
|
|
+ $table = fabricMxTab11Ref.value?.element;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($table) {
|
|
if ($table) {
|
|
@@ -2757,7 +2757,7 @@ const toAddMx_cushions = async (type: number) => {
|
|
|
|
|
|
|
|
console.log("wf_rtr_cwdc formulakind :>> ", row, row.formulakind);
|
|
console.log("wf_rtr_cwdc formulakind :>> ", row, row.formulakind);
|
|
|
if (row.formulakind == 999) {
|
|
if (row.formulakind == 999) {
|
|
|
- const $table_bednet = bednetMxRef.value.element;
|
|
|
|
|
|
|
+ const $table_bednet = bednetMxRef.value?.element;
|
|
|
if ($table_bednet) {
|
|
if ($table_bednet) {
|
|
|
const { visibleData: visibleData_bednet } = $table_bednet.getTableData();
|
|
const { visibleData: visibleData_bednet } = $table_bednet.getTableData();
|
|
|
let curIndex = visibleData_bednet.length - 1;
|
|
let curIndex = visibleData_bednet.length - 1;
|
|
@@ -2814,7 +2814,7 @@ const handleAddBednetMx = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const handleEditBednetMx = () => {
|
|
const handleEditBednetMx = () => {
|
|
|
- const $table = bednetMxRef.value.element;
|
|
|
|
|
|
|
+ const $table = bednetMxRef.value?.element;
|
|
|
|
|
|
|
|
if ($table) {
|
|
if ($table) {
|
|
|
const { $table, curRecords } = getCurrentRecords(bednetMxRef.value);
|
|
const { $table, curRecords } = getCurrentRecords(bednetMxRef.value);
|
|
@@ -2840,7 +2840,7 @@ const handleEditBednetMx = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const autoBednetSave = async (res: any, oldBednetid: number) => {
|
|
const autoBednetSave = async (res: any, oldBednetid: number) => {
|
|
|
- const $table = bednetMxRef.value.element;
|
|
|
|
|
|
|
+ const $table = bednetMxRef.value?.element;
|
|
|
|
|
|
|
|
let _res = res.bednet;
|
|
let _res = res.bednet;
|
|
|
_res.bednet_height = res.bednet.mattress_height;
|
|
_res.bednet_height = res.bednet.mattress_height;
|
|
@@ -2901,12 +2901,12 @@ const SetCurrentTabs = (data: any) => {
|
|
|
* @description 新增主副规格
|
|
* @description 新增主副规格
|
|
|
*/
|
|
*/
|
|
|
const toAddMx_subSpecs = async () => {
|
|
const toAddMx_subSpecs = async () => {
|
|
|
- const $table = subSpecsRef.value.element;
|
|
|
|
|
|
|
+ const $table = subSpecsRef.value?.element;
|
|
|
if ($table) {
|
|
if ($table) {
|
|
|
// updateSubspecsTable();
|
|
// updateSubspecsTable();
|
|
|
|
|
|
|
|
console.log("$table.getTable :>> ", $table.getTableData());
|
|
console.log("$table.getTable :>> ", $table.getTableData());
|
|
|
- const $tableCushions = cushionsMxRef.value.element;
|
|
|
|
|
|
|
+ const $tableCushions = cushionsMxRef.value?.element;
|
|
|
let cushionsAttr = {};
|
|
let cushionsAttr = {};
|
|
|
if ($tableCushions) {
|
|
if ($tableCushions) {
|
|
|
let idx = 0;
|
|
let idx = 0;
|