added kilogram
This commit is contained in:
Vendored
+1
-5
@@ -42,11 +42,6 @@ declare module '@vue/runtime-core' {
|
||||
ARadio: typeof import('ant-design-vue/es')['Radio']
|
||||
ARadioButton: typeof import('ant-design-vue/es')['RadioButton']
|
||||
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
|
||||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||
ARadio: typeof import('ant-design-vue/es')['Radio']
|
||||
ARadioButton: typeof import('ant-design-vue/es')['RadioButton']
|
||||
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
|
||||
ARow: typeof import('ant-design-vue/es')['Row']
|
||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||
@@ -61,6 +56,7 @@ declare module '@vue/runtime-core' {
|
||||
AUpload: typeof import('ant-design-vue/es')['Upload']
|
||||
BaseButton: typeof import('./src/core/components/BaseButton/index.ts')['default']
|
||||
BaseCard: typeof import('./src/core/components/BaseCard/index.ts')['default']
|
||||
BaseCollapse: typeof import('./src/components/BaseCollapse.vue')['default']
|
||||
BaseDatePicker: typeof import('./src/core/components/BaseDatePicker/index.ts')['default']
|
||||
BaseIcon: typeof import('./src/core/components/BaseIcon/index.ts')['default']
|
||||
BaseInputNumber: typeof import('./src/core/components/BaseInputNumber/index.ts')['default']
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div v-if="weightOption === '1'" class="flex items-center">
|
||||
<span class="ml-4 ">وزن به گرم :</span>
|
||||
<span class="ml-4 ">{{ weightFieldLabel }} :</span>
|
||||
<BasicInput v-model:value="form.amount" type="number" />
|
||||
<div class="mt-1 mr-4" v-if="form.amount && form.amount < 1 && 0 < form.amount">معادل {{ form.amount * 1000 }} سوت</div>
|
||||
<div class="mt-1 mr-4" v-if="form.amount && form.amount < 1 && 0 < form.amount && !isBourseCuProject">معادل {{ form.amount * 1000 }} سوت</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -137,6 +137,7 @@ import BaseCollapse from '@/components/BaseCollapse.vue'
|
||||
import IndexImageUploader from '@/components/ProductUploader/IndexImageUploader.vue'
|
||||
import { getConfigApp } from '@/utils/config'
|
||||
import dayjs from 'dayjs'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
form: any
|
||||
@@ -156,6 +157,13 @@ const props = defineProps<{
|
||||
editId?: number
|
||||
}>()
|
||||
|
||||
const isBourseCuProject = computed(() => getConfigApp('name') === 'boursecu')
|
||||
const weightFieldLabel = computed(() =>
|
||||
isBourseCuProject.value && (props.form.unit === 'کیلوگرم' || !props.form.unit)
|
||||
? 'وزن به کیلوگرم'
|
||||
: 'وزن به گرم'
|
||||
)
|
||||
|
||||
function onOrderLimitChange(checked: boolean) {
|
||||
if (!checked) {
|
||||
props.form.min_order_cash = undefined
|
||||
|
||||
@@ -73,6 +73,7 @@ import {
|
||||
unwrapApiRecord
|
||||
} from '@/utils/file'
|
||||
import { normalizeProductOrderLimitForm, validateProductOrderLimitForm } from '@/utils/productOrderLimit'
|
||||
import { getConfigApp } from '@/utils/config'
|
||||
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
@@ -103,7 +104,14 @@ const customLocale = ref({
|
||||
}
|
||||
})
|
||||
|
||||
const unitItems: Array<Item> = [{ value: 'عدد' }, { value: 'گرم' }]
|
||||
const unitItems = computed<Array<Item>>(() => {
|
||||
if (getConfigApp('name') === 'boursecu') {
|
||||
return [{ value: 'کیلوگرم' }, { value: 'عدد' }, { value: 'گرم' }]
|
||||
}
|
||||
|
||||
return [{ value: 'عدد' }, { value: 'گرم' }]
|
||||
})
|
||||
|
||||
const GaroosiCategoryItems: Array<Item> = [
|
||||
{ value: 'طلا' },
|
||||
{ value: 'مکعب' },
|
||||
|
||||
Reference in New Issue
Block a user