-
+ @click="handleAdd"
+ >{{ '添加' }}
-
+
{
@@ -506,9 +488,16 @@ export default {
if (this.types === 1) {
datas.pkMember = this.table.pkMember
datas.province = this.table.addressd[0]
- datas.city = this.table.addressd[1]
- datas.county = this.table.addressd[2]
+ datas.city = this.table.addressd[1] || 0
+ datas.county = this.table.addressd[2] || 0
datas.effectiveEndDate = this.table.effectiveEndDate
+ let type = 1
+ if (datas.city && !datas.county) {
+ type = 2
+ } else if (datas.city && datas.county) {
+ type = 3
+ }
+ datas.type = type
con.retailRegionAdd(datas).then((res) => {
if (res.code === 200) {
Message({
@@ -528,9 +517,16 @@ export default {
datas.pkMember = this.table.pkMember
datas.pkId = this.pkIds
datas.province = this.table.addressd[0]
- datas.city = this.table.addressd[1]
- datas.county = this.table.addressd[2]
+ datas.city = this.table.addressd[1] || 0
+ datas.county = this.table.addressd[2] || 0
datas.effectiveEndDate = this.table.effectiveEndDate
+ let type = 1
+ if (datas.city && !datas.county) {
+ type = 2
+ } else if (datas.city && datas.county) {
+ type = 3
+ }
+ datas.type = type
con.retailRegionUpdate(datas).then((res) => {
if (res.code === 200) {
Message({