|
@@ -166,13 +166,20 @@
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
|
|
|
<a-form-model-item label="成立时间" prop="buildDate">
|
|
|
- <a-date-picker
|
|
|
+ <!-- <a-date-picker
|
|
|
style="width:100%"
|
|
|
id="supplierInfoEdit-buildDate"
|
|
|
:disabledDate="disabledDate"
|
|
|
v-model="form.buildDate"
|
|
|
:format="dateFormat"
|
|
|
- placeholder="请选择日期" />
|
|
|
+ placeholder="请选择日期" /> -->
|
|
|
+ <a-date-picker
|
|
|
+ style="width:100%"
|
|
|
+ id="supplierInfoEdit-buildDate"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ placeholder="请选择日期"
|
|
|
+ :disabledDate="disabledDate"
|
|
|
+ v-model="form.buildDate"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
|
|
@@ -250,6 +257,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import moment from 'moment'
|
|
|
import { getArea } from '@/api/data'
|
|
|
import { VSelect } from '@/components'
|
|
|
import { supplierDetail, supplierSave } from '@/api/supplier.js'
|
|
@@ -339,6 +347,7 @@ export default {
|
|
|
supplierDetail({ sn: this.$route.params.id }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.form = Object.assign(this.form, res.data)
|
|
|
+ this.form.buildDate = moment(res.data.buildDate, 'YYYY-MM-DD')
|
|
|
this.form.cooperateFlag = Number(this.form.cooperateFlag)
|
|
|
this.getArea('city', this.form.provinceSn)
|
|
|
this.getArea('district', this.form.citySn)
|
|
@@ -350,7 +359,9 @@ export default {
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
console.log(this.form, 'form data')
|
|
|
- supplierSave(this.form).then(res => {
|
|
|
+ const form = JSON.parse(JSON.stringify(this.form))
|
|
|
+ form.buildDate = moment(form.buildDate).format('YYYY-MM-DD') + ' 00:00:00'
|
|
|
+ supplierSave(form).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.$message.success(res.message)
|
|
|
this.handleBack()
|