refactor(storehouse): 使用共享的客户选项数据替换本地仓库类型选项
将仓库类型选项从本地定义改为从客户模块导入的共享数据,提高代码复用性和维护性
This commit is contained in:
parent
79e97ce31b
commit
c1eb1c70cd
12
jnpf-java-boot/jnpf-web/.vscode/settings.json
vendored
Normal file
12
jnpf-java-boot/jnpf-web/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
// 已修改但未暂存的文件:亮橙色,加粗
|
||||||
|
"gitDecoration.modifiedResourceForeground": "#FFA500",
|
||||||
|
// 已暂存的文件:亮绿色
|
||||||
|
"gitDecoration.stageModifiedResourceForeground": "#7FFF00",
|
||||||
|
// 新增但未追踪的文件:亮青色
|
||||||
|
"gitDecoration.untrackedResourceForeground": "#00FFFF",
|
||||||
|
// 被删除的文件:红色,删除线效果
|
||||||
|
"gitDecoration.deletedResourceForeground": "#FF4444",
|
||||||
|
// 冲突文件:洋红色
|
||||||
|
"gitDecoration.conflictingResourceForeground": "#FF00FF"
|
||||||
|
}
|
||||||
@ -42,6 +42,7 @@ NEW_FILE_CODE
|
|||||||
<script>
|
<script>
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import { customerOptions } from '../customer/options'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
@ -95,11 +96,7 @@ export default {
|
|||||||
{ fullName: "启用", id: 1 },
|
{ fullName: "启用", id: 1 },
|
||||||
{ fullName: "未启用", id: 2 },
|
{ fullName: "未启用", id: 2 },
|
||||||
],
|
],
|
||||||
storeTypeOptions: [
|
storeTypeOptions: customerOptions.storeType || [],
|
||||||
{ fullName: "原料库", id: 1 },
|
|
||||||
{ fullName: "在制品库", id: 2 },
|
|
||||||
{ fullName: "成品库", id: 3 },
|
|
||||||
],
|
|
||||||
storeTypeProps: { label: "fullName", value: "id" },
|
storeTypeProps: { label: "fullName", value: "id" },
|
||||||
enabledStatusProps: { label: "fullName", value: "id" },
|
enabledStatusProps: { label: "fullName", value: "id" },
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,7 +69,7 @@ import request from "@/utils/request";
|
|||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import JNPFForm from "./form";
|
import JNPFForm from "./form";
|
||||||
import jnpf from "@/utils/jnpf";
|
import jnpf from "@/utils/jnpf";
|
||||||
import { getCustomerLabel } from "../customer/options";
|
import { getCustomerLabel, customerOptions } from "../customer/options";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "storehouse",
|
name: "storehouse",
|
||||||
@ -104,11 +104,7 @@ export default {
|
|||||||
{ fullName: "启用", id: 1 },
|
{ fullName: "启用", id: 1 },
|
||||||
{ fullName: "未启用", id: 2 },
|
{ fullName: "未启用", id: 2 },
|
||||||
],
|
],
|
||||||
storeTypeOptions: [
|
storeTypeOptions: customerOptions.storeType || [],
|
||||||
{ fullName: "原料库", id: 1 },
|
|
||||||
{ fullName: "在制品库", id: 2 },
|
|
||||||
{ fullName: "成品库", id: 3 },
|
|
||||||
],
|
|
||||||
storeTypeProps: { label: "fullName", value: "id" },
|
storeTypeProps: { label: "fullName", value: "id" },
|
||||||
enabledStatusProps: { label: "fullName", value: "id" },
|
enabledStatusProps: { label: "fullName", value: "id" },
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user