cloudroam
2024-09-29 7e42cc8f4aa1c66077e12e140c3d5d3ded14a6b5
add:增加订单修改地址和联系方式
已修改1个文件
55 ■■■■■ 文件已修改
pages/order/list/index.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/list/index.vue
@@ -37,8 +37,9 @@
      orderList: [],
      tableConfig: {
        url: 'flower/api/order/list',
        editUrl: 'flower/api/order/page/update',
        hasNew: false,
        hasEdit: false,
        hasEdit: true,
        hasDelete: false,
        persistSelection: true,
        onResetView: (row) => {
@@ -57,6 +58,11 @@
              statusComp.extraQuery = { ...params, statusBackend: '' }
              statusComp.getOtherOptions()
            }
          }
        },
        beforeOpen: (row, isNew) => {
          if (!isNew) {
            row.districtStr = this.getDistrict(row)
          }
        },
        columns: [
@@ -158,6 +164,48 @@
              },
              { label: '收货地址:', id: 'address', type: 'input' },
              { label: '库位:', id: 'warehouseLocationCode', type: 'input' },
            ],
          },
        ],
        form: [
          {
            type: 'row',
            span: 12,
            items: [
              {
                label: '地区:',
                id: 'customerProvince',
                component: 'el-bus-select-area',
                span: 24,
                commonFormat: true,
                commonFormatProps: ['customerProvince', 'customerCity', 'customerRegion'],
                str: true,
                strKey: 'districtStr',
                rules: { required: true, message: '请选择地区' },
              },
              {
                label: '详细地址:',
                id: 'customerAddress',
                type: 'input',
                span: 24,
                rules: {
                  required: true,
                  message: '请输入详细地址且最大不超过50个汉字',
                  trigger: 'blur',
                  max: 50,
                },
              },
              {
                label: '联系方式:',
                id: 'customerTel',
                type: 'input',
                rules: {
                  required: true,
                  pattern: this.$elBusUtil.REG.MOBILEPHONE,
                  message: '请输入合法的手机号',
                  trigger: 'blur',
                },
              },
            ],
          },
        ],
@@ -305,6 +353,11 @@
      this.$refs.crud.search()
    },
  },
  methods: {
    getDistrict(row) {
      return `${row.customerProvince || ''}${row.customerCity || ''}${row.customerRegion || ''}`
    },
  },
}
</script>