cloudroam
2025-01-09 bf6b7af0fb6c230eb15dd09ceda3a04abf958141
pages/order/list/index.vue
@@ -108,6 +108,7 @@
            ),
            minWidth: 200,
          },
          { label: '快递号', prop: 'deliveryNo', minWidth: 120 },
        ],
        searchFormAttrs: {
          labelWidth: 'auto',
@@ -360,6 +361,14 @@
        ],
        extraButtons: [
          {
            text: '快递号',
            show: (row) => !row.partnerName && row.statusBackend === 'SEND',
            atClick: (row) => {
              this.$refs.crud.$refs.extraDialog[1].show(row)
              return false
            },
          },
          {
            text: '发货',
            show: (row) => !row.partnerName && row.statusBackend === 'SEND',
            atClick: (row) => {
@@ -396,9 +405,22 @@
            hiddenReverseItems: [],
            form: [
              {
                label: '物流公司:',
                id: 'logisticsCompanyCode',
                type: 'bus-select-dict',
                readonly: true,
                el: {
                  code: 'LOGISTICS_COMPANY_CODE',
                  style: 'width:100%',
                },
                str: true,
                rules: {required: true, message: '物流公司'},
              },
              {
                label: '快递号:',
                id: 'deliveryNo',
                type: 'input',
                type: 'text',
                readonly: true,
                rules: {
                  required: true,
                  message: '请输入快递号',
@@ -416,6 +438,42 @@
              }
            },
          },
          {
            title: '快递号录入',
            hiddenReverseItems: [],
            form: [
              {
                label: '物流公司:',
                id: 'logisticsCompanyCode',
                type: 'bus-select-dict',
                el: {
                  code: 'LOGISTICS_COMPANY_CODE',
                  style: 'width:100%',
                },
                str: true,
                rules: {required: true, message: '物流公司'},
              },
              {
                label: '快递号:',
                id: 'deliveryNo',
                type: 'input',
                rules: {
                  required: true,
                  message: '请输入快递号',
                  trigger: 'blur',
                },
              },
            ],
            atConfirm: async (val) => {
              const { code } = await this.$elBusHttp.request(
                'flower/api/order/list/saveDeliveryNo',
                { method: 'post', data: val }
              )
              if (code === 0) {
                this.$message.success('快递号录入成功')
              }
            },
          },
        ],
      },
    }