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