|
@@ -4,49 +4,49 @@
|
|
|
<template #default="{ animation }">
|
|
<template #default="{ animation }">
|
|
|
<app-view class="g-form">
|
|
<app-view class="g-form">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
- <app-navbar title="提货" @back="closed" />
|
|
|
|
|
|
|
+ <app-navbar :title="$t('operation.pickup')" @back="closed" />
|
|
|
</template>
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
|
- <CellGroup title="现货持仓信息" inset>
|
|
|
|
|
- <Cell title="商品代码/名称" :value="`${selectedRow.wrstandardcode}/${selectedRow.wrstandardname}`" />
|
|
|
|
|
- <Cell title="仓库" :value="selectedRow.warehousename" />
|
|
|
|
|
- <Cell title="库存量" :value="selectedRow.qty" />
|
|
|
|
|
- <Cell title="冻结量" :value="selectedRow.freezerqty" />
|
|
|
|
|
- <Cell title="可用量" :value="selectedRow.enableqty" />
|
|
|
|
|
|
|
+ <CellGroup :title="$t('position.spot.subtitle')" inset>
|
|
|
|
|
+ <Cell :title="$t('position.spot.goodsname')" :value="`${selectedRow.wrstandardcode}/${selectedRow.wrstandardname}`" />
|
|
|
|
|
+ <Cell :title="$t('position.spot.warehousename')" :value="selectedRow.warehousename" />
|
|
|
|
|
+ <Cell :title="$t('position.spot.qty')" :value="selectedRow.qty" />
|
|
|
|
|
+ <Cell :title="$t('position.spot.freezerqty')" :value="selectedRow.freezerqty" />
|
|
|
|
|
+ <Cell :title="$t('position.spot.enableqty')" :value="selectedRow.enableqty" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
- <CellGroup title="挂牌信息" inset>
|
|
|
|
|
- <Field name="OrderQty" :rules="formRules.orderQty" label="提货数量">
|
|
|
|
|
|
|
+ <CellGroup :title="$t('position.spot.subtitle2')" inset>
|
|
|
|
|
+ <Field name="OrderQty" :rules="formRules.orderQty" :label="$t('position.spot.orderqty2')">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<Stepper v-model="orderQty" theme="round" button-size="22" :auto-fixed="false" integer />
|
|
<Stepper v-model="orderQty" theme="round" button-size="22" :auto-fixed="false" integer />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field label="提货方式" is-link>
|
|
|
|
|
|
|
+ <Field :label="$t('position.spot.appointmentmodel')" is-link>
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-select v-model="formData.AppointmentModel" :options="getAppointmentModelOutList()" />
|
|
<app-select v-model="formData.AppointmentModel" :options="getAppointmentModelOutList()" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="ContractName" label="联系人" v-model="formData.ContactName" placeholder="必填"
|
|
|
|
|
|
|
+ <Field name="ContractName" :label="$t('position.spot.contactname')" v-model="formData.ContactName" :placeholder="$t('common.require')"
|
|
|
:rules="formRules.ContactName" right-icon="add-o" @click-right-icon="showContact = true" />
|
|
:rules="formRules.ContactName" right-icon="add-o" @click-right-icon="showContact = true" />
|
|
|
- <Field name="ContactNum" label="联系方式" v-model="formData.ContactNum" placeholder="必填"
|
|
|
|
|
|
|
+ <Field name="ContactNum" :label="$t('position.spot.contactnum')" v-model="formData.ContactNum" :placeholder="$t('common.require')"
|
|
|
:rules="formRules.ContactNum" />
|
|
:rules="formRules.ContactNum" />
|
|
|
<template v-if="formData.AppointmentModel === 1">
|
|
<template v-if="formData.AppointmentModel === 1">
|
|
|
- <Field :rules="formRules.Region" name="Region" label="收货地区" is-link v-if="!animation">
|
|
|
|
|
|
|
+ <Field :rules="formRules.Region" name="Region" :label="$t('position.spot.district')" is-link v-if="!animation">
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<component :is="AppRegion" v-model="formData.DistrictID" v-model:label="regionName"
|
|
<component :is="AppRegion" v-model="formData.DistrictID" v-model:label="regionName"
|
|
|
@finish="onRegionFinish" />
|
|
@finish="onRegionFinish" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
- <Field name="Address" type="textarea" label="收货地址" row="2" v-model="formData.Address"
|
|
|
|
|
- placeholder="必填" :rules="formRules.Address" />
|
|
|
|
|
|
|
+ <Field name="Address" type="textarea" :label="$t('position.spot.address')" row="2" v-model="formData.Address"
|
|
|
|
|
+ :placeholder="$t('common.require')" :rules="formRules.Address" />
|
|
|
</template>
|
|
</template>
|
|
|
- <Field name="AppointmentRemark" type="textarea" label="发票信息" rows="2" autosize
|
|
|
|
|
- v-model="formData.AppointmentRemark" placeholder="必填" :rules="formRules.AppointmentRemark"
|
|
|
|
|
|
|
+ <Field name="AppointmentRemark" type="textarea" :label="$t('position.spot.remark')" rows="2" autosize
|
|
|
|
|
+ v-model="formData.AppointmentRemark" :placeholder="$t('common.require')" :rules="formRules.AppointmentRemark"
|
|
|
right-icon="add-o" @click-right-icon="showReceipt = true" />
|
|
right-icon="add-o" @click-right-icon="showReceipt = true" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
</Form>
|
|
</Form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="g-form__footer">
|
|
<div class="g-form__footer">
|
|
|
- <Button block square type="danger" @click="formRef?.submit">提货</Button>
|
|
|
|
|
|
|
+ <Button block square type="danger" @click="formRef?.submit">{{ $t('operation.pickup') }}</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</app-view>
|
|
</app-view>
|
|
@@ -64,6 +64,7 @@ import { validateRules } from '@/constants/regex'
|
|
|
import { getReceiptTypeName } from '@/constants/receipt'
|
|
import { getReceiptTypeName } from '@/constants/receipt'
|
|
|
import { getAppointmentModelOutList } from '@/constants/order'
|
|
import { getAppointmentModelOutList } from '@/constants/order'
|
|
|
import { useWrOutInApply } from '@/business/trade'
|
|
import { useWrOutInApply } from '@/business/trade'
|
|
|
|
|
+import { i18n } from '@/stores'
|
|
|
|
|
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
@@ -80,6 +81,7 @@ const props = defineProps({
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const { global: { t } } = i18n
|
|
|
const { formData, applySubmit, orderQty } = useWrOutInApply(props.selectedRow)
|
|
const { formData, applySubmit, orderQty } = useWrOutInApply(props.selectedRow)
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
const showModal = shallowRef(true)
|
|
const showModal = shallowRef(true)
|
|
@@ -91,18 +93,18 @@ const regionName = shallowRef('') // 地区名称
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
const formRules: { [key in keyof Proto.WROutApplyReq | 'orderQty' | 'Region']?: FieldRule[] } = {
|
|
const formRules: { [key in keyof Proto.WROutApplyReq | 'orderQty' | 'Region']?: FieldRule[] } = {
|
|
|
orderQty: [{
|
|
orderQty: [{
|
|
|
- message: '请输入提货数量',
|
|
|
|
|
|
|
+ message: t('position.spot.tips12'),
|
|
|
validator: () => {
|
|
validator: () => {
|
|
|
return !!orderQty.value
|
|
return !!orderQty.value
|
|
|
}
|
|
}
|
|
|
}],
|
|
}],
|
|
|
ContactName: [{
|
|
ContactName: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: '请输入联系人',
|
|
|
|
|
|
|
+ message: t('position.spot.tips11'),
|
|
|
}],
|
|
}],
|
|
|
ContactNum: [{
|
|
ContactNum: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: '请输入联系方式',
|
|
|
|
|
|
|
+ message: t('position.spot.tips10'),
|
|
|
validator: (val) => {
|
|
validator: (val) => {
|
|
|
if (validateRules.phone.validate(val)) {
|
|
if (validateRules.phone.validate(val)) {
|
|
|
return true
|
|
return true
|
|
@@ -111,18 +113,18 @@ const formRules: { [key in keyof Proto.WROutApplyReq | 'orderQty' | 'Region']?:
|
|
|
}
|
|
}
|
|
|
}],
|
|
}],
|
|
|
Region: [{
|
|
Region: [{
|
|
|
- message: '请选择收货地区',
|
|
|
|
|
|
|
+ message: t('position.spot.tips9'),
|
|
|
validator: () => {
|
|
validator: () => {
|
|
|
return !!formData.ProvinceID && !!formData.CityID && !!formData.DistrictID
|
|
return !!formData.ProvinceID && !!formData.CityID && !!formData.DistrictID
|
|
|
}
|
|
}
|
|
|
}],
|
|
}],
|
|
|
Address: [{
|
|
Address: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: '请输入收货地址',
|
|
|
|
|
|
|
+ message: t('position.spot.tips8'),
|
|
|
}],
|
|
}],
|
|
|
AppointmentRemark: [{
|
|
AppointmentRemark: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: '请输入发票信息',
|
|
|
|
|
|
|
+ message: t('position.spot.tips7'),
|
|
|
}],
|
|
}],
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -153,35 +155,35 @@ const receiptChange = (item: Model.WrUserReceiptInfoRsp) => {
|
|
|
if (value !== '') {
|
|
if (value !== '') {
|
|
|
switch (key) {
|
|
switch (key) {
|
|
|
case 'receipttype': {
|
|
case 'receipttype': {
|
|
|
- formData.AppointmentRemark += '发票类型:' + getReceiptTypeName(Number(value)) + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.receipttype') + getReceiptTypeName(Number(value)) + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
case 'username': {
|
|
case 'username': {
|
|
|
- formData.AppointmentRemark += '发票抬头:' + value + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.username') + value + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
case 'taxpayerid': {
|
|
case 'taxpayerid': {
|
|
|
- formData.AppointmentRemark += '税号:' + value + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.taxpayerid') + value + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
case 'receiptbank': {
|
|
case 'receiptbank': {
|
|
|
- formData.AppointmentRemark += '开户银行:' + value + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.receiptbank') + value + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
case 'receiptaccount': {
|
|
case 'receiptaccount': {
|
|
|
- formData.AppointmentRemark += '银行账号:' + value + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.receiptaccount') + value + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
case 'address': {
|
|
case 'address': {
|
|
|
- formData.AppointmentRemark += '企业地址:' + value + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.address1') + value + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
case 'contactinfo': {
|
|
case 'contactinfo': {
|
|
|
- formData.AppointmentRemark += '企业电话:' + value + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.contactinfo') + value + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
case 'email': {
|
|
case 'email': {
|
|
|
- formData.AppointmentRemark += '邮箱:' + value + '\n'
|
|
|
|
|
|
|
+ formData.AppointmentRemark += t('position.spot.email') + value + '\n'
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -192,7 +194,7 @@ const receiptChange = (item: Model.WrUserReceiptInfoRsp) => {
|
|
|
const onSubmit = () => {
|
|
const onSubmit = () => {
|
|
|
fullloading((hideLoading) => {
|
|
fullloading((hideLoading) => {
|
|
|
applySubmit().then(() => {
|
|
applySubmit().then(() => {
|
|
|
- hideLoading('提交成功', 'success')
|
|
|
|
|
|
|
+ hideLoading(t('position.spot.tips6'), 'success')
|
|
|
closed(true)
|
|
closed(true)
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
hideLoading(err, 'fail')
|
|
hideLoading(err, 'fail')
|