|
@@ -55,6 +55,8 @@ interface defaultState {
|
|
|
VxeTableMxRef: any;
|
|
|
YwTableRef: any;
|
|
|
QdTableRef: any;
|
|
|
+ CodeMxDialogProps: any;
|
|
|
+ CodeMxDialogRef: any;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -80,7 +82,9 @@ export const useHooks = (t?: any) => {
|
|
|
MtrldefErpDialogProps: {},
|
|
|
workgrpEnum: [],
|
|
|
workgrpEnum2: [],
|
|
|
- configureTypeEnum: []
|
|
|
+ configureTypeEnum: [],
|
|
|
+ CodeMxDialogProps: null,
|
|
|
+ CodeMxDialogRef: null
|
|
|
});
|
|
|
|
|
|
const QdAddRowList = [
|
|
@@ -853,6 +857,7 @@ export const useHooks = (t?: any) => {
|
|
|
{...params}
|
|
|
clearable
|
|
|
placeholder="请选择配置"
|
|
|
+ onOpenModal={() => fModelChoseCodeMx(row, params, rModelSetCodemx, scope.row.bj_namemx, $table)}
|
|
|
onSelect={val => rModelSetCodemx(scope.row, val, $table)}
|
|
|
onClear={() => rModelClearCodemx(scope.row, $table)}
|
|
|
></CodemxSelect>
|
|
@@ -2263,6 +2268,38 @@ export const useHooks = (t?: any) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+ /**
|
|
|
+ * @description 弹窗模块:物料选择
|
|
|
+ * @param data 当前数据
|
|
|
+ * @param status 当前订单状态
|
|
|
+ * @returns Promise
|
|
|
+ */
|
|
|
+ const fModelChoseCodeMx = (data: any, params: any, cb: any, label?: string, $table?: any) => {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ // if (!ALLOW_EDIT_STATE.includes(status)) return;
|
|
|
+
|
|
|
+ let _params = {
|
|
|
+ keyword: "",
|
|
|
+ pzid: params.pzid
|
|
|
+ };
|
|
|
+ state.CodeMxDialogProps = {
|
|
|
+ onSubmit: (res: any) => {
|
|
|
+ // submit
|
|
|
+ console.log("openCustDialog res", res);
|
|
|
+ nextTick(() => {
|
|
|
+ cb(data, res.value[0], $table);
|
|
|
+ resolve(1);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel: (error: any) => {
|
|
|
+ // cancel 回调
|
|
|
+ console.log("openCustDialog error", error);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ state.CodeMxDialogRef.show(_params, label);
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
const dynamicRef = name => {
|
|
|
return state[name]; // 获取ref的值
|
|
|
};
|