修改新建时间问题

master
飘泊客 10 months ago
parent 2b768b368c
commit edcc140ec2

@ -74,7 +74,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row v-if="title != '编辑门店'" justify="start"> <a-row justify="start">
<a-col :span="12"> <a-col :span="12">
<a-form-item <a-form-item
label="承接销售" label="承接销售"
@ -85,6 +85,7 @@
v-model:value="formModel.userId" v-model:value="formModel.userId"
:field-names="{ label: 'userName', value: 'userId' }" :field-names="{ label: 'userName', value: 'userId' }"
:options="userList" :options="userList"
:disabled="title == '编辑门店'"
placeholder="请选择承接销售" placeholder="请选择承接销售"
/> />
</a-form-item> </a-form-item>
@ -113,7 +114,7 @@
<a-textarea <a-textarea
id="tipinput" id="tipinput"
v-model:value="formModel.address" v-model:value="formModel.address"
:readonly="title == '编辑门店'" :disabled="title == '编辑门店'"
allow-clear allow-clear
auto-size auto-size
placeholder="请输入详细地址" placeholder="请输入详细地址"
@ -316,14 +317,17 @@ defineExpose({
title.value = '添加门店' title.value = '添加门店'
} else if (newFormAction === FormAction.UPDATE) { } else if (newFormAction === FormAction.UPDATE) {
title.value = '编辑门店' title.value = '编辑门店'
const tradeTime = record?.tradeTime.toString() const data: shopDetailVO = Object.assign({}, record)
const tradeTime = data?.tradeTime.toString()
const time: string[] = tradeTime!.split('-') const time: string[] = tradeTime!.split('-')
if (time) { if (time[0].trim().length == 5) {
time[0] = time[0] + ':00' time[0] = time[0].trim() + ':00'
time[1] = time[1] + ':00' }
if (time[1].trim().length == 5) {
time[1] = time[1].trim() + ':00'
} }
record!.tradeTime = time data!.tradeTime = time
overrideProperties(formModel, record) overrideProperties(formModel, data)
} }
formAction.value = newFormAction formAction.value = newFormAction
} }

Loading…
Cancel
Save