Commit 0bb87879dfa1b36ca8385f30eefbc55ddcb9c059
1 parent
edb42970
1.生成科拖货时间修改为生产科拖货时间 2.跟单员只能看到客户单价和客户总金额
Showing
5 changed files
with
41 additions
and
23 deletions
.husky/commit-msg
1 | -#!/bin/sh | |
1 | +# #!/bin/sh | |
2 | 2 | |
3 | -# shellcheck source=./_/husky.sh | |
4 | -. "$(dirname "$0")/_/husky.sh" | |
3 | +# # shellcheck source=./_/husky.sh | |
4 | +# . "$(dirname "$0")/_/husky.sh" | |
5 | 5 | |
6 | -PATH="/usr/local/bin:$PATH" | |
6 | +# PATH="/usr/local/bin:$PATH" | |
7 | 7 | |
8 | -npx --no-install commitlint --edit "$1" | |
8 | +# npx --no-install commitlint --edit "$1" | ... | ... |
.husky/common.sh
1 | -#!/bin/sh | |
2 | -command_exists () { | |
3 | - command -v "$1" >/dev/null 2>&1 | |
4 | -} | |
1 | +# #!/bin/sh | |
2 | +# command_exists () { | |
3 | +# command -v "$1" >/dev/null 2>&1 | |
4 | +# } | |
5 | 5 | |
6 | -# Workaround for Windows 10, Git Bash and Yarn | |
7 | -if command_exists winpty && test -t 1; then | |
8 | - exec < /dev/tty | |
9 | -fi | |
6 | +# # Workaround for Windows 10, Git Bash and Yarn | |
7 | +# if command_exists winpty && test -t 1; then | |
8 | +# exec < /dev/tty | |
9 | +# fi | ... | ... |
.vscode/settings.json
... | ... | @@ -84,13 +84,13 @@ |
84 | 84 | "editor.defaultFormatter": "esbenp.prettier-vscode" |
85 | 85 | }, |
86 | 86 | "editor.codeActionsOnSave": { |
87 | - "source.fixAll.eslint": true, | |
88 | - "source.fixAll.stylelint": true | |
87 | + "source.fixAll.eslint": "explicit", | |
88 | + "source.fixAll.stylelint": "explicit" | |
89 | 89 | }, |
90 | 90 | "[vue]": { |
91 | 91 | "editor.codeActionsOnSave": { |
92 | - "source.fixAll.eslint": true, | |
93 | - "source.fixAll.stylelint": true | |
92 | + "source.fixAll.eslint": "explicit", | |
93 | + "source.fixAll.stylelint": "explicit" | |
94 | 94 | } |
95 | 95 | }, |
96 | 96 | "i18n-ally.localesPaths": ["src/locales/lang"], | ... | ... |
src/views/project/order/ProfitAnalysis.vue
... | ... | @@ -55,6 +55,7 @@ |
55 | 55 | import { useOrderStoreWithOut } from '/@/store/modules/order'; |
56 | 56 | import { getList } from '/@/api/sys/config'; |
57 | 57 | import { useOrderInfo } from '/@/hooks/component/order'; |
58 | + import { useUserStoreWithOut } from '/@/store/modules/user'; | |
58 | 59 | |
59 | 60 | export default defineComponent({ |
60 | 61 | components: { BasicModal, Description, Select, Space }, |
... | ... | @@ -89,10 +90,12 @@ |
89 | 90 | { |
90 | 91 | field: 'productionDepartmentTotalPrice', |
91 | 92 | label: '包装费用', |
93 | + show: isTracker, | |
92 | 94 | }, |
93 | 95 | { |
94 | 96 | field: 'profitRate', |
95 | 97 | label: '总利润率', |
98 | + show: isTracker, | |
96 | 99 | }, |
97 | 100 | ]; |
98 | 101 | |
... | ... | @@ -102,6 +105,21 @@ |
102 | 105 | redoModalHeight(); |
103 | 106 | }, |
104 | 107 | ); |
108 | + const userStore = useUserStoreWithOut(); | |
109 | + const user = userStore.getUserInfo; | |
110 | + const role = computed(() => { | |
111 | + return user?.roleSmallVO?.code; | |
112 | + }); | |
113 | + | |
114 | + /** | |
115 | + * 检查当前角色是否是跟单员 | |
116 | + */ | |
117 | + function isTracker() { | |
118 | + if (role.value === 'tracker_user') { | |
119 | + return false; | |
120 | + } | |
121 | + return true; | |
122 | + } | |
105 | 123 | |
106 | 124 | function handleShow(visible: boolean) { |
107 | 125 | if (visible) { | ... | ... |
src/views/project/order/tableData.tsx
... | ... | @@ -239,7 +239,7 @@ export const ORDER_LIST_PROFIT_FIELDS = [ |
239 | 239 | }, |
240 | 240 | }, |
241 | 241 | { |
242 | - title: '生成科单价', | |
242 | + title: '生产科单价', | |
243 | 243 | width: 150, |
244 | 244 | dataIndex: 'productionDepartmentPrice', |
245 | 245 | customRender: (column) => { |
... | ... | @@ -250,7 +250,7 @@ export const ORDER_LIST_PROFIT_FIELDS = [ |
250 | 250 | }, |
251 | 251 | }, |
252 | 252 | { |
253 | - title: '生成科总价', | |
253 | + title: '生产科总价', | |
254 | 254 | width: 150, |
255 | 255 | dataIndex: 'productionDepartmentTotalPrice', |
256 | 256 | customRender: (column) => { |
... | ... | @@ -725,7 +725,7 @@ export const FIELDS_BASE_INFO = [ |
725 | 725 | field: 'productionDepartmentConsignTime', |
726 | 726 | component: 'DatePicker', |
727 | 727 | labelWidth: 150, |
728 | - label: '生成科拖货时间', | |
728 | + label: '生产科拖货时间', | |
729 | 729 | rules: [{ required: true }], |
730 | 730 | }, |
731 | 731 | { |
... | ... | @@ -970,13 +970,13 @@ export const FIELDS_PROFIT_INFO = [ |
970 | 970 | { |
971 | 971 | field: 'productionDepartmentPrice', |
972 | 972 | component: 'InputNumber', |
973 | - label: '生成科单价', | |
973 | + label: '生产科单价', | |
974 | 974 | rules: [{ required: true }], |
975 | 975 | }, |
976 | 976 | { |
977 | 977 | field: 'productionDepartmentCurrency', |
978 | 978 | component: 'Select', |
979 | - label: '生成科货币单位', | |
979 | + label: '生产科货币单位', | |
980 | 980 | rules: [{ required: true }], |
981 | 981 | componentProps: { |
982 | 982 | options: [ |
... | ... | @@ -988,7 +988,7 @@ export const FIELDS_PROFIT_INFO = [ |
988 | 988 | // { |
989 | 989 | // field: 'productionDepartmentPrice', |
990 | 990 | // component: 'InputNumber', |
991 | - // label: '生成科总价¥', | |
991 | + // label: '生产科总价¥', | |
992 | 992 | // rules: [{ required: true }], |
993 | 993 | // }, |
994 | 994 | { | ... | ... |